@owp/core 2.5.25 → 2.5.27

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 (74) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index12.js +2 -2
  3. package/dist/_virtual/index13.js +2 -2
  4. package/dist/_virtual/index14.js +2 -2
  5. package/dist/_virtual/index16.js +4 -4
  6. package/dist/_virtual/index17.js +4 -4
  7. package/dist/_virtual/index18.js +4 -4
  8. package/dist/_virtual/index19.js +4 -4
  9. package/dist/components/OwpExportExcelButton/OwpExportExcelButton.js +19 -19
  10. package/dist/components/OwpExportExcelButton/OwpExportExcelButton.js.map +1 -1
  11. package/dist/components/OwpPicker/OwpDatePicker.js +316 -291
  12. package/dist/components/OwpPicker/OwpDatePicker.js.map +1 -1
  13. package/dist/components/OwpPicker/OwpDateRangePicker.js +175 -85
  14. package/dist/components/OwpPicker/OwpDateRangePicker.js.map +1 -1
  15. package/dist/components/OwpPicker/OwpTimePicker.js +305 -305
  16. package/dist/components/OwpPicker/OwpTimePicker.js.map +1 -1
  17. package/dist/components/OwpPicker/internal/AnimatedCalendarContainer.js +21 -31
  18. package/dist/components/OwpPicker/internal/AnimatedCalendarContainer.js.map +1 -1
  19. package/dist/components/OwpPicker/internal/OwpDatePickerCalendarHeader.js +182 -0
  20. package/dist/components/OwpPicker/internal/OwpDatePickerCalendarHeader.js.map +1 -0
  21. package/dist/components/OwpPicker/internal/pickerEditorStyles.js +68 -0
  22. package/dist/components/OwpPicker/internal/pickerEditorStyles.js.map +1 -0
  23. package/dist/components/OwpPicker/internal/useOwpDatePickerCalendarHeaderState.js +50 -0
  24. package/dist/components/OwpPicker/internal/useOwpDatePickerCalendarHeaderState.js.map +1 -0
  25. package/dist/components/OwpPicker/internal/useOwpPickerPopperTransition.js +36 -0
  26. package/dist/components/OwpPicker/internal/useOwpPickerPopperTransition.js.map +1 -0
  27. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +125 -117
  28. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
  29. package/dist/components/OwpSelectorBase/OwpSelectorSelect.js +84 -77
  30. package/dist/components/OwpSelectorBase/OwpSelectorSelect.js.map +1 -1
  31. package/dist/components/OwpSelectorBase/selectorBaseStyles.js +10 -0
  32. package/dist/components/OwpSelectorBase/selectorBaseStyles.js.map +1 -0
  33. package/dist/components/OwpStyleProvider/OwpStyleProvider.js +76 -72
  34. package/dist/components/OwpStyleProvider/OwpStyleProvider.js.map +1 -1
  35. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js +415 -401
  36. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js.map +1 -1
  37. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +420 -267
  38. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  39. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +289 -176
  40. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  41. package/dist/components/OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.js +10 -10
  42. package/dist/components/OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.js.map +1 -1
  43. package/dist/layout/components/logo/Logo.js +40 -53
  44. package/dist/layout/components/logo/Logo.js.map +1 -1
  45. package/dist/layout/components/navbar/style/NavbarStyle.js +47 -40
  46. package/dist/layout/components/navbar/style/NavbarStyle.js.map +1 -1
  47. package/dist/layout/components/navbar/style/NavbarStyleContent.js +67 -42
  48. package/dist/layout/components/navbar/style/NavbarStyleContent.js.map +1 -1
  49. package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
  50. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ArrowDropUp.js +9 -0
  51. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ArrowDropUp.js.map +1 -0
  52. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  53. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  54. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  55. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
  56. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  57. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  58. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  59. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  60. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  61. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  62. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  63. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  64. 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
  65. package/dist/owp-app.css +1 -1
  66. package/dist/types/components/OwpPicker/OwpDatePicker.d.ts +1 -1
  67. package/dist/types/components/OwpPicker/OwpDateRangePicker.d.ts +2 -2
  68. package/dist/types/components/OwpPicker/internal/OwpDatePickerCalendarHeader.d.ts +28 -0
  69. package/dist/types/components/OwpPicker/internal/pickerEditorStyles.d.ts +9 -0
  70. package/dist/types/components/OwpPicker/internal/useOwpDatePickerCalendarHeaderState.d.ts +25 -0
  71. package/dist/types/components/OwpPicker/internal/useOwpPickerPopperTransition.d.ts +10 -0
  72. package/dist/types/components/OwpSelectorBase/selectorBaseStyles.d.ts +8 -0
  73. package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +4 -0
  74. package/package.json +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 pe = Object.defineProperty;
