workflow-editor 0.0.81-up-tmp7 → 0.0.81-up-tmp8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.min.js +218 -222
- package/es/index.mjs +9 -8
- package/es/style.css +167 -167
- package/lib/index.cjs +4 -4
- package/lib/style.css +124 -124
- package/package.json +1 -1
- package/es/workflow-editor/index.mjs +0 -9
- package/lib/workflow-editor/index.cjs +0 -7
package/dist/index.full.min.js
CHANGED
|
@@ -2635,10 +2635,78 @@
|
|
|
2635
2635
|
const ur = M(dr, [["render", function(e2, t2, o2, l2, n2, i2) {
|
|
2636
2636
|
const a2 = r.resolveComponent("el-button"), s2 = r.resolveComponent("el-option"), d2 = r.resolveComponent("el-select"), c2 = r.resolveComponent("el-row"), m2 = r.resolveComponent("toolbox"), u2 = r.resolveComponent("workflow-canvas"), p2 = r.resolveComponent("el-tab-pane"), h2 = r.resolveComponent("el-tabs"), f2 = r.resolveComponent("icon-svg"), w2 = r.resolveComponent("context-menu"), g2 = r.resolveComponent("admin-save-dialog"), C2 = r.resolveDirective("permission");
|
|
2637
2637
|
return r.openBlock(), r.createElementBlock("div", { ref: "wfEditor", style: { position: "relative", height: "100%" }, onMousedown: t2[9] || (t2[9] = (t3) => e2.setContextMenuVisible(false)), onMousewheel: t2[10] || (t2[10] = (t3) => e2.setContextMenuVisible(false)) }, [r.createVNode(c2, { class: "button-area" }, { default: r.withCtx(() => [o2.readonly ? r.createCommentVNode("", true) : (r.openBlock(), r.createBlock(a2, { key: 0, type: "primary", onClick: i2.saveXml }, { default: r.withCtx(() => [r.createTextVNode(r.toDisplayString(e2.$t("workflowEditorPublicModel.save")), 1)]), _: 1 }, 8, ["onClick"])), o2.readonly ? r.createCommentVNode("", true) : r.withDirectives((r.openBlock(), r.createBlock(a2, { key: 1, class: "button--default", onClick: i2.adminSave }, { default: r.withCtx(() => [r.createTextVNode(r.toDisplayString(e2.$t("workflowEditorPublicModel.adminSave")), 1)]), _: 1 }, 8, ["onClick"])), [[C2, "wf.workflowDefinition.adminSave"]]), e2.isShowEnable ? (r.openBlock(), r.createBlock(a2, { key: 2, class: "button--default", onClick: i2.enableWf }, { default: r.withCtx(() => [r.createTextVNode(r.toDisplayString(e2.$t("workflowEditorPublicModel.enable")), 1)]), _: 1 }, 8, ["onClick"])) : r.createCommentVNode("", true), r.createVNode(a2, { class: "button--default", onClick: i2.exportProcessFromClient }, { default: r.withCtx(() => [r.createTextVNode(r.toDisplayString(e2.$t("workflowEditorPublicModel.export")), 1)]), _: 1 }, 8, ["onClick"]), o2.readonly ? r.createCommentVNode("", true) : (r.openBlock(), r.createBlock(a2, { key: 3, class: "button--default", onClick: i2.selectProcessFile }, { default: r.withCtx(() => [r.createTextVNode(r.toDisplayString(e2.$t("workflowEditorPublicModel.open")) + " ", 1), r.createElementVNode("input", { ref: "processFile", type: "file", name: "processFile", accept: ".xml", style: { display: "none" }, onChange: t2[0] || (t2[0] = (...e3) => i2.openXmlFromClient && i2.openXmlFromClient(...e3)) }, null, 544)]), _: 1 }, 8, ["onClick"])), r.createVNode(a2, { type: "primary", class: "button--return", onClick: t2[1] || (t2[1] = (t3) => e2.$emit("back")) }, { default: r.withCtx(() => [r.createTextVNode(r.toDisplayString(e2.$t("workflowEditorPublicModel.return")), 1)]), _: 1 }), e2.isShowDefVersionList ? (r.openBlock(), r.createBlock(d2, { key: 4, modelValue: e2.defVersion, "onUpdate:modelValue": t2[2] || (t2[2] = (t3) => e2.defVersion = t3), style: { "padding-left": "10px", width: "200px" }, onChange: i2.changeDefVersion }, { default: r.withCtx(() => [(r.openBlock(true), r.createElementBlock(r.Fragment, null, r.renderList(e2.workflowDefVersionList, (e3) => (r.openBlock(), r.createBlock(s2, { key: e3.definitionVersion, label: e3.definitionVersion, value: e3.definitionVersion }, null, 8, ["label", "value"]))), 128))]), _: 1 }, 8, ["modelValue", "onChange"])) : r.createCommentVNode("", true)]), _: 1 }), r.createElementVNode("div", { class: "main", onMousedown: t2[4] || (t2[4] = (...e3) => i2.startDrag && i2.startDrag(...e3)), onMousemove: t2[5] || (t2[5] = (...e3) => i2.drag && i2.drag(...e3)), onMouseup: t2[6] || (t2[6] = (...e3) => i2.endDrag && i2.endDrag(...e3)), onMouseleave: t2[7] || (t2[7] = (...e3) => i2.clearStatus && i2.clearStatus(...e3)) }, [o2.readonly ? r.createCommentVNode("", true) : (r.openBlock(), r.createBlock(m2, { key: 0, class: "toolbox", onselectstart: "return false", oncontextmenu: "return false" })), (r.openBlock(), r.createElementBlock("section", { class: "tabBox", key: e2.canvasKey }, [r.createVNode(h2, { modelValue: e2.activeTab, "onUpdate:modelValue": t2[3] || (t2[3] = (t3) => e2.activeTab = t3), class: "tabs" }, { default: r.withCtx(() => [r.createVNode(p2, { label: e2.$t("workflowEditorPublicModel.flowChart"), name: "canvas", class: "tab-pane" }, { default: r.withCtx(() => [r.createVNode(u2, { onselectstart: "return false", process: e2.process, class: "canvas", onMouseup: i2.addTache, onContextmenu: r.withModifiers(i2.showContextMenu, ["prevent"]) }, null, 8, ["process", "onMouseup", "onContextmenu"])]), _: 1 }, 8, ["label"]), r.createVNode(p2, { label: "XML", name: "xml", class: "tab-pane" }, { default: r.withCtx(() => [r.createElementVNode("div", cr, ["xml" === e2.activeTab ? (r.openBlock(), r.createElementBlock("pre", mr, [r.createElementVNode("code", { ref: "xml", class: "language-xml" }, r.toDisplayString(e2.xml), 513)])) : r.createCommentVNode("", true)])]), _: 1 })]), _: 1 }, 8, ["modelValue"])]))], 32), e2.componentToDraw ? (r.openBlock(), r.createBlock(f2, { key: 0, style: r.normalizeStyle({ height: i2.componentInfo.height, width: i2.componentInfo.width, color: i2.componentInfo.color, left: e2.currentPosition.x + "px", top: e2.currentPosition.y + "px" }), icon: i2.componentInfo.icon, class: "component-icon" }, null, 8, ["style", "icon"])) : r.createCommentVNode("", true), e2.contextMenuVisible ? (r.openBlock(), r.createBlock(w2, { key: 1, style: r.normalizeStyle({ position: "absolute", left: e2.contextMenuPosition.x + "px", top: e2.contextMenuPosition.y + "px" }) }, null, 8, ["style"])) : r.createCommentVNode("", true), e2.isAdminSave ? (r.openBlock(), r.createBlock(g2, { key: 2, onClose: t2[8] || (t2[8] = (t3) => e2.isAdminSave = false), onUpdate: i2.updateWfVersion, onAdd: i2.addWfVersion }, null, 8, ["onUpdate", "onAdd"])) : r.createCommentVNode("", true)], 544);
|
|
2638
|
-
}], ["__scopeId", "data-v-865cb4ee"]]), pr = ["
|
|
2639
|
-
|
|
2638
|
+
}], ["__scopeId", "data-v-865cb4ee"]]), pr = { namespaced: true, state: { taches: [], transitions: [], startJoint: null, endJoint: null, isMovingTache: false, mouseDownPosition: null, isDrawingRegion: false, isMovingRegion: false, selectedTaches: [], selectedTransition: null, resizerToMove: null, draggerToMove: null, propertiesEditorFor: "", componentToDraw: "", controlPointToMove: null, formFields: [], formFieldsWithSub: [], contextMenuVisible: false, formCode: null, systemCode: null, systemVersion: null, processCode: null, processI18n: null, subtableConditionMap: null, propSettingKeyList: null, tableCode: null, isCreateDefinition: "", isHandleCreate: "", pageCode: null, sourceComponentType: "" }, getters: { taches: (e2) => e2.taches, transitions: (e2) => e2.transitions, startJoint: (e2) => e2.startJoint, endJoint: (e2) => e2.endJoint, isMovingTache: (e2) => e2.isMovingTache, mouseDownPosition: (e2) => e2.mouseDownPosition, isDrawingRegion: (e2) => e2.isDrawingRegion, isMovingRegion: (e2) => e2.isMovingRegion, selectedTaches: (e2) => e2.selectedTaches, selectedTransition: (e2) => e2.selectedTransition, resizerToMove: (e2) => e2.resizerToMove, draggerToMove: (e2) => e2.draggerToMove, propertiesEditorFor: (e2) => e2.propertiesEditorFor, componentToDraw: (e2) => e2.componentToDraw, controlPointToMove: (e2) => e2.controlPointToMove, formFields: (e2) => e2.formFields, formCode: (e2) => e2.formCode, formFieldsWithSub: (e2) => e2.formFieldsWithSub, contextMenuVisible: (e2) => e2.contextMenuVisible, systemCode: (e2) => e2.systemCode, processCode: (e2) => e2.processCode, processI18n: (e2) => e2.processI18n, subtableConditionMap: (e2) => e2.subtableConditionMap, propSettingKeyList: (e2) => e2.propSettingKeyList, systemVersion: (e2) => e2.systemVersion, tableCode: (e2) => e2.tableCode, isHandleCreate: (e2) => e2.isHandleCreate, isCreateDefinition: (e2) => e2.isCreateDefinition, pageCode: (e2) => e2.pageCode, sourceComponentType: (e2) => e2.sourceComponentType }, mutations: { setTaches(e2, t2) {
|
|
2639
|
+
e2.taches = t2;
|
|
2640
|
+
}, setTransitions(e2, t2) {
|
|
2641
|
+
e2.transitions = t2;
|
|
2642
|
+
}, clearCanvas(e2) {
|
|
2643
|
+
e2.taches = [], e2.transitions = [];
|
|
2644
|
+
}, resetState(e2) {
|
|
2645
|
+
e2.isMovingTache = false, e2.startJoint = null, e2.endJoint = null, e2.isDrawingRegion = false, e2.isMovingRegion = false, e2.resizerToMove = null, e2.draggerToMove = null, e2.controlPointToMove = null;
|
|
2646
|
+
}, stopDrawingLine(e2) {
|
|
2647
|
+
e2.startJoint = null, e2.endJoint = null;
|
|
2648
|
+
}, setStartJoint(e2, t2) {
|
|
2649
|
+
e2.startJoint = t2;
|
|
2650
|
+
}, setEndJoint(e2, t2) {
|
|
2651
|
+
e2.endJoint = t2;
|
|
2652
|
+
}, setMovingTache(e2, t2) {
|
|
2653
|
+
e2.isMovingTache = t2;
|
|
2654
|
+
}, setMouseDownPosition(e2, t2) {
|
|
2655
|
+
e2.mouseDownPosition = t2;
|
|
2656
|
+
}, setDrawingRegion(e2, t2) {
|
|
2657
|
+
e2.isDrawingRegion = t2;
|
|
2658
|
+
}, setMovingRegion(e2, t2) {
|
|
2659
|
+
e2.isMovingRegion = t2;
|
|
2660
|
+
}, setSelectedTaches(e2, t2) {
|
|
2661
|
+
e2.selectedTaches = t2;
|
|
2662
|
+
}, setSelectedTransition(e2, t2) {
|
|
2663
|
+
e2.selectedTransition = t2;
|
|
2664
|
+
}, setResizerToMove(e2, t2) {
|
|
2665
|
+
e2.resizerToMove = t2;
|
|
2666
|
+
}, setDraggerToMove(e2, t2) {
|
|
2667
|
+
e2.draggerToMove = t2;
|
|
2668
|
+
}, setPropertiesEditorFor(e2, t2) {
|
|
2669
|
+
e2.propertiesEditorFor = t2;
|
|
2670
|
+
}, setComponentToDraw(e2, t2) {
|
|
2671
|
+
e2.componentToDraw = t2;
|
|
2672
|
+
}, setControlPointToMove(e2, t2) {
|
|
2673
|
+
e2.controlPointToMove = t2;
|
|
2674
|
+
}, setFormFields(e2, t2) {
|
|
2675
|
+
e2.formFields = t2;
|
|
2676
|
+
}, setFormCode(e2, t2) {
|
|
2677
|
+
e2.formCode = t2;
|
|
2678
|
+
}, setFormFieldsWithSub(e2, t2) {
|
|
2679
|
+
e2.formFieldsWithSub = t2;
|
|
2680
|
+
}, setContextMenuVisible(e2, t2) {
|
|
2681
|
+
e2.contextMenuVisible = t2;
|
|
2682
|
+
}, setSystemCode(e2, t2) {
|
|
2683
|
+
e2.systemCode = t2;
|
|
2684
|
+
}, setProcessCode(e2, t2) {
|
|
2685
|
+
e2.processCode = t2;
|
|
2686
|
+
}, setProcessI18n(e2, t2) {
|
|
2687
|
+
e2.processI18n = t2;
|
|
2688
|
+
}, setSubtableConditionMap(e2, t2) {
|
|
2689
|
+
e2.subtableConditionMap = t2;
|
|
2690
|
+
}, setPropSettingKeyList(e2, t2) {
|
|
2691
|
+
e2.propSettingKeyList = t2;
|
|
2692
|
+
}, setSystemVersion(e2, t2) {
|
|
2693
|
+
e2.systemVersion = t2;
|
|
2694
|
+
}, setTableCode(e2, t2) {
|
|
2695
|
+
e2.tableCode = t2;
|
|
2696
|
+
}, setTableCode(e2, t2) {
|
|
2697
|
+
e2.tableCode = t2;
|
|
2698
|
+
}, setIsCreateDefinition(e2, t2) {
|
|
2699
|
+
e2.isCreateDefinition = t2;
|
|
2700
|
+
}, setIsHandleCreate(e2, t2) {
|
|
2701
|
+
e2.isHandleCreate = t2;
|
|
2702
|
+
}, setPageCode(e2, t2) {
|
|
2703
|
+
e2.pageCode = t2;
|
|
2704
|
+
}, setSourceComponentForCopy(e2, t2) {
|
|
2705
|
+
e2.sourceComponentType = t2;
|
|
2706
|
+
} } }, hr = ["src"];
|
|
2707
|
+
const fr = { name: "WfHistoryCanvas", components: { Start: z, End: G, HumanTask: te, Decision: ie, Subprocess: ce, CustomTask: he, Fork: be, Join: Te, HumanDecision: Me, CopyTask: Pe, Transition: Ze, TacheHistoryTooltip: tr, TacheSubprocessHistoryDialog: M({ name: "TacheSubprocessHistoryDialog", props: { workflowId: { type: Number, default: null } }, data: () => ({ dialogVisible: true }) }, [["render", function(e2, t2, o2, l2, n2, i2) {
|
|
2640
2708
|
const a2 = r.resolveComponent("el-dialog");
|
|
2641
|
-
return r.openBlock(), r.createBlock(a2, { "model-value": "", title: e2.$t("workflowEditorPublicModel.subprocessTitle"), "close-on-click-modal": false, "append-to-body": "", width: "90%", top: "5vh", onOpen: t2[0] || (t2[0] = (t3) => e2.$emit("open")), onOpend: t2[1] || (t2[1] = (t3) => e2.$emit("opend")), onClose: t2[2] || (t2[2] = (t3) => e2.$emit("close")), onClosed: t2[3] || (t2[3] = (t3) => e2.$emit("closed")) }, { default: r.withCtx(() => [r.createElementVNode("iframe", { id: "_subprocess-content", src: "#/show-sub-wf-history?workflowId=" + o2.workflowId, name: "_subprocess-content", title: "Subprocess Content", frameborder: "0" }, null, 8,
|
|
2709
|
+
return r.openBlock(), r.createBlock(a2, { "model-value": "", title: e2.$t("workflowEditorPublicModel.subprocessTitle"), "close-on-click-modal": false, "append-to-body": "", width: "90%", top: "5vh", onOpen: t2[0] || (t2[0] = (t3) => e2.$emit("open")), onOpend: t2[1] || (t2[1] = (t3) => e2.$emit("opend")), onClose: t2[2] || (t2[2] = (t3) => e2.$emit("close")), onClosed: t2[3] || (t2[3] = (t3) => e2.$emit("closed")) }, { default: r.withCtx(() => [r.createElementVNode("iframe", { id: "_subprocess-content", src: "#/show-sub-wf-history?workflowId=" + o2.workflowId, name: "_subprocess-content", title: "Subprocess Content", frameborder: "0" }, null, 8, hr)]), _: 1 }, 8, ["title"]);
|
|
2642
2710
|
}], ["__scopeId", "data-v-2b195c05"]]), AutoTask: _e }, props: { process: { type: Object, default: null }, histories: { type: Array, default: null }, currentTasks: { type: Array, default: null }, allProcessI18n: { type: Object, default: null } }, data: function() {
|
|
2643
2711
|
return { showHistory: false, tooltipPosition: null, tacheHistoryInfo: null, showSubprocessDialog: false, subWorkflowId: null };
|
|
2644
2712
|
}, computed: { ...t.mapGetters("wfEditor", ["taches", "transitions", "processI18n"]) }, mounted: function() {
|
|
@@ -2697,18 +2765,18 @@
|
|
|
2697
2765
|
t2 && void 0 !== t2.hasChildren && true === t2.hasChildren && (t2.children && t2.children.length > 0 && (this.subWorkflowId = t2.children[0].workflowId), this.showSubprocessDialog = true);
|
|
2698
2766
|
}, closeSubprocessHistory() {
|
|
2699
2767
|
this.showSubprocessDialog = false;
|
|
2700
|
-
} } },
|
|
2701
|
-
const
|
|
2768
|
+
} } }, wr = { ref: "svgContainer", style: { position: "relative" } }, gr = r.createElementVNode("defs", null, [r.createElementVNode("marker", { id: "arrow", markerWidth: "10", markerHeight: "10", refX: "6", refY: "2", orient: "auto", markerUnits: "strokeWidth" }, [r.createElementVNode("path", { d: "M0,0 L0,4 L6,2 z", fill: "#666" })])], -1);
|
|
2769
|
+
const Cr = M(fr, [["render", function(e2, t2, o2, l2, n2, i2) {
|
|
2702
2770
|
const a2 = r.resolveComponent("tache-history-tooltip"), s2 = r.resolveComponent("tache-subprocess-history-dialog");
|
|
2703
|
-
return r.openBlock(), r.createElementBlock("div",
|
|
2704
|
-
}]]),
|
|
2771
|
+
return r.openBlock(), r.createElementBlock("div", wr, [(r.openBlock(), r.createElementBlock("svg", { id: "svg", width: "2000", height: "2000", onMousedown: t2[0] || (t2[0] = (...e3) => i2.mousedown && i2.mousedown(...e3)), onMousemove: t2[1] || (t2[1] = (...e3) => i2.mousemove && i2.mousemove(...e3)), onMouseup: t2[2] || (t2[2] = (...e3) => i2.mouseup && i2.mouseup(...e3)), onMouseleave: t2[3] || (t2[3] = (...e3) => i2.mouseleave && i2.mouseleave(...e3)) }, [gr, (r.openBlock(true), r.createElementBlock(r.Fragment, null, r.renderList(e2.taches, (e3) => (r.openBlock(), r.createBlock(r.resolveDynamicComponent(e3.type), { key: e3.id, model: e3, class: r.normalizeClass([i2.getTacheClass(e3)]), "display-mode": e3.displayMode, onMouseenter: (t3) => i2.showTacheHistoryTooltip(e3, t3), onMouseleave: (t3) => i2.hideTacheHistoryTooltip(e3), onMousemove: i2.updateTacheHistoryTooltipPosition, onClick: (t3) => i2.showSubprocessHistory(e3) }, null, 40, ["model", "class", "display-mode", "onMouseenter", "onMouseleave", "onMousemove", "onClick"]))), 128)), (r.openBlock(true), r.createElementBlock(r.Fragment, null, r.renderList(e2.transitions, (e3) => (r.openBlock(), r.createBlock(r.resolveDynamicComponent("transition"), { key: e3.id, model: e3 }, null, 8, ["model"]))), 128))], 32)), e2.showHistory && e2.tacheHistoryInfo ? (r.openBlock(), r.createBlock(a2, { key: 0, style: r.normalizeStyle(e2.tooltipPosition), content: e2.tacheHistoryInfo }, null, 8, ["style", "content"])) : r.createCommentVNode("", true), e2.showSubprocessDialog ? (r.openBlock(), r.createBlock(s2, { key: 1, "workflow-id": e2.subWorkflowId, onClose: i2.closeSubprocessHistory }, null, 8, ["workflow-id", "onClose"])) : r.createCommentVNode("", true)], 512);
|
|
2772
|
+
}]]), br = { refresh() {
|
|
2705
2773
|
this.showHistory();
|
|
2706
|
-
} },
|
|
2774
|
+
} }, kr = { name: "WorkflowHistory", components: { WfHistoryCanvas: Cr }, props: { id: { type: Number, default: null } }, data: function() {
|
|
2707
2775
|
return { process: null, histories: [], currentTasks: [], allProcessI18n: null };
|
|
2708
2776
|
}, computed: { ...t.mapGetters("wfEditor", ["componentToDraw", "taches", "transitions", "contextMenuVisible"]), ...t.mapGetters(["sidebar"]) }, watch: {}, created: function() {
|
|
2709
2777
|
this.showHistory();
|
|
2710
2778
|
}, mounted: function() {
|
|
2711
|
-
}, methods: { ...
|
|
2779
|
+
}, methods: { ...br, ...t.mapMutations("wfEditor", ["setComponentToDraw", "clearCanvas", "setContextMenuVisible", "setProcessI18n"]), showHistory() {
|
|
2712
2780
|
this.clearCanvas(), this.id ? this.$http.get(this.baseAPI + "/wf-editor/i18n-settings/get-bundle-info?workflowId=" + this.id).then((e2) => {
|
|
2713
2781
|
this.allProcessI18n = e2;
|
|
2714
2782
|
const t2 = this.baseAPI + "/wf-editor/instance-histories/" + this.id;
|
|
@@ -2721,105 +2789,33 @@
|
|
|
2721
2789
|
}, initProcessByXml(e2) {
|
|
2722
2790
|
const t2 = n.xml2js(e2, { nativeType: true, attributesKey: "attr", compact: true, ignoreComment: true, spaces: 4 });
|
|
2723
2791
|
b(t2.process), this.process = t2.process, V(this.process);
|
|
2724
|
-
} } },
|
|
2725
|
-
const
|
|
2792
|
+
} } }, Vr = { ref: "wfEditor", style: { position: "relative", height: "100%" } }, yr = { class: "main" };
|
|
2793
|
+
const vr = M(kr, [["render", function(e2, t2, o2, l2, n2, i2) {
|
|
2726
2794
|
const a2 = r.resolveComponent("wf-history-canvas");
|
|
2727
|
-
return r.openBlock(), r.createElementBlock("div",
|
|
2795
|
+
return r.openBlock(), r.createElementBlock("div", Vr, [r.createElementVNode("div", yr, [r.createElementVNode("section", null, [r.createVNode(a2, { onselectstart: "return false", process: e2.process, histories: e2.histories, "current-tasks": e2.currentTasks, "all-process-i18n": e2.allProcessI18n, "show-history": true, class: "canvas", onContextmenu: r.withModifiers(i2.showContextMenu, ["prevent"]) }, null, 8, ["process", "histories", "current-tasks", "all-process-i18n", "onContextmenu"])])])], 512);
|
|
2728
2796
|
}], ["__scopeId", "data-v-6658e14b"]]);
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
};
|
|
2732
|
-
const vr = { WorkflowEditor: ur, WorkflowHistory: yr }, Tr = { namespaced: true, state: { taches: [], transitions: [], startJoint: null, endJoint: null, isMovingTache: false, mouseDownPosition: null, isDrawingRegion: false, isMovingRegion: false, selectedTaches: [], selectedTransition: null, resizerToMove: null, draggerToMove: null, propertiesEditorFor: "", componentToDraw: "", controlPointToMove: null, formFields: [], formFieldsWithSub: [], contextMenuVisible: false, formCode: null, systemCode: null, systemVersion: null, processCode: null, processI18n: null, subtableConditionMap: null, propSettingKeyList: null, tableCode: null, isCreateDefinition: "", isHandleCreate: "", pageCode: null, sourceComponentType: "" }, getters: { taches: (e2) => e2.taches, transitions: (e2) => e2.transitions, startJoint: (e2) => e2.startJoint, endJoint: (e2) => e2.endJoint, isMovingTache: (e2) => e2.isMovingTache, mouseDownPosition: (e2) => e2.mouseDownPosition, isDrawingRegion: (e2) => e2.isDrawingRegion, isMovingRegion: (e2) => e2.isMovingRegion, selectedTaches: (e2) => e2.selectedTaches, selectedTransition: (e2) => e2.selectedTransition, resizerToMove: (e2) => e2.resizerToMove, draggerToMove: (e2) => e2.draggerToMove, propertiesEditorFor: (e2) => e2.propertiesEditorFor, componentToDraw: (e2) => e2.componentToDraw, controlPointToMove: (e2) => e2.controlPointToMove, formFields: (e2) => e2.formFields, formCode: (e2) => e2.formCode, formFieldsWithSub: (e2) => e2.formFieldsWithSub, contextMenuVisible: (e2) => e2.contextMenuVisible, systemCode: (e2) => e2.systemCode, processCode: (e2) => e2.processCode, processI18n: (e2) => e2.processI18n, subtableConditionMap: (e2) => e2.subtableConditionMap, propSettingKeyList: (e2) => e2.propSettingKeyList, systemVersion: (e2) => e2.systemVersion, tableCode: (e2) => e2.tableCode, isHandleCreate: (e2) => e2.isHandleCreate, isCreateDefinition: (e2) => e2.isCreateDefinition, pageCode: (e2) => e2.pageCode, sourceComponentType: (e2) => e2.sourceComponentType }, mutations: { setTaches(e2, t2) {
|
|
2733
|
-
e2.taches = t2;
|
|
2734
|
-
}, setTransitions(e2, t2) {
|
|
2735
|
-
e2.transitions = t2;
|
|
2736
|
-
}, clearCanvas(e2) {
|
|
2737
|
-
e2.taches = [], e2.transitions = [];
|
|
2738
|
-
}, resetState(e2) {
|
|
2739
|
-
e2.isMovingTache = false, e2.startJoint = null, e2.endJoint = null, e2.isDrawingRegion = false, e2.isMovingRegion = false, e2.resizerToMove = null, e2.draggerToMove = null, e2.controlPointToMove = null;
|
|
2740
|
-
}, stopDrawingLine(e2) {
|
|
2741
|
-
e2.startJoint = null, e2.endJoint = null;
|
|
2742
|
-
}, setStartJoint(e2, t2) {
|
|
2743
|
-
e2.startJoint = t2;
|
|
2744
|
-
}, setEndJoint(e2, t2) {
|
|
2745
|
-
e2.endJoint = t2;
|
|
2746
|
-
}, setMovingTache(e2, t2) {
|
|
2747
|
-
e2.isMovingTache = t2;
|
|
2748
|
-
}, setMouseDownPosition(e2, t2) {
|
|
2749
|
-
e2.mouseDownPosition = t2;
|
|
2750
|
-
}, setDrawingRegion(e2, t2) {
|
|
2751
|
-
e2.isDrawingRegion = t2;
|
|
2752
|
-
}, setMovingRegion(e2, t2) {
|
|
2753
|
-
e2.isMovingRegion = t2;
|
|
2754
|
-
}, setSelectedTaches(e2, t2) {
|
|
2755
|
-
e2.selectedTaches = t2;
|
|
2756
|
-
}, setSelectedTransition(e2, t2) {
|
|
2757
|
-
e2.selectedTransition = t2;
|
|
2758
|
-
}, setResizerToMove(e2, t2) {
|
|
2759
|
-
e2.resizerToMove = t2;
|
|
2760
|
-
}, setDraggerToMove(e2, t2) {
|
|
2761
|
-
e2.draggerToMove = t2;
|
|
2762
|
-
}, setPropertiesEditorFor(e2, t2) {
|
|
2763
|
-
e2.propertiesEditorFor = t2;
|
|
2764
|
-
}, setComponentToDraw(e2, t2) {
|
|
2765
|
-
e2.componentToDraw = t2;
|
|
2766
|
-
}, setControlPointToMove(e2, t2) {
|
|
2767
|
-
e2.controlPointToMove = t2;
|
|
2768
|
-
}, setFormFields(e2, t2) {
|
|
2769
|
-
e2.formFields = t2;
|
|
2770
|
-
}, setFormCode(e2, t2) {
|
|
2771
|
-
e2.formCode = t2;
|
|
2772
|
-
}, setFormFieldsWithSub(e2, t2) {
|
|
2773
|
-
e2.formFieldsWithSub = t2;
|
|
2774
|
-
}, setContextMenuVisible(e2, t2) {
|
|
2775
|
-
e2.contextMenuVisible = t2;
|
|
2776
|
-
}, setSystemCode(e2, t2) {
|
|
2777
|
-
e2.systemCode = t2;
|
|
2778
|
-
}, setProcessCode(e2, t2) {
|
|
2779
|
-
e2.processCode = t2;
|
|
2780
|
-
}, setProcessI18n(e2, t2) {
|
|
2781
|
-
e2.processI18n = t2;
|
|
2782
|
-
}, setSubtableConditionMap(e2, t2) {
|
|
2783
|
-
e2.subtableConditionMap = t2;
|
|
2784
|
-
}, setPropSettingKeyList(e2, t2) {
|
|
2785
|
-
e2.propSettingKeyList = t2;
|
|
2786
|
-
}, setSystemVersion(e2, t2) {
|
|
2787
|
-
e2.systemVersion = t2;
|
|
2788
|
-
}, setTableCode(e2, t2) {
|
|
2789
|
-
e2.tableCode = t2;
|
|
2790
|
-
}, setTableCode(e2, t2) {
|
|
2791
|
-
e2.tableCode = t2;
|
|
2792
|
-
}, setIsCreateDefinition(e2, t2) {
|
|
2793
|
-
e2.isCreateDefinition = t2;
|
|
2794
|
-
}, setIsHandleCreate(e2, t2) {
|
|
2795
|
-
e2.isHandleCreate = t2;
|
|
2796
|
-
}, setPageCode(e2, t2) {
|
|
2797
|
-
e2.pageCode = t2;
|
|
2798
|
-
}, setSourceComponentForCopy(e2, t2) {
|
|
2799
|
-
e2.sourceComponentType = t2;
|
|
2800
|
-
} } };
|
|
2801
|
-
function Nr() {
|
|
2802
|
-
return Nr = Object.assign ? Object.assign.bind() : function(e2) {
|
|
2797
|
+
function Tr() {
|
|
2798
|
+
return Tr = Object.assign ? Object.assign.bind() : function(e2) {
|
|
2803
2799
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
2804
2800
|
var o2 = arguments[t2];
|
|
2805
2801
|
for (var l2 in o2)
|
|
2806
2802
|
Object.prototype.hasOwnProperty.call(o2, l2) && (e2[l2] = o2[l2]);
|
|
2807
2803
|
}
|
|
2808
2804
|
return e2;
|
|
2809
|
-
},
|
|
2805
|
+
}, Tr.apply(this, arguments);
|
|
2810
2806
|
}
|
|
2811
|
-
function
|
|
2812
|
-
return
|
|
2807
|
+
function Nr(e2) {
|
|
2808
|
+
return Nr = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e3) {
|
|
2813
2809
|
return e3.__proto__ || Object.getPrototypeOf(e3);
|
|
2814
|
-
},
|
|
2810
|
+
}, Nr(e2);
|
|
2815
2811
|
}
|
|
2816
|
-
function
|
|
2817
|
-
return
|
|
2812
|
+
function xr(e2, t2) {
|
|
2813
|
+
return xr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e3, t3) {
|
|
2818
2814
|
return e3.__proto__ = t3, e3;
|
|
2819
|
-
},
|
|
2815
|
+
}, xr(e2, t2);
|
|
2820
2816
|
}
|
|
2821
|
-
function
|
|
2822
|
-
return
|
|
2817
|
+
function Er(e2, t2, o2) {
|
|
2818
|
+
return Er = function() {
|
|
2823
2819
|
if ("undefined" == typeof Reflect || !Reflect.construct)
|
|
2824
2820
|
return false;
|
|
2825
2821
|
if (Reflect.construct.sham)
|
|
@@ -2836,12 +2832,12 @@
|
|
|
2836
2832
|
var l2 = [null];
|
|
2837
2833
|
l2.push.apply(l2, t3);
|
|
2838
2834
|
var r2 = new (Function.bind.apply(e3, l2))();
|
|
2839
|
-
return o3 &&
|
|
2840
|
-
},
|
|
2835
|
+
return o3 && xr(r2, o3.prototype), r2;
|
|
2836
|
+
}, Er.apply(null, arguments);
|
|
2841
2837
|
}
|
|
2842
|
-
function
|
|
2838
|
+
function Sr(e2) {
|
|
2843
2839
|
var t2 = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
|
|
2844
|
-
return
|
|
2840
|
+
return Sr = function(e3) {
|
|
2845
2841
|
if (null === e3 || (o2 = e3, -1 === Function.toString.call(o2).indexOf("[native code]")))
|
|
2846
2842
|
return e3;
|
|
2847
2843
|
var o2;
|
|
@@ -2853,14 +2849,14 @@
|
|
|
2853
2849
|
t2.set(e3, l2);
|
|
2854
2850
|
}
|
|
2855
2851
|
function l2() {
|
|
2856
|
-
return
|
|
2852
|
+
return Er(e3, arguments, Nr(this).constructor);
|
|
2857
2853
|
}
|
|
2858
|
-
return l2.prototype = Object.create(e3.prototype, { constructor: { value: l2, enumerable: false, writable: true, configurable: true } }),
|
|
2859
|
-
},
|
|
2854
|
+
return l2.prototype = Object.create(e3.prototype, { constructor: { value: l2, enumerable: false, writable: true, configurable: true } }), xr(l2, e3);
|
|
2855
|
+
}, Sr(e2);
|
|
2860
2856
|
}
|
|
2861
|
-
var
|
|
2857
|
+
var Mr = /%[sdj%]/g, Dr = function() {
|
|
2862
2858
|
};
|
|
2863
|
-
function
|
|
2859
|
+
function Fr(e2) {
|
|
2864
2860
|
if (!e2 || !e2.length)
|
|
2865
2861
|
return null;
|
|
2866
2862
|
var t2 = {};
|
|
@@ -2869,11 +2865,11 @@
|
|
|
2869
2865
|
t2[o2] = t2[o2] || [], t2[o2].push(e3);
|
|
2870
2866
|
}), t2;
|
|
2871
2867
|
}
|
|
2872
|
-
function
|
|
2868
|
+
function $r(e2) {
|
|
2873
2869
|
for (var t2 = arguments.length, o2 = new Array(t2 > 1 ? t2 - 1 : 0), l2 = 1; l2 < t2; l2++)
|
|
2874
2870
|
o2[l2 - 1] = arguments[l2];
|
|
2875
2871
|
var r2 = 0, n2 = o2.length;
|
|
2876
|
-
return "function" == typeof e2 ? e2.apply(null, o2) : "string" == typeof e2 ? e2.replace(
|
|
2872
|
+
return "function" == typeof e2 ? e2.apply(null, o2) : "string" == typeof e2 ? e2.replace(Mr, function(e3) {
|
|
2877
2873
|
if ("%%" === e3)
|
|
2878
2874
|
return "%";
|
|
2879
2875
|
if (r2 >= n2)
|
|
@@ -2895,12 +2891,12 @@
|
|
|
2895
2891
|
}
|
|
2896
2892
|
}) : e2;
|
|
2897
2893
|
}
|
|
2898
|
-
function
|
|
2894
|
+
function Pr(e2, t2) {
|
|
2899
2895
|
return null == e2 || (!("array" !== t2 || !Array.isArray(e2) || e2.length) || !(!function(e3) {
|
|
2900
2896
|
return "string" === e3 || "url" === e3 || "hex" === e3 || "email" === e3 || "date" === e3 || "pattern" === e3;
|
|
2901
2897
|
}(t2) || "string" != typeof e2 || e2));
|
|
2902
2898
|
}
|
|
2903
|
-
function
|
|
2899
|
+
function Br(e2, t2, o2) {
|
|
2904
2900
|
var l2 = 0, r2 = e2.length;
|
|
2905
2901
|
!function n2(i2) {
|
|
2906
2902
|
if (i2 && i2.length)
|
|
@@ -2911,20 +2907,20 @@
|
|
|
2911
2907
|
}
|
|
2912
2908
|
}([]);
|
|
2913
2909
|
}
|
|
2914
|
-
"undefined" != typeof process && process.env && "production" !== process.env.NODE_ENV && "undefined" != typeof window && "undefined" != typeof document && (
|
|
2910
|
+
"undefined" != typeof process && process.env && "production" !== process.env.NODE_ENV && "undefined" != typeof window && "undefined" != typeof document && (Dr = function(e2, t2) {
|
|
2915
2911
|
"undefined" != typeof console && console.warn && "undefined" == typeof ASYNC_VALIDATOR_NO_WARNING && t2.every(function(e3) {
|
|
2916
2912
|
return "string" == typeof e3;
|
|
2917
2913
|
});
|
|
2918
2914
|
});
|
|
2919
|
-
var
|
|
2915
|
+
var Or = function(e2) {
|
|
2920
2916
|
var t2, o2;
|
|
2921
2917
|
function l2(t3, o3) {
|
|
2922
2918
|
var l3;
|
|
2923
2919
|
return (l3 = e2.call(this, "Async Validation Error") || this).errors = t3, l3.fields = o3, l3;
|
|
2924
2920
|
}
|
|
2925
|
-
return o2 = e2, (t2 = l2).prototype = Object.create(o2.prototype), t2.prototype.constructor = t2,
|
|
2926
|
-
}(
|
|
2927
|
-
function
|
|
2921
|
+
return o2 = e2, (t2 = l2).prototype = Object.create(o2.prototype), t2.prototype.constructor = t2, xr(t2, o2), l2;
|
|
2922
|
+
}(Sr(Error));
|
|
2923
|
+
function Ir(e2, t2, o2, l2, r2) {
|
|
2928
2924
|
if (t2.first) {
|
|
2929
2925
|
var n2 = new Promise(function(t3, n3) {
|
|
2930
2926
|
var i3 = function(e3) {
|
|
@@ -2933,8 +2929,8 @@
|
|
|
2933
2929
|
t4.push.apply(t4, e3[o3] || []);
|
|
2934
2930
|
}), t4;
|
|
2935
2931
|
}(e2);
|
|
2936
|
-
|
|
2937
|
-
return l2(e3), e3.length ? n3(new
|
|
2932
|
+
Br(i3, o2, function(e3) {
|
|
2933
|
+
return l2(e3), e3.length ? n3(new Or(e3, Fr(e3))) : t3(r2);
|
|
2938
2934
|
});
|
|
2939
2935
|
});
|
|
2940
2936
|
return n2.catch(function(e3) {
|
|
@@ -2944,11 +2940,11 @@
|
|
|
2944
2940
|
var i2 = true === t2.firstFields ? Object.keys(e2) : t2.firstFields || [], a2 = Object.keys(e2), s2 = a2.length, d2 = 0, c2 = [], m2 = new Promise(function(t3, n3) {
|
|
2945
2941
|
var m3 = function(e3) {
|
|
2946
2942
|
if (c2.push.apply(c2, e3), ++d2 === s2)
|
|
2947
|
-
return l2(c2), c2.length ? n3(new
|
|
2943
|
+
return l2(c2), c2.length ? n3(new Or(c2, Fr(c2))) : t3(r2);
|
|
2948
2944
|
};
|
|
2949
2945
|
a2.length || (l2(c2), t3(r2)), a2.forEach(function(t4) {
|
|
2950
2946
|
var l3 = e2[t4];
|
|
2951
|
-
-1 !== i2.indexOf(t4) ?
|
|
2947
|
+
-1 !== i2.indexOf(t4) ? Br(l3, o2, m3) : function(e3, t5, o3) {
|
|
2952
2948
|
var l4 = [], r3 = 0, n4 = e3.length;
|
|
2953
2949
|
function i3(e4) {
|
|
2954
2950
|
l4.push.apply(l4, e4 || []), ++r3 === n4 && o3(l4);
|
|
@@ -2963,7 +2959,7 @@
|
|
|
2963
2959
|
return e3;
|
|
2964
2960
|
}), m2;
|
|
2965
2961
|
}
|
|
2966
|
-
function
|
|
2962
|
+
function _r(e2, t2) {
|
|
2967
2963
|
return function(o2) {
|
|
2968
2964
|
var l2, r2;
|
|
2969
2965
|
return l2 = e2.fullFields ? function(e3, t3) {
|
|
@@ -2976,22 +2972,22 @@
|
|
|
2976
2972
|
}(t2, e2.fullFields) : t2[o2.field || e2.fullField], (r2 = o2) && void 0 !== r2.message ? (o2.field = o2.field || e2.fullField, o2.fieldValue = l2, o2) : { message: "function" == typeof o2 ? o2() : o2, fieldValue: l2, field: o2.field || e2.fullField };
|
|
2977
2973
|
};
|
|
2978
2974
|
}
|
|
2979
|
-
function
|
|
2975
|
+
function Rr(e2, t2) {
|
|
2980
2976
|
if (t2) {
|
|
2981
2977
|
for (var o2 in t2)
|
|
2982
2978
|
if (t2.hasOwnProperty(o2)) {
|
|
2983
2979
|
var l2 = t2[o2];
|
|
2984
|
-
"object" == typeof l2 && "object" == typeof e2[o2] ? e2[o2] =
|
|
2980
|
+
"object" == typeof l2 && "object" == typeof e2[o2] ? e2[o2] = Tr({}, e2[o2], l2) : e2[o2] = l2;
|
|
2985
2981
|
}
|
|
2986
2982
|
}
|
|
2987
2983
|
return e2;
|
|
2988
2984
|
}
|
|
2989
|
-
var
|
|
2990
|
-
!e2.required || o2.hasOwnProperty(e2.field) && !
|
|
2991
|
-
},
|
|
2992
|
-
return
|
|
2985
|
+
var Ar, Ur = function(e2, t2, o2, l2, r2, n2) {
|
|
2986
|
+
!e2.required || o2.hasOwnProperty(e2.field) && !Pr(t2, n2 || e2.type) || l2.push($r(r2.messages.required, e2.fullField));
|
|
2987
|
+
}, Lr = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/, Hr = /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i, jr = { integer: function(e2) {
|
|
2988
|
+
return jr.number(e2) && parseInt(e2, 10) === e2;
|
|
2993
2989
|
}, float: function(e2) {
|
|
2994
|
-
return
|
|
2990
|
+
return jr.number(e2) && !jr.integer(e2);
|
|
2995
2991
|
}, array: function(e2) {
|
|
2996
2992
|
return Array.isArray(e2);
|
|
2997
2993
|
}, regexp: function(e2) {
|
|
@@ -3007,15 +3003,15 @@
|
|
|
3007
3003
|
}, number: function(e2) {
|
|
3008
3004
|
return !isNaN(e2) && "number" == typeof e2;
|
|
3009
3005
|
}, object: function(e2) {
|
|
3010
|
-
return "object" == typeof e2 && !
|
|
3006
|
+
return "object" == typeof e2 && !jr.array(e2);
|
|
3011
3007
|
}, method: function(e2) {
|
|
3012
3008
|
return "function" == typeof e2;
|
|
3013
3009
|
}, email: function(e2) {
|
|
3014
|
-
return "string" == typeof e2 && e2.length <= 320 && !!e2.match(
|
|
3010
|
+
return "string" == typeof e2 && e2.length <= 320 && !!e2.match(Lr);
|
|
3015
3011
|
}, url: function(e2) {
|
|
3016
3012
|
return "string" == typeof e2 && e2.length <= 2048 && !!e2.match(function() {
|
|
3017
|
-
if (
|
|
3018
|
-
return
|
|
3013
|
+
if (Ar)
|
|
3014
|
+
return Ar;
|
|
3019
3015
|
var e3 = "[a-fA-F\\d:]", t2 = function(t3) {
|
|
3020
3016
|
return t3 && t3.includeBoundaries ? "(?:(?<=\\s|^)(?=" + e3 + ")|(?<=" + e3 + ")(?=\\s|$))" : "";
|
|
3021
3017
|
}, o2 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", l2 = "[a-fA-F\\d]{1,4}", r2 = ("\n(?:\n(?:" + l2 + ":){7}(?:" + l2 + "|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:" + l2 + ":){6}(?:" + o2 + "|:" + l2 + "|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:" + l2 + ":){5}(?::" + o2 + "|(?::" + l2 + "){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:" + l2 + ":){4}(?:(?::" + l2 + "){0,1}:" + o2 + "|(?::" + l2 + "){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:" + l2 + ":){3}(?:(?::" + l2 + "){0,2}:" + o2 + "|(?::" + l2 + "){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:" + l2 + ":){2}(?:(?::" + l2 + "){0,3}:" + o2 + "|(?::" + l2 + "){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:" + l2 + ":){1}(?:(?::" + l2 + "){0,4}:" + o2 + "|(?::" + l2 + "){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + l2 + "){0,5}:" + o2 + "|(?::" + l2 + "){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), n2 = new RegExp("(?:^" + o2 + "$)|(?:^" + r2 + "$)"), i2 = new RegExp("^" + o2 + "$"), a2 = new RegExp("^" + r2 + "$"), s2 = function(e4) {
|
|
@@ -3027,96 +3023,96 @@
|
|
|
3027
3023
|
return e4 && e4.exact ? a2 : new RegExp("" + t2(e4) + r2 + t2(e4), "g");
|
|
3028
3024
|
};
|
|
3029
3025
|
var d2 = s2.v4().source, c2 = s2.v6().source;
|
|
3030
|
-
return
|
|
3026
|
+
return Ar = new RegExp("(?:^(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|" + d2 + "|" + c2 + '|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?$)', "i");
|
|
3031
3027
|
}());
|
|
3032
3028
|
}, hex: function(e2) {
|
|
3033
|
-
return "string" == typeof e2 && !!e2.match(
|
|
3034
|
-
} },
|
|
3035
|
-
(/^\s+$/.test(t2) || "" === t2) && l2.push(
|
|
3029
|
+
return "string" == typeof e2 && !!e2.match(Hr);
|
|
3030
|
+
} }, zr = "enum", Wr = { required: Ur, whitespace: function(e2, t2, o2, l2, r2) {
|
|
3031
|
+
(/^\s+$/.test(t2) || "" === t2) && l2.push($r(r2.messages.whitespace, e2.fullField));
|
|
3036
3032
|
}, type: function(e2, t2, o2, l2, r2) {
|
|
3037
3033
|
if (e2.required && void 0 === t2)
|
|
3038
|
-
|
|
3034
|
+
Ur(e2, t2, o2, l2, r2);
|
|
3039
3035
|
else {
|
|
3040
3036
|
var n2 = e2.type;
|
|
3041
|
-
["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"].indexOf(n2) > -1 ?
|
|
3037
|
+
["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"].indexOf(n2) > -1 ? jr[n2](t2) || l2.push($r(r2.messages.types[n2], e2.fullField, e2.type)) : n2 && typeof t2 !== e2.type && l2.push($r(r2.messages.types[n2], e2.fullField, e2.type));
|
|
3042
3038
|
}
|
|
3043
3039
|
}, range: function(e2, t2, o2, l2, r2) {
|
|
3044
3040
|
var n2 = "number" == typeof e2.len, i2 = "number" == typeof e2.min, a2 = "number" == typeof e2.max, s2 = t2, d2 = null, c2 = "number" == typeof t2, m2 = "string" == typeof t2, u2 = Array.isArray(t2);
|
|
3045
3041
|
if (c2 ? d2 = "number" : m2 ? d2 = "string" : u2 && (d2 = "array"), !d2)
|
|
3046
3042
|
return false;
|
|
3047
|
-
u2 && (s2 = t2.length), m2 && (s2 = t2.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length), n2 ? s2 !== e2.len && l2.push(
|
|
3043
|
+
u2 && (s2 = t2.length), m2 && (s2 = t2.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length), n2 ? s2 !== e2.len && l2.push($r(r2.messages[d2].len, e2.fullField, e2.len)) : i2 && !a2 && s2 < e2.min ? l2.push($r(r2.messages[d2].min, e2.fullField, e2.min)) : a2 && !i2 && s2 > e2.max ? l2.push($r(r2.messages[d2].max, e2.fullField, e2.max)) : i2 && a2 && (s2 < e2.min || s2 > e2.max) && l2.push($r(r2.messages[d2].range, e2.fullField, e2.min, e2.max));
|
|
3048
3044
|
}, enum: function(e2, t2, o2, l2, r2) {
|
|
3049
|
-
e2[
|
|
3045
|
+
e2[zr] = Array.isArray(e2[zr]) ? e2[zr] : [], -1 === e2[zr].indexOf(t2) && l2.push($r(r2.messages[zr], e2.fullField, e2[zr].join(", ")));
|
|
3050
3046
|
}, pattern: function(e2, t2, o2, l2, r2) {
|
|
3051
3047
|
if (e2.pattern) {
|
|
3052
3048
|
if (e2.pattern instanceof RegExp)
|
|
3053
|
-
e2.pattern.lastIndex = 0, e2.pattern.test(t2) || l2.push(
|
|
3049
|
+
e2.pattern.lastIndex = 0, e2.pattern.test(t2) || l2.push($r(r2.messages.pattern.mismatch, e2.fullField, t2, e2.pattern));
|
|
3054
3050
|
else if ("string" == typeof e2.pattern) {
|
|
3055
|
-
new RegExp(e2.pattern).test(t2) || l2.push(
|
|
3051
|
+
new RegExp(e2.pattern).test(t2) || l2.push($r(r2.messages.pattern.mismatch, e2.fullField, t2, e2.pattern));
|
|
3056
3052
|
}
|
|
3057
3053
|
}
|
|
3058
|
-
} },
|
|
3054
|
+
} }, Jr = function(e2, t2, o2, l2, r2) {
|
|
3059
3055
|
var n2 = e2.type, i2 = [];
|
|
3060
3056
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3061
|
-
if (
|
|
3057
|
+
if (Pr(t2, n2) && !e2.required)
|
|
3062
3058
|
return o2();
|
|
3063
|
-
|
|
3059
|
+
Wr.required(e2, t2, l2, i2, r2, n2), Pr(t2, n2) || Wr.type(e2, t2, l2, i2, r2);
|
|
3064
3060
|
}
|
|
3065
3061
|
o2(i2);
|
|
3066
|
-
},
|
|
3062
|
+
}, qr = { string: function(e2, t2, o2, l2, r2) {
|
|
3067
3063
|
var n2 = [];
|
|
3068
3064
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3069
|
-
if (
|
|
3065
|
+
if (Pr(t2, "string") && !e2.required)
|
|
3070
3066
|
return o2();
|
|
3071
|
-
|
|
3067
|
+
Wr.required(e2, t2, l2, n2, r2, "string"), Pr(t2, "string") || (Wr.type(e2, t2, l2, n2, r2), Wr.range(e2, t2, l2, n2, r2), Wr.pattern(e2, t2, l2, n2, r2), true === e2.whitespace && Wr.whitespace(e2, t2, l2, n2, r2));
|
|
3072
3068
|
}
|
|
3073
3069
|
o2(n2);
|
|
3074
3070
|
}, method: function(e2, t2, o2, l2, r2) {
|
|
3075
3071
|
var n2 = [];
|
|
3076
3072
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3077
|
-
if (
|
|
3073
|
+
if (Pr(t2) && !e2.required)
|
|
3078
3074
|
return o2();
|
|
3079
|
-
|
|
3075
|
+
Wr.required(e2, t2, l2, n2, r2), void 0 !== t2 && Wr.type(e2, t2, l2, n2, r2);
|
|
3080
3076
|
}
|
|
3081
3077
|
o2(n2);
|
|
3082
3078
|
}, number: function(e2, t2, o2, l2, r2) {
|
|
3083
3079
|
var n2 = [];
|
|
3084
3080
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3085
|
-
if ("" === t2 && (t2 = void 0),
|
|
3081
|
+
if ("" === t2 && (t2 = void 0), Pr(t2) && !e2.required)
|
|
3086
3082
|
return o2();
|
|
3087
|
-
|
|
3083
|
+
Wr.required(e2, t2, l2, n2, r2), void 0 !== t2 && (Wr.type(e2, t2, l2, n2, r2), Wr.range(e2, t2, l2, n2, r2));
|
|
3088
3084
|
}
|
|
3089
3085
|
o2(n2);
|
|
3090
3086
|
}, boolean: function(e2, t2, o2, l2, r2) {
|
|
3091
3087
|
var n2 = [];
|
|
3092
3088
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3093
|
-
if (
|
|
3089
|
+
if (Pr(t2) && !e2.required)
|
|
3094
3090
|
return o2();
|
|
3095
|
-
|
|
3091
|
+
Wr.required(e2, t2, l2, n2, r2), void 0 !== t2 && Wr.type(e2, t2, l2, n2, r2);
|
|
3096
3092
|
}
|
|
3097
3093
|
o2(n2);
|
|
3098
3094
|
}, regexp: function(e2, t2, o2, l2, r2) {
|
|
3099
3095
|
var n2 = [];
|
|
3100
3096
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3101
|
-
if (
|
|
3097
|
+
if (Pr(t2) && !e2.required)
|
|
3102
3098
|
return o2();
|
|
3103
|
-
|
|
3099
|
+
Wr.required(e2, t2, l2, n2, r2), Pr(t2) || Wr.type(e2, t2, l2, n2, r2);
|
|
3104
3100
|
}
|
|
3105
3101
|
o2(n2);
|
|
3106
3102
|
}, integer: function(e2, t2, o2, l2, r2) {
|
|
3107
3103
|
var n2 = [];
|
|
3108
3104
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3109
|
-
if (
|
|
3105
|
+
if (Pr(t2) && !e2.required)
|
|
3110
3106
|
return o2();
|
|
3111
|
-
|
|
3107
|
+
Wr.required(e2, t2, l2, n2, r2), void 0 !== t2 && (Wr.type(e2, t2, l2, n2, r2), Wr.range(e2, t2, l2, n2, r2));
|
|
3112
3108
|
}
|
|
3113
3109
|
o2(n2);
|
|
3114
3110
|
}, float: function(e2, t2, o2, l2, r2) {
|
|
3115
3111
|
var n2 = [];
|
|
3116
3112
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3117
|
-
if (
|
|
3113
|
+
if (Pr(t2) && !e2.required)
|
|
3118
3114
|
return o2();
|
|
3119
|
-
|
|
3115
|
+
Wr.required(e2, t2, l2, n2, r2), void 0 !== t2 && (Wr.type(e2, t2, l2, n2, r2), Wr.range(e2, t2, l2, n2, r2));
|
|
3120
3116
|
}
|
|
3121
3117
|
o2(n2);
|
|
3122
3118
|
}, array: function(e2, t2, o2, l2, r2) {
|
|
@@ -3124,64 +3120,64 @@
|
|
|
3124
3120
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3125
3121
|
if (null == t2 && !e2.required)
|
|
3126
3122
|
return o2();
|
|
3127
|
-
|
|
3123
|
+
Wr.required(e2, t2, l2, n2, r2, "array"), null != t2 && (Wr.type(e2, t2, l2, n2, r2), Wr.range(e2, t2, l2, n2, r2));
|
|
3128
3124
|
}
|
|
3129
3125
|
o2(n2);
|
|
3130
3126
|
}, object: function(e2, t2, o2, l2, r2) {
|
|
3131
3127
|
var n2 = [];
|
|
3132
3128
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3133
|
-
if (
|
|
3129
|
+
if (Pr(t2) && !e2.required)
|
|
3134
3130
|
return o2();
|
|
3135
|
-
|
|
3131
|
+
Wr.required(e2, t2, l2, n2, r2), void 0 !== t2 && Wr.type(e2, t2, l2, n2, r2);
|
|
3136
3132
|
}
|
|
3137
3133
|
o2(n2);
|
|
3138
3134
|
}, enum: function(e2, t2, o2, l2, r2) {
|
|
3139
3135
|
var n2 = [];
|
|
3140
3136
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3141
|
-
if (
|
|
3137
|
+
if (Pr(t2) && !e2.required)
|
|
3142
3138
|
return o2();
|
|
3143
|
-
|
|
3139
|
+
Wr.required(e2, t2, l2, n2, r2), void 0 !== t2 && Wr.enum(e2, t2, l2, n2, r2);
|
|
3144
3140
|
}
|
|
3145
3141
|
o2(n2);
|
|
3146
3142
|
}, pattern: function(e2, t2, o2, l2, r2) {
|
|
3147
3143
|
var n2 = [];
|
|
3148
3144
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3149
|
-
if (
|
|
3145
|
+
if (Pr(t2, "string") && !e2.required)
|
|
3150
3146
|
return o2();
|
|
3151
|
-
|
|
3147
|
+
Wr.required(e2, t2, l2, n2, r2), Pr(t2, "string") || Wr.pattern(e2, t2, l2, n2, r2);
|
|
3152
3148
|
}
|
|
3153
3149
|
o2(n2);
|
|
3154
3150
|
}, date: function(e2, t2, o2, l2, r2) {
|
|
3155
3151
|
var n2 = [];
|
|
3156
3152
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3157
|
-
if (
|
|
3153
|
+
if (Pr(t2, "date") && !e2.required)
|
|
3158
3154
|
return o2();
|
|
3159
3155
|
var i2;
|
|
3160
|
-
if (
|
|
3161
|
-
i2 = t2 instanceof Date ? t2 : new Date(t2),
|
|
3156
|
+
if (Wr.required(e2, t2, l2, n2, r2), !Pr(t2, "date"))
|
|
3157
|
+
i2 = t2 instanceof Date ? t2 : new Date(t2), Wr.type(e2, i2, l2, n2, r2), i2 && Wr.range(e2, i2.getTime(), l2, n2, r2);
|
|
3162
3158
|
}
|
|
3163
3159
|
o2(n2);
|
|
3164
|
-
}, url:
|
|
3160
|
+
}, url: Jr, hex: Jr, email: Jr, required: function(e2, t2, o2, l2, r2) {
|
|
3165
3161
|
var n2 = [], i2 = Array.isArray(t2) ? "array" : typeof t2;
|
|
3166
|
-
|
|
3162
|
+
Wr.required(e2, t2, l2, n2, r2, i2), o2(n2);
|
|
3167
3163
|
}, any: function(e2, t2, o2, l2, r2) {
|
|
3168
3164
|
var n2 = [];
|
|
3169
3165
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3170
|
-
if (
|
|
3166
|
+
if (Pr(t2) && !e2.required)
|
|
3171
3167
|
return o2();
|
|
3172
|
-
|
|
3168
|
+
Wr.required(e2, t2, l2, n2, r2);
|
|
3173
3169
|
}
|
|
3174
3170
|
o2(n2);
|
|
3175
3171
|
} };
|
|
3176
|
-
function
|
|
3172
|
+
function Gr() {
|
|
3177
3173
|
return { default: "Validation error on field %s", required: "%s is required", enum: "%s must be one of %s", whitespace: "%s cannot be empty", date: { format: "%s date %s is invalid for format %s", parse: "%s date could not be parsed, %s is invalid ", invalid: "%s date %s is invalid" }, types: { string: "%s is not a %s", method: "%s is not a %s (function)", array: "%s is not an %s", object: "%s is not an %s", number: "%s is not a %s", date: "%s is not a %s", boolean: "%s is not a %s", integer: "%s is not an %s", float: "%s is not a %s", regexp: "%s is not a valid %s", email: "%s is not a valid %s", url: "%s is not a valid %s", hex: "%s is not a valid %s" }, string: { len: "%s must be exactly %s characters", min: "%s must be at least %s characters", max: "%s cannot be longer than %s characters", range: "%s must be between %s and %s characters" }, number: { len: "%s must equal %s", min: "%s cannot be less than %s", max: "%s cannot be greater than %s", range: "%s must be between %s and %s" }, array: { len: "%s must be exactly %s in length", min: "%s cannot be less than %s in length", max: "%s cannot be greater than %s in length", range: "%s must be between %s and %s in length" }, pattern: { mismatch: "%s value %s does not match pattern %s" }, clone: function() {
|
|
3178
3174
|
var e2 = JSON.parse(JSON.stringify(this));
|
|
3179
3175
|
return e2.clone = this.clone, e2;
|
|
3180
3176
|
} };
|
|
3181
3177
|
}
|
|
3182
|
-
var
|
|
3178
|
+
var Kr = Gr(), Xr = function() {
|
|
3183
3179
|
function e2(e3) {
|
|
3184
|
-
this.rules = null, this._messages =
|
|
3180
|
+
this.rules = null, this._messages = Kr, this.define(e3);
|
|
3185
3181
|
}
|
|
3186
3182
|
var t2 = e2.prototype;
|
|
3187
3183
|
return t2.define = function(e3) {
|
|
@@ -3195,7 +3191,7 @@
|
|
|
3195
3191
|
t3.rules[o2] = Array.isArray(l2) ? l2 : [l2];
|
|
3196
3192
|
});
|
|
3197
3193
|
}, t2.messages = function(e3) {
|
|
3198
|
-
return e3 && (this._messages =
|
|
3194
|
+
return e3 && (this._messages = Rr(Gr(), e3)), this._messages;
|
|
3199
3195
|
}, t2.validate = function(t3, o2, l2) {
|
|
3200
3196
|
var r2 = this;
|
|
3201
3197
|
void 0 === o2 && (o2 = {}), void 0 === l2 && (l2 = function() {
|
|
@@ -3205,7 +3201,7 @@
|
|
|
3205
3201
|
return a2 && a2(null, n2), Promise.resolve(n2);
|
|
3206
3202
|
if (i2.messages) {
|
|
3207
3203
|
var s2 = this.messages();
|
|
3208
|
-
s2 ===
|
|
3204
|
+
s2 === Kr && (s2 = Gr()), Rr(s2, i2.messages), i2.messages = s2;
|
|
3209
3205
|
} else
|
|
3210
3206
|
i2.messages = this.messages();
|
|
3211
3207
|
var d2 = {};
|
|
@@ -3213,29 +3209,29 @@
|
|
|
3213
3209
|
var o3 = r2.rules[e3], l3 = n2[e3];
|
|
3214
3210
|
o3.forEach(function(o4) {
|
|
3215
3211
|
var i3 = o4;
|
|
3216
|
-
"function" == typeof i3.transform && (n2 === t3 && (n2 =
|
|
3212
|
+
"function" == typeof i3.transform && (n2 === t3 && (n2 = Tr({}, n2)), l3 = n2[e3] = i3.transform(l3)), (i3 = "function" == typeof i3 ? { validator: i3 } : Tr({}, i3)).validator = r2.getValidationMethod(i3), i3.validator && (i3.field = e3, i3.fullField = i3.fullField || e3, i3.type = r2.getType(i3), d2[e3] = d2[e3] || [], d2[e3].push({ rule: i3, value: l3, source: n2, field: e3 }));
|
|
3217
3213
|
});
|
|
3218
3214
|
});
|
|
3219
3215
|
var c2 = {};
|
|
3220
|
-
return
|
|
3216
|
+
return Ir(d2, i2, function(t4, o3) {
|
|
3221
3217
|
var l3, r3 = t4.rule, a3 = !("object" !== r3.type && "array" !== r3.type || "object" != typeof r3.fields && "object" != typeof r3.defaultField);
|
|
3222
3218
|
function s3(e3, t5) {
|
|
3223
|
-
return
|
|
3219
|
+
return Tr({}, t5, { fullField: r3.fullField + "." + e3, fullFields: r3.fullFields ? [].concat(r3.fullFields, [e3]) : [e3] });
|
|
3224
3220
|
}
|
|
3225
3221
|
function d3(l4) {
|
|
3226
3222
|
void 0 === l4 && (l4 = []);
|
|
3227
3223
|
var d4 = Array.isArray(l4) ? l4 : [l4];
|
|
3228
3224
|
!i2.suppressWarning && d4.length && e2.warning("async-validator:", d4), d4.length && void 0 !== r3.message && (d4 = [].concat(r3.message));
|
|
3229
|
-
var m2 = d4.map(
|
|
3225
|
+
var m2 = d4.map(_r(r3, n2));
|
|
3230
3226
|
if (i2.first && m2.length)
|
|
3231
3227
|
return c2[r3.field] = 1, o3(m2);
|
|
3232
3228
|
if (a3) {
|
|
3233
3229
|
if (r3.required && !t4.value)
|
|
3234
|
-
return void 0 !== r3.message ? m2 = [].concat(r3.message).map(
|
|
3230
|
+
return void 0 !== r3.message ? m2 = [].concat(r3.message).map(_r(r3, n2)) : i2.error && (m2 = [i2.error(r3, $r(i2.messages.required, r3.field))]), o3(m2);
|
|
3235
3231
|
var u2 = {};
|
|
3236
3232
|
r3.defaultField && Object.keys(t4.value).map(function(e3) {
|
|
3237
3233
|
u2[e3] = r3.defaultField;
|
|
3238
|
-
}), u2 =
|
|
3234
|
+
}), u2 = Tr({}, u2, t4.rule.fields);
|
|
3239
3235
|
var p2 = {};
|
|
3240
3236
|
Object.keys(u2).forEach(function(e3) {
|
|
3241
3237
|
var t5 = u2[e3], o4 = Array.isArray(t5) ? t5 : [t5];
|
|
@@ -3275,25 +3271,25 @@
|
|
|
3275
3271
|
}
|
|
3276
3272
|
for (var r3 = 0; r3 < e4.length; r3++)
|
|
3277
3273
|
l3(e4[r3]);
|
|
3278
|
-
t4.length ? (o3 =
|
|
3274
|
+
t4.length ? (o3 = Fr(t4), a2(t4, o3)) : a2(null, n2);
|
|
3279
3275
|
}(e3);
|
|
3280
3276
|
}, n2);
|
|
3281
3277
|
}, t2.getType = function(e3) {
|
|
3282
|
-
if (void 0 === e3.type && e3.pattern instanceof RegExp && (e3.type = "pattern"), "function" != typeof e3.validator && e3.type && !
|
|
3283
|
-
throw new Error(
|
|
3278
|
+
if (void 0 === e3.type && e3.pattern instanceof RegExp && (e3.type = "pattern"), "function" != typeof e3.validator && e3.type && !qr.hasOwnProperty(e3.type))
|
|
3279
|
+
throw new Error($r("Unknown rule type %s", e3.type));
|
|
3284
3280
|
return e3.type || "string";
|
|
3285
3281
|
}, t2.getValidationMethod = function(e3) {
|
|
3286
3282
|
if ("function" == typeof e3.validator)
|
|
3287
3283
|
return e3.validator;
|
|
3288
3284
|
var t3 = Object.keys(e3), o2 = t3.indexOf("message");
|
|
3289
|
-
return -1 !== o2 && t3.splice(o2, 1), 1 === t3.length && "required" === t3[0] ?
|
|
3285
|
+
return -1 !== o2 && t3.splice(o2, 1), 1 === t3.length && "required" === t3[0] ? qr.required : qr[this.getType(e3)] || void 0;
|
|
3290
3286
|
}, e2;
|
|
3291
3287
|
}();
|
|
3292
|
-
function
|
|
3288
|
+
function Yr(e2, t2) {
|
|
3293
3289
|
const o2 = {}, l2 = e2.dataType;
|
|
3294
|
-
return "DATE" === l2 || "TIME" === l2 ? (o2.type = "date",
|
|
3290
|
+
return "DATE" === l2 || "TIME" === l2 ? (o2.type = "date", Qr(o2), o2.message = e2.label + " " + h().t("workflowEditorMessage.requiredAndMustBeADate")) : "INTEGER" === l2 || "LONG" === l2 ? (o2.pattern = /^-?\d+$/, o2.message = e2.label + " " + h().t("workflowEditorMessage.requiredAndMustBeAnInteger")) : "FLOAT" === l2 || "DOUBLE" === l2 ? (o2.pattern = new RegExp("^(-?\\d+)(\\.\\d+)?$"), o2.message = e2.label + " " + h().t("workflowEditorMessage.requiredAndMustBeDecimal")) : "BOOLEAN" === l2 ? (o2.type = "boolean", o2.message = e2.label + " " + h().t("workflowEditorMessage.mustFill"), Qr(o2)) : o2.message = e2.label + " " + h().t("workflowEditorMessage.mustFill"), e2.canEdit && (o2.required = true, o2.trigger = "blur"), e2.rowIndexes && (o2.rowIndexes = e2.rowIndexes), e2.condition && (o2.condition = e2.condition), t2[e2.name] = e2.dataType, o2;
|
|
3295
3291
|
}
|
|
3296
|
-
function
|
|
3292
|
+
function Qr(e2) {
|
|
3297
3293
|
e2 && e2.type && "boolean" === e2.type ? e2.validator = function(e3, t2, o2) {
|
|
3298
3294
|
return null == t2 ? !e3.required : "number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2);
|
|
3299
3295
|
} : e2 && e2.type && "date" === e2.type && (e2.validator = function(e3, t2, o2) {
|
|
@@ -3305,7 +3301,7 @@
|
|
|
3305
3301
|
}
|
|
3306
3302
|
});
|
|
3307
3303
|
}
|
|
3308
|
-
function
|
|
3304
|
+
function Zr(e2, t2, o2) {
|
|
3309
3305
|
let l2;
|
|
3310
3306
|
for (let r2 = 0; r2 < t2.length; r2++) {
|
|
3311
3307
|
const n2 = t2[r2];
|
|
@@ -3314,7 +3310,7 @@
|
|
|
3314
3310
|
}
|
|
3315
3311
|
return l2;
|
|
3316
3312
|
}
|
|
3317
|
-
function
|
|
3313
|
+
function en(e2, t2, o2) {
|
|
3318
3314
|
let l2;
|
|
3319
3315
|
for (let r2 = 0; r2 < t2.length; r2++)
|
|
3320
3316
|
if (l2 = 0 === r2 ? e2[t2[r2]] : l2.fields[t2[r2]], r2 !== t2.length - 1) {
|
|
@@ -3323,7 +3319,7 @@
|
|
|
3323
3319
|
}
|
|
3324
3320
|
return l2;
|
|
3325
3321
|
}
|
|
3326
|
-
function
|
|
3322
|
+
function tn(e2, t2, o2, l2, r2) {
|
|
3327
3323
|
let n2 = e2.name;
|
|
3328
3324
|
const i2 = n2.substring(0, n2.indexOf("."));
|
|
3329
3325
|
if (o2) {
|
|
@@ -3351,22 +3347,22 @@
|
|
|
3351
3347
|
const n4 = i3[o4];
|
|
3352
3348
|
let a2;
|
|
3353
3349
|
if (o4 === i3.length - 1)
|
|
3354
|
-
a2 =
|
|
3350
|
+
a2 = en(r3, i3, n4), a2.fields[n4] = Yr(e3, l4);
|
|
3355
3351
|
else {
|
|
3356
3352
|
let e4;
|
|
3357
|
-
0 === o4 ? a2 = t3 : (e4 =
|
|
3353
|
+
0 === o4 ? a2 = t3 : (e4 = Zr(r3, i3, i3[o4 - 1]), a2 = e4.fields), a2[n4] || (a2[n4] = { type: "object", required: true, fields: {} }), 0 === o4 ? r3[n4] = a2[n4] : e4.fields[n4] = a2[n4];
|
|
3358
3354
|
}
|
|
3359
3355
|
}
|
|
3360
3356
|
}(e2, t2, 0, r2);
|
|
3361
3357
|
}
|
|
3362
3358
|
}
|
|
3363
|
-
function
|
|
3364
|
-
return
|
|
3359
|
+
function on(e2, t2, o2, l2, r2, n2, i2) {
|
|
3360
|
+
return ln(e2, t2, o2, true, l2, r2, n2, i2);
|
|
3365
3361
|
}
|
|
3366
|
-
function
|
|
3362
|
+
function ln(e2, t2, o2, l2, r2, n2, i2, a2) {
|
|
3367
3363
|
let s2 = false;
|
|
3368
3364
|
let d2;
|
|
3369
|
-
if (new
|
|
3365
|
+
if (new Xr(t2).validate(e2, { first: true }, (a3, c2) => {
|
|
3370
3366
|
if (a3) {
|
|
3371
3367
|
const e3 = a3[0].message;
|
|
3372
3368
|
d2 = a3[0].field, s2 = null != o2 ? void 0 !== n2 && void 0 !== i2 ? h().t("workflowEditorMessage.pageRecordLine", { pageNum: n2, row: i2 }) + "," + e3 : h().t("workflowEditorMessage.recordLine", { row: o2 + 1 }) + "," + e3 : e3;
|
|
@@ -3375,7 +3371,7 @@
|
|
|
3375
3371
|
if (d2 && true === l2) {
|
|
3376
3372
|
if (void 0 !== r2 && true === r2 && /[A-Z]+/.test(d2) && void 0 !== e2[d2.toLowerCase()]) {
|
|
3377
3373
|
const l3 = JSON.parse(JSON.stringify(e2));
|
|
3378
|
-
l3[d2.toUpperCase()] = e2[d2.toLowerCase()], delete l3[d2.toLowerCase()], s2 =
|
|
3374
|
+
l3[d2.toUpperCase()] = e2[d2.toLowerCase()], delete l3[d2.toLowerCase()], s2 = ln(l3, t2, o2, false, r2, n2, i2);
|
|
3379
3375
|
}
|
|
3380
3376
|
}
|
|
3381
3377
|
}), a2) {
|
|
@@ -3384,7 +3380,7 @@
|
|
|
3384
3380
|
}
|
|
3385
3381
|
return s2;
|
|
3386
3382
|
}
|
|
3387
|
-
function
|
|
3383
|
+
function rn(e2, t2, l2, r2, n2, i2, a2, s2, d2) {
|
|
3388
3384
|
const c2 = function(e3) {
|
|
3389
3385
|
return e3 && e3.id ? e3.id : e3 && e3.ID ? e3.ID : void 0;
|
|
3390
3386
|
}(l2), m2 = {};
|
|
@@ -3403,20 +3399,20 @@
|
|
|
3403
3399
|
}
|
|
3404
3400
|
return m2;
|
|
3405
3401
|
}
|
|
3406
|
-
function
|
|
3402
|
+
function nn(e2, t2, o2) {
|
|
3407
3403
|
let l2 = t2[o2];
|
|
3408
3404
|
return l2 || (l2 = []), 0 !== l2.length || !e2 || !e2[o2] || void 0 === e2[o2].required || true !== e2[o2].required || e2[o2].message;
|
|
3409
3405
|
}
|
|
3410
|
-
|
|
3406
|
+
Xr.register = function(e2, t2) {
|
|
3411
3407
|
if ("function" != typeof t2)
|
|
3412
3408
|
throw new Error("Cannot register a validator by type, validator is not a function");
|
|
3413
|
-
|
|
3414
|
-
},
|
|
3415
|
-
const
|
|
3409
|
+
qr[e2] = t2;
|
|
3410
|
+
}, Xr.warning = Dr, Xr.messages = Kr, Xr.validators = qr;
|
|
3411
|
+
const an = function(e2, t2, o2, l2, r2, n2, i2, a2) {
|
|
3416
3412
|
const s2 = Object.keys(t2);
|
|
3417
3413
|
if (s2.indexOf("rules") >= 0 && s2.indexOf("subRules") >= 0 && s2.indexOf("totalSubRules") >= 0) {
|
|
3418
3414
|
const s3 = t2.rules, d2 = t2.subRules, c2 = t2.totalSubRules, m2 = t2.dataTypeMap;
|
|
3419
|
-
let u2 =
|
|
3415
|
+
let u2 = on(e2, s3, null, o2, null, null, a2);
|
|
3420
3416
|
return (!a2 && true === u2 || a2 && true === u2.msg) && (d2 || c2) && (u2 = function(e3, t3, o3, l3, r3, n3, i3, a3, s4, d3) {
|
|
3421
3417
|
let c3 = {};
|
|
3422
3418
|
if (o3 && (c3 = JSON.parse(JSON.stringify(o3))), t3) {
|
|
@@ -3425,13 +3421,13 @@
|
|
|
3425
3421
|
const u3 = o4[m3], p2 = t3[u3], h2 = Object.keys(p2);
|
|
3426
3422
|
let f2 = e3[u3];
|
|
3427
3423
|
f2 || (f2 = []);
|
|
3428
|
-
const w2 =
|
|
3424
|
+
const w2 = nn(c3, e3, u3);
|
|
3429
3425
|
if (true !== w2)
|
|
3430
3426
|
return delete c3[u3], d3 ? { msg: w2, listCode: u3 } : w2;
|
|
3431
3427
|
let g2, C2 = [];
|
|
3432
3428
|
s4 && s4[u3] && (g2 = s4[u3].pageSize, C2 = s4[u3].fields || []);
|
|
3433
3429
|
for (let t4 = 0; t4 < f2.length; t4++) {
|
|
3434
|
-
const o5 = f2[t4], s5 =
|
|
3430
|
+
const o5 = f2[t4], s5 = rn(h2, p2, f2[t4], r3, e3, n3, i3, a3, C2);
|
|
3435
3431
|
let c4, m4;
|
|
3436
3432
|
void 0 !== g2 && g2 > 0 && (c4 = Math.ceil((t4 + 1) / g2), m4 = t4 + 1 - (c4 - 1) * g2), Object.keys(s5).forEach((l4) => {
|
|
3437
3433
|
const r4 = s5[l4];
|
|
@@ -3440,22 +3436,22 @@
|
|
|
3440
3436
|
"function" == typeof n4 && false === n4({ row: o5, parent: e3, rowIndex: t4 }) && (s5[l4] = []);
|
|
3441
3437
|
}
|
|
3442
3438
|
});
|
|
3443
|
-
const w3 =
|
|
3439
|
+
const w3 = on(o5, s5, t4, l3, c4, m4, d3);
|
|
3444
3440
|
if (!d3 && true !== w3 || d3 && true !== w3.msg)
|
|
3445
3441
|
return d3 && (w3.listCode = u3), w3;
|
|
3446
3442
|
}
|
|
3447
3443
|
}
|
|
3448
3444
|
}
|
|
3449
3445
|
for (const t4 in c3) {
|
|
3450
|
-
const o4 =
|
|
3446
|
+
const o4 = nn(c3, e3, t4);
|
|
3451
3447
|
if (true !== o4)
|
|
3452
3448
|
return d3 ? { msg: o4, listCode: t4 } : o4;
|
|
3453
3449
|
}
|
|
3454
3450
|
return !d3 || { msg: true };
|
|
3455
3451
|
}(e2, d2, c2, o2, m2, l2, r2, n2, i2, a2)), u2;
|
|
3456
3452
|
}
|
|
3457
|
-
return
|
|
3458
|
-
},
|
|
3453
|
+
return on(e2, t2, null, o2, null, null, a2);
|
|
3454
|
+
}, sn = function(e2, t2, l2, r2, n2, i2) {
|
|
3459
3455
|
void 0 === l2 && (l2 = false);
|
|
3460
3456
|
const a2 = {}, s2 = {}, d2 = {}, c2 = {};
|
|
3461
3457
|
return e2 && e2.forEach((e3) => {
|
|
@@ -3479,26 +3475,26 @@
|
|
|
3479
3475
|
if (d3.name = s3, s3.indexOf(".") > 0) {
|
|
3480
3476
|
if (void 0 !== a3 && null === a3 && 0 === a3.length) {
|
|
3481
3477
|
const e5 = a3[0];
|
|
3482
|
-
|
|
3478
|
+
tn(d3, t3[i3], e5, l3, r3);
|
|
3483
3479
|
}
|
|
3484
3480
|
} else
|
|
3485
|
-
t3[i3][s3] =
|
|
3486
|
-
}(e3, c2, t2, l2, s2) :
|
|
3481
|
+
t3[i3][s3] = Yr(d3, r3);
|
|
3482
|
+
}(e3, c2, t2, l2, s2) : tn(e3, a2, t2, l2, s2);
|
|
3487
3483
|
else if (0 === m3.indexOf("$")) {
|
|
3488
3484
|
const t3 = m3.substring(m3.indexOf("$") + 1);
|
|
3489
3485
|
d2[t3] = { required: true, message: h().t("workflowEditorMessage.subTableMustInputDatas", { subTable: e3.label }) };
|
|
3490
3486
|
} else
|
|
3491
|
-
o2 =
|
|
3487
|
+
o2 = Yr(e3, s2), a2[m3] = o2;
|
|
3492
3488
|
}
|
|
3493
3489
|
}
|
|
3494
3490
|
}
|
|
3495
3491
|
}), Object.keys(c2).length > 0 || Object.keys(d2).length > 0 ? { rules: a2, subRules: c2, totalSubRules: d2, dataTypeMap: s2 } : a2;
|
|
3496
|
-
},
|
|
3497
|
-
e2.config.globalProperties.$formValidator =
|
|
3498
|
-
} },
|
|
3499
|
-
|
|
3492
|
+
}, dn = { install: function(e2, t2) {
|
|
3493
|
+
e2.config.globalProperties.$formValidator = an, e2.config.globalProperties.$getValidator = sn;
|
|
3494
|
+
} }, cn = [ur, vr], mn = function(e2) {
|
|
3495
|
+
mn.installed || (cn.forEach((t2) => {
|
|
3500
3496
|
e2.component(t2.name, t2);
|
|
3501
|
-
}), e2.use(
|
|
3497
|
+
}), e2.use(dn));
|
|
3502
3498
|
};
|
|
3503
|
-
e.WorkflowEditor =
|
|
3499
|
+
e.WorkflowEditor = ur, e.WorkflowHistory = vr, e.wfEditorCn = d, e.wfEditorEn = s, e.wfEditorInstall = mn, e.wfEditorStore = pr, Object.defineProperty(e, Symbol.toStringTag, { value: "Module" });
|
|
3504
3500
|
});
|