提交 657e4561 编写于 作者: lxm1993's avatar lxm1993

feat: 插件更新

上级 7c952bc7
var Q = Object.defineProperty;
var X = (e, t, s) => t in e ? Q(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
var k = (e, t, s) => (X(e, typeof t != "symbol" ? t + "" : t, s), s);
import { GridFieldColumnController as O, GridRowController as Z, WFStepTraceViewController as ee, UploadEditorController as V } from "@ibiz-template/controller";
import { GridFieldColumnController as V, GridRowController as Z, WFStepTraceViewController as ee, UploadEditorController as M } from "@ibiz-template/controller";
import { defineComponent as U, computed as G, h as c, getCurrentInstance as N, ref as m, watch as T, toRefs as _ } from "vue";
import { useNamespace as S, useViewController as te, usePropsWatch as z, getUploadProps as se, getEditorEmits as oe, getGridUploadProps as A, useClickOutside as ie, getGridEditorEmits as re, useEventListener as ne, useWFStepTraceViewController as ae, useWFDynaEditView3Controller as le, useEditView3Controller as ce } from "@ibiz-template/vue-util";
import { colorBlend as de, IBizContext as ue, HttpError as j, isImage as me, uploadFile as pe, RuntimeError as he } from "@ibiz-template/core";
......@@ -12,7 +12,7 @@ const ve = U({
name: "CodeListGridColumn",
props: {
controller: {
type: O,
type: V,
required: !0
},
row: {
......@@ -130,7 +130,7 @@ const ye = U({
})]);
}
});
const ge = U({
const Fe = U({
name: "WFToolbar",
props: {
wfLinks: {
......@@ -167,7 +167,7 @@ const ge = U({
}, [t.sequenceFlowName || ""])]);
})]);
}
}), Fe = typeof btoa == "function", B = typeof Buffer == "function";
}), ge = typeof btoa == "function", B = typeof Buffer == "function";
typeof TextDecoder == "function" && new TextDecoder();
const W = typeof TextEncoder == "function" ? new TextEncoder() : void 0, Ce = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", D = Array.prototype.slice.call(Ce);
((e) => {
......@@ -185,7 +185,7 @@ const Ee = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" :
t = s << 16 | o << 8 | r, n += D[t >> 18 & 63] + D[t >> 12 & 63] + D[t >> 6 & 63] + D[t & 63];
}
return l ? n.slice(0, l - 3) + "===".substring(l) : n;
}, q = Fe ? (e) => btoa(e) : B ? (e) => Buffer.from(e, "binary").toString("base64") : Ue, xe = B ? (e) => Buffer.from(e).toString("base64") : (e) => {
}, q = ge ? (e) => btoa(e) : B ? (e) => Buffer.from(e, "binary").toString("base64") : Ue, xe = B ? (e) => Buffer.from(e).toString("base64") : (e) => {
let s = [];
for (let o = 0, r = e.length; o < r; o += 4096)
s.push(x.apply(null, e.subarray(o, o + 4096)));
......@@ -198,7 +198,7 @@ const Ee = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" :
var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320);
return x(240 | t >>> 18 & 7) + x(128 | t >>> 12 & 63) + x(128 | t >>> 6 & 63) + x(128 | t & 63);
}
}, ke = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, Te = (e) => e.replace(ke, Se), M = B ? (e) => Buffer.from(e, "utf8").toString("base64") : W ? (e) => xe(W.encode(e)) : (e) => q(Te(e)), $ = (e, t = !1) => t ? Ee(M(e)) : M(e);
}, ke = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, Te = (e) => e.replace(ke, Se), O = B ? (e) => Buffer.from(e, "utf8").toString("base64") : W ? (e) => xe(W.encode(e)) : (e) => q(Te(e)), $ = (e, t = !1) => t ? Ee(O(e)) : O(e);
function Ie(e, t, s) {
const o = m([]), r = m({
Authorization: `Bearer ${fe("access_token")}`
......@@ -260,28 +260,28 @@ function Ie(e, t, s) {
return;
const a = o.value.findIndex((b) => b.id === i.id);
a !== -1 && o.value.splice(a, 1), p();
}, g = (i) => {
}, F = (i) => {
const a = i.url || l.value.replace("%fileId%", i.id);
s.fileDownload({ url: a, name: i.name });
}, f = m(!1), F = m(""), E = m("");
}, f = m(!1), g = m(""), E = m("");
return {
uploadUrl: n,
downloadUrl: l,
headers: r,
files: o,
onDownload: g,
onDownload: F,
onError: h,
onRemove: C,
onSuccess: y,
beforeUpload: v,
showModal: f,
modalTitle: F,
modalTitle: g,
iframeUrl: E,
onModalCancel: () => {
f.value = !1, F.value = "", E.value = "";
f.value = !1, g.value = "", E.value = "";
},
previewFile: (i) => {
f.value = !0, F.value = i.name;
f.value = !0, g.value = i.name;
const a = window.Environment.previewFileUrl;
if (a) {
const b = encodeURIComponent(
......@@ -311,9 +311,9 @@ const De = U({
onSuccess: y,
beforeUpload: h,
showModal: C,
modalTitle: g,
modalTitle: F,
iframeUrl: f,
onModalCancel: F,
onModalCancel: g,
previewFile: E
} = Ie(e, (u) => {
t("change", u);
......@@ -330,9 +330,9 @@ const De = U({
onSuccess: y,
beforeUpload: h,
showModal: C,
modalTitle: g,
modalTitle: F,
iframeUrl: f,
onModalCancel: F,
onModalCancel: g,
previewFile: E
};
},
......@@ -534,19 +534,19 @@ function J(e) {
error: v,
finish: y
});
}, C = m(!1), g = m(""), f = m("");
}, C = m(!1), F = m(""), f = m("");
return {
selectFile: h,
fileList: s,
uploadState: t,
showModal: C,
modalTitle: g,
modalTitle: F,
iframeUrl: f,
onModalCancel: () => {
C.value = !1, g.value = "", f.value = "";
C.value = !1, F.value = "", f.value = "";
},
previewFile: (u) => {
C.value = !0, g.value = u.name;
C.value = !0, F.value = u.name;
const w = window.Environment.previewFileUrl;
if (w) {
const i = encodeURIComponent(
......@@ -581,7 +581,7 @@ const Pe = U({
modalTitle: y,
iframeUrl: h,
previewFile: C,
onModalCancel: g
onModalCancel: F
} = J({
downloadUrl: n,
uploadUrl: l,
......@@ -593,11 +593,11 @@ const Pe = U({
showModal: v,
modalTitle: y,
iframeUrl: h,
downloadFile: (F) => {
e.controller.fileDownload(F);
downloadFile: (g) => {
e.controller.fileDownload(g);
},
previewFile: C,
onModalCancel: g
onModalCancel: F
};
},
render() {
......@@ -683,7 +683,7 @@ const Le = U({
required: !0
},
controller: {
type: V,
type: M,
required: !0
}
},
......@@ -718,8 +718,8 @@ const Le = U({
componentRef: v,
fileList: l,
deleteFile: (f) => {
const F = l.value.findIndex((E) => E.id === f.id);
l.value.splice(F, 1), y.value = !0;
const g = l.value.findIndex((E) => E.id === f.id);
l.value.splice(g, 1), y.value = !0;
},
selectFile: p,
downloadFile: (f) => {
......@@ -785,7 +785,7 @@ const _e = U({
}), v = m(), y = async () => {
if (!v.value)
throw new he("\u5BB9\u5668\u5143\u7D20\u4E0D\u5B58\u5728");
const h = v.value.$el, C = h.offsetHeight, g = ibiz.overlay.createPopover((E) => E(Le, {
const h = v.value.$el, C = h.offsetHeight, F = ibiz.overlay.createPopover((E) => E(Le, {
props: {
value: p.value,
uploadUrl: d.value,
......@@ -794,7 +794,7 @@ const _e = U({
},
on: {
close: (u) => {
g.dismiss(u);
F.dismiss(u);
}
}
}), void 0, {
......@@ -805,13 +805,13 @@ const _e = U({
crossAxis: 0
}
});
await g.present(h);
await F.present(h);
const {
isModified: f,
resultFiles: F
} = await g.onWillDismiss();
resultFiles: g
} = await F.onWillDismiss();
if (f) {
const E = F.length > 0 ? JSON.stringify(F.map((u) => ({
const E = g.length > 0 ? JSON.stringify(g.map((u) => ({
name: u.name,
id: u.id
}))) : null;
......@@ -854,7 +854,7 @@ class Be {
k(this, "component", ve);
}
async createController(t, s) {
const o = new O(t, s);
const o = new V(t, s);
return await o.init(), o;
}
}
......@@ -1065,12 +1065,12 @@ const Y = U({
})])]);
}
});
class Me {
class Oe {
constructor() {
k(this, "component", We);
}
}
const Oe = U({
const Ve = U({
name: "SyEditView3",
props: {
context: Object,
......@@ -1167,9 +1167,9 @@ const Oe = U({
})])]);
}
});
class Ve {
class Me {
constructor() {
k(this, "component", Oe);
k(this, "component", Ve);
}
}
class ze {
......@@ -1178,14 +1178,14 @@ class ze {
k(this, "gridEditor", "SyGridFileUploadContainer");
}
async createController(t, s) {
const o = new V(t, s);
const o = new M(t, s);
return await o.init(), o;
}
}
const Xe = {
mateUrl: import.meta.url,
install(e) {
ibiz.config.enableDataInfoBar = !1, ibiz.config.gridEditShowMode = "all", e.component("WfToolbar", ge), ibiz.register.view.register(
ibiz.config.enableDataInfoBar = !1, e.component("WfToolbar", Fe), ibiz.register.view.register(
"VIEW_CUSTOM_SyWebIndexView",
new Ge()
), ibiz.register.view.register(
......@@ -1196,10 +1196,10 @@ const Xe = {
new Be()
), ibiz.register.view.register(
"VIEW_CUSTOM_SyWfDynaEditView3",
new Me()
new Oe()
), ibiz.register.view.register(
"VIEW_CUSTOM_SyEditView3",
new Ve()
new Me()
), e.component("SyFileUpload", De), e.component("SyGridFileUpload", Pe), e.component("SyEditGridFileUpload", _e), e.component("SyGridFileUploadContainer", Ne), ibiz.register.editor.register(
"EDITOR_CUSTOMSTYLE_SyFileUpload",
new ze()
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册