2
+ var o = (e, t) => pe(e, "name", { value: t, configurable: !0 });
3
+ import { getTreeGridTextResourceUrl as Re, TREEGRID_CELL_CHANGED_CLASS as ce, TREEGRID_CELL_HIGHLIGHT_COLOR as _e, resolveTreeGridColorNumber as Ae } from "../../../constants/treeGrid.js";
4
+ import { isTreeGridRowAddedById as y, getTreeGridAddedRowHighlightColumns as V, getTreeGridCellComparableValue as se, clearTreeGridCellHighlightById as be, removeTreeGridAddedRowHighlightColumn as ye, highlightTreeGridCellById as Le, appendTreeGridAddedRowHighlightColumn as ge, normalizeTreeGridExternalRows as me, getTreeGridAddedRowBaselineValue as De } from "../../../utils/treeGridUtil.js";
5
+ import { applyTreeGridLayoutToGrid as we } from "./treeGridLayout.js";
6
+ import { TREE_GRID_PANEL_CHECKBOX_SELECT_CLASS as Ie, TREE_GRID_SELECT_ALL_CHECKED_CLASS as M, TREE_GRID_SELECT_ALL_INDETERMINATE_CLASS as W, TREE_GRID_SELECT_ALL_UNCHECKED_CLASS as K, TREE_GRID_THEME_WRAPPER_CLASS as Oe } from "./treeGridTheme.js";
7
+ import { countTreeGridPerf as ue, logTreeGridPerf as Be, measureTreeGridPerf as de } from "./utils/perf.js";
8
+ import { debounce as D } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
9
+ import { isEmpty as Pe } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
10
+ import { get as ke } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
11
+ const Nt = 300, xe = 3, Ne = {
11
12
  1: {
12
13
  onEnter: "TabDownEdit",
13
14
  onEnterEdit: "AcceptEdit AND TabDownEdit,1"
@@ -24,56 +25,188 @@ 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
+ }, Ue = [255, 255, 166], ve = [240, 240, 240], Fe = [248, 248, 248], $e = [255, 255, 255], Ve = [255, 255, 254], Me = [242, 242, 242], J = "Button", We = 0.75, j = ce.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
+ ), X = /* @__PURE__ */ o((e) => !!(e && /\b(?:EnterMode|OnEnterEdit|OnEnter)\s*[:=]/.test(e)), "hasTreeGridExplicitEnterMode"), L = /* @__PURE__ */ o((e) => typeof e == "object" && e !== null && !Array.isArray(e), "isTreeGridJsonRecord"), g = /* @__PURE__ */ o((e) => e === 0 || e === !1 || e === "0" || e === "false", "isTreeGridDisabledConfigValue"), I = /* @__PURE__ */ o((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitEnabledConfigValue"), k = /* @__PURE__ */ o((e, t) => !g(e) && !I(t), "isTreeGridCheckboxSelectionMode"), Ke = /* @__PURE__ */ o((e) => {
31
+ const t = e.Cfg;
32
+ return Array.isArray(t) ? t.filter(L) : L(t) ? [t] : [];
33
+ }, "getTreeGridJsonCfgRecords"), z = /* @__PURE__ */ o((e, t) => {
34
+ let n;
35
+ return Ke(e).forEach((r) => {
36
+ t in r && (n = r[t]);
37
+ }), n;
38
+ }, "getTreeGridJsonCfgValue"), H = /* @__PURE__ */ o((e, t) => {
39
+ const n = new RegExp(`\\b${t}\\s*=\\s*(['"])(.*?)\\1`, "gi");
40
+ let r, s;
41
+ for (; r = n.exec(e); )
42
+ s = r[2];
43
+ return s;
44
+ }, "getTreeGridXmlAttributeValue"), Y = /* @__PURE__ */ o((e, t) => new RegExp(`\\b${t}\\s*=`, "i").test(e), "hasTreeGridXmlTagAttribute"), Z = /* @__PURE__ */ o((e, t, n) => {
45
+ const r = e.endsWith("/>") ? e.length - 2 : e.length - 1;
46
+ return `${e.slice(0, r)} ${t}="${n}"${e.slice(r)}`;
47
+ }, "appendTreeGridXmlTagAttribute"), Je = /* @__PURE__ */ o((e) => {
48
+ const t = /<([A-Za-z][\w:-]*)\b[^>]*(?:\/>|>)/g, n = [];
49
+ let r;
50
+ for (; r = t.exec(e); ) {
51
+ if (r[1].toLowerCase() !== "header") {
52
+ if (n.length > 0)
53
+ break;
54
+ return n;
55
+ }
56
+ n.push({
57
+ index: r.index,
58
+ tag: r[0]
59
+ });
60
+ }
61
+ return n;
62
+ }, "getLeadingTreeGridXmlHeaderTags"), je = /* @__PURE__ */ o((e) => {
63
+ const t = Je(e);
64
+ if (t.length <= 1)
65
+ return e;
66
+ const [n, ...r] = t;
67
+ if (Y(n.tag, "PanelRowSpan") || r.some(({ tag: f }) => /\bPanel[A-Za-z0-9_]*\s*=/i.test(f)))
68
+ return e;
69
+ let s = n.tag;
70
+ return Y(s, "Spanned") || (s = Z(s, "Spanned", 1)), s = Z(
71
+ s,
72
+ "PanelRowSpan",
73
+ t.length
74
+ ), `${e.slice(0, n.index)}${s}${e.slice(
75
+ n.index + n.tag.length
76
+ )}`;
77
+ }, "applyTreeGridXmlHeadPanelRowSpanDefault"), Xe = /* @__PURE__ */ o((e) => !/<Head\b/i.test(e) || /\bPanelRowSpan\s*[:=]/i.test(e) ? e : e.replace(
78
+ /(<Head\b[^>]*>)([\s\S]*?)(<\/Head>)/i,
79
+ (t, n, r, s) => {
80
+ const f = je(r);
81
+ return f === r ? t : `${n}${f}${s}`;
82
+ }
83
+ ), "applyTreeGridDefaultHeaderPanelRowSpanLayout"), ze = /* @__PURE__ */ o((e) => k(
84
+ z(e, "Selecting"),
85
+ z(e, "SelectingSingle")
86
+ ), "isTreeGridJsonCheckboxSelectionLayout"), He = /* @__PURE__ */ o((e) => k(
87
+ H(e, "Selecting"),
88
+ H(e, "SelectingSingle")
89
+ ), "isTreeGridXmlCheckboxSelectionLayout"), Ye = /* @__PURE__ */ o((e) => {
90
+ const t = e.Cfg;
91
+ if (Array.isArray(t)) {
92
+ t.some((n) => L(n) && "FastPanel" in n) || (e.Cfg = [{ FastPanel: 0 }, ...t]);
93
+ return;
94
+ }
95
+ if (L(t)) {
96
+ "FastPanel" in t || (t.FastPanel = 0);
97
+ return;
98
+ }
99
+ e.Cfg = { FastPanel: 0 };
100
+ }, "applyTreeGridJsonFastPanelDefault"), Ze = /* @__PURE__ */ o((e) => {
101
+ try {
102
+ const t = JSON.parse(e);
103
+ return !L(t) || !ze(t) ? e : (Ye(t), JSON.stringify(t));
104
+ } catch {
105
+ return e;
106
+ }
107
+ }, "applyTreeGridJsonDefaultFastPanelLayout"), qe = /* @__PURE__ */ o((e) => {
108
+ const t = e.trim();
109
+ return !t || /\bFastPanel\s*[:=]/i.test(e) ? e : t.startsWith("{") ? Ze(e) : He(e) && /<Grid\b/i.test(e) ? e.replace(/<Grid\b[^>]*>/i, (n) => `${n}
110
+ <Cfg FastPanel="0" />`) : e;
111
+ }, "applyTreeGridDefaultFastPanelLayout"), O = /* @__PURE__ */ o((e) => qe(
112
+ Xe(e)
113
+ ), "applyTreeGridDefaultLayout"), Qe = /* @__PURE__ */ o((e) => {
114
+ var t;
115
+ return typeof document > "u" ? null : ((t = document.getElementById(e)) == null ? void 0 : t.closest(`.${Oe}`)) ?? null;
116
+ }, "getTreeGridWrapperElement"), et = /* @__PURE__ */ o((e) => {
117
+ if (I(e.AllSelected))
118
+ return "checked";
119
+ if (g(e.AllSelected))
120
+ return "unchecked";
121
+ let t = 0, n = 0;
122
+ return Te(e).forEach((r) => {
123
+ !p(r) || g(r.CanSelect) || (t += 1, I(e.IsSelected(r)) && (n += 1));
124
+ }), n ? t > 0 && n >= t ? "checked" : "indeterminate" : "unchecked";
125
+ }, "getTreeGridSelectAllState"), B = /* @__PURE__ */ o((e, t) => {
126
+ const n = Qe(t), r = !g(e.Selecting), s = k(
127
+ e.Selecting,
128
+ e.SelectingSingle
129
+ ), f = e.Header;
130
+ if (n == null || n.classList.toggle(
131
+ Ie,
132
+ s
133
+ ), !s)
134
+ n == null || n.classList.remove(
135
+ M,
136
+ W,
137
+ K
138
+ );
139
+ else {
140
+ const T = et(e);
141
+ n == null || n.classList.toggle(
142
+ M,
143
+ T === "checked"
144
+ ), n == null || n.classList.toggle(
145
+ W,
146
+ T === "indeterminate"
147
+ ), n == null || n.classList.toggle(
148
+ K,
149
+ T === "unchecked"
150
+ );
151
+ }
152
+ f && r && (f.CanSelect = s ? 1 : 0);
153
+ }, "syncTreeGridSelectionPanelState"), w = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ o((e, t) => {
154
+ if (typeof window > "u")
155
+ return;
156
+ const n = w.get(t);
157
+ n !== void 0 && window.clearTimeout(n);
158
+ const r = window.setTimeout(() => {
159
+ w.delete(t), B(e, t);
160
+ }, 0);
161
+ w.set(t, r);
162
+ }, "scheduleTreeGridSelectionPanelStateSync"), tt = /* @__PURE__ */ o((e, t) => {
30
163
  e.EnterMode = t;
31
- const n = he[t];
164
+ const n = Ne[t];
32
165
  if (!n)
33
166
  return;
34
167
  const r = e;
35
168
  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) => {
169
+ }, "applyTreeGridDefaultEnterMode"), le = /* @__PURE__ */ o((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), Q = /* @__PURE__ */ new Map(), nt = /* @__PURE__ */ o((e) => {
37
170
  if (!e || !e.startsWith("data:"))
38
171
  return e;
39
- const t = F.get(e);
172
+ const t = Q.get(e);
40
173
  if (t)
41
174
  return t;
42
175
  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;
176
+ const [n, r = ""] = e.split(",", 2), s = /^data:([^;]*)(;base64)?$/i.exec(n), f = (s == null ? void 0 : s[1]) || "application/octet-stream", T = s != null && s[2] ? atob(r) : decodeURIComponent(r), C = new Uint8Array(T.length);
177
+ for (let R = 0; R < T.length; R += 1)
178
+ C[R] = T.charCodeAt(R);
179
+ const h = URL.createObjectURL(new Blob([C], { type: f }));
180
+ return Q.set(e, h), h;
48
181
  } catch {
49
182
  return e;
50
183
  }
51
- }, "resolveTreeGridInlineUrl"), O = /* @__PURE__ */ c((e) => {
52
- if (!e || q(e))
53
- return me(e);
184
+ }, "resolveTreeGridInlineUrl"), P = /* @__PURE__ */ o((e) => {
185
+ if (!e || le(e))
186
+ return nt(e);
54
187
  const t = e.indexOf("#"), [n, r] = t >= 0 ? [e.slice(0, t), e.slice(t)] : [e, ""], s = n.includes("?") ? "&" : "?";
55
188
  return `${n}${s}noCache=${Date.now()}${r}`;
56
- }, "appendNoCacheQuery"), V = /* @__PURE__ */ c((e, t, n) => {
189
+ }, "appendNoCacheQuery"), ee = /* @__PURE__ */ o((e, t, n) => {
57
190
  if (!e)
58
191
  return;
59
- const r = n.canEdit, s = n.highlightColumns ?? [], G = n.highlightBackgroundColor;
192
+ const r = n.canEdit, s = n.highlightColumns ?? [], f = n.highlightBackgroundColor;
60
193
  if (!(r === void 0 && !s.length)) {
61
194
  typeof e.StartUpdate == "function" && e.StartUpdate();
62
195
  try {
63
- r !== void 0 && (t.CanEdit = r), s.forEach((E) => {
64
- E && (e.SetValue(
196
+ r !== void 0 && (t.CanEdit = r), s.forEach((T) => {
197
+ T && (e.SetValue(
65
198
  t,
66
- `${E}Class`,
67
- G ? W : "",
199
+ `${T}Class`,
200
+ f ? ce : "",
68
201
  0
69
- ), e.SetValue(t, `${E}Color`, G ?? "", 0));
202
+ ), e.SetValue(t, `${T}Color`, f ?? "", 0));
70
203
  });
71
204
  } finally {
72
205
  typeof e.EndUpdate == "function" && e.EndUpdate();
73
206
  }
74
207
  typeof e.RefreshRow == "function" && e.RefreshRow(t);
75
208
  }
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) => {
209
+ }, "syncTreeGridDeletedRowState"), rt = /* @__PURE__ */ o((e) => e ? le(e) || e.includes("assets") ? P(e) : P(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), ot = /* @__PURE__ */ o((e) => (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function", "isTreeGridPromiseLike"), it = /* @__PURE__ */ o((e, t, n, r) => {
77
210
  if (!(!e || n === "cancel")) {
78
211
  if (n === "remove") {
79
212
  e.RemoveRow(t), r(e);
@@ -81,27 +214,27 @@ const ut = 300, Ce = 3, he = {
81
214
  }
82
215
  e.DeleteRowT(t, 3);
83
216
  }
84
- }, "applyTreeGridBeforeRowUndeleteAction"), Be = /* @__PURE__ */ c((e, t, n) => e ? { Url: Oe(t) } : { Data: { Body: [le(n) ? [] : n] } }, "buildTreeGridDataSource"), ct = /* @__PURE__ */ c(({
217
+ }, "applyTreeGridBeforeRowUndeleteAction"), ct = /* @__PURE__ */ o((e, t, n) => e ? { Url: rt(t) } : { Data: { Body: [Pe(n) ? [] : n] } }, "buildTreeGridDataSource"), Ut = /* @__PURE__ */ o(({
85
218
  id: e,
86
219
  layoutUrl: t,
87
220
  layoutData: n,
88
221
  dataUrl: r,
89
222
  bodyData: s,
90
- useDataUrl: G,
91
- width: E,
92
- height: h,
93
- languageId: C
223
+ useDataUrl: f,
224
+ width: T,
225
+ height: C,
226
+ languageId: h
94
227
  }) => ({
95
228
  id: e,
96
- Layout: n ? { Data: n } : { Url: O(t ?? "") },
97
- Data: Be(G, r, s),
229
+ Layout: n ? { Data: O(n) } : { Url: P(t ?? "") },
230
+ Data: ct(f, r, s),
98
231
  Text: {
99
- Url: re(C)
232
+ Url: Re(h)
100
233
  },
101
- width: E,
102
- height: h,
234
+ width: T,
235
+ height: C,
103
236
  Debug: "Error"
104
- }), "buildTreeGridInitializationOptions"), x = /* @__PURE__ */ c((e) => Ee(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), M = /* @__PURE__ */ c((e) => {
237
+ }), "buildTreeGridInitializationOptions"), te = /* @__PURE__ */ o((e) => ke(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), ne = /* @__PURE__ */ o((e) => {
105
238
  if (typeof e == "number")
106
239
  return Number.isFinite(e) && e > 0 ? e : void 0;
107
240
  if (typeof e != "string")
@@ -111,42 +244,42 @@ const ut = 300, Ce = 3, he = {
111
244
  return;
112
245
  const n = Number(t);
113
246
  return Number.isFinite(n) && n > 0 ? n : void 0;
114
- }, "parseTreeGridPositiveNumber"), $ = /* @__PURE__ */ c((e, t, n, r) => {
247
+ }, "parseTreeGridPositiveNumber"), re = /* @__PURE__ */ o((e, t, n, r) => {
115
248
  if (!t || !n)
116
249
  return;
117
- const s = e.GetAttribute(t, n, r), G = M(s);
118
- return G !== void 0 ? G : M(
250
+ const s = e.GetAttribute(t, n, r), f = ne(s);
251
+ return f !== void 0 ? f : ne(
119
252
  t[`${n}${r}`]
120
253
  );
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)
254
+ }, "getTreeGridHeaderCellSpanAttribute"), fe = /* @__PURE__ */ o((e, t, n) => !t || !n || t.Fixed !== "Head" || (re(e, t, n, "Span") ?? 1) <= 1 ? !1 : (re(e, t, n, "RowSpan") ?? 1) === 1, "isTreeGridGroupHeaderCell"), oe = /* @__PURE__ */ o((e, t, n = !1) => {
255
+ const r = typeof performance < "u" ? performance.now() : Date.now(), s = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((h) => h.Fixed === "Head") : [], f = typeof e.GetCols == "function" ? e.GetCols() : [];
256
+ if (!s.length || !f.length)
124
257
  return;
125
- const E = /* @__PURE__ */ new Set();
126
- let h = 0;
258
+ const T = /* @__PURE__ */ new Set();
259
+ let C = 0;
127
260
  typeof e.StartUpdate == "function" && e.StartUpdate();
128
261
  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);
262
+ s.forEach((h) => {
263
+ f.forEach((R) => {
264
+ fe(e, h, R) && e.GetAttribute(h, R, J) !== "" && (e.SetAttribute(h, R, J, "", 0, 0), T.add(h), C += 1);
132
265
  });
133
266
  });
134
267
  } finally {
135
268
  typeof e.EndUpdate == "function" && e.EndUpdate();
136
269
  }
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
270
+ T.size && (n && T.forEach((h) => {
271
+ typeof e.RefreshRow == "function" && e.RefreshRow(h);
272
+ }), ue(t, "group header button attribute apply"), de(t, "group header button attribute apply", r, {
273
+ updatedCellCount: C,
274
+ updatedRowCount: T.size
142
275
  }));
143
- }, "applyTreeGridGroupHeaderSortButtonAttributes"), Le = /* @__PURE__ */ c((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), Ue = /* @__PURE__ */ c((e) => {
276
+ }, "applyTreeGridGroupHeaderSortButtonAttributes"), st = /* @__PURE__ */ o((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), ut = /* @__PURE__ */ o((e) => {
144
277
  const t = e == null ? void 0 : e.Visible;
145
278
  return !!e && t !== 0 && t !== !1 && t !== "0";
146
- }, "isVisibleTreeGridRow"), ve = /* @__PURE__ */ c((e) => {
279
+ }, "isVisibleTreeGridRow"), dt = /* @__PURE__ */ o((e) => {
147
280
  const t = e == null ? void 0 : e.Added;
148
281
  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) => {
282
+ }, "isAddedTreeGridRow"), p = /* @__PURE__ */ o((e) => !e || e.Fixed === "Foot" || !ut(e) ? !1 : e.Kind === "Data" || dt(e), "isDisplayTreeGridRow"), ae = /* @__PURE__ */ o((e) => Object.keys(e.Cols ?? {}).filter(Boolean), "getTreeGridColumnNames"), Te = /* @__PURE__ */ o((e) => {
150
283
  if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
151
284
  const t = [];
152
285
  let n = e.GetFirst();
@@ -155,125 +288,125 @@ const ut = 300, Ce = 3, he = {
155
288
  return t;
156
289
  }
157
290
  return Object.values(e.Rows ?? {});
158
- }, "getTreeGridRows"), ke = /* @__PURE__ */ c((e, t) => {
291
+ }, "getTreeGridRows"), lt = /* @__PURE__ */ o((e, t) => {
159
292
  if (!e)
160
293
  return;
161
- const n = J(e);
162
- Ne(e).forEach((r) => {
163
- _(r) && t.set(
294
+ const n = ae(e);
295
+ Te(e).forEach((r) => {
296
+ p(r) && t.set(
164
297
  r,
165
- new Map(n.map((s) => [s, j(e, r, s)]))
298
+ new Map(n.map((s) => [s, se(e, r, s)]))
166
299
  );
167
300
  });
168
- }, "captureTreeGridChangeBaselines"), ge = /* @__PURE__ */ c((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), Fe = /* @__PURE__ */ c((e, t, n) => {
301
+ }, "captureTreeGridChangeBaselines"), ft = /* @__PURE__ */ o((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), at = /* @__PURE__ */ o((e, t, n) => {
169
302
  const r = t;
170
- return J(e).some((s) => s !== n && ge(r[`${s}Changed`]));
171
- }, "hasOtherTreeGridChangedCells"), Ve = /* @__PURE__ */ c((e, t, n) => {
303
+ return ae(e).some((s) => s !== n && ft(r[`${s}Changed`]));
304
+ }, "hasOtherTreeGridChangedCells"), Tt = /* @__PURE__ */ o((e, t, n) => {
172
305
  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) => {
306
+ r[`${n}Changed`] = 0, !y(t) && !at(e, t, n) && (r.Changed = 0);
307
+ }, "clearTreeGridCellChangedState"), Gt = /* @__PURE__ */ o((e, t, n) => {
175
308
  const r = e.get(t);
176
309
  if (r != null && r.has(n))
177
310
  return r.get(n);
178
- if (A(t))
179
- return fe(t, n) ?? "";
180
- }, "resolveTreeGridCellBaselineValue"), Me = /* @__PURE__ */ c(({
311
+ if (y(t))
312
+ return De(t, n) ?? "";
313
+ }, "resolveTreeGridCellBaselineValue"), Et = /* @__PURE__ */ o(({
181
314
  gridId: e,
182
315
  grid: t,
183
316
  row: n,
184
317
  col: r,
185
318
  backgroundColor: s,
186
- baselineMap: G
319
+ baselineMap: f
187
320
  }) => {
188
- if (!_(n))
321
+ if (!p(n))
189
322
  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);
323
+ const T = Gt(f, n, r), C = se(t, n, r);
324
+ if (T !== void 0 && C === T) {
325
+ be(e, { row: n, col: r }), Tt(t, n, r), y(n) && ye(n, r);
193
326
  return;
194
327
  }
195
- se(e, {
328
+ Le(e, {
196
329
  row: n,
197
330
  col: r,
198
331
  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) => {
332
+ }), y(n) && ge(n, r);
333
+ }, "syncTreeGridChangedCellHighlight"), ht = /* @__PURE__ */ o((e, t, n) => !t || !n || !p(t) ? !1 : e.CanEdit(t, n) === 1, "isEditableTreeGridCell"), Ct = /* @__PURE__ */ o((e, t, n) => {
201
334
  const r = e.GetAttribute(t, n, "Color");
202
335
  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)))
336
+ }, "hasExplicitTreeGridCellColor"), St = /* @__PURE__ */ o((e, t, n, r) => {
337
+ if (!(!t || r === void 0 || !ht(e, t, n) || Ct(e, t, n)))
205
338
  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;
339
+ }, "getEditableTreeGridCellDefaultColor"), b = /* @__PURE__ */ o((e, t, n, r) => e === r[0] && t === r[1] && n === r[2], "matchesTreeGridRgbColor"), ie = /* @__PURE__ */ o((e) => {
340
+ const t = typeof e == "number" ? e : typeof e == "string" ? Ae(e) : void 0;
208
341
  if (!(t === void 0 || !Number.isFinite(t)))
209
342
  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
343
+ }, "resolveTreeGridColorRgb"), pt = /* @__PURE__ */ o((e) => `#${e.map((t) => Math.max(0, Math.min(255, t)).toString(16).padStart(2, "0")).join("")}`, "stringifyTreeGridRgbColor"), Rt = /* @__PURE__ */ o((e, t, n) => {
344
+ const r = /* @__PURE__ */ o((s, f) => Math.round(
345
+ s * (1 - n) + f * n
213
346
  ), "blendChannel");
214
347
  return [
215
348
  r(e[0], t[0]),
216
349
  r(e[1], t[1]),
217
350
  r(e[2], t[2])
218
351
  ];
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))
352
+ }, "blendTreeGridRgbColor"), _t = /* @__PURE__ */ o((e) => (e == null ? void 0 : e.split(/\s+/).filter(Boolean)) ?? [], "getTreeGridClassTokens"), At = /* @__PURE__ */ o((e) => {
353
+ const t = typeof e == "string" ? _t(e) : [];
354
+ return j.length > 0 && j.every((n) => t.includes(n));
355
+ }, "hasTreeGridChangedCellClass"), Ge = /* @__PURE__ */ o((e, t, n) => {
356
+ if (!t || !n || !p(t))
224
357
  return !1;
225
358
  const r = e.IsSelected(t, n);
226
359
  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")))
360
+ }, "isTreeGridSelectedCellState"), bt = /* @__PURE__ */ o((e, t, n, r) => {
361
+ if (!t || !Ge(e, t, n) || !At(e.GetAttribute(t, n, "Class")))
229
362
  return;
230
- const s = K(r), G = K(
231
- e.GetAttribute(t, n, "Color") ?? oe
363
+ const s = ie(r), f = ie(
364
+ e.GetAttribute(t, n, "Color") ?? _e
232
365
  );
233
- if (!(!s || !G))
234
- return We(
235
- je(
366
+ if (!(!s || !f))
367
+ return pt(
368
+ Rt(
236
369
  s,
237
- G,
238
- Ae
370
+ f,
371
+ We
239
372
  )
240
373
  );
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(({
374
+ }, "resolveTreeGridSelectedHighlightBackgroundColor"), yt = /* @__PURE__ */ o((e, t, n) => !t || !n || !p(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 0, "isTreeGridReadonlyHoveredCellState"), Lt = /* @__PURE__ */ o((e, t, n) => !t || !n || !p(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 2, "isTreeGridPreviewHoveredCellState"), gt = /* @__PURE__ */ o(({
242
375
  grid: e,
243
376
  row: t,
244
377
  col: n,
245
378
  r,
246
379
  g: s,
247
- b: G,
248
- selectedCellBackgroundColor: E,
249
- hoverCellBackgroundColor: h
380
+ b: f,
381
+ selectedCellBackgroundColor: T,
382
+ hoverCellBackgroundColor: C
250
383
  }) => {
251
- const C = qe(
384
+ const h = bt(
252
385
  e,
253
386
  t,
254
387
  n,
255
- E
388
+ T
256
389
  );
257
- if (C)
258
- return C;
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)))
390
+ if (h)
262
391
  return h;
263
- }, "resolveTreeGridStateBackgroundColor"), st = /* @__PURE__ */ c((e) => {
392
+ if (Ge(e, t, n) && b(r, s, f, Ue))
393
+ return T;
394
+ if (yt(e, t, n) && (b(r, s, f, ve) || b(r, s, f, Fe)) || Lt(e, t, n) && (b(r, s, f, $e) || b(r, s, f, Ve) || b(r, s, f, Me)))
395
+ return C;
396
+ }, "resolveTreeGridStateBackgroundColor"), vt = /* @__PURE__ */ o((e) => {
264
397
  if (!e)
265
398
  return !1;
266
399
  if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
267
400
  let t = e.GetFirst();
268
401
  for (; t; ) {
269
- if (_(t))
402
+ if (p(t))
270
403
  return !0;
271
404
  t = e.GetNext(t);
272
405
  }
273
406
  return !1;
274
407
  }
275
- return Object.values(e.Rows ?? {}).some((t) => _(t));
276
- }, "hasTreeGridDisplayDataRows"), dt = /* @__PURE__ */ c((e, t, n) => {
408
+ return Object.values(e.Rows ?? {}).some((t) => p(t));
409
+ }, "hasTreeGridDisplayDataRows"), Ft = /* @__PURE__ */ o((e, t, n) => {
277
410
  var s;
278
411
  const r = (s = e.Data) == null ? void 0 : s.Data;
279
412
  e.Data.Data = {
@@ -281,242 +414,262 @@ const ut = 300, Ce = 3, he = {
281
414
  Data: { Body: [t || []] },
282
415
  Url: ""
283
416
  }, e.ReloadBody(n);
284
- }, "replaceTreeGridBodyData"), ft = /* @__PURE__ */ c(({
417
+ }, "replaceTreeGridBodyData"), $t = /* @__PURE__ */ o(({
285
418
  id: e,
286
419
  latestEventHandlersRef: t,
287
420
  layoutHasExplicitEnterModeRef: n,
288
421
  highlightEditableCellsRef: r,
289
422
  highlightChangedCellsRef: s,
290
- syncDeletedRowCanEditRef: G,
291
- editableCellBackgroundColorValueRef: E,
292
- changedCellBackgroundColorRef: h,
293
- selectedCellBackgroundColorRef: C,
423
+ syncDeletedRowCanEditRef: f,
424
+ editableCellBackgroundColorValueRef: T,
425
+ changedCellBackgroundColorRef: C,
426
+ selectedCellBackgroundColorRef: h,
294
427
  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
428
+ changedCellBaselineRef: m,
429
+ treeGridInstanceRef: x,
430
+ treeGridInitStartedAtRef: N,
431
+ latestLayoutOverridesRef: Ee,
432
+ appliedLayoutOverridesRef: he,
433
+ appliedBodyDataPropRef: Ce,
434
+ hasAppliedInitialLayoutRef: U,
435
+ syncHasDisplayDataRows: A,
436
+ setIsTreeGridReady: Se
304
437
  }) => {
305
- const T = t.current;
306
- if (window.TGSetEvent("OnRowAdd", e, (o, i) => {
438
+ const E = t.current;
439
+ if (window.TGSetEvent("OnRowAdd", e, (i, c) => {
307
440
  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) => {
441
+ c.CanEdit = 1, c.CanDelete = 1, (d = (u = t.current) == null ? void 0 : u.onRowAdd) == null || d.call(u, i, c);
442
+ }), window.TGSetEvent("OnRowAdded", e, (i) => {
443
+ A(i);
444
+ }), window.TGSetEvent("OnRowRemove", e, (i) => {
445
+ A(i);
446
+ }), window.TGSetEvent("OnCanRowDelete", e, (i, c, u) => {
314
447
  var a;
315
448
  if (u !== 3)
316
449
  return u;
317
450
  const d = (a = t.current) == null ? void 0 : a.onBeforeRowUndelete;
318
451
  if (typeof d != "function")
319
452
  return u;
320
- const f = /* @__PURE__ */ c((l) => {
453
+ const l = /* @__PURE__ */ o((G) => {
321
454
  window.setTimeout(() => {
322
- we(
323
- I.current ?? o,
324
- i,
325
- l,
326
- y
455
+ it(
456
+ x.current ?? i,
457
+ c,
458
+ G,
459
+ A
327
460
  );
328
461
  }, 0);
329
462
  }, "scheduleAction");
330
463
  try {
331
- const l = d(o, i);
332
- return Ie(l) ? (l.then(f).catch(() => {
333
- f("undelete");
334
- }), 0) : (f(l), 0);
464
+ const G = d(i, c);
465
+ return ot(G) ? (G.then(l).catch(() => {
466
+ l("undelete");
467
+ }), 0) : (l(G), 0);
335
468
  } catch {
336
- return f("undelete"), 0;
469
+ return l("undelete"), 0;
337
470
  }
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,
471
+ }), typeof (E == null ? void 0 : E.onRowClick) == "function" || typeof (E == null ? void 0 : E.onInternalCellClick) == "function") {
472
+ const i = D((c, u, d, l, a, G) => {
473
+ var S, _;
474
+ (_ = (S = t.current) == null ? void 0 : S.onRowClick) == null || _.call(
475
+ S,
476
+ c,
344
477
  u,
345
478
  d,
346
- f,
479
+ l,
347
480
  a,
348
- l
481
+ G
349
482
  );
350
483
  }, 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,
484
+ window.TGSetEvent("OnClick", e, (c, u, d, l, a, G) => {
485
+ var _, F, $;
486
+ const S = (F = (_ = t.current) == null ? void 0 : _.onInternalCellClick) == null ? void 0 : F.call(
487
+ _,
488
+ c,
356
489
  u,
357
490
  d,
358
- f,
491
+ l,
359
492
  a,
360
- l
493
+ G
361
494
  );
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);
495
+ if (S !== void 0)
496
+ return S;
497
+ typeof (($ = t.current) == null ? void 0 : $.onRowClick) == "function" && i(c, u, d, l, a, G);
365
498
  });
366
499
  }
367
- (typeof (T == null ? void 0 : T.onClickButton) == "function" || typeof (T == null ? void 0 : T.onInternalButtonClick) == "function") && window.TGSetEvent(
500
+ (typeof (E == null ? void 0 : E.onClickButton) == "function" || typeof (E == null ? void 0 : E.onInternalButtonClick) == "function") && window.TGSetEvent(
368
501
  "OnClickButton",
369
502
  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(
503
+ (i, c, u, d) => {
504
+ var a, G, S, _;
505
+ const l = (G = (a = t.current) == null ? void 0 : a.onInternalButtonClick) == null ? void 0 : G.call(
373
506
  a,
374
- o,
375
507
  i,
508
+ c,
376
509
  u,
377
510
  d
378
511
  );
379
- if (f !== void 0)
380
- return f;
381
- (S = (p = t.current) == null ? void 0 : p.onClickButton) == null || S.call(
382
- p,
383
- o,
512
+ if (l !== void 0)
513
+ return l;
514
+ (_ = (S = t.current) == null ? void 0 : S.onClickButton) == null || _.call(
515
+ S,
384
516
  i,
517
+ c,
385
518
  u,
386
519
  d
387
520
  );
388
521
  }
389
- ), typeof (T == null ? void 0 : T.onInternalKeyDown) == "function" && (window.TGSetEvent(
522
+ ), typeof (E == null ? void 0 : E.onInternalKeyDown) == "function" && (window.TGSetEvent(
390
523
  "OnKeyDown",
391
524
  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);
525
+ (i, c, u, d, l) => {
526
+ var a, G;
527
+ return (G = (a = t.current) == null ? void 0 : a.onInternalKeyDown) == null ? void 0 : G.call(a, i, c, u, d, l);
395
528
  }
396
529
  ), window.TGSetEvent(
397
530
  "OnKeyPress",
398
531
  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);
532
+ (i, c, u, d, l) => {
533
+ var a, G;
534
+ return (G = (a = t.current) == null ? void 0 : a.onInternalKeyDown) == null ? void 0 : G.call(a, i, c, u, d, l);
402
535
  }
403
- )), typeof (T == null ? void 0 : T.onInternalStartEdit) == "function" && window.TGSetEvent(
536
+ )), typeof (E == null ? void 0 : E.onInternalStartEdit) == "function" && window.TGSetEvent(
404
537
  "OnStartEdit",
405
538
  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(
539
+ (i, c, u) => {
540
+ var d, l;
541
+ return (l = (d = t.current) == null ? void 0 : d.onInternalStartEdit) == null ? void 0 : l.call(
409
542
  d,
410
- o,
411
543
  i,
544
+ c,
412
545
  u
413
546
  );
414
547
  }
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,
548
+ ), window.TGSetEvent("OnRowDelete", e, (i, c, u) => {
549
+ var l, a;
550
+ const d = y(c) ? V(c) : [];
551
+ ee(i, c, {
552
+ canEdit: f.current !== !1 ? 2 : void 0,
420
553
  highlightColumns: d
421
- }), y(o), (a = (f = t.current) == null ? void 0 : f.onRowDelete) == null || a.call(
422
- f,
423
- o,
554
+ }), A(i), (a = (l = t.current) == null ? void 0 : l.onRowDelete) == null || a.call(
555
+ l,
424
556
  i,
557
+ c,
425
558
  u
426
559
  );
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,
560
+ }), window.TGSetEvent("OnRowUndelete", e, (i, c) => {
561
+ var d, l;
562
+ const u = y(c) ? V(c) : [];
563
+ ee(i, c, {
564
+ canEdit: f.current !== !1 ? 1 : void 0,
432
565
  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,
566
+ highlightBackgroundColor: u.length ? C.current : void 0
567
+ }), A(i), (l = (d = t.current) == null ? void 0 : d.onRowUndelete) == null || l.call(d, i, c);
568
+ }), window.TGSetEvent("OnGetDefaultColor", e, (i, c, u) => {
569
+ if (!(!r.current || !p(c)))
570
+ return St(
439
571
  i,
572
+ c,
440
573
  u,
441
- E.current
574
+ T.current
442
575
  );
443
- }), window.TGSetEvent("OnGetColor", e, (o, i, u, d, f, a, l) => {
444
- if (!l)
445
- return Xe({
446
- grid: o,
447
- row: i,
576
+ }), window.TGSetEvent("OnGetColor", e, (i, c, u, d, l, a, G) => {
577
+ if (!G)
578
+ return gt({
579
+ grid: i,
580
+ row: c,
448
581
  col: u,
449
582
  r: d,
450
- g: f,
583
+ g: l,
451
584
  b: a,
452
- selectedCellBackgroundColor: C.current,
585
+ selectedCellBackgroundColor: h.current,
453
586
  hoverCellBackgroundColor: R.current
454
587
  });
455
- }), window.TGSetEvent("OnAfterValueChanged", e, (o, i, u, d) => {
456
- var a, l;
457
- s.current && _(i) && Me({
588
+ }), window.TGSetEvent("OnAfterValueChanged", e, (i, c, u, d) => {
589
+ var a, G;
590
+ s.current && p(c) && Et({
458
591
  gridId: e,
459
- grid: o,
460
- row: i,
592
+ grid: i,
593
+ row: c,
461
594
  col: u,
462
- backgroundColor: h.current,
463
- baselineMap: b.current
595
+ backgroundColor: C.current,
596
+ baselineMap: m.current
464
597
  });
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(
598
+ const l = ((a = t.current) == null ? void 0 : a.onAfterValueChanged) ?? ((G = t.current) == null ? void 0 : G.onRowChange);
599
+ l == null || l(i, c, u, d);
600
+ });
601
+ const v = D((i) => {
602
+ var u, d;
603
+ const c = i.GetSelRows() ?? [];
604
+ (d = (u = t.current) == null ? void 0 : u.onSelect) == null || d.call(
605
+ u,
606
+ me(i, c)
607
+ );
608
+ }, 100);
609
+ window.TGSetEvent("OnSelect", e, (i, c, u, d, l) => {
610
+ var a;
611
+ l || (q(i, e), typeof ((a = t.current) == null ? void 0 : a.onSelect) == "function" && v(i));
612
+ }), window.TGSetEvent("OnSelectAll", e, (i, c, u, d) => {
613
+ var l;
614
+ d || (q(i, e), typeof ((l = t.current) == null ? void 0 : l.onSelect) == "function" && v(i));
615
+ }), typeof (E == null ? void 0 : E.onSave) == "function" && window.TGSetEvent("OnSave", e, (i, c, u) => {
616
+ var d, l;
617
+ (l = (d = t.current) == null ? void 0 : d.onSave) == null || l.call(
481
618
  d,
482
- o,
483
619
  i,
620
+ c,
484
621
  u
485
622
  );
486
- }), window.TGSetEvent("OnSort", e, (o, i) => {
623
+ }), window.TGSetEvent("OnSort", e, (i, c) => {
487
624
  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
625
+ if (!(!c || !fe(i, i.ARow, c)))
626
+ return ue(e, "group header sort blocked"), Be(e, "group header sort blocked", {
627
+ rowId: (u = i.ARow) == null ? void 0 : u.id,
628
+ col: c
492
629
  }), -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(
630
+ }), window.TGSetEvent("OnRenderStart", e, (i) => {
631
+ B(i, e), oe(i, e, !1);
632
+ }), window.TGSetEvent("OnRenderFinish", e, (i) => {
633
+ B(i, e);
634
+ }), window.TGSetEvent("OnDataGet", e, (i, c, u) => {
635
+ if ((c == null ? void 0 : c.Name) === "Layout" && typeof u == "string") {
636
+ n.current = X(u);
637
+ const d = O(u);
638
+ return d === u ? null : d;
639
+ }
640
+ return null;
641
+ }), window.TGSetEvent("OnDataParse", e, (i, c, u) => {
642
+ if ((c == null ? void 0 : c.Name) === "Layout" && typeof u == "string") {
643
+ n.current = X(u);
644
+ const d = O(u);
645
+ return d === u ? null : d;
646
+ }
647
+ return null;
648
+ }), window.TGSetEvent(
496
649
  "OnReady",
497
650
  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)
651
+ D((i) => {
652
+ var c, u;
653
+ if (!U.current) {
654
+ const d = Ee.current;
655
+ U.current = !0, !n.current && (i.EnterMode === void 0 || i.EnterMode === null || i.EnterMode === 0) && tt(i, xe), we(i, d), x.current = i, he.current = d, Ce.current = te(i), m.current = /* @__PURE__ */ new WeakMap(), lt(i, m.current), A(i), Se(!0), oe(i, e, !0), de(e, "TreeGrid init ready", N.current, {
656
+ bodyRowCount: st(
657
+ te(i)
505
658
  )
506
- }), w.current = null, (u = (i = t.current) == null ? void 0 : i.onReady) == null || u.call(i, o);
659
+ }), N.current = null, (u = (c = t.current) == null ? void 0 : c.onReady) == null || u.call(c, i);
507
660
  }
508
661
  }, 100)
509
662
  );
510
663
  }, "bindTreeGridEvents");
511
664
  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
665
+ Nt as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
666
+ $t as bindTreeGridEvents,
667
+ Ut as buildTreeGridInitializationOptions,
668
+ lt as captureTreeGridChangeBaselines,
669
+ st as getTreeGridBodyDataCount,
670
+ vt as hasTreeGridDisplayDataRows,
671
+ X as hasTreeGridExplicitEnterMode,
672
+ Ft as replaceTreeGridBodyData,
673
+ Et as syncTreeGridChangedCellHighlight
521
674
  };
522
675
  //# sourceMappingURL=treeGridRuntime.js.map