@owp/core 2.5.26 → 2.5.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/_virtual/index16.js +4 -4
  2. package/dist/_virtual/index17.js +4 -4
  3. package/dist/_virtual/index18.js +4 -4
  4. package/dist/_virtual/index19.js +4 -4
  5. package/dist/components/OwpExportExcelButton/OwpExportExcelButton.js +19 -19
  6. package/dist/components/OwpExportExcelButton/OwpExportExcelButton.js.map +1 -1
  7. package/dist/components/OwpMrtTable/OwpMrtTable.js +334 -287
  8. package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
  9. package/dist/components/OwpPicker/OwpDatePicker.js +251 -243
  10. package/dist/components/OwpPicker/OwpDatePicker.js.map +1 -1
  11. package/dist/components/OwpPicker/internal/useOwpPickerPopperTransition.js +13 -12
  12. package/dist/components/OwpPicker/internal/useOwpPickerPopperTransition.js.map +1 -1
  13. package/dist/components/OwpTable/OwpDataTable.js +151 -156
  14. package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
  15. package/dist/components/OwpTable/internal/OwpTableTotalCount.js +23 -16
  16. package/dist/components/OwpTable/internal/OwpTableTotalCount.js.map +1 -1
  17. package/dist/components/OwpTable/internal/treeGridTableStyle.js +29 -28
  18. package/dist/components/OwpTable/internal/treeGridTableStyle.js.map +1 -1
  19. package/dist/components/OwpTable/utils/tableSx.js +11 -10
  20. package/dist/components/OwpTable/utils/tableSx.js.map +1 -1
  21. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +297 -265
  22. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  23. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js +310 -291
  24. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js.map +1 -1
  25. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +1039 -385
  26. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  27. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +435 -186
  28. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  29. package/dist/components/OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.js +10 -10
  30. package/dist/components/OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.js.map +1 -1
  31. package/dist/features/themePreview/defs/ThemePreviewGridDef.xml.js +1 -1
  32. package/dist/features/themePreview/defs/ThemePreviewGridDef.xml.js.map +1 -1
  33. package/dist/features/themePreview/defs/ThemePreviewReadonlyGridDef.xml.js +1 -1
  34. package/dist/features/themePreview/defs/ThemePreviewReadonlyGridDef.xml.js.map +1 -1
  35. package/dist/layout/components/logo/Logo.js +40 -53
  36. package/dist/layout/components/logo/Logo.js.map +1 -1
  37. package/dist/layout/components/navbar/style/NavbarStyle.js +27 -37
  38. package/dist/layout/components/navbar/style/NavbarStyle.js.map +1 -1
  39. package/dist/layout/components/navbar/style/NavbarStyleContent.js +67 -42
  40. package/dist/layout/components/navbar/style/NavbarStyleContent.js.map +1 -1
  41. package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
  42. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
  43. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  44. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  45. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  46. 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
  47. package/dist/owp-app.css +1 -1
  48. package/dist/types/components/OwpPicker/internal/useOwpPickerPopperTransition.d.ts +1 -0
  49. package/dist/types/components/OwpTable/internal/OwpTableTotalCount.d.ts +11 -4
  50. package/dist/types/components/OwpTable/internal/treeGridTableStyle.d.ts +5 -0
  51. package/dist/types/components/OwpTable/utils/tableSx.d.ts +15 -0
  52. package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +11 -1
  53. package/dist/types/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.d.ts +5 -2
  54. package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +14 -4
  55. package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +5 -0
  56. package/dist/types/utils/treeGridUtil.d.ts +4 -0
  57. package/dist/utils/treeGridUtil.js +154 -145
  58. package/dist/utils/treeGridUtil.js.map +1 -1
  59. package/package.json +1 -1
  60. package/treegrid/TextKR.xml +1 -1
