@lucian-seo/lucian-ui 0.1.4 → 0.2.1
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-Bx016mmz.js} +1776 -409
- package/dist/lib/VoiceControlBar-Bx016mmz.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 +131 -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 ue, ArrowUp as de, ArrowUpRight as fe, Brain as F, Check as I, CheckCircle2 as pe, ChevronDown as me, ChevronLeft as he, ChevronRight as ge, CircleSlash as _e, CornerDownRight as ve, Eye as ye, EyeOff as be, GripVertical as L, ImageOff as xe, Keyboard as R, Mic as z, MicOff as Se, Minus as Ce, MoreHorizontal as we, PhoneOff as Te, Plus as B, RotateCcw as V, Search as Ee, ShieldAlert as H, ShieldCheck as De, ShieldX as Oe, SlidersHorizontal as ke, Square as U, Tag as W, Terminal as Ae, ThumbsDown as G, ThumbsUp as je, Trash2 as K, Upload as Me, X as q, XCircle as J } from "lucide-react";
|
|
10
|
+
import { aggregationFn_count as Ne, aggregationFn_extent as Pe, aggregationFn_first as Y, aggregationFn_last as Fe, aggregationFn_max as Ie, aggregationFn_mean as X, aggregationFn_median as Le, aggregationFn_min as Re, aggregationFn_sum as Z, aggregationFn_unique as ze, aggregationFn_uniqueCount as Q, 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: Ce,
|
|
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: J
|
|
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: q,
|
|
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: q,
|
|
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" ? De : m === "denied" ? Oe : H,
|
|
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: U,
|
|
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: de,
|
|
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: W,
|
|
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: q,
|
|
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,1524 @@ 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: Z,
|
|
913
|
+
min: Re,
|
|
914
|
+
max: Ie,
|
|
915
|
+
mean: X,
|
|
916
|
+
median: Le,
|
|
917
|
+
count: Ne,
|
|
918
|
+
uniqueCount: Q,
|
|
919
|
+
first: Y,
|
|
920
|
+
last: Fe,
|
|
921
|
+
extent: Pe,
|
|
922
|
+
unique: ze
|
|
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), [ue, fe] = P(null), [F, I] = P(null), pe = N(F);
|
|
1012
|
+
pe.current = F;
|
|
1013
|
+
let [he, _e] = P(""), [ve, ye] = P(null), [be, L] = P(null), xe = 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]), Se = a("rowSelection"), Ce = Se || a("rowPinning"), Te = 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 Ce && 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
|
+
Ce,
|
|
1073
|
+
i.renderDetail,
|
|
1074
|
+
C.expanded
|
|
1075
|
+
]), B = lt({
|
|
1076
|
+
features: Lt,
|
|
1077
|
+
data: R,
|
|
1078
|
+
columns: Te,
|
|
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: Se,
|
|
1135
|
+
enableCellSelection: a("cellSelection"),
|
|
1136
|
+
enableCellSpanning: a("cellSpanning"),
|
|
1137
|
+
globalFilterFn: a("fuzzySearch") ? "fuzzy" : "includesString",
|
|
1138
|
+
autoResetPageIndex: !1,
|
|
1139
|
+
autoResetExpanded: !1,
|
|
1140
|
+
autoResetCellSelection: !1
|
|
1141
|
+
}), V = [
|
|
1142
|
+
...B.getStartVisibleLeafColumns(),
|
|
1143
|
+
...B.getCenterVisibleLeafColumns(),
|
|
1144
|
+
...B.getEndVisibleLeafColumns()
|
|
1145
|
+
], H = B.getCenterVisibleLeafColumns(), De = B.getTopRows(), Oe = B.getBottomRows(), U = B.getCenterRows(), W = [
|
|
1146
|
+
...De,
|
|
1147
|
+
...U,
|
|
1148
|
+
...Oe
|
|
1149
|
+
], Ae = (e) => e.getIsGrouped() ? e.getLeafRows() : [e], G = new Set(C.selectedKeys), je = (e) => Ae(e).every((e) => G.has(e.id)), K = (e) => !je(e) && Ae(e).some((e) => G.has(e.id)), Me = [...new Set(B.getRowModel().rows.flatMap((e) => Ae(e).map((e) => e.id)))], q = Me.length > 0 && Me.every((e) => G.has(e)), J = Me.some((e) => G.has(e)), Ne = (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
|
+
}), Pe = (e) => {
|
|
1154
|
+
e.getIsGrouped() ? Ne(Ae(e).map((e) => e.id), je(e)) : e.toggleSelected();
|
|
1155
|
+
}, Y = new Map(W.map((e, t) => [e.id, t])), Fe = B.getHeaderGroups().length, Ie = !!(i.getSubRows || i.renderDetail || C.grouping.length), X = Fe + +!!a("filtering"), Le = a("aggregation") || e.columns.some((e) => e.footer), Re = !!e.error && e.retainRowsOnError && e.rows.length > 0, Z = Re ? "rows" : Nt(!!e.error, !!e.loading, W.length), ze = Le && Z === "rows", Q = e.virtualize !== !1 && Z === "rows", Be = a("columnVirtualization") && Z === "rows", Ve = (e) => !!i.renderDetail && e.getIsExpanded() && !e.getIsGrouped() && e.subRows.length === 0, He = /* @__PURE__ */ new Map(), Ue = 0;
|
|
1156
|
+
for (let e of W) He.set(e.id, Ue), Ve(e) && Ue++;
|
|
1157
|
+
let We = a("pagination") ? C.pagination.pageIndex * C.pagination.pageSize : 0, Ge = s ? W : B.getPrePaginatedRowModel().rows, Ke = Ge.filter(Ve).length, qe = s ? 0 : Ge.slice(0, We).filter(Ve).length, Je = X + (Z === "loading" ? e.loadingRows ?? 5 : Z === "rows" ? (s ? i.rowCount ?? W.length : B.getRowCount()) + Ke : 0) + +!!ze, Ye = a("cellSpanning") ? B.getCellSpanIndex() : null, Xe = /* @__PURE__ */ new Set();
|
|
1158
|
+
for (let e of [
|
|
1159
|
+
F?.rowId,
|
|
1160
|
+
se,
|
|
1161
|
+
W[D.row]?.id
|
|
1162
|
+
]) {
|
|
1163
|
+
let t = U.findIndex((t) => t.id === e);
|
|
1164
|
+
t >= 0 && Xe.add(t);
|
|
1165
|
+
}
|
|
1166
|
+
let Ze = dt({
|
|
1167
|
+
count: U.length,
|
|
1168
|
+
getScrollElement: () => u.current,
|
|
1169
|
+
getItemKey: (e) => U[e].id,
|
|
1170
|
+
estimateSize: (e) => Ve(U[e]) ? y.row * 3 : y.row,
|
|
1171
|
+
enabled: Q,
|
|
1172
|
+
overscan: 5,
|
|
1173
|
+
rangeExtractor: (e) => {
|
|
1174
|
+
let t = /* @__PURE__ */ new Set([...ut(e), ...Xe]);
|
|
1175
|
+
if (Ye) {
|
|
1176
|
+
let n = De.length;
|
|
1177
|
+
for (let r of Object.values(Ye.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 < U.length && t.add(e);
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
return [...t].filter((e) => e >= 0 && e < U.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 && xe.current.set(n, t), t;
|
|
1190
|
+
}
|
|
1191
|
+
}), Qe = /* @__PURE__ */ new Set();
|
|
1192
|
+
if (Ye) {
|
|
1193
|
+
for (let e of Ye.colSpans) if (e) {
|
|
1194
|
+
for (let t = 0; t < e.length; t++) if (e[t] > 1) {
|
|
1195
|
+
let e = V[t]?.id, n = H.findIndex((t) => t.id === e);
|
|
1196
|
+
n >= 0 && Qe.add(n);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
let $e = dt({
|
|
1201
|
+
count: H.length,
|
|
1202
|
+
horizontal: !0,
|
|
1203
|
+
getScrollElement: () => u.current,
|
|
1204
|
+
getItemKey: (e) => H[e].id,
|
|
1205
|
+
estimateSize: (e) => H[e].getSize(),
|
|
1206
|
+
enabled: Be,
|
|
1207
|
+
overscan: 2,
|
|
1208
|
+
scrollMargin: B.getStartTotalSize(),
|
|
1209
|
+
scrollPaddingStart: B.getStartTotalSize(),
|
|
1210
|
+
scrollPaddingEnd: B.getEndTotalSize(),
|
|
1211
|
+
rangeExtractor: (e) => [.../* @__PURE__ */ new Set([
|
|
1212
|
+
...ut(e),
|
|
1213
|
+
...Qe,
|
|
1214
|
+
H.findIndex((e) => e.id === V[D.column]?.id),
|
|
1215
|
+
H.findIndex((e) => e.id === ue),
|
|
1216
|
+
H.findIndex((e) => e.id === F?.columnId)
|
|
1217
|
+
])].filter((e) => e >= 0 && e < H.length).sort((e, t) => e - t)
|
|
1218
|
+
}), tt = new Set(Be ? $e.getVirtualItems().map((e) => H[e.index].id) : H.map((e) => e.id));
|
|
1219
|
+
for (let e of V) e.getIsPinned() && tt.add(e.id);
|
|
1220
|
+
let nt = Q ? Ze.getVirtualItems().map((e) => ({
|
|
1221
|
+
row: U[e.index],
|
|
1222
|
+
index: e.index,
|
|
1223
|
+
offset: e.start - y.head - y.top
|
|
1224
|
+
})) : U.map((e, t) => ({
|
|
1225
|
+
row: e,
|
|
1226
|
+
index: t,
|
|
1227
|
+
offset: 0
|
|
1228
|
+
}));
|
|
1229
|
+
j(() => {
|
|
1230
|
+
let e = () => {
|
|
1231
|
+
let e = f.current?.querySelector("[data-dg=\"row\"]"), t = {
|
|
1232
|
+
head: h.current?.getBoundingClientRect().height ?? 0,
|
|
1233
|
+
top: g.current?.getBoundingClientRect().height ?? 0,
|
|
1234
|
+
bottom: _.current?.getBoundingClientRect().height ?? 0,
|
|
1235
|
+
foot: v.current?.getBoundingClientRect().height ?? 0,
|
|
1236
|
+
row: e && parseFloat(getComputedStyle(e).minBlockSize) || 36
|
|
1237
|
+
};
|
|
1238
|
+
b((e) => Object.keys(t).every((n) => t[n] === e[n]) ? e : t), Ze.measure();
|
|
1239
|
+
};
|
|
1240
|
+
e();
|
|
1241
|
+
let t = new ResizeObserver(e);
|
|
1242
|
+
for (let e of [
|
|
1243
|
+
h.current,
|
|
1244
|
+
g.current,
|
|
1245
|
+
_.current,
|
|
1246
|
+
v.current
|
|
1247
|
+
]) e && t.observe(e);
|
|
1248
|
+
return () => t.disconnect();
|
|
1249
|
+
}, [
|
|
1250
|
+
e.density,
|
|
1251
|
+
X,
|
|
1252
|
+
C.grouping.length,
|
|
1253
|
+
De.length,
|
|
1254
|
+
Oe.length,
|
|
1255
|
+
Le,
|
|
1256
|
+
Z,
|
|
1257
|
+
Ze
|
|
1258
|
+
]), j(() => {
|
|
1259
|
+
$e.measure();
|
|
1260
|
+
}, [
|
|
1261
|
+
C.columnSizes,
|
|
1262
|
+
C.columnOrder,
|
|
1263
|
+
C.hiddenColumns,
|
|
1264
|
+
C.columnPinning,
|
|
1265
|
+
$e
|
|
1266
|
+
]), j(() => {
|
|
1267
|
+
ie((e) => {
|
|
1268
|
+
let t = jt(e, {
|
|
1269
|
+
rows: W.length,
|
|
1270
|
+
columns: V.length
|
|
1271
|
+
});
|
|
1272
|
+
for (let e = 0; e < W.length + V.length; e++) {
|
|
1273
|
+
let e = W[t.row]?.getVisibleCells().find((e) => e.column.id === V[t.column]?.id);
|
|
1274
|
+
if (!e?.getIsCovered()) break;
|
|
1275
|
+
if (e.getRowSpan() === 0 && t.row > 0) t.row--;
|
|
1276
|
+
else if (t.column > 0) t.column--;
|
|
1277
|
+
else break;
|
|
1278
|
+
}
|
|
1279
|
+
return t.row === e.row && t.column === e.column ? e : t;
|
|
1280
|
+
});
|
|
1281
|
+
}, [
|
|
1282
|
+
W.length,
|
|
1283
|
+
V.length,
|
|
1284
|
+
R,
|
|
1285
|
+
Te,
|
|
1286
|
+
C.sorting,
|
|
1287
|
+
C.filters,
|
|
1288
|
+
C.grouping,
|
|
1289
|
+
C.columnOrder,
|
|
1290
|
+
C.columnPinning
|
|
1291
|
+
]), j(() => {
|
|
1292
|
+
if (!s && a("pagination")) {
|
|
1293
|
+
let e = Math.max(0, B.getPageCount() - 1);
|
|
1294
|
+
C.pagination.pageIndex > e && B.setPageIndex(e);
|
|
1295
|
+
}
|
|
1296
|
+
}, [
|
|
1297
|
+
R,
|
|
1298
|
+
C.filters,
|
|
1299
|
+
C.search,
|
|
1300
|
+
C.grouping,
|
|
1301
|
+
C.pagination.pageIndex,
|
|
1302
|
+
s,
|
|
1303
|
+
i.pagination,
|
|
1304
|
+
B
|
|
1305
|
+
]), j(() => {
|
|
1306
|
+
F && (Z !== "rows" || !W.some((e) => e.id === F.rowId) || !V.some((e) => e.id === F.columnId)) && (pe.current = null, I(null));
|
|
1307
|
+
}, [
|
|
1308
|
+
F,
|
|
1309
|
+
W,
|
|
1310
|
+
V,
|
|
1311
|
+
Z
|
|
1312
|
+
]), j(() => {
|
|
1313
|
+
if (!ae.current) return;
|
|
1314
|
+
let e = W[D.row], t = V[D.column];
|
|
1315
|
+
if (!e || !t) return;
|
|
1316
|
+
let n = U.findIndex((t) => t.id === e.id);
|
|
1317
|
+
Q && n >= 0 && Ze.scrollToIndex(n, { align: "auto" });
|
|
1318
|
+
let r = H.findIndex((e) => e.id === t.id);
|
|
1319
|
+
Be && r >= 0 && $e.scrollToIndex(r, { align: "auto" });
|
|
1320
|
+
let i = [...f.current?.querySelectorAll("[role=\"gridcell\"]") ?? []].find((n) => n.dataset.rowId === e.id && n.dataset.columnId === t.id);
|
|
1321
|
+
i && (i.querySelector("[data-dg=\"editor\"]") || i.focus({ preventScroll: !0 }), ae.current = !1);
|
|
1322
|
+
}, [
|
|
1323
|
+
D,
|
|
1324
|
+
nt,
|
|
1325
|
+
V,
|
|
1326
|
+
W,
|
|
1327
|
+
U,
|
|
1328
|
+
H,
|
|
1329
|
+
Q,
|
|
1330
|
+
Be,
|
|
1331
|
+
Ze,
|
|
1332
|
+
$e
|
|
1333
|
+
]);
|
|
1334
|
+
let rt = (t, n) => {
|
|
1335
|
+
t.getIsGrouped() || !n.editable || !e.onCellCommit || e.cellState?.(t.original.data, n)?.pending || I({
|
|
1336
|
+
rowId: t.id,
|
|
1337
|
+
columnId: n.id,
|
|
1338
|
+
draft: e.cellState?.(t.original.data, n)?.draft ?? n.value?.(t.original.data) ?? String(Ht(n, t.original.data) ?? "")
|
|
1339
|
+
});
|
|
1340
|
+
}, it = (t, n = !1) => {
|
|
1341
|
+
let r = pe.current;
|
|
1342
|
+
if (r) {
|
|
1343
|
+
if (pe.current = null, I(null), t) {
|
|
1344
|
+
let t = W.find((e) => e.id === r.rowId);
|
|
1345
|
+
t && e.onCellCommit?.(t.original.data, r.columnId, r.draft);
|
|
1346
|
+
}
|
|
1347
|
+
n && (ae.current = !0, ie((e) => ({ ...e })));
|
|
1348
|
+
}
|
|
1349
|
+
};
|
|
1350
|
+
j(() => {
|
|
1351
|
+
if (!ve) return;
|
|
1352
|
+
let e = z.get(ve.columnId);
|
|
1353
|
+
if (!e || !V.some((e) => e.id === ve.columnId)) return;
|
|
1354
|
+
let t = B.getPrePaginatedRowModel().rows.findIndex((e) => e.id === ve.rowId);
|
|
1355
|
+
if (t < 0) {
|
|
1356
|
+
_e("입력 복구 대상을 표시하려면 검색 조건을 해제하세요."), ye(null);
|
|
1357
|
+
return;
|
|
1358
|
+
}
|
|
1359
|
+
let n = Math.floor(t / C.pagination.pageSize);
|
|
1360
|
+
if (!s && a("pagination") && n !== C.pagination.pageIndex) {
|
|
1361
|
+
B.setPageIndex(n);
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1364
|
+
let r = W.find((e) => e.id === ve.rowId);
|
|
1365
|
+
r && (rt(r, e), ae.current = !0, ie({
|
|
1366
|
+
row: Y.get(r.id) ?? 0,
|
|
1367
|
+
column: V.findIndex((t) => t.id === e.id)
|
|
1368
|
+
}), ye(null));
|
|
1369
|
+
}, [
|
|
1370
|
+
ve,
|
|
1371
|
+
C.expanded,
|
|
1372
|
+
C.pagination,
|
|
1373
|
+
V,
|
|
1374
|
+
W,
|
|
1375
|
+
B,
|
|
1376
|
+
s
|
|
1377
|
+
]);
|
|
1378
|
+
let at = (e, t) => {
|
|
1379
|
+
let n = V.map((e) => e.id).filter((t) => t !== e);
|
|
1380
|
+
n.splice(Math.max(0, n.indexOf(t)), 0, e), B.setColumnOrder(n);
|
|
1381
|
+
}, ot = (e, t) => {
|
|
1382
|
+
let n = V.map((e) => e.id), r = n.indexOf(e), i = r + t;
|
|
1383
|
+
i < 0 || i >= n.length || n[i] === $ || ([n[r], n[i]] = [n[i], n[r]], B.setColumnOrder(n));
|
|
1384
|
+
}, st = () => B.getSelectedCellRangesData().map((e) => e.map((e) => e.map((e) => String(e ?? "").replace(/[\t\r\n]+/g, " ")).join(" ")).join("\n")).join("\n\n"), ct = (t) => {
|
|
1385
|
+
let n = t.target;
|
|
1386
|
+
if (!(n instanceof HTMLElement) || !n.matches("[role=\"gridcell\"]") || n.closest(l) !== t.currentTarget || F) return;
|
|
1387
|
+
let r = Y.get(n.dataset.rowId ?? "") ?? D.row, i = V.findIndex((e) => e.id === n.dataset.columnId), o = {
|
|
1388
|
+
ArrowDown: [1, 0],
|
|
1389
|
+
ArrowUp: [-1, 0],
|
|
1390
|
+
ArrowLeft: [0, -1],
|
|
1391
|
+
ArrowRight: [0, 1],
|
|
1392
|
+
PageDown: [10, 0],
|
|
1393
|
+
PageUp: [-10, 0]
|
|
1394
|
+
}, s = {
|
|
1395
|
+
row: r,
|
|
1396
|
+
column: Math.max(0, i)
|
|
1397
|
+
};
|
|
1398
|
+
if (o[t.key]) s = {
|
|
1399
|
+
row: s.row + o[t.key][0],
|
|
1400
|
+
column: s.column + o[t.key][1]
|
|
1401
|
+
};
|
|
1402
|
+
else if (t.key === "Home") s = {
|
|
1403
|
+
row: t.ctrlKey || t.metaKey ? 0 : r,
|
|
1404
|
+
column: 0
|
|
1405
|
+
};
|
|
1406
|
+
else if (t.key === "End") s = {
|
|
1407
|
+
row: t.ctrlKey || t.metaKey ? W.length - 1 : r,
|
|
1408
|
+
column: V.length - 1
|
|
1409
|
+
};
|
|
1410
|
+
else if ((t.ctrlKey || t.metaKey) && t.key.toLowerCase() === "a" && a("cellSelection")) {
|
|
1411
|
+
t.preventDefault(), B.selectAllCells();
|
|
1412
|
+
return;
|
|
1413
|
+
} else if ((t.ctrlKey || t.metaKey) && t.key === " " && a("cellSelection") && n.dataset.columnId !== $) {
|
|
1414
|
+
t.preventDefault();
|
|
1415
|
+
let e = W[r], i = n.dataset.columnId, a = e.getVisibleCells().find((e) => e.column.id === i);
|
|
1416
|
+
B.selectCellRange({
|
|
1417
|
+
anchorRowId: e.id,
|
|
1418
|
+
focusRowId: e.id,
|
|
1419
|
+
anchorColumnId: i,
|
|
1420
|
+
focusColumnId: i
|
|
1421
|
+
}, { mode: a?.getIsSelected() ? "exclude" : "include" });
|
|
1422
|
+
return;
|
|
1423
|
+
} else if (t.key === "Escape") {
|
|
1424
|
+
B.resetCellSelection(!0);
|
|
1425
|
+
return;
|
|
1426
|
+
} else if (t.key === "Enter" || t.key === "F2") {
|
|
1427
|
+
let i = W[r], a = z.get(n.dataset.columnId ?? "");
|
|
1428
|
+
i && a?.editable && e.onCellCommit ? (t.preventDefault(), rt(i, a)) : i?.getCanExpand() ? (t.preventDefault(), i.toggleExpanded()) : i && !i.getIsGrouped() && e.onRowActivate?.(i.original.data);
|
|
1429
|
+
return;
|
|
1430
|
+
} else if (t.key === " " && Se && W[r]) {
|
|
1431
|
+
t.preventDefault(), Pe(W[r]);
|
|
1432
|
+
return;
|
|
1433
|
+
} else return;
|
|
1434
|
+
t.preventDefault(), s = jt(s, {
|
|
1435
|
+
rows: W.length,
|
|
1436
|
+
columns: V.length
|
|
1437
|
+
});
|
|
1438
|
+
for (let e = 0; e < W.length + V.length; e++) {
|
|
1439
|
+
let e = W[s.row]?.getVisibleCells().find((e) => e.column.id === V[s.column]?.id);
|
|
1440
|
+
if (!e?.getIsCovered()) break;
|
|
1441
|
+
let t = e.getRowSpan() === 0 ? {
|
|
1442
|
+
row: s.row + (s.row > r ? 1 : -1),
|
|
1443
|
+
column: s.column
|
|
1444
|
+
} : {
|
|
1445
|
+
row: s.row,
|
|
1446
|
+
column: s.column + (s.column > i && s.row === r ? 1 : -1)
|
|
1447
|
+
};
|
|
1448
|
+
if (t.row < 0 || t.row >= W.length || t.column < 0 || t.column >= V.length) {
|
|
1449
|
+
s = {
|
|
1450
|
+
row: r,
|
|
1451
|
+
column: i
|
|
1452
|
+
};
|
|
1453
|
+
break;
|
|
1454
|
+
}
|
|
1455
|
+
s = t;
|
|
1456
|
+
}
|
|
1457
|
+
let c = W[s.row], u = V[s.column];
|
|
1458
|
+
if (a("cellSelection") && c && u?.id !== $) {
|
|
1459
|
+
if (t.shiftKey) {
|
|
1460
|
+
let e = C.cellSelection.at(-1);
|
|
1461
|
+
B.selectCellRange({
|
|
1462
|
+
anchorRowId: e?.anchorRowId ?? W[r].id,
|
|
1463
|
+
anchorColumnId: e?.anchorColumnId ?? n.dataset.columnId,
|
|
1464
|
+
focusRowId: c.id,
|
|
1465
|
+
focusColumnId: u.id
|
|
1466
|
+
});
|
|
1467
|
+
} else B.setFocusedCell(c.id, u.id);
|
|
1468
|
+
}
|
|
1469
|
+
ae.current = !0, ie(s);
|
|
1470
|
+
}, ft = (e, t = e.getSize(), n = y.row) => ({
|
|
1471
|
+
"--dg-cell-size": `${t}px`,
|
|
1472
|
+
"--dg-pin-offset": `${e.getIsPinned() === "end" ? e.getAfter("end") : e.getStart("start")}px`,
|
|
1473
|
+
"--dg-span-size": `${n}px`
|
|
1474
|
+
}), pt = (e) => e.getCanSort() || e.getCanHide() || a("columnPinning") || a("columnOrdering") || a("grouping") && e.getCanGroup() || a("columnResizing") && e.getCanResize() ? /* @__PURE__ */ k(ne, {
|
|
1475
|
+
items: /* @__PURE__ */ A(O, { children: [
|
|
1476
|
+
e.getCanSort() ? /* @__PURE__ */ A(O, { children: [
|
|
1477
|
+
/* @__PURE__ */ k(T, {
|
|
1478
|
+
icon: de,
|
|
1479
|
+
onSelect: () => e.toggleSorting(!1, !1),
|
|
1480
|
+
children: "오름차순"
|
|
1481
|
+
}),
|
|
1482
|
+
/* @__PURE__ */ k(T, {
|
|
1483
|
+
icon: ce,
|
|
1484
|
+
onSelect: () => e.toggleSorting(!0, !1),
|
|
1485
|
+
children: "내림차순"
|
|
1486
|
+
}),
|
|
1487
|
+
a("multiSort") ? /* @__PURE__ */ k(T, {
|
|
1488
|
+
onSelect: () => e.toggleSorting(!1, !0),
|
|
1489
|
+
children: "다중 정렬에 추가"
|
|
1490
|
+
}) : null,
|
|
1491
|
+
/* @__PURE__ */ k(T, {
|
|
1492
|
+
onSelect: () => e.clearSorting(),
|
|
1493
|
+
children: "정렬 해제"
|
|
1494
|
+
}),
|
|
1495
|
+
/* @__PURE__ */ k(te, {})
|
|
1496
|
+
] }) : null,
|
|
1497
|
+
a("columnPinning") ? /* @__PURE__ */ A(O, { children: [
|
|
1498
|
+
/* @__PURE__ */ k(T, {
|
|
1499
|
+
onSelect: () => e.pin("start"),
|
|
1500
|
+
children: "왼쪽에 고정"
|
|
1501
|
+
}),
|
|
1502
|
+
/* @__PURE__ */ k(T, {
|
|
1503
|
+
onSelect: () => e.pin("end"),
|
|
1504
|
+
children: "오른쪽에 고정"
|
|
1505
|
+
}),
|
|
1506
|
+
/* @__PURE__ */ k(T, {
|
|
1507
|
+
onSelect: () => e.pin(!1),
|
|
1508
|
+
children: "열 고정 해제"
|
|
1509
|
+
})
|
|
1510
|
+
] }) : null,
|
|
1511
|
+
a("columnOrdering") ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(T, {
|
|
1512
|
+
onSelect: () => ot(e.id, -1),
|
|
1513
|
+
children: "열을 앞으로 이동"
|
|
1514
|
+
}), /* @__PURE__ */ k(T, {
|
|
1515
|
+
onSelect: () => ot(e.id, 1),
|
|
1516
|
+
children: "열을 뒤로 이동"
|
|
1517
|
+
})] }) : null,
|
|
1518
|
+
a("grouping") && e.getCanGroup() ? /* @__PURE__ */ k(T, {
|
|
1519
|
+
onSelect: () => e.toggleGrouping(),
|
|
1520
|
+
children: e.getIsGrouped() ? "그룹 해제" : "이 열로 그룹화"
|
|
1521
|
+
}) : null,
|
|
1522
|
+
a("columnResizing") && e.getCanResize() ? /* @__PURE__ */ k(T, {
|
|
1523
|
+
onSelect: () => e.resetSize(),
|
|
1524
|
+
children: "열 너비 초기화"
|
|
1525
|
+
}) : null,
|
|
1526
|
+
e.getCanHide() ? /* @__PURE__ */ k(T, {
|
|
1527
|
+
onSelect: () => e.toggleVisibility(!1),
|
|
1528
|
+
children: "이 열 숨기기"
|
|
1529
|
+
}) : null
|
|
1530
|
+
] }),
|
|
1531
|
+
children: /* @__PURE__ */ k(t, {
|
|
1532
|
+
icon: me,
|
|
1533
|
+
size: "sm",
|
|
1534
|
+
variant: "ghost",
|
|
1535
|
+
tone: "neutral",
|
|
1536
|
+
label: `${z.get(e.id)?.header ?? e.id} 열 설정`,
|
|
1537
|
+
"data-dg": "column-menu"
|
|
1538
|
+
})
|
|
1539
|
+
}) : null, mt = (e, t) => t > 0 ? /* @__PURE__ */ k("div", {
|
|
1540
|
+
className: "dg-complete__spacer",
|
|
1541
|
+
"aria-hidden": "true",
|
|
1542
|
+
style: { "--dg-gap": `${t}px` }
|
|
1543
|
+
}, e) : null, ht = (e, t) => {
|
|
1544
|
+
let n = [], r = 0, i = 0, a = t ? new Map(t.getVisibleCells().map((e) => [e.column.id, e])) : null;
|
|
1545
|
+
for (let t = 0; t < V.length; t++) {
|
|
1546
|
+
let o = V[t], s = a?.get(o.id), c = o.getSize();
|
|
1547
|
+
if (s?.getIsCovered() && s.getColSpan() === 0 && s.getRowSpan() !== 0) {
|
|
1548
|
+
r += c;
|
|
1549
|
+
continue;
|
|
1550
|
+
}
|
|
1551
|
+
if (tt.has(o.id) || s && s.getColSpan() > 1) {
|
|
1552
|
+
r > i && n.push(mt(`gap-${o.id}`, r - i)), n.push(e(o, t));
|
|
1553
|
+
let a = c;
|
|
1554
|
+
if (s && !s.getIsCovered()) for (let e = 1; e < s.getColSpan(); e++) a += V[t + e]?.getSize() ?? 0;
|
|
1555
|
+
i = r + a;
|
|
1556
|
+
}
|
|
1557
|
+
r += c;
|
|
1558
|
+
}
|
|
1559
|
+
return r > i && n.push(mt("gap-end", r - i)), n;
|
|
1560
|
+
}, gt = (n, r, i) => {
|
|
1561
|
+
let s = n.getVisibleCells().find((e) => e.column.id === r.id), l = Y.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();
|
|
1562
|
+
for (let e = 1; e < g; e++) _ += V[i + e]?.getSize() ?? 0;
|
|
1563
|
+
let v = 0;
|
|
1564
|
+
for (let e = 0; e < Math.max(1, h); e++) {
|
|
1565
|
+
let t = W[l + e];
|
|
1566
|
+
t && (v += xe.current.get(t.id) ?? y.row);
|
|
1567
|
+
}
|
|
1568
|
+
return s.getIsCovered() ? /* @__PURE__ */ k("div", {
|
|
1569
|
+
className: "dg-complete__covered",
|
|
1570
|
+
"aria-hidden": "true",
|
|
1571
|
+
style: ft(r)
|
|
1572
|
+
}, r.id) : /* @__PURE__ */ k("div", {
|
|
1573
|
+
role: "gridcell",
|
|
1574
|
+
className: "dg-complete__cell",
|
|
1575
|
+
"data-dg": "cell",
|
|
1576
|
+
"data-row-id": n.id,
|
|
1577
|
+
"data-column-id": r.id,
|
|
1578
|
+
"data-pin": r.getIsPinned() || void 0,
|
|
1579
|
+
"data-numeric": u?.numeric ? "" : void 0,
|
|
1580
|
+
"data-cell-selected": s.getIsSelected() ? "" : void 0,
|
|
1581
|
+
"data-editable": u?.editable && e.onCellCommit && !n.getIsGrouped() ? "" : void 0,
|
|
1582
|
+
"aria-colindex": i + 1,
|
|
1583
|
+
"aria-colspan": g > 1 ? g : void 0,
|
|
1584
|
+
"aria-rowspan": h > 1 ? h : void 0,
|
|
1585
|
+
"aria-selected": a("cellSelection") && r.id !== $ ? s.getIsSelected() : void 0,
|
|
1586
|
+
"aria-busy": f?.pending || void 0,
|
|
1587
|
+
"aria-describedby": f?.pending || f?.error ? `${c}-${n.id}-${r.id}` : void 0,
|
|
1588
|
+
tabIndex: d && !m ? 0 : -1,
|
|
1589
|
+
style: ft(r, _, v),
|
|
1590
|
+
onFocus: (e) => {
|
|
1591
|
+
e.target === e.currentTarget && ie({
|
|
1592
|
+
row: l,
|
|
1593
|
+
column: i
|
|
1594
|
+
});
|
|
1595
|
+
},
|
|
1596
|
+
onMouseDown: (e) => {
|
|
1597
|
+
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({
|
|
1598
|
+
row: l,
|
|
1599
|
+
column: i
|
|
1600
|
+
}));
|
|
1601
|
+
},
|
|
1602
|
+
onMouseEnter: (e) => {
|
|
1603
|
+
a("cellSelection") && s.getSelectionExtendHandler()(e);
|
|
1604
|
+
},
|
|
1605
|
+
onDoubleClick: () => {
|
|
1606
|
+
u?.editable && e.onCellCommit ? rt(n, u) : n.getIsGrouped() || e.onRowActivate?.(n.original.data);
|
|
1607
|
+
},
|
|
1608
|
+
children: /* @__PURE__ */ k("div", {
|
|
1609
|
+
className: "dg-complete__value",
|
|
1610
|
+
"data-row-span": h > 1 ? "" : void 0,
|
|
1611
|
+
children: r.id === $ ? /* @__PURE__ */ A(O, { children: [Se ? /* @__PURE__ */ k(p, {
|
|
1612
|
+
checked: je(n),
|
|
1613
|
+
indeterminate: K(n) || n.getIsSomeSelected(),
|
|
1614
|
+
onChange: () => Pe(n),
|
|
1615
|
+
"aria-label": `${n.getIsGrouped() ? "그룹" : e.rowLabel ? e.rowLabel(n.original.data) : n.id} 선택`,
|
|
1616
|
+
"data-dg": "select-row"
|
|
1617
|
+
}) : null, a("rowPinning") ? /* @__PURE__ */ k(ne, {
|
|
1618
|
+
items: /* @__PURE__ */ A(O, { children: [
|
|
1619
|
+
/* @__PURE__ */ k(T, {
|
|
1620
|
+
onSelect: () => n.pin("top"),
|
|
1621
|
+
children: "행을 위에 고정"
|
|
1622
|
+
}),
|
|
1623
|
+
/* @__PURE__ */ k(T, {
|
|
1624
|
+
onSelect: () => n.pin("bottom"),
|
|
1625
|
+
children: "행을 아래에 고정"
|
|
1626
|
+
}),
|
|
1627
|
+
/* @__PURE__ */ k(T, {
|
|
1628
|
+
onSelect: () => n.pin(!1),
|
|
1629
|
+
children: "행 고정 해제"
|
|
1630
|
+
})
|
|
1631
|
+
] }),
|
|
1632
|
+
children: /* @__PURE__ */ k(t, {
|
|
1633
|
+
icon: we,
|
|
1634
|
+
size: "sm",
|
|
1635
|
+
variant: "ghost",
|
|
1636
|
+
tone: "neutral",
|
|
1637
|
+
label: `${n.getIsGrouped() ? "그룹" : e.rowLabel?.(n.original.data) ?? n.id} 행 설정`,
|
|
1638
|
+
"data-dg": "row-menu"
|
|
1639
|
+
})
|
|
1640
|
+
}) : null] }) : m ? /* @__PURE__ */ k(o, {
|
|
1641
|
+
"aria-label": `${u?.header} 고치기`,
|
|
1642
|
+
value: F.draft,
|
|
1643
|
+
size: "sm",
|
|
1644
|
+
"data-dg": "editor",
|
|
1645
|
+
ref: (e) => {
|
|
1646
|
+
e && e.ownerDocument.activeElement !== e && e.focus();
|
|
1647
|
+
},
|
|
1648
|
+
onChange: (e) => I((t) => t ? {
|
|
1649
|
+
...t,
|
|
1650
|
+
draft: e.target.value
|
|
1651
|
+
} : null),
|
|
1652
|
+
onBlur: () => it(!0),
|
|
1653
|
+
onKeyDown: (e) => {
|
|
1654
|
+
e.stopPropagation(), !(e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229) && (e.key === "Enter" || e.key === "Escape") && (e.preventDefault(), it(e.key === "Enter", !0));
|
|
1655
|
+
}
|
|
1656
|
+
}) : /* @__PURE__ */ A(O, { children: [
|
|
1657
|
+
i === +!!Ce && n.getCanExpand() ? /* @__PURE__ */ k(t, {
|
|
1658
|
+
icon: n.getIsExpanded() ? me : ge,
|
|
1659
|
+
label: n.getIsExpanded() ? "행 접기" : "행 펼치기",
|
|
1660
|
+
size: "sm",
|
|
1661
|
+
variant: "ghost",
|
|
1662
|
+
tone: "neutral",
|
|
1663
|
+
onClick: () => n.toggleExpanded(),
|
|
1664
|
+
"aria-expanded": n.getIsExpanded(),
|
|
1665
|
+
"data-dg": "expand"
|
|
1666
|
+
}) : null,
|
|
1667
|
+
/* @__PURE__ */ k("span", {
|
|
1668
|
+
className: "dg-complete__content",
|
|
1669
|
+
children: s.getIsGrouped() ? /* @__PURE__ */ A(O, { children: [
|
|
1670
|
+
Vt(s.getValue()),
|
|
1671
|
+
" (",
|
|
1672
|
+
n.getLeafRows().length,
|
|
1673
|
+
")"
|
|
1674
|
+
] }) : s.getIsAggregated() ? Vt(s.getValue()) : n.getIsGrouped() ? "" : u?.cell(n.original.data)
|
|
1675
|
+
}),
|
|
1676
|
+
u && !n.getIsGrouped() && e.changed?.(n.original.data, u) !== void 0 ? /* @__PURE__ */ k("span", {
|
|
1677
|
+
className: "data-grid__flash",
|
|
1678
|
+
"aria-hidden": "true"
|
|
1679
|
+
}, e.changed(n.original.data, u)) : null
|
|
1680
|
+
] })
|
|
1681
|
+
})
|
|
1682
|
+
}, r.id);
|
|
1683
|
+
}, _t = (e, t, n = 0) => {
|
|
1684
|
+
let r = Y.get(e.id) ?? 0, a = X + r + (He.get(e.id) ?? 0) + 1 + We + qe;
|
|
1685
|
+
return /* @__PURE__ */ A("div", {
|
|
1686
|
+
className: "dg-complete__entry",
|
|
1687
|
+
"data-row-id": e.id,
|
|
1688
|
+
"data-index": t,
|
|
1689
|
+
"data-virtual": t !== void 0 && Q ? "" : void 0,
|
|
1690
|
+
ref: t !== void 0 && Q ? Ze.measureElement : void 0,
|
|
1691
|
+
style: { "--dg-row-offset": `${n}px` },
|
|
1692
|
+
children: [/* @__PURE__ */ k("div", {
|
|
1693
|
+
role: "row",
|
|
1694
|
+
className: "dg-complete__row",
|
|
1695
|
+
"data-dg": "row",
|
|
1696
|
+
"data-row-id": e.id,
|
|
1697
|
+
"aria-rowindex": a,
|
|
1698
|
+
"aria-selected": Se ? je(e) : void 0,
|
|
1699
|
+
"aria-expanded": e.getCanExpand() ? e.getIsExpanded() : void 0,
|
|
1700
|
+
"aria-level": Ie ? e.depth + 1 : void 0,
|
|
1701
|
+
"data-selected": je(e) ? "" : void 0,
|
|
1702
|
+
"data-grouped": e.getIsGrouped() ? "" : void 0,
|
|
1703
|
+
children: ht((t, n) => gt(e, t, n), e)
|
|
1704
|
+
}), Ve(e) ? /* @__PURE__ */ k("div", {
|
|
1705
|
+
role: "row",
|
|
1706
|
+
className: "dg-complete__detail",
|
|
1707
|
+
"aria-rowindex": a + 1,
|
|
1708
|
+
"aria-level": e.depth + 2,
|
|
1709
|
+
"data-dg": "detail",
|
|
1710
|
+
children: /* @__PURE__ */ k("div", {
|
|
1711
|
+
role: "gridcell",
|
|
1712
|
+
"aria-colspan": V.length,
|
|
1713
|
+
"aria-colindex": 1,
|
|
1714
|
+
children: i.renderDetail?.(e.original.data)
|
|
1715
|
+
})
|
|
1716
|
+
}) : null]
|
|
1717
|
+
}, e.id);
|
|
1718
|
+
};
|
|
1719
|
+
return /* @__PURE__ */ A("div", {
|
|
1720
|
+
...r,
|
|
1721
|
+
className: `data-grid data-grid-complete ${e.className ?? ""}`.trim(),
|
|
1722
|
+
"data-row-density": e.density ?? "compact",
|
|
1723
|
+
"data-height": e.height ?? "md",
|
|
1724
|
+
style: {
|
|
1725
|
+
"--dg-grid-size": `${B.getTotalSize()}px`,
|
|
1726
|
+
"--dg-head-size": `${y.head}px`,
|
|
1727
|
+
"--dg-foot-size": `${y.foot}px`
|
|
1728
|
+
},
|
|
1729
|
+
children: [
|
|
1730
|
+
/* @__PURE__ */ A("div", {
|
|
1731
|
+
className: "dg-complete__toolbar",
|
|
1732
|
+
role: "group",
|
|
1733
|
+
"aria-label": `${e.label} 도구`,
|
|
1734
|
+
children: [
|
|
1735
|
+
a("search") ? /* @__PURE__ */ k(o, {
|
|
1736
|
+
size: "sm",
|
|
1737
|
+
iconStart: Ee,
|
|
1738
|
+
value: C.search,
|
|
1739
|
+
onChange: (e) => B.setGlobalFilter(e.target.value),
|
|
1740
|
+
"aria-label": `${e.label} 검색`,
|
|
1741
|
+
placeholder: "전체 열 검색",
|
|
1742
|
+
"data-dg": "search"
|
|
1743
|
+
}) : null,
|
|
1744
|
+
/* @__PURE__ */ k(ne, {
|
|
1745
|
+
items: B.getAllLeafColumns().filter((e) => e.id !== $).map((e) => /* @__PURE__ */ k(ee, {
|
|
1746
|
+
checked: e.getIsVisible(),
|
|
1747
|
+
disabled: !e.getCanHide(),
|
|
1748
|
+
onCheckedChange: () => e.toggleVisibility(),
|
|
1749
|
+
children: z.get(e.id)?.header ?? e.id
|
|
1750
|
+
}, e.id)),
|
|
1751
|
+
children: /* @__PURE__ */ A(n, {
|
|
1752
|
+
size: "sm",
|
|
1753
|
+
variant: "outline",
|
|
1754
|
+
tone: "neutral",
|
|
1755
|
+
iconStart: ke,
|
|
1756
|
+
"data-dg": "columns",
|
|
1757
|
+
children: [
|
|
1758
|
+
"열 ",
|
|
1759
|
+
V.length - +!!Ce,
|
|
1760
|
+
"/",
|
|
1761
|
+
e.columns.length
|
|
1762
|
+
]
|
|
1763
|
+
})
|
|
1764
|
+
}),
|
|
1765
|
+
a("grouping") && C.grouping.length ? /* @__PURE__ */ k(n, {
|
|
1766
|
+
size: "sm",
|
|
1767
|
+
variant: "outline",
|
|
1768
|
+
onClick: () => B.resetGrouping(!0),
|
|
1769
|
+
"data-dg": "ungroup",
|
|
1770
|
+
children: "그룹 모두 해제"
|
|
1771
|
+
}) : null,
|
|
1772
|
+
a("expanding") ? /* @__PURE__ */ k(n, {
|
|
1773
|
+
size: "sm",
|
|
1774
|
+
variant: "ghost",
|
|
1775
|
+
tone: "neutral",
|
|
1776
|
+
onClick: () => B.toggleAllRowsExpanded(),
|
|
1777
|
+
"data-dg": "expand-all",
|
|
1778
|
+
children: B.getIsAllRowsExpanded() ? "모두 접기" : "모두 펼치기"
|
|
1779
|
+
}) : null,
|
|
1780
|
+
a("cellSelection") ? /* @__PURE__ */ k(n, {
|
|
1781
|
+
size: "sm",
|
|
1782
|
+
variant: "outline",
|
|
1783
|
+
tone: "neutral",
|
|
1784
|
+
disabled: !B.getSelectedCellCount(),
|
|
1785
|
+
onClick: async () => {
|
|
1786
|
+
try {
|
|
1787
|
+
await navigator.clipboard.writeText(st()), _e("선택한 셀을 복사했습니다.");
|
|
1788
|
+
} catch {
|
|
1789
|
+
_e("복사 권한이 없습니다. 셀에서 Ctrl+C를 눌러 복사하세요.");
|
|
1790
|
+
}
|
|
1791
|
+
},
|
|
1792
|
+
"data-dg": "copy",
|
|
1793
|
+
children: "선택 셀 복사"
|
|
1794
|
+
}) : null,
|
|
1795
|
+
/* @__PURE__ */ k(n, {
|
|
1796
|
+
size: "sm",
|
|
1797
|
+
variant: "ghost",
|
|
1798
|
+
tone: "neutral",
|
|
1799
|
+
onClick: () => {
|
|
1800
|
+
let t = Rt(i.defaultState);
|
|
1801
|
+
w.current = t, S(t), i.onStateChange?.(t), e.onSelectedChange?.(t.selectedKeys), e.onHiddenColumnsChange?.(t.hiddenColumns), e.onSortChange?.(t.sorting[0] ?? null);
|
|
1802
|
+
},
|
|
1803
|
+
"data-dg": "reset",
|
|
1804
|
+
children: "보기 초기화"
|
|
1805
|
+
})
|
|
1806
|
+
]
|
|
1807
|
+
}),
|
|
1808
|
+
C.sorting.length ? /* @__PURE__ */ A("p", {
|
|
1809
|
+
className: "dg-complete__summary",
|
|
1810
|
+
"data-dg": "sort-status",
|
|
1811
|
+
children: ["정렬: ", C.sorting.map((e, t) => `${t + 1}. ${z.get(e.columnId)?.header ?? e.columnId} ${e.direction === "asc" ? "오름차순" : "내림차순"}`).join(" · ")]
|
|
1812
|
+
}) : null,
|
|
1813
|
+
/* @__PURE__ */ k("div", {
|
|
1814
|
+
ref: u,
|
|
1815
|
+
className: "data-grid__scroll dg-complete__scroll",
|
|
1816
|
+
"data-dg": "scroll",
|
|
1817
|
+
children: /* @__PURE__ */ A("div", {
|
|
1818
|
+
ref: f,
|
|
1819
|
+
role: Ie ? "treegrid" : "grid",
|
|
1820
|
+
className: "dg-complete__grid",
|
|
1821
|
+
"aria-label": e.label,
|
|
1822
|
+
"aria-colcount": V.length,
|
|
1823
|
+
"aria-rowcount": s && Z === "rows" && (i.rowCount === void 0 || i.renderDetail) ? -1 : Je,
|
|
1824
|
+
"aria-busy": Z === "loading" || void 0,
|
|
1825
|
+
"aria-multiselectable": Se || a("cellSelection") || void 0,
|
|
1826
|
+
onKeyDown: ct,
|
|
1827
|
+
onFocusCapture: (e) => {
|
|
1828
|
+
e.target.closest(l) === e.currentTarget && (le(e.target.closest("[data-dg=\"row\"]")?.dataset.rowId ?? null), fe(e.target.closest("[data-column-id]")?.dataset.columnId ?? null));
|
|
1829
|
+
},
|
|
1830
|
+
onBlurCapture: (e) => {
|
|
1831
|
+
e.currentTarget.contains(e.relatedTarget) || (le(null), fe(null));
|
|
1832
|
+
},
|
|
1833
|
+
onCopy: (e) => {
|
|
1834
|
+
a("cellSelection") && !e.target.closest("input,textarea") && B.getSelectedCellCount() && (e.clipboardData.setData("text/plain", st()), e.preventDefault());
|
|
1835
|
+
},
|
|
1836
|
+
children: [
|
|
1837
|
+
/* @__PURE__ */ A("div", {
|
|
1838
|
+
ref: h,
|
|
1839
|
+
role: "rowgroup",
|
|
1840
|
+
className: "dg-complete__head",
|
|
1841
|
+
children: [
|
|
1842
|
+
B.getHeaderGroups().slice(0, -1).map((e, t) => /* @__PURE__ */ k("div", {
|
|
1843
|
+
role: "row",
|
|
1844
|
+
className: "dg-complete__row",
|
|
1845
|
+
"aria-rowindex": t + 1,
|
|
1846
|
+
children: e.headers.map((e) => /* @__PURE__ */ k("div", {
|
|
1847
|
+
role: "columnheader",
|
|
1848
|
+
className: "dg-complete__group-header",
|
|
1849
|
+
"aria-colspan": e.colSpan,
|
|
1850
|
+
style: { "--dg-cell-size": `${e.getSize()}px` },
|
|
1851
|
+
children: e.isPlaceholder ? "" : String(e.column.columnDef.header ?? "")
|
|
1852
|
+
}, e.id))
|
|
1853
|
+
}, e.id)),
|
|
1854
|
+
/* @__PURE__ */ k("div", {
|
|
1855
|
+
role: "row",
|
|
1856
|
+
className: "dg-complete__row",
|
|
1857
|
+
"aria-rowindex": Fe,
|
|
1858
|
+
children: ht((e, t) => {
|
|
1859
|
+
let n = z.get(e.id), r = C.sorting.findIndex((t) => t.columnId === e.id), i = B.getFlatHeaders().find((t) => t.column.id === e.id && t.subHeaders.length === 0);
|
|
1860
|
+
return /* @__PURE__ */ k("div", {
|
|
1861
|
+
role: "columnheader",
|
|
1862
|
+
className: "dg-complete__cell dg-complete__header",
|
|
1863
|
+
"data-column-id": e.id,
|
|
1864
|
+
"data-pin": e.getIsPinned() || void 0,
|
|
1865
|
+
"aria-colindex": t + 1,
|
|
1866
|
+
"aria-sort": e.getCanSort() ? r < 0 ? "none" : r > 0 ? "other" : C.sorting[r].direction === "asc" ? "ascending" : "descending" : void 0,
|
|
1867
|
+
style: ft(e),
|
|
1868
|
+
draggable: a("columnOrdering") && e.id !== $,
|
|
1869
|
+
onDragStart: (t) => {
|
|
1870
|
+
L(e.id), t.dataTransfer.setData("text/plain", e.id);
|
|
1871
|
+
},
|
|
1872
|
+
onDragOver: (t) => {
|
|
1873
|
+
be && e.id !== $ && t.preventDefault();
|
|
1874
|
+
},
|
|
1875
|
+
onDrop: (t) => {
|
|
1876
|
+
t.preventDefault(), be && be !== e.id && e.id !== $ && at(be, e.id), L(null);
|
|
1877
|
+
},
|
|
1878
|
+
children: e.id === $ ? /* @__PURE__ */ A(O, { children: [Se ? /* @__PURE__ */ k(p, {
|
|
1879
|
+
checked: q,
|
|
1880
|
+
indeterminate: !q && J,
|
|
1881
|
+
onChange: () => Ne(Me, q),
|
|
1882
|
+
"aria-label": "현재 페이지 전체 선택",
|
|
1883
|
+
"data-dg": "select-all"
|
|
1884
|
+
}) : null, /* @__PURE__ */ k("span", {
|
|
1885
|
+
className: "dg-complete__control-label",
|
|
1886
|
+
children: "행 작업"
|
|
1887
|
+
})] }) : /* @__PURE__ */ A(O, { children: [
|
|
1888
|
+
/* @__PURE__ */ A("button", {
|
|
1889
|
+
type: "button",
|
|
1890
|
+
className: "dg-complete__sort",
|
|
1891
|
+
"aria-disabled": !e.getCanSort() || void 0,
|
|
1892
|
+
"aria-label": `${n?.header} 정렬${r >= 0 ? `, ${r + 1}순위 ${C.sorting[r].direction === "asc" ? "오름차순" : "내림차순"}` : ""}`,
|
|
1893
|
+
onClick: (t) => {
|
|
1894
|
+
e.getCanSort() && e.toggleSorting(void 0, t.shiftKey && a("multiSort"));
|
|
1895
|
+
},
|
|
1896
|
+
"data-dg": "sort",
|
|
1897
|
+
children: [n?.header, r >= 0 ? /* @__PURE__ */ A("span", { children: [C.sorting[r].direction === "asc" ? " ↑" : " ↓", C.sorting.length > 1 ? r + 1 : ""] }) : null]
|
|
1898
|
+
}),
|
|
1899
|
+
pt(e),
|
|
1900
|
+
a("columnResizing") && i && e.getCanResize() ? /* @__PURE__ */ k("button", {
|
|
1901
|
+
type: "button",
|
|
1902
|
+
className: "dg-complete__resize",
|
|
1903
|
+
role: "separator",
|
|
1904
|
+
"aria-orientation": "vertical",
|
|
1905
|
+
"aria-label": `${n?.header} 열 너비`,
|
|
1906
|
+
"aria-valuemin": e.columnDef.minSize,
|
|
1907
|
+
"aria-valuemax": e.columnDef.maxSize,
|
|
1908
|
+
"aria-valuenow": Math.round(e.getSize()),
|
|
1909
|
+
onMouseDown: i.getResizeHandler(),
|
|
1910
|
+
onTouchStart: i.getResizeHandler(),
|
|
1911
|
+
onDoubleClick: () => e.resetSize(),
|
|
1912
|
+
onKeyDown: (t) => {
|
|
1913
|
+
(t.key === "ArrowLeft" || t.key === "ArrowRight") && (t.preventDefault(), t.stopPropagation(), B.setColumnSizing((n) => ({
|
|
1914
|
+
...n,
|
|
1915
|
+
[e.id]: Math.max(e.columnDef.minSize ?? 72, Math.min(e.columnDef.maxSize ?? 1200, e.getSize() + (t.key === "ArrowRight" ? 16 : -16)))
|
|
1916
|
+
})));
|
|
1917
|
+
},
|
|
1918
|
+
"data-dg": "resize"
|
|
1919
|
+
}) : null
|
|
1920
|
+
] })
|
|
1921
|
+
}, e.id);
|
|
1922
|
+
})
|
|
1923
|
+
}),
|
|
1924
|
+
a("filtering") ? /* @__PURE__ */ k("div", {
|
|
1925
|
+
role: "row",
|
|
1926
|
+
className: "dg-complete__row dg-complete__filters",
|
|
1927
|
+
"aria-label": "열 필터",
|
|
1928
|
+
"aria-rowindex": X,
|
|
1929
|
+
children: ht((e, t) => {
|
|
1930
|
+
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) => ({
|
|
1931
|
+
value: e.value,
|
|
1932
|
+
label: `${e.label ?? e.value}${e.count === void 0 ? "" : ` (${e.count})`}`
|
|
1933
|
+
})) ?? c.map(([e, t]) => ({
|
|
1934
|
+
value: String(e),
|
|
1935
|
+
label: `${e}${t === void 0 ? "" : ` (${t})`}`
|
|
1936
|
+
})), u = i.ranges?.[e.id] ?? (n?.filter === "number" && !s ? e.getFacetedMinMaxValues() : void 0);
|
|
1937
|
+
return /* @__PURE__ */ k("div", {
|
|
1938
|
+
role: "gridcell",
|
|
1939
|
+
"aria-colindex": t + 1,
|
|
1940
|
+
className: "dg-complete__cell",
|
|
1941
|
+
"data-pin": e.getIsPinned() || void 0,
|
|
1942
|
+
style: ft(e),
|
|
1943
|
+
children: !e.getCanFilter() || !n ? null : n.filter === "select" ? /* @__PURE__ */ A(d, {
|
|
1944
|
+
size: "sm",
|
|
1945
|
+
value: String(r ?? ""),
|
|
1946
|
+
onChange: (t) => e.setFilterValue(t.target.value || void 0),
|
|
1947
|
+
"aria-label": `${n.header} 필터`,
|
|
1948
|
+
"data-dg": "filter-select",
|
|
1949
|
+
children: [/* @__PURE__ */ k("option", {
|
|
1950
|
+
value: "",
|
|
1951
|
+
children: "전체"
|
|
1952
|
+
}), l.map((e) => /* @__PURE__ */ k("option", {
|
|
1953
|
+
value: e.value,
|
|
1954
|
+
children: e.label
|
|
1955
|
+
}, e.value))]
|
|
1956
|
+
}) : n.filter === "number" && (!n.filterOperator || n.filterOperator === "inNumberRange") ? /* @__PURE__ */ A("div", {
|
|
1957
|
+
className: "dg-complete__range",
|
|
1958
|
+
children: [/* @__PURE__ */ k(o, {
|
|
1959
|
+
size: "sm",
|
|
1960
|
+
type: "number",
|
|
1961
|
+
"aria-label": `${n.header} 최솟값`,
|
|
1962
|
+
placeholder: u ? String(u[0]) : "최소",
|
|
1963
|
+
value: String(r?.[0] ?? ""),
|
|
1964
|
+
onChange: (t) => e.setFilterValue([t.target.value === "" ? void 0 : Number(t.target.value), r?.[1]])
|
|
1965
|
+
}), /* @__PURE__ */ k(o, {
|
|
1966
|
+
size: "sm",
|
|
1967
|
+
type: "number",
|
|
1968
|
+
"aria-label": `${n.header} 최댓값`,
|
|
1969
|
+
placeholder: u ? String(u[1]) : "최대",
|
|
1970
|
+
value: String(r?.[1] ?? ""),
|
|
1971
|
+
onChange: (t) => e.setFilterValue([r?.[0], t.target.value === "" ? void 0 : Number(t.target.value)])
|
|
1972
|
+
})]
|
|
1973
|
+
}) : /* @__PURE__ */ k(o, {
|
|
1974
|
+
size: "sm",
|
|
1975
|
+
"aria-label": `${n.header} 필터`,
|
|
1976
|
+
placeholder: c.length ? `${c.length}개 값 검색` : "필터",
|
|
1977
|
+
value: String(r ?? ""),
|
|
1978
|
+
onChange: (t) => e.setFilterValue(t.target.value === "" ? void 0 : n.parseFilter ? n.parseFilter(t.target.value) : t.target.value)
|
|
1979
|
+
})
|
|
1980
|
+
}, e.id);
|
|
1981
|
+
})
|
|
1982
|
+
}) : null
|
|
1983
|
+
]
|
|
1984
|
+
}),
|
|
1985
|
+
Z === "rows" ? /* @__PURE__ */ A(O, { children: [
|
|
1986
|
+
/* @__PURE__ */ k("div", {
|
|
1987
|
+
ref: g,
|
|
1988
|
+
role: De.length ? "rowgroup" : void 0,
|
|
1989
|
+
className: "dg-complete__pinned-top",
|
|
1990
|
+
"data-dg": "pinned-top",
|
|
1991
|
+
children: De.map((e) => _t(e))
|
|
1992
|
+
}),
|
|
1993
|
+
/* @__PURE__ */ k("div", {
|
|
1994
|
+
role: "rowgroup",
|
|
1995
|
+
className: "dg-complete__body",
|
|
1996
|
+
"data-virtual": Q ? "" : void 0,
|
|
1997
|
+
style: { "--dg-total": `${Q ? Ze.getTotalSize() : 0}px` },
|
|
1998
|
+
children: nt.map((e) => _t(e.row, e.index, e.offset))
|
|
1999
|
+
}),
|
|
2000
|
+
/* @__PURE__ */ k("div", {
|
|
2001
|
+
ref: _,
|
|
2002
|
+
role: Oe.length ? "rowgroup" : void 0,
|
|
2003
|
+
className: "dg-complete__pinned-bottom",
|
|
2004
|
+
"data-dg": "pinned-bottom",
|
|
2005
|
+
children: Oe.map((e) => _t(e))
|
|
2006
|
+
})
|
|
2007
|
+
] }) : Z === "loading" ? /* @__PURE__ */ k("div", {
|
|
2008
|
+
role: "rowgroup",
|
|
2009
|
+
"aria-busy": "true",
|
|
2010
|
+
children: Array.from({ length: e.loadingRows ?? 5 }, (e, t) => /* @__PURE__ */ k("div", {
|
|
2011
|
+
role: "row",
|
|
2012
|
+
className: "dg-complete__row",
|
|
2013
|
+
"aria-rowindex": X + t + 1,
|
|
2014
|
+
"data-dg": "waiting-row",
|
|
2015
|
+
children: ht((e, t) => /* @__PURE__ */ k("div", {
|
|
2016
|
+
role: "gridcell",
|
|
2017
|
+
"aria-colindex": t + 1,
|
|
2018
|
+
className: "dg-complete__cell",
|
|
2019
|
+
style: ft(e),
|
|
2020
|
+
children: /* @__PURE__ */ k(m, {
|
|
2021
|
+
shape: "text",
|
|
2022
|
+
lines: 1
|
|
2023
|
+
})
|
|
2024
|
+
}, e.id))
|
|
2025
|
+
}, t))
|
|
2026
|
+
}) : null,
|
|
2027
|
+
ze ? /* @__PURE__ */ k("div", {
|
|
2028
|
+
ref: v,
|
|
2029
|
+
role: "rowgroup",
|
|
2030
|
+
className: "dg-complete__foot",
|
|
2031
|
+
children: /* @__PURE__ */ k("div", {
|
|
2032
|
+
role: "row",
|
|
2033
|
+
className: "dg-complete__row",
|
|
2034
|
+
"data-dg": "totals",
|
|
2035
|
+
"aria-rowindex": s && i.renderDetail ? void 0 : Je,
|
|
2036
|
+
children: ht((t, n) => /* @__PURE__ */ k("div", {
|
|
2037
|
+
role: "gridcell",
|
|
2038
|
+
"aria-colindex": n + 1,
|
|
2039
|
+
className: "dg-complete__cell",
|
|
2040
|
+
"data-pin": t.getIsPinned() || void 0,
|
|
2041
|
+
style: ft(t),
|
|
2042
|
+
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))
|
|
2043
|
+
}, t.id))
|
|
2044
|
+
})
|
|
2045
|
+
}) : null
|
|
2046
|
+
]
|
|
2047
|
+
})
|
|
2048
|
+
}),
|
|
2049
|
+
Z === "error" || Re ? /* @__PURE__ */ A("p", {
|
|
2050
|
+
role: "alert",
|
|
2051
|
+
className: "data-grid__state",
|
|
2052
|
+
"data-dg": "error",
|
|
2053
|
+
children: [e.error, Re ? /* @__PURE__ */ A(O, { children: [" 이전 결과를 표시합니다.", e.lastUpdated ? /* @__PURE__ */ A(O, { children: [" 마지막 갱신: ", e.lastUpdated] }) : null] }) : null]
|
|
2054
|
+
}) : Z === "empty" ? /* @__PURE__ */ k("p", {
|
|
2055
|
+
className: "data-grid__empty",
|
|
2056
|
+
"data-dg": "empty",
|
|
2057
|
+
children: e.empty ?? "행이 없습니다."
|
|
2058
|
+
}) : null,
|
|
2059
|
+
a("pagination") ? /* @__PURE__ */ A("div", {
|
|
2060
|
+
className: "dg-complete__pager",
|
|
2061
|
+
children: [/* @__PURE__ */ k(re, {
|
|
2062
|
+
label: `${e.label} 페이지`,
|
|
2063
|
+
page: C.pagination.pageIndex + 1,
|
|
2064
|
+
pageCount: s && i.rowCount === void 0 ? C.pagination.pageIndex + 1 : Math.max(1, B.getPageCount()),
|
|
2065
|
+
onPageChange: (e) => B.setPageIndex(e - 1),
|
|
2066
|
+
responsive: !0,
|
|
2067
|
+
size: "sm"
|
|
2068
|
+
}), /* @__PURE__ */ k(d, {
|
|
2069
|
+
className: "dg-complete__page-size",
|
|
2070
|
+
size: "sm",
|
|
2071
|
+
value: String(C.pagination.pageSize),
|
|
2072
|
+
onChange: (e) => B.setPageSize(Number(e.target.value)),
|
|
2073
|
+
"aria-label": "페이지당 행 수",
|
|
2074
|
+
"data-dg": "page-size",
|
|
2075
|
+
children: (i.pageSizes ?? [
|
|
2076
|
+
10,
|
|
2077
|
+
25,
|
|
2078
|
+
50,
|
|
2079
|
+
100
|
|
2080
|
+
]).map((e) => /* @__PURE__ */ A("option", {
|
|
2081
|
+
value: String(e),
|
|
2082
|
+
children: [e, "행씩"]
|
|
2083
|
+
}, e))
|
|
2084
|
+
})]
|
|
2085
|
+
}) : null,
|
|
2086
|
+
/* @__PURE__ */ A("p", {
|
|
2087
|
+
role: "status",
|
|
2088
|
+
className: "dg-complete__summary",
|
|
2089
|
+
"data-dg": "status",
|
|
2090
|
+
children: [
|
|
2091
|
+
e.meta ?? `${s ? i.rowCount ?? e.rows.length : B.getRowCount()}행`,
|
|
2092
|
+
Se ? ` · 선택 ${C.selectedKeys.length}행` : "",
|
|
2093
|
+
a("cellSelection") ? ` · 선택 ${B.getSelectedCellCount()}셀` : "",
|
|
2094
|
+
he ? ` · ${he}` : "",
|
|
2095
|
+
s && i.rowCount === void 0 && a("pagination") ? " · 전체 행 수가 필요합니다." : ""
|
|
2096
|
+
]
|
|
2097
|
+
}),
|
|
2098
|
+
e.cellState ? /* @__PURE__ */ k("ul", {
|
|
2099
|
+
className: "data-grid__save-status",
|
|
2100
|
+
children: B.getCoreRowModel().flatRows.map((e) => e.original).flatMap((t) => e.columns.flatMap((r) => {
|
|
2101
|
+
let i = e.cellState?.(t.data, r);
|
|
2102
|
+
return !i?.pending && !i?.error ? [] : [/* @__PURE__ */ A("li", {
|
|
2103
|
+
id: `${c}-${t.key}-${r.id}`,
|
|
2104
|
+
children: [/* @__PURE__ */ A("span", {
|
|
2105
|
+
role: i.pending ? "status" : "alert",
|
|
2106
|
+
children: [
|
|
2107
|
+
e.rowLabel?.(t.data) ?? t.key,
|
|
2108
|
+
" · ",
|
|
2109
|
+
r.header,
|
|
2110
|
+
": ",
|
|
2111
|
+
i.pending ? "저장 중입니다." : i.error
|
|
2112
|
+
]
|
|
2113
|
+
}), !i.pending && i.error && r.editable && e.onCellCommit ? /* @__PURE__ */ k(n, {
|
|
2114
|
+
size: "sm",
|
|
2115
|
+
variant: "outline",
|
|
2116
|
+
onClick: () => {
|
|
2117
|
+
B.getColumn(r.id)?.toggleVisibility(!0), B.setExpanded(!0), ye({
|
|
2118
|
+
rowId: t.key,
|
|
2119
|
+
columnId: r.id
|
|
2120
|
+
});
|
|
2121
|
+
},
|
|
2122
|
+
children: "입력 복구"
|
|
2123
|
+
}) : null]
|
|
2124
|
+
}, `${t.key}-${r.id}`)];
|
|
2125
|
+
}))
|
|
2126
|
+
}) : null
|
|
2127
|
+
]
|
|
2128
|
+
});
|
|
892
2129
|
}
|
|
893
2130
|
//#endregion
|
|
894
2131
|
//#region src/components/extended/DataGrid/DataGrid.tsx
|
|
895
|
-
|
|
896
|
-
|
|
2132
|
+
var Wt = ct({
|
|
2133
|
+
columnVisibilityFeature: Be,
|
|
2134
|
+
rowSelectionFeature: tt,
|
|
2135
|
+
rowSortingFeature: nt
|
|
2136
|
+
});
|
|
2137
|
+
function Gt(e) {
|
|
2138
|
+
return e.features ? /* @__PURE__ */ k(Ut, { ...e }) : /* @__PURE__ */ k(Kt, { ...e });
|
|
2139
|
+
}
|
|
2140
|
+
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, ...ue }) {
|
|
2141
|
+
let fe = N(null), F = N(null), I = N(null), pe = N(null), [he, ge] = P({
|
|
2142
|
+
head: 0,
|
|
2143
|
+
foot: 0,
|
|
2144
|
+
row: 32
|
|
2145
|
+
}), [_e, ve] = P(null), ye = M(), [L, xe] = P({
|
|
897
2146
|
row: 0,
|
|
898
2147
|
column: 0
|
|
899
|
-
}), [
|
|
2148
|
+
}), [R, z] = P(null), [Se, Ce] = P(""), we = N(null), Te = N(!1), B = !!x, V = oe(() => new Set(b ?? []), [b]), Ee = oe(() => new Set(E ?? []), [E]), H = oe(() => e.map((e) => ({
|
|
2149
|
+
data: e,
|
|
2150
|
+
key: a(e)
|
|
2151
|
+
})), [e, a]), De = oe(() => r.map((e) => ({
|
|
2152
|
+
id: e.id,
|
|
2153
|
+
accessorFn: (t) => e.value?.(t.data),
|
|
2154
|
+
enableHiding: e.hideable !== !1,
|
|
2155
|
+
enableSorting: !!e.sortable
|
|
2156
|
+
})), [r]), Oe = oe(() => Object.fromEntries([...Ee].map((e) => [e, !1])), [Ee]), U = oe(() => Object.fromEntries([...V].map((e) => [e, !0])), [V]), W = oe(() => C ? [{
|
|
2157
|
+
id: C.columnId,
|
|
2158
|
+
desc: C.direction === "desc"
|
|
2159
|
+
}] : [], [C]), Ae = lt({
|
|
2160
|
+
features: Wt,
|
|
2161
|
+
data: H,
|
|
2162
|
+
columns: De,
|
|
2163
|
+
getRowId: (e) => e.key,
|
|
2164
|
+
manualSorting: !0,
|
|
2165
|
+
state: {
|
|
2166
|
+
columnVisibility: Oe,
|
|
2167
|
+
rowSelection: U,
|
|
2168
|
+
sorting: W
|
|
2169
|
+
},
|
|
2170
|
+
onColumnVisibilityChange: (e) => {
|
|
2171
|
+
let t = et(e, Oe);
|
|
2172
|
+
D?.(Object.keys(t).filter((e) => t[e] === !1));
|
|
2173
|
+
},
|
|
2174
|
+
onRowSelectionChange: (e) => x?.(Object.keys(et(e, U))),
|
|
2175
|
+
onSortingChange: (e) => {
|
|
2176
|
+
let t = et(e, W)[0];
|
|
2177
|
+
w?.(t ? {
|
|
2178
|
+
columnId: t.id,
|
|
2179
|
+
direction: t.desc ? "desc" : "asc"
|
|
2180
|
+
} : null);
|
|
2181
|
+
}
|
|
2182
|
+
}), G = Ae.getRowModel().rows, je = new Map(r.map((e) => [e.id, e])), K = Ae.getVisibleLeafColumns().map((e) => ({
|
|
2183
|
+
id: e.id,
|
|
2184
|
+
kind: "data",
|
|
2185
|
+
column: je.get(e.id)
|
|
2186
|
+
}));
|
|
2187
|
+
B && K.unshift({
|
|
2188
|
+
id: "__select",
|
|
2189
|
+
kind: "select"
|
|
2190
|
+
});
|
|
2191
|
+
let Me = r.some((e) => e.footer), q = !!_ && v && e.length > 0, J = q ? "rows" : Nt(!!_, !!h, e.length), Ne = Pt(J, e.length, g), Pe = R ? G.findIndex((e) => e.id === R.key) : -1;
|
|
2192
|
+
j(() => {
|
|
2193
|
+
R && (J !== "rows" || Pe < 0 || Ee.has(R.columnId) || !r.some((e) => e.id === R.columnId)) && z(null);
|
|
2194
|
+
}, [
|
|
2195
|
+
R,
|
|
2196
|
+
Pe,
|
|
2197
|
+
Ee,
|
|
900
2198
|
r,
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
2199
|
+
J
|
|
2200
|
+
]);
|
|
2201
|
+
let Y = u && J === "rows", Fe = dt({
|
|
2202
|
+
count: G.length,
|
|
2203
|
+
getScrollElement: () => F.current,
|
|
2204
|
+
getItemKey: (e) => G[e].id,
|
|
2205
|
+
estimateSize: () => he.row,
|
|
2206
|
+
enabled: Y,
|
|
2207
|
+
overscan: 5,
|
|
2208
|
+
scrollMargin: he.head,
|
|
2209
|
+
scrollPaddingStart: he.head,
|
|
2210
|
+
scrollPaddingEnd: he.foot,
|
|
2211
|
+
rangeExtractor: (e) => [.../* @__PURE__ */ new Set([
|
|
2212
|
+
...ut(e),
|
|
2213
|
+
Math.min(L.row, G.length - 1),
|
|
2214
|
+
Pe,
|
|
2215
|
+
_e ?? -1
|
|
2216
|
+
])].filter((e) => e >= 0 && e < G.length).sort((e, t) => e - t)
|
|
2217
|
+
});
|
|
2218
|
+
j(() => {
|
|
2219
|
+
let e = () => {
|
|
2220
|
+
let e = fe.current?.querySelector("[data-part=\"row\"]"), t = {
|
|
2221
|
+
head: I.current?.getBoundingClientRect().height ?? 0,
|
|
2222
|
+
foot: pe.current?.getBoundingClientRect().height ?? 0,
|
|
2223
|
+
row: e && parseFloat(getComputedStyle(e).minBlockSize) || 32
|
|
2224
|
+
};
|
|
2225
|
+
ge((e) => e.head === t.head && e.foot === t.foot && e.row === t.row ? e : t), Fe.measure();
|
|
2226
|
+
};
|
|
2227
|
+
e();
|
|
2228
|
+
let t = new ResizeObserver(e);
|
|
2229
|
+
return I.current && t.observe(I.current), pe.current && t.observe(pe.current), () => t.disconnect();
|
|
2230
|
+
}, [
|
|
2231
|
+
c,
|
|
2232
|
+
K.length,
|
|
2233
|
+
u,
|
|
2234
|
+
J,
|
|
2235
|
+
Fe
|
|
2236
|
+
]);
|
|
2237
|
+
let Ie = Y ? Fe.getVirtualItems().map((e) => ({
|
|
2238
|
+
modelRow: G[e.index],
|
|
2239
|
+
index: e.index,
|
|
2240
|
+
start: e.start - he.head
|
|
2241
|
+
})) : G.map((e, t) => ({
|
|
2242
|
+
modelRow: e,
|
|
2243
|
+
index: t,
|
|
2244
|
+
start: 0
|
|
2245
|
+
}));
|
|
2246
|
+
j(() => {
|
|
2247
|
+
Te.current && Y && Fe.scrollToIndex(L.row, { align: "auto" }), Te.current = !1;
|
|
2248
|
+
}, [
|
|
2249
|
+
L.row,
|
|
2250
|
+
L.column,
|
|
2251
|
+
Y,
|
|
2252
|
+
Fe
|
|
2253
|
+
]);
|
|
2254
|
+
let X = ie((t, n, r) => {
|
|
2255
|
+
we.current = !0, Te.current = !0, xe((i) => Mt(i, {
|
|
905
2256
|
rows: e.length,
|
|
906
|
-
columns:
|
|
2257
|
+
columns: K.length
|
|
907
2258
|
}, t, n, r));
|
|
908
|
-
}, [e.length,
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
let n =
|
|
2259
|
+
}, [e.length, K.length]);
|
|
2260
|
+
j(() => {
|
|
2261
|
+
xe((t) => {
|
|
2262
|
+
let n = jt(t, {
|
|
912
2263
|
rows: e.length,
|
|
913
|
-
columns:
|
|
2264
|
+
columns: K.length
|
|
914
2265
|
});
|
|
915
2266
|
return n.row === t.row && n.column === t.column ? t : n;
|
|
916
2267
|
});
|
|
917
|
-
}, [e.length,
|
|
918
|
-
let
|
|
919
|
-
if (!t.editable || !
|
|
920
|
-
let n =
|
|
921
|
-
n?.pending || (
|
|
2268
|
+
}, [e.length, K.length]);
|
|
2269
|
+
let Le = (e) => Ae.getRow(a(e)).toggleSelected(), Re = e.length > 0 && e.every((e) => V.has(a(e))), Z = e.some((e) => V.has(a(e))), ze = () => Ae.toggleAllRowsSelected(!Re), Q = (e, t) => {
|
|
2270
|
+
if (!t.editable || !re) return;
|
|
2271
|
+
let n = ae?.(e, t);
|
|
2272
|
+
n?.pending || (Ce(n?.draft ?? t.value?.(e) ?? ""), z({
|
|
922
2273
|
key: a(e),
|
|
923
2274
|
columnId: t.id
|
|
924
2275
|
}));
|
|
925
|
-
},
|
|
926
|
-
|
|
927
|
-
},
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
} :
|
|
932
|
-
},
|
|
2276
|
+
}, Be = (e, t, n, r = !1) => {
|
|
2277
|
+
we.current = r, e && re && re(t, n.id, Se), z(null);
|
|
2278
|
+
}, Ve = (e, t) => {
|
|
2279
|
+
Ae.setSorting(t ? [{
|
|
2280
|
+
id: e.id,
|
|
2281
|
+
desc: t === "desc"
|
|
2282
|
+
}] : []);
|
|
2283
|
+
}, He = (e) => Ae.getColumn(e)?.toggleVisibility(), Ue = (t) => {
|
|
933
2284
|
let n = t.target;
|
|
934
|
-
if (t.defaultPrevented || !(n instanceof HTMLElement) || !n.matches(".data-grid__cell[role=\"gridcell\"]") || n.closest("[role=\"grid\"]") !== t.currentTarget ||
|
|
2285
|
+
if (t.defaultPrevented || !(n instanceof HTMLElement) || !n.matches(".data-grid__cell[role=\"gridcell\"]") || n.closest("[role=\"grid\"]") !== t.currentTarget || R) return;
|
|
935
2286
|
let r = {
|
|
936
|
-
ArrowDown: () =>
|
|
937
|
-
ArrowUp: () =>
|
|
938
|
-
ArrowRight: () =>
|
|
939
|
-
ArrowLeft: () =>
|
|
940
|
-
PageDown: () =>
|
|
941
|
-
PageUp: () =>
|
|
942
|
-
Home: () =>
|
|
2287
|
+
ArrowDown: () => X(1, 0),
|
|
2288
|
+
ArrowUp: () => X(-1, 0),
|
|
2289
|
+
ArrowRight: () => X(0, 1),
|
|
2290
|
+
ArrowLeft: () => X(0, -1),
|
|
2291
|
+
PageDown: () => X(10, 0),
|
|
2292
|
+
PageUp: () => X(-10, 0),
|
|
2293
|
+
Home: () => X(0, 0, t.ctrlKey || t.metaKey ? {
|
|
943
2294
|
row: 0,
|
|
944
2295
|
column: 0
|
|
945
2296
|
} : { column: 0 }),
|
|
946
|
-
End: () =>
|
|
2297
|
+
End: () => X(0, 0, t.ctrlKey || t.metaKey ? {
|
|
947
2298
|
row: e.length - 1,
|
|
948
|
-
column:
|
|
949
|
-
} : { column:
|
|
2299
|
+
column: K.length - 1
|
|
2300
|
+
} : { column: K.length - 1 })
|
|
950
2301
|
}[t.key];
|
|
951
2302
|
if (r) {
|
|
952
2303
|
t.preventDefault(), r();
|
|
953
2304
|
return;
|
|
954
2305
|
}
|
|
955
|
-
let i = e[
|
|
2306
|
+
let i = e[L.row], a = K[L.column];
|
|
956
2307
|
if (!(!i || !a)) {
|
|
957
2308
|
if (a.kind === "select" && (t.key === "Enter" || t.key === " ")) {
|
|
958
|
-
t.preventDefault(),
|
|
2309
|
+
t.preventDefault(), Le(i);
|
|
959
2310
|
return;
|
|
960
2311
|
}
|
|
961
|
-
if (a.kind === "data" && a.column.editable &&
|
|
962
|
-
t.preventDefault(),
|
|
2312
|
+
if (a.kind === "data" && a.column.editable && re && t.key === "Enter") {
|
|
2313
|
+
t.preventDefault(), Q(i, a.column);
|
|
963
2314
|
return;
|
|
964
2315
|
}
|
|
965
|
-
(t.key === "Enter" || t.key === " ") &&
|
|
2316
|
+
(t.key === "Enter" || t.key === " ") && d && (t.preventDefault(), d(i));
|
|
966
2317
|
}
|
|
967
|
-
},
|
|
2318
|
+
}, We = ie((e) => {
|
|
968
2319
|
if (!e) return;
|
|
969
|
-
let t =
|
|
970
|
-
|
|
2320
|
+
let t = we.current ?? fe.current?.contains(document.activeElement);
|
|
2321
|
+
we.current = null, t && (e.focus({ preventScroll: !0 }), e.scrollIntoView({
|
|
971
2322
|
block: "nearest",
|
|
972
2323
|
inline: "nearest"
|
|
973
2324
|
}));
|
|
974
|
-
}, []),
|
|
975
|
-
checked:
|
|
976
|
-
indeterminate: !
|
|
977
|
-
onChange:
|
|
978
|
-
"aria-label":
|
|
2325
|
+
}, []), Ge = (e) => e.kind === "select" ? /* @__PURE__ */ k(p, {
|
|
2326
|
+
checked: Re,
|
|
2327
|
+
indeterminate: !Re && Z,
|
|
2328
|
+
onChange: ze,
|
|
2329
|
+
"aria-label": Re ? "전부 고르기 해제" : "전부 고르기",
|
|
979
2330
|
"data-part": "select-all"
|
|
980
2331
|
}) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("span", {
|
|
981
2332
|
className: "data-grid__header-label",
|
|
982
2333
|
children: e.column.header
|
|
983
|
-
}), e.column.sortable &&
|
|
2334
|
+
}), e.column.sortable && w || e.column.hideable !== !1 && D ? /* @__PURE__ */ k(ne, {
|
|
984
2335
|
items: /* @__PURE__ */ A(O, { children: [
|
|
985
|
-
e.column.sortable &&
|
|
2336
|
+
e.column.sortable && w ? /* @__PURE__ */ A(O, { children: [
|
|
986
2337
|
/* @__PURE__ */ k(T, {
|
|
987
|
-
icon:
|
|
988
|
-
onSelect: () =>
|
|
2338
|
+
icon: de,
|
|
2339
|
+
onSelect: () => Ve(e.column, "asc"),
|
|
989
2340
|
children: "오름차순"
|
|
990
2341
|
}),
|
|
991
2342
|
/* @__PURE__ */ k(T, {
|
|
992
|
-
icon:
|
|
993
|
-
onSelect: () =>
|
|
2343
|
+
icon: ce,
|
|
2344
|
+
onSelect: () => Ve(e.column, "desc"),
|
|
994
2345
|
children: "내림차순"
|
|
995
2346
|
}),
|
|
996
|
-
|
|
997
|
-
onSelect: () =>
|
|
2347
|
+
C?.columnId === e.column.id ? /* @__PURE__ */ k(T, {
|
|
2348
|
+
onSelect: () => Ve(e.column, null),
|
|
998
2349
|
children: "정렬 없애기"
|
|
999
2350
|
}) : null
|
|
1000
2351
|
] }) : null,
|
|
1001
|
-
e.column.sortable &&
|
|
1002
|
-
e.column.hideable !== !1 &&
|
|
1003
|
-
icon:
|
|
1004
|
-
onSelect: () =>
|
|
2352
|
+
e.column.sortable && w && e.column.hideable !== !1 && D ? /* @__PURE__ */ k(te, {}) : null,
|
|
2353
|
+
e.column.hideable !== !1 && D ? /* @__PURE__ */ k(T, {
|
|
2354
|
+
icon: be,
|
|
2355
|
+
onSelect: () => He(e.column.id),
|
|
1005
2356
|
children: "이 열 숨기기"
|
|
1006
2357
|
}) : null
|
|
1007
2358
|
] }),
|
|
1008
2359
|
children: /* @__PURE__ */ k(t, {
|
|
1009
|
-
icon:
|
|
2360
|
+
icon: me,
|
|
1010
2361
|
label: `${e.column.header} 열 설정`,
|
|
1011
2362
|
variant: "ghost",
|
|
1012
2363
|
tone: "neutral",
|
|
@@ -1015,18 +2366,18 @@ function $e({ rows: e, columns: r, changed: i, rowKey: a, label: o, pinFirst: s,
|
|
|
1015
2366
|
})
|
|
1016
2367
|
}) : null] });
|
|
1017
2368
|
return /* @__PURE__ */ A("div", {
|
|
1018
|
-
...
|
|
1019
|
-
className: `data-grid ${
|
|
2369
|
+
...ue,
|
|
2370
|
+
className: `data-grid ${le ?? ""}`.trim(),
|
|
1020
2371
|
"data-row-density": c,
|
|
1021
2372
|
"data-height": l,
|
|
1022
2373
|
"data-pinned": s ? "" : void 0,
|
|
1023
2374
|
children: [
|
|
1024
|
-
|
|
2375
|
+
D ? /* @__PURE__ */ k("div", {
|
|
1025
2376
|
className: "data-grid__bar",
|
|
1026
2377
|
children: /* @__PURE__ */ k(ne, {
|
|
1027
2378
|
items: r.map((e) => /* @__PURE__ */ k(ee, {
|
|
1028
|
-
checked: !
|
|
1029
|
-
onCheckedChange: () =>
|
|
2379
|
+
checked: !Ee.has(e.id),
|
|
2380
|
+
onCheckedChange: () => He(e.id),
|
|
1030
2381
|
disabled: e.hideable === !1,
|
|
1031
2382
|
children: e.header
|
|
1032
2383
|
}, e.id)),
|
|
@@ -1034,11 +2385,11 @@ function $e({ rows: e, columns: r, changed: i, rowKey: a, label: o, pinFirst: s,
|
|
|
1034
2385
|
variant: "outline",
|
|
1035
2386
|
tone: "neutral",
|
|
1036
2387
|
size: "sm",
|
|
1037
|
-
iconStart:
|
|
2388
|
+
iconStart: ke,
|
|
1038
2389
|
"data-part": "columns",
|
|
1039
2390
|
children: [
|
|
1040
2391
|
"열 ",
|
|
1041
|
-
r.length -
|
|
2392
|
+
r.length - Ee.size,
|
|
1042
2393
|
"/",
|
|
1043
2394
|
r.length
|
|
1044
2395
|
]
|
|
@@ -1046,49 +2397,61 @@ function $e({ rows: e, columns: r, changed: i, rowKey: a, label: o, pinFirst: s,
|
|
|
1046
2397
|
})
|
|
1047
2398
|
}) : null,
|
|
1048
2399
|
/* @__PURE__ */ k("div", {
|
|
2400
|
+
ref: F,
|
|
1049
2401
|
className: "data-grid__scroll",
|
|
1050
2402
|
"data-part": "scroll",
|
|
1051
2403
|
children: /* @__PURE__ */ A("div", {
|
|
1052
|
-
ref:
|
|
2404
|
+
ref: fe,
|
|
1053
2405
|
className: "data-grid__grid",
|
|
1054
2406
|
role: "grid",
|
|
1055
2407
|
"aria-label": o,
|
|
1056
|
-
"aria-describedby":
|
|
1057
|
-
"aria-rowcount":
|
|
1058
|
-
"aria-colcount":
|
|
1059
|
-
"aria-multiselectable":
|
|
1060
|
-
onKeyDown:
|
|
2408
|
+
"aria-describedby": q ? `${ye}-refresh` : void 0,
|
|
2409
|
+
"aria-rowcount": Ne + 1 + +!!Me,
|
|
2410
|
+
"aria-colcount": K.length,
|
|
2411
|
+
"aria-multiselectable": B || void 0,
|
|
2412
|
+
onKeyDown: Ue,
|
|
2413
|
+
onFocusCapture: (e) => {
|
|
2414
|
+
if (e.target.closest("[role=\"grid\"]") !== e.currentTarget) return;
|
|
2415
|
+
let t = e.target.closest("[data-part=\"row\"]");
|
|
2416
|
+
ve(t ? Number(t.dataset.index) : null);
|
|
2417
|
+
},
|
|
2418
|
+
onBlurCapture: (e) => {
|
|
2419
|
+
e.currentTarget.contains(e.relatedTarget) || ve(null);
|
|
2420
|
+
},
|
|
1061
2421
|
children: [
|
|
1062
2422
|
/* @__PURE__ */ k("div", {
|
|
2423
|
+
ref: I,
|
|
1063
2424
|
role: "rowgroup",
|
|
1064
2425
|
className: "data-grid__head",
|
|
1065
2426
|
children: /* @__PURE__ */ k("div", {
|
|
1066
2427
|
role: "row",
|
|
1067
2428
|
className: "data-grid__row",
|
|
1068
2429
|
"aria-rowindex": 1,
|
|
1069
|
-
children:
|
|
2430
|
+
children: K.map((e, t) => /* @__PURE__ */ k("div", {
|
|
1070
2431
|
role: "columnheader",
|
|
1071
2432
|
className: "data-grid__cell",
|
|
1072
2433
|
"aria-colindex": t + 1,
|
|
1073
|
-
"aria-sort": e.kind === "data" && e.column.sortable ?
|
|
2434
|
+
"aria-sort": e.kind === "data" && e.column.sortable ? C?.columnId === e.column.id ? C.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
1074
2435
|
"data-width": e.kind === "select" ? "select" : e.column.width ?? "md",
|
|
1075
2436
|
"data-align": e.kind === "select" ? "start" : e.column.align ?? "start",
|
|
1076
2437
|
"data-pin": s && t === 0 ? "" : void 0,
|
|
1077
2438
|
"data-part": e.kind === "select" ? "select-header" : void 0,
|
|
1078
|
-
children:
|
|
2439
|
+
children: Ge(e)
|
|
1079
2440
|
}, e.id))
|
|
1080
2441
|
})
|
|
1081
2442
|
}),
|
|
1082
2443
|
/* @__PURE__ */ A("div", {
|
|
1083
2444
|
role: "rowgroup",
|
|
1084
2445
|
className: "data-grid__body",
|
|
1085
|
-
"aria-busy":
|
|
1086
|
-
|
|
2446
|
+
"aria-busy": J === "loading" || void 0,
|
|
2447
|
+
"data-virtualized": Y ? "" : void 0,
|
|
2448
|
+
style: { "--data-grid-total": `${Y ? Fe.getTotalSize() : 0}px` },
|
|
2449
|
+
children: [J === "loading" ? Array.from({ length: g }, (e, t) => /* @__PURE__ */ k("div", {
|
|
1087
2450
|
role: "row",
|
|
1088
2451
|
className: "data-grid__row",
|
|
1089
2452
|
"aria-rowindex": t + 2,
|
|
1090
2453
|
"data-part": "waiting-row",
|
|
1091
|
-
children:
|
|
2454
|
+
children: K.map((e, t) => /* @__PURE__ */ k("div", {
|
|
1092
2455
|
role: "gridcell",
|
|
1093
2456
|
className: "data-grid__cell",
|
|
1094
2457
|
"aria-colindex": t + 1,
|
|
@@ -1099,76 +2462,80 @@ function $e({ rows: e, columns: r, changed: i, rowKey: a, label: o, pinFirst: s,
|
|
|
1099
2462
|
lines: 1
|
|
1100
2463
|
})
|
|
1101
2464
|
}, e.id))
|
|
1102
|
-
}, `waiting-${t}`)) : null,
|
|
1103
|
-
let
|
|
2465
|
+
}, `waiting-${t}`)) : null, J === "rows" ? Ie.map(({ modelRow: e, index: t, start: n }) => {
|
|
2466
|
+
let r = e.original.data, a = e.id, o = e.getIsSelected();
|
|
1104
2467
|
return /* @__PURE__ */ k("div", {
|
|
1105
2468
|
role: "row",
|
|
1106
2469
|
className: "data-grid__row",
|
|
1107
2470
|
"aria-rowindex": t + 2,
|
|
1108
|
-
"aria-selected":
|
|
2471
|
+
"aria-selected": B ? o : void 0,
|
|
1109
2472
|
"data-part": "row",
|
|
1110
|
-
"data-
|
|
1111
|
-
|
|
1112
|
-
|
|
2473
|
+
"data-index": t,
|
|
2474
|
+
ref: Y ? Fe.measureElement : void 0,
|
|
2475
|
+
style: { "--data-grid-offset": `${n}px` },
|
|
2476
|
+
"data-selected": o ? "" : void 0,
|
|
2477
|
+
children: K.map((e, n) => {
|
|
2478
|
+
let c = L.row === t && L.column === n, l = e.kind === "data" && R?.key === a && R.columnId === e.column.id, u = e.kind === "data" ? ae?.(r, e.column) : void 0;
|
|
1113
2479
|
return /* @__PURE__ */ k("div", {
|
|
1114
|
-
ref: c && !l ?
|
|
2480
|
+
ref: c && !l ? We : void 0,
|
|
1115
2481
|
role: "gridcell",
|
|
1116
2482
|
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 &&
|
|
2483
|
+
"aria-colindex": n + 1,
|
|
2484
|
+
"aria-busy": u?.pending || void 0,
|
|
2485
|
+
"aria-describedby": u?.pending || u?.error ? `${ye}-${t}-${n}` : void 0,
|
|
2486
|
+
"data-save-error": u?.error ? "" : void 0,
|
|
2487
|
+
"data-width": e.kind === "select" ? "select" : e.column.width ?? "md",
|
|
2488
|
+
"data-align": e.kind === "select" ? "start" : e.column.align ?? "start",
|
|
2489
|
+
"data-numeric": e.kind === "data" && e.column.numeric ? "" : void 0,
|
|
2490
|
+
"data-pin": s && n === 0 ? "" : void 0,
|
|
1125
2491
|
"data-here": c ? "" : void 0,
|
|
1126
|
-
"data-editable":
|
|
2492
|
+
"data-editable": e.kind === "data" && e.column.editable && re ? "" : void 0,
|
|
1127
2493
|
tabIndex: c && !l ? 0 : -1,
|
|
1128
2494
|
onFocus: (e) => {
|
|
1129
|
-
e.target === e.currentTarget &&
|
|
2495
|
+
e.target === e.currentTarget && xe({
|
|
1130
2496
|
row: t,
|
|
1131
|
-
column:
|
|
2497
|
+
column: n
|
|
1132
2498
|
});
|
|
1133
2499
|
},
|
|
1134
|
-
onDoubleClick:
|
|
1135
|
-
children:
|
|
1136
|
-
checked:
|
|
1137
|
-
onChange: () =>
|
|
1138
|
-
"aria-label":
|
|
2500
|
+
onDoubleClick: e.kind === "data" && e.column.editable && re ? () => Q(r, e.column) : d ? () => d(r) : void 0,
|
|
2501
|
+
children: e.kind === "select" ? /* @__PURE__ */ k(p, {
|
|
2502
|
+
checked: o,
|
|
2503
|
+
onChange: () => Le(r),
|
|
2504
|
+
"aria-label": S ? S(r) : `${a} 고르기`,
|
|
1139
2505
|
"data-part": "select-row"
|
|
1140
2506
|
}) : l ? /* @__PURE__ */ k("input", {
|
|
1141
2507
|
className: "data-grid__editor",
|
|
1142
2508
|
ref: (e) => e?.focus(),
|
|
1143
|
-
value:
|
|
1144
|
-
"aria-label": `${
|
|
2509
|
+
value: Se,
|
|
2510
|
+
"aria-label": `${e.column.header} 고치기`,
|
|
1145
2511
|
"data-part": "editor",
|
|
1146
|
-
onChange: (e) =>
|
|
1147
|
-
onBlur: () =>
|
|
2512
|
+
onChange: (e) => Ce(e.target.value),
|
|
2513
|
+
onBlur: () => Be(!0, r, e.column),
|
|
1148
2514
|
onKeyDown: (t) => {
|
|
1149
|
-
t.stopPropagation(), !(t.nativeEvent.isComposing || t.nativeEvent.keyCode === 229) && (t.key === "Enter" ? (t.preventDefault(),
|
|
2515
|
+
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
2516
|
}
|
|
1151
2517
|
}) : /* @__PURE__ */ A(O, { children: [(() => {
|
|
1152
|
-
let t = i?.(
|
|
2518
|
+
let t = i?.(r, e.column);
|
|
1153
2519
|
return t === void 0 ? null : /* @__PURE__ */ k("span", {
|
|
1154
2520
|
className: "data-grid__flash",
|
|
1155
2521
|
"data-part": "flash",
|
|
1156
2522
|
"aria-hidden": "true"
|
|
1157
2523
|
}, t);
|
|
1158
|
-
})(),
|
|
1159
|
-
},
|
|
2524
|
+
})(), e.column.cell(r)] })
|
|
2525
|
+
}, e.id);
|
|
1160
2526
|
})
|
|
1161
|
-
},
|
|
2527
|
+
}, a);
|
|
1162
2528
|
}) : null]
|
|
1163
2529
|
}),
|
|
1164
|
-
|
|
2530
|
+
Me ? /* @__PURE__ */ k("div", {
|
|
2531
|
+
ref: pe,
|
|
1165
2532
|
role: "rowgroup",
|
|
1166
2533
|
className: "data-grid__foot",
|
|
1167
2534
|
children: /* @__PURE__ */ k("div", {
|
|
1168
2535
|
role: "row",
|
|
1169
2536
|
className: "data-grid__row",
|
|
1170
|
-
"aria-rowindex":
|
|
1171
|
-
children:
|
|
2537
|
+
"aria-rowindex": Ne + 2,
|
|
2538
|
+
children: K.map((t, n) => /* @__PURE__ */ k("div", {
|
|
1172
2539
|
role: "gridcell",
|
|
1173
2540
|
className: "data-grid__cell",
|
|
1174
2541
|
"aria-colindex": n + 1,
|
|
@@ -1183,74 +2550,74 @@ function $e({ rows: e, columns: r, changed: i, rowKey: a, label: o, pinFirst: s,
|
|
|
1183
2550
|
]
|
|
1184
2551
|
})
|
|
1185
2552
|
}),
|
|
1186
|
-
|
|
2553
|
+
J === "error" || q ? /* @__PURE__ */ A("p", {
|
|
1187
2554
|
className: "data-grid__state",
|
|
1188
2555
|
role: "alert",
|
|
1189
2556
|
"data-part": "error",
|
|
1190
|
-
id: `${
|
|
1191
|
-
"data-retained":
|
|
1192
|
-
children: [
|
|
1193
|
-
}) :
|
|
2557
|
+
id: `${ye}-refresh`,
|
|
2558
|
+
"data-retained": q ? "" : void 0,
|
|
2559
|
+
children: [_, q ? /* @__PURE__ */ A(O, { children: [" 이전 결과를 표시합니다.", y ? /* @__PURE__ */ A(O, { children: [" 마지막 갱신: ", y] }) : null] }) : null]
|
|
2560
|
+
}) : J === "empty" ? /* @__PURE__ */ k("p", {
|
|
1194
2561
|
className: "data-grid__empty",
|
|
1195
2562
|
"data-part": "empty",
|
|
1196
|
-
children:
|
|
2563
|
+
children: f
|
|
1197
2564
|
}) : null,
|
|
1198
|
-
|
|
2565
|
+
ae && J === "rows" ? /* @__PURE__ */ k("ul", {
|
|
1199
2566
|
className: "data-grid__save-status",
|
|
1200
2567
|
"data-part": "save-status",
|
|
1201
|
-
children: e.flatMap((e, t) =>
|
|
2568
|
+
children: e.flatMap((e, t) => K.flatMap((r, i) => {
|
|
1202
2569
|
if (r.kind !== "data") return [];
|
|
1203
|
-
let o =
|
|
2570
|
+
let o = ae(e, r.column);
|
|
1204
2571
|
return !o?.pending && !o?.error ? [] : [/* @__PURE__ */ A("li", {
|
|
1205
|
-
id: `${
|
|
2572
|
+
id: `${ye}-${t}-${i}`,
|
|
1206
2573
|
children: [/* @__PURE__ */ A("span", {
|
|
1207
2574
|
role: o.pending ? "status" : "alert",
|
|
1208
2575
|
children: [
|
|
1209
|
-
|
|
2576
|
+
S ? S(e) : a(e),
|
|
1210
2577
|
" · ",
|
|
1211
2578
|
r.column.header,
|
|
1212
2579
|
": ",
|
|
1213
2580
|
o.pending ? "저장 중입니다" : o.error
|
|
1214
2581
|
]
|
|
1215
|
-
}), !o.pending && o.error && r.column.editable &&
|
|
2582
|
+
}), !o.pending && o.error && r.column.editable && re ? /* @__PURE__ */ k(n, {
|
|
1216
2583
|
size: "sm",
|
|
1217
2584
|
variant: "outline",
|
|
1218
|
-
onClick: () =>
|
|
2585
|
+
onClick: () => Q(e, r.column),
|
|
1219
2586
|
"data-part": "recover-draft",
|
|
1220
2587
|
children: "입력 복구"
|
|
1221
2588
|
}) : null]
|
|
1222
2589
|
}, JSON.stringify([a(e), r.id]))];
|
|
1223
2590
|
}))
|
|
1224
2591
|
}) : null,
|
|
1225
|
-
|
|
2592
|
+
se ? /* @__PURE__ */ k("p", {
|
|
1226
2593
|
className: "data-grid__meta",
|
|
1227
2594
|
role: "status",
|
|
1228
2595
|
"data-part": "meta",
|
|
1229
|
-
children:
|
|
2596
|
+
children: se
|
|
1230
2597
|
}) : null
|
|
1231
2598
|
]
|
|
1232
2599
|
});
|
|
1233
2600
|
}
|
|
1234
2601
|
//#endregion
|
|
1235
2602
|
//#region src/components/extended/Dropzone/Dropzone.tsx
|
|
1236
|
-
function
|
|
2603
|
+
function qt(e, t) {
|
|
1237
2604
|
let n = (e ?? "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
1238
2605
|
if (n.length === 0) return !0;
|
|
1239
2606
|
let r = t.name.toLowerCase(), i = t.type.toLowerCase();
|
|
1240
2607
|
return n.some((e) => e.startsWith(".") ? r.endsWith(e) : e.endsWith("/*") ? i.startsWith(e.slice(0, -1)) : i === e);
|
|
1241
2608
|
}
|
|
1242
|
-
var
|
|
1243
|
-
done:
|
|
1244
|
-
failed:
|
|
1245
|
-
},
|
|
2609
|
+
var Jt = {
|
|
2610
|
+
done: pe,
|
|
2611
|
+
failed: J
|
|
2612
|
+
}, Yt = {
|
|
1246
2613
|
queued: "대기 중",
|
|
1247
2614
|
uploading: "올리는 중",
|
|
1248
2615
|
done: "완료",
|
|
1249
2616
|
failed: "실패"
|
|
1250
2617
|
};
|
|
1251
|
-
function
|
|
1252
|
-
let m =
|
|
1253
|
-
let t = Array.from(e ?? []), n = [], r = t.filter((e) =>
|
|
2618
|
+
function Xt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, name: c, onFiles: l, files: u = [], disabled: d, className: f, ...p }) {
|
|
2619
|
+
let m = M(), h = N(0), g = N(null), [v, y] = P(!1), [b, x] = P([]), S = (e) => {
|
|
2620
|
+
let t = Array.from(e ?? []), n = [], r = t.filter((e) => qt(a, e) ? !0 : (n.push(`${e.name} — 받지 않는 형식입니다. ${a}만 받습니다`), !1));
|
|
1254
2621
|
return x(n), o ? r : r.slice(0, 1);
|
|
1255
2622
|
}, C = (e) => {
|
|
1256
2623
|
if (d) return;
|
|
@@ -1261,9 +2628,9 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1261
2628
|
n.files = e.files;
|
|
1262
2629
|
}
|
|
1263
2630
|
(c || t.length > 0) && l(t);
|
|
1264
|
-
},
|
|
2631
|
+
}, ee = (e) => {
|
|
1265
2632
|
d || (e.preventDefault(), h.current += 1, y(!0));
|
|
1266
|
-
},
|
|
2633
|
+
}, te = () => {
|
|
1267
2634
|
h.current = Math.max(0, h.current - 1), h.current === 0 && y(!1);
|
|
1268
2635
|
};
|
|
1269
2636
|
return /* @__PURE__ */ A("div", {
|
|
@@ -1276,17 +2643,17 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1276
2643
|
htmlFor: m,
|
|
1277
2644
|
"data-over": v ? "" : void 0,
|
|
1278
2645
|
"data-part": "area",
|
|
1279
|
-
onDragEnter:
|
|
2646
|
+
onDragEnter: ee,
|
|
1280
2647
|
onDragOver: (e) => {
|
|
1281
2648
|
d || e.preventDefault();
|
|
1282
2649
|
},
|
|
1283
|
-
onDragLeave:
|
|
2650
|
+
onDragLeave: te,
|
|
1284
2651
|
onDrop: (e) => {
|
|
1285
2652
|
d || (e.preventDefault(), h.current = 0, y(!1), e.dataTransfer.files.length !== 0 && C(e.dataTransfer.files));
|
|
1286
2653
|
},
|
|
1287
2654
|
children: [
|
|
1288
2655
|
i === void 0 ? /* @__PURE__ */ k(r, {
|
|
1289
|
-
icon:
|
|
2656
|
+
icon: Me,
|
|
1290
2657
|
size: "md",
|
|
1291
2658
|
className: "dropzone__glyph",
|
|
1292
2659
|
"aria-hidden": "true"
|
|
@@ -1336,7 +2703,7 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1336
2703
|
className: "dropzone__file-name",
|
|
1337
2704
|
children: [
|
|
1338
2705
|
/* @__PURE__ */ k(_, {
|
|
1339
|
-
icon: n === "done" || n === "failed" ?
|
|
2706
|
+
icon: n === "done" || n === "failed" ? Jt[n] : void 0,
|
|
1340
2707
|
tone: n === "done" ? "success" : n === "failed" ? "danger" : "neutral",
|
|
1341
2708
|
size: "xs",
|
|
1342
2709
|
className: "dropzone__file-glyph",
|
|
@@ -1345,7 +2712,7 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1345
2712
|
e.name,
|
|
1346
2713
|
/* @__PURE__ */ k("span", {
|
|
1347
2714
|
className: "dropzone__said",
|
|
1348
|
-
children: ` — ${
|
|
2715
|
+
children: ` — ${Yt[n]}`
|
|
1349
2716
|
})
|
|
1350
2717
|
]
|
|
1351
2718
|
}), n === "failed" && e.error ? /* @__PURE__ */ k("p", {
|
|
@@ -1369,7 +2736,7 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1369
2736
|
/* @__PURE__ */ A("div", {
|
|
1370
2737
|
className: "dropzone__file-actions",
|
|
1371
2738
|
children: [n === "failed" && e.onRetry ? /* @__PURE__ */ k(t, {
|
|
1372
|
-
icon:
|
|
2739
|
+
icon: V,
|
|
1373
2740
|
label: `${e.name} 다시 올리기`,
|
|
1374
2741
|
size: "sm",
|
|
1375
2742
|
variant: "ghost",
|
|
@@ -1377,7 +2744,7 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1377
2744
|
onClick: e.onRetry,
|
|
1378
2745
|
"data-part": "retry"
|
|
1379
2746
|
}) : null, e.onCancel ? /* @__PURE__ */ k(t, {
|
|
1380
|
-
icon:
|
|
2747
|
+
icon: q,
|
|
1381
2748
|
label: n === "done" ? `${e.name} 지우기` : `${e.name} 취소`,
|
|
1382
2749
|
size: "sm",
|
|
1383
2750
|
variant: "ghost",
|
|
@@ -1395,13 +2762,13 @@ function rt({ label: e, hint: n, illustration: i, accept: a, multiple: o = !0, n
|
|
|
1395
2762
|
}
|
|
1396
2763
|
//#endregion
|
|
1397
2764
|
//#region src/components/extended/FeedbackControl/FeedbackControl.tsx
|
|
1398
|
-
function
|
|
1399
|
-
let d =
|
|
1400
|
-
|
|
2765
|
+
function Zt({ value: e, onRate: t, reasons: r = [], onReasons: i, askOn: a = "down", label: o = "이 답이 도움이 됐나요?", noteLabel: s = "더 알려 주실 것이 있나요?", className: c, ...u }) {
|
|
2766
|
+
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");
|
|
2767
|
+
j(() => {
|
|
1401
2768
|
m([]), g(""), v(!1);
|
|
1402
2769
|
}, [e]);
|
|
1403
|
-
let b = (n) => t(e === n ? null : n), S =
|
|
1404
|
-
|
|
2770
|
+
let b = (n) => t(e === n ? null : n), S = N(!1);
|
|
2771
|
+
j(() => {
|
|
1405
2772
|
S.current && (S.current = !1, document.activeElement === document.body && (d.current?.querySelector(`[data-part="${e === "up" ? "up" : "down"}"]`) ?? d.current)?.focus());
|
|
1406
2773
|
}, [_]);
|
|
1407
2774
|
let C = () => {
|
|
@@ -1422,7 +2789,7 @@ function it({ value: e, onRate: t, reasons: r = [], onReasons: i, askOn: a = "do
|
|
|
1422
2789
|
children: o
|
|
1423
2790
|
}),
|
|
1424
2791
|
/* @__PURE__ */ k(x, {
|
|
1425
|
-
icon:
|
|
2792
|
+
icon: je,
|
|
1426
2793
|
pressed: e === "up",
|
|
1427
2794
|
onPressedChange: () => b("up"),
|
|
1428
2795
|
variant: "ghost",
|
|
@@ -1433,7 +2800,7 @@ function it({ value: e, onRate: t, reasons: r = [], onReasons: i, askOn: a = "do
|
|
|
1433
2800
|
children: "도움이 됐어요"
|
|
1434
2801
|
}),
|
|
1435
2802
|
/* @__PURE__ */ k(x, {
|
|
1436
|
-
icon:
|
|
2803
|
+
icon: G,
|
|
1437
2804
|
pressed: e === "down",
|
|
1438
2805
|
onPressedChange: () => b("down"),
|
|
1439
2806
|
variant: "ghost",
|
|
@@ -1495,7 +2862,7 @@ function it({ value: e, onRate: t, reasons: r = [], onReasons: i, askOn: a = "do
|
|
|
1495
2862
|
}
|
|
1496
2863
|
//#endregion
|
|
1497
2864
|
//#region src/components/extended/FilterBuilder/FilterBuilder.tsx
|
|
1498
|
-
var
|
|
2865
|
+
var Qt = {
|
|
1499
2866
|
text: [
|
|
1500
2867
|
{
|
|
1501
2868
|
value: "contains",
|
|
@@ -1557,27 +2924,27 @@ var at = {
|
|
|
1557
2924
|
value: "isnot",
|
|
1558
2925
|
label: "아님"
|
|
1559
2926
|
}]
|
|
1560
|
-
},
|
|
1561
|
-
function
|
|
2927
|
+
}, $t = /* @__PURE__ */ new Set(["empty"]);
|
|
2928
|
+
function en(e, t) {
|
|
1562
2929
|
let n = e[0];
|
|
1563
2930
|
return {
|
|
1564
2931
|
id: t,
|
|
1565
2932
|
field: n.id,
|
|
1566
|
-
operator:
|
|
2933
|
+
operator: Qt[n.type][0].value,
|
|
1567
2934
|
value: ""
|
|
1568
2935
|
};
|
|
1569
2936
|
}
|
|
1570
|
-
function
|
|
2937
|
+
function tn({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, label: c, addLabel: l = "조건 추가", className: u, ...f }) {
|
|
1571
2938
|
let p = (t) => e.find((e) => e.id === t) ?? e[0], m = (e, t) => i(r.map((n) => n.id === e ? {
|
|
1572
2939
|
...n,
|
|
1573
2940
|
...t
|
|
1574
|
-
} : n)), h =
|
|
1575
|
-
|
|
2941
|
+
} : n)), h = N(null), g = M(), _ = N(0);
|
|
2942
|
+
j(() => {
|
|
1576
2943
|
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 :
|
|
2944
|
+
r.every((e) => t.has(e.field)) || i(r.map((n) => t.has(n.field) ? n : en(e, n.id)));
|
|
1578
2945
|
}, [e, r]);
|
|
1579
|
-
let v =
|
|
1580
|
-
return
|
|
2946
|
+
let v = N(null);
|
|
2947
|
+
return j(() => {
|
|
1581
2948
|
let e = v.current;
|
|
1582
2949
|
if (e === null || (v.current = null, document.activeElement !== document.body)) return;
|
|
1583
2950
|
let t = h.current?.querySelectorAll("[data-part=\"remove\"]");
|
|
@@ -1592,7 +2959,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1592
2959
|
children: [/* @__PURE__ */ k("ul", {
|
|
1593
2960
|
className: "filter-builder__rules",
|
|
1594
2961
|
children: r.map((n, c) => {
|
|
1595
|
-
let l = p(n.field), u =
|
|
2962
|
+
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
2963
|
return /* @__PURE__ */ A("li", {
|
|
1597
2964
|
className: "filter-builder__rule",
|
|
1598
2965
|
"data-part": "rule",
|
|
@@ -1630,7 +2997,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1630
2997
|
let t = p(e.target.value);
|
|
1631
2998
|
m(n.id, {
|
|
1632
2999
|
field: t.id,
|
|
1633
|
-
operator:
|
|
3000
|
+
operator: Qt[t.type][0].value,
|
|
1634
3001
|
value: ""
|
|
1635
3002
|
});
|
|
1636
3003
|
},
|
|
@@ -1646,7 +3013,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1646
3013
|
let t = e.target.value;
|
|
1647
3014
|
m(n.id, {
|
|
1648
3015
|
operator: t,
|
|
1649
|
-
|
|
3016
|
+
...$t.has(t) ? { value: "" } : null
|
|
1650
3017
|
});
|
|
1651
3018
|
},
|
|
1652
3019
|
"aria-label": `${l.label}에 적용할 연산자`,
|
|
@@ -1658,7 +3025,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1658
3025
|
}),
|
|
1659
3026
|
/* @__PURE__ */ k("span", {
|
|
1660
3027
|
className: "filter-builder__value",
|
|
1661
|
-
children:
|
|
3028
|
+
children: $t.has(f.value) ? /* @__PURE__ */ k("span", {
|
|
1662
3029
|
className: "filter-builder__none",
|
|
1663
3030
|
children: "값 없음"
|
|
1664
3031
|
}) : l.type === "choice" ? /* @__PURE__ */ A(d, {
|
|
@@ -1684,7 +3051,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1684
3051
|
})
|
|
1685
3052
|
}),
|
|
1686
3053
|
/* @__PURE__ */ k(t, {
|
|
1687
|
-
icon:
|
|
3054
|
+
icon: q,
|
|
1688
3055
|
label: `${h} 조건 지우기`,
|
|
1689
3056
|
size: "sm",
|
|
1690
3057
|
onClick: () => {
|
|
@@ -1700,7 +3067,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1700
3067
|
tone: "neutral",
|
|
1701
3068
|
size: "sm",
|
|
1702
3069
|
onClick: () => {
|
|
1703
|
-
_.current += 1, i([...r,
|
|
3070
|
+
_.current += 1, i([...r, en(e, `rule-${g}-${_.current}`)]);
|
|
1704
3071
|
},
|
|
1705
3072
|
"data-part": "add",
|
|
1706
3073
|
children: l
|
|
@@ -1709,7 +3076,7 @@ function ct({ fields: e, rules: r, onRulesChange: i, join: a, onJoinChange: s, l
|
|
|
1709
3076
|
}
|
|
1710
3077
|
//#endregion
|
|
1711
3078
|
//#region src/components/extended/FollowUpList/FollowUpList.tsx
|
|
1712
|
-
function
|
|
3079
|
+
function nn({ items: e, onAsk: t, label: n = "이어서 물어볼 것", collapsible: i, defaultOpen: a = !0, className: o, ...s }) {
|
|
1713
3080
|
let c = /* @__PURE__ */ k("ul", {
|
|
1714
3081
|
className: "follow-up-list__items",
|
|
1715
3082
|
children: e.map((e) => /* @__PURE__ */ k("li", { children: /* @__PURE__ */ A("button", {
|
|
@@ -1718,7 +3085,7 @@ function lt({ items: e, onAsk: t, label: n = "이어서 물어볼 것", collapsi
|
|
|
1718
3085
|
onClick: () => t(e),
|
|
1719
3086
|
"data-part": "ask",
|
|
1720
3087
|
children: [/* @__PURE__ */ k(r, {
|
|
1721
|
-
icon:
|
|
3088
|
+
icon: ve,
|
|
1722
3089
|
size: "sm",
|
|
1723
3090
|
tone: "muted",
|
|
1724
3091
|
"aria-hidden": "true"
|
|
@@ -1728,7 +3095,7 @@ function lt({ items: e, onAsk: t, label: n = "이어서 물어볼 것", collapsi
|
|
|
1728
3095
|
return i ? /* @__PURE__ */ k("div", {
|
|
1729
3096
|
className: `follow-up-list ${o ?? ""}`.trim(),
|
|
1730
3097
|
...s,
|
|
1731
|
-
children: /* @__PURE__ */ k(
|
|
3098
|
+
children: /* @__PURE__ */ k(E, {
|
|
1732
3099
|
summary: n,
|
|
1733
3100
|
defaultOpen: a,
|
|
1734
3101
|
plain: !0,
|
|
@@ -1747,14 +3114,14 @@ function lt({ items: e, onAsk: t, label: n = "이어서 물어볼 것", collapsi
|
|
|
1747
3114
|
}
|
|
1748
3115
|
//#endregion
|
|
1749
3116
|
//#region src/foundation/josa.ts
|
|
1750
|
-
function
|
|
3117
|
+
function rn(e) {
|
|
1751
3118
|
let t = e.trimEnd().at(-1);
|
|
1752
3119
|
if (!t) return !0;
|
|
1753
3120
|
let n = t.charCodeAt(0);
|
|
1754
3121
|
return n < 44032 || n > 55203 || (n - 44032) % 28 != 0;
|
|
1755
3122
|
}
|
|
1756
|
-
function
|
|
1757
|
-
let n =
|
|
3123
|
+
function an(e, t) {
|
|
3124
|
+
let n = rn(e);
|
|
1758
3125
|
switch (t) {
|
|
1759
3126
|
case "이/가": return n ? "이" : "가";
|
|
1760
3127
|
case "을/를": return n ? "을" : "를";
|
|
@@ -1763,45 +3130,45 @@ function dt(e, t) {
|
|
|
1763
3130
|
case "으로/로": return n ? (e.trimEnd().charCodeAt(e.trimEnd().length - 1) - 44032) % 28 == 8 ? "로" : "으로" : "로";
|
|
1764
3131
|
}
|
|
1765
3132
|
}
|
|
1766
|
-
function
|
|
1767
|
-
return `${e}${
|
|
3133
|
+
function on(e, t) {
|
|
3134
|
+
return `${e}${an(e, t)}`;
|
|
1768
3135
|
}
|
|
1769
3136
|
//#endregion
|
|
1770
3137
|
//#region src/components/extended/KanbanColumn/KanbanColumn.tsx
|
|
1771
|
-
var
|
|
1772
|
-
function
|
|
1773
|
-
let _ =
|
|
1774
|
-
|
|
3138
|
+
var sn = "application/x-kanban-card";
|
|
3139
|
+
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 }) {
|
|
3140
|
+
let _ = N(null), [v, y] = P(!1), [b, x] = P(""), S = N(null), [C, ee] = P(null), te = a !== void 0 && n.length > a;
|
|
3141
|
+
j(() => {
|
|
1775
3142
|
let e = S.current, t = _.current;
|
|
1776
3143
|
if (S.current = null, !e || !t || document.activeElement !== document.body) return;
|
|
1777
3144
|
let n = [...t.querySelectorAll(`[data-part="${e.part}"]`)];
|
|
1778
3145
|
(n[Math.min(e.at, n.length - 1)] ?? t.querySelector("[data-part=\"add\"]"))?.focus();
|
|
1779
3146
|
}, [n]);
|
|
1780
|
-
let
|
|
3147
|
+
let w = (e, t, n) => {
|
|
1781
3148
|
let r = n === -1 ? p?.back : p?.forward;
|
|
1782
|
-
x(r ? `${
|
|
3149
|
+
x(r ? `${on(e.title, "을/를")} ${on(r, "으로/로")} 옮겼습니다` : `${on(e.title, "을/를")} 옮겼습니다`), S.current = {
|
|
1783
3150
|
at: t,
|
|
1784
3151
|
part: n === -1 ? "back" : "forward"
|
|
1785
3152
|
}, o?.(e.id, n);
|
|
1786
|
-
},
|
|
1787
|
-
!s || !
|
|
3153
|
+
}, T = (e) => [...e.dataTransfer.types].includes(sn), E = (e) => {
|
|
3154
|
+
!s || !T(e) || (e.preventDefault(), y(!0));
|
|
1788
3155
|
};
|
|
1789
3156
|
return /* @__PURE__ */ A("section", {
|
|
1790
3157
|
...g,
|
|
1791
3158
|
className: `kanban-column ${h ?? ""}`.trim(),
|
|
1792
3159
|
"data-over": v ? "" : void 0,
|
|
1793
|
-
"data-past":
|
|
3160
|
+
"data-past": te ? "" : void 0,
|
|
1794
3161
|
ref: _,
|
|
1795
|
-
"aria-label": `${e} — ${f ? "불러오지 못했습니다" : l ? "불러오는 중" : `${n.length}장${
|
|
1796
|
-
onDragOver:
|
|
1797
|
-
onDragEnter:
|
|
3162
|
+
"aria-label": `${e} — ${f ? "불러오지 못했습니다" : l ? "불러오는 중" : `${n.length}장${te ? `, 한도 ${a}장 초과` : ""}`}`,
|
|
3163
|
+
onDragOver: E,
|
|
3164
|
+
onDragEnter: E,
|
|
1798
3165
|
onDragLeave: (e) => {
|
|
1799
3166
|
let t = e.relatedTarget;
|
|
1800
3167
|
t && e.currentTarget.contains(t) || y(!1);
|
|
1801
3168
|
},
|
|
1802
3169
|
onDrop: (e) => {
|
|
1803
3170
|
y(!1);
|
|
1804
|
-
let t = e.dataTransfer.getData(
|
|
3171
|
+
let t = e.dataTransfer.getData(sn);
|
|
1805
3172
|
t && s && (e.preventDefault(), s(t));
|
|
1806
3173
|
},
|
|
1807
3174
|
children: [
|
|
@@ -1826,7 +3193,7 @@ function pt({ title: e, cards: n, limit: a, onMove: o, onDropCard: s, onAdd: c,
|
|
|
1826
3193
|
children: a === void 0 ? n.length : `${n.length} / ${a}`
|
|
1827
3194
|
}),
|
|
1828
3195
|
c ? /* @__PURE__ */ k(t, {
|
|
1829
|
-
icon:
|
|
3196
|
+
icon: B,
|
|
1830
3197
|
label: `${e}에 카드 추가`,
|
|
1831
3198
|
size: "sm",
|
|
1832
3199
|
onClick: c,
|
|
@@ -1843,16 +3210,16 @@ function pt({ title: e, cards: n, limit: a, onMove: o, onDropCard: s, onAdd: c,
|
|
|
1843
3210
|
draggable: !!s,
|
|
1844
3211
|
"data-lifted": C === e.id ? "" : void 0,
|
|
1845
3212
|
onDragStart: (t) => {
|
|
1846
|
-
t.dataTransfer.setData(
|
|
3213
|
+
t.dataTransfer.setData(sn, e.id), t.dataTransfer.setData("text/plain", e.id), t.dataTransfer.effectAllowed = "move", ee(e.id);
|
|
1847
3214
|
},
|
|
1848
|
-
onDragEnd: () =>
|
|
3215
|
+
onDragEnd: () => ee(null),
|
|
1849
3216
|
children: [
|
|
1850
3217
|
s ? /* @__PURE__ */ k("span", {
|
|
1851
3218
|
className: "kanban-column__grip",
|
|
1852
3219
|
"aria-hidden": "true",
|
|
1853
3220
|
"data-part": "grip",
|
|
1854
3221
|
children: /* @__PURE__ */ k(r, {
|
|
1855
|
-
icon:
|
|
3222
|
+
icon: L,
|
|
1856
3223
|
size: "xs"
|
|
1857
3224
|
})
|
|
1858
3225
|
}) : null,
|
|
@@ -1872,18 +3239,18 @@ function pt({ title: e, cards: n, limit: a, onMove: o, onDropCard: s, onAdd: c,
|
|
|
1872
3239
|
className: "kanban-column__move",
|
|
1873
3240
|
"data-part": "move",
|
|
1874
3241
|
children: [/* @__PURE__ */ k(t, {
|
|
1875
|
-
icon:
|
|
1876
|
-
label: p?.back ? `${
|
|
3242
|
+
icon: he,
|
|
3243
|
+
label: p?.back ? `${on(e.title, "을/를")} ${on(p.back, "으로/로")} 옮기기` : `${e.title} 앞으로 옮기기`,
|
|
1877
3244
|
size: "sm",
|
|
1878
3245
|
disabled: !p?.back,
|
|
1879
|
-
onClick: () =>
|
|
3246
|
+
onClick: () => w(e, n, -1),
|
|
1880
3247
|
"data-part": "back"
|
|
1881
3248
|
}), /* @__PURE__ */ k(t, {
|
|
1882
|
-
icon:
|
|
1883
|
-
label: p?.forward ? `${
|
|
3249
|
+
icon: ge,
|
|
3250
|
+
label: p?.forward ? `${on(e.title, "을/를")} ${on(p.forward, "으로/로")} 옮기기` : `${e.title} 뒤로 옮기기`,
|
|
1884
3251
|
size: "sm",
|
|
1885
3252
|
disabled: !p?.forward,
|
|
1886
|
-
onClick: () =>
|
|
3253
|
+
onClick: () => w(e, n, 1),
|
|
1887
3254
|
"data-part": "forward"
|
|
1888
3255
|
})]
|
|
1889
3256
|
}) : null
|
|
@@ -1907,7 +3274,7 @@ function pt({ title: e, cards: n, limit: a, onMove: o, onDropCard: s, onAdd: c,
|
|
|
1907
3274
|
className: "kanban-column__empty",
|
|
1908
3275
|
"data-part": "empty",
|
|
1909
3276
|
children: [/* @__PURE__ */ k(r, {
|
|
1910
|
-
icon:
|
|
3277
|
+
icon: B,
|
|
1911
3278
|
size: "sm",
|
|
1912
3279
|
"aria-hidden": "true"
|
|
1913
3280
|
}), d ?? "비어 있습니다"]
|
|
@@ -1917,20 +3284,20 @@ function pt({ title: e, cards: n, limit: a, onMove: o, onDropCard: s, onAdd: c,
|
|
|
1917
3284
|
className: "kanban-column__drop",
|
|
1918
3285
|
"data-part": "drop",
|
|
1919
3286
|
"aria-hidden": "true",
|
|
1920
|
-
children: [
|
|
3287
|
+
children: [on(e, "으로/로"), " 옮기기"]
|
|
1921
3288
|
}) : null
|
|
1922
3289
|
]
|
|
1923
3290
|
});
|
|
1924
3291
|
}
|
|
1925
3292
|
//#endregion
|
|
1926
3293
|
//#region src/components/extended/Message/Message.tsx
|
|
1927
|
-
var
|
|
3294
|
+
var ln = {
|
|
1928
3295
|
user: "나",
|
|
1929
3296
|
assistant: "어시스턴트",
|
|
1930
3297
|
system: "시스템"
|
|
1931
3298
|
};
|
|
1932
|
-
function
|
|
1933
|
-
let p = n ??
|
|
3299
|
+
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 }) {
|
|
3300
|
+
let p = n ?? ln[t];
|
|
1934
3301
|
return /* @__PURE__ */ A("article", {
|
|
1935
3302
|
...f,
|
|
1936
3303
|
className: `message ${d ?? ""}`.trim(),
|
|
@@ -1988,13 +3355,13 @@ function ht({ children: e, role: t = "assistant", author: n, avatar: r, time: i,
|
|
|
1988
3355
|
}
|
|
1989
3356
|
//#endregion
|
|
1990
3357
|
//#region src/components/extended/MessageList/MessageList.tsx
|
|
1991
|
-
function
|
|
1992
|
-
let f =
|
|
3358
|
+
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 }) {
|
|
3359
|
+
let f = N(null), p = N(null), h = N(!0), g = N(!1), [_, v] = P(!1), y = ie(() => {
|
|
1993
3360
|
let e = f.current;
|
|
1994
3361
|
if (!e) return;
|
|
1995
3362
|
let t = e.scrollHeight - e.scrollTop - e.clientHeight;
|
|
1996
3363
|
g.current || (h.current = t <= c, v(!h.current));
|
|
1997
|
-
}, [c]), b =
|
|
3364
|
+
}, [c]), b = N(0), x = ie((e) => {
|
|
1998
3365
|
let t = f.current;
|
|
1999
3366
|
if (!t) return;
|
|
2000
3367
|
cancelAnimationFrame(b.current);
|
|
@@ -2015,7 +3382,7 @@ function gt({ children: e, loading: t, loadingMessages: n = 3, empty: i, error:
|
|
|
2015
3382
|
};
|
|
2016
3383
|
b.current = requestAnimationFrame(o);
|
|
2017
3384
|
}, [y]);
|
|
2018
|
-
return
|
|
3385
|
+
return j(() => {
|
|
2019
3386
|
let e = f.current;
|
|
2020
3387
|
if (!e) return;
|
|
2021
3388
|
let t = () => {
|
|
@@ -2029,7 +3396,7 @@ function gt({ children: e, loading: t, loadingMessages: n = 3, empty: i, error:
|
|
|
2029
3396
|
return () => {
|
|
2030
3397
|
for (let r of n) e.removeEventListener(r, t);
|
|
2031
3398
|
};
|
|
2032
|
-
}, []),
|
|
3399
|
+
}, []), j(() => {
|
|
2033
3400
|
let e = p.current;
|
|
2034
3401
|
if (!e) return;
|
|
2035
3402
|
let t = new ResizeObserver(() => {
|
|
@@ -2083,7 +3450,7 @@ function gt({ children: e, loading: t, loadingMessages: n = 3, empty: i, error:
|
|
|
2083
3450
|
},
|
|
2084
3451
|
"data-part": "jump",
|
|
2085
3452
|
children: [/* @__PURE__ */ k(r, {
|
|
2086
|
-
icon:
|
|
3453
|
+
icon: ce,
|
|
2087
3454
|
size: "sm",
|
|
2088
3455
|
"aria-hidden": "true"
|
|
2089
3456
|
}), l]
|
|
@@ -2092,16 +3459,16 @@ function gt({ children: e, loading: t, loadingMessages: n = 3, empty: i, error:
|
|
|
2092
3459
|
}
|
|
2093
3460
|
//#endregion
|
|
2094
3461
|
//#region src/components/extended/MetricCard/MetricCard.tsx
|
|
2095
|
-
var
|
|
2096
|
-
up:
|
|
2097
|
-
down:
|
|
2098
|
-
flat:
|
|
2099
|
-
},
|
|
3462
|
+
var fn = {
|
|
3463
|
+
up: fe,
|
|
3464
|
+
down: le,
|
|
3465
|
+
flat: Ce
|
|
3466
|
+
}, pn = {
|
|
2100
3467
|
up: "증가",
|
|
2101
3468
|
down: "감소",
|
|
2102
3469
|
flat: "변화 없음"
|
|
2103
3470
|
};
|
|
2104
|
-
function
|
|
3471
|
+
function mn({ label: e, value: t, delta: n, compare: i, chart: a, loading: o, empty: s, error: c, className: l, ...u }) {
|
|
2105
3472
|
let d = n?.meaning ?? "neutral";
|
|
2106
3473
|
return /* @__PURE__ */ A("section", {
|
|
2107
3474
|
...u,
|
|
@@ -2142,14 +3509,14 @@ function yt({ label: e, value: t, delta: n, compare: i, chart: a, loading: o, em
|
|
|
2142
3509
|
"data-part": "delta",
|
|
2143
3510
|
children: [
|
|
2144
3511
|
/* @__PURE__ */ k(r, {
|
|
2145
|
-
icon:
|
|
3512
|
+
icon: fn[n.direction],
|
|
2146
3513
|
size: "xs",
|
|
2147
3514
|
"aria-hidden": "true"
|
|
2148
3515
|
}),
|
|
2149
3516
|
/* @__PURE__ */ k("span", { children: n.value }),
|
|
2150
3517
|
/* @__PURE__ */ k("span", {
|
|
2151
3518
|
className: "metric-card__said",
|
|
2152
|
-
children: ` ${
|
|
3519
|
+
children: ` ${pn[n.direction]}`
|
|
2153
3520
|
}),
|
|
2154
3521
|
i ? /* @__PURE__ */ k("span", {
|
|
2155
3522
|
className: "metric-card__compare",
|
|
@@ -2171,19 +3538,19 @@ function yt({ label: e, value: t, delta: n, compare: i, chart: a, loading: o, em
|
|
|
2171
3538
|
}
|
|
2172
3539
|
//#endregion
|
|
2173
3540
|
//#region src/components/extended/PriceDisplay/PriceDisplay.tsx
|
|
2174
|
-
var
|
|
3541
|
+
var hn = {
|
|
2175
3542
|
KRW: "원",
|
|
2176
3543
|
JPY: "엔",
|
|
2177
3544
|
CNY: "위안"
|
|
2178
3545
|
};
|
|
2179
|
-
function
|
|
3546
|
+
function gn(e, { locale: t = "ko-KR", currency: n = "KRW", affix: r = "word" } = {}) {
|
|
2180
3547
|
let i = new Intl.NumberFormat(t, {
|
|
2181
3548
|
style: "currency",
|
|
2182
3549
|
currency: n
|
|
2183
|
-
}).formatToParts(e), a =
|
|
3550
|
+
}).formatToParts(e), a = hn[n];
|
|
2184
3551
|
return r === "symbol" || !a ? i.map((e) => e.value).join("") : `${i.filter((e) => e.type !== "currency").map((e) => e.value).join("").trim()}${a}`;
|
|
2185
3552
|
}
|
|
2186
|
-
function
|
|
3553
|
+
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
3554
|
let f = t !== void 0 && t > e, p = f ? Math.floor((t - e) / t * 100) : 0;
|
|
2188
3555
|
return /* @__PURE__ */ A("p", {
|
|
2189
3556
|
...d,
|
|
@@ -2196,7 +3563,7 @@ function xt({ amount: e, was: t, currency: n = "KRW", locale: r = "ko-KR", affix
|
|
|
2196
3563
|
"data-part": "now",
|
|
2197
3564
|
children: [f ? /* @__PURE__ */ k(i, { children: "할인가 " }) : null, /* @__PURE__ */ k("data", {
|
|
2198
3565
|
value: e,
|
|
2199
|
-
children:
|
|
3566
|
+
children: gn(e, {
|
|
2200
3567
|
locale: r,
|
|
2201
3568
|
currency: n,
|
|
2202
3569
|
affix: a
|
|
@@ -2208,7 +3575,7 @@ function xt({ amount: e, was: t, currency: n = "KRW", locale: r = "ko-KR", affix
|
|
|
2208
3575
|
"data-part": "was",
|
|
2209
3576
|
children: [/* @__PURE__ */ k(i, { children: "원래 가격 " }), /* @__PURE__ */ k("data", {
|
|
2210
3577
|
value: t,
|
|
2211
|
-
children:
|
|
3578
|
+
children: gn(t, {
|
|
2212
3579
|
locale: r,
|
|
2213
3580
|
currency: n,
|
|
2214
3581
|
affix: a
|
|
@@ -2233,10 +3600,10 @@ function xt({ amount: e, was: t, currency: n = "KRW", locale: r = "ko-KR", affix
|
|
|
2233
3600
|
}
|
|
2234
3601
|
//#endregion
|
|
2235
3602
|
//#region src/components/extended/OrderSummary/OrderSummary.tsx
|
|
2236
|
-
function
|
|
3603
|
+
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
3604
|
let m = (e, t) => {
|
|
2238
3605
|
if (t === "free") return u;
|
|
2239
|
-
let n =
|
|
3606
|
+
let n = gn(e, {
|
|
2240
3607
|
locale: i,
|
|
2241
3608
|
currency: r,
|
|
2242
3609
|
affix: a
|
|
@@ -2286,7 +3653,7 @@ function St({ lines: e, total: t, label: n, currency: r = "KRW", locale: i = "ko
|
|
|
2286
3653
|
className: "order-summary__amount",
|
|
2287
3654
|
children: /* @__PURE__ */ k("data", {
|
|
2288
3655
|
value: t,
|
|
2289
|
-
children:
|
|
3656
|
+
children: gn(t, {
|
|
2290
3657
|
locale: i,
|
|
2291
3658
|
currency: r,
|
|
2292
3659
|
affix: a
|
|
@@ -2302,7 +3669,7 @@ function St({ lines: e, total: t, label: n, currency: r = "KRW", locale: i = "ko
|
|
|
2302
3669
|
}
|
|
2303
3670
|
//#endregion
|
|
2304
3671
|
//#region src/components/extended/PaymentMethodSelector/PaymentMethodSelector.tsx
|
|
2305
|
-
function
|
|
3672
|
+
function yn({ methods: e, value: t, onValueChange: n, label: i, name: a = "paymentMethod", className: o, ...s }) {
|
|
2306
3673
|
let l = e.find((e) => e.id === t)?.disabled ? e.find((e) => !e.disabled)?.id : void 0;
|
|
2307
3674
|
return /* @__PURE__ */ A("fieldset", {
|
|
2308
3675
|
...s,
|
|
@@ -2362,7 +3729,7 @@ function Ct({ methods: e, value: t, onValueChange: n, label: i, name: a = "payme
|
|
|
2362
3729
|
}
|
|
2363
3730
|
//#endregion
|
|
2364
3731
|
//#region src/components/extended/PresenceBar/PresenceBar.tsx
|
|
2365
|
-
function
|
|
3732
|
+
function bn({ people: e, label: t, max: r = 5, size: i = "sm", following: a, onFollow: o, followLabel: s = "따라가기", aside: c, className: l, ...u }) {
|
|
2366
3733
|
let d = [...e].sort((e, t) => Number(!!t.you) - Number(!!e.you)), f = e.find((e) => e.id === a), p = d.map((e) => ({
|
|
2367
3734
|
id: e.id,
|
|
2368
3735
|
name: e.name,
|
|
@@ -2385,10 +3752,10 @@ function wt({ people: e, label: t, max: r = 5, size: i = "sm", following: a, onF
|
|
|
2385
3752
|
}),
|
|
2386
3753
|
o ? /* @__PURE__ */ k(ne, {
|
|
2387
3754
|
items: /* @__PURE__ */ A(O, { children: [
|
|
2388
|
-
/* @__PURE__ */ k(
|
|
3755
|
+
/* @__PURE__ */ k(D, {
|
|
2389
3756
|
value: f?.id ?? "",
|
|
2390
3757
|
onValueChange: (e) => o(e || null),
|
|
2391
|
-
children: d.filter((e) => !e.you).map((e) => /* @__PURE__ */ A(
|
|
3758
|
+
children: d.filter((e) => !e.you).map((e) => /* @__PURE__ */ A(S, {
|
|
2392
3759
|
value: e.id,
|
|
2393
3760
|
"data-part": `follow-${e.id}`,
|
|
2394
3761
|
children: [e.name, e.state === "idle" ? " — 자리 비움" : ""]
|
|
@@ -2396,7 +3763,7 @@ function wt({ people: e, label: t, max: r = 5, size: i = "sm", following: a, onF
|
|
|
2396
3763
|
}),
|
|
2397
3764
|
/* @__PURE__ */ k(te, {}),
|
|
2398
3765
|
/* @__PURE__ */ k(T, {
|
|
2399
|
-
icon:
|
|
3766
|
+
icon: be,
|
|
2400
3767
|
disabled: !a,
|
|
2401
3768
|
onSelect: () => o(null),
|
|
2402
3769
|
"data-part": "unfollow",
|
|
@@ -2407,7 +3774,7 @@ function wt({ people: e, label: t, max: r = 5, size: i = "sm", following: a, onF
|
|
|
2407
3774
|
size: "sm",
|
|
2408
3775
|
variant: f ? "solid" : "outline",
|
|
2409
3776
|
tone: f ? "accent" : "neutral",
|
|
2410
|
-
iconStart:
|
|
3777
|
+
iconStart: ye,
|
|
2411
3778
|
"data-part": "follow",
|
|
2412
3779
|
children: f ? `${f.name} 따라가는 중` : s
|
|
2413
3780
|
})
|
|
@@ -2421,8 +3788,8 @@ function wt({ people: e, label: t, max: r = 5, size: i = "sm", following: a, onF
|
|
|
2421
3788
|
}
|
|
2422
3789
|
//#endregion
|
|
2423
3790
|
//#region src/components/extended/ProductCard/ProductCard.tsx
|
|
2424
|
-
function
|
|
2425
|
-
let b = p?.find((e) => e.id === m)?.image ?? c, x =
|
|
3791
|
+
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 }) {
|
|
3792
|
+
let b = p?.find((e) => e.id === m)?.image ?? c, x = M();
|
|
2426
3793
|
return /* @__PURE__ */ A("article", {
|
|
2427
3794
|
...y,
|
|
2428
3795
|
className: `product-card ${v ?? ""}`.trim(),
|
|
@@ -2439,7 +3806,7 @@ function Tt({ name: e, href: t, price: n, was: i, currency: a = "KRW", locale: o
|
|
|
2439
3806
|
className: "product-card__blank",
|
|
2440
3807
|
"aria-hidden": "true",
|
|
2441
3808
|
children: /* @__PURE__ */ k(r, {
|
|
2442
|
-
icon:
|
|
3809
|
+
icon: xe,
|
|
2443
3810
|
size: "md"
|
|
2444
3811
|
})
|
|
2445
3812
|
}),
|
|
@@ -2468,7 +3835,7 @@ function Tt({ name: e, href: t, price: n, was: i, currency: a = "KRW", locale: o
|
|
|
2468
3835
|
children: e
|
|
2469
3836
|
})
|
|
2470
3837
|
}),
|
|
2471
|
-
/* @__PURE__ */ k(
|
|
3838
|
+
/* @__PURE__ */ k(_n, {
|
|
2472
3839
|
amount: n,
|
|
2473
3840
|
was: i,
|
|
2474
3841
|
currency: a,
|
|
@@ -2521,8 +3888,8 @@ function Tt({ name: e, href: t, price: n, was: i, currency: a = "KRW", locale: o
|
|
|
2521
3888
|
}
|
|
2522
3889
|
//#endregion
|
|
2523
3890
|
//#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 =
|
|
3891
|
+
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 }) {
|
|
3892
|
+
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
3893
|
let e = w(g.current);
|
|
2527
3894
|
a(), e();
|
|
2528
3895
|
} : void 0;
|
|
@@ -2543,7 +3910,7 @@ function Et({ value: t, onValueChange: n, label: r, stock: i, onRemove: a, remov
|
|
|
2543
3910
|
size: l,
|
|
2544
3911
|
disabled: u,
|
|
2545
3912
|
atFloor: _ ? {
|
|
2546
|
-
icon:
|
|
3913
|
+
icon: K,
|
|
2547
3914
|
label: o ?? `${r} 빼기`,
|
|
2548
3915
|
onPress: _,
|
|
2549
3916
|
tone: "danger"
|
|
@@ -2567,13 +3934,13 @@ function Et({ value: t, onValueChange: n, label: r, stock: i, onRemove: a, remov
|
|
|
2567
3934
|
}
|
|
2568
3935
|
//#endregion
|
|
2569
3936
|
//#region src/components/extended/ReasoningDisclosure/ReasoningDisclosure.tsx
|
|
2570
|
-
function
|
|
3937
|
+
function Cn({ children: e, state: t = "done", duration: n, summary: r, defaultOpen: i, className: a, ...o }) {
|
|
2571
3938
|
let s = r ?? (t === "thinking" ? `생각하는 중${n ? ` · ${n}` : "…"}` : n ? `${n} 동안 생각했습니다` : "생각 보기");
|
|
2572
|
-
return /* @__PURE__ */ k(
|
|
3939
|
+
return /* @__PURE__ */ k(E, {
|
|
2573
3940
|
...o,
|
|
2574
3941
|
className: `reasoning-disclosure ${a ?? ""}`.trim(),
|
|
2575
3942
|
"data-state": t,
|
|
2576
|
-
icon:
|
|
3943
|
+
icon: F,
|
|
2577
3944
|
plain: !0,
|
|
2578
3945
|
defaultOpen: i,
|
|
2579
3946
|
summary: /* @__PURE__ */ k("span", {
|
|
@@ -2589,11 +3956,11 @@ function Dt({ children: e, state: t = "done", duration: n, summary: r, defaultOp
|
|
|
2589
3956
|
}
|
|
2590
3957
|
//#endregion
|
|
2591
3958
|
//#region src/components/extended/RecognitionFallback/RecognitionFallback.tsx
|
|
2592
|
-
var
|
|
3959
|
+
var wn = {
|
|
2593
3960
|
carried: "여기까지 들었습니다",
|
|
2594
3961
|
lost: "듣지 못했습니다"
|
|
2595
3962
|
};
|
|
2596
|
-
function
|
|
3963
|
+
function Tn({ reason: e, carried: t, detail: i, onRetry: a, onType: o, onDiscard: s, className: c, ...l }) {
|
|
2597
3964
|
let u = e === "carried" ? t ?? "" : "";
|
|
2598
3965
|
return /* @__PURE__ */ k("div", {
|
|
2599
3966
|
...l,
|
|
@@ -2607,7 +3974,7 @@ function kt({ reason: e, carried: t, detail: i, onRetry: a, onType: o, onDiscard
|
|
|
2607
3974
|
/* @__PURE__ */ k("p", {
|
|
2608
3975
|
className: "recognition-fallback__title",
|
|
2609
3976
|
"data-part": "title",
|
|
2610
|
-
children:
|
|
3977
|
+
children: wn[e]
|
|
2611
3978
|
}),
|
|
2612
3979
|
u ? /* @__PURE__ */ k("p", {
|
|
2613
3980
|
className: "recognition-fallback__carried",
|
|
@@ -2628,7 +3995,7 @@ function kt({ reason: e, carried: t, detail: i, onRetry: a, onType: o, onDiscard
|
|
|
2628
3995
|
onClick: () => o(u),
|
|
2629
3996
|
"data-part": "type",
|
|
2630
3997
|
children: [/* @__PURE__ */ k(r, {
|
|
2631
|
-
icon:
|
|
3998
|
+
icon: R,
|
|
2632
3999
|
size: "sm",
|
|
2633
4000
|
"aria-hidden": "true"
|
|
2634
4001
|
}), u ? "이어서 입력하기" : "입력으로 하기"]
|
|
@@ -2640,7 +4007,7 @@ function kt({ reason: e, carried: t, detail: i, onRetry: a, onType: o, onDiscard
|
|
|
2640
4007
|
onClick: a,
|
|
2641
4008
|
"data-part": "retry",
|
|
2642
4009
|
children: [/* @__PURE__ */ k(r, {
|
|
2643
|
-
icon:
|
|
4010
|
+
icon: V,
|
|
2644
4011
|
size: "sm",
|
|
2645
4012
|
"aria-hidden": "true"
|
|
2646
4013
|
}), "다시 말하기"]
|
|
@@ -2652,7 +4019,7 @@ function kt({ reason: e, carried: t, detail: i, onRetry: a, onType: o, onDiscard
|
|
|
2652
4019
|
onClick: s,
|
|
2653
4020
|
"data-part": "discard",
|
|
2654
4021
|
children: [/* @__PURE__ */ k(r, {
|
|
2655
|
-
icon:
|
|
4022
|
+
icon: K,
|
|
2656
4023
|
size: "sm",
|
|
2657
4024
|
"aria-hidden": "true"
|
|
2658
4025
|
}), "버리기"]
|
|
@@ -2665,22 +4032,22 @@ function kt({ reason: e, carried: t, detail: i, onRetry: a, onType: o, onDiscard
|
|
|
2665
4032
|
}
|
|
2666
4033
|
//#endregion
|
|
2667
4034
|
//#region src/components/extended/RunStatusCard/RunStatusCard.tsx
|
|
2668
|
-
var
|
|
4035
|
+
var En = {
|
|
2669
4036
|
queued: "대기 중",
|
|
2670
4037
|
running: "실행 중",
|
|
2671
4038
|
done: "완료",
|
|
2672
4039
|
failed: "실패",
|
|
2673
4040
|
cancelled: "취소됨"
|
|
2674
4041
|
};
|
|
2675
|
-
function
|
|
2676
|
-
let m = r === "running" || r === "queued", h =
|
|
4042
|
+
function Dn({ title: t, state: r, elapsed: a, progress: o, detail: c, onCancel: l, cancelLabel: u = "중지", actions: d, className: f, ...p }) {
|
|
4043
|
+
let m = r === "running" || r === "queued", h = M(), g = o ? r === "done" ? o.max : o.value : void 0, [y, b] = P({
|
|
2677
4044
|
status: "",
|
|
2678
4045
|
alert: ""
|
|
2679
|
-
}), x =
|
|
2680
|
-
|
|
4046
|
+
}), x = N(r);
|
|
4047
|
+
j(() => {
|
|
2681
4048
|
let e = x.current;
|
|
2682
4049
|
if (x.current = r, r === "running" || r === "queued" || e === r) return;
|
|
2683
|
-
let n = `${t} ${
|
|
4050
|
+
let n = `${t} ${En[r]}`;
|
|
2684
4051
|
b(r === "failed" ? {
|
|
2685
4052
|
status: "",
|
|
2686
4053
|
alert: n
|
|
@@ -2689,8 +4056,8 @@ function jt({ title: t, state: r, elapsed: a, progress: o, detail: c, onCancel:
|
|
|
2689
4056
|
alert: ""
|
|
2690
4057
|
});
|
|
2691
4058
|
}, [r, t]);
|
|
2692
|
-
let S =
|
|
2693
|
-
return
|
|
4059
|
+
let S = N(null), C = N(m);
|
|
4060
|
+
return j(() => {
|
|
2694
4061
|
let e = C.current && !m;
|
|
2695
4062
|
C.current = m, !(!e || document.activeElement !== document.body) && S.current?.focus();
|
|
2696
4063
|
}, [m]), /* @__PURE__ */ A("section", {
|
|
@@ -2718,7 +4085,7 @@ function jt({ title: t, state: r, elapsed: a, progress: o, detail: c, onCancel:
|
|
|
2718
4085
|
className: "run-status-card__mark",
|
|
2719
4086
|
"aria-hidden": "true",
|
|
2720
4087
|
children: [m ? /* @__PURE__ */ k(e, { size: "sm" }) : null, /* @__PURE__ */ k(_, {
|
|
2721
|
-
icon: m ? void 0 : r === "done" ?
|
|
4088
|
+
icon: m ? void 0 : r === "done" ? I : r === "failed" ? J : _e,
|
|
2722
4089
|
tone: r === "done" ? "success" : r === "failed" ? "danger" : "neutral",
|
|
2723
4090
|
size: "sm",
|
|
2724
4091
|
"data-part": "glyph"
|
|
@@ -2738,7 +4105,7 @@ function jt({ title: t, state: r, elapsed: a, progress: o, detail: c, onCancel:
|
|
|
2738
4105
|
children: [
|
|
2739
4106
|
/* @__PURE__ */ k("span", {
|
|
2740
4107
|
"data-part": "state",
|
|
2741
|
-
children:
|
|
4108
|
+
children: En[r]
|
|
2742
4109
|
}),
|
|
2743
4110
|
a ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("span", {
|
|
2744
4111
|
"aria-hidden": "true",
|
|
@@ -2794,16 +4161,16 @@ function jt({ title: t, state: r, elapsed: a, progress: o, detail: c, onCancel:
|
|
|
2794
4161
|
}
|
|
2795
4162
|
//#endregion
|
|
2796
4163
|
//#region src/components/extended/SavedViewTabs/SavedViewTabs.tsx
|
|
2797
|
-
function
|
|
2798
|
-
let d =
|
|
2799
|
-
|
|
2800
|
-
f(t)
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
4164
|
+
function On({ views: e, value: t, onValueChange: n, label: i, panelId: a, menu: o, onAdd: s, addLabel: c = "보기 추가", className: l, ...u }) {
|
|
4165
|
+
let d = N(null), f = (e) => d.current?.querySelector(`[data-value="${CSS.escape(e)}"]`) ?? null;
|
|
4166
|
+
j(() => {
|
|
4167
|
+
let e = d.current, n = f(t);
|
|
4168
|
+
if (!e || !n) return;
|
|
4169
|
+
let r = e.getBoundingClientRect(), i = n.getBoundingClientRect();
|
|
4170
|
+
i.left < r.left ? e.scrollLeft += i.left - r.left : i.right > r.right && (e.scrollLeft += i.right - r.right);
|
|
2804
4171
|
}, [t]);
|
|
2805
4172
|
let p = (e) => {
|
|
2806
|
-
e && (f(e.id)?.focus(), n(e.id));
|
|
4173
|
+
e && (f(e.id)?.focus({ preventScroll: !0 }), n(e.id));
|
|
2807
4174
|
}, m = (t) => {
|
|
2808
4175
|
let n = t.target.dataset.value;
|
|
2809
4176
|
if (n === void 0) return;
|
|
@@ -2872,7 +4239,7 @@ function Mt({ views: e, value: t, onValueChange: n, label: i, panelId: a, menu:
|
|
|
2872
4239
|
onClick: s,
|
|
2873
4240
|
"data-part": "add",
|
|
2874
4241
|
children: [/* @__PURE__ */ k(r, {
|
|
2875
|
-
icon:
|
|
4242
|
+
icon: B,
|
|
2876
4243
|
size: "sm",
|
|
2877
4244
|
"aria-hidden": "true"
|
|
2878
4245
|
}), c]
|
|
@@ -2881,8 +4248,8 @@ function Mt({ views: e, value: t, onValueChange: n, label: i, panelId: a, menu:
|
|
|
2881
4248
|
}
|
|
2882
4249
|
//#endregion
|
|
2883
4250
|
//#region src/components/extended/SourceChip/SourceChip.tsx
|
|
2884
|
-
function
|
|
2885
|
-
let [u, d] =
|
|
4251
|
+
function kn({ title: e, domain: t, href: n, index: r, favicon: a, compact: o, size: s = "md", className: c, ...l }) {
|
|
4252
|
+
let [u, d] = P(), f = u !== void 0 && u === a, p = [...t.replace(/^www\./, "")][0]?.toUpperCase() ?? "?";
|
|
2886
4253
|
return /* @__PURE__ */ A("a", {
|
|
2887
4254
|
...l,
|
|
2888
4255
|
className: `source-chip ${c ?? ""}`.trim(),
|
|
@@ -2931,9 +4298,9 @@ function Nt({ title: e, domain: t, href: n, index: r, favicon: a, compact: o, si
|
|
|
2931
4298
|
}
|
|
2932
4299
|
//#endregion
|
|
2933
4300
|
//#region src/components/extended/SourceChipRow/SourceChipRow.tsx
|
|
2934
|
-
var
|
|
2935
|
-
function
|
|
2936
|
-
let s =
|
|
4301
|
+
var An = 12;
|
|
4302
|
+
function jn({ sources: e, label: t, onOverflow: n, compact: r, size: i = "md", className: a, ...o }) {
|
|
4303
|
+
let s = N(null), [c, l] = P(e.length), u = ie(() => {
|
|
2937
4304
|
let e = s.current;
|
|
2938
4305
|
if (!e) return;
|
|
2939
4306
|
let t = [...e.querySelectorAll("[data-part=\"chip\"]")];
|
|
@@ -2954,12 +4321,12 @@ function Ft({ sources: e, label: t, onOverflow: n, compact: r, size: i = "md", c
|
|
|
2954
4321
|
e.index ?? "",
|
|
2955
4322
|
e.favicon ?? ""
|
|
2956
4323
|
].join("")).join("");
|
|
2957
|
-
|
|
4324
|
+
ae(u, [
|
|
2958
4325
|
u,
|
|
2959
4326
|
d,
|
|
2960
4327
|
r,
|
|
2961
4328
|
i
|
|
2962
|
-
]),
|
|
4329
|
+
]), j(() => {
|
|
2963
4330
|
let e = s.current;
|
|
2964
4331
|
if (!e) return;
|
|
2965
4332
|
let t = new ResizeObserver(u);
|
|
@@ -2976,7 +4343,7 @@ function Ft({ sources: e, label: t, onOverflow: n, compact: r, size: i = "md", c
|
|
|
2976
4343
|
children: [e.map((e) => /* @__PURE__ */ k("span", {
|
|
2977
4344
|
className: "source-chip-row__chip",
|
|
2978
4345
|
"data-part": "chip",
|
|
2979
|
-
children: /* @__PURE__ */ k(
|
|
4346
|
+
children: /* @__PURE__ */ k(kn, {
|
|
2980
4347
|
title: e.title,
|
|
2981
4348
|
domain: e.domain,
|
|
2982
4349
|
href: e.href,
|
|
@@ -3020,13 +4387,13 @@ function Ft({ sources: e, label: t, onOverflow: n, compact: r, size: i = "md", c
|
|
|
3020
4387
|
}
|
|
3021
4388
|
//#endregion
|
|
3022
4389
|
//#region src/components/extended/SourcePanel/SourcePanel.tsx
|
|
3023
|
-
function
|
|
4390
|
+
function Mn(e) {
|
|
3024
4391
|
return e.replace(/^www\./, "");
|
|
3025
4392
|
}
|
|
3026
|
-
function
|
|
4393
|
+
function Nn(e) {
|
|
3027
4394
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
3028
4395
|
for (let r of e) {
|
|
3029
|
-
let e =
|
|
4396
|
+
let e = Mn(r.domain);
|
|
3030
4397
|
n.has(e) || (n.set(e, []), t.push(e)), n.get(e).push(r);
|
|
3031
4398
|
}
|
|
3032
4399
|
return t.map((e) => ({
|
|
@@ -3034,8 +4401,8 @@ function Lt(e) {
|
|
|
3034
4401
|
items: n.get(e)
|
|
3035
4402
|
}));
|
|
3036
4403
|
}
|
|
3037
|
-
function
|
|
3038
|
-
let [s, c] =
|
|
4404
|
+
function Pn({ sources: e, label: t, found: n, group: r = !0, empty: i = "인용한 근거가 없습니다.", className: a, ...o }) {
|
|
4405
|
+
let [s, c] = P({}), l = Nn(e), u = M();
|
|
3039
4406
|
return /* @__PURE__ */ A("section", {
|
|
3040
4407
|
...o,
|
|
3041
4408
|
className: `source-panel ${a ?? ""}`.trim(),
|
|
@@ -3160,7 +4527,7 @@ function Rt({ sources: e, label: t, found: n, group: r = !0, empty: i = "인용
|
|
|
3160
4527
|
}
|
|
3161
4528
|
//#endregion
|
|
3162
4529
|
//#region src/components/extended/StreamingText/StreamingText.tsx
|
|
3163
|
-
function
|
|
4530
|
+
function Fn({ text: e, done: t, placeholder: n, caret: r = !0, className: i, ...a }) {
|
|
3164
4531
|
return /* @__PURE__ */ A("p", {
|
|
3165
4532
|
...a,
|
|
3166
4533
|
className: `streaming-text ${i ?? ""}`.trim(),
|
|
@@ -3182,13 +4549,13 @@ function zt({ text: e, done: t, placeholder: n, caret: r = !0, className: i, ...
|
|
|
3182
4549
|
}
|
|
3183
4550
|
//#endregion
|
|
3184
4551
|
//#region src/components/extended/ToolCallCard/ToolCallCard.tsx
|
|
3185
|
-
var
|
|
4552
|
+
var In = {
|
|
3186
4553
|
pending: "대기 중",
|
|
3187
4554
|
running: "실행 중",
|
|
3188
4555
|
success: "성공",
|
|
3189
4556
|
error: "실패"
|
|
3190
4557
|
};
|
|
3191
|
-
function
|
|
4558
|
+
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
4559
|
let h = (e) => e != null && e !== !1, g = h(c) || h(i) || h(a) || h(o) || h(l), _ = /* @__PURE__ */ A("span", {
|
|
3193
4560
|
className: "tool-call-card__head",
|
|
3194
4561
|
children: [
|
|
@@ -3196,13 +4563,13 @@ function Vt({ name: t, state: n, args: i, result: a, error: o, duration: s, summ
|
|
|
3196
4563
|
className: "tool-call-card__mark",
|
|
3197
4564
|
"aria-hidden": "true",
|
|
3198
4565
|
children: n === "running" ? /* @__PURE__ */ k(e, { size: "sm" }) : n === "success" ? /* @__PURE__ */ k(r, {
|
|
3199
|
-
icon:
|
|
4566
|
+
icon: I,
|
|
3200
4567
|
size: "xs"
|
|
3201
4568
|
}) : n === "error" ? /* @__PURE__ */ k(r, {
|
|
3202
|
-
icon:
|
|
4569
|
+
icon: se,
|
|
3203
4570
|
size: "xs"
|
|
3204
4571
|
}) : /* @__PURE__ */ k(r, {
|
|
3205
|
-
icon:
|
|
4572
|
+
icon: Ae,
|
|
3206
4573
|
size: "xs"
|
|
3207
4574
|
})
|
|
3208
4575
|
}),
|
|
@@ -3212,7 +4579,7 @@ function Vt({ name: t, state: n, args: i, result: a, error: o, duration: s, summ
|
|
|
3212
4579
|
}),
|
|
3213
4580
|
/* @__PURE__ */ k("span", {
|
|
3214
4581
|
className: "tool-call-card__state",
|
|
3215
|
-
children:
|
|
4582
|
+
children: In[n]
|
|
3216
4583
|
}),
|
|
3217
4584
|
s ? /* @__PURE__ */ k("span", {
|
|
3218
4585
|
className: "tool-call-card__duration",
|
|
@@ -3266,7 +4633,7 @@ function Vt({ name: t, state: n, args: i, result: a, error: o, duration: s, summ
|
|
|
3266
4633
|
}) : null
|
|
3267
4634
|
]
|
|
3268
4635
|
});
|
|
3269
|
-
return g ? /* @__PURE__ */ k(
|
|
4636
|
+
return g ? /* @__PURE__ */ k(E, {
|
|
3270
4637
|
...m,
|
|
3271
4638
|
className: `tool-call-card ${p ?? ""}`.trim(),
|
|
3272
4639
|
"data-state": n,
|
|
@@ -3284,9 +4651,9 @@ function Vt({ name: t, state: n, args: i, result: a, error: o, duration: s, summ
|
|
|
3284
4651
|
}
|
|
3285
4652
|
//#endregion
|
|
3286
4653
|
//#region src/components/extended/TranscriptSync/TranscriptSync.tsx
|
|
3287
|
-
function
|
|
3288
|
-
let d =
|
|
3289
|
-
return
|
|
4654
|
+
function Rn({ segments: e, currentTime: t, onSeek: i, label: a, loading: o, empty: s, error: c, className: l, ...u }) {
|
|
4655
|
+
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);
|
|
4656
|
+
return j(() => {
|
|
3290
4657
|
g < 0 || (h.current = g, f && (d.current?.querySelector(`[data-index="${g}"]`))?.scrollIntoView({
|
|
3291
4658
|
block: "nearest",
|
|
3292
4659
|
behavior: "auto"
|
|
@@ -3365,7 +4732,7 @@ function Ht({ segments: e, currentTime: t, onSeek: i, label: a, loading: o, empt
|
|
|
3365
4732
|
onClick: () => p(!0),
|
|
3366
4733
|
"data-part": "follow",
|
|
3367
4734
|
children: [/* @__PURE__ */ k(r, {
|
|
3368
|
-
icon:
|
|
4735
|
+
icon: ue,
|
|
3369
4736
|
size: "sm",
|
|
3370
4737
|
"aria-hidden": "true"
|
|
3371
4738
|
}), "지금 말하는 곳으로"]
|
|
@@ -3374,7 +4741,7 @@ function Ht({ segments: e, currentTime: t, onSeek: i, label: a, loading: o, empt
|
|
|
3374
4741
|
}
|
|
3375
4742
|
//#endregion
|
|
3376
4743
|
//#region src/components/extended/TrustBlock/TrustBlock.tsx
|
|
3377
|
-
function
|
|
4744
|
+
function zn({ points: e, label: t, layout: n = "stack", size: i = "md", align: a = "start", className: o, ...s }) {
|
|
3378
4745
|
return /* @__PURE__ */ k("ul", {
|
|
3379
4746
|
...s,
|
|
3380
4747
|
className: `trust-block ${o ?? ""}`.trim(),
|
|
@@ -3405,7 +4772,7 @@ function Ut({ points: e, label: t, layout: n = "stack", size: i = "md", align: a
|
|
|
3405
4772
|
}
|
|
3406
4773
|
//#endregion
|
|
3407
4774
|
//#region src/components/extended/VoiceControlBar/VoiceControlBar.tsx
|
|
3408
|
-
function
|
|
4775
|
+
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
4776
|
return /* @__PURE__ */ A("div", {
|
|
3410
4777
|
...g,
|
|
3411
4778
|
className: `voice-control-bar ${h ?? ""}`.trim(),
|
|
@@ -3450,7 +4817,7 @@ function Wt({ label: e, state: i, levels: a, elapsed: o, muted: s, onMuteChange:
|
|
|
3450
4817
|
children: [
|
|
3451
4818
|
m,
|
|
3452
4819
|
c ? /* @__PURE__ */ k(t, {
|
|
3453
|
-
icon: s ?
|
|
4820
|
+
icon: s ? Se : z,
|
|
3454
4821
|
label: "마이크 음소거",
|
|
3455
4822
|
variant: s ? "solid" : "outline",
|
|
3456
4823
|
tone: s ? "danger" : "neutral",
|
|
@@ -3466,7 +4833,7 @@ function Wt({ label: e, state: i, levels: a, elapsed: o, muted: s, onMuteChange:
|
|
|
3466
4833
|
onClick: l,
|
|
3467
4834
|
"data-part": "end",
|
|
3468
4835
|
children: [/* @__PURE__ */ k(r, {
|
|
3469
|
-
icon:
|
|
4836
|
+
icon: Te,
|
|
3470
4837
|
size: "sm",
|
|
3471
4838
|
"aria-hidden": "true"
|
|
3472
4839
|
}), "통화 끝내기"]
|
|
@@ -3477,6 +4844,6 @@ function Wt({ label: e, state: i, levels: a, elapsed: o, muted: s, onMuteChange:
|
|
|
3477
4844
|
});
|
|
3478
4845
|
}
|
|
3479
4846
|
//#endregion
|
|
3480
|
-
export {
|
|
4847
|
+
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
4848
|
|
|
3482
|
-
//# sourceMappingURL=VoiceControlBar-
|
|
4849
|
+
//# sourceMappingURL=VoiceControlBar-Bx016mmz.js.map
|