var J = Object.defineProperty; var H = (e, t, o) => t in e ? J(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o; var E = (e, t, o) => (H(e, typeof t != "symbol" ? t + "" : t, o), o); import { GridFieldColumnController as M, GridRowController as Y, WFStepTraceViewController as K, UploadEditorController as W } from "@ibiz-template/controller"; import { defineComponent as U, computed as G, h as l, getCurrentInstance as P, ref as m, watch as k, toRefs as N } from "vue"; import { useNamespace as S, useViewController as Q, usePropsWatch as B, getUploadProps as X, getEditorEmits as Z, getGridUploadProps as L, useClickOutside as ee, useEventListener as te, useWFStepTraceViewController as oe, useWFDynaEditView3Controller as se, useEditView3Controller as ie } from "@ibiz-template/vue-util"; import { colorBlend as re, IBizContext as ne, isImage as ae, uploadFile as le, RuntimeError as ce } from "@ibiz-template/core"; import { getCookie as de } from "qx-util"; import { ViewMode as A } from "@ibiz-template/runtime"; import { ViewType as ue } from "@ibiz-template/model"; const me = U({ name: "CodeListGridColumn", props: { controller: { type: M, required: !0 }, row: { type: Y, required: !0 } }, setup(e) { const t = S("grid-field-column"), o = G(() => { var a; if (e.controller.model.source.cLConvertMode !== "FRONT") return []; const n = e.row.data[e.controller.model.codeName]; return ((a = e.controller.codeListItems) == null ? void 0 : a.length) && n ? n.split(",").map((v) => { const h = e.controller.codeListItems.find((f) => f.value === v); if (h) { const f = h.color || "#515a6e"; return { text: h.text, colorStyle: t.cssVarBlock({ color: f, "border-color": f, "bg-color": re(f, "#fff") }) }; } }).filter(Boolean) : []; }), s = (n) => { e.controller.isLinkColumn && e.controller.openLinkView(e.row, n); }, r = G(() => { let n = ""; switch (e.controller.model.align) { case "LEFT": n = "flex-start"; break; case "RIGHT": n = "flex-end"; break; default: n = "center"; break; } return t.cssVarBlock({ "justify-content": n }); }); return { ns: t, alignStyle: r, selectedItems: o, onCellClick: s }; }, render() { const e = this.controller, t = this.row.data[e.model.codeName]; return l("div", { class: [this.ns.b(), e.isLinkColumn && this.ns.m("link-column")], style: this.alignStyle, on: { click: this.onCellClick } }, [this.selectedItems.length > 0 ? this.selectedItems.map((o) => l("span", { class: this.ns.e("code-list-item"), style: o.colorStyle }, [o.text])) : l("span", { class: this.ns.e("text") }, [t])]); } }); class pe extends K { constructor() { super(...arguments); E(this, "imgSrc"); } async getUIData() { const o = new ne(this.params, this.context), s = await this.entityService.wf.getWFProcessDiagram(o), r = new Blob([s.data]); this.imgSrc = URL.createObjectURL(r); } } const he = U({ name: "PresetWFChartView", props: { context: Object, params: { type: Object }, modelPath: { type: String, required: !0 }, modal: { type: Object }, deName: { type: String, required: !0 } }, setup(e) { const t = S("preset-wf-chart-view"), { proxy: o } = P(), s = Q(o, (r, n) => new pe(e.modelPath, r, n)); return B(o, "deName", s.setDeName.bind(s)), { c: s, ns: t }; }, render() { return l("div", { class: this.ns.b() }, [l("img", { attrs: { src: this.c.imgSrc } })]); } }); const fe = U({ name: "WFToolbar", props: { wfLinks: { type: Array, required: !0 } }, setup(e, { emit: t }) { return { ns: S("wf-toolbar"), handleClick: async (r, n) => { t("wf-link-click", r, n); } }; }, render() { const e = this.wfLinks || []; return l("div", { class: `${this.ns.b()}` }, [e.length > 0 && e.map((t) => { const o = t.sequenceFlowName == "\u9A73\u56DE" || t.sequenceFlowName == "\u53D6\u6D88"; return l("div", { key: t.sequenceFlowId, class: [this.ns.e("item"), o ? this.ns.em("item", "reject") : ""] }, [l("i-button", { attrs: { title: t.sequenceFlowName }, on: { click: (s) => this.handleClick(t, s) } }, [t.sequenceFlowName || ""])]); })]); } }), be = typeof btoa == "function", _ = typeof Buffer == "function"; typeof TextDecoder == "function" && new TextDecoder(); const O = typeof TextEncoder == "function" ? new TextEncoder() : void 0, ve = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", I = Array.prototype.slice.call(ve); ((e) => { let t = {}; return e.forEach((o, s) => t[o] = s), t; })(I); const x = String.fromCharCode.bind(String); typeof Uint8Array.from == "function" && Uint8Array.from.bind(Uint8Array); const ye = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "_"), we = (e) => { let t, o, s, r, n = ""; const a = e.length % 3; for (let c = 0; c < e.length; ) { if ((o = e.charCodeAt(c++)) > 255 || (s = e.charCodeAt(c++)) > 255 || (r = e.charCodeAt(c++)) > 255) throw new TypeError("invalid character found"); t = o << 16 | s << 8 | r, n += I[t >> 18 & 63] + I[t >> 12 & 63] + I[t >> 6 & 63] + I[t & 63]; } return a ? n.slice(0, a - 3) + "===".substring(a) : n; }, R = be ? (e) => btoa(e) : _ ? (e) => Buffer.from(e, "binary").toString("base64") : we, ge = _ ? (e) => Buffer.from(e).toString("base64") : (e) => { let o = []; for (let s = 0, r = e.length; s < r; s += 4096) o.push(x.apply(null, e.subarray(s, s + 4096))); return R(o.join("")); }, Fe = (e) => { if (e.length < 2) { var t = e.charCodeAt(0); return t < 128 ? e : t < 2048 ? x(192 | t >>> 6) + x(128 | t & 63) : x(224 | t >>> 12 & 15) + x(128 | t >>> 6 & 63) + x(128 | t & 63); } else { 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); } }, Ce = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, Ue = (e) => e.replace(Ce, Fe), V = _ ? (e) => Buffer.from(e, "utf8").toString("base64") : O ? (e) => ge(O.encode(e)) : (e) => R(Ue(e)), z = (e, t = !1) => t ? ye(V(e)) : V(e); function xe(e, t, o) { const s = m([]), r = m({ Authorization: `Bearer ${de("access_token")}` }), n = m(""), a = m(""), c = { count: 0, cacheFiles: [] }; k( () => e.value, (i) => { s.value = i ? JSON.parse(i) : []; }, { immediate: !0 } ), k( () => e.data, (i) => { if (i) { const d = o.calcBaseUrl(i); n.value = d.uploadUrl, a.value = d.downloadUrl; } }, { immediate: !0, deep: !0 } ), k( s, (i) => { (i == null ? void 0 : i.length) && a.value && i.forEach((d) => { d.url = d.url || a.value.replace("%fileId%", d.id); }); }, { immediate: !0 } ), k( a, (i) => { i && s.value.length && s.value.forEach((d) => { d.url = a.value.replace("%fileId%", d.id); }); }, { immediate: !0 } ); const u = () => { const i = [...s.value, ...c.cacheFiles], d = i.length > 0 ? JSON.stringify(i.map((T) => ({ name: T.name, id: T.id }))) : null; c.cacheFiles = [], t(d); }, v = () => { c.count += 1; }, h = (i) => { !i || (c.cacheFiles.push({ name: i.filename, id: i.fileid }), c.count -= 1, c.count === 0 && u()); }, f = (i) => { throw c.count -= 1, i; }, w = (i) => { if (e.disabled) return; const d = s.value.findIndex((T) => T.id === i.id); d !== -1 && s.value.splice(d, 1), u(); }, C = (i) => { const d = i.url || a.value.replace("%fileId%", i.id); o.fileDownload({ url: d, name: i.name }); }, p = m(!1), g = m(""), F = m(""); return { uploadUrl: n, downloadUrl: a, headers: r, files: s, onDownload: C, onError: f, onRemove: w, onSuccess: h, beforeUpload: v, showModal: p, modalTitle: g, iframeUrl: F, onModalCancel: () => { p.value = !1, g.value = "", F.value = ""; }, previewFile: (i) => { p.value = !0, g.value = i.name; const d = window.Environment.previewFileUrl; if (d) { const T = encodeURIComponent( z( `${window.location.origin}${i.url}?fullfilename=${i.name}` ) ); F.value = `${d}/onlinePreview?url=${T}`; } } }; } const Se = U({ name: "SyFileUpload", props: X(), emits: Z(), setup(e, { emit: t }) { const o = S("sy-file-upload"), s = e.controller, { uploadUrl: r, headers: n, files: a, onDownload: c, onError: u, onRemove: v, onSuccess: h, beforeUpload: f, showModal: w, modalTitle: C, iframeUrl: p, onModalCancel: g, previewFile: F } = xe(e, (b) => { t("change", b); }, s); return { ns: o, c: s, uploadUrl: r, headers: n, files: a, onDownload: c, onError: u, onRemove: v, onSuccess: h, beforeUpload: f, showModal: w, modalTitle: C, iframeUrl: p, onModalCancel: g, previewFile: F }; }, render(e) { return e("div", { class: [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : ""] }, [e("IUpload", { ref: "fileUpload", props: { action: this.uploadUrl, headers: this.headers, disabled: this.disabled, "default-file-list": this.files, multiple: this.c.model.multiple, type: this.c.model.isDrag ? "drag" : "select", accept: this.c.model.accept, "before-upload": this.beforeUpload, "on-success": this.onSuccess, "on-error": this.onError, "on-remove": this.onRemove, "on-preview": this.onDownload, "show-upload-list": !1 } }, [this.c.model.isDrag ? e("div", { class: this.ns.bm("box", "drag") }, [e("i-icon", { attrs: { type: "md-cloud-upload" } }), e("div", { class: this.ns.be("box", "title") }, [e("span", ["\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\uFF0C\u6216"]), e("span", ["\u70B9\u51FB\u4E0A\u4F20"])])]) : e("i-button", { attrs: { icon: "ios-cloud-upload-outline" }, class: this.ns.bm("box", "select") }, ["\u4E0A\u4F20\u6587\u4EF6"])]), e("div", { class: this.ns.b("file-list") }, [this.files.map((t) => e("div", { class: this.ns.b("file-item"), key: t.id }, [e("div", { class: this.ns.b("file-item-left") }, [e("i-icon", { attrs: { type: "md-document" } })]), e("div", { class: this.ns.b("file-item-right") }, [e("div", { class: this.ns.b("file-item-right-title"), on: { click: () => this.previewFile(t) } }, [t.name]), e("div", { class: this.ns.b("file-item-right-action") }, [e("i-icon", { attrs: { type: "md-download" }, on: { click: () => this.onDownload(t) } }), e("i-icon", { attrs: { type: "md-eye" }, on: { click: () => this.previewFile(t) } }), this.disabled || this.readonly ? null : e("i-icon", { attrs: { type: "md-close" }, on: { click: () => this.onRemove(t) } })])])]))]), e("i-modal", { attrs: { value: this.showModal, title: this.modalTitle, "class-name": this.ns.b("modal"), width: "70%", transfer: !1, "footer-hide": !0 }, on: { "on-cancel": this.onModalCancel } }, [e("iframe", { class: this.ns.b("iframe"), attrs: { src: this.iframeUrl } })])]); } }); function D(e, t) { if (e.url = t.replace("%fileId%", e.id), e.status || (e.status = "finished"), !e.fileName) { const o = e.name.lastIndexOf("."); e.fileName = e.name.substring(0, o), e.fileExt = e.name.substring(o), e.isImage = ae(e.name); } return e; } function j(e) { const t = m(""), o = m(""), s = m([]); return k( e.data, (r) => { if (r) { const n = e.controller.value.calcBaseUrl(r); t.value = n.uploadUrl, o.value = n.downloadUrl; } }, { immediate: !0, deep: !0 } ), k( e.value, (r) => { s.value = r ? JSON.parse(r) : [], s.value.length && o.value && s.value.forEach((n) => { D(n, o.value); }); }, { immediate: !0 } ), k( o, (r) => { r && s.value.length && s.value.forEach((n) => { D(n, r); }); }, { immediate: !0 } ), { downloadUrl: o, uploadUrl: t, valueList: s }; } function q(e) { const t = m("undo"), o = m([]), { downloadUrl: s, value: r, uploadUrl: n } = e; k( r, (b) => { b.length > 0 && (o.value = [], b.forEach((y) => { o.value.push(D(y, s.value)); })); }, { immediate: !0, deep: !0 } ); const a = (b, y) => (y.forEach((i) => { o.value.push({ name: i.name, status: i.status, percentage: i.percentage, id: i.uid, url: "" }); }), !0), c = (b) => { b.forEach((y) => { o.value.find((i) => i.id === y.uid ? (i.percentage = y.percentage, !0) : !1); }); }, u = (b, y) => { b.forEach((i) => { o.value.find((d) => d.id === i.uid ? (d.status = i.status, d.id = y.data.fileid, d.name = y.data.filename, D(d, s.value), !0) : !1); }); }, v = (b) => { b.forEach((y) => { o.value.find((i) => i.id === y.uid ? (i.status = y.status, !0) : !1); }); }, h = (b) => { t.value = "done"; }, f = () => { le({ multiple: e.multiple, accept: e.accept, uploadUrl: n.value, beforeUpload: a, progress: c, success: u, error: v, finish: h }); }, w = m(!1), C = m(""), p = m(""); return { selectFile: f, fileList: o, uploadState: t, showModal: w, modalTitle: C, iframeUrl: p, onModalCancel: () => { w.value = !1, C.value = "", p.value = ""; }, previewFile: (b) => { w.value = !0, C.value = b.name; const y = window.Environment.previewFileUrl; if (y) { const i = encodeURIComponent( z( `${window.location.origin}${b.url}?fullfilename=${b.name}` ) ); p.value = `${y}/onlinePreview?url=${i}`; } } }; } const Ee = U({ name: "SyGridFileUpload", props: L(), setup(e) { const t = S("sy-grid-file-upload"), { value: o, data: s, controller: r } = N(e), { downloadUrl: n, uploadUrl: a, valueList: c } = j({ value: o, data: s, controller: r }), { fileList: u, showModal: v, modalTitle: h, iframeUrl: f, previewFile: w, onModalCancel: C } = q({ downloadUrl: n, uploadUrl: a, value: c }); return { ns: t, fileList: u, showModal: v, modalTitle: h, iframeUrl: f, downloadFile: (g) => { e.controller.fileDownload(g); }, previewFile: w, onModalCancel: C }; }, render() { return l("grid-editor", { attrs: { disabled: this.disabled, readonly: this.readonly }, class: [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : ""] }, [l("div", { class: this.ns.b("file-list") }, [this.fileList.map((e) => l("div", { class: this.ns.b("file-item"), key: e.id }, [l("div", { class: this.ns.b("file-item-title"), on: { click: () => this.previewFile(e) } }, [e.name]), l("div", { class: this.ns.b("file-item-action") }, [l("i-icon", { attrs: { type: "md-download" }, on: { click: () => this.downloadFile(e) } }), l("i-icon", { attrs: { type: "md-eye" }, on: { click: () => this.previewFile(e) } })])]))]), l("i-modal", { attrs: { value: this.showModal, title: this.modalTitle, "class-name": this.ns.b("modal"), width: "70%", transfer: !1, "footer-hide": !0 }, on: { "on-cancel": this.onModalCancel } }, [l("iframe", { class: this.ns.b("iframe"), attrs: { src: this.iframeUrl } })])]); } }), ke = U({ name: "SyGridFileUploadContainer", props: L(), render(e) { return this.disabled || this.readonly ? e("SyGridFileUpload", { props: { ...this.$props } }) : e("SyEditGridFileUpload", { props: { ...this.$props } }); } }); const Te = U({ name: "SyEditGridFileUploadPopover", props: { uploadUrl: { type: String, required: !0 }, downloadUrl: { type: String, required: !0 }, value: { type: Array, required: !0 }, controller: { type: W, required: !0 } }, emits: { close: (e) => !0 }, setup(e, { emit: t }) { const o = S("sy-edit-grid-file-upload-popover"), { downloadUrl: s, value: r, uploadUrl: n } = N(e), { fileList: a, uploadState: c, selectFile: u } = q({ downloadUrl: s, value: r, uploadUrl: n }), v = m(), h = m(!1), f = ee(v, async (p) => { t("close", { isModified: h.value, resultFiles: a.value }); }); return k(c, (p) => { p === "done" ? (h.value = !0, f.proceed()) : p === "loading" && f.pause(); }), { ns: o, componentRef: v, fileList: a, deleteFile: (p) => { const g = a.value.findIndex((F) => F.id === p.id); a.value.splice(g, 1), h.value = !0; }, selectFile: u, downloadFile: (p) => { e.controller.fileDownload(p); } }; }, render() { return l("div", { ref: "componentRef", style: "width:300px", class: this.ns.b() }, [l("div", { class: this.ns.b("file-list") }, [this.fileList.map((e) => l("div", { class: this.ns.b("file-item"), key: e.id }, [l("div", { class: this.ns.b("file-item-title"), on: { click: () => this.downloadFile(e) } }, [e.name]), l("div", { class: this.ns.b("file-item-action") }, [l("i-icon", { attrs: { type: "md-close" }, on: { click: () => this.deleteFile(e) } })])]))]), l("div", { on: { click: () => this.selectFile() }, class: this.ns.e("button") }, [l("i-icon", { attrs: { type: "md-add" } }), "\u6DFB\u52A0\u6587\u4EF6"])]); } }); const Ie = U({ name: "SyEditGridFileUpload", props: L(), setup(e) { const t = S("sy-edit-grid-file-upload"), { value: o, data: s, controller: r } = N(e), { downloadUrl: n, uploadUrl: a, valueList: c } = j({ value: o, data: s, controller: r }), u = m(), v = async () => { if (!u.value) throw new ce("\u5BB9\u5668\u5143\u7D20\u4E0D\u5B58\u5728"); const h = u.value.$el, f = h.offsetHeight, w = ibiz.overlay.createPopover((g) => g(Te, { props: { value: c.value, uploadUrl: a.value, downloadUrl: n.value, controller: r.value }, on: { close: (F) => { w.dismiss(F); } } }), void 0, { noArrow: !0, placement: "bottom-start", offsetOpts: { mainAxis: -f, crossAxis: 0 } }); await w.present(h); const { isModified: C, resultFiles: p } = await w.onWillDismiss(); if (C) { const g = p.length > 0 ? JSON.stringify(p.map((F) => ({ name: F.name, id: F.id }))) : null; await e.rowDataChange(g), await e.rowSave(); } }; return te(u, "click", (h) => { e.disabled || v(); }), { ns: t, valueList: c, componentRef: u }; }, render() { return l("grid-editor", { attrs: { disabled: this.disabled, readonly: this.readonly }, ref: "componentRef", class: this.ns.b() }, [l("div", { class: this.ns.b("file-list") }, [this.valueList.map((e) => l("div", { class: this.ns.b("file-item"), key: e.id }, [l("div", { class: this.ns.b("file-item-title") }, [e.name])]))])]); } }); class De { constructor() { E(this, "component", he); } } class Pe { constructor() { E(this, "component", me); } async createController(t, o) { const s = new M(t, o); return await s.init(), s; } } class Ne { constructor() { E(this, "component", "IndexView"); } } const $ = U({ name: "WFStepTraceGrid", props: { context: Object, params: { type: Object }, modelPath: { type: String, required: !0 }, modal: { type: Object }, deName: { type: String, required: !0 } }, setup(e) { const { proxy: t } = P(), o = oe(t, e.modelPath); B(t, "deName", o.setDeName.bind(o)); const s = S("wf-step-trace-grid"), r = m([]); o.nerve.self.evt.on("mounted", () => { var a; !o.data || (a = o.data.usertasks) == null || a.forEach((c) => { c.identitylinks.length > 0 || (c.comments.length > 0 && c.comments.forEach((u) => { r.value.push({ nodeName: c.userTaskName, personName: u.authorName, time: u.time, content: u.type, comment: u.fullMessage }); }), r.value.sort((u, v) => Date.parse(v.time) - Date.parse(u.time))); }); }); const n = m([{ title: "\u5904\u7406\u73AF\u8282", key: "nodeName", width: 180, resizable: !0 }, { title: "\u5904\u7406\u4EBA", key: "personName", width: 180, resizable: !0 }, { title: "\u5904\u7406\u65F6\u95F4", key: "time", width: 180, resizable: !0 }, { title: "\u5904\u7406\u5185\u5BB9", key: "content", width: 180, resizable: !0 }, { title: "\u5904\u7406\u610F\u89C1", key: "comment" }]); return { c: o, ns: s, gridData: r, columns: n }; }, render() { return l("div", { class: this.ns.b() }, [l("div", { class: this.ns.e("title") }, ["\u5BA1\u6279\u4FE1\u606F"]), l("i-table", { attrs: { "disabled-hover": !0, columns: this.columns, data: this.gridData }, class: this.ns.e("grid") })]); } }), Le = U({ props: { context: Object, params: { type: Object }, modelPath: { type: String, required: !0 }, modal: { type: Object } }, setup(e) { const { proxy: t } = P(), o = se(t, e.modelPath), s = S(`view-${ue.DE_WF_DYNA_EDIT_VIEW3}`.toLowerCase()), r = m(["mainForm"]); return { c: o, ns: s, onTabClick: (a) => { r.value.includes(a) || r.value.push(a); }, lazyList: r }; }, render(e) { const t = []; if (this.c.complete) { const { activeForm: o } = this.c; o && this.c.providers[o.name] && t.push(e(this.c.providers[o.name].component, { props: { modelData: o, context: this.c.context, params: this.c.params }, style: { height: "auto" }, on: { neuronInit: this.c.nerve.onNeuronInit("form") } })); } if (this.c.complete && this.c.model.drTab.pages[0]) { const o = this.c.model.drTab.pages[0], s = this.c.drPages[o.source.name]; t.push(e($, { attrs: { context: s.context, params: s.params, deName: this.c.model.appEntity.source.codeName, modal: this.modal, modelPath: o.embedView.source.modelPath } })); } return e("view-base", { attrs: { controller: this.c }, scopedSlots: { toolbar: () => this.c.complete ? [this.c.wfLinks.length > 0 && e("wf-toolbar", { attrs: { wfLinks: this.c.wfLinks }, on: { "wf-link-click": (o) => { this.c.onLinkClick(o); } } })] : null } }, [this.c.complete && e("i-tabs", { class: [this.ns.be("", "tab")], attrs: { name: this.c.model.drTab.source.name }, on: { "on-click": this.onTabClick } }, [e("i-tab-pane", { class: this.ns.be("", "tab-item"), attrs: { tab: this.c.model.drTab.source.name, label: this.c.model.drTab.source.editItemCaption, name: "mainForm" } }, [t]), this.c.model.drTab.pages.map((o) => { const s = this.c.drPages[o.source.name]; return e("i-tab-pane", { class: this.ns.be("", "tab-item"), attrs: { tab: this.c.model.drTab.source.name, disabled: this.c.isNewData, label: o.source.caption, name: o.source.name } }, [!this.c.isNewData && this.lazyList.includes(o.source.name) && e("ViewShell", { props: { context: s.context, params: s.params, modal: { mode: A.EMBED }, modelPath: o.embedView.source.modelPath, deName: this.c.model.appEntity.source.codeName }, on: { neuronInit: this.c.nerve.onNeuronInit(o.source.name) }, key: s.key })]); })])]); } }); class _e { constructor() { E(this, "component", Le); } } const Ge = U({ name: "SyEditView3", props: { context: Object, params: { type: Object }, modelPath: { type: String, required: !0 }, modal: { type: Object } }, setup(e) { const { proxy: t } = P(), o = ie(t, e.modelPath), s = S("view-deeditview3"), r = m(["mainForm"]); return { c: o, ns: s, onTabClick: (a) => { r.value.includes(a) || r.value.push(a); }, lazyList: r }; }, render(e) { return e("view-base", { attrs: { controller: this.c } }, [this.c.complete && e("i-tabs", { class: [this.ns.be("", "tab")], attrs: { name: this.c.model.drTab.source.name }, on: { "on-click": this.onTabClick } }, [e("i-tab-pane", { class: this.ns.be("", "tab-item"), attrs: { tab: this.c.model.drTab.source.name, label: this.c.model.drTab.source.editItemCaption, name: "mainForm" } }, [e("edit-form-control", { attrs: { modelData: this.c.model.form, context: this.c.context, params: this.c.params }, style: { height: "auto" }, on: { neuronInit: this.c.nerve.onNeuronInit(this.c.model.form.source.name) } }), e($, { attrs: { context: this.c.drPages[this.c.model.drTab.pages[0].source.name].context, params: this.c.drPages[this.c.model.drTab.pages[0].source.name].params, deName: this.c.model.appEntity.source.codeName, modal: this.modal, modelPath: this.c.model.drTab.pages[0].embedView.source.modelPath } })]), this.c.model.drTab.pages.map((t) => { const o = this.c.drPages[t.source.name]; if (!!o) return e("i-tab-pane", { class: this.ns.be("", "tab-item"), attrs: { tab: this.c.model.drTab.source.name, disabled: this.c.isNewData, label: t.source.caption, name: t.source.name } }, [!this.c.isNewData && this.lazyList.includes(t.source.name) && e("ViewShell", { props: { context: o.context, params: o.params, modal: { mode: A.EMBED }, modelPath: t.embedView.source.modelPath, deName: this.c.model.appEntity.source.codeName }, on: { neuronInit: this.c.nerve.onNeuronInit(t.source.name) }, key: o.key })]); })])]); } }); class Oe { constructor() { E(this, "component", Ge); } } class Ve { constructor() { E(this, "formEditor", "SyFileUpload"); E(this, "gridEditor", "SyGridFileUploadContainer"); } async createController(t, o) { const s = new W(t, o); return await s.init(), s; } } const $e = { mateUrl: import.meta.url, install(e) { ibiz.config.enableDataInfoBar = !1, e.component("WfToolbar", fe), ibiz.register.view.register( "VIEW_CUSTOM_SyWebIndexView", new Ne() ), ibiz.register.view.register( "VIEW_CUSTOM_PresetWFChartView", new De() ), ibiz.register.gridColumn.register( "GRID_COLRENDER_CodeListGridColumn", new Pe() ), ibiz.register.view.register( "VIEW_CUSTOM_SyWfDynaEditView3", new _e() ), ibiz.register.view.register( "VIEW_CUSTOM_SyEditView3", new Oe() ), e.component("SyFileUpload", Se), e.component("SyGridFileUpload", Ee), e.component("SyEditGridFileUpload", Ie), e.component("SyGridFileUploadContainer", ke), ibiz.register.editor.register( "EDITOR_CUSTOMSTYLE_SyFileUpload", new Ve() ); } }; export { $e as default };