@owp/core 2.5.52 → 2.5.54

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 (72) hide show
  1. package/dist/components/OwpErrorBoundary/OwpErrorBoundary.js +49 -32
  2. package/dist/components/OwpErrorBoundary/OwpErrorBoundary.js.map +1 -1
  3. package/dist/components/OwpPageSkeleton/OwpPageSkeleton.js +4 -4
  4. package/dist/components/OwpPicker/OwpTimePicker.js +223 -212
  5. package/dist/components/OwpPicker/OwpTimePicker.js.map +1 -1
  6. package/dist/components/OwpPicker/internal/DatePickerInput.js +56 -55
  7. package/dist/components/OwpPicker/internal/DatePickerInput.js.map +1 -1
  8. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +228 -227
  9. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  10. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js +189 -187
  11. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js.map +1 -1
  12. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +1152 -1027
  13. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  14. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +549 -427
  15. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  16. package/dist/configs/theme.js +26 -22
  17. package/dist/configs/theme.js.map +1 -1
  18. package/dist/constants/gridTheme.js +53 -41
  19. package/dist/constants/gridTheme.js.map +1 -1
  20. package/dist/constants/treeGrid.js +69 -49
  21. package/dist/constants/treeGrid.js.map +1 -1
  22. package/dist/constants.js +53 -33
  23. package/dist/contexts/OwpUiProvider.js +37 -34
  24. package/dist/contexts/OwpUiProvider.js.map +1 -1
  25. package/dist/features/themePreview/components/ThemePreviewCanvas.js +8 -8
  26. package/dist/features/themePreview/components/ThemePreviewCanvasSections.js +27 -27
  27. package/dist/features/themePreview/components/ThemePreviewColorField.js +4 -4
  28. package/dist/features/themePreview/components/ThemePreviewControls.js +8 -8
  29. package/dist/features/themePreview/configs/grid.js +26 -26
  30. package/dist/features/themePreview/configs/grid.js.map +1 -1
  31. package/dist/features/themePreview/configs/previewStorage.js +26 -32
  32. package/dist/features/themePreview/configs/previewStorage.js.map +1 -1
  33. package/dist/features/themePreview/configs/settings.js +13 -12
  34. package/dist/features/themePreview/configs/settings.js.map +1 -1
  35. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +5 -5
  36. package/dist/features/themePreview/dialogs/index.js +5 -0
  37. package/dist/features/themePreview/dialogs/index.js.map +1 -0
  38. package/dist/features/themePreview/utils/themePreviewDefinitions.js +8 -12
  39. package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -1
  40. package/dist/features/themePreview/utils/themePreviewExport.js +48 -37
  41. package/dist/features/themePreview/utils/themePreviewExport.js.map +1 -1
  42. package/dist/index.js +67 -66
  43. package/dist/layout/components/toggles/ThemePreviewToggle.js +26 -27
  44. package/dist/layout/components/toggles/ThemePreviewToggle.js.map +1 -1
  45. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  46. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
  47. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  48. package/dist/owp-app.css +1 -1
  49. package/dist/types/components/OwpErrorBoundary/OwpErrorBoundary.d.ts +4 -0
  50. package/dist/types/components/OwpErrorBoundary/index.d.ts +1 -1
  51. package/dist/types/components/OwpNumberField/OwpNumberField.d.ts +1 -1
  52. package/dist/types/components/OwpTabs/OwpTabs.d.ts +1 -1
  53. package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +7 -1
  54. package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +3 -1
  55. package/dist/types/configs/theme/index.d.ts +2 -0
  56. package/dist/types/constants/gridTheme.d.ts +6 -0
  57. package/dist/types/constants/treeGrid.d.ts +40 -0
  58. package/dist/types/contexts/OwpAppContext.d.ts +1 -1
  59. package/dist/types/features/themePreview/configs/grid.d.ts +3 -4
  60. package/dist/types/features/themePreview/configs/settings.d.ts +15 -4
  61. package/dist/types/features/themePreview/utils/themePreviewExport.d.ts +1 -1
  62. package/dist/types/index.d.ts +1 -1
  63. package/dist/types/types/OwpGridThemeTypes.d.ts +6 -0
  64. package/dist/types/types/OwpSettingsTypes.d.ts +7 -0
  65. package/dist/types/types/index.d.ts +1 -1
  66. package/dist/utils/treeGridUtil.js +123 -118
  67. package/dist/utils/treeGridUtil.js.map +1 -1
  68. package/package.json +1 -2
  69. package/dist/features/themePreview.js +0 -76
  70. package/dist/features/themePreview.js.map +0 -1
  71. package/features/themePreview.d.ts +0 -3
  72. package/features/themePreview.js +0 -1
@@ -1,7 +1,7 @@
1
1
  var Y = Object.defineProperty;
2
2
  var l = (e, t) => Y(e, "name", { value: t, configurable: !0 });
3
3
  import { TREEGRID_CELL_CHANGED_CLASS as M, TREEGRID_CELL_HIGHLIGHT_COLOR as X } from "../constants/treeGrid.js";
4
- import { TREEGRID_INPUT_CELL_COLOR as Vt, TREEGRID_WARNING_CELL_COLOR as Bt } from "../constants/treeGrid.js";
4
+ import { TREEGRID_INPUT_CELL_COLOR as Bt, TREEGRID_WARNING_CELL_COLOR as Lt } from "../constants/treeGrid.js";
5
5
  import { parseTreeGridXmlToJson as Q } from "../components/OwpTreeGrid/internal/treeGridLayout.js";
6
6
  import { resolveTreeGridSelectedRows as J } from "../components/OwpTreeGrid/internal/treeGridSelection.js";
