agilebuilder-ui 1.1.65-tmp23 → 1.1.65-tmp24

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.
Files changed (80) hide show
  1. package/dist/index.full.min.js +462 -281
  2. package/dist/style.css +181 -175
  3. package/es/chat-embed/src/chat-sender.vue.mjs +1 -1
  4. package/es/chat-embed/src/chat-sender.vue2.mjs +26 -28
  5. package/es/chat-embed/src/index.vue.mjs +1 -1
  6. package/es/chat-embed/src/index.vue2.mjs +29 -29
  7. package/es/department-tree-mobile/src/department-tree-inline-app.vue.mjs +68 -68
  8. package/es/department-tree-mobile/src/department-tree-service.mjs +20 -18
  9. package/es/department-tree-mobile/src/dept-result.vue.mjs +12 -11
  10. package/es/department-user-tree-inline/src/department-user-single-tree-inline.vue.mjs +3 -3
  11. package/es/department-user-tree-inline/src/department-user-tree-inline.vue.mjs +6 -6
  12. package/es/department-user-tree-inline/src/department-user-tree-single-service.mjs +1 -1
  13. package/es/fs-preview/src/fs-preview.vue.mjs +26 -18
  14. package/es/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.mjs +1 -1
  15. package/es/fs-upload-new/src/file-upload-mobile/file-upload-input.vue.mjs +1 -1
  16. package/es/index.mjs +2 -1
  17. package/es/src/components/Card/index.mjs +34 -31
  18. package/es/src/components/Scrollbar/index.vue.mjs +6 -6
  19. package/es/src/i18n/langs/cn.mjs +1 -1
  20. package/es/src/i18n/langs/en.mjs +1 -1
  21. package/es/src/utils/common-util.mjs +47 -39
  22. package/es/style.css +738 -732
  23. package/es/super-grid/src/apis.mjs +199 -173
  24. package/es/super-grid/src/components/mobile-table-card.mjs +53 -53
  25. package/es/super-grid/src/normal-column-content.vue.mjs +12 -12
  26. package/es/super-grid/src/normal-column.vue.mjs +4 -5
  27. package/es/super-grid/src/search-button.vue.mjs +4 -2
  28. package/es/super-grid/src/search-form-dialog.vue.mjs +22 -11
  29. package/es/super-grid/src/search-form-item.vue.mjs +5 -5
  30. package/es/super-grid/src/search-form-mobile.vue.mjs +19 -19
  31. package/es/super-grid/src/search-form-open.vue.mjs +5 -3
  32. package/es/super-grid/src/search-form-ordinarySearch.vue.mjs +3 -1
  33. package/es/super-grid/src/search-form.vue.mjs +19 -13
  34. package/es/super-grid/src/super-grid.vue.mjs +271 -209
  35. package/es/super-grid/src/utils.mjs +346 -300
  36. package/es/utils/organization.mjs +24 -11
  37. package/lib/chat-embed/src/chat-sender.vue.cjs +1 -1
  38. package/lib/chat-embed/src/chat-sender.vue2.cjs +44 -46
  39. package/lib/chat-embed/src/index.vue.cjs +1 -1
  40. package/lib/chat-embed/src/index.vue2.cjs +14 -14
  41. package/lib/department-tree-mobile/src/department-tree-inline-app.vue.cjs +58 -58
  42. package/lib/department-tree-mobile/src/department-tree-service.cjs +10 -8
  43. package/lib/department-tree-mobile/src/dept-result.vue.cjs +10 -10
  44. package/lib/department-user-tree-inline/src/department-user-single-tree-inline.vue.cjs +16 -16
  45. package/lib/department-user-tree-inline/src/department-user-tree-inline.vue.cjs +5 -5
  46. package/lib/department-user-tree-inline/src/department-user-tree-single-service.cjs +1 -1
  47. package/lib/fs-preview/src/fs-preview.vue.cjs +13 -5
  48. package/lib/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.cjs +1 -1
  49. package/lib/fs-upload-new/src/file-upload-mobile/file-upload-input.vue.cjs +13 -13
  50. package/lib/index.cjs +7 -7
  51. package/lib/src/components/Card/index.cjs +14 -11
  52. package/lib/src/components/Scrollbar/index.vue.cjs +2 -2
  53. package/lib/src/i18n/langs/cn.cjs +1 -1
  54. package/lib/src/i18n/langs/en.cjs +1 -1
  55. package/lib/src/utils/common-util.cjs +24 -17
  56. package/lib/style.css +665 -659
  57. package/lib/super-grid/src/apis.cjs +190 -164
  58. package/lib/super-grid/src/components/mobile-table-card.cjs +37 -37
  59. package/lib/super-grid/src/normal-column-content.vue.cjs +2 -2
  60. package/lib/super-grid/src/normal-column.vue.cjs +10 -11
  61. package/lib/super-grid/src/search-button.vue.cjs +3 -1
  62. package/lib/super-grid/src/search-form-dialog.vue.cjs +19 -8
  63. package/lib/super-grid/src/search-form-item.vue.cjs +2 -2
  64. package/lib/super-grid/src/search-form-mobile.vue.cjs +7 -7
  65. package/lib/super-grid/src/search-form-open.vue.cjs +7 -5
  66. package/lib/super-grid/src/search-form-ordinarySearch.vue.cjs +3 -1
  67. package/lib/super-grid/src/search-form.vue.cjs +15 -10
  68. package/lib/super-grid/src/super-grid.vue.cjs +220 -158
  69. package/lib/super-grid/src/utils.cjs +349 -274
  70. package/lib/utils/organization.cjs +35 -24
  71. package/package.json +1 -1
  72. package/src/components/Card/index.jsx +12 -2
  73. package/src/components/Scrollbar/index.vue +165 -154
  74. package/src/i18n/langs/cn.js +10 -2
  75. package/src/i18n/langs/en.js +10 -2
  76. package/src/styles/index.scss +9 -2
  77. package/src/styles/theme/default.scss +18 -13
  78. package/src/styles/theme/tiffany-blue-mobile/home.scss +44 -1
  79. package/src/utils/auth-api.js +1 -0
  80. package/src/utils/common-util.js +13 -0
