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

feat: 插件升级

上级 0bdd852a
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 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 { 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: V,
type: O,
required: !0
},
row: {
......@@ -130,7 +130,7 @@ const ye = U({
})]);
}
});
const Fe = U({
const ge = U({
name: "WFToolbar",
props: {
wfLinks: {
......@@ -167,7 +167,7 @@ const Fe = U({
}, [t.sequenceFlowName || ""])]);
})]);
}
}), ge = typeof btoa == "function", B = typeof Buffer == "function";
}), Fe = 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 = 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 = [];
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), 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) {
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();
}, F = (i) => {
}, g = (i) => {
const a = i.url || l.value.replace("%fileId%", i.id);
s.fileDownload({ url: a, name: i.name });
}, f = m(!1), g = m(""), E = m("");
}, f = m(!1), F = m(""), E = m("");
return {
uploadUrl: n,
downloadUrl: l,
headers: r,
files: o,
onDownload: F,
onDownload: g,
onError: h,
onRemove: C,
onSuccess: y,
beforeUpload: v,
showModal: f,
modalTitle: g,
modalTitle: F,
iframeUrl: E,
onModalCancel: () => {
f.value = !1, g.value = "", E.value = "";
f.value = !1, F.value = "", E.value = "";
},
previewFile: (i) => {
f.value = !0, g.value = i.name;
f.value = !0, F.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: F,
modalTitle: g,
iframeUrl: f,
onModalCancel: g,
onModalCancel: F,
previewFile: E
} = Ie(e, (u) => {
t("change", u);
......@@ -330,9 +330,9 @@ const De = U({
onSuccess: y,
beforeUpload: h,
showModal: C,
modalTitle: F,
modalTitle: g,
iframeUrl: f,
onModalCancel: g,
onModalCancel: F,
previewFile: E
};
},
......@@ -534,19 +534,19 @@ function J(e) {
error: v,
finish: y
});
}, C = m(!1), F = m(""), f = m("");
}, C = m(!1), g = m(""), f = m("");
return {
selectFile: h,
fileList: s,
uploadState: t,
showModal: C,
modalTitle: F,
modalTitle: g,
iframeUrl: f,
onModalCancel: () => {
C.value = !1, F.value = "", f.value = "";
C.value = !1, g.value = "", f.value = "";
},
previewFile: (u) => {
C.value = !0, F.value = u.name;
C.value = !0, g.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: F
onModalCancel: g
} = J({
downloadUrl: n,
uploadUrl: l,
......@@ -593,11 +593,11 @@ const Pe = U({
showModal: v,
modalTitle: y,
iframeUrl: h,
downloadFile: (g) => {
e.controller.fileDownload(g);
downloadFile: (F) => {
e.controller.fileDownload(F);
},
previewFile: C,
onModalCancel: F
onModalCancel: g
};
},
render() {
......@@ -683,7 +683,7 @@ const Le = U({
required: !0
},
controller: {
type: M,
type: V,
required: !0
}
},
......@@ -718,8 +718,8 @@ const Le = U({
componentRef: v,
fileList: l,
deleteFile: (f) => {
const g = l.value.findIndex((E) => E.id === f.id);
l.value.splice(g, 1), y.value = !0;
const F = l.value.findIndex((E) => E.id === f.id);
l.value.splice(F, 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, F = ibiz.overlay.createPopover((E) => E(Le, {
const h = v.value.$el, C = h.offsetHeight, g = ibiz.overlay.createPopover((E) => E(Le, {
props: {
value: p.value,
uploadUrl: d.value,
......@@ -794,7 +794,7 @@ const _e = U({
},
on: {
close: (u) => {
F.dismiss(u);
g.dismiss(u);
}
}
}), void 0, {
......@@ -805,13 +805,13 @@ const _e = U({
crossAxis: 0
}
});
await F.present(h);
await g.present(h);
const {
isModified: f,
resultFiles: g
} = await F.onWillDismiss();
resultFiles: F
} = await g.onWillDismiss();
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,
id: u.id
}))) : null;
......@@ -854,7 +854,7 @@ class Be {
k(this, "component", ve);
}
async createController(t, s) {
const o = new V(t, s);
const o = new O(t, s);
return await o.init(), o;
}
}
......@@ -1065,12 +1065,12 @@ const Y = U({
})])]);
}
});
class Oe {
class Me {
constructor() {
k(this, "component", We);
}
}
const Ve = U({
const Oe = U({
name: "SyEditView3",
props: {
context: Object,
......@@ -1167,9 +1167,9 @@ const Ve = U({
})])]);
}
});
class Me {
class Ve {
constructor() {
k(this, "component", Ve);
k(this, "component", Oe);
}
}
class ze {
......@@ -1178,14 +1178,14 @@ class ze {
k(this, "gridEditor", "SyGridFileUploadContainer");
}
async createController(t, s) {
const o = new M(t, s);
const o = new V(t, s);
return await o.init(), o;
}
}
const Xe = {
mateUrl: import.meta.url,
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",
new Ge()
), ibiz.register.view.register(
......@@ -1196,10 +1196,10 @@ const Xe = {
new Be()
), ibiz.register.view.register(
"VIEW_CUSTOM_SyWfDynaEditView3",
new Oe()
new Me()
), ibiz.register.view.register(
"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(
"EDITOR_CUSTOMSTYLE_SyFileUpload",
new ze()
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册