@owp/core 2.5.9 → 2.5.10

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 (42) 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/index15.js +2 -2
  6. package/dist/_virtual/index20.js +2 -2
  7. package/dist/_virtual/index21.js +2 -2
  8. package/dist/_virtual/index22.js +2 -2
  9. package/dist/_virtual/index5.js +2 -2
  10. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +195 -147
  11. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  12. package/dist/features/themePreview/components/ThemePreviewColorField.js +10 -11
  13. package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
  14. package/dist/features/themePreview/components/ThemePreviewControls.js +232 -198
  15. package/dist/features/themePreview/components/ThemePreviewControls.js.map +1 -1
  16. package/dist/features/themePreview/hooks/useThemePreview.js +214 -199
  17. package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
  18. package/dist/features/themePreview/utils/themePreviewSettings.js +188 -151
  19. package/dist/features/themePreview/utils/themePreviewSettings.js.map +1 -1
  20. package/dist/features/themePreview.js +18 -17
  21. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js +1 -1
  22. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js +1 -1
  23. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  24. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  25. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  26. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
  27. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  28. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
  29. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  30. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  31. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  32. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  33. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  34. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  35. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  36. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  37. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  38. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  39. package/dist/owp-app.css +1 -1
  40. package/dist/types/features/themePreview/utils/index.d.ts +1 -1
  41. package/dist/types/features/themePreview/utils/themePreviewSettings.d.ts +11 -1
  42. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- var a = {};
1
+ var r = {};
2
2
  export {
3
- a as __exports
3
+ r as __exports
4
4
  };
5
5
  //# sourceMappingURL=index10.js.map
@@ -1,5 +1,5 @@
1
- var r = {};
1
+ var a = {};
2
2
  export {
3
- r as __exports
3
+ a as __exports
4
4
  };
5
5
  //# sourceMappingURL=index12.js.map
@@ -1,5 +1,5 @@
1
- var e = {};
1
+ var r = {};
2
2
  export {
3
- e as __exports
3
+ r as __exports
4
4
  };
5
5
  //# sourceMappingURL=index13.js.map
@@ -1,5 +1,5 @@
1
- var r = {};
1
+ var e = {};
2
2
  export {
3
- r as __exports
3
+ e as __exports
4
4
  };
5
5
  //# sourceMappingURL=index14.js.map
@@ -1,5 +1,5 @@
1
- var e = { exports: {} };
1
+ var r = {};
2
2
  export {
3
- e as __module
3
+ r as __exports
4
4
  };
5
5
  //# sourceMappingURL=index15.js.map
@@ -1,5 +1,5 @@
1
- var a = { exports: {} };
1
+ var p = { exports: {} };
2
2
  export {
3
- a as __module
3
+ p as __module
4
4
  };
5
5
  //# sourceMappingURL=index20.js.map
@@ -1,5 +1,5 @@
1
- var e = { exports: {} };
1
+ var a = { exports: {} };
2
2
  export {
3
- e as __module
3
+ a as __module
4
4
  };
5
5
  //# sourceMappingURL=index21.js.map
@@ -1,5 +1,5 @@
1
- var p = { exports: {} };
1
+ var e = { exports: {} };
2
2
  export {
3
- p as __module
3
+ e as __module
4
4
  };
5
5
  //# sourceMappingURL=index22.js.map
@@ -1,5 +1,5 @@
1
- var r = {};
1
+ var e = { exports: {} };
2
2
  export {
3
- r as __exports
3
+ e as __module
4
4
  };
5
5
  //# sourceMappingURL=index5.js.map
