@owp/core 2.5.31 → 2.5.32

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 (39) hide show
  1. package/dist/components/OwpPageContent/OwpPageContent.js +1 -1
  2. package/dist/components/OwpPageContent/OwpPageContent.js.map +1 -1
  3. package/dist/components/OwpSection/OwpSection.js +1 -1
  4. package/dist/components/OwpSection/OwpSection.js.map +1 -1
  5. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +813 -241
  6. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
  7. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +266 -252
  8. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  9. package/dist/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.js +59 -0
  10. package/dist/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.js.map +1 -0
  11. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.js +27 -0
  12. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.js.map +1 -0
  13. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +607 -510
  14. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  15. package/dist/components/OwpTreeGrid/internal/treeGridSelection.js +61 -0
  16. package/dist/components/OwpTreeGrid/internal/treeGridSelection.js.map +1 -0
  17. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +157 -154
  18. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  19. package/dist/hooks/useMinimumVisibleState.js.map +1 -0
  20. package/dist/hooks.js +47 -45
  21. package/dist/hooks.js.map +1 -1
  22. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  23. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.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/types/components/OwpSelectorBase/types/types.d.ts +2 -0
  26. package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +5 -1
  27. package/dist/types/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.d.ts +12 -0
  28. package/dist/types/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.d.ts +17 -0
  29. package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +6 -1
  30. package/dist/types/components/OwpTreeGrid/internal/treeGridSelection.d.ts +12 -0
  31. package/dist/types/hooks/index.d.ts +1 -0
  32. package/dist/types/hooks/useMinimumVisibleState.d.ts +6 -0
  33. package/dist/types/utils/treeGridUtil.d.ts +6 -1
  34. package/dist/utils/treeGridUtil.js +240 -204
  35. package/dist/utils/treeGridUtil.js.map +1 -1
  36. package/package.json +1 -1
  37. package/dist/hooks/internal/useMinimumVisibleState.js.map +0 -1
  38. package/dist/types/hooks/internal/useMinimumVisibleState.d.ts +0 -7
  39. /package/dist/hooks/{internal/useMinimumVisibleState.js → useMinimumVisibleState.js} +0 -0