@@ -1,298 +1,373 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const e = require("vue"), t = require("../../src/utils/auth.cjs"), o = require("../../src/utils/common-util.cjs"), n = require("../../src/utils/util.cjs"), i = require("./formatter.cjs"), a = require("./store.cjs"), r = require("../../src/utils/calculator/calculator-util.cjs");
4
- function s(e2) {
5
- const t2 = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
6
- if (e2) {
7
- for (const o2 in e2)
8
- if ("default" !== o2) {
9
- const n2 = Object.getOwnPropertyDescriptor(e2, o2);
10
- Object.defineProperty(t2, o2, n2.get ? n2 : { enumerable: true, get: () => e2[o2] });
3
+ const Vue = require("vue"), auth = require("../../src/utils/auth.cjs"), commonUtil = require("../../src/utils/common-util.cjs"), util = require("../../src/utils/util.cjs"), formatter = require("./formatter.cjs"), store = require("./store.cjs"), calculatorUtil = require("../../src/utils/calculator/calculator-util.cjs");
4
+ function _interopNamespaceDefault(e) {
5
+ const t = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
6
+ if (e) {
7
+ for (const o in e)
8
+ if ("default" !== o) {
9
+ const n = Object.getOwnPropertyDescriptor(e, o);
10
+ Object.defineProperty(t, o, n.get ? n : { enumerable: true, get: () => e[o] });
11
11
  }
12
12
  }
13
- return t2.default = e2, Object.freeze(t2);
14
- }
15
- const l = s(e);
16
- const u = { getIndex(e2) {
17
- let t2 = 0;
18
- for (const o2 of a.columns) {
19
- if (o2.prop === e2)
20
- return t2;
21
- t2++;
13
+ return t.default = e, Object.freeze(t);
14
+ }
15
+ const Vue__namespace = _interopNamespaceDefault(Vue);
16
+ function getColumnValues(e, t) {
17
+ const o = [];
18
+ for (const n of e)
19
+ o.push(n[t]);
20
+ return o;
21
+ }
22
+ function getSpanValuesForColumn(e, t, o) {
23
+ const n = [];
24
+ let i = 0;
25
+ for (let a = 0; a < e.length; a++)
26
+ if (0 === a)
27
+ n.push(1), i = 0;
28
+ else if (o && "" !== o) {
29
+ let t2 = "", r = "";
30
+ const s = o.split(",");
31
+ for (let o2 = 0; o2 < s.length; o2++)
32
+ t2 += e[a][s[o2]], r += e[a - 1][s[o2]];
33
+ t2 === r ? (n[i] += 1, n.push(0)) : (n.push(1), i = a);
34
+ } else
35
+ e[a][t] === e[a - 1][t] ? (n[i] += 1, n.push(0)) : (n.push(1), i = a);
36
+ return n;
37
+ }
38
+ function getFirstEditableColumn(e) {
39
+ e || (e = store.get("_list_code"));
40
+ for (const t of store.get(e).columns)
41
+ if (t.editable)
42
+ return t.prop;
43
+ return null;
44
+ }
45
+ const ArrowKeyAction = { getIndex(e) {
46
+ let t = 0;
47
+ for (const o of store.columns) {
48
+ if (o.prop === e)
49
+ return t;
50
+ t++;
22
51
  }
23
- }, getLeftColumn(e2) {
24
- let t2 = 0;
25
- for (t2 = u.getIndex(e2) - 1; t2 >= 0; t2--)
26
- return a.columns[t2].editable ? a.columns[t2].prop : null;
52
+ }, getLeftColumn(e) {
53
+ let t = 0;
54
+ for (t = ArrowKeyAction.getIndex(e) - 1; t >= 0; t--)
55
+ return store.columns[t].editable ? store.columns[t].prop : null;
27
56
  } };
28
- function c(e2) {
29
- const t2 = [];
30
- for (var o2 in e2)
31
- t2.push(o2);
32
- return t2;
33
- }
34
- function p(e2) {
35
- e2 || (e2 = a.get("_list_code"));
36
- const t2 = a.get(e2);
37
- return (void 0 === t2.isEditRow || true !== t2.isEditRow) && (void 0 === t2.$rowIndex || null === t2.$rowIndex || (void 0 === t2.$lastSaveRowIndex || null === t2.$lastSaveRowIndex || t2.$rowIndex === t2.$lastSaveRowIndex));
38
- }
39
- function d(e2, t2) {
40
- t2 || (t2 = a.get("_list_code"));
41
- const o2 = a.get(t2);
42
- return !(!o2.options.lineEditOptions || !o2.options.lineEditOptions[e2]);
43
- }
44
- function f(e2, t2) {
45
- let o2 = "", n2 = "";
46
- return e2 && (e2.showNameData && (t2 ? e2.showNameData.dbName && (o2 = e2.showNameData.dbName) : e2.showNameData.name && (o2 = e2.showNameData.name)), e2.serverNameData && (t2 ? e2.serverNameData.dbName && (n2 = e2.serverNameData.dbName) : e2.serverNameData.name && (n2 = e2.serverNameData.name))), { showName: o2, serverPath: n2 };
47
- }
48
- function g(e2, t2, o2, n2) {
49
- const i2 = [];
50
- if (o2) {
51
- if (o2 && o2.length > 0)
52
- for (var a2 = 0; a2 < o2.length; a2++) {
53
- const e3 = o2[a2], n3 = m(e3[t2.showName], e3[t2.serverPath]);
54
- i2.push(n3);
55
- }
56
- } else if (n2) {
57
- const e3 = n2.showName, t3 = n2.serverPath;
58
- if (e3 && t3) {
59
- const o3 = e3.split(","), n3 = t3.split(",");
60
- for (var r2 = 0; r2 < o3.length; r2++) {
61
- const e4 = m(o3[r2], n3[r2]);
62
- i2.push(e4);
57
+ function setCurrentRow(e, t) {
58
+ t || (t = store.get("_list_code"));
59
+ const o = store.get(t);
60
+ e < o.gridData.length && (o.isMulitiSelect ? (o.superGrid.clearSelection(), o.superGrid.toggleRowSelection(o.gridData[e], true)) : o.superGrid.setCurrentRow(o.gridData[e]));
61
+ }
62
+ function isObjectValueEqual(e, t) {
63
+ if (!e && !t)
64
+ return true;
65
+ if (e && t) {
66
+ var o = getProps(e), n = getProps(t);
67
+ let r = o;
68
+ r = o.length > n.length ? o : n;
69
+ for (var i = 0; i < r.length; i++) {
70
+ var a = r[i];
71
+ if ("$editing" !== a) {
72
+ if (e[a] !== t[a])
73
+ return false;
63
74
  }
64
75
  }
76
+ return true;
65
77
  }
66
- return i2;
67
- }
68
- function m(e2, n2) {
69
- e2 && (e2 = e2.replace("#", "~~").replace("?", "~$").replace("&", "$"));
70
- const i2 = {};
71
- i2.showName = e2, i2.serverPath = n2, i2.showName && /\.(jpg|JPG|jpeg|JPEG|png|PNG|gif|GIF|bmp|BMP|psd|PSD|tif|TIF)$/.test(e2) && (i2.isImg = true);
72
- const a2 = t.getToken();
73
- let r2 = window.$vueApp.config.globalProperties.baseURL + "/common/super-form/downloads?jwt=" + a2;
74
- o.isPlateSys(window.$vueApp.config.globalProperties.systemCode) && (r2 = window.$vueApp.config.globalProperties.baseAPI + "/component/super-form/downloads?jwt=" + a2);
75
- const s2 = r2 + "&showName=" + encodeURI(i2.showName) + "&serverPath=" + i2.serverPath;
76
- return i2.src = s2, i2;
77
- }
78
- function h(e2) {
79
- let t2 = {};
80
- return e2 && e2.controlConfig && (t2 = JSON.parse(e2.controlConfig)), t2;
81
- }
82
- exports.ArrowKeyAction = u, exports.addDynamicProp = function(e2, t2, o2) {
83
- const n2 = t2.split(".");
84
- if (1 === n2.length)
85
- return void (e2[t2] = void 0 !== o2 ? o2 : null);
86
- let i2 = e2;
87
- for (let e3 = 0; e3 < n2.length - 1; e3++)
88
- void 0 === i2[n2[e3]] && (i2[n2[e3]] = {}), i2 = i2[n2[e3]];
89
- i2[n2[n2.length - 1]] = void 0 !== o2 ? o2 : null;
90
- }, exports.addDynamicPropDateSection = function(e2, t2, o2) {
91
- const n2 = t2.split(".");
92
- if (1 === n2.length)
93
- return void (e2[t2] = void 0 !== o2 ? o2 : [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()]);
94
- let i2 = e2;
95
- for (let e3 = 0; e3 < n2.length - 1; e3++)
96
- void 0 === i2[n2[e3]] && (i2[n2[e3]] = {}), i2 = i2[n2[e3]];
97
- i2[n2[n2.length - 1]] = void 0 !== o2 ? o2 : [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()];
98
- }, exports.analysisFileSetObj = f, exports.getAdditionalParamMap = function(e2) {
99
- let t2 = null;
100
- return e2.additionalParamMap && "object" == typeof e2.additionalParamMap ? t2 = e2.additionalParamMap : e2.additionalParamMap && "" !== e2.additionalParamMap && (t2 = JSON.parse(e2.additionalParamMap)), t2;
101
- }, exports.getClassOptionTitleCommon = function(e2, t2) {
102
- if (null != e2 && "" !== e2 && e2.length > 0) {
103
- let o2 = "";
104
- return "string" == typeof e2 ? t2 == null ? void 0 : t2.forEach((t3) => {
105
- t3.value === e2 && (o2 = t3.label);
106
- }) : (t2 == null ? void 0 : t2.forEach((t3) => {
107
- e2.forEach((e3) => {
108
- t3.value === e3 && (o2 = o2 + t3.label + ",");
109
- });
110
- }), o2 = o2.slice(0, o2.length - 1)), o2;
111
- }
112
- }, exports.getColumnValues = function(e2, t2) {
113
- const o2 = [];
114
- for (const n2 of e2)
115
- o2.push(n2[t2]);
116
- return o2;
117
- }, exports.getContentAlign = function(e2, t2) {
118
- var _a;
119
- let o2;
120
- return ((_a = t2.options) == null ? void 0 : _a.align) && "" !== t2.options.align ? o2 = t2.options.align : e2.contAlign && "" !== e2.contAlign && (o2 = e2.contAlign), o2;
121
- }, exports.getControlConfig = h, exports.getDynamicDataSourceOptions = function(e2, t2, o2, n2) {
122
- let i2;
123
- o2 && (o2 && "object" == typeof o2 ? i2 = JSON.stringify(o2) : o2 && "" !== o2 && (i2 = o2));
124
- const a2 = { isSql: t2, additionalParameter: i2, backendUrl: n2 };
125
- if (e2.valueSetOptions) {
126
- const t3 = JSON.parse(e2.valueSetOptions);
127
- t3 && t3.valueSetOptions && (a2.valueSetOptions = t3.valueSetOptions), t3.dynamicDataSourceCode && "" !== t3.dynamicDataSourceCode && (a2.dynamicDataSourceCode = t3.dynamicDataSourceCode);
78
+ return false;
79
+ }
80
+ function getProps(e) {
81
+ const t = [];
82
+ for (var o in e)
83
+ t.push(o);
84
+ return t;
85
+ }
86
+ function isLastEditRowSave(e) {
87
+ e || (e = store.get("_list_code"));
88
+ const t = store.get(e);
89
+ return (void 0 === t.isEditRow || true !== t.isEditRow) && (void 0 === t.$rowIndex || null === t.$rowIndex || (void 0 === t.$lastSaveRowIndex || null === t.$lastSaveRowIndex || t.$rowIndex === t.$lastSaveRowIndex));
90
+ }
91
+ function isCanRefreshGrid(e) {
92
+ e || (e = store.get("_list_code"));
93
+ const t = store.get(e);
94
+ if (void 0 !== t.isEditRow && true === t.isEditRow)
95
+ return false;
96
+ return !!isLastEditRowSave() && (void 0 === t.isCreateRow || true !== t.isCreateRow);
97
+ }
98
+ function getEntityId(e) {
99
+ return e && e.id ? e.id : e && e.ID ? e.ID : void 0;
100
+ }
101
+ function isDisableEdit(e, t, o, n) {
102
+ t || (t = store.get("_list_code"));
103
+ let i = false;
104
+ const a = store.get(t), r = isHasEditOption("disableEditProps", t) ? a.options.lineEditOptions.disableEditProps : null;
105
+ if (r) {
106
+ const t2 = r.split(",");
107
+ t2 && t2.indexOf(e) >= 0 && (i = true);
128
108
  }
129
- return a2.controlConfig = h(e2), a2;
130
- }, exports.getExtraParam = function(e2, t2) {
131
- const o2 = { searchParam: e2 };
132
- if (o2.withDataPermission = t2.options.isWithDataPermission, o2.isWorkflowEntity = t2.options.isWorkflowEntity, t2.options.extraParam)
133
- for (const e3 in t2.options.extraParam)
134
- o2[e3] = t2.options.extraParam[e3];
135
- return o2;
136
- }, exports.getFileList = function(e2, t2, o2) {
137
- let i2 = [];
138
- if (t2.fileSet && "" !== t2.fileSet && ("annex" === t2.componentType || "multipartUpload" === t2.componentType)) {
139
- const a2 = JSON.parse(t2.fileSet), r2 = f(a2, o2);
140
- if (a2 && a2.multiple)
141
- if (a2.childAnnexDataTableCode) {
142
- i2 = g(0, r2, e2[t2.prop], null);
143
- } else {
144
- i2 = g(0, r2, null, { showName: n.getEntityFieldValue(e2, r2.showName), serverPath: n.getEntityFieldValue(e2, r2.serverPath) });
109
+ const s = getEntityId(o);
110
+ if (false === i && a.options) {
111
+ const t2 = a.options.validateRules;
112
+ if (t2) {
113
+ const o2 = t2.filter((t3) => t3.name && (t3.name === e || "all_fields" === t3.name));
114
+ let n2 = true;
115
+ if (o2 && o2.length > 0) {
116
+ for (let e2 = 0; e2 < o2.length; e2++)
117
+ n2 = void 0 === o2[e2].rowIndexes || null === o2[e2].rowIndexes ? o2[e2].canEdit : !(o2[e2].rowIndexes.indexOf(s) >= 0) || o2[e2].canEdit;
118
+ false === n2 && (i = true);
145
119
  }
146
- else {
147
- const t3 = n.getEntityFieldValue(e2, r2.showName), o3 = n.getEntityFieldValue(e2, r2.serverPath);
148
- i2.push(m(t3, o3));
120
+ }
121
+ if (false === i) {
122
+ false === isRowCanUpdate(a.options.actionPermission, s) && (i = true);
123
+ }
124
+ if (false === i && a.options.customRules && (a.options.customRules[e] || a.options.customRules._all_fields)) {
125
+ const t3 = a.options.customRules[e] ? a.options.customRules[e] : a.options.customRules._all_fields;
126
+ let o2 = true;
127
+ t3 && t3.disabled && false !== o2 && (i = true);
149
128
  }
150
129
  }
151
- return i2;
152
- }, exports.getFirstEditableColumn = function(e2) {
153
- e2 || (e2 = a.get("_list_code"));
154
- for (const t2 of a.get(e2).columns)
155
- if (t2.editable)
156
- return t2.prop;
157
- return null;
158
- }, exports.getGridParams = function() {
159
- return l.reactive({ columns: [], gridData: [], orgGridData: [], canSaveRow: true, showValidateError: true, defaultLineEditOptions: { aftersaveIsCreateRow: true, autoSave: true, isSaveByEnter: true, isRestoreByEsc: true, aftersaveIsCancelEditState: true, afterRestoreIsCancelEditState: true, input: function() {
160
- } }, options: { lineEditOptions: {} } });
161
- }, exports.getHeaderAlign = function(e2, t2) {
162
- var _a;
163
- let o2;
164
- return ((_a = t2.options) == null ? void 0 : _a.headerAlign) && "" !== t2.options.headerAlign ? o2 = t2.options.headerAlign : e2.titleAlign && "" !== e2.titleAlign && (o2 = e2.titleAlign), o2;
165
- }, exports.getHeaderLable = function(e2) {
166
- let t2 = e2.label;
167
- return t2 = e2.titleValueSet ? function(e3) {
168
- return i.doFormatWithValueSet(e3.titleValueSetValue, e3.label);
169
- }(e2) : t2.replace(/\\n/g, "</br>"), null != t2 && "" !== t2 || (t2 = e2.prop), t2;
170
- }, exports.getRowIndexPage = function(e2, t2) {
171
- return null == e2 || 0 === e2 || null == t2 || 0 === t2 ? 1 : Math.ceil(t2 / e2);
172
- }, exports.getSpanValuesForColumn = function(e2, t2, o2) {
173
- const n2 = [];
174
- let i2 = 0;
175
- for (let a2 = 0; a2 < e2.length; a2++)
176
- if (0 === a2)
177
- n2.push(1), i2 = 0;
178
- else if (o2 && "" !== o2) {
179
- let t3 = "", r2 = "";
180
- const s2 = o2.split(",");
181
- for (let o3 = 0; o3 < s2.length; o3++)
182
- t3 += e2[a2][s2[o3]], r2 += e2[a2 - 1][s2[o3]];
183
- t3 === r2 ? (n2[i2] += 1, n2.push(0)) : (n2.push(1), i2 = a2);
184
- } else
185
- e2[a2][t2] === e2[a2 - 1][t2] ? (n2[i2] += 1, n2.push(0)) : (n2.push(1), i2 = a2);
186
- return n2;
187
- }, exports.getTableHeight = function(e2, t2, n2, i2) {
188
- let a2;
189
- e2 && (a2 = e2.$el.getBoundingClientRect());
190
- let r2 = i2 ? 115 : 85;
191
- return o.isPlateSys(window.$vueApp.config.globalProperties.systemCode) && (r2 = 130), window.innerHeight - ((a2 == null ? void 0 : a2.y) ?? 0) - r2;
192
- }, exports.isCanRefreshGrid = function(e2) {
193
- e2 || (e2 = a.get("_list_code"));
194
- const t2 = a.get(e2);
195
- return (void 0 === t2.isEditRow || true !== t2.isEditRow) && (!!p() && (void 0 === t2.isCreateRow || true !== t2.isCreateRow));
196
- }, exports.isDisableEdit = function(e2, t2, o2, n2) {
197
- t2 || (t2 = a.get("_list_code"));
198
- let i2 = false;
199
- const r2 = a.get(t2), s2 = d("disableEditProps", t2) ? r2.options.lineEditOptions.disableEditProps : null;
200
- if (s2) {
201
- const t3 = s2.split(",");
202
- t3 && t3.indexOf(e2) >= 0 && (i2 = true);
130
+ return i;
131
+ }
132
+ function rowBeforeValidate(e, t, o, n) {
133
+ const i = { parent: t.options.extraParam.entityMap, row: o, pageContext: t.options.pageContext, configure: t.options.configureObj, rowIndex: n };
134
+ return e.beforeValidate(i);
135
+ }
136
+ function isRequiredEdit(e, t) {
137
+ const o = e.prop;
138
+ t || (t = store.get("_list_code"));
139
+ let n = false;
140
+ const i = store.get(t);
141
+ if (i && i.options) {
142
+ const t2 = i.options.validateRules;
143
+ if (t2) {
144
+ const e2 = t2.filter((e3) => e3.name && (e3.name === o || "all_fields" === e3.name) && void 0 !== e3.canEdit && true === e3.canEdit);
145
+ e2 && e2.length > 0 && (n = true);
146
+ } else if (e.validations) {
147
+ const t3 = JSON.parse(e.validations).filter((e2) => true === e2.required);
148
+ t3 && t3.length > 0 && (n = true);
149
+ }
203
150
  }
204
- const l2 = function(e3) {
205
- return e3 && e3.id ? e3.id : e3 && e3.ID ? e3.ID : void 0;
206
- }(o2);
207
- if (false === i2 && r2.options) {
208
- const t3 = r2.options.validateRules;
209
- if (t3) {
210
- const o3 = t3.filter((t4) => t4.name && (t4.name === e2 || "all_fields" === t4.name));
211
- let n3 = true;
212
- if (o3 && o3.length > 0) {
213
- for (let e3 = 0; e3 < o3.length; e3++)
214
- n3 = void 0 === o3[e3].rowIndexes || null === o3[e3].rowIndexes ? o3[e3].canEdit : !(o3[e3].rowIndexes.indexOf(l2) >= 0) || o3[e3].canEdit;
215
- false === n3 && (i2 = true);
151
+ return n;
152
+ }
153
+ function isRowCanUpdate(e, t) {
154
+ let o = true;
155
+ const n = e;
156
+ return n && void 0 !== n.canUpdate && false === n.canUpdate && void 0 !== t && n.updateRowIndexes && n.updateRowIndexes.indexOf(t) >= 0 && (o = false), o;
157
+ }
158
+ function isHasEditOption(e, t) {
159
+ t || (t = store.get("_list_code"));
160
+ const o = store.get(t);
161
+ return !(!o.options.lineEditOptions || !o.options.lineEditOptions[e]);
162
+ }
163
+ function isEditOptionFunction(e, t) {
164
+ t || (t = store.get("_list_code"));
165
+ const o = store.get(t);
166
+ return !(!o.options.lineEditOptions || "function" != typeof o.options.lineEditOptions[e]);
167
+ }
168
+ function isHasOptionFunction(e, t) {
169
+ t || (t = store.get("_list_code"));
170
+ const o = store.get(t);
171
+ return !(!o.options || "function" != typeof o.options[e]);
172
+ }
173
+ function getGridParams() {
174
+ return Vue__namespace.reactive({ columns: [], gridData: [], orgGridData: [], canSaveRow: true, showValidateError: true, defaultLineEditOptions: { aftersaveIsCreateRow: true, autoSave: true, isSaveByEnter: true, isRestoreByEsc: true, aftersaveIsCancelEditState: true, afterRestoreIsCancelEditState: true, input: function() {
175
+ } }, options: { lineEditOptions: {} } });
176
+ }
177
+ function addDynamicProp(e, t, o) {
178
+ const n = t.split(".");
179
+ if (1 === n.length)
180
+ return void (e[t] = void 0 !== o ? o : null);
181
+ let i = e;
182
+ for (let e2 = 0; e2 < n.length - 1; e2++)
183
+ void 0 === i[n[e2]] && (i[n[e2]] = {}), i = i[n[e2]];
184
+ i[n[n.length - 1]] = void 0 !== o ? o : null;
185
+ }
186
+ function addDynamicPropDateSection(e, t, o) {
187
+ const n = t.split(".");
188
+ if (1 === n.length)
189
+ return void (e[t] = void 0 !== o ? o : [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()]);
190
+ let i = e;
191
+ for (let e2 = 0; e2 < n.length - 1; e2++)
192
+ void 0 === i[n[e2]] && (i[n[e2]] = {}), i = i[n[e2]];
193
+ i[n[n.length - 1]] = void 0 !== o ? o : [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()];
194
+ }
195
+ function getTableHeight(e, t, o, n) {
196
+ let i;
197
+ e && (i = e.$el.getBoundingClientRect());
198
+ let a = n ? 115 : 85;
199
+ commonUtil.isPlateSys(window.$vueApp.config.globalProperties.systemCode) && (a = 130);
200
+ return window.innerHeight - ((i == null ? void 0 : i.y) ?? 0) - a;
201
+ }
202
+ function getExtraParam(e, t) {
203
+ const o = { searchParam: e };
204
+ if (o.withDataPermission = t.options.isWithDataPermission, o.isWorkflowEntity = t.options.isWorkflowEntity, t.options.extraParam)
205
+ for (const e2 in t.options.extraParam)
206
+ o[e2] = t.options.extraParam[e2];
207
+ return o;
208
+ }
209
+ function analysisFileSetObj(e, t) {
210
+ let o = "", n = "";
211
+ return e && (e.showNameData && (t ? e.showNameData.dbName && (o = e.showNameData.dbName) : e.showNameData.name && (o = e.showNameData.name)), e.serverNameData && (t ? e.serverNameData.dbName && (n = e.serverNameData.dbName) : e.serverNameData.name && (n = e.serverNameData.name))), { showName: o, serverPath: n };
212
+ }
213
+ function otherFilesToStandard(e, t, o, n) {
214
+ const i = [];
215
+ if (o) {
216
+ if (o && o.length > 0)
217
+ for (var a = 0; a < o.length; a++) {
218
+ const e2 = o[a], n2 = packageFile(e2[t.showName], e2[t.serverPath]);
219
+ i.push(n2);
220
+ }
221
+ } else if (n) {
222
+ const e2 = n.showName, t2 = n.serverPath;
223
+ if (e2 && t2) {
224
+ const o2 = e2.split(","), n2 = t2.split(",");
225
+ for (var r = 0; r < o2.length; r++) {
226
+ const e3 = packageFile(o2[r], n2[r]);
227
+ i.push(e3);
216
228
  }
217
229
  }
218
- if (false === i2) {
219
- const e3 = function(e4, t4) {
220
- let o3 = true;
221
- const n3 = e4;
222
- n3 && void 0 !== n3.canUpdate && false === n3.canUpdate && void 0 !== t4 && n3.updateRowIndexes && n3.updateRowIndexes.indexOf(t4) >= 0 && (o3 = false);
223
- return o3;
224
- }(r2.options.actionPermission, l2);
225
- false === e3 && (i2 = true);
226
- }
227
- if (false === i2 && r2.options.customRules && (r2.options.customRules[e2] || r2.options.customRules._all_fields)) {
228
- const t4 = r2.options.customRules[e2] ? r2.options.customRules[e2] : r2.options.customRules._all_fields;
229
- let o3 = true;
230
- t4 && t4.disabled && false !== o3 && (i2 = true);
230
+ }
231
+ return i;
232
+ }
233
+ function packageFile(e, t) {
234
+ e && (e = e.replace("#", "~~").replace("?", "~$").replace("&", "$"));
235
+ const o = {};
236
+ o.showName = e, o.serverPath = t, o.showName && /\.(jpg|JPG|jpeg|JPEG|png|PNG|gif|GIF|bmp|BMP|psd|PSD|tif|TIF)$/.test(e) && (o.isImg = true);
237
+ const n = auth.getToken();
238
+ let i = window.$vueApp.config.globalProperties.baseURL + "/common/super-form/downloads?jwt=" + n;
239
+ commonUtil.isPlateSys(window.$vueApp.config.globalProperties.systemCode) && (i = window.$vueApp.config.globalProperties.baseAPI + "/component/super-form/downloads?jwt=" + n);
240
+ const a = i + "&showName=" + encodeURI(o.showName) + "&serverPath=" + o.serverPath;
241
+ return o.src = a, o;
242
+ }
243
+ function getFileList(e, t, o) {
244
+ let n = [];
245
+ if (t.fileSet && "" !== t.fileSet && ("annex" === t.componentType || "multipartUpload" === t.componentType)) {
246
+ const i = JSON.parse(t.fileSet), a = analysisFileSetObj(i, o);
247
+ if (i && i.multiple)
248
+ if (i.childAnnexDataTableCode) {
249
+ n = otherFilesToStandard(i, a, e[t.prop], null);
250
+ } else {
251
+ n = otherFilesToStandard(i, a, null, { showName: util.getEntityFieldValue(e, a.showName), serverPath: util.getEntityFieldValue(e, a.serverPath) });
252
+ }
253
+ else {
254
+ const t2 = util.getEntityFieldValue(e, a.showName), o2 = util.getEntityFieldValue(e, a.serverPath);
255
+ n.push(packageFile(t2, o2));
231
256
  }
232
257
  }
233
- return i2;
234
- }, exports.isDynamicDataSourceSource = function(e2) {
235
- if (e2.valueSetOptions) {
236
- const t2 = JSON.parse(e2.valueSetOptions);
237
- if (t2.type && "dynamicData" === t2.type || t2.dynamicDataSourceCode)
258
+ return n;
259
+ }
260
+ function getDynamicDataSourceOptions(e, t, o, n) {
261
+ let i;
262
+ o && (o && "object" == typeof o ? i = JSON.stringify(o) : o && "" !== o && (i = o));
263
+ const a = { isSql: t, additionalParameter: i, backendUrl: n };
264
+ if (e.valueSetOptions) {
265
+ const t2 = JSON.parse(e.valueSetOptions);
266
+ t2 && t2.valueSetOptions && (a.valueSetOptions = t2.valueSetOptions), t2.dynamicDataSourceCode && "" !== t2.dynamicDataSourceCode && (a.dynamicDataSourceCode = t2.dynamicDataSourceCode);
267
+ }
268
+ return a.controlConfig = getControlConfig(e), a;
269
+ }
270
+ function isDynamicDataSourceSource(e) {
271
+ if (e.valueSetOptions) {
272
+ const t = JSON.parse(e.valueSetOptions);
273
+ if (t.type && "dynamicData" === t.type || t.dynamicDataSourceCode)
238
274
  return true;
239
275
  }
240
- return !!(e2.valueSet && e2.valueSet.length > 0 && "dynamicDataSource" === e2.valueSet[0].value);
241
- }, exports.isEditOptionFunction = function(e2, t2) {
242
- t2 || (t2 = a.get("_list_code"));
243
- const o2 = a.get(t2);
244
- return !(!o2.options.lineEditOptions || "function" != typeof o2.options.lineEditOptions[e2]);
245
- }, exports.isHasEditOption = d, exports.isHasOptionFunction = function(e2, t2) {
246
- t2 || (t2 = a.get("_list_code"));
247
- const o2 = a.get(t2);
248
- return !(!o2.options || "function" != typeof o2.options[e2]);
249
- }, exports.isLastEditRowSave = p, exports.isObjectValueEqual = function(e2, t2) {
250
- if (!e2 && !t2)
276
+ return !!(e.valueSet && e.valueSet.length > 0 && "dynamicDataSource" === e.valueSet[0].value);
277
+ }
278
+ function getRowIndexPage(e, t) {
279
+ return null == e || 0 === e || null == t || 0 === t ? 1 : Math.ceil(t / e);
280
+ }
281
+ function scrollYToBottom(e) {
282
+ const t = document.querySelector("." + e + " .el-table--scrollable-y .el-table__body-wrapper");
283
+ t && null !== t && (t.scrollTop = t.scrollHeight);
284
+ }
285
+ function getAdditionalParamMap(e) {
286
+ let t = null;
287
+ return e.additionalParamMap && "object" == typeof e.additionalParamMap ? t = e.additionalParamMap : e.additionalParamMap && "" !== e.additionalParamMap && (t = JSON.parse(e.additionalParamMap)), t;
288
+ }
289
+ function getControlConfig(e) {
290
+ let t = {};
291
+ return e && e.controlConfig && (t = JSON.parse(e.controlConfig)), t;
292
+ }
293
+ function getContentAlign(e, t) {
294
+ var _a;
295
+ let o;
296
+ return ((_a = t.options) == null ? void 0 : _a.align) && "" !== t.options.align ? o = t.options.align : e.contAlign && "" !== e.contAlign && (o = e.contAlign), o;
297
+ }
298
+ function getHeaderAlign(e, t) {
299
+ var _a;
300
+ let o;
301
+ return ((_a = t.options) == null ? void 0 : _a.headerAlign) && "" !== t.options.headerAlign ? o = t.options.headerAlign : e.titleAlign && "" !== e.titleAlign && (o = e.titleAlign), o;
302
+ }
303
+ function getHeaderLable(e) {
304
+ let t = e.label;
305
+ return t = t && !e.titleValueSet ? t.replace(/\\n/g, "</br>") : formatHeader(e), null != t && "" !== t || (t = e.prop), t;
306
+ }
307
+ function formatHeader(e) {
308
+ return formatter.doFormatWithValueSet(e.titleValueSetValue, e.label);
309
+ }
310
+ function parseSubTableActionCondition(e, t, o, n) {
311
+ var _a, _b, _c, _d, _e, _f, _g;
312
+ if (!n)
313
+ return;
314
+ let i = true;
315
+ return n.parentCondition && (i = calculatorUtil.parseSubTablePermissionCondition(n.parentCondition.replaceAll("${field[", "${parent["), (_a = e.pageContext) == null ? void 0 : _a.dataTypeMaps, t, o, e.additionalParamMap, (_c = (_b = e.pageContext) == null ? void 0 : _b.entity) == null ? void 0 : _c.task, ((_d = e.pageContext) == null ? void 0 : _d.contextParam) || e.contextParameter)), false !== i && (!n.condition || calculatorUtil.parseSubTablePermissionCondition(n.condition, e.$dataTypeMap, t, o, e.additionalParamMap, (_f = (_e = e.pageContext) == null ? void 0 : _e.entity) == null ? void 0 : _f.task, ((_g = e.pageContext) == null ? void 0 : _g.contextParam) || e.contextParameter));
316
+ }
317
+ function getClassOptionTitleCommon(e, t) {
318
+ if (null != e && "" !== e && e.length > 0) {
319
+ let o = "";
320
+ return "string" == typeof e ? t == null ? void 0 : t.forEach((t2) => {
321
+ t2.value === e && (o = t2.label);
322
+ }) : (t == null ? void 0 : t.forEach((t2) => {
323
+ e.forEach((e2) => {
324
+ t2.value === e2 && (o = o + t2.label + ",");
325
+ });
326
+ }), o = o.slice(0, o.length - 1)), o;
327
+ }
328
+ }
329
+ function caculateCondition(e, t, o, n) {
330
+ let i;
331
+ try {
332
+ i = calculatorUtil.executeExpression(e, t, o, n);
333
+ } catch (e2) {
334
+ i = false;
335
+ }
336
+ return i;
337
+ }
338
+ function caculateSearchCondition(searchConditions, row) {
339
+ if (!searchConditions || 0 == searchConditions.length || !row)
251
340
  return true;
252
- if (e2 && t2) {
253
- var o2 = c(e2), n2 = c(t2);
254
- let r2 = o2;
255
- r2 = o2.length > n2.length ? o2 : n2;
256
- for (var i2 = 0; i2 < r2.length; i2++) {
257
- var a2 = r2[i2];
258
- if ("$editing" !== a2) {
259
- if (e2[a2] !== t2[a2])
260
- return false;
261
- }
341
+ let conditions = "";
342
+ const maxLen = searchConditions.length;
343
+ for (let e = 0; e < maxLen; e++) {
344
+ const t = searchConditions[e], o = t.propName;
345
+ let n = t.operator;
346
+ if (!o || "" === o)
347
+ continue;
348
+ n || (n = "EQ");
349
+ const i = util.getEntityFieldValue(row, o, false);
350
+ let a = t.propValue, r = t.startValue, s = t.endValue;
351
+ const l = t.dataType;
352
+ "CONTAIN" != n && "NOT_CONTAIN" != n || i && !i.includes && (n = "CONTAIN" == n ? "EQ" : "NET");
353
+ let c = t.variableIsNull, u;
354
+ if (c || (c = "null"), "IS_NULL" !== n && "IS_NOT_NULL" !== n && (void 0 !== a && "" !== a || (a = null, "null" === c ? n = "IS_NULL" : "notequal" === c ? n = "IS_NOT_NULL" : u = true)), null == u)
355
+ if (void 0 === a && null != r && void 0 !== s && (l && ("DATE" === l || "TIME" === l) || (l && "INTEGER" === l || "LONG" === l || "DOUBLE" === l) && "BETWEEN" === n)) {
356
+ const e2 = "GET", t2 = caculateCondition(i, e2, a, l), o2 = "LET", n2 = caculateCondition(i, o2, a, l);
357
+ u = "(" + t2 + "&&" + n2 + ")";
358
+ } else
359
+ u = caculateCondition(i, n, a, l);
360
+ const d = t.leftBracket, p = t.rightBracket;
361
+ let g = t.joinSign;
362
+ if (d && null !== d && "" !== d && (conditions += d, conditions += " "), conditions += u + " ", p && null !== p && "" !== p && (conditions += p, conditions += " "), e < maxLen - 1 && g && null !== g && "" !== g) {
363
+ const e2 = g.toLowerCase();
364
+ "and" === e2 ? g = e2.replace("and", "&&") : "or" === e2 && (g = e2.replace("or", "||")), conditions += g + " ";
262
365
  }
263
- return true;
264
366
  }
265
- return false;
266
- }, exports.isRequiredEdit = function(e2, t2) {
267
- const o2 = e2.prop;
268
- t2 || (t2 = a.get("_list_code"));
269
- let n2 = false;
270
- const i2 = a.get(t2);
271
- if (i2 && i2.options) {
272
- const t3 = i2.options.validateRules;
273
- if (t3) {
274
- const e3 = t3.filter((e4) => e4.name && (e4.name === o2 || "all_fields" === e4.name) && void 0 !== e4.canEdit && true === e4.canEdit);
275
- e3 && e3.length > 0 && (n2 = true);
276
- } else if (e2.validations) {
277
- const t4 = JSON.parse(e2.validations).filter((e3) => true === e3.required);
278
- t4 && t4.length > 0 && (n2 = true);
279
- }
367
+ if (conditions) {
368
+ const result = eval("(" + conditions + ")");
369
+ return result;
280
370
  }
281
- return n2;
282
- }, exports.otherFilesToStandard = g, exports.packageFile = m, exports.parseSubTableActionCondition = function(e2, t2, o2, n2) {
283
- var _a, _b, _c, _d, _e, _f, _g;
284
- if (!n2)
285
- return;
286
- let i2 = true;
287
- return n2.parentCondition && (i2 = r.parseSubTablePermissionCondition(n2.parentCondition.replaceAll("${field[", "${parent["), (_a = e2.pageContext) == null ? void 0 : _a.dataTypeMaps, t2, o2, e2.additionalParamMap, (_c = (_b = e2.pageContext) == null ? void 0 : _b.entity) == null ? void 0 : _c.task, ((_d = e2.pageContext) == null ? void 0 : _d.contextParam) || e2.contextParameter)), false !== i2 && (!n2.condition || r.parseSubTablePermissionCondition(n2.condition, e2.$dataTypeMap, t2, o2, e2.additionalParamMap, (_f = (_e = e2.pageContext) == null ? void 0 : _e.entity) == null ? void 0 : _f.task, ((_g = e2.pageContext) == null ? void 0 : _g.contextParam) || e2.contextParameter));
288
- }, exports.rowBeforeValidate = function(e2, t2, o2, n2) {
289
- const i2 = { parent: t2.options.extraParam.entityMap, row: o2, pageContext: t2.options.pageContext, configure: t2.options.configureObj, rowIndex: n2 };
290
- return e2.beforeValidate(i2);
291
- }, exports.scrollYToBottom = function(e2) {
292
- const t2 = document.querySelector("." + e2 + " .el-table--scrollable-y .el-table__body-wrapper");
293
- t2 && null !== t2 && (t2.scrollTop = t2.scrollHeight);
294
- }, exports.setCurrentRow = function(e2, t2) {
295
- t2 || (t2 = a.get("_list_code"));
296
- const o2 = a.get(t2);
297
- e2 < o2.gridData.length && (o2.isMulitiSelect ? (o2.superGrid.clearSelection(), o2.superGrid.toggleRowSelection(o2.gridData[e2], true)) : o2.superGrid.setCurrentRow(o2.gridData[e2]));
298
- };
371
+ return true;
372
+ }
373
+ exports.ArrowKeyAction = ArrowKeyAction, exports.addDynamicProp = addDynamicProp, exports.addDynamicPropDateSection = addDynamicPropDateSection, exports.analysisFileSetObj = analysisFileSetObj, exports.caculateSearchCondition = caculateSearchCondition, exports.getAdditionalParamMap = getAdditionalParamMap, exports.getClassOptionTitleCommon = getClassOptionTitleCommon, exports.getColumnValues = getColumnValues, exports.getContentAlign = getContentAlign, exports.getControlConfig = getControlConfig, exports.getDynamicDataSourceOptions = getDynamicDataSourceOptions, exports.getExtraParam = getExtraParam, exports.getFileList = getFileList, exports.getFirstEditableColumn = getFirstEditableColumn, exports.getGridParams = getGridParams, exports.getHeaderAlign = getHeaderAlign, exports.getHeaderLable = getHeaderLable, exports.getRowIndexPage = getRowIndexPage, exports.getSpanValuesForColumn = getSpanValuesForColumn, exports.getTableHeight = getTableHeight, exports.isCanRefreshGrid = isCanRefreshGrid, exports.isDisableEdit = isDisableEdit, exports.isDynamicDataSourceSource = isDynamicDataSourceSource, exports.isEditOptionFunction = isEditOptionFunction, exports.isHasEditOption = isHasEditOption, exports.isHasOptionFunction = isHasOptionFunction, exports.isLastEditRowSave = isLastEditRowSave, exports.isObjectValueEqual = isObjectValueEqual, exports.isRequiredEdit = isRequiredEdit, exports.otherFilesToStandard = otherFilesToStandard, exports.packageFile = packageFile, exports.parseSubTableActionCondition = parseSubTableActionCondition, exports.rowBeforeValidate = rowBeforeValidate, exports.scrollYToBottom = scrollYToBottom, exports.setCurrentRow = setCurrentRow;