7
7
  import { emitTreeGridBodyRowsChanged as D } from "./internal/treeGridBodyRowsEvent.js";
@@ -15,52 +15,57 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
15
15
  label: e
16
16
  }) => `${e} 필수 입력`, "DEFAULT_TREE_GRID_REQUIRED_CELL_MESSAGE_FACTORY"), ae = [
17
17
  "added"
18
- ], y = /* @__PURE__ */ l((e) => A(e) ? e.filter((t) => typeof t == "string" && t !== "") : [], "normalizeTreeGridStringValues"), S = y, ie = y, ce = /* @__PURE__ */ l((e) => {
18
+ ], y = /* @__PURE__ */ l((e) => A(e) ? e.filter((t) => typeof t == "string" && t !== "") : [], "normalizeTreeGridStringValues"), S = y, ie = y, ce = /* @__PURE__ */ l((e, t, r) => {
19
+ try {
20
+ e.AnimateRow(t, r);
21
+ } catch {
22
+ }
23
+ }, "animateTreeGridRow"), de = /* @__PURE__ */ l((e) => {
19
24
  e && (e[$] = 1);
20
- }, "markTreeGridRowAddedById"), de = /* @__PURE__ */ l((e) => {
25
+ }, "markTreeGridRowAddedById"), oe = /* @__PURE__ */ l((e) => {
21
26
  const t = e == null ? void 0 : e[$];
22
27
  return !!e && t !== 0 && t !== !1 && t !== void 0;
23
28
  }, "isTreeGridRowAddedById"), m = /* @__PURE__ */ l((e) => {
24
29
  const t = e == null ? void 0 : e.Added;
25
- return t === 1 || t === "1" || t === !0 || de(e);
26
- }, "isTreeGridAddedRow"), oe = /* @__PURE__ */ l((e) => {
30
+ return t === 1 || t === "1" || t === !0 || oe(e);
31
+ }, "isTreeGridAddedRow"), ue = /* @__PURE__ */ l((e) => {
27
32
  const t = e == null ? void 0 : e.Changed;
28
33
  return !m(e) && (t === 1 || t === "1" || t === !0);
29
- }, "isTreeGridChangedRow"), O = /* @__PURE__ */ l((e) => {
34
+ }, "isTreeGridChangedRow"), w = /* @__PURE__ */ l((e) => {
30
35
  const t = e == null ? void 0 : e.Deleted;
31
36
  return t === 1 || t === "1" || t === !0;
32
- }, "isTreeGridDeletedRow"), ue = /* @__PURE__ */ l((e) => {
37
+ }, "isTreeGridDeletedRow"), Re = /* @__PURE__ */ l((e) => {
33
38
  const t = A(e) ? e : e ? [e] : ae;
34
39
  return t.includes("all") ? /* @__PURE__ */ new Set(["all"]) : new Set(
35
40
  t.filter(
36
41
  (r) => r === "added" || r === "changed"
37
42
  )
38
43
  );
39
- }, "normalizeTreeGridRequiredCellTargetRows"), fe = /* @__PURE__ */ l((e, t) => O(e) ? !1 : t.has("all") ? e.Kind === "Data" || m(e) : t.has("added") && m(e) || t.has("changed") && oe(e), "shouldValidateTreeGridRequiredCellRow"), Re = /* @__PURE__ */ l((e) => !!e && !O(e) && (e.Kind === "Data" || m(e)), "shouldValidateExplicitTreeGridRequiredCellRow"), Te = /* @__PURE__ */ l((e, t) => {
44
+ }, "normalizeTreeGridRequiredCellTargetRows"), fe = /* @__PURE__ */ l((e, t) => w(e) ? !1 : t.has("all") ? e.Kind === "Data" || m(e) : t.has("added") && m(e) || t.has("changed") && ue(e), "shouldValidateTreeGridRequiredCellRow"), Te = /* @__PURE__ */ l((e) => !!e && !w(e) && (e.Kind === "Data" || m(e)), "shouldValidateExplicitTreeGridRequiredCellRow"), Ee = /* @__PURE__ */ l((e, t) => {
40
45
  var r;
41
46
  if (t)
42
47
  return typeof t.id != "string" ? t : ((r = e.Rows) == null ? void 0 : r[t.id]) ?? t;
43
- }, "resolveLiveTreeGridRequiredCellRow"), Ee = /* @__PURE__ */ l((e, t) => {
48
+ }, "resolveLiveTreeGridRequiredCellRow"), Ge = /* @__PURE__ */ l((e, t) => {
44
49
  const r = /* @__PURE__ */ new Set(), n = [];
45
50
  return t.forEach((s) => {
46
- const a = Te(e, s);
47
- !Re(a) || r.has(a) || (r.add(a), n.push(a));
51
+ const a = Ee(e, s);
52
+ !Te(a) || r.has(a) || (r.add(a), n.push(a));
48
53
  }), n;
49
- }, "normalizeExplicitTreeGridRequiredCellRows"), Ge = /* @__PURE__ */ l((e, t) => {
54
+ }, "normalizeExplicitTreeGridRequiredCellRows"), Ce = /* @__PURE__ */ l((e, t) => {
50
55
  if (t.rows !== void 0)
51
- return Ee(e, t.rows);
52
- const r = ue(t.targetRows);
56
+ return Ge(e, t.rows);
57
+ const r = Re(t.targetRows);
53
58
  return Object.values(e.Rows ?? {}).filter(
54
59
  (n) => fe(n, r)
55
60
  );
56
- }, "getTreeGridRequiredCellRows"), lt = /* @__PURE__ */ l((e, t) => {
61
+ }, "getTreeGridRequiredCellRows"), at = /* @__PURE__ */ l((e, t) => {
57
62
  if (!e || !t)
58
63
  return;
59
64
  const r = e, n = S(
60
65
  r[G]
61
66
  );
62
67
  n.includes(t) || (r[G] = [...n, t]);
63
- }, "appendTreeGridAddedRowHighlightColumn"), at = /* @__PURE__ */ l((e, t) => {
68
+ }, "appendTreeGridAddedRowHighlightColumn"), it = /* @__PURE__ */ l((e, t) => {
64
69
  if (!e || !t)
65
70
  return;
66
71
  const r = e, s = S(
@@ -71,47 +76,47 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
71
76
  return;
72
77
  }
73
78
  delete r[G];
74
- }, "removeTreeGridAddedRowHighlightColumn"), it = /* @__PURE__ */ l((e) => S(
79
+ }, "removeTreeGridAddedRowHighlightColumn"), ct = /* @__PURE__ */ l((e) => S(
75
80
  e == null ? void 0 : e[G]
76
- ), "getTreeGridAddedRowHighlightColumns"), ct = /* @__PURE__ */ l((e) => ie(
81
+ ), "getTreeGridAddedRowHighlightColumns"), dt = /* @__PURE__ */ l((e) => ie(
77
82
  e == null ? void 0 : e[F]
78
- ), "getTreeGridAddedRowEditableColumns"), w = /* @__PURE__ */ l((e, t, r) => {
83
+ ), "getTreeGridAddedRowEditableColumns"), O = /* @__PURE__ */ l((e, t, r) => {
79
84
  var a, i, c, d, o;
80
85
  const n = ((a = e.GetType) == null ? void 0 : a.call(e, t, r)) || ((c = (i = e.Cols) == null ? void 0 : i[r]) == null ? void 0 : c.Type) || "", s = ((d = e.GetValue) == null ? void 0 : d.call(e, t, r)) ?? t[r];
81
86
  if (n === "Enum" || n === "Select")
82
87
  return s == null ? "" : `${s}`;
83
88
  try {
84
- const R = (o = e.GetString) == null ? void 0 : o.call(e, t, r);
85
- if (R != null)
86
- return `${R}`;
89
+ const f = (o = e.GetString) == null ? void 0 : o.call(e, t, r);
90
+ if (f != null)
91
+ return `${f}`;
87
92
  } catch {
88
93
  }
89
94
  return s == null ? "" : `${s}`;
90
- }, "getTreeGridCellComparableValue"), Ce = /* @__PURE__ */ l((e, t) => {
95
+ }, "getTreeGridCellComparableValue"), me = /* @__PURE__ */ l((e, t) => {
91
96
  const r = Object.fromEntries(
92
97
  Object.keys(e.Cols ?? {}).map((n) => [
93
98
  n,
94
- w(e, t, n)
99
+ O(e, t, n)
95
100
  ])
96
101
  );
97
102
  t[j] = r;
98
- }, "markTreeGridAddedRowBaselineValues"), dt = /* @__PURE__ */ l((e, t) => {
103
+ }, "markTreeGridAddedRowBaselineValues"), ot = /* @__PURE__ */ l((e, t) => {
99
104
  var r;
100
105
  return (r = e == null ? void 0 : e[j]) == null ? void 0 : r[t];
101
- }, "getTreeGridAddedRowBaselineValue"), me = /* @__PURE__ */ l((e, t, r) => {
106
+ }, "getTreeGridAddedRowBaselineValue"), he = /* @__PURE__ */ l((e, t, r) => {
102
107
  var s;
103
108
  const n = t;
104
109
  n[E] ?? (n[E] = {}), !((s = n[E]) != null && s[r]) && (n[E][r] = {
105
110
  className: e.GetAttribute(t, r, "Class"),
106
111
  color: e.GetAttribute(t, r, "Color")
107
112
  });
108
- }, "preserveTreeGridCellStyleBaseline"), he = /* @__PURE__ */ l((e, t) => {
113
+ }, "preserveTreeGridCellStyleBaseline"), ye = /* @__PURE__ */ l((e, t) => {
109
114
  var r;
110
115
  return (r = e[E]) == null ? void 0 : r[t];
111
- }, "getTreeGridCellStyleBaseline"), ye = /* @__PURE__ */ l(async () => {
116
+ }, "getTreeGridCellStyleBaseline"), _e = /* @__PURE__ */ l(async () => {
112
117
  const { exportTreeGridExcel: e } = await import("./treeGridExportExcelUtil.js");
113
118
  return e;
114
- }, "loadExportTreeGridExcel"), _e = /* @__PURE__ */ l((e) => Object.values((e == null ? void 0 : e.Rows) ?? {}).filter((t) => t.Kind === "Data"), "getDataRows"), De = /* @__PURE__ */ l((e) => e != null && e.length ? e.map((t) => {
119
+ }, "loadExportTreeGridExcel"), De = /* @__PURE__ */ l((e) => Object.values((e == null ? void 0 : e.Rows) ?? {}).filter((t) => t.Kind === "Data"), "getDataRows"), Ae = /* @__PURE__ */ l((e) => e != null && e.length ? e.map((t) => {
115
120
  if (typeof t == "string") {
116
121
  const n = t.trim();
117
122
  return n ? { key: n } : null;
@@ -128,13 +133,13 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
128
133
  var s;
129
134
  const n = (s = e.CanEdit) == null ? void 0 : s.call(e, t, r);
130
135
  return n === 1 || n === "1" || n === !0;
131
- }, "isTreeGridEditableCell"), Ae = /* @__PURE__ */ l((e, t, r) => {
132
- const n = De(r.columns);
136
+ }, "isTreeGridEditableCell"), Ie = /* @__PURE__ */ l((e, t, r) => {
137
+ const n = Ae(r.columns);
133
138
  return n.length ? n.filter((s) => {
134
139
  var a;
135
140
  return !!((a = e.Cols) != null && a[s.key]);
136
141
  }) : r.editableOnly ? Object.keys(e.Cols ?? {}).filter((s) => b(e, s) && x(e, t, s)).map((s) => ({ key: s })) : [];
137
- }, "getTreeGridRequiredCellColumns"), Ie = /* @__PURE__ */ l((e, t) => {
142
+ }, "getTreeGridRequiredCellColumns"), Se = /* @__PURE__ */ l((e, t) => {
138
143
  var n, s, a;
139
144
  if (t.label)
140
145
  return t.label;
@@ -146,7 +151,7 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
146
151
  }
147
152
  const r = (a = (s = e.Cols) == null ? void 0 : s[t.key]) == null ? void 0 : a.Caption;
148
153
  return r ? `${r}`.trim() : t.key;
149
- }, "getTreeGridRequiredCellLabel"), Se = /* @__PURE__ */ l((e, t, r) => t.message ? t.message : (r ?? le)(e), "getTreeGridRequiredCellMessage"), be = /* @__PURE__ */ l((e) => e.trim() === "", "isBlankTreeGridRequiredCellValue"), Ve = /* @__PURE__ */ l((e, t, r) => {
154
+ }, "getTreeGridRequiredCellLabel"), be = /* @__PURE__ */ l((e, t, r) => t.message ? t.message : (r ?? le)(e), "getTreeGridRequiredCellMessage"), Ve = /* @__PURE__ */ l((e) => e.trim() === "", "isBlankTreeGridRequiredCellValue"), Be = /* @__PURE__ */ l((e, t, r) => {
150
155
  !t || r.focusFirstError === !1 || (e.Focus(t.row, t.col), r.startEditFirstError === !0 && x(e, t.row, t.col) && e.StartEdit(t.row, t.col));
151
156
  }, "focusFirstTreeGridRequiredCellError"), C = /* @__PURE__ */ l((e) => typeof e == "string" && se.test(e.trim()), "isTreeGridTimeDateFormat"), q = /* @__PURE__ */ l((e, t, r) => {
152
157
  var a;
@@ -162,14 +167,14 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
162
167
  } catch {
163
168
  }
164
169
  return n == null ? "" : `${n}`;
165
- }, "getTreeGridTimeDateDisplayValue"), Be = /* @__PURE__ */ l((e, t) => {
170
+ }, "getTreeGridTimeDateDisplayValue"), Le = /* @__PURE__ */ l((e, t) => {
166
171
  const r = { ...t };
167
172
  return Object.keys(e.Cols ?? {}).forEach((n) => {
168
173
  q(e, t, n) && (r[n] = z(e, t, n));
169
174
  }), r;
170
- }, "normalizeTreeGridExternalRow"), H = /* @__PURE__ */ l((e, t) => t.map((r) => Be(e, r)), "normalizeTreeGridExternalRows"), U = /* @__PURE__ */ l((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitEnabledConfigValue"), Le = /* @__PURE__ */ l((e) => U(e.SelectingSingle), "isTreeGridSingleSelectionLayout"), ve = /* @__PURE__ */ l((e) => h(e) ? U(
175
+ }, "normalizeTreeGridExternalRow"), H = /* @__PURE__ */ l((e, t) => t.map((r) => Le(e, r)), "normalizeTreeGridExternalRows"), U = /* @__PURE__ */ l((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitEnabledConfigValue"), ve = /* @__PURE__ */ l((e) => U(e.SelectingSingle), "isTreeGridSingleSelectionLayout"), $e = /* @__PURE__ */ l((e) => h(e) ? U(
171
176
  e[_]
172
- ) : !1, "isTreeGridSelectedInitialValue"), $e = /* @__PURE__ */ l((e) => {
177
+ ) : !1, "isTreeGridSelectedInitialValue"), Fe = /* @__PURE__ */ l((e) => {
173
178
  if (!h(e))
174
179
  return e;
175
180
  const t = e;
@@ -178,7 +183,7 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
178
183
  ([r]) => r !== _
179
184
  )
180
185
  ) : e;
181
- }, "omitTreeGridSelectedInitialValue"), Fe = /* @__PURE__ */ l((e, t) => {
186
+ }, "omitTreeGridSelectedInitialValue"), Ke = /* @__PURE__ */ l((e, t) => {
182
187
  const r = (t == null ? void 0 : t.insertPosition) ?? "top", n = t == null ? void 0 : t.parent, s = t == null ? void 0 : t.anchorRow;
183
188
  let a = n ?? (s ? s.parentNode : null) ?? e.GetFirst(), i = null;
184
189
  switch (r) {
@@ -196,14 +201,14 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
196
201
  break;
197
202
  }
198
203
  return { resolvedParent: a, next: i };
199
- }, "resolveRowInsertionTarget"), Ke = /* @__PURE__ */ l((e, t) => {
204
+ }, "resolveRowInsertionTarget"), je = /* @__PURE__ */ l((e, t) => {
200
205
  if (!t.length)
201
206
  return;
202
207
  const r = e;
203
208
  t.forEach((n) => {
204
209
  r[`${n}Changed`] = 0;
205
210
  });
206
- }, "clearInitialDateValueChangedStates"), je = /* @__PURE__ */ l((e, t, r) => {
211
+ }, "clearInitialDateValueChangedStates"), we = /* @__PURE__ */ l((e, t, r) => {
207
212
  if (!h(r))
208
213
  return;
209
214
  const n = r, s = Object.keys(n).filter(Boolean), a = t;
@@ -212,13 +217,13 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
212
217
  );
213
218
  const i = [];
214
219
  Object.entries(n).forEach(([c, d]) => {
215
- var o, R;
216
- if (((R = (o = e.Cols) == null ? void 0 : o[c]) == null ? void 0 : R.Type) === "Date" && typeof d == "string") {
220
+ var o, f;
221
+ if (((f = (o = e.Cols) == null ? void 0 : o[c]) == null ? void 0 : f.Type) === "Date" && typeof d == "string") {
217
222
  e.SetString(t, c, d, 0), i.push(c);
218
223
  return;
219
224
  }
220
225
  t[c] = d;
221
- }), Ke(t, i);
226
+ }), je(t, i);
222
227
  }, "assignInitialRowValues"), Oe = /* @__PURE__ */ l((e, t, r) => {
223
228
  const n = y(r);
224
229
  if (!n.length)
@@ -228,30 +233,30 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
228
233
  var c;
229
234
  (c = e.Cols) != null && c[i] && (s[`${i}CanEdit`] = 1, a.push(i));
230
235
  }), a.length && (t[F] = a);