@@ -1,102 +1,120 @@
1
- var K = Object.defineProperty;
2
- var l = (e, t) => K(e, "name", { value: t, configurable: !0 });
3
- import { TREEGRID_CELL_CHANGED_CLASS as z, TREEGRID_CELL_HIGHLIGHT_COLOR as N } from "../constants/treeGrid.js";
4
- import { TREEGRID_INPUT_CELL_COLOR as st, TREEGRID_WARNING_CELL_COLOR as lt } from "../constants/treeGrid.js";
5
- import { parseTreeGridXmlToJson as U } from "../components/OwpTreeGrid/internal/treeGridLayout.js";
6
- import { emitTreeGridBodyRowsChanged as m } from "./internal/treeGridBodyRowsEvent.js";
7
- import { isArray as y } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
8
- import { lowerCase as q } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/string/lowerCase.js";
9
- import { isPlainObject as I } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isPlainObject.js";
10
- import { get as O } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
11
- import { isEmpty as P } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
12
- import { without as w } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/without.js";
13
- const W = ["Added", "Changed"], M = ["OWP", "IPX"], Y = /^H{1,2}(?::m{1,2})?(?::s{1,2})?$/, S = "__owpAddedByAddTreeGridRowById", C = "__owpAddedRowHighlightColumns", V = "__owpAddedRowInitialValueKeys", B = "__owpAddedRowBaselineValues", R = "__owpCellStyleBaselineValues", X = /* @__PURE__ */ l(({
1
+ var q = Object.defineProperty;
2
+ var l = (e, t) => q(e, "name", { value: t, configurable: !0 });
3
+ import { TREEGRID_CELL_CHANGED_CLASS as z, TREEGRID_CELL_HIGHLIGHT_COLOR as O } from "../constants/treeGrid.js";
4
+ import { TREEGRID_INPUT_CELL_COLOR as Tt, TREEGRID_WARNING_CELL_COLOR as Gt } from "../constants/treeGrid.js";
5
+ import { parseTreeGridXmlToJson as N } from "../components/OwpTreeGrid/internal/treeGridLayout.js";
6
+ import { resolveTreeGridSelectedRows as U } from "../components/OwpTreeGrid/internal/treeGridSelection.js";
7
+ import { emitTreeGridBodyRowsChanged as _ } from "./internal/treeGridBodyRowsEvent.js";
8
+ import { isArray as D } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
9
+ import { lowerCase as P } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/string/lowerCase.js";
10
+ import { isPlainObject as y } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isPlainObject.js";
11
+ import { get as W } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
12
+ import { isEmpty as Y } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
13
+ import { without as M } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/without.js";
14
+ const X = ["Added", "Changed"], Q = ["OWP", "IPX"], g = /^H{1,2}(?::m{1,2})?(?::s{1,2})?$/, B = "__owpAddedByAddTreeGridRowById", E = "__owpAddedRowHighlightColumns", L = "__owpAddedRowInitialValueKeys", v = "__owpAddedRowBaselineValues", G = "__owpCellStyleBaselineValues", h = "Selected", J = /* @__PURE__ */ l(({
14
15
  label: e
15
- }) => `${e} 필수 입력`, "DEFAULT_TREE_GRID_REQUIRED_CELL_MESSAGE_FACTORY"), Q = [
16
+ }) => `${e} 필수 입력`, "DEFAULT_TREE_GRID_REQUIRED_CELL_MESSAGE_FACTORY"), Z = [
16
17
  "added"
17
- ], h = /* @__PURE__ */ l((e) => y(e) ? e.filter((t) => typeof t == "string" && t !== "") : [], "normalizeTreeGridStringValues"), _ = h, J = /* @__PURE__ */ l((e) => {
18
- e && (e[S] = 1);
19
- }, "markTreeGridRowAddedById"), Z = /* @__PURE__ */ l((e) => {
20
- const t = e == null ? void 0 : e[S];
18
+ ], S = /* @__PURE__ */ l((e) => D(e) ? e.filter((t) => typeof t == "string" && t !== "") : [], "normalizeTreeGridStringValues"), A = S, p = /* @__PURE__ */ l((e) => {
19
+ e && (e[B] = 1);
20
+ }, "markTreeGridRowAddedById"), ee = /* @__PURE__ */ l((e) => {
21
+ const t = e == null ? void 0 : e[B];
21
22
  return !!e && t !== 0 && t !== !1 && t !== void 0;
22
- }, "isTreeGridRowAddedById"), E = /* @__PURE__ */ l((e) => {
23
+ }, "isTreeGridRowAddedById"), m = /* @__PURE__ */ l((e) => {
23
24
  const t = e == null ? void 0 : e.Added;
24
- return t === 1 || t === "1" || t === !0 || Z(e);
25
- }, "isTreeGridAddedRow"), g = /* @__PURE__ */ l((e) => {
25
+ return t === 1 || t === "1" || t === !0 || ee(e);
26
+ }, "isTreeGridAddedRow"), te = /* @__PURE__ */ l((e) => {
26
27
  const t = e == null ? void 0 : e.Changed;
27
- return !E(e) && (t === 1 || t === "1" || t === !0);
28
- }, "isTreeGridChangedRow"), p = /* @__PURE__ */ l((e) => {
28
+ return !m(e) && (t === 1 || t === "1" || t === !0);
29
+ }, "isTreeGridChangedRow"), k = /* @__PURE__ */ l((e) => {
29
30
  const t = e == null ? void 0 : e.Deleted;
30
31
  return t === 1 || t === "1" || t === !0;
31
- }, "isTreeGridDeletedRow"), ee = /* @__PURE__ */ l((e) => {
32
- const t = y(e) ? e : e ? [e] : Q;
32
+ }, "isTreeGridDeletedRow"), re = /* @__PURE__ */ l((e) => {
33
+ const t = D(e) ? e : e ? [e] : Z;
33
34
  return t.includes("all") ? /* @__PURE__ */ new Set(["all"]) : new Set(
34
35
  t.filter(
35
36
  (r) => r === "added" || r === "changed"
36
37
  )
37
38
  );
38
- }, "normalizeTreeGridRequiredCellTargetRows"), te = /* @__PURE__ */ l((e, t) => p(e) ? !1 : t.has("all") ? e.Kind === "Data" || E(e) : t.has("added") && E(e) || t.has("changed") && g(e), "shouldValidateTreeGridRequiredCellRow"), Ne = /* @__PURE__ */ l((e, t) => {
39
+ }, "normalizeTreeGridRequiredCellTargetRows"), ne = /* @__PURE__ */ l((e, t) => k(e) ? !1 : t.has("all") ? e.Kind === "Data" || m(e) : t.has("added") && m(e) || t.has("changed") && te(e), "shouldValidateTreeGridRequiredCellRow"), se = /* @__PURE__ */ l((e) => !!e && !k(e) && (e.Kind === "Data" || m(e)), "shouldValidateExplicitTreeGridRequiredCellRow"), le = /* @__PURE__ */ l((e, t) => {
40
+ var r;
41
+ if (t)
42
+ return typeof t.id != "string" ? t : ((r = e.Rows) == null ? void 0 : r[t.id]) ?? t;
43
+ }, "resolveLiveTreeGridRequiredCellRow"), ie = /* @__PURE__ */ l((e, t) => {
44
+ const r = /* @__PURE__ */ new Set(), n = [];
45
+ return t.forEach((s) => {
46
+ const i = le(e, s);
47
+ !se(i) || r.has(i) || (r.add(i), n.push(i));
48
+ }), n;
49
+ }, "normalizeExplicitTreeGridRequiredCellRows"), ae = /* @__PURE__ */ l((e, t) => {
50
+ if (t.rows !== void 0)
51
+ return ie(e, t.rows);
52
+ const r = re(t.targetRows);
53
+ return Object.values(e.Rows ?? {}).filter(
54
+ (n) => ne(n, r)
55
+ );
56
+ }, "getTreeGridRequiredCellRows"), Qe = /* @__PURE__ */ l((e, t) => {
39
57
  if (!e || !t)
40
58
  return;
41
- const r = e, n = _(
42
- r[C]
59
+ const r = e, n = A(
60
+ r[E]
43
61
  );
44
- n.includes(t) || (r[C] = [...n, t]);
45
- }, "appendTreeGridAddedRowHighlightColumn"), Ue = /* @__PURE__ */ l((e, t) => {
62
+ n.includes(t) || (r[E] = [...n, t]);
63
+ }, "appendTreeGridAddedRowHighlightColumn"), ge = /* @__PURE__ */ l((e, t) => {
46
64
  if (!e || !t)
47
65
  return;
48
- const r = e, s = _(
49
- r[C]
50
- ).filter((a) => a !== t);
66
+ const r = e, s = A(
67
+ r[E]
68
+ ).filter((i) => i !== t);
51
69
  if (s.length) {
52
- r[C] = s;
70
+ r[E] = s;
53
71
  return;
54
72
  }
55
- delete r[C];
56
- }, "removeTreeGridAddedRowHighlightColumn"), qe = /* @__PURE__ */ l((e) => _(
57
- e == null ? void 0 : e[C]
58
- ), "getTreeGridAddedRowHighlightColumns"), L = /* @__PURE__ */ l((e, t, r) => {
59
- var a, c, d, i, f;
60
- const n = ((a = e.GetType) == null ? void 0 : a.call(e, t, r)) || ((d = (c = e.Cols) == null ? void 0 : c[r]) == null ? void 0 : d.Type) || "", s = ((i = e.GetValue) == null ? void 0 : i.call(e, t, r)) ?? t[r];
73
+ delete r[E];
74
+ }, "removeTreeGridAddedRowHighlightColumn"), Je = /* @__PURE__ */ l((e) => A(
75
+ e == null ? void 0 : e[E]
76
+ ), "getTreeGridAddedRowHighlightColumns"), F = /* @__PURE__ */ l((e, t, r) => {
77
+ var i, a, c, d, f;
78
+ const n = ((i = e.GetType) == null ? void 0 : i.call(e, t, r)) || ((c = (a = e.Cols) == null ? void 0 : a[r]) == null ? void 0 : c.Type) || "", s = ((d = e.GetValue) == null ? void 0 : d.call(e, t, r)) ?? t[r];
61
79
  if (n === "Enum" || n === "Select")
62
80
  return s == null ? "" : `${s}`;
63
81
  try {
64
- const o = (f = e.GetString) == null ? void 0 : f.call(e, t, r);
65
- if (o != null)
66
- return `${o}`;
82
+ const R = (f = e.GetString) == null ? void 0 : f.call(e, t, r);
83
+ if (R != null)
84
+ return `${R}`;
67
85
  } catch {
68
86
  }
69
87
  return s == null ? "" : `${s}`;
70
- }, "getTreeGridCellComparableValue"), re = /* @__PURE__ */ l((e, t) => {
88
+ }, "getTreeGridCellComparableValue"), ce = /* @__PURE__ */ l((e, t) => {
71
89
  const r = Object.fromEntries(
72
90
  Object.keys(e.Cols ?? {}).map((n) => [
73
91
  n,
74
- L(e, t, n)
92
+ F(e, t, n)
75
93
  ])
76
94
  );
77
- t[B] = r;
78
- }, "markTreeGridAddedRowBaselineValues"), Oe = /* @__PURE__ */ l((e, t) => {
95
+ t[v] = r;
96
+ }, "markTreeGridAddedRowBaselineValues"), Ze = /* @__PURE__ */ l((e, t) => {
79
97
  var r;
80
- return (r = e == null ? void 0 : e[B]) == null ? void 0 : r[t];
81
- }, "getTreeGridAddedRowBaselineValue"), ne = /* @__PURE__ */ l((e, t, r) => {
98
+ return (r = e == null ? void 0 : e[v]) == null ? void 0 : r[t];
99
+ }, "getTreeGridAddedRowBaselineValue"), de = /* @__PURE__ */ l((e, t, r) => {
82
100
  var s;
83
101
  const n = t;
84
- n[R] ?? (n[R] = {}), !((s = n[R]) != null && s[r]) && (n[R][r] = {
102
+ n[G] ?? (n[G] = {}), !((s = n[G]) != null && s[r]) && (n[G][r] = {
85
103
  className: e.GetAttribute(t, r, "Class"),
86
104
  color: e.GetAttribute(t, r, "Color")
87
105
  });
88
- }, "preserveTreeGridCellStyleBaseline"), se = /* @__PURE__ */ l((e, t) => {
106
+ }, "preserveTreeGridCellStyleBaseline"), oe = /* @__PURE__ */ l((e, t) => {
89
107
  var r;
90
- return (r = e[R]) == null ? void 0 : r[t];
91
- }, "getTreeGridCellStyleBaseline"), le = /* @__PURE__ */ l(async () => {
108
+ return (r = e[G]) == null ? void 0 : r[t];
109
+ }, "getTreeGridCellStyleBaseline"), ue = /* @__PURE__ */ l(async () => {
92
110
  const { exportTreeGridExcel: e } = await import("./treeGridExportExcelUtil.js");
93
111
  return e;
94
- }, "loadExportTreeGridExcel"), ae = /* @__PURE__ */ l((e) => Object.values((e == null ? void 0 : e.Rows) ?? {}).filter((t) => t.Kind === "Data"), "getDataRows"), ce = /* @__PURE__ */ l((e) => e != null && e.length ? e.map((t) => {
112
+ }, "loadExportTreeGridExcel"), fe = /* @__PURE__ */ l((e) => Object.values((e == null ? void 0 : e.Rows) ?? {}).filter((t) => t.Kind === "Data"), "getDataRows"), Re = /* @__PURE__ */ l((e) => e != null && e.length ? e.map((t) => {
95
113
  if (typeof t == "string") {
96
114
  const n = t.trim();
97
115
  return n ? { key: n } : null;
98
116
  }
99
- if (!I(t) || typeof t.key != "string")
117
+ if (!y(t) || typeof t.key != "string")
100
118
  return null;
101
119
  const r = t.key.trim();
102
120
  return r ? {
@@ -104,123 +122,134 @@ const W = ["Added", "Changed"], M = ["OWP", "IPX"], Y = /^H{1,2}(?::m{1,2})?(?::
104
122
  label: typeof t.label == "string" ? t.label.trim() : void 0,
105
123
  message: typeof t.message == "string" ? t.message : void 0
106
124
  } : null;
107
- }).filter((t) => !!t) : [], "normalizeTreeGridRequiredCellColumns"), k = /* @__PURE__ */ l((e, t, r) => {
125
+ }).filter((t) => !!t) : [], "normalizeTreeGridRequiredCellColumns"), $ = /* @__PURE__ */ l((e, t, r) => {
108
126
  var s;
109
127
  const n = (s = e.CanEdit) == null ? void 0 : s.call(e, t, r);
110
128
  return n === 1 || n === "1" || n === !0;
111
- }, "isTreeGridEditableCell"), ie = /* @__PURE__ */ l((e, t, r) => {
112
- const n = ce(r.columns);
129
+ }, "isTreeGridEditableCell"), Te = /* @__PURE__ */ l((e, t, r) => {
130
+ const n = Re(r.columns);
113
131
  return n.length ? n.filter((s) => {
114
- var a;
115
- return !!((a = e.Cols) != null && a[s.key]);
116
- }) : r.editableOnly ? Object.keys(e.Cols ?? {}).filter((s) => _e(e, s) && k(e, t, s)).map((s) => ({ key: s })) : [];
117
- }, "getTreeGridRequiredCellColumns"), de = /* @__PURE__ */ l((e, t) => {
118
- var n, s, a;
132
+ var i;
133
+ return !!((i = e.Cols) != null && i[s.key]);
134
+ }) : r.editableOnly ? Object.keys(e.Cols ?? {}).filter((s) => ve(e, s) && $(e, t, s)).map((s) => ({ key: s })) : [];
135
+ }, "getTreeGridRequiredCellColumns"), Ge = /* @__PURE__ */ l((e, t) => {
136
+ var n, s, i;
119
137
  if (t.label)
120
138
  return t.label;
121
139
  try {
122
- const c = (n = e.GetCaption) == null ? void 0 : n.call(e, t.key);
123
- if (c)
124
- return `${c}`.trim();
140
+ const a = (n = e.GetCaption) == null ? void 0 : n.call(e, t.key);
141
+ if (a)
142
+ return `${a}`.trim();
125
143
  } catch {
126
144
  }
127
- const r = (a = (s = e.Cols) == null ? void 0 : s[t.key]) == null ? void 0 : a.Caption;
145
+ const r = (i = (s = e.Cols) == null ? void 0 : s[t.key]) == null ? void 0 : i.Caption;
128
146
  return r ? `${r}`.trim() : t.key;
129
- }, "getTreeGridRequiredCellLabel"), ue = /* @__PURE__ */ l((e, t, r) => t.message ? t.message : (r ?? X)(e), "getTreeGridRequiredCellMessage"), oe = /* @__PURE__ */ l((e) => e.trim() === "", "isBlankTreeGridRequiredCellValue"), fe = /* @__PURE__ */ l((e, t, r) => {
130
- !t || r.focusFirstError === !1 || (e.Focus(t.row, t.col), r.startEditFirstError !== !1 && k(e, t.row, t.col) && e.StartEdit(t.row, t.col));
131
- }, "focusFirstTreeGridRequiredCellError"), G = /* @__PURE__ */ l((e) => typeof e == "string" && Y.test(e.trim()), "isTreeGridTimeDateFormat"), F = /* @__PURE__ */ l((e, t, r) => {
132
- var a;
133
- const n = t, s = (a = e.Cols) == null ? void 0 : a[r];
134
- return (s == null ? void 0 : s.Type) === "Date" && (G(n[`${r}EditFormat`]) || G(n[`${r}Format`]) || G(s.EditFormat) || G(s.Format));
135
- }, "isTreeGridTimeDateColumn"), $ = /* @__PURE__ */ l((e, t, r) => {
147
+ }, "getTreeGridRequiredCellLabel"), Ee = /* @__PURE__ */ l((e, t, r) => t.message ? t.message : (r ?? J)(e), "getTreeGridRequiredCellMessage"), Ce = /* @__PURE__ */ l((e) => e.trim() === "", "isBlankTreeGridRequiredCellValue"), me = /* @__PURE__ */ l((e, t, r) => {
148
+ !t || r.focusFirstError === !1 || (e.Focus(t.row, t.col), r.startEditFirstError !== !1 && $(e, t.row, t.col) && e.StartEdit(t.row, t.col));
149
+ }, "focusFirstTreeGridRequiredCellError"), C = /* @__PURE__ */ l((e) => typeof e == "string" && g.test(e.trim()), "isTreeGridTimeDateFormat"), x = /* @__PURE__ */ l((e, t, r) => {
150
+ var i;
151
+ const n = t, s = (i = e.Cols) == null ? void 0 : i[r];
152
+ return (s == null ? void 0 : s.Type) === "Date" && (C(n[`${r}EditFormat`]) || C(n[`${r}Format`]) || C(s.EditFormat) || C(s.Format));
153
+ }, "isTreeGridTimeDateColumn"), j = /* @__PURE__ */ l((e, t, r) => {
136
154
  var s;
137
155
  const n = t[r];
138
156
  try {
139
- const a = (s = e.GetString) == null ? void 0 : s.call(e, t, r);
140
- if (a != null && `${a}` != "")
141
- return `${a}`;
157
+ const i = (s = e.GetString) == null ? void 0 : s.call(e, t, r);
158
+ if (i != null && `${i}` != "")
159
+ return `${i}`;
142
160
  } catch {
143
161
  }
144
162
  return n == null ? "" : `${n}`;
145
- }, "getTreeGridTimeDateDisplayValue"), Te = /* @__PURE__ */ l((e, t) => {
163
+ }, "getTreeGridTimeDateDisplayValue"), ye = /* @__PURE__ */ l((e, t) => {
146
164
  const r = { ...t };
147
165
  return Object.keys(e.Cols ?? {}).forEach((n) => {
148
- F(e, t, n) && (r[n] = $(e, t, n));
166
+ x(e, t, n) && (r[n] = j(e, t, n));
149
167
  }), r;
150
- }, "normalizeTreeGridExternalRow"), v = /* @__PURE__ */ l((e, t) => t.map((r) => Te(e, r)), "normalizeTreeGridExternalRows"), Re = /* @__PURE__ */ l((e, t) => {
168
+ }, "normalizeTreeGridExternalRow"), w = /* @__PURE__ */ l((e, t) => t.map((r) => ye(e, r)), "normalizeTreeGridExternalRows"), H = /* @__PURE__ */ l((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitEnabledConfigValue"), he = /* @__PURE__ */ l((e) => H(e.SelectingSingle), "isTreeGridSingleSelectionLayout"), _e = /* @__PURE__ */ l((e) => y(e) ? H(
169
+ e[h]
170
+ ) : !1, "isTreeGridSelectedInitialValue"), De = /* @__PURE__ */ l((e) => {
171
+ if (!y(e))
172
+ return e;
173
+ const t = e;
174
+ return h in t ? Object.fromEntries(
175
+ Object.entries(t).filter(
176
+ ([r]) => r !== h
177
+ )
178
+ ) : e;
179
+ }, "omitTreeGridSelectedInitialValue"), Se = /* @__PURE__ */ l((e, t) => {
151
180
  const r = (t == null ? void 0 : t.insertPosition) ?? "top", n = t == null ? void 0 : t.parent, s = t == null ? void 0 : t.anchorRow;
152
- let a = n ?? (s ? s.parentNode : null) ?? e.GetFirst(), c = null;
181
+ let i = n ?? (s ? s.parentNode : null) ?? e.GetFirst(), a = null;
153
182
  switch (r) {
154
183
  case "top":
155
- c = e.GetFirst();
184
+ a = e.GetFirst();
156
185
  break;
157
186
  case "last":
158
- a = e.GetNext(e.GetLast(), e.RowCount > 0 ? e.RowCount + 1 : 0), c = a;
187
+ i = e.GetNext(e.GetLast(), e.RowCount > 0 ? e.RowCount + 1 : 0), a = i;
159
188
  break;
160
189
  case "above":
161
- c = s ?? e.GetFirst();
190
+ a = s ?? e.GetFirst();
162
191
  break;
163
192
  case "below":
164
- c = (s == null ? void 0 : s.nextSibling) ?? e.GetFirst();
193
+ a = (s == null ? void 0 : s.nextSibling) ?? e.GetFirst();
165
194
  break;
166
195
  }
167
- return { resolvedParent: a, next: c };
168
- }, "resolveRowInsertionTarget"), Ce = /* @__PURE__ */ l((e, t, r) => {
169
- if (!I(r))
196
+ return { resolvedParent: i, next: a };
197
+ }, "resolveRowInsertionTarget"), Ae = /* @__PURE__ */ l((e, t, r) => {
198
+ if (!y(r))
170
199
  return;
171
200
  const n = Object.keys(r).filter(Boolean);
172
- t[V] = n, Object.entries(r).forEach(([s, a]) => {
173
- var c, d;
174
- if (((d = (c = e.Cols) == null ? void 0 : c[s]) == null ? void 0 : d.Type) === "Date" && typeof a == "string") {
175
- e.SetString(t, s, a, 0);
201
+ t[L] = n, Object.entries(r).forEach(([s, i]) => {
202
+ var a, c;
203
+ if (((c = (a = e.Cols) == null ? void 0 : a[s]) == null ? void 0 : c.Type) === "Date" && typeof i == "string") {
204
+ e.SetString(t, s, i, 0);
176
205
  return;
177
206
  }
178
- t[s] = a;
207
+ t[s] = i;
179
208
  });
180
- }, "assignInitialRowValues"), Ge = /* @__PURE__ */ l((e, t, r) => {
181
- const n = h(r);
209
+ }, "assignInitialRowValues"), be = /* @__PURE__ */ l((e, t, r) => {
210
+ const n = S(r);
182
211
  if (!n.length)
183
212
  return;
184
213
  const s = t;
185
- n.forEach((a) => {
186
- var c;
187
- (c = e.Cols) != null && c[a] && (s[`${a}CanEdit`] = 1);
214
+ n.forEach((i) => {
215
+ var a;
216
+ (a = e.Cols) != null && a[i] && (s[`${i}CanEdit`] = 1);
188
217
  });
189
- }, "assignEditableAddedRowColumns"), Ee = /* @__PURE__ */ l((e) => M.some((t) => e.startsWith(t)), "isTreeGridDataKey"), me = /* @__PURE__ */ l((e, t) => {
218
+ }, "assignEditableAddedRowColumns"), Ie = /* @__PURE__ */ l((e) => Q.some((t) => e.startsWith(t)), "isTreeGridDataKey"), Ve = /* @__PURE__ */ l((e, t) => {
190
219
  var r;
191
220
  return !!((r = e == null ? void 0 : e.Cols) != null && r[t]);
192
- }, "isTreeGridColumnDataKey"), ye = /* @__PURE__ */ l((e) => e != null && e !== "", "hasTreeGridUploadValue"), he = /* @__PURE__ */ l((e) => e === 0 || e === !1 || e === "0", "isHiddenTreeGridValue"), _e = /* @__PURE__ */ l((e, t) => {
221
+ }, "isTreeGridColumnDataKey"), Be = /* @__PURE__ */ l((e) => e != null && e !== "", "hasTreeGridUploadValue"), Le = /* @__PURE__ */ l((e) => e === 0 || e === !1 || e === "0", "isHiddenTreeGridValue"), ve = /* @__PURE__ */ l((e, t) => {
193
222
  var r, n;
194
- return !he((n = (r = e == null ? void 0 : e.Cols) == null ? void 0 : r[t]) == null ? void 0 : n.Visible);
195
- }, "isVisibleTreeGridColumn"), De = /* @__PURE__ */ l((e, t) => h(
196
- e == null ? void 0 : e[V]
197
- ).includes(t), "isTreeGridAddedRowInitialValueKey"), Ae = /* @__PURE__ */ l((e, t) => {
223
+ return !Le((n = (r = e == null ? void 0 : e.Cols) == null ? void 0 : r[t]) == null ? void 0 : n.Visible);
224
+ }, "isVisibleTreeGridColumn"), ke = /* @__PURE__ */ l((e, t) => S(
225
+ e == null ? void 0 : e[L]
226
+ ).includes(t), "isTreeGridAddedRowInitialValueKey"), Fe = /* @__PURE__ */ l((e, t) => {
198
227
  var r;
199
228
  return typeof t.id == "string" ? (r = e == null ? void 0 : e.Rows) == null ? void 0 : r[t.id] : null;
200
- }, "getLiveTreeGridChangedRow"), be = /* @__PURE__ */ l((e, t, r, n = !1) => ye(t[r]) ? me(e, r) || Ee(r) ? !0 : n && De(Ae(e, t), r) : !1, "shouldIncludeTreeGridChangeDataKey"), b = /* @__PURE__ */ l((e, t, r, n = !1) => Object.fromEntries(
201
- w(Object.keys(t), ...r).filter(
202
- (s) => be(e, t, s, n)
229
+ }, "getLiveTreeGridChangedRow"), $e = /* @__PURE__ */ l((e, t, r, n = !1) => Be(t[r]) ? Ve(e, r) || Ie(r) ? !0 : n && ke(Fe(e, t), r) : !1, "shouldIncludeTreeGridChangeDataKey"), V = /* @__PURE__ */ l((e, t, r, n = !1) => Object.fromEntries(
230
+ M(Object.keys(t), ...r).filter(
231
+ (s) => $e(e, t, s, n)
203
232
  ).map((s) => [s, t[s]])
204
- ), "normalizeTreeGridChangeRow"), Ie = /* @__PURE__ */ l((e, t, r) => t.filter((n) => O(n, r) === "1" && n.Deleted !== "1").map(
205
- (n) => r === "Changed" ? b(e, n, ["id", "Changed"]) : b(e, n, ["id"], !0)
206
- ).filter((n) => !P(n)), "getChangedRowsByStatus"), Se = /* @__PURE__ */ l((e, t) => e ? t.map((r) => {
233
+ ), "normalizeTreeGridChangeRow"), xe = /* @__PURE__ */ l((e, t, r) => t.filter((n) => W(n, r) === "1" && n.Deleted !== "1").map(
234
+ (n) => r === "Changed" ? V(e, n, ["id", "Changed"]) : V(e, n, ["id"], !0)
235
+ ).filter((n) => !Y(n)), "getChangedRowsByStatus"), je = /* @__PURE__ */ l((e, t) => e ? t.map((r) => {
207
236
  const n = typeof r.id == "string" ? e.Rows[r.id] : null;
208
237
  if (!n)
209
238
  return r;
210
239
  const s = { ...r };
211
- return Object.keys(r).forEach((a) => {
212
- F(e, n, a) && (s[a] = $(e, n, a));
240
+ return Object.keys(r).forEach((i) => {
241
+ x(e, n, i) && (s[i] = j(e, n, i));
213
242
  }), s;
214
- }) : t, "normalizeTreeGridChangedRows"), Ve = /* @__PURE__ */ l((e) => {
243
+ }) : t, "normalizeTreeGridChangedRows"), we = /* @__PURE__ */ l((e) => {
215
244
  var t;
216
245
  try {
217
246
  (t = e == null ? void 0 : e.EndEdit) == null || t.call(e, 1);
218
247
  } catch {
219
248
  }
220
- }, "commitTreeGridActiveEdit"), u = /* @__PURE__ */ l((e) => Grids[e], "getTreeGridById"), Pe = /* @__PURE__ */ l((e) => {
249
+ }, "commitTreeGridActiveEdit"), u = /* @__PURE__ */ l((e) => Grids[e], "getTreeGridById"), pe = /* @__PURE__ */ l((e) => {
221
250
  const t = u(e);
222
- return t ? v(t, ae(t)) : [];
223
- }, "getTreeGridDataRowsById"), we = /* @__PURE__ */ l((e, t) => {
251
+ return t ? w(t, fe(t)) : [];
252
+ }, "getTreeGridDataRowsById"), et = /* @__PURE__ */ l((e, t) => {
224
253
  const r = u(e);
225
254
  if (!r)
226
255
  return;
@@ -230,74 +259,81 @@ const W = ["Added", "Changed"], M = ["OWP", "IPX"], Y = /^H{1,2}(?::m{1,2})?(?::
230
259
  Data: { Body: [t || []] },
231
260
  Url: ""
232
261
  }, r.ReloadBody(), window.setTimeout(() => {
233
- m(e);
262
+ _(e);
234
263
  }, 0);
235
- }, "reloadTreeGridBodyById"), We = /* @__PURE__ */ l((e, t) => {
264
+ }, "reloadTreeGridBodyById"), tt = /* @__PURE__ */ l((e, t) => {
236
265
  const r = u(e);
237
266
  if (!r)
238
267
  return;
239
- const n = t == null ? void 0 : t.canSelect, s = t == null ? void 0 : t.initialValues, a = t == null ? void 0 : t.editableColumns, { resolvedParent: c, next: d } = Re(r, t), i = r.AddRow(c, d, 1);
240
- J(i), Ce(r, i, s), re(r, i), i.CanEdit = 1, i.CanDelete = 1, i.CanSelect = n ? 1 : 0, Ge(r, i, a), r.Focus(i), r.RefreshRow(i), r.Calculate(1, 1), window.setTimeout(() => {
241
- m(e);
268
+ const n = t == null ? void 0 : t.canSelect, s = t == null ? void 0 : t.initialValues, i = t == null ? void 0 : t.editableColumns, a = he(r), c = !!n && a, d = c && _e(s), f = d ? De(s) : s;
269
+ c && b(e);
270
+ const { resolvedParent: R, next: T } = Se(r, t), o = r.AddRow(R, T, 1);
271
+ p(o), Ae(r, o, f), ce(r, o), o.CanEdit = 1, o.CanDelete = 1, o.CanSelect = n ? 1 : 0, be(r, o, i), d && r.SelectRow(o, 1), r.Focus(o), r.RefreshRow(o), r.Calculate(1, 1), window.setTimeout(() => {
272
+ _(e);
242
273
  }, 0);
243
- }, "addTreeGridRowById"), Me = /* @__PURE__ */ l((e, t) => {
274
+ }, "addTreeGridRowById"), rt = /* @__PURE__ */ l((e, t) => {
244
275
  const r = u(e);
245
276
  if (!r)
246
277
  return { valid: !1, errors: [] };
247
- const n = ee(t.targetRows), s = Object.values(r.Rows ?? {}).filter(
248
- (i) => te(i, n)
249
- ), a = [], c = t.refresh === !1 ? 0 : 1;
250
- s.forEach((i) => {
251
- ie(r, i, t).forEach((f) => {
252
- const o = f.key, T = L(r, i, o), H = de(r, f), D = {
278
+ const n = ae(r, t), s = [], i = t.refresh === !1 ? 0 : 1;
279
+ n.forEach((c) => {
280
+ Te(r, c, t).forEach((d) => {
281
+ const f = d.key, R = F(r, c, f), T = Ge(r, d), o = {
253
282
  grid: r,
254
- row: i,
255
- col: o,
256
- key: o,
257
- label: H,
258
- value: T
283
+ row: c,
284
+ col: f,
285
+ key: f,
286
+ label: T,
287
+ value: R
259
288
  };
260
- if (!oe(T)) {
261
- r.SetAttribute(i, o, "Error", "", c);
289
+ if (!Ce(R)) {
290
+ r.SetAttribute(c, f, "Error", "", i);
262
291
  return;
263
292
  }
264
- const A = ue(
265
- D,
266
- f,
293
+ const I = Ee(
294
+ o,
295
+ d,
267
296
  t.messageFactory
268
- ), j = { ...D, message: A };
269
- r.SetAttribute(i, o, "Error", A, c), a.push(j);
297
+ ), K = { ...o, message: I };
298
+ r.SetAttribute(c, f, "Error", I, i), s.push(K);
270
299
  });
271
300
  });
272
- const d = a[0];
273
- return fe(r, d, t), {
274
- valid: !d,
275
- errors: a,
276
- firstError: d
301
+ const a = s[0];
302
+ return me(r, a, t), {
303
+ valid: !a,
304
+ errors: s,
305
+ firstError: a
277
306
  };
278
- }, "validateTreeGridRequiredCellsById"), Ye = /* @__PURE__ */ l((e) => {
307
+ }, "validateTreeGridRequiredCellsById"), nt = /* @__PURE__ */ l((e) => {
279
308
  const t = u(e);
280
- Ve(t);
281
- const r = U(t == null ? void 0 : t.GetXmlData("changes,allcols,nogrid,noio"));
282
- return y(r) ? Object.fromEntries(
283
- W.map((n) => [
284
- q(n),
285
- Ie(
309
+ we(t);
310
+ const r = N(t == null ? void 0 : t.GetXmlData("changes,allcols,nogrid,noio"));
311
+ return D(r) ? Object.fromEntries(
312
+ X.map((n) => [
313
+ P(n),
314
+ xe(
286
315
  t,
287
- Se(t, r),
316
+ je(t, r),
288
317
  n
289
318
  )
290
319
  ])
291
320
  ) : { added: [], changed: [] };
292
- }, "getTreeGridRowChangesById"), Xe = /* @__PURE__ */ l((e, t) => {
321
+ }, "getTreeGridRowChangesById"), st = /* @__PURE__ */ l((e, t) => {
293
322
  const r = u(e);
294
- r && le().then(
323
+ r && ue().then(
295
324
  (n) => n(r, { exportName: t ?? "" })
296
325
  );
297
- }, "exportTreeGridToExcelById"), Qe = /* @__PURE__ */ l((e) => {
298
- const t = u(e), r = t == null ? void 0 : t.GetSelRows();
299
- return t && r ? v(t, r) : [];
300
- }, "getTreeGridSelectedRowsById"), Je = /* @__PURE__ */ l((e, t) => {
326
+ }, "exportTreeGridToExcelById"), lt = /* @__PURE__ */ l((e, t) => {
327
+ const r = u(e), n = r == null ? void 0 : r.GetSelRows();
328
+ if (!r || !n)
329
+ return [];
330
+ const s = U(
331
+ r,
332
+ n,
333
+ t
334
+ );
335
+ return w(r, s);
336
+ }, "getTreeGridSelectedRowsById"), it = /* @__PURE__ */ l((e, t) => {
301
337
  const r = u(e);
302
338
  if (!r || !(t != null && t.targetKey))
303
339
  return;
@@ -307,66 +343,66 @@ const W = ["Added", "Changed"], M = ["OWP", "IPX"], Y = /^H{1,2}(?::m{1,2})?(?::
307
343
  return;
308
344
  }
309
345
  r.HideCol(n);
310
- }, "setTreeGridColumnVisibilityById"), Ze = /* @__PURE__ */ l((e, t) => {
346
+ }, "setTreeGridColumnVisibilityById"), at = /* @__PURE__ */ l((e, t) => {
311
347
  const r = u(e), n = t == null ? void 0 : t.row, s = t == null ? void 0 : t.col;
312
- !r || !n || !s || (ne(r, n, s), r.SetValue(n, `${s}Class`, z), r.SetValue(n, `${s}Color`, t.backgroundColor ?? N), t.refresh !== !1 && r.RefreshCell(n, s));
313
- }, "highlightTreeGridCellById"), ge = /* @__PURE__ */ l((e, t) => {
348
+ !r || !n || !s || (de(r, n, s), r.SetValue(n, `${s}Class`, z), r.SetValue(n, `${s}Color`, t.backgroundColor ?? O), t.refresh !== !1 && r.RefreshCell(n, s));
349
+ }, "highlightTreeGridCellById"), ct = /* @__PURE__ */ l((e, t) => {
314
350
  const r = u(e), n = t == null ? void 0 : t.row, s = t == null ? void 0 : t.col;
315
351
  if (!r || !n || !s)
316
352
  return;
317
- const a = se(n, s);
318
- 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);
319
- }, "clearTreeGridCellHighlightById"), x = /* @__PURE__ */ l((e) => {
353
+ const i = oe(n, s);
354
+ r.SetValue(n, `${s}Class`, (i == null ? void 0 : i.className) ?? ""), r.SetValue(n, `${s}Color`, (i == null ? void 0 : i.color) ?? ""), r.RefreshCell(n, s);
355
+ }, "clearTreeGridCellHighlightById"), b = /* @__PURE__ */ l((e) => {
320
356
  const t = u(e);
321
357
  t && t.ActionDeselectAll(1, 0);
322
- }, "resetTreeGridSelectionById"), pe = /* @__PURE__ */ l((e) => {
323
- e.forEach(x);
324
- }, "resetTreeGridSelectionsByIds"), Be = /* @__PURE__ */ l((e) => {
358
+ }, "resetTreeGridSelectionById"), dt = /* @__PURE__ */ l((e) => {
359
+ e.forEach(b);
360
+ }, "resetTreeGridSelectionsByIds"), He = /* @__PURE__ */ l((e) => {
325
361
  const t = u(e);
326
- t && (t.ActionUndoAll(1, 0), x(e), t.Calculate(1, 1), window.setTimeout(() => {
327
- m(e);
362
+ t && (t.ActionUndoAll(1, 0), b(e), t.Calculate(1, 1), window.setTimeout(() => {
363
+ _(e);
328
364
  }, 0));
329
- }, "resetTreeGridChangesById"), et = /* @__PURE__ */ l((e) => {
330
- e.forEach(Be);
331
- }, "resetTreeGridChangesByIds"), tt = /* @__PURE__ */ l((e, t, r, n, s) => {
365
+ }, "resetTreeGridChangesById"), ot = /* @__PURE__ */ l((e) => {
366
+ e.forEach(He);
367
+ }, "resetTreeGridChangesByIds"), ut = /* @__PURE__ */ l((e, t, r, n, s) => {
332
368
  if (!(r != null && r.length))
333
369
  return;
334
- const a = u(e);
335
- if (!a)
370
+ const i = u(e);
371
+ if (!i)
336
372
  return;
337
- const c = r.map((i) => {
338
- const f = i;
373
+ const a = r.map((d) => {
374
+ const f = d;
339
375
  return `${s.map((T) => f[T]).find((T) => T != null && T !== "") ?? ""}`;
340
- }).join("|"), d = r.map((i) => `${i[n] ?? ""}`).join("|");
341
- a.SetAttribute(null, t, "Type", "Enum", 0, 0), a.SetAttribute(null, t, "Enum", `|${c}`, 0, 0), a.SetAttribute(null, t, "EnumKeys", `|${d}`, 1, 0);
376
+ }).join("|"), c = r.map((d) => `${d[n] ?? ""}`).join("|");
377
+ i.SetAttribute(null, t, "Type", "Enum", 0, 0), i.SetAttribute(null, t, "Enum", `|${a}`, 0, 0), i.SetAttribute(null, t, "EnumKeys", `|${c}`, 1, 0);
342
378
  }, "setTreeGridColumnEnumOptionsById");
343
379
  export {
344
380
  z as TREEGRID_CELL_CHANGED_CLASS,
345
- N as TREEGRID_CELL_HIGHLIGHT_COLOR,
346
- st as TREEGRID_INPUT_CELL_COLOR,
347
- lt as TREEGRID_WARNING_CELL_COLOR,
348
- We as addTreeGridRowById,
349
- Ne as appendTreeGridAddedRowHighlightColumn,
350
- ge as clearTreeGridCellHighlightById,
351
- Xe as exportTreeGridToExcelById,
352
- Oe as getTreeGridAddedRowBaselineValue,
353
- qe as getTreeGridAddedRowHighlightColumns,
381
+ O as TREEGRID_CELL_HIGHLIGHT_COLOR,
382
+ Tt as TREEGRID_INPUT_CELL_COLOR,
383
+ Gt as TREEGRID_WARNING_CELL_COLOR,
384
+ tt as addTreeGridRowById,
385
+ Qe as appendTreeGridAddedRowHighlightColumn,
386
+ ct as clearTreeGridCellHighlightById,
387
+ st as exportTreeGridToExcelById,
388
+ Ze as getTreeGridAddedRowBaselineValue,
389
+ Je as getTreeGridAddedRowHighlightColumns,
354
390
  u as getTreeGridById,
355
- L as getTreeGridCellComparableValue,
356
- Pe as getTreeGridDataRowsById,
357
- Ye as getTreeGridRowChangesById,
358
- Qe as getTreeGridSelectedRowsById,
359
- Ze as highlightTreeGridCellById,
360
- Z as isTreeGridRowAddedById,
361
- v as normalizeTreeGridExternalRows,
362
- we as reloadTreeGridBodyById,
363
- Ue as removeTreeGridAddedRowHighlightColumn,
364
- Be as resetTreeGridChangesById,
365
- et as resetTreeGridChangesByIds,
366
- x as resetTreeGridSelectionById,
367
- pe as resetTreeGridSelectionsByIds,
368
- tt as setTreeGridColumnEnumOptionsById,
369
- Je as setTreeGridColumnVisibilityById,
370
- Me as validateTreeGridRequiredCellsById
391
+ F as getTreeGridCellComparableValue,
392
+ pe as getTreeGridDataRowsById,
393
+ nt as getTreeGridRowChangesById,
394
+ lt as getTreeGridSelectedRowsById,
395
+ at as highlightTreeGridCellById,
396
+ ee as isTreeGridRowAddedById,
397
+ w as normalizeTreeGridExternalRows,
398
+ et as reloadTreeGridBodyById,
399
+ ge as removeTreeGridAddedRowHighlightColumn,
400
+ He as resetTreeGridChangesById,
401
+ ot as resetTreeGridChangesByIds,
402
+ b as resetTreeGridSelectionById,
403
+ dt as resetTreeGridSelectionsByIds,
404
+ ut as setTreeGridColumnEnumOptionsById,
405
+ it as setTreeGridColumnVisibilityById,
406
+ rt as validateTreeGridRequiredCellsById
371
407
  };
372
408
  //# sourceMappingURL=treeGridUtil.js.map