@lucian-seo/lucian-ui 0.1.4 → 0.2.0
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/README.md +35 -2
- package/dist/lib/{Menu-B3G64GV4.js → Pagination-AWL5k5zG.js} +177 -48
- package/dist/lib/{Menu-B3G64GV4.js.map → Pagination-AWL5k5zG.js.map} +1 -1
- package/dist/lib/{Toolbar-DpCq_HXG.js → Toolbar-DDOaxG3B.js} +65 -194
- package/dist/lib/Toolbar-DDOaxG3B.js.map +1 -0
- package/dist/lib/{VoiceControlBar-CZL-k7ym.js → VoiceControlBar-lMPuJMcF.js} +1767 -404
- package/dist/lib/VoiceControlBar-lMPuJMcF.js.map +1 -0
- package/dist/lib/components/composed/index.js +3 -3
- package/dist/lib/components/extended/DataGrid/DataGrid.d.ts +30 -45
- package/dist/lib/components/extended/DataGrid/DataGrid.features.d.ts +155 -0
- package/dist/lib/components/extended/DataGrid/DataGridComplete.d.ts +4 -0
- package/dist/lib/components/extended/DataGrid/index.d.ts +2 -0
- package/dist/lib/components/extended/index.js +2 -2
- package/dist/lib/index.js +4 -4
- package/dist/lib/styles.css +1 -1
- package/docs/DATAGRID.md +127 -0
- package/docs/README.md +37 -0
- package/package.json +6 -2
- package/dist/lib/Toolbar-DpCq_HXG.js.map +0 -1
- package/dist/lib/VoiceControlBar-CZL-k7ym.js.map +0 -1
|
@@ -3,19 +3,21 @@ import { n as a, t as o } from "./Input-DzJm1Kv4.js";
|
|
|
3
3
|
import { a as s, i as c, n as l, o as u, r as d, t as f } from "./Waveform-EahaE6uD.js";
|
|
4
4
|
import { i as p, n as m, t as h } from "./Tooltip-BW1-aVDg.js";
|
|
5
5
|
import { a as g, i as _, n as v, o as y, r as b, t as x } from "./ToggleButton-r73bokux.js";
|
|
6
|
-
import {
|
|
6
|
+
import { c as S, d as C, i as ee, l as te, m as w, o as T, p as E, r as ne, s as D, t as re } from "./Pagination-AWL5k5zG.js";
|
|
7
7
|
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
8
|
-
import { useCallback as
|
|
9
|
-
import { AlertCircle as
|
|
8
|
+
import { useCallback as ie, useEffect as j, useId as M, useLayoutEffect as ae, useMemo as oe, useRef as N, useState as P } from "react";
|
|
9
|
+
import { AlertCircle as se, ArrowDown as ce, ArrowDownRight as le, ArrowDownToLine as F, ArrowUp as ue, ArrowUpRight as de, Brain as fe, Check as I, CheckCircle2 as pe, ChevronDown as me, ChevronLeft as L, ChevronRight as he, CircleSlash as ge, CornerDownRight as _e, Eye as ve, EyeOff as ye, GripVertical as R, ImageOff as z, Keyboard as B, Mic as be, MicOff as xe, Minus as V, MoreHorizontal as Se, PhoneOff as H, Plus as U, RotateCcw as Ce, Search as we, ShieldAlert as Te, ShieldCheck as W, ShieldX as G, SlidersHorizontal as Ee, Square as De, Tag as Oe, Terminal as K, ThumbsDown as ke, ThumbsUp as Ae, Trash2 as q, Upload as je, X as J, XCircle as Y } from "lucide-react";
|
|
10
|
+
import { aggregationFn_count as Me, aggregationFn_extent as Ne, aggregationFn_first as Pe, aggregationFn_last as X, aggregationFn_max as Fe, aggregationFn_mean as Z, aggregationFn_median as Q, aggregationFn_min as Ie, aggregationFn_sum as Le, aggregationFn_unique as Re, aggregationFn_uniqueCount as ze, columnVisibilityFeature as Be, constructFilterFn as Ve, createExpandedRowModel as He, createFacetedMinMaxValues as Ue, createFacetedRowModel as We, createFacetedUniqueValues as Ge, createFilteredRowModel as Ke, createGroupedRowModel as qe, createPaginatedRowModel as Je, createSortedRowModel as Ye, filterFn_equalsString as Xe, filterFn_inNumberRange as Ze, filterFn_includesString as Qe, filterFns as $e, functionalUpdate as et, rowSelectionFeature as tt, rowSortingFeature as nt, sortFn_alphanumeric as rt, sortFn_basic as it, sortFn_datetime as at, sortFns as ot, stockFeatures as st, tableFeatures as ct, useTable as lt } from "@tanstack/react-table";
|
|
11
|
+
import { defaultRangeExtractor as ut, useVirtualizer as dt } from "@tanstack/react-virtual";
|
|
10
12
|
//#region src/components/extended/ActivityList/ActivityList.tsx
|
|
11
|
-
var
|
|
13
|
+
var ft = {
|
|
12
14
|
pending: "대기 중",
|
|
13
15
|
running: "진행 중",
|
|
14
16
|
done: "완료",
|
|
15
17
|
failed: "실패",
|
|
16
18
|
skipped: "건너뜀"
|
|
17
19
|
};
|
|
18
|
-
function
|
|
20
|
+
function pt({ steps: t, label: n, announce: a, size: o = "md", className: s, ...c }) {
|
|
19
21
|
let l = t.find((e) => e.state === "running");
|
|
20
22
|
return /* @__PURE__ */ A("div", {
|
|
21
23
|
...c,
|
|
@@ -33,13 +35,13 @@ function ke({ steps: t, label: n, announce: a, size: o = "md", className: s, ...
|
|
|
33
35
|
className: "activity-list__mark",
|
|
34
36
|
"aria-hidden": "true",
|
|
35
37
|
children: t.state === "running" ? /* @__PURE__ */ k(e, { size: o === "sm" ? "xs" : "sm" }) : t.state === "done" ? /* @__PURE__ */ k(r, {
|
|
36
|
-
icon:
|
|
38
|
+
icon: I,
|
|
37
39
|
size: "xs"
|
|
38
40
|
}) : t.state === "failed" ? /* @__PURE__ */ k(r, {
|
|
39
|
-
icon:
|
|
41
|
+
icon: se,
|
|
40
42
|
size: "xs"
|
|
41
43
|
}) : t.state === "skipped" ? /* @__PURE__ */ k(r, {
|
|
42
|
-
icon:
|
|
44
|
+
icon: V,
|
|
43
45
|
size: "xs"
|
|
44
46
|
}) : null
|
|
45
47
|
}),
|
|
@@ -47,7 +49,7 @@ function ke({ steps: t, label: n, announce: a, size: o = "md", className: s, ...
|
|
|
47
49
|
className: "activity-list__body",
|
|
48
50
|
children: [/* @__PURE__ */ A("span", {
|
|
49
51
|
className: "activity-list__label",
|
|
50
|
-
children: [t.label, /* @__PURE__ */ A(i, { children: [" — ",
|
|
52
|
+
children: [t.label, /* @__PURE__ */ A(i, { children: [" — ", ft[t.state]] })]
|
|
51
53
|
}), t.detail ? /* @__PURE__ */ k("span", {
|
|
52
54
|
className: "activity-list__detail",
|
|
53
55
|
children: t.detail
|
|
@@ -67,25 +69,25 @@ function ke({ steps: t, label: n, announce: a, size: o = "md", className: s, ...
|
|
|
67
69
|
}
|
|
68
70
|
//#endregion
|
|
69
71
|
//#region src/components/extended/BackgroundProgress/BackgroundProgress.tsx
|
|
70
|
-
var
|
|
71
|
-
done:
|
|
72
|
-
failed:
|
|
73
|
-
},
|
|
72
|
+
var mt = {
|
|
73
|
+
done: pe,
|
|
74
|
+
failed: Y
|
|
75
|
+
}, ht = {
|
|
74
76
|
running: "진행 중",
|
|
75
77
|
done: "완료",
|
|
76
78
|
failed: "실패"
|
|
77
79
|
};
|
|
78
|
-
function
|
|
79
|
-
let p = n.filter((e) => e.state === "failed").length, m = n.filter((e) => (e.state ?? "running") === "running").length, h =
|
|
80
|
-
|
|
80
|
+
function gt({ title: e, jobs: n, value: a, open: o = !1, onOpenChange: c, onDismiss: l, fit: u = "viewport", className: d, ...f }) {
|
|
81
|
+
let p = n.filter((e) => e.state === "failed").length, m = n.filter((e) => (e.state ?? "running") === "running").length, h = N(null), g = N(/* @__PURE__ */ new Map()), [_, v] = P("");
|
|
82
|
+
j(() => {
|
|
81
83
|
let e = g.current, t = n.filter((t) => {
|
|
82
84
|
let n = t.state ?? "running";
|
|
83
85
|
return n !== "running" && e.has(t.id) && e.get(t.id) !== n;
|
|
84
|
-
}).map((e) => `${e.label} ${
|
|
86
|
+
}).map((e) => `${e.label} ${ht[e.state ?? "running"]}`);
|
|
85
87
|
g.current = new Map(n.map((e) => [e.id, e.state ?? "running"])), t.length && v(t.join(", "));
|
|
86
88
|
}, [n]);
|
|
87
|
-
let y =
|
|
88
|
-
return
|
|
89
|
+
let y = N(null);
|
|
90
|
+
return j(() => {
|
|
89
91
|
let e = y.current;
|
|
90
92
|
if (e === null) return;
|
|
91
93
|
y.current = null;
|
|
@@ -120,7 +122,7 @@ function Me({ title: e, jobs: n, value: a, open: o = !1, onOpenChange: c, onDism
|
|
|
120
122
|
onClick: () => c?.(!o),
|
|
121
123
|
"data-part": "toggle",
|
|
122
124
|
children: [/* @__PURE__ */ k(r, {
|
|
123
|
-
icon:
|
|
125
|
+
icon: me,
|
|
124
126
|
size: "sm",
|
|
125
127
|
className: "background-progress__chevron",
|
|
126
128
|
"aria-hidden": "true"
|
|
@@ -135,7 +137,7 @@ function Me({ title: e, jobs: n, value: a, open: o = !1, onOpenChange: c, onDism
|
|
|
135
137
|
children: [p > 0 ? `${p}개 실패 · ` : null, m > 0 ? `${m}개 진행 중` : "모두 끝남"]
|
|
136
138
|
}),
|
|
137
139
|
l ? /* @__PURE__ */ k(t, {
|
|
138
|
-
icon:
|
|
140
|
+
icon: J,
|
|
139
141
|
label: `${e} 닫기`,
|
|
140
142
|
size: "sm",
|
|
141
143
|
variant: "ghost",
|
|
@@ -170,7 +172,7 @@ function Me({ title: e, jobs: n, value: a, open: o = !1, onOpenChange: c, onDism
|
|
|
170
172
|
className: "background-progress__job-label",
|
|
171
173
|
children: [
|
|
172
174
|
n === "running" ? null : /* @__PURE__ */ k(r, {
|
|
173
|
-
icon:
|
|
175
|
+
icon: mt[n],
|
|
174
176
|
size: "xs",
|
|
175
177
|
className: "background-progress__job-glyph",
|
|
176
178
|
"aria-hidden": "true"
|
|
@@ -181,7 +183,7 @@ function Me({ title: e, jobs: n, value: a, open: o = !1, onOpenChange: c, onDism
|
|
|
181
183
|
}),
|
|
182
184
|
/* @__PURE__ */ k("span", {
|
|
183
185
|
className: "background-progress__said",
|
|
184
|
-
children: ` — ${
|
|
186
|
+
children: ` — ${ht[n]}`
|
|
185
187
|
})
|
|
186
188
|
]
|
|
187
189
|
}), e.detail ? /* @__PURE__ */ k("p", {
|
|
@@ -198,7 +200,7 @@ function Me({ title: e, jobs: n, value: a, open: o = !1, onOpenChange: c, onDism
|
|
|
198
200
|
"data-part": "job-bar"
|
|
199
201
|
}) : null,
|
|
200
202
|
e.onCancel && n === "running" ? /* @__PURE__ */ k(t, {
|
|
201
|
-
icon:
|
|
203
|
+
icon: J,
|
|
202
204
|
label: `${e.label} 취소`,
|
|
203
205
|
size: "sm",
|
|
204
206
|
variant: "ghost",
|
|
@@ -218,10 +220,10 @@ function Me({ title: e, jobs: n, value: a, open: o = !1, onOpenChange: c, onDism
|
|
|
218
220
|
}
|
|
219
221
|
//#endregion
|
|
220
222
|
//#region src/components/extended/AddressForm/AddressForm.tsx
|
|
221
|
-
var
|
|
223
|
+
var _t = {
|
|
222
224
|
KR: "대한민국",
|
|
223
225
|
US: "미국"
|
|
224
|
-
},
|
|
226
|
+
}, vt = {
|
|
225
227
|
KR: [
|
|
226
228
|
"postalCode",
|
|
227
229
|
"line1",
|
|
@@ -234,7 +236,7 @@ var Ne = {
|
|
|
234
236
|
"region",
|
|
235
237
|
"postalCode"
|
|
236
238
|
]
|
|
237
|
-
},
|
|
239
|
+
}, yt = {
|
|
238
240
|
KR: {
|
|
239
241
|
postalCode: "우편번호",
|
|
240
242
|
line1: "도로명 주소",
|
|
@@ -247,7 +249,7 @@ var Ne = {
|
|
|
247
249
|
region: "State",
|
|
248
250
|
postalCode: "ZIP code"
|
|
249
251
|
}
|
|
250
|
-
},
|
|
252
|
+
}, bt = {
|
|
251
253
|
country: "country",
|
|
252
254
|
name: "name",
|
|
253
255
|
phone: "tel",
|
|
@@ -256,7 +258,7 @@ var Ne = {
|
|
|
256
258
|
line2: "address-line2",
|
|
257
259
|
city: "address-level2",
|
|
258
260
|
region: "address-level1"
|
|
259
|
-
},
|
|
261
|
+
}, xt = [
|
|
260
262
|
"CA",
|
|
261
263
|
"NY",
|
|
262
264
|
"TX",
|
|
@@ -264,11 +266,11 @@ var Ne = {
|
|
|
264
266
|
"IL",
|
|
265
267
|
"MA"
|
|
266
268
|
];
|
|
267
|
-
function
|
|
269
|
+
function St({ value: e, onChange: t, label: r, onFindPostcode: i, errors: a, countries: s = ["KR", "US"], regions: c = xt, namePrefix: l, className: u, ...f }) {
|
|
268
270
|
let p = (n) => t({
|
|
269
271
|
...e,
|
|
270
272
|
...n
|
|
271
|
-
}), m =
|
|
273
|
+
}), m = vt[e.country], h = yt[e.country], g = M(), _ = (e) => `${g}-${e}`, v = (e) => l ? `${l}.${e}` : e, y = (n) => {
|
|
272
274
|
n !== e.country && t({
|
|
273
275
|
...e,
|
|
274
276
|
country: n,
|
|
@@ -285,7 +287,7 @@ function Le({ value: e, onChange: t, label: r, onFindPostcode: i, errors: a, cou
|
|
|
285
287
|
role: "group",
|
|
286
288
|
"aria-label": r,
|
|
287
289
|
children: [
|
|
288
|
-
/* @__PURE__ */ k(
|
|
290
|
+
/* @__PURE__ */ k(C, {
|
|
289
291
|
label: "국가/지역",
|
|
290
292
|
id: _("country"),
|
|
291
293
|
error: a?.country,
|
|
@@ -293,18 +295,18 @@ function Le({ value: e, onChange: t, label: r, onFindPostcode: i, errors: a, cou
|
|
|
293
295
|
...t,
|
|
294
296
|
name: v("country"),
|
|
295
297
|
value: e.country,
|
|
296
|
-
autoComplete:
|
|
298
|
+
autoComplete: bt.country,
|
|
297
299
|
onChange: (e) => y(e.target.value),
|
|
298
300
|
"data-part": "country",
|
|
299
301
|
children: s.map((e) => /* @__PURE__ */ k("option", {
|
|
300
302
|
value: e,
|
|
301
|
-
children:
|
|
303
|
+
children: _t[e]
|
|
302
304
|
}, e))
|
|
303
305
|
})
|
|
304
306
|
}),
|
|
305
307
|
/* @__PURE__ */ A("div", {
|
|
306
308
|
className: "address-form__pair",
|
|
307
|
-
children: [/* @__PURE__ */ k(
|
|
309
|
+
children: [/* @__PURE__ */ k(C, {
|
|
308
310
|
label: "받는 사람",
|
|
309
311
|
id: _("name"),
|
|
310
312
|
error: a?.name,
|
|
@@ -313,11 +315,11 @@ function Le({ value: e, onChange: t, label: r, onFindPostcode: i, errors: a, cou
|
|
|
313
315
|
...t,
|
|
314
316
|
name: v("name"),
|
|
315
317
|
value: e.name,
|
|
316
|
-
autoComplete:
|
|
318
|
+
autoComplete: bt.name,
|
|
317
319
|
onChange: (e) => p({ name: e.target.value }),
|
|
318
320
|
"data-part": "name"
|
|
319
321
|
})
|
|
320
|
-
}), /* @__PURE__ */ k(
|
|
322
|
+
}), /* @__PURE__ */ k(C, {
|
|
321
323
|
label: "연락처",
|
|
322
324
|
id: _("phone"),
|
|
323
325
|
error: a?.phone,
|
|
@@ -328,13 +330,13 @@ function Le({ value: e, onChange: t, label: r, onFindPostcode: i, errors: a, cou
|
|
|
328
330
|
type: "tel",
|
|
329
331
|
inputMode: "tel",
|
|
330
332
|
value: e.phone,
|
|
331
|
-
autoComplete:
|
|
333
|
+
autoComplete: bt.phone,
|
|
332
334
|
onChange: (e) => p({ phone: e.target.value }),
|
|
333
335
|
"data-part": "phone"
|
|
334
336
|
})
|
|
335
337
|
})]
|
|
336
338
|
}),
|
|
337
|
-
m.map((t) => t === "postalCode" && e.country === "KR" ? /* @__PURE__ */ k(
|
|
339
|
+
m.map((t) => t === "postalCode" && e.country === "KR" ? /* @__PURE__ */ k(C, {
|
|
338
340
|
label: h[t],
|
|
339
341
|
id: _("postalCode"),
|
|
340
342
|
hint: "도로명이나 건물 이름으로 찾습니다",
|
|
@@ -347,7 +349,7 @@ function Le({ value: e, onChange: t, label: r, onFindPostcode: i, errors: a, cou
|
|
|
347
349
|
name: v("postalCode"),
|
|
348
350
|
value: e.postalCode,
|
|
349
351
|
inputMode: "numeric",
|
|
350
|
-
autoComplete:
|
|
352
|
+
autoComplete: bt.postalCode,
|
|
351
353
|
readOnly: !!i,
|
|
352
354
|
onChange: (e) => {
|
|
353
355
|
i || p({ postalCode: e.target.value });
|
|
@@ -362,7 +364,7 @@ function Le({ value: e, onChange: t, label: r, onFindPostcode: i, errors: a, cou
|
|
|
362
364
|
children: "주소 찾기"
|
|
363
365
|
})]
|
|
364
366
|
})
|
|
365
|
-
}, t) : t === "region" && e.country === "US" ? /* @__PURE__ */ k(
|
|
367
|
+
}, t) : t === "region" && e.country === "US" ? /* @__PURE__ */ k(C, {
|
|
366
368
|
label: h[t],
|
|
367
369
|
id: _("region"),
|
|
368
370
|
error: a?.region,
|
|
@@ -371,7 +373,7 @@ function Le({ value: e, onChange: t, label: r, onFindPostcode: i, errors: a, cou
|
|
|
371
373
|
...t,
|
|
372
374
|
name: v("region"),
|
|
373
375
|
value: e.region,
|
|
374
|
-
autoComplete:
|
|
376
|
+
autoComplete: bt.region,
|
|
375
377
|
onChange: (e) => p({ region: e.target.value }),
|
|
376
378
|
"data-part": "region",
|
|
377
379
|
children: [/* @__PURE__ */ k("option", {
|
|
@@ -382,7 +384,7 @@ function Le({ value: e, onChange: t, label: r, onFindPostcode: i, errors: a, cou
|
|
|
382
384
|
children: e
|
|
383
385
|
}, e))]
|
|
384
386
|
})
|
|
385
|
-
}, t) : /* @__PURE__ */ k(
|
|
387
|
+
}, t) : /* @__PURE__ */ k(C, {
|
|
386
388
|
label: h[t],
|
|
387
389
|
id: _(t),
|
|
388
390
|
error: a?.[t],
|
|
@@ -392,7 +394,7 @@ function Le({ value: e, onChange: t, label: r, onFindPostcode: i, errors: a, cou
|
|
|
392
394
|
name: v(t),
|
|
393
395
|
value: e[t],
|
|
394
396
|
inputMode: t === "postalCode" ? "numeric" : void 0,
|
|
395
|
-
autoComplete:
|
|
397
|
+
autoComplete: bt[t],
|
|
396
398
|
onChange: (e) => p({ [t]: e.target.value }),
|
|
397
399
|
"data-part": t
|
|
398
400
|
})
|
|
@@ -402,9 +404,9 @@ function Le({ value: e, onChange: t, label: r, onFindPostcode: i, errors: a, cou
|
|
|
402
404
|
}
|
|
403
405
|
//#endregion
|
|
404
406
|
//#region src/components/extended/ApprovalGate/ApprovalGate.tsx
|
|
405
|
-
function
|
|
406
|
-
let v =
|
|
407
|
-
return
|
|
407
|
+
function Ct({ title: e, action: t, detail: i, scopes: a, scope: o, onScopeChange: s, onApprove: l, onDeny: u, approveLabel: d = "허용", denyLabel: f = "거부", risk: p = "normal", state: m = "waiting", decision: h, className: g, ..._ }) {
|
|
408
|
+
let v = M(), y = M(), b = m === "waiting", x = N(null), S = N(b);
|
|
409
|
+
return j(() => {
|
|
408
410
|
let e = S.current && !b;
|
|
409
411
|
S.current = b, !(!e || document.activeElement !== document.body) && x.current?.focus();
|
|
410
412
|
}, [b]), /* @__PURE__ */ A("section", {
|
|
@@ -421,7 +423,7 @@ function Re({ title: e, action: t, detail: i, scopes: a, scope: o, onScopeChange
|
|
|
421
423
|
className: "approval-gate__mark",
|
|
422
424
|
"aria-hidden": "true",
|
|
423
425
|
children: /* @__PURE__ */ k(r, {
|
|
424
|
-
icon: m === "approved" ?
|
|
426
|
+
icon: m === "approved" ? W : m === "denied" ? G : Te,
|
|
425
427
|
size: "sm"
|
|
426
428
|
})
|
|
427
429
|
}), /* @__PURE__ */ k("h3", {
|
|
@@ -495,7 +497,7 @@ function Re({ title: e, action: t, detail: i, scopes: a, scope: o, onScopeChange
|
|
|
495
497
|
}
|
|
496
498
|
//#endregion
|
|
497
499
|
//#region src/components/extended/Citation/Citation.tsx
|
|
498
|
-
function
|
|
500
|
+
function wt({ index: e, title: t, domain: n, href: r, onActivate: a, className: o, ...s }) {
|
|
499
501
|
let c = n ? `출처 ${e}: ${t} · ${n}` : `출처 ${e}: ${t}`, l = r ? `${c} · 새 창에서 열림` : c, u = (e) => {
|
|
500
502
|
a && (r && (e.metaKey || e.ctrlKey || e.shiftKey) || (e.preventDefault(), a()));
|
|
501
503
|
}, d = /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("span", {
|
|
@@ -532,11 +534,11 @@ function ze({ index: e, title: t, domain: n, href: r, onActivate: a, className:
|
|
|
532
534
|
}
|
|
533
535
|
//#endregion
|
|
534
536
|
//#region src/components/extended/CommentThread/CommentThread.tsx
|
|
535
|
-
function
|
|
536
|
-
return e?.length ? e.flatMap((e) => [e, ...
|
|
537
|
+
function Tt(e) {
|
|
538
|
+
return e?.length ? e.flatMap((e) => [e, ...Tt(e.replies)]) : [];
|
|
537
539
|
}
|
|
538
|
-
function
|
|
539
|
-
let n = t ? [] :
|
|
540
|
+
function Et({ comment: e, reply: t }) {
|
|
541
|
+
let n = t ? [] : Tt(e.replies);
|
|
540
542
|
return /* @__PURE__ */ A("li", {
|
|
541
543
|
className: "comment-thread__comment",
|
|
542
544
|
"data-reply": t ? "" : void 0,
|
|
@@ -576,7 +578,7 @@ function Ve({ comment: e, reply: t }) {
|
|
|
576
578
|
}) : null,
|
|
577
579
|
n.length ? /* @__PURE__ */ k("ul", {
|
|
578
580
|
className: "comment-thread__replies",
|
|
579
|
-
children: n.map((e) => /* @__PURE__ */ k(
|
|
581
|
+
children: n.map((e) => /* @__PURE__ */ k(Et, {
|
|
580
582
|
comment: e,
|
|
581
583
|
reply: !0
|
|
582
584
|
}, e.id))
|
|
@@ -585,8 +587,8 @@ function Ve({ comment: e, reply: t }) {
|
|
|
585
587
|
})]
|
|
586
588
|
});
|
|
587
589
|
}
|
|
588
|
-
function
|
|
589
|
-
let h = e.reduce((e, t) => e + 1 +
|
|
590
|
+
function Dt({ comments: e, label: t, resolved: i, onResolve: a, onReopen: o, composer: s, loading: c, loadingComments: l = 2, empty: u = "아직 댓글이 없습니다.", error: d, className: f, ...p }) {
|
|
591
|
+
let h = e.reduce((e, t) => e + 1 + Tt(t.replies).length, 0);
|
|
590
592
|
return /* @__PURE__ */ k("section", {
|
|
591
593
|
...p,
|
|
592
594
|
className: `comment-thread ${f ?? ""}`.trim(),
|
|
@@ -600,7 +602,7 @@ function He({ comments: e, label: t, resolved: i, onResolve: a, onReopen: o, com
|
|
|
600
602
|
className: "comment-thread__resolved-mark",
|
|
601
603
|
"aria-hidden": "true",
|
|
602
604
|
children: /* @__PURE__ */ k(r, {
|
|
603
|
-
icon:
|
|
605
|
+
icon: I,
|
|
604
606
|
size: "xs"
|
|
605
607
|
})
|
|
606
608
|
}),
|
|
@@ -652,7 +654,7 @@ function He({ comments: e, label: t, resolved: i, onResolve: a, onReopen: o, com
|
|
|
652
654
|
className: "comment-thread__state",
|
|
653
655
|
"data-part": "empty",
|
|
654
656
|
children: u
|
|
655
|
-
}) : e.map((e) => /* @__PURE__ */ k(
|
|
657
|
+
}) : e.map((e) => /* @__PURE__ */ k(Et, { comment: e }, e.id))
|
|
656
658
|
}),
|
|
657
659
|
s ? /* @__PURE__ */ k("div", {
|
|
658
660
|
className: "comment-thread__composer",
|
|
@@ -664,7 +666,7 @@ function He({ comments: e, label: t, resolved: i, onResolve: a, onReopen: o, com
|
|
|
664
666
|
size: "sm",
|
|
665
667
|
variant: "outline",
|
|
666
668
|
tone: "neutral",
|
|
667
|
-
iconStart:
|
|
669
|
+
iconStart: I,
|
|
668
670
|
onClick: a,
|
|
669
671
|
"data-part": "resolve",
|
|
670
672
|
children: "해결로 표시"
|
|
@@ -675,15 +677,15 @@ function He({ comments: e, label: t, resolved: i, onResolve: a, onReopen: o, com
|
|
|
675
677
|
}
|
|
676
678
|
//#endregion
|
|
677
679
|
//#region src/components/extended/Composer/Composer.tsx
|
|
678
|
-
function
|
|
679
|
-
let [e, t] =
|
|
680
|
-
return
|
|
680
|
+
function Ot() {
|
|
681
|
+
let [e, t] = P(() => typeof window > "u" ? !1 : window.matchMedia("(pointer: coarse)").matches);
|
|
682
|
+
return j(() => {
|
|
681
683
|
let e = window.matchMedia("(pointer: coarse)"), n = () => t(e.matches);
|
|
682
684
|
return e.addEventListener("change", n), () => e.removeEventListener("change", n);
|
|
683
685
|
}, []), e;
|
|
684
686
|
}
|
|
685
|
-
function
|
|
686
|
-
let v =
|
|
687
|
+
function kt({ value: e, onValueChange: n, onSubmit: r, onStop: i, running: a, label: o, placeholder: s, maxRows: c = 8, attachments: l, tools: u, hint: d, disabled: f, enterSends: p, sendLabel: m = "보내기", stopLabel: h = "중지", className: g, ..._ }) {
|
|
688
|
+
let v = Ot(), y = p ?? !v, b = e.trim().length === 0, x = !a && !f && !b, S = () => {
|
|
687
689
|
x && r();
|
|
688
690
|
}, C = (e) => {
|
|
689
691
|
e.key !== "Enter" || e.shiftKey || !y || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || x && (e.preventDefault(), r());
|
|
@@ -730,7 +732,7 @@ function We({ value: e, onValueChange: n, onSubmit: r, onStop: i, running: a, la
|
|
|
730
732
|
children: d
|
|
731
733
|
}) : null,
|
|
732
734
|
a ? /* @__PURE__ */ k(t, {
|
|
733
|
-
icon:
|
|
735
|
+
icon: De,
|
|
734
736
|
label: h,
|
|
735
737
|
type: "button",
|
|
736
738
|
variant: "solid",
|
|
@@ -740,7 +742,7 @@ function We({ value: e, onValueChange: n, onSubmit: r, onStop: i, running: a, la
|
|
|
740
742
|
disabled: !i,
|
|
741
743
|
"data-part": "stop"
|
|
742
744
|
}) : /* @__PURE__ */ k(t, {
|
|
743
|
-
icon:
|
|
745
|
+
icon: ue,
|
|
744
746
|
label: m,
|
|
745
747
|
type: "submit",
|
|
746
748
|
variant: "solid",
|
|
@@ -756,17 +758,17 @@ function We({ value: e, onValueChange: n, onSubmit: r, onStop: i, running: a, la
|
|
|
756
758
|
}
|
|
757
759
|
//#endregion
|
|
758
760
|
//#region src/components/extended/CouponField/CouponField.tsx
|
|
759
|
-
function
|
|
760
|
-
let y =
|
|
761
|
-
|
|
761
|
+
function At({ value: e, onValueChange: i, onApply: a, applied: s = [], onRemove: c, error: l, pending: u, as: d = "form", label: f = "쿠폰 코드", placeholder: p = "코드를 넣으세요", applyLabel: m = "적용", disabled: h, className: _, ...v }) {
|
|
762
|
+
let y = M(), b = N(s.map((e) => e.code)), [x, S] = P("");
|
|
763
|
+
j(() => {
|
|
762
764
|
let e = b.current, t = s.filter((t) => !e.includes(t.code));
|
|
763
765
|
b.current = s.map((e) => e.code), t.length && S(t.map((e) => `${e.code} 쿠폰을 적용했습니다`).join(", "));
|
|
764
766
|
}, [s]);
|
|
765
767
|
let C = () => {
|
|
766
768
|
u || h || !e.trim() || a();
|
|
767
|
-
},
|
|
769
|
+
}, ee = (e) => {
|
|
768
770
|
e.preventDefault(), C();
|
|
769
|
-
},
|
|
771
|
+
}, te = d === "form", w = /* @__PURE__ */ A(O, { children: [
|
|
770
772
|
s.length ? /* @__PURE__ */ k("ul", {
|
|
771
773
|
className: "coupon-field__applied",
|
|
772
774
|
"data-part": "applied",
|
|
@@ -774,7 +776,7 @@ function Ge({ value: e, onValueChange: i, onApply: a, applied: s = [], onRemove:
|
|
|
774
776
|
className: "coupon-field__coupon",
|
|
775
777
|
children: [
|
|
776
778
|
/* @__PURE__ */ k(r, {
|
|
777
|
-
icon:
|
|
779
|
+
icon: Oe,
|
|
778
780
|
size: "sm",
|
|
779
781
|
tone: "success",
|
|
780
782
|
"aria-hidden": "true"
|
|
@@ -788,7 +790,7 @@ function Ge({ value: e, onValueChange: i, onApply: a, applied: s = [], onRemove:
|
|
|
788
790
|
children: e.effect
|
|
789
791
|
}),
|
|
790
792
|
c ? /* @__PURE__ */ k(t, {
|
|
791
|
-
icon:
|
|
793
|
+
icon: J,
|
|
792
794
|
label: `${e.code} 쿠폰 빼기`,
|
|
793
795
|
size: "sm",
|
|
794
796
|
onClick: () => c(e.code),
|
|
@@ -803,7 +805,7 @@ function Ge({ value: e, onValueChange: i, onApply: a, applied: s = [], onRemove:
|
|
|
803
805
|
value: e,
|
|
804
806
|
onChange: (e) => i(e.target.value),
|
|
805
807
|
onKeyDown: (e) => {
|
|
806
|
-
|
|
808
|
+
te || e.key !== "Enter" || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), C());
|
|
807
809
|
},
|
|
808
810
|
placeholder: p,
|
|
809
811
|
"aria-label": f,
|
|
@@ -815,8 +817,8 @@ function Ge({ value: e, onValueChange: i, onApply: a, applied: s = [], onRemove:
|
|
|
815
817
|
spellCheck: !1,
|
|
816
818
|
"data-part": "field"
|
|
817
819
|
}), /* @__PURE__ */ k(n, {
|
|
818
|
-
type:
|
|
819
|
-
onClick:
|
|
820
|
+
type: te ? "submit" : "button",
|
|
821
|
+
onClick: te ? void 0 : C,
|
|
820
822
|
variant: "outline",
|
|
821
823
|
tone: "neutral",
|
|
822
824
|
loading: u,
|
|
@@ -838,175 +840,1520 @@ function Ge({ value: e, onValueChange: i, onApply: a, applied: s = [], onRemove:
|
|
|
838
840
|
"data-part": "announced",
|
|
839
841
|
children: x
|
|
840
842
|
})
|
|
841
|
-
] }),
|
|
842
|
-
return
|
|
843
|
+
] }), T = `coupon-field ${_ ?? ""}`.trim();
|
|
844
|
+
return te ? /* @__PURE__ */ k("form", {
|
|
843
845
|
...v,
|
|
844
|
-
className:
|
|
845
|
-
onSubmit:
|
|
846
|
-
children:
|
|
846
|
+
className: T,
|
|
847
|
+
onSubmit: ee,
|
|
848
|
+
children: w
|
|
847
849
|
}) : /* @__PURE__ */ k("div", {
|
|
848
850
|
...v,
|
|
849
|
-
className:
|
|
850
|
-
children:
|
|
851
|
+
className: T,
|
|
852
|
+
children: w
|
|
851
853
|
});
|
|
852
854
|
}
|
|
853
855
|
//#endregion
|
|
854
856
|
//#region src/components/extended/DataGrid/DataGrid.state.ts
|
|
855
|
-
function
|
|
856
|
-
let r = e.filter((e) => !t.has(e.id)).map((e) => ({
|
|
857
|
-
id: e.id,
|
|
858
|
-
kind: "data",
|
|
859
|
-
column: e
|
|
860
|
-
}));
|
|
861
|
-
return n ? [{
|
|
862
|
-
id: "__select",
|
|
863
|
-
kind: "select"
|
|
864
|
-
}, ...r] : r;
|
|
865
|
-
}
|
|
866
|
-
function qe(e, t) {
|
|
857
|
+
function jt(e, t) {
|
|
867
858
|
return {
|
|
868
859
|
row: Math.max(0, Math.min(t.rows - 1, e.row)),
|
|
869
860
|
column: Math.max(0, Math.min(t.columns - 1, e.column))
|
|
870
861
|
};
|
|
871
862
|
}
|
|
872
|
-
function
|
|
873
|
-
return
|
|
863
|
+
function Mt(e, t, n, r, i) {
|
|
864
|
+
return jt({
|
|
874
865
|
row: i?.row ?? e.row + n,
|
|
875
866
|
column: i?.column ?? e.column + r
|
|
876
867
|
}, t);
|
|
877
868
|
}
|
|
878
|
-
function
|
|
869
|
+
function Nt(e, t, n) {
|
|
879
870
|
return e ? "error" : t ? "loading" : n === 0 ? "empty" : "rows";
|
|
880
871
|
}
|
|
881
|
-
function
|
|
872
|
+
function Pt(e, t, n) {
|
|
882
873
|
return e === "loading" ? n : e === "rows" ? t : 0;
|
|
883
874
|
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
875
|
+
//#endregion
|
|
876
|
+
//#region src/components/extended/DataGrid/DataGrid.features.ts
|
|
877
|
+
function Ft(e, t) {
|
|
878
|
+
let n = (e) => String(e ?? "").normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLocaleLowerCase(), r = n(e), i = n(t).trim(), a = 0;
|
|
879
|
+
for (let e of i) {
|
|
880
|
+
if (a = r.indexOf(e, a), a < 0) return !1;
|
|
881
|
+
a++;
|
|
882
|
+
}
|
|
883
|
+
return !0;
|
|
887
884
|
}
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
885
|
+
var It = Ve({
|
|
886
|
+
filter: Ft,
|
|
887
|
+
autoRemove: (e) => !String(e ?? "").trim()
|
|
888
|
+
}), Lt = ct({
|
|
889
|
+
...st,
|
|
890
|
+
filteredRowModel: Ke(),
|
|
891
|
+
sortedRowModel: Ye(),
|
|
892
|
+
groupedRowModel: qe(),
|
|
893
|
+
expandedRowModel: He(),
|
|
894
|
+
paginatedRowModel: Je(),
|
|
895
|
+
facetedRowModel: We(),
|
|
896
|
+
facetedUniqueValues: Ge(),
|
|
897
|
+
facetedMinMaxValues: Ue(),
|
|
898
|
+
filterFns: {
|
|
899
|
+
...$e,
|
|
900
|
+
includesString: Qe,
|
|
901
|
+
equalsString: Xe,
|
|
902
|
+
inNumberRange: Ze,
|
|
903
|
+
fuzzy: It
|
|
904
|
+
},
|
|
905
|
+
sortFns: {
|
|
906
|
+
...ot,
|
|
907
|
+
alphanumeric: rt,
|
|
908
|
+
basic: it,
|
|
909
|
+
datetime: at
|
|
910
|
+
},
|
|
911
|
+
aggregationFns: {
|
|
912
|
+
sum: Le,
|
|
913
|
+
min: Ie,
|
|
914
|
+
max: Fe,
|
|
915
|
+
mean: Z,
|
|
916
|
+
median: Q,
|
|
917
|
+
count: Me,
|
|
918
|
+
uniqueCount: ze,
|
|
919
|
+
first: Pe,
|
|
920
|
+
last: X,
|
|
921
|
+
extent: Ne,
|
|
922
|
+
unique: Re
|
|
923
|
+
}
|
|
924
|
+
});
|
|
925
|
+
function Rt(e) {
|
|
926
|
+
return {
|
|
927
|
+
search: "",
|
|
928
|
+
filters: [],
|
|
929
|
+
sorting: [],
|
|
930
|
+
pagination: {
|
|
931
|
+
pageIndex: 0,
|
|
932
|
+
pageSize: 25
|
|
933
|
+
},
|
|
934
|
+
columnOrder: [],
|
|
935
|
+
columnSizes: {},
|
|
936
|
+
hiddenColumns: [],
|
|
937
|
+
columnPinning: {
|
|
938
|
+
start: [],
|
|
939
|
+
end: []
|
|
940
|
+
},
|
|
941
|
+
grouping: [],
|
|
942
|
+
expanded: {},
|
|
943
|
+
rowPinning: {
|
|
944
|
+
top: [],
|
|
945
|
+
bottom: []
|
|
946
|
+
},
|
|
947
|
+
selectedKeys: [],
|
|
948
|
+
cellSelection: [],
|
|
949
|
+
...e
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
//#endregion
|
|
953
|
+
//#region src/components/extended/DataGrid/DataGridComplete.tsx
|
|
954
|
+
var $ = "__data_grid_controls", zt = {
|
|
955
|
+
sm: 128,
|
|
956
|
+
md: 192,
|
|
957
|
+
lg: 288,
|
|
958
|
+
grow: 224
|
|
959
|
+
}, Bt = {
|
|
960
|
+
sum: "합계",
|
|
961
|
+
min: "최소",
|
|
962
|
+
max: "최대",
|
|
963
|
+
mean: "평균",
|
|
964
|
+
median: "중앙값",
|
|
965
|
+
count: "행 수",
|
|
966
|
+
uniqueCount: "고유 값 수",
|
|
967
|
+
first: "첫 값",
|
|
968
|
+
last: "마지막 값",
|
|
969
|
+
extent: "범위",
|
|
970
|
+
unique: "고유 값"
|
|
971
|
+
}, Vt = (e) => e == null ? "—" : Array.isArray(e) ? e.map((e) => String(e ?? "—")).join(" · ") : typeof e == "object" ? Object.entries(e).map(([e, t]) => `${Bt[e] ?? e}: ${Vt(t)}`).join(" · ") : String(e), Ht = (e, t) => {
|
|
972
|
+
if (e.accessor) return e.accessor(t);
|
|
973
|
+
if (e.value) return e.value(t);
|
|
974
|
+
if (typeof t == "object" && t && e.id in t) return t[e.id];
|
|
975
|
+
let n = e.cell(t);
|
|
976
|
+
return typeof n == "number" || typeof n == "string" ? n : "";
|
|
977
|
+
};
|
|
978
|
+
function Ut(e) {
|
|
979
|
+
let r = Object.fromEntries(Object.entries(e).filter(([e]) => e.startsWith("data-"))), i = e.features === "all" ? {} : e.features ?? {}, a = (e) => i[e] !== !1, s = i.processing === "server", c = M(), l = "[role=\"grid\"], [role=\"treegrid\"]", u = N(null), f = N(null), h = N(null), g = N(null), _ = N(null), v = N(null), [y, b] = P({
|
|
980
|
+
head: 40,
|
|
981
|
+
top: 0,
|
|
982
|
+
bottom: 0,
|
|
983
|
+
foot: 0,
|
|
984
|
+
row: 36
|
|
985
|
+
}), [x, S] = P(() => Rt({
|
|
986
|
+
...i.defaultState,
|
|
987
|
+
...e.sort ? { sorting: [e.sort] } : {},
|
|
988
|
+
...e.hiddenColumns ? { hiddenColumns: e.hiddenColumns } : {},
|
|
989
|
+
...e.selectedKeys ? { selectedKeys: e.selectedKeys } : {}
|
|
990
|
+
})), C = {
|
|
991
|
+
...x,
|
|
992
|
+
...i.state,
|
|
993
|
+
...e.sort === void 0 ? {} : { sorting: e.sort ? [e.sort] : [] },
|
|
994
|
+
...e.hiddenColumns === void 0 ? {} : { hiddenColumns: e.hiddenColumns },
|
|
995
|
+
...e.selectedKeys === void 0 ? {} : { selectedKeys: e.selectedKeys }
|
|
996
|
+
}, w = N(C);
|
|
997
|
+
w.current = C;
|
|
998
|
+
let E = (t, n, r = !1) => {
|
|
999
|
+
let a = w.current, o = et(n, a[t]), s = {
|
|
1000
|
+
...a,
|
|
1001
|
+
[t]: o,
|
|
1002
|
+
...r ? { pagination: {
|
|
1003
|
+
...a.pagination,
|
|
1004
|
+
pageIndex: 0
|
|
1005
|
+
} } : {}
|
|
1006
|
+
};
|
|
1007
|
+
w.current = s, S(s), i.onStateChange?.(s), t === "sorting" && e.onSortChange?.(s.sorting[0] ?? null), t === "hiddenColumns" && e.onHiddenColumnsChange?.(s.hiddenColumns), t === "selectedKeys" && e.onSelectedChange?.(s.selectedKeys);
|
|
1008
|
+
}, [D, ie] = P({
|
|
1009
|
+
row: 0,
|
|
1010
|
+
column: 0
|
|
1011
|
+
}), ae = N(!1), [se, le] = P(null), [F, de] = P(null), fe = N(F);
|
|
1012
|
+
fe.current = F;
|
|
1013
|
+
let [I, pe] = P(""), [L, ge] = P(null), [_e, ve] = P(null), ye = N(/* @__PURE__ */ new Map()), R = oe(() => {
|
|
1014
|
+
let t = (n) => n.map((n) => ({
|
|
1015
|
+
data: n,
|
|
1016
|
+
key: e.rowKey(n),
|
|
1017
|
+
children: i.getSubRows ? t(i.getSubRows(n) ?? []) : void 0
|
|
1018
|
+
}));
|
|
1019
|
+
return t(e.rows);
|
|
1020
|
+
}, [
|
|
1021
|
+
e.rows,
|
|
1022
|
+
e.rowKey,
|
|
1023
|
+
i.getSubRows
|
|
1024
|
+
]), z = oe(() => new Map(e.columns.map((e) => [e.id, e])), [e.columns]), B = a("rowSelection"), be = B || a("rowPinning"), xe = oe(() => {
|
|
1025
|
+
let t = e.columns.map((e) => ({
|
|
1026
|
+
id: e.id,
|
|
1027
|
+
header: e.header,
|
|
1028
|
+
accessorFn: (t) => Ht(e, t.data),
|
|
1029
|
+
size: e.size ?? zt[e.width ?? "md"],
|
|
1030
|
+
minSize: e.minSize ?? 72,
|
|
1031
|
+
maxSize: e.maxSize ?? 1200,
|
|
1032
|
+
enableSorting: e.sortable !== !1,
|
|
1033
|
+
enableHiding: e.hideable !== !1,
|
|
1034
|
+
enableColumnFilter: e.filter !== !1,
|
|
1035
|
+
enableGrouping: e.groupable !== !1,
|
|
1036
|
+
filterFn: e.filterOperator ?? (e.filter === "number" ? "inNumberRange" : e.filter === "select" ? "equalsString" : e.filter === "fuzzy" ? "fuzzy" : "includesString"),
|
|
1037
|
+
sortFn: e.sortType ?? (e.numeric || e.filter === "number" ? "basic" : "auto"),
|
|
1038
|
+
sortDescFirst: !1,
|
|
1039
|
+
aggregationFn: e.aggregation,
|
|
1040
|
+
spanColumns: typeof e.spanColumns == "function" ? ({ row: t }) => e.spanColumns(t.original.data) : e.spanColumns,
|
|
1041
|
+
spanRows: e.spanRows ? (t) => i.renderDetail && (t.anchorRow.getIsExpanded() || t.previousRow.getIsExpanded() || t.row.getIsExpanded()) ? !1 : typeof e.spanRows == "function" ? e.spanRows(t.anchorRow.original.data, t.row.original.data) : t.value != null && Object.is(t.anchorValue, t.value) : !1
|
|
1042
|
+
})), n = [];
|
|
1043
|
+
for (let r = 0; r < t.length; r++) {
|
|
1044
|
+
let i = e.columns[r].headerGroup;
|
|
1045
|
+
if (!i) n.push(t[r]);
|
|
1046
|
+
else {
|
|
1047
|
+
let e = n.find((e) => e.id === `__group_${i}`);
|
|
1048
|
+
e && "columns" in e ? e.columns = [...e.columns ?? [], t[r]] : n.push({
|
|
1049
|
+
id: `__group_${i}`,
|
|
1050
|
+
header: i,
|
|
1051
|
+
columns: [t[r]]
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
return be && n.unshift({
|
|
1056
|
+
id: $,
|
|
1057
|
+
header: "행 작업",
|
|
1058
|
+
size: 128,
|
|
1059
|
+
minSize: 128,
|
|
1060
|
+
maxSize: 192,
|
|
1061
|
+
enableSorting: !1,
|
|
1062
|
+
enableHiding: !1,
|
|
1063
|
+
enableColumnFilter: !1,
|
|
1064
|
+
enableGlobalFilter: !1,
|
|
1065
|
+
enableGrouping: !1,
|
|
1066
|
+
enableCellSelection: !1,
|
|
1067
|
+
enableCellSpanning: !1,
|
|
1068
|
+
enableResizing: !1
|
|
1069
|
+
}), n;
|
|
1070
|
+
}, [
|
|
1071
|
+
e.columns,
|
|
1072
|
+
be,
|
|
1073
|
+
i.renderDetail,
|
|
1074
|
+
C.expanded
|
|
1075
|
+
]), V = lt({
|
|
1076
|
+
features: Lt,
|
|
1077
|
+
data: R,
|
|
1078
|
+
columns: xe,
|
|
1079
|
+
getRowId: (e) => e.key,
|
|
1080
|
+
getSubRows: (e) => e.children,
|
|
1081
|
+
state: {
|
|
1082
|
+
globalFilter: C.search,
|
|
1083
|
+
columnFilters: C.filters,
|
|
1084
|
+
sorting: C.sorting.map((e) => ({
|
|
1085
|
+
id: e.columnId,
|
|
1086
|
+
desc: e.direction === "desc"
|
|
1087
|
+
})),
|
|
1088
|
+
pagination: C.pagination,
|
|
1089
|
+
columnOrder: C.columnOrder,
|
|
1090
|
+
columnSizing: C.columnSizes,
|
|
1091
|
+
columnVisibility: Object.fromEntries(C.hiddenColumns.map((e) => [e, !1])),
|
|
1092
|
+
columnPinning: C.columnPinning,
|
|
1093
|
+
grouping: C.grouping,
|
|
1094
|
+
expanded: C.expanded,
|
|
1095
|
+
rowPinning: C.rowPinning,
|
|
1096
|
+
rowSelection: Object.fromEntries(C.selectedKeys.map((e) => [e, !0])),
|
|
1097
|
+
cellSelection: C.cellSelection
|
|
1098
|
+
},
|
|
1099
|
+
onGlobalFilterChange: (e) => E("search", e, !0),
|
|
1100
|
+
onColumnFiltersChange: (e) => E("filters", e, !0),
|
|
1101
|
+
onSortingChange: (e) => E("sorting", (t) => et(e, t.map((e) => ({
|
|
1102
|
+
id: e.columnId,
|
|
1103
|
+
desc: e.direction === "desc"
|
|
1104
|
+
}))).map((e) => ({
|
|
1105
|
+
columnId: e.id,
|
|
1106
|
+
direction: e.desc ? "desc" : "asc"
|
|
1107
|
+
})), !0),
|
|
1108
|
+
onPaginationChange: (e) => E("pagination", e),
|
|
1109
|
+
onColumnOrderChange: (e) => E("columnOrder", e),
|
|
1110
|
+
onColumnSizingChange: (e) => E("columnSizes", e),
|
|
1111
|
+
onColumnVisibilityChange: (e) => E("hiddenColumns", (t) => Object.entries(et(e, Object.fromEntries(t.map((e) => [e, !1])))).filter(([, e]) => !e).map(([e]) => e)),
|
|
1112
|
+
onColumnPinningChange: (e) => E("columnPinning", e),
|
|
1113
|
+
onGroupingChange: (e) => E("grouping", e, !0),
|
|
1114
|
+
onExpandedChange: (e) => E("expanded", e),
|
|
1115
|
+
onRowPinningChange: (e) => E("rowPinning", e),
|
|
1116
|
+
onRowSelectionChange: (e) => E("selectedKeys", (t) => Object.keys(et(e, Object.fromEntries(t.map((e) => [e, !0]))))),
|
|
1117
|
+
onCellSelectionChange: (e) => E("cellSelection", e),
|
|
1118
|
+
manualSorting: s,
|
|
1119
|
+
manualFiltering: s,
|
|
1120
|
+
manualGrouping: s,
|
|
1121
|
+
manualAggregation: s || !a("aggregation"),
|
|
1122
|
+
manualPagination: s || !a("pagination"),
|
|
1123
|
+
rowCount: s ? i.rowCount : void 0,
|
|
1124
|
+
enableMultiSort: a("multiSort"),
|
|
1125
|
+
enableColumnResizing: a("columnResizing"),
|
|
1126
|
+
columnResizeMode: "onChange",
|
|
1127
|
+
enableColumnPinning: a("columnPinning"),
|
|
1128
|
+
enableGrouping: a("grouping"),
|
|
1129
|
+
groupedColumnMode: !1,
|
|
1130
|
+
enableExpanding: a("expanding"),
|
|
1131
|
+
getRowCanExpand: (e) => a("expanding") && (e.subRows.length > 0 || !!i.renderDetail && !e.getIsGrouped()),
|
|
1132
|
+
enableRowPinning: a("rowPinning"),
|
|
1133
|
+
keepPinnedRows: !1,
|
|
1134
|
+
enableRowSelection: B,
|
|
1135
|
+
enableCellSelection: a("cellSelection"),
|
|
1136
|
+
enableCellSpanning: a("cellSpanning"),
|
|
1137
|
+
globalFilterFn: a("fuzzySearch") ? "fuzzy" : "includesString",
|
|
1138
|
+
autoResetPageIndex: !1,
|
|
1139
|
+
autoResetExpanded: !1,
|
|
1140
|
+
autoResetCellSelection: !1
|
|
1141
|
+
}), H = [
|
|
1142
|
+
...V.getStartVisibleLeafColumns(),
|
|
1143
|
+
...V.getCenterVisibleLeafColumns(),
|
|
1144
|
+
...V.getEndVisibleLeafColumns()
|
|
1145
|
+
], U = V.getCenterVisibleLeafColumns(), Ce = V.getTopRows(), Te = V.getBottomRows(), W = V.getCenterRows(), G = [
|
|
1146
|
+
...Ce,
|
|
1147
|
+
...W,
|
|
1148
|
+
...Te
|
|
1149
|
+
], De = (e) => e.getIsGrouped() ? e.getLeafRows() : [e], Oe = new Set(C.selectedKeys), K = (e) => De(e).every((e) => Oe.has(e.id)), ke = (e) => !K(e) && De(e).some((e) => Oe.has(e.id)), Ae = [...new Set(V.getRowModel().rows.flatMap((e) => De(e).map((e) => e.id)))], q = Ae.length > 0 && Ae.every((e) => Oe.has(e)), je = Ae.some((e) => Oe.has(e)), J = (e, t) => E("selectedKeys", (n) => {
|
|
1150
|
+
let r = new Set(n);
|
|
1151
|
+
for (let n of e) t ? r.delete(n) : r.add(n);
|
|
1152
|
+
return [...r];
|
|
1153
|
+
}), Y = (e) => {
|
|
1154
|
+
e.getIsGrouped() ? J(De(e).map((e) => e.id), K(e)) : e.toggleSelected();
|
|
1155
|
+
}, Me = new Map(G.map((e, t) => [e.id, t])), Ne = V.getHeaderGroups().length, Pe = !!(i.getSubRows || i.renderDetail || C.grouping.length), X = Ne + +!!a("filtering"), Fe = a("aggregation") || e.columns.some((e) => e.footer), Z = !!e.error && e.retainRowsOnError && e.rows.length > 0, Q = Z ? "rows" : Nt(!!e.error, !!e.loading, G.length), Ie = Fe && Q === "rows", Le = e.virtualize !== !1 && Q === "rows", Re = a("columnVirtualization") && Q === "rows", ze = (e) => !!i.renderDetail && e.getIsExpanded() && !e.getIsGrouped() && e.subRows.length === 0, Be = /* @__PURE__ */ new Map(), Ve = 0;
|
|
1156
|
+
for (let e of G) Be.set(e.id, Ve), ze(e) && Ve++;
|
|
1157
|
+
let He = a("pagination") ? C.pagination.pageIndex * C.pagination.pageSize : 0, Ue = s ? G : V.getPrePaginatedRowModel().rows, We = Ue.filter(ze).length, Ge = s ? 0 : Ue.slice(0, He).filter(ze).length, Ke = X + (Q === "loading" ? e.loadingRows ?? 5 : Q === "rows" ? (s ? i.rowCount ?? G.length : V.getRowCount()) + We : 0) + +!!Ie, qe = a("cellSpanning") ? V.getCellSpanIndex() : null, Je = /* @__PURE__ */ new Set();
|
|
1158
|
+
for (let e of [
|
|
1159
|
+
F?.rowId,
|
|
1160
|
+
se,
|
|
1161
|
+
G[D.row]?.id
|
|
1162
|
+
]) {
|
|
1163
|
+
let t = W.findIndex((t) => t.id === e);
|
|
1164
|
+
t >= 0 && Je.add(t);
|
|
1165
|
+
}
|
|
1166
|
+
let Ye = dt({
|
|
1167
|
+
count: W.length,
|
|
1168
|
+
getScrollElement: () => u.current,
|
|
1169
|
+
getItemKey: (e) => W[e].id,
|
|
1170
|
+
estimateSize: (e) => ze(W[e]) ? y.row * 3 : y.row,
|
|
1171
|
+
enabled: Le,
|
|
1172
|
+
overscan: 5,
|
|
1173
|
+
rangeExtractor: (e) => {
|
|
1174
|
+
let t = /* @__PURE__ */ new Set([...ut(e), ...Je]);
|
|
1175
|
+
if (qe) {
|
|
1176
|
+
let n = Ce.length;
|
|
1177
|
+
for (let r of Object.values(qe.rowSpans)) for (let i = 0; i <= e.endIndex + n && i < r.length; i++) if (r[i] > 1 && i + r[i] > e.startIndex + n) {
|
|
1178
|
+
let e = i - n;
|
|
1179
|
+
e >= 0 && e < W.length && t.add(e);
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
return [...t].filter((e) => e >= 0 && e < W.length).sort((e, t) => e - t);
|
|
1183
|
+
},
|
|
1184
|
+
scrollMargin: y.head + y.top,
|
|
1185
|
+
scrollPaddingStart: y.head + y.top,
|
|
1186
|
+
scrollPaddingEnd: y.foot + y.bottom,
|
|
1187
|
+
measureElement: (e) => {
|
|
1188
|
+
let t = e.getBoundingClientRect().height, n = e.getAttribute("data-row-id");
|
|
1189
|
+
return n && ye.current.set(n, t), t;
|
|
1190
|
+
}
|
|
1191
|
+
}), Xe = /* @__PURE__ */ new Set();
|
|
1192
|
+
if (qe) {
|
|
1193
|
+
for (let e of qe.colSpans) if (e) {
|
|
1194
|
+
for (let t = 0; t < e.length; t++) if (e[t] > 1) {
|
|
1195
|
+
let e = H[t]?.id, n = U.findIndex((t) => t.id === e);
|
|
1196
|
+
n >= 0 && Xe.add(n);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
let Ze = dt({
|
|
1201
|
+
count: U.length,
|
|
1202
|
+
horizontal: !0,
|
|
1203
|
+
getScrollElement: () => u.current,
|
|
1204
|
+
getItemKey: (e) => U[e].id,
|
|
1205
|
+
estimateSize: (e) => U[e].getSize(),
|
|
1206
|
+
enabled: Re,
|
|
1207
|
+
overscan: 2,
|
|
1208
|
+
scrollMargin: V.getStartTotalSize(),
|
|
1209
|
+
scrollPaddingStart: V.getStartTotalSize(),
|
|
1210
|
+
scrollPaddingEnd: V.getEndTotalSize(),
|
|
1211
|
+
rangeExtractor: (e) => [.../* @__PURE__ */ new Set([
|
|
1212
|
+
...ut(e),
|
|
1213
|
+
...Xe,
|
|
1214
|
+
U.findIndex((e) => e.id === H[D.column]?.id)
|
|
1215
|
+
])].filter((e) => e >= 0 && e < U.length).sort((e, t) => e - t)
|
|
1216
|
+
}), Qe = new Set(Re ? Ze.getVirtualItems().map((e) => U[e.index].id) : U.map((e) => e.id));
|
|
1217
|
+
for (let e of H) e.getIsPinned() && Qe.add(e.id);
|
|
1218
|
+
let $e = Le ? Ye.getVirtualItems().map((e) => ({
|
|
1219
|
+
row: W[e.index],
|
|
1220
|
+
index: e.index,
|
|
1221
|
+
offset: e.start - y.head - y.top
|
|
1222
|
+
})) : W.map((e, t) => ({
|
|
1223
|
+
row: e,
|
|
1224
|
+
index: t,
|
|
1225
|
+
offset: 0
|
|
1226
|
+
}));
|
|
1227
|
+
j(() => {
|
|
1228
|
+
let e = () => {
|
|
1229
|
+
let e = f.current?.querySelector("[data-dg=\"row\"]"), t = {
|
|
1230
|
+
head: h.current?.getBoundingClientRect().height ?? 0,
|
|
1231
|
+
top: g.current?.getBoundingClientRect().height ?? 0,
|
|
1232
|
+
bottom: _.current?.getBoundingClientRect().height ?? 0,
|
|
1233
|
+
foot: v.current?.getBoundingClientRect().height ?? 0,
|
|
1234
|
+
row: e && parseFloat(getComputedStyle(e).minBlockSize) || 36
|
|
1235
|
+
};
|
|
1236
|
+
b((e) => Object.keys(t).every((n) => t[n] === e[n]) ? e : t), Ye.measure();
|
|
1237
|
+
};
|
|
1238
|
+
e();
|
|
1239
|
+
let t = new ResizeObserver(e);
|
|
1240
|
+
for (let e of [
|
|
1241
|
+
h.current,
|
|
1242
|
+
g.current,
|
|
1243
|
+
_.current,
|
|
1244
|
+
v.current
|
|
1245
|
+
]) e && t.observe(e);
|
|
1246
|
+
return () => t.disconnect();
|
|
1247
|
+
}, [
|
|
1248
|
+
e.density,
|
|
1249
|
+
X,
|
|
1250
|
+
C.grouping.length,
|
|
1251
|
+
Ce.length,
|
|
1252
|
+
Te.length,
|
|
1253
|
+
Fe,
|
|
1254
|
+
Q,
|
|
1255
|
+
Ye
|
|
1256
|
+
]), j(() => {
|
|
1257
|
+
Ze.measure();
|
|
1258
|
+
}, [
|
|
1259
|
+
C.columnSizes,
|
|
1260
|
+
C.columnOrder,
|
|
1261
|
+
C.hiddenColumns,
|
|
1262
|
+
C.columnPinning,
|
|
1263
|
+
Ze
|
|
1264
|
+
]), j(() => {
|
|
1265
|
+
ie((e) => {
|
|
1266
|
+
let t = jt(e, {
|
|
1267
|
+
rows: G.length,
|
|
1268
|
+
columns: H.length
|
|
1269
|
+
});
|
|
1270
|
+
for (let e = 0; e < G.length + H.length; e++) {
|
|
1271
|
+
let e = G[t.row]?.getVisibleCells().find((e) => e.column.id === H[t.column]?.id);
|
|
1272
|
+
if (!e?.getIsCovered()) break;
|
|
1273
|
+
if (e.getRowSpan() === 0 && t.row > 0) t.row--;
|
|
1274
|
+
else if (t.column > 0) t.column--;
|
|
1275
|
+
else break;
|
|
1276
|
+
}
|
|
1277
|
+
return t.row === e.row && t.column === e.column ? e : t;
|
|
1278
|
+
});
|
|
1279
|
+
}, [
|
|
1280
|
+
G.length,
|
|
1281
|
+
H.length,
|
|
1282
|
+
R,
|
|
1283
|
+
xe,
|
|
1284
|
+
C.sorting,
|
|
1285
|
+
C.filters,
|
|
1286
|
+
C.grouping,
|
|
1287
|
+
C.columnOrder,
|
|
1288
|
+
C.columnPinning
|
|
1289
|
+
]), j(() => {
|
|
1290
|
+
if (!s && a("pagination")) {
|
|
1291
|
+
let e = Math.max(0, V.getPageCount() - 1);
|
|
1292
|
+
C.pagination.pageIndex > e && V.setPageIndex(e);
|
|
1293
|
+
}
|
|
1294
|
+
}, [
|
|
1295
|
+
R,
|
|
1296
|
+
C.filters,
|
|
1297
|
+
C.search,
|
|
1298
|
+
C.grouping,
|
|
1299
|
+
C.pagination.pageIndex,
|
|
1300
|
+
s,
|
|
1301
|
+
i.pagination,
|
|
1302
|
+
V
|
|
1303
|
+
]), j(() => {
|
|
1304
|
+
F && (Q !== "rows" || !G.some((e) => e.id === F.rowId) || !H.some((e) => e.id === F.columnId)) && (fe.current = null, de(null));
|
|
1305
|
+
}, [
|
|
1306
|
+
F,
|
|
1307
|
+
G,
|
|
1308
|
+
H,
|
|
1309
|
+
Q
|
|
1310
|
+
]), j(() => {
|
|
1311
|
+
if (!ae.current) return;
|
|
1312
|
+
let e = G[D.row], t = H[D.column];
|
|
1313
|
+
if (!e || !t) return;
|
|
1314
|
+
let n = W.findIndex((t) => t.id === e.id);
|
|
1315
|
+
Le && n >= 0 && Ye.scrollToIndex(n, { align: "auto" });
|
|
1316
|
+
let r = U.findIndex((e) => e.id === t.id);
|
|
1317
|
+
Re && r >= 0 && Ze.scrollToIndex(r, { align: "auto" });
|
|
1318
|
+
let i = [...f.current?.querySelectorAll("[role=\"gridcell\"]") ?? []].find((n) => n.dataset.rowId === e.id && n.dataset.columnId === t.id);
|
|
1319
|
+
i && (i.querySelector("[data-dg=\"editor\"]") || i.focus({ preventScroll: !0 }), ae.current = !1);
|
|
1320
|
+
}, [
|
|
1321
|
+
D,
|
|
1322
|
+
$e,
|
|
1323
|
+
H,
|
|
1324
|
+
G,
|
|
1325
|
+
W,
|
|
1326
|
+
U,
|
|
1327
|
+
Le,
|
|
1328
|
+
Re,
|
|
1329
|
+
Ye,
|
|
1330
|
+
Ze
|
|
1331
|
+
]);
|
|
1332
|
+
let tt = (t, n) => {
|
|
1333
|
+
t.getIsGrouped() || !n.editable || !e.onCellCommit || e.cellState?.(t.original.data, n)?.pending || de({
|
|
1334
|
+
rowId: t.id,
|
|
1335
|
+
columnId: n.id,
|
|
1336
|
+
draft: e.cellState?.(t.original.data, n)?.draft ?? n.value?.(t.original.data) ?? String(Ht(n, t.original.data) ?? "")
|
|
1337
|
+
});
|
|
1338
|
+
}, nt = (t, n = !1) => {
|
|
1339
|
+
let r = fe.current;
|
|
1340
|
+
if (r) {
|
|
1341
|
+
if (fe.current = null, de(null), t) {
|
|
1342
|
+
let t = G.find((e) => e.id === r.rowId);
|
|
1343
|
+
t && e.onCellCommit?.(t.original.data, r.columnId, r.draft);
|
|
1344
|
+
}
|
|
1345
|
+
n && (ae.current = !0, ie((e) => ({ ...e })));
|
|
1346
|
+
}
|
|
1347
|
+
};
|
|
1348
|
+
j(() => {
|
|
1349
|
+
if (!L) return;
|
|
1350
|
+
let e = z.get(L.columnId);
|
|
1351
|
+
if (!e || !H.some((e) => e.id === L.columnId)) return;
|
|
1352
|
+
let t = V.getPrePaginatedRowModel().rows.findIndex((e) => e.id === L.rowId);
|
|
1353
|
+
if (t < 0) {
|
|
1354
|
+
pe("입력 복구 대상을 표시하려면 검색 조건을 해제하세요."), ge(null);
|
|
1355
|
+
return;
|
|
1356
|
+
}
|
|
1357
|
+
let n = Math.floor(t / C.pagination.pageSize);
|
|
1358
|
+
if (!s && a("pagination") && n !== C.pagination.pageIndex) {
|
|
1359
|
+
V.setPageIndex(n);
|
|
1360
|
+
return;
|
|
1361
|
+
}
|
|
1362
|
+
let r = G.find((e) => e.id === L.rowId);
|
|
1363
|
+
r && (tt(r, e), ae.current = !0, ie({
|
|
1364
|
+
row: Me.get(r.id) ?? 0,
|
|
1365
|
+
column: H.findIndex((t) => t.id === e.id)
|
|
1366
|
+
}), ge(null));
|
|
1367
|
+
}, [
|
|
1368
|
+
L,
|
|
1369
|
+
C.expanded,
|
|
1370
|
+
C.pagination,
|
|
1371
|
+
H,
|
|
1372
|
+
G,
|
|
1373
|
+
V,
|
|
1374
|
+
s
|
|
1375
|
+
]);
|
|
1376
|
+
let rt = (e, t) => {
|
|
1377
|
+
let n = H.map((e) => e.id).filter((t) => t !== e);
|
|
1378
|
+
n.splice(Math.max(0, n.indexOf(t)), 0, e), V.setColumnOrder(n);
|
|
1379
|
+
}, it = (e, t) => {
|
|
1380
|
+
let n = H.map((e) => e.id), r = n.indexOf(e), i = r + t;
|
|
1381
|
+
i < 0 || i >= n.length || n[i] === $ || ([n[r], n[i]] = [n[i], n[r]], V.setColumnOrder(n));
|
|
1382
|
+
}, at = () => V.getSelectedCellRangesData().map((e) => e.map((e) => e.map((e) => String(e ?? "").replace(/[\t\r\n]+/g, " ")).join(" ")).join("\n")).join("\n\n"), ot = (t) => {
|
|
1383
|
+
let n = t.target;
|
|
1384
|
+
if (!(n instanceof HTMLElement) || !n.matches("[role=\"gridcell\"]") || n.closest(l) !== t.currentTarget || F) return;
|
|
1385
|
+
let r = Me.get(n.dataset.rowId ?? "") ?? D.row, i = H.findIndex((e) => e.id === n.dataset.columnId), o = {
|
|
1386
|
+
ArrowDown: [1, 0],
|
|
1387
|
+
ArrowUp: [-1, 0],
|
|
1388
|
+
ArrowLeft: [0, -1],
|
|
1389
|
+
ArrowRight: [0, 1],
|
|
1390
|
+
PageDown: [10, 0],
|
|
1391
|
+
PageUp: [-10, 0]
|
|
1392
|
+
}, s = {
|
|
1393
|
+
row: r,
|
|
1394
|
+
column: Math.max(0, i)
|
|
1395
|
+
};
|
|
1396
|
+
if (o[t.key]) s = {
|
|
1397
|
+
row: s.row + o[t.key][0],
|
|
1398
|
+
column: s.column + o[t.key][1]
|
|
1399
|
+
};
|
|
1400
|
+
else if (t.key === "Home") s = {
|
|
1401
|
+
row: t.ctrlKey || t.metaKey ? 0 : r,
|
|
1402
|
+
column: 0
|
|
1403
|
+
};
|
|
1404
|
+
else if (t.key === "End") s = {
|
|
1405
|
+
row: t.ctrlKey || t.metaKey ? G.length - 1 : r,
|
|
1406
|
+
column: H.length - 1
|
|
1407
|
+
};
|
|
1408
|
+
else if ((t.ctrlKey || t.metaKey) && t.key.toLowerCase() === "a" && a("cellSelection")) {
|
|
1409
|
+
t.preventDefault(), V.selectAllCells();
|
|
1410
|
+
return;
|
|
1411
|
+
} else if ((t.ctrlKey || t.metaKey) && t.key === " " && a("cellSelection") && n.dataset.columnId !== $) {
|
|
1412
|
+
t.preventDefault();
|
|
1413
|
+
let e = G[r], i = n.dataset.columnId, a = e.getVisibleCells().find((e) => e.column.id === i);
|
|
1414
|
+
V.selectCellRange({
|
|
1415
|
+
anchorRowId: e.id,
|
|
1416
|
+
focusRowId: e.id,
|
|
1417
|
+
anchorColumnId: i,
|
|
1418
|
+
focusColumnId: i
|
|
1419
|
+
}, { mode: a?.getIsSelected() ? "exclude" : "include" });
|
|
1420
|
+
return;
|
|
1421
|
+
} else if (t.key === "Escape") {
|
|
1422
|
+
V.resetCellSelection(!0);
|
|
1423
|
+
return;
|
|
1424
|
+
} else if (t.key === "Enter" || t.key === "F2") {
|
|
1425
|
+
let i = G[r], a = z.get(n.dataset.columnId ?? "");
|
|
1426
|
+
i && a?.editable && e.onCellCommit ? (t.preventDefault(), tt(i, a)) : i?.getCanExpand() ? (t.preventDefault(), i.toggleExpanded()) : i && !i.getIsGrouped() && e.onRowActivate?.(i.original.data);
|
|
1427
|
+
return;
|
|
1428
|
+
} else if (t.key === " " && B && G[r]) {
|
|
1429
|
+
t.preventDefault(), Y(G[r]);
|
|
1430
|
+
return;
|
|
1431
|
+
} else return;
|
|
1432
|
+
t.preventDefault(), s = jt(s, {
|
|
1433
|
+
rows: G.length,
|
|
1434
|
+
columns: H.length
|
|
1435
|
+
});
|
|
1436
|
+
for (let e = 0; e < G.length + H.length; e++) {
|
|
1437
|
+
let e = G[s.row]?.getVisibleCells().find((e) => e.column.id === H[s.column]?.id);
|
|
1438
|
+
if (!e?.getIsCovered()) break;
|
|
1439
|
+
let t = e.getRowSpan() === 0 ? {
|
|
1440
|
+
row: s.row + (s.row > r ? 1 : -1),
|
|
1441
|
+
column: s.column
|
|
1442
|
+
} : {
|
|
1443
|
+
row: s.row,
|
|
1444
|
+
column: s.column + (s.column > i && s.row === r ? 1 : -1)
|
|
1445
|
+
};
|
|
1446
|
+
if (t.row < 0 || t.row >= G.length || t.column < 0 || t.column >= H.length) {
|
|
1447
|
+
s = {
|
|
1448
|
+
row: r,
|
|
1449
|
+
column: i
|
|
1450
|
+
};
|
|
1451
|
+
break;
|
|
1452
|
+
}
|
|
1453
|
+
s = t;
|
|
1454
|
+
}
|
|
1455
|
+
let c = G[s.row], u = H[s.column];
|
|
1456
|
+
if (a("cellSelection") && c && u?.id !== $) {
|
|
1457
|
+
if (t.shiftKey) {
|
|
1458
|
+
let e = C.cellSelection.at(-1);
|
|
1459
|
+
V.selectCellRange({
|
|
1460
|
+
anchorRowId: e?.anchorRowId ?? G[r].id,
|
|
1461
|
+
anchorColumnId: e?.anchorColumnId ?? n.dataset.columnId,
|
|
1462
|
+
focusRowId: c.id,
|
|
1463
|
+
focusColumnId: u.id
|
|
1464
|
+
});
|
|
1465
|
+
} else V.setFocusedCell(c.id, u.id);
|
|
1466
|
+
}
|
|
1467
|
+
ae.current = !0, ie(s);
|
|
1468
|
+
}, st = (e, t = e.getSize(), n = y.row) => ({
|
|
1469
|
+
"--dg-cell-size": `${t}px`,
|
|
1470
|
+
"--dg-pin-offset": `${e.getIsPinned() === "end" ? e.getAfter("end") : e.getStart("start")}px`,
|
|
1471
|
+
"--dg-span-size": `${n}px`
|
|
1472
|
+
}), ct = (e) => e.getCanSort() || e.getCanHide() || a("columnPinning") || a("columnOrdering") || a("grouping") && e.getCanGroup() || a("columnResizing") && e.getCanResize() ? /* @__PURE__ */ k(ne, {
|
|
1473
|
+
items: /* @__PURE__ */ A(O, { children: [
|
|
1474
|
+
e.getCanSort() ? /* @__PURE__ */ A(O, { children: [
|
|
1475
|
+
/* @__PURE__ */ k(T, {
|
|
1476
|
+
icon: ue,
|
|
1477
|
+
onSelect: () => e.toggleSorting(!1, !1),
|
|
1478
|
+
children: "오름차순"
|
|
1479
|
+
}),
|
|
1480
|
+
/* @__PURE__ */ k(T, {
|
|
1481
|
+
icon: ce,
|
|
1482
|
+
onSelect: () => e.toggleSorting(!0, !1),
|
|
1483
|
+
children: "내림차순"
|
|
1484
|
+
}),
|
|
1485
|
+
a("multiSort") ? /* @__PURE__ */ k(T, {
|
|
1486
|
+
onSelect: () => e.toggleSorting(!1, !0),
|
|
1487
|
+
children: "다중 정렬에 추가"
|
|
1488
|
+
}) : null,
|
|
1489
|
+
/* @__PURE__ */ k(T, {
|
|
1490
|
+
onSelect: () => e.clearSorting(),
|
|
1491
|
+
children: "정렬 해제"
|
|
1492
|
+
}),
|
|
1493
|
+
/* @__PURE__ */ k(te, {})
|
|
1494
|
+
] }) : null,
|
|
1495
|
+
a("columnPinning") ? /* @__PURE__ */ A(O, { children: [
|
|
1496
|
+
/* @__PURE__ */ k(T, {
|
|
1497
|
+
onSelect: () => e.pin("start"),
|
|
1498
|
+
children: "왼쪽에 고정"
|
|
1499
|
+
}),
|
|
1500
|
+
/* @__PURE__ */ k(T, {
|
|
1501
|
+
onSelect: () => e.pin("end"),
|
|
1502
|
+
children: "오른쪽에 고정"
|
|
1503
|
+
}),
|
|
1504
|
+
/* @__PURE__ */ k(T, {
|
|
1505
|
+
onSelect: () => e.pin(!1),
|
|
1506
|
+
children: "열 고정 해제"
|
|
1507
|
+
})
|
|
1508
|
+
] }) : null,
|
|
1509
|
+
a("columnOrdering") ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(T, {
|
|
1510
|
+
onSelect: () => it(e.id, -1),
|
|
1511
|
+
children: "열을 앞으로 이동"
|
|
1512
|
+
}), /* @__PURE__ */ k(T, {
|
|
1513
|
+
onSelect: () => it(e.id, 1),
|
|
1514
|
+
children: "열을 뒤로 이동"
|
|
1515
|
+
})] }) : null,
|
|
1516
|
+
a("grouping") && e.getCanGroup() ? /* @__PURE__ */ k(T, {
|
|
1517
|
+
onSelect: () => e.toggleGrouping(),
|
|
1518
|
+
children: e.getIsGrouped() ? "그룹 해제" : "이 열로 그룹화"
|
|
1519
|
+
}) : null,
|
|
1520
|
+
a("columnResizing") && e.getCanResize() ? /* @__PURE__ */ k(T, {
|
|
1521
|
+
onSelect: () => e.resetSize(),
|
|
1522
|
+
children: "열 너비 초기화"
|
|
1523
|
+
}) : null,
|
|
1524
|
+
e.getCanHide() ? /* @__PURE__ */ k(T, {
|
|
1525
|
+
onSelect: () => e.toggleVisibility(!1),
|
|
1526
|
+
children: "이 열 숨기기"
|
|
1527
|
+
}) : null
|
|
1528
|
+
] }),
|
|
1529
|
+
children: /* @__PURE__ */ k(t, {
|
|
1530
|
+
icon: me,
|
|
1531
|
+
size: "sm",
|
|
1532
|
+
variant: "ghost",
|
|
1533
|
+
tone: "neutral",
|
|
1534
|
+
label: `${z.get(e.id)?.header ?? e.id} 열 설정`,
|
|
1535
|
+
"data-dg": "column-menu"
|
|
1536
|
+
})
|
|
1537
|
+
}) : null, ft = (e, t) => t > 0 ? /* @__PURE__ */ k("div", {
|
|
1538
|
+
className: "dg-complete__spacer",
|
|
1539
|
+
"aria-hidden": "true",
|
|
1540
|
+
style: { "--dg-gap": `${t}px` }
|
|
1541
|
+
}, e) : null, pt = (e, t) => {
|
|
1542
|
+
let n = [], r = 0, i = 0, a = t ? new Map(t.getVisibleCells().map((e) => [e.column.id, e])) : null;
|
|
1543
|
+
for (let t = 0; t < H.length; t++) {
|
|
1544
|
+
let o = H[t], s = a?.get(o.id), c = o.getSize();
|
|
1545
|
+
if (s?.getIsCovered() && s.getColSpan() === 0 && s.getRowSpan() !== 0) {
|
|
1546
|
+
r += c;
|
|
1547
|
+
continue;
|
|
1548
|
+
}
|
|
1549
|
+
if (Qe.has(o.id) || s && s.getColSpan() > 1) {
|
|
1550
|
+
r > i && n.push(ft(`gap-${o.id}`, r - i)), n.push(e(o, t));
|
|
1551
|
+
let a = c;
|
|
1552
|
+
if (s && !s.getIsCovered()) for (let e = 1; e < s.getColSpan(); e++) a += H[t + e]?.getSize() ?? 0;
|
|
1553
|
+
i = r + a;
|
|
1554
|
+
}
|
|
1555
|
+
r += c;
|
|
1556
|
+
}
|
|
1557
|
+
return r > i && n.push(ft("gap-end", r - i)), n;
|
|
1558
|
+
}, mt = (n, r, i) => {
|
|
1559
|
+
let s = n.getVisibleCells().find((e) => e.column.id === r.id), l = Me.get(n.id) ?? 0, u = z.get(r.id), d = D.row === l && D.column === i, f = u && !n.getIsGrouped() ? e.cellState?.(n.original.data, u) : void 0, m = F?.rowId === n.id && F.columnId === r.id, h = s.getRowSpan(), g = s.getColSpan(), _ = r.getSize();
|
|
1560
|
+
for (let e = 1; e < g; e++) _ += H[i + e]?.getSize() ?? 0;
|
|
1561
|
+
let v = 0;
|
|
1562
|
+
for (let e = 0; e < Math.max(1, h); e++) {
|
|
1563
|
+
let t = G[l + e];
|
|
1564
|
+
t && (v += ye.current.get(t.id) ?? y.row);
|
|
1565
|
+
}
|
|
1566
|
+
return s.getIsCovered() ? /* @__PURE__ */ k("div", {
|
|
1567
|
+
className: "dg-complete__covered",
|
|
1568
|
+
"aria-hidden": "true",
|
|
1569
|
+
style: st(r)
|
|
1570
|
+
}, r.id) : /* @__PURE__ */ k("div", {
|
|
1571
|
+
role: "gridcell",
|
|
1572
|
+
className: "dg-complete__cell",
|
|
1573
|
+
"data-dg": "cell",
|
|
1574
|
+
"data-row-id": n.id,
|
|
1575
|
+
"data-column-id": r.id,
|
|
1576
|
+
"data-pin": r.getIsPinned() || void 0,
|
|
1577
|
+
"data-numeric": u?.numeric ? "" : void 0,
|
|
1578
|
+
"data-cell-selected": s.getIsSelected() ? "" : void 0,
|
|
1579
|
+
"data-editable": u?.editable && e.onCellCommit && !n.getIsGrouped() ? "" : void 0,
|
|
1580
|
+
"aria-colindex": i + 1,
|
|
1581
|
+
"aria-colspan": g > 1 ? g : void 0,
|
|
1582
|
+
"aria-rowspan": h > 1 ? h : void 0,
|
|
1583
|
+
"aria-selected": a("cellSelection") && r.id !== $ ? s.getIsSelected() : void 0,
|
|
1584
|
+
"aria-busy": f?.pending || void 0,
|
|
1585
|
+
"aria-describedby": f?.pending || f?.error ? `${c}-${n.id}-${r.id}` : void 0,
|
|
1586
|
+
tabIndex: d && !m ? 0 : -1,
|
|
1587
|
+
style: st(r, _, v),
|
|
1588
|
+
onFocus: (e) => {
|
|
1589
|
+
e.target === e.currentTarget && ie({
|
|
1590
|
+
row: l,
|
|
1591
|
+
column: i
|
|
1592
|
+
});
|
|
1593
|
+
},
|
|
1594
|
+
onMouseDown: (e) => {
|
|
1595
|
+
e.button !== 0 || e.target.closest("button,input,a,select,textarea") || r.id === $ || (a("cellSelection") && s.getSelectionStartHandler(e.currentTarget.ownerDocument)(e), e.currentTarget.focus(), ie({
|
|
1596
|
+
row: l,
|
|
1597
|
+
column: i
|
|
1598
|
+
}));
|
|
1599
|
+
},
|
|
1600
|
+
onMouseEnter: (e) => {
|
|
1601
|
+
a("cellSelection") && s.getSelectionExtendHandler()(e);
|
|
1602
|
+
},
|
|
1603
|
+
onDoubleClick: () => {
|
|
1604
|
+
u?.editable && e.onCellCommit ? tt(n, u) : n.getIsGrouped() || e.onRowActivate?.(n.original.data);
|
|
1605
|
+
},
|
|
1606
|
+
children: /* @__PURE__ */ k("div", {
|
|
1607
|
+
className: "dg-complete__value",
|
|
1608
|
+
"data-row-span": h > 1 ? "" : void 0,
|
|
1609
|
+
children: r.id === $ ? /* @__PURE__ */ A(O, { children: [B ? /* @__PURE__ */ k(p, {
|
|
1610
|
+
checked: K(n),
|
|
1611
|
+
indeterminate: ke(n) || n.getIsSomeSelected(),
|
|
1612
|
+
onChange: () => Y(n),
|
|
1613
|
+
"aria-label": `${n.getIsGrouped() ? "그룹" : e.rowLabel ? e.rowLabel(n.original.data) : n.id} 선택`,
|
|
1614
|
+
"data-dg": "select-row"
|
|
1615
|
+
}) : null, a("rowPinning") ? /* @__PURE__ */ k(ne, {
|
|
1616
|
+
items: /* @__PURE__ */ A(O, { children: [
|
|
1617
|
+
/* @__PURE__ */ k(T, {
|
|
1618
|
+
onSelect: () => n.pin("top"),
|
|
1619
|
+
children: "행을 위에 고정"
|
|
1620
|
+
}),
|
|
1621
|
+
/* @__PURE__ */ k(T, {
|
|
1622
|
+
onSelect: () => n.pin("bottom"),
|
|
1623
|
+
children: "행을 아래에 고정"
|
|
1624
|
+
}),
|
|
1625
|
+
/* @__PURE__ */ k(T, {
|
|
1626
|
+
onSelect: () => n.pin(!1),
|
|
1627
|
+
children: "행 고정 해제"
|
|
1628
|
+
})
|
|
1629
|
+
] }),
|
|
1630
|
+
children: /* @__PURE__ */ k(t, {
|
|
1631
|
+
icon: Se,
|
|
1632
|
+
size: "sm",
|
|
1633
|
+
variant: "ghost",
|
|
1634
|
+
tone: "neutral",
|
|
1635
|
+
label: `${n.getIsGrouped() ? "그룹" : e.rowLabel?.(n.original.data) ?? n.id} 행 설정`,
|
|
1636
|
+
"data-dg": "row-menu"
|
|
1637
|
+
})
|
|
1638
|
+
}) : null] }) : m ? /* @__PURE__ */ k(o, {
|
|
1639
|
+
"aria-label": `${u?.header} 고치기`,
|
|
1640
|
+
value: F.draft,
|
|
1641
|
+
size: "sm",
|
|
1642
|
+
"data-dg": "editor",
|
|
1643
|
+
ref: (e) => {
|
|
1644
|
+
e && e.ownerDocument.activeElement !== e && e.focus();
|
|
1645
|
+
},
|
|
1646
|
+
onChange: (e) => de((t) => t ? {
|
|
1647
|
+
...t,
|
|
1648
|
+
draft: e.target.value
|
|
1649
|
+
} : null),
|
|
1650
|
+
onBlur: () => nt(!0),
|
|
1651
|
+
onKeyDown: (e) => {
|
|
1652
|
+
e.stopPropagation(), !(e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229) && (e.key === "Enter" || e.key === "Escape") && (e.preventDefault(), nt(e.key === "Enter", !0));
|
|
1653
|
+
}
|
|
1654
|
+
}) : /* @__PURE__ */ A(O, { children: [
|
|
1655
|
+
i === +!!be && n.getCanExpand() ? /* @__PURE__ */ k(t, {
|
|
1656
|
+
icon: n.getIsExpanded() ? me : he,
|
|
1657
|
+
label: n.getIsExpanded() ? "행 접기" : "행 펼치기",
|
|
1658
|
+
size: "sm",
|
|
1659
|
+
variant: "ghost",
|
|
1660
|
+
tone: "neutral",
|
|
1661
|
+
onClick: () => n.toggleExpanded(),
|
|
1662
|
+
"aria-expanded": n.getIsExpanded(),
|
|
1663
|
+
"data-dg": "expand"
|
|
1664
|
+
}) : null,
|
|
1665
|
+
/* @__PURE__ */ k("span", {
|
|
1666
|
+
className: "dg-complete__content",
|
|
1667
|
+
children: s.getIsGrouped() ? /* @__PURE__ */ A(O, { children: [
|
|
1668
|
+
Vt(s.getValue()),
|
|
1669
|
+
" (",
|
|
1670
|
+
n.getLeafRows().length,
|
|
1671
|
+
")"
|
|
1672
|
+
] }) : s.getIsAggregated() ? Vt(s.getValue()) : n.getIsGrouped() ? "" : u?.cell(n.original.data)
|
|
1673
|
+
}),
|
|
1674
|
+
u && !n.getIsGrouped() && e.changed?.(n.original.data, u) !== void 0 ? /* @__PURE__ */ k("span", {
|
|
1675
|
+
className: "data-grid__flash",
|
|
1676
|
+
"aria-hidden": "true"
|
|
1677
|
+
}, e.changed(n.original.data, u)) : null
|
|
1678
|
+
] })
|
|
1679
|
+
})
|
|
1680
|
+
}, r.id);
|
|
1681
|
+
}, ht = (e, t, n = 0) => {
|
|
1682
|
+
let r = Me.get(e.id) ?? 0, a = X + r + (Be.get(e.id) ?? 0) + 1 + He + Ge;
|
|
1683
|
+
return /* @__PURE__ */ A("div", {
|
|
1684
|
+
className: "dg-complete__entry",
|
|
1685
|
+
"data-row-id": e.id,
|
|
1686
|
+
"data-index": t,
|
|
1687
|
+
"data-virtual": t !== void 0 && Le ? "" : void 0,
|
|
1688
|
+
ref: t !== void 0 && Le ? Ye.measureElement : void 0,
|
|
1689
|
+
style: { "--dg-row-offset": `${n}px` },
|
|
1690
|
+
children: [/* @__PURE__ */ k("div", {
|
|
1691
|
+
role: "row",
|
|
1692
|
+
className: "dg-complete__row",
|
|
1693
|
+
"data-dg": "row",
|
|
1694
|
+
"data-row-id": e.id,
|
|
1695
|
+
"aria-rowindex": a,
|
|
1696
|
+
"aria-selected": B ? K(e) : void 0,
|
|
1697
|
+
"aria-expanded": e.getCanExpand() ? e.getIsExpanded() : void 0,
|
|
1698
|
+
"aria-level": Pe ? e.depth + 1 : void 0,
|
|
1699
|
+
"data-selected": K(e) ? "" : void 0,
|
|
1700
|
+
"data-grouped": e.getIsGrouped() ? "" : void 0,
|
|
1701
|
+
children: pt((t, n) => mt(e, t, n), e)
|
|
1702
|
+
}), ze(e) ? /* @__PURE__ */ k("div", {
|
|
1703
|
+
role: "row",
|
|
1704
|
+
className: "dg-complete__detail",
|
|
1705
|
+
"aria-rowindex": a + 1,
|
|
1706
|
+
"aria-level": e.depth + 2,
|
|
1707
|
+
"data-dg": "detail",
|
|
1708
|
+
children: /* @__PURE__ */ k("div", {
|
|
1709
|
+
role: "gridcell",
|
|
1710
|
+
"aria-colspan": H.length,
|
|
1711
|
+
"aria-colindex": 1,
|
|
1712
|
+
children: i.renderDetail?.(e.original.data)
|
|
1713
|
+
})
|
|
1714
|
+
}) : null]
|
|
1715
|
+
}, e.id);
|
|
1716
|
+
};
|
|
1717
|
+
return /* @__PURE__ */ A("div", {
|
|
1718
|
+
...r,
|
|
1719
|
+
className: `data-grid data-grid-complete ${e.className ?? ""}`.trim(),
|
|
1720
|
+
"data-row-density": e.density ?? "compact",
|
|
1721
|
+
"data-height": e.height ?? "md",
|
|
1722
|
+
style: {
|
|
1723
|
+
"--dg-grid-size": `${V.getTotalSize()}px`,
|
|
1724
|
+
"--dg-head-size": `${y.head}px`,
|
|
1725
|
+
"--dg-foot-size": `${y.foot}px`
|
|
1726
|
+
},
|
|
1727
|
+
children: [
|
|
1728
|
+
/* @__PURE__ */ A("div", {
|
|
1729
|
+
className: "dg-complete__toolbar",
|
|
1730
|
+
role: "group",
|
|
1731
|
+
"aria-label": `${e.label} 도구`,
|
|
1732
|
+
children: [
|
|
1733
|
+
a("search") ? /* @__PURE__ */ k(o, {
|
|
1734
|
+
size: "sm",
|
|
1735
|
+
iconStart: we,
|
|
1736
|
+
value: C.search,
|
|
1737
|
+
onChange: (e) => V.setGlobalFilter(e.target.value),
|
|
1738
|
+
"aria-label": `${e.label} 검색`,
|
|
1739
|
+
placeholder: "전체 열 검색",
|
|
1740
|
+
"data-dg": "search"
|
|
1741
|
+
}) : null,
|
|
1742
|
+
/* @__PURE__ */ k(ne, {
|
|
1743
|
+
items: V.getAllLeafColumns().filter((e) => e.id !== $).map((e) => /* @__PURE__ */ k(ee, {
|
|
1744
|
+
checked: e.getIsVisible(),
|
|
1745
|
+
disabled: !e.getCanHide(),
|
|
1746
|
+
onCheckedChange: () => e.toggleVisibility(),
|
|
1747
|
+
children: z.get(e.id)?.header ?? e.id
|
|
1748
|
+
}, e.id)),
|
|
1749
|
+
children: /* @__PURE__ */ A(n, {
|
|
1750
|
+
size: "sm",
|
|
1751
|
+
variant: "outline",
|
|
1752
|
+
tone: "neutral",
|
|
1753
|
+
iconStart: Ee,
|
|
1754
|
+
"data-dg": "columns",
|
|
1755
|
+
children: [
|
|
1756
|
+
"열 ",
|
|
1757
|
+
H.length - +!!be,
|
|
1758
|
+
"/",
|
|
1759
|
+
e.columns.length
|
|
1760
|
+
]
|
|
1761
|
+
})
|
|
1762
|
+
}),
|
|
1763
|
+
a("grouping") && C.grouping.length ? /* @__PURE__ */ k(n, {
|
|
1764
|
+
size: "sm",
|
|
1765
|
+
variant: "outline",
|
|
1766
|
+
onClick: () => V.resetGrouping(!0),
|
|
1767
|
+
"data-dg": "ungroup",
|
|
1768
|
+
children: "그룹 모두 해제"
|
|
1769
|
+
}) : null,
|
|
1770
|
+
a("expanding") ? /* @__PURE__ */ k(n, {
|
|
1771
|
+
size: "sm",
|
|
1772
|
+
variant: "ghost",
|
|
1773
|
+
tone: "neutral",
|
|
1774
|
+
onClick: () => V.toggleAllRowsExpanded(),
|
|
1775
|
+
"data-dg": "expand-all",
|
|
1776
|
+
children: V.getIsAllRowsExpanded() ? "모두 접기" : "모두 펼치기"
|
|
1777
|
+
}) : null,
|
|
1778
|
+
a("cellSelection") ? /* @__PURE__ */ k(n, {
|
|
1779
|
+
size: "sm",
|
|
1780
|
+
variant: "outline",
|
|
1781
|
+
tone: "neutral",
|
|
1782
|
+
disabled: !V.getSelectedCellCount(),
|
|
1783
|
+
onClick: async () => {
|
|
1784
|
+
try {
|
|
1785
|
+
await navigator.clipboard.writeText(at()), pe("선택한 셀을 복사했습니다.");
|
|
1786
|
+
} catch {
|
|
1787
|
+
pe("복사 권한이 없습니다. 셀에서 Ctrl+C를 눌러 복사하세요.");
|
|
1788
|
+
}
|
|
1789
|
+
},
|
|
1790
|
+
"data-dg": "copy",
|
|
1791
|
+
children: "선택 셀 복사"
|
|
1792
|
+
}) : null,
|
|
1793
|
+
/* @__PURE__ */ k(n, {
|
|
1794
|
+
size: "sm",
|
|
1795
|
+
variant: "ghost",
|
|
1796
|
+
tone: "neutral",
|
|
1797
|
+
onClick: () => {
|
|
1798
|
+
let t = Rt(i.defaultState);
|
|
1799
|
+
w.current = t, S(t), i.onStateChange?.(t), e.onSelectedChange?.(t.selectedKeys), e.onHiddenColumnsChange?.(t.hiddenColumns), e.onSortChange?.(t.sorting[0] ?? null);
|
|
1800
|
+
},
|
|
1801
|
+
"data-dg": "reset",
|
|
1802
|
+
children: "보기 초기화"
|
|
1803
|
+
})
|
|
1804
|
+
]
|
|
1805
|
+
}),
|
|
1806
|
+
C.sorting.length ? /* @__PURE__ */ A("p", {
|
|
1807
|
+
className: "dg-complete__summary",
|
|
1808
|
+
"data-dg": "sort-status",
|
|
1809
|
+
children: ["정렬: ", C.sorting.map((e, t) => `${t + 1}. ${z.get(e.columnId)?.header ?? e.columnId} ${e.direction === "asc" ? "오름차순" : "내림차순"}`).join(" · ")]
|
|
1810
|
+
}) : null,
|
|
1811
|
+
/* @__PURE__ */ k("div", {
|
|
1812
|
+
ref: u,
|
|
1813
|
+
className: "data-grid__scroll dg-complete__scroll",
|
|
1814
|
+
"data-dg": "scroll",
|
|
1815
|
+
children: /* @__PURE__ */ A("div", {
|
|
1816
|
+
ref: f,
|
|
1817
|
+
role: Pe ? "treegrid" : "grid",
|
|
1818
|
+
className: "dg-complete__grid",
|
|
1819
|
+
"aria-label": e.label,
|
|
1820
|
+
"aria-colcount": H.length,
|
|
1821
|
+
"aria-rowcount": s && Q === "rows" && (i.rowCount === void 0 || i.renderDetail) ? -1 : Ke,
|
|
1822
|
+
"aria-busy": Q === "loading" || void 0,
|
|
1823
|
+
"aria-multiselectable": B || a("cellSelection") || void 0,
|
|
1824
|
+
onKeyDown: ot,
|
|
1825
|
+
onFocusCapture: (e) => {
|
|
1826
|
+
e.target.closest(l) === e.currentTarget && le(e.target.closest("[data-dg=\"row\"]")?.dataset.rowId ?? null);
|
|
1827
|
+
},
|
|
1828
|
+
onBlurCapture: (e) => {
|
|
1829
|
+
e.currentTarget.contains(e.relatedTarget) || le(null);
|
|
1830
|
+
},
|
|
1831
|
+
onCopy: (e) => {
|
|
1832
|
+
a("cellSelection") && !e.target.closest("input,textarea") && V.getSelectedCellCount() && (e.clipboardData.setData("text/plain", at()), e.preventDefault());
|
|
1833
|
+
},
|
|
1834
|
+
children: [
|
|
1835
|
+
/* @__PURE__ */ A("div", {
|
|
1836
|
+
ref: h,
|
|
1837
|
+
role: "rowgroup",
|
|
1838
|
+
className: "dg-complete__head",
|
|
1839
|
+
children: [
|
|
1840
|
+
V.getHeaderGroups().slice(0, -1).map((e, t) => /* @__PURE__ */ k("div", {
|
|
1841
|
+
role: "row",
|
|
1842
|
+
className: "dg-complete__row",
|
|
1843
|
+
"aria-rowindex": t + 1,
|
|
1844
|
+
children: e.headers.map((e) => /* @__PURE__ */ k("div", {
|
|
1845
|
+
role: "columnheader",
|
|
1846
|
+
className: "dg-complete__group-header",
|
|
1847
|
+
"aria-colspan": e.colSpan,
|
|
1848
|
+
style: { "--dg-cell-size": `${e.getSize()}px` },
|
|
1849
|
+
children: e.isPlaceholder ? "" : String(e.column.columnDef.header ?? "")
|
|
1850
|
+
}, e.id))
|
|
1851
|
+
}, e.id)),
|
|
1852
|
+
/* @__PURE__ */ k("div", {
|
|
1853
|
+
role: "row",
|
|
1854
|
+
className: "dg-complete__row",
|
|
1855
|
+
"aria-rowindex": Ne,
|
|
1856
|
+
children: pt((e, t) => {
|
|
1857
|
+
let n = z.get(e.id), r = C.sorting.findIndex((t) => t.columnId === e.id), i = V.getFlatHeaders().find((t) => t.column.id === e.id && t.subHeaders.length === 0);
|
|
1858
|
+
return /* @__PURE__ */ k("div", {
|
|
1859
|
+
role: "columnheader",
|
|
1860
|
+
className: "dg-complete__cell dg-complete__header",
|
|
1861
|
+
"data-column-id": e.id,
|
|
1862
|
+
"data-pin": e.getIsPinned() || void 0,
|
|
1863
|
+
"aria-colindex": t + 1,
|
|
1864
|
+
"aria-sort": e.getCanSort() ? r < 0 ? "none" : r > 0 ? "other" : C.sorting[r].direction === "asc" ? "ascending" : "descending" : void 0,
|
|
1865
|
+
style: st(e),
|
|
1866
|
+
draggable: a("columnOrdering") && e.id !== $,
|
|
1867
|
+
onDragStart: (t) => {
|
|
1868
|
+
ve(e.id), t.dataTransfer.setData("text/plain", e.id);
|
|
1869
|
+
},
|
|
1870
|
+
onDragOver: (t) => {
|
|
1871
|
+
_e && e.id !== $ && t.preventDefault();
|
|
1872
|
+
},
|
|
1873
|
+
onDrop: (t) => {
|
|
1874
|
+
t.preventDefault(), _e && _e !== e.id && e.id !== $ && rt(_e, e.id), ve(null);
|
|
1875
|
+
},
|
|
1876
|
+
children: e.id === $ ? /* @__PURE__ */ A(O, { children: [B ? /* @__PURE__ */ k(p, {
|
|
1877
|
+
checked: q,
|
|
1878
|
+
indeterminate: !q && je,
|
|
1879
|
+
onChange: () => J(Ae, q),
|
|
1880
|
+
"aria-label": "현재 페이지 전체 선택",
|
|
1881
|
+
"data-dg": "select-all"
|
|
1882
|
+
}) : null, /* @__PURE__ */ k("span", {
|
|
1883
|
+
className: "dg-complete__control-label",
|
|
1884
|
+
children: "행 작업"
|
|
1885
|
+
})] }) : /* @__PURE__ */ A(O, { children: [
|
|
1886
|
+
/* @__PURE__ */ A("button", {
|
|
1887
|
+
type: "button",
|
|
1888
|
+
className: "dg-complete__sort",
|
|
1889
|
+
disabled: !e.getCanSort(),
|
|
1890
|
+
"aria-label": `${n?.header} 정렬${r >= 0 ? `, ${r + 1}순위 ${C.sorting[r].direction === "asc" ? "오름차순" : "내림차순"}` : ""}`,
|
|
1891
|
+
onClick: (t) => e.toggleSorting(void 0, t.shiftKey && a("multiSort")),
|
|
1892
|
+
"data-dg": "sort",
|
|
1893
|
+
children: [n?.header, r >= 0 ? /* @__PURE__ */ A("span", { children: [C.sorting[r].direction === "asc" ? " ↑" : " ↓", C.sorting.length > 1 ? r + 1 : ""] }) : null]
|
|
1894
|
+
}),
|
|
1895
|
+
ct(e),
|
|
1896
|
+
a("columnResizing") && i && e.getCanResize() ? /* @__PURE__ */ k("button", {
|
|
1897
|
+
type: "button",
|
|
1898
|
+
className: "dg-complete__resize",
|
|
1899
|
+
role: "separator",
|
|
1900
|
+
"aria-orientation": "vertical",
|
|
1901
|
+
"aria-label": `${n?.header} 열 너비`,
|
|
1902
|
+
"aria-valuemin": e.columnDef.minSize,
|
|
1903
|
+
"aria-valuemax": e.columnDef.maxSize,
|
|
1904
|
+
"aria-valuenow": Math.round(e.getSize()),
|
|
1905
|
+
onMouseDown: i.getResizeHandler(),
|
|
1906
|
+
onTouchStart: i.getResizeHandler(),
|
|
1907
|
+
onDoubleClick: () => e.resetSize(),
|
|
1908
|
+
onKeyDown: (t) => {
|
|
1909
|
+
(t.key === "ArrowLeft" || t.key === "ArrowRight") && (t.preventDefault(), t.stopPropagation(), V.setColumnSizing((n) => ({
|
|
1910
|
+
...n,
|
|
1911
|
+
[e.id]: Math.max(e.columnDef.minSize ?? 72, Math.min(e.columnDef.maxSize ?? 1200, e.getSize() + (t.key === "ArrowRight" ? 16 : -16)))
|
|
1912
|
+
})));
|
|
1913
|
+
},
|
|
1914
|
+
"data-dg": "resize"
|
|
1915
|
+
}) : null
|
|
1916
|
+
] })
|
|
1917
|
+
}, e.id);
|
|
1918
|
+
})
|
|
1919
|
+
}),
|
|
1920
|
+
a("filtering") ? /* @__PURE__ */ k("div", {
|
|
1921
|
+
role: "row",
|
|
1922
|
+
className: "dg-complete__row dg-complete__filters",
|
|
1923
|
+
"aria-label": "열 필터",
|
|
1924
|
+
"aria-rowindex": X,
|
|
1925
|
+
children: pt((e, t) => {
|
|
1926
|
+
let n = z.get(e.id), r = e.getFilterValue(), c = i.facets?.[e.id]?.map((e) => [e.value, e.count]) ?? (a("faceting") && !s && e.getCanFilter() ? [...e.getFacetedUniqueValues().entries()] : []), l = n?.filterOptions ?? i.facets?.[e.id]?.map((e) => ({
|
|
1927
|
+
value: e.value,
|
|
1928
|
+
label: `${e.label ?? e.value}${e.count === void 0 ? "" : ` (${e.count})`}`
|
|
1929
|
+
})) ?? c.map(([e, t]) => ({
|
|
1930
|
+
value: String(e),
|
|
1931
|
+
label: `${e}${t === void 0 ? "" : ` (${t})`}`
|
|
1932
|
+
})), u = i.ranges?.[e.id] ?? (n?.filter === "number" && !s ? e.getFacetedMinMaxValues() : void 0);
|
|
1933
|
+
return /* @__PURE__ */ k("div", {
|
|
1934
|
+
role: "gridcell",
|
|
1935
|
+
"aria-colindex": t + 1,
|
|
1936
|
+
className: "dg-complete__cell",
|
|
1937
|
+
"data-pin": e.getIsPinned() || void 0,
|
|
1938
|
+
style: st(e),
|
|
1939
|
+
children: !e.getCanFilter() || !n ? null : n.filter === "select" ? /* @__PURE__ */ A(d, {
|
|
1940
|
+
size: "sm",
|
|
1941
|
+
value: String(r ?? ""),
|
|
1942
|
+
onChange: (t) => e.setFilterValue(t.target.value || void 0),
|
|
1943
|
+
"aria-label": `${n.header} 필터`,
|
|
1944
|
+
"data-dg": "filter-select",
|
|
1945
|
+
children: [/* @__PURE__ */ k("option", {
|
|
1946
|
+
value: "",
|
|
1947
|
+
children: "전체"
|
|
1948
|
+
}), l.map((e) => /* @__PURE__ */ k("option", {
|
|
1949
|
+
value: e.value,
|
|
1950
|
+
children: e.label
|
|
1951
|
+
}, e.value))]
|
|
1952
|
+
}) : n.filter === "number" && (!n.filterOperator || n.filterOperator === "inNumberRange") ? /* @__PURE__ */ A("div", {
|
|
1953
|
+
className: "dg-complete__range",
|
|
1954
|
+
children: [/* @__PURE__ */ k(o, {
|
|
1955
|
+
size: "sm",
|
|
1956
|
+
type: "number",
|
|
1957
|
+
"aria-label": `${n.header} 최솟값`,
|
|
1958
|
+
placeholder: u ? String(u[0]) : "최소",
|
|
1959
|
+
value: String(r?.[0] ?? ""),
|
|
1960
|
+
onChange: (t) => e.setFilterValue([t.target.value === "" ? void 0 : Number(t.target.value), r?.[1]])
|
|
1961
|
+
}), /* @__PURE__ */ k(o, {
|
|
1962
|
+
size: "sm",
|
|
1963
|
+
type: "number",
|
|
1964
|
+
"aria-label": `${n.header} 최댓값`,
|
|
1965
|
+
placeholder: u ? String(u[1]) : "최대",
|
|
1966
|
+
value: String(r?.[1] ?? ""),
|
|
1967
|
+
onChange: (t) => e.setFilterValue([r?.[0], t.target.value === "" ? void 0 : Number(t.target.value)])
|
|
1968
|
+
})]
|
|
1969
|
+
}) : /* @__PURE__ */ k(o, {
|
|
1970
|
+
size: "sm",
|
|
1971
|
+
"aria-label": `${n.header} 필터`,
|
|
1972
|
+
placeholder: c.length ? `${c.length}개 값 검색` : "필터",
|
|
1973
|
+
value: String(r ?? ""),
|
|
1974
|
+
onChange: (t) => e.setFilterValue(t.target.value === "" ? void 0 : n.parseFilter ? n.parseFilter(t.target.value) : t.target.value)
|
|
1975
|
+
})
|
|
1976
|
+
}, e.id);
|
|
1977
|
+
})
|
|
1978
|
+
}) : null
|
|
1979
|
+
]
|
|
1980
|
+
}),
|
|
1981
|
+
Q === "rows" ? /* @__PURE__ */ A(O, { children: [
|
|
1982
|
+
/* @__PURE__ */ k("div", {
|
|
1983
|
+
ref: g,
|
|
1984
|
+
role: Ce.length ? "rowgroup" : void 0,
|
|
1985
|
+
className: "dg-complete__pinned-top",
|
|
1986
|
+
"data-dg": "pinned-top",
|
|
1987
|
+
children: Ce.map((e) => ht(e))
|
|
1988
|
+
}),
|
|
1989
|
+
/* @__PURE__ */ k("div", {
|
|
1990
|
+
role: "rowgroup",
|
|
1991
|
+
className: "dg-complete__body",
|
|
1992
|
+
"data-virtual": Le ? "" : void 0,
|
|
1993
|
+
style: { "--dg-total": `${Le ? Ye.getTotalSize() : 0}px` },
|
|
1994
|
+
children: $e.map((e) => ht(e.row, e.index, e.offset))
|
|
1995
|
+
}),
|
|
1996
|
+
/* @__PURE__ */ k("div", {
|
|
1997
|
+
ref: _,
|
|
1998
|
+
role: Te.length ? "rowgroup" : void 0,
|
|
1999
|
+
className: "dg-complete__pinned-bottom",
|
|
2000
|
+
"data-dg": "pinned-bottom",
|
|
2001
|
+
children: Te.map((e) => ht(e))
|
|
2002
|
+
})
|
|
2003
|
+
] }) : Q === "loading" ? /* @__PURE__ */ k("div", {
|
|
2004
|
+
role: "rowgroup",
|
|
2005
|
+
"aria-busy": "true",
|
|
2006
|
+
children: Array.from({ length: e.loadingRows ?? 5 }, (e, t) => /* @__PURE__ */ k("div", {
|
|
2007
|
+
role: "row",
|
|
2008
|
+
className: "dg-complete__row",
|
|
2009
|
+
"aria-rowindex": X + t + 1,
|
|
2010
|
+
"data-dg": "waiting-row",
|
|
2011
|
+
children: pt((e, t) => /* @__PURE__ */ k("div", {
|
|
2012
|
+
role: "gridcell",
|
|
2013
|
+
"aria-colindex": t + 1,
|
|
2014
|
+
className: "dg-complete__cell",
|
|
2015
|
+
style: st(e),
|
|
2016
|
+
children: /* @__PURE__ */ k(m, {
|
|
2017
|
+
shape: "text",
|
|
2018
|
+
lines: 1
|
|
2019
|
+
})
|
|
2020
|
+
}, e.id))
|
|
2021
|
+
}, t))
|
|
2022
|
+
}) : null,
|
|
2023
|
+
Ie ? /* @__PURE__ */ k("div", {
|
|
2024
|
+
ref: v,
|
|
2025
|
+
role: "rowgroup",
|
|
2026
|
+
className: "dg-complete__foot",
|
|
2027
|
+
children: /* @__PURE__ */ k("div", {
|
|
2028
|
+
role: "row",
|
|
2029
|
+
className: "dg-complete__row",
|
|
2030
|
+
"data-dg": "totals",
|
|
2031
|
+
"aria-rowindex": s && i.renderDetail ? void 0 : Ke,
|
|
2032
|
+
children: pt((t, n) => /* @__PURE__ */ k("div", {
|
|
2033
|
+
role: "gridcell",
|
|
2034
|
+
"aria-colindex": n + 1,
|
|
2035
|
+
className: "dg-complete__cell",
|
|
2036
|
+
"data-pin": t.getIsPinned() || void 0,
|
|
2037
|
+
style: st(t),
|
|
2038
|
+
children: t.id === $ ? "집계" : i.totals?.[t.id] ?? (s ? z.get(t.id)?.footer?.(e.rows) : z.get(t.id)?.aggregation ? Vt(t.getAggregationValue()) : z.get(t.id)?.footer?.(e.rows))
|
|
2039
|
+
}, t.id))
|
|
2040
|
+
})
|
|
2041
|
+
}) : null
|
|
2042
|
+
]
|
|
2043
|
+
})
|
|
2044
|
+
}),
|
|
2045
|
+
Q === "error" || Z ? /* @__PURE__ */ A("p", {
|
|
2046
|
+
role: "alert",
|
|
2047
|
+
className: "data-grid__state",
|
|
2048
|
+
"data-dg": "error",
|
|
2049
|
+
children: [e.error, Z ? /* @__PURE__ */ A(O, { children: [" 이전 결과를 표시합니다.", e.lastUpdated ? /* @__PURE__ */ A(O, { children: [" 마지막 갱신: ", e.lastUpdated] }) : null] }) : null]
|
|
2050
|
+
}) : Q === "empty" ? /* @__PURE__ */ k("p", {
|
|
2051
|
+
className: "data-grid__empty",
|
|
2052
|
+
"data-dg": "empty",
|
|
2053
|
+
children: e.empty ?? "행이 없습니다."
|
|
2054
|
+
}) : null,
|
|
2055
|
+
a("pagination") ? /* @__PURE__ */ A("div", {
|
|
2056
|
+
className: "dg-complete__pager",
|
|
2057
|
+
children: [/* @__PURE__ */ k(re, {
|
|
2058
|
+
label: `${e.label} 페이지`,
|
|
2059
|
+
page: C.pagination.pageIndex + 1,
|
|
2060
|
+
pageCount: s && i.rowCount === void 0 ? C.pagination.pageIndex + 1 : Math.max(1, V.getPageCount()),
|
|
2061
|
+
onPageChange: (e) => V.setPageIndex(e - 1),
|
|
2062
|
+
responsive: !0,
|
|
2063
|
+
size: "sm"
|
|
2064
|
+
}), /* @__PURE__ */ k(d, {
|
|
2065
|
+
className: "dg-complete__page-size",
|
|
2066
|
+
size: "sm",
|
|
2067
|
+
value: String(C.pagination.pageSize),
|
|
2068
|
+
onChange: (e) => V.setPageSize(Number(e.target.value)),
|
|
2069
|
+
"aria-label": "페이지당 행 수",
|
|
2070
|
+
"data-dg": "page-size",
|
|
2071
|
+
children: (i.pageSizes ?? [
|
|
2072
|
+
10,
|
|
2073
|
+
25,
|
|
2074
|
+
50,
|
|
2075
|
+
100
|
|
2076
|
+
]).map((e) => /* @__PURE__ */ A("option", {
|
|
2077
|
+
value: String(e),
|
|
2078
|
+
children: [e, "행씩"]
|
|
2079
|
+
}, e))
|
|
2080
|
+
})]
|
|
2081
|
+
}) : null,
|
|
2082
|
+
/* @__PURE__ */ A("p", {
|
|
2083
|
+
role: "status",
|
|
2084
|
+
className: "dg-complete__summary",
|
|
2085
|
+
"data-dg": "status",
|
|
2086
|
+
children: [
|
|
2087
|
+
e.meta ?? `${s ? i.rowCount ?? e.rows.length : V.getRowCount()}행`,
|
|
2088
|
+
B ? ` · 선택 ${C.selectedKeys.length}행` : "",
|
|
2089
|
+
a("cellSelection") ? ` · 선택 ${V.getSelectedCellCount()}셀` : "",
|
|
2090
|
+
I ? ` · ${I}` : "",
|
|
2091
|
+
s && i.rowCount === void 0 && a("pagination") ? " · 전체 행 수가 필요합니다." : ""
|
|
2092
|
+
]
|
|
2093
|
+
}),
|
|
2094
|
+
e.cellState ? /* @__PURE__ */ k("ul", {
|
|
2095
|
+
className: "data-grid__save-status",
|
|
2096
|
+
children: V.getCoreRowModel().flatRows.map((e) => e.original).flatMap((t) => e.columns.flatMap((r) => {
|
|
2097
|
+
let i = e.cellState?.(t.data, r);
|
|
2098
|
+
return !i?.pending && !i?.error ? [] : [/* @__PURE__ */ A("li", {
|
|
2099
|
+
id: `${c}-${t.key}-${r.id}`,
|
|
2100
|
+
children: [/* @__PURE__ */ A("span", {
|
|
2101
|
+
role: i.pending ? "status" : "alert",
|
|
2102
|
+
children: [
|
|
2103
|
+
e.rowLabel?.(t.data) ?? t.key,
|
|
2104
|
+
" · ",
|
|
2105
|
+
r.header,
|
|
2106
|
+
": ",
|
|
2107
|
+
i.pending ? "저장 중입니다." : i.error
|
|
2108
|
+
]
|
|
2109
|
+
}), !i.pending && i.error && r.editable && e.onCellCommit ? /* @__PURE__ */ k(n, {
|
|
2110
|
+
size: "sm",
|
|
2111
|
+
variant: "outline",
|
|
2112
|
+
onClick: () => {
|
|
2113
|
+
V.getColumn(r.id)?.toggleVisibility(!0), V.setExpanded(!0), ge({
|
|
2114
|
+
rowId: t.key,
|
|
2115
|
+
columnId: r.id
|
|
2116
|
+
});
|
|
2117
|
+
},
|
|
2118
|
+
children: "입력 복구"
|
|
2119
|
+
}) : null]
|
|
2120
|
+
}, `${t.key}-${r.id}`)];
|
|
2121
|
+
}))
|
|
2122
|
+
}) : null
|
|
2123
|
+
]
|
|
2124
|
+
});
|
|
892
2125
|
}
|
|
893
2126
|
//#endregion
|
|
894
2127
|
//#region src/components/extended/DataGrid/DataGrid.tsx
|
|
895
|
-
|
|
896
|
-
|
|
2128
|
+
var Wt = ct({
|
|
2129
|
+
columnVisibilityFeature: Be,
|
|
2130
|
+
rowSelectionFeature: tt,
|
|
2131
|
+
rowSortingFeature: nt
|
|
2132
|
+
});
|
|
2133
|
+
function Gt(e) {
|
|
2134
|
+
return e.features ? /* @__PURE__ */ k(Ut, { ...e }) : /* @__PURE__ */ k(Kt, { ...e });
|
|
2135
|
+
}
|
|
2136
|
+
function Kt({ rows: e, columns: r, changed: i, rowKey: a, label: o, pinFirst: s, density: c = "compact", height: l = "md", virtualize: u = !0, onRowActivate: d, empty: f = "행이 없습니다.", loading: h, loadingRows: g = 5, error: _, retainRowsOnError: v = !1, lastUpdated: y, selectedKeys: b, onSelectedChange: x, rowLabel: S, sort: C, onSortChange: w, hiddenColumns: E, onHiddenColumnsChange: D, onCellCommit: re, cellState: ae, meta: se, className: le, ...F }) {
|
|
2137
|
+
let de = N(null), fe = N(null), I = N(null), pe = N(null), [L, he] = P({
|
|
2138
|
+
head: 0,
|
|
2139
|
+
foot: 0,
|
|
2140
|
+
row: 32
|
|
2141
|
+
}), [ge, _e] = P(null), ve = M(), [R, z] = P({
|
|
897
2142
|
row: 0,
|
|
898
2143
|
column: 0
|
|
899
|
-
}), [
|
|
2144
|
+
}), [B, be] = P(null), [xe, V] = P(""), Se = N(null), H = N(!1), U = !!x, Ce = oe(() => new Set(b ?? []), [b]), we = oe(() => new Set(E ?? []), [E]), Te = oe(() => e.map((e) => ({
|
|
2145
|
+
data: e,
|
|
2146
|
+
key: a(e)
|
|
2147
|
+
})), [e, a]), W = oe(() => r.map((e) => ({
|
|
2148
|
+
id: e.id,
|
|
2149
|
+
accessorFn: (t) => e.value?.(t.data),
|
|
2150
|
+
enableHiding: e.hideable !== !1,
|
|
2151
|
+
enableSorting: !!e.sortable
|
|
2152
|
+
})), [r]), G = oe(() => Object.fromEntries([...we].map((e) => [e, !1])), [we]), De = oe(() => Object.fromEntries([...Ce].map((e) => [e, !0])), [Ce]), Oe = oe(() => C ? [{
|
|
2153
|
+
id: C.columnId,
|
|
2154
|
+
desc: C.direction === "desc"
|
|
2155
|
+
}] : [], [C]), K = lt({
|
|
2156
|
+
features: Wt,
|
|
2157
|
+
data: Te,
|
|
2158
|
+
columns: W,
|
|
2159
|
+
getRowId: (e) => e.key,
|
|
2160
|
+
manualSorting: !0,
|
|
2161
|
+
state: {
|
|
2162
|
+
columnVisibility: G,
|
|
2163
|
+
rowSelection: De,
|
|
2164
|
+
sorting: Oe
|
|
2165
|
+
},
|
|
2166
|
+
onColumnVisibilityChange: (e) => {
|
|
2167
|
+
let t = et(e, G);
|
|
2168
|
+
D?.(Object.keys(t).filter((e) => t[e] === !1));
|
|
2169
|
+
},
|
|
2170
|
+
onRowSelectionChange: (e) => x?.(Object.keys(et(e, De))),
|
|
2171
|
+
onSortingChange: (e) => {
|
|
2172
|
+
let t = et(e, Oe)[0];
|
|
2173
|
+
w?.(t ? {
|
|
2174
|
+
columnId: t.id,
|
|
2175
|
+
direction: t.desc ? "desc" : "asc"
|
|
2176
|
+
} : null);
|
|
2177
|
+
}
|
|
2178
|
+
}), ke = K.getRowModel().rows, Ae = new Map(r.map((e) => [e.id, e])), q = K.getVisibleLeafColumns().map((e) => ({
|
|
2179
|
+
id: e.id,
|
|
2180
|
+
kind: "data",
|
|
2181
|
+
column: Ae.get(e.id)
|
|
2182
|
+
}));
|
|
2183
|
+
U && q.unshift({
|
|
2184
|
+
id: "__select",
|
|
2185
|
+
kind: "select"
|
|
2186
|
+
});
|
|
2187
|
+
let je = r.some((e) => e.footer), J = !!_ && v && e.length > 0, Y = J ? "rows" : Nt(!!_, !!h, e.length), Me = Pt(Y, e.length, g), Ne = B ? ke.findIndex((e) => e.id === B.key) : -1;
|
|
2188
|
+
j(() => {
|
|
2189
|
+
B && (Y !== "rows" || Ne < 0 || we.has(B.columnId) || !r.some((e) => e.id === B.columnId)) && be(null);
|
|
2190
|
+
}, [
|
|
2191
|
+
B,
|
|
2192
|
+
Ne,
|
|
2193
|
+
we,
|
|
900
2194
|
r,
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
2195
|
+
Y
|
|
2196
|
+
]);
|
|
2197
|
+
let Pe = u && Y === "rows", X = dt({
|
|
2198
|
+
count: ke.length,
|
|
2199
|
+
getScrollElement: () => fe.current,
|
|
2200
|
+
getItemKey: (e) => ke[e].id,
|
|
2201
|
+
estimateSize: () => L.row,
|
|
2202
|
+
enabled: Pe,
|
|
2203
|
+
overscan: 5,
|
|
2204
|
+
scrollMargin: L.head,
|
|
2205
|
+
scrollPaddingStart: L.head,
|
|
2206
|
+
scrollPaddingEnd: L.foot,
|
|
2207
|
+
rangeExtractor: (e) => [.../* @__PURE__ */ new Set([
|
|
2208
|
+
...ut(e),
|
|
2209
|
+
Math.min(R.row, ke.length - 1),
|
|
2210
|
+
Ne,
|
|
2211
|
+
ge ?? -1
|
|
2212
|
+
])].filter((e) => e >= 0 && e < ke.length).sort((e, t) => e - t)
|
|
2213
|
+
});
|
|
2214
|
+
j(() => {
|
|
2215
|
+
let e = () => {
|
|
2216
|
+
let e = de.current?.querySelector("[data-part=\"row\"]"), t = {
|
|
2217
|
+
head: I.current?.getBoundingClientRect().height ?? 0,
|
|
2218
|
+
foot: pe.current?.getBoundingClientRect().height ?? 0,
|
|
2219
|
+
row: e && parseFloat(getComputedStyle(e).minBlockSize) || 32
|
|
2220
|
+
};
|
|
2221
|
+
he((e) => e.head === t.head && e.foot === t.foot && e.row === t.row ? e : t), X.measure();
|
|
2222
|
+
};
|
|
2223
|
+
e();
|
|
2224
|
+
let t = new ResizeObserver(e);
|
|
2225
|
+
return I.current && t.observe(I.current), pe.current && t.observe(pe.current), () => t.disconnect();
|
|
2226
|
+
}, [
|
|
2227
|
+
c,
|
|
2228
|
+
q.length,
|
|
2229
|
+
u,
|
|
2230
|
+
Y,
|
|
2231
|
+
X
|
|
2232
|
+
]);
|
|
2233
|
+
let Fe = Pe ? X.getVirtualItems().map((e) => ({
|
|
2234
|
+
modelRow: ke[e.index],
|
|
2235
|
+
index: e.index,
|
|
2236
|
+
start: e.start - L.head
|
|
2237
|
+
})) : ke.map((e, t) => ({
|
|
2238
|
+
modelRow: e,
|
|
2239
|
+
index: t,
|
|
2240
|
+
start: 0
|
|
2241
|
+
}));
|
|
2242
|
+
j(() => {
|
|
2243
|
+
H.current && Pe && X.scrollToIndex(R.row, { align: "auto" }), H.current = !1;
|
|
2244
|
+
}, [
|
|
2245
|
+
R.row,
|
|
2246
|
+
R.column,
|
|
2247
|
+
Pe,
|
|
2248
|
+
X
|
|
2249
|
+
]);
|
|
2250
|
+
let Z = ie((t, n, r) => {
|
|
2251
|
+
Se.current = !0, H.current = !0, z((i) => Mt(i, {
|
|
905
2252
|
rows: e.length,
|
|
906
|
-
columns:
|
|
2253
|
+
columns: q.length
|
|
907
2254
|
}, t, n, r));
|
|
908
|
-
}, [e.length,
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
let n =
|
|
2255
|
+
}, [e.length, q.length]);
|
|
2256
|
+
j(() => {
|
|
2257
|
+
z((t) => {
|
|
2258
|
+
let n = jt(t, {
|
|
912
2259
|
rows: e.length,
|
|
913
|
-
columns:
|
|
2260
|
+
columns: q.length
|
|
914
2261
|
});
|
|
915
2262
|
return n.row === t.row && n.column === t.column ? t : n;
|
|
916
2263
|
});
|
|
917
|
-
}, [e.length,
|
|
918
|
-
let
|
|
919
|
-
if (!t.editable || !
|
|
920
|
-
let n =
|
|
921
|
-
n?.pending || (
|
|
2264
|
+
}, [e.length, q.length]);
|
|
2265
|
+
let Q = (e) => K.getRow(a(e)).toggleSelected(), Ie = e.length > 0 && e.every((e) => Ce.has(a(e))), Le = e.some((e) => Ce.has(a(e))), Re = () => K.toggleAllRowsSelected(!Ie), ze = (e, t) => {
|
|
2266
|
+
if (!t.editable || !re) return;
|
|
2267
|
+
let n = ae?.(e, t);
|
|
2268
|
+
n?.pending || (V(n?.draft ?? t.value?.(e) ?? ""), be({
|
|
922
2269
|
key: a(e),
|
|
923
2270
|
columnId: t.id
|
|
924
2271
|
}));
|
|
925
|
-
},
|
|
926
|
-
|
|
927
|
-
},
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
} :
|
|
932
|
-
},
|
|
2272
|
+
}, Be = (e, t, n, r = !1) => {
|
|
2273
|
+
Se.current = r, e && re && re(t, n.id, xe), be(null);
|
|
2274
|
+
}, Ve = (e, t) => {
|
|
2275
|
+
K.setSorting(t ? [{
|
|
2276
|
+
id: e.id,
|
|
2277
|
+
desc: t === "desc"
|
|
2278
|
+
}] : []);
|
|
2279
|
+
}, He = (e) => K.getColumn(e)?.toggleVisibility(), Ue = (t) => {
|
|
933
2280
|
let n = t.target;
|
|
934
|
-
if (t.defaultPrevented || !(n instanceof HTMLElement) || !n.matches(".data-grid__cell[role=\"gridcell\"]") || n.closest("[role=\"grid\"]") !== t.currentTarget ||
|
|
2281
|
+
if (t.defaultPrevented || !(n instanceof HTMLElement) || !n.matches(".data-grid__cell[role=\"gridcell\"]") || n.closest("[role=\"grid\"]") !== t.currentTarget || B) return;
|
|
935
2282
|
let r = {
|
|
936
|
-
ArrowDown: () =>
|
|
937
|
-
ArrowUp: () =>
|
|
938
|
-
ArrowRight: () =>
|
|
939
|
-
ArrowLeft: () =>
|
|
940
|
-
PageDown: () =>
|
|
941
|
-
PageUp: () =>
|
|
942
|
-
Home: () =>
|
|
2283
|
+
ArrowDown: () => Z(1, 0),
|
|
2284
|
+
ArrowUp: () => Z(-1, 0),
|
|
2285
|
+
ArrowRight: () => Z(0, 1),
|
|
2286
|
+
ArrowLeft: () => Z(0, -1),
|
|
2287
|
+
PageDown: () => Z(10, 0),
|
|
2288
|
+
PageUp: () => Z(-10, 0),
|
|
2289
|
+
Home: () => Z(0, 0, t.ctrlKey || t.metaKey ? {
|
|
943
2290
|
row: 0,
|
|
944
2291
|
column: 0
|
|
945
2292
|
} : { column: 0 }),
|
|
946
|
-
End: () =>
|
|
2293
|
+
End: () => Z(0, 0, t.ctrlKey || t.metaKey ? {
|
|
947
2294
|
row: e.length - 1,
|
|
948
|
-
column:
|
|
949
|
-
} : { column:
|
|
2295
|
+
column: q.length - 1
|
|
2296
|
+
} : { column: q.length - 1 })
|
|
950
2297
|
}[t.key];
|
|
951
2298
|
if (r) {
|
|
952
2299
|
t.preventDefault(), r();
|
|
953
2300
|
return;
|
|
954
2301
|
}
|
|
955
|
-
let i = e[
|
|
2302
|
+
let i = e[R.row], a = q[R.column];
|
|
956
2303
|
if (!(!i || !a)) {
|
|
957
2304
|
if (a.kind === "select" && (t.key === "Enter" || t.key === " ")) {
|
|
958
|
-
t.preventDefault(),
|
|
2305
|
+
t.preventDefault(), Q(i);
|
|
959
2306
|
return;
|
|
960
2307
|
}
|
|
961
|
-
if (a.kind === "data" && a.column.editable &&
|
|
962
|
-
t.preventDefault(),
|
|
2308
|
+
if (a.kind === "data" && a.column.editable && re && t.key === "Enter") {
|
|
2309
|
+
t.preventDefault(), ze(i, a.column);
|
|
963
2310
|
return;
|
|
964
2311
|
}
|
|
965
|
-
(t.key === "Enter" || t.key === " ") &&
|
|
2312
|
+
(t.key === "Enter" || t.key === " ") && d && (t.preventDefault(), d(i));
|
|
966
2313
|
}
|
|
967
|
-
},
|
|
2314
|
+
}, We = ie((e) => {
|
|
968
2315
|
if (!e) return;
|
|
969
|
-
let t =
|
|
970
|
-
|
|
2316
|
+
let t = Se.current ?? de.current?.contains(document.activeElement);
|
|
2317
|
+
Se.current = null, t && (e.focus({ preventScroll: !0 }), e.scrollIntoView({
|
|
971
2318
|
block: "nearest",
|
|
972
2319
|
inline: "nearest"
|
|
973
2320
|
}));
|
|
974
|
-
}, []),
|
|
975
|
-
checked:
|
|
976
|
-
indeterminate: !
|
|
977
|
-
onChange:
|
|
978
|
-
"aria-label":
|
|
2321
|
+
}, []), Ge = (e) => e.kind === "select" ? /* @__PURE__ */ k(p, {
|
|
2322
|
+
checked: Ie,
|
|
2323
|
+
indeterminate: !Ie && Le,
|
|
2324
|
+
onChange: Re,
|
|
2325
|
+
"aria-label": Ie ? "전부 고르기 해제" : "전부 고르기",
|
|
979
2326
|
"data-part": "select-all"
|
|
980
2327
|
}) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("span", {
|
|
981
2328
|
className: "data-grid__header-label",
|
|
982
2329
|
children: e.column.header
|
|
983
|
-
}), e.column.sortable &&
|
|
2330
|
+
}), e.column.sortable && w || e.column.hideable !== !1 && D ? /* @__PURE__ */ k(ne, {
|
|
984
2331
|
items: /* @__PURE__ */ A(O, { children: [
|
|
985
|
-
e.column.sortable &&
|
|
2332
|
+
e.column.sortable && w ? /* @__PURE__ */ A(O, { children: [
|
|
986
2333
|
/* @__PURE__ */ k(T, {
|
|
987
|
-
icon:
|
|
988
|
-
onSelect: () =>
|
|
2334
|
+
icon: ue,
|
|
2335
|
+
onSelect: () => Ve(e.column, "asc"),
|
|
989
2336
|
children: "오름차순"
|
|
990
2337
|
}),
|
|
991
2338
|
/* @__PURE__ */ k(T, {
|
|
992
|
-
icon:
|
|
993
|
-
onSelect: () =>
|
|
2339
|
+
icon: ce,
|
|
2340
|
+
onSelect: () => Ve(e.column, "desc"),
|
|
994
2341
|
children: "내림차순"
|
|
995
2342
|
}),
|
|
996
|
-
|
|
997
|
-
onSelect: () =>
|
|
2343
|
+
C?.columnId === e.column.id ? /* @__PURE__ */ k(T, {
|
|
2344
|
+
onSelect: () => Ve(e.column, null),
|
|
998
2345
|
children: "정렬 없애기"
|
|
999
2346
|
}) : null
|
|
1000
2347
|
] }) : null,
|
|
1001
|
-
e.column.sortable &&
|
|
1002
|
-
e.column.hideable !== !1 &&
|
|
1003
|
-
icon:
|
|
1004
|
-
onSelect: () =>
|
|
2348
|
+
e.column.sortable && w && e.column.hideable !== !1 && D ? /* @__PURE__ */ k(te, {}) : null,
|
|
2349
|
+
e.column.hideable !== !1 && D ? /* @__PURE__ */ k(T, {
|
|
2350
|
+
icon: ye,
|
|
2351
|
+
onSelect: () => He(e.column.id),
|
|
1005
2352
|
children: "이 열 숨기기"
|
|
1006
2353
|
}) : null
|
|
1007
2354
|
] }),
|
|
1008
2355
|
children: /* @__PURE__ */ k(t, {
|
|
1009
|
-
icon:
|
|
2356
|
+
icon: me,
|
|
1010
2357
|
label: `${e.column.header} 열 설정`,
|
|
1011
2358
|
variant: "ghost",
|
|
1012
2359
|
tone: "neutral",
|
|
@@ -1015,18 +2362,18 @@ function $e({ rows: e, columns: r, changed: i, rowKey: a, label: o, pinFirst: s,
|
|
|
1015
2362
|
})
|
|
1016
2363
|
}) : null] });
|
|
1017
2364
|
return /* @__PURE__ */ A("div", {
|
|
1018
|
-
...
|
|
1019
|
-
className: `data-grid ${
|
|
2365
|
+
...F,
|
|
2366
|
+
className: `data-grid ${le ?? ""}`.trim(),
|
|
1020
2367
|
"data-row-density": c,
|
|
1021
2368
|
"data-height": l,
|
|
1022
2369
|
"data-pinned": s ? "" : void 0,
|
|
1023
2370
|
children: [
|
|
1024
|
-
|
|
2371
|
+
D ? /* @__PURE__ */ k("div", {
|
|
1025
2372
|
className: "data-grid__bar",
|
|
1026
2373
|
children: /* @__PURE__ */ k(ne, {
|
|
1027
2374
|
items: r.map((e) => /* @__PURE__ */ k(ee, {
|
|
1028
|
-
checked: !
|
|
1029
|
-
onCheckedChange: () =>
|
|
2375
|
+
checked: !we.has(e.id),
|
|
2376
|
+
onCheckedChange: () => He(e.id),
|
|
1030
2377
|
disabled: e.hideable === !1,
|
|
1031
2378
|
children: e.header
|
|
1032
2379
|
}, e.id)),
|
|
@@ -1034,11 +2381,11 @@ function $e({ rows: e, columns: r, changed: i, rowKey: a, label: o, pinFirst: s,
|
|
|
1034
2381
|
variant: "outline",
|
|
1035
2382
|
tone: "neutral",
|
|
1036
2383
|
size: "sm",
|
|
1037
|
-
iconStart:
|
|
2384
|
+
iconStart: Ee,
|
|
1038
2385
|
"data-part": "columns",
|
|
1039
2386
|
children: [
|
|
1040
2387
|
"열 ",
|
|
1041
|
-
r.length -
|
|
2388
|
+
r.length - we.size,
|
|
1042
2389
|
"/",
|
|
1043
2390
|
r.length
|
|
1044
2391
|
]
|
|
@@ -1046,49 +2393,61 @@ function $e({ rows: e, columns: r, changed: i, rowKey: a, label: o, pinFirst: s,
|
|
|
1046
2393
|
})
|
|
1047
2394
|
}) : null,
|
|
1048
2395
|
/* @__PURE__ */ k("div", {
|
|
2396
|
+
ref: fe,
|
|
1049
2397
|
className: "data-grid__scroll",
|
|
1050
2398
|
"data-part": "scroll",
|
|
1051
2399
|
children: /* @__PURE__ */ A("div", {
|
|
1052
|
-
ref:
|
|
2400
|
+
ref: de,
|
|
1053
2401
|
className: "data-grid__grid",
|
|
1054
2402
|
role: "grid",
|
|
1055
2403
|
"aria-label": o,
|
|
1056
|
-
"aria-describedby":
|
|
1057
|
-
"aria-rowcount":
|
|
1058
|
-
"aria-colcount":
|
|
1059
|
-
"aria-multiselectable":
|
|
1060
|
-
onKeyDown:
|
|
2404
|
+
"aria-describedby": J ? `${ve}-refresh` : void 0,
|
|
2405
|
+
"aria-rowcount": Me + 1 + +!!je,
|
|
2406
|
+
"aria-colcount": q.length,
|
|
2407
|
+
"aria-multiselectable": U || void 0,
|
|
2408
|
+
onKeyDown: Ue,
|
|
2409
|
+
onFocusCapture: (e) => {
|
|
2410
|
+
if (e.target.closest("[role=\"grid\"]") !== e.currentTarget) return;
|
|
2411
|
+
let t = e.target.closest("[data-part=\"row\"]");
|
|
2412
|
+
_e(t ? Number(t.dataset.index) : null);
|
|
2413
|
+
},
|
|
2414
|
+
onBlurCapture: (e) => {
|
|
2415
|
+
e.currentTarget.contains(e.relatedTarget) || _e(null);
|
|
2416
|
+
},
|
|
1061
2417
|
children: [
|
|
1062
2418
|
/* @__PURE__ */ k("div", {
|
|
2419
|
+
ref: I,
|
|
1063
2420
|
role: "rowgroup",
|
|
1064
2421
|
className: "data-grid__head",
|
|
1065
2422
|
children: /* @__PURE__ */ k("div", {
|
|
1066
2423
|
role: "row",
|
|
1067
2424
|
className: "data-grid__row",
|
|
1068
2425
|
"aria-rowindex": 1,
|
|
1069
|
-
children:
|
|
2426
|
+
children: q.map((e, t) => /* @__PURE__ */ k("div", {
|
|
1070
2427
|
role: "columnheader",
|
|
1071
2428
|
className: "data-grid__cell",
|
|
1072
2429
|
"aria-colindex": t + 1,
|
|
1073
|
-
"aria-sort": e.kind === "data" && e.column.sortable ?
|
|
2430
|
+
"aria-sort": e.kind === "data" && e.column.sortable ? C?.columnId === e.column.id ? C.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
1074
2431
|
"data-width": e.kind === "select" ? "select" : e.column.width ?? "md",
|
|
1075
2432
|
"data-align": e.kind === "select" ? "start" : e.column.align ?? "start",
|
|
1076
2433
|
"data-pin": s && t === 0 ? "" : void 0,
|
|
1077
2434
|
"data-part": e.kind === "select" ? "select-header" : void 0,
|
|
1078
|
-
children:
|
|
2435
|
+
children: Ge(e)
|
|
1079
2436
|
}, e.id))
|
|
1080
2437
|
})
|
|
1081
2438
|
}),
|
|
1082
2439
|
/* @__PURE__ */ A("div", {
|
|
1083
2440
|
role: "rowgroup",
|
|
1084
2441
|
className: "data-grid__body",
|
|
1085
|
-
"aria-busy":
|
|
1086
|
-
|
|
2442
|
+
"aria-busy": Y === "loading" || void 0,
|
|
2443
|
+
"data-virtualized": Pe ? "" : void 0,
|
|
2444
|
+
style: { "--data-grid-total": `${Pe ? X.getTotalSize() : 0}px` },
|
|
2445
|
+
children: [Y === "loading" ? Array.from({ length: g }, (e, t) => /* @__PURE__ */ k("div", {
|
|
1087
2446
|
role: "row",
|
|
1088
2447
|
className: "data-grid__row",
|
|
1089
2448
|
"aria-rowindex": t + 2,
|
|
1090
2449
|
"data-part": "waiting-row",
|
|
1091
|
-
children:
|
|
2450
|
+
children: q.map((e, t) => /* @__PURE__ */ k("div", {
|
|
1092
2451
|
role: "gridcell",
|
|
1093
2452
|
className: "data-grid__cell",
|
|
1094
2453
|
"aria-colindex": t + 1,
|
|
@@ -1099,76 +2458,80 @@ function $e({ rows: e, columns: r, changed: i, rowKey: a, label: o, pinFirst: s,
|
|
|
1099
2458
|
lines: 1
|
|
1100
2459
|
})
|
|
1101
2460
|
}, e.id))
|
|
1102
|
-
}, `waiting-${t}`)) : null,
|
|
1103
|
-
let
|
|
2461
|
+
}, `waiting-${t}`)) : null, Y === "rows" ? Fe.map(({ modelRow: e, index: t, start: n }) => {
|
|
2462
|
+
let r = e.original.data, a = e.id, o = e.getIsSelected();
|
|
1104
2463
|
return /* @__PURE__ */ k("div", {
|
|
1105
2464
|
role: "row",
|
|
1106
2465
|
className: "data-grid__row",
|
|
1107
2466
|
"aria-rowindex": t + 2,
|
|
1108
|
-
"aria-selected":
|
|
2467
|
+
"aria-selected": U ? o : void 0,
|
|
1109
2468
|
"data-part": "row",
|
|
1110
|
-
"data-
|
|
1111
|
-
|
|
1112
|
-
|
|
2469
|
+
"data-index": t,
|
|
2470
|
+
ref: Pe ? X.measureElement : void 0,
|
|
2471
|
+
style: { "--data-grid-offset": `${n}px` },
|
|
2472
|
+
"data-selected": o ? "" : void 0,
|
|
2473
|
+
children: q.map((e, n) => {
|
|
2474
|
+
let c = R.row === t && R.column === n, l = e.kind === "data" && B?.key === a && B.columnId === e.column.id, u = e.kind === "data" ? ae?.(r, e.column) : void 0;
|
|
1113
2475
|
return /* @__PURE__ */ k("div", {
|
|
1114
|
-
ref: c && !l ?
|
|
2476
|
+
ref: c && !l ? We : void 0,
|
|
1115
2477
|
role: "gridcell",
|
|
1116
2478
|
className: "data-grid__cell",
|
|
1117
|
-
"aria-colindex":
|
|
1118
|
-
"aria-busy":
|
|
1119
|
-
"aria-describedby":
|
|
1120
|
-
"data-save-error":
|
|
1121
|
-
"data-width":
|
|
1122
|
-
"data-align":
|
|
1123
|
-
"data-numeric":
|
|
1124
|
-
"data-pin": s &&
|
|
2479
|
+
"aria-colindex": n + 1,
|
|
2480
|
+
"aria-busy": u?.pending || void 0,
|
|
2481
|
+
"aria-describedby": u?.pending || u?.error ? `${ve}-${t}-${n}` : void 0,
|
|
2482
|
+
"data-save-error": u?.error ? "" : void 0,
|
|
2483
|
+
"data-width": e.kind === "select" ? "select" : e.column.width ?? "md",
|
|
2484
|
+
"data-align": e.kind === "select" ? "start" : e.column.align ?? "start",
|
|
2485
|
+
"data-numeric": e.kind === "data" && e.column.numeric ? "" : void 0,
|
|
2486
|
+
"data-pin": s && n === 0 ? "" : void 0,
|
|
1125
2487
|
"data-here": c ? "" : void 0,
|
|
1126
|
-
"data-editable":
|
|
2488
|
+
"data-editable": e.kind === "data" && e.column.editable && re ? "" : void 0,
|
|
1127
2489
|
tabIndex: c && !l ? 0 : -1,
|
|
1128
2490
|
onFocus: (e) => {
|
|
1129
|
-
e.target === e.currentTarget &&
|
|
2491
|
+
e.target === e.currentTarget && z({
|
|
1130
2492
|
row: t,
|
|
1131
|
-
column:
|
|
2493
|
+
column: n
|
|
1132
2494
|
});
|
|
1133
2495
|
},
|
|
1134
|
-
onDoubleClick:
|
|
1135
|
-
children:
|
|
1136
|
-
checked:
|
|
1137
|
-
onChange: () =>
|
|
1138
|
-
"aria-label":
|
|
2496
|
+
onDoubleClick: e.kind === "data" && e.column.editable && re ? () => ze(r, e.column) : d ? () => d(r) : void 0,
|
|
2497
|
+
children: e.kind === "select" ? /* @__PURE__ */ k(p, {
|
|
2498
|
+
checked: o,
|
|
2499
|
+
onChange: () => Q(r),
|
|
2500
|
+
"aria-label": S ? S(r) : `${a} 고르기`,
|
|
1139
2501
|
"data-part": "select-row"
|
|
1140
2502
|
}) : l ? /* @__PURE__ */ k("input", {
|
|
1141
2503
|
className: "data-grid__editor",
|
|
1142
2504
|
ref: (e) => e?.focus(),
|
|
1143
|
-
value:
|
|
1144
|
-
"aria-label": `${
|
|
2505
|
+
value: xe,
|
|
2506
|
+
"aria-label": `${e.column.header} 고치기`,
|
|
1145
2507
|
"data-part": "editor",
|
|
1146
|
-
onChange: (e) =>
|
|
1147
|
-
onBlur: () =>
|
|
2508
|
+
onChange: (e) => V(e.target.value),
|
|
2509
|
+
onBlur: () => Be(!0, r, e.column),
|
|
1148
2510
|
onKeyDown: (t) => {
|
|
1149
|
-
t.stopPropagation(), !(t.nativeEvent.isComposing || t.nativeEvent.keyCode === 229) && (t.key === "Enter" ? (t.preventDefault(),
|
|
2511
|
+
t.stopPropagation(), !(t.nativeEvent.isComposing || t.nativeEvent.keyCode === 229) && (t.key === "Enter" ? (t.preventDefault(), Be(!0, r, e.column, !0)) : t.key === "Escape" && (t.preventDefault(), Be(!1, r, e.column, !0)));
|
|
1150
2512
|
}
|
|
1151
2513
|
}) : /* @__PURE__ */ A(O, { children: [(() => {
|
|
1152
|
-
let t = i?.(
|
|
2514
|
+
let t = i?.(r, e.column);
|
|
1153
2515
|
return t === void 0 ? null : /* @__PURE__ */ k("span", {
|
|
1154
2516
|
className: "data-grid__flash",
|
|
1155
2517
|
"data-part": "flash",
|
|
1156
2518
|
"aria-hidden": "true"
|
|
1157
2519
|
}, t);
|
|
1158
|
-
})(),
|
|
1159
|
-
},
|
|
2520
|
+
})(), e.column.cell(r)] })
|
|
2521
|
+
}, e.id);
|
|
1160
2522
|
})
|
|
1161
|
-
},
|
|
2523
|
+
}, a);
|
|
1162
2524
|
}) : null]
|
|
1163
2525
|
}),
|
|
1164
|
-
|
|
2526
|
+
je ? /* @__PURE__ */ k("div", {
|
|
2527
|
+
ref: pe,
|
|
1165
2528
|
role: "rowgroup",
|
|
1166
2529
|
className: "data-grid__foot",
|
|
1167
2530
|
children: /* @__PURE__ */ k("div", {
|
|
1168
2531
|
role: "row",
|
|
1169
2532
|
className: "data-grid__row",
|
|
1170
|
-
"aria-rowindex":
|
|
1171
|
-
children:
|
|
2533
|
+
"aria-rowindex": Me + 2,
|
|
2534
|
+
children: q.map((t, n) => /* @__PURE__ */ k("div", {
|
|
1172
2535
|
role: "gridcell",
|
|
1173
2536
|
className: "data-grid__cell",
|
|
1174
2537
|
"aria-colindex": n + 1,
|
|
@@ -1183,74 +2546,74 @@ function $e({ rows: e, columns: r, changed: i, rowKey: a, label: o, pinFirst: s,
|
|
|
1183
2546
|
]
|
|
1184
2547
|
})
|
|
1185
2548
|
}),
|
|
1186
|
-
|
|
2549
|
+
Y === "error" || J ? /* @__PURE__ */ A("p", {
|
|
1187
2550
|
className: "data-grid__state",
|
|
1188
2551
|
role: "alert",
|
|
1189
2552
|
"data-part": "error",
|
|
1190
|
-
id: `${
|
|
1191
|
-
"data-retained":
|
|
1192
|
-
children: [
|
|
1193
|
-
}) :
|
|
2553
|
+
id: `${ve}-refresh`,
|
|
2554
|
+
"data-retained": J ? "" : void 0,
|
|
2555
|
+
children: [_, J ? /* @__PURE__ */ A(O, { children: [" 이전 결과를 표시합니다.", y ? /* @__PURE__ */ A(O, { children: [" 마지막 갱신: ", y] }) : null] }) : null]
|
|
2556
|
+
}) : Y === "empty" ? /* @__PURE__ */ k("p", {
|
|
1194
2557
|
className: "data-grid__empty",
|
|
1195
2558
|
"data-part": "empty",
|
|
1196
|
-
children:
|
|
2559
|
+
children: f
|
|
1197
2560
|
}) : null,
|
|
1198
|
-
|
|
2561
|
+
ae && Y === "rows" ? /* @__PURE__ */ k("ul", {
|
|
1199
2562
|
className: "data-grid__save-status",
|
|
1200
2563
|
"data-part": "save-status",
|
|
1201
|
-
children: e.flatMap((e, t) =>
|
|
2564
|
+
children: e.flatMap((e, t) => q.flatMap((r, i) => {
|
|
1202
2565
|
if (r.kind !== "data") return [];
|
|
1203
|
-
let o =
|
|
2566
|
+
let o = ae(e, r.column);
|
|
1204
2567
|
return !o?.pending && !o?.error ? [] : [/* @__PURE__ */ A("li", {
|
|
1205
|
-
id: `${
|
|
2568
|
+
id: `${ve}-${t}-${i}`,
|
|
1206
2569
|
children: [/* @__PURE__ */ A("span", {
|
|
1207
2570
|
role: o.pending ? "status" : "alert",
|
|
1208
2571
|
children: [
|
|
1209
|
-
|
|
2572
|
+
S ? S(e) : a(e),
|
|
1210
2573
|
" · ",
|
|
1211
2574
|
r.column.header,
|
|
1212
2575
|
": ",
|
|
1213
2576
|
o.pending ? "저장 중입니다" : o.error
|
|
1214
2577
|
]
|
|
1215
|
-
}), !o.pending && o.error && r.column.editable &&
|
|
2578
|
+
}), !o.pending && o.error && r.column.editable && re ? /* @__PURE__ */ k(n, {
|
|
1216
2579
|
size: "sm",
|
|
1217
2580
|
variant: "outline",
|
|
1218
|
-
onClick: () =>
|
|
2581
|
+
onClick: () => ze(e, r.column),
|
|
1219
2582
|
"data-part": "recover-draft",
|
|
1220
2583
|
children: "입력 복구"
|
|
1221
2584
|
}) : null]
|
|
1222
2585
|
}, JSON.stringify([a(e), r.id]))];
|
|
1223
2586
|
}))
|
|
1224
2587
|
}) : null,
|
|
1225
|
-
|
|
2588
|
+
se ? /* @__PURE__ */ k("p", {
|
|
1226
2589
|
className: "data-grid__meta",
|
|
1227
2590
|
role: "status",
|
|
1228
2591
|
"data-part": "meta",
|
|
1229
|
-
children:
|
|
2592
|
+
children: se
|
|
1230
2593
|
}) : null
|
|
1231
2594
|
]
|
|
1232
2595
|
});
|
|
1233
2596
|
}
|
|
1234
2597
|
//#endregion
|
|
1235
2598
|
//#region src/components/extended/Dropzone/Dropzone.tsx
|
|
1236
|
-
function
|
|
2599
|
+
function qt(e, t) {
|
|
1237
2600
|
let n = (e ?? "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
1238
2601
|
if (n.length === 0) return !0;
|
|
1239
2602
|
let r = t.name.toLowerCase(), i = t.type.toLowerCase();
|
|
1240
2603
|
return n.some((e) => e.startsWith(".") ? r.endsWith(e) : e.endsWith("/*") ? i.startsWith(e.slice(0, -1)) : i === e);
|
|
1241
2604
|
}
|
|
1242
|
-
var
|
|
1243
|
-
done:
|
|
1244
|
-
failed:
|
|
1245
|
-
},
|
|
2605
|
+
var Jt = {
|
|
2606
|
+
done: pe,
|
|
2607
|
+
failed: Y
|
|
2608
|
+
}, Yt = {
|
|
1246
2609
|
queued: "대기 중",
|
|
1247
2610
|
uploading: "올리는 중",
|
|
1248
2611
|
done: "완료",
|
|
1249
2612
|
failed: "실패"
|
|
1250
2613
|
};
|
|
1251
|
-
function
|
|
1252
|
-
let m =
|
|
1253
|
-
let t = Array.from(e ?? []), n = [], r = t.filter((e) =>
|
|
2614
|
+
function Xt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, name: c, onFiles: l, files: u = [], disabled: d, className: f, ...p }) {
|
|
2615
|
+
let m = M(), h = N(0), g = N(null), [v, y] = P(!1), [b, x] = P([]), S = (e) => {
|
|
2616
|
+
let t = Array.from(e ?? []), n = [], r = t.filter((e) => qt(a, e) ? !0 : (n.push(`${e.name} — 받지 않는 형식입니다. ${a}만 받습니다`), !1));
|
|
1254
2617
|
return x(n), o ? r : r.slice(0, 1);
|
|
1255
2618
|
}, C = (e) => {
|
|
1256
2619
|
if (d) return;
|
|
@@ -1261,9 +2624,9 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1261
2624
|
n.files = e.files;
|
|
1262
2625
|
}
|
|
1263
2626
|
(c || t.length > 0) && l(t);
|
|
1264
|
-
},
|
|
2627
|
+
}, ee = (e) => {
|
|
1265
2628
|
d || (e.preventDefault(), h.current += 1, y(!0));
|
|
1266
|
-
},
|
|
2629
|
+
}, te = () => {
|
|
1267
2630
|
h.current = Math.max(0, h.current - 1), h.current === 0 && y(!1);
|
|
1268
2631
|
};
|
|
1269
2632
|
return /* @__PURE__ */ A("div", {
|
|
@@ -1276,17 +2639,17 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1276
2639
|
htmlFor: m,
|
|
1277
2640
|
"data-over": v ? "" : void 0,
|
|
1278
2641
|
"data-part": "area",
|
|
1279
|
-
onDragEnter:
|
|
2642
|
+
onDragEnter: ee,
|
|
1280
2643
|
onDragOver: (e) => {
|
|
1281
2644
|
d || e.preventDefault();
|
|
1282
2645
|
},
|
|
1283
|
-
onDragLeave:
|
|
2646
|
+
onDragLeave: te,
|
|
1284
2647
|
onDrop: (e) => {
|
|
1285
2648
|
d || (e.preventDefault(), h.current = 0, y(!1), e.dataTransfer.files.length !== 0 && C(e.dataTransfer.files));
|
|
1286
2649
|
},
|
|
1287
2650
|
children: [
|
|
1288
2651
|
i === void 0 ? /* @__PURE__ */ k(r, {
|
|
1289
|
-
icon:
|
|
2652
|
+
icon: je,
|
|
1290
2653
|
size: "md",
|
|
1291
2654
|
className: "dropzone__glyph",
|
|
1292
2655
|
"aria-hidden": "true"
|
|
@@ -1336,7 +2699,7 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1336
2699
|
className: "dropzone__file-name",
|
|
1337
2700
|
children: [
|
|
1338
2701
|
/* @__PURE__ */ k(_, {
|
|
1339
|
-
icon: n === "done" || n === "failed" ?
|
|
2702
|
+
icon: n === "done" || n === "failed" ? Jt[n] : void 0,
|
|
1340
2703
|
tone: n === "done" ? "success" : n === "failed" ? "danger" : "neutral",
|
|
1341
2704
|
size: "xs",
|
|
1342
2705
|
className: "dropzone__file-glyph",
|
|
@@ -1345,7 +2708,7 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1345
2708
|
e.name,
|
|
1346
2709
|
/* @__PURE__ */ k("span", {
|
|
1347
2710
|
className: "dropzone__said",
|
|
1348
|
-
children: ` — ${
|
|
2711
|
+
children: ` — ${Yt[n]}`
|
|
1349
2712
|
})
|
|
1350
2713
|
]
|
|
1351
2714
|
}), n === "failed" && e.error ? /* @__PURE__ */ k("p", {
|
|
@@ -1369,7 +2732,7 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1369
2732
|
/* @__PURE__ */ A("div", {
|
|
1370
2733
|
className: "dropzone__file-actions",
|
|
1371
2734
|
children: [n === "failed" && e.onRetry ? /* @__PURE__ */ k(t, {
|
|
1372
|
-
icon:
|
|
2735
|
+
icon: Ce,
|
|
1373
2736
|
label: `${e.name} 다시 올리기`,
|
|
1374
2737
|
size: "sm",
|
|
1375
2738
|
variant: "ghost",
|
|
@@ -1377,7 +2740,7 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1377
2740
|
onClick: e.onRetry,
|
|
1378
2741
|
"data-part": "retry"
|
|
1379
2742
|
}) : null, e.onCancel ? /* @__PURE__ */ k(t, {
|
|
1380
|
-
icon:
|
|
2743
|
+
icon: J,
|
|
1381
2744
|
label: n === "done" ? `${e.name} 지우기` : `${e.name} 취소`,
|
|
1382
2745
|
size: "sm",
|
|
1383
2746
|
variant: "ghost",
|
|
@@ -1395,13 +2758,13 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1395
2758
|
}
|
|
1396
2759
|
//#endregion
|
|
1397
2760
|
//#region src/components/extended/FeedbackControl/FeedbackControl.tsx
|
|
1398
|
-
function
|
|
1399
|
-
let d =
|
|
1400
|
-
|
|
2761
|
+
function Zt({ value: e, onRate: t, reasons: r = [], onReasons: i, askOn: a = "down", label: o = "이 답이 도움이 됐나요?", noteLabel: s = "더 알려 주실 것이 있나요?", className: c, ...u }) {
|
|
2762
|
+
let d = N(null), f = M(), [p, m] = P([]), [h, g] = P(""), [_, v] = P(!1), y = !!e && r.length > 0 && !!i && (a === "both" || e === "down");
|
|
2763
|
+
j(() => {
|
|
1401
2764
|
m([]), g(""), v(!1);
|
|
1402
2765
|
}, [e]);
|
|
1403
|
-
let b = (n) => t(e === n ? null : n), S =
|
|
1404
|
-
|
|
2766
|
+
let b = (n) => t(e === n ? null : n), S = N(!1);
|
|
2767
|
+
j(() => {
|
|
1405
2768
|
S.current && (S.current = !1, document.activeElement === document.body && (d.current?.querySelector(`[data-part="${e === "up" ? "up" : "down"}"]`) ?? d.current)?.focus());
|
|
1406
2769
|
}, [_]);
|
|
1407
2770
|
let C = () => {
|
|
@@ -1422,7 +2785,7 @@ function it({ value: e, onRate: t, reasons: r = [], onReasons: i, askOn: a = "do
|
|
|
1422
2785
|
children: o
|
|
1423
2786
|
}),
|
|
1424
2787
|
/* @__PURE__ */ k(x, {
|
|
1425
|
-
icon:
|
|
2788
|
+
icon: Ae,
|
|
1426
2789
|
pressed: e === "up",
|
|
1427
2790
|
onPressedChange: () => b("up"),
|
|
1428
2791
|
variant: "ghost",
|
|
@@ -1433,7 +2796,7 @@ function it({ value: e, onRate: t, reasons: r = [], onReasons: i, askOn: a = "do
|
|
|
1433
2796
|
children: "도움이 됐어요"
|
|
1434
2797
|
}),
|
|
1435
2798
|
/* @__PURE__ */ k(x, {
|
|
1436
|
-
icon:
|
|
2799
|
+
icon: ke,
|
|
1437
2800
|
pressed: e === "down",
|
|
1438
2801
|
onPressedChange: () => b("down"),
|
|
1439
2802
|
variant: "ghost",
|
|
@@ -1495,7 +2858,7 @@ function it({ value: e, onRate: t, reasons: r = [], onReasons: i, askOn: a = "do
|
|
|
1495
2858
|
}
|
|
1496
2859
|
//#endregion
|
|
1497
2860
|
//#region src/components/extended/FilterBuilder/FilterBuilder.tsx
|
|
1498
|
-
var
|
|
2861
|
+
var Qt = {
|
|
1499
2862
|
text: [
|
|
1500
2863
|
{
|
|
1501
2864
|
value: "contains",
|
|
@@ -1557,27 +2920,27 @@ var at = {
|
|
|
1557
2920
|
value: "isnot",
|
|
1558
2921
|
label: "아님"
|
|
1559
2922
|
}]
|
|
1560
|
-
},
|
|
1561
|
-
function
|
|
2923
|
+
}, $t = /* @__PURE__ */ new Set(["empty"]);
|
|
2924
|
+
function en(e, t) {
|
|
1562
2925
|
let n = e[0];
|
|
1563
2926
|
return {
|
|
1564
2927
|
id: t,
|
|
1565
2928
|
field: n.id,
|
|
1566
|
-
operator:
|
|
2929
|
+
operator: Qt[n.type][0].value,
|
|
1567
2930
|
value: ""
|
|
1568
2931
|
};
|
|
1569
2932
|
}
|
|
1570
|
-
function
|
|
2933
|
+
function tn({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, label: c, addLabel: l = "조건 추가", className: u, ...f }) {
|
|
1571
2934
|
let p = (t) => e.find((e) => e.id === t) ?? e[0], m = (e, t) => i(r.map((n) => n.id === e ? {
|
|
1572
2935
|
...n,
|
|
1573
2936
|
...t
|
|
1574
|
-
} : n)), h =
|
|
1575
|
-
|
|
2937
|
+
} : n)), h = N(null), g = M(), _ = N(0);
|
|
2938
|
+
j(() => {
|
|
1576
2939
|
let t = new Set(e.map((e) => e.id));
|
|
1577
|
-
r.every((e) => t.has(e.field)) || i(r.map((n) => t.has(n.field) ? n :
|
|
2940
|
+
r.every((e) => t.has(e.field)) || i(r.map((n) => t.has(n.field) ? n : en(e, n.id)));
|
|
1578
2941
|
}, [e, r]);
|
|
1579
|
-
let v =
|
|
1580
|
-
return
|
|
2942
|
+
let v = N(null);
|
|
2943
|
+
return j(() => {
|
|
1581
2944
|
let e = v.current;
|
|
1582
2945
|
if (e === null || (v.current = null, document.activeElement !== document.body)) return;
|
|
1583
2946
|
let t = h.current?.querySelectorAll("[data-part=\"remove\"]");
|
|
@@ -1592,7 +2955,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1592
2955
|
children: [/* @__PURE__ */ k("ul", {
|
|
1593
2956
|
className: "filter-builder__rules",
|
|
1594
2957
|
children: r.map((n, c) => {
|
|
1595
|
-
let l = p(n.field), u =
|
|
2958
|
+
let l = p(n.field), u = Qt[l.type], f = u.find((e) => e.value === n.operator) ?? u[0], h = `${l.label} ${f.label}${n.value ? ` ${n.value}` : ""}`;
|
|
1596
2959
|
return /* @__PURE__ */ A("li", {
|
|
1597
2960
|
className: "filter-builder__rule",
|
|
1598
2961
|
"data-part": "rule",
|
|
@@ -1630,7 +2993,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1630
2993
|
let t = p(e.target.value);
|
|
1631
2994
|
m(n.id, {
|
|
1632
2995
|
field: t.id,
|
|
1633
|
-
operator:
|
|
2996
|
+
operator: Qt[t.type][0].value,
|
|
1634
2997
|
value: ""
|
|
1635
2998
|
});
|
|
1636
2999
|
},
|
|
@@ -1646,7 +3009,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1646
3009
|
let t = e.target.value;
|
|
1647
3010
|
m(n.id, {
|
|
1648
3011
|
operator: t,
|
|
1649
|
-
|
|
3012
|
+
...$t.has(t) ? { value: "" } : null
|
|
1650
3013
|
});
|
|
1651
3014
|
},
|
|
1652
3015
|
"aria-label": `${l.label}에 적용할 연산자`,
|
|
@@ -1658,7 +3021,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1658
3021
|
}),
|
|
1659
3022
|
/* @__PURE__ */ k("span", {
|
|
1660
3023
|
className: "filter-builder__value",
|
|
1661
|
-
children:
|
|
3024
|
+
children: $t.has(f.value) ? /* @__PURE__ */ k("span", {
|
|
1662
3025
|
className: "filter-builder__none",
|
|
1663
3026
|
children: "값 없음"
|
|
1664
3027
|
}) : l.type === "choice" ? /* @__PURE__ */ A(d, {
|
|
@@ -1684,7 +3047,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1684
3047
|
})
|
|
1685
3048
|
}),
|
|
1686
3049
|
/* @__PURE__ */ k(t, {
|
|
1687
|
-
icon:
|
|
3050
|
+
icon: J,
|
|
1688
3051
|
label: `${h} 조건 지우기`,
|
|
1689
3052
|
size: "sm",
|
|
1690
3053
|
onClick: () => {
|
|
@@ -1700,7 +3063,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1700
3063
|
tone: "neutral",
|
|
1701
3064
|
size: "sm",
|
|
1702
3065
|
onClick: () => {
|
|
1703
|
-
_.current += 1, i([...r,
|
|
3066
|
+
_.current += 1, i([...r, en(e, `rule-${g}-${_.current}`)]);
|
|
1704
3067
|
},
|
|
1705
3068
|
"data-part": "add",
|
|
1706
3069
|
children: l
|
|
@@ -1709,7 +3072,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1709
3072
|
}
|
|
1710
3073
|
//#endregion
|
|
1711
3074
|
//#region src/components/extended/FollowUpList/FollowUpList.tsx
|
|
1712
|
-
function
|
|
3075
|
+
function nn({ items: e, onAsk: t, label: n = "이어서 물어볼 것", collapsible: i, defaultOpen: a = !0, className: o, ...s }) {
|
|
1713
3076
|
let c = /* @__PURE__ */ k("ul", {
|
|
1714
3077
|
className: "follow-up-list__items",
|
|
1715
3078
|
children: e.map((e) => /* @__PURE__ */ k("li", { children: /* @__PURE__ */ A("button", {
|
|
@@ -1718,7 +3081,7 @@ function lt({ items: e, onAsk: t, label: n = "이어서 물어볼 것", collapsi
|
|
|
1718
3081
|
onClick: () => t(e),
|
|
1719
3082
|
"data-part": "ask",
|
|
1720
3083
|
children: [/* @__PURE__ */ k(r, {
|
|
1721
|
-
icon:
|
|
3084
|
+
icon: _e,
|
|
1722
3085
|
size: "sm",
|
|
1723
3086
|
tone: "muted",
|
|
1724
3087
|
"aria-hidden": "true"
|
|
@@ -1728,7 +3091,7 @@ function lt({ items: e, onAsk: t, label: n = "이어서 물어볼 것", collapsi
|
|
|
1728
3091
|
return i ? /* @__PURE__ */ k("div", {
|
|
1729
3092
|
className: `follow-up-list ${o ?? ""}`.trim(),
|
|
1730
3093
|
...s,
|
|
1731
|
-
children: /* @__PURE__ */ k(
|
|
3094
|
+
children: /* @__PURE__ */ k(E, {
|
|
1732
3095
|
summary: n,
|
|
1733
3096
|
defaultOpen: a,
|
|
1734
3097
|
plain: !0,
|
|
@@ -1747,14 +3110,14 @@ function lt({ items: e, onAsk: t, label: n = "이어서 물어볼 것", collapsi
|
|
|
1747
3110
|
}
|
|
1748
3111
|
//#endregion
|
|
1749
3112
|
//#region src/foundation/josa.ts
|
|
1750
|
-
function
|
|
3113
|
+
function rn(e) {
|
|
1751
3114
|
let t = e.trimEnd().at(-1);
|
|
1752
3115
|
if (!t) return !0;
|
|
1753
3116
|
let n = t.charCodeAt(0);
|
|
1754
3117
|
return n < 44032 || n > 55203 || (n - 44032) % 28 != 0;
|
|
1755
3118
|
}
|
|
1756
|
-
function
|
|
1757
|
-
let n =
|
|
3119
|
+
function an(e, t) {
|
|
3120
|
+
let n = rn(e);
|
|
1758
3121
|
switch (t) {
|
|
1759
3122
|
case "이/가": return n ? "이" : "가";
|
|
1760
3123
|
case "을/를": return n ? "을" : "를";
|
|
@@ -1763,45 +3126,45 @@ function dt(e, t) {
|
|
|
1763
3126
|
case "으로/로": return n ? (e.trimEnd().charCodeAt(e.trimEnd().length - 1) - 44032) % 28 == 8 ? "로" : "으로" : "로";
|
|
1764
3127
|
}
|
|
1765
3128
|
}
|
|
1766
|
-
function
|
|
1767
|
-
return `${e}${
|
|
3129
|
+
function on(e, t) {
|
|
3130
|
+
return `${e}${an(e, t)}`;
|
|
1768
3131
|
}
|
|
1769
3132
|
//#endregion
|
|
1770
3133
|
//#region src/components/extended/KanbanColumn/KanbanColumn.tsx
|
|
1771
|
-
var
|
|
1772
|
-
function
|
|
1773
|
-
let _ =
|
|
1774
|
-
|
|
3134
|
+
var sn = "application/x-kanban-card";
|
|
3135
|
+
function cn({ title: e, cards: n, limit: a, onMove: o, onDropCard: s, onAdd: c, loading: l, loadingCards: u = 2, empty: d, error: f, neighbours: p, className: h, ...g }) {
|
|
3136
|
+
let _ = N(null), [v, y] = P(!1), [b, x] = P(""), S = N(null), [C, ee] = P(null), te = a !== void 0 && n.length > a;
|
|
3137
|
+
j(() => {
|
|
1775
3138
|
let e = S.current, t = _.current;
|
|
1776
3139
|
if (S.current = null, !e || !t || document.activeElement !== document.body) return;
|
|
1777
3140
|
let n = [...t.querySelectorAll(`[data-part="${e.part}"]`)];
|
|
1778
3141
|
(n[Math.min(e.at, n.length - 1)] ?? t.querySelector("[data-part=\"add\"]"))?.focus();
|
|
1779
3142
|
}, [n]);
|
|
1780
|
-
let
|
|
3143
|
+
let w = (e, t, n) => {
|
|
1781
3144
|
let r = n === -1 ? p?.back : p?.forward;
|
|
1782
|
-
x(r ? `${
|
|
3145
|
+
x(r ? `${on(e.title, "을/를")} ${on(r, "으로/로")} 옮겼습니다` : `${on(e.title, "을/를")} 옮겼습니다`), S.current = {
|
|
1783
3146
|
at: t,
|
|
1784
3147
|
part: n === -1 ? "back" : "forward"
|
|
1785
3148
|
}, o?.(e.id, n);
|
|
1786
|
-
},
|
|
1787
|
-
!s || !
|
|
3149
|
+
}, T = (e) => [...e.dataTransfer.types].includes(sn), E = (e) => {
|
|
3150
|
+
!s || !T(e) || (e.preventDefault(), y(!0));
|
|
1788
3151
|
};
|
|
1789
3152
|
return /* @__PURE__ */ A("section", {
|
|
1790
3153
|
...g,
|
|
1791
3154
|
className: `kanban-column ${h ?? ""}`.trim(),
|
|
1792
3155
|
"data-over": v ? "" : void 0,
|
|
1793
|
-
"data-past":
|
|
3156
|
+
"data-past": te ? "" : void 0,
|
|
1794
3157
|
ref: _,
|
|
1795
|
-
"aria-label": `${e} — ${f ? "불러오지 못했습니다" : l ? "불러오는 중" : `${n.length}장${
|
|
1796
|
-
onDragOver:
|
|
1797
|
-
onDragEnter:
|
|
3158
|
+
"aria-label": `${e} — ${f ? "불러오지 못했습니다" : l ? "불러오는 중" : `${n.length}장${te ? `, 한도 ${a}장 초과` : ""}`}`,
|
|
3159
|
+
onDragOver: E,
|
|
3160
|
+
onDragEnter: E,
|
|
1798
3161
|
onDragLeave: (e) => {
|
|
1799
3162
|
let t = e.relatedTarget;
|
|
1800
3163
|
t && e.currentTarget.contains(t) || y(!1);
|
|
1801
3164
|
},
|
|
1802
3165
|
onDrop: (e) => {
|
|
1803
3166
|
y(!1);
|
|
1804
|
-
let t = e.dataTransfer.getData(
|
|
3167
|
+
let t = e.dataTransfer.getData(sn);
|
|
1805
3168
|
t && s && (e.preventDefault(), s(t));
|
|
1806
3169
|
},
|
|
1807
3170
|
children: [
|
|
@@ -1826,7 +3189,7 @@ function pt({ title: e, cards: n, limit: a, onMove: o, onDropCard: s, onAdd: c,
|
|
|
1826
3189
|
children: a === void 0 ? n.length : `${n.length} / ${a}`
|
|
1827
3190
|
}),
|
|
1828
3191
|
c ? /* @__PURE__ */ k(t, {
|
|
1829
|
-
icon:
|
|
3192
|
+
icon: U,
|
|
1830
3193
|
label: `${e}에 카드 추가`,
|
|
1831
3194
|
size: "sm",
|
|
1832
3195
|
onClick: c,
|
|
@@ -1843,16 +3206,16 @@ function pt({ title: e, cards: n, limit: a, onMove: o, onDropCard: s, onAdd: c,
|
|
|
1843
3206
|
draggable: !!s,
|
|
1844
3207
|
"data-lifted": C === e.id ? "" : void 0,
|
|
1845
3208
|
onDragStart: (t) => {
|
|
1846
|
-
t.dataTransfer.setData(
|
|
3209
|
+
t.dataTransfer.setData(sn, e.id), t.dataTransfer.setData("text/plain", e.id), t.dataTransfer.effectAllowed = "move", ee(e.id);
|
|
1847
3210
|
},
|
|
1848
|
-
onDragEnd: () =>
|
|
3211
|
+
onDragEnd: () => ee(null),
|
|
1849
3212
|
children: [
|
|
1850
3213
|
s ? /* @__PURE__ */ k("span", {
|
|
1851
3214
|
className: "kanban-column__grip",
|
|
1852
3215
|
"aria-hidden": "true",
|
|
1853
3216
|
"data-part": "grip",
|
|
1854
3217
|
children: /* @__PURE__ */ k(r, {
|
|
1855
|
-
icon:
|
|
3218
|
+
icon: R,
|
|
1856
3219
|
size: "xs"
|
|
1857
3220
|
})
|
|
1858
3221
|
}) : null,
|
|
@@ -1872,18 +3235,18 @@ function pt({ title: e, cards: n, limit: a, onMove: o, onDropCard: s, onAdd: c,
|
|
|
1872
3235
|
className: "kanban-column__move",
|
|
1873
3236
|
"data-part": "move",
|
|
1874
3237
|
children: [/* @__PURE__ */ k(t, {
|
|
1875
|
-
icon:
|
|
1876
|
-
label: p?.back ? `${
|
|
3238
|
+
icon: L,
|
|
3239
|
+
label: p?.back ? `${on(e.title, "을/를")} ${on(p.back, "으로/로")} 옮기기` : `${e.title} 앞으로 옮기기`,
|
|
1877
3240
|
size: "sm",
|
|
1878
3241
|
disabled: !p?.back,
|
|
1879
|
-
onClick: () =>
|
|
3242
|
+
onClick: () => w(e, n, -1),
|
|
1880
3243
|
"data-part": "back"
|
|
1881
3244
|
}), /* @__PURE__ */ k(t, {
|
|
1882
|
-
icon:
|
|
1883
|
-
label: p?.forward ? `${
|
|
3245
|
+
icon: he,
|
|
3246
|
+
label: p?.forward ? `${on(e.title, "을/를")} ${on(p.forward, "으로/로")} 옮기기` : `${e.title} 뒤로 옮기기`,
|
|
1884
3247
|
size: "sm",
|
|
1885
3248
|
disabled: !p?.forward,
|
|
1886
|
-
onClick: () =>
|
|
3249
|
+
onClick: () => w(e, n, 1),
|
|
1887
3250
|
"data-part": "forward"
|
|
1888
3251
|
})]
|
|
1889
3252
|
}) : null
|
|
@@ -1907,7 +3270,7 @@ function pt({ title: e, cards: n, limit: a, onMove: o, onDropCard: s, onAdd: c,
|
|
|
1907
3270
|
className: "kanban-column__empty",
|
|
1908
3271
|
"data-part": "empty",
|
|
1909
3272
|
children: [/* @__PURE__ */ k(r, {
|
|
1910
|
-
icon:
|
|
3273
|
+
icon: U,
|
|
1911
3274
|
size: "sm",
|
|
1912
3275
|
"aria-hidden": "true"
|
|
1913
3276
|
}), d ?? "비어 있습니다"]
|
|
@@ -1917,20 +3280,20 @@ function pt({ title: e, cards: n, limit: a, onMove: o, onDropCard: s, onAdd: c,
|
|
|
1917
3280
|
className: "kanban-column__drop",
|
|
1918
3281
|
"data-part": "drop",
|
|
1919
3282
|
"aria-hidden": "true",
|
|
1920
|
-
children: [
|
|
3283
|
+
children: [on(e, "으로/로"), " 옮기기"]
|
|
1921
3284
|
}) : null
|
|
1922
3285
|
]
|
|
1923
3286
|
});
|
|
1924
3287
|
}
|
|
1925
3288
|
//#endregion
|
|
1926
3289
|
//#region src/components/extended/Message/Message.tsx
|
|
1927
|
-
var
|
|
3290
|
+
var ln = {
|
|
1928
3291
|
user: "나",
|
|
1929
3292
|
assistant: "어시스턴트",
|
|
1930
3293
|
system: "시스템"
|
|
1931
3294
|
};
|
|
1932
|
-
function
|
|
1933
|
-
let p = n ??
|
|
3295
|
+
function un({ children: e, role: t = "assistant", author: n, avatar: r, time: i, timeLabel: a, state: o = "sent", edited: s, actions: c, attachments: l, footer: u, className: d, ...f }) {
|
|
3296
|
+
let p = n ?? ln[t];
|
|
1934
3297
|
return /* @__PURE__ */ A("article", {
|
|
1935
3298
|
...f,
|
|
1936
3299
|
className: `message ${d ?? ""}`.trim(),
|
|
@@ -1988,13 +3351,13 @@ function ht({ children: e, role: t = "assistant", author: n, avatar: r, time: i,
|
|
|
1988
3351
|
}
|
|
1989
3352
|
//#endregion
|
|
1990
3353
|
//#region src/components/extended/MessageList/MessageList.tsx
|
|
1991
|
-
function
|
|
1992
|
-
let f =
|
|
3354
|
+
function dn({ children: e, loading: t, loadingMessages: n = 3, empty: i, error: a, streaming: o, label: s, threshold: c = 32, jumpLabel: l = "맨 아래로", className: u, ...d }) {
|
|
3355
|
+
let f = N(null), p = N(null), h = N(!0), g = N(!1), [_, v] = P(!1), y = ie(() => {
|
|
1993
3356
|
let e = f.current;
|
|
1994
3357
|
if (!e) return;
|
|
1995
3358
|
let t = e.scrollHeight - e.scrollTop - e.clientHeight;
|
|
1996
3359
|
g.current || (h.current = t <= c, v(!h.current));
|
|
1997
|
-
}, [c]), b =
|
|
3360
|
+
}, [c]), b = N(0), x = ie((e) => {
|
|
1998
3361
|
let t = f.current;
|
|
1999
3362
|
if (!t) return;
|
|
2000
3363
|
cancelAnimationFrame(b.current);
|
|
@@ -2015,7 +3378,7 @@ function gt({ children: e, loading: t, loadingMessages: n = 3, empty: i, error:
|
|
|
2015
3378
|
};
|
|
2016
3379
|
b.current = requestAnimationFrame(o);
|
|
2017
3380
|
}, [y]);
|
|
2018
|
-
return
|
|
3381
|
+
return j(() => {
|
|
2019
3382
|
let e = f.current;
|
|
2020
3383
|
if (!e) return;
|
|
2021
3384
|
let t = () => {
|
|
@@ -2029,7 +3392,7 @@ function gt({ children: e, loading: t, loadingMessages: n = 3, empty: i, error:
|
|
|
2029
3392
|
return () => {
|
|
2030
3393
|
for (let r of n) e.removeEventListener(r, t);
|
|
2031
3394
|
};
|
|
2032
|
-
}, []),
|
|
3395
|
+
}, []), j(() => {
|
|
2033
3396
|
let e = p.current;
|
|
2034
3397
|
if (!e) return;
|
|
2035
3398
|
let t = new ResizeObserver(() => {
|
|
@@ -2083,7 +3446,7 @@ function gt({ children: e, loading: t, loadingMessages: n = 3, empty: i, error:
|
|
|
2083
3446
|
},
|
|
2084
3447
|
"data-part": "jump",
|
|
2085
3448
|
children: [/* @__PURE__ */ k(r, {
|
|
2086
|
-
icon:
|
|
3449
|
+
icon: ce,
|
|
2087
3450
|
size: "sm",
|
|
2088
3451
|
"aria-hidden": "true"
|
|
2089
3452
|
}), l]
|
|
@@ -2092,16 +3455,16 @@ function gt({ children: e, loading: t, loadingMessages: n = 3, empty: i, error:
|
|
|
2092
3455
|
}
|
|
2093
3456
|
//#endregion
|
|
2094
3457
|
//#region src/components/extended/MetricCard/MetricCard.tsx
|
|
2095
|
-
var
|
|
2096
|
-
up:
|
|
2097
|
-
down:
|
|
2098
|
-
flat:
|
|
2099
|
-
},
|
|
3458
|
+
var fn = {
|
|
3459
|
+
up: de,
|
|
3460
|
+
down: le,
|
|
3461
|
+
flat: V
|
|
3462
|
+
}, pn = {
|
|
2100
3463
|
up: "증가",
|
|
2101
3464
|
down: "감소",
|
|
2102
3465
|
flat: "변화 없음"
|
|
2103
3466
|
};
|
|
2104
|
-
function
|
|
3467
|
+
function mn({ label: e, value: t, delta: n, compare: i, chart: a, loading: o, empty: s, error: c, className: l, ...u }) {
|
|
2105
3468
|
let d = n?.meaning ?? "neutral";
|
|
2106
3469
|
return /* @__PURE__ */ A("section", {
|
|
2107
3470
|
...u,
|
|
@@ -2142,14 +3505,14 @@ function yt({ label: e, value: t, delta: n, compare: i, chart: a, loading: o, em
|
|
|
2142
3505
|
"data-part": "delta",
|
|
2143
3506
|
children: [
|
|
2144
3507
|
/* @__PURE__ */ k(r, {
|
|
2145
|
-
icon:
|
|
3508
|
+
icon: fn[n.direction],
|
|
2146
3509
|
size: "xs",
|
|
2147
3510
|
"aria-hidden": "true"
|
|
2148
3511
|
}),
|
|
2149
3512
|
/* @__PURE__ */ k("span", { children: n.value }),
|
|
2150
3513
|
/* @__PURE__ */ k("span", {
|
|
2151
3514
|
className: "metric-card__said",
|
|
2152
|
-
children: ` ${
|
|
3515
|
+
children: ` ${pn[n.direction]}`
|
|
2153
3516
|
}),
|
|
2154
3517
|
i ? /* @__PURE__ */ k("span", {
|
|
2155
3518
|
className: "metric-card__compare",
|
|
@@ -2171,19 +3534,19 @@ function yt({ label: e, value: t, delta: n, compare: i, chart: a, loading: o, em
|
|
|
2171
3534
|
}
|
|
2172
3535
|
//#endregion
|
|
2173
3536
|
//#region src/components/extended/PriceDisplay/PriceDisplay.tsx
|
|
2174
|
-
var
|
|
3537
|
+
var hn = {
|
|
2175
3538
|
KRW: "원",
|
|
2176
3539
|
JPY: "엔",
|
|
2177
3540
|
CNY: "위안"
|
|
2178
3541
|
};
|
|
2179
|
-
function
|
|
3542
|
+
function gn(e, { locale: t = "ko-KR", currency: n = "KRW", affix: r = "word" } = {}) {
|
|
2180
3543
|
let i = new Intl.NumberFormat(t, {
|
|
2181
3544
|
style: "currency",
|
|
2182
3545
|
currency: n
|
|
2183
|
-
}).formatToParts(e), a =
|
|
3546
|
+
}).formatToParts(e), a = hn[n];
|
|
2184
3547
|
return r === "symbol" || !a ? i.map((e) => e.value).join("") : `${i.filter((e) => e.type !== "currency").map((e) => e.value).join("").trim()}${a}`;
|
|
2185
3548
|
}
|
|
2186
|
-
function
|
|
3549
|
+
function _n({ amount: e, was: t, currency: n = "KRW", locale: r = "ko-KR", affix: a = "word", size: o = "md", note: s, saving: c, label: l, className: u, ...d }) {
|
|
2187
3550
|
let f = t !== void 0 && t > e, p = f ? Math.floor((t - e) / t * 100) : 0;
|
|
2188
3551
|
return /* @__PURE__ */ A("p", {
|
|
2189
3552
|
...d,
|
|
@@ -2196,7 +3559,7 @@ function xt({ amount: e, was: t, currency: n = "KRW", locale: r = "ko-KR", affix
|
|
|
2196
3559
|
"data-part": "now",
|
|
2197
3560
|
children: [f ? /* @__PURE__ */ k(i, { children: "할인가 " }) : null, /* @__PURE__ */ k("data", {
|
|
2198
3561
|
value: e,
|
|
2199
|
-
children:
|
|
3562
|
+
children: gn(e, {
|
|
2200
3563
|
locale: r,
|
|
2201
3564
|
currency: n,
|
|
2202
3565
|
affix: a
|
|
@@ -2208,7 +3571,7 @@ function xt({ amount: e, was: t, currency: n = "KRW", locale: r = "ko-KR", affix
|
|
|
2208
3571
|
"data-part": "was",
|
|
2209
3572
|
children: [/* @__PURE__ */ k(i, { children: "원래 가격 " }), /* @__PURE__ */ k("data", {
|
|
2210
3573
|
value: t,
|
|
2211
|
-
children:
|
|
3574
|
+
children: gn(t, {
|
|
2212
3575
|
locale: r,
|
|
2213
3576
|
currency: n,
|
|
2214
3577
|
affix: a
|
|
@@ -2233,10 +3596,10 @@ function xt({ amount: e, was: t, currency: n = "KRW", locale: r = "ko-KR", affix
|
|
|
2233
3596
|
}
|
|
2234
3597
|
//#endregion
|
|
2235
3598
|
//#region src/components/extended/OrderSummary/OrderSummary.tsx
|
|
2236
|
-
function
|
|
3599
|
+
function vn({ lines: e, total: t, label: n, currency: r = "KRW", locale: i = "ko-KR", affix: a = "word", estimated: o, totalNote: s, totalLabel: c = "합계", estimateNote: l = "주소를 넣기 전이라 예상입니다", freeLabel: u = "무료", actions: d, className: f, ...p }) {
|
|
2237
3600
|
let m = (e, t) => {
|
|
2238
3601
|
if (t === "free") return u;
|
|
2239
|
-
let n =
|
|
3602
|
+
let n = gn(e, {
|
|
2240
3603
|
locale: i,
|
|
2241
3604
|
currency: r,
|
|
2242
3605
|
affix: a
|
|
@@ -2286,7 +3649,7 @@ function St({ lines: e, total: t, label: n, currency: r = "KRW", locale: i = "ko
|
|
|
2286
3649
|
className: "order-summary__amount",
|
|
2287
3650
|
children: /* @__PURE__ */ k("data", {
|
|
2288
3651
|
value: t,
|
|
2289
|
-
children:
|
|
3652
|
+
children: gn(t, {
|
|
2290
3653
|
locale: i,
|
|
2291
3654
|
currency: r,
|
|
2292
3655
|
affix: a
|
|
@@ -2302,7 +3665,7 @@ function St({ lines: e, total: t, label: n, currency: r = "KRW", locale: i = "ko
|
|
|
2302
3665
|
}
|
|
2303
3666
|
//#endregion
|
|
2304
3667
|
//#region src/components/extended/PaymentMethodSelector/PaymentMethodSelector.tsx
|
|
2305
|
-
function
|
|
3668
|
+
function yn({ methods: e, value: t, onValueChange: n, label: i, name: a = "paymentMethod", className: o, ...s }) {
|
|
2306
3669
|
let l = e.find((e) => e.id === t)?.disabled ? e.find((e) => !e.disabled)?.id : void 0;
|
|
2307
3670
|
return /* @__PURE__ */ A("fieldset", {
|
|
2308
3671
|
...s,
|
|
@@ -2362,7 +3725,7 @@ function Ct({ methods: e, value: t, onValueChange: n, label: i, name: a = "payme
|
|
|
2362
3725
|
}
|
|
2363
3726
|
//#endregion
|
|
2364
3727
|
//#region src/components/extended/PresenceBar/PresenceBar.tsx
|
|
2365
|
-
function
|
|
3728
|
+
function bn({ people: e, label: t, max: r = 5, size: i = "sm", following: a, onFollow: o, followLabel: s = "따라가기", aside: c, className: l, ...u }) {
|
|
2366
3729
|
let d = [...e].sort((e, t) => Number(!!t.you) - Number(!!e.you)), f = e.find((e) => e.id === a), p = d.map((e) => ({
|
|
2367
3730
|
id: e.id,
|
|
2368
3731
|
name: e.name,
|
|
@@ -2385,10 +3748,10 @@ function wt({ people: e, label: t, max: r = 5, size: i = "sm", following: a, onF
|
|
|
2385
3748
|
}),
|
|
2386
3749
|
o ? /* @__PURE__ */ k(ne, {
|
|
2387
3750
|
items: /* @__PURE__ */ A(O, { children: [
|
|
2388
|
-
/* @__PURE__ */ k(
|
|
3751
|
+
/* @__PURE__ */ k(D, {
|
|
2389
3752
|
value: f?.id ?? "",
|
|
2390
3753
|
onValueChange: (e) => o(e || null),
|
|
2391
|
-
children: d.filter((e) => !e.you).map((e) => /* @__PURE__ */ A(
|
|
3754
|
+
children: d.filter((e) => !e.you).map((e) => /* @__PURE__ */ A(S, {
|
|
2392
3755
|
value: e.id,
|
|
2393
3756
|
"data-part": `follow-${e.id}`,
|
|
2394
3757
|
children: [e.name, e.state === "idle" ? " — 자리 비움" : ""]
|
|
@@ -2396,7 +3759,7 @@ function wt({ people: e, label: t, max: r = 5, size: i = "sm", following: a, onF
|
|
|
2396
3759
|
}),
|
|
2397
3760
|
/* @__PURE__ */ k(te, {}),
|
|
2398
3761
|
/* @__PURE__ */ k(T, {
|
|
2399
|
-
icon:
|
|
3762
|
+
icon: ye,
|
|
2400
3763
|
disabled: !a,
|
|
2401
3764
|
onSelect: () => o(null),
|
|
2402
3765
|
"data-part": "unfollow",
|
|
@@ -2407,7 +3770,7 @@ function wt({ people: e, label: t, max: r = 5, size: i = "sm", following: a, onF
|
|
|
2407
3770
|
size: "sm",
|
|
2408
3771
|
variant: f ? "solid" : "outline",
|
|
2409
3772
|
tone: f ? "accent" : "neutral",
|
|
2410
|
-
iconStart:
|
|
3773
|
+
iconStart: ve,
|
|
2411
3774
|
"data-part": "follow",
|
|
2412
3775
|
children: f ? `${f.name} 따라가는 중` : s
|
|
2413
3776
|
})
|
|
@@ -2421,8 +3784,8 @@ function wt({ people: e, label: t, max: r = 5, size: i = "sm", following: a, onF
|
|
|
2421
3784
|
}
|
|
2422
3785
|
//#endregion
|
|
2423
3786
|
//#region src/components/extended/ProductCard/ProductCard.tsx
|
|
2424
|
-
function
|
|
2425
|
-
let b = p?.find((e) => e.id === m)?.image ?? c, x =
|
|
3787
|
+
function xn({ name: e, href: t, price: n, was: i, currency: a = "KRW", locale: o = "ko-KR", affix: s = "word", image: c, imageAlt: l, flag: d, soldOut: f, swatches: p, swatch: m, onSwatchChange: h, swatchLabel: g, meta: _, className: v, ...y }) {
|
|
3788
|
+
let b = p?.find((e) => e.id === m)?.image ?? c, x = M();
|
|
2426
3789
|
return /* @__PURE__ */ A("article", {
|
|
2427
3790
|
...y,
|
|
2428
3791
|
className: `product-card ${v ?? ""}`.trim(),
|
|
@@ -2439,7 +3802,7 @@ function Tt({ name: e, href: t, price: n, was: i, currency: a = "KRW", locale: o
|
|
|
2439
3802
|
className: "product-card__blank",
|
|
2440
3803
|
"aria-hidden": "true",
|
|
2441
3804
|
children: /* @__PURE__ */ k(r, {
|
|
2442
|
-
icon:
|
|
3805
|
+
icon: z,
|
|
2443
3806
|
size: "md"
|
|
2444
3807
|
})
|
|
2445
3808
|
}),
|
|
@@ -2468,7 +3831,7 @@ function Tt({ name: e, href: t, price: n, was: i, currency: a = "KRW", locale: o
|
|
|
2468
3831
|
children: e
|
|
2469
3832
|
})
|
|
2470
3833
|
}),
|
|
2471
|
-
/* @__PURE__ */ k(
|
|
3834
|
+
/* @__PURE__ */ k(_n, {
|
|
2472
3835
|
amount: n,
|
|
2473
3836
|
was: i,
|
|
2474
3837
|
currency: a,
|
|
@@ -2521,8 +3884,8 @@ function Tt({ name: e, href: t, price: n, was: i, currency: a = "KRW", locale: o
|
|
|
2521
3884
|
}
|
|
2522
3885
|
//#endregion
|
|
2523
3886
|
//#region src/components/extended/QuantityStepper/QuantityStepper.tsx
|
|
2524
|
-
function
|
|
2525
|
-
let m = d === void 0 && i !== void 0 && i <= 5, h = d ?? (m || d === void 0 && i !== void 0 && t >= i ? `재고 ${i}개` : void 0), g =
|
|
3887
|
+
function Sn({ value: t, onValueChange: n, label: r, stock: i, onRemove: a, removeLabel: o, pending: s, min: c = 1, size: l = "md", disabled: u, note: d, className: f, ...p }) {
|
|
3888
|
+
let m = d === void 0 && i !== void 0 && i <= 5, h = d ?? (m || d === void 0 && i !== void 0 && t >= i ? `재고 ${i}개` : void 0), g = N(null), _ = a ? () => {
|
|
2526
3889
|
let e = w(g.current);
|
|
2527
3890
|
a(), e();
|
|
2528
3891
|
} : void 0;
|
|
@@ -2543,7 +3906,7 @@ function Et({ value: t, onValueChange: n, label: r, stock: i, onRemove: a, remov
|
|
|
2543
3906
|
size: l,
|
|
2544
3907
|
disabled: u,
|
|
2545
3908
|
atFloor: _ ? {
|
|
2546
|
-
icon:
|
|
3909
|
+
icon: q,
|
|
2547
3910
|
label: o ?? `${r} 빼기`,
|
|
2548
3911
|
onPress: _,
|
|
2549
3912
|
tone: "danger"
|
|
@@ -2567,13 +3930,13 @@ function Et({ value: t, onValueChange: n, label: r, stock: i, onRemove: a, remov
|
|
|
2567
3930
|
}
|
|
2568
3931
|
//#endregion
|
|
2569
3932
|
//#region src/components/extended/ReasoningDisclosure/ReasoningDisclosure.tsx
|
|
2570
|
-
function
|
|
3933
|
+
function Cn({ children: e, state: t = "done", duration: n, summary: r, defaultOpen: i, className: a, ...o }) {
|
|
2571
3934
|
let s = r ?? (t === "thinking" ? `생각하는 중${n ? ` · ${n}` : "…"}` : n ? `${n} 동안 생각했습니다` : "생각 보기");
|
|
2572
|
-
return /* @__PURE__ */ k(
|
|
3935
|
+
return /* @__PURE__ */ k(E, {
|
|
2573
3936
|
...o,
|
|
2574
3937
|
className: `reasoning-disclosure ${a ?? ""}`.trim(),
|
|
2575
3938
|
"data-state": t,
|
|
2576
|
-
icon:
|
|
3939
|
+
icon: fe,
|
|
2577
3940
|
plain: !0,
|
|
2578
3941
|
defaultOpen: i,
|
|
2579
3942
|
summary: /* @__PURE__ */ k("span", {
|
|
@@ -2589,11 +3952,11 @@ function Dt({ children: e, state: t = "done", duration: n, summary: r, defaultOp
|
|
|
2589
3952
|
}
|
|
2590
3953
|
//#endregion
|
|
2591
3954
|
//#region src/components/extended/RecognitionFallback/RecognitionFallback.tsx
|
|
2592
|
-
var
|
|
3955
|
+
var wn = {
|
|
2593
3956
|
carried: "여기까지 들었습니다",
|
|
2594
3957
|
lost: "듣지 못했습니다"
|
|
2595
3958
|
};
|
|
2596
|
-
function
|
|
3959
|
+
function Tn({ reason: e, carried: t, detail: i, onRetry: a, onType: o, onDiscard: s, className: c, ...l }) {
|
|
2597
3960
|
let u = e === "carried" ? t ?? "" : "";
|
|
2598
3961
|
return /* @__PURE__ */ k("div", {
|
|
2599
3962
|
...l,
|
|
@@ -2607,7 +3970,7 @@ function kt({ reason: e, carried: t, detail: i, onRetry: a, onType: o, onDiscard
|
|
|
2607
3970
|
/* @__PURE__ */ k("p", {
|
|
2608
3971
|
className: "recognition-fallback__title",
|
|
2609
3972
|
"data-part": "title",
|
|
2610
|
-
children:
|
|
3973
|
+
children: wn[e]
|
|
2611
3974
|
}),
|
|
2612
3975
|
u ? /* @__PURE__ */ k("p", {
|
|
2613
3976
|
className: "recognition-fallback__carried",
|
|
@@ -2628,7 +3991,7 @@ function kt({ reason: e, carried: t, detail: i, onRetry: a, onType: o, onDiscard
|
|
|
2628
3991
|
onClick: () => o(u),
|
|
2629
3992
|
"data-part": "type",
|
|
2630
3993
|
children: [/* @__PURE__ */ k(r, {
|
|
2631
|
-
icon:
|
|
3994
|
+
icon: B,
|
|
2632
3995
|
size: "sm",
|
|
2633
3996
|
"aria-hidden": "true"
|
|
2634
3997
|
}), u ? "이어서 입력하기" : "입력으로 하기"]
|
|
@@ -2640,7 +4003,7 @@ function kt({ reason: e, carried: t, detail: i, onRetry: a, onType: o, onDiscard
|
|
|
2640
4003
|
onClick: a,
|
|
2641
4004
|
"data-part": "retry",
|
|
2642
4005
|
children: [/* @__PURE__ */ k(r, {
|
|
2643
|
-
icon:
|
|
4006
|
+
icon: Ce,
|
|
2644
4007
|
size: "sm",
|
|
2645
4008
|
"aria-hidden": "true"
|
|
2646
4009
|
}), "다시 말하기"]
|
|
@@ -2652,7 +4015,7 @@ function kt({ reason: e, carried: t, detail: i, onRetry: a, onType: o, onDiscard
|
|
|
2652
4015
|
onClick: s,
|
|
2653
4016
|
"data-part": "discard",
|
|
2654
4017
|
children: [/* @__PURE__ */ k(r, {
|
|
2655
|
-
icon:
|
|
4018
|
+
icon: q,
|
|
2656
4019
|
size: "sm",
|
|
2657
4020
|
"aria-hidden": "true"
|
|
2658
4021
|
}), "버리기"]
|
|
@@ -2665,22 +4028,22 @@ function kt({ reason: e, carried: t, detail: i, onRetry: a, onType: o, onDiscard
|
|
|
2665
4028
|
}
|
|
2666
4029
|
//#endregion
|
|
2667
4030
|
//#region src/components/extended/RunStatusCard/RunStatusCard.tsx
|
|
2668
|
-
var
|
|
4031
|
+
var En = {
|
|
2669
4032
|
queued: "대기 중",
|
|
2670
4033
|
running: "실행 중",
|
|
2671
4034
|
done: "완료",
|
|
2672
4035
|
failed: "실패",
|
|
2673
4036
|
cancelled: "취소됨"
|
|
2674
4037
|
};
|
|
2675
|
-
function
|
|
2676
|
-
let m = r === "running" || r === "queued", h =
|
|
4038
|
+
function Dn({ title: t, state: r, elapsed: a, progress: o, detail: c, onCancel: l, cancelLabel: u = "중지", actions: d, className: f, ...p }) {
|
|
4039
|
+
let m = r === "running" || r === "queued", h = M(), g = o ? r === "done" ? o.max : o.value : void 0, [y, b] = P({
|
|
2677
4040
|
status: "",
|
|
2678
4041
|
alert: ""
|
|
2679
|
-
}), x =
|
|
2680
|
-
|
|
4042
|
+
}), x = N(r);
|
|
4043
|
+
j(() => {
|
|
2681
4044
|
let e = x.current;
|
|
2682
4045
|
if (x.current = r, r === "running" || r === "queued" || e === r) return;
|
|
2683
|
-
let n = `${t} ${
|
|
4046
|
+
let n = `${t} ${En[r]}`;
|
|
2684
4047
|
b(r === "failed" ? {
|
|
2685
4048
|
status: "",
|
|
2686
4049
|
alert: n
|
|
@@ -2689,8 +4052,8 @@ function jt({ title: t, state: r, elapsed: a, progress: o, detail: c, onCancel:
|
|
|
2689
4052
|
alert: ""
|
|
2690
4053
|
});
|
|
2691
4054
|
}, [r, t]);
|
|
2692
|
-
let S =
|
|
2693
|
-
return
|
|
4055
|
+
let S = N(null), C = N(m);
|
|
4056
|
+
return j(() => {
|
|
2694
4057
|
let e = C.current && !m;
|
|
2695
4058
|
C.current = m, !(!e || document.activeElement !== document.body) && S.current?.focus();
|
|
2696
4059
|
}, [m]), /* @__PURE__ */ A("section", {
|
|
@@ -2718,7 +4081,7 @@ function jt({ title: t, state: r, elapsed: a, progress: o, detail: c, onCancel:
|
|
|
2718
4081
|
className: "run-status-card__mark",
|
|
2719
4082
|
"aria-hidden": "true",
|
|
2720
4083
|
children: [m ? /* @__PURE__ */ k(e, { size: "sm" }) : null, /* @__PURE__ */ k(_, {
|
|
2721
|
-
icon: m ? void 0 : r === "done" ?
|
|
4084
|
+
icon: m ? void 0 : r === "done" ? I : r === "failed" ? Y : ge,
|
|
2722
4085
|
tone: r === "done" ? "success" : r === "failed" ? "danger" : "neutral",
|
|
2723
4086
|
size: "sm",
|
|
2724
4087
|
"data-part": "glyph"
|
|
@@ -2738,7 +4101,7 @@ function jt({ title: t, state: r, elapsed: a, progress: o, detail: c, onCancel:
|
|
|
2738
4101
|
children: [
|
|
2739
4102
|
/* @__PURE__ */ k("span", {
|
|
2740
4103
|
"data-part": "state",
|
|
2741
|
-
children:
|
|
4104
|
+
children: En[r]
|
|
2742
4105
|
}),
|
|
2743
4106
|
a ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("span", {
|
|
2744
4107
|
"aria-hidden": "true",
|
|
@@ -2794,9 +4157,9 @@ function jt({ title: t, state: r, elapsed: a, progress: o, detail: c, onCancel:
|
|
|
2794
4157
|
}
|
|
2795
4158
|
//#endregion
|
|
2796
4159
|
//#region src/components/extended/SavedViewTabs/SavedViewTabs.tsx
|
|
2797
|
-
function
|
|
2798
|
-
let d =
|
|
2799
|
-
|
|
4160
|
+
function On({ views: e, value: t, onValueChange: n, label: i, panelId: a, menu: o, onAdd: s, addLabel: c = "보기 추가", className: l, ...u }) {
|
|
4161
|
+
let d = N(null), f = (e) => d.current?.querySelector(`[data-value="${CSS.escape(e)}"]`) ?? null;
|
|
4162
|
+
j(() => {
|
|
2800
4163
|
f(t)?.scrollIntoView({
|
|
2801
4164
|
block: "nearest",
|
|
2802
4165
|
inline: "nearest"
|
|
@@ -2872,7 +4235,7 @@ function Mt({ views: e, value: t, onValueChange: n, label: i, panelId: a, menu:
|
|
|
2872
4235
|
onClick: s,
|
|
2873
4236
|
"data-part": "add",
|
|
2874
4237
|
children: [/* @__PURE__ */ k(r, {
|
|
2875
|
-
icon:
|
|
4238
|
+
icon: U,
|
|
2876
4239
|
size: "sm",
|
|
2877
4240
|
"aria-hidden": "true"
|
|
2878
4241
|
}), c]
|
|
@@ -2881,8 +4244,8 @@ function Mt({ views: e, value: t, onValueChange: n, label: i, panelId: a, menu:
|
|
|
2881
4244
|
}
|
|
2882
4245
|
//#endregion
|
|
2883
4246
|
//#region src/components/extended/SourceChip/SourceChip.tsx
|
|
2884
|
-
function
|
|
2885
|
-
let [u, d] =
|
|
4247
|
+
function kn({ title: e, domain: t, href: n, index: r, favicon: a, compact: o, size: s = "md", className: c, ...l }) {
|
|
4248
|
+
let [u, d] = P(), f = u !== void 0 && u === a, p = [...t.replace(/^www\./, "")][0]?.toUpperCase() ?? "?";
|
|
2886
4249
|
return /* @__PURE__ */ A("a", {
|
|
2887
4250
|
...l,
|
|
2888
4251
|
className: `source-chip ${c ?? ""}`.trim(),
|
|
@@ -2931,9 +4294,9 @@ function Nt({ title: e, domain: t, href: n, index: r, favicon: a, compact: o, si
|
|
|
2931
4294
|
}
|
|
2932
4295
|
//#endregion
|
|
2933
4296
|
//#region src/components/extended/SourceChipRow/SourceChipRow.tsx
|
|
2934
|
-
var
|
|
2935
|
-
function
|
|
2936
|
-
let s =
|
|
4297
|
+
var An = 12;
|
|
4298
|
+
function jn({ sources: e, label: t, onOverflow: n, compact: r, size: i = "md", className: a, ...o }) {
|
|
4299
|
+
let s = N(null), [c, l] = P(e.length), u = ie(() => {
|
|
2937
4300
|
let e = s.current;
|
|
2938
4301
|
if (!e) return;
|
|
2939
4302
|
let t = [...e.querySelectorAll("[data-part=\"chip\"]")];
|
|
@@ -2954,12 +4317,12 @@ function Ft({ sources: e, label: t, onOverflow: n, compact: r, size: i = "md", c
|
|
|
2954
4317
|
e.index ?? "",
|
|
2955
4318
|
e.favicon ?? ""
|
|
2956
4319
|
].join("")).join("");
|
|
2957
|
-
|
|
4320
|
+
ae(u, [
|
|
2958
4321
|
u,
|
|
2959
4322
|
d,
|
|
2960
4323
|
r,
|
|
2961
4324
|
i
|
|
2962
|
-
]),
|
|
4325
|
+
]), j(() => {
|
|
2963
4326
|
let e = s.current;
|
|
2964
4327
|
if (!e) return;
|
|
2965
4328
|
let t = new ResizeObserver(u);
|
|
@@ -2976,7 +4339,7 @@ function Ft({ sources: e, label: t, onOverflow: n, compact: r, size: i = "md", c
|
|
|
2976
4339
|
children: [e.map((e) => /* @__PURE__ */ k("span", {
|
|
2977
4340
|
className: "source-chip-row__chip",
|
|
2978
4341
|
"data-part": "chip",
|
|
2979
|
-
children: /* @__PURE__ */ k(
|
|
4342
|
+
children: /* @__PURE__ */ k(kn, {
|
|
2980
4343
|
title: e.title,
|
|
2981
4344
|
domain: e.domain,
|
|
2982
4345
|
href: e.href,
|
|
@@ -3020,13 +4383,13 @@ function Ft({ sources: e, label: t, onOverflow: n, compact: r, size: i = "md", c
|
|
|
3020
4383
|
}
|
|
3021
4384
|
//#endregion
|
|
3022
4385
|
//#region src/components/extended/SourcePanel/SourcePanel.tsx
|
|
3023
|
-
function
|
|
4386
|
+
function Mn(e) {
|
|
3024
4387
|
return e.replace(/^www\./, "");
|
|
3025
4388
|
}
|
|
3026
|
-
function
|
|
4389
|
+
function Nn(e) {
|
|
3027
4390
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
3028
4391
|
for (let r of e) {
|
|
3029
|
-
let e =
|
|
4392
|
+
let e = Mn(r.domain);
|
|
3030
4393
|
n.has(e) || (n.set(e, []), t.push(e)), n.get(e).push(r);
|
|
3031
4394
|
}
|
|
3032
4395
|
return t.map((e) => ({
|
|
@@ -3034,8 +4397,8 @@ function Lt(e) {
|
|
|
3034
4397
|
items: n.get(e)
|
|
3035
4398
|
}));
|
|
3036
4399
|
}
|
|
3037
|
-
function
|
|
3038
|
-
let [s, c] =
|
|
4400
|
+
function Pn({ sources: e, label: t, found: n, group: r = !0, empty: i = "인용한 근거가 없습니다.", className: a, ...o }) {
|
|
4401
|
+
let [s, c] = P({}), l = Nn(e), u = M();
|
|
3039
4402
|
return /* @__PURE__ */ A("section", {
|
|
3040
4403
|
...o,
|
|
3041
4404
|
className: `source-panel ${a ?? ""}`.trim(),
|
|
@@ -3160,7 +4523,7 @@ function Rt({ sources: e, label: t, found: n, group: r = !0, empty: i = "인용
|
|
|
3160
4523
|
}
|
|
3161
4524
|
//#endregion
|
|
3162
4525
|
//#region src/components/extended/StreamingText/StreamingText.tsx
|
|
3163
|
-
function
|
|
4526
|
+
function Fn({ text: e, done: t, placeholder: n, caret: r = !0, className: i, ...a }) {
|
|
3164
4527
|
return /* @__PURE__ */ A("p", {
|
|
3165
4528
|
...a,
|
|
3166
4529
|
className: `streaming-text ${i ?? ""}`.trim(),
|
|
@@ -3182,13 +4545,13 @@ function zt({ text: e, done: t, placeholder: n, caret: r = !0, className: i, ...
|
|
|
3182
4545
|
}
|
|
3183
4546
|
//#endregion
|
|
3184
4547
|
//#region src/components/extended/ToolCallCard/ToolCallCard.tsx
|
|
3185
|
-
var
|
|
4548
|
+
var In = {
|
|
3186
4549
|
pending: "대기 중",
|
|
3187
4550
|
running: "실행 중",
|
|
3188
4551
|
success: "성공",
|
|
3189
4552
|
error: "실패"
|
|
3190
4553
|
};
|
|
3191
|
-
function
|
|
4554
|
+
function Ln({ name: t, state: n, args: i, result: a, error: o, duration: s, summary: c, actions: l, defaultOpen: u, open: d, onOpenChange: f, className: p, ...m }) {
|
|
3192
4555
|
let h = (e) => e != null && e !== !1, g = h(c) || h(i) || h(a) || h(o) || h(l), _ = /* @__PURE__ */ A("span", {
|
|
3193
4556
|
className: "tool-call-card__head",
|
|
3194
4557
|
children: [
|
|
@@ -3196,13 +4559,13 @@ function Vt({ name: t, state: n, args: i, result: a, error: o, duration: s, summ
|
|
|
3196
4559
|
className: "tool-call-card__mark",
|
|
3197
4560
|
"aria-hidden": "true",
|
|
3198
4561
|
children: n === "running" ? /* @__PURE__ */ k(e, { size: "sm" }) : n === "success" ? /* @__PURE__ */ k(r, {
|
|
3199
|
-
icon:
|
|
4562
|
+
icon: I,
|
|
3200
4563
|
size: "xs"
|
|
3201
4564
|
}) : n === "error" ? /* @__PURE__ */ k(r, {
|
|
3202
|
-
icon:
|
|
4565
|
+
icon: se,
|
|
3203
4566
|
size: "xs"
|
|
3204
4567
|
}) : /* @__PURE__ */ k(r, {
|
|
3205
|
-
icon:
|
|
4568
|
+
icon: K,
|
|
3206
4569
|
size: "xs"
|
|
3207
4570
|
})
|
|
3208
4571
|
}),
|
|
@@ -3212,7 +4575,7 @@ function Vt({ name: t, state: n, args: i, result: a, error: o, duration: s, summ
|
|
|
3212
4575
|
}),
|
|
3213
4576
|
/* @__PURE__ */ k("span", {
|
|
3214
4577
|
className: "tool-call-card__state",
|
|
3215
|
-
children:
|
|
4578
|
+
children: In[n]
|
|
3216
4579
|
}),
|
|
3217
4580
|
s ? /* @__PURE__ */ k("span", {
|
|
3218
4581
|
className: "tool-call-card__duration",
|
|
@@ -3266,7 +4629,7 @@ function Vt({ name: t, state: n, args: i, result: a, error: o, duration: s, summ
|
|
|
3266
4629
|
}) : null
|
|
3267
4630
|
]
|
|
3268
4631
|
});
|
|
3269
|
-
return g ? /* @__PURE__ */ k(
|
|
4632
|
+
return g ? /* @__PURE__ */ k(E, {
|
|
3270
4633
|
...m,
|
|
3271
4634
|
className: `tool-call-card ${p ?? ""}`.trim(),
|
|
3272
4635
|
"data-state": n,
|
|
@@ -3284,9 +4647,9 @@ function Vt({ name: t, state: n, args: i, result: a, error: o, duration: s, summ
|
|
|
3284
4647
|
}
|
|
3285
4648
|
//#endregion
|
|
3286
4649
|
//#region src/components/extended/TranscriptSync/TranscriptSync.tsx
|
|
3287
|
-
function
|
|
3288
|
-
let d =
|
|
3289
|
-
return
|
|
4650
|
+
function Rn({ segments: e, currentTime: t, onSeek: i, label: a, loading: o, empty: s, error: c, className: l, ...u }) {
|
|
4651
|
+
let d = N(null), [f, p] = P(!0), h = N(-1), g = e.findIndex((e) => e.start !== void 0 && e.end !== void 0 && t >= e.start && t < e.end);
|
|
4652
|
+
return j(() => {
|
|
3290
4653
|
g < 0 || (h.current = g, f && (d.current?.querySelector(`[data-index="${g}"]`))?.scrollIntoView({
|
|
3291
4654
|
block: "nearest",
|
|
3292
4655
|
behavior: "auto"
|
|
@@ -3365,7 +4728,7 @@ function Ht({ segments: e, currentTime: t, onSeek: i, label: a, loading: o, empt
|
|
|
3365
4728
|
onClick: () => p(!0),
|
|
3366
4729
|
"data-part": "follow",
|
|
3367
4730
|
children: [/* @__PURE__ */ k(r, {
|
|
3368
|
-
icon:
|
|
4731
|
+
icon: F,
|
|
3369
4732
|
size: "sm",
|
|
3370
4733
|
"aria-hidden": "true"
|
|
3371
4734
|
}), "지금 말하는 곳으로"]
|
|
@@ -3374,7 +4737,7 @@ function Ht({ segments: e, currentTime: t, onSeek: i, label: a, loading: o, empt
|
|
|
3374
4737
|
}
|
|
3375
4738
|
//#endregion
|
|
3376
4739
|
//#region src/components/extended/TrustBlock/TrustBlock.tsx
|
|
3377
|
-
function
|
|
4740
|
+
function zn({ points: e, label: t, layout: n = "stack", size: i = "md", align: a = "start", className: o, ...s }) {
|
|
3378
4741
|
return /* @__PURE__ */ k("ul", {
|
|
3379
4742
|
...s,
|
|
3380
4743
|
className: `trust-block ${o ?? ""}`.trim(),
|
|
@@ -3405,7 +4768,7 @@ function Ut({ points: e, label: t, layout: n = "stack", size: i = "md", align: a
|
|
|
3405
4768
|
}
|
|
3406
4769
|
//#endregion
|
|
3407
4770
|
//#region src/components/extended/VoiceControlBar/VoiceControlBar.tsx
|
|
3408
|
-
function
|
|
4771
|
+
function Bn({ label: e, state: i, levels: a, elapsed: o, muted: s, onMuteChange: c, onEnd: l, device: u, deviceProblem: d, placement: p = "inline", children: m, className: h, ...g }) {
|
|
3409
4772
|
return /* @__PURE__ */ A("div", {
|
|
3410
4773
|
...g,
|
|
3411
4774
|
className: `voice-control-bar ${h ?? ""}`.trim(),
|
|
@@ -3450,7 +4813,7 @@ function Wt({ label: e, state: i, levels: a, elapsed: o, muted: s, onMuteChange:
|
|
|
3450
4813
|
children: [
|
|
3451
4814
|
m,
|
|
3452
4815
|
c ? /* @__PURE__ */ k(t, {
|
|
3453
|
-
icon: s ?
|
|
4816
|
+
icon: s ? xe : be,
|
|
3454
4817
|
label: "마이크 음소거",
|
|
3455
4818
|
variant: s ? "solid" : "outline",
|
|
3456
4819
|
tone: s ? "danger" : "neutral",
|
|
@@ -3466,7 +4829,7 @@ function Wt({ label: e, state: i, levels: a, elapsed: o, muted: s, onMuteChange:
|
|
|
3466
4829
|
onClick: l,
|
|
3467
4830
|
"data-part": "end",
|
|
3468
4831
|
children: [/* @__PURE__ */ k(r, {
|
|
3469
|
-
icon:
|
|
4832
|
+
icon: H,
|
|
3470
4833
|
size: "sm",
|
|
3471
4834
|
"aria-hidden": "true"
|
|
3472
4835
|
}), "통화 끝내기"]
|
|
@@ -3477,6 +4840,6 @@ function Wt({ label: e, state: i, levels: a, elapsed: o, muted: s, onMuteChange:
|
|
|
3477
4840
|
});
|
|
3478
4841
|
}
|
|
3479
4842
|
//#endregion
|
|
3480
|
-
export {
|
|
4843
|
+
export { Xt as A, pt as B, un as C, Qt as D, tn as E, Dt as F, wt as I, Ct as L, Rt as M, At as N, en as O, kt as P, St as R, dn as S, nn as T, yn as _, Fn as a, gn as b, jn as c, Dn as d, Tn as f, bn as g, xn as h, Ln as i, Gt as j, Zt as k, kn as l, Sn as m, zn as n, Pn as o, Cn as p, Rn as r, An as s, Bn as t, On as u, vn as v, cn as w, mn as x, _n as y, gt as z };
|
|
3481
4844
|
|
|
3482
|
-
//# sourceMappingURL=VoiceControlBar-
|
|
4845
|
+
//# sourceMappingURL=VoiceControlBar-lMPuJMcF.js.map
|