@owp/core 2.5.18 → 2.5.19

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 (64) hide show
  1. package/dist/_virtual/index15.js +2 -2
  2. package/dist/_virtual/index16.js +4 -4
  3. package/dist/_virtual/index17.js +4 -4
  4. package/dist/_virtual/index18.js +4 -4
  5. package/dist/_virtual/index19.js +4 -4
  6. package/dist/_virtual/index5.js +2 -2
  7. package/dist/components/OwpPageContent/OwpPageContent.js +14 -12
  8. package/dist/components/OwpPageContent/OwpPageContent.js.map +1 -1
  9. package/dist/components/OwpPageTitle/OwpPageTitle.js +37 -35
  10. package/dist/components/OwpPageTitle/OwpPageTitle.js.map +1 -1
  11. package/dist/components/OwpPicker/OwpDatePicker.js +339 -102
  12. package/dist/components/OwpPicker/OwpDatePicker.js.map +1 -1
  13. package/dist/components/OwpPicker/OwpDateRangePicker.js +87 -82
  14. package/dist/components/OwpPicker/OwpDateRangePicker.js.map +1 -1
  15. package/dist/components/OwpPicker/OwpTimePicker.js +494 -236
  16. package/dist/components/OwpPicker/OwpTimePicker.js.map +1 -1
  17. package/dist/components/OwpPicker/constants/index.js +6 -5
  18. package/dist/components/OwpPicker/constants/index.js.map +1 -1
  19. package/dist/components/OwpPicker/internal/DatePickerInput.js +71 -47
  20. package/dist/components/OwpPicker/internal/DatePickerInput.js.map +1 -1
  21. package/dist/components/OwpSection/OwpSection.js +84 -62
  22. package/dist/components/OwpSection/OwpSection.js.map +1 -1
  23. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +42 -40
  24. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
  25. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js +307 -270
  26. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js.map +1 -1
  27. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +267 -276
  28. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  29. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +262 -182
  30. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  31. package/dist/constants/gridTheme.js +7 -6
  32. package/dist/constants/gridTheme.js.map +1 -1
  33. package/dist/constants/treeGrid.js +32 -31
  34. package/dist/constants/treeGrid.js.map +1 -1
  35. package/dist/constants.js +28 -27
  36. package/dist/features/themePreview/configs/grid.js +3 -1
  37. package/dist/features/themePreview/configs/grid.js.map +1 -1
  38. package/dist/features/themePreview/utils/themePreviewDefinitions.js +10 -0
  39. package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -1
  40. package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
  41. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  42. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  43. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  44. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  45. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  46. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  47. package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
  48. package/dist/owp-app.css +1 -1
  49. package/dist/types/components/OwpPageContent/OwpPageContent.d.ts +3 -1
  50. package/dist/types/components/OwpPageTitle/OwpPageTitle.d.ts +3 -1
  51. package/dist/types/components/OwpPicker/constants/index.d.ts +1 -0
  52. package/dist/types/components/OwpPicker/internal/DatePickerInput.d.ts +7 -0
  53. package/dist/types/components/OwpSection/OwpSection.d.ts +3 -1
  54. package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +1 -1
  55. package/dist/types/constants/gridTheme.d.ts +2 -0
  56. package/dist/types/constants/treeGrid.d.ts +2 -1
  57. package/dist/types/features/themePreview/configs/grid.d.ts +2 -0
  58. package/dist/types/features/themePreview/configs/settings.d.ts +2 -0
  59. package/dist/types/types/OwpGridThemeTypes.d.ts +1 -0
  60. package/dist/types/utils/treeGridUtil.d.ts +15 -3
  61. package/dist/utils/treeGridUtil.js +193 -147
  62. package/dist/utils/treeGridUtil.js.map +1 -1
  63. package/dist/utils.js +69 -67
  64. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { TREEGRID_CELL_HIGHLIGHT_CLASS, TREEGRID_CELL_HIGHLIGHT_COLOR, TREEGRID_INPUT_CELL_COLOR, TREEGRID_WARNING_CELL_COLOR } from '@/constants/treeGrid';
2
- export { TREEGRID_CELL_HIGHLIGHT_CLASS, TREEGRID_CELL_HIGHLIGHT_COLOR, TREEGRID_INPUT_CELL_COLOR, TREEGRID_WARNING_CELL_COLOR, };
1
+ import { TREEGRID_CELL_CHANGED_CLASS, TREEGRID_CELL_HIGHLIGHT_COLOR, TREEGRID_INPUT_CELL_COLOR, TREEGRID_WARNING_CELL_COLOR } from '@/constants/treeGrid';
2
+ export { TREEGRID_CELL_CHANGED_CLASS, TREEGRID_CELL_HIGHLIGHT_COLOR, TREEGRID_INPUT_CELL_COLOR, TREEGRID_WARNING_CELL_COLOR, };
3
3
  type TreeGridInsertPosition = 'above' | 'below' | 'top' | 'last';
