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