@owp/core 2.5.54 → 2.5.57
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/components/OwpDialog/OwpDialog.js +26 -26
- package/dist/components/OwpDialog/OwpDialog.js.map +1 -1
- package/dist/components/OwpPicker/OwpTimePicker.js +152 -148
- package/dist/components/OwpPicker/OwpTimePicker.js.map +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +297 -315
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGridToolbar.js +57 -48
- package/dist/components/OwpTreeGrid/OwpTreeGridToolbar.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/OwpTreeGridScrollLoadingOverlay.js +68 -38
- package/dist/components/OwpTreeGrid/internal/OwpTreeGridScrollLoadingOverlay.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridAddedRowBoxOverlay.js +82 -67
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridAddedRowBoxOverlay.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js +280 -271
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridOverlayFrame.js +52 -53
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridOverlayFrame.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +845 -761
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/configs/defaultConfig.js +82 -81
- package/dist/configs/defaultConfig.js.map +1 -1
- package/dist/constants/input.js +6 -0
- package/dist/constants/input.js.map +1 -0
- package/dist/constants.js +55 -52
- package/dist/constants.js.map +1 -1
- package/dist/dayjs.js +17 -15
- package/dist/dayjs.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewCanvas.js +247 -251
- package/dist/features/themePreview/components/ThemePreviewCanvas.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewCanvasSections.js +385 -356
- package/dist/features/themePreview/components/ThemePreviewCanvasSections.js.map +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/components/OwpDialog/OwpDialog.d.ts +1 -1
- package/dist/types/components/OwpTreeGrid/OwpTreeGridToolbar.d.ts +3 -1
- package/dist/types/components/OwpTreeGrid/internal/OwpTreeGridScrollLoadingOverlay.d.ts +2 -1
- package/dist/types/constants/index.d.ts +1 -0
- package/dist/types/constants/input.d.ts +4 -0
- package/dist/types/dayjs.d.ts +0 -2
- package/dist/types/features/themePreview/components/ThemePreviewCanvasSections.d.ts +0 -2
- package/package.json +1 -1
- package/dist/_virtual/en.js +0 -3
- package/dist/_virtual/en.js.map +0 -1
- package/dist/_virtual/en2.js +0 -5
- package/dist/_virtual/en2.js.map +0 -1
- package/dist/_virtual/ko.js +0 -3
- package/dist/_virtual/ko.js.map +0 -1
- package/dist/_virtual/ko2.js +0 -5
- package/dist/_virtual/ko2.js.map +0 -1
- package/dist/node_modules/.pnpm/dayjs@1.11.18/node_modules/dayjs/locale/en.js +0 -21
- package/dist/node_modules/.pnpm/dayjs@1.11.18/node_modules/dayjs/locale/en.js.map +0 -1
- package/dist/node_modules/.pnpm/dayjs@1.11.18/node_modules/dayjs/locale/ko.js +0 -28
- package/dist/node_modules/.pnpm/dayjs@1.11.18/node_modules/dayjs/locale/ko.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var s = (e, t) =>
|
|
3
|
-
import { getTreeGridTextResourceUrl as
|
|
4
|
-
import { isTreeGridRowAddedById as
|
|
5
|
-
import { applyTreeGridLayoutToGrid as
|
|
6
|
-
import { resolveTreeGridSelectedRows as
|
|
7
|
-
import { TREE_GRID_HOVER_CELL_BORDER_COLOR_CSS_VARIABLE as
|
|
8
|
-
import { countTreeGridPerf as
|
|
9
|
-
import { debounce as
|
|
10
|
-
import { isEmpty as
|
|
11
|
-
import { get as
|
|
12
|
-
const
|
|
1
|
+
var cn = Object.defineProperty;
|
|
2
|
+
var s = (e, t) => cn(e, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { getTreeGridTextResourceUrl as ln, TREEGRID_CELL_CHANGED_CLASS as ht, TREEGRID_ADDED_ROW_BACKGROUND_COLOR as dn } from "../../../constants/treeGrid.js";
|
|
4
|
+
import { isTreeGridRowAddedById as D, getTreeGridAddedRowHighlightColumns as ae, getTreeGridAddedRowEditableColumns as We, getTreeGridCellComparableValue as Le, clearTreeGridCellHighlightById as At, highlightTreeGridCellById as gt, normalizeTreeGridExternalRows as un, getTreeGridAddedRowBaselineValue as fn, removeTreeGridAddedRowHighlightColumn as an, appendTreeGridAddedRowHighlightColumn as Tn } from "../../../utils/treeGridUtil.js";
|
|
5
|
+
import { applyTreeGridLayoutToGrid as Sn } from "./treeGridLayout.js";
|
|
6
|
+
import { resolveTreeGridSelectedRows as Rn } from "./treeGridSelection.js";
|
|
7
|
+
import { TREE_GRID_HOVER_CELL_BORDER_COLOR_CSS_VARIABLE as pn, TREE_GRID_PANEL_CHECKBOX_SELECT_CLASS as En, TREE_GRID_SELECT_ALL_CHECKED_CLASS as Je, TREE_GRID_SELECT_ALL_INDETERMINATE_CLASS as je, TREE_GRID_SELECT_ALL_UNCHECKED_CLASS as He, TREE_GRID_SELECTED_CHANGED_CELL_CLASS as Ke, TREE_GRID_THEME_WRAPPER_CLASS as Cn, TREE_GRID_STYLE_PREFIXES as Gn, TREE_GRID_ADDED_ROW_BOX_CELL_CLASS as hn, TREE_GRID_ERROR_CELL_CLASS as An, TREE_GRID_ADDED_ROW_BOX_START_CLASS as gn, TREE_GRID_ADDED_ROW_BOX_END_CLASS as _n } from "./treeGridTheme.js";
|
|
8
|
+
import { countTreeGridPerf as _t, logTreeGridPerf as mn, measureTreeGridPerf as mt } from "./utils/perf.js";
|
|
9
|
+
import { debounce as de } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
|
|
10
|
+
import { isEmpty as On } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
|
|
11
|
+
import { get as Ln } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
|
|
12
|
+
const to = 300, wn = 3, xn = {
|
|
13
13
|
1: {
|
|
14
14
|
onEnter: "TabDownEdit",
|
|
15
15
|
onEnterEdit: "AcceptEdit AND TabDownEdit,1"
|
|
@@ -26,44 +26,44 @@ const Ns = 300, En = 3, Cn = {
|
|
|
26
26
|
onEnter: "TabRightEditAdd",
|
|
27
27
|
onEnterEdit: "AcceptEdit AND TabRightEditAdd,1"
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, In = [240, 240, 240], bn = [248, 248, 248], Dn = [191, 221, 242], yn = [255, 255, 255], $n = [255, 255, 254], Pn = [242, 242, 242], vn = [
|
|
30
30
|
[255, 210, 210],
|
|
31
31
|
[249, 209, 209],
|
|
32
32
|
[115, 16, 11]
|
|
33
|
-
],
|
|
33
|
+
], Un = "transparent", ze = "Button", Fn = /* @__PURE__ */ new Set(["Panel"]), Ye = ht.split(/\s+/).filter(
|
|
34
34
|
Boolean
|
|
35
|
-
),
|
|
36
|
-
|
|
35
|
+
), Bn = new Set(
|
|
36
|
+
Gn.flatMap((e) => [
|
|
37
37
|
`${e}ColorFocused`,
|
|
38
38
|
`${e}ColorFocusedRow`,
|
|
39
39
|
`${e}ColorChanged`
|
|
40
40
|
])
|
|
41
|
-
),
|
|
41
|
+
), Nn = /* @__PURE__ */ new Set([
|
|
42
42
|
"Text",
|
|
43
43
|
"Lines",
|
|
44
44
|
"Int",
|
|
45
45
|
"Float",
|
|
46
46
|
"Date",
|
|
47
47
|
"Pass"
|
|
48
|
-
]),
|
|
48
|
+
]), qe = /* @__PURE__ */ s((e) => !!(e && /\b(?:EnterMode|OnEnterEdit|OnEnter)\s*[:=]/.test(e)), "hasTreeGridExplicitEnterMode"), Mn = {
|
|
49
49
|
CustomScroll: "1",
|
|
50
50
|
TouchScroll: "1"
|
|
51
|
-
},
|
|
51
|
+
}, Vn = {
|
|
52
52
|
Visible: "1",
|
|
53
53
|
CanHide: "0",
|
|
54
54
|
Delete: "1",
|
|
55
55
|
Width: "33"
|
|
56
|
-
},
|
|
56
|
+
}, kn = {
|
|
57
57
|
Spanned: "1"
|
|
58
|
-
},
|
|
58
|
+
}, ee = {
|
|
59
59
|
OnClickCell: "Focus"
|
|
60
|
-
},
|
|
60
|
+
}, te = {
|
|
61
61
|
OnClickPanelSelectAll: "SelectAll OR DeselectAll"
|
|
62
|
-
},
|
|
62
|
+
}, $ = {
|
|
63
63
|
LoadPage: "",
|
|
64
64
|
RenderPage: "",
|
|
65
65
|
RenderProgressText: ""
|
|
66
|
-
},
|
|
66
|
+
}, Xn = {
|
|
67
67
|
EditFrom: "",
|
|
68
68
|
EditTo: "#OwpSoftChange 240ms",
|
|
69
69
|
ChangeFrom: "",
|
|
@@ -72,7 +72,7 @@ const Ns = 300, En = 3, Cn = {
|
|
|
72
72
|
UndoChangeTo: "#OwpSoftRevert 280ms",
|
|
73
73
|
RedoChangeFrom: "",
|
|
74
74
|
RedoChangeTo: "#OwpSoftChange 240ms"
|
|
75
|
-
},
|
|
75
|
+
}, Wn = {
|
|
76
76
|
Select: "#OwpSoftRowSelect 140ms",
|
|
77
77
|
SelectRows: "#OwpSoftRowSelect 140ms",
|
|
78
78
|
RedoSelect: "#OwpSoftRowSelect 140ms",
|
|
@@ -101,10 +101,19 @@ const Ns = 300, En = 3, Cn = {
|
|
|
101
101
|
RedoDeleteVisible: "#OwpSoftRowRemove 120ms",
|
|
102
102
|
UndoUndelete: "#OwpSoftRowRemove 120ms",
|
|
103
103
|
UndoUndeleteVisible: "#OwpSoftRowRemove 120ms"
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
...
|
|
107
|
-
},
|
|
104
|
+
}, W = {
|
|
105
|
+
...Xn,
|
|
106
|
+
...Wn
|
|
107
|
+
}, we = "Panel", Jn = /* @__PURE__ */ new Set([we]), Te = [], Ot = ["Formula", "FormulaFormula"], jn = "Formula", Ze = /* @__PURE__ */ new Set([
|
|
108
|
+
"Add",
|
|
109
|
+
"Delete",
|
|
110
|
+
"Show",
|
|
111
|
+
"Hide",
|
|
112
|
+
"Filter",
|
|
113
|
+
"Search",
|
|
114
|
+
"Filtered",
|
|
115
|
+
"Searched"
|
|
116
|
+
]), Hn = /<Grid\b[^>]*>/i, Kn = /<\/Grid\s*>/i, zn = /<Toolbar\b[^>]*\/?>/i, Yn = [
|
|
108
117
|
"CustomScroll",
|
|
109
118
|
"CustomHScroll",
|
|
110
119
|
"Undo",
|
|
@@ -113,11 +122,11 @@ const Ns = 300, En = 3, Cn = {
|
|
|
113
122
|
"SelectingSingle",
|
|
114
123
|
"SuppressCfg",
|
|
115
124
|
"TouchScroll"
|
|
116
|
-
],
|
|
125
|
+
], Lt = [
|
|
117
126
|
"CustomScroll",
|
|
118
127
|
"CustomHScroll",
|
|
119
128
|
"TouchScroll"
|
|
120
|
-
],
|
|
129
|
+
], qn = {
|
|
121
130
|
addRow: ["Add", "AddRows", "AddChildren", "AddRowsChildren"],
|
|
122
131
|
deleteRow: [
|
|
123
132
|
"Delete",
|
|
@@ -147,100 +156,108 @@ const Ns = 300, En = 3, Cn = {
|
|
|
147
156
|
"UndoSelect",
|
|
148
157
|
"RedoDeselect"
|
|
149
158
|
]
|
|
150
|
-
},
|
|
159
|
+
}, Se = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakSet();
|
|
160
|
+
let Qe;
|
|
161
|
+
const et = /* @__PURE__ */ s((e, t) => {
|
|
162
|
+
if (t) {
|
|
163
|
+
pe.add(e);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
pe.delete(e);
|
|
167
|
+
}, "setTreeGridFocusedState"), xe = /* @__PURE__ */ s((e) => pe.has(e), "isTreeGridFocusedStateActive"), G = /* @__PURE__ */ s((e) => typeof e == "object" && e !== null && !Array.isArray(e), "isTreeGridJsonRecord"), tt = /* @__PURE__ */ s((e, t) => {
|
|
151
168
|
Object.entries(t).forEach(([n, r]) => {
|
|
152
169
|
n in e || (e[n] = r);
|
|
153
170
|
});
|
|
154
|
-
}, "assignMissingTreeGridJsonRecordFields"),
|
|
171
|
+
}, "assignMissingTreeGridJsonRecordFields"), B = /* @__PURE__ */ s((e) => e === 0 || e === !1 || e === "0" || e === "false", "isTreeGridDisabledConfigValue"), re = /* @__PURE__ */ s((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitEnabledConfigValue"), Zn = /* @__PURE__ */ s((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitHiddenConfigValue"), K = /* @__PURE__ */ s((e, t) => String(e ?? "").trim().toLowerCase() === t.toLowerCase(), "isTreeGridConfigValue"), Ie = /* @__PURE__ */ s((e, t) => !B(e) && !re(t), "isTreeGridCheckboxSelectionMode"), wt = /* @__PURE__ */ s((e) => {
|
|
155
172
|
const t = e.Cfg;
|
|
156
173
|
return Array.isArray(t) ? t.filter(G) : G(t) ? [t] : [];
|
|
157
|
-
}, "getTreeGridJsonCfgRecords"),
|
|
174
|
+
}, "getTreeGridJsonCfgRecords"), se = /* @__PURE__ */ s((e, t) => {
|
|
158
175
|
let n;
|
|
159
|
-
return
|
|
176
|
+
return wt(e).forEach((r) => {
|
|
160
177
|
t in r && (n = r[t]);
|
|
161
178
|
}), n;
|
|
162
|
-
}, "getTreeGridJsonCfgValue"),
|
|
179
|
+
}, "getTreeGridJsonCfgValue"), Qn = /* @__PURE__ */ s((e, t) => {
|
|
163
180
|
const n = {};
|
|
164
181
|
return t.forEach((r) => {
|
|
165
|
-
const
|
|
166
|
-
|
|
182
|
+
const o = se(e, r);
|
|
183
|
+
o !== void 0 && (n[r] = o);
|
|
167
184
|
}), n;
|
|
168
|
-
}, "getTreeGridJsonCfgValues"),
|
|
185
|
+
}, "getTreeGridJsonCfgValues"), er = /* @__PURE__ */ s((e) => String(e).trim() === "1", "isTreeGridStandardScrollbarValue"), tr = /* @__PURE__ */ s((e) => Lt.every((t) => {
|
|
169
186
|
const n = e[t];
|
|
170
|
-
return n === void 0 ||
|
|
171
|
-
}), "canApplyTreeGridStableScrollbarDefaults"),
|
|
187
|
+
return n === void 0 || er(n);
|
|
188
|
+
}), "canApplyTreeGridStableScrollbarDefaults"), xt = /* @__PURE__ */ s((e) => {
|
|
172
189
|
const t = {};
|
|
173
|
-
return
|
|
190
|
+
return tr(e) && Object.entries(Mn).forEach(
|
|
174
191
|
([n, r]) => {
|
|
175
192
|
e[n] === void 0 && (t[n] = r);
|
|
176
193
|
}
|
|
177
194
|
), t;
|
|
178
|
-
}, "getTreeGridStableScrollbarDefaultAttributes"),
|
|
195
|
+
}, "getTreeGridStableScrollbarDefaultAttributes"), It = /* @__PURE__ */ s((e) => Object.keys(e).length > 0, "hasTreeGridDefaultAttributes"), bt = /* @__PURE__ */ s((e, t) => {
|
|
179
196
|
const n = new RegExp(`\\b${t}\\s*=\\s*(['"])(.*?)\\1`, "i").exec(
|
|
180
197
|
e
|
|
181
198
|
);
|
|
182
199
|
return n == null ? void 0 : n[2];
|
|
183
|
-
}, "getTreeGridXmlTagAttributeValue"),
|
|
200
|
+
}, "getTreeGridXmlTagAttributeValue"), J = /* @__PURE__ */ s((e, t) => new RegExp(`\\b${t}\\s*=`, "i").test(e), "hasTreeGridXmlTagAttribute"), Dt = /* @__PURE__ */ s((e) => String(e).replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), "escapeTreeGridXmlAttributeValue"), z = /* @__PURE__ */ s((e, t, n) => {
|
|
184
201
|
const r = e.endsWith("/>") ? e.length - 2 : e.length - 1;
|
|
185
|
-
return `${e.slice(0, r)} ${t}="${
|
|
202
|
+
return `${e.slice(0, r)} ${t}="${Dt(
|
|
186
203
|
n
|
|
187
204
|
)}"${e.slice(r)}`;
|
|
188
|
-
}, "appendTreeGridXmlTagAttribute"),
|
|
205
|
+
}, "appendTreeGridXmlTagAttribute"), Ee = /* @__PURE__ */ s((e, t, n) => J(e, t) ? e.replace(
|
|
189
206
|
new RegExp(`\\b${t}\\s*=\\s*(['"])(.*?)\\1`, "i"),
|
|
190
|
-
() => `${t}="${
|
|
191
|
-
) :
|
|
207
|
+
() => `${t}="${Dt(n)}"`
|
|
208
|
+
) : z(e, t, n), "setTreeGridXmlTagAttribute"), Y = /* @__PURE__ */ s((e, t) => {
|
|
192
209
|
let n = e;
|
|
193
|
-
return Object.entries(t).forEach(([r,
|
|
194
|
-
n =
|
|
210
|
+
return Object.entries(t).forEach(([r, o]) => {
|
|
211
|
+
n = Ee(n, r, o);
|
|
195
212
|
}), n;
|
|
196
|
-
}, "setTreeGridXmlTagAttributes"),
|
|
213
|
+
}, "setTreeGridXmlTagAttributes"), N = /* @__PURE__ */ s((e, t) => {
|
|
197
214
|
let n = e;
|
|
198
|
-
return Object.entries(t).forEach(([r,
|
|
199
|
-
|
|
215
|
+
return Object.entries(t).forEach(([r, o]) => {
|
|
216
|
+
J(n, r) || (n = z(n, r, o));
|
|
200
217
|
}), n;
|
|
201
|
-
}, "appendMissingTreeGridXmlTagAttributes"),
|
|
218
|
+
}, "appendMissingTreeGridXmlTagAttributes"), m = /* @__PURE__ */ s((e) => {
|
|
202
219
|
var d;
|
|
203
220
|
const t = /<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<!\[CDATA\[[\s\S]*?\]\]>|<\/?([A-Za-z][\w:-]*)\b[^>]*>/g, n = {
|
|
204
221
|
cfgValues: {}
|
|
205
222
|
};
|
|
206
|
-
let r,
|
|
223
|
+
let r, o = 0, c = !1;
|
|
207
224
|
for (; r = t.exec(e); ) {
|
|
208
225
|
const u = r[0], T = (d = r[1]) == null ? void 0 : d.toLowerCase();
|
|
209
226
|
if (!T || u.startsWith("<!--") || u.startsWith("<?") || u.startsWith("<!"))
|
|
210
227
|
continue;
|
|
211
|
-
!n.hasFastPanel &&
|
|
212
|
-
const E = u.startsWith("</"),
|
|
228
|
+
!n.hasFastPanel && J(u, "FastPanel") && (n.hasFastPanel = !0);
|
|
229
|
+
const E = u.startsWith("</"), A = /\/>\s*$/.test(u);
|
|
213
230
|
if (!c) {
|
|
214
|
-
!E && T === "grid" && (c = !0, n.gridOpenTagEndIndex = r.index + u.length,
|
|
231
|
+
!E && T === "grid" && (c = !0, n.gridOpenTagEndIndex = r.index + u.length, o = A ? 0 : 1);
|
|
215
232
|
continue;
|
|
216
233
|
}
|
|
217
234
|
if (E) {
|
|
218
|
-
if (
|
|
235
|
+
if (o = Math.max(0, o - 1), T === "grid" && o === 0)
|
|
219
236
|
break;
|
|
220
237
|
continue;
|
|
221
238
|
}
|
|
222
|
-
|
|
239
|
+
o === 1 && (T === "cfg" ? (n.defaultCfgTag || (n.defaultCfgTag = {
|
|
223
240
|
index: r.index,
|
|
224
241
|
tag: u
|
|
225
|
-
}),
|
|
226
|
-
const
|
|
227
|
-
|
|
242
|
+
}), Yn.forEach((_) => {
|
|
243
|
+
const x = bt(u, _);
|
|
244
|
+
x !== void 0 && (n.cfgValues[_] = x);
|
|
228
245
|
}), n.lastCfgEndIndex = r.index + u.length) : T === "actions" && !n.defaultActionsTag ? n.defaultActionsTag = {
|
|
229
246
|
index: r.index,
|
|
230
247
|
tag: u
|
|
231
|
-
} : T === "panel" ? (n.hasTopLevelPanelTag = !0, !n.defaultPanelTag &&
|
|
248
|
+
} : T === "panel" ? (n.hasTopLevelPanelTag = !0, !n.defaultPanelTag && nr(u) && (n.defaultPanelTag = {
|
|
232
249
|
index: r.index,
|
|
233
250
|
tag: u
|
|
234
251
|
})) : T === "animations" && !n.animationsTag && (n.animationsTag = {
|
|
235
252
|
index: r.index,
|
|
236
253
|
tag: u
|
|
237
|
-
})),
|
|
254
|
+
})), A || (o += 1);
|
|
238
255
|
}
|
|
239
256
|
return n;
|
|
240
|
-
}, "scanTreeGridXmlDefaultLayout"),
|
|
241
|
-
const t =
|
|
257
|
+
}, "scanTreeGridXmlDefaultLayout"), nr = /* @__PURE__ */ s((e) => {
|
|
258
|
+
const t = bt(e, "Name");
|
|
242
259
|
return t === void 0 || t === "" || t.toLowerCase() === "panel";
|
|
243
|
-
}, "isTreeGridXmlDefaultPanelTag"),
|
|
260
|
+
}, "isTreeGridXmlDefaultPanelTag"), rr = /* @__PURE__ */ s((e) => {
|
|
244
261
|
const t = /<([A-Za-z][\w:-]*)\b[^>]*(?:\/>|>)/g, n = [];
|
|
245
262
|
let r;
|
|
246
263
|
for (; r = t.exec(e); ) {
|
|
@@ -255,110 +272,110 @@ const Ns = 300, En = 3, Cn = {
|
|
|
255
272
|
});
|
|
256
273
|
}
|
|
257
274
|
return n;
|
|
258
|
-
}, "getLeadingTreeGridXmlHeaderTags"),
|
|
259
|
-
const t =
|
|
275
|
+
}, "getLeadingTreeGridXmlHeaderTags"), sr = /* @__PURE__ */ s((e) => {
|
|
276
|
+
const t = rr(e);
|
|
260
277
|
if (t.length <= 1)
|
|
261
278
|
return {
|
|
262
279
|
headContent: e,
|
|
263
280
|
isApplied: !1
|
|
264
281
|
};
|
|
265
282
|
const [n, ...r] = t;
|
|
266
|
-
if (
|
|
283
|
+
if (J(n.tag, "PanelRowSpan") || r.some(({ tag: c }) => /\bPanel[A-Za-z0-9_]*\s*=/i.test(c)))
|
|
267
284
|
return {
|
|
268
285
|
headContent: e,
|
|
269
286
|
isApplied: !1
|
|
270
287
|
};
|
|
271
|
-
let
|
|
272
|
-
return
|
|
273
|
-
|
|
288
|
+
let o = n.tag;
|
|
289
|
+
return J(o, "Spanned") || (o = z(o, "Spanned", 1)), o = z(
|
|
290
|
+
o,
|
|
274
291
|
"PanelRowSpan",
|
|
275
292
|
t.length
|
|
276
293
|
), {
|
|
277
|
-
headContent: `${e.slice(0, n.index)}${
|
|
294
|
+
headContent: `${e.slice(0, n.index)}${o}${e.slice(
|
|
278
295
|
n.index + n.tag.length
|
|
279
296
|
)}`,
|
|
280
297
|
isApplied: !0
|
|
281
298
|
};
|
|
282
|
-
}, "applyTreeGridXmlHeadPanelRowSpanDefault"),
|
|
283
|
-
if (t.gridOpenTagEndIndex === void 0 ||
|
|
299
|
+
}, "applyTreeGridXmlHeadPanelRowSpanDefault"), or = /* @__PURE__ */ s((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlPanelSpannedInsertionIndex"), yt = /* @__PURE__ */ s((e) => Ft(e.cfgValues) && (!!e.defaultPanelTag || !e.hasTopLevelPanelTag), "isTreeGridXmlSelectionPanelSpannedDefaultLayout"), $t = /* @__PURE__ */ s((e) => yt(e) || Bt(e.cfgValues), "isTreeGridXmlPanelSpannedDefaultLayout"), Pt = /* @__PURE__ */ s((e, t) => {
|
|
300
|
+
if (t.gridOpenTagEndIndex === void 0 || !$t(t))
|
|
284
301
|
return e;
|
|
285
302
|
const n = t.defaultPanelTag;
|
|
286
303
|
if (n) {
|
|
287
|
-
const
|
|
304
|
+
const o = N(
|
|
288
305
|
n.tag,
|
|
289
|
-
|
|
306
|
+
kn
|
|
290
307
|
);
|
|
291
|
-
return
|
|
308
|
+
return o === n.tag ? e : `${e.slice(0, n.index)}${o}${e.slice(
|
|
292
309
|
n.index + n.tag.length
|
|
293
310
|
)}`;
|
|
294
311
|
}
|
|
295
|
-
const r =
|
|
312
|
+
const r = or(t);
|
|
296
313
|
return r === void 0 ? e : `${e.slice(0, r)}
|
|
297
314
|
<Panel Spanned="1" />${e.slice(
|
|
298
315
|
r
|
|
299
316
|
)}`;
|
|
300
|
-
}, "applyTreeGridXmlDefaultPanelSpannedLayout"),
|
|
317
|
+
}, "applyTreeGridXmlDefaultPanelSpannedLayout"), ir = /* @__PURE__ */ s((e, t) => yt(t) ? Pt(e, t) : e, "applyTreeGridXmlDefaultSelectionPanelSpannedLayout"), cr = /* @__PURE__ */ s((e) => {
|
|
301
318
|
const t = e.trim();
|
|
302
|
-
return !t || t.startsWith("{") ? e :
|
|
319
|
+
return !t || t.startsWith("{") ? e : ir(
|
|
303
320
|
e,
|
|
304
|
-
|
|
321
|
+
m(e)
|
|
305
322
|
);
|
|
306
|
-
}, "applyTreeGridDefaultPanelSpannedLayout"),
|
|
323
|
+
}, "applyTreeGridDefaultPanelSpannedLayout"), lr = /* @__PURE__ */ s((e) => {
|
|
307
324
|
if (!/<Head\b/i.test(e))
|
|
308
325
|
return e;
|
|
309
|
-
const t =
|
|
310
|
-
if (t.gridOpenTagEndIndex === void 0 ||
|
|
326
|
+
const t = m(e);
|
|
327
|
+
if (t.gridOpenTagEndIndex === void 0 || !$t(t))
|
|
311
328
|
return e;
|
|
312
329
|
let n = !1;
|
|
313
330
|
const r = e.replace(
|
|
314
331
|
/(<Head\b[^>]*>)([\s\S]*?)(<\/Head>)/i,
|
|
315
|
-
(
|
|
316
|
-
const T =
|
|
317
|
-
return T.isApplied ? (n = !0, `${c}${T.headContent}${u}`) :
|
|
332
|
+
(o, c, d, u) => {
|
|
333
|
+
const T = sr(d);
|
|
334
|
+
return T.isApplied ? (n = !0, `${c}${T.headContent}${u}`) : o;
|
|
318
335
|
}
|
|
319
336
|
);
|
|
320
|
-
return n ?
|
|
337
|
+
return n ? Pt(
|
|
321
338
|
r,
|
|
322
|
-
|
|
339
|
+
m(r)
|
|
323
340
|
) : e;
|
|
324
|
-
}, "applyTreeGridDefaultHeaderPanelRowSpanLayout"),
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
), "isTreeGridJsonCheckboxSelectionLayout"),
|
|
341
|
+
}, "applyTreeGridDefaultHeaderPanelRowSpanLayout"), vt = /* @__PURE__ */ s((e) => Ie(
|
|
342
|
+
se(e, "Selecting"),
|
|
343
|
+
se(e, "SelectingSingle")
|
|
344
|
+
), "isTreeGridJsonCheckboxSelectionLayout"), Ut = /* @__PURE__ */ s((e) => Ie(
|
|
328
345
|
e.Selecting,
|
|
329
346
|
e.SelectingSingle
|
|
330
|
-
), "isTreeGridXmlCheckboxSelectionLayout"),
|
|
331
|
-
if (t.gridOpenTagEndIndex === void 0 || !
|
|
347
|
+
), "isTreeGridXmlCheckboxSelectionLayout"), Ft = /* @__PURE__ */ s((e) => !B(e.Selecting), "isTreeGridXmlSelectingLayout"), Bt = /* @__PURE__ */ s((e) => K(e.Undo, "1") && K(e.Deleting, "2") && K(e.Selecting, "0"), "isTreeGridXmlDeletePanelDefaultLayout"), dr = /* @__PURE__ */ s((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlCellClickActionInsertionIndex"), ur = /* @__PURE__ */ s((e, t) => {
|
|
348
|
+
if (t.gridOpenTagEndIndex === void 0 || !Ft(t.cfgValues) || /\bOnClickCell\s*=/i.test(e))
|
|
332
349
|
return e;
|
|
333
350
|
const n = t.defaultActionsTag;
|
|
334
351
|
if (n) {
|
|
335
|
-
const
|
|
352
|
+
const o = N(
|
|
336
353
|
n.tag,
|
|
337
|
-
|
|
354
|
+
ee
|
|
338
355
|
);
|
|
339
|
-
return
|
|
356
|
+
return o === n.tag ? e : `${e.slice(0, n.index)}${o}${e.slice(
|
|
340
357
|
n.index + n.tag.length
|
|
341
358
|
)}`;
|
|
342
359
|
}
|
|
343
|
-
const r =
|
|
360
|
+
const r = dr(t);
|
|
344
361
|
return r === void 0 ? e : `${e.slice(0, r)}
|
|
345
362
|
<Actions OnClickCell="Focus" />${e.slice(
|
|
346
363
|
r
|
|
347
364
|
)}`;
|
|
348
|
-
}, "applyTreeGridXmlDefaultCellClickActionLayout"),
|
|
349
|
-
if (t.gridOpenTagEndIndex === void 0 || !
|
|
365
|
+
}, "applyTreeGridXmlDefaultCellClickActionLayout"), fr = /* @__PURE__ */ s((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlSelectAllPanelActionInsertionIndex"), ar = /* @__PURE__ */ s((e, t) => {
|
|
366
|
+
if (t.gridOpenTagEndIndex === void 0 || !Ut(t.cfgValues) || /\bOnClickPanelSelectAll\s*=/i.test(e))
|
|
350
367
|
return e;
|
|
351
368
|
const n = t.defaultActionsTag;
|
|
352
369
|
if (n) {
|
|
353
|
-
const
|
|
370
|
+
const o = N(
|
|
354
371
|
n.tag,
|
|
355
|
-
|
|
372
|
+
te
|
|
356
373
|
);
|
|
357
|
-
return
|
|
374
|
+
return o === n.tag ? e : `${e.slice(0, n.index)}${o}${e.slice(
|
|
358
375
|
n.index + n.tag.length
|
|
359
376
|
)}`;
|
|
360
377
|
}
|
|
361
|
-
const r =
|
|
378
|
+
const r = fr(t);
|
|
362
379
|
return r === void 0 ? e : `${e.slice(
|
|
363
380
|
0,
|
|
364
381
|
r
|
|
@@ -366,33 +383,33 @@ const Ns = 300, En = 3, Cn = {
|
|
|
366
383
|
<Actions OnClickPanelSelectAll="SelectAll OR DeselectAll" />${e.slice(
|
|
367
384
|
r
|
|
368
385
|
)}`;
|
|
369
|
-
}, "applyTreeGridXmlDefaultSelectAllPanelActionLayout"),
|
|
370
|
-
if (t.gridOpenTagEndIndex === void 0 || !
|
|
386
|
+
}, "applyTreeGridXmlDefaultSelectAllPanelActionLayout"), Tr = /* @__PURE__ */ s((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlDeletePanelInsertionIndex"), Sr = /* @__PURE__ */ s((e, t) => {
|
|
387
|
+
if (t.gridOpenTagEndIndex === void 0 || !Bt(t.cfgValues))
|
|
371
388
|
return e;
|
|
372
389
|
const n = t.defaultPanelTag;
|
|
373
390
|
if (n) {
|
|
374
|
-
const c =
|
|
391
|
+
const c = N(
|
|
375
392
|
n.tag,
|
|
376
|
-
|
|
393
|
+
Vn
|
|
377
394
|
);
|
|
378
395
|
return c === n.tag ? e : `${e.slice(0, n.index)}${c}${e.slice(
|
|
379
396
|
n.index + n.tag.length
|
|
380
397
|
)}`;
|
|
381
398
|
}
|
|
382
|
-
const r =
|
|
399
|
+
const r = Tr(t);
|
|
383
400
|
return r === void 0 ? e : `${e.slice(0, r)}
|
|
384
401
|
<Panel Visible="1" CanHide="0" Delete="1" Width="33" />${e.slice(
|
|
385
402
|
r
|
|
386
403
|
)}`;
|
|
387
|
-
}, "applyTreeGridXmlDefaultDeletePanelLayout"),
|
|
388
|
-
if (t.hasFastPanel || !
|
|
404
|
+
}, "applyTreeGridXmlDefaultDeletePanelLayout"), Rr = /* @__PURE__ */ s((e, t) => {
|
|
405
|
+
if (t.hasFastPanel || !Ut(t.cfgValues))
|
|
389
406
|
return e;
|
|
390
407
|
const n = t.gridOpenTagEndIndex;
|
|
391
408
|
return n === void 0 ? e : `${e.slice(0, n)}
|
|
392
409
|
<Cfg FastPanel="0" />${e.slice(
|
|
393
410
|
n
|
|
394
411
|
)}`;
|
|
395
|
-
}, "applyTreeGridXmlDefaultFastPanelLayout"),
|
|
412
|
+
}, "applyTreeGridXmlDefaultFastPanelLayout"), pr = /* @__PURE__ */ s((e) => {
|
|
396
413
|
const t = e.Cfg;
|
|
397
414
|
if (Array.isArray(t)) {
|
|
398
415
|
t.some((n) => G(n) && "FastPanel" in n) || (e.Cfg = [{ FastPanel: 0 }, ...t]);
|
|
@@ -403,61 +420,61 @@ const Ns = 300, En = 3, Cn = {
|
|
|
403
420
|
return;
|
|
404
421
|
}
|
|
405
422
|
e.Cfg = { FastPanel: 0 };
|
|
406
|
-
}, "applyTreeGridJsonFastPanelDefault"),
|
|
423
|
+
}, "applyTreeGridJsonFastPanelDefault"), Er = /* @__PURE__ */ s((e) => {
|
|
407
424
|
const t = e.Actions;
|
|
408
425
|
if (Array.isArray(t)) {
|
|
409
426
|
t.some(
|
|
410
427
|
(n) => G(n) && "OnClickPanelSelectAll" in n
|
|
411
|
-
) || (e.Actions = [{ ...
|
|
428
|
+
) || (e.Actions = [{ ...te }, ...t]);
|
|
412
429
|
return;
|
|
413
430
|
}
|
|
414
431
|
if (G(t)) {
|
|
415
|
-
"OnClickPanelSelectAll" in t || (t.OnClickPanelSelectAll =
|
|
432
|
+
"OnClickPanelSelectAll" in t || (t.OnClickPanelSelectAll = te.OnClickPanelSelectAll);
|
|
416
433
|
return;
|
|
417
434
|
}
|
|
418
|
-
t === void 0 && (e.Actions = { ...
|
|
419
|
-
}, "applyTreeGridJsonSelectAllPanelActionDefault"),
|
|
435
|
+
t === void 0 && (e.Actions = { ...te });
|
|
436
|
+
}, "applyTreeGridJsonSelectAllPanelActionDefault"), Cr = /* @__PURE__ */ s((e) => {
|
|
420
437
|
const t = e.Actions;
|
|
421
438
|
if (Array.isArray(t)) {
|
|
422
|
-
t.some((n) => G(n) && "OnClickCell" in n) || (e.Actions = [{ ...
|
|
439
|
+
t.some((n) => G(n) && "OnClickCell" in n) || (e.Actions = [{ ...ee }, ...t]);
|
|
423
440
|
return;
|
|
424
441
|
}
|
|
425
442
|
if (G(t)) {
|
|
426
|
-
"OnClickCell" in t || (t.OnClickCell =
|
|
443
|
+
"OnClickCell" in t || (t.OnClickCell = ee.OnClickCell);
|
|
427
444
|
return;
|
|
428
445
|
}
|
|
429
|
-
t === void 0 && (e.Actions = { ...
|
|
430
|
-
}, "applyTreeGridJsonCellClickActionDefault"),
|
|
446
|
+
t === void 0 && (e.Actions = { ...ee });
|
|
447
|
+
}, "applyTreeGridJsonCellClickActionDefault"), Gr = /* @__PURE__ */ s((e) => {
|
|
431
448
|
try {
|
|
432
449
|
const t = JSON.parse(e);
|
|
433
|
-
return !G(t) ||
|
|
450
|
+
return !G(t) || B(se(t, "Selecting")) ? e : (Cr(t), JSON.stringify(t));
|
|
434
451
|
} catch {
|
|
435
452
|
return e;
|
|
436
453
|
}
|
|
437
|
-
}, "applyTreeGridJsonDefaultCellClickActionLayout"),
|
|
454
|
+
}, "applyTreeGridJsonDefaultCellClickActionLayout"), nt = /* @__PURE__ */ s((e, t) => {
|
|
438
455
|
const n = e.trim();
|
|
439
|
-
return n ? n.startsWith("{") ?
|
|
456
|
+
return n ? n.startsWith("{") ? Gr(e) : ur(
|
|
440
457
|
e,
|
|
441
|
-
t ??
|
|
458
|
+
t ?? m(e)
|
|
442
459
|
) : e;
|
|
443
|
-
}, "applyTreeGridDefaultCellClickActionLayout"),
|
|
460
|
+
}, "applyTreeGridDefaultCellClickActionLayout"), hr = /* @__PURE__ */ s((e) => {
|
|
444
461
|
try {
|
|
445
462
|
const t = JSON.parse(e);
|
|
446
|
-
return !G(t) || !
|
|
463
|
+
return !G(t) || !vt(t) ? e : (Er(t), JSON.stringify(t));
|
|
447
464
|
} catch {
|
|
448
465
|
return e;
|
|
449
466
|
}
|
|
450
|
-
}, "applyTreeGridJsonDefaultSelectAllPanelActionLayout"),
|
|
467
|
+
}, "applyTreeGridJsonDefaultSelectAllPanelActionLayout"), rt = /* @__PURE__ */ s((e, t) => {
|
|
451
468
|
const n = e.trim();
|
|
452
|
-
return n ? n.startsWith("{") ?
|
|
469
|
+
return n ? n.startsWith("{") ? hr(e) : ar(
|
|
453
470
|
e,
|
|
454
|
-
t ??
|
|
471
|
+
t ?? m(e)
|
|
455
472
|
) : e;
|
|
456
|
-
}, "applyTreeGridDefaultSelectAllPanelActionLayout"),
|
|
457
|
-
const t =
|
|
458
|
-
|
|
473
|
+
}, "applyTreeGridDefaultSelectAllPanelActionLayout"), Ar = /* @__PURE__ */ s((e) => {
|
|
474
|
+
const t = xt(
|
|
475
|
+
Qn(e, Lt)
|
|
459
476
|
);
|
|
460
|
-
if (!
|
|
477
|
+
if (!It(t))
|
|
461
478
|
return;
|
|
462
479
|
const n = e.Cfg;
|
|
463
480
|
if (Array.isArray(n)) {
|
|
@@ -470,22 +487,22 @@ const Ns = 300, En = 3, Cn = {
|
|
|
470
487
|
return;
|
|
471
488
|
}
|
|
472
489
|
e.Cfg = t;
|
|
473
|
-
}, "applyTreeGridJsonStableScrollbarDefaults"),
|
|
490
|
+
}, "applyTreeGridJsonStableScrollbarDefaults"), gr = /* @__PURE__ */ s((e) => {
|
|
474
491
|
try {
|
|
475
492
|
const t = JSON.parse(e);
|
|
476
|
-
return G(t) ? (
|
|
493
|
+
return G(t) ? (Ar(t), JSON.stringify(t)) : e;
|
|
477
494
|
} catch {
|
|
478
495
|
return e;
|
|
479
496
|
}
|
|
480
|
-
}, "applyTreeGridJsonStableScrollbarDefaultLayout"),
|
|
481
|
-
const n =
|
|
497
|
+
}, "applyTreeGridJsonStableScrollbarDefaultLayout"), _r = /* @__PURE__ */ s((e, t) => {
|
|
498
|
+
const n = xt(
|
|
482
499
|
t.cfgValues
|
|
483
500
|
);
|
|
484
|
-
if (!
|
|
501
|
+
if (!It(n))
|
|
485
502
|
return e;
|
|
486
503
|
const r = t.defaultCfgTag;
|
|
487
504
|
if (r) {
|
|
488
|
-
const d =
|
|
505
|
+
const d = N(
|
|
489
506
|
r.tag,
|
|
490
507
|
n
|
|
491
508
|
);
|
|
@@ -493,149 +510,149 @@ const Ns = 300, En = 3, Cn = {
|
|
|
493
510
|
r.index + r.tag.length
|
|
494
511
|
)}`;
|
|
495
512
|
}
|
|
496
|
-
const
|
|
497
|
-
if (
|
|
513
|
+
const o = t.gridOpenTagEndIndex;
|
|
514
|
+
if (o === void 0)
|
|
498
515
|
return e;
|
|
499
|
-
const c =
|
|
516
|
+
const c = N(
|
|
500
517
|
"<Cfg />",
|
|
501
518
|
n
|
|
502
519
|
);
|
|
503
|
-
return `${e.slice(0,
|
|
520
|
+
return `${e.slice(0, o)}
|
|
504
521
|
${c}${e.slice(
|
|
505
|
-
|
|
522
|
+
o
|
|
506
523
|
)}`;
|
|
507
|
-
}, "applyTreeGridXmlStableScrollbarDefaultLayout"),
|
|
524
|
+
}, "applyTreeGridXmlStableScrollbarDefaultLayout"), mr = /* @__PURE__ */ s((e) => {
|
|
508
525
|
const t = e.trim();
|
|
509
|
-
return t ? t.startsWith("{") ?
|
|
526
|
+
return t ? t.startsWith("{") ? gr(e) : _r(
|
|
510
527
|
e,
|
|
511
|
-
|
|
528
|
+
m(e)
|
|
512
529
|
) : e;
|
|
513
|
-
}, "applyTreeGridStableScrollbarDefaultLayout"),
|
|
530
|
+
}, "applyTreeGridStableScrollbarDefaultLayout"), st = /* @__PURE__ */ s((e) => {
|
|
514
531
|
const t = e.Text;
|
|
515
532
|
if (Array.isArray(t)) {
|
|
516
533
|
const n = t.find(G);
|
|
517
|
-
n ? Object.assign(n,
|
|
534
|
+
n ? Object.assign(n, $) : e.Text = [{ ...$ }, ...t];
|
|
518
535
|
return;
|
|
519
536
|
}
|
|
520
537
|
if (G(t)) {
|
|
521
|
-
Object.assign(t,
|
|
538
|
+
Object.assign(t, $);
|
|
522
539
|
return;
|
|
523
540
|
}
|
|
524
|
-
e.Text = {
|
|
525
|
-
}, "applyTreeGridJsonLangPageMessageTextDefaults"),
|
|
541
|
+
e.Text = { ...$ };
|
|
542
|
+
}, "applyTreeGridJsonLangPageMessageTextDefaults"), Or = /* @__PURE__ */ s((e) => {
|
|
526
543
|
const t = e.Lang;
|
|
527
544
|
if (Array.isArray(t)) {
|
|
528
545
|
const n = t.find(G);
|
|
529
|
-
n ?
|
|
546
|
+
n ? st(n) : e.Lang = [{ Text: { ...$ } }, ...t];
|
|
530
547
|
return;
|
|
531
548
|
}
|
|
532
549
|
if (G(t)) {
|
|
533
|
-
|
|
550
|
+
st(t);
|
|
534
551
|
return;
|
|
535
552
|
}
|
|
536
|
-
e.Lang = { Text: {
|
|
537
|
-
}, "applyTreeGridJsonPageMessageTextDefaults"),
|
|
553
|
+
e.Lang = { Text: { ...$ } };
|
|
554
|
+
}, "applyTreeGridJsonPageMessageTextDefaults"), Lr = /* @__PURE__ */ s((e) => {
|
|
538
555
|
try {
|
|
539
556
|
const t = JSON.parse(e);
|
|
540
|
-
return G(t) ? (
|
|
557
|
+
return G(t) ? (Or(t), JSON.stringify(t)) : e;
|
|
541
558
|
} catch {
|
|
542
559
|
return e;
|
|
543
560
|
}
|
|
544
|
-
}, "applyTreeGridJsonPageMessageTextLayout"),
|
|
561
|
+
}, "applyTreeGridJsonPageMessageTextLayout"), Ce = /* @__PURE__ */ s(() => Y("<Text />", $), "createTreeGridXmlPageMessageTextTag"), wr = /* @__PURE__ */ s((e) => {
|
|
545
562
|
let t = !1;
|
|
546
563
|
const n = e.replace(
|
|
547
564
|
/(<Lang\b[^>]*>)([\s\S]*?)(<\/Lang>)/i,
|
|
548
|
-
(r,
|
|
565
|
+
(r, o, c, d) => {
|
|
549
566
|
if (t = !0, /<Text\b/i.test(c)) {
|
|
550
567
|
const u = c.replace(
|
|
551
568
|
/<Text\b[^>]*(?:\/>|>)/i,
|
|
552
|
-
(T) =>
|
|
569
|
+
(T) => Y(T, $)
|
|
553
570
|
);
|
|
554
|
-
return `${
|
|
571
|
+
return `${o}${u}${d}`;
|
|
555
572
|
}
|
|
556
|
-
return `${
|
|
557
|
-
${
|
|
573
|
+
return `${o}
|
|
574
|
+
${Ce()}${c}${d}`;
|
|
558
575
|
}
|
|
559
576
|
);
|
|
560
577
|
return t ? n : e.replace(/<Lang\b[^>]*\/>/i, (r) => (t = !0, `${r.replace(/\s*\/>$/, ">")}
|
|
561
|
-
${
|
|
578
|
+
${Ce()}
|
|
562
579
|
</Lang>`));
|
|
563
|
-
}, "applyTreeGridXmlPageMessageTextToLangLayout"),
|
|
564
|
-
const t =
|
|
580
|
+
}, "applyTreeGridXmlPageMessageTextToLangLayout"), xr = /* @__PURE__ */ s((e) => {
|
|
581
|
+
const t = wr(e);
|
|
565
582
|
if (t !== e)
|
|
566
583
|
return t;
|
|
567
|
-
const n =
|
|
584
|
+
const n = m(e), r = n.lastCfgEndIndex ?? n.gridOpenTagEndIndex;
|
|
568
585
|
return r === void 0 ? e : `${e.slice(0, r)}
|
|
569
586
|
<Lang>
|
|
570
|
-
${
|
|
587
|
+
${Ce()}
|
|
571
588
|
</Lang>${e.slice(
|
|
572
589
|
r
|
|
573
590
|
)}`;
|
|
574
|
-
}, "applyTreeGridXmlPageMessageTextLayout"),
|
|
591
|
+
}, "applyTreeGridXmlPageMessageTextLayout"), Ir = /* @__PURE__ */ s((e) => {
|
|
575
592
|
const t = e.trim();
|
|
576
|
-
return t ? t.startsWith("{") ?
|
|
577
|
-
}, "applyTreeGridPageMessageTextLayout"),
|
|
593
|
+
return t ? t.startsWith("{") ? Lr(e) : xr(e) : e;
|
|
594
|
+
}, "applyTreeGridPageMessageTextLayout"), br = /* @__PURE__ */ s((e, t) => {
|
|
578
595
|
if (t === void 0)
|
|
579
596
|
return e;
|
|
580
597
|
try {
|
|
581
598
|
const n = JSON.parse(e);
|
|
582
599
|
if (!G(n))
|
|
583
600
|
return e;
|
|
584
|
-
const r =
|
|
585
|
-
return r.some((
|
|
601
|
+
const r = wt(n);
|
|
602
|
+
return r.some((o) => "SuppressCfg" in o) ? e : (r[0] ? r[0].SuppressCfg = t : n.Cfg = { SuppressCfg: t }, JSON.stringify(n));
|
|
586
603
|
} catch {
|
|
587
604
|
return e;
|
|
588
605
|
}
|
|
589
|
-
}, "applyTreeGridJsonDefaultSuppressCfgLayout"),
|
|
606
|
+
}, "applyTreeGridJsonDefaultSuppressCfgLayout"), Dr = /* @__PURE__ */ s((e, t, n) => {
|
|
590
607
|
if (n === void 0 || t.cfgValues.SuppressCfg !== void 0)
|
|
591
608
|
return e;
|
|
592
609
|
const r = t.defaultCfgTag;
|
|
593
610
|
if (r) {
|
|
594
|
-
const c =
|
|
611
|
+
const c = z(r.tag, "SuppressCfg", n);
|
|
595
612
|
return `${e.slice(0, r.index)}${c}${e.slice(
|
|
596
613
|
r.index + r.tag.length
|
|
597
614
|
)}`;
|
|
598
615
|
}
|
|
599
|
-
const
|
|
600
|
-
return
|
|
616
|
+
const o = t.gridOpenTagEndIndex;
|
|
617
|
+
return o === void 0 ? e : `${e.slice(0, o)}
|
|
601
618
|
<Cfg SuppressCfg="${n}" />${e.slice(
|
|
602
|
-
|
|
619
|
+
o
|
|
603
620
|
)}`;
|
|
604
|
-
}, "applyTreeGridXmlDefaultSuppressCfgLayout"),
|
|
621
|
+
}, "applyTreeGridXmlDefaultSuppressCfgLayout"), yr = /* @__PURE__ */ s((e, t) => {
|
|
605
622
|
const n = e.trim();
|
|
606
|
-
return t === void 0 || !n ? e : n.startsWith("{") ?
|
|
623
|
+
return t === void 0 || !n ? e : n.startsWith("{") ? br(e, t) : Dr(
|
|
607
624
|
e,
|
|
608
|
-
|
|
625
|
+
m(e),
|
|
609
626
|
t
|
|
610
627
|
);
|
|
611
|
-
}, "applyTreeGridDefaultSuppressCfgLayout"),
|
|
612
|
-
const t = e.Toolbar, n = e.Solid, r = Array.isArray(t) ? t.filter(G) : G(t) ? [t] : [],
|
|
613
|
-
(c) => G(c) &&
|
|
614
|
-
) : G(n) &&
|
|
615
|
-
return [...r, ...
|
|
616
|
-
}, "getTreeGridJsonToolbarRecords"),
|
|
628
|
+
}, "applyTreeGridDefaultSuppressCfgLayout"), $r = /* @__PURE__ */ s((e) => Ot.some((t) => t in e), "hasTreeGridToolbarFormulaField"), Pr = /* @__PURE__ */ s((e) => {
|
|
629
|
+
const t = e.Toolbar, n = e.Solid, r = Array.isArray(t) ? t.filter(G) : G(t) ? [t] : [], o = Array.isArray(n) ? n.filter(
|
|
630
|
+
(c) => G(c) && K(c.Kind, "Toolbar")
|
|
631
|
+
) : G(n) && K(n.Kind, "Toolbar") ? [n] : [];
|
|
632
|
+
return [...r, ...o];
|
|
633
|
+
}, "getTreeGridJsonToolbarRecords"), vr = /* @__PURE__ */ s((e, t) => {
|
|
617
634
|
if (!t)
|
|
618
635
|
return e;
|
|
619
636
|
try {
|
|
620
637
|
const n = JSON.parse(e);
|
|
621
638
|
if (!G(n))
|
|
622
639
|
return e;
|
|
623
|
-
const r =
|
|
624
|
-
return r.some(
|
|
640
|
+
const r = Pr(n);
|
|
641
|
+
return r.some($r) ? e : (r[0] ? r[0].FormulaFormula = t : n.Toolbar = { FormulaFormula: t }, JSON.stringify(n));
|
|
625
642
|
} catch {
|
|
626
643
|
return e;
|
|
627
644
|
}
|
|
628
|
-
}, "applyTreeGridJsonDefaultToolbarTotalCountLayout"),
|
|
629
|
-
(t) =>
|
|
630
|
-
), "hasTreeGridXmlToolbarFormulaAttribute"),
|
|
645
|
+
}, "applyTreeGridJsonDefaultToolbarTotalCountLayout"), Ur = /* @__PURE__ */ s((e) => Ot.some(
|
|
646
|
+
(t) => J(e, t)
|
|
647
|
+
), "hasTreeGridXmlToolbarFormulaAttribute"), Fr = /* @__PURE__ */ s((e, t) => {
|
|
631
648
|
if (!t)
|
|
632
649
|
return e;
|
|
633
|
-
const n =
|
|
650
|
+
const n = zn.exec(e);
|
|
634
651
|
if (n) {
|
|
635
652
|
const d = n[0];
|
|
636
|
-
if (
|
|
653
|
+
if (Ur(d))
|
|
637
654
|
return e;
|
|
638
|
-
const u =
|
|
655
|
+
const u = Ee(
|
|
639
656
|
d,
|
|
640
657
|
"Formula",
|
|
641
658
|
t
|
|
@@ -644,111 +661,111 @@ const Ns = 300, En = 3, Cn = {
|
|
|
644
661
|
n.index + d.length
|
|
645
662
|
)}`;
|
|
646
663
|
}
|
|
647
|
-
const r =
|
|
664
|
+
const r = Ee(
|
|
648
665
|
"<Toolbar />",
|
|
649
666
|
"Formula",
|
|
650
667
|
t
|
|
651
|
-
),
|
|
652
|
-
if (
|
|
653
|
-
return `${e.slice(0,
|
|
668
|
+
), o = Kn.exec(e);
|
|
669
|
+
if (o)
|
|
670
|
+
return `${e.slice(0, o.index)} ${r}
|
|
654
671
|
${e.slice(
|
|
655
|
-
|
|
672
|
+
o.index
|
|
656
673
|
)}`;
|
|
657
|
-
const c =
|
|
674
|
+
const c = Hn.exec(e);
|
|
658
675
|
return c ? `${e.slice(
|
|
659
676
|
0,
|
|
660
677
|
c.index + c[0].length
|
|
661
678
|
)}
|
|
662
679
|
${r}${e.slice(c.index + c[0].length)}` : e;
|
|
663
|
-
}, "applyTreeGridXmlDefaultToolbarTotalCountLayout"),
|
|
680
|
+
}, "applyTreeGridXmlDefaultToolbarTotalCountLayout"), Br = /* @__PURE__ */ s((e, t) => {
|
|
664
681
|
const n = e.trim();
|
|
665
|
-
return !t || !n ? e : n.startsWith("{") ?
|
|
682
|
+
return !t || !n ? e : n.startsWith("{") ? vr(
|
|
666
683
|
e,
|
|
667
684
|
t
|
|
668
|
-
) :
|
|
669
|
-
}, "applyTreeGridDefaultToolbarTotalCountLayout"),
|
|
685
|
+
) : Fr(e, t);
|
|
686
|
+
}, "applyTreeGridDefaultToolbarTotalCountLayout"), Nr = /* @__PURE__ */ s((e) => {
|
|
670
687
|
try {
|
|
671
688
|
const t = JSON.parse(e);
|
|
672
|
-
return !G(t) || !
|
|
689
|
+
return !G(t) || !vt(t) ? e : (pr(t), JSON.stringify(t));
|
|
673
690
|
} catch {
|
|
674
691
|
return e;
|
|
675
692
|
}
|
|
676
|
-
}, "applyTreeGridJsonDefaultFastPanelLayout"),
|
|
693
|
+
}, "applyTreeGridJsonDefaultFastPanelLayout"), ot = /* @__PURE__ */ s((e, t) => {
|
|
677
694
|
const n = e.trim();
|
|
678
|
-
return n ? n.startsWith("{") ? /\bFastPanel\s*[:=]/i.test(e) ? e :
|
|
695
|
+
return n ? n.startsWith("{") ? /\bFastPanel\s*[:=]/i.test(e) ? e : Nr(e) : Rr(
|
|
679
696
|
e,
|
|
680
|
-
t ??
|
|
697
|
+
t ?? m(e)
|
|
681
698
|
) : e;
|
|
682
|
-
}, "applyTreeGridDefaultFastPanelLayout"),
|
|
699
|
+
}, "applyTreeGridDefaultFastPanelLayout"), Mr = /* @__PURE__ */ s((e) => {
|
|
683
700
|
const t = e.Animations;
|
|
684
701
|
if (Array.isArray(t)) {
|
|
685
702
|
const n = t.find(G);
|
|
686
|
-
n ?
|
|
703
|
+
n ? tt(
|
|
687
704
|
n,
|
|
688
|
-
|
|
705
|
+
W
|
|
689
706
|
) : e.Animations = [
|
|
690
|
-
{ ...
|
|
707
|
+
{ ...W },
|
|
691
708
|
...t
|
|
692
709
|
];
|
|
693
710
|
return;
|
|
694
711
|
}
|
|
695
712
|
if (G(t)) {
|
|
696
|
-
|
|
713
|
+
tt(
|
|
697
714
|
t,
|
|
698
|
-
|
|
715
|
+
W
|
|
699
716
|
);
|
|
700
717
|
return;
|
|
701
718
|
}
|
|
702
|
-
t === void 0 && (e.Animations = { ...
|
|
703
|
-
}, "applyTreeGridJsonDefaultAnimationDefaults"),
|
|
719
|
+
t === void 0 && (e.Animations = { ...W });
|
|
720
|
+
}, "applyTreeGridJsonDefaultAnimationDefaults"), Vr = /* @__PURE__ */ s((e) => {
|
|
704
721
|
try {
|
|
705
722
|
const t = JSON.parse(e);
|
|
706
|
-
return G(t) ? (
|
|
723
|
+
return G(t) ? (Mr(t), JSON.stringify(t)) : e;
|
|
707
724
|
} catch {
|
|
708
725
|
return e;
|
|
709
726
|
}
|
|
710
|
-
}, "applyTreeGridJsonDefaultAnimationLayout"),
|
|
727
|
+
}, "applyTreeGridJsonDefaultAnimationLayout"), kr = /* @__PURE__ */ s(() => Y(
|
|
711
728
|
"<Animations />",
|
|
712
|
-
|
|
713
|
-
), "createTreeGridDefaultAnimationsTag"),
|
|
714
|
-
const n =
|
|
729
|
+
W
|
|
730
|
+
), "createTreeGridDefaultAnimationsTag"), Xr = /* @__PURE__ */ s((e, t) => {
|
|
731
|
+
const n = m(e);
|
|
715
732
|
if (n.gridOpenTagEndIndex === void 0)
|
|
716
733
|
return e;
|
|
717
734
|
const r = n.animationsTag;
|
|
718
735
|
if (r) {
|
|
719
|
-
const c =
|
|
736
|
+
const c = N(
|
|
720
737
|
r.tag,
|
|
721
|
-
|
|
738
|
+
W
|
|
722
739
|
);
|
|
723
740
|
return c === r.tag ? e : `${e.slice(0, r.index)}${c}${e.slice(
|
|
724
741
|
r.index + r.tag.length
|
|
725
742
|
)}`;
|
|
726
743
|
}
|
|
727
|
-
const
|
|
728
|
-
return `${e.slice(0,
|
|
729
|
-
${
|
|
730
|
-
|
|
744
|
+
const o = n.lastCfgEndIndex ?? n.gridOpenTagEndIndex;
|
|
745
|
+
return `${e.slice(0, o)}
|
|
746
|
+
${kr()}${e.slice(
|
|
747
|
+
o
|
|
731
748
|
)}`;
|
|
732
|
-
}, "applyTreeGridXmlDefaultAnimationLayout"),
|
|
749
|
+
}, "applyTreeGridXmlDefaultAnimationLayout"), it = /* @__PURE__ */ s((e, t) => {
|
|
733
750
|
const n = e.trim();
|
|
734
|
-
return n ? n.startsWith("{") ?
|
|
735
|
-
}, "applyTreeGridDefaultAnimationLayout"),
|
|
751
|
+
return n ? n.startsWith("{") ? Vr(e) : Xr(e) : e;
|
|
752
|
+
}, "applyTreeGridDefaultAnimationLayout"), Wr = /* @__PURE__ */ s((e) => {
|
|
736
753
|
const t = {};
|
|
737
754
|
return e == null || e.forEach((n) => {
|
|
738
755
|
var r;
|
|
739
|
-
(r =
|
|
740
|
-
t[
|
|
756
|
+
(r = qn[n]) == null || r.forEach((o) => {
|
|
757
|
+
t[o] = "";
|
|
741
758
|
});
|
|
742
759
|
}), t;
|
|
743
|
-
}, "getTreeGridDisabledAnimationAttributes"),
|
|
760
|
+
}, "getTreeGridDisabledAnimationAttributes"), Jr = /* @__PURE__ */ s((e, t) => {
|
|
744
761
|
try {
|
|
745
762
|
const n = JSON.parse(e);
|
|
746
763
|
if (!G(n))
|
|
747
764
|
return e;
|
|
748
765
|
const r = n.Animations;
|
|
749
766
|
if (Array.isArray(r)) {
|
|
750
|
-
const
|
|
751
|
-
|
|
767
|
+
const o = r.find(G);
|
|
768
|
+
o ? Object.assign(o, t) : r.unshift({ ...t });
|
|
752
769
|
} else if (G(r))
|
|
753
770
|
Object.assign(r, t);
|
|
754
771
|
else if (r === void 0)
|
|
@@ -759,169 +776,186 @@ ${e.slice(
|
|
|
759
776
|
} catch {
|
|
760
777
|
return e;
|
|
761
778
|
}
|
|
762
|
-
}, "applyTreeGridJsonDisabledAnimationsLayout"),
|
|
763
|
-
const n =
|
|
779
|
+
}, "applyTreeGridJsonDisabledAnimationsLayout"), jr = /* @__PURE__ */ s((e) => Y("<Animations />", e), "createTreeGridDisabledAnimationsTag"), Hr = /* @__PURE__ */ s((e, t) => {
|
|
780
|
+
const n = m(e);
|
|
764
781
|
if (n.gridOpenTagEndIndex === void 0)
|
|
765
782
|
return e;
|
|
766
783
|
const r = n.animationsTag;
|
|
767
784
|
if (r) {
|
|
768
|
-
const c =
|
|
785
|
+
const c = Y(r.tag, t);
|
|
769
786
|
return c === r.tag ? e : `${e.slice(0, r.index)}${c}${e.slice(
|
|
770
787
|
r.index + r.tag.length
|
|
771
788
|
)}`;
|
|
772
789
|
}
|
|
773
|
-
const
|
|
774
|
-
return `${e.slice(0,
|
|
775
|
-
${
|
|
790
|
+
const o = n.lastCfgEndIndex ?? n.gridOpenTagEndIndex;
|
|
791
|
+
return `${e.slice(0, o)}
|
|
792
|
+
${jr(
|
|
776
793
|
t
|
|
777
|
-
)}${e.slice(
|
|
778
|
-
}, "applyTreeGridXmlDisabledAnimationsLayout"),
|
|
779
|
-
const n =
|
|
794
|
+
)}${e.slice(o)}`;
|
|
795
|
+
}, "applyTreeGridXmlDisabledAnimationsLayout"), ct = /* @__PURE__ */ s((e, t) => {
|
|
796
|
+
const n = Wr(t);
|
|
780
797
|
if (!Object.keys(n).length)
|
|
781
798
|
return e;
|
|
782
799
|
const r = e.trim();
|
|
783
|
-
return r ? r.startsWith("{") ?
|
|
784
|
-
}, "applyTreeGridDisabledAnimationsLayout"),
|
|
785
|
-
const
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
800
|
+
return r ? r.startsWith("{") ? Jr(e, n) : Hr(e, n) : e;
|
|
801
|
+
}, "applyTreeGridDisabledAnimationsLayout"), Kr = /* @__PURE__ */ s((e) => (e == null ? void 0 : e.join("")) ?? "", "getTreeGridDisabledAnimationsCacheKey"), zr = /* @__PURE__ */ s((e, t, n, r) => {
|
|
802
|
+
const o = Br(
|
|
803
|
+
Ir(
|
|
804
|
+
cr(
|
|
805
|
+
lr(
|
|
806
|
+
mr(
|
|
807
|
+
yr(e, r)
|
|
791
808
|
)
|
|
792
809
|
)
|
|
793
810
|
)
|
|
794
811
|
),
|
|
795
812
|
n
|
|
796
|
-
), c =
|
|
813
|
+
), c = o.trim();
|
|
797
814
|
if (!c || c.startsWith("{"))
|
|
798
|
-
return
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
815
|
+
return ct(
|
|
816
|
+
it(
|
|
817
|
+
ot(
|
|
818
|
+
nt(
|
|
819
|
+
rt(o)
|
|
803
820
|
)
|
|
804
821
|
)
|
|
805
822
|
),
|
|
806
823
|
t
|
|
807
824
|
);
|
|
808
|
-
const d =
|
|
809
|
-
|
|
825
|
+
const d = m(o), u = rt(
|
|
826
|
+
o,
|
|
810
827
|
d
|
|
811
|
-
), T = u ===
|
|
828
|
+
), T = u === o ? d : m(u), E = nt(
|
|
812
829
|
u,
|
|
813
830
|
T
|
|
814
|
-
),
|
|
815
|
-
return
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
831
|
+
), A = E === u ? T : m(E);
|
|
832
|
+
return ct(
|
|
833
|
+
it(
|
|
834
|
+
Sr(
|
|
835
|
+
ot(
|
|
819
836
|
E,
|
|
820
|
-
|
|
837
|
+
A
|
|
821
838
|
),
|
|
822
|
-
|
|
839
|
+
A
|
|
823
840
|
)
|
|
824
841
|
),
|
|
825
842
|
t
|
|
826
843
|
);
|
|
827
|
-
}, "
|
|
844
|
+
}, "createTreeGridDefaultLayout"), Ge = /* @__PURE__ */ s((e, t, n, r) => {
|
|
845
|
+
const o = Kr(t), c = Qe;
|
|
846
|
+
if ((c == null ? void 0 : c.layoutData) === e && c.disabledAnimationsKey === o && c.toolbarTotalCountFormula === n && c.suppressCfg === r)
|
|
847
|
+
return c.result;
|
|
848
|
+
const d = zr(
|
|
849
|
+
e,
|
|
850
|
+
t,
|
|
851
|
+
n,
|
|
852
|
+
r
|
|
853
|
+
);
|
|
854
|
+
return Qe = {
|
|
855
|
+
layoutData: e,
|
|
856
|
+
disabledAnimationsKey: o,
|
|
857
|
+
toolbarTotalCountFormula: n,
|
|
858
|
+
suppressCfg: r,
|
|
859
|
+
result: d
|
|
860
|
+
}, d;
|
|
861
|
+
}, "applyTreeGridDefaultLayout"), Yr = /* @__PURE__ */ s((e) => {
|
|
828
862
|
var t;
|
|
829
|
-
return typeof document > "u" ? null : ((t = document.getElementById(e)) == null ? void 0 : t.closest(`.${
|
|
830
|
-
}, "getTreeGridWrapperElement"),
|
|
863
|
+
return typeof document > "u" ? null : ((t = document.getElementById(e)) == null ? void 0 : t.closest(`.${Cn}`)) ?? null;
|
|
864
|
+
}, "getTreeGridWrapperElement"), qr = /* @__PURE__ */ s((e, t) => {
|
|
831
865
|
var n;
|
|
832
866
|
typeof document > "u" || !t || (document.documentElement.style.setProperty(e, t), (n = document.body) == null || n.style.setProperty(e, t));
|
|
833
|
-
}, "setTreeGridFloatingLayerCssVariable"),
|
|
834
|
-
if (
|
|
867
|
+
}, "setTreeGridFloatingLayerCssVariable"), Zr = /* @__PURE__ */ s((e) => {
|
|
868
|
+
if (re(e.AllSelected))
|
|
835
869
|
return "checked";
|
|
836
|
-
if (
|
|
870
|
+
if (B(e.AllSelected))
|
|
837
871
|
return "unchecked";
|
|
838
872
|
let t = 0, n = 0;
|
|
839
|
-
return
|
|
840
|
-
!C(r) ||
|
|
873
|
+
return j(e).forEach((r) => {
|
|
874
|
+
!C(r) || B(r.CanSelect) || (t += 1, re(e.IsSelected(r)) && (n += 1));
|
|
841
875
|
}), n ? t > 0 && n >= t ? "checked" : "indeterminate" : "unchecked";
|
|
842
|
-
}, "getTreeGridSelectAllState"),
|
|
843
|
-
const n =
|
|
876
|
+
}, "getTreeGridSelectAllState"), he = /* @__PURE__ */ s((e, t) => {
|
|
877
|
+
const n = Yr(t), r = !B(e.Selecting), o = Ie(
|
|
844
878
|
e.Selecting,
|
|
845
879
|
e.SelectingSingle
|
|
846
880
|
), c = e.Header;
|
|
847
881
|
if (n == null || n.classList.toggle(
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
), !
|
|
882
|
+
En,
|
|
883
|
+
o
|
|
884
|
+
), !o)
|
|
851
885
|
n == null || n.classList.remove(
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
886
|
+
Je,
|
|
887
|
+
je,
|
|
888
|
+
He
|
|
855
889
|
);
|
|
856
890
|
else {
|
|
857
|
-
const d =
|
|
891
|
+
const d = Zr(e);
|
|
858
892
|
n == null || n.classList.toggle(
|
|
859
|
-
|
|
893
|
+
Je,
|
|
860
894
|
d === "checked"
|
|
861
895
|
), n == null || n.classList.toggle(
|
|
862
|
-
|
|
896
|
+
je,
|
|
863
897
|
d === "indeterminate"
|
|
864
898
|
), n == null || n.classList.toggle(
|
|
865
|
-
|
|
899
|
+
He,
|
|
866
900
|
d === "unchecked"
|
|
867
901
|
);
|
|
868
902
|
}
|
|
869
|
-
c && r && (c.CanSelect =
|
|
870
|
-
}, "syncTreeGridSelectionPanelState"),
|
|
903
|
+
c && r && (c.CanSelect = o ? 1 : 0);
|
|
904
|
+
}, "syncTreeGridSelectionPanelState"), ue = /* @__PURE__ */ new Map(), lt = /* @__PURE__ */ s((e, t) => {
|
|
871
905
|
if (typeof window > "u")
|
|
872
906
|
return;
|
|
873
|
-
const n =
|
|
907
|
+
const n = ue.get(t);
|
|
874
908
|
n !== void 0 && window.clearTimeout(n);
|
|
875
909
|
const r = window.setTimeout(() => {
|
|
876
|
-
|
|
910
|
+
ue.delete(t), he(e, t);
|
|
877
911
|
}, 0);
|
|
878
|
-
|
|
879
|
-
}, "scheduleTreeGridSelectionPanelStateSync"),
|
|
912
|
+
ue.set(t, r);
|
|
913
|
+
}, "scheduleTreeGridSelectionPanelStateSync"), Qr = /* @__PURE__ */ s((e, t) => {
|
|
880
914
|
e.EnterMode = t;
|
|
881
|
-
const n =
|
|
915
|
+
const n = xn[t];
|
|
882
916
|
if (!n)
|
|
883
917
|
return;
|
|
884
918
|
const r = e;
|
|
885
919
|
r.Actions ?? (r.Actions = {}), r.Actions.OnEnter = n.onEnter, r.Actions.OnEnterEdit = n.onEnterEdit;
|
|
886
|
-
}, "applyTreeGridDefaultEnterMode"),
|
|
920
|
+
}, "applyTreeGridDefaultEnterMode"), Nt = /* @__PURE__ */ s((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), dt = /* @__PURE__ */ new Map(), es = /* @__PURE__ */ s((e) => {
|
|
887
921
|
if (!e || !e.startsWith("data:"))
|
|
888
922
|
return e;
|
|
889
|
-
const t =
|
|
923
|
+
const t = dt.get(e);
|
|
890
924
|
if (t)
|
|
891
925
|
return t;
|
|
892
926
|
try {
|
|
893
|
-
const [n, r = ""] = e.split(",", 2),
|
|
927
|
+
const [n, r = ""] = e.split(",", 2), o = /^data:([^;]*)(;base64)?$/i.exec(n), c = (o == null ? void 0 : o[1]) || "application/octet-stream", d = o != null && o[2] ? atob(r) : decodeURIComponent(r), u = new Uint8Array(d.length);
|
|
894
928
|
for (let E = 0; E < d.length; E += 1)
|
|
895
929
|
u[E] = d.charCodeAt(E);
|
|
896
930
|
const T = URL.createObjectURL(new Blob([u], { type: c }));
|
|
897
|
-
return
|
|
931
|
+
return dt.set(e, T), T;
|
|
898
932
|
} catch {
|
|
899
933
|
return e;
|
|
900
934
|
}
|
|
901
|
-
}, "resolveTreeGridInlineUrl"),
|
|
902
|
-
if (!e ||
|
|
903
|
-
return
|
|
904
|
-
const t = e.indexOf("#"), [n, r] = t >= 0 ? [e.slice(0, t), e.slice(t)] : [e, ""],
|
|
905
|
-
return `${n}${
|
|
906
|
-
}, "appendNoCacheQuery"),
|
|
935
|
+
}, "resolveTreeGridInlineUrl"), Ae = /* @__PURE__ */ s((e) => {
|
|
936
|
+
if (!e || Nt(e))
|
|
937
|
+
return es(e);
|
|
938
|
+
const t = e.indexOf("#"), [n, r] = t >= 0 ? [e.slice(0, t), e.slice(t)] : [e, ""], o = n.includes("?") ? "&" : "?";
|
|
939
|
+
return `${n}${o}noCache=${Date.now()}${r}`;
|
|
940
|
+
}, "appendNoCacheQuery"), ut = /* @__PURE__ */ s((e, t, n) => {
|
|
907
941
|
if (!e)
|
|
908
942
|
return;
|
|
909
|
-
const r = n.canEdit,
|
|
943
|
+
const r = n.canEdit, o = n.editableColumns ?? [], c = n.editableCanEdit, d = n.highlightColumns ?? [], u = n.highlightBackgroundColor;
|
|
910
944
|
if (!(r === void 0 && c === void 0 && !d.length)) {
|
|
911
945
|
typeof e.StartUpdate == "function" && e.StartUpdate();
|
|
912
946
|
try {
|
|
913
947
|
if (r !== void 0 && (t.CanEdit = r), c !== void 0) {
|
|
914
948
|
const T = t;
|
|
915
|
-
|
|
916
|
-
var
|
|
917
|
-
!E || !((
|
|
949
|
+
o.forEach((E) => {
|
|
950
|
+
var A;
|
|
951
|
+
!E || !((A = e.Cols) != null && A[E]) || (T[`${E}CanEdit`] = c);
|
|
918
952
|
});
|
|
919
953
|
}
|
|
920
954
|
d.forEach((T) => {
|
|
921
955
|
T && (e.SetValue(
|
|
922
956
|
t,
|
|
923
957
|
`${T}Class`,
|
|
924
|
-
u ?
|
|
958
|
+
u ? ht : "",
|
|
925
959
|
0
|
|
926
960
|
), e.SetValue(t, `${T}Color`, u ?? "", 0));
|
|
927
961
|
});
|
|
@@ -930,55 +964,60 @@ ${e.slice(
|
|
|
930
964
|
}
|
|
931
965
|
typeof e.RefreshRow == "function" && e.RefreshRow(t);
|
|
932
966
|
}
|
|
933
|
-
}, "syncTreeGridDeletedRowState"),
|
|
934
|
-
let
|
|
935
|
-
const
|
|
936
|
-
|
|
967
|
+
}, "syncTreeGridDeletedRowState"), ts = /* @__PURE__ */ s((e) => e ? Nt(e) || e.includes("assets") ? Ae(e) : Ae(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), ns = /* @__PURE__ */ s((e) => (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function", "isTreeGridPromiseLike"), rs = /* @__PURE__ */ s((e, t, n, r) => {
|
|
968
|
+
let o = !1;
|
|
969
|
+
const c = /* @__PURE__ */ s(() => {
|
|
970
|
+
o || (o = !0, e.RemoveRow(t), n(e), r(e, !0));
|
|
937
971
|
}, "removeRow");
|
|
938
972
|
try {
|
|
939
|
-
e.AnimateRow(t, "DeleteVisible", void 0,
|
|
973
|
+
e.AnimateRow(t, "DeleteVisible", void 0, c);
|
|
940
974
|
} catch {
|
|
941
|
-
|
|
975
|
+
c();
|
|
942
976
|
}
|
|
943
|
-
}, "removeTreeGridRowAfterDeleteAnimation"),
|
|
977
|
+
}, "removeTreeGridRowAfterDeleteAnimation"), ss = /* @__PURE__ */ s((e, t, n, r, o) => {
|
|
944
978
|
if (!(!e || n === "cancel")) {
|
|
945
979
|
if (n === "remove") {
|
|
946
|
-
|
|
980
|
+
rs(
|
|
981
|
+
e,
|
|
982
|
+
t,
|
|
983
|
+
r,
|
|
984
|
+
o
|
|
985
|
+
);
|
|
947
986
|
return;
|
|
948
987
|
}
|
|
949
988
|
e.DeleteRowT(t, 3);
|
|
950
989
|
}
|
|
951
|
-
}, "applyTreeGridBeforeRowUndeleteAction"),
|
|
990
|
+
}, "applyTreeGridBeforeRowUndeleteAction"), os = /* @__PURE__ */ s((e, t, n) => e ? { Url: ts(t) } : { Data: { Body: [On(n) ? [] : n] } }, "buildTreeGridDataSource"), no = /* @__PURE__ */ s(({
|
|
952
991
|
id: e,
|
|
953
992
|
layoutUrl: t,
|
|
954
993
|
layoutData: n,
|
|
955
994
|
toolbarTotalCountFormula: r,
|
|
956
|
-
suppressCfg:
|
|
995
|
+
suppressCfg: o,
|
|
957
996
|
disabledAnimations: c,
|
|
958
997
|
dataUrl: d,
|
|
959
998
|
bodyData: u,
|
|
960
999
|
useDataUrl: T,
|
|
961
1000
|
width: E,
|
|
962
|
-
height:
|
|
963
|
-
languageId:
|
|
1001
|
+
height: A,
|
|
1002
|
+
languageId: _
|
|
964
1003
|
}) => ({
|
|
965
1004
|
id: e,
|
|
966
1005
|
Layout: n ? {
|
|
967
|
-
Data:
|
|
1006
|
+
Data: Ge(
|
|
968
1007
|
n,
|
|
969
1008
|
c,
|
|
970
1009
|
r,
|
|
971
|
-
|
|
1010
|
+
o
|
|
972
1011
|
)
|
|
973
|
-
} : { Url:
|
|
974
|
-
Data:
|
|
1012
|
+
} : { Url: Ae(t ?? "") },
|
|
1013
|
+
Data: os(T, d, u),
|
|
975
1014
|
Text: {
|
|
976
|
-
Url:
|
|
1015
|
+
Url: ln(_)
|
|
977
1016
|
},
|
|
978
1017
|
width: E,
|
|
979
|
-
height:
|
|
1018
|
+
height: A,
|
|
980
1019
|
Debug: "Error"
|
|
981
|
-
}), "buildTreeGridInitializationOptions"),
|
|
1020
|
+
}), "buildTreeGridInitializationOptions"), ft = /* @__PURE__ */ s((e) => Ln(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), at = /* @__PURE__ */ s((e) => {
|
|
982
1021
|
if (typeof e == "number")
|
|
983
1022
|
return Number.isFinite(e) && e > 0 ? e : void 0;
|
|
984
1023
|
if (typeof e != "string")
|
|
@@ -988,109 +1027,109 @@ ${e.slice(
|
|
|
988
1027
|
return;
|
|
989
1028
|
const n = Number(t);
|
|
990
1029
|
return Number.isFinite(n) && n > 0 ? n : void 0;
|
|
991
|
-
}, "parseTreeGridPositiveNumber"),
|
|
1030
|
+
}, "parseTreeGridPositiveNumber"), ge = /* @__PURE__ */ s((e, t, n, r) => {
|
|
992
1031
|
if (!t || !n)
|
|
993
1032
|
return;
|
|
994
|
-
const
|
|
995
|
-
return c !== void 0 ? c :
|
|
1033
|
+
const o = e.GetAttribute(t, n, r), c = at(o);
|
|
1034
|
+
return c !== void 0 ? c : at(
|
|
996
1035
|
t[`${n}${r}`]
|
|
997
1036
|
);
|
|
998
|
-
}, "getTreeGridHeaderCellSpanAttribute"),
|
|
1037
|
+
}, "getTreeGridHeaderCellSpanAttribute"), is = /* @__PURE__ */ s((e, t, n) => !t || !n || t.Fixed !== "Head" || (ge(e, t, n, "Span") ?? 1) <= 1 ? !1 : (ge(e, t, n, "RowSpan") ?? 1) === 1, "isTreeGridGroupHeaderCell"), Tt = /* @__PURE__ */ s((e, t, n) => {
|
|
999
1038
|
const r = e.get(t);
|
|
1000
1039
|
if (r) {
|
|
1001
1040
|
r.add(n);
|
|
1002
1041
|
return;
|
|
1003
1042
|
}
|
|
1004
1043
|
e.set(t, /* @__PURE__ */ new Set([n]));
|
|
1005
|
-
}, "addTreeGridHeaderButtonAttributeTarget"),
|
|
1006
|
-
const
|
|
1044
|
+
}, "addTreeGridHeaderButtonAttributeTarget"), cs = /* @__PURE__ */ s((e, t, n, r) => {
|
|
1045
|
+
const o = /* @__PURE__ */ new Map();
|
|
1007
1046
|
return t.forEach((c, d) => {
|
|
1008
1047
|
n.forEach((u, T) => {
|
|
1009
|
-
if (!
|
|
1048
|
+
if (!is(e, c, u) || (Tt(o, c, u), !r))
|
|
1010
1049
|
return;
|
|
1011
|
-
const E = Math.floor(
|
|
1012
|
-
for (let
|
|
1013
|
-
const
|
|
1014
|
-
for (let O = T; O <
|
|
1015
|
-
|
|
1050
|
+
const E = Math.floor(ge(e, c, u, "Span") ?? 1), A = Math.min(n.length, T + E);
|
|
1051
|
+
for (let _ = d + 1; _ < t.length; _ += 1) {
|
|
1052
|
+
const x = t[_];
|
|
1053
|
+
for (let O = T; O < A; O += 1)
|
|
1054
|
+
Tt(o, x, n[O]);
|
|
1016
1055
|
}
|
|
1017
1056
|
});
|
|
1018
|
-
}),
|
|
1019
|
-
}, "getTreeGridGroupHeaderSortButtonTargets"),
|
|
1020
|
-
|
|
1021
|
-
if (
|
|
1022
|
-
return
|
|
1023
|
-
const
|
|
1024
|
-
return !i.length || !c.length ? !1 : ((d = bt(
|
|
1057
|
+
}), o;
|
|
1058
|
+
}, "getTreeGridGroupHeaderSortButtonTargets"), ls = /* @__PURE__ */ s((e) => typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((t) => t.Fixed === "Head") : [], "getTreeGridHeaderRows"), ds = /* @__PURE__ */ s((e) => typeof e.GetCols == "function" ? e.GetCols() : [], "getTreeGridCols"), Mt = /* @__PURE__ */ s((e, t) => {
|
|
1059
|
+
const n = Re.get(e);
|
|
1060
|
+
if ((n == null ? void 0 : n.includeChildHeaderCells) === t)
|
|
1061
|
+
return n.targets;
|
|
1062
|
+
const r = ls(e), o = ds(e), c = r.length && o.length ? cs(
|
|
1025
1063
|
e,
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
)
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1064
|
+
r,
|
|
1065
|
+
o,
|
|
1066
|
+
t
|
|
1067
|
+
) : /* @__PURE__ */ new Map();
|
|
1068
|
+
return Re.set(e, {
|
|
1069
|
+
includeChildHeaderCells: t,
|
|
1070
|
+
targets: c
|
|
1071
|
+
}), c;
|
|
1072
|
+
}, "getTreeGridGroupHeaderSortButtonTargetCache"), v = /* @__PURE__ */ s((e) => {
|
|
1073
|
+
e && Re.delete(e);
|
|
1074
|
+
}, "clearTreeGridGroupHeaderSortButtonTargetCache"), us = /* @__PURE__ */ s((e, t, n, r) => {
|
|
1075
|
+
var o;
|
|
1076
|
+
return !t || !n || t.Fixed !== "Head" ? !1 : ((o = Mt(e, r).get(t)) == null ? void 0 : o.has(n)) === !0;
|
|
1077
|
+
}, "isTreeGridGroupHeaderSortButtonTarget"), St = /* @__PURE__ */ s((e, t, n = !1, r = !0) => {
|
|
1078
|
+
const o = typeof performance < "u" ? performance.now() : Date.now(), c = /* @__PURE__ */ new Set();
|
|
1079
|
+
let d = 0;
|
|
1080
|
+
const u = Mt(e, r);
|
|
1081
|
+
if (u.size) {
|
|
1043
1082
|
typeof e.StartUpdate == "function" && e.StartUpdate();
|
|
1044
1083
|
try {
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
e.GetAttribute(
|
|
1084
|
+
u.forEach((T, E) => {
|
|
1085
|
+
T.forEach((A) => {
|
|
1086
|
+
e.GetAttribute(E, A, ze) !== "" && (e.SetAttribute(E, A, ze, "", 0, 0), c.add(E), d += 1);
|
|
1048
1087
|
});
|
|
1049
1088
|
});
|
|
1050
1089
|
} finally {
|
|
1051
1090
|
typeof e.EndUpdate == "function" && e.EndUpdate();
|
|
1052
1091
|
}
|
|
1053
|
-
|
|
1054
|
-
typeof e.RefreshRow == "function" && e.RefreshRow(
|
|
1055
|
-
}),
|
|
1056
|
-
updatedCellCount:
|
|
1057
|
-
updatedRowCount:
|
|
1092
|
+
c.size && (n && c.forEach((T) => {
|
|
1093
|
+
typeof e.RefreshRow == "function" && e.RefreshRow(T);
|
|
1094
|
+
}), _t(t, "group header button attribute apply"), mt(t, "group header button attribute apply", o, {
|
|
1095
|
+
updatedCellCount: d,
|
|
1096
|
+
updatedRowCount: c.size
|
|
1058
1097
|
}));
|
|
1059
1098
|
}
|
|
1060
|
-
}, "applyTreeGridGroupHeaderSortButtonAttributes"),
|
|
1099
|
+
}, "applyTreeGridGroupHeaderSortButtonAttributes"), fs = /* @__PURE__ */ s((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), as = /* @__PURE__ */ s((e) => {
|
|
1061
1100
|
const t = e == null ? void 0 : e.Visible;
|
|
1062
1101
|
return !!e && t !== 0 && t !== !1 && t !== "0";
|
|
1063
|
-
}, "isVisibleTreeGridRow"),
|
|
1102
|
+
}, "isVisibleTreeGridRow"), P = /* @__PURE__ */ s((e) => {
|
|
1064
1103
|
const t = e == null ? void 0 : e.Added;
|
|
1065
1104
|
return !!e && t !== 0 && t !== !1 && t !== "0" && t !== void 0;
|
|
1066
|
-
}, "isAddedTreeGridRow"),
|
|
1105
|
+
}, "isAddedTreeGridRow"), Vt = /* @__PURE__ */ s((e) => {
|
|
1067
1106
|
const t = e == null ? void 0 : e.Deleted;
|
|
1068
1107
|
return !!e && t !== 0 && t !== !1 && t !== "0" && t !== void 0;
|
|
1069
|
-
}, "isDeletedTreeGridRow"), C = /* @__PURE__ */ s((e) => !e || e.Fixed === "Foot" || !
|
|
1108
|
+
}, "isDeletedTreeGridRow"), C = /* @__PURE__ */ s((e) => !e || e.Fixed === "Foot" || !as(e) ? !1 : e.Kind === "Data" || P(e), "isDisplayTreeGridRow"), q = /* @__PURE__ */ s((e) => Object.keys(e.Cols ?? {}).filter(Boolean), "getTreeGridColumnNames"), kt = /* @__PURE__ */ s((e, t) => {
|
|
1070
1109
|
var r;
|
|
1071
1110
|
const n = (r = e.Cols) == null ? void 0 : r[t];
|
|
1072
|
-
return !!n && !
|
|
1073
|
-
}, "isVisibleTreeGridColumn"),
|
|
1074
|
-
const t =
|
|
1111
|
+
return !!n && !B(n.Visible) && !Zn(n.Hidden);
|
|
1112
|
+
}, "isVisibleTreeGridColumn"), Q = /* @__PURE__ */ s((e, t) => typeof e == "number" && Number.isFinite(e) ? e : t, "resolveTreeGridColumnOrderValue"), Ts = /* @__PURE__ */ s((e) => {
|
|
1113
|
+
const t = Se.get(e);
|
|
1075
1114
|
if (t)
|
|
1076
1115
|
return t;
|
|
1077
1116
|
const n = new Map(
|
|
1078
|
-
|
|
1117
|
+
q(e).map((c, d) => [c, d])
|
|
1079
1118
|
), r = [...n.keys()].filter(
|
|
1080
|
-
(c) => !
|
|
1119
|
+
(c) => !Fn.has(c) && kt(e, c)
|
|
1081
1120
|
).sort((c, d) => {
|
|
1082
1121
|
var O, I;
|
|
1083
|
-
const u = (O = e.Cols) == null ? void 0 : O[c], T = (I = e.Cols) == null ? void 0 : I[d], E = n.get(c) ?? 0,
|
|
1084
|
-
return
|
|
1085
|
-
}),
|
|
1122
|
+
const u = (O = e.Cols) == null ? void 0 : O[c], T = (I = e.Cols) == null ? void 0 : I[d], E = n.get(c) ?? 0, A = n.get(d) ?? 0, _ = Q(u == null ? void 0 : u.Sec, E) - Q(T == null ? void 0 : T.Sec, A);
|
|
1123
|
+
return _ !== 0 ? _ : Q(u == null ? void 0 : u.Pos, E) - Q(T == null ? void 0 : T.Pos, A) || E - A;
|
|
1124
|
+
}), o = {
|
|
1086
1125
|
columnSet: new Set(r),
|
|
1087
1126
|
firstColumn: r[0],
|
|
1088
1127
|
lastColumn: r[r.length - 1]
|
|
1089
1128
|
};
|
|
1090
|
-
return
|
|
1091
|
-
}, "getTreeGridAddedRowBoxColumnBounds"),
|
|
1092
|
-
e &&
|
|
1093
|
-
}, "clearTreeGridAddedRowBoxColumnBounds"),
|
|
1129
|
+
return Se.set(e, o), o;
|
|
1130
|
+
}, "getTreeGridAddedRowBoxColumnBounds"), X = /* @__PURE__ */ s((e) => {
|
|
1131
|
+
e && Se.delete(e);
|
|
1132
|
+
}, "clearTreeGridAddedRowBoxColumnBounds"), j = /* @__PURE__ */ s((e) => {
|
|
1094
1133
|
if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
|
|
1095
1134
|
const t = [];
|
|
1096
1135
|
let n = e.GetFirst();
|
|
@@ -1099,68 +1138,98 @@ ${e.slice(
|
|
|
1099
1138
|
return t;
|
|
1100
1139
|
}
|
|
1101
1140
|
return Object.values(e.Rows ?? {});
|
|
1102
|
-
}, "getTreeGridRows"),
|
|
1103
|
-
e
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1141
|
+
}, "getTreeGridRows"), _e = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), Ss = /* @__PURE__ */ s((e, t, n = !1) => {
|
|
1142
|
+
if (!e || !t)
|
|
1143
|
+
return;
|
|
1144
|
+
const r = fe.get(e);
|
|
1145
|
+
if (r) {
|
|
1146
|
+
n && (r.forceGridCalculate = !0);
|
|
1147
|
+
return;
|
|
1148
|
+
}
|
|
1149
|
+
const o = {
|
|
1150
|
+
forceGridCalculate: n
|
|
1151
|
+
};
|
|
1152
|
+
window.requestAnimationFrame(() => {
|
|
1153
|
+
if (fe.delete(e), o.forceGridCalculate) {
|
|
1154
|
+
try {
|
|
1155
|
+
e.Calculate(1);
|
|
1156
|
+
} catch {
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
return;
|
|
1160
|
+
}
|
|
1161
|
+
try {
|
|
1162
|
+
e.Recalculate(e.Toolbar, jn, 1);
|
|
1163
|
+
} catch {
|
|
1164
|
+
try {
|
|
1165
|
+
e.Calculate(1, 1);
|
|
1166
|
+
} catch {
|
|
1167
|
+
return;
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
}), fe.set(e, o);
|
|
1171
|
+
}, "scheduleTreeGridToolbarTotalCountRefresh"), Rs = /* @__PURE__ */ s((e) => {
|
|
1172
|
+
e && _e.delete(e);
|
|
1173
|
+
}, "clearTreeGridSelectionRowSpanAnchorRowMap"), U = /* @__PURE__ */ s((e) => {
|
|
1174
|
+
e && me.delete(e);
|
|
1175
|
+
}, "clearTreeGridDataRowSpanGroupRowsMap"), w = /* @__PURE__ */ s((e) => {
|
|
1176
|
+
Rs(e), U(e);
|
|
1177
|
+
}, "clearTreeGridRowSpanMaps"), be = /* @__PURE__ */ s((e, t) => {
|
|
1178
|
+
const n = e, r = n == null ? void 0 : n[`${t}RowSpan`], o = typeof r == "number" ? r : Number.parseFloat(String(r ?? ""));
|
|
1179
|
+
return Number.isFinite(o) && o > 1 ? Math.floor(o) : 1;
|
|
1180
|
+
}, "getTreeGridRowSpanCount"), ps = /* @__PURE__ */ s((e) => {
|
|
1112
1181
|
const t = /* @__PURE__ */ new WeakMap();
|
|
1113
1182
|
let n = null, r = -1;
|
|
1114
|
-
return
|
|
1115
|
-
if (!C(
|
|
1116
|
-
t.set(
|
|
1183
|
+
return j(e).forEach((o, c) => {
|
|
1184
|
+
if (!C(o)) {
|
|
1185
|
+
t.set(o, null);
|
|
1117
1186
|
return;
|
|
1118
1187
|
}
|
|
1119
|
-
const d =
|
|
1188
|
+
const d = be(o, we);
|
|
1120
1189
|
if (d > 1) {
|
|
1121
|
-
n =
|
|
1190
|
+
n = o, r = c + d - 1, t.set(o, o);
|
|
1122
1191
|
return;
|
|
1123
1192
|
}
|
|
1124
|
-
t.set(
|
|
1193
|
+
t.set(o, n && c <= r ? n : null), c >= r && (n = null, r = -1);
|
|
1125
1194
|
}), t;
|
|
1126
|
-
}, "createTreeGridSelectionRowSpanAnchorRowMap"),
|
|
1195
|
+
}, "createTreeGridSelectionRowSpanAnchorRowMap"), De = /* @__PURE__ */ s((e, t) => {
|
|
1127
1196
|
if (!t || !C(t))
|
|
1128
1197
|
return null;
|
|
1129
|
-
let n =
|
|
1130
|
-
return n != null && n.has(t) || (n =
|
|
1131
|
-
}, "getTreeGridSelectionRowSpanAnchorRow"),
|
|
1132
|
-
const n =
|
|
1198
|
+
let n = _e.get(e);
|
|
1199
|
+
return n != null && n.has(t) || (n = ps(e), _e.set(e, n)), n.get(t) ?? null;
|
|
1200
|
+
}, "getTreeGridSelectionRowSpanAnchorRow"), Xt = /* @__PURE__ */ s((e, t) => {
|
|
1201
|
+
const n = De(e, t);
|
|
1133
1202
|
if (!n)
|
|
1134
1203
|
return [];
|
|
1135
|
-
const r =
|
|
1204
|
+
const r = be(n, we), o = [];
|
|
1136
1205
|
let c = n;
|
|
1137
1206
|
for (let d = 0; c && d < r; d += 1)
|
|
1138
|
-
C(c) &&
|
|
1139
|
-
return
|
|
1140
|
-
}, "getTreeGridSelectionRowSpanRows"),
|
|
1207
|
+
C(c) && o.push(c), c = typeof e.GetNext == "function" ? e.GetNext(c) : null;
|
|
1208
|
+
return o;
|
|
1209
|
+
}, "getTreeGridSelectionRowSpanRows"), Es = /* @__PURE__ */ s((e) => {
|
|
1141
1210
|
const t = /* @__PURE__ */ new Set();
|
|
1142
1211
|
return (e.GetSelRows() ?? []).forEach((n) => {
|
|
1143
|
-
|
|
1212
|
+
Xt(e, n).forEach((r) => {
|
|
1144
1213
|
t.add(r);
|
|
1145
1214
|
});
|
|
1146
1215
|
}), [...t];
|
|
1147
|
-
}, "getTreeGridSelectedRowSpanRows"),
|
|
1216
|
+
}, "getTreeGridSelectedRowSpanRows"), Cs = /* @__PURE__ */ s((e) => re(e) || e === 2 || e === "2", "isTreeGridSpannedColumnValue"), Gs = /* @__PURE__ */ s((e, t) => {
|
|
1148
1217
|
var r;
|
|
1149
1218
|
const n = (r = e.Cols) == null ? void 0 : r[t];
|
|
1150
|
-
return !!n && !
|
|
1151
|
-
}, "isTreeGridDataRowSpanColumn"),
|
|
1152
|
-
const t = /* @__PURE__ */ new WeakMap(), n =
|
|
1153
|
-
(c) =>
|
|
1154
|
-
),
|
|
1219
|
+
return !!n && !Jn.has(t) && Cs(n.Spanned) && kt(e, t);
|
|
1220
|
+
}, "isTreeGridDataRowSpanColumn"), hs = /* @__PURE__ */ s((e) => {
|
|
1221
|
+
const t = /* @__PURE__ */ new WeakMap(), n = j(e), r = q(e).filter(
|
|
1222
|
+
(c) => Gs(e, c)
|
|
1223
|
+
), o = [];
|
|
1155
1224
|
return n.forEach((c, d) => {
|
|
1156
|
-
C(c) && (t.set(c,
|
|
1157
|
-
const T =
|
|
1158
|
-
T <= 1 ||
|
|
1225
|
+
C(c) && (t.set(c, Te), r.forEach((u) => {
|
|
1226
|
+
const T = be(c, u);
|
|
1227
|
+
T <= 1 || o.push({
|
|
1159
1228
|
startIndex: d,
|
|
1160
1229
|
endIndex: Math.min(n.length - 1, d + T - 1)
|
|
1161
1230
|
});
|
|
1162
1231
|
}));
|
|
1163
|
-
}),
|
|
1232
|
+
}), o.length && o.sort((c, d) => c.startIndex - d.startIndex).reduce((c, d) => {
|
|
1164
1233
|
const u = c[c.length - 1];
|
|
1165
1234
|
return !u || d.startIndex > u.endIndex ? (c.push({ ...d }), c) : (u.endIndex = Math.max(u.endIndex, d.endIndex), c);
|
|
1166
1235
|
}, []).forEach((c) => {
|
|
@@ -1169,119 +1238,121 @@ ${e.slice(
|
|
|
1169
1238
|
t.set(u, d);
|
|
1170
1239
|
});
|
|
1171
1240
|
}), t;
|
|
1172
|
-
}, "createTreeGridDataRowSpanGroupRowsMap"),
|
|
1241
|
+
}, "createTreeGridDataRowSpanGroupRowsMap"), oe = /* @__PURE__ */ s((e, t) => {
|
|
1173
1242
|
if (!t || !C(t))
|
|
1174
|
-
return
|
|
1175
|
-
let n =
|
|
1176
|
-
return n != null && n.has(t) || (n =
|
|
1177
|
-
}, "getTreeGridDataRowSpanRows"),
|
|
1243
|
+
return Te;
|
|
1244
|
+
let n = me.get(e);
|
|
1245
|
+
return n != null && n.has(t) || (n = hs(e), me.set(e, n)), n.get(t) ?? Te;
|
|
1246
|
+
}, "getTreeGridDataRowSpanRows"), As = /* @__PURE__ */ s((e, t) => {
|
|
1178
1247
|
if (!e)
|
|
1179
1248
|
return;
|
|
1180
|
-
const n =
|
|
1181
|
-
|
|
1182
|
-
C(r)
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
)
|
|
1249
|
+
const n = q(e);
|
|
1250
|
+
j(e).forEach((r) => {
|
|
1251
|
+
if (!C(r))
|
|
1252
|
+
return;
|
|
1253
|
+
const o = /* @__PURE__ */ new Map();
|
|
1254
|
+
n.forEach((c) => {
|
|
1255
|
+
o.set(c, Le(e, r, c));
|
|
1256
|
+
}), t.set(r, o);
|
|
1186
1257
|
});
|
|
1187
|
-
}, "captureTreeGridChangeBaselines"),
|
|
1258
|
+
}, "captureTreeGridChangeBaselines"), ie = /* @__PURE__ */ s((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), gs = /* @__PURE__ */ s((e, t, n) => {
|
|
1188
1259
|
const r = t;
|
|
1189
|
-
return
|
|
1190
|
-
}, "hasOtherTreeGridChangedCells"),
|
|
1260
|
+
return q(e).some((o) => o !== n && ie(r[`${o}Changed`]));
|
|
1261
|
+
}, "hasOtherTreeGridChangedCells"), Wt = /* @__PURE__ */ s((e, t, n) => {
|
|
1191
1262
|
const r = t;
|
|
1192
|
-
r[`${n}Changed`] = 0,
|
|
1193
|
-
}, "clearTreeGridCellChangedState"),
|
|
1263
|
+
r[`${n}Changed`] = 0, !P(t) && !D(t) && !gs(e, t, n) && (r.Changed = 0);
|
|
1264
|
+
}, "clearTreeGridCellChangedState"), _s = /* @__PURE__ */ s((e, t, n) => {
|
|
1194
1265
|
const r = e.get(t);
|
|
1195
1266
|
if (r != null && r.has(n))
|
|
1196
1267
|
return r.get(n);
|
|
1197
|
-
}, "resolveTreeGridCellBaselineValue"),
|
|
1268
|
+
}, "resolveTreeGridCellBaselineValue"), ms = /* @__PURE__ */ s(({
|
|
1198
1269
|
gridId: e,
|
|
1199
1270
|
grid: t,
|
|
1200
1271
|
row: n,
|
|
1201
1272
|
col: r,
|
|
1202
|
-
backgroundColor:
|
|
1273
|
+
backgroundColor: o,
|
|
1203
1274
|
highlightRefresh: c
|
|
1204
1275
|
}) => {
|
|
1205
|
-
if (
|
|
1276
|
+
if (!P(n) && !D(n))
|
|
1206
1277
|
return !1;
|
|
1207
1278
|
if (t.CanEdit(n, r) !== 1)
|
|
1208
1279
|
return !0;
|
|
1209
|
-
const d =
|
|
1210
|
-
return d === void 0 ? !0 :
|
|
1280
|
+
const d = fn(n, r), u = ae(n).includes(r);
|
|
1281
|
+
return d === void 0 ? !0 : Le(t, n, r) === d ? (an(n, r), u && At(e, { row: n, col: r }), Wt(t, n, r), !0) : (Tn(n, r), gt(e, {
|
|
1211
1282
|
row: n,
|
|
1212
1283
|
col: r,
|
|
1213
|
-
backgroundColor:
|
|
1284
|
+
backgroundColor: o,
|
|
1214
1285
|
refresh: c
|
|
1215
1286
|
}), !0);
|
|
1216
|
-
}, "syncTreeGridAddedRowChangedCellHighlight"),
|
|
1287
|
+
}, "syncTreeGridAddedRowChangedCellHighlight"), Os = /* @__PURE__ */ s(({
|
|
1217
1288
|
gridId: e,
|
|
1218
1289
|
grid: t,
|
|
1219
1290
|
row: n,
|
|
1220
1291
|
col: r,
|
|
1221
|
-
backgroundColor:
|
|
1292
|
+
backgroundColor: o,
|
|
1222
1293
|
baselineMap: c,
|
|
1223
1294
|
highlightRefresh: d
|
|
1224
1295
|
}) => {
|
|
1225
|
-
if (!C(n) ||
|
|
1296
|
+
if (!C(n) || ms({
|
|
1226
1297
|
gridId: e,
|
|
1227
1298
|
grid: t,
|
|
1228
1299
|
row: n,
|
|
1229
1300
|
col: r,
|
|
1230
|
-
backgroundColor:
|
|
1301
|
+
backgroundColor: o,
|
|
1231
1302
|
highlightRefresh: d
|
|
1232
1303
|
}))
|
|
1233
1304
|
return;
|
|
1234
|
-
const u =
|
|
1305
|
+
const u = _s(c, n, r), T = Le(t, n, r);
|
|
1235
1306
|
if (u !== void 0 && T === u) {
|
|
1236
|
-
|
|
1307
|
+
At(e, { row: n, col: r }), Wt(t, n, r), Rt(t, n);
|
|
1237
1308
|
return;
|
|
1238
1309
|
}
|
|
1239
|
-
|
|
1310
|
+
gt(e, {
|
|
1240
1311
|
row: n,
|
|
1241
1312
|
col: r,
|
|
1242
|
-
backgroundColor:
|
|
1313
|
+
backgroundColor: o,
|
|
1243
1314
|
refresh: d
|
|
1244
|
-
}),
|
|
1245
|
-
}, "syncTreeGridChangedCellHighlight"),
|
|
1315
|
+
}), Rt(t, n);
|
|
1316
|
+
}, "syncTreeGridChangedCellHighlight"), Jt = /* @__PURE__ */ s((e, t, n) => !t || !n || !C(t) ? !1 : e.CanEdit(t, n) === 1, "isEditableTreeGridCell"), jt = /* @__PURE__ */ s((e, t, n) => {
|
|
1246
1317
|
const r = e.GetAttribute(t, n, "Color");
|
|
1247
1318
|
if (typeof r == "number")
|
|
1248
|
-
return
|
|
1319
|
+
return Yt(r);
|
|
1249
1320
|
if (typeof r == "string")
|
|
1250
1321
|
return r.trim() || void 0;
|
|
1251
|
-
}, "getExplicitTreeGridCellColor"),
|
|
1252
|
-
if (!t || !n || !C(t))
|
|
1322
|
+
}, "getExplicitTreeGridCellColor"), Ht = /* @__PURE__ */ s((e, t, n) => jt(e, t, n) !== void 0, "hasExplicitTreeGridCellColor"), ye = /* @__PURE__ */ s((e, t, n) => {
|
|
1323
|
+
if (!xe(e) || !t || !n || !C(t))
|
|
1253
1324
|
return !1;
|
|
1254
1325
|
const r = typeof e.IsFocused == "function" ? e.IsFocused(t, n) : e.FRow === t && e.FCol === n;
|
|
1255
1326
|
return r !== 0 && r !== !1 && r !== void 0 && r !== null;
|
|
1256
|
-
}, "isTreeGridFocusedCellState"),
|
|
1327
|
+
}, "isTreeGridFocusedCellState"), Z = /* @__PURE__ */ s((e, t, n) => {
|
|
1257
1328
|
if (!t || !n || !C(t))
|
|
1258
1329
|
return !1;
|
|
1259
1330
|
const r = e.IsSelected(t, n);
|
|
1260
1331
|
if (r !== 0 && r !== !1 && r !== void 0 && r !== null)
|
|
1261
1332
|
return !0;
|
|
1262
|
-
const
|
|
1263
|
-
if (!
|
|
1333
|
+
const o = De(e, t);
|
|
1334
|
+
if (!o || o === t)
|
|
1264
1335
|
return !1;
|
|
1265
|
-
const c = e.IsSelected(
|
|
1336
|
+
const c = e.IsSelected(o, n);
|
|
1266
1337
|
return c !== 0 && c !== !1 && c !== void 0 && c !== null;
|
|
1267
|
-
}, "isTreeGridSelectedCellState"),
|
|
1268
|
-
if (!
|
|
1338
|
+
}, "isTreeGridSelectedCellState"), $e = /* @__PURE__ */ s((e) => {
|
|
1339
|
+
if (!Ye.length)
|
|
1269
1340
|
return !1;
|
|
1270
1341
|
const t = e.split(/\s+/).filter(Boolean);
|
|
1271
|
-
return
|
|
1342
|
+
return Ye.every(
|
|
1272
1343
|
(n) => t.includes(n)
|
|
1273
1344
|
);
|
|
1274
|
-
}, "hasTreeGridChangedCellDisplayClass"),
|
|
1275
|
-
if (!(!e || e.split(/\s+/).includes(
|
|
1276
|
-
return `${e} ${
|
|
1277
|
-
}, "appendTreeGridSelectedChangedCellDisplayClass"),
|
|
1278
|
-
if (!t || !
|
|
1345
|
+
}, "hasTreeGridChangedCellDisplayClass"), Ls = /* @__PURE__ */ s((e) => {
|
|
1346
|
+
if (!(!e || e.split(/\s+/).includes(Ke) || !$e(e)))
|
|
1347
|
+
return `${e} ${Ke}`;
|
|
1348
|
+
}, "appendTreeGridSelectedChangedCellDisplayClass"), Kt = /* @__PURE__ */ s((e) => !e || !C(e) ? !1 : Object.entries(e).some(([t, n]) => t.endsWith("Class") && typeof n == "string" && $e(n)), "hasTreeGridChangedCellDisplayClassInRow"), ws = /* @__PURE__ */ s((e, t) => {
|
|
1349
|
+
if (!t || !Kt(t) || typeof e.RefreshRow != "function")
|
|
1279
1350
|
return;
|
|
1280
1351
|
const n = t;
|
|
1281
1352
|
window.setTimeout(() => {
|
|
1282
1353
|
e.RefreshRow(n);
|
|
1283
1354
|
}, 0);
|
|
1284
|
-
}, "scheduleTreeGridSelectionChangedClassRefresh"),
|
|
1355
|
+
}, "scheduleTreeGridSelectionChangedClassRefresh"), M = /* @__PURE__ */ s((e, t) => {
|
|
1285
1356
|
if (!t.length || typeof window > "u" || typeof e.RefreshRow != "function")
|
|
1286
1357
|
return;
|
|
1287
1358
|
const n = [...new Set(t)];
|
|
@@ -1290,143 +1361,143 @@ ${e.slice(
|
|
|
1290
1361
|
e.RefreshRow(r);
|
|
1291
1362
|
});
|
|
1292
1363
|
}, 0);
|
|
1293
|
-
}, "scheduleTreeGridRowsRefresh"),
|
|
1364
|
+
}, "scheduleTreeGridRowsRefresh"), xs = /* @__PURE__ */ s((e, t) => {
|
|
1294
1365
|
if (!t)
|
|
1295
1366
|
return;
|
|
1296
|
-
const n =
|
|
1297
|
-
n.length <= 1 ||
|
|
1298
|
-
}, "scheduleTreeGridSelectionRowSpanRefresh"),
|
|
1367
|
+
const n = Xt(e, t);
|
|
1368
|
+
n.length <= 1 || M(e, n);
|
|
1369
|
+
}, "scheduleTreeGridSelectionRowSpanRefresh"), Rt = /* @__PURE__ */ s((e, t) => {
|
|
1299
1370
|
if (!t || !C(t))
|
|
1300
1371
|
return;
|
|
1301
|
-
const n =
|
|
1302
|
-
|
|
1303
|
-
}, "scheduleTreeGridChangedStateRowsRefresh"),
|
|
1372
|
+
const n = oe(e, t), r = n.length > 1 ? n : [t];
|
|
1373
|
+
M(e, r);
|
|
1374
|
+
}, "scheduleTreeGridChangedStateRowsRefresh"), pt = /* @__PURE__ */ s((e, t) => {
|
|
1304
1375
|
const n = t.flatMap((r) => {
|
|
1305
1376
|
if (!r || !C(r))
|
|
1306
1377
|
return [];
|
|
1307
|
-
const
|
|
1308
|
-
return
|
|
1378
|
+
const o = oe(e, r);
|
|
1379
|
+
return o.length > 1 ? [...o] : [r];
|
|
1309
1380
|
});
|
|
1310
|
-
|
|
1311
|
-
}, "scheduleTreeGridFocusedRowStateRowsRefresh"),
|
|
1312
|
-
const t =
|
|
1313
|
-
|
|
1314
|
-
}, "scheduleTreeGridSelectionRowSpanRefreshAll"),
|
|
1315
|
-
if (!(!t || r === void 0 || !
|
|
1381
|
+
M(e, n);
|
|
1382
|
+
}, "scheduleTreeGridFocusedRowStateRowsRefresh"), Is = /* @__PURE__ */ s((e) => {
|
|
1383
|
+
const t = j(e).filter((n) => C(n) && De(e, n));
|
|
1384
|
+
M(e, t);
|
|
1385
|
+
}, "scheduleTreeGridSelectionRowSpanRefreshAll"), zt = /* @__PURE__ */ s((e, t, n, r) => {
|
|
1386
|
+
if (!(!t || r === void 0 || !Jt(e, t, n) || ye(e, t, n) || Z(e, t, n) || Ht(e, t, n)))
|
|
1316
1387
|
return r;
|
|
1317
|
-
}, "getEditableTreeGridCellDefaultColor"),
|
|
1318
|
-
(r) =>
|
|
1319
|
-
), "isTreeGridNativeErrorBackgroundColor"),
|
|
1388
|
+
}, "getEditableTreeGridCellDefaultColor"), F = /* @__PURE__ */ s((e, t, n, r) => e === r[0] && t === r[1] && n === r[2], "matchesTreeGridRgbColor"), bs = /* @__PURE__ */ s((e, t, n) => vn.some(
|
|
1389
|
+
(r) => F(e, t, n, r)
|
|
1390
|
+
), "isTreeGridNativeErrorBackgroundColor"), Yt = /* @__PURE__ */ s((e) => {
|
|
1320
1391
|
if (!(e === void 0 || !Number.isFinite(e)))
|
|
1321
1392
|
return `#${Math.trunc(e).toString(16).padStart(6, "0")}`;
|
|
1322
|
-
}, "toTreeGridCssHexColor"),
|
|
1393
|
+
}, "toTreeGridCssHexColor"), Oe = /* @__PURE__ */ s((e, t, n) => !t || !n || !C(t) ? "" : e.GetAttribute(t, n, "Error") ?? "", "getTreeGridCellError"), Pe = /* @__PURE__ */ s((e, t, n) => Oe(e, t, n) !== "", "hasTreeGridCellError"), Ds = /* @__PURE__ */ s((e, t) => {
|
|
1323
1394
|
if (!t)
|
|
1324
1395
|
return;
|
|
1325
1396
|
let n = !1;
|
|
1326
|
-
|
|
1327
|
-
|
|
1397
|
+
q(e).forEach((r) => {
|
|
1398
|
+
Pe(e, t, r) && (e.SetAttribute(t, r, "Error", "", 0), n = !0);
|
|
1328
1399
|
}), n && e.RefreshRow(t);
|
|
1329
|
-
}, "clearTreeGridRowErrors"),
|
|
1400
|
+
}, "clearTreeGridRowErrors"), ys = /* @__PURE__ */ s((e) => {
|
|
1330
1401
|
const t = e == null ? void 0 : e.target;
|
|
1331
1402
|
if (typeof HTMLElement > "u" || typeof Element > "u" || typeof Node > "u")
|
|
1332
1403
|
return null;
|
|
1333
|
-
const n = t instanceof Element ? t : null, r = t instanceof Node ? t.parentElement : null,
|
|
1334
|
-
if (
|
|
1335
|
-
const c =
|
|
1336
|
-
return c instanceof HTMLElement ? c :
|
|
1404
|
+
const n = t instanceof Element ? t : null, r = t instanceof Node ? t.parentElement : null, o = n ?? r;
|
|
1405
|
+
if (o) {
|
|
1406
|
+
const c = o.closest("td,th");
|
|
1407
|
+
return c instanceof HTMLElement ? c : o instanceof HTMLElement ? o : null;
|
|
1337
1408
|
}
|
|
1338
1409
|
return null;
|
|
1339
|
-
}, "getTreeGridMouseEventAnchorElement"),
|
|
1410
|
+
}, "getTreeGridMouseEventAnchorElement"), qt = /* @__PURE__ */ s((e, t) => {
|
|
1340
1411
|
if (!e || !t || !C(e))
|
|
1341
1412
|
return !1;
|
|
1342
1413
|
const n = e, r = n[`${t}Class`];
|
|
1343
|
-
return
|
|
1344
|
-
}, "isChangedTreeGridCellDisplayState"),
|
|
1414
|
+
return ie(n[`${t}Changed`]) || typeof r == "string" && $e(r);
|
|
1415
|
+
}, "isChangedTreeGridCellDisplayState"), $s = /* @__PURE__ */ s((e, t) => {
|
|
1345
1416
|
if (!e || !t || !C(e))
|
|
1346
1417
|
return !1;
|
|
1347
|
-
const n = e, r =
|
|
1348
|
-
return
|
|
1349
|
-
}, "isChangedTreeGridRowOrCell"),
|
|
1418
|
+
const n = e, r = qt(e, t);
|
|
1419
|
+
return P(e) || D(e) ? r : r || ie(n.Changed);
|
|
1420
|
+
}, "isChangedTreeGridRowOrCell"), Et = /* @__PURE__ */ s((e) => !e || !C(e) || P(e) || D(e) ? !1 : ie(e.Changed) || Kt(e), "isChangedTreeGridRowDisplayState"), Ps = /* @__PURE__ */ s((e, t, n) => Nn.has(e.GetType(t, n)), "isTreeGridNativeInputEditType"), ve = /* @__PURE__ */ s((e, t, n) => !!t && !!n && C(t) && e.ARow === t && e.ACol === n, "isTreeGridHoveredCellState"), vs = /* @__PURE__ */ s((e, t, n) => !ve(e, t, n) || !t ? !1 : e.CanEdit(t, n) === 0, "isTreeGridReadonlyHoveredCellState"), Us = /* @__PURE__ */ s((e, t, n) => !ve(e, t, n) || !t ? !1 : e.CanEdit(t, n) === 2, "isTreeGridPreviewHoveredCellState"), Zt = /* @__PURE__ */ s((e, t) => xe(e) && !!t && C(t) && e.FRow === t, "isTreeGridFocusedRowState"), Fs = /* @__PURE__ */ s((e, t) => {
|
|
1350
1421
|
const n = e.FRow;
|
|
1351
|
-
if (!n || !t || !C(t))
|
|
1422
|
+
if (!xe(e) || !n || !t || !C(t))
|
|
1352
1423
|
return !1;
|
|
1353
|
-
const r =
|
|
1424
|
+
const r = oe(e, n);
|
|
1354
1425
|
return r.length > 1 && r.includes(t);
|
|
1355
|
-
}, "isTreeGridFocusedDataRowSpanGroupState"),
|
|
1426
|
+
}, "isTreeGridFocusedDataRowSpanGroupState"), Bs = /* @__PURE__ */ s((e, t) => {
|
|
1356
1427
|
if (!t || !C(t))
|
|
1357
1428
|
return !1;
|
|
1358
|
-
const n =
|
|
1359
|
-
return n.length <= 1 ?
|
|
1360
|
-
}, "isTreeGridChangedDataRowSpanGroupState"),
|
|
1429
|
+
const n = oe(e, t);
|
|
1430
|
+
return n.length <= 1 ? Et(t) : n.some(Et);
|
|
1431
|
+
}, "isTreeGridChangedDataRowSpanGroupState"), Ct = /* @__PURE__ */ s((e, t, n) => !t || !n || !C(t) || Ht(e, t, n) ? !1 : !Jt(e, t, n), "canApplyTreeGridRowStateBackground"), Ns = /* @__PURE__ */ s(({
|
|
1361
1432
|
grid: e,
|
|
1362
1433
|
row: t,
|
|
1363
1434
|
col: n,
|
|
1364
1435
|
r,
|
|
1365
|
-
g:
|
|
1436
|
+
g: o,
|
|
1366
1437
|
b: c,
|
|
1367
1438
|
focusedRowBackgroundColor: d,
|
|
1368
1439
|
focusedCellBackgroundColor: u,
|
|
1369
1440
|
selectedCellBackgroundColor: T,
|
|
1370
1441
|
hoverCellBackgroundColor: E,
|
|
1371
|
-
changedCellBackgroundColor:
|
|
1372
|
-
changedRowBackgroundColor:
|
|
1373
|
-
editableCellBackgroundColorValue:
|
|
1442
|
+
changedCellBackgroundColor: A,
|
|
1443
|
+
changedRowBackgroundColor: _,
|
|
1444
|
+
editableCellBackgroundColorValue: x
|
|
1374
1445
|
}) => {
|
|
1375
|
-
if (
|
|
1446
|
+
if (ye(e, t, n))
|
|
1376
1447
|
return u;
|
|
1377
|
-
if (
|
|
1448
|
+
if (Z(e, t, n))
|
|
1378
1449
|
return T;
|
|
1379
|
-
if (
|
|
1450
|
+
if (ve(e, t, n) && F(r, o, c, Dn) || vs(e, t, n) && (F(r, o, c, In) || F(r, o, c, bn)) || Us(e, t, n) && (F(r, o, c, yn) || F(r, o, c, $n) || F(r, o, c, Pn)))
|
|
1380
1451
|
return E;
|
|
1381
|
-
if (
|
|
1452
|
+
if (Vt(t))
|
|
1382
1453
|
return;
|
|
1383
|
-
const O = t && C(t) ?
|
|
1384
|
-
if (
|
|
1454
|
+
const O = t && C(t) ? jt(e, t, n) : void 0, I = P(t) || D(t), V = Pe(e, t, n) && bs(r, o, c);
|
|
1455
|
+
if (V && O)
|
|
1385
1456
|
return O;
|
|
1386
|
-
if (
|
|
1387
|
-
return O ??
|
|
1388
|
-
const
|
|
1457
|
+
if (qt(t, n))
|
|
1458
|
+
return O ?? A;
|
|
1459
|
+
const H = zt(
|
|
1389
1460
|
e,
|
|
1390
1461
|
t,
|
|
1391
1462
|
n,
|
|
1392
|
-
|
|
1463
|
+
x
|
|
1393
1464
|
);
|
|
1394
|
-
if (
|
|
1395
|
-
return
|
|
1396
|
-
if ((
|
|
1465
|
+
if (H !== void 0)
|
|
1466
|
+
return Yt(H);
|
|
1467
|
+
if ((Zt(e, t) || Fs(e, t)) && Ct(e, t, n))
|
|
1397
1468
|
return d;
|
|
1398
|
-
if (!
|
|
1399
|
-
return
|
|
1400
|
-
if (!(!
|
|
1401
|
-
return
|
|
1402
|
-
}, "resolveTreeGridStateBackgroundColor"),
|
|
1469
|
+
if (!V && Bs(e, t) && Ct(e, t, n))
|
|
1470
|
+
return _;
|
|
1471
|
+
if (!(!V && !I))
|
|
1472
|
+
return $s(t, n) ? A : I ? O ?? dn : Un;
|
|
1473
|
+
}, "resolveTreeGridStateBackgroundColor"), ne = /* @__PURE__ */ s((e, t) => {
|
|
1403
1474
|
const n = e.split(/\s+/).filter(Boolean);
|
|
1404
1475
|
return n.includes(t) ? e : [...n, t].join(" ");
|
|
1405
|
-
}, "appendTreeGridClassToken"),
|
|
1406
|
-
if (!C(t) ||
|
|
1476
|
+
}, "appendTreeGridClassToken"), Ms = /* @__PURE__ */ s((e) => e && e.split(/\s+/).filter((t) => t && !Bn.has(t)).join(" "), "stripTreeGridNativeRowStateClassTokens"), Vs = /* @__PURE__ */ s((e, t, n, r) => !Pe(e, t, n) || !t ? r : ne(r, An), "appendTreeGridErrorCellDisplayClass"), ks = /* @__PURE__ */ s((e, t, n, r) => {
|
|
1477
|
+
if (!C(t) || Vt(t) || !P(t) && !D(t) || Zt(e, t) || Z(e, t, n))
|
|
1407
1478
|
return r;
|
|
1408
|
-
const
|
|
1409
|
-
if (!
|
|
1479
|
+
const o = Ts(e);
|
|
1480
|
+
if (!o.columnSet.has(n))
|
|
1410
1481
|
return r;
|
|
1411
|
-
let c =
|
|
1412
|
-
return n ===
|
|
1413
|
-
}, "appendTreeGridAddedRowBoxDisplayClass"),
|
|
1414
|
-
const
|
|
1482
|
+
let c = ne(r, hn);
|
|
1483
|
+
return n === o.firstColumn && (c = ne(c, gn)), n === o.lastColumn && (c = ne(c, _n)), c;
|
|
1484
|
+
}, "appendTreeGridAddedRowBoxDisplayClass"), Xs = /* @__PURE__ */ s((e, t, n, r) => {
|
|
1485
|
+
const o = Ms(r), c = Vs(e, t, n, o), d = ks(
|
|
1415
1486
|
e,
|
|
1416
1487
|
t,
|
|
1417
1488
|
n,
|
|
1418
1489
|
c
|
|
1419
1490
|
);
|
|
1420
|
-
if (!
|
|
1491
|
+
if (!Z(e, t, n))
|
|
1421
1492
|
return d === r ? void 0 : d;
|
|
1422
|
-
const u =
|
|
1493
|
+
const u = Ls(d) ?? d;
|
|
1423
1494
|
return u === r ? void 0 : u;
|
|
1424
|
-
}, "resolveTreeGridCellDisplayClass"),
|
|
1425
|
-
const n = t.filter(
|
|
1426
|
-
n.length &&
|
|
1427
|
-
}, "scheduleTreeGridAddedRowBoxRowsRefresh"),
|
|
1428
|
-
|
|
1429
|
-
}, "scheduleTreeGridAddedRowBoxRowsRefreshAll"),
|
|
1495
|
+
}, "resolveTreeGridCellDisplayClass"), Qt = /* @__PURE__ */ s((e) => C(e) && (P(e) || D(e)), "isTreeGridAddedRowBoxDisplayRow"), Gt = /* @__PURE__ */ s((e, t) => {
|
|
1496
|
+
const n = t.filter(Qt);
|
|
1497
|
+
n.length && M(e, n);
|
|
1498
|
+
}, "scheduleTreeGridAddedRowBoxRowsRefresh"), Ws = /* @__PURE__ */ s((e) => {
|
|
1499
|
+
M(e, j(e).filter(Qt));
|
|
1500
|
+
}, "scheduleTreeGridAddedRowBoxRowsRefreshAll"), ro = /* @__PURE__ */ s((e) => {
|
|
1430
1501
|
if (!e)
|
|
1431
1502
|
return !1;
|
|
1432
1503
|
if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
|
|
@@ -1439,332 +1510,345 @@ ${e.slice(
|
|
|
1439
1510
|
return !1;
|
|
1440
1511
|
}
|
|
1441
1512
|
return Object.values(e.Rows ?? {}).some((t) => C(t));
|
|
1442
|
-
}, "hasTreeGridDisplayDataRows"),
|
|
1443
|
-
var
|
|
1444
|
-
|
|
1445
|
-
const r = (
|
|
1513
|
+
}, "hasTreeGridDisplayDataRows"), so = /* @__PURE__ */ s((e, t, n) => {
|
|
1514
|
+
var o;
|
|
1515
|
+
w(e);
|
|
1516
|
+
const r = (o = e.Data) == null ? void 0 : o.Data;
|
|
1446
1517
|
e.Data.Data = {
|
|
1447
1518
|
...r,
|
|
1448
1519
|
Data: { Body: [t || []] },
|
|
1449
1520
|
Url: ""
|
|
1450
1521
|
}, e.ReloadBody(n);
|
|
1451
|
-
}, "replaceTreeGridBodyData"),
|
|
1522
|
+
}, "replaceTreeGridBodyData"), oo = /* @__PURE__ */ s(({
|
|
1452
1523
|
id: e,
|
|
1453
1524
|
latestEventHandlersRef: t,
|
|
1454
1525
|
layoutHasExplicitEnterModeRef: n,
|
|
1455
1526
|
highlightEditableCellsRef: r,
|
|
1456
|
-
highlightChangedCellsRef:
|
|
1527
|
+
highlightChangedCellsRef: o,
|
|
1457
1528
|
syncDeletedRowCanEditRef: c,
|
|
1458
1529
|
editableCellBackgroundColorValueRef: d,
|
|
1459
1530
|
changedCellBackgroundColorRef: u,
|
|
1460
1531
|
changedRowBackgroundColorRef: T,
|
|
1461
1532
|
focusedRowBackgroundColorRef: E,
|
|
1462
|
-
focusedCellBackgroundColorRef:
|
|
1463
|
-
selectedCellBackgroundColorRef:
|
|
1464
|
-
hoverCellBackgroundColorRef:
|
|
1533
|
+
focusedCellBackgroundColorRef: A,
|
|
1534
|
+
selectedCellBackgroundColorRef: _,
|
|
1535
|
+
hoverCellBackgroundColorRef: x,
|
|
1465
1536
|
hoverCellBorderColorRef: O,
|
|
1466
1537
|
changedCellBaselineRef: I,
|
|
1467
|
-
treeGridInstanceRef:
|
|
1468
|
-
treeGridInitStartedAtRef:
|
|
1469
|
-
latestLayoutOverridesRef:
|
|
1470
|
-
latestToolbarTotalCountFormulaRef:
|
|
1471
|
-
latestSuppressCfgRef:
|
|
1472
|
-
latestHideChildHeaderSortButtonsRef:
|
|
1473
|
-
latestSelectionScopeRef:
|
|
1474
|
-
latestDisabledAnimationsRef:
|
|
1475
|
-
appliedLayoutOverridesRef:
|
|
1476
|
-
appliedBodyDataPropRef:
|
|
1477
|
-
hasAppliedInitialLayoutRef:
|
|
1478
|
-
syncHasDisplayDataRows:
|
|
1479
|
-
setIsTreeGridReady:
|
|
1480
|
-
setCanRenderTreeGridOverlays:
|
|
1481
|
-
setHasTreeGridSizeError:
|
|
1482
|
-
showErrorTooltip:
|
|
1483
|
-
hideErrorTooltip:
|
|
1538
|
+
treeGridInstanceRef: V,
|
|
1539
|
+
treeGridInitStartedAtRef: H,
|
|
1540
|
+
latestLayoutOverridesRef: en,
|
|
1541
|
+
latestToolbarTotalCountFormulaRef: ce,
|
|
1542
|
+
latestSuppressCfgRef: Ue,
|
|
1543
|
+
latestHideChildHeaderSortButtonsRef: le,
|
|
1544
|
+
latestSelectionScopeRef: tn,
|
|
1545
|
+
latestDisabledAnimationsRef: Fe,
|
|
1546
|
+
appliedLayoutOverridesRef: nn,
|
|
1547
|
+
appliedBodyDataPropRef: rn,
|
|
1548
|
+
hasAppliedInitialLayoutRef: Be,
|
|
1549
|
+
syncHasDisplayDataRows: k,
|
|
1550
|
+
setIsTreeGridReady: sn,
|
|
1551
|
+
setCanRenderTreeGridOverlays: Ne,
|
|
1552
|
+
setHasTreeGridSizeError: Me,
|
|
1553
|
+
showErrorTooltip: on,
|
|
1554
|
+
hideErrorTooltip: y
|
|
1484
1555
|
}) => {
|
|
1485
|
-
const
|
|
1486
|
-
|
|
1556
|
+
const g = t.current, b = /* @__PURE__ */ s((i, l = !1) => {
|
|
1557
|
+
Ss(
|
|
1558
|
+
i,
|
|
1559
|
+
ce.current,
|
|
1560
|
+
l
|
|
1561
|
+
);
|
|
1562
|
+
}, "refreshToolbarTotalCount");
|
|
1563
|
+
if (window.TGSetEvent("OnRowAdd", e, (i, l) => {
|
|
1487
1564
|
var f, a;
|
|
1488
|
-
|
|
1489
|
-
}), window.TGSetEvent("OnRowAdded", e, (
|
|
1490
|
-
|
|
1491
|
-
}), window.TGSetEvent("OnRowRemove", e, (
|
|
1492
|
-
|
|
1493
|
-
}), window.TGSetEvent("OnColShow", e, (
|
|
1494
|
-
|
|
1495
|
-
}), window.TGSetEvent("OnAfterColumnsChanged", e, (
|
|
1496
|
-
|
|
1497
|
-
}), window.TGSetEvent("OnColMove", e, (
|
|
1498
|
-
|
|
1499
|
-
}), window.TGSetEvent("OnColsAdd", e, (
|
|
1500
|
-
|
|
1501
|
-
}), window.TGSetEvent("OnColDelete", e, (
|
|
1502
|
-
|
|
1503
|
-
}), window.TGSetEvent("OnColUndelete", e, (
|
|
1504
|
-
|
|
1505
|
-
}), window.TGSetEvent("OnMouseOver", e, (
|
|
1506
|
-
const
|
|
1507
|
-
if (!
|
|
1508
|
-
|
|
1565
|
+
w(i), l.CanEdit = 1, l.CanDelete = 1, (a = (f = t.current) == null ? void 0 : f.onRowAdd) == null || a.call(f, i, l);
|
|
1566
|
+
}), window.TGSetEvent("OnRowAdded", e, (i) => {
|
|
1567
|
+
w(i), k(i), b(i);
|
|
1568
|
+
}), window.TGSetEvent("OnRowRemove", e, (i) => {
|
|
1569
|
+
w(i), y(), k(i), b(i, !0);
|
|
1570
|
+
}), window.TGSetEvent("OnColShow", e, (i) => {
|
|
1571
|
+
U(i), X(i), v(i);
|
|
1572
|
+
}), window.TGSetEvent("OnAfterColumnsChanged", e, (i) => {
|
|
1573
|
+
U(i), X(i), v(i);
|
|
1574
|
+
}), window.TGSetEvent("OnColMove", e, (i) => {
|
|
1575
|
+
U(i), X(i), v(i);
|
|
1576
|
+
}), window.TGSetEvent("OnColsAdd", e, (i) => {
|
|
1577
|
+
U(i), X(i), v(i);
|
|
1578
|
+
}), window.TGSetEvent("OnColDelete", e, (i) => {
|
|
1579
|
+
U(i), X(i), v(i);
|
|
1580
|
+
}), window.TGSetEvent("OnColUndelete", e, (i) => {
|
|
1581
|
+
U(i), X(i), v(i);
|
|
1582
|
+
}), window.TGSetEvent("OnMouseOver", e, (i, l, f, a, S, p) => {
|
|
1583
|
+
const R = Oe(i, l, f);
|
|
1584
|
+
if (!R) {
|
|
1585
|
+
y();
|
|
1509
1586
|
return;
|
|
1510
1587
|
}
|
|
1511
|
-
const
|
|
1512
|
-
if (!
|
|
1513
|
-
|
|
1588
|
+
const h = ys(p);
|
|
1589
|
+
if (!h) {
|
|
1590
|
+
y();
|
|
1514
1591
|
return;
|
|
1515
1592
|
}
|
|
1516
|
-
|
|
1517
|
-
}), window.TGSetEvent("OnFocus", e, (
|
|
1518
|
-
l !== a && (
|
|
1519
|
-
}), window.TGSetEvent("
|
|
1520
|
-
|
|
1593
|
+
i.HideTip(), on({ anchorEl: h, row: l, col: f, message: R });
|
|
1594
|
+
}), window.TGSetEvent("OnFocus", e, (i, l, f, a) => {
|
|
1595
|
+
et(i, !0), l !== a && Gt(i, [l, a]), pt(i, [l, a]);
|
|
1596
|
+
}), window.TGSetEvent("OnBlur", e, (i, l) => {
|
|
1597
|
+
et(i, !1), pt(i, [l, i.FRow]);
|
|
1598
|
+
}), window.TGSetEvent("OnTip", e, (i, l, f, a) => Oe(i, l, f) ? "" : a), window.TGSetEvent("OnCanRowDelete", e, (i, l, f) => {
|
|
1599
|
+
var p;
|
|
1521
1600
|
if (f !== 3)
|
|
1522
1601
|
return f;
|
|
1523
|
-
const a = (
|
|
1602
|
+
const a = (p = t.current) == null ? void 0 : p.onBeforeRowUndelete;
|
|
1524
1603
|
if (typeof a != "function")
|
|
1525
1604
|
return f;
|
|
1526
|
-
const S = /* @__PURE__ */ s((
|
|
1605
|
+
const S = /* @__PURE__ */ s((R) => {
|
|
1527
1606
|
window.setTimeout(() => {
|
|
1528
|
-
|
|
1529
|
-
|
|
1607
|
+
ss(
|
|
1608
|
+
V.current ?? i,
|
|
1530
1609
|
l,
|
|
1531
|
-
|
|
1532
|
-
|
|
1610
|
+
R,
|
|
1611
|
+
k,
|
|
1612
|
+
b
|
|
1533
1613
|
);
|
|
1534
1614
|
}, 0);
|
|
1535
1615
|
}, "scheduleAction");
|
|
1536
1616
|
try {
|
|
1537
|
-
const
|
|
1538
|
-
return
|
|
1617
|
+
const R = a(i, l);
|
|
1618
|
+
return ns(R) ? (R.then(S).catch(() => {
|
|
1539
1619
|
S("undelete");
|
|
1540
|
-
}), 0) : (S(
|
|
1620
|
+
}), 0) : (S(R), 0);
|
|
1541
1621
|
} catch {
|
|
1542
1622
|
return S("undelete"), 0;
|
|
1543
1623
|
}
|
|
1544
|
-
}), typeof (
|
|
1545
|
-
const
|
|
1546
|
-
var
|
|
1547
|
-
(L = (
|
|
1548
|
-
|
|
1624
|
+
}), typeof (g == null ? void 0 : g.onRowClick) == "function" || typeof (g == null ? void 0 : g.onInternalCellClick) == "function") {
|
|
1625
|
+
const i = de((l, f, a, S, p, R) => {
|
|
1626
|
+
var h, L;
|
|
1627
|
+
(L = (h = t.current) == null ? void 0 : h.onRowClick) == null || L.call(
|
|
1628
|
+
h,
|
|
1549
1629
|
l,
|
|
1550
1630
|
f,
|
|
1551
1631
|
a,
|
|
1552
1632
|
S,
|
|
1553
|
-
|
|
1554
|
-
|
|
1633
|
+
p,
|
|
1634
|
+
R
|
|
1555
1635
|
);
|
|
1556
1636
|
}, 300);
|
|
1557
|
-
window.TGSetEvent("OnClick", e, (l, f, a, S,
|
|
1558
|
-
var L,
|
|
1559
|
-
const
|
|
1637
|
+
window.TGSetEvent("OnClick", e, (l, f, a, S, p, R) => {
|
|
1638
|
+
var L, ke, Xe;
|
|
1639
|
+
const h = (ke = (L = t.current) == null ? void 0 : L.onInternalCellClick) == null ? void 0 : ke.call(
|
|
1560
1640
|
L,
|
|
1561
1641
|
l,
|
|
1562
1642
|
f,
|
|
1563
1643
|
a,
|
|
1564
1644
|
S,
|
|
1565
|
-
|
|
1566
|
-
|
|
1645
|
+
p,
|
|
1646
|
+
R
|
|
1567
1647
|
);
|
|
1568
|
-
if (
|
|
1569
|
-
return
|
|
1570
|
-
typeof ((
|
|
1648
|
+
if (h !== void 0)
|
|
1649
|
+
return h;
|
|
1650
|
+
typeof ((Xe = t.current) == null ? void 0 : Xe.onRowClick) == "function" && i(l, f, a, S, p, R);
|
|
1571
1651
|
});
|
|
1572
1652
|
}
|
|
1573
|
-
(typeof (
|
|
1653
|
+
(typeof (g == null ? void 0 : g.onClickButton) == "function" || typeof (g == null ? void 0 : g.onInternalButtonClick) == "function") && window.TGSetEvent(
|
|
1574
1654
|
"OnClickButton",
|
|
1575
1655
|
e,
|
|
1576
|
-
(
|
|
1577
|
-
var
|
|
1578
|
-
const S = (
|
|
1579
|
-
|
|
1580
|
-
|
|
1656
|
+
(i, l, f, a) => {
|
|
1657
|
+
var p, R, h, L;
|
|
1658
|
+
const S = (R = (p = t.current) == null ? void 0 : p.onInternalButtonClick) == null ? void 0 : R.call(
|
|
1659
|
+
p,
|
|
1660
|
+
i,
|
|
1581
1661
|
l,
|
|
1582
1662
|
f,
|
|
1583
1663
|
a
|
|
1584
1664
|
);
|
|
1585
1665
|
if (S !== void 0)
|
|
1586
1666
|
return S;
|
|
1587
|
-
(L = (
|
|
1588
|
-
|
|
1589
|
-
|
|
1667
|
+
(L = (h = t.current) == null ? void 0 : h.onClickButton) == null || L.call(
|
|
1668
|
+
h,
|
|
1669
|
+
i,
|
|
1590
1670
|
l,
|
|
1591
1671
|
f,
|
|
1592
1672
|
a
|
|
1593
1673
|
);
|
|
1594
1674
|
}
|
|
1595
|
-
), typeof (
|
|
1675
|
+
), typeof (g == null ? void 0 : g.onInternalKeyDown) == "function" && (window.TGSetEvent(
|
|
1596
1676
|
"OnKeyDown",
|
|
1597
1677
|
e,
|
|
1598
|
-
(
|
|
1599
|
-
var
|
|
1600
|
-
return (
|
|
1678
|
+
(i, l, f, a, S) => {
|
|
1679
|
+
var p, R;
|
|
1680
|
+
return (R = (p = t.current) == null ? void 0 : p.onInternalKeyDown) == null ? void 0 : R.call(p, i, l, f, a, S);
|
|
1601
1681
|
}
|
|
1602
1682
|
), window.TGSetEvent(
|
|
1603
1683
|
"OnKeyPress",
|
|
1604
1684
|
e,
|
|
1605
|
-
(
|
|
1606
|
-
var
|
|
1607
|
-
return (
|
|
1685
|
+
(i, l, f, a, S) => {
|
|
1686
|
+
var p, R;
|
|
1687
|
+
return (R = (p = t.current) == null ? void 0 : p.onInternalKeyDown) == null ? void 0 : R.call(p, i, l, f, a, S);
|
|
1608
1688
|
}
|
|
1609
|
-
)), window.TGSetEvent("OnStartEdit", e, (
|
|
1689
|
+
)), window.TGSetEvent("OnStartEdit", e, (i, l, f) => {
|
|
1610
1690
|
var a, S;
|
|
1611
|
-
return
|
|
1691
|
+
return y(), (S = (a = t.current) == null ? void 0 : a.onInternalStartEdit) == null ? void 0 : S.call(
|
|
1612
1692
|
a,
|
|
1613
|
-
|
|
1693
|
+
i,
|
|
1614
1694
|
l,
|
|
1615
1695
|
f
|
|
1616
1696
|
);
|
|
1617
|
-
}), window.TGSetEvent("OnRowDelete", e, (
|
|
1618
|
-
var
|
|
1619
|
-
|
|
1620
|
-
const a =
|
|
1621
|
-
|
|
1622
|
-
canEdit:
|
|
1623
|
-
editableColumns:
|
|
1624
|
-
editableCanEdit:
|
|
1697
|
+
}), window.TGSetEvent("OnRowDelete", e, (i, l, f) => {
|
|
1698
|
+
var h, L;
|
|
1699
|
+
w(i), y(), Ds(i, l), i.SelectRow(l, 0);
|
|
1700
|
+
const a = D(l), S = a ? ae(l) : [], p = a ? We(l) : [], R = c.current !== !1;
|
|
1701
|
+
ut(i, l, {
|
|
1702
|
+
canEdit: R ? 2 : void 0,
|
|
1703
|
+
editableColumns: p,
|
|
1704
|
+
editableCanEdit: R && p.length ? 2 : void 0,
|
|
1625
1705
|
highlightColumns: S
|
|
1626
|
-
}),
|
|
1627
|
-
|
|
1628
|
-
|
|
1706
|
+
}), k(i), b(i), (L = (h = t.current) == null ? void 0 : h.onRowDelete) == null || L.call(
|
|
1707
|
+
h,
|
|
1708
|
+
i,
|
|
1629
1709
|
l,
|
|
1630
1710
|
f
|
|
1631
1711
|
);
|
|
1632
|
-
}), window.TGSetEvent("OnRowUndelete", e, (
|
|
1633
|
-
var
|
|
1634
|
-
|
|
1635
|
-
const f =
|
|
1636
|
-
|
|
1637
|
-
canEdit:
|
|
1712
|
+
}), window.TGSetEvent("OnRowUndelete", e, (i, l) => {
|
|
1713
|
+
var R, h;
|
|
1714
|
+
w(i), y();
|
|
1715
|
+
const f = D(l), a = f ? ae(l) : [], S = f ? We(l) : [], p = c.current !== !1;
|
|
1716
|
+
ut(i, l, {
|
|
1717
|
+
canEdit: p ? 1 : void 0,
|
|
1638
1718
|
editableColumns: S,
|
|
1639
|
-
editableCanEdit:
|
|
1719
|
+
editableCanEdit: p && S.length ? 1 : void 0,
|
|
1640
1720
|
highlightColumns: a,
|
|
1641
1721
|
highlightBackgroundColor: a.length ? u.current : void 0
|
|
1642
|
-
}),
|
|
1643
|
-
}), window.TGSetEvent("OnGetDefaultColor", e, (
|
|
1722
|
+
}), k(i), b(i), (h = (R = t.current) == null ? void 0 : R.onRowUndelete) == null || h.call(R, i, l);
|
|
1723
|
+
}), window.TGSetEvent("OnGetDefaultColor", e, (i, l, f) => {
|
|
1644
1724
|
if (!(!r.current || !C(l)))
|
|
1645
|
-
return
|
|
1646
|
-
|
|
1725
|
+
return zt(
|
|
1726
|
+
i,
|
|
1647
1727
|
l,
|
|
1648
1728
|
f,
|
|
1649
1729
|
d.current
|
|
1650
1730
|
);
|
|
1651
|
-
}), window.TGSetEvent("OnGetColor", e, (
|
|
1652
|
-
if (!
|
|
1653
|
-
return
|
|
1654
|
-
grid:
|
|
1731
|
+
}), window.TGSetEvent("OnGetColor", e, (i, l, f, a, S, p, R) => {
|
|
1732
|
+
if (!R)
|
|
1733
|
+
return Ns({
|
|
1734
|
+
grid: i,
|
|
1655
1735
|
row: l,
|
|
1656
1736
|
col: f,
|
|
1657
1737
|
r: a,
|
|
1658
1738
|
g: S,
|
|
1659
|
-
b:
|
|
1739
|
+
b: p,
|
|
1660
1740
|
focusedRowBackgroundColor: E.current,
|
|
1661
|
-
focusedCellBackgroundColor:
|
|
1662
|
-
selectedCellBackgroundColor:
|
|
1663
|
-
hoverCellBackgroundColor:
|
|
1741
|
+
focusedCellBackgroundColor: A.current,
|
|
1742
|
+
selectedCellBackgroundColor: _.current,
|
|
1743
|
+
hoverCellBackgroundColor: x.current,
|
|
1664
1744
|
changedCellBackgroundColor: u.current,
|
|
1665
1745
|
changedRowBackgroundColor: T.current,
|
|
1666
1746
|
editableCellBackgroundColorValue: d.current
|
|
1667
1747
|
});
|
|
1668
1748
|
}), window.TGSetEvent("OnHint", e, () => {
|
|
1669
|
-
|
|
1670
|
-
|
|
1749
|
+
qr(
|
|
1750
|
+
pn,
|
|
1671
1751
|
O.current
|
|
1672
1752
|
);
|
|
1673
|
-
}), window.TGSetEvent("OnGetClass", e, (
|
|
1674
|
-
var
|
|
1675
|
-
if (
|
|
1676
|
-
const
|
|
1677
|
-
|
|
1753
|
+
}), window.TGSetEvent("OnGetClass", e, (i, l, f, a) => Xs(i, l, f, typeof a == "string" ? a : "")), window.TGSetEvent("OnAfterValueChanged", e, (i, l, f, a) => {
|
|
1754
|
+
var p, R;
|
|
1755
|
+
if (y(), o.current && C(l)) {
|
|
1756
|
+
const h = !Ps(i, l, f) || Z(i, l, f) && !ye(i, l, f);
|
|
1757
|
+
Os({
|
|
1678
1758
|
gridId: e,
|
|
1679
|
-
grid:
|
|
1759
|
+
grid: i,
|
|
1680
1760
|
row: l,
|
|
1681
1761
|
col: f,
|
|
1682
1762
|
backgroundColor: u.current,
|
|
1683
1763
|
baselineMap: I.current,
|
|
1684
|
-
highlightRefresh:
|
|
1764
|
+
highlightRefresh: h
|
|
1685
1765
|
});
|
|
1686
1766
|
}
|
|
1687
|
-
const S = ((
|
|
1688
|
-
S == null || S(
|
|
1767
|
+
const S = ((p = t.current) == null ? void 0 : p.onAfterValueChanged) ?? ((R = t.current) == null ? void 0 : R.onRowChange);
|
|
1768
|
+
S == null || S(i, l, f, a);
|
|
1689
1769
|
});
|
|
1690
|
-
const
|
|
1770
|
+
const Ve = de((i) => {
|
|
1691
1771
|
var a, S;
|
|
1692
|
-
const l =
|
|
1693
|
-
selectionScope:
|
|
1772
|
+
const l = i.GetSelRows() ?? [], f = Rn(i, l, {
|
|
1773
|
+
selectionScope: tn.current
|
|
1694
1774
|
});
|
|
1695
1775
|
(S = (a = t.current) == null ? void 0 : a.onSelect) == null || S.call(
|
|
1696
1776
|
a,
|
|
1697
|
-
|
|
1777
|
+
un(i, f)
|
|
1698
1778
|
);
|
|
1699
1779
|
}, 100);
|
|
1700
|
-
window.TGSetEvent("OnSelect", e, (
|
|
1701
|
-
var
|
|
1780
|
+
window.TGSetEvent("OnSelect", e, (i, l, f, a, S) => {
|
|
1781
|
+
var R;
|
|
1702
1782
|
if (S)
|
|
1703
1783
|
return;
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1706
|
-
}), window.TGSetEvent("OnSelectAll", e, (
|
|
1784
|
+
const p = Es(i);
|
|
1785
|
+
ws(i, l), Gt(i, [l]), M(i, p), xs(i, l), lt(i, e), typeof ((R = t.current) == null ? void 0 : R.onSelect) == "function" && Ve(i);
|
|
1786
|
+
}), window.TGSetEvent("OnSelectAll", e, (i, l, f, a) => {
|
|
1707
1787
|
var S;
|
|
1708
|
-
a || (
|
|
1709
|
-
}), typeof (
|
|
1788
|
+
a || (Is(i), Ws(i), lt(i, e), typeof ((S = t.current) == null ? void 0 : S.onSelect) == "function" && Ve(i));
|
|
1789
|
+
}), typeof (g == null ? void 0 : g.onSave) == "function" && window.TGSetEvent("OnSave", e, (i, l, f) => {
|
|
1710
1790
|
var a, S;
|
|
1711
1791
|
(S = (a = t.current) == null ? void 0 : a.onSave) == null || S.call(
|
|
1712
1792
|
a,
|
|
1713
|
-
|
|
1793
|
+
i,
|
|
1714
1794
|
l,
|
|
1715
1795
|
f
|
|
1716
1796
|
);
|
|
1717
|
-
}), window.TGSetEvent("OnSort", e, (
|
|
1797
|
+
}), window.TGSetEvent("OnSort", e, (i, l) => {
|
|
1718
1798
|
var f;
|
|
1719
|
-
if (!(!l || !
|
|
1720
|
-
|
|
1721
|
-
|
|
1799
|
+
if (!(!l || !us(
|
|
1800
|
+
i,
|
|
1801
|
+
i.ARow,
|
|
1722
1802
|
l,
|
|
1723
|
-
|
|
1803
|
+
le.current !== !1
|
|
1724
1804
|
)))
|
|
1725
|
-
return
|
|
1726
|
-
rowId: (f =
|
|
1805
|
+
return _t(e, "group header sort blocked"), mn(e, "group header sort blocked", {
|
|
1806
|
+
rowId: (f = i.ARow) == null ? void 0 : f.id,
|
|
1727
1807
|
col: l
|
|
1728
1808
|
}), -1;
|
|
1729
|
-
}), window.TGSetEvent("OnSortFinish", e, (
|
|
1730
|
-
|
|
1731
|
-
}), window.TGSetEvent("OnFilterFinish", e, (
|
|
1732
|
-
|
|
1733
|
-
}), window.TGSetEvent("OnGroupFinish", e, (
|
|
1734
|
-
|
|
1735
|
-
}), window.TGSetEvent("OnSearchFinish", e, (
|
|
1736
|
-
|
|
1737
|
-
}), window.TGSetEvent("
|
|
1738
|
-
|
|
1739
|
-
|
|
1809
|
+
}), window.TGSetEvent("OnSortFinish", e, (i) => {
|
|
1810
|
+
w(i);
|
|
1811
|
+
}), window.TGSetEvent("OnFilterFinish", e, (i) => {
|
|
1812
|
+
w(i), b(i);
|
|
1813
|
+
}), window.TGSetEvent("OnGroupFinish", e, (i) => {
|
|
1814
|
+
w(i);
|
|
1815
|
+
}), window.TGSetEvent("OnSearchFinish", e, (i) => {
|
|
1816
|
+
w(i), b(i);
|
|
1817
|
+
}), window.TGSetEvent("OnUndo", e, (i, l) => {
|
|
1818
|
+
Ze.has(l) && b(i);
|
|
1819
|
+
}), window.TGSetEvent("OnRedo", e, (i, l) => {
|
|
1820
|
+
Ze.has(l) && b(i);
|
|
1821
|
+
}), window.TGSetEvent("OnRenderStart", e, (i) => {
|
|
1822
|
+
w(i), v(i), he(i, e), St(
|
|
1823
|
+
i,
|
|
1740
1824
|
e,
|
|
1741
1825
|
!1,
|
|
1742
|
-
|
|
1826
|
+
le.current !== !1
|
|
1743
1827
|
);
|
|
1744
|
-
}), window.TGSetEvent("OnRenderFinish", e, (
|
|
1745
|
-
|
|
1828
|
+
}), window.TGSetEvent("OnRenderFinish", e, (i) => {
|
|
1829
|
+
Me((l) => l && !1), Ne((l) => l || !0), he(i, e);
|
|
1746
1830
|
}), window.TGSetEvent("OnSizeError", e, () => {
|
|
1747
|
-
|
|
1748
|
-
}), window.TGSetEvent("OnDataGet", e, (
|
|
1831
|
+
y(), Ne((i) => i && !1), Me((i) => i || !0);
|
|
1832
|
+
}), window.TGSetEvent("OnDataGet", e, (i, l, f) => {
|
|
1749
1833
|
if ((l == null ? void 0 : l.Name) === "Layout" && typeof f == "string") {
|
|
1750
|
-
n.current =
|
|
1751
|
-
const a =
|
|
1834
|
+
n.current = qe(f);
|
|
1835
|
+
const a = Ge(
|
|
1752
1836
|
f,
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1837
|
+
Fe.current,
|
|
1838
|
+
ce.current,
|
|
1839
|
+
Ue.current
|
|
1756
1840
|
);
|
|
1757
1841
|
return a === f ? null : a;
|
|
1758
1842
|
}
|
|
1759
1843
|
return null;
|
|
1760
|
-
}), window.TGSetEvent("OnDataParse", e, (
|
|
1844
|
+
}), window.TGSetEvent("OnDataParse", e, (i, l, f) => {
|
|
1761
1845
|
if ((l == null ? void 0 : l.Name) === "Layout" && typeof f == "string") {
|
|
1762
|
-
n.current =
|
|
1763
|
-
const a =
|
|
1846
|
+
n.current = qe(f);
|
|
1847
|
+
const a = Ge(
|
|
1764
1848
|
f,
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1849
|
+
Fe.current,
|
|
1850
|
+
ce.current,
|
|
1851
|
+
Ue.current
|
|
1768
1852
|
);
|
|
1769
1853
|
return a === f ? null : a;
|
|
1770
1854
|
}
|
|
@@ -1772,33 +1856,33 @@ ${e.slice(
|
|
|
1772
1856
|
}), window.TGSetEvent(
|
|
1773
1857
|
"OnReady",
|
|
1774
1858
|
e,
|
|
1775
|
-
|
|
1859
|
+
de((i) => {
|
|
1776
1860
|
var l, f;
|
|
1777
|
-
if (!
|
|
1778
|
-
const a =
|
|
1779
|
-
|
|
1780
|
-
|
|
1861
|
+
if (!Be.current) {
|
|
1862
|
+
const a = en.current;
|
|
1863
|
+
Be.current = !0, !n.current && (i.EnterMode === void 0 || i.EnterMode === null || i.EnterMode === 0) && Qr(i, wn), Sn(i, a), V.current = i, nn.current = a, rn.current = ft(i), I.current = /* @__PURE__ */ new WeakMap(), As(i, I.current), k(i), sn(!0), St(
|
|
1864
|
+
i,
|
|
1781
1865
|
e,
|
|
1782
1866
|
!0,
|
|
1783
|
-
|
|
1784
|
-
),
|
|
1785
|
-
bodyRowCount:
|
|
1786
|
-
|
|
1867
|
+
le.current !== !1
|
|
1868
|
+
), mt(e, "TreeGrid init ready", H.current, {
|
|
1869
|
+
bodyRowCount: fs(
|
|
1870
|
+
ft(i)
|
|
1787
1871
|
)
|
|
1788
|
-
}),
|
|
1872
|
+
}), H.current = null, (f = (l = t.current) == null ? void 0 : l.onReady) == null || f.call(l, i);
|
|
1789
1873
|
}
|
|
1790
1874
|
}, 100)
|
|
1791
1875
|
);
|
|
1792
1876
|
}, "bindTreeGridEvents");
|
|
1793
1877
|
export {
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1878
|
+
to as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
|
|
1879
|
+
oo as bindTreeGridEvents,
|
|
1880
|
+
no as buildTreeGridInitializationOptions,
|
|
1881
|
+
As as captureTreeGridChangeBaselines,
|
|
1882
|
+
fs as getTreeGridBodyDataCount,
|
|
1883
|
+
ro as hasTreeGridDisplayDataRows,
|
|
1884
|
+
qe as hasTreeGridExplicitEnterMode,
|
|
1885
|
+
so as replaceTreeGridBodyData,
|
|
1886
|
+
Os as syncTreeGridChangedCellHighlight
|
|
1803
1887
|
};
|
|
1804
1888
|
//# sourceMappingURL=treeGridRuntime.js.map
|