@owp/core 2.5.29 → 2.5.31
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.
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index16.js +4 -4
- package/dist/_virtual/index17.js +4 -4
- package/dist/_virtual/index18.js +4 -4
- package/dist/_virtual/index19.js +4 -4
- package/dist/components/OwpTable/OwpDataTable.js +109 -104
- package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +475 -427
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +335 -288
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
- package/dist/constants/gridTheme.js +8 -7
- package/dist/constants/gridTheme.js.map +1 -1
- package/dist/constants/treeGrid.js +26 -25
- package/dist/constants/treeGrid.js.map +1 -1
- package/dist/constants.js +25 -24
- package/dist/features/themePreview/components/ThemePreviewCanvasSections.js +120 -114
- package/dist/features/themePreview/components/ThemePreviewCanvasSections.js.map +1 -1
- package/dist/features/themePreview/configs/grid.js +1 -0
- package/dist/features/themePreview/configs/grid.js.map +1 -1
- package/dist/features/themePreview/utils/themePreviewDefinitions.js +4 -0
- package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -1
- package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
- 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
- package/dist/owp-app.css +1 -1
- package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +2 -1
- package/dist/types/constants/gridTheme.d.ts +2 -0
- package/dist/types/constants/treeGrid.d.ts +1 -0
- package/dist/types/features/themePreview/configs/grid.d.ts +1 -0
- package/dist/types/features/themePreview/configs/settings.d.ts +1 -0
- package/dist/types/types/OwpGridThemeTypes.d.ts +1 -0
- package/dist/types/utils/treeGridUtil.d.ts +42 -0
- package/dist/utils/treeGridUtil.js +282 -177
- package/dist/utils/treeGridUtil.js.map +1 -1
- package/dist/utils.js +31 -30
- package/package.json +1 -1
|
@@ -1,267 +1,372 @@
|
|
|
1
|
-
var
|
|
2
|
-
var l = (
|
|
3
|
-
import { TREEGRID_CELL_CHANGED_CLASS as
|
|
4
|
-
import { TREEGRID_INPUT_CELL_COLOR as
|
|
5
|
-
import { parseTreeGridXmlToJson as
|
|
6
|
-
import { emitTreeGridBodyRowsChanged as
|
|
7
|
-
import { isArray as
|
|
8
|
-
import { lowerCase as
|
|
9
|
-
import { isPlainObject as
|
|
10
|
-
import { get as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, "
|
|
20
|
-
|
|
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(({
|
|
14
|
+
label: e
|
|
15
|
+
}) => `${e} 필수 입력`, "DEFAULT_TREE_GRID_REQUIRED_CELL_MESSAGE_FACTORY"), Q = [
|
|
16
|
+
"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];
|
|
21
|
+
return !!e && t !== 0 && t !== !1 && t !== void 0;
|
|
22
|
+
}, "isTreeGridRowAddedById"), E = /* @__PURE__ */ l((e) => {
|
|
23
|
+
const t = e == null ? void 0 : e.Added;
|
|
24
|
+
return t === 1 || t === "1" || t === !0 || Z(e);
|
|
25
|
+
}, "isTreeGridAddedRow"), g = /* @__PURE__ */ l((e) => {
|
|
26
|
+
const t = e == null ? void 0 : e.Changed;
|
|
27
|
+
return !E(e) && (t === 1 || t === "1" || t === !0);
|
|
28
|
+
}, "isTreeGridChangedRow"), p = /* @__PURE__ */ l((e) => {
|
|
29
|
+
const t = e == null ? void 0 : e.Deleted;
|
|
30
|
+
return t === 1 || t === "1" || t === !0;
|
|
31
|
+
}, "isTreeGridDeletedRow"), ee = /* @__PURE__ */ l((e) => {
|
|
32
|
+
const t = y(e) ? e : e ? [e] : Q;
|
|
33
|
+
return t.includes("all") ? /* @__PURE__ */ new Set(["all"]) : new Set(
|
|
34
|
+
t.filter(
|
|
35
|
+
(r) => r === "added" || r === "changed"
|
|
36
|
+
)
|
|
37
|
+
);
|
|
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
|
+
if (!e || !t)
|
|
21
40
|
return;
|
|
22
|
-
const r =
|
|
23
|
-
r[
|
|
41
|
+
const r = e, n = _(
|
|
42
|
+
r[C]
|
|
24
43
|
);
|
|
25
|
-
n.includes(
|
|
26
|
-
}, "appendTreeGridAddedRowHighlightColumn"),
|
|
27
|
-
if (!
|
|
44
|
+
n.includes(t) || (r[C] = [...n, t]);
|
|
45
|
+
}, "appendTreeGridAddedRowHighlightColumn"), Ue = /* @__PURE__ */ l((e, t) => {
|
|
46
|
+
if (!e || !t)
|
|
28
47
|
return;
|
|
29
|
-
const r =
|
|
30
|
-
r[
|
|
31
|
-
).filter((a) => a !==
|
|
48
|
+
const r = e, s = _(
|
|
49
|
+
r[C]
|
|
50
|
+
).filter((a) => a !== t);
|
|
32
51
|
if (s.length) {
|
|
33
|
-
r[
|
|
52
|
+
r[C] = s;
|
|
34
53
|
return;
|
|
35
54
|
}
|
|
36
|
-
delete r[
|
|
37
|
-
}, "removeTreeGridAddedRowHighlightColumn"),
|
|
38
|
-
|
|
39
|
-
), "getTreeGridAddedRowHighlightColumns"),
|
|
40
|
-
var a, c,
|
|
41
|
-
const n = ((a =
|
|
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];
|
|
42
61
|
if (n === "Enum" || n === "Select")
|
|
43
62
|
return s == null ? "" : `${s}`;
|
|
44
63
|
try {
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
return `${
|
|
64
|
+
const o = (f = e.GetString) == null ? void 0 : f.call(e, t, r);
|
|
65
|
+
if (o != null)
|
|
66
|
+
return `${o}`;
|
|
48
67
|
} catch {
|
|
49
68
|
}
|
|
50
69
|
return s == null ? "" : `${s}`;
|
|
51
|
-
}, "getTreeGridCellComparableValue"),
|
|
70
|
+
}, "getTreeGridCellComparableValue"), re = /* @__PURE__ */ l((e, t) => {
|
|
52
71
|
const r = Object.fromEntries(
|
|
53
|
-
Object.keys(
|
|
72
|
+
Object.keys(e.Cols ?? {}).map((n) => [
|
|
54
73
|
n,
|
|
55
|
-
|
|
74
|
+
L(e, t, n)
|
|
56
75
|
])
|
|
57
76
|
);
|
|
58
|
-
|
|
59
|
-
}, "markTreeGridAddedRowBaselineValues"),
|
|
77
|
+
t[B] = r;
|
|
78
|
+
}, "markTreeGridAddedRowBaselineValues"), Oe = /* @__PURE__ */ l((e, t) => {
|
|
60
79
|
var r;
|
|
61
|
-
return (r =
|
|
62
|
-
}, "getTreeGridAddedRowBaselineValue"),
|
|
80
|
+
return (r = e == null ? void 0 : e[B]) == null ? void 0 : r[t];
|
|
81
|
+
}, "getTreeGridAddedRowBaselineValue"), ne = /* @__PURE__ */ l((e, t, r) => {
|
|
63
82
|
var s;
|
|
64
|
-
const n =
|
|
65
|
-
n[
|
|
66
|
-
className:
|
|
67
|
-
color:
|
|
83
|
+
const n = t;
|
|
84
|
+
n[R] ?? (n[R] = {}), !((s = n[R]) != null && s[r]) && (n[R][r] = {
|
|
85
|
+
className: e.GetAttribute(t, r, "Class"),
|
|
86
|
+
color: e.GetAttribute(t, r, "Color")
|
|
68
87
|
});
|
|
69
|
-
}, "preserveTreeGridCellStyleBaseline"),
|
|
88
|
+
}, "preserveTreeGridCellStyleBaseline"), se = /* @__PURE__ */ l((e, t) => {
|
|
70
89
|
var r;
|
|
71
|
-
return (r =
|
|
72
|
-
}, "getTreeGridCellStyleBaseline"),
|
|
73
|
-
const { exportTreeGridExcel:
|
|
74
|
-
return
|
|
75
|
-
}, "loadExportTreeGridExcel"),
|
|
90
|
+
return (r = e[R]) == null ? void 0 : r[t];
|
|
91
|
+
}, "getTreeGridCellStyleBaseline"), le = /* @__PURE__ */ l(async () => {
|
|
92
|
+
const { exportTreeGridExcel: e } = await import("./treeGridExportExcelUtil.js");
|
|
93
|
+
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) => {
|
|
95
|
+
if (typeof t == "string") {
|
|
96
|
+
const n = t.trim();
|
|
97
|
+
return n ? { key: n } : null;
|
|
98
|
+
}
|
|
99
|
+
if (!I(t) || typeof t.key != "string")
|
|
100
|
+
return null;
|
|
101
|
+
const r = t.key.trim();
|
|
102
|
+
return r ? {
|
|
103
|
+
key: r,
|
|
104
|
+
label: typeof t.label == "string" ? t.label.trim() : void 0,
|
|
105
|
+
message: typeof t.message == "string" ? t.message : void 0
|
|
106
|
+
} : null;
|
|
107
|
+
}).filter((t) => !!t) : [], "normalizeTreeGridRequiredCellColumns"), k = /* @__PURE__ */ l((e, t, r) => {
|
|
108
|
+
var s;
|
|
109
|
+
const n = (s = e.CanEdit) == null ? void 0 : s.call(e, t, r);
|
|
110
|
+
return n === 1 || n === "1" || n === !0;
|
|
111
|
+
}, "isTreeGridEditableCell"), ie = /* @__PURE__ */ l((e, t, r) => {
|
|
112
|
+
const n = ce(r.columns);
|
|
113
|
+
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;
|
|
119
|
+
if (t.label)
|
|
120
|
+
return t.label;
|
|
121
|
+
try {
|
|
122
|
+
const c = (n = e.GetCaption) == null ? void 0 : n.call(e, t.key);
|
|
123
|
+
if (c)
|
|
124
|
+
return `${c}`.trim();
|
|
125
|
+
} catch {
|
|
126
|
+
}
|
|
127
|
+
const r = (a = (s = e.Cols) == null ? void 0 : s[t.key]) == null ? void 0 : a.Caption;
|
|
128
|
+
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) => {
|
|
76
132
|
var a;
|
|
77
|
-
const n =
|
|
78
|
-
return (s == null ? void 0 : s.Type) === "Date" && (
|
|
79
|
-
}, "isTreeGridTimeDateColumn"),
|
|
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) => {
|
|
80
136
|
var s;
|
|
81
|
-
const n =
|
|
137
|
+
const n = t[r];
|
|
82
138
|
try {
|
|
83
|
-
const a = (s =
|
|
139
|
+
const a = (s = e.GetString) == null ? void 0 : s.call(e, t, r);
|
|
84
140
|
if (a != null && `${a}` != "")
|
|
85
141
|
return `${a}`;
|
|
86
142
|
} catch {
|
|
87
143
|
}
|
|
88
144
|
return n == null ? "" : `${n}`;
|
|
89
|
-
}, "getTreeGridTimeDateDisplayValue"),
|
|
90
|
-
const r = { ...
|
|
91
|
-
return Object.keys(
|
|
92
|
-
|
|
145
|
+
}, "getTreeGridTimeDateDisplayValue"), Te = /* @__PURE__ */ l((e, t) => {
|
|
146
|
+
const r = { ...t };
|
|
147
|
+
return Object.keys(e.Cols ?? {}).forEach((n) => {
|
|
148
|
+
F(e, t, n) && (r[n] = $(e, t, n));
|
|
93
149
|
}), r;
|
|
94
|
-
}, "normalizeTreeGridExternalRow"),
|
|
95
|
-
const r = (
|
|
96
|
-
let a = n ?? (s ? s.parentNode : null) ??
|
|
150
|
+
}, "normalizeTreeGridExternalRow"), v = /* @__PURE__ */ l((e, t) => t.map((r) => Te(e, r)), "normalizeTreeGridExternalRows"), Re = /* @__PURE__ */ l((e, t) => {
|
|
151
|
+
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;
|
|
97
153
|
switch (r) {
|
|
98
154
|
case "top":
|
|
99
|
-
c =
|
|
155
|
+
c = e.GetFirst();
|
|
100
156
|
break;
|
|
101
157
|
case "last":
|
|
102
|
-
a =
|
|
158
|
+
a = e.GetNext(e.GetLast(), e.RowCount > 0 ? e.RowCount + 1 : 0), c = a;
|
|
103
159
|
break;
|
|
104
160
|
case "above":
|
|
105
|
-
c = s ??
|
|
161
|
+
c = s ?? e.GetFirst();
|
|
106
162
|
break;
|
|
107
163
|
case "below":
|
|
108
|
-
c = (s == null ? void 0 : s.nextSibling) ??
|
|
164
|
+
c = (s == null ? void 0 : s.nextSibling) ?? e.GetFirst();
|
|
109
165
|
break;
|
|
110
166
|
}
|
|
111
167
|
return { resolvedParent: a, next: c };
|
|
112
|
-
}, "resolveRowInsertionTarget"),
|
|
113
|
-
if (!
|
|
168
|
+
}, "resolveRowInsertionTarget"), Ce = /* @__PURE__ */ l((e, t, r) => {
|
|
169
|
+
if (!I(r))
|
|
114
170
|
return;
|
|
115
171
|
const n = Object.keys(r).filter(Boolean);
|
|
116
|
-
|
|
117
|
-
var c,
|
|
118
|
-
if (((
|
|
119
|
-
|
|
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);
|
|
120
176
|
return;
|
|
121
177
|
}
|
|
122
|
-
|
|
178
|
+
t[s] = a;
|
|
123
179
|
});
|
|
124
|
-
}, "assignInitialRowValues"),
|
|
125
|
-
const n =
|
|
180
|
+
}, "assignInitialRowValues"), Ge = /* @__PURE__ */ l((e, t, r) => {
|
|
181
|
+
const n = h(r);
|
|
126
182
|
if (!n.length)
|
|
127
183
|
return;
|
|
128
|
-
const s =
|
|
184
|
+
const s = t;
|
|
129
185
|
n.forEach((a) => {
|
|
130
186
|
var c;
|
|
131
|
-
(c =
|
|
187
|
+
(c = e.Cols) != null && c[a] && (s[`${a}CanEdit`] = 1);
|
|
132
188
|
});
|
|
133
|
-
}, "assignEditableAddedRowColumns"),
|
|
189
|
+
}, "assignEditableAddedRowColumns"), Ee = /* @__PURE__ */ l((e) => M.some((t) => e.startsWith(t)), "isTreeGridDataKey"), me = /* @__PURE__ */ l((e, t) => {
|
|
190
|
+
var r;
|
|
191
|
+
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) => {
|
|
134
193
|
var r, n;
|
|
135
|
-
return !
|
|
136
|
-
}, "isVisibleTreeGridColumn"),
|
|
137
|
-
|
|
138
|
-
).includes(
|
|
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) => {
|
|
139
198
|
var r;
|
|
140
|
-
return typeof
|
|
141
|
-
}, "getLiveTreeGridChangedRow"),
|
|
142
|
-
|
|
143
|
-
)
|
|
144
|
-
(
|
|
145
|
-
)
|
|
146
|
-
|
|
199
|
+
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)
|
|
203
|
+
).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) => {
|
|
207
|
+
const n = typeof r.id == "string" ? e.Rows[r.id] : null;
|
|
147
208
|
if (!n)
|
|
148
209
|
return r;
|
|
149
210
|
const s = { ...r };
|
|
150
211
|
return Object.keys(r).forEach((a) => {
|
|
151
|
-
|
|
212
|
+
F(e, n, a) && (s[a] = $(e, n, a));
|
|
152
213
|
}), s;
|
|
153
|
-
}) :
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
214
|
+
}) : t, "normalizeTreeGridChangedRows"), Ve = /* @__PURE__ */ l((e) => {
|
|
215
|
+
var t;
|
|
216
|
+
try {
|
|
217
|
+
(t = e == null ? void 0 : e.EndEdit) == null || t.call(e, 1);
|
|
218
|
+
} catch {
|
|
219
|
+
}
|
|
220
|
+
}, "commitTreeGridActiveEdit"), u = /* @__PURE__ */ l((e) => Grids[e], "getTreeGridById"), Pe = /* @__PURE__ */ l((e) => {
|
|
221
|
+
const t = u(e);
|
|
222
|
+
return t ? v(t, ae(t)) : [];
|
|
223
|
+
}, "getTreeGridDataRowsById"), we = /* @__PURE__ */ l((e, t) => {
|
|
224
|
+
const r = u(e);
|
|
158
225
|
if (!r)
|
|
159
226
|
return;
|
|
160
227
|
const n = r.Data.Data;
|
|
161
228
|
r.Data.Data = {
|
|
162
229
|
...n,
|
|
163
|
-
Data: { Body: [
|
|
230
|
+
Data: { Body: [t || []] },
|
|
164
231
|
Url: ""
|
|
165
232
|
}, r.ReloadBody(), window.setTimeout(() => {
|
|
166
|
-
|
|
233
|
+
m(e);
|
|
167
234
|
}, 0);
|
|
168
|
-
}, "reloadTreeGridBodyById"),
|
|
169
|
-
const r =
|
|
235
|
+
}, "reloadTreeGridBodyById"), We = /* @__PURE__ */ l((e, t) => {
|
|
236
|
+
const r = u(e);
|
|
170
237
|
if (!r)
|
|
171
238
|
return;
|
|
172
|
-
const n =
|
|
173
|
-
|
|
174
|
-
|
|
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);
|
|
175
242
|
}, 0);
|
|
176
|
-
}, "addTreeGridRowById"),
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
243
|
+
}, "addTreeGridRowById"), Me = /* @__PURE__ */ l((e, t) => {
|
|
244
|
+
const r = u(e);
|
|
245
|
+
if (!r)
|
|
246
|
+
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 = {
|
|
253
|
+
grid: r,
|
|
254
|
+
row: i,
|
|
255
|
+
col: o,
|
|
256
|
+
key: o,
|
|
257
|
+
label: H,
|
|
258
|
+
value: T
|
|
259
|
+
};
|
|
260
|
+
if (!oe(T)) {
|
|
261
|
+
r.SetAttribute(i, o, "Error", "", c);
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
const A = ue(
|
|
265
|
+
D,
|
|
266
|
+
f,
|
|
267
|
+
t.messageFactory
|
|
268
|
+
), j = { ...D, message: A };
|
|
269
|
+
r.SetAttribute(i, o, "Error", A, c), a.push(j);
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
const d = a[0];
|
|
273
|
+
return fe(r, d, t), {
|
|
274
|
+
valid: !d,
|
|
275
|
+
errors: a,
|
|
276
|
+
firstError: d
|
|
277
|
+
};
|
|
278
|
+
}, "validateTreeGridRequiredCellsById"), Ye = /* @__PURE__ */ l((e) => {
|
|
279
|
+
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(
|
|
286
|
+
t,
|
|
287
|
+
Se(t, r),
|
|
184
288
|
n
|
|
185
289
|
)
|
|
186
290
|
])
|
|
187
291
|
) : { added: [], changed: [] };
|
|
188
|
-
}, "getTreeGridRowChangesById"),
|
|
189
|
-
const r =
|
|
190
|
-
r &&
|
|
191
|
-
(n) => n(r, { exportName:
|
|
292
|
+
}, "getTreeGridRowChangesById"), Xe = /* @__PURE__ */ l((e, t) => {
|
|
293
|
+
const r = u(e);
|
|
294
|
+
r && le().then(
|
|
295
|
+
(n) => n(r, { exportName: t ?? "" })
|
|
192
296
|
);
|
|
193
|
-
}, "exportTreeGridToExcelById"),
|
|
194
|
-
const
|
|
195
|
-
return
|
|
196
|
-
}, "getTreeGridSelectedRowsById"),
|
|
197
|
-
const r =
|
|
198
|
-
if (!r || !(
|
|
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) => {
|
|
301
|
+
const r = u(e);
|
|
302
|
+
if (!r || !(t != null && t.targetKey))
|
|
199
303
|
return;
|
|
200
|
-
const n =
|
|
201
|
-
if (
|
|
304
|
+
const n = t == null ? void 0 : t.targetKey;
|
|
305
|
+
if (t == null ? void 0 : t.canVisible) {
|
|
202
306
|
r.ShowCol(n);
|
|
203
307
|
return;
|
|
204
308
|
}
|
|
205
309
|
r.HideCol(n);
|
|
206
|
-
}, "setTreeGridColumnVisibilityById"),
|
|
207
|
-
const r =
|
|
208
|
-
!r || !n || !s || (
|
|
209
|
-
}, "highlightTreeGridCellById"),
|
|
210
|
-
const r =
|
|
310
|
+
}, "setTreeGridColumnVisibilityById"), Ze = /* @__PURE__ */ l((e, t) => {
|
|
311
|
+
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) => {
|
|
314
|
+
const r = u(e), n = t == null ? void 0 : t.row, s = t == null ? void 0 : t.col;
|
|
211
315
|
if (!r || !n || !s)
|
|
212
316
|
return;
|
|
213
|
-
const a =
|
|
317
|
+
const a = se(n, s);
|
|
214
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);
|
|
215
|
-
}, "clearTreeGridCellHighlightById"),
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
}, "resetTreeGridSelectionById"),
|
|
219
|
-
|
|
220
|
-
}, "resetTreeGridSelectionsByIds"),
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
|
|
319
|
+
}, "clearTreeGridCellHighlightById"), x = /* @__PURE__ */ l((e) => {
|
|
320
|
+
const t = u(e);
|
|
321
|
+
t && t.ActionDeselectAll(1, 0);
|
|
322
|
+
}, "resetTreeGridSelectionById"), pe = /* @__PURE__ */ l((e) => {
|
|
323
|
+
e.forEach(x);
|
|
324
|
+
}, "resetTreeGridSelectionsByIds"), Be = /* @__PURE__ */ l((e) => {
|
|
325
|
+
const t = u(e);
|
|
326
|
+
t && (t.ActionUndoAll(1, 0), x(e), t.Calculate(1, 1), window.setTimeout(() => {
|
|
327
|
+
m(e);
|
|
224
328
|
}, 0));
|
|
225
|
-
}, "resetTreeGridChangesById"),
|
|
226
|
-
|
|
227
|
-
}, "resetTreeGridChangesByIds"),
|
|
329
|
+
}, "resetTreeGridChangesById"), et = /* @__PURE__ */ l((e) => {
|
|
330
|
+
e.forEach(Be);
|
|
331
|
+
}, "resetTreeGridChangesByIds"), tt = /* @__PURE__ */ l((e, t, r, n, s) => {
|
|
228
332
|
if (!(r != null && r.length))
|
|
229
333
|
return;
|
|
230
|
-
const a =
|
|
334
|
+
const a = u(e);
|
|
231
335
|
if (!a)
|
|
232
336
|
return;
|
|
233
|
-
const c = r.map((
|
|
234
|
-
const
|
|
235
|
-
return `${s.map((
|
|
236
|
-
}).join("|"),
|
|
237
|
-
a.SetAttribute(null,
|
|
337
|
+
const c = r.map((i) => {
|
|
338
|
+
const f = i;
|
|
339
|
+
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);
|
|
238
342
|
}, "setTreeGridColumnEnumOptionsById");
|
|
239
343
|
export {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
344
|
+
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,
|
|
354
|
+
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
|
|
266
371
|
};
|
|
267
372
|
//# sourceMappingURL=treeGridUtil.js.map
|