@@ -1,86 +1,125 @@
1
- var W = Object.defineProperty;
2
- var s = (e, t) => W(e, "name", { value: t, configurable: !0 });
3
- import { getTreeGridTextResourceUrl as P } from "../../../constants/treeGrid.js";
4
- import { highlightTreeGridCellById as M } from "../../../utils/treeGridUtil.js";
5
- import { enqueueSnackbar as j } from "notistack";
6
- import { applyTreeGridLayoutToGrid as q } from "./treeGridLayout.js";
7
- import { resolveTreeGridColumnEditValue as Y, resetTreeGridColumnEditRulesState as z, syncTreeGridColumnEditRules as K } from "./treeGridColumnEditRules.js";
8
- import { measureTreeGridPerf as Q } from "./utils/perf.js";
9
- import { debounce as O } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
10
- import { get as J } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
11
- import { isEmpty as X } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
12
- const Be = 300, Z = [255, 255, 166], g = [240, 240, 240], H = [248, 248, 248], ee = [255, 255, 255], te = [255, 255, 254], ne = [242, 242, 242], U = /* @__PURE__ */ s((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), v = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ s((e) => {
1
+ var K = Object.defineProperty;
2
+ var f = (e, t) => K(e, "name", { value: t, configurable: !0 });
3
+ import { getTreeGridTextResourceUrl as Q } from "../../../constants/treeGrid.js";
4
+ import { highlightTreeGridCellById as J } from "../../../utils/treeGridUtil.js";
5
+ import { enqueueSnackbar as X } from "notistack";
6
+ import { applyTreeGridLayoutToGrid as Z } from "./treeGridLayout.js";
7
+ import { resolveTreeGridColumnEditValue as g, resetTreeGridColumnEditRulesState as H, syncTreeGridColumnEditRules as ee } from "./treeGridColumnEditRules.js";
8
+ import { countTreeGridPerf as F, logTreeGridPerf as te, measureTreeGridPerf as k } from "./utils/perf.js";
9
+ import { debounce as b } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
10
+ import { get as ne } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
11
+ import { isEmpty as re } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
12
+ const Le = 300, oe = [255, 255, 166], ue = [240, 240, 240], ce = [248, 248, 248], ie = [255, 255, 255], se = [255, 255, 254], fe = [242, 242, 242], U = "Button", P = /* @__PURE__ */ f((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), v = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ f((e) => {
13
13
  if (!e || !e.startsWith("data:"))
14
14
  return e;
15
15
  const t = v.get(e);
16
16
  if (t)
17
17
  return t;
18
18
  try {
19
- const [n, c = ""] = e.split(",", 2), G = /^data:([^;]*)(;base64)?$/i.exec(n), a = (G == null ? void 0 : G[1]) || "application/octet-stream", R = G != null && G[2] ? atob(c) : decodeURIComponent(c), l = new Uint8Array(R.length);
20
- for (let _ = 0; _ < R.length; _ += 1)
21
- l[_] = R.charCodeAt(_);
22
- const S = URL.createObjectURL(new Blob([l], { type: a }));
23
- return v.set(e, S), S;
19
+ const [n, o = ""] = e.split(",", 2), s = /^data:([^;]*)(;base64)?$/i.exec(n), a = (s == null ? void 0 : s[1]) || "application/octet-stream", p = s != null && s[2] ? atob(o) : decodeURIComponent(o), l = new Uint8Array(p.length);
20
+ for (let C = 0; C < p.length; C += 1)
21
+ l[C] = p.charCodeAt(C);
22
+ const T = URL.createObjectURL(new Blob([l], { type: a }));
23
+ return v.set(e, T), T;
24
24
  } catch {
25
25
  return e;
26
26
  }
27
- }, "resolveTreeGridInlineUrl"), I = /* @__PURE__ */ s((e) => {
28
- if (!e || U(e))
29
- return re(e);
30
- const t = e.indexOf("#"), [n, c] = t >= 0 ? [e.slice(0, t), e.slice(t)] : [e, ""], G = n.includes("?") ? "&" : "?";
31
- return `${n}${G}noCache=${Date.now()}${c}`;
32
- }, "appendNoCacheQuery"), oe = /* @__PURE__ */ s((e) => e ? U(e) || e.includes("assets") ? I(e) : I(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), ce = /* @__PURE__ */ s((e, t, n) => e ? { Url: oe(t) } : { Data: { Body: [X(n) ? [] : n] } }, "buildTreeGridDataSource"), he = /* @__PURE__ */ s(({
27
+ }, "resolveTreeGridInlineUrl"), h = /* @__PURE__ */ f((e) => {
28
+ if (!e || P(e))
29
+ return ae(e);
30
+ const t = e.indexOf("#"), [n, o] = t >= 0 ? [e.slice(0, t), e.slice(t)] : [e, ""], s = n.includes("?") ? "&" : "?";
31
+ return `${n}${s}noCache=${Date.now()}${o}`;
32
+ }, "appendNoCacheQuery"), de = /* @__PURE__ */ f((e) => e ? P(e) || e.includes("assets") ? h(e) : h(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), Ge = /* @__PURE__ */ f((e, t, n) => e ? { Url: de(t) } : { Data: { Body: [re(n) ? [] : n] } }, "buildTreeGridDataSource"), xe = /* @__PURE__ */ f(({
33
33
  id: e,
34
34
  layoutUrl: t,
35
35
  layoutData: n,
36
- dataUrl: c,
37
- bodyData: G,
36
+ dataUrl: o,
37
+ bodyData: s,
38
38
  useDataUrl: a,
39
- width: R,
39
+ width: p,
40
40
  height: l,
41
- languageId: S
41
+ languageId: T
42
42
  }) => ({
43
43
  id: e,
44
- Layout: n ? { Data: n } : { Url: I(t ?? "") },
45
- Data: ce(a, c, G),
44
+ Layout: n ? { Data: n } : { Url: h(t ?? "") },
45
+ Data: Ge(a, o, s),
46
46
  Text: {
47
- Url: P(S)
47
+ Url: Q(T)
48
48
  },
49
- width: R,
49
+ width: p,
50
50
  height: l,
51
51
  Debug: "Error"
52
- }), "buildTreeGridInitializationOptions"), A = /* @__PURE__ */ s((e) => J(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), ue = /* @__PURE__ */ s((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), ie = /* @__PURE__ */ s((e) => {
52
+ }), "buildTreeGridInitializationOptions"), L = /* @__PURE__ */ f((e) => ne(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), x = /* @__PURE__ */ f((e) => {
53
+ if (typeof e == "number")
54
+ return Number.isFinite(e) && e > 0 ? e : void 0;
55
+ if (typeof e != "string")
56
+ return;
57
+ const t = e.trim();
58
+ if (!t)
59
+ return;
60
+ const n = Number(t);
61
+ return Number.isFinite(n) && n > 0 ? n : void 0;
62
+ }, "parseTreeGridPositiveNumber"), N = /* @__PURE__ */ f((e, t, n, o) => {
63
+ if (!t || !n)
64
+ return;
65
+ const s = e.GetAttribute(t, n, o), a = x(s);
66
+ return a !== void 0 ? a : x(
67
+ t[`${n}${o}`]
68
+ );
69
+ }, "getTreeGridHeaderCellSpanAttribute"), $ = /* @__PURE__ */ f((e, t, n) => !t || !n || t.Fixed !== "Head" || (N(e, t, n, "Span") ?? 1) <= 1 ? !1 : (N(e, t, n, "RowSpan") ?? 1) === 1, "isTreeGridGroupHeaderCell"), V = /* @__PURE__ */ f((e, t, n = !1) => {
70
+ const o = typeof performance < "u" ? performance.now() : Date.now(), s = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((T) => T.Fixed === "Head") : [], a = typeof e.GetCols == "function" ? e.GetCols() : [];
71
+ if (!s.length || !a.length)
72
+ return;
73
+ const p = /* @__PURE__ */ new Set();
74
+ let l = 0;
75
+ typeof e.StartUpdate == "function" && e.StartUpdate();
76
+ try {
77
+ s.forEach((T) => {
78
+ a.forEach((C) => {
79
+ $(e, T, C) && e.GetAttribute(T, C, U) !== "" && (e.SetAttribute(T, C, U, "", 0, 0), p.add(T), l += 1);
80
+ });
81
+ });
82
+ } finally {
83
+ typeof e.EndUpdate == "function" && e.EndUpdate();
84
+ }
85
+ p.size && (n && p.forEach((T) => {
86
+ typeof e.RefreshRow == "function" && e.RefreshRow(T);
87
+ }), F(t, "group header button attribute apply"), k(t, "group header button attribute apply", o, {
88
+ updatedCellCount: l,
89
+ updatedRowCount: p.size
90
+ }));
91
+ }, "applyTreeGridGroupHeaderSortButtonAttributes"), Te = /* @__PURE__ */ f((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), pe = /* @__PURE__ */ f((e) => {
53
92
  const t = e == null ? void 0 : e.Visible;
54
93
  return !!e && t !== 0 && t !== !1 && t !== "0";
55
- }, "isVisibleTreeGridRow"), se = /* @__PURE__ */ s((e) => {
94
+ }, "isVisibleTreeGridRow"), Re = /* @__PURE__ */ f((e) => {
56
95
  const t = e == null ? void 0 : e.Added;
57
96
  return !!e && t !== 0 && t !== !1 && t !== "0" && t !== void 0;
58
- }, "isAddedTreeGridRow"), E = /* @__PURE__ */ s((e) => !e || e.Fixed === "Foot" || !ie(e) ? !1 : e.Kind === "Data" || se(e), "isDisplayTreeGridRow"), Ge = /* @__PURE__ */ s((e, t, n) => !t || !n || !E(t) ? !1 : e.CanEdit(t, n) === 1, "isEditableTreeGridCell"), fe = /* @__PURE__ */ s((e, t, n) => {
59
- const c = e.GetAttribute(t, n, "Color");
60
- return c != null && c !== "";
61
- }, "hasExplicitTreeGridCellColor"), de = /* @__PURE__ */ s((e, t, n, c) => {
62
- if (!(!t || c === void 0 || !Ge(e, t, n) || fe(e, t, n)))
63
- return c;
64
- }, "getEditableTreeGridCellDefaultColor"), m = /* @__PURE__ */ s((e, t, n, c) => e === c[0] && t === c[1] && n === c[2], "matchesTreeGridRgbColor"), Te = /* @__PURE__ */ s((e, t, n) => {
97
+ }, "isAddedTreeGridRow"), E = /* @__PURE__ */ f((e) => !e || e.Fixed === "Foot" || !pe(e) ? !1 : e.Kind === "Data" || Re(e), "isDisplayTreeGridRow"), le = /* @__PURE__ */ f((e, t, n) => !t || !n || !E(t) ? !1 : e.CanEdit(t, n) === 1, "isEditableTreeGridCell"), Ce = /* @__PURE__ */ f((e, t, n) => {
98
+ const o = e.GetAttribute(t, n, "Color");
99
+ return o != null && o !== "";
100
+ }, "hasExplicitTreeGridCellColor"), Se = /* @__PURE__ */ f((e, t, n, o) => {
101
+ if (!(!t || o === void 0 || !le(e, t, n) || Ce(e, t, n)))
102
+ return o;
103
+ }, "getEditableTreeGridCellDefaultColor"), y = /* @__PURE__ */ f((e, t, n, o) => e === o[0] && t === o[1] && n === o[2], "matchesTreeGridRgbColor"), Ee = /* @__PURE__ */ f((e, t, n) => {
65
104
  if (!t || !n || !E(t))
66
105
  return !1;
67
- const c = e.IsSelected(t, n);
68
- return c !== 0 && c !== !1 && c !== void 0 && c !== null;
69
- }, "isTreeGridSelectedCellState"), ae = /* @__PURE__ */ s((e, t, n) => !t || !n || !E(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 0, "isTreeGridReadonlyHoveredCellState"), Ce = /* @__PURE__ */ s((e, t, n) => !t || !n || !E(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 2, "isTreeGridPreviewHoveredCellState"), Re = /* @__PURE__ */ s(({
106
+ const o = e.IsSelected(t, n);
107
+ return o !== 0 && o !== !1 && o !== void 0 && o !== null;
108
+ }, "isTreeGridSelectedCellState"), _e = /* @__PURE__ */ f((e, t, n) => !t || !n || !E(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 0, "isTreeGridReadonlyHoveredCellState"), ye = /* @__PURE__ */ f((e, t, n) => !t || !n || !E(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 2, "isTreeGridPreviewHoveredCellState"), me = /* @__PURE__ */ f(({
70
109
  grid: e,
71
110
  row: t,
72
111
  col: n,
73
- r: c,
74
- g: G,
112
+ r: o,
113
+ g: s,
75
114
  b: a,
76
- selectedCellBackgroundColor: R,
115
+ selectedCellBackgroundColor: p,
77
116
  hoverCellBackgroundColor: l
78
117
  }) => {
79
- if (Te(e, t, n) && m(c, G, a, Z))
80
- return R;
81
- if (ae(e, t, n) && (m(c, G, a, g) || m(c, G, a, H)) || Ce(e, t, n) && (m(c, G, a, ee) || m(c, G, a, te) || m(c, G, a, ne)))
118
+ if (Ee(e, t, n) && y(o, s, a, oe))
119
+ return p;
120
+ if (_e(e, t, n) && (y(o, s, a, ue) || y(o, s, a, ce)) || ye(e, t, n) && (y(o, s, a, ie) || y(o, s, a, se) || y(o, s, a, fe)))
82
121
  return l;
83
- }, "resolveTreeGridStateBackgroundColor"), we = /* @__PURE__ */ s((e) => {
122
+ }, "resolveTreeGridStateBackgroundColor"), Ne = /* @__PURE__ */ f((e) => {
84
123
  if (!e)
85
124
  return !1;
86
125
  if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
@@ -93,157 +132,166 @@ const Be = 300, Z = [255, 255, 166], g = [240, 240, 240], H = [248, 248, 248], e
93
132
  return !1;
94
133
  }
95
134
  return Object.values(e.Rows ?? {}).some((t) => E(t));
96
- }, "hasTreeGridDisplayDataRows"), Le = /* @__PURE__ */ s((e, t, n) => {
97
- var G;
98
- const c = (G = e.Data) == null ? void 0 : G.Data;
135
+ }, "hasTreeGridDisplayDataRows"), Ve = /* @__PURE__ */ f((e, t, n) => {
136
+ var s;
137
+ const o = (s = e.Data) == null ? void 0 : s.Data;
99
138
  e.Data.Data = {
100
- ...c,
139
+ ...o,
101
140
  Data: { Body: [t || []] },
102
141
  Url: ""
103
142
  }, e.ReloadBody(n);
104
- }, "replaceTreeGridBodyData"), be = /* @__PURE__ */ s(({
143
+ }, "replaceTreeGridBodyData"), Fe = /* @__PURE__ */ f(({
105
144
  id: e,
106
145
  latestEventHandlersRef: t,
107
146
  highlightEditableCellsRef: n,
108
- highlightChangedCellsRef: c,
109
- editableCellBackgroundColorValueRef: G,
147
+ highlightChangedCellsRef: o,
148
+ editableCellBackgroundColorValueRef: s,
110
149
  changedCellBackgroundColorRef: a,
111
- selectedCellBackgroundColorRef: R,
150
+ selectedCellBackgroundColorRef: p,
112
151
  hoverCellBackgroundColorRef: l,
113
- treeGridInstanceRef: S,
114
- treeGridInitStartedAtRef: _,
115
- latestLayoutOverridesRef: x,
116
- appliedLayoutOverridesRef: N,
117
- appliedBodyDataPropRef: V,
118
- latestColumnEditRulesRef: k,
119
- latestColumnEditRuleLookupRef: B,
120
- appliedColumnEditRulesRef: F,
121
- columnEditRulesStateRef: h,
122
- hasAppliedInitialLayoutRef: w,
123
- syncHasDisplayDataRows: D,
124
- setIsTreeGridReady: $
152
+ treeGridInstanceRef: T,
153
+ treeGridInitStartedAtRef: C,
154
+ latestLayoutOverridesRef: W,
155
+ appliedLayoutOverridesRef: M,
156
+ appliedBodyDataPropRef: z,
157
+ latestColumnEditRulesRef: j,
158
+ latestColumnEditRuleLookupRef: w,
159
+ appliedColumnEditRulesRef: q,
160
+ columnEditRulesStateRef: O,
161
+ hasAppliedInitialLayoutRef: A,
162
+ syncHasDisplayDataRows: _,
163
+ setIsTreeGridReady: Y
125
164
  }) => {
126
- const f = t.current;
127
- window.TGSetEvent("OnRowAdd", e, (r, u) => {
128
- var o, i;
129
- u.CanEdit = 1, u.CanDelete = 1, (i = (o = t.current) == null ? void 0 : o.onRowAdd) == null || i.call(o, r, u);
165
+ const d = t.current;
166
+ window.TGSetEvent("OnRowAdd", e, (r, c) => {
167
+ var u, i;
168
+ c.CanEdit = 1, c.CanDelete = 1, (i = (u = t.current) == null ? void 0 : u.onRowAdd) == null || i.call(u, r, c);
130
169
  }), window.TGSetEvent("OnRowAdded", e, (r) => {
131
- D(r);
132
- }), typeof (f == null ? void 0 : f.onRowClick) == "function" && window.TGSetEvent(
170
+ _(r);
171
+ }), typeof (d == null ? void 0 : d.onRowClick) == "function" && window.TGSetEvent(
133
172
  "OnClick",
134
173
  e,
135
- O((r, u, o, i, d, T) => {
136
- var C, p;
137
- (p = (C = t.current) == null ? void 0 : C.onRowClick) == null || p.call(
138
- C,
174
+ b((r, c, u, i, G, R) => {
175
+ var S, m;
176
+ (m = (S = t.current) == null ? void 0 : S.onRowClick) == null || m.call(
177
+ S,
139
178
  r,
179
+ c,
140
180
  u,
141
- o,
142
181
  i,
143
- d,
144
- T
182
+ G,
183
+ R
145
184
  );
146
185
  }, 300)
147
- ), typeof (f == null ? void 0 : f.onClickButton) == "function" && window.TGSetEvent(
186
+ ), typeof (d == null ? void 0 : d.onClickButton) == "function" && window.TGSetEvent(
148
187
  "OnClickButton",
149
188
  e,
150
- O((r, u, o, i) => {
151
- var d, T;
152
- (T = (d = t.current) == null ? void 0 : d.onClickButton) == null || T.call(
153
- d,
189
+ b((r, c, u, i) => {
190
+ var G, R;
191
+ (R = (G = t.current) == null ? void 0 : G.onClickButton) == null || R.call(
192
+ G,
154
193
  r,
194
+ c,
155
195
  u,
156
- o,
157
196
  i
158
197
  );
159
198
  }, 300)
160
- ), typeof (f == null ? void 0 : f.onRowDelete) == "function" ? window.TGSetEvent("OnRowDelete", e, (r, u, o) => {
161
- var i, d;
162
- D(r), (d = (i = t.current) == null ? void 0 : i.onRowDelete) == null || d.call(
199
+ ), typeof (d == null ? void 0 : d.onRowDelete) == "function" ? window.TGSetEvent("OnRowDelete", e, (r, c, u) => {
200
+ var i, G;
201
+ _(r), (G = (i = t.current) == null ? void 0 : i.onRowDelete) == null || G.call(
163
202
  i,
164
203
  r,
165
- u,
166
- o
204
+ c,
205
+ u
167
206
  );
168
207
  }) : window.TGSetEvent("OnRowDelete", e, (r) => {
169
- D(r);
170
- }), typeof (f == null ? void 0 : f.onRowUndelete) == "function" ? window.TGSetEvent("OnRowUndelete", e, (r, u) => {
171
- var o, i;
172
- D(r), (i = (o = t.current) == null ? void 0 : o.onRowUndelete) == null || i.call(o, r, u);
208
+ _(r);
209
+ }), typeof (d == null ? void 0 : d.onRowUndelete) == "function" ? window.TGSetEvent("OnRowUndelete", e, (r, c) => {
210
+ var u, i;
211
+ _(r), (i = (u = t.current) == null ? void 0 : u.onRowUndelete) == null || i.call(u, r, c);
173
212
  }) : window.TGSetEvent("OnRowUndelete", e, (r) => {
174
- D(r);
175
- }), window.TGSetEvent("OnGetDefaultColor", e, (r, u, o) => {
176
- if (!(!n.current || !E(u)))
177
- return de(
213
+ _(r);
214
+ }), window.TGSetEvent("OnGetDefaultColor", e, (r, c, u) => {
215
+ if (!(!n.current || !E(c)))
216
+ return Se(
178
217
  r,
218
+ c,
179
219
  u,
180
- o,
181
- G.current
220
+ s.current
182
221
  );
183
- }), window.TGSetEvent("OnGetColor", e, (r, u, o, i, d, T, C) => {
184
- if (!C)
185
- return Re({
222
+ }), window.TGSetEvent("OnGetColor", e, (r, c, u, i, G, R, S) => {
223
+ if (!S)
224
+ return me({
186
225
  grid: r,
187
- row: u,
188
- col: o,
226
+ row: c,
227
+ col: u,
189
228
  r: i,
190
- g: d,
191
- b: T,
192
- selectedCellBackgroundColor: R.current,
229
+ g: G,
230
+ b: R,
231
+ selectedCellBackgroundColor: p.current,
193
232
  hoverCellBackgroundColor: l.current
194
233
  });
195
- }), window.TGSetEvent("OnAfterValueChanged", e, (r, u, o, i) => {
196
- var L, b;
197
- const d = B.current, T = d ? Y(d, o, i) : void 0, C = T == null ? void 0 : T.value, p = C ?? i;
198
- T != null && T.invalidText && j(T.invalidText, { variant: "warning" }), C !== void 0 && r.SetValue(u, o, C, 1), c.current && E(u) && M(e, {
199
- row: u,
200
- col: o,
234
+ }), window.TGSetEvent("OnAfterValueChanged", e, (r, c, u, i) => {
235
+ var B, I;
236
+ const G = w.current, R = G ? g(G, u, i) : void 0, S = R == null ? void 0 : R.value, m = S ?? i;
237
+ R != null && R.invalidText && X(R.invalidText, { variant: "warning" }), S !== void 0 && r.SetValue(c, u, S, 1), o.current && E(c) && J(e, {
238
+ row: c,
239
+ col: u,
201
240
  backgroundColor: a.current
202
241
  });
203
- const y = ((L = t.current) == null ? void 0 : L.onAfterValueChanged) ?? ((b = t.current) == null ? void 0 : b.onRowChange);
204
- y == null || y(r, u, o, p);
205
- }), typeof (f == null ? void 0 : f.onSelect) == "function" && window.TGSetEvent(
242
+ const D = ((B = t.current) == null ? void 0 : B.onAfterValueChanged) ?? ((I = t.current) == null ? void 0 : I.onRowChange);
243
+ D == null || D(r, c, u, m);
244
+ }), typeof (d == null ? void 0 : d.onSelect) == "function" && window.TGSetEvent(
206
245
  "OnSelect",
207
246
  e,
208
- O((r) => {
209
- var o, i;
210
- const u = r.GetSelRows() ?? [];
211
- (i = (o = t.current) == null ? void 0 : o.onSelect) == null || i.call(o, u);
247
+ b((r) => {
248
+ var u, i;
249
+ const c = r.GetSelRows() ?? [];
250
+ (i = (u = t.current) == null ? void 0 : u.onSelect) == null || i.call(u, c);
212
251
  }, 100)
213
- ), typeof (f == null ? void 0 : f.onSave) == "function" && window.TGSetEvent("OnSave", e, (r, u, o) => {
214
- var i, d;
215
- (d = (i = t.current) == null ? void 0 : i.onSave) == null || d.call(
252
+ ), typeof (d == null ? void 0 : d.onSave) == "function" && window.TGSetEvent("OnSave", e, (r, c, u) => {
253
+ var i, G;
254
+ (G = (i = t.current) == null ? void 0 : i.onSave) == null || G.call(
216
255
  i,
217
256
  r,
218
- u,
219
- o
257
+ c,
258
+ u
220
259
  );
260
+ }), window.TGSetEvent("OnSort", e, (r, c) => {
261
+ var u;
262
+ if (!(!c || !$(r, r.ARow, c)))
263
+ return F(e, "group header sort blocked"), te(e, "group header sort blocked", {
264
+ rowId: (u = r.ARow) == null ? void 0 : u.id,
265
+ col: c
266
+ }), -1;
267
+ }), window.TGSetEvent("OnRenderStart", e, (r) => {
268
+ V(r, e, !1);
221
269
  }), window.TGSetEvent(
222
270
  "OnReady",
223
271
  e,
224
- O((r) => {
225
- var u, o;
226
- if (!w.current) {
227
- const i = x.current;
228
- w.current = !0, q(r, i), z(h.current), K(
272
+ b((r) => {
273
+ var c, u;
274
+ if (!A.current) {
275
+ const i = W.current;
276
+ A.current = !0, Z(r, i), H(O.current), ee(
229
277
  r,
230
- B.current,
231
- h.current
232
- ), S.current = r, N.current = i, V.current = A(r), F.current = k.current, D(r), $(!0), Q(e, "TreeGrid init ready", _.current, {
233
- bodyRowCount: ue(
234
- A(r)
278
+ w.current,
279
+ O.current
280
+ ), T.current = r, M.current = i, z.current = L(r), q.current = j.current, _(r), Y(!0), V(r, e, !0), k(e, "TreeGrid init ready", C.current, {
281
+ bodyRowCount: Te(
282
+ L(r)
235
283
  )
236
- }), _.current = null, (o = (u = t.current) == null ? void 0 : u.onReady) == null || o.call(u, r);
284
+ }), C.current = null, (u = (c = t.current) == null ? void 0 : c.onReady) == null || u.call(c, r);
237
285
  }
238
286
  }, 100)
239
287
  );
240
288
  }, "bindTreeGridEvents");
241
289
  export {
242
- Be as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
243
- be as bindTreeGridEvents,
244
- he as buildTreeGridInitializationOptions,
245
- ue as getTreeGridBodyDataCount,
246
- we as hasTreeGridDisplayDataRows,
247
- Le as replaceTreeGridBodyData
290
+ Le as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
291
+ Fe as bindTreeGridEvents,
292
+ xe as buildTreeGridInitializationOptions,
293
+ Te as getTreeGridBodyDataCount,
294
+ Ne as hasTreeGridDisplayDataRows,
295
+ Ve as replaceTreeGridBodyData
248
296
  };
249
297
  //# sourceMappingURL=treeGridRuntime.js.map