@owp/core 2.0.1 → 2.0.2
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/{Close-JeenM19L.js → Close-C91nHTKM.js} +3 -3
- package/dist/{Close-JeenM19L.js.map → Close-C91nHTKM.js.map} +1 -1
- package/dist/{OwpStoreProvider-Cl8MlcxC.js → OwpStoreProvider-Cp3bYbdo.js} +2 -2
- package/dist/{OwpStoreProvider-Cl8MlcxC.js.map → OwpStoreProvider-Cp3bYbdo.js.map} +1 -1
- package/dist/{OwpUtils-CDsU9hQL.js → OwpUtils-DW44HL74.js} +2 -2
- package/dist/{OwpUtils-CDsU9hQL.js.map → OwpUtils-DW44HL74.js.map} +1 -1
- package/dist/_commonjs-dynamic-modules-Dv7l0Iyf.js +10 -0
- package/dist/_commonjs-dynamic-modules-Dv7l0Iyf.js.map +1 -0
- package/dist/_commonjsHelpers-BHGzZHI-.js +33 -0
- package/dist/_commonjsHelpers-BHGzZHI-.js.map +1 -0
- package/dist/{commonCodeUtils-Dt6TXOku.js → commonCodeUtils-BcfmNY0i.js} +3 -3
- package/dist/{commonCodeUtils-Dt6TXOku.js.map → commonCodeUtils-BcfmNY0i.js.map} +1 -1
- package/dist/contexts.js +9 -9
- package/dist/{exceljs.min-CwK2XNVA.js → exceljs.min-CrYx1Zzn.js} +3134 -3167
- package/dist/exceljs.min-CrYx1Zzn.js.map +1 -0
- package/dist/hooks.js +10 -10
- package/dist/index.js +103 -102
- package/dist/index.js.map +1 -1
- package/dist/isString-Codtu20I.js +55 -0
- package/dist/isString-Codtu20I.js.map +1 -0
- package/dist/isTypedArray-CCnDZ5HJ.js +609 -0
- package/dist/{isTypedArray-DGEiG32J.js.map → isTypedArray-CCnDZ5HJ.js.map} +1 -1
- package/dist/{language-s_jJgpD5.js → language-DaxFvPOq.js} +2 -2
- package/dist/{language-s_jJgpD5.js.map → language-DaxFvPOq.js.map} +1 -1
- package/dist/{lazyLoadedSlices-D_EtusDd.js → lazyLoadedSlices-BgnXi9pr.js} +78 -77
- package/dist/{lazyLoadedSlices-D_EtusDd.js.map → lazyLoadedSlices-BgnXi9pr.js.map} +1 -1
- package/dist/store.js +2 -2
- package/dist/{toUpper-D7kus_mL.js → toUpper-D96_nWkI.js} +2 -2
- package/dist/{toUpper-D7kus_mL.js.map → toUpper-D96_nWkI.js.map} +1 -1
- package/dist/{treeGridUtil-Ch99srur.js → treeGridUtil-CPNva4kL.js} +289 -286
- package/dist/treeGridUtil-CPNva4kL.js.map +1 -0
- package/dist/types/utils/exceljsBrowser.d.ts +4 -2
- package/dist/{usePageLockLoading-Vx7WVcGX.js → usePageLockLoading-BGODEt_k.js} +2 -2
- package/dist/{usePageLockLoading-Vx7WVcGX.js.map → usePageLockLoading-BGODEt_k.js.map} +1 -1
- package/dist/{useShortcuts-DY5fnx6L.js → useShortcuts-BjtlXprQ.js} +3 -3
- package/dist/{useShortcuts-DY5fnx6L.js.map → useShortcuts-BjtlXprQ.js.map} +1 -1
- package/dist/{useTreeGridExcelExport-615UIM92.js → useTreeGridExcelExport-C1QPr9Dp.js} +4 -4
- package/dist/{useTreeGridExcelExport-615UIM92.js.map → useTreeGridExcelExport-C1QPr9Dp.js.map} +1 -1
- package/dist/utils.js +89 -87
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/exceljs.min-CwK2XNVA.js.map +0 -1
- package/dist/isTypedArray-DGEiG32J.js +0 -637
- package/dist/treeGridUtil-Ch99srur.js.map +0 -1
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
var
|
|
2
|
-
var a = (e, t) =>
|
|
3
|
-
import { T as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { enqueueSnackbar as
|
|
7
|
-
import { D as
|
|
8
|
-
|
|
9
|
-
function xe(e, t) {
|
|
1
|
+
var ge = Object.defineProperty;
|
|
2
|
+
var a = (e, t) => ge(e, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { T as we, a as Ee } from "./treeGrid-DtKg-9uf.js";
|
|
4
|
+
import { n as pe, a as Z, t as Re, u as Se, j as G, v as Ie, w as Q, x as me, q as Ce, k as Te, o as k, i as xe } from "./isTypedArray-CCnDZ5HJ.js";
|
|
5
|
+
import v from "dayjs";
|
|
6
|
+
import { enqueueSnackbar as be } from "notistack";
|
|
7
|
+
import { D as ee, a as te, b as B, c as L, d as ne } from "./storageKeys-C6xHFiTo.js";
|
|
8
|
+
function Ge(e, t) {
|
|
10
9
|
const n = new Set(t);
|
|
11
10
|
return e.filter((r) => !n.has(r));
|
|
12
11
|
}
|
|
13
|
-
a(
|
|
14
|
-
function
|
|
15
|
-
return
|
|
12
|
+
a(Ge, "difference");
|
|
13
|
+
function Ae(e, ...t) {
|
|
14
|
+
return Ge(e, t);
|
|
16
15
|
}
|
|
17
|
-
a(
|
|
18
|
-
function
|
|
16
|
+
a(Ae, "without$1");
|
|
17
|
+
function _e(e) {
|
|
19
18
|
return Array.isArray(e);
|
|
20
19
|
}
|
|
21
|
-
a(
|
|
22
|
-
const
|
|
23
|
-
function
|
|
24
|
-
return Array.from(e.match(
|
|
20
|
+
a(_e, "isArray");
|
|
21
|
+
const De = new RegExp("\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+", "gu");
|
|
22
|
+
function Be(e) {
|
|
23
|
+
return Array.from(e.match(De) ?? []);
|
|
25
24
|
}
|
|
26
|
-
a(
|
|
27
|
-
function
|
|
28
|
-
return
|
|
25
|
+
a(Be, "words");
|
|
26
|
+
function Le(e) {
|
|
27
|
+
return Be(e).map((n) => n.toLowerCase()).join(" ");
|
|
29
28
|
}
|
|
30
|
-
a(
|
|
31
|
-
function
|
|
32
|
-
return
|
|
29
|
+
a(Le, "lowerCase$1");
|
|
30
|
+
function Fe(e) {
|
|
31
|
+
return pe(e) && Z(e);
|
|
33
32
|
}
|
|
34
|
-
a(
|
|
35
|
-
function
|
|
33
|
+
a(Fe, "isArrayLikeObject");
|
|
34
|
+
function U(e, t) {
|
|
36
35
|
if (e == null)
|
|
37
36
|
return !0;
|
|
38
37
|
switch (typeof t) {
|
|
@@ -40,8 +39,8 @@ function k(e, t) {
|
|
|
40
39
|
case "number":
|
|
41
40
|
case "object": {
|
|
42
41
|
if (Array.isArray(t))
|
|
43
|
-
return
|
|
44
|
-
if (typeof t == "number" ? t =
|
|
42
|
+
return W(e, t);
|
|
43
|
+
if (typeof t == "number" ? t = Ie(t) : typeof t == "object" && (Object.is(t == null ? void 0 : t.valueOf(), -0) ? t = "-0" : t = String(t)), G(t))
|
|
45
44
|
return !1;
|
|
46
45
|
if ((e == null ? void 0 : e[t]) === void 0)
|
|
47
46
|
return !0;
|
|
@@ -52,9 +51,9 @@ function k(e, t) {
|
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
case "string": {
|
|
55
|
-
if ((e == null ? void 0 : e[t]) === void 0 &&
|
|
56
|
-
return
|
|
57
|
-
if (
|
|
54
|
+
if ((e == null ? void 0 : e[t]) === void 0 && Re(t))
|
|
55
|
+
return W(e, Se(t));
|
|
56
|
+
if (G(t))
|
|
58
57
|
return !1;
|
|
59
58
|
try {
|
|
60
59
|
return delete e[t], !0;
|
|
@@ -64,12 +63,12 @@ function k(e, t) {
|
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
|
-
a(
|
|
68
|
-
function
|
|
69
|
-
const n =
|
|
66
|
+
a(U, "unset");
|
|
67
|
+
function W(e, t) {
|
|
68
|
+
const n = Q(e, t.slice(0, -1), e), r = t[t.length - 1];
|
|
70
69
|
if ((n == null ? void 0 : n[r]) === void 0)
|
|
71
70
|
return !0;
|
|
72
|
-
if (
|
|
71
|
+
if (G(r))
|
|
73
72
|
return !1;
|
|
74
73
|
try {
|
|
75
74
|
return delete n[r], !0;
|
|
@@ -77,31 +76,31 @@ function U(e, t) {
|
|
|
77
76
|
return !1;
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
|
-
a(
|
|
81
|
-
function
|
|
82
|
-
return
|
|
79
|
+
a(W, "unsetWithPath");
|
|
80
|
+
function Me(e, ...t) {
|
|
81
|
+
return Fe(e) ? Ae(Array.from(e), ...t) : [];
|
|
83
82
|
}
|
|
84
|
-
a(
|
|
85
|
-
function
|
|
83
|
+
a(Me, "without");
|
|
84
|
+
function re(e) {
|
|
86
85
|
if (e == null)
|
|
87
86
|
return "";
|
|
88
87
|
if (typeof e == "string")
|
|
89
88
|
return e;
|
|
90
89
|
if (Array.isArray(e))
|
|
91
|
-
return e.map(
|
|
90
|
+
return e.map(re).join(",");
|
|
92
91
|
const t = String(e);
|
|
93
92
|
return t === "0" && Object.is(Number(e), -0) ? "-0" : t;
|
|
94
93
|
}
|
|
95
|
-
a(
|
|
96
|
-
function
|
|
94
|
+
a(re, "toString");
|
|
95
|
+
function Ne(e) {
|
|
97
96
|
const t = e == null ? void 0 : e.constructor, n = typeof t == "function" ? t.prototype : Object.prototype;
|
|
98
97
|
return e === n;
|
|
99
98
|
}
|
|
100
|
-
a(
|
|
101
|
-
function
|
|
99
|
+
a(Ne, "isPrototype");
|
|
100
|
+
function He(e, ...t) {
|
|
102
101
|
if (e == null)
|
|
103
102
|
return {};
|
|
104
|
-
const n =
|
|
103
|
+
const n = me(e);
|
|
105
104
|
for (let r = 0; r < t.length; r++) {
|
|
106
105
|
let s = t[r];
|
|
107
106
|
switch (typeof s) {
|
|
@@ -109,70 +108,70 @@ function Me(e, ...t) {
|
|
|
109
108
|
Array.isArray(s) || (s = Array.from(s));
|
|
110
109
|
for (let o = 0; o < s.length; o++) {
|
|
111
110
|
const i = s[o];
|
|
112
|
-
|
|
111
|
+
U(n, i);
|
|
113
112
|
}
|
|
114
113
|
break;
|
|
115
114
|
}
|
|
116
115
|
case "string":
|
|
117
116
|
case "symbol":
|
|
118
117
|
case "number": {
|
|
119
|
-
|
|
118
|
+
U(n, s);
|
|
120
119
|
break;
|
|
121
120
|
}
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
123
|
return n;
|
|
125
124
|
}
|
|
126
|
-
a(
|
|
127
|
-
function
|
|
125
|
+
a(He, "omit");
|
|
126
|
+
function F(e) {
|
|
128
127
|
if (e == null)
|
|
129
128
|
return !0;
|
|
130
|
-
if (
|
|
131
|
-
return typeof e.splice != "function" && typeof e != "string" && (typeof Buffer > "u" || !Buffer.isBuffer(e)) && !
|
|
129
|
+
if (Z(e))
|
|
130
|
+
return typeof e.splice != "function" && typeof e != "string" && (typeof Buffer > "u" || !Buffer.isBuffer(e)) && !Ce(e) && !Te(e) ? !1 : e.length === 0;
|
|
132
131
|
if (typeof e == "object") {
|
|
133
132
|
if (e instanceof Map || e instanceof Set)
|
|
134
133
|
return e.size === 0;
|
|
135
134
|
const t = Object.keys(e);
|
|
136
|
-
return
|
|
135
|
+
return Ne(e) ? t.filter((n) => n !== "constructor").length === 0 : t.length === 0;
|
|
137
136
|
}
|
|
138
137
|
return !0;
|
|
139
138
|
}
|
|
140
|
-
a(
|
|
141
|
-
function
|
|
142
|
-
return typeof e != "string" && (e =
|
|
139
|
+
a(F, "isEmpty");
|
|
140
|
+
function Ve(e) {
|
|
141
|
+
return typeof e != "string" && (e = re(e)), e.replace(/['\u2019]/g, "");
|
|
143
142
|
}
|
|
144
|
-
a(
|
|
145
|
-
function
|
|
146
|
-
return
|
|
143
|
+
a(Ve, "normalizeForCase");
|
|
144
|
+
function Pe(e) {
|
|
145
|
+
return Le(Ve(e));
|
|
147
146
|
}
|
|
148
|
-
a(
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
],
|
|
154
|
-
let
|
|
155
|
-
const
|
|
147
|
+
a(Pe, "lowerCase");
|
|
148
|
+
const Oe = "Header", $e = "Toolbar", se = "Foot", oe = "nextSibling", ke = [
|
|
149
|
+
Oe,
|
|
150
|
+
$e,
|
|
151
|
+
se
|
|
152
|
+
], Ue = Object.prototype.hasOwnProperty;
|
|
153
|
+
let K;
|
|
154
|
+
const A = /* @__PURE__ */ a((e, t) => {
|
|
156
155
|
const n = e;
|
|
157
156
|
for (const r in t) {
|
|
158
|
-
if (
|
|
157
|
+
if (!Ue.call(t, r) || r === oe)
|
|
159
158
|
continue;
|
|
160
159
|
const s = t[r];
|
|
161
160
|
s !== void 0 && (n[r] = s);
|
|
162
161
|
}
|
|
163
|
-
}, "assignTreeGridSectionFields"),
|
|
162
|
+
}, "assignTreeGridSectionFields"), We = /* @__PURE__ */ a((e, t) => {
|
|
164
163
|
if (!t || !(e != null && e.Header))
|
|
165
164
|
return;
|
|
166
|
-
let n = t[
|
|
165
|
+
let n = t[oe], r = e.Header.nextSibling;
|
|
167
166
|
for (; n && r; )
|
|
168
|
-
|
|
169
|
-
}, "applyTreeGridSubHeaderLayoutText"),
|
|
167
|
+
A(r, n), n = n.nextSibling, r = r.nextSibling;
|
|
168
|
+
}, "applyTreeGridSubHeaderLayoutText"), Ke = /* @__PURE__ */ a((e) => {
|
|
170
169
|
var t;
|
|
171
170
|
try {
|
|
172
171
|
if (!e || typeof DOMParser != "function")
|
|
173
172
|
return;
|
|
174
|
-
|
|
175
|
-
const r = (t =
|
|
173
|
+
K ?? (K = new DOMParser());
|
|
174
|
+
const r = (t = K.parseFromString(e, "text/xml").documentElement) == null ? void 0 : t.children;
|
|
176
175
|
if (!(r != null && r.length))
|
|
177
176
|
return;
|
|
178
177
|
const s = new Array(r.length);
|
|
@@ -189,54 +188,54 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
189
188
|
console.error(n);
|
|
190
189
|
return;
|
|
191
190
|
}
|
|
192
|
-
}, "parseTreeGridXmlToJson"),
|
|
191
|
+
}, "parseTreeGridXmlToJson"), nn = /* @__PURE__ */ a((e, t, n) => {
|
|
193
192
|
var i, c;
|
|
194
193
|
if (!t || !e)
|
|
195
194
|
return;
|
|
196
195
|
const r = (((i = e == null ? void 0 : e.Header) == null ? void 0 : i.Block) ?? 0) > 0, s = t.Header, o = (c = e.Foot) == null ? void 0 : c.lastChild;
|
|
197
|
-
r && s &&
|
|
198
|
-
for (const l of
|
|
196
|
+
r && s && k(s) && We(e, s);
|
|
197
|
+
for (const l of ke) {
|
|
199
198
|
const f = t[l];
|
|
200
|
-
if (!f ||
|
|
199
|
+
if (!f || !k(f))
|
|
201
200
|
continue;
|
|
202
|
-
if (l ===
|
|
203
|
-
|
|
201
|
+
if (l === se && o) {
|
|
202
|
+
A(o, f);
|
|
204
203
|
continue;
|
|
205
204
|
}
|
|
206
205
|
const d = e[l];
|
|
207
|
-
d &&
|
|
206
|
+
d && A(d, f);
|
|
208
207
|
}
|
|
209
208
|
n || e.ReloadBody();
|
|
210
|
-
}, "applyTreeGridLayoutToGrid"),
|
|
211
|
-
const n = t ??
|
|
209
|
+
}, "applyTreeGridLayoutToGrid"), Ye = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", je = "sheet", Xe = /* @__PURE__ */ a((e, t) => e.getCell(t), "getWorksheetCell"), ze = /* @__PURE__ */ a((e, t) => {
|
|
210
|
+
const n = t ?? je, r = URL.createObjectURL(e), s = document.createElement("a");
|
|
212
211
|
s.href = r, s.download = `${n.normalize("NFC")}.xlsx`, s.click(), URL.revokeObjectURL(r);
|
|
213
|
-
}, "downloadExcelFile"),
|
|
214
|
-
...
|
|
215
|
-
...!e &&
|
|
212
|
+
}, "downloadExcelFile"), qe = /* @__PURE__ */ a((e, t) => ({
|
|
213
|
+
...te,
|
|
214
|
+
...!e && ee,
|
|
216
215
|
...t
|
|
217
|
-
}), "createCellFont"),
|
|
218
|
-
...
|
|
216
|
+
}), "createCellFont"), Je = /* @__PURE__ */ a((e) => ({
|
|
217
|
+
...B,
|
|
219
218
|
...e
|
|
220
|
-
}), "createCellAlignment"),
|
|
221
|
-
if (e.border =
|
|
222
|
-
e.fill =
|
|
219
|
+
}), "createCellAlignment"), Ze = /* @__PURE__ */ a((e, t, n) => {
|
|
220
|
+
if (e.border = L, n) {
|
|
221
|
+
e.fill = ne;
|
|
223
222
|
return;
|
|
224
223
|
}
|
|
225
|
-
|
|
226
|
-
}, "applyCellFillAndBorder"),
|
|
224
|
+
F(t) || (e.fill = t);
|
|
225
|
+
}, "applyCellFillAndBorder"), rn = /* @__PURE__ */ a((e) => e.split("").reduce((t, n) => t * 26 + parseInt(n, 36) - 9, 0), "getIndexByLetters"), sn = /* @__PURE__ */ a((e) => {
|
|
227
226
|
const t = String.fromCharCode(65 + (e - 1) % 26);
|
|
228
227
|
return e > 26 ? String.fromCharCode(64 + (e - 1) / 26) + t : t;
|
|
229
|
-
}, "getLettersByIndex"),
|
|
228
|
+
}, "getLettersByIndex"), Qe = /* @__PURE__ */ a((e, t) => {
|
|
230
229
|
const n = new Blob([e], {
|
|
231
|
-
type:
|
|
230
|
+
type: Ye
|
|
232
231
|
});
|
|
233
|
-
|
|
234
|
-
}, "exportExcelByBuffer"),
|
|
235
|
-
const c =
|
|
236
|
-
c.value = n, c.font =
|
|
237
|
-
}, "setCellValue"),
|
|
232
|
+
ze(n, t);
|
|
233
|
+
}, "exportExcelByBuffer"), ve = /* @__PURE__ */ a((e, { key: t, value: n, font: r, alignment: s, fill: o, isHeader: i }) => {
|
|
234
|
+
const c = Xe(e, t);
|
|
235
|
+
c.value = n, c.font = qe(i, r), c.alignment = Je(s), Ze(c, o, i);
|
|
236
|
+
}, "setCellValue"), on = /* @__PURE__ */ a((e, { range: t, value: n, font: r, alignment: s, fill: o, isHeader: i }) => {
|
|
238
237
|
const c = t.split(":")[1];
|
|
239
|
-
e.mergeCells(t),
|
|
238
|
+
e.mergeCells(t), ve(e, {
|
|
240
239
|
key: c,
|
|
241
240
|
value: n,
|
|
242
241
|
alignment: s,
|
|
@@ -244,7 +243,11 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
244
243
|
fill: o,
|
|
245
244
|
isHeader: i
|
|
246
245
|
});
|
|
247
|
-
}, "setMergeCells")
|
|
246
|
+
}, "setMergeCells");
|
|
247
|
+
let T;
|
|
248
|
+
const et = /* @__PURE__ */ a((e) => "default" in e ? e.default : e, "resolveExcelJSImport"), tt = /* @__PURE__ */ a(() => (T || (T = import("./exceljs.min-CrYx1Zzn.js").then((e) => e.e).then((e) => et(e)).catch((e) => {
|
|
249
|
+
throw T = void 0, e;
|
|
250
|
+
})), T), "loadExcelJSBrowser"), I = 200, Y = /* @__PURE__ */ new Map(), nt = "엑셀 다운로드 중 오류가 발생했습니다.", rt = "TreeGrid 인스턴스가 없습니다.", _ = /* @__PURE__ */ a((e) => e == null || typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e instanceof Date, "isPrimitiveCellValue"), R = /* @__PURE__ */ a(() => new Promise((e) => {
|
|
248
251
|
if (typeof requestAnimationFrame == "function") {
|
|
249
252
|
requestAnimationFrame(() => {
|
|
250
253
|
e();
|
|
@@ -252,54 +255,54 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
252
255
|
return;
|
|
253
256
|
}
|
|
254
257
|
setTimeout(e, 0);
|
|
255
|
-
}), "yieldToMain"),
|
|
258
|
+
}), "yieldToMain"), j = /* @__PURE__ */ a((e, t, n) => (e == null ? void 0 : e(t, { defaultValue: n })) ?? n, "translateText"), st = /* @__PURE__ */ a((e) => e.ColNames ?? [], "getGridColNames"), M = /* @__PURE__ */ a((e) => e.Cols, "getGridCols"), ot = /* @__PURE__ */ a((e) => e.Rows, "getGridRows"), at = /* @__PURE__ */ a((e) => e.Header ?? null, "getGridHeader"), it = /* @__PURE__ */ a((e) => e.Head ?? null, "getGridHead"), ct = /* @__PURE__ */ a((e) => e.ExportName, "getGridExportName"), lt = /* @__PURE__ */ a((e) => (e == null ? void 0 : e.firstChild) ?? null, "getRowFirstChild"), ft = /* @__PURE__ */ a((e) => (e == null ? void 0 : e.nextSibling) ?? null, "getRowNextSibling"), ae = /* @__PURE__ */ a((e) => (e ?? "sheet").trim().replace(/[\\/:*?"<>|]/g, "_") || "sheet", "getSafeExportName"), dt = /* @__PURE__ */ a((e) => ae(e).slice(0, 31) || "sheet", "getSafeSheetName"), ie = /* @__PURE__ */ a((e) => {
|
|
256
259
|
const t = Number(e);
|
|
257
260
|
return !Number.isFinite(t) || t < 1 ? 1 : Math.floor(t);
|
|
258
|
-
}, "toPositiveInt"),
|
|
259
|
-
const t =
|
|
261
|
+
}, "toPositiveInt"), D = /* @__PURE__ */ a((e) => e !== 0 && e !== !1 && e !== "0", "isVisible"), ut = /* @__PURE__ */ a((e) => (e == null ? void 0 : e.Type) === "Button" || `${(e == null ? void 0 : e.Button) ?? ""}` == "Button", "isButtonColumn"), yt = /* @__PURE__ */ a((e) => {
|
|
262
|
+
const t = st(e).flat(), n = t.length > 0 ? t : typeof e.GetCols == "function" ? e.GetCols() : [], r = [], s = /* @__PURE__ */ new Set();
|
|
260
263
|
for (const o of n)
|
|
261
264
|
!o || s.has(o) || (s.add(o), r.push(o));
|
|
262
265
|
return r;
|
|
263
|
-
}, "getColumnNames"),
|
|
264
|
-
const t =
|
|
265
|
-
return
|
|
266
|
+
}, "getColumnNames"), ht = /* @__PURE__ */ a((e) => {
|
|
267
|
+
const t = M(e);
|
|
268
|
+
return yt(e).filter((n) => {
|
|
266
269
|
const r = t[n];
|
|
267
|
-
return !r || n === "Panel" ||
|
|
270
|
+
return !r || n === "Panel" || ut(r) ? !1 : r.CanExport !== 0;
|
|
268
271
|
});
|
|
269
|
-
}, "getAllExportColumns"),
|
|
270
|
-
const n =
|
|
272
|
+
}, "getAllExportColumns"), gt = /* @__PURE__ */ a((e, t) => {
|
|
273
|
+
const n = M(e);
|
|
271
274
|
return t.filter((r) => {
|
|
272
275
|
const s = n[r];
|
|
273
|
-
return s ?
|
|
276
|
+
return s ? D(s.Visible) : !1;
|
|
274
277
|
});
|
|
275
|
-
}, "getVisibleExportColumns"),
|
|
278
|
+
}, "getVisibleExportColumns"), wt = /* @__PURE__ */ a((e) => {
|
|
276
279
|
const t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ a((o) => {
|
|
277
280
|
!o || n.has(o) || o.Kind && o.Kind !== "Header" || (n.add(o), t.push(o));
|
|
278
281
|
}, "appendHeaderRow");
|
|
279
|
-
r(
|
|
280
|
-
let s = it(
|
|
282
|
+
r(at(e));
|
|
283
|
+
let s = lt(it(e));
|
|
281
284
|
for (; s; )
|
|
282
|
-
r(s), s =
|
|
285
|
+
r(s), s = ft(s);
|
|
283
286
|
return t;
|
|
284
|
-
}, "getHeaderRows"),
|
|
287
|
+
}, "getHeaderRows"), Et = /* @__PURE__ */ a((e) => {
|
|
285
288
|
if (typeof e.GetShownRows == "function") {
|
|
286
289
|
const r = e.GetShownRows();
|
|
287
290
|
if (Array.isArray(r)) {
|
|
288
291
|
const s = [];
|
|
289
292
|
for (let o = 0; o < r.length; o += 1) {
|
|
290
293
|
const i = r[o];
|
|
291
|
-
!i || i.Kind !== "Data" || !
|
|
294
|
+
!i || i.Kind !== "Data" || !D(i.Visible) || i.Fixed === "Foot" || s.push(i);
|
|
292
295
|
}
|
|
293
296
|
return s;
|
|
294
297
|
}
|
|
295
298
|
}
|
|
296
|
-
const t = [], n =
|
|
299
|
+
const t = [], n = ot(e);
|
|
297
300
|
for (const r in n) {
|
|
298
301
|
const s = n[r];
|
|
299
|
-
!s || s.Kind !== "Data" || !
|
|
302
|
+
!s || s.Kind !== "Data" || !D(s.Visible) || s.Fixed === "Foot" || t.push(s);
|
|
300
303
|
}
|
|
301
304
|
return t;
|
|
302
|
-
}, "getVisibleDataRows"),
|
|
305
|
+
}, "getVisibleDataRows"), pt = /* @__PURE__ */ a((e, t) => {
|
|
303
306
|
const n = new Map(e.map((l, f) => [l, f])), r = new Map(
|
|
304
307
|
t.map((l, f) => [l, f])
|
|
305
308
|
), s = new Array(e.length + 1).fill(0), o = new Array(e.length).fill(-1), i = new Array(e.length).fill(-1);
|
|
@@ -321,75 +324,75 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
321
324
|
visibleColIndex: null,
|
|
322
325
|
visibleColSpan: 0
|
|
323
326
|
};
|
|
324
|
-
const u =
|
|
327
|
+
const u = ie(f), p = Math.min(e.length - 1, d + u - 1), h = i[d], g = h >= 0 && h <= p ? o[h] : null, S = s[p + 1] - s[d];
|
|
325
328
|
return {
|
|
326
329
|
allColSpan: u,
|
|
327
|
-
visibleColIndex:
|
|
330
|
+
visibleColIndex: g !== null && g >= 0 ? g : null,
|
|
328
331
|
visibleColSpan: S
|
|
329
332
|
};
|
|
330
333
|
};
|
|
331
|
-
}, "createSpanResolver"),
|
|
334
|
+
}, "createSpanResolver"), Rt = /* @__PURE__ */ a((e) => {
|
|
332
335
|
const t = `${(e == null ? void 0 : e.Align) ?? ""}`.toLowerCase();
|
|
333
336
|
return t === "left" || t === "center" || t === "right" ? t : (e == null ? void 0 : e.Type) === "Int" || (e == null ? void 0 : e.Type) === "Float" ? "right" : (e == null ? void 0 : e.Type) === "Date" || (e == null ? void 0 : e.Type) === "Enum" ? "center" : "left";
|
|
334
|
-
}, "getCellHorizontalAlignment"),
|
|
337
|
+
}, "getCellHorizontalAlignment"), St = /* @__PURE__ */ a((e) => {
|
|
335
338
|
if ((e == null ? void 0 : e.Type) !== "Date")
|
|
336
339
|
return null;
|
|
337
340
|
const t = `${e.Format ?? ""}`.trim();
|
|
338
341
|
if (!t)
|
|
339
342
|
return null;
|
|
340
|
-
const n =
|
|
343
|
+
const n = Y.get(t);
|
|
341
344
|
if (n !== void 0)
|
|
342
345
|
return n;
|
|
343
346
|
const r = "__TREEGRID_MINUTE_TWO__", s = "__TREEGRID_MINUTE_ONE__", o = t.replace(/yyyy/g, "YYYY").replace(/yy/g, "YY").replace(/tt/g, "A").replace(/hh/g, "HH").replace(/\bh\b/g, "H").replace(/(H{1,2}:)mm/g, `$1${r}`).replace(/(H{1,2}:)m/g, `$1${s}`).replace(/mmmm/g, "MMMM").replace(/mmm/g, "MMM").replace(/mm/g, "MM").replace(/\bm\b/g, "M").replace(new RegExp(r, "g"), "mm").replace(new RegExp(s, "g"), "m").replace(/dddd/g, "dddd").replace(/ddd/g, "ddd").replace(/dd/g, "DD").replace(/\bd\b/g, "D");
|
|
344
|
-
return
|
|
345
|
-
}, "getDayjsDateFormat"),
|
|
346
|
-
const n =
|
|
347
|
-
if (!n || !
|
|
347
|
+
return Y.set(t, o), o;
|
|
348
|
+
}, "getDayjsDateFormat"), x = /* @__PURE__ */ a((e, t) => {
|
|
349
|
+
const n = St(t);
|
|
350
|
+
if (!n || !_(e) || e === null || e === void 0 || e === "" || typeof e == "boolean")
|
|
348
351
|
return null;
|
|
349
|
-
const r =
|
|
352
|
+
const r = v(e);
|
|
350
353
|
return r.isValid() ? r.format(n) : null;
|
|
351
|
-
}, "formatDateValue"),
|
|
354
|
+
}, "formatDateValue"), b = /* @__PURE__ */ a((e, t) => (t == null ? void 0 : t.Type) !== "Bool" ? null : e == null || e === "" ? "" : e === !0 || e === 1 || e === "1" || e === "Y" || e === "y" || e === "true" || e === "TRUE" ? "Y" : e === !1 || e === 0 || e === "0" || e === "N" || e === "n" || e === "false" || e === "FALSE" ? "N" : null, "formatBoolValue"), X = /* @__PURE__ */ a((e, t, n) => {
|
|
352
355
|
const r = t == null ? void 0 : t[n];
|
|
353
356
|
return r != null ? String(r) : typeof e.GetCaption == "function" ? e.GetCaption(n) ?? "" : n;
|
|
354
357
|
}, "getHeaderValue"), w = /* @__PURE__ */ a((e, t) => {
|
|
355
358
|
const n = `${(t == null ? void 0 : t.HtmlPostfix) ?? ""}`;
|
|
356
359
|
return !n || e === null || e === void 0 || e === "" ? e : `${e}${n}`;
|
|
357
|
-
}, "appendHtmlPostfix"),
|
|
360
|
+
}, "appendHtmlPostfix"), It = /* @__PURE__ */ a((e, t, n, r) => {
|
|
358
361
|
if ((r == null ? void 0 : r.Type) === "Enum" && typeof e.GetString == "function") {
|
|
359
362
|
const c = e.GetString(t, n);
|
|
360
363
|
if (c != null)
|
|
361
364
|
return w(c, r);
|
|
362
365
|
}
|
|
363
|
-
const s = t[n], o =
|
|
366
|
+
const s = t[n], o = b(s, r);
|
|
364
367
|
if (o !== null)
|
|
365
368
|
return w(o, r);
|
|
366
|
-
const i =
|
|
369
|
+
const i = x(s, r);
|
|
367
370
|
if (i !== null)
|
|
368
371
|
return w(i, r);
|
|
369
|
-
if (
|
|
372
|
+
if (_(s))
|
|
370
373
|
return w(s, r);
|
|
371
374
|
if (typeof e.GetValue == "function") {
|
|
372
|
-
const c = e.GetValue(t, n), l =
|
|
375
|
+
const c = e.GetValue(t, n), l = b(c, r);
|
|
373
376
|
if (l !== null)
|
|
374
377
|
return w(l, r);
|
|
375
|
-
const f =
|
|
378
|
+
const f = x(c, r);
|
|
376
379
|
if (f !== null)
|
|
377
380
|
return w(f, r);
|
|
378
|
-
if (
|
|
381
|
+
if (_(c))
|
|
379
382
|
return w(c, r);
|
|
380
383
|
}
|
|
381
384
|
if (typeof e.GetString == "function") {
|
|
382
|
-
const c = e.GetString(t, n), l =
|
|
385
|
+
const c = e.GetString(t, n), l = b(c, r);
|
|
383
386
|
if (l !== null)
|
|
384
387
|
return w(l, r);
|
|
385
|
-
const f =
|
|
388
|
+
const f = x(c, r);
|
|
386
389
|
if (f !== null)
|
|
387
390
|
return w(f, r);
|
|
388
391
|
if (c != null)
|
|
389
392
|
return w(c, r);
|
|
390
393
|
}
|
|
391
394
|
return "";
|
|
392
|
-
}, "getBodyValue"),
|
|
395
|
+
}, "getBodyValue"), mt = /* @__PURE__ */ a(({
|
|
393
396
|
colName: e,
|
|
394
397
|
resolveSpan: t,
|
|
395
398
|
row: n,
|
|
@@ -397,7 +400,7 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
397
400
|
totalRows: s
|
|
398
401
|
}) => {
|
|
399
402
|
const o = Math.min(
|
|
400
|
-
|
|
403
|
+
ie(n[`${e}RowSpan`]),
|
|
401
404
|
Math.max(1, s - r)
|
|
402
405
|
), { allColSpan: i, visibleColIndex: c, visibleColSpan: l } = t(
|
|
403
406
|
e,
|
|
@@ -409,17 +412,17 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
409
412
|
visibleColIndex: c,
|
|
410
413
|
visibleColSpan: l
|
|
411
414
|
};
|
|
412
|
-
}, "getCellSpanInfo"),
|
|
415
|
+
}, "getCellSpanInfo"), Ct = /* @__PURE__ */ a((e, t, n) => {
|
|
413
416
|
var r;
|
|
414
417
|
return (r = e.get(t)) == null ? void 0 : r.has(n);
|
|
415
|
-
}, "isOccupied"),
|
|
418
|
+
}, "isOccupied"), Tt = /* @__PURE__ */ a((e, t, n, r, s) => {
|
|
416
419
|
for (let o = t; o < t + r; o += 1) {
|
|
417
420
|
const i = e.get(o) ?? /* @__PURE__ */ new Set();
|
|
418
421
|
for (let c = n; c < n + s; c += 1)
|
|
419
422
|
i.add(c);
|
|
420
423
|
e.set(o, i);
|
|
421
424
|
}
|
|
422
|
-
}, "markOccupied"),
|
|
425
|
+
}, "markOccupied"), ce = /* @__PURE__ */ a(async ({
|
|
423
426
|
allExportColumns: e,
|
|
424
427
|
getValue: t,
|
|
425
428
|
onVisibleEntry: n,
|
|
@@ -434,22 +437,22 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
434
437
|
if (!(!l || !f)) {
|
|
435
438
|
for (let d = 0; d < e.length; d += 1) {
|
|
436
439
|
const u = e[d];
|
|
437
|
-
if (!u ||
|
|
440
|
+
if (!u || Ct(o, c, d))
|
|
438
441
|
continue;
|
|
439
|
-
const { allColSpan: p, rowSpan:
|
|
442
|
+
const { allColSpan: p, rowSpan: h, visibleColIndex: g, visibleColSpan: S } = mt({
|
|
440
443
|
row: l,
|
|
441
444
|
colName: u,
|
|
442
445
|
rowIndex: c,
|
|
443
446
|
totalRows: s.length,
|
|
444
447
|
resolveSpan: r
|
|
445
448
|
});
|
|
446
|
-
if (
|
|
449
|
+
if (Tt(o, c, d, h, p), g === null || S < 1)
|
|
447
450
|
continue;
|
|
448
|
-
const
|
|
449
|
-
n == null || n(
|
|
450
|
-
colIndex:
|
|
451
|
-
value:
|
|
452
|
-
rowSpan:
|
|
451
|
+
const m = t(l, u);
|
|
452
|
+
n == null || n(g, m), f.push({
|
|
453
|
+
colIndex: g,
|
|
454
|
+
value: m,
|
|
455
|
+
rowSpan: h,
|
|
453
456
|
colSpan: S
|
|
454
457
|
});
|
|
455
458
|
}
|
|
@@ -457,26 +460,26 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
457
460
|
}
|
|
458
461
|
}
|
|
459
462
|
return i;
|
|
460
|
-
}, "createEntryRows"),
|
|
463
|
+
}, "createEntryRows"), xt = /* @__PURE__ */ a(async ({
|
|
461
464
|
allExportColumns: e,
|
|
462
465
|
grid: t,
|
|
463
466
|
headerRows: n,
|
|
464
467
|
resolveSpan: r,
|
|
465
468
|
visibleExportColumns: s
|
|
466
|
-
}) => s.length ? n.length ?
|
|
469
|
+
}) => s.length ? n.length ? ce({
|
|
467
470
|
allExportColumns: e,
|
|
468
|
-
getValue: /* @__PURE__ */ a((o, i) =>
|
|
471
|
+
getValue: /* @__PURE__ */ a((o, i) => X(t, o, i), "getValue"),
|
|
469
472
|
resolveSpan: r,
|
|
470
473
|
rows: n
|
|
471
474
|
}) : [
|
|
472
475
|
s.map((o, i) => ({
|
|
473
476
|
colName: o,
|
|
474
477
|
colIndex: i,
|
|
475
|
-
value:
|
|
478
|
+
value: X(t, null, o),
|
|
476
479
|
rowSpan: 1,
|
|
477
480
|
colSpan: 1
|
|
478
481
|
}))
|
|
479
|
-
] : [], "createHeaderEntries"),
|
|
482
|
+
] : [], "createHeaderEntries"), bt = /* @__PURE__ */ a(async ({
|
|
480
483
|
allExportColumns: e,
|
|
481
484
|
columns: t,
|
|
482
485
|
onVisibleEntry: n,
|
|
@@ -484,13 +487,13 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
484
487
|
dataRows: s,
|
|
485
488
|
resolveSpan: o,
|
|
486
489
|
visibleExportColumns: i
|
|
487
|
-
}) => i.length ?
|
|
490
|
+
}) => i.length ? ce({
|
|
488
491
|
allExportColumns: e,
|
|
489
|
-
getValue: /* @__PURE__ */ a((c, l) =>
|
|
492
|
+
getValue: /* @__PURE__ */ a((c, l) => It(r, c, l, t[l]), "getValue"),
|
|
490
493
|
onVisibleEntry: n,
|
|
491
494
|
resolveSpan: o,
|
|
492
495
|
rows: s
|
|
493
|
-
}) : [], "createBodyEntries"),
|
|
496
|
+
}) : [], "createBodyEntries"), z = /* @__PURE__ */ a(async (e, t, n) => {
|
|
494
497
|
const r = e.rowCount + 1, s = [];
|
|
495
498
|
for (let o = 0; o < t.length; o += 1) {
|
|
496
499
|
const i = t[o] ?? [], c = new Array(n).fill("");
|
|
@@ -501,7 +504,7 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
501
504
|
s.push(c), s.length === I ? (e.addRows(s), s.length = 0, await R()) : (o + 1) % I === 0 && await R();
|
|
502
505
|
}
|
|
503
506
|
return s.length && e.addRows(s), r;
|
|
504
|
-
}, "appendEntryRows"),
|
|
507
|
+
}, "appendEntryRows"), q = /* @__PURE__ */ a(async (e, t, n) => {
|
|
505
508
|
for (let r = 0; r < t.length; r += 1) {
|
|
506
509
|
const s = t[r] ?? [];
|
|
507
510
|
for (let o = 0; o < s.length; o += 1) {
|
|
@@ -515,43 +518,43 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
515
518
|
}
|
|
516
519
|
(r + 1) % I === 0 && await R();
|
|
517
520
|
}
|
|
518
|
-
}, "mergeEntryRows"),
|
|
521
|
+
}, "mergeEntryRows"), Gt = /* @__PURE__ */ a(async (e, t, n, r) => {
|
|
519
522
|
for (let s = 0; s < n; s += 1) {
|
|
520
523
|
const o = e.getRow(t + s);
|
|
521
|
-
o.font =
|
|
524
|
+
o.font = te;
|
|
522
525
|
for (let i = 1; i <= r; i += 1) {
|
|
523
526
|
const c = o.getCell(i);
|
|
524
|
-
c.fill =
|
|
525
|
-
...
|
|
527
|
+
c.fill = ne, c.border = L, c.alignment = {
|
|
528
|
+
...B,
|
|
526
529
|
horizontal: "center"
|
|
527
530
|
};
|
|
528
531
|
}
|
|
529
532
|
(s + 1) % I === 0 && await R();
|
|
530
533
|
}
|
|
531
|
-
}, "styleHeaderRows"),
|
|
534
|
+
}, "styleHeaderRows"), At = /* @__PURE__ */ a(async (e, t, n, r) => {
|
|
532
535
|
for (let s = 0; s < n; s += 1) {
|
|
533
536
|
const o = e.getRow(t + s);
|
|
534
|
-
o.font =
|
|
537
|
+
o.font = ee;
|
|
535
538
|
for (let i = 1; i <= r; i += 1)
|
|
536
|
-
o.getCell(i).border =
|
|
539
|
+
o.getCell(i).border = L;
|
|
537
540
|
(s + 1) % I === 0 && await R();
|
|
538
541
|
}
|
|
539
|
-
}, "styleBodyRows"),
|
|
542
|
+
}, "styleBodyRows"), _t = /* @__PURE__ */ a((e) => {
|
|
540
543
|
const t = Number((e == null ? void 0 : e.Width) ?? (e == null ? void 0 : e.MinWidth));
|
|
541
544
|
return !Number.isFinite(t) || t <= 0 ? null : Math.min(Math.max(Math.round(t / 8), 10), 50);
|
|
542
|
-
}, "getPreferredColumnWidth"),
|
|
545
|
+
}, "getPreferredColumnWidth"), J = /* @__PURE__ */ a((e) => Math.min(Math.max(e + 4, 10), 50), "getAutoColumnWidth"), Dt = /* @__PURE__ */ a((e, t, n) => {
|
|
543
546
|
const r = new Array(n.length).fill(10), s = new Array(n.length).fill(!1);
|
|
544
547
|
for (let o = 0; o < n.length; o += 1) {
|
|
545
548
|
const i = n[o];
|
|
546
549
|
if (!i)
|
|
547
550
|
continue;
|
|
548
|
-
const c = t[i], l =
|
|
551
|
+
const c = t[i], l = _t(c);
|
|
549
552
|
if (l !== null) {
|
|
550
553
|
r[o] = l, s[o] = !0;
|
|
551
554
|
continue;
|
|
552
555
|
}
|
|
553
556
|
const f = (typeof e.GetCaption == "function" ? e.GetCaption(i) : "") || i;
|
|
554
|
-
r[o] =
|
|
557
|
+
r[o] = J(`${f}`.length);
|
|
555
558
|
}
|
|
556
559
|
return {
|
|
557
560
|
widths: r,
|
|
@@ -561,80 +564,80 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
561
564
|
const c = r[o];
|
|
562
565
|
if (c === void 0)
|
|
563
566
|
return;
|
|
564
|
-
const l =
|
|
567
|
+
const l = J(`${i ?? ""}`.length);
|
|
565
568
|
l > c && (r[o] = l);
|
|
566
569
|
}, "updateWidth")
|
|
567
570
|
};
|
|
568
|
-
}, "createColumnWidths"),
|
|
571
|
+
}, "createColumnWidths"), le = /* @__PURE__ */ a(async (e, t) => {
|
|
569
572
|
try {
|
|
570
573
|
const n = typeof t == "string" ? { exportName: t } : t, r = n == null ? void 0 : n.t;
|
|
571
574
|
if (!e)
|
|
572
575
|
throw new Error(
|
|
573
|
-
|
|
576
|
+
j(r, "Message.TreeGrid 인스턴스가 없습니다.", rt)
|
|
574
577
|
);
|
|
575
|
-
const s =
|
|
576
|
-
allExportColumns:
|
|
578
|
+
const s = tt(), o = M(e), i = ht(e), c = gt(e, i), { widths: l, updateWidth: f } = Dt(e, o, c), d = wt(e), u = Et(e), p = pt(i, c), h = await xt({
|
|
579
|
+
allExportColumns: i,
|
|
577
580
|
grid: e,
|
|
578
|
-
headerRows:
|
|
579
|
-
resolveSpan:
|
|
580
|
-
visibleExportColumns:
|
|
581
|
-
}), g = await
|
|
582
|
-
allExportColumns:
|
|
583
|
-
columns:
|
|
584
|
-
dataRows:
|
|
581
|
+
headerRows: d,
|
|
582
|
+
resolveSpan: p,
|
|
583
|
+
visibleExportColumns: c
|
|
584
|
+
}), g = await bt({
|
|
585
|
+
allExportColumns: i,
|
|
586
|
+
columns: o,
|
|
587
|
+
dataRows: u,
|
|
585
588
|
grid: e,
|
|
586
|
-
onVisibleEntry:
|
|
587
|
-
resolveSpan:
|
|
588
|
-
visibleExportColumns:
|
|
589
|
-
}),
|
|
589
|
+
onVisibleEntry: f,
|
|
590
|
+
resolveSpan: p,
|
|
591
|
+
visibleExportColumns: c
|
|
592
|
+
}), S = await s, m = new S.Workbook(), de = (n == null ? void 0 : n.exportName) ?? ct(e) ?? e.id ?? "sheet", ue = n != null && n.useAppendCurrentDateTimeToExportName ? `-${v().format("YYYY-MM-DD-HH-mm-ss")}` : "", H = ae(`${de}${ue}`), E = m.addWorksheet(dt(H)), V = await z(
|
|
590
593
|
E,
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
),
|
|
594
|
+
h,
|
|
595
|
+
c.length
|
|
596
|
+
), P = await z(
|
|
594
597
|
E,
|
|
595
598
|
g,
|
|
596
|
-
|
|
599
|
+
c.length
|
|
597
600
|
);
|
|
598
|
-
for (let
|
|
599
|
-
const
|
|
600
|
-
if (!
|
|
601
|
+
for (let C = 0; C < c.length; C += 1) {
|
|
602
|
+
const O = c[C];
|
|
603
|
+
if (!O)
|
|
601
604
|
continue;
|
|
602
|
-
const
|
|
603
|
-
|
|
604
|
-
...
|
|
605
|
-
horizontal:
|
|
605
|
+
const he = o[O], $ = E.getColumn(C + 1);
|
|
606
|
+
$.width = l[C], $.alignment = {
|
|
607
|
+
...B,
|
|
608
|
+
horizontal: Rt(he)
|
|
606
609
|
};
|
|
607
610
|
}
|
|
608
|
-
await
|
|
609
|
-
E,
|
|
610
|
-
H,
|
|
611
|
-
p.length,
|
|
612
|
-
i.length
|
|
613
|
-
), await bt(
|
|
611
|
+
await q(E, h, V), await q(E, g, P), await Gt(
|
|
614
612
|
E,
|
|
615
613
|
V,
|
|
614
|
+
h.length,
|
|
615
|
+
c.length
|
|
616
|
+
), await At(
|
|
617
|
+
E,
|
|
618
|
+
P,
|
|
616
619
|
g.length,
|
|
617
|
-
|
|
618
|
-
), E.views = [{ state: "frozen", ySplit:
|
|
619
|
-
const
|
|
620
|
+
c.length
|
|
621
|
+
), E.views = [{ state: "frozen", ySplit: h.length }], await R();
|
|
622
|
+
const ye = await m.xlsx.writeBuffer({
|
|
620
623
|
useSharedStrings: !1,
|
|
621
624
|
useStyles: !0
|
|
622
625
|
});
|
|
623
|
-
|
|
626
|
+
Qe(ye, H);
|
|
624
627
|
} catch (n) {
|
|
625
628
|
const r = typeof t == "string" ? {} : t, s = r == null ? void 0 : r.t;
|
|
626
|
-
|
|
627
|
-
n instanceof Error ? n.message :
|
|
629
|
+
be(
|
|
630
|
+
n instanceof Error ? n.message : j(
|
|
628
631
|
s,
|
|
629
632
|
"Message.엑셀 다운로드 중 오류가 발생했습니다.",
|
|
630
|
-
|
|
633
|
+
nt
|
|
631
634
|
),
|
|
632
635
|
{
|
|
633
636
|
variant: "error"
|
|
634
637
|
}
|
|
635
638
|
);
|
|
636
639
|
}
|
|
637
|
-
}, "exportTreeGridExcel"),
|
|
640
|
+
}, "exportTreeGridExcel"), an = le, Bt = ["Added", "Changed"], Lt = ["OWP", "IPX"], Ft = /* @__PURE__ */ a((e) => Object.values((e == null ? void 0 : e.Rows) ?? {}).filter((t) => t.Kind === "Data"), "getDataRows"), Mt = /* @__PURE__ */ a((e, t) => {
|
|
638
641
|
const n = (t == null ? void 0 : t.insertPosition) ?? "top", r = t == null ? void 0 : t.parent, s = t == null ? void 0 : t.anchorRow;
|
|
639
642
|
let o = r ?? (s ? s.parentNode : null) ?? e.GetFirst(), i = null;
|
|
640
643
|
switch (n) {
|
|
@@ -652,16 +655,16 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
652
655
|
break;
|
|
653
656
|
}
|
|
654
657
|
return { resolvedParent: o, next: i };
|
|
655
|
-
}, "resolveRowInsertionTarget"),
|
|
656
|
-
|
|
658
|
+
}, "resolveRowInsertionTarget"), Nt = /* @__PURE__ */ a((e, t) => {
|
|
659
|
+
xe(t) && Object.entries(t).forEach(([n, r]) => {
|
|
657
660
|
e[n] = r;
|
|
658
661
|
});
|
|
659
|
-
}, "assignInitialRowValues"),
|
|
660
|
-
|
|
661
|
-
), "normalizeAddedRow"),
|
|
662
|
+
}, "assignInitialRowValues"), Ht = /* @__PURE__ */ a((e) => Lt.some((t) => e.startsWith(t)), "isTreeGridDataKey"), Vt = /* @__PURE__ */ a((e) => Object.fromEntries(
|
|
663
|
+
Me(Object.keys(e), "id").filter((t) => Ht(t) && !F(e[t])).map((t) => [t, e[t]])
|
|
664
|
+
), "normalizeAddedRow"), Pt = /* @__PURE__ */ a((e, t) => e.filter((n) => Q(n, t) === "1" && n.Deleted !== "1").map((n) => t === "Changed" ? He(n, ["id", "Changed"]) : Vt(n)).filter((n) => !F(n)), "getChangedRowsByStatus"), y = /* @__PURE__ */ a((e) => Grids[e], "getTreeGridById"), Ot = /* @__PURE__ */ a((e) => {
|
|
662
665
|
const t = y(e);
|
|
663
|
-
return
|
|
664
|
-
}, "getTreeGridDataRowsById"),
|
|
666
|
+
return Ft(t);
|
|
667
|
+
}, "getTreeGridDataRowsById"), $t = /* @__PURE__ */ a((e, t) => {
|
|
665
668
|
const n = y(e);
|
|
666
669
|
if (!n)
|
|
667
670
|
return;
|
|
@@ -671,27 +674,27 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
671
674
|
Data: { Body: [t || []] },
|
|
672
675
|
Url: ""
|
|
673
676
|
}, n.ReloadBody();
|
|
674
|
-
}, "reloadTreeGridBodyById"),
|
|
677
|
+
}, "reloadTreeGridBodyById"), kt = /* @__PURE__ */ a((e, t) => {
|
|
675
678
|
const n = y(e);
|
|
676
679
|
if (!n)
|
|
677
680
|
return;
|
|
678
|
-
const r = t == null ? void 0 : t.canSelect, s = t == null ? void 0 : t.initialValues, { resolvedParent: o, next: i } =
|
|
679
|
-
|
|
680
|
-
}, "addTreeGridRowById"),
|
|
681
|
-
const t = y(e), n =
|
|
682
|
-
return
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
681
|
+
const r = t == null ? void 0 : t.canSelect, s = t == null ? void 0 : t.initialValues, { resolvedParent: o, next: i } = Mt(n, t), c = n.AddRow(o, i, 1);
|
|
682
|
+
Nt(c, s), c.CanEdit = 1, c.CanDelete = 1, c.CanSelect = r ? 1 : 0, n.Focus(c), n.RefreshRow(c);
|
|
683
|
+
}, "addTreeGridRowById"), Ut = /* @__PURE__ */ a((e) => {
|
|
684
|
+
const t = y(e), n = Ke(t == null ? void 0 : t.GetXmlData("changes,allcols,nogrid,noio"));
|
|
685
|
+
return _e(n) ? Object.fromEntries(
|
|
686
|
+
Bt.map((r) => [
|
|
687
|
+
Pe(r),
|
|
688
|
+
Pt(n, r)
|
|
686
689
|
])
|
|
687
690
|
) : { added: [], changed: [] };
|
|
688
|
-
}, "getTreeGridRowChangesById"),
|
|
691
|
+
}, "getTreeGridRowChangesById"), Wt = /* @__PURE__ */ a((e, t) => {
|
|
689
692
|
const n = y(e);
|
|
690
|
-
n &&
|
|
691
|
-
}, "exportTreeGridToExcelById"),
|
|
693
|
+
n && le(n, { exportName: t ?? "" });
|
|
694
|
+
}, "exportTreeGridToExcelById"), Kt = /* @__PURE__ */ a((e) => {
|
|
692
695
|
const t = y(e);
|
|
693
696
|
return (t == null ? void 0 : t.GetSelRows()) ?? [];
|
|
694
|
-
}, "getTreeGridSelectedRowsById"),
|
|
697
|
+
}, "getTreeGridSelectedRowsById"), Yt = /* @__PURE__ */ a((e, t) => {
|
|
695
698
|
const n = y(e);
|
|
696
699
|
if (!n || !(t != null && t.targetKey))
|
|
697
700
|
return;
|
|
@@ -701,20 +704,20 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
701
704
|
return;
|
|
702
705
|
}
|
|
703
706
|
n.HideCol(r);
|
|
704
|
-
}, "setTreeGridColumnVisibilityById"),
|
|
707
|
+
}, "setTreeGridColumnVisibilityById"), jt = /* @__PURE__ */ a((e, t) => {
|
|
705
708
|
const n = y(e), r = t == null ? void 0 : t.row, s = t == null ? void 0 : t.col;
|
|
706
|
-
!n || !r || !s || (n.SetValue(r, `${s}Class`,
|
|
707
|
-
}, "highlightTreeGridCellById"),
|
|
709
|
+
!n || !r || !s || (n.SetValue(r, `${s}Class`, we), n.SetValue(r, `${s}Color`, Ee), n.RefreshCell(r, s));
|
|
710
|
+
}, "highlightTreeGridCellById"), N = /* @__PURE__ */ a((e) => {
|
|
708
711
|
const t = y(e);
|
|
709
712
|
t && t.ActionDeselectAll(1, 0);
|
|
710
|
-
}, "resetTreeGridSelectionById"),
|
|
711
|
-
e.forEach(
|
|
712
|
-
}, "resetTreeGridSelectionsByIds"),
|
|
713
|
+
}, "resetTreeGridSelectionById"), Xt = /* @__PURE__ */ a((e) => {
|
|
714
|
+
e.forEach(N);
|
|
715
|
+
}, "resetTreeGridSelectionsByIds"), fe = /* @__PURE__ */ a((e) => {
|
|
713
716
|
const t = y(e);
|
|
714
|
-
t && (t.ActionUndoAll(1, 0),
|
|
715
|
-
}, "resetTreeGridChangesById"),
|
|
716
|
-
e.forEach(
|
|
717
|
-
}, "resetTreeGridChangesByIds"),
|
|
717
|
+
t && (t.ActionUndoAll(1, 0), N(e));
|
|
718
|
+
}, "resetTreeGridChangesById"), zt = /* @__PURE__ */ a((e) => {
|
|
719
|
+
e.forEach(fe);
|
|
720
|
+
}, "resetTreeGridChangesByIds"), qt = /* @__PURE__ */ a((e, t, n, r, s) => {
|
|
718
721
|
if (!(n != null && n.length))
|
|
719
722
|
return;
|
|
720
723
|
const o = y(e);
|
|
@@ -725,49 +728,49 @@ const G = /* @__PURE__ */ a((e, t) => {
|
|
|
725
728
|
return `${s.map((u) => f[u]).find((u) => u != null && u !== "") ?? ""}`;
|
|
726
729
|
}).join("|"), c = n.map((l) => `${l[r] ?? ""}`).join("|");
|
|
727
730
|
o.SetAttribute(null, t, "Type", "Enum", 0, 0), o.SetAttribute(null, t, "Enum", `|${i}`, 0, 0), o.SetAttribute(null, t, "EnumKeys", `|${c}`, 1, 0);
|
|
728
|
-
}, "setTreeGridColumnEnumOptionsById"),
|
|
731
|
+
}, "setTreeGridColumnEnumOptionsById"), cn = y, ln = Ot, fn = $t, dn = kt, un = Ut, yn = Wt, hn = Kt, gn = Yt, wn = jt, En = N, pn = Xt, Rn = fe, Sn = zt, In = qt;
|
|
729
732
|
export {
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
733
|
+
dn as A,
|
|
734
|
+
un as B,
|
|
735
|
+
yn as C,
|
|
736
|
+
hn as D,
|
|
734
737
|
gn as E,
|
|
735
|
-
|
|
736
|
-
|
|
738
|
+
wn as F,
|
|
739
|
+
En as G,
|
|
737
740
|
pn as H,
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
741
|
+
Rn as I,
|
|
742
|
+
Sn as J,
|
|
743
|
+
In as K,
|
|
744
|
+
Fe as L,
|
|
745
|
+
tt as M,
|
|
746
|
+
F as N,
|
|
747
|
+
nn as O,
|
|
748
|
+
He as P,
|
|
749
|
+
rn as a,
|
|
750
|
+
sn as b,
|
|
751
|
+
Qe as c,
|
|
752
|
+
ve as d,
|
|
753
|
+
le as e,
|
|
754
|
+
on as f,
|
|
752
755
|
y as g,
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
756
|
+
an as h,
|
|
757
|
+
_e as i,
|
|
758
|
+
Ot as j,
|
|
759
|
+
kt as k,
|
|
760
|
+
Ut as l,
|
|
761
|
+
Wt as m,
|
|
762
|
+
Kt as n,
|
|
763
|
+
Yt as o,
|
|
764
|
+
jt as p,
|
|
765
|
+
N as q,
|
|
766
|
+
$t as r,
|
|
767
|
+
qt as s,
|
|
768
|
+
re as t,
|
|
769
|
+
Xt as u,
|
|
770
|
+
fe as v,
|
|
771
|
+
zt as w,
|
|
772
|
+
cn as x,
|
|
773
|
+
ln as y,
|
|
774
|
+
fn as z
|
|
772
775
|
};
|
|
773
|
-
//# sourceMappingURL=treeGridUtil-
|
|
776
|
+
//# sourceMappingURL=treeGridUtil-CPNva4kL.js.map
|