4
4
  type TreeGridAddRowOptions<T> = {
5
5
  canSelect?: boolean;
@@ -60,6 +60,18 @@ export declare const getTreeGridCellComparableValue: (grid: TGrid, row: TRow, co
60
60
  * @param col 대상 컬럼
61
61
  */
62
62
  export declare const getTreeGridAddedRowBaselineValue: (row: TRow | null | undefined, col: string) => string;
63
+ /**
64
+ * TreeGrid 외부 반환 행 Date 시간 값 정규화
65
+ * @param grid TreeGrid 인스턴스
66
+ * @param row 대상 행
67
+ */
68
+ export declare const normalizeTreeGridExternalRow: <T>(grid: TGrid, row: TRow & T) => TRow & T;
69
+ /**
70
+ * TreeGrid 외부 반환 행 목록 Date 시간 값 정규화
71
+ * @param grid TreeGrid 인스턴스
72
+ * @param rows 대상 행 목록
73
+ */
74
+ export declare const normalizeTreeGridExternalRows: <T>(grid: TGrid, rows: Array<TRow & T>) => (TRow & T)[];
63
75
  /**
64
76
  * TreeGrid 인스턴스 ID 조회
65
77
  * @param gridId TreeGrid 인스턴스 ID
@@ -69,7 +81,7 @@ export declare const getTreeGridById: (gridId: string) => TTGrid;
69
81
  * TreeGrid 데이터 행 목록 조회
70
82
  * @param gridId TreeGrid 인스턴스 ID
71
83
  */
72
- export declare const getTreeGridDataRowsById: <T>(gridId: string) => T;
84
+ export declare const getTreeGridDataRowsById: <T>(gridId: string) => any[] | T;
73
85
  /**
74
86
  * TreeGrid Body 데이터 교체 후 재로드
75
87
  * @param gridId TreeGrid 인스턴스 ID
@@ -1,217 +1,263 @@
1
- var D = Object.defineProperty;
2
- var l = (t, e) => D(t, "name", { value: e, configurable: !0 });
3
- import { TREEGRID_CELL_HIGHLIGHT_CLASS as _, TREEGRID_CELL_HIGHLIGHT_COLOR as S } from "../constants/treeGrid.js";
4
- import { TREEGRID_INPUT_CELL_COLOR as De, TREEGRID_WARNING_CELL_COLOR as _e } from "../constants/treeGrid.js";
5
- import { parseTreeGridXmlToJson as b } from "../components/OwpTreeGrid/internal/treeGridLayout.js";
1
+ var w = Object.defineProperty;
2
+ var l = (e, t) => w(e, "name", { value: t, configurable: !0 });
3
+ import { TREEGRID_CELL_CHANGED_CLASS as H, TREEGRID_CELL_HIGHLIGHT_COLOR as L } from "../constants/treeGrid.js";
4
+ import { TREEGRID_INPUT_CELL_COLOR as ve, TREEGRID_WARNING_CELL_COLOR as Ne } from "../constants/treeGrid.js";
5
+ import { parseTreeGridXmlToJson as $ } from "../components/OwpTreeGrid/internal/treeGridLayout.js";
6
6
  import { emitTreeGridBodyRowsChanged as C } from "./treeGridBodyRowsEvent.js";
7
- import { isArray as E } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
8
- import { lowerCase as B } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/string/lowerCase.js";
9
- import { isPlainObject as w } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isPlainObject.js";
10
- import { get as V } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
11
- import { omit as H } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/omit.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 L } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/without.js";
14
- const x = ["Added", "Changed"], $ = ["OWP", "IPX"], h = "__owpAddedByAddTreeGridRowById", m = "__owpAddedRowHighlightColumns", I = "__owpAddedRowBaselineValues", i = "__owpCellStyleBaselineValues", f = /* @__PURE__ */ l((t) => E(t) ? t.filter((e) => typeof e == "string" && e !== "") : [], "normalizeTreeGridAddedRowHighlightColumns"), j = /* @__PURE__ */ l((t) => {
15
- t && (t[h] = 1);
16
- }, "markTreeGridRowAddedById"), se = /* @__PURE__ */ l((t) => {
17
- const e = t == null ? void 0 : t[h];
18
- return !!t && e !== 0 && e !== !1 && e !== void 0;
19
- }, "isTreeGridRowAddedById"), le = /* @__PURE__ */ l((t, e) => {
20
- if (!t || !e)
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 x } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/string/lowerCase.js";
9
+ import { isPlainObject as j } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isPlainObject.js";
10
+ import { get as F } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
11
+ import { omit as K } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/omit.js";
12
+ import { isEmpty as D } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
13
+ import { without as v } from "../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/array/without.js";
14
+ const N = ["Added", "Changed"], P = ["OWP", "IPX"], k = /^H{1,2}(?::m{1,2})?(?::s{1,2})?$/, _ = "__owpAddedByAddTreeGridRowById", m = "__owpAddedRowHighlightColumns", h = "__owpAddedRowInitialValueKeys", A = "__owpAddedRowBaselineValues", u = "__owpCellStyleBaselineValues", I = /* @__PURE__ */ l((e) => y(e) ? e.filter((t) => typeof t == "string" && t !== "") : [], "normalizeTreeGridStringValues"), E = I, z = /* @__PURE__ */ l((e) => {
15
+ e && (e[_] = 1);
16
+ }, "markTreeGridRowAddedById"), Ee = /* @__PURE__ */ l((e) => {
17
+ const t = e == null ? void 0 : e[_];
18
+ return !!e && t !== 0 && t !== !1 && t !== void 0;
19
+ }, "isTreeGridRowAddedById"), ye = /* @__PURE__ */ l((e, t) => {
20
+ if (!e || !t)
21
21
  return;
22
- const r = t, n = f(
22
+ const r = e, n = E(
23
23
  r[m]
24
24
  );
25
- n.includes(e) || (r[m] = [...n, e]);
26
- }, "appendTreeGridAddedRowHighlightColumn"), ce = /* @__PURE__ */ l((t, e) => {
27
- if (!t || !e)
25
+ n.includes(t) || (r[m] = [...n, t]);
26
+ }, "appendTreeGridAddedRowHighlightColumn"), De = /* @__PURE__ */ l((e, t) => {
27
+ if (!e || !t)
28
28
  return;
29
- const r = t, s = f(
29
+ const r = e, s = E(
30
30
  r[m]
31
- ).filter((c) => c !== e);
31
+ ).filter((c) => c !== t);
32
32
  if (s.length) {
33
33
  r[m] = s;
34
34
  return;
35
35
  }
36
36
  delete r[m];
37
- }, "removeTreeGridAddedRowHighlightColumn"), de = /* @__PURE__ */ l((t) => f(
38
- t == null ? void 0 : t[m]
39
- ), "getTreeGridAddedRowHighlightColumns"), v = /* @__PURE__ */ l((t, e, r) => {
40
- var c, d, a, u, R;
41
- const n = ((c = t.GetType) == null ? void 0 : c.call(t, e, r)) || ((a = (d = t.Cols) == null ? void 0 : d[r]) == null ? void 0 : a.Type) || "", s = ((u = t.GetValue) == null ? void 0 : u.call(t, e, r)) ?? e[r];
37
+ }, "removeTreeGridAddedRowHighlightColumn"), _e = /* @__PURE__ */ l((e) => E(
38
+ e == null ? void 0 : e[m]
39
+ ), "getTreeGridAddedRowHighlightColumns"), W = /* @__PURE__ */ l((e, t, r) => {
40
+ var c, o, a, i, R;
41
+ const n = ((c = e.GetType) == null ? void 0 : c.call(e, t, r)) || ((a = (o = e.Cols) == null ? void 0 : o[r]) == null ? void 0 : a.Type) || "", s = ((i = e.GetValue) == null ? void 0 : i.call(e, t, r)) ?? t[r];
42
42
  if (n === "Enum" || n === "Select")
43
43
  return s == null ? "" : `${s}`;
44
44
  try {
45
- const T = (R = t.GetString) == null ? void 0 : R.call(t, e, r);
46
- if (T != null)
47
- return `${T}`;
45
+ const G = (R = e.GetString) == null ? void 0 : R.call(e, t, r);
46
+ if (G != null)
47
+ return `${G}`;
48
48
  } catch {
49
49
  }
50
50
  return s == null ? "" : `${s}`;
51
- }, "getTreeGridCellComparableValue"), P = /* @__PURE__ */ l((t, e) => {
51
+ }, "getTreeGridCellComparableValue"), O = /* @__PURE__ */ l((e, t) => {
52
52
  const r = Object.fromEntries(
53
- Object.keys(t.Cols ?? {}).map((n) => [
53
+ Object.keys(e.Cols ?? {}).map((n) => [
54
54
  n,
55
- v(t, e, n)
55
+ W(e, t, n)
56
56
  ])
57
57
  );
58
- e[I] = r;
59
- }, "markTreeGridAddedRowBaselineValues"), ae = /* @__PURE__ */ l((t, e) => {
58
+ t[A] = r;
59
+ }, "markTreeGridAddedRowBaselineValues"), he = /* @__PURE__ */ l((e, t) => {
60
60
  var r;
61
- return (r = t == null ? void 0 : t[I]) == null ? void 0 : r[e];
62
- }, "getTreeGridAddedRowBaselineValue"), N = /* @__PURE__ */ l((t, e, r) => {
61
+ return (r = e == null ? void 0 : e[A]) == null ? void 0 : r[t];
62
+ }, "getTreeGridAddedRowBaselineValue"), U = /* @__PURE__ */ l((e, t, r) => {
63
63
  var s;
64
- const n = e;
65
- n[i] ?? (n[i] = {}), !((s = n[i]) != null && s[r]) && (n[i][r] = {
66
- className: t.GetAttribute(e, r, "Class"),
67
- color: t.GetAttribute(e, r, "Color")
64
+ const n = t;
65
+ n[u] ?? (n[u] = {}), !((s = n[u]) != null && s[r]) && (n[u][r] = {
66
+ className: e.GetAttribute(t, r, "Class"),
67
+ color: e.GetAttribute(t, r, "Color")
68
68
  });
69
- }, "preserveTreeGridCellStyleBaseline"), g = /* @__PURE__ */ l((t, e) => {
69
+ }, "preserveTreeGridCellStyleBaseline"), X = /* @__PURE__ */ l((e, t) => {
70
70
  var r;
71
- return (r = t[i]) == null ? void 0 : r[e];
72
- }, "getTreeGridCellStyleBaseline"), k = /* @__PURE__ */ l(async () => {
73
- const { exportTreeGridExcel: t } = await import("./treeGridExportExcelUtil.js");
74
- return t;
75
- }, "loadExportTreeGridExcel"), F = /* @__PURE__ */ l((t) => Object.values((t == null ? void 0 : t.Rows) ?? {}).filter((e) => e.Kind === "Data"), "getDataRows"), K = /* @__PURE__ */ l((t, e) => {
76
- const r = (e == null ? void 0 : e.insertPosition) ?? "top", n = e == null ? void 0 : e.parent, s = e == null ? void 0 : e.anchorRow;
77
- let c = n ?? (s ? s.parentNode : null) ?? t.GetFirst(), d = null;
71
+ return (r = e[u]) == null ? void 0 : r[t];
72
+ }, "getTreeGridCellStyleBaseline"), Y = /* @__PURE__ */ l(async () => {
73
+ const { exportTreeGridExcel: e } = await import("./treeGridExportExcelUtil.js");
74
+ return e;
75
+ }, "loadExportTreeGridExcel"), M = /* @__PURE__ */ l((e) => Object.values((e == null ? void 0 : e.Rows) ?? {}).filter((t) => t.Kind === "Data"), "getDataRows"), f = /* @__PURE__ */ l((e) => typeof e == "string" && k.test(e.trim()), "isTreeGridTimeDateFormat"), b = /* @__PURE__ */ l((e, t, r) => {
76
+ var c;
77
+ const n = t, s = (c = e.Cols) == null ? void 0 : c[r];
78
+ return (s == null ? void 0 : s.Type) === "Date" && (f(n[`${r}EditFormat`]) || f(n[`${r}Format`]) || f(s.EditFormat) || f(s.Format));
79
+ }, "isTreeGridTimeDateColumn"), S = /* @__PURE__ */ l((e, t, r) => {
80
+ var s;
81
+ const n = t[r];
82
+ try {
83
+ const c = (s = e.GetString) == null ? void 0 : s.call(e, t, r);
84
+ if (c != null && `${c}` != "")
85
+ return `${c}`;
86
+ } catch {
87
+ }
88
+ return n == null ? "" : `${n}`;
89
+ }, "getTreeGridTimeDateDisplayValue"), J = /* @__PURE__ */ l((e, t) => {
90
+ const r = { ...t };
91
+ return Object.keys(e.Cols ?? {}).forEach((n) => {
92
+ b(e, t, n) && (r[n] = S(e, t, n));
93
+ }), r;
94
+ }, "normalizeTreeGridExternalRow"), B = /* @__PURE__ */ l((e, t) => t.map((r) => J(e, r)), "normalizeTreeGridExternalRows"), q = /* @__PURE__ */ l((e, t) => {
95
+ const r = (t == null ? void 0 : t.insertPosition) ?? "top", n = t == null ? void 0 : t.parent, s = t == null ? void 0 : t.anchorRow;
96
+ let c = n ?? (s ? s.parentNode : null) ?? e.GetFirst(), o = null;
78
97
  switch (r) {
79
98
  case "top":
80
- d = t.GetFirst();
99
+ o = e.GetFirst();
81
100
  break;
82
101
  case "last":
83
- c = t.GetNext(t.GetLast(), t.RowCount > 0 ? t.RowCount + 1 : 0), d = c;
102
+ c = e.GetNext(e.GetLast(), e.RowCount > 0 ? e.RowCount + 1 : 0), o = c;
84
103
  break;
85
104
  case "above":
86
- d = s ?? t.GetFirst();
105
+ o = s ?? e.GetFirst();
87
106
  break;
88
107
  case "below":
89
- d = (s == null ? void 0 : s.nextSibling) ?? t.GetFirst();
108
+ o = (s == null ? void 0 : s.nextSibling) ?? e.GetFirst();
90
109
  break;
91
110
  }
92
- return { resolvedParent: c, next: d };
93
- }, "resolveRowInsertionTarget"), W = /* @__PURE__ */ l((t, e, r) => {
94
- w(r) && Object.entries(r).forEach(([n, s]) => {
95
- var c, d;
96
- if (((d = (c = t.Cols) == null ? void 0 : c[n]) == null ? void 0 : d.Type) === "Date" && typeof s == "string") {
97
- t.SetString(e, n, s, 0);
111
+ return { resolvedParent: c, next: o };
112
+ }, "resolveRowInsertionTarget"), Q = /* @__PURE__ */ l((e, t, r) => {
113
+ if (!j(r))
114
+ return;
115
+ const n = Object.keys(r).filter(Boolean);
116
+ t[h] = n, Object.entries(r).forEach(([s, c]) => {
117
+ var o, a;
118
+ if (((a = (o = e.Cols) == null ? void 0 : o[s]) == null ? void 0 : a.Type) === "Date" && typeof c == "string") {
119
+ e.SetString(t, s, c, 0);
98
120
  return;
99
121
  }
100
- e[n] = s;
122
+ t[s] = c;
101
123
  });
102
- }, "assignInitialRowValues"), U = /* @__PURE__ */ l((t) => $.some((e) => t.startsWith(e)), "isTreeGridDataKey"), X = /* @__PURE__ */ l((t) => Object.fromEntries(
103
- L(Object.keys(t), "id").filter((e) => U(e) && !y(t[e])).map((e) => [e, t[e]])
104
- ), "normalizeAddedRow"), z = /* @__PURE__ */ l((t, e) => t.filter((r) => V(r, e) === "1" && r.Deleted !== "1").map((r) => e === "Changed" ? H(r, ["id", "Changed"]) : X(r)).filter((r) => !y(r)), "getChangedRowsByStatus"), o = /* @__PURE__ */ l((t) => Grids[t], "getTreeGridById"), oe = /* @__PURE__ */ l((t) => {
105
- const e = o(t);
106
- return F(e);
107
- }, "getTreeGridDataRowsById"), ue = /* @__PURE__ */ l((t, e) => {
108
- const r = o(t);
124
+ }, "assignInitialRowValues"), Z = /* @__PURE__ */ l((e) => P.some((t) => e.startsWith(t)), "isTreeGridDataKey"), g = /* @__PURE__ */ l((e) => e === 0 || e === !1 || e === "0", "isHiddenTreeGridValue"), p = /* @__PURE__ */ l((e, t) => {
125
+ var r, n;
126
+ return !g((n = (r = e == null ? void 0 : e.Cols) == null ? void 0 : r[t]) == null ? void 0 : n.Visible);
127
+ }, "isVisibleTreeGridColumn"), ee = /* @__PURE__ */ l((e, t) => I(
128
+ e == null ? void 0 : e[h]
129
+ ).includes(t), "isTreeGridAddedRowInitialValueKey"), te = /* @__PURE__ */ l((e, t) => {
130
+ var r;
131
+ return typeof t.id == "string" ? (r = e == null ? void 0 : e.Rows) == null ? void 0 : r[t.id] : null;
132
+ }, "getLiveTreeGridChangedRow"), re = /* @__PURE__ */ l((e, t, r) => !Z(r) || D(t[r]) ? !1 : p(e, r) ? !0 : ee(te(e, t), r), "shouldIncludeAddedRowDataKey"), ne = /* @__PURE__ */ l((e, t) => Object.fromEntries(
133
+ v(Object.keys(t), "id").filter((r) => re(e, t, r)).map((r) => [r, t[r]])
134
+ ), "normalizeAddedRow"), se = /* @__PURE__ */ l((e, t, r) => t.filter((n) => F(n, r) === "1" && n.Deleted !== "1").map(
135
+ (n) => r === "Changed" ? K(n, ["id", "Changed"]) : ne(e, n)
136
+ ).filter((n) => !D(n)), "getChangedRowsByStatus"), le = /* @__PURE__ */ l((e, t) => e ? t.map((r) => {
137
+ const n = typeof r.id == "string" ? e.Rows[r.id] : null;
138
+ if (!n)
139
+ return r;
140
+ const s = { ...r };
141
+ return Object.keys(r).forEach((c) => {
142
+ b(e, n, c) && (s[c] = S(e, n, c));
143
+ }), s;
144
+ }) : t, "normalizeTreeGridChangedRows"), d = /* @__PURE__ */ l((e) => Grids[e], "getTreeGridById"), Ae = /* @__PURE__ */ l((e) => {
145
+ const t = d(e);
146
+ return t ? B(t, M(t)) : [];
147
+ }, "getTreeGridDataRowsById"), Ie = /* @__PURE__ */ l((e, t) => {
148
+ const r = d(e);
109
149
  if (!r)
110
150
  return;
111
151
  const n = r.Data.Data;
112
152
  r.Data.Data = {
113
153
  ...n,
114
- Data: { Body: [e || []] },
154
+ Data: { Body: [t || []] },
115
155
  Url: ""
116
156
  }, r.ReloadBody(), window.setTimeout(() => {
117
- C(t);
157
+ C(e);
118
158
  }, 0);
119
- }, "reloadTreeGridBodyById"), ie = /* @__PURE__ */ l((t, e) => {
120
- const r = o(t);
159
+ }, "reloadTreeGridBodyById"), be = /* @__PURE__ */ l((e, t) => {
160
+ const r = d(e);
121
161
  if (!r)
122
162
  return;
123
- const n = e == null ? void 0 : e.canSelect, s = e == null ? void 0 : e.initialValues, { resolvedParent: c, next: d } = K(r, e), a = r.AddRow(c, d, 1);
124
- j(a), W(r, a, s), P(r, a), a.CanEdit = 1, a.CanDelete = 1, a.CanSelect = n ? 1 : 0, r.Focus(a), r.RefreshRow(a), window.setTimeout(() => {
125
- C(t);
163
+ const n = t == null ? void 0 : t.canSelect, s = t == null ? void 0 : t.initialValues, { resolvedParent: c, next: o } = q(r, t), a = r.AddRow(c, o, 1);
164
+ z(a), Q(r, a, s), O(r, a), a.CanEdit = 1, a.CanDelete = 1, a.CanSelect = n ? 1 : 0, r.Focus(a), r.RefreshRow(a), window.setTimeout(() => {
165
+ C(e);
126
166
  }, 0);
127
- }, "addTreeGridRowById"), me = /* @__PURE__ */ l((t) => {
128
- const e = o(t), r = b(e == null ? void 0 : e.GetXmlData("changes,allcols,nogrid,noio"));
129
- return E(r) ? Object.fromEntries(
130
- x.map((n) => [
131
- B(n),
132
- z(r, n)
167
+ }, "addTreeGridRowById"), Se = /* @__PURE__ */ l((e) => {
168
+ const t = d(e), r = $(t == null ? void 0 : t.GetXmlData("changes,allcols,nogrid,noio"));
169
+ return y(r) ? Object.fromEntries(
170
+ N.map((n) => [
171
+ x(n),
172
+ se(
173
+ t,
174
+ le(t, r),
175
+ n
176
+ )
133
177
  ])
134
178
  ) : { added: [], changed: [] };
135
- }, "getTreeGridRowChangesById"), Ge = /* @__PURE__ */ l((t, e) => {
136
- const r = o(t);
137
- r && k().then(
138
- (n) => n(r, { exportName: e ?? "" })
179
+ }, "getTreeGridRowChangesById"), Be = /* @__PURE__ */ l((e, t) => {
180
+ const r = d(e);
181
+ r && Y().then(
182
+ (n) => n(r, { exportName: t ?? "" })
139
183
  );
140
- }, "exportTreeGridToExcelById"), Re = /* @__PURE__ */ l((t) => {
141
- const e = o(t);
142
- return (e == null ? void 0 : e.GetSelRows()) ?? [];
143
- }, "getTreeGridSelectedRowsById"), Te = /* @__PURE__ */ l((t, e) => {
144
- const r = o(t);
145
- if (!r || !(e != null && e.targetKey))
184
+ }, "exportTreeGridToExcelById"), Ve = /* @__PURE__ */ l((e) => {
185
+ const t = d(e), r = t == null ? void 0 : t.GetSelRows();
186
+ return t && r ? B(t, r) : [];
187
+ }, "getTreeGridSelectedRowsById"), we = /* @__PURE__ */ l((e, t) => {
188
+ const r = d(e);
189
+ if (!r || !(t != null && t.targetKey))
146
190
  return;
147
- const n = e == null ? void 0 : e.targetKey;
148
- if (e == null ? void 0 : e.canVisible) {
191
+ const n = t == null ? void 0 : t.targetKey;
192
+ if (t == null ? void 0 : t.canVisible) {
149
193
  r.ShowCol(n);
150
194
  return;
151
195
  }
152
196
  r.HideCol(n);
153
- }, "setTreeGridColumnVisibilityById"), Ce = /* @__PURE__ */ l((t, e) => {
154
- const r = o(t), n = e == null ? void 0 : e.row, s = e == null ? void 0 : e.col;
155
- !r || !n || !s || (N(r, n, s), r.SetValue(n, `${s}Class`, _), r.SetValue(n, `${s}Color`, e.backgroundColor ?? S), r.RefreshCell(n, s));
156
- }, "highlightTreeGridCellById"), fe = /* @__PURE__ */ l((t, e) => {
157
- const r = o(t), n = e == null ? void 0 : e.row, s = e == null ? void 0 : e.col;
197
+ }, "setTreeGridColumnVisibilityById"), He = /* @__PURE__ */ l((e, t) => {
198
+ const r = d(e), n = t == null ? void 0 : t.row, s = t == null ? void 0 : t.col;
199
+ !r || !n || !s || (U(r, n, s), r.SetValue(n, `${s}Class`, H), r.SetValue(n, `${s}Color`, t.backgroundColor ?? L), r.RefreshCell(n, s));
200
+ }, "highlightTreeGridCellById"), Le = /* @__PURE__ */ l((e, t) => {
201
+ const r = d(e), n = t == null ? void 0 : t.row, s = t == null ? void 0 : t.col;
158
202
  if (!r || !n || !s)
159
203
  return;
160
- const c = g(n, s);
204
+ const c = X(n, s);
161
205
  r.SetValue(n, `${s}Class`, (c == null ? void 0 : c.className) ?? ""), r.SetValue(n, `${s}Color`, (c == null ? void 0 : c.color) ?? ""), r.RefreshCell(n, s);
162
- }, "clearTreeGridCellHighlightById"), A = /* @__PURE__ */ l((t) => {
163
- const e = o(t);
164
- e && e.ActionDeselectAll(1, 0);
165
- }, "resetTreeGridSelectionById"), Ee = /* @__PURE__ */ l((t) => {
166
- t.forEach(A);
167
- }, "resetTreeGridSelectionsByIds"), Y = /* @__PURE__ */ l((t) => {
168
- const e = o(t);
169
- e && (e.ActionUndoAll(1, 0), A(t), window.setTimeout(() => {
170
- C(t);
206
+ }, "clearTreeGridCellHighlightById"), V = /* @__PURE__ */ l((e) => {
207
+ const t = d(e);
208
+ t && t.ActionDeselectAll(1, 0);
209
+ }, "resetTreeGridSelectionById"), $e = /* @__PURE__ */ l((e) => {
210
+ e.forEach(V);
211
+ }, "resetTreeGridSelectionsByIds"), ce = /* @__PURE__ */ l((e) => {
212
+ const t = d(e);
213
+ t && (t.ActionUndoAll(1, 0), V(e), window.setTimeout(() => {
214
+ C(e);
171
215
  }, 0));
172
- }, "resetTreeGridChangesById"), ye = /* @__PURE__ */ l((t) => {
173
- t.forEach(Y);
174
- }, "resetTreeGridChangesByIds"), he = /* @__PURE__ */ l((t, e, r, n, s) => {
216
+ }, "resetTreeGridChangesById"), xe = /* @__PURE__ */ l((e) => {
217
+ e.forEach(ce);
218
+ }, "resetTreeGridChangesByIds"), je = /* @__PURE__ */ l((e, t, r, n, s) => {
175
219
  if (!(r != null && r.length))
176
220
  return;
177
- const c = o(t);
221
+ const c = d(e);
178
222
  if (!c)
179
223
  return;
180
- const d = r.map((u) => {
181
- const R = u;
182
- return `${s.map((G) => R[G]).find((G) => G != null && G !== "") ?? ""}`;
183
- }).join("|"), a = r.map((u) => `${u[n] ?? ""}`).join("|");
184
- c.SetAttribute(null, e, "Type", "Enum", 0, 0), c.SetAttribute(null, e, "Enum", `|${d}`, 0, 0), c.SetAttribute(null, e, "EnumKeys", `|${a}`, 1, 0);
224
+ const o = r.map((i) => {
225
+ const R = i;
226
+ return `${s.map((T) => R[T]).find((T) => T != null && T !== "") ?? ""}`;
227
+ }).join("|"), a = r.map((i) => `${i[n] ?? ""}`).join("|");
228
+ c.SetAttribute(null, t, "Type", "Enum", 0, 0), c.SetAttribute(null, t, "Enum", `|${o}`, 0, 0), c.SetAttribute(null, t, "EnumKeys", `|${a}`, 1, 0);
185
229
  }, "setTreeGridColumnEnumOptionsById");
186
230
  export {
187
- I as TREEGRID_ADDED_ROW_BASELINE_VALUES_KEY,
188
- h as TREEGRID_ADDED_ROW_BY_ID_FLAG,
231
+ A as TREEGRID_ADDED_ROW_BASELINE_VALUES_KEY,
232
+ _ as TREEGRID_ADDED_ROW_BY_ID_FLAG,
189
233
  m as TREEGRID_ADDED_ROW_HIGHLIGHT_COLUMNS_KEY,
190
- _ as TREEGRID_CELL_HIGHLIGHT_CLASS,
191
- S as TREEGRID_CELL_HIGHLIGHT_COLOR,
192
- De as TREEGRID_INPUT_CELL_COLOR,
193
- _e as TREEGRID_WARNING_CELL_COLOR,
194
- ie as addTreeGridRowById,
195
- le as appendTreeGridAddedRowHighlightColumn,
196
- fe as clearTreeGridCellHighlightById,
197
- Ge as exportTreeGridToExcelById,
198
- ae as getTreeGridAddedRowBaselineValue,
199
- de as getTreeGridAddedRowHighlightColumns,
200
- o as getTreeGridById,
201
- v as getTreeGridCellComparableValue,
202
- oe as getTreeGridDataRowsById,
203
- me as getTreeGridRowChangesById,
204
- Re as getTreeGridSelectedRowsById,
205
- Ce as highlightTreeGridCellById,
206
- se as isTreeGridRowAddedById,
207
- j as markTreeGridRowAddedById,
208
- ue as reloadTreeGridBodyById,
209
- ce as removeTreeGridAddedRowHighlightColumn,
210
- Y as resetTreeGridChangesById,
211
- ye as resetTreeGridChangesByIds,
212
- A as resetTreeGridSelectionById,
213
- Ee as resetTreeGridSelectionsByIds,
214
- he as setTreeGridColumnEnumOptionsById,
215
- Te as setTreeGridColumnVisibilityById
234
+ H as TREEGRID_CELL_CHANGED_CLASS,
235
+ L as TREEGRID_CELL_HIGHLIGHT_COLOR,
236
+ ve as TREEGRID_INPUT_CELL_COLOR,
237
+ Ne as TREEGRID_WARNING_CELL_COLOR,
238
+ be as addTreeGridRowById,
239
+ ye as appendTreeGridAddedRowHighlightColumn,
240
+ Le as clearTreeGridCellHighlightById,
241
+ Be as exportTreeGridToExcelById,
242
+ he as getTreeGridAddedRowBaselineValue,
243
+ _e as getTreeGridAddedRowHighlightColumns,
244
+ d as getTreeGridById,
245
+ W as getTreeGridCellComparableValue,
246
+ Ae as getTreeGridDataRowsById,
247
+ Se as getTreeGridRowChangesById,
248
+ Ve as getTreeGridSelectedRowsById,
249
+ He as highlightTreeGridCellById,
250
+ Ee as isTreeGridRowAddedById,
251
+ z as markTreeGridRowAddedById,
252
+ J as normalizeTreeGridExternalRow,
253
+ B as normalizeTreeGridExternalRows,
254
+ Ie as reloadTreeGridBodyById,
255
+ De as removeTreeGridAddedRowHighlightColumn,
256
+ ce as resetTreeGridChangesById,
257
+ xe as resetTreeGridChangesByIds,
258
+ V as resetTreeGridSelectionById,
259
+ $e as resetTreeGridSelectionsByIds,
260
+ je as setTreeGridColumnEnumOptionsById,
261
+ we as setTreeGridColumnVisibilityById
216
262
  };
217
263
  //# sourceMappingURL=treeGridUtil.js.map