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