231
- }, "assignEditableAddedRowColumns"), we = /* @__PURE__ */ l((e) => ne.some((t) => e.startsWith(t)), "isTreeGridDataKey"), k = /* @__PURE__ */ l((e, t) => {
236
+ }, "assignEditableAddedRowColumns"), xe = /* @__PURE__ */ l((e) => ne.some((t) => e.startsWith(t)), "isTreeGridDataKey"), k = /* @__PURE__ */ l((e, t) => {
232
237
  var r;
233
238
  return !!((r = e == null ? void 0 : e.Cols) != null && r[t]);
234
- }, "isTreeGridColumnDataKey"), xe = /* @__PURE__ */ l((e) => e != null && e !== "", "hasTreeGridUploadValue"), qe = /* @__PURE__ */ l((e) => e === 0 || e === !1 || e === "0", "isHiddenTreeGridValue"), b = /* @__PURE__ */ l((e, t) => {
239
+ }, "isTreeGridColumnDataKey"), qe = /* @__PURE__ */ l((e) => e != null && e !== "", "hasTreeGridUploadValue"), ze = /* @__PURE__ */ l((e) => e === 0 || e === !1 || e === "0", "isHiddenTreeGridValue"), b = /* @__PURE__ */ l((e, t) => {
235
240
  var r, n;
236
- return !qe((n = (r = e == null ? void 0 : e.Cols) == null ? void 0 : r[t]) == null ? void 0 : n.Visible);
241
+ return !ze((n = (r = e == null ? void 0 : e.Cols) == null ? void 0 : r[t]) == null ? void 0 : n.Visible);
237
242
  }, "isVisibleTreeGridColumn"), N = /* @__PURE__ */ l((e) => y(
238
243
  e == null ? void 0 : e[K]
239
- ), "getTreeGridAddedRowInitialValueKeys"), P = /* @__PURE__ */ l((e, t) => N(e).includes(t), "isTreeGridAddedRowInitialValueKey"), ze = /* @__PURE__ */ l((e, t) => {
244
+ ), "getTreeGridAddedRowInitialValueKeys"), P = /* @__PURE__ */ l((e, t) => N(e).includes(t), "isTreeGridAddedRowInitialValueKey"), He = /* @__PURE__ */ l((e, t) => {
240
245
  const r = e == null ? void 0 : e[I];
241
246
  return Object.prototype.hasOwnProperty.call(r ?? {}, t);
242
- }, "hasTreeGridAddedRowInitialValue"), He = /* @__PURE__ */ l((e, t) => {
247
+ }, "hasTreeGridAddedRowInitialValue"), Ue = /* @__PURE__ */ l((e, t) => {
243
248
  var r;
244
249
  return (r = e == null ? void 0 : e[I]) == null ? void 0 : r[t];
245
- }, "getTreeGridAddedRowInitialValue"), Ue = /* @__PURE__ */ l((e, t) => {
250
+ }, "getTreeGridAddedRowInitialValue"), ke = /* @__PURE__ */ l((e, t) => {
246
251
  var r;
247
252
  return typeof t.id == "string" ? (r = e == null ? void 0 : e.Rows) == null ? void 0 : r[t.id] : null;
248
- }, "getLiveTreeGridChangedRow"), W = /* @__PURE__ */ l((e, t, r, n) => !n || !k(e, r) || b(e, r) ? !1 : P(t, r), "shouldUseTreeGridAddedRowInitialValue"), g = /* @__PURE__ */ l((e, t, r, n, s) => W(e, r, n, s) && ze(r, n) ? He(r, n) : t[n], "resolveTreeGridChangeDataValue"), ke = /* @__PURE__ */ l((e, t, r, n = !1) => {
253
+ }, "getLiveTreeGridChangedRow"), W = /* @__PURE__ */ l((e, t, r, n) => !n || !k(e, r) || b(e, r) ? !1 : P(t, r), "shouldUseTreeGridAddedRowInitialValue"), g = /* @__PURE__ */ l((e, t, r, n, s) => W(e, r, n, s) && He(r, n) ? Ue(r, n) : t[n], "resolveTreeGridChangeDataValue"), Ne = /* @__PURE__ */ l((e, t, r, n = !1) => {
249
254
  const s = L(Object.keys(e), ...t);
250
255
  return n ? L(
251
256
  [.../* @__PURE__ */ new Set([...s, ...N(r)])],
252
257
  ...t
253
258
  ) : s;
254
- }, "getTreeGridChangeDataKeys"), Ne = /* @__PURE__ */ l((e, t, r, n, s = !1) => {
259
+ }, "getTreeGridChangeDataKeys"), Pe = /* @__PURE__ */ l((e, t, r, n, s = !1) => {
255
260
  const a = W(
256
261
  e,
257
262
  r,
@@ -264,12 +269,12 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
264
269
  n,
265
270
  s
266
271
  );
267
- return !xe(i) && !(a && i === "") ? !1 : k(e, n) ? !s || b(e, n) || a : we(n) ? !0 : P(r, n);
272
+ return !qe(i) && !(a && i === "") ? !1 : k(e, n) ? !s || b(e, n) || a : xe(n) ? !0 : P(r, n);
268
273
  }, "shouldIncludeTreeGridChangeDataKey"), v = /* @__PURE__ */ l((e, t, r, n = !1, s = !1) => {
269
- const a = n ? Ue(e, t) : null;
274
+ const a = n ? ke(e, t) : null;
270
275
  return Object.fromEntries(
271
- ke(t, r, a, n).filter(
272
- (i) => Ne(
276
+ Ne(t, r, a, n).filter(
277
+ (i) => Pe(
273
278
  e,
274
279
  t,
275
280
  a,
@@ -281,9 +286,9 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
281
286
  g(e, t, a, i, s)
282
287
  ])
283
288
  );
284
- }, "normalizeTreeGridChangeRow"), Pe = /* @__PURE__ */ l((e, t, r) => t.filter((n) => ee(n, r) === "1" && n.Deleted !== "1").map(
289
+ }, "normalizeTreeGridChangeRow"), We = /* @__PURE__ */ l((e, t, r) => t.filter((n) => ee(n, r) === "1" && n.Deleted !== "1").map(
285
290
  (n) => r === "Changed" ? v(e, n, ["id", "Changed"]) : v(e, n, ["id"], !0, !0)
286
- ).filter((n) => !te(n)), "getChangedRowsByStatus"), We = /* @__PURE__ */ l((e, t) => e ? t.map((r) => {
291
+ ).filter((n) => !te(n)), "getChangedRowsByStatus"), ge = /* @__PURE__ */ l((e, t) => e ? t.map((r) => {
287
292
  const n = typeof r.id == "string" ? e.Rows[r.id] : null;
288
293
  if (!n)
289
294
  return r;
@@ -291,29 +296,29 @@ const re = ["Added", "Changed"], ne = ["OWP", "IPX"], se = /^H{1,2}(?::m{1,2})?(
291
296
  return Object.keys(r).forEach((a) => {
292
297
  q(e, n, a) && (s[a] = z(e, n, a));
293
298
  }), s;
294
- }) : t, "normalizeTreeGridChangedRows"), ge = /* @__PURE__ */ l((e) => {
299
+ }) : t, "normalizeTreeGridChangedRows"), pe = /* @__PURE__ */ l((e) => {
295
300
  var t;
296
301
  try {
297
302
  (t = e == null ? void 0 : e.EndEdit) == null || t.call(e, 1);
298
303
  } catch {
299
304
  }
300
305
  }, "commitTreeGridActiveEdit"), u = /* @__PURE__ */ l((e) => Grids[e], "getTreeGridById");
301
- function ot(e) {
306
+ function ut(e) {
302
307
  const t = u(e);
303
308
  return t ? H(
304
309
  t,
305
- _e(t)
310
+ De(t)
306
311
  ) : [];
307
312
  }
308
- l(ot, "getTreeGridDataRowsById");
309
- const ut = /* @__PURE__ */ l((e) => {
313
+ l(ut, "getTreeGridDataRowsById");
314
+ const Rt = /* @__PURE__ */ l((e) => {
310
315
  const t = u(e);
311
316
  return (t == null ? void 0 : t.Rows) ?? {};
312
317
  }, "getTreeGridRowsById"), ft = /* @__PURE__ */ l((e, t) => {
313
318
  var r;
314
319
  if (t != null)
315
320
  return (r = u(e)) == null ? void 0 : r.GetRowById(String(t));
316
- }, "getTreeGridRowById"), Rt = /* @__PURE__ */ l((e, t) => {
321
+ }, "getTreeGridRowById"), Tt = /* @__PURE__ */ l((e, t) => {
317
322
  const r = u(e);
318
323
  if (!r)
319
324
  return;
@@ -325,70 +330,70 @@ const ut = /* @__PURE__ */ l((e) => {
325
330
  }, r.ReloadBody(), window.setTimeout(() => {
326
331
  D(e);
327
332
  }, 0);
328
- }, "reloadTreeGridBodyById"), Tt = /* @__PURE__ */ l((e, t) => {
333
+ }, "reloadTreeGridBodyById"), Et = /* @__PURE__ */ l((e, t) => {
329
334
  const r = u(e);
330
335
  if (!r)
331
336
  return;
332
- const n = t == null ? void 0 : t.canSelect, s = t == null ? void 0 : t.initialValues, a = t == null ? void 0 : t.editableColumns, i = Le(r), c = !!n && i, d = c && ve(s), o = d ? $e(s) : s;
337
+ const n = t == null ? void 0 : t.canSelect, s = t == null ? void 0 : t.initialValues, a = t == null ? void 0 : t.editableColumns, i = ve(r), c = !!n && i, d = c && $e(s), o = d ? Fe(s) : s;
333
338
  c && V(e);
334
- const { resolvedParent: R, next: T } = Fe(r, t), f = r.AddRow(R, T, 1);
335
- ce(f), je(r, f, o), Ce(r, f), f.CanEdit = 1, f.CanDelete = 1, f.CanSelect = n ? 1 : 0, Oe(r, f, a), d && r.SelectRow(f, 1), r.Focus(f), r.RefreshRow(f), r.Calculate(1, 1), window.setTimeout(() => {
339
+ const { resolvedParent: f, next: T } = Ke(r, t), R = r.AddRow(f, T, 1);
340
+ de(R), we(r, R, o), me(r, R), R.CanEdit = 1, R.CanDelete = 1, R.CanSelect = n ? 1 : 0, Oe(r, R, a), d && r.SelectRow(R, 1), r.Focus(R), r.RefreshRow(R), r.Calculate(1, 1), ce(r, R, "Add"), window.setTimeout(() => {
336
341
  D(e);
337
342
  }, 0);
338
- }, "addTreeGridRowById"), Et = /* @__PURE__ */ l((e, t) => {
343
+ }, "addTreeGridRowById"), Gt = /* @__PURE__ */ l((e, t) => {
339
344
  const r = u(e);
340
345
  if (!r)
341
346
  return { valid: !1, errors: [] };
342
- const n = Ge(r, t), s = [], a = t.refresh === !1 ? 0 : 1;
347
+ const n = Ce(r, t), s = [], a = t.refresh === !1 ? 0 : 1;
343
348
  n.forEach((c) => {
344
- Ae(r, c, t).forEach((d) => {
345
- const o = d.key, R = w(r, c, o), T = Ie(r, d), f = {
349
+ Ie(r, c, t).forEach((d) => {
350
+ const o = d.key, f = O(r, c, o), T = Se(r, d), R = {
346
351
  grid: r,
347
352
  row: c,
348
353
  col: o,
349
354
  key: o,
350
355
  label: T,
351
- value: R
356
+ value: f
352
357
  };
353
- if (!be(R)) {
358
+ if (!Ve(f)) {
354
359
  r.SetAttribute(c, o, "Error", "", a);
355
360
  return;
356
361
  }
357
- const B = Se(
358
- f,
362
+ const B = be(
363
+ R,
359
364
  d,
360
365
  t.messageFactory
361
- ), p = { ...f, message: B };
366
+ ), p = { ...R, message: B };
362
367
  r.SetAttribute(c, o, "Error", B, a), s.push(p);
363
368
  });
364
369
  });
365
370
  const i = s[0];
366
- return Ve(r, i, t), {
371
+ return Be(r, i, t), {
367
372
  valid: !i,
368
373
  errors: s,
369
374
  firstError: i
370
375
  };
371
- }, "validateTreeGridRequiredCellsById"), Gt = /* @__PURE__ */ l((e) => {
376
+ }, "validateTreeGridRequiredCellsById"), Ct = /* @__PURE__ */ l((e) => {
372
377
  const t = u(e);
373
- ge(t);
378
+ pe(t);
374
379
  const r = Q(t == null ? void 0 : t.GetXmlData("changes,allcols,nogrid,noio"));
375
380
  return A(r) ? Object.fromEntries(
376
381
  re.map((n) => [
377
382
  Z(n),
378
- Pe(
383
+ We(
379
384
  t,
380
- We(t, r),
385
+ ge(t, r),
381
386
  n
382
387
  )
383
388
  ])
384
389
  ) : { added: [], changed: [] };
385
- }, "getTreeGridRowChangesById"), Ct = /* @__PURE__ */ l((e, t) => {
390
+ }, "getTreeGridRowChangesById"), mt = /* @__PURE__ */ l((e, t) => {
386
391
  const r = u(e);
387
- r && ye().then(
392
+ r && _e().then(
388
393
  (n) => n(r, { exportName: t ?? "" })
389
394
  );
390
395
  }, "exportTreeGridToExcelById");
391
- function mt(e, t) {
396
+ function ht(e, t) {
392
397
  const r = u(e), n = r == null ? void 0 : r.GetSelRows();
393
398
  if (!r || !n)
394
399
  return [];
@@ -399,8 +404,8 @@ function mt(e, t) {
399
404
  );
400
405
  return H(r, s);
401
406
  }
402
- l(mt, "getTreeGridSelectedRowsById");
403
- const ht = /* @__PURE__ */ l((e, t) => {
407
+ l(ht, "getTreeGridSelectedRowsById");
408
+ const yt = /* @__PURE__ */ l((e, t) => {
404
409
  const r = u(e);
405
410
  if (!r || !(t != null && t.targetKey))
406
411
  return;
@@ -410,28 +415,28 @@ const ht = /* @__PURE__ */ l((e, t) => {
410
415
  return;
411
416
  }
412
417
  r.HideCol(n);
413
- }, "setTreeGridColumnVisibilityById"), yt = /* @__PURE__ */ l((e, t) => {
418
+ }, "setTreeGridColumnVisibilityById"), _t = /* @__PURE__ */ l((e, t) => {
414
419
  const r = u(e), n = t == null ? void 0 : t.row, s = t == null ? void 0 : t.col;
415
- !r || !n || !s || (me(r, n, s), r.SetValue(n, `${s}Class`, M), r.SetValue(n, `${s}Color`, t.backgroundColor ?? X), t.refresh !== !1 && r.RefreshCell(n, s));
416
- }, "highlightTreeGridCellById"), _t = /* @__PURE__ */ l((e, t) => {
420
+ !r || !n || !s || (he(r, n, s), r.SetValue(n, `${s}Class`, M), r.SetValue(n, `${s}Color`, t.backgroundColor ?? X), t.refresh !== !1 && r.RefreshCell(n, s));
421
+ }, "highlightTreeGridCellById"), Dt = /* @__PURE__ */ l((e, t) => {
417
422
  const r = u(e), n = t == null ? void 0 : t.row, s = t == null ? void 0 : t.col;
418
423
  if (!r || !n || !s)
419
424
  return;
420
- const a = he(n, s);
425
+ const a = ye(n, s);
421
426
  r.SetValue(n, `${s}Class`, (a == null ? void 0 : a.className) ?? ""), r.SetValue(n, `${s}Color`, (a == null ? void 0 : a.color) ?? ""), r.RefreshCell(n, s);
422
427
  }, "clearTreeGridCellHighlightById"), V = /* @__PURE__ */ l((e) => {
423
428
  const t = u(e);
424
429
  t && t.ActionDeselectAll(1, 0);
425
- }, "resetTreeGridSelectionById"), Dt = /* @__PURE__ */ l((e) => {
430
+ }, "resetTreeGridSelectionById"), At = /* @__PURE__ */ l((e) => {
426
431
  e.forEach(V);
427
- }, "resetTreeGridSelectionsByIds"), pe = /* @__PURE__ */ l((e) => {
432
+ }, "resetTreeGridSelectionsByIds"), Ye = /* @__PURE__ */ l((e) => {
428
433
  const t = u(e);
429
434
  t && (t.ActionUndoAll(1, 0), V(e), t.Calculate(1, 1), window.setTimeout(() => {
430
435
  D(e);
431
436
  }, 0));
432
- }, "resetTreeGridChangesById"), At = /* @__PURE__ */ l((e) => {
433
- e.forEach(pe);
434
- }, "resetTreeGridChangesByIds"), It = /* @__PURE__ */ l((e, t, r, n, s) => {
437
+ }, "resetTreeGridChangesById"), It = /* @__PURE__ */ l((e) => {
438
+ e.forEach(Ye);
439
+ }, "resetTreeGridChangesByIds"), St = /* @__PURE__ */ l((e, t, r, n, s) => {
435
440
  if (!(r != null && r.length))
436
441
  return;
437
442
  const a = u(e);
@@ -446,33 +451,33 @@ const ht = /* @__PURE__ */ l((e, t) => {
446
451
  export {
447
452
  M as TREEGRID_CELL_CHANGED_CLASS,
448
453
  X as TREEGRID_CELL_HIGHLIGHT_COLOR,
449
- Vt as TREEGRID_INPUT_CELL_COLOR,
450
- Bt as TREEGRID_WARNING_CELL_COLOR,
451
- Tt as addTreeGridRowById,
452
- lt as appendTreeGridAddedRowHighlightColumn,
453
- _t as clearTreeGridCellHighlightById,
454
- Ct as exportTreeGridToExcelById,
455
- dt as getTreeGridAddedRowBaselineValue,
456
- ct as getTreeGridAddedRowEditableColumns,
457
- it as getTreeGridAddedRowHighlightColumns,
454
+ Bt as TREEGRID_INPUT_CELL_COLOR,
455
+ Lt as TREEGRID_WARNING_CELL_COLOR,
456
+ Et as addTreeGridRowById,
457
+ at as appendTreeGridAddedRowHighlightColumn,
458
+ Dt as clearTreeGridCellHighlightById,
459
+ mt as exportTreeGridToExcelById,
460
+ ot as getTreeGridAddedRowBaselineValue,
461
+ dt as getTreeGridAddedRowEditableColumns,
462
+ ct as getTreeGridAddedRowHighlightColumns,
458
463
  u as getTreeGridById,
459
- w as getTreeGridCellComparableValue,
460
- ot as getTreeGridDataRowsById,
464
+ O as getTreeGridCellComparableValue,
465
+ ut as getTreeGridDataRowsById,
461
466
  ft as getTreeGridRowById,
462
- Gt as getTreeGridRowChangesById,
463
- ut as getTreeGridRowsById,
464
- mt as getTreeGridSelectedRowsById,
465
- yt as highlightTreeGridCellById,
466
- de as isTreeGridRowAddedById,
467
+ Ct as getTreeGridRowChangesById,
468
+ Rt as getTreeGridRowsById,
469
+ ht as getTreeGridSelectedRowsById,
470
+ _t as highlightTreeGridCellById,
471
+ oe as isTreeGridRowAddedById,
467
472
  H as normalizeTreeGridExternalRows,
468
- Rt as reloadTreeGridBodyById,
469
- at as removeTreeGridAddedRowHighlightColumn,
470
- pe as resetTreeGridChangesById,
471
- At as resetTreeGridChangesByIds,
473
+ Tt as reloadTreeGridBodyById,
474
+ it as removeTreeGridAddedRowHighlightColumn,
475
+ Ye as resetTreeGridChangesById,
476
+ It as resetTreeGridChangesByIds,
472
477
  V as resetTreeGridSelectionById,
473
- Dt as resetTreeGridSelectionsByIds,
474
- It as setTreeGridColumnEnumOptionsById,
475
- ht as setTreeGridColumnVisibilityById,
476
- Et as validateTreeGridRequiredCellsById
478
+ At as resetTreeGridSelectionsByIds,
479
+ St as setTreeGridColumnEnumOptionsById,
480
+ yt as setTreeGridColumnVisibilityById,
481
+ Gt as validateTreeGridRequiredCellsById
477
482
  };
478
483
  //# sourceMappingURL=treeGridUtil.js.map