提交 8ec1c052 编写于 作者: lxm1993's avatar lxm1993

feat: 插件升级

上级 0bdd852a
var Q = Object.defineProperty; 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 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); var k = (e, t, s) => (X(e, typeof t != "symbol" ? t + "" : t, s), s);
import { GridFieldColumnController as V, GridRowController as Z, WFStepTraceViewController as ee, UploadEditorController as M } from "@ibiz-template/controller"; import { GridFieldColumnController as O, GridRowController as Z, WFStepTraceViewController as ee, UploadEditorController as V } 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 { 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 { 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"; 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({ ...@@ -12,7 +12,7 @@ const ve = U({
name: "CodeListGridColumn", name: "CodeListGridColumn",
props: { props: {
controller: { controller: {
type: V, type: O,
required: !0 required: !0
}, },
row: { row: {
...@@ -130,7 +130,7 @@ const ye = U({ ...@@ -130,7 +130,7 @@ const ye = U({
})]); })]);
} }
}); });
const Fe = U({ const ge = U({
name: "WFToolbar", name: "WFToolbar",
props: { props: {
wfLinks: { wfLinks: {
...@@ -167,7 +167,7 @@ const Fe = U({ ...@@ -167,7 +167,7 @@ const Fe = U({
}, [t.sequenceFlowName || ""])]); }, [t.sequenceFlowName || ""])]);
})]); })]);
} }
}), ge = typeof btoa == "function", B = typeof Buffer == "function"; }), Fe = typeof btoa == "function", B = typeof Buffer == "function";
typeof TextDecoder == "function" && new TextDecoder(); typeof TextDecoder == "function" && new TextDecoder();
const W = typeof TextEncoder == "function" ? new TextEncoder() : void 0, Ce = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", D = Array.prototype.slice.call(Ce); const W = typeof TextEncoder == "function" ? new TextEncoder() : void 0, Ce = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", D = Array.prototype.slice.call(Ce);
((e) => { ((e) => {
...@@ -185,7 +185,7 @@ const Ee = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : ...@@ -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]; 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; return l ? n.slice(0, l - 3) + "===".substring(l) : n;
}, q = ge ? (e) => btoa(e) : B ? (e) => Buffer.from(e, "binary").toString("base64") : Ue, xe = B ? (e) => Buffer.from(e).toString("base64") : (e) => { }, q = Fe ? (e) => btoa(e) : B ? (e) => Buffer.from(e, "binary").toString("base64") : Ue, xe = B ? (e) => Buffer.from(e).toString("base64") : (e) => {
let s = []; let s = [];
for (let o = 0, r = e.length; o < r; o += 4096) for (let o = 0, r = e.length; o < r; o += 4096)
s.push(x.apply(null, e.subarray(o, 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 == "+" ? "-" : ...@@ -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); 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); 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), 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); }, 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);
function Ie(e, t, s) { function Ie(e, t, s) {
const o = m([]), r = m({ const o = m([]), r = m({
Authorization: `Bearer ${fe("access_token")}` Authorization: `Bearer ${fe("access_token")}`
...@@ -260,28 +260,28 @@ function Ie(e, t, s) { ...@@ -260,28 +260,28 @@ function Ie(e, t, s) {
return; return;
const a = o.value.findIndex((b) => b.id === i.id); const a = o.value.findIndex((b) => b.id === i.id);
a !== -1 && o.value.splice(a, 1), p(); a !== -1 && o.value.splice(a, 1), p();
}, F = (i) => { }, g = (i) => {
const a = i.url || l.value.replace("%fileId%", i.id); const a = i.url || l.value.replace("%fileId%", i.id);
s.fileDownload({ url: a, name: i.name }); s.fileDownload({ url: a, name: i.name });
}, f = m(!1), g = m(""), E = m(""); }, f = m(!1), F = m(""), E = m("");
return { return {
uploadUrl: n, uploadUrl: n,
downloadUrl: l, downloadUrl: l,
headers: r, headers: r,
files: o, files: o,
onDownload: F, onDownload: g,
onError: h, onError: h,
onRemove: C, onRemove: C,
onSuccess: y, onSuccess: y,
beforeUpload: v, beforeUpload: v,
showModal: f, showModal: f,
modalTitle: g, modalTitle: F,
iframeUrl: E, iframeUrl: E,
onModalCancel: () => { onModalCancel: () => {
f.value = !1, g.value = "", E.value = ""; f.value = !1, F.value = "", E.value = "";
}, },
previewFile: (i) => { previewFile: (i) => {
f.value = !0, g.value = i.name; f.value = !0, F.value = i.name;
const a = window.Environment.previewFileUrl; const a = window.Environment.previewFileUrl;
if (a) { if (a) {
const b = encodeURIComponent( const b = encodeURIComponent(
...@@ -311,9 +311,9 @@ const De = U({ ...@@ -311,9 +311,9 @@ const De = U({
onSuccess: y, onSuccess: y,
beforeUpload: h, beforeUpload: h,
showModal: C, showModal: C,
modalTitle: F, modalTitle: g,
iframeUrl: f, iframeUrl: f,
onModalCancel: g, onModalCancel: F,
previewFile: E previewFile: E
} = Ie(e, (u) => { } = Ie(e, (u) => {
t("change", u); t("change", u);
...@@ -330,9 +330,9 @@ const De = U({ ...@@ -330,9 +330,9 @@ const De = U({
onSuccess: y, onSuccess: y,
beforeUpload: h, beforeUpload: h,
showModal: C, showModal: C,
modalTitle: F, modalTitle: g,
iframeUrl: f, iframeUrl: f,
onModalCancel: g, onModalCancel: F,
previewFile: E previewFile: E
}; };
}, },
...@@ -534,19 +534,19 @@ function J(e) { ...@@ -534,19 +534,19 @@ function J(e) {
error: v, error: v,
finish: y finish: y
}); });
}, C = m(!1), F = m(""), f = m(""); }, C = m(!1), g = m(""), f = m("");
return { return {
selectFile: h, selectFile: h,
fileList: s, fileList: s,
uploadState: t, uploadState: t,
showModal: C, showModal: C,
modalTitle: F, modalTitle: g,
iframeUrl: f, iframeUrl: f,
onModalCancel: () => { onModalCancel: () => {
C.value = !1, F.value = "", f.value = ""; C.value = !1, g.value = "", f.value = "";
}, },
previewFile: (u) => { previewFile: (u) => {
C.value = !0, F.value = u.name; C.value = !0, g.value = u.name;
const w = window.Environment.previewFileUrl; const w = window.Environment.previewFileUrl;
if (w) { if (w) {
const i = encodeURIComponent( const i = encodeURIComponent(
...@@ -581,7 +581,7 @@ const Pe = U({ ...@@ -581,7 +581,7 @@ const Pe = U({
modalTitle: y, modalTitle: y,
iframeUrl: h, iframeUrl: h,
previewFile: C, previewFile: C,
onModalCancel: F onModalCancel: g
} = J({ } = J({
downloadUrl: n, downloadUrl: n,
uploadUrl: l, uploadUrl: l,
...@@ -593,11 +593,11 @@ const Pe = U({ ...@@ -593,11 +593,11 @@ const Pe = U({
showModal: v, showModal: v,
modalTitle: y, modalTitle: y,
iframeUrl: h, iframeUrl: h,
downloadFile: (g) => { downloadFile: (F) => {
e.controller.fileDownload(g); e.controller.fileDownload(F);
}, },
previewFile: C, previewFile: C,
onModalCancel: F onModalCancel: g
}; };
}, },
render() { render() {
...@@ -683,7 +683,7 @@ const Le = U({ ...@@ -683,7 +683,7 @@ const Le = U({
required: !0 required: !0
}, },
controller: { controller: {
type: M, type: V,
required: !0 required: !0
} }
}, },
...@@ -718,8 +718,8 @@ const Le = U({ ...@@ -718,8 +718,8 @@ const Le = U({
componentRef: v, componentRef: v,
fileList: l, fileList: l,
deleteFile: (f) => { deleteFile: (f) => {
const g = l.value.findIndex((E) => E.id === f.id); const F = l.value.findIndex((E) => E.id === f.id);
l.value.splice(g, 1), y.value = !0; l.value.splice(F, 1), y.value = !0;
}, },
selectFile: p, selectFile: p,
downloadFile: (f) => { downloadFile: (f) => {
...@@ -785,7 +785,7 @@ const _e = U({ ...@@ -785,7 +785,7 @@ const _e = U({
}), v = m(), y = async () => { }), v = m(), y = async () => {
if (!v.value) if (!v.value)
throw new he("\u5BB9\u5668\u5143\u7D20\u4E0D\u5B58\u5728"); throw new he("\u5BB9\u5668\u5143\u7D20\u4E0D\u5B58\u5728");
const h = v.value.$el, C = h.offsetHeight, F = ibiz.overlay.createPopover((E) => E(Le, { const h = v.value.$el, C = h.offsetHeight, g = ibiz.overlay.createPopover((E) => E(Le, {
props: { props: {
value: p.value, value: p.value,
uploadUrl: d.value, uploadUrl: d.value,
...@@ -794,7 +794,7 @@ const _e = U({ ...@@ -794,7 +794,7 @@ const _e = U({
}, },
on: { on: {
close: (u) => { close: (u) => {
F.dismiss(u); g.dismiss(u);
} }
} }
}), void 0, { }), void 0, {
...@@ -805,13 +805,13 @@ const _e = U({ ...@@ -805,13 +805,13 @@ const _e = U({
crossAxis: 0 crossAxis: 0
} }
}); });
await F.present(h); await g.present(h);
const { const {
isModified: f, isModified: f,
resultFiles: g resultFiles: F
} = await F.onWillDismiss(); } = await g.onWillDismiss();
if (f) { if (f) {
const E = g.length > 0 ? JSON.stringify(g.map((u) => ({ const E = F.length > 0 ? JSON.stringify(F.map((u) => ({
name: u.name, name: u.name,
id: u.id id: u.id
}))) : null; }))) : null;
...@@ -854,7 +854,7 @@ class Be { ...@@ -854,7 +854,7 @@ class Be {
k(this, "component", ve); k(this, "component", ve);
} }
async createController(t, s) { async createController(t, s) {
const o = new V(t, s); const o = new O(t, s);
return await o.init(), o; return await o.init(), o;
} }
} }
...@@ -1065,12 +1065,12 @@ const Y = U({ ...@@ -1065,12 +1065,12 @@ const Y = U({
})])]); })])]);
} }
}); });
class Oe { class Me {
constructor() { constructor() {
k(this, "component", We); k(this, "component", We);
} }
} }
const Ve = U({ const Oe = U({
name: "SyEditView3", name: "SyEditView3",
props: { props: {
context: Object, context: Object,
...@@ -1167,9 +1167,9 @@ const Ve = U({ ...@@ -1167,9 +1167,9 @@ const Ve = U({
})])]); })])]);
} }
}); });
class Me { class Ve {
constructor() { constructor() {
k(this, "component", Ve); k(this, "component", Oe);
} }
} }
class ze { class ze {
...@@ -1178,14 +1178,14 @@ class ze { ...@@ -1178,14 +1178,14 @@ class ze {
k(this, "gridEditor", "SyGridFileUploadContainer"); k(this, "gridEditor", "SyGridFileUploadContainer");
} }
async createController(t, s) { async createController(t, s) {
const o = new M(t, s); const o = new V(t, s);
return await o.init(), o; return await o.init(), o;
} }
} }
const Xe = { const Xe = {
mateUrl: import.meta.url, mateUrl: import.meta.url,
install(e) { install(e) {
ibiz.config.enableDataInfoBar = !1, e.component("WfToolbar", Fe), ibiz.register.view.register( ibiz.config.enableDataInfoBar = !1, ibiz.config.gridEditShowMode = "all", e.component("WfToolbar", ge), ibiz.register.view.register(
"VIEW_CUSTOM_SyWebIndexView", "VIEW_CUSTOM_SyWebIndexView",
new Ge() new Ge()
), ibiz.register.view.register( ), ibiz.register.view.register(
...@@ -1196,10 +1196,10 @@ const Xe = { ...@@ -1196,10 +1196,10 @@ const Xe = {
new Be() new Be()
), ibiz.register.view.register( ), ibiz.register.view.register(
"VIEW_CUSTOM_SyWfDynaEditView3", "VIEW_CUSTOM_SyWfDynaEditView3",
new Oe() new Me()
), ibiz.register.view.register( ), ibiz.register.view.register(
"VIEW_CUSTOM_SyEditView3", "VIEW_CUSTOM_SyEditView3",
new Me() new Ve()
), e.component("SyFileUpload", De), e.component("SyGridFileUpload", Pe), e.component("SyEditGridFileUpload", _e), e.component("SyGridFileUploadContainer", Ne), ibiz.register.editor.register( ), e.component("SyFileUpload", De), e.component("SyGridFileUpload", Pe), e.component("SyEditGridFileUpload", _e), e.component("SyGridFileUploadContainer", Ne), ibiz.register.editor.register(
"EDITOR_CUSTOMSTYLE_SyFileUpload", "EDITOR_CUSTOMSTYLE_SyFileUpload",
new ze() new ze()
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册