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