workflow-editor 0.0.81-up-tmp2 → 0.0.81-up-tmp5
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 +3477 -3210
- package/dist/style.css +526 -1
- package/es/_virtual/_plugin-vue_export-helper.mjs +6 -6
- package/es/index.mjs +14 -16
- package/es/plugins/formValidatorUtil.mjs +187 -372
- package/es/plugins/index.mjs +5 -7
- package/es/style.css +525 -1
- package/es/workflow-editor/index.mjs +4 -9
- package/lib/_virtual/_plugin-vue_export-helper.cjs +7 -1
- package/lib/index.cjs +8 -1
- package/lib/plugins/formValidatorUtil.cjs +203 -1
- package/lib/plugins/index.cjs +5 -1
- package/lib/style.css +525 -1
- package/lib/workflow-editor/index.cjs +7 -1
- package/package.json +3 -2
- package/vite.config.js +56 -9
- package/es/_virtual/FileSaver.min.mjs +0 -4
- package/es/_virtual/___vite-browser-external.mjs +0 -6
- package/es/_virtual/__vite-browser-external.mjs +0 -4
- package/es/_virtual/_commonjsHelpers.mjs +0 -30
- package/es/_virtual/clipboard.mjs +0 -4
- package/es/_virtual/dayjs.min.mjs +0 -4
- package/es/_virtual/index.mjs +0 -4
- package/es/_virtual/nprogress.mjs +0 -4
- package/es/_virtual/prism.mjs +0 -4
- package/es/_virtual/sax.mjs +0 -4
- package/es/_virtual/string_decoder.mjs +0 -4
- package/es/_virtual/tinymce.mjs +0 -4
- package/es/_virtual/weekOfYear.mjs +0 -4
- package/lib/_virtual/FileSaver.min.cjs +0 -1
- package/lib/_virtual/___vite-browser-external.cjs +0 -1
- package/lib/_virtual/__vite-browser-external.cjs +0 -1
- package/lib/_virtual/_commonjsHelpers.cjs +0 -1
- package/lib/_virtual/clipboard.cjs +0 -1
- package/lib/_virtual/dayjs.min.cjs +0 -1
- package/lib/_virtual/index.cjs +0 -1
- package/lib/_virtual/nprogress.cjs +0 -1
- package/lib/_virtual/prism.cjs +0 -1
- package/lib/_virtual/sax.cjs +0 -1
- package/lib/_virtual/string_decoder.cjs +0 -1
- package/lib/_virtual/tinymce.cjs +0 -1
- package/lib/_virtual/weekOfYear.cjs +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
for (const [
|
|
4
|
-
|
|
5
|
-
return
|
|
1
|
+
const t = (t2, o) => {
|
|
2
|
+
const c = t2.__vccOpts || t2;
|
|
3
|
+
for (const [t3, s] of o)
|
|
4
|
+
c[t3] = s;
|
|
5
|
+
return c;
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
t as default
|
|
9
9
|
};
|
package/es/index.mjs
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import o from "./workflow-editor/index.mjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { default as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
r.component(t.name, t);
|
|
11
|
-
}), r.use(f));
|
|
2
|
+
import { default as default2 } from "./workflow-editor/src/store/workflow-editor.mjs";
|
|
3
|
+
import r from "./plugins/index.mjs";
|
|
4
|
+
import { default as default3 } from "./src/i18n/langs/cn.mjs";
|
|
5
|
+
import { default as default4 } from "./src/i18n/langs/en.mjs";
|
|
6
|
+
const t = o.WorkflowEditor, e = o.WorkflowHistory, s = [t, e], f = function(o2) {
|
|
7
|
+
f.installed || (s.forEach((r2) => {
|
|
8
|
+
o2.component(r2.name, r2);
|
|
9
|
+
}), o2.use(r));
|
|
12
10
|
};
|
|
13
11
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
t as WorkflowEditor,
|
|
13
|
+
e as WorkflowHistory,
|
|
14
|
+
default3 as wfEditorCn,
|
|
15
|
+
default4 as wfEditorEn,
|
|
16
|
+
f as wfEditorInstall,
|
|
17
|
+
default2 as wfEditorStore
|
|
20
18
|
};
|
|
@@ -1,391 +1,206 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getI18n as
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import "../node_modules/agilebuilder-ui/es/department-user-tree-inline/index.mjs";
|
|
15
|
-
import "../node_modules/agilebuilder-ui/es/workgroup-tree-inline/index.mjs";
|
|
16
|
-
import "../node_modules/agilebuilder-ui/es/workgroup-user-tree-inline/index.mjs";
|
|
17
|
-
import "../node_modules/agilebuilder-ui/es/workflow-button/index.mjs";
|
|
18
|
-
import "../node_modules/agilebuilder-ui/es/workflow-history-list/index.mjs";
|
|
19
|
-
import "../node_modules/agilebuilder-ui/es/valid-code/index.mjs";
|
|
20
|
-
import "vue";
|
|
21
|
-
import "../node_modules/js-cookie/dist/js.cookie.mjs";
|
|
22
|
-
import "../node_modules/agilebuilder-ui/es/src/utils/request.mjs";
|
|
23
|
-
import "../node_modules/agilebuilder-ui/es/src/i18n/i18n.mjs";
|
|
24
|
-
import { parseSubTablePermissionCondition as $ } from "../node_modules/agilebuilder-ui/es/src/utils/calculator/calculator-util.mjs";
|
|
25
|
-
import "../node_modules/agilebuilder-ui/es/super-grid/src/formatter.mjs";
|
|
26
|
-
import "../node_modules/agilebuilder-ui/es/remove-user/index.mjs";
|
|
27
|
-
import "../node_modules/agilebuilder-ui/es/remove-department/index.mjs";
|
|
28
|
-
import "../node_modules/agilebuilder-ui/es/remove-workgroup/index.mjs";
|
|
29
|
-
import "../node_modules/agilebuilder-ui/es/organization-input/index.mjs";
|
|
30
|
-
import "../node_modules/agilebuilder-ui/es/super-nine-grid/index.mjs";
|
|
31
|
-
import "../node_modules/agilebuilder-ui/es/dynamic-source-select/index.mjs";
|
|
32
|
-
import "../node_modules/agilebuilder-ui/es/fs-upload/index.mjs";
|
|
33
|
-
import "../node_modules/agilebuilder-ui/es/scan-code-input/index.mjs";
|
|
34
|
-
import "../node_modules/agilebuilder-ui/es/fs-preview/index.mjs";
|
|
35
|
-
import "../node_modules/agilebuilder-ui/es/fs-upload-list/index.mjs";
|
|
36
|
-
import "../node_modules/agilebuilder-ui/es/year-range-picker/index.mjs";
|
|
37
|
-
import "../node_modules/agilebuilder-ui/es/multipart-upload/index.mjs";
|
|
38
|
-
import "../node_modules/agilebuilder-ui/es/rich-editor/index.mjs";
|
|
39
|
-
import "../node_modules/agilebuilder-ui/es/secret-info/index.mjs";
|
|
40
|
-
import "../node_modules/agilebuilder-ui/es/IntervalSelection/index.mjs";
|
|
41
|
-
import "../node_modules/agilebuilder-ui/es/department-tree-mobile/index.mjs";
|
|
42
|
-
import "../node_modules/agilebuilder-ui/es/department-user-tree-mobile/index.mjs";
|
|
43
|
-
import "../node_modules/agilebuilder-ui/es/super-icon/index.mjs";
|
|
44
|
-
import "../node_modules/agilebuilder-ui/es/fs-upload-new/index.mjs";
|
|
45
|
-
import "../node_modules/agilebuilder-ui/es/scan-code-input-browser/index.mjs";
|
|
46
|
-
import "../node_modules/agilebuilder-ui/es/workgroup-tree-mobile/index.mjs";
|
|
47
|
-
import "../node_modules/agilebuilder-ui/es/row-form/index.mjs";
|
|
48
|
-
import "../node_modules/agilebuilder-ui/es/src/components/Affix/index.vue.mjs";
|
|
49
|
-
import "../node_modules/agilebuilder-ui/es/chat-embed/index.mjs";
|
|
50
|
-
import "../node_modules/agilebuilder-ui/es/chat-embed/src/voice/index.mjs";
|
|
51
|
-
import "../node_modules/agilebuilder-ui/es/date-picker-range/index.mjs";
|
|
52
|
-
import "../node_modules/agilebuilder-ui/es/src/components/Card/index.mjs";
|
|
53
|
-
import "../node_modules/agilebuilder-ui/es/src/components/Scrollbar/index.vue.mjs";
|
|
54
|
-
import "../node_modules/agilebuilder-ui/es/src/router/index.mjs";
|
|
55
|
-
import "../node_modules/agilebuilder-ui/es/src/utils/eventBus.mjs";
|
|
56
|
-
import "../node_modules/agilebuilder-ui/es/src/utils/local-storage.mjs";
|
|
57
|
-
import "../node_modules/nprogress/nprogress.css.mjs";
|
|
58
|
-
import "../node_modules/agilebuilder-ui/es/src/views/dsc-component/Sidebar/index.vue.mjs";
|
|
59
|
-
import "../node_modules/agilebuilder-ui/es/src/views/dsc-component/tabs/tab-content.vue.mjs";
|
|
60
|
-
import "../node_modules/agilebuilder-ui/es/src/views/layout/EmptyLayout.vue.mjs";
|
|
61
|
-
import "../node_modules/agilebuilder-ui/es/src/views/layout/Layout.vue.mjs";
|
|
62
|
-
import "../node_modules/agilebuilder-ui/es/src/views/layout/NewLayout.vue.mjs";
|
|
63
|
-
import "../node_modules/agilebuilder-ui/es/src/views/layout/components/Menubar/index.vue.mjs";
|
|
64
|
-
import "../node_modules/agilebuilder-ui/es/src/permission.mjs";
|
|
65
|
-
import "../node_modules/agilebuilder-ui/es/breadcrumb/src/breadcrumb.vue.mjs";
|
|
66
|
-
import "../node_modules/agilebuilder-ui/es/department-tree/src/department-tree.vue.mjs";
|
|
67
|
-
import "../node_modules/agilebuilder-ui/es/hamburger/src/hamburger.vue.mjs";
|
|
68
|
-
import "../node_modules/agilebuilder-ui/es/svg-icon/src/svg-icon.vue.mjs";
|
|
69
|
-
import "../node_modules/agilebuilder-ui/es/super-grid/src/super-grid.vue.mjs";
|
|
70
|
-
import "../node_modules/agilebuilder-ui/es/department-user-tree/src/department-user-tree.vue.mjs";
|
|
71
|
-
import "../node_modules/agilebuilder-ui/es/workgroup-tree/src/workgroup-tree.vue.mjs";
|
|
72
|
-
import "../node_modules/agilebuilder-ui/es/workgroup-user-tree/src/workgroup-user-tree.vue.mjs";
|
|
73
|
-
import "../node_modules/agilebuilder-ui/es/department-tree-inline/src/department-tree-inline.vue.mjs";
|
|
74
|
-
import "../node_modules/agilebuilder-ui/es/department-user-tree-inline/src/department-user-tree-inline.vue.mjs";
|
|
75
|
-
import "../node_modules/agilebuilder-ui/es/workgroup-tree-inline/src/workgroup-tree-inline.vue.mjs";
|
|
76
|
-
import "../node_modules/agilebuilder-ui/es/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue.mjs";
|
|
77
|
-
import "../node_modules/agilebuilder-ui/es/workflow-button/src/workflow-button.vue.mjs";
|
|
78
|
-
import "../node_modules/agilebuilder-ui/es/workflow-history-list/src/workflow-history-list.vue.mjs";
|
|
79
|
-
import "../node_modules/agilebuilder-ui/es/valid-code/src/valid-code.vue.mjs";
|
|
80
|
-
import "../node_modules/agilebuilder-ui/es/remove-user/src/remove-user.vue.mjs";
|
|
81
|
-
import "../node_modules/agilebuilder-ui/es/remove-department/src/remove-department.vue.mjs";
|
|
82
|
-
import "../node_modules/agilebuilder-ui/es/remove-workgroup/src/remove-workgroup.vue.mjs";
|
|
83
|
-
import "../node_modules/agilebuilder-ui/es/organization-input/src/organization-input.vue.mjs";
|
|
84
|
-
import "../node_modules/agilebuilder-ui/es/super-nine-grid/src/super-nine-grid.vue.mjs";
|
|
85
|
-
import "../node_modules/agilebuilder-ui/es/dynamic-source-select/src/dynamic-source-select.vue.mjs";
|
|
86
|
-
import "../node_modules/agilebuilder-ui/es/fs-upload/src/fs-upload.vue.mjs";
|
|
87
|
-
import "../node_modules/agilebuilder-ui/es/scan-code-input/src/scan-code-input.vue.mjs";
|
|
88
|
-
import "../node_modules/agilebuilder-ui/es/fs-preview/src/fs-preview.vue.mjs";
|
|
89
|
-
import "../node_modules/agilebuilder-ui/es/fs-upload-list/src/fs-upload-list.vue.mjs";
|
|
90
|
-
import "../node_modules/agilebuilder-ui/es/year-range-picker/src/year-range-picker.vue.mjs";
|
|
91
|
-
import "../node_modules/agilebuilder-ui/es/multipart-upload/src/index.vue.mjs";
|
|
92
|
-
import "../node_modules/agilebuilder-ui/es/rich-editor/index.vue.mjs";
|
|
93
|
-
import "../node_modules/agilebuilder-ui/es/secret-info/index.vue.mjs";
|
|
94
|
-
import "../node_modules/agilebuilder-ui/es/IntervalSelection/src/sectionDate.vue.mjs";
|
|
95
|
-
import "../node_modules/agilebuilder-ui/es/department-tree-mobile/src/department-tree-app.vue.mjs";
|
|
96
|
-
import "../node_modules/agilebuilder-ui/es/department-user-tree-mobile/src/department-user-tree-app.vue.mjs";
|
|
97
|
-
import "../node_modules/agilebuilder-ui/es/super-icon/src/index.vue.mjs";
|
|
98
|
-
import "../node_modules/agilebuilder-ui/es/fs-upload-new/src/fs-upload-new.vue.mjs";
|
|
99
|
-
import "../node_modules/agilebuilder-ui/es/scan-code-input-browser/src/scan-code-input.vue.mjs";
|
|
100
|
-
import "../node_modules/agilebuilder-ui/es/workgroup-tree-mobile/src/workgroup-tree-app.vue.mjs";
|
|
101
|
-
import "../node_modules/agilebuilder-ui/es/row-form/index.vue.mjs";
|
|
102
|
-
import "../node_modules/agilebuilder-ui/es/chat-embed/src/index.vue.mjs";
|
|
103
|
-
import "../node_modules/agilebuilder-ui/es/chat-embed/src/voice/js/crypto-js.mjs";
|
|
104
|
-
import "../node_modules/agilebuilder-ui/es/chat-embed/src/voice/js/processor/index.umd.mjs";
|
|
105
|
-
import "../node_modules/agilebuilder-ui/es/date-picker-range/index.vue.mjs";
|
|
106
|
-
function R(e, r) {
|
|
107
|
-
const t = {}, o = e.dataType;
|
|
108
|
-
return o === "DATE" || o === "TIME" ? (t.type = "date", A(t), t.message = e.label + " " + E().t("workflowEditorMessage.requiredAndMustBeADate")) : o === "INTEGER" || o === "LONG" ? (t.pattern = /^-?\d+$/, t.message = e.label + " " + E().t("workflowEditorMessage.requiredAndMustBeAnInteger")) : o === "FLOAT" || o === "DOUBLE" ? (t.pattern = new RegExp("^(-?\\d+)(\\.\\d+)?$"), t.message = e.label + " " + E().t("workflowEditorMessage.requiredAndMustBeDecimal")) : o === "BOOLEAN" ? (t.type = "boolean", t.message = e.label + " " + E().t("workflowEditorMessage.mustFill"), A(t)) : t.message = e.label + " " + E().t("workflowEditorMessage.mustFill"), e.canEdit && (t.required = !0, t.trigger = "blur"), e.rowIndexes && (t.rowIndexes = e.rowIndexes), e.condition && (t.condition = e.condition), r[e.name] = e.dataType, t;
|
|
109
|
-
}
|
|
110
|
-
function A(e) {
|
|
111
|
-
e && e.type && e.type === "boolean" ? e.validator = function(r, t, o) {
|
|
112
|
-
return t == null ? !r.required : typeof t == "number" && (t === 1 || t === 0) ? !0 : typeof t == "boolean" && (t === !0 || t === !1);
|
|
113
|
-
} : e && e.type && e.type === "date" && (e.validator = function(r, t, o) {
|
|
114
|
-
if (t == null)
|
|
115
|
-
return !r.required;
|
|
1
|
+
import e from "../node_modules/async-validator/dist-web/index.mjs";
|
|
2
|
+
import { getI18n as t } from "../workflow-editor/src/util.mjs";
|
|
3
|
+
import { parseSubTablePermissionCondition as n } from "agilebuilder-ui";
|
|
4
|
+
function o(e2, n2) {
|
|
5
|
+
const o2 = {}, r2 = e2.dataType;
|
|
6
|
+
return "DATE" === r2 || "TIME" === r2 ? (o2.type = "date", i(o2), o2.message = e2.label + " " + t().t("workflowEditorMessage.requiredAndMustBeADate")) : "INTEGER" === r2 || "LONG" === r2 ? (o2.pattern = /^-?\d+$/, o2.message = e2.label + " " + t().t("workflowEditorMessage.requiredAndMustBeAnInteger")) : "FLOAT" === r2 || "DOUBLE" === r2 ? (o2.pattern = new RegExp("^(-?\\d+)(\\.\\d+)?$"), o2.message = e2.label + " " + t().t("workflowEditorMessage.requiredAndMustBeDecimal")) : "BOOLEAN" === r2 ? (o2.type = "boolean", o2.message = e2.label + " " + t().t("workflowEditorMessage.mustFill"), i(o2)) : o2.message = e2.label + " " + t().t("workflowEditorMessage.mustFill"), e2.canEdit && (o2.required = true, o2.trigger = "blur"), e2.rowIndexes && (o2.rowIndexes = e2.rowIndexes), e2.condition && (o2.condition = e2.condition), n2[e2.name] = e2.dataType, o2;
|
|
7
|
+
}
|
|
8
|
+
function i(e2) {
|
|
9
|
+
e2 && e2.type && "boolean" === e2.type ? e2.validator = function(e3, t2, n2) {
|
|
10
|
+
return null == t2 ? !e3.required : "number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2);
|
|
11
|
+
} : e2 && e2.type && "date" === e2.type && (e2.validator = function(e3, t2, n2) {
|
|
12
|
+
if (null == t2)
|
|
13
|
+
return !e3.required;
|
|
116
14
|
{
|
|
117
|
-
const
|
|
118
|
-
return !isNaN(
|
|
15
|
+
const e4 = new Date(t2);
|
|
16
|
+
return !isNaN(e4.getTime());
|
|
119
17
|
}
|
|
120
18
|
});
|
|
121
19
|
}
|
|
122
|
-
function
|
|
123
|
-
|
|
124
|
-
let
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
for (let l = 0; l < u.length; l++) {
|
|
128
|
-
const s = u[l];
|
|
129
|
-
let p;
|
|
130
|
-
if (l === u.length - 1)
|
|
131
|
-
p = z(i, u, s), p.fields[s] = R(e, o);
|
|
132
|
-
else {
|
|
133
|
-
let a;
|
|
134
|
-
l === 0 ? p = r : (a = K(i, u, u[l - 1]), p = a.fields), p[s] || (p[s] = {
|
|
135
|
-
type: "object",
|
|
136
|
-
required: !0,
|
|
137
|
-
fields: {}
|
|
138
|
-
}), l === 0 ? i[s] = p[s] : a.fields[s] = p[s];
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
function K(e, r, t) {
|
|
143
|
-
let o;
|
|
144
|
-
for (let i = 0; i < r.length; i++) {
|
|
145
|
-
const n = r[i];
|
|
146
|
-
if (i === 0 ? o = e[n] : o = o.fields[r[i]], n === t)
|
|
20
|
+
function r(e2, t2, n2) {
|
|
21
|
+
let o2;
|
|
22
|
+
for (let i2 = 0; i2 < t2.length; i2++) {
|
|
23
|
+
const r2 = t2[i2];
|
|
24
|
+
if (o2 = 0 === i2 ? e2[r2] : o2.fields[t2[i2]], r2 === n2)
|
|
147
25
|
break;
|
|
148
26
|
}
|
|
149
|
-
return
|
|
150
|
-
}
|
|
151
|
-
function
|
|
152
|
-
let
|
|
153
|
-
for (let
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
n
|
|
176
|
-
), d != null && d === !0) {
|
|
177
|
-
let y = {};
|
|
178
|
-
if (f.indexOf(".") > 0)
|
|
179
|
-
f.indexOf("$") === 0 ? Z(m, p, r, t, l) : I(m, u, r, t, l);
|
|
180
|
-
else if (f.indexOf("$") === 0) {
|
|
181
|
-
const w = f.substring(f.indexOf("$") + 1);
|
|
182
|
-
s[w] = {
|
|
183
|
-
required: !0,
|
|
184
|
-
message: E().t("workflowEditorMessage.subTableMustInputDatas", {
|
|
185
|
-
subTable: m.label
|
|
186
|
-
})
|
|
187
|
-
};
|
|
188
|
-
} else
|
|
189
|
-
y = R(m, l), u[f] = y;
|
|
27
|
+
return o2;
|
|
28
|
+
}
|
|
29
|
+
function s(e2, t2, n2) {
|
|
30
|
+
let o2;
|
|
31
|
+
for (let i2 = 0; i2 < t2.length; i2++)
|
|
32
|
+
if (o2 = 0 === i2 ? e2[t2[i2]] : o2.fields[t2[i2]], i2 !== t2.length - 1) {
|
|
33
|
+
if (t2[i2 + 1] === n2)
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
return o2;
|
|
37
|
+
}
|
|
38
|
+
function l(e2, t2, n2, i2, l2) {
|
|
39
|
+
let d2 = e2.name;
|
|
40
|
+
const f2 = d2.substring(0, d2.indexOf("."));
|
|
41
|
+
if (n2) {
|
|
42
|
+
n2[f2] || (n2[f2] = {});
|
|
43
|
+
const i3 = n2[f2];
|
|
44
|
+
(function(e3, t3) {
|
|
45
|
+
if (e3.indexOf(".") > 0) {
|
|
46
|
+
let n3 = t3;
|
|
47
|
+
const o2 = e3.split(".");
|
|
48
|
+
for (let e4 = 0; e4 < o2.length - 1; e4++) {
|
|
49
|
+
const t4 = o2[e4];
|
|
50
|
+
if (!n3 || !n3[t4])
|
|
51
|
+
return false;
|
|
52
|
+
n3 = n3[t4];
|
|
190
53
|
}
|
|
54
|
+
return true;
|
|
191
55
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
U(s, l) && B(e, r, o, i);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
function U(e, r) {
|
|
211
|
-
if (e.indexOf(".") > 0) {
|
|
212
|
-
let t = r;
|
|
213
|
-
const o = e.split(".");
|
|
214
|
-
for (let i = 0; i < o.length - 1; i++) {
|
|
215
|
-
const n = o[i];
|
|
216
|
-
if (!t || !t[n])
|
|
217
|
-
return !1;
|
|
218
|
-
t = t[n];
|
|
219
|
-
}
|
|
220
|
-
return !0;
|
|
221
|
-
} else
|
|
222
|
-
return !0;
|
|
223
|
-
}
|
|
224
|
-
function Z(e, r, t, o, i) {
|
|
225
|
-
let n = e.name;
|
|
226
|
-
o === !0 && (n = n);
|
|
227
|
-
const u = n.substring(n.indexOf("$") + 1, n.indexOf("."));
|
|
228
|
-
if (!t)
|
|
229
|
-
return;
|
|
230
|
-
const l = t[u], s = n.substring(n.indexOf(".") + 1);
|
|
231
|
-
r[u] || (r[u] = {});
|
|
232
|
-
const p = JSON.parse(JSON.stringify(e));
|
|
233
|
-
if (p.name = s, s.indexOf(".") > 0) {
|
|
234
|
-
if (typeof l < "u" && l === null && l.length === 0) {
|
|
235
|
-
const a = l[0];
|
|
236
|
-
I(p, r[u], a, o, i);
|
|
237
|
-
}
|
|
238
|
-
} else
|
|
239
|
-
r[u][s] = R(p, i);
|
|
240
|
-
}
|
|
241
|
-
function D(e, r, t, o, i, n, u) {
|
|
242
|
-
return J(e, r, t, !0, o, i, n, u);
|
|
243
|
-
}
|
|
244
|
-
function J(e, r, t, o, i, n, u, l) {
|
|
245
|
-
let s = !1;
|
|
246
|
-
const p = new S(r);
|
|
247
|
-
let a;
|
|
248
|
-
if (p.validate(
|
|
249
|
-
e,
|
|
250
|
-
{
|
|
251
|
-
first: !0
|
|
252
|
-
},
|
|
253
|
-
(m, c) => {
|
|
254
|
-
if (m) {
|
|
255
|
-
const f = m[0].message;
|
|
256
|
-
a = m[0].field, typeof t < "u" && t !== null ? n !== void 0 && u !== void 0 ? s = E().t("workflowEditorMessage.pageRecordLine", {
|
|
257
|
-
pageNum: n,
|
|
258
|
-
row: u
|
|
259
|
-
}) + "," + f : s = E().t("workflowEditorMessage.recordLine", {
|
|
260
|
-
row: t + 1
|
|
261
|
-
}) + "," + f : s = f;
|
|
262
|
-
} else
|
|
263
|
-
s = !0;
|
|
264
|
-
if (a && o === !0 && i !== void 0 && i === !0 && /[A-Z]+/.test(a) && e[a.toLowerCase()] !== void 0) {
|
|
265
|
-
const g = JSON.parse(JSON.stringify(e));
|
|
266
|
-
g[a.toUpperCase()] = e[a.toLowerCase()], delete g[a.toLowerCase()], s = J(g, r, t, !1, i, n, u);
|
|
56
|
+
return true;
|
|
57
|
+
})(d2.substring(d2.indexOf(".") + 1), i3) && function(e3, t3, n3, i4) {
|
|
58
|
+
const l3 = {};
|
|
59
|
+
let d3 = e3.name;
|
|
60
|
+
t3 || (t3 = {});
|
|
61
|
+
const f3 = d3.split(".");
|
|
62
|
+
for (let n4 = 0; n4 < f3.length; n4++) {
|
|
63
|
+
const d4 = f3[n4];
|
|
64
|
+
let u2;
|
|
65
|
+
if (n4 === f3.length - 1)
|
|
66
|
+
u2 = s(l3, f3, d4), u2.fields[d4] = o(e3, i4);
|
|
67
|
+
else {
|
|
68
|
+
let e4;
|
|
69
|
+
0 === n4 ? u2 = t3 : (e4 = r(l3, f3, f3[n4 - 1]), u2 = e4.fields), u2[d4] || (u2[d4] = { type: "object", required: true, fields: {} }), 0 === n4 ? l3[d4] = u2[d4] : e4.fields[d4] = u2[d4];
|
|
70
|
+
}
|
|
267
71
|
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
let m = { msg: s, field: a };
|
|
271
|
-
return n !== void 0 && u !== void 0 ? (m.pageNum = n, m.rowIndex = u) : m.rowIndex = t, m;
|
|
272
|
-
} else
|
|
273
|
-
return s;
|
|
72
|
+
}(e2, t2, 0, l2);
|
|
73
|
+
}
|
|
274
74
|
}
|
|
275
|
-
function
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
if (
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
s && s[f] && (w = s[f].pageSize, T = s[f].fields || []);
|
|
292
|
-
for (let O = 0; O < d.length; O++) {
|
|
293
|
-
const V = d[O], x = N(
|
|
294
|
-
b,
|
|
295
|
-
g,
|
|
296
|
-
d[O],
|
|
297
|
-
i,
|
|
298
|
-
e,
|
|
299
|
-
n,
|
|
300
|
-
u,
|
|
301
|
-
l,
|
|
302
|
-
T
|
|
303
|
-
);
|
|
304
|
-
console.log("formValidator666--rowRule=", x);
|
|
305
|
-
let j, L;
|
|
306
|
-
w !== void 0 && w > 0 && (j = Math.ceil((O + 1) / w), L = O + 1 - (j - 1) * w), Object.keys(x).forEach((M) => {
|
|
307
|
-
const k = x[M];
|
|
308
|
-
if (k && k.rules && (x[M] = k.rules), k && k.beforeValidate) {
|
|
309
|
-
const P = k.beforeValidate;
|
|
310
|
-
typeof P == "function" && P({
|
|
311
|
-
row: V,
|
|
312
|
-
parent: e,
|
|
313
|
-
rowIndex: O
|
|
314
|
-
}) === !1 && (x[M] = []);
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
const h = D(V, x, O, o, j, L, p);
|
|
318
|
-
if (!p && h !== !0 || p && h.msg !== !0)
|
|
319
|
-
return p && (h.listCode = f), h;
|
|
75
|
+
function d(e2, t2, n2, o2, i2, r2, s2) {
|
|
76
|
+
return f(e2, t2, n2, true, o2, i2, r2, s2);
|
|
77
|
+
}
|
|
78
|
+
function f(n2, o2, i2, r2, s2, l2, d2, u2) {
|
|
79
|
+
let a2 = false;
|
|
80
|
+
let c2;
|
|
81
|
+
if (new e(o2).validate(n2, { first: true }, (e2, u3) => {
|
|
82
|
+
if (e2) {
|
|
83
|
+
const n3 = e2[0].message;
|
|
84
|
+
c2 = e2[0].field, a2 = null != i2 ? void 0 !== l2 && void 0 !== d2 ? t().t("workflowEditorMessage.pageRecordLine", { pageNum: l2, row: d2 }) + "," + n3 : t().t("workflowEditorMessage.recordLine", { row: i2 + 1 }) + "," + n3 : n3;
|
|
85
|
+
} else
|
|
86
|
+
a2 = true;
|
|
87
|
+
if (c2 && true === r2) {
|
|
88
|
+
if (void 0 !== s2 && true === s2 && /[A-Z]+/.test(c2) && void 0 !== n2[c2.toLowerCase()]) {
|
|
89
|
+
const e3 = JSON.parse(JSON.stringify(n2));
|
|
90
|
+
e3[c2.toUpperCase()] = n2[c2.toLowerCase()], delete e3[c2.toLowerCase()], a2 = f(e3, o2, i2, false, s2, l2, d2);
|
|
320
91
|
}
|
|
321
92
|
}
|
|
93
|
+
}), u2) {
|
|
94
|
+
let e2 = { msg: a2, field: c2 };
|
|
95
|
+
return void 0 !== l2 && void 0 !== d2 ? (e2.pageNum = l2, e2.rowIndex = d2) : e2.rowIndex = i2, e2;
|
|
322
96
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
return e.id;
|
|
333
|
-
if (e && e.ID)
|
|
334
|
-
return e.ID;
|
|
335
|
-
}
|
|
336
|
-
function N(e, r, t, o, i, n, u, l, s) {
|
|
337
|
-
const p = H(t), a = {};
|
|
338
|
-
for (let m = 0; m < e.length; m++) {
|
|
339
|
-
const c = e[m];
|
|
340
|
-
if (s.indexOf(c) < 0)
|
|
97
|
+
return a2;
|
|
98
|
+
}
|
|
99
|
+
function u(e2, t2, o2, i2, r2, s2, l2, d2, f2) {
|
|
100
|
+
const u2 = function(e3) {
|
|
101
|
+
return e3 && e3.id ? e3.id : e3 && e3.ID ? e3.ID : void 0;
|
|
102
|
+
}(o2), a2 = {};
|
|
103
|
+
for (let c2 = 0; c2 < e2.length; c2++) {
|
|
104
|
+
const g = e2[c2];
|
|
105
|
+
if (f2.indexOf(g) < 0)
|
|
341
106
|
continue;
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
t,
|
|
347
|
-
n,
|
|
348
|
-
u,
|
|
349
|
-
l
|
|
350
|
-
);
|
|
351
|
-
if (b != null && b === !0)
|
|
352
|
-
if (p === void 0)
|
|
353
|
-
a[c] = f;
|
|
107
|
+
const b = t2[g], m = b.condition, p = n(m, i2, r2, o2, s2, l2, d2);
|
|
108
|
+
if (null != p && true === p)
|
|
109
|
+
if (void 0 === u2)
|
|
110
|
+
a2[g] = b;
|
|
354
111
|
else {
|
|
355
|
-
const
|
|
356
|
-
(!
|
|
112
|
+
const e3 = b.rowIndexes;
|
|
113
|
+
(!e3 || e3.indexOf(u2) >= 0) && (a2[g] = b);
|
|
357
114
|
}
|
|
358
115
|
}
|
|
359
|
-
return
|
|
360
|
-
}
|
|
361
|
-
function
|
|
362
|
-
let
|
|
363
|
-
return
|
|
364
|
-
}
|
|
365
|
-
function
|
|
366
|
-
const
|
|
367
|
-
if (
|
|
368
|
-
const
|
|
369
|
-
let
|
|
370
|
-
return (!
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
116
|
+
return a2;
|
|
117
|
+
}
|
|
118
|
+
function a(e2, t2, n2) {
|
|
119
|
+
let o2 = t2[n2];
|
|
120
|
+
return o2 || (o2 = []), 0 !== o2.length || !e2 || !e2[n2] || void 0 === e2[n2].required || true !== e2[n2].required || e2[n2].message;
|
|
121
|
+
}
|
|
122
|
+
const c = { formValidator: function(e2, t2, n2, o2, i2, r2, s2, l2) {
|
|
123
|
+
const f2 = Object.keys(t2);
|
|
124
|
+
if (f2.indexOf("rules") >= 0 && f2.indexOf("subRules") >= 0 && f2.indexOf("totalSubRules") >= 0) {
|
|
125
|
+
const f3 = t2.rules, c2 = t2.subRules, g = t2.totalSubRules, b = t2.dataTypeMap;
|
|
126
|
+
let m = d(e2, f3, null, n2, null, null, l2);
|
|
127
|
+
return (!l2 && true === m || l2 && true === m.msg) && (c2 || g) && (m = function(e3, t3, n3, o3, i3, r3, s3, l3, f4, c3) {
|
|
128
|
+
let g2 = {};
|
|
129
|
+
if (n3 && (g2 = JSON.parse(JSON.stringify(n3))), t3) {
|
|
130
|
+
const n4 = Object.keys(t3);
|
|
131
|
+
for (let b2 = 0; b2 < n4.length; b2++) {
|
|
132
|
+
const m2 = n4[b2], p = t3[m2], w = Object.keys(p);
|
|
133
|
+
let O = e3[m2];
|
|
134
|
+
O || (O = []);
|
|
135
|
+
const x = a(g2, e3, m2);
|
|
136
|
+
if (true !== x)
|
|
137
|
+
return delete g2[m2], c3 ? { msg: x, listCode: m2 } : x;
|
|
138
|
+
let y, E = [];
|
|
139
|
+
f4 && f4[m2] && (y = f4[m2].pageSize, E = f4[m2].fields || []);
|
|
140
|
+
for (let t4 = 0; t4 < O.length; t4++) {
|
|
141
|
+
const n5 = O[t4], f5 = u(w, p, O[t4], i3, e3, r3, s3, l3, E);
|
|
142
|
+
let a2, g3;
|
|
143
|
+
void 0 !== y && y > 0 && (a2 = Math.ceil((t4 + 1) / y), g3 = t4 + 1 - (a2 - 1) * y), Object.keys(f5).forEach((o4) => {
|
|
144
|
+
const i4 = f5[o4];
|
|
145
|
+
if (i4 && i4.rules && (f5[o4] = i4.rules), i4 && i4.beforeValidate) {
|
|
146
|
+
const r4 = i4.beforeValidate;
|
|
147
|
+
"function" == typeof r4 && false === r4({ row: n5, parent: e3, rowIndex: t4 }) && (f5[o4] = []);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
const b3 = d(n5, f5, t4, o3, a2, g3, c3);
|
|
151
|
+
if (!c3 && true !== b3 || c3 && true !== b3.msg)
|
|
152
|
+
return c3 && (b3.listCode = m2), b3;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
for (const t4 in g2) {
|
|
157
|
+
const n4 = a(g2, e3, t4);
|
|
158
|
+
if (true !== n4)
|
|
159
|
+
return c3 ? { msg: n4, listCode: t4 } : n4;
|
|
160
|
+
}
|
|
161
|
+
return !c3 || { msg: true };
|
|
162
|
+
}(e2, c2, g, n2, b, o2, i2, r2, s2, l2)), m;
|
|
163
|
+
}
|
|
164
|
+
return d(e2, t2, null, n2, null, null, l2);
|
|
165
|
+
}, getValidator: function(e2, i2, r2, s2, d2, f2) {
|
|
166
|
+
void 0 === r2 && (r2 = false);
|
|
167
|
+
const u2 = {}, a2 = {}, c2 = {}, g = {};
|
|
168
|
+
return e2 && e2.forEach((e3) => {
|
|
169
|
+
const b = e3.canEdit;
|
|
170
|
+
if (void 0 !== b && true === b) {
|
|
171
|
+
let b2 = e3.name;
|
|
172
|
+
if (b2) {
|
|
173
|
+
const m = e3.condition, p = null;
|
|
174
|
+
let w = null;
|
|
175
|
+
if (w = b2.indexOf(".") > 0 && 0 === b2.indexOf("$") || n(m, a2, p, i2, s2, d2, f2), null != w && true === w) {
|
|
176
|
+
let n2 = {};
|
|
177
|
+
if (b2.indexOf(".") > 0)
|
|
178
|
+
0 === b2.indexOf("$") ? function(e4, t2, n3, i3, r3) {
|
|
179
|
+
let s3 = e4.name;
|
|
180
|
+
const d3 = s3.substring(s3.indexOf("$") + 1, s3.indexOf("."));
|
|
181
|
+
if (!n3)
|
|
182
|
+
return;
|
|
183
|
+
const f3 = n3[d3], u3 = s3.substring(s3.indexOf(".") + 1);
|
|
184
|
+
t2[d3] || (t2[d3] = {});
|
|
185
|
+
const a3 = JSON.parse(JSON.stringify(e4));
|
|
186
|
+
if (a3.name = u3, u3.indexOf(".") > 0) {
|
|
187
|
+
if (void 0 !== f3 && null === f3 && 0 === f3.length) {
|
|
188
|
+
const e5 = f3[0];
|
|
189
|
+
l(a3, t2[d3], e5, i3, r3);
|
|
190
|
+
}
|
|
191
|
+
} else
|
|
192
|
+
t2[d3][u3] = o(a3, r3);
|
|
193
|
+
}(e3, g, i2, r2, a2) : l(e3, u2, i2, r2, a2);
|
|
194
|
+
else if (0 === b2.indexOf("$")) {
|
|
195
|
+
const n3 = b2.substring(b2.indexOf("$") + 1);
|
|
196
|
+
c2[n3] = { required: true, message: t().t("workflowEditorMessage.subTableMustInputDatas", { subTable: e3.label }) };
|
|
197
|
+
} else
|
|
198
|
+
n2 = o(e3, a2), u2[b2] = n2;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}), Object.keys(g).length > 0 || Object.keys(c2).length > 0 ? { rules: u2, subRules: g, totalSubRules: c2, dataTypeMap: a2 } : u2;
|
|
203
|
+
} };
|
|
389
204
|
export {
|
|
390
|
-
|
|
205
|
+
c as default
|
|
391
206
|
};
|