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