@owp/core 2.5.18 → 2.5.20

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 (53) hide show
  1. package/dist/components/OwpPageContent/OwpPageContent.js +14 -12
  2. package/dist/components/OwpPageContent/OwpPageContent.js.map +1 -1
  3. package/dist/components/OwpPageTitle/OwpPageTitle.js +37 -35
  4. package/dist/components/OwpPageTitle/OwpPageTitle.js.map +1 -1
  5. package/dist/components/OwpPicker/OwpDatePicker.js +339 -102
  6. package/dist/components/OwpPicker/OwpDatePicker.js.map +1 -1
  7. package/dist/components/OwpPicker/OwpDateRangePicker.js +89 -85
  8. package/dist/components/OwpPicker/OwpDateRangePicker.js.map +1 -1
  9. package/dist/components/OwpPicker/OwpTimePicker.js +494 -236
  10. package/dist/components/OwpPicker/OwpTimePicker.js.map +1 -1
  11. package/dist/components/OwpPicker/constants/index.js +6 -5
  12. package/dist/components/OwpPicker/constants/index.js.map +1 -1
  13. package/dist/components/OwpPicker/internal/DatePickerInput.js +71 -47
  14. package/dist/components/OwpPicker/internal/DatePickerInput.js.map +1 -1
  15. package/dist/components/OwpSection/OwpSection.js +84 -62
  16. package/dist/components/OwpSection/OwpSection.js.map +1 -1
  17. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +42 -40
  18. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
  19. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js +307 -270
  20. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js.map +1 -1
  21. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +267 -276
  22. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  23. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +262 -182
  24. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  25. package/dist/constants/gridTheme.js +7 -6
  26. package/dist/constants/gridTheme.js.map +1 -1
  27. package/dist/constants/treeGrid.js +32 -31
  28. package/dist/constants/treeGrid.js.map +1 -1
  29. package/dist/constants.js +28 -27
  30. package/dist/features/themePreview/configs/grid.js +3 -1
  31. package/dist/features/themePreview/configs/grid.js.map +1 -1
  32. package/dist/features/themePreview/utils/themePreviewDefinitions.js +10 -0
  33. package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -1
  34. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  35. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
  36. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  37. package/dist/owp-app.css +1 -1
  38. package/dist/types/components/OwpPageContent/OwpPageContent.d.ts +3 -1
  39. package/dist/types/components/OwpPageTitle/OwpPageTitle.d.ts +3 -1
  40. package/dist/types/components/OwpPicker/constants/index.d.ts +1 -0
  41. package/dist/types/components/OwpPicker/internal/DatePickerInput.d.ts +7 -0
  42. package/dist/types/components/OwpSection/OwpSection.d.ts +3 -1
  43. package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +1 -1
  44. package/dist/types/constants/gridTheme.d.ts +2 -0
  45. package/dist/types/constants/treeGrid.d.ts +2 -1
  46. package/dist/types/features/themePreview/configs/grid.d.ts +2 -0
  47. package/dist/types/features/themePreview/configs/settings.d.ts +2 -0
  48. package/dist/types/types/OwpGridThemeTypes.d.ts +1 -0
  49. package/dist/types/utils/treeGridUtil.d.ts +15 -3
  50. package/dist/utils/treeGridUtil.js +193 -147
  51. package/dist/utils/treeGridUtil.js.map +1 -1
  52. package/dist/utils.js +69 -67
  53. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