@@ -1,13 +1,14 @@
1
- var ne = Object.defineProperty;
2
- var c = (e, t) => ne(e, "name", { value: t, configurable: !0 });
3
- import { getTreeGridTextResourceUrl as re, TREEGRID_CELL_CHANGED_CLASS as W, TREEGRID_CELL_HIGHLIGHT_COLOR as oe, resolveTreeGridColorNumber as ie } from "../../../constants/treeGrid.js";
4
- import { isTreeGridRowAddedById as A, getTreeGridAddedRowHighlightColumns as v, getTreeGridCellComparableValue as j, clearTreeGridCellHighlightById as ue, removeTreeGridAddedRowHighlightColumn as ce, highlightTreeGridCellById as se, appendTreeGridAddedRowHighlightColumn as de, getTreeGridAddedRowBaselineValue as fe, normalizeTreeGridExternalRows as ae } from "../../../utils/treeGridUtil.js";
5
- import { applyTreeGridLayoutToGrid as Ge } from "./treeGridLayout.js";
6
- import { countTreeGridPerf as z, logTreeGridPerf as Te, measureTreeGridPerf as Y } from "./utils/perf.js";
7
- import { debounce as m } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
8
- import { isEmpty as le } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
9
- import { get as Ee } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
10
- const ut = 300, Ce = 3, he = {
1
+ var We = Object.defineProperty;
2
+ var i = (e, n) => We(e, "name", { value: n, configurable: !0 });
3
+ import { getTreeGridTextResourceUrl as Ke, TREEGRID_CELL_CHANGED_CLASS as me } from "../../../constants/treeGrid.js";
4
+ import { isTreeGridRowAddedById as $, getTreeGridAddedRowHighlightColumns as se, getTreeGridCellComparableValue as xe, clearTreeGridCellHighlightById as je, highlightTreeGridCellById as ze, normalizeTreeGridExternalRows as Ye } from "../../../utils/treeGridUtil.js";
5
+ import { applyTreeGridLayoutToGrid as Ze } from "./treeGridLayout.js";
6
+ import { TREE_GRID_SELECTED_CHANGED_CELL_CLASS as ce, TREE_GRID_PANEL_CHECKBOX_SELECT_CLASS as qe, TREE_GRID_SELECT_ALL_CHECKED_CLASS as le, TREE_GRID_SELECT_ALL_INDETERMINATE_CLASS as de, TREE_GRID_SELECT_ALL_UNCHECKED_CLASS as fe, TREE_GRID_THEME_WRAPPER_CLASS as Qe } from "./treeGridTheme.js";
7
+ import { countTreeGridPerf as Ie, logTreeGridPerf as He, measureTreeGridPerf as Oe } from "./utils/perf.js";
8
+ import { debounce as V } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
9
+ import { isEmpty as en } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
10
+ import { get as nn } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
11
+ const Ft = 300, tn = 3, rn = {
11
12
  1: {
12
13
  onEnter: "TabDownEdit",
13
14
  onEnterEdit: "AcceptEdit AND TabDownEdit,1"
@@ -24,499 +25,1152 @@ const ut = 300, Ce = 3, he = {
24
25
  onEnter: "TabRightEditAdd",
25
26
  onEnterEdit: "AcceptEdit AND TabRightEditAdd,1"
26
27
  }
27
- }, pe = [255, 255, 166], Re = [240, 240, 240], Se = [248, 248, 248], _e = [255, 255, 255], ye = [255, 255, 254], De = [242, 242, 242], N = "Button", Ae = 0.75, k = W.split(/\s+/).filter(
28
+ }, on = [240, 240, 240], sn = [248, 248, 248], cn = [255, 255, 255], ln = [255, 255, 254], dn = [242, 242, 242], ue = "Button", Te = me.split(/\s+/).filter(
28
29
  Boolean
29
- ), g = /* @__PURE__ */ c((e) => !!(e && /\b(?:EnterMode|OnEnterEdit|OnEnter)\s*[:=]/.test(e)), "hasTreeGridExplicitEnterMode"), be = /* @__PURE__ */ c((e, t) => {
30
- e.EnterMode = t;
31
- const n = he[t];
30
+ ), fn = /* @__PURE__ */ new Set([
31
+ "Text",
32
+ "Lines",
33
+ "Int",
34
+ "Float",
35
+ "Date",
36
+ "Pass"
37
+ ]), ae = /* @__PURE__ */ i((e) => !!(e && /\b(?:EnterMode|OnEnterEdit|OnEnter)\s*[:=]/.test(e)), "hasTreeGridExplicitEnterMode"), un = {
38
+ Visible: "1",
39
+ CanHide: "0",
40
+ Delete: "1",
41
+ Width: "33"
42
+ }, Tn = {
43
+ Spanned: "1"
44
+ }, F = {
45
+ OnClickCell: "Focus"
46
+ }, k = {
47
+ OnClickPanelSelectAll: "SelectAll OR DeselectAll"
48
+ }, be = ["Formula", "FormulaFormula"], an = /<Grid\b[^>]*>/i, pn = /<\/Grid\s*>/i, En = /<Toolbar\b[^>]*\/?>/i, Cn = [
49
+ "Undo",
50
+ "Deleting",
51
+ "Selecting",
52
+ "SelectingSingle",
53
+ "SuppressCfg"
54
+ ], Gn = {
55
+ addRow: ["Add", "AddRows", "AddChildren", "AddRowsChildren"],
56
+ deleteRow: [
57
+ "Delete",
58
+ "DeleteRows",
59
+ "DeleteVisible",
60
+ "DeleteVisibleRows",
61
+ "DeleteChildren",
62
+ "DeleteVisibleChildren",
63
+ "DeleteRowsChildren",
64
+ "DeleteVisibleRowsChildren",
65
+ "Undelete",
66
+ "UndeleteRows",
67
+ "UndeleteVisible",
68
+ "UndeleteVisibleRows",
69
+ "UndeleteChildren",
70
+ "UndeleteVisibleChildren",
71
+ "UndeleteRowsChildren",
72
+ "UndeleteVisibleRowsChildren"
73
+ ],
74
+ selectRow: ["Select", "SelectRows", "Deselect", "DeselectRows"]
75
+ }, S = /* @__PURE__ */ i((e) => typeof e == "object" && e !== null && !Array.isArray(e), "isTreeGridJsonRecord"), b = /* @__PURE__ */ i((e) => e === 0 || e === !1 || e === "0" || e === "false", "isTreeGridDisabledConfigValue"), M = /* @__PURE__ */ i((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitEnabledConfigValue"), y = /* @__PURE__ */ i((e, n) => String(e ?? "").trim().toLowerCase() === n.toLowerCase(), "isTreeGridConfigValue"), Z = /* @__PURE__ */ i((e, n) => !b(e) && !M(n), "isTreeGridCheckboxSelectionMode"), Pe = /* @__PURE__ */ i((e) => {
76
+ const n = e.Cfg;
77
+ return Array.isArray(n) ? n.filter(S) : S(n) ? [n] : [];
78
+ }, "getTreeGridJsonCfgRecords"), J = /* @__PURE__ */ i((e, n) => {
79
+ let t;
80
+ return Pe(e).forEach((r) => {
81
+ n in r && (t = r[n]);
82
+ }), t;
83
+ }, "getTreeGridJsonCfgValue"), we = /* @__PURE__ */ i((e, n) => {
84
+ const t = new RegExp(`\\b${n}\\s*=\\s*(['"])(.*?)\\1`, "i").exec(
85
+ e
86
+ );
87
+ return t == null ? void 0 : t[2];
88
+ }, "getTreeGridXmlTagAttributeValue"), P = /* @__PURE__ */ i((e, n) => new RegExp(`\\b${n}\\s*=`, "i").test(e), "hasTreeGridXmlTagAttribute"), ye = /* @__PURE__ */ i((e) => String(e).replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), "escapeTreeGridXmlAttributeValue"), D = /* @__PURE__ */ i((e, n, t) => {
89
+ const r = e.endsWith("/>") ? e.length - 2 : e.length - 1;
90
+ return `${e.slice(0, r)} ${n}="${ye(
91
+ t
92
+ )}"${e.slice(r)}`;
93
+ }, "appendTreeGridXmlTagAttribute"), W = /* @__PURE__ */ i((e, n, t) => P(e, n) ? e.replace(
94
+ new RegExp(`\\b${n}\\s*=\\s*(['"])(.*?)\\1`, "i"),
95
+ () => `${n}="${ye(t)}"`
96
+ ) : D(e, n, t), "setTreeGridXmlTagAttribute"), $e = /* @__PURE__ */ i((e, n) => {
97
+ let t = e;
98
+ return Object.entries(n).forEach(([r, o]) => {
99
+ t = W(t, r, o);
100
+ }), t;
101
+ }, "setTreeGridXmlTagAttributes"), U = /* @__PURE__ */ i((e, n) => {
102
+ let t = e;
103
+ return Object.entries(n).forEach(([r, o]) => {
104
+ P(t, r) || (t = D(t, r, o));
105
+ }), t;
106
+ }, "appendMissingTreeGridXmlTagAttributes"), x = /* @__PURE__ */ i((e) => {
107
+ var a;
108
+ const n = /<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<!\[CDATA\[[\s\S]*?\]\]>|<\/?([A-Za-z][\w:-]*)\b[^>]*>/g, t = {
109
+ cfgValues: {}
110
+ };
111
+ let r, o = 0, d = !1;
112
+ for (; r = n.exec(e); ) {
113
+ const u = r[0], E = (a = r[1]) == null ? void 0 : a.toLowerCase();
114
+ if (!E || u.startsWith("<!--") || u.startsWith("<?") || u.startsWith("<!"))
115
+ continue;
116
+ !t.hasFastPanel && P(u, "FastPanel") && (t.hasFastPanel = !0);
117
+ const g = u.startsWith("</"), h = /\/>\s*$/.test(u);
118
+ if (!d) {
119
+ !g && E === "grid" && (d = !0, t.gridOpenTagEndIndex = r.index + u.length, o = h ? 0 : 1);
120
+ continue;
121
+ }
122
+ if (g) {
123
+ if (o = Math.max(0, o - 1), E === "grid" && o === 0)
124
+ break;
125
+ continue;
126
+ }
127
+ o === 1 && (E === "cfg" ? (t.defaultCfgTag || (t.defaultCfgTag = {
128
+ index: r.index,
129
+ tag: u
130
+ }), Cn.forEach((A) => {
131
+ const L = we(u, A);
132
+ L !== void 0 && (t.cfgValues[A] = L);
133
+ }), t.lastCfgEndIndex = r.index + u.length) : E === "actions" && !t.defaultActionsTag ? t.defaultActionsTag = {
134
+ index: r.index,
135
+ tag: u
136
+ } : E === "panel" && !t.defaultPanelTag && gn(u) ? t.defaultPanelTag = {
137
+ index: r.index,
138
+ tag: u
139
+ } : E === "animations" && !t.animationsTag && (t.animationsTag = {
140
+ index: r.index,
141
+ tag: u
142
+ })), h || (o += 1);
143
+ }
144
+ return t;
145
+ }, "scanTreeGridXmlDefaultLayout"), gn = /* @__PURE__ */ i((e) => {
146
+ const n = we(e, "Name");
147
+ return n === void 0 || n === "" || n.toLowerCase() === "panel";
148
+ }, "isTreeGridXmlDefaultPanelTag"), Sn = /* @__PURE__ */ i((e) => {
149
+ const n = /<([A-Za-z][\w:-]*)\b[^>]*(?:\/>|>)/g, t = [];
150
+ let r;
151
+ for (; r = n.exec(e); ) {
152
+ if (r[1].toLowerCase() !== "header") {
153
+ if (t.length > 0)
154
+ break;
155
+ return t;
156
+ }
157
+ t.push({
158
+ index: r.index,
159
+ tag: r[0]
160
+ });
161
+ }
162
+ return t;
163
+ }, "getLeadingTreeGridXmlHeaderTags"), hn = /* @__PURE__ */ i((e) => {
164
+ const n = Sn(e);
165
+ if (n.length <= 1)
166
+ return {
167
+ headContent: e,
168
+ isApplied: !1
169
+ };
170
+ const [t, ...r] = n;
171
+ if (P(t.tag, "PanelRowSpan") || r.some(({ tag: d }) => /\bPanel[A-Za-z0-9_]*\s*=/i.test(d)))
172
+ return {
173
+ headContent: e,
174
+ isApplied: !1
175
+ };
176
+ let o = t.tag;
177
+ return P(o, "Spanned") || (o = D(o, "Spanned", 1)), o = D(
178
+ o,
179
+ "PanelRowSpan",
180
+ n.length
181
+ ), {
182
+ headContent: `${e.slice(0, t.index)}${o}${e.slice(
183
+ t.index + t.tag.length
184
+ )}`,
185
+ isApplied: !0
186
+ };
187
+ }, "applyTreeGridXmlHeadPanelRowSpanDefault"), An = /* @__PURE__ */ i((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlPanelSpannedInsertionIndex"), Rn = /* @__PURE__ */ i((e) => !!e.defaultPanelTag || q(e.cfgValues) || Fe(e.cfgValues), "isTreeGridXmlPanelSpannedDefaultLayout"), _n = /* @__PURE__ */ i((e, n) => {
188
+ if (n.gridOpenTagEndIndex === void 0 || !Rn(n))
189
+ return e;
190
+ const t = n.defaultPanelTag;
191
+ if (t) {
192
+ const o = U(
193
+ t.tag,
194
+ Tn
195
+ );
196
+ return o === t.tag ? e : `${e.slice(0, t.index)}${o}${e.slice(
197
+ t.index + t.tag.length
198
+ )}`;
199
+ }
200
+ const r = An(n);
201
+ return r === void 0 ? e : `${e.slice(0, r)}
202
+ <Panel Spanned="1" />${e.slice(
203
+ r
204
+ )}`;
205
+ }, "applyTreeGridXmlDefaultPanelSpannedLayout"), Ln = /* @__PURE__ */ i((e) => {
206
+ if (!/<Head\b/i.test(e) || /\bPanelRowSpan\s*[:=]/i.test(e))
207
+ return e;
208
+ let n = !1;
209
+ const t = e.replace(
210
+ /(<Head\b[^>]*>)([\s\S]*?)(<\/Head>)/i,
211
+ (r, o, d, a) => {
212
+ const u = hn(d);
213
+ return u.isApplied ? (n = !0, `${o}${u.headContent}${a}`) : r;
214
+ }
215
+ );
216
+ return n ? _n(
217
+ t,
218
+ x(t)
219
+ ) : e;
220
+ }, "applyTreeGridDefaultHeaderPanelRowSpanLayout"), De = /* @__PURE__ */ i((e) => Z(
221
+ J(e, "Selecting"),
222
+ J(e, "SelectingSingle")
223
+ ), "isTreeGridJsonCheckboxSelectionLayout"), q = /* @__PURE__ */ i((e) => Z(
224
+ e.Selecting,
225
+ e.SelectingSingle
226
+ ), "isTreeGridXmlCheckboxSelectionLayout"), mn = /* @__PURE__ */ i((e) => !b(e.Selecting), "isTreeGridXmlSelectingLayout"), Fe = /* @__PURE__ */ i((e) => y(e.Undo, "1") && y(e.Deleting, "2") && y(e.Selecting, "0"), "isTreeGridXmlDeletePanelDefaultLayout"), xn = /* @__PURE__ */ i((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlCellClickActionInsertionIndex"), In = /* @__PURE__ */ i((e, n) => {
227
+ if (n.gridOpenTagEndIndex === void 0 || !mn(n.cfgValues) || /\bOnClickCell\s*=/i.test(e))
228
+ return e;
229
+ const t = n.defaultActionsTag;
230
+ if (t) {
231
+ const o = U(
232
+ t.tag,
233
+ F
234
+ );
235
+ return o === t.tag ? e : `${e.slice(0, t.index)}${o}${e.slice(
236
+ t.index + t.tag.length
237
+ )}`;
238
+ }
239
+ const r = xn(n);
240
+ return r === void 0 ? e : `${e.slice(0, r)}
241
+ <Actions OnClickCell="Focus" />${e.slice(
242
+ r
243
+ )}`;
244
+ }, "applyTreeGridXmlDefaultCellClickActionLayout"), On = /* @__PURE__ */ i((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlSelectAllPanelActionInsertionIndex"), bn = /* @__PURE__ */ i((e, n) => {
245
+ if (n.gridOpenTagEndIndex === void 0 || !q(n.cfgValues) || /\bOnClickPanelSelectAll\s*=/i.test(e))
246
+ return e;
247
+ const t = n.defaultActionsTag;
248
+ if (t) {
249
+ const o = U(
250
+ t.tag,
251
+ k
252
+ );
253
+ return o === t.tag ? e : `${e.slice(0, t.index)}${o}${e.slice(
254
+ t.index + t.tag.length
255
+ )}`;
256
+ }
257
+ const r = On(n);
258
+ return r === void 0 ? e : `${e.slice(
259
+ 0,
260
+ r
261
+ )}
262
+ <Actions OnClickPanelSelectAll="SelectAll OR DeselectAll" />${e.slice(
263
+ r
264
+ )}`;
265
+ }, "applyTreeGridXmlDefaultSelectAllPanelActionLayout"), Pn = /* @__PURE__ */ i((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlDeletePanelInsertionIndex"), wn = /* @__PURE__ */ i((e, n) => {
266
+ if (n.gridOpenTagEndIndex === void 0 || !Fe(n.cfgValues))
267
+ return e;
268
+ const t = n.defaultPanelTag;
269
+ if (t) {
270
+ const d = U(
271
+ t.tag,
272
+ un
273
+ );
274
+ return d === t.tag ? e : `${e.slice(0, t.index)}${d}${e.slice(
275
+ t.index + t.tag.length
276
+ )}`;
277
+ }
278
+ const r = Pn(n);
279
+ return r === void 0 ? e : `${e.slice(0, r)}
280
+ <Panel Visible="1" CanHide="0" Delete="1" Width="33" />${e.slice(
281
+ r
282
+ )}`;
283
+ }, "applyTreeGridXmlDefaultDeletePanelLayout"), yn = /* @__PURE__ */ i((e, n) => {
284
+ if (n.hasFastPanel || !q(n.cfgValues))
285
+ return e;
286
+ const t = n.gridOpenTagEndIndex;
287
+ return t === void 0 ? e : `${e.slice(0, t)}
288
+ <Cfg FastPanel="0" />${e.slice(
289
+ t
290
+ )}`;
291
+ }, "applyTreeGridXmlDefaultFastPanelLayout"), $n = /* @__PURE__ */ i((e) => {
292
+ const n = e.Cfg;
293
+ if (Array.isArray(n)) {
294
+ n.some((t) => S(t) && "FastPanel" in t) || (e.Cfg = [{ FastPanel: 0 }, ...n]);
295
+ return;
296
+ }
297
+ if (S(n)) {
298
+ "FastPanel" in n || (n.FastPanel = 0);
299
+ return;
300
+ }
301
+ e.Cfg = { FastPanel: 0 };
302
+ }, "applyTreeGridJsonFastPanelDefault"), Dn = /* @__PURE__ */ i((e) => {
303
+ const n = e.Actions;
304
+ if (Array.isArray(n)) {
305
+ n.some(
306
+ (t) => S(t) && "OnClickPanelSelectAll" in t
307
+ ) || (e.Actions = [{ ...k }, ...n]);
308
+ return;
309
+ }
310
+ if (S(n)) {
311
+ "OnClickPanelSelectAll" in n || (n.OnClickPanelSelectAll = k.OnClickPanelSelectAll);
312
+ return;
313
+ }
314
+ n === void 0 && (e.Actions = { ...k });
315
+ }, "applyTreeGridJsonSelectAllPanelActionDefault"), Fn = /* @__PURE__ */ i((e) => {
316
+ const n = e.Actions;
317
+ if (Array.isArray(n)) {
318
+ n.some((t) => S(t) && "OnClickCell" in t) || (e.Actions = [{ ...F }, ...n]);
319
+ return;
320
+ }
321
+ if (S(n)) {
322
+ "OnClickCell" in n || (n.OnClickCell = F.OnClickCell);
323
+ return;
324
+ }
325
+ n === void 0 && (e.Actions = { ...F });
326
+ }, "applyTreeGridJsonCellClickActionDefault"), kn = /* @__PURE__ */ i((e) => {
327
+ try {
328
+ const n = JSON.parse(e);
329
+ return !S(n) || b(J(n, "Selecting")) ? e : (Fn(n), JSON.stringify(n));
330
+ } catch {
331
+ return e;
332
+ }
333
+ }, "applyTreeGridJsonDefaultCellClickActionLayout"), pe = /* @__PURE__ */ i((e, n) => {
334
+ const t = e.trim();
335
+ return t ? t.startsWith("{") ? kn(e) : In(
336
+ e,
337
+ n ?? x(e)
338
+ ) : e;
339
+ }, "applyTreeGridDefaultCellClickActionLayout"), Nn = /* @__PURE__ */ i((e) => {
340
+ try {
341
+ const n = JSON.parse(e);
342
+ return !S(n) || !De(n) ? e : (Dn(n), JSON.stringify(n));
343
+ } catch {
344
+ return e;
345
+ }
346
+ }, "applyTreeGridJsonDefaultSelectAllPanelActionLayout"), Ee = /* @__PURE__ */ i((e, n) => {
347
+ const t = e.trim();
348
+ return t ? t.startsWith("{") ? Nn(e) : bn(
349
+ e,
350
+ n ?? x(e)
351
+ ) : e;
352
+ }, "applyTreeGridDefaultSelectAllPanelActionLayout"), Un = /* @__PURE__ */ i((e, n) => {
353
+ if (n === void 0)
354
+ return e;
355
+ try {
356
+ const t = JSON.parse(e);
357
+ if (!S(t))
358
+ return e;
359
+ const r = Pe(t);
360
+ return r.some((o) => "SuppressCfg" in o) ? e : (r[0] ? r[0].SuppressCfg = n : t.Cfg = { SuppressCfg: n }, JSON.stringify(t));
361
+ } catch {
362
+ return e;
363
+ }
364
+ }, "applyTreeGridJsonDefaultSuppressCfgLayout"), Bn = /* @__PURE__ */ i((e, n, t) => {
365
+ if (t === void 0 || n.cfgValues.SuppressCfg !== void 0)
366
+ return e;
367
+ const r = n.defaultCfgTag;
368
+ if (r) {
369
+ const d = D(r.tag, "SuppressCfg", t);
370
+ return `${e.slice(0, r.index)}${d}${e.slice(
371
+ r.index + r.tag.length
372
+ )}`;
373
+ }
374
+ const o = n.gridOpenTagEndIndex;
375
+ return o === void 0 ? e : `${e.slice(0, o)}
376
+ <Cfg SuppressCfg="${t}" />${e.slice(
377
+ o
378
+ )}`;
379
+ }, "applyTreeGridXmlDefaultSuppressCfgLayout"), vn = /* @__PURE__ */ i((e, n) => {
380
+ const t = e.trim();
381
+ return n === void 0 || !t ? e : t.startsWith("{") ? Un(e, n) : Bn(
382
+ e,
383
+ x(e),
384
+ n
385
+ );
386
+ }, "applyTreeGridDefaultSuppressCfgLayout"), Vn = /* @__PURE__ */ i((e) => be.some((n) => n in e), "hasTreeGridToolbarFormulaField"), Xn = /* @__PURE__ */ i((e) => {
387
+ const n = e.Toolbar, t = e.Solid, r = Array.isArray(n) ? n.filter(S) : S(n) ? [n] : [], o = Array.isArray(t) ? t.filter(
388
+ (d) => S(d) && y(d.Kind, "Toolbar")
389
+ ) : S(t) && y(t.Kind, "Toolbar") ? [t] : [];
390
+ return [...r, ...o];
391
+ }, "getTreeGridJsonToolbarRecords"), Mn = /* @__PURE__ */ i((e, n) => {
32
392
  if (!n)
393
+ return e;
394
+ try {
395
+ const t = JSON.parse(e);
396
+ if (!S(t))
397
+ return e;
398
+ const r = Xn(t);
399
+ return r.some(Vn) ? e : (r[0] ? r[0].FormulaFormula = n : t.Toolbar = { FormulaFormula: n }, JSON.stringify(t));
400
+ } catch {
401
+ return e;
402
+ }
403
+ }, "applyTreeGridJsonDefaultToolbarTotalCountLayout"), Jn = /* @__PURE__ */ i((e) => be.some(
404
+ (n) => P(e, n)
405
+ ), "hasTreeGridXmlToolbarFormulaAttribute"), Wn = /* @__PURE__ */ i((e, n) => {
406
+ if (!n)
407
+ return e;
408
+ const t = En.exec(e);
409
+ if (t) {
410
+ const a = t[0];
411
+ if (Jn(a))
412
+ return e;
413
+ const u = W(
414
+ a,
415
+ "Formula",
416
+ n
417
+ );
418
+ return `${e.slice(0, t.index)}${u}${e.slice(
419
+ t.index + a.length
420
+ )}`;
421
+ }
422
+ const r = W(
423
+ "<Toolbar />",
424
+ "Formula",
425
+ n
426
+ ), o = pn.exec(e);
427
+ if (o)
428
+ return `${e.slice(0, o.index)} ${r}
429
+ ${e.slice(
430
+ o.index
431
+ )}`;
432
+ const d = an.exec(e);
433
+ return d ? `${e.slice(
434
+ 0,
435
+ d.index + d[0].length
436
+ )}
437
+ ${r}${e.slice(d.index + d[0].length)}` : e;
438
+ }, "applyTreeGridXmlDefaultToolbarTotalCountLayout"), Kn = /* @__PURE__ */ i((e, n) => {
439
+ const t = e.trim();
440
+ return !n || !t ? e : t.startsWith("{") ? Mn(
441
+ e,
442
+ n
443
+ ) : Wn(e, n);
444
+ }, "applyTreeGridDefaultToolbarTotalCountLayout"), jn = /* @__PURE__ */ i((e) => {
445
+ try {
446
+ const n = JSON.parse(e);
447
+ return !S(n) || !De(n) ? e : ($n(n), JSON.stringify(n));
448
+ } catch {
449
+ return e;
450
+ }
451
+ }, "applyTreeGridJsonDefaultFastPanelLayout"), Ce = /* @__PURE__ */ i((e, n) => {
452
+ const t = e.trim();
453
+ return t ? t.startsWith("{") ? /\bFastPanel\s*[:=]/i.test(e) ? e : jn(e) : yn(
454
+ e,
455
+ n ?? x(e)
456
+ ) : e;
457
+ }, "applyTreeGridDefaultFastPanelLayout"), zn = /* @__PURE__ */ i((e) => {
458
+ const n = {};
459
+ return e == null || e.forEach((t) => {
460
+ var r;
461
+ (r = Gn[t]) == null || r.forEach((o) => {
462
+ n[o] = "";
463
+ });
464
+ }), n;
465
+ }, "getTreeGridDisabledAnimationAttributes"), Yn = /* @__PURE__ */ i((e, n) => {
466
+ try {
467
+ const t = JSON.parse(e);
468
+ if (!S(t))
469
+ return e;
470
+ const r = t.Animations;
471
+ if (Array.isArray(r)) {
472
+ const o = r.find(S);
473
+ o ? Object.assign(o, n) : r.unshift({ ...n });
474
+ } else if (S(r))
475
+ Object.assign(r, n);
476
+ else if (r === void 0)
477
+ t.Animations = n;
478
+ else
479
+ return e;
480
+ return JSON.stringify(t);
481
+ } catch {
482
+ return e;
483
+ }
484
+ }, "applyTreeGridJsonDisabledAnimationsLayout"), Zn = /* @__PURE__ */ i((e) => $e("<Animations />", e), "createTreeGridDisabledAnimationsTag"), qn = /* @__PURE__ */ i((e, n) => {
485
+ const t = x(e);
486
+ if (t.gridOpenTagEndIndex === void 0)
487
+ return e;
488
+ const r = t.animationsTag;
489
+ if (r) {
490
+ const d = $e(r.tag, n);
491
+ return d === r.tag ? e : `${e.slice(0, r.index)}${d}${e.slice(
492
+ r.index + r.tag.length
493
+ )}`;
494
+ }
495
+ const o = t.lastCfgEndIndex ?? t.gridOpenTagEndIndex;
496
+ return `${e.slice(0, o)}
497
+ ${Zn(
498
+ n
499
+ )}${e.slice(o)}`;
500
+ }, "applyTreeGridXmlDisabledAnimationsLayout"), Ge = /* @__PURE__ */ i((e, n) => {
501
+ const t = zn(n);
502
+ if (!Object.keys(t).length)
503
+ return e;
504
+ const r = e.trim();
505
+ return r ? r.startsWith("{") ? Yn(e, t) : qn(e, t) : e;
506
+ }, "applyTreeGridDisabledAnimationsLayout"), K = /* @__PURE__ */ i((e, n, t, r) => {
507
+ const o = Kn(
508
+ Ln(
509
+ vn(e, r)
510
+ ),
511
+ t
512
+ ), d = o.trim();
513
+ if (!d || d.startsWith("{"))
514
+ return Ge(
515
+ Ce(
516
+ pe(
517
+ Ee(o)
518
+ )
519
+ ),
520
+ n
521
+ );
522
+ const a = x(o), u = Ee(
523
+ o,
524
+ a
525
+ ), E = u === o ? a : x(u), g = pe(
526
+ u,
527
+ E
528
+ ), h = g === u ? E : x(g);
529
+ return Ge(
530
+ wn(
531
+ Ce(
532
+ g,
533
+ h
534
+ ),
535
+ h
536
+ ),
537
+ n
538
+ );
539
+ }, "applyTreeGridDefaultLayout"), Qn = /* @__PURE__ */ i((e) => {
540
+ var n;
541
+ return typeof document > "u" ? null : ((n = document.getElementById(e)) == null ? void 0 : n.closest(`.${Qe}`)) ?? null;
542
+ }, "getTreeGridWrapperElement"), Hn = /* @__PURE__ */ i((e) => {
543
+ if (M(e.AllSelected))
544
+ return "checked";
545
+ if (b(e.AllSelected))
546
+ return "unchecked";
547
+ let n = 0, t = 0;
548
+ return Be(e).forEach((r) => {
549
+ !_(r) || b(r.CanSelect) || (n += 1, M(e.IsSelected(r)) && (t += 1));
550
+ }), t ? n > 0 && t >= n ? "checked" : "indeterminate" : "unchecked";
551
+ }, "getTreeGridSelectAllState"), j = /* @__PURE__ */ i((e, n) => {
552
+ const t = Qn(n), r = !b(e.Selecting), o = Z(
553
+ e.Selecting,
554
+ e.SelectingSingle
555
+ ), d = e.Header;
556
+ if (t == null || t.classList.toggle(
557
+ qe,
558
+ o
559
+ ), !o)
560
+ t == null || t.classList.remove(
561
+ le,
562
+ de,
563
+ fe
564
+ );
565
+ else {
566
+ const a = Hn(e);
567
+ t == null || t.classList.toggle(
568
+ le,
569
+ a === "checked"
570
+ ), t == null || t.classList.toggle(
571
+ de,
572
+ a === "indeterminate"
573
+ ), t == null || t.classList.toggle(
574
+ fe,
575
+ a === "unchecked"
576
+ );
577
+ }
578
+ d && r && (d.CanSelect = o ? 1 : 0);
579
+ }, "syncTreeGridSelectionPanelState"), X = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ i((e, n) => {
580
+ if (typeof window > "u")
581
+ return;
582
+ const t = X.get(n);
583
+ t !== void 0 && window.clearTimeout(t);
584
+ const r = window.setTimeout(() => {
585
+ X.delete(n), j(e, n);
586
+ }, 0);
587
+ X.set(n, r);
588
+ }, "scheduleTreeGridSelectionPanelStateSync"), et = /* @__PURE__ */ i((e, n) => {
589
+ e.EnterMode = n;
590
+ const t = rn[n];
591
+ if (!t)
33
592
  return;
34
593
  const r = e;
35
- r.Actions ?? (r.Actions = {}), r.Actions.OnEnter = n.onEnter, r.Actions.OnEnterEdit = n.onEnterEdit;
36
- }, "applyTreeGridDefaultEnterMode"), q = /* @__PURE__ */ c((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), F = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ c((e) => {
594
+ r.Actions ?? (r.Actions = {}), r.Actions.OnEnter = t.onEnter, r.Actions.OnEnterEdit = t.onEnterEdit;
595
+ }, "applyTreeGridDefaultEnterMode"), ke = /* @__PURE__ */ i((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), Se = /* @__PURE__ */ new Map(), nt = /* @__PURE__ */ i((e) => {
37
596
  if (!e || !e.startsWith("data:"))
38
597
  return e;
39
- const t = F.get(e);
40
- if (t)
41
- return t;
598
+ const n = Se.get(e);
599
+ if (n)
600
+ return n;
42
601
  try {
43
- const [n, r = ""] = e.split(",", 2), s = /^data:([^;]*)(;base64)?$/i.exec(n), G = (s == null ? void 0 : s[1]) || "application/octet-stream", E = s != null && s[2] ? atob(r) : decodeURIComponent(r), h = new Uint8Array(E.length);
44
- for (let R = 0; R < E.length; R += 1)
45
- h[R] = E.charCodeAt(R);
46
- const C = URL.createObjectURL(new Blob([h], { type: G }));
47
- return F.set(e, C), C;
602
+ const [t, r = ""] = e.split(",", 2), o = /^data:([^;]*)(;base64)?$/i.exec(t), d = (o == null ? void 0 : o[1]) || "application/octet-stream", a = o != null && o[2] ? atob(r) : decodeURIComponent(r), u = new Uint8Array(a.length);
603
+ for (let g = 0; g < a.length; g += 1)
604
+ u[g] = a.charCodeAt(g);
605
+ const E = URL.createObjectURL(new Blob([u], { type: d }));
606
+ return Se.set(e, E), E;
48
607
  } catch {
49
608
  return e;
50
609
  }
51
- }, "resolveTreeGridInlineUrl"), O = /* @__PURE__ */ c((e) => {
52
- if (!e || q(e))
53
- return me(e);
54
- const t = e.indexOf("#"), [n, r] = t >= 0 ? [e.slice(0, t), e.slice(t)] : [e, ""], s = n.includes("?") ? "&" : "?";
55
- return `${n}${s}noCache=${Date.now()}${r}`;
56
- }, "appendNoCacheQuery"), V = /* @__PURE__ */ c((e, t, n) => {
610
+ }, "resolveTreeGridInlineUrl"), z = /* @__PURE__ */ i((e) => {
611
+ if (!e || ke(e))
612
+ return nt(e);
613
+ const n = e.indexOf("#"), [t, r] = n >= 0 ? [e.slice(0, n), e.slice(n)] : [e, ""], o = t.includes("?") ? "&" : "?";
614
+ return `${t}${o}noCache=${Date.now()}${r}`;
615
+ }, "appendNoCacheQuery"), he = /* @__PURE__ */ i((e, n, t) => {
57
616
  if (!e)
58
617
  return;
59
- const r = n.canEdit, s = n.highlightColumns ?? [], G = n.highlightBackgroundColor;
60
- if (!(r === void 0 && !s.length)) {
618
+ const r = t.canEdit, o = t.highlightColumns ?? [], d = t.highlightBackgroundColor;
619
+ if (!(r === void 0 && !o.length)) {
61
620
  typeof e.StartUpdate == "function" && e.StartUpdate();
62
621
  try {
63
- r !== void 0 && (t.CanEdit = r), s.forEach((E) => {
64
- E && (e.SetValue(
65
- t,
66
- `${E}Class`,
67
- G ? W : "",
622
+ r !== void 0 && (n.CanEdit = r), o.forEach((a) => {
623
+ a && (e.SetValue(
624
+ n,
625
+ `${a}Class`,
626
+ d ? me : "",
68
627
  0
69
- ), e.SetValue(t, `${E}Color`, G ?? "", 0));
628
+ ), e.SetValue(n, `${a}Color`, d ?? "", 0));
70
629
  });
71
630
  } finally {
72
631
  typeof e.EndUpdate == "function" && e.EndUpdate();
73
632
  }
74
- typeof e.RefreshRow == "function" && e.RefreshRow(t);
633
+ typeof e.RefreshRow == "function" && e.RefreshRow(n);
75
634
  }
76
- }, "syncTreeGridDeletedRowState"), Oe = /* @__PURE__ */ c((e) => e ? q(e) || e.includes("assets") ? O(e) : O(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), Ie = /* @__PURE__ */ c((e) => (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function", "isTreeGridPromiseLike"), we = /* @__PURE__ */ c((e, t, n, r) => {
77
- if (!(!e || n === "cancel")) {
78
- if (n === "remove") {
79
- e.RemoveRow(t), r(e);
635
+ }, "syncTreeGridDeletedRowState"), tt = /* @__PURE__ */ i((e) => e ? ke(e) || e.includes("assets") ? z(e) : z(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), rt = /* @__PURE__ */ i((e) => (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function", "isTreeGridPromiseLike"), it = /* @__PURE__ */ i((e, n, t, r) => {
636
+ if (!(!e || t === "cancel")) {
637
+ if (t === "remove") {
638
+ e.RemoveRow(n), r(e);
80
639
  return;
81
640
  }
82
- e.DeleteRowT(t, 3);
641
+ e.DeleteRowT(n, 3);
83
642
  }
84
- }, "applyTreeGridBeforeRowUndeleteAction"), Be = /* @__PURE__ */ c((e, t, n) => e ? { Url: Oe(t) } : { Data: { Body: [le(n) ? [] : n] } }, "buildTreeGridDataSource"), ct = /* @__PURE__ */ c(({
643
+ }, "applyTreeGridBeforeRowUndeleteAction"), ot = /* @__PURE__ */ i((e, n, t) => e ? { Url: tt(n) } : { Data: { Body: [en(t) ? [] : t] } }, "buildTreeGridDataSource"), kt = /* @__PURE__ */ i(({
85
644
  id: e,
86
- layoutUrl: t,
87
- layoutData: n,
88
- dataUrl: r,
89
- bodyData: s,
90
- useDataUrl: G,
91
- width: E,
645
+ layoutUrl: n,
646
+ layoutData: t,
647
+ toolbarTotalCountFormula: r,
648
+ suppressCfg: o,
649
+ disabledAnimations: d,
650
+ dataUrl: a,
651
+ bodyData: u,
652
+ useDataUrl: E,
653
+ width: g,
92
654
  height: h,
93
- languageId: C
655
+ languageId: A
94
656
  }) => ({
95
657
  id: e,
96
- Layout: n ? { Data: n } : { Url: O(t ?? "") },
97
- Data: Be(G, r, s),
658
+ Layout: t ? {
659
+ Data: K(
660
+ t,
661
+ d,
662
+ r,
663
+ o
664
+ )
665
+ } : { Url: z(n ?? "") },
666
+ Data: ot(E, a, u),
98
667
  Text: {
99
- Url: re(C)
668
+ Url: Ke(A)
100
669
  },
101
- width: E,
670
+ width: g,
102
671
  height: h,
103
672
  Debug: "Error"
104
- }), "buildTreeGridInitializationOptions"), x = /* @__PURE__ */ c((e) => Ee(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), M = /* @__PURE__ */ c((e) => {
673
+ }), "buildTreeGridInitializationOptions"), Ae = /* @__PURE__ */ i((e) => nn(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), Re = /* @__PURE__ */ i((e) => {
105
674
  if (typeof e == "number")
106
675
  return Number.isFinite(e) && e > 0 ? e : void 0;
107
676
  if (typeof e != "string")
108
677
  return;
109
- const t = e.trim();
110
- if (!t)
678
+ const n = e.trim();
679
+ if (!n)
111
680
  return;
112
- const n = Number(t);
113
- return Number.isFinite(n) && n > 0 ? n : void 0;
114
- }, "parseTreeGridPositiveNumber"), $ = /* @__PURE__ */ c((e, t, n, r) => {
115
- if (!t || !n)
681
+ const t = Number(n);
682
+ return Number.isFinite(t) && t > 0 ? t : void 0;
683
+ }, "parseTreeGridPositiveNumber"), Y = /* @__PURE__ */ i((e, n, t, r) => {
684
+ if (!n || !t)
116
685
  return;
117
- const s = e.GetAttribute(t, n, r), G = M(s);
118
- return G !== void 0 ? G : M(
119
- t[`${n}${r}`]
686
+ const o = e.GetAttribute(n, t, r), d = Re(o);
687
+ return d !== void 0 ? d : Re(
688
+ n[`${t}${r}`]
120
689
  );
121
- }, "getTreeGridHeaderCellSpanAttribute"), Q = /* @__PURE__ */ c((e, t, n) => !t || !n || t.Fixed !== "Head" || ($(e, t, n, "Span") ?? 1) <= 1 ? !1 : ($(e, t, n, "RowSpan") ?? 1) === 1, "isTreeGridGroupHeaderCell"), P = /* @__PURE__ */ c((e, t, n = !1) => {
122
- const r = typeof performance < "u" ? performance.now() : Date.now(), s = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((C) => C.Fixed === "Head") : [], G = typeof e.GetCols == "function" ? e.GetCols() : [];
123
- if (!s.length || !G.length)
690
+ }, "getTreeGridHeaderCellSpanAttribute"), st = /* @__PURE__ */ i((e, n, t) => !n || !t || n.Fixed !== "Head" || (Y(e, n, t, "Span") ?? 1) <= 1 ? !1 : (Y(e, n, t, "RowSpan") ?? 1) === 1, "isTreeGridGroupHeaderCell"), _e = /* @__PURE__ */ i((e, n, t) => {
691
+ const r = e.get(n);
692
+ if (r) {
693
+ r.add(t);
124
694
  return;
125
- const E = /* @__PURE__ */ new Set();
126
- let h = 0;
127
- typeof e.StartUpdate == "function" && e.StartUpdate();
128
- try {
129
- s.forEach((C) => {
130
- G.forEach((R) => {
131
- Q(e, C, R) && e.GetAttribute(C, R, N) !== "" && (e.SetAttribute(C, R, N, "", 0, 0), E.add(C), h += 1);
132
- });
695
+ }
696
+ e.set(n, /* @__PURE__ */ new Set([t]));
697
+ }, "addTreeGridHeaderButtonAttributeTarget"), Ne = /* @__PURE__ */ i((e, n, t, r) => {
698
+ const o = /* @__PURE__ */ new Map();
699
+ return n.forEach((d, a) => {
700
+ t.forEach((u, E) => {
701
+ if (!st(e, d, u) || (_e(o, d, u), !r))
702
+ return;
703
+ const g = Math.floor(Y(e, d, u, "Span") ?? 1), h = Math.min(t.length, E + g);
704
+ for (let A = a + 1; A < n.length; A += 1) {
705
+ const L = n[A];
706
+ for (let I = E; I < h; I += 1)
707
+ _e(o, L, t[I]);
708
+ }
133
709
  });
134
- } finally {
135
- typeof e.EndUpdate == "function" && e.EndUpdate();
136
- }
137
- E.size && (n && E.forEach((C) => {
138
- typeof e.RefreshRow == "function" && e.RefreshRow(C);
139
- }), z(t, "group header button attribute apply"), Y(t, "group header button attribute apply", r, {
140
- updatedCellCount: h,
141
- updatedRowCount: E.size
142
- }));
143
- }, "applyTreeGridGroupHeaderSortButtonAttributes"), Le = /* @__PURE__ */ c((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), Ue = /* @__PURE__ */ c((e) => {
144
- const t = e == null ? void 0 : e.Visible;
145
- return !!e && t !== 0 && t !== !1 && t !== "0";
146
- }, "isVisibleTreeGridRow"), ve = /* @__PURE__ */ c((e) => {
147
- const t = e == null ? void 0 : e.Added;
148
- return !!e && t !== 0 && t !== !1 && t !== "0" && t !== void 0;
149
- }, "isAddedTreeGridRow"), _ = /* @__PURE__ */ c((e) => !e || e.Fixed === "Foot" || !Ue(e) ? !1 : e.Kind === "Data" || ve(e), "isDisplayTreeGridRow"), J = /* @__PURE__ */ c((e) => Object.keys(e.Cols ?? {}).filter(Boolean), "getTreeGridColumnNames"), Ne = /* @__PURE__ */ c((e) => {
710
+ }), o;
711
+ }, "getTreeGridGroupHeaderSortButtonTargets"), ct = /* @__PURE__ */ i((e, n, t, r) => {
712
+ var a;
713
+ if (!n || !t || n.Fixed !== "Head")
714
+ return !1;
715
+ const o = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((u) => u.Fixed === "Head") : [], d = typeof e.GetCols == "function" ? e.GetCols() : [];
716
+ return !o.length || !d.length ? !1 : ((a = Ne(
717
+ e,
718
+ o,
719
+ d,
720
+ r
721
+ ).get(n)) == null ? void 0 : a.has(t)) === !0;
722
+ }, "isTreeGridGroupHeaderSortButtonTarget"), Le = /* @__PURE__ */ i((e, n, t = !1, r = !0) => {
723
+ const o = typeof performance < "u" ? performance.now() : Date.now(), d = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((h) => h.Fixed === "Head") : [], a = typeof e.GetCols == "function" ? e.GetCols() : [];
724
+ if (!d.length || !a.length)
725
+ return;
726
+ const u = /* @__PURE__ */ new Set();
727
+ let E = 0;
728
+ const g = Ne(
729
+ e,
730
+ d,
731
+ a,
732
+ r
733
+ );
734
+ if (g.size) {
735
+ typeof e.StartUpdate == "function" && e.StartUpdate();
736
+ try {
737
+ g.forEach((h, A) => {
738
+ h.forEach((L) => {
739
+ e.GetAttribute(A, L, ue) !== "" && (e.SetAttribute(A, L, ue, "", 0, 0), u.add(A), E += 1);
740
+ });
741
+ });
742
+ } finally {
743
+ typeof e.EndUpdate == "function" && e.EndUpdate();
744
+ }
745
+ u.size && (t && u.forEach((h) => {
746
+ typeof e.RefreshRow == "function" && e.RefreshRow(h);
747
+ }), Ie(n, "group header button attribute apply"), Oe(n, "group header button attribute apply", o, {
748
+ updatedCellCount: E,
749
+ updatedRowCount: u.size
750
+ }));
751
+ }
752
+ }, "applyTreeGridGroupHeaderSortButtonAttributes"), lt = /* @__PURE__ */ i((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), dt = /* @__PURE__ */ i((e) => {
753
+ const n = e == null ? void 0 : e.Visible;
754
+ return !!e && n !== 0 && n !== !1 && n !== "0";
755
+ }, "isVisibleTreeGridRow"), B = /* @__PURE__ */ i((e) => {
756
+ const n = e == null ? void 0 : e.Added;
757
+ return !!e && n !== 0 && n !== !1 && n !== "0" && n !== void 0;
758
+ }, "isAddedTreeGridRow"), _ = /* @__PURE__ */ i((e) => !e || e.Fixed === "Foot" || !dt(e) ? !1 : e.Kind === "Data" || B(e), "isDisplayTreeGridRow"), Ue = /* @__PURE__ */ i((e) => Object.keys(e.Cols ?? {}).filter(Boolean), "getTreeGridColumnNames"), Be = /* @__PURE__ */ i((e) => {
150
759
  if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
151
- const t = [];
152
- let n = e.GetFirst();
153
- for (; n; )
154
- t.push(n), n = e.GetNext(n);
155
- return t;
760
+ const n = [];
761
+ let t = e.GetFirst();
762
+ for (; t; )
763
+ n.push(t), t = e.GetNext(t);
764
+ return n;
156
765
  }
157
766
  return Object.values(e.Rows ?? {});
158
- }, "getTreeGridRows"), ke = /* @__PURE__ */ c((e, t) => {
767
+ }, "getTreeGridRows"), ft = /* @__PURE__ */ i((e, n) => {
159
768
  if (!e)
160
769
  return;
161
- const n = J(e);
162
- Ne(e).forEach((r) => {
163
- _(r) && t.set(
770
+ const t = Ue(e);
771
+ Be(e).forEach((r) => {
772
+ _(r) && n.set(
164
773
  r,
165
- new Map(n.map((s) => [s, j(e, r, s)]))
774
+ new Map(t.map((o) => [o, xe(e, r, o)]))
166
775
  );
167
776
  });
168
- }, "captureTreeGridChangeBaselines"), ge = /* @__PURE__ */ c((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), Fe = /* @__PURE__ */ c((e, t, n) => {
169
- const r = t;
170
- return J(e).some((s) => s !== n && ge(r[`${s}Changed`]));
171
- }, "hasOtherTreeGridChangedCells"), Ve = /* @__PURE__ */ c((e, t, n) => {
172
- const r = t;
173
- r[`${n}Changed`] = 0, !A(t) && !Fe(e, t, n) && (r.Changed = 0);
174
- }, "clearTreeGridCellChangedState"), xe = /* @__PURE__ */ c((e, t, n) => {
175
- const r = e.get(t);
176
- if (r != null && r.has(n))
177
- return r.get(n);
178
- if (A(t))
179
- return fe(t, n) ?? "";
180
- }, "resolveTreeGridCellBaselineValue"), Me = /* @__PURE__ */ c(({
777
+ }, "captureTreeGridChangeBaselines"), ut = /* @__PURE__ */ i((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), Tt = /* @__PURE__ */ i((e, n, t) => {
778
+ const r = n;
779
+ return Ue(e).some((o) => o !== t && ut(r[`${o}Changed`]));
780
+ }, "hasOtherTreeGridChangedCells"), at = /* @__PURE__ */ i((e, n, t) => {
781
+ const r = n;
782
+ r[`${t}Changed`] = 0, !B(n) && !$(n) && !Tt(e, n, t) && (r.Changed = 0);
783
+ }, "clearTreeGridCellChangedState"), pt = /* @__PURE__ */ i((e, n, t) => {
784
+ const r = e.get(n);
785
+ if (r != null && r.has(t))
786
+ return r.get(t);
787
+ }, "resolveTreeGridCellBaselineValue"), Et = /* @__PURE__ */ i(({
181
788
  gridId: e,
182
- grid: t,
183
- row: n,
789
+ grid: n,
790
+ row: t,
184
791
  col: r,
185
- backgroundColor: s,
186
- baselineMap: G
792
+ backgroundColor: o,
793
+ baselineMap: d,
794
+ highlightRefresh: a
187
795
  }) => {
188
- if (!_(n))
796
+ if (!_(t) || B(t) || $(t))
189
797
  return;
190
- const E = xe(G, n, r), h = j(t, n, r);
191
- if (E !== void 0 && h === E) {
192
- ue(e, { row: n, col: r }), Ve(t, n, r), A(n) && ce(n, r);
798
+ const u = pt(d, t, r), E = xe(n, t, r);
799
+ if (u !== void 0 && E === u) {
800
+ je(e, { row: t, col: r }), at(n, t, r);
193
801
  return;
194
802
  }
195
- se(e, {
196
- row: n,
803
+ ze(e, {
804
+ row: t,
197
805
  col: r,
198
- backgroundColor: s
199
- }), A(n) && de(n, r);
200
- }, "syncTreeGridChangedCellHighlight"), $e = /* @__PURE__ */ c((e, t, n) => !t || !n || !_(t) ? !1 : e.CanEdit(t, n) === 1, "isEditableTreeGridCell"), Pe = /* @__PURE__ */ c((e, t, n) => {
201
- const r = e.GetAttribute(t, n, "Color");
806
+ backgroundColor: o,
807
+ refresh: a
808
+ });
809
+ }, "syncTreeGridChangedCellHighlight"), Ct = /* @__PURE__ */ i((e, n, t) => !n || !t || !_(n) ? !1 : e.CanEdit(n, t) === 1, "isEditableTreeGridCell"), Gt = /* @__PURE__ */ i((e, n, t) => {
810
+ const r = e.GetAttribute(n, t, "Color");
202
811
  return r != null && r !== "";
203
- }, "hasExplicitTreeGridCellColor"), Ke = /* @__PURE__ */ c((e, t, n, r) => {
204
- if (!(!t || r === void 0 || !$e(e, t, n) || Pe(e, t, n)))
205
- return r;
206
- }, "getEditableTreeGridCellDefaultColor"), D = /* @__PURE__ */ c((e, t, n, r) => e === r[0] && t === r[1] && n === r[2], "matchesTreeGridRgbColor"), K = /* @__PURE__ */ c((e) => {
207
- const t = typeof e == "number" ? e : typeof e == "string" ? ie(e) : void 0;
208
- if (!(t === void 0 || !Number.isFinite(t)))
209
- return [t >> 16 & 255, t >> 8 & 255, t & 255];
210
- }, "resolveTreeGridColorRgb"), We = /* @__PURE__ */ c((e) => `#${e.map((t) => Math.max(0, Math.min(255, t)).toString(16).padStart(2, "0")).join("")}`, "stringifyTreeGridRgbColor"), je = /* @__PURE__ */ c((e, t, n) => {
211
- const r = /* @__PURE__ */ c((s, G) => Math.round(
212
- s * (1 - n) + G * n
213
- ), "blendChannel");
214
- return [
215
- r(e[0], t[0]),
216
- r(e[1], t[1]),
217
- r(e[2], t[2])
218
- ];
219
- }, "blendTreeGridRgbColor"), ze = /* @__PURE__ */ c((e) => (e == null ? void 0 : e.split(/\s+/).filter(Boolean)) ?? [], "getTreeGridClassTokens"), Ye = /* @__PURE__ */ c((e) => {
220
- const t = typeof e == "string" ? ze(e) : [];
221
- return k.length > 0 && k.every((n) => t.includes(n));
222
- }, "hasTreeGridChangedCellClass"), X = /* @__PURE__ */ c((e, t, n) => {
223
- if (!t || !n || !_(t))
812
+ }, "hasExplicitTreeGridCellColor"), Q = /* @__PURE__ */ i((e, n, t) => {
813
+ if (!n || !t || !_(n))
224
814
  return !1;
225
- const r = e.IsSelected(t, n);
815
+ const r = typeof e.IsFocused == "function" ? e.IsFocused(n, t) : e.FRow === n && e.FCol === t;
226
816
  return r !== 0 && r !== !1 && r !== void 0 && r !== null;
227
- }, "isTreeGridSelectedCellState"), qe = /* @__PURE__ */ c((e, t, n, r) => {
228
- if (!t || !X(e, t, n) || !Ye(e.GetAttribute(t, n, "Class")))
229
- return;
230
- const s = K(r), G = K(
231
- e.GetAttribute(t, n, "Color") ?? oe
817
+ }, "isTreeGridFocusedCellState"), N = /* @__PURE__ */ i((e, n, t) => {
818
+ if (!n || !t || !_(n))
819
+ return !1;
820
+ const r = e.IsSelected(n, t);
821
+ return r !== 0 && r !== !1 && r !== void 0 && r !== null;
822
+ }, "isTreeGridSelectedCellState"), ve = /* @__PURE__ */ i((e) => {
823
+ if (!Te.length)
824
+ return !1;
825
+ const n = e.split(/\s+/).filter(Boolean);
826
+ return Te.every(
827
+ (t) => n.includes(t)
232
828
  );
233
- if (!(!s || !G))
234
- return We(
235
- je(
236
- s,
237
- G,
238
- Ae
239
- )
240
- );
241
- }, "resolveTreeGridSelectedHighlightBackgroundColor"), Qe = /* @__PURE__ */ c((e, t, n) => !t || !n || !_(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 0, "isTreeGridReadonlyHoveredCellState"), Je = /* @__PURE__ */ c((e, t, n) => !t || !n || !_(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 2, "isTreeGridPreviewHoveredCellState"), Xe = /* @__PURE__ */ c(({
829
+ }, "hasTreeGridChangedCellDisplayClass"), gt = /* @__PURE__ */ i((e) => {
830
+ if (!(!e || e.split(/\s+/).includes(ce) || !ve(e)))
831
+ return `${e} ${ce}`;
832
+ }, "appendTreeGridSelectedChangedCellDisplayClass"), St = /* @__PURE__ */ i((e) => !e || !_(e) ? !1 : Object.entries(e).some(([n, t]) => n.endsWith("Class") && typeof t == "string" && ve(t)), "hasTreeGridChangedCellDisplayClassInRow"), ht = /* @__PURE__ */ i((e, n) => {
833
+ if (!n || !St(n) || typeof e.RefreshRow != "function")
834
+ return;
835
+ const t = n;
836
+ window.setTimeout(() => {
837
+ e.RefreshRow(t);
838
+ }, 0);
839
+ }, "scheduleTreeGridSelectionChangedClassRefresh"), At = /* @__PURE__ */ i((e, n, t, r) => {
840
+ if (!(!n || r === void 0 || !Ct(e, n, t) || B(n) || $(n) || Q(e, n, t) || N(e, n, t) || Gt(e, n, t)))
841
+ return r;
842
+ }, "getEditableTreeGridCellDefaultColor"), w = /* @__PURE__ */ i((e, n, t, r) => e === r[0] && n === r[1] && t === r[2], "matchesTreeGridRgbColor"), Rt = /* @__PURE__ */ i((e, n, t) => fn.has(e.GetType(n, t)), "isTreeGridNativeInputEditType"), _t = /* @__PURE__ */ i((e, n, t) => !n || !t || !_(n) || e.ARow !== n || e.ACol !== t ? !1 : e.CanEdit(n, t) === 0, "isTreeGridReadonlyHoveredCellState"), Lt = /* @__PURE__ */ i((e, n, t) => !n || !t || !_(n) || e.ARow !== n || e.ACol !== t ? !1 : e.CanEdit(n, t) === 2, "isTreeGridPreviewHoveredCellState"), mt = /* @__PURE__ */ i(({
242
843
  grid: e,
243
- row: t,
244
- col: n,
844
+ row: n,
845
+ col: t,
245
846
  r,
246
- g: s,
247
- b: G,
248
- selectedCellBackgroundColor: E,
249
- hoverCellBackgroundColor: h
847
+ g: o,
848
+ b: d,
849
+ focusedCellBackgroundColor: a,
850
+ selectedCellBackgroundColor: u,
851
+ hoverCellBackgroundColor: E
250
852
  }) => {
251
- const C = qe(
252
- e,
253
- t,
254
- n,
255
- E
256
- );
257
- if (C)
258
- return C;
259
- if (X(e, t, n) && D(r, s, G, pe))
853
+ if (Q(e, n, t))
854
+ return a;
855
+ if (N(e, n, t))
856
+ return u;
857
+ if (_t(e, n, t) && (w(r, o, d, on) || w(r, o, d, sn)) || Lt(e, n, t) && (w(r, o, d, cn) || w(r, o, d, ln) || w(r, o, d, dn)))
260
858
  return E;
261
- if (Qe(e, t, n) && (D(r, s, G, Re) || D(r, s, G, Se)) || Je(e, t, n) && (D(r, s, G, _e) || D(r, s, G, ye) || D(r, s, G, De)))
262
- return h;
263
- }, "resolveTreeGridStateBackgroundColor"), st = /* @__PURE__ */ c((e) => {
859
+ }, "resolveTreeGridStateBackgroundColor"), Nt = /* @__PURE__ */ i((e) => {
264
860
  if (!e)
265
861
  return !1;
266
862
  if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
267
- let t = e.GetFirst();
268
- for (; t; ) {
269
- if (_(t))
863
+ let n = e.GetFirst();
864
+ for (; n; ) {
865
+ if (_(n))
270
866
  return !0;
271
- t = e.GetNext(t);
867
+ n = e.GetNext(n);
272
868
  }
273
869
  return !1;
274
870
  }
275
- return Object.values(e.Rows ?? {}).some((t) => _(t));
276
- }, "hasTreeGridDisplayDataRows"), dt = /* @__PURE__ */ c((e, t, n) => {
277
- var s;
278
- const r = (s = e.Data) == null ? void 0 : s.Data;
871
+ return Object.values(e.Rows ?? {}).some((n) => _(n));
872
+ }, "hasTreeGridDisplayDataRows"), Ut = /* @__PURE__ */ i((e, n, t) => {
873
+ var o;
874
+ const r = (o = e.Data) == null ? void 0 : o.Data;
279
875
  e.Data.Data = {
280
876
  ...r,
281
- Data: { Body: [t || []] },
877
+ Data: { Body: [n || []] },
282
878
  Url: ""
283
- }, e.ReloadBody(n);
284
- }, "replaceTreeGridBodyData"), ft = /* @__PURE__ */ c(({
879
+ }, e.ReloadBody(t);
880
+ }, "replaceTreeGridBodyData"), Bt = /* @__PURE__ */ i(({
285
881
  id: e,
286
- latestEventHandlersRef: t,
287
- layoutHasExplicitEnterModeRef: n,
882
+ latestEventHandlersRef: n,
883
+ layoutHasExplicitEnterModeRef: t,
288
884
  highlightEditableCellsRef: r,
289
- highlightChangedCellsRef: s,
290
- syncDeletedRowCanEditRef: G,
291
- editableCellBackgroundColorValueRef: E,
292
- changedCellBackgroundColorRef: h,
293
- selectedCellBackgroundColorRef: C,
294
- hoverCellBackgroundColorRef: R,
295
- changedCellBaselineRef: b,
296
- treeGridInstanceRef: I,
297
- treeGridInitStartedAtRef: w,
298
- latestLayoutOverridesRef: Z,
299
- appliedLayoutOverridesRef: H,
300
- appliedBodyDataPropRef: ee,
301
- hasAppliedInitialLayoutRef: B,
302
- syncHasDisplayDataRows: y,
303
- setIsTreeGridReady: te
885
+ highlightChangedCellsRef: o,
886
+ syncDeletedRowCanEditRef: d,
887
+ editableCellBackgroundColorValueRef: a,
888
+ changedCellBackgroundColorRef: u,
889
+ focusedCellBackgroundColorRef: E,
890
+ selectedCellBackgroundColorRef: g,
891
+ hoverCellBackgroundColorRef: h,
892
+ changedCellBaselineRef: A,
893
+ treeGridInstanceRef: L,
894
+ treeGridInitStartedAtRef: I,
895
+ latestLayoutOverridesRef: Ve,
896
+ latestToolbarTotalCountFormulaRef: H,
897
+ latestSuppressCfgRef: ee,
898
+ latestHideChildHeaderSortButtonsRef: v,
899
+ latestDisabledAnimationsRef: ne,
900
+ appliedLayoutOverridesRef: Xe,
901
+ appliedBodyDataPropRef: Me,
902
+ hasAppliedInitialLayoutRef: te,
903
+ syncHasDisplayDataRows: O,
904
+ setIsTreeGridReady: Je
304
905
  }) => {
305
- const T = t.current;
306
- if (window.TGSetEvent("OnRowAdd", e, (o, i) => {
307
- var u, d;
308
- i.CanEdit = 1, i.CanDelete = 1, (d = (u = t.current) == null ? void 0 : u.onRowAdd) == null || d.call(u, o, i);
309
- }), window.TGSetEvent("OnRowAdded", e, (o) => {
310
- y(o);
311
- }), window.TGSetEvent("OnRowRemove", e, (o) => {
312
- y(o);
313
- }), window.TGSetEvent("OnCanRowDelete", e, (o, i, u) => {
314
- var a;
315
- if (u !== 3)
316
- return u;
317
- const d = (a = t.current) == null ? void 0 : a.onBeforeRowUndelete;
318
- if (typeof d != "function")
319
- return u;
320
- const f = /* @__PURE__ */ c((l) => {
906
+ const G = n.current;
907
+ if (window.TGSetEvent("OnRowAdd", e, (s, c) => {
908
+ var l, f;
909
+ c.CanEdit = 1, c.CanDelete = 1, (f = (l = n.current) == null ? void 0 : l.onRowAdd) == null || f.call(l, s, c);
910
+ }), window.TGSetEvent("OnRowAdded", e, (s) => {
911
+ O(s);
912
+ }), window.TGSetEvent("OnRowRemove", e, (s) => {
913
+ O(s);
914
+ }), window.TGSetEvent("OnCanRowDelete", e, (s, c, l) => {
915
+ var p;
916
+ if (l !== 3)
917
+ return l;
918
+ const f = (p = n.current) == null ? void 0 : p.onBeforeRowUndelete;
919
+ if (typeof f != "function")
920
+ return l;
921
+ const T = /* @__PURE__ */ i((C) => {
321
922
  window.setTimeout(() => {
322
- we(
323
- I.current ?? o,
324
- i,
325
- l,
326
- y
923
+ it(
924
+ L.current ?? s,
925
+ c,
926
+ C,
927
+ O
327
928
  );
328
929
  }, 0);
329
930
  }, "scheduleAction");
330
931
  try {
331
- const l = d(o, i);
332
- return Ie(l) ? (l.then(f).catch(() => {
333
- f("undelete");
334
- }), 0) : (f(l), 0);
932
+ const C = f(s, c);
933
+ return rt(C) ? (C.then(T).catch(() => {
934
+ T("undelete");
935
+ }), 0) : (T(C), 0);
335
936
  } catch {
336
- return f("undelete"), 0;
937
+ return T("undelete"), 0;
337
938
  }
338
- }), typeof (T == null ? void 0 : T.onRowClick) == "function" || typeof (T == null ? void 0 : T.onInternalCellClick) == "function") {
339
- const o = m((i, u, d, f, a, l) => {
340
- var p, S;
341
- (S = (p = t.current) == null ? void 0 : p.onRowClick) == null || S.call(
342
- p,
343
- i,
344
- u,
345
- d,
939
+ }), typeof (G == null ? void 0 : G.onRowClick) == "function" || typeof (G == null ? void 0 : G.onInternalCellClick) == "function") {
940
+ const s = V((c, l, f, T, p, C) => {
941
+ var R, m;
942
+ (m = (R = n.current) == null ? void 0 : R.onRowClick) == null || m.call(
943
+ R,
944
+ c,
945
+ l,
346
946
  f,
347
- a,
348
- l
947
+ T,
948
+ p,
949
+ C
349
950
  );
350
951
  }, 300);
351
- window.TGSetEvent("OnClick", e, (i, u, d, f, a, l) => {
352
- var S, L, U;
353
- const p = (L = (S = t.current) == null ? void 0 : S.onInternalCellClick) == null ? void 0 : L.call(
354
- S,
355
- i,
356
- u,
357
- d,
952
+ window.TGSetEvent("OnClick", e, (c, l, f, T, p, C) => {
953
+ var m, ie, oe;
954
+ const R = (ie = (m = n.current) == null ? void 0 : m.onInternalCellClick) == null ? void 0 : ie.call(
955
+ m,
956
+ c,
957
+ l,
358
958
  f,
359
- a,
360
- l
959
+ T,
960
+ p,
961
+ C
361
962
  );
362
- if (p !== void 0)
363
- return p;
364
- typeof ((U = t.current) == null ? void 0 : U.onRowClick) == "function" && o(i, u, d, f, a, l);
963
+ if (R !== void 0)
964
+ return R;
965
+ typeof ((oe = n.current) == null ? void 0 : oe.onRowClick) == "function" && s(c, l, f, T, p, C);
365
966
  });
366
967
  }
367
- (typeof (T == null ? void 0 : T.onClickButton) == "function" || typeof (T == null ? void 0 : T.onInternalButtonClick) == "function") && window.TGSetEvent(
968
+ (typeof (G == null ? void 0 : G.onClickButton) == "function" || typeof (G == null ? void 0 : G.onInternalButtonClick) == "function") && window.TGSetEvent(
368
969
  "OnClickButton",
369
970
  e,
370
- (o, i, u, d) => {
371
- var a, l, p, S;
372
- const f = (l = (a = t.current) == null ? void 0 : a.onInternalButtonClick) == null ? void 0 : l.call(
373
- a,
374
- o,
375
- i,
376
- u,
377
- d
378
- );
379
- if (f !== void 0)
380
- return f;
381
- (S = (p = t.current) == null ? void 0 : p.onClickButton) == null || S.call(
971
+ (s, c, l, f) => {
972
+ var p, C, R, m;
973
+ const T = (C = (p = n.current) == null ? void 0 : p.onInternalButtonClick) == null ? void 0 : C.call(
382
974
  p,
383
- o,
384
- i,
385
- u,
386
- d
975
+ s,
976
+ c,
977
+ l,
978
+ f
979
+ );
980
+ if (T !== void 0)
981
+ return T;
982
+ (m = (R = n.current) == null ? void 0 : R.onClickButton) == null || m.call(
983
+ R,
984
+ s,
985
+ c,
986
+ l,
987
+ f
387
988
  );
388
989
  }
389
- ), typeof (T == null ? void 0 : T.onInternalKeyDown) == "function" && (window.TGSetEvent(
990
+ ), typeof (G == null ? void 0 : G.onInternalKeyDown) == "function" && (window.TGSetEvent(
390
991
  "OnKeyDown",
391
992
  e,
392
- (o, i, u, d, f) => {
393
- var a, l;
394
- return (l = (a = t.current) == null ? void 0 : a.onInternalKeyDown) == null ? void 0 : l.call(a, o, i, u, d, f);
993
+ (s, c, l, f, T) => {
994
+ var p, C;
995
+ return (C = (p = n.current) == null ? void 0 : p.onInternalKeyDown) == null ? void 0 : C.call(p, s, c, l, f, T);
395
996
  }
396
997
  ), window.TGSetEvent(
397
998
  "OnKeyPress",
398
999
  e,
399
- (o, i, u, d, f) => {
400
- var a, l;
401
- return (l = (a = t.current) == null ? void 0 : a.onInternalKeyDown) == null ? void 0 : l.call(a, o, i, u, d, f);
1000
+ (s, c, l, f, T) => {
1001
+ var p, C;
1002
+ return (C = (p = n.current) == null ? void 0 : p.onInternalKeyDown) == null ? void 0 : C.call(p, s, c, l, f, T);
402
1003
  }
403
- )), typeof (T == null ? void 0 : T.onInternalStartEdit) == "function" && window.TGSetEvent(
1004
+ )), typeof (G == null ? void 0 : G.onInternalStartEdit) == "function" && window.TGSetEvent(
404
1005
  "OnStartEdit",
405
1006
  e,
406
- (o, i, u) => {
407
- var d, f;
408
- return (f = (d = t.current) == null ? void 0 : d.onInternalStartEdit) == null ? void 0 : f.call(
409
- d,
410
- o,
411
- i,
412
- u
1007
+ (s, c, l) => {
1008
+ var f, T;
1009
+ return (T = (f = n.current) == null ? void 0 : f.onInternalStartEdit) == null ? void 0 : T.call(
1010
+ f,
1011
+ s,
1012
+ c,
1013
+ l
413
1014
  );
414
1015
  }
415
- ), window.TGSetEvent("OnRowDelete", e, (o, i, u) => {
416
- var f, a;
417
- const d = A(i) ? v(i) : [];
418
- V(o, i, {
419
- canEdit: G.current !== !1 ? 2 : void 0,
420
- highlightColumns: d
421
- }), y(o), (a = (f = t.current) == null ? void 0 : f.onRowDelete) == null || a.call(
422
- f,
423
- o,
424
- i,
425
- u
1016
+ ), window.TGSetEvent("OnRowDelete", e, (s, c, l) => {
1017
+ var T, p;
1018
+ const f = $(c) ? se(c) : [];
1019
+ he(s, c, {
1020
+ canEdit: d.current !== !1 ? 2 : void 0,
1021
+ highlightColumns: f
1022
+ }), O(s), (p = (T = n.current) == null ? void 0 : T.onRowDelete) == null || p.call(
1023
+ T,
1024
+ s,
1025
+ c,
1026
+ l
426
1027
  );
427
- }), window.TGSetEvent("OnRowUndelete", e, (o, i) => {
428
- var d, f;
429
- const u = A(i) ? v(i) : [];
430
- V(o, i, {
431
- canEdit: G.current !== !1 ? 1 : void 0,
432
- highlightColumns: u,
433
- highlightBackgroundColor: u.length ? h.current : void 0
434
- }), y(o), (f = (d = t.current) == null ? void 0 : d.onRowUndelete) == null || f.call(d, o, i);
435
- }), window.TGSetEvent("OnGetDefaultColor", e, (o, i, u) => {
436
- if (!(!r.current || !_(i)))
437
- return Ke(
438
- o,
439
- i,
440
- u,
441
- E.current
1028
+ }), window.TGSetEvent("OnRowUndelete", e, (s, c) => {
1029
+ var f, T;
1030
+ const l = $(c) ? se(c) : [];
1031
+ he(s, c, {
1032
+ canEdit: d.current !== !1 ? 1 : void 0,
1033
+ highlightColumns: l,
1034
+ highlightBackgroundColor: l.length ? u.current : void 0
1035
+ }), O(s), (T = (f = n.current) == null ? void 0 : f.onRowUndelete) == null || T.call(f, s, c);
1036
+ }), window.TGSetEvent("OnGetDefaultColor", e, (s, c, l) => {
1037
+ if (!(!r.current || !_(c)))
1038
+ return At(
1039
+ s,
1040
+ c,
1041
+ l,
1042
+ a.current
442
1043
  );
443
- }), window.TGSetEvent("OnGetColor", e, (o, i, u, d, f, a, l) => {
444
- if (!l)
445
- return Xe({
446
- grid: o,
447
- row: i,
448
- col: u,
449
- r: d,
450
- g: f,
451
- b: a,
452
- selectedCellBackgroundColor: C.current,
453
- hoverCellBackgroundColor: R.current
1044
+ }), window.TGSetEvent("OnGetColor", e, (s, c, l, f, T, p, C) => {
1045
+ if (!C)
1046
+ return mt({
1047
+ grid: s,
1048
+ row: c,
1049
+ col: l,
1050
+ r: f,
1051
+ g: T,
1052
+ b: p,
1053
+ focusedCellBackgroundColor: E.current,
1054
+ selectedCellBackgroundColor: g.current,
1055
+ hoverCellBackgroundColor: h.current
454
1056
  });
455
- }), window.TGSetEvent("OnAfterValueChanged", e, (o, i, u, d) => {
456
- var a, l;
457
- s.current && _(i) && Me({
458
- gridId: e,
459
- grid: o,
460
- row: i,
461
- col: u,
462
- backgroundColor: h.current,
463
- baselineMap: b.current
464
- });
465
- const f = ((a = t.current) == null ? void 0 : a.onAfterValueChanged) ?? ((l = t.current) == null ? void 0 : l.onRowChange);
466
- f == null || f(o, i, u, d);
467
- }), typeof (T == null ? void 0 : T.onSelect) == "function" && window.TGSetEvent(
468
- "OnSelect",
469
- e,
470
- m((o) => {
471
- var u, d;
472
- const i = o.GetSelRows() ?? [];
473
- (d = (u = t.current) == null ? void 0 : u.onSelect) == null || d.call(
474
- u,
475
- ae(o, i)
476
- );
477
- }, 100)
478
- ), typeof (T == null ? void 0 : T.onSave) == "function" && window.TGSetEvent("OnSave", e, (o, i, u) => {
479
- var d, f;
480
- (f = (d = t.current) == null ? void 0 : d.onSave) == null || f.call(
481
- d,
482
- o,
483
- i,
484
- u
1057
+ }), window.TGSetEvent("OnGetClass", e, (s, c, l, f) => {
1058
+ if (!(typeof f != "string" || !N(s, c, l)))
1059
+ return gt(f);
1060
+ }), window.TGSetEvent("OnAfterValueChanged", e, (s, c, l, f) => {
1061
+ var p, C;
1062
+ if (o.current && _(c)) {
1063
+ const R = !Rt(s, c, l) || N(s, c, l) && !Q(s, c, l);
1064
+ Et({
1065
+ gridId: e,
1066
+ grid: s,
1067
+ row: c,
1068
+ col: l,
1069
+ backgroundColor: u.current,
1070
+ baselineMap: A.current,
1071
+ highlightRefresh: R
1072
+ });
1073
+ }
1074
+ const T = ((p = n.current) == null ? void 0 : p.onAfterValueChanged) ?? ((C = n.current) == null ? void 0 : C.onRowChange);
1075
+ T == null || T(s, c, l, f);
1076
+ });
1077
+ const re = V((s) => {
1078
+ var l, f;
1079
+ const c = s.GetSelRows() ?? [];
1080
+ (f = (l = n.current) == null ? void 0 : l.onSelect) == null || f.call(
1081
+ l,
1082
+ Ye(s, c)
1083
+ );
1084
+ }, 100);
1085
+ window.TGSetEvent("OnSelect", e, (s, c, l, f, T) => {
1086
+ var p;
1087
+ T || (ht(s, c), ge(s, e), typeof ((p = n.current) == null ? void 0 : p.onSelect) == "function" && re(s));
1088
+ }), window.TGSetEvent("OnSelectAll", e, (s, c, l, f) => {
1089
+ var T;
1090
+ f || (ge(s, e), typeof ((T = n.current) == null ? void 0 : T.onSelect) == "function" && re(s));
1091
+ }), typeof (G == null ? void 0 : G.onSave) == "function" && window.TGSetEvent("OnSave", e, (s, c, l) => {
1092
+ var f, T;
1093
+ (T = (f = n.current) == null ? void 0 : f.onSave) == null || T.call(
1094
+ f,
1095
+ s,
1096
+ c,
1097
+ l
485
1098
  );
486
- }), window.TGSetEvent("OnSort", e, (o, i) => {
487
- var u;
488
- if (!(!i || !Q(o, o.ARow, i)))
489
- return z(e, "group header sort blocked"), Te(e, "group header sort blocked", {
490
- rowId: (u = o.ARow) == null ? void 0 : u.id,
491
- col: i
1099
+ }), window.TGSetEvent("OnSort", e, (s, c) => {
1100
+ var l;
1101
+ if (!(!c || !ct(
1102
+ s,
1103
+ s.ARow,
1104
+ c,
1105
+ v.current !== !1
1106
+ )))
1107
+ return Ie(e, "group header sort blocked"), He(e, "group header sort blocked", {
1108
+ rowId: (l = s.ARow) == null ? void 0 : l.id,
1109
+ col: c
492
1110
  }), -1;
493
- }), window.TGSetEvent("OnRenderStart", e, (o) => {
494
- P(o, e, !1);
495
- }), window.TGSetEvent("OnDataGet", e, (o, i, u) => ((i == null ? void 0 : i.Name) === "Layout" && typeof u == "string" && (n.current = g(u)), null)), window.TGSetEvent("OnDataParse", e, (o, i, u) => ((i == null ? void 0 : i.Name) === "Layout" && typeof u == "string" && (n.current = g(u)), null)), window.TGSetEvent(
1111
+ }), window.TGSetEvent("OnRenderStart", e, (s) => {
1112
+ j(s, e), Le(
1113
+ s,
1114
+ e,
1115
+ !1,
1116
+ v.current !== !1
1117
+ );
1118
+ }), window.TGSetEvent("OnRenderFinish", e, (s) => {
1119
+ j(s, e);
1120
+ }), window.TGSetEvent("OnDataGet", e, (s, c, l) => {
1121
+ if ((c == null ? void 0 : c.Name) === "Layout" && typeof l == "string") {
1122
+ t.current = ae(l);
1123
+ const f = K(
1124
+ l,
1125
+ ne.current,
1126
+ H.current,
1127
+ ee.current
1128
+ );
1129
+ return f === l ? null : f;
1130
+ }
1131
+ return null;
1132
+ }), window.TGSetEvent("OnDataParse", e, (s, c, l) => {
1133
+ if ((c == null ? void 0 : c.Name) === "Layout" && typeof l == "string") {
1134
+ t.current = ae(l);
1135
+ const f = K(
1136
+ l,
1137
+ ne.current,
1138
+ H.current,
1139
+ ee.current
1140
+ );
1141
+ return f === l ? null : f;
1142
+ }
1143
+ return null;
1144
+ }), window.TGSetEvent(
496
1145
  "OnReady",
497
1146
  e,
498
- m((o) => {
499
- var i, u;
500
- if (!B.current) {
501
- const d = Z.current;
502
- B.current = !0, !n.current && (o.EnterMode === void 0 || o.EnterMode === null || o.EnterMode === 0) && be(o, Ce), Ge(o, d), I.current = o, H.current = d, ee.current = x(o), b.current = /* @__PURE__ */ new WeakMap(), ke(o, b.current), y(o), te(!0), P(o, e, !0), Y(e, "TreeGrid init ready", w.current, {
503
- bodyRowCount: Le(
504
- x(o)
1147
+ V((s) => {
1148
+ var c, l;
1149
+ if (!te.current) {
1150
+ const f = Ve.current;
1151
+ te.current = !0, !t.current && (s.EnterMode === void 0 || s.EnterMode === null || s.EnterMode === 0) && et(s, tn), Ze(s, f), L.current = s, Xe.current = f, Me.current = Ae(s), A.current = /* @__PURE__ */ new WeakMap(), ft(s, A.current), O(s), Je(!0), Le(
1152
+ s,
1153
+ e,
1154
+ !0,
1155
+ v.current !== !1
1156
+ ), Oe(e, "TreeGrid init ready", I.current, {
1157
+ bodyRowCount: lt(
1158
+ Ae(s)
505
1159
  )
506
- }), w.current = null, (u = (i = t.current) == null ? void 0 : i.onReady) == null || u.call(i, o);
1160
+ }), I.current = null, (l = (c = n.current) == null ? void 0 : c.onReady) == null || l.call(c, s);
507
1161
  }
508
1162
  }, 100)
509
1163
  );
510
1164
  }, "bindTreeGridEvents");
511
1165
  export {
512
- ut as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
513
- ft as bindTreeGridEvents,
514
- ct as buildTreeGridInitializationOptions,
515
- ke as captureTreeGridChangeBaselines,
516
- Le as getTreeGridBodyDataCount,
517
- st as hasTreeGridDisplayDataRows,
518
- g as hasTreeGridExplicitEnterMode,
519
- dt as replaceTreeGridBodyData,
520
- Me as syncTreeGridChangedCellHighlight
1166
+ Ft as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
1167
+ Bt as bindTreeGridEvents,
1168
+ kt as buildTreeGridInitializationOptions,
1169
+ ft as captureTreeGridChangeBaselines,
1170
+ lt as getTreeGridBodyDataCount,
1171
+ Nt as hasTreeGridDisplayDataRows,
1172
+ ae as hasTreeGridExplicitEnterMode,
1173
+ Ut as replaceTreeGridBodyData,
1174
+ Et as syncTreeGridChangedCellHighlight
521
1175
  };
522
1176
  //# sourceMappingURL=treeGridRuntime.js.map