@owp/core 2.5.15 → 2.5.16

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 (34) 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/index5.js +2 -2
  7. package/dist/components/OwpQuerySelector/OwpQuerySelector.js +184 -177
  8. package/dist/components/OwpQuerySelector/OwpQuerySelector.js.map +1 -1
  9. package/dist/components/OwpTable/internal/treeGridTableStyle.js +16 -21
  10. package/dist/components/OwpTable/internal/treeGridTableStyle.js.map +1 -1
  11. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +250 -198
  12. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  13. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +141 -127
  14. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  15. package/dist/constants/treeGrid.js +32 -26
  16. package/dist/constants/treeGrid.js.map +1 -1
  17. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  18. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  19. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  20. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
  21. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  22. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  23. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  24. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  25. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  26. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  27. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  28. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  29. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  30. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  31. package/dist/owp-app.css +1 -1
  32. package/dist/types/components/OwpQuerySelector/OwpQuerySelector.d.ts +1 -1
  33. package/dist/types/constants/treeGrid.d.ts +3 -3
  34. package/package.json +1 -1
@@ -1,83 +1,85 @@
1
- var Z = Object.defineProperty;
2
- var f = (e, t) => Z(e, "name", { value: t, configurable: !0 });
3
- import { getTreeGridTextResourceUrl as g, TREEGRID_CELL_HIGHLIGHT_CLASS as H } from "../../../constants/treeGrid.js";
4
- import { isTreeGridRowAddedById as D, getTreeGridAddedRowHighlightColumns as L, highlightTreeGridCellById as ee, appendTreeGridAddedRowHighlightColumn as te } from "../../../utils/treeGridUtil.js";
5
- import { enqueueSnackbar as ne } from "notistack";
6
- import { applyTreeGridLayoutToGrid as re } from "./treeGridLayout.js";
7
- import { resolveTreeGridColumnEditValue as oe, resetTreeGridColumnEditRulesState as ie, syncTreeGridColumnEditRules as ue } from "./treeGridColumnEditRules.js";
8
- import { countTreeGridPerf as W, logTreeGridPerf as ce, measureTreeGridPerf as M } from "./utils/perf.js";
9
- import { debounce as _ } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
10
- import { get as se } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
11
- import { isEmpty as fe } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
12
- const We = 300, ae = [255, 255, 166], de = [240, 240, 240], le = [248, 248, 248], Ge = [255, 255, 255], Te = [255, 255, 254], pe = [242, 242, 242], x = "Button", j = /* @__PURE__ */ f((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), V = /* @__PURE__ */ new Map(), Re = /* @__PURE__ */ f((e) => {
1
+ var oe = Object.defineProperty;
2
+ var c = (e, t) => oe(e, "name", { value: t, configurable: !0 });
3
+ import { getTreeGridTextResourceUrl as ie, TREEGRID_CELL_HIGHLIGHT_CLASS as W, TREEGRID_CELL_HIGHLIGHT_COLOR as ue, resolveTreeGridColorNumber as ce } from "../../../constants/treeGrid.js";
4
+ import { isTreeGridRowAddedById as b, getTreeGridAddedRowHighlightColumns as x, highlightTreeGridCellById as se, appendTreeGridAddedRowHighlightColumn as fe } from "../../../utils/treeGridUtil.js";
5
+ import { enqueueSnackbar as de } from "notistack";
6
+ import { applyTreeGridLayoutToGrid as ae } from "./treeGridLayout.js";
7
+ import { resolveTreeGridColumnEditValue as Ge, resetTreeGridColumnEditRulesState as Te, syncTreeGridColumnEditRules as le } from "./treeGridColumnEditRules.js";
8
+ import { countTreeGridPerf as j, logTreeGridPerf as Re, measureTreeGridPerf as z } from "./utils/perf.js";
9
+ import { debounce as y } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
10
+ import { get as Ee } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
11
+ import { isEmpty as he } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
12
+ const tt = 300, Ce = [255, 255, 166], pe = [240, 240, 240], _e = [248, 248, 248], Se = [255, 255, 255], me = [255, 255, 254], ye = [242, 242, 242], k = "Button", De = 0.75, be = 0.5, Ie = [255, 255, 255], Le = [17, 17, 18], V = W.split(/\s+/).filter(
13
+ Boolean
14
+ ), X = /* @__PURE__ */ c((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), F = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ c((e) => {
13
15
  if (!e || !e.startsWith("data:"))
14
16
  return e;
15
- const t = V.get(e);
17
+ const t = F.get(e);
16
18
  if (t)
17
19
  return t;
18
20
  try {
19
- const [n, o = ""] = e.split(",", 2), c = /^data:([^;]*)(;base64)?$/i.exec(n), d = (c == null ? void 0 : c[1]) || "application/octet-stream", G = c != null && c[2] ? atob(o) : decodeURIComponent(o), R = new Uint8Array(G.length);
21
+ const [n, r = ""] = e.split(",", 2), s = /^data:([^;]*)(;base64)?$/i.exec(n), a = (s == null ? void 0 : s[1]) || "application/octet-stream", G = s != null && s[2] ? atob(r) : decodeURIComponent(r), E = new Uint8Array(G.length);
20
22
  for (let C = 0; C < G.length; C += 1)
21
- R[C] = G.charCodeAt(C);
22
- const p = URL.createObjectURL(new Blob([R], { type: d }));
23
- return V.set(e, p), p;
23
+ E[C] = G.charCodeAt(C);
24
+ const l = URL.createObjectURL(new Blob([E], { type: a }));
25
+ return F.set(e, l), l;
24
26
  } catch {
25
27
  return e;
26
28
  }
27
- }, "resolveTreeGridInlineUrl"), A = /* @__PURE__ */ f((e) => {
28
- if (!e || j(e))
29
- return Re(e);
30
- const t = e.indexOf("#"), [n, o] = t >= 0 ? [e.slice(0, t), e.slice(t)] : [e, ""], c = n.includes("?") ? "&" : "?";
31
- return `${n}${c}noCache=${Date.now()}${o}`;
32
- }, "appendNoCacheQuery"), k = /* @__PURE__ */ f((e, t, n) => {
29
+ }, "resolveTreeGridInlineUrl"), I = /* @__PURE__ */ c((e) => {
30
+ if (!e || X(e))
31
+ return ve(e);
32
+ const t = e.indexOf("#"), [n, r] = t >= 0 ? [e.slice(0, t), e.slice(t)] : [e, ""], s = n.includes("?") ? "&" : "?";
33
+ return `${n}${s}noCache=${Date.now()}${r}`;
34
+ }, "appendNoCacheQuery"), N = /* @__PURE__ */ c((e, t, n) => {
33
35
  if (!e)
34
36
  return;
35
- const o = n.canEdit, c = n.highlightColumns ?? [], d = n.highlightBackgroundColor;
36
- if (!(o === void 0 && !c.length)) {
37
+ const r = n.canEdit, s = n.highlightColumns ?? [], a = n.highlightBackgroundColor;
38
+ if (!(r === void 0 && !s.length)) {
37
39
  typeof e.StartUpdate == "function" && e.StartUpdate();
38
40
  try {
39
- o !== void 0 && (t.CanEdit = o), c.forEach((G) => {
41
+ r !== void 0 && (t.CanEdit = r), s.forEach((G) => {
40
42
  G && (e.SetValue(
41
43
  t,
42
44
  `${G}Class`,
43
- d ? H : "",
45
+ a ? W : "",
44
46
  0
45
- ), e.SetValue(t, `${G}Color`, d ?? "", 0));
47
+ ), e.SetValue(t, `${G}Color`, a ?? "", 0));
46
48
  });
47
49
  } finally {
48
50
  typeof e.EndUpdate == "function" && e.EndUpdate();
49
51
  }
50
52
  typeof e.RefreshRow == "function" && e.RefreshRow(t);
51
53
  }
52
- }, "syncTreeGridDeletedRowState"), he = /* @__PURE__ */ f((e) => e ? j(e) || e.includes("assets") ? A(e) : A(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), Ce = /* @__PURE__ */ f((e) => (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function", "isTreeGridPromiseLike"), Ee = /* @__PURE__ */ f((e, t, n, o) => {
54
+ }, "syncTreeGridDeletedRowState"), Ae = /* @__PURE__ */ c((e) => e ? X(e) || e.includes("assets") ? I(e) : I(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), Be = /* @__PURE__ */ c((e) => (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function", "isTreeGridPromiseLike"), Oe = /* @__PURE__ */ c((e, t, n, r) => {
53
55
  if (!(!e || n === "cancel")) {
54
56
  if (n === "remove") {
55
- e.RemoveRow(t), o(e);
57
+ e.RemoveRow(t), r(e);
56
58
  return;
57
59
  }
58
60
  e.DeleteRowT(t, 3);
59
61
  }
60
- }, "applyTreeGridBeforeRowUndeleteAction"), Se = /* @__PURE__ */ f((e, t, n) => e ? { Url: he(t) } : { Data: { Body: [fe(n) ? [] : n] } }, "buildTreeGridDataSource"), Me = /* @__PURE__ */ f(({
62
+ }, "applyTreeGridBeforeRowUndeleteAction"), Ue = /* @__PURE__ */ c((e, t, n) => e ? { Url: Ae(t) } : { Data: { Body: [he(n) ? [] : n] } }, "buildTreeGridDataSource"), nt = /* @__PURE__ */ c(({
61
63
  id: e,
62
64
  layoutUrl: t,
63
65
  layoutData: n,
64
- dataUrl: o,
65
- bodyData: c,
66
- useDataUrl: d,
66
+ dataUrl: r,
67
+ bodyData: s,
68
+ useDataUrl: a,
67
69
  width: G,
68
- height: R,
69
- languageId: p
70
+ height: E,
71
+ languageId: l
70
72
  }) => ({
71
73
  id: e,
72
- Layout: n ? { Data: n } : { Url: A(t ?? "") },
73
- Data: Se(d, o, c),
74
+ Layout: n ? { Data: n } : { Url: I(t ?? "") },
75
+ Data: Ue(a, r, s),
74
76
  Text: {
75
- Url: g(p)
77
+ Url: ie(l)
76
78
  },
77
79
  width: G,
78
- height: R,
80
+ height: E,
79
81
  Debug: "Error"
80
- }), "buildTreeGridInitializationOptions"), N = /* @__PURE__ */ f((e) => se(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), F = /* @__PURE__ */ f((e) => {
82
+ }), "buildTreeGridInitializationOptions"), H = /* @__PURE__ */ c((e) => Ee(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), g = /* @__PURE__ */ c((e) => {
81
83
  if (typeof e == "number")
82
84
  return Number.isFinite(e) && e > 0 ? e : void 0;
83
85
  if (typeof e != "string")
@@ -87,272 +89,322 @@ const We = 300, ae = [255, 255, 166], de = [240, 240, 240], le = [248, 248, 248]
87
89
  return;
88
90
  const n = Number(t);
89
91
  return Number.isFinite(n) && n > 0 ? n : void 0;
90
- }, "parseTreeGridPositiveNumber"), $ = /* @__PURE__ */ f((e, t, n, o) => {
92
+ }, "parseTreeGridPositiveNumber"), $ = /* @__PURE__ */ c((e, t, n, r) => {
91
93
  if (!t || !n)
92
94
  return;
93
- const c = e.GetAttribute(t, n, o), d = F(c);
94
- return d !== void 0 ? d : F(
95
- t[`${n}${o}`]
95
+ const s = e.GetAttribute(t, n, r), a = g(s);
96
+ return a !== void 0 ? a : g(
97
+ t[`${n}${r}`]
96
98
  );
97
- }, "getTreeGridHeaderCellSpanAttribute"), z = /* @__PURE__ */ f((e, t, n) => !t || !n || t.Fixed !== "Head" || ($(e, t, n, "Span") ?? 1) <= 1 ? !1 : ($(e, t, n, "RowSpan") ?? 1) === 1, "isTreeGridGroupHeaderCell"), P = /* @__PURE__ */ f((e, t, n = !1) => {
98
- const o = typeof performance < "u" ? performance.now() : Date.now(), c = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((p) => p.Fixed === "Head") : [], d = typeof e.GetCols == "function" ? e.GetCols() : [];
99
- if (!c.length || !d.length)
99
+ }, "getTreeGridHeaderCellSpanAttribute"), Y = /* @__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) => {
100
+ const r = typeof performance < "u" ? performance.now() : Date.now(), s = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((l) => l.Fixed === "Head") : [], a = typeof e.GetCols == "function" ? e.GetCols() : [];
101
+ if (!s.length || !a.length)
100
102
  return;
101
103
  const G = /* @__PURE__ */ new Set();
102
- let R = 0;
104
+ let E = 0;
103
105
  typeof e.StartUpdate == "function" && e.StartUpdate();
104
106
  try {
105
- c.forEach((p) => {
106
- d.forEach((C) => {
107
- z(e, p, C) && e.GetAttribute(p, C, x) !== "" && (e.SetAttribute(p, C, x, "", 0, 0), G.add(p), R += 1);
107
+ s.forEach((l) => {
108
+ a.forEach((C) => {
109
+ Y(e, l, C) && e.GetAttribute(l, C, k) !== "" && (e.SetAttribute(l, C, k, "", 0, 0), G.add(l), E += 1);
108
110
  });
109
111
  });
110
112
  } finally {
111
113
  typeof e.EndUpdate == "function" && e.EndUpdate();
112
114
  }
113
- G.size && (n && G.forEach((p) => {
114
- typeof e.RefreshRow == "function" && e.RefreshRow(p);
115
- }), W(t, "group header button attribute apply"), M(t, "group header button attribute apply", o, {
116
- updatedCellCount: R,
115
+ G.size && (n && G.forEach((l) => {
116
+ typeof e.RefreshRow == "function" && e.RefreshRow(l);
117
+ }), j(t, "group header button attribute apply"), z(t, "group header button attribute apply", r, {
118
+ updatedCellCount: E,
117
119
  updatedRowCount: G.size
118
120
  }));
119
- }, "applyTreeGridGroupHeaderSortButtonAttributes"), me = /* @__PURE__ */ f((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), ye = /* @__PURE__ */ f((e) => {
121
+ }, "applyTreeGridGroupHeaderSortButtonAttributes"), we = /* @__PURE__ */ c((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), xe = /* @__PURE__ */ c((e) => {
120
122
  const t = e == null ? void 0 : e.Visible;
121
123
  return !!e && t !== 0 && t !== !1 && t !== "0";
122
- }, "isVisibleTreeGridRow"), _e = /* @__PURE__ */ f((e) => {
124
+ }, "isVisibleTreeGridRow"), ke = /* @__PURE__ */ c((e) => {
123
125
  const t = e == null ? void 0 : e.Added;
124
126
  return !!e && t !== 0 && t !== !1 && t !== "0" && t !== void 0;
125
- }, "isAddedTreeGridRow"), E = /* @__PURE__ */ f((e) => !e || e.Fixed === "Foot" || !ye(e) ? !1 : e.Kind === "Data" || _e(e), "isDisplayTreeGridRow"), be = /* @__PURE__ */ f((e, t, n) => !t || !n || !E(t) ? !1 : e.CanEdit(t, n) === 1, "isEditableTreeGridCell"), De = /* @__PURE__ */ f((e, t, n) => {
126
- const o = e.GetAttribute(t, n, "Color");
127
- return o != null && o !== "";
128
- }, "hasExplicitTreeGridCellColor"), Ae = /* @__PURE__ */ f((e, t, n, o) => {
129
- if (!(!t || o === void 0 || !be(e, t, n) || De(e, t, n)))
130
- return o;
131
- }, "getEditableTreeGridCellDefaultColor"), m = /* @__PURE__ */ f((e, t, n, o) => e === o[0] && t === o[1] && n === o[2], "matchesTreeGridRgbColor"), ve = /* @__PURE__ */ f((e, t, n) => {
132
- if (!t || !n || !E(t))
127
+ }, "isAddedTreeGridRow"), p = /* @__PURE__ */ c((e) => !e || e.Fixed === "Foot" || !xe(e) ? !1 : e.Kind === "Data" || ke(e), "isDisplayTreeGridRow"), Ve = /* @__PURE__ */ c((e, t, n) => !t || !n || !p(t) ? !1 : e.CanEdit(t, n) === 1, "isEditableTreeGridCell"), Fe = /* @__PURE__ */ c((e, t, n) => {
128
+ const r = e.GetAttribute(t, n, "Color");
129
+ return r != null && r !== "";
130
+ }, "hasExplicitTreeGridCellColor"), Ne = /* @__PURE__ */ c((e, t, n, r) => {
131
+ if (!(!t || r === void 0 || !Ve(e, t, n) || Fe(e, t, n)))
132
+ return r;
133
+ }, "getEditableTreeGridCellDefaultColor"), S = /* @__PURE__ */ c((e, t, n, r) => e === r[0] && t === r[1] && n === r[2], "matchesTreeGridRgbColor"), M = /* @__PURE__ */ c((e) => {
134
+ const t = typeof e == "number" ? e : typeof e == "string" ? ce(e) : void 0;
135
+ if (!(t === void 0 || !Number.isFinite(t)))
136
+ return [t >> 16 & 255, t >> 8 & 255, t & 255];
137
+ }, "resolveTreeGridColorRgb"), q = /* @__PURE__ */ c((e) => `#${e.map((t) => Math.max(0, Math.min(255, t)).toString(16).padStart(2, "0")).join("")}`, "stringifyTreeGridRgbColor"), K = /* @__PURE__ */ c((e, t, n) => {
138
+ const r = /* @__PURE__ */ c((s, a) => Math.round(
139
+ s * (1 - n) + a * n
140
+ ), "blendChannel");
141
+ return [
142
+ r(e[0], t[0]),
143
+ r(e[1], t[1]),
144
+ r(e[2], t[2])
145
+ ];
146
+ }, "blendTreeGridRgbColor"), He = /* @__PURE__ */ c((e) => (e == null ? void 0 : e.split(/\s+/).filter(Boolean)) ?? [], "getTreeGridClassTokens"), Q = /* @__PURE__ */ c((e) => {
147
+ const t = typeof e == "string" ? He(e) : [];
148
+ return V.length > 0 && V.every((n) => t.includes(n));
149
+ }, "hasTreeGridCellHighlightClass"), L = /* @__PURE__ */ c((e, t, n) => {
150
+ if (!t || !n || !p(t))
133
151
  return !1;
134
- const o = e.IsSelected(t, n);
135
- return o !== 0 && o !== !1 && o !== void 0 && o !== null;
136
- }, "isTreeGridSelectedCellState"), we = /* @__PURE__ */ f((e, t, n) => !t || !n || !E(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 0, "isTreeGridReadonlyHoveredCellState"), Be = /* @__PURE__ */ f((e, t, n) => !t || !n || !E(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 2, "isTreeGridPreviewHoveredCellState"), Oe = /* @__PURE__ */ f(({
152
+ const r = e.IsSelected(t, n);
153
+ return r !== 0 && r !== !1 && r !== void 0 && r !== null;
154
+ }, "isTreeGridSelectedCellState"), ge = /* @__PURE__ */ c((e, t, n, r) => {
155
+ if (!t || !L(e, t, n) || !Q(e.GetAttribute(t, n, "Class")))
156
+ return;
157
+ const s = M(r), a = M(
158
+ e.GetAttribute(t, n, "Color") ?? ue
159
+ );
160
+ if (!(!s || !a))
161
+ return q(
162
+ K(
163
+ s,
164
+ a,
165
+ De
166
+ )
167
+ );
168
+ }, "resolveTreeGridSelectedHighlightBackgroundColor"), $e = /* @__PURE__ */ c((e, t, n, r) => {
169
+ if (!(r || !t || !L(e, t, n) || !Q(e.GetAttribute(t, n, "Class"))))
170
+ return q(
171
+ K(
172
+ Ie,
173
+ Le,
174
+ be
175
+ )
176
+ );
177
+ }, "resolveTreeGridSelectedHighlightTextColor"), Pe = /* @__PURE__ */ c((e, t, n) => !t || !n || !p(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 0, "isTreeGridReadonlyHoveredCellState"), Me = /* @__PURE__ */ c((e, t, n) => !t || !n || !p(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 2, "isTreeGridPreviewHoveredCellState"), We = /* @__PURE__ */ c(({
137
178
  grid: e,
138
179
  row: t,
139
180
  col: n,
140
- r: o,
141
- g: c,
142
- b: d,
181
+ r,
182
+ g: s,
183
+ b: a,
143
184
  selectedCellBackgroundColor: G,
144
- hoverCellBackgroundColor: R
185
+ hoverCellBackgroundColor: E
145
186
  }) => {
146
- if (ve(e, t, n) && m(o, c, d, ae))
187
+ const l = ge(
188
+ e,
189
+ t,
190
+ n,
191
+ G
192
+ );
193
+ if (l)
194
+ return l;
195
+ if (L(e, t, n) && S(r, s, a, Ce))
147
196
  return G;
148
- if (we(e, t, n) && (m(o, c, d, de) || m(o, c, d, le)) || Be(e, t, n) && (m(o, c, d, Ge) || m(o, c, d, Te) || m(o, c, d, pe)))
149
- return R;
150
- }, "resolveTreeGridStateBackgroundColor"), je = /* @__PURE__ */ f((e) => {
197
+ if (Pe(e, t, n) && (S(r, s, a, pe) || S(r, s, a, _e)) || Me(e, t, n) && (S(r, s, a, Se) || S(r, s, a, me) || S(r, s, a, ye)))
198
+ return E;
199
+ }, "resolveTreeGridStateBackgroundColor"), rt = /* @__PURE__ */ c((e) => {
151
200
  if (!e)
152
201
  return !1;
153
202
  if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
154
203
  let t = e.GetFirst();
155
204
  for (; t; ) {
156
- if (E(t))
205
+ if (p(t))
157
206
  return !0;
158
207
  t = e.GetNext(t);
159
208
  }
160
209
  return !1;
161
210
  }
162
- return Object.values(e.Rows ?? {}).some((t) => E(t));
163
- }, "hasTreeGridDisplayDataRows"), ze = /* @__PURE__ */ f((e, t, n) => {
164
- var c;
165
- const o = (c = e.Data) == null ? void 0 : c.Data;
211
+ return Object.values(e.Rows ?? {}).some((t) => p(t));
212
+ }, "hasTreeGridDisplayDataRows"), ot = /* @__PURE__ */ c((e, t, n) => {
213
+ var s;
214
+ const r = (s = e.Data) == null ? void 0 : s.Data;
166
215
  e.Data.Data = {
167
- ...o,
216
+ ...r,
168
217
  Data: { Body: [t || []] },
169
218
  Url: ""
170
219
  }, e.ReloadBody(n);
171
- }, "replaceTreeGridBodyData"), qe = /* @__PURE__ */ f(({
220
+ }, "replaceTreeGridBodyData"), it = /* @__PURE__ */ c(({
172
221
  id: e,
173
222
  latestEventHandlersRef: t,
174
223
  highlightEditableCellsRef: n,
175
- highlightChangedCellsRef: o,
176
- syncDeletedRowCanEditRef: c,
177
- editableCellBackgroundColorValueRef: d,
224
+ highlightChangedCellsRef: r,
225
+ syncDeletedRowCanEditRef: s,
226
+ editableCellBackgroundColorValueRef: a,
178
227
  changedCellBackgroundColorRef: G,
179
- selectedCellBackgroundColorRef: R,
180
- hoverCellBackgroundColorRef: p,
228
+ selectedCellBackgroundColorRef: E,
229
+ hoverCellBackgroundColorRef: l,
181
230
  treeGridInstanceRef: C,
182
231
  treeGridInitStartedAtRef: v,
183
- latestLayoutOverridesRef: q,
184
- appliedLayoutOverridesRef: Y,
185
- appliedBodyDataPropRef: K,
186
- latestColumnEditRulesRef: Q,
187
- latestColumnEditRuleLookupRef: w,
188
- appliedColumnEditRulesRef: J,
232
+ latestLayoutOverridesRef: J,
233
+ appliedLayoutOverridesRef: Z,
234
+ appliedBodyDataPropRef: ee,
235
+ latestColumnEditRulesRef: te,
236
+ latestColumnEditRuleLookupRef: A,
237
+ appliedColumnEditRulesRef: ne,
189
238
  columnEditRulesStateRef: B,
190
239
  hasAppliedInitialLayoutRef: O,
191
- syncHasDisplayDataRows: S,
192
- setIsTreeGridReady: X
240
+ syncHasDisplayDataRows: _,
241
+ setIsTreeGridReady: re
193
242
  }) => {
194
243
  const h = t.current;
195
- window.TGSetEvent("OnRowAdd", e, (r, i) => {
196
- var u, s;
197
- i.CanEdit = 1, i.CanDelete = 1, (s = (u = t.current) == null ? void 0 : u.onRowAdd) == null || s.call(u, r, i);
198
- }), window.TGSetEvent("OnRowAdded", e, (r) => {
199
- S(r);
200
- }), window.TGSetEvent("OnRowRemove", e, (r) => {
201
- S(r);
202
- }), window.TGSetEvent("OnCanRowDelete", e, (r, i, u) => {
203
- var l;
244
+ window.TGSetEvent("OnRowAdd", e, (o, i) => {
245
+ var u, f;
246
+ i.CanEdit = 1, i.CanDelete = 1, (f = (u = t.current) == null ? void 0 : u.onRowAdd) == null || f.call(u, o, i);
247
+ }), window.TGSetEvent("OnRowAdded", e, (o) => {
248
+ _(o);
249
+ }), window.TGSetEvent("OnRowRemove", e, (o) => {
250
+ _(o);
251
+ }), window.TGSetEvent("OnCanRowDelete", e, (o, i, u) => {
252
+ var T;
204
253
  if (u !== 3)
205
254
  return u;
206
- const s = (l = t.current) == null ? void 0 : l.onBeforeRowUndelete;
207
- if (typeof s != "function")
255
+ const f = (T = t.current) == null ? void 0 : T.onBeforeRowUndelete;
256
+ if (typeof f != "function")
208
257
  return u;
209
- const a = /* @__PURE__ */ f((T) => {
258
+ const d = /* @__PURE__ */ c((R) => {
210
259
  window.setTimeout(() => {
211
- Ee(
212
- C.current ?? r,
260
+ Oe(
261
+ C.current ?? o,
213
262
  i,
214
- T,
215
- S
263
+ R,
264
+ _
216
265
  );
217
266
  }, 0);
218
267
  }, "scheduleAction");
219
268
  try {
220
- const T = s(r, i);
221
- return Ce(T) ? (T.then(a).catch(() => {
222
- a("undelete");
223
- }), 0) : (a(T), 0);
269
+ const R = f(o, i);
270
+ return Be(R) ? (R.then(d).catch(() => {
271
+ d("undelete");
272
+ }), 0) : (d(R), 0);
224
273
  } catch {
225
- return a("undelete"), 0;
274
+ return d("undelete"), 0;
226
275
  }
227
276
  }), typeof (h == null ? void 0 : h.onRowClick) == "function" && window.TGSetEvent(
228
277
  "OnClick",
229
278
  e,
230
- _((r, i, u, s, a, l) => {
231
- var T, y;
232
- (y = (T = t.current) == null ? void 0 : T.onRowClick) == null || y.call(
233
- T,
234
- r,
279
+ y((o, i, u, f, d, T) => {
280
+ var R, m;
281
+ (m = (R = t.current) == null ? void 0 : R.onRowClick) == null || m.call(
282
+ R,
283
+ o,
235
284
  i,
236
285
  u,
237
- s,
238
- a,
239
- l
286
+ f,
287
+ d,
288
+ T
240
289
  );
241
290
  }, 300)
242
291
  ), typeof (h == null ? void 0 : h.onClickButton) == "function" && window.TGSetEvent(
243
292
  "OnClickButton",
244
293
  e,
245
- _((r, i, u, s) => {
246
- var a, l;
247
- (l = (a = t.current) == null ? void 0 : a.onClickButton) == null || l.call(
248
- a,
249
- r,
294
+ y((o, i, u, f) => {
295
+ var d, T;
296
+ (T = (d = t.current) == null ? void 0 : d.onClickButton) == null || T.call(
297
+ d,
298
+ o,
250
299
  i,
251
300
  u,
252
- s
301
+ f
253
302
  );
254
303
  }, 300)
255
- ), window.TGSetEvent("OnRowDelete", e, (r, i, u) => {
256
- var a, l;
257
- const s = D(i) ? L(i) : [];
258
- k(r, i, {
259
- canEdit: c.current !== !1 ? 2 : void 0,
260
- highlightColumns: s
261
- }), S(r), (l = (a = t.current) == null ? void 0 : a.onRowDelete) == null || l.call(
262
- a,
263
- r,
304
+ ), window.TGSetEvent("OnRowDelete", e, (o, i, u) => {
305
+ var d, T;
306
+ const f = b(i) ? x(i) : [];
307
+ N(o, i, {
308
+ canEdit: s.current !== !1 ? 2 : void 0,
309
+ highlightColumns: f
310
+ }), _(o), (T = (d = t.current) == null ? void 0 : d.onRowDelete) == null || T.call(
311
+ d,
312
+ o,
264
313
  i,
265
314
  u
266
315
  );
267
- }), window.TGSetEvent("OnRowUndelete", e, (r, i) => {
268
- var s, a;
269
- const u = D(i) ? L(i) : [];
270
- k(r, i, {
271
- canEdit: c.current !== !1 ? 1 : void 0,
316
+ }), window.TGSetEvent("OnRowUndelete", e, (o, i) => {
317
+ var f, d;
318
+ const u = b(i) ? x(i) : [];
319
+ N(o, i, {
320
+ canEdit: s.current !== !1 ? 1 : void 0,
272
321
  highlightColumns: u,
273
322
  highlightBackgroundColor: u.length ? G.current : void 0
274
- }), S(r), (a = (s = t.current) == null ? void 0 : s.onRowUndelete) == null || a.call(s, r, i);
275
- }), window.TGSetEvent("OnGetDefaultColor", e, (r, i, u) => {
276
- if (!(!n.current || !E(i)))
277
- return Ae(
278
- r,
323
+ }), _(o), (d = (f = t.current) == null ? void 0 : f.onRowUndelete) == null || d.call(f, o, i);
324
+ }), window.TGSetEvent("OnGetCellStyle", e, (o, i, u, f, d) => {
325
+ if (f === "TextColor")
326
+ return $e(o, i, u, d);
327
+ }), window.TGSetEvent("OnGetDefaultColor", e, (o, i, u) => {
328
+ if (!(!n.current || !p(i)))
329
+ return Ne(
330
+ o,
279
331
  i,
280
332
  u,
281
- d.current
333
+ a.current
282
334
  );
283
- }), window.TGSetEvent("OnGetColor", e, (r, i, u, s, a, l, T) => {
284
- if (!T)
285
- return Oe({
286
- grid: r,
335
+ }), window.TGSetEvent("OnGetColor", e, (o, i, u, f, d, T, R) => {
336
+ if (!R)
337
+ return We({
338
+ grid: o,
287
339
  row: i,
288
340
  col: u,
289
- r: s,
290
- g: a,
291
- b: l,
292
- selectedCellBackgroundColor: R.current,
293
- hoverCellBackgroundColor: p.current
341
+ r: f,
342
+ g: d,
343
+ b: T,
344
+ selectedCellBackgroundColor: E.current,
345
+ hoverCellBackgroundColor: l.current
294
346
  });
295
- }), window.TGSetEvent("OnAfterValueChanged", e, (r, i, u, s) => {
296
- var U, I;
297
- const a = w.current, l = a ? oe(a, u, s) : void 0, T = l == null ? void 0 : l.value, y = T ?? s;
298
- l != null && l.invalidText && ne(l.invalidText, { variant: "warning" }), T !== void 0 && r.SetValue(i, u, T, 1), o.current && E(i) && (ee(e, {
347
+ }), window.TGSetEvent("OnAfterValueChanged", e, (o, i, u, f) => {
348
+ var U, w;
349
+ const d = A.current, T = d ? Ge(d, u, f) : void 0, R = T == null ? void 0 : T.value, m = R ?? f;
350
+ T != null && T.invalidText && de(T.invalidText, { variant: "warning" }), R !== void 0 && o.SetValue(i, u, R, 1), r.current && p(i) && (se(e, {
299
351
  row: i,
300
352
  col: u,
301
353
  backgroundColor: G.current
302
- }), D(i) && te(i, u));
303
- const b = ((U = t.current) == null ? void 0 : U.onAfterValueChanged) ?? ((I = t.current) == null ? void 0 : I.onRowChange);
304
- b == null || b(r, i, u, y);
354
+ }), b(i) && fe(i, u));
355
+ const D = ((U = t.current) == null ? void 0 : U.onAfterValueChanged) ?? ((w = t.current) == null ? void 0 : w.onRowChange);
356
+ D == null || D(o, i, u, m);
305
357
  }), typeof (h == null ? void 0 : h.onSelect) == "function" && window.TGSetEvent(
306
358
  "OnSelect",
307
359
  e,
308
- _((r) => {
309
- var u, s;
310
- const i = r.GetSelRows() ?? [];
311
- (s = (u = t.current) == null ? void 0 : u.onSelect) == null || s.call(u, i);
360
+ y((o) => {
361
+ var u, f;
362
+ const i = o.GetSelRows() ?? [];
363
+ (f = (u = t.current) == null ? void 0 : u.onSelect) == null || f.call(u, i);
312
364
  }, 100)
313
- ), typeof (h == null ? void 0 : h.onSave) == "function" && window.TGSetEvent("OnSave", e, (r, i, u) => {
314
- var s, a;
315
- (a = (s = t.current) == null ? void 0 : s.onSave) == null || a.call(
316
- s,
317
- r,
365
+ ), typeof (h == null ? void 0 : h.onSave) == "function" && window.TGSetEvent("OnSave", e, (o, i, u) => {
366
+ var f, d;
367
+ (d = (f = t.current) == null ? void 0 : f.onSave) == null || d.call(
368
+ f,
369
+ o,
318
370
  i,
319
371
  u
320
372
  );
321
- }), window.TGSetEvent("OnSort", e, (r, i) => {
373
+ }), window.TGSetEvent("OnSort", e, (o, i) => {
322
374
  var u;
323
- if (!(!i || !z(r, r.ARow, i)))
324
- return W(e, "group header sort blocked"), ce(e, "group header sort blocked", {
325
- rowId: (u = r.ARow) == null ? void 0 : u.id,
375
+ if (!(!i || !Y(o, o.ARow, i)))
376
+ return j(e, "group header sort blocked"), Re(e, "group header sort blocked", {
377
+ rowId: (u = o.ARow) == null ? void 0 : u.id,
326
378
  col: i
327
379
  }), -1;
328
- }), window.TGSetEvent("OnRenderStart", e, (r) => {
329
- P(r, e, !1);
380
+ }), window.TGSetEvent("OnRenderStart", e, (o) => {
381
+ P(o, e, !1);
330
382
  }), window.TGSetEvent(
331
383
  "OnReady",
332
384
  e,
333
- _((r) => {
385
+ y((o) => {
334
386
  var i, u;
335
387
  if (!O.current) {
336
- const s = q.current;
337
- O.current = !0, re(r, s), ie(B.current), ue(
338
- r,
339
- w.current,
388
+ const f = J.current;
389
+ O.current = !0, ae(o, f), Te(B.current), le(
390
+ o,
391
+ A.current,
340
392
  B.current
341
- ), C.current = r, Y.current = s, K.current = N(r), J.current = Q.current, S(r), X(!0), P(r, e, !0), M(e, "TreeGrid init ready", v.current, {
342
- bodyRowCount: me(
343
- N(r)
393
+ ), C.current = o, Z.current = f, ee.current = H(o), ne.current = te.current, _(o), re(!0), P(o, e, !0), z(e, "TreeGrid init ready", v.current, {
394
+ bodyRowCount: we(
395
+ H(o)
344
396
  )
345
- }), v.current = null, (u = (i = t.current) == null ? void 0 : i.onReady) == null || u.call(i, r);
397
+ }), v.current = null, (u = (i = t.current) == null ? void 0 : i.onReady) == null || u.call(i, o);
346
398
  }
347
399
  }, 100)
348
400
  );
349
401
  }, "bindTreeGridEvents");
350
402
  export {
351
- We as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
352
- qe as bindTreeGridEvents,
353
- Me as buildTreeGridInitializationOptions,
354
- me as getTreeGridBodyDataCount,
355
- je as hasTreeGridDisplayDataRows,
356
- ze as replaceTreeGridBodyData
403
+ tt as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
404
+ it as bindTreeGridEvents,
405
+ nt as buildTreeGridInitializationOptions,
406
+ we as getTreeGridBodyDataCount,
407
+ rt as hasTreeGridDisplayDataRows,
408
+ ot as replaceTreeGridBodyData
357
409
  };
358
410
  //# sourceMappingURL=treeGridRuntime.js.map