- var ie = Object.defineProperty;
2
- var c = (e, t) => ie(e, "name", { value: t, configurable: !0 });
3
- import { getTreeGridTextResourceUrl as ue, TREEGRID_CELL_HIGHLIGHT_CLASS as j, TREEGRID_CELL_HIGHLIGHT_COLOR as ce, resolveTreeGridColorNumber as se } from "../../../constants/treeGrid.js";
4
- import { isTreeGridRowAddedById as A, getTreeGridAddedRowHighlightColumns as N, getTreeGridCellComparableValue as z, clearTreeGridCellHighlightById as de, removeTreeGridAddedRowHighlightColumn as fe, highlightTreeGridCellById as Ge, appendTreeGridAddedRowHighlightColumn as Te, getTreeGridAddedRowBaselineValue as ae } from "../../../utils/treeGridUtil.js";
5
- import { applyTreeGridLayoutToGrid as Ee } from "./treeGridLayout.js";
6
- import { countTreeGridPerf as X, logTreeGridPerf as le, measureTreeGridPerf as Y } from "./utils/perf.js";
7
- import { debounce as b } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
8
- import { get as Ce } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
9
- import { isEmpty as he } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
10
- const dt = 300, Re = 3, pe = {
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, normalizeTreeGridExternalRows as ue, getTreeGridCellComparableValue as j, clearTreeGridCellHighlightById as ce, removeTreeGridAddedRowHighlightColumn as se, highlightTreeGridCellById as de, appendTreeGridAddedRowHighlightColumn as fe, getTreeGridAddedRowBaselineValue 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 { get as le } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
9
+ import { isEmpty as Ee } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
10
+ const ut = 300, Ce = 3, he = {
11
11
  1: {
12
12
  onEnter: "TabDownEdit",
13
13
  onEnterEdit: "AcceptEdit AND TabDownEdit,1"
@@ -24,56 +24,56 @@ const dt = 300, Re = 3, pe = {
24
24
  onEnter: "TabRightEditAdd",
25
25
  onEnterEdit: "AcceptEdit AND TabRightEditAdd,1"
26
26
  }
27
- }, _e = [255, 255, 166], Se = [240, 240, 240], De = [248, 248, 248], ye = [255, 255, 255], Ae = [255, 255, 254], Ie = [242, 242, 242], g = "Button", be = 0.75, me = 0.5, Oe = [255, 255, 255], Le = [17, 17, 18], k = j.split(/\s+/).filter(
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
28
  Boolean
29
- ), F = /* @__PURE__ */ c((e) => !!(e && /\b(?:EnterMode|OnEnterEdit|OnEnter)\s*[:=]/.test(e)), "hasTreeGridExplicitEnterMode"), Be = /* @__PURE__ */ c((e, t) => {
29
+ ), g = /* @__PURE__ */ c((e) => !!(e && /\b(?:EnterMode|OnEnterEdit|OnEnter)\s*[:=]/.test(e)), "hasTreeGridExplicitEnterMode"), be = /* @__PURE__ */ c((e, t) => {
30
30
  e.EnterMode = t;
31
- const n = pe[t];
31
+ const n = he[t];
32
32
  if (!n)
33
33
  return;
34
34
  const r = e;
35
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"), V = /* @__PURE__ */ new Map(), we = /* @__PURE__ */ c((e) => {
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) => {
37
37
  if (!e || !e.startsWith("data:"))
38
38
  return e;
39
- const t = V.get(e);
39
+ const t = F.get(e);
40
40
  if (t)
41
41
  return t;
42
42
  try {
43
- const [n, r = ""] = e.split(",", 2), d = /^data:([^;]*)(;base64)?$/i.exec(n), T = (d == null ? void 0 : d[1]) || "application/octet-stream", l = d != null && d[2] ? atob(r) : decodeURIComponent(r), h = new Uint8Array(l.length);
44
- for (let p = 0; p < l.length; p += 1)
45
- h[p] = l.charCodeAt(p);
46
- const C = URL.createObjectURL(new Blob([h], { type: T }));
47
- return V.set(e, C), C;
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;
48
48
  } catch {
49
49
  return e;
50
50
  }
51
- }, "resolveTreeGridInlineUrl"), m = /* @__PURE__ */ c((e) => {
51
+ }, "resolveTreeGridInlineUrl"), O = /* @__PURE__ */ c((e) => {
52
52
  if (!e || q(e))
53
- return we(e);
54
- const t = e.indexOf("#"), [n, r] = t >= 0 ? [e.slice(0, t), e.slice(t)] : [e, ""], d = n.includes("?") ? "&" : "?";
55
- return `${n}${d}noCache=${Date.now()}${r}`;
56
- }, "appendNoCacheQuery"), x = /* @__PURE__ */ c((e, t, n) => {
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) => {
57
57
  if (!e)
58
58
  return;
59
- const r = n.canEdit, d = n.highlightColumns ?? [], T = n.highlightBackgroundColor;
60
- if (!(r === void 0 && !d.length)) {
59
+ const r = n.canEdit, s = n.highlightColumns ?? [], G = n.highlightBackgroundColor;
60
+ if (!(r === void 0 && !s.length)) {
61
61
  typeof e.StartUpdate == "function" && e.StartUpdate();
62
62
  try {
63
- r !== void 0 && (t.CanEdit = r), d.forEach((l) => {
64
- l && (e.SetValue(
63
+ r !== void 0 && (t.CanEdit = r), s.forEach((E) => {
64
+ E && (e.SetValue(
65
65
  t,
66
- `${l}Class`,
67
- T ? j : "",
66
+ `${E}Class`,
67
+ G ? W : "",
68
68
  0
69
- ), e.SetValue(t, `${l}Color`, T ?? "", 0));
69
+ ), e.SetValue(t, `${E}Color`, G ?? "", 0));
70
70
  });
71
71
  } finally {
72
72
  typeof e.EndUpdate == "function" && e.EndUpdate();
73
73
  }
74
74
  typeof e.RefreshRow == "function" && e.RefreshRow(t);
75
75
  }
76
- }, "syncTreeGridDeletedRowState"), ve = /* @__PURE__ */ c((e) => e ? q(e) || e.includes("assets") ? m(e) : m(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), Ue = /* @__PURE__ */ c((e) => (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function", "isTreeGridPromiseLike"), Ne = /* @__PURE__ */ c((e, t, n, r) => {
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
77
  if (!(!e || n === "cancel")) {
78
78
  if (n === "remove") {
79
79
  e.RemoveRow(t), r(e);
@@ -81,27 +81,27 @@ const dt = 300, Re = 3, pe = {
81
81
  }
82
82
  e.DeleteRowT(t, 3);
83
83
  }
84
- }, "applyTreeGridBeforeRowUndeleteAction"), ge = /* @__PURE__ */ c((e, t, n) => e ? { Url: ve(t) } : { Data: { Body: [he(n) ? [] : n] } }, "buildTreeGridDataSource"), ft = /* @__PURE__ */ c(({
84
+ }, "applyTreeGridBeforeRowUndeleteAction"), Be = /* @__PURE__ */ c((e, t, n) => e ? { Url: Oe(t) } : { Data: { Body: [Ee(n) ? [] : n] } }, "buildTreeGridDataSource"), ct = /* @__PURE__ */ c(({
85
85
  id: e,
86
86
  layoutUrl: t,
87
87
  layoutData: n,
88
88
  dataUrl: r,
89
- bodyData: d,
90
- useDataUrl: T,
91
- width: l,
89
+ bodyData: s,
90
+ useDataUrl: G,
91
+ width: E,
92
92
  height: h,
93
93
  languageId: C
94
94
  }) => ({
95
95
  id: e,
96
- Layout: n ? { Data: n } : { Url: m(t ?? "") },
97
- Data: ge(T, r, d),
96
+ Layout: n ? { Data: n } : { Url: O(t ?? "") },
97
+ Data: Be(G, r, s),
98
98
  Text: {
99
- Url: ue(C)
99
+ Url: re(C)
100
100
  },
101
- width: l,
101
+ width: E,
102
102
  height: h,
103
103
  Debug: "Error"
104
- }), "buildTreeGridInitializationOptions"), M = /* @__PURE__ */ c((e) => Ce(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), $ = /* @__PURE__ */ c((e) => {
104
+ }), "buildTreeGridInitializationOptions"), x = /* @__PURE__ */ c((e) => le(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), M = /* @__PURE__ */ c((e) => {
105
105
  if (typeof e == "number")
106
106
  return Number.isFinite(e) && e > 0 ? e : void 0;
107
107
  if (typeof e != "string")
@@ -111,42 +111,42 @@ const dt = 300, Re = 3, pe = {
111
111
  return;
112
112
  const n = Number(t);
113
113
  return Number.isFinite(n) && n > 0 ? n : void 0;
114
- }, "parseTreeGridPositiveNumber"), P = /* @__PURE__ */ c((e, t, n, r) => {
114
+ }, "parseTreeGridPositiveNumber"), $ = /* @__PURE__ */ c((e, t, n, r) => {
115
115
  if (!t || !n)
116
116
  return;
117
- const d = e.GetAttribute(t, n, r), T = $(d);
118
- return T !== void 0 ? T : $(
117
+ const s = e.GetAttribute(t, n, r), G = M(s);
118
+ return G !== void 0 ? G : M(
119
119
  t[`${n}${r}`]
120
120
  );
121
- }, "getTreeGridHeaderCellSpanAttribute"), H = /* @__PURE__ */ c((e, t, n) => !t || !n || t.Fixed !== "Head" || (P(e, t, n, "Span") ?? 1) <= 1 ? !1 : (P(e, t, n, "RowSpan") ?? 1) === 1, "isTreeGridGroupHeaderCell"), K = /* @__PURE__ */ c((e, t, n = !1) => {
122
- const r = typeof performance < "u" ? performance.now() : Date.now(), d = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((C) => C.Fixed === "Head") : [], T = typeof e.GetCols == "function" ? e.GetCols() : [];
123
- if (!d.length || !T.length)
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)
124
124
  return;
125
- const l = /* @__PURE__ */ new Set();
125
+ const E = /* @__PURE__ */ new Set();
126
126
  let h = 0;
127
127
  typeof e.StartUpdate == "function" && e.StartUpdate();
128
128
  try {
129
- d.forEach((C) => {
130
- T.forEach((p) => {
131
- H(e, C, p) && e.GetAttribute(C, p, g) !== "" && (e.SetAttribute(C, p, g, "", 0, 0), l.add(C), h += 1);
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
132
  });
133
133
  });
134
134
  } finally {
135
135
  typeof e.EndUpdate == "function" && e.EndUpdate();
136
136
  }
137
- l.size && (n && l.forEach((C) => {
137
+ E.size && (n && E.forEach((C) => {
138
138
  typeof e.RefreshRow == "function" && e.RefreshRow(C);
139
- }), X(t, "group header button attribute apply"), Y(t, "group header button attribute apply", r, {
139
+ }), z(t, "group header button attribute apply"), Y(t, "group header button attribute apply", r, {
140
140
  updatedCellCount: h,
141
- updatedRowCount: l.size
141
+ updatedRowCount: E.size
142
142
  }));
143
- }, "applyTreeGridGroupHeaderSortButtonAttributes"), ke = /* @__PURE__ */ c((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), Fe = /* @__PURE__ */ c((e) => {
143
+ }, "applyTreeGridGroupHeaderSortButtonAttributes"), Le = /* @__PURE__ */ c((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), Ue = /* @__PURE__ */ c((e) => {
144
144
  const t = e == null ? void 0 : e.Visible;
145
145
  return !!e && t !== 0 && t !== !1 && t !== "0";
146
- }, "isVisibleTreeGridRow"), Ve = /* @__PURE__ */ c((e) => {
146
+ }, "isVisibleTreeGridRow"), ve = /* @__PURE__ */ c((e) => {
147
147
  const t = e == null ? void 0 : e.Added;
148
148
  return !!e && t !== 0 && t !== !1 && t !== "0" && t !== void 0;
149
- }, "isAddedTreeGridRow"), S = /* @__PURE__ */ c((e) => !e || e.Fixed === "Foot" || !Fe(e) ? !1 : e.Kind === "Data" || Ve(e), "isDisplayTreeGridRow"), Q = /* @__PURE__ */ c((e) => Object.keys(e.Cols ?? {}).filter(Boolean), "getTreeGridColumnNames"), xe = /* @__PURE__ */ c((e) => {
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) => {
150
150
  if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
151
151
  const t = [];
152
152
  let n = e.GetFirst();
@@ -155,377 +155,368 @@ const dt = 300, Re = 3, pe = {
155
155
  return t;
156
156
  }
157
157
  return Object.values(e.Rows ?? {});
158
- }, "getTreeGridRows"), Me = /* @__PURE__ */ c((e, t) => {
158
+ }, "getTreeGridRows"), ke = /* @__PURE__ */ c((e, t) => {
159
159
  if (!e)
160
160
  return;
161
- const n = Q(e);
162
- xe(e).forEach((r) => {
163
- S(r) && t.set(
161
+ const n = J(e);
162
+ Ne(e).forEach((r) => {
163
+ _(r) && t.set(
164
164
  r,
165
- new Map(n.map((d) => [d, z(e, r, d)]))
165
+ new Map(n.map((s) => [s, j(e, r, s)]))
166
166
  );
167
167
  });
168
- }, "captureTreeGridChangeBaselines"), $e = /* @__PURE__ */ c((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), Pe = /* @__PURE__ */ c((e, t, n) => {
168
+ }, "captureTreeGridChangeBaselines"), ge = /* @__PURE__ */ c((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), Fe = /* @__PURE__ */ c((e, t, n) => {
169
169
  const r = t;
170
- return Q(e).some((d) => d !== n && $e(r[`${d}Changed`]));
171
- }, "hasOtherTreeGridChangedCells"), Ke = /* @__PURE__ */ c((e, t, n) => {
170
+ return J(e).some((s) => s !== n && ge(r[`${s}Changed`]));
171
+ }, "hasOtherTreeGridChangedCells"), Ve = /* @__PURE__ */ c((e, t, n) => {
172
172
  const r = t;
173
- r[`${n}Changed`] = 0, !A(t) && !Pe(e, t, n) && (r.Changed = 0);
174
- }, "clearTreeGridCellChangedState"), We = /* @__PURE__ */ c((e, t, n) => {
173
+ r[`${n}Changed`] = 0, !A(t) && !Fe(e, t, n) && (r.Changed = 0);
174
+ }, "clearTreeGridCellChangedState"), xe = /* @__PURE__ */ c((e, t, n) => {
175
175
  const r = e.get(t);
176
176
  if (r != null && r.has(n))
177
177
  return r.get(n);
178
178
  if (A(t))
179
179
  return ae(t, n) ?? "";
180
- }, "resolveTreeGridCellBaselineValue"), je = /* @__PURE__ */ c(({
180
+ }, "resolveTreeGridCellBaselineValue"), Me = /* @__PURE__ */ c(({
181
181
  gridId: e,
182
182
  grid: t,
183
183
  row: n,
184
184
  col: r,
185
- backgroundColor: d,
186
- baselineMap: T
185
+ backgroundColor: s,
186
+ baselineMap: G
187
187
  }) => {
188
- if (!S(n))
188
+ if (!_(n))
189
189
  return;
190
- const l = We(T, n, r), h = z(t, n, r);
191
- if (l !== void 0 && h === l) {
192
- de(e, { row: n, col: r }), Ke(t, n, r), A(n) && fe(n, r);
190
+ const E = xe(G, n, r), h = j(t, n, r);
191
+ if (E !== void 0 && h === E) {
192
+ ce(e, { row: n, col: r }), Ve(t, n, r), A(n) && se(n, r);
193
193
  return;
194
194
  }
195
- Ge(e, {
195
+ de(e, {
196
196
  row: n,
197
197
  col: r,
198
- backgroundColor: d
199
- }), A(n) && Te(n, r);
200
- }, "syncTreeGridChangedCellHighlight"), ze = /* @__PURE__ */ c((e, t, n) => !t || !n || !S(t) ? !1 : e.CanEdit(t, n) === 1, "isEditableTreeGridCell"), Xe = /* @__PURE__ */ c((e, t, n) => {
198
+ backgroundColor: s
199
+ }), A(n) && fe(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
201
  const r = e.GetAttribute(t, n, "Color");
202
202
  return r != null && r !== "";
203
- }, "hasExplicitTreeGridCellColor"), Ye = /* @__PURE__ */ c((e, t, n, r) => {
204
- if (!(!t || r === void 0 || !ze(e, t, n) || Xe(e, t, n)))
203
+ }, "hasExplicitTreeGridCellColor"), Ke = /* @__PURE__ */ c((e, t, n, r) => {
204
+ if (!(!t || r === void 0 || !$e(e, t, n) || Pe(e, t, n)))
205
205
  return r;
206
- }, "getEditableTreeGridCellDefaultColor"), y = /* @__PURE__ */ c((e, t, n, r) => e === r[0] && t === r[1] && n === r[2], "matchesTreeGridRgbColor"), W = /* @__PURE__ */ c((e) => {
207
- const t = typeof e == "number" ? e : typeof e == "string" ? se(e) : void 0;
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
208
  if (!(t === void 0 || !Number.isFinite(t)))
209
209
  return [t >> 16 & 255, t >> 8 & 255, t & 255];
210
- }, "resolveTreeGridColorRgb"), J = /* @__PURE__ */ c((e) => `#${e.map((t) => Math.max(0, Math.min(255, t)).toString(16).padStart(2, "0")).join("")}`, "stringifyTreeGridRgbColor"), Z = /* @__PURE__ */ c((e, t, n) => {
211
- const r = /* @__PURE__ */ c((d, T) => Math.round(
212
- d * (1 - n) + T * n
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
213
  ), "blendChannel");
214
214
  return [
215
215
  r(e[0], t[0]),
216
216
  r(e[1], t[1]),
217
217
  r(e[2], t[2])
218
218
  ];
219
- }, "blendTreeGridRgbColor"), qe = /* @__PURE__ */ c((e) => (e == null ? void 0 : e.split(/\s+/).filter(Boolean)) ?? [], "getTreeGridClassTokens"), ee = /* @__PURE__ */ c((e) => {
220
- const t = typeof e == "string" ? qe(e) : [];
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
221
  return k.length > 0 && k.every((n) => t.includes(n));
222
- }, "hasTreeGridCellHighlightClass"), O = /* @__PURE__ */ c((e, t, n) => {
223
- if (!t || !n || !S(t))
222
+ }, "hasTreeGridChangedCellClass"), X = /* @__PURE__ */ c((e, t, n) => {
223
+ if (!t || !n || !_(t))
224
224
  return !1;
225
225
  const r = e.IsSelected(t, n);
226
226
  return r !== 0 && r !== !1 && r !== void 0 && r !== null;
227
- }, "isTreeGridSelectedCellState"), He = /* @__PURE__ */ c((e, t, n, r) => {
228
- if (!t || !O(e, t, n) || !ee(e.GetAttribute(t, n, "Class")))
227
+ }, "isTreeGridSelectedCellState"), qe = /* @__PURE__ */ c((e, t, n, r) => {
228
+ if (!t || !X(e, t, n) || !Ye(e.GetAttribute(t, n, "Class")))
229
229
  return;
230
- const d = W(r), T = W(
231
- e.GetAttribute(t, n, "Color") ?? ce
230
+ const s = K(r), G = K(
231
+ e.GetAttribute(t, n, "Color") ?? oe
232
232
  );
233
- if (!(!d || !T))
234
- return J(
235
- Z(
236
- d,
237
- T,
238
- be
239
- )
240
- );
241
- }, "resolveTreeGridSelectedHighlightBackgroundColor"), Qe = /* @__PURE__ */ c((e, t, n, r) => {
242
- if (!(r || !t || !O(e, t, n) || !ee(e.GetAttribute(t, n, "Class"))))
243
- return J(
244
- Z(
245
- Oe,
246
- Le,
247
- me
233
+ if (!(!s || !G))
234
+ return We(
235
+ je(
236
+ s,
237
+ G,
238
+ Ae
248
239
  )
249
240
  );
250
- }, "resolveTreeGridSelectedHighlightTextColor"), Je = /* @__PURE__ */ c((e, t, n) => !t || !n || !S(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 0, "isTreeGridReadonlyHoveredCellState"), Ze = /* @__PURE__ */ c((e, t, n) => !t || !n || !S(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 2, "isTreeGridPreviewHoveredCellState"), et = /* @__PURE__ */ c(({
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(({
251
242
  grid: e,
252
243
  row: t,
253
244
  col: n,
254
245
  r,
255
- g: d,
256
- b: T,
257
- selectedCellBackgroundColor: l,
246
+ g: s,
247
+ b: G,
248
+ selectedCellBackgroundColor: E,
258
249
  hoverCellBackgroundColor: h
259
250
  }) => {
260
- const C = He(
251
+ const C = qe(
261
252
  e,
262
253
  t,
263
254
  n,
264
- l
255
+ E
265
256
  );
266
257
  if (C)
267
258
  return C;
268
- if (O(e, t, n) && y(r, d, T, _e))
269
- return l;
270
- if (Je(e, t, n) && (y(r, d, T, Se) || y(r, d, T, De)) || Ze(e, t, n) && (y(r, d, T, ye) || y(r, d, T, Ae) || y(r, d, T, Ie)))
259
+ if (X(e, t, n) && D(r, s, G, pe))
260
+ 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)))
271
262
  return h;
272
- }, "resolveTreeGridStateBackgroundColor"), Gt = /* @__PURE__ */ c((e) => {
263
+ }, "resolveTreeGridStateBackgroundColor"), st = /* @__PURE__ */ c((e) => {
273
264
  if (!e)
274
265
  return !1;
275
266
  if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
276
267
  let t = e.GetFirst();
277
268
  for (; t; ) {
278
- if (S(t))
269
+ if (_(t))
279
270
  return !0;
280
271
  t = e.GetNext(t);
281
272
  }
282
273
  return !1;
283
274
  }
284
- return Object.values(e.Rows ?? {}).some((t) => S(t));
285
- }, "hasTreeGridDisplayDataRows"), Tt = /* @__PURE__ */ c((e, t, n) => {
286
- var d;
287
- const r = (d = e.Data) == null ? void 0 : d.Data;
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;
288
279
  e.Data.Data = {
289
280
  ...r,
290
281
  Data: { Body: [t || []] },
291
282
  Url: ""
292
283
  }, e.ReloadBody(n);
293
- }, "replaceTreeGridBodyData"), at = /* @__PURE__ */ c(({
284
+ }, "replaceTreeGridBodyData"), ft = /* @__PURE__ */ c(({
294
285
  id: e,
295
286
  latestEventHandlersRef: t,
296
287
  layoutHasExplicitEnterModeRef: n,
297
288
  highlightEditableCellsRef: r,
298
- highlightChangedCellsRef: d,
299
- syncDeletedRowCanEditRef: T,
300
- editableCellBackgroundColorValueRef: l,
289
+ highlightChangedCellsRef: s,
290
+ syncDeletedRowCanEditRef: G,
291
+ editableCellBackgroundColorValueRef: E,
301
292
  changedCellBackgroundColorRef: h,
302
293
  selectedCellBackgroundColorRef: C,
303
- hoverCellBackgroundColorRef: p,
304
- changedCellBaselineRef: I,
305
- treeGridInstanceRef: L,
306
- treeGridInitStartedAtRef: B,
307
- latestLayoutOverridesRef: te,
308
- appliedLayoutOverridesRef: ne,
309
- appliedBodyDataPropRef: re,
310
- hasAppliedInitialLayoutRef: w,
311
- syncHasDisplayDataRows: D,
312
- setIsTreeGridReady: oe
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
313
304
  }) => {
314
- const a = t.current;
315
- if (window.TGSetEvent("OnRowAdd", e, (i, o) => {
316
- var u, s;
317
- o.CanEdit = 1, o.CanDelete = 1, (s = (u = t.current) == null ? void 0 : u.onRowAdd) == null || s.call(u, i, o);
318
- }), window.TGSetEvent("OnRowAdded", e, (i) => {
319
- D(i);
320
- }), window.TGSetEvent("OnRowRemove", e, (i) => {
321
- D(i);
322
- }), window.TGSetEvent("OnCanRowDelete", e, (i, o, u) => {
323
- var G;
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;
324
315
  if (u !== 3)
325
316
  return u;
326
- const s = (G = t.current) == null ? void 0 : G.onBeforeRowUndelete;
327
- if (typeof s != "function")
317
+ const d = (a = t.current) == null ? void 0 : a.onBeforeRowUndelete;
318
+ if (typeof d != "function")
328
319
  return u;
329
- const f = /* @__PURE__ */ c((E) => {
320
+ const f = /* @__PURE__ */ c((l) => {
330
321
  window.setTimeout(() => {
331
- Ne(
332
- L.current ?? i,
333
- o,
334
- E,
335
- D
322
+ we(
323
+ I.current ?? o,
324
+ i,
325
+ l,
326
+ y
336
327
  );
337
328
  }, 0);
338
329
  }, "scheduleAction");
339
330
  try {
340
- const E = s(i, o);
341
- return Ue(E) ? (E.then(f).catch(() => {
331
+ const l = d(o, i);
332
+ return Ie(l) ? (l.then(f).catch(() => {
342
333
  f("undelete");
343
- }), 0) : (f(E), 0);
334
+ }), 0) : (f(l), 0);
344
335
  } catch {
345
336
  return f("undelete"), 0;
346
337
  }
347
- }), typeof (a == null ? void 0 : a.onRowClick) == "function" || typeof (a == null ? void 0 : a.onInternalCellClick) == "function") {
348
- const i = b((o, u, s, f, G, E) => {
349
- var R, _;
350
- (_ = (R = t.current) == null ? void 0 : R.onRowClick) == null || _.call(
351
- R,
352
- o,
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,
353
344
  u,
354
- s,
345
+ d,
355
346
  f,
356
- G,
357
- E
347
+ a,
348
+ l
358
349
  );
359
350
  }, 300);
360
- window.TGSetEvent("OnClick", e, (o, u, s, f, G, E) => {
361
- var _, v, U;
362
- const R = (v = (_ = t.current) == null ? void 0 : _.onInternalCellClick) == null ? void 0 : v.call(
363
- _,
364
- o,
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,
365
356
  u,
366
- s,
357
+ d,
367
358
  f,
368
- G,
369
- E
359
+ a,
360
+ l
370
361
  );
371
- if (R !== void 0)
372
- return R;
373
- typeof ((U = t.current) == null ? void 0 : U.onRowClick) == "function" && i(o, u, s, f, G, E);
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);
374
365
  });
375
366
  }
376
- (typeof (a == null ? void 0 : a.onClickButton) == "function" || typeof (a == null ? void 0 : a.onInternalButtonClick) == "function") && window.TGSetEvent(
367
+ (typeof (T == null ? void 0 : T.onClickButton) == "function" || typeof (T == null ? void 0 : T.onInternalButtonClick) == "function") && window.TGSetEvent(
377
368
  "OnClickButton",
378
369
  e,
379
- (i, o, u, s) => {
380
- var G, E, R, _;
381
- const f = (E = (G = t.current) == null ? void 0 : G.onInternalButtonClick) == null ? void 0 : E.call(
382
- G,
383
- i,
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,
384
374
  o,
375
+ i,
385
376
  u,
386
- s
377
+ d
387
378
  );
388
379
  if (f !== void 0)
389
380
  return f;
390
- (_ = (R = t.current) == null ? void 0 : R.onClickButton) == null || _.call(
391
- R,
392
- i,
381
+ (S = (p = t.current) == null ? void 0 : p.onClickButton) == null || S.call(
382
+ p,
393
383
  o,
384
+ i,
394
385
  u,
395
- s
386
+ d
396
387
  );
397
388
  }
398
- ), typeof (a == null ? void 0 : a.onInternalKeyDown) == "function" && (window.TGSetEvent(
389
+ ), typeof (T == null ? void 0 : T.onInternalKeyDown) == "function" && (window.TGSetEvent(
399
390
  "OnKeyDown",
400
391
  e,
401
- (i, o, u, s, f) => {
402
- var G, E;
403
- return (E = (G = t.current) == null ? void 0 : G.onInternalKeyDown) == null ? void 0 : E.call(G, i, o, u, s, f);
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);
404
395
  }
405
396
  ), window.TGSetEvent(
406
397
  "OnKeyPress",
407
398
  e,
408
- (i, o, u, s, f) => {
409
- var G, E;
410
- return (E = (G = t.current) == null ? void 0 : G.onInternalKeyDown) == null ? void 0 : E.call(G, i, o, u, s, f);
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);
411
402
  }
412
- )), typeof (a == null ? void 0 : a.onInternalStartEdit) == "function" && window.TGSetEvent(
403
+ )), typeof (T == null ? void 0 : T.onInternalStartEdit) == "function" && window.TGSetEvent(
413
404
  "OnStartEdit",
414
405
  e,
415
- (i, o, u) => {
416
- var s, f;
417
- return (f = (s = t.current) == null ? void 0 : s.onInternalStartEdit) == null ? void 0 : f.call(
418
- s,
419
- i,
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,
420
410
  o,
411
+ i,
421
412
  u
422
413
  );
423
414
  }
424
- ), window.TGSetEvent("OnRowDelete", e, (i, o, u) => {
425
- var f, G;
426
- const s = A(o) ? N(o) : [];
427
- x(i, o, {
428
- canEdit: T.current !== !1 ? 2 : void 0,
429
- highlightColumns: s
430
- }), D(i), (G = (f = t.current) == null ? void 0 : f.onRowDelete) == null || G.call(
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(
431
422
  f,
432
- i,
433
423
  o,
424
+ i,
434
425
  u
435
426
  );
436
- }), window.TGSetEvent("OnRowUndelete", e, (i, o) => {
437
- var s, f;
438
- const u = A(o) ? N(o) : [];
439
- x(i, o, {
440
- canEdit: T.current !== !1 ? 1 : void 0,
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,
441
432
  highlightColumns: u,
442
433
  highlightBackgroundColor: u.length ? h.current : void 0
443
- }), D(i), (f = (s = t.current) == null ? void 0 : s.onRowUndelete) == null || f.call(s, i, o);
444
- }), window.TGSetEvent("OnGetCellStyle", e, (i, o, u, s, f) => {
445
- if (s === "TextColor")
446
- return Qe(i, o, u, f);
447
- }), window.TGSetEvent("OnGetDefaultColor", e, (i, o, u) => {
448
- if (!(!r.current || !S(o)))
449
- return Ye(
450
- i,
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(
451
438
  o,
439
+ i,
452
440
  u,
453
- l.current
441
+ E.current
454
442
  );
455
- }), window.TGSetEvent("OnGetColor", e, (i, o, u, s, f, G, E) => {
456
- if (!E)
457
- return et({
458
- grid: i,
459
- row: o,
443
+ }), window.TGSetEvent("OnGetColor", e, (o, i, u, d, f, a, l) => {
444
+ if (!l)
445
+ return Xe({
446
+ grid: o,
447
+ row: i,
460
448
  col: u,
461
- r: s,
449
+ r: d,
462
450
  g: f,
463
- b: G,
451
+ b: a,
464
452
  selectedCellBackgroundColor: C.current,
465
- hoverCellBackgroundColor: p.current
453
+ hoverCellBackgroundColor: R.current
466
454
  });
467
- }), window.TGSetEvent("OnAfterValueChanged", e, (i, o, u, s) => {
468
- var G, E;
469
- d.current && S(o) && je({
455
+ }), window.TGSetEvent("OnAfterValueChanged", e, (o, i, u, d) => {
456
+ var a, l;
457
+ s.current && _(i) && Me({
470
458
  gridId: e,
471
- grid: i,
472
- row: o,
459
+ grid: o,
460
+ row: i,
473
461
  col: u,
474
462
  backgroundColor: h.current,
475
- baselineMap: I.current
463
+ baselineMap: b.current
476
464
  });
477
- const f = ((G = t.current) == null ? void 0 : G.onAfterValueChanged) ?? ((E = t.current) == null ? void 0 : E.onRowChange);
478
- f == null || f(i, o, u, s);
479
- }), typeof (a == null ? void 0 : a.onSelect) == "function" && window.TGSetEvent(
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(
480
468
  "OnSelect",
481
469
  e,
482
- b((i) => {
483
- var u, s;
484
- const o = i.GetSelRows() ?? [];
485
- (s = (u = t.current) == null ? void 0 : u.onSelect) == null || s.call(u, o);
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
+ ue(o, i)
476
+ );
486
477
  }, 100)
487
- ), typeof (a == null ? void 0 : a.onSave) == "function" && window.TGSetEvent("OnSave", e, (i, o, u) => {
488
- var s, f;
489
- (f = (s = t.current) == null ? void 0 : s.onSave) == null || f.call(
490
- s,
491
- i,
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,
492
482
  o,
483
+ i,
493
484
  u
494
485
  );
495
- }), window.TGSetEvent("OnSort", e, (i, o) => {
486
+ }), window.TGSetEvent("OnSort", e, (o, i) => {
496
487
  var u;
497
- if (!(!o || !H(i, i.ARow, o)))
498
- return X(e, "group header sort blocked"), le(e, "group header sort blocked", {
499
- rowId: (u = i.ARow) == null ? void 0 : u.id,
500
- col: o
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
501
492
  }), -1;
502
- }), window.TGSetEvent("OnRenderStart", e, (i) => {
503
- K(i, e, !1);
504
- }), window.TGSetEvent("OnDataGet", e, (i, o, u) => ((o == null ? void 0 : o.Name) === "Layout" && typeof u == "string" && (n.current = F(u)), null)), window.TGSetEvent("OnDataParse", e, (i, o, u) => ((o == null ? void 0 : o.Name) === "Layout" && typeof u == "string" && (n.current = F(u)), null)), window.TGSetEvent(
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(
505
496
  "OnReady",
506
497
  e,
507
- b((i) => {
508
- var o, u;
509
- if (!w.current) {
510
- const s = te.current;
511
- w.current = !0, !n.current && (i.EnterMode === void 0 || i.EnterMode === null || i.EnterMode === 0) && Be(i, Re), Ee(i, s), L.current = i, ne.current = s, re.current = M(i), I.current = /* @__PURE__ */ new WeakMap(), Me(i, I.current), D(i), oe(!0), K(i, e, !0), Y(e, "TreeGrid init ready", B.current, {
512
- bodyRowCount: ke(
513
- M(i)
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)
514
505
  )
515
- }), B.current = null, (u = (o = t.current) == null ? void 0 : o.onReady) == null || u.call(o, i);
506
+ }), w.current = null, (u = (i = t.current) == null ? void 0 : i.onReady) == null || u.call(i, o);
516
507
  }
517
508
  }, 100)
518
509
  );
519
510
  }, "bindTreeGridEvents");
520
511
  export {
521
- dt as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
522
- at as bindTreeGridEvents,
523
- ft as buildTreeGridInitializationOptions,
524
- Me as captureTreeGridChangeBaselines,
525
- ke as getTreeGridBodyDataCount,
526
- Gt as hasTreeGridDisplayDataRows,
527
- F as hasTreeGridExplicitEnterMode,
528
- Tt as replaceTreeGridBodyData,
529
- je as syncTreeGridChangedCellHighlight
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
530
521
  };
531
522
  //# sourceMappingURL=treeGridRuntime.js.map