@pstdio/ui 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MermaidComponent-BVMyKttu.js → MermaidComponent-D92GMhht.js} +3 -3
- package/dist/{MermaidComponent-BVMyKttu.js.map → MermaidComponent-D92GMhht.js.map} +1 -1
- package/dist/chat-ui.d.ts +2 -0
- package/dist/chat-ui.js +2 -2
- package/dist/components/data-table/build-columns.d.ts +1 -0
- package/dist/components/data-table/data-table-column-menu.d.ts +2 -0
- package/dist/components/data-table/data-table-row-display.d.ts +11 -0
- package/dist/components/data-table/data-table-table-parts.d.ts +1 -0
- package/dist/components/data-table/edit-mode-data-table-body.d.ts +1 -0
- package/dist/components/data-table/edit-mode-data-table-cell.d.ts +1 -0
- package/dist/components/data-table/edit-mode-data-table-header.d.ts +1 -0
- package/dist/components/diff-viewer/code-editor.d.ts +8 -2
- package/dist/components/kanban-renderer/collection-badge.d.ts +7 -0
- package/dist/components/kanban-renderer/index.d.ts +1 -1
- package/dist/components/kanban-renderer/kanban-renderer-helpers.d.ts +2 -1
- package/dist/components/kanban-renderer/types.d.ts +20 -1
- package/dist/components/list-row/list-row-content.d.ts +1 -0
- package/dist/components/param-editor/param-editor-presentation.d.ts +1 -1
- package/dist/components/param-editor/param-editor.types.d.ts +5 -193
- package/dist/components/rich-text/shared/markdown-ast.d.ts +1 -0
- package/dist/components/rich-text/shared/markdown-source-document.d.ts +7 -0
- package/dist/components/rich-text/shared/markdown-source-links.d.ts +11 -0
- package/dist/components/rich-text/shared/markdown-source-map.d.ts +10 -0
- package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
- package/dist/components/tag-editor/tag-editor-row.d.ts +1 -1
- package/dist/components/tag-editor/tag-editor.types.d.ts +12 -0
- package/dist/components/tag-editor/tag-settings-panel.d.ts +1 -1
- package/dist/components/tree-list/tree-list-drag-provider.d.ts +13 -0
- package/dist/components/tree-list/tree-list-order.store.d.ts +4 -1
- package/dist/components/tree-list/tree-list-reorder.d.ts +14 -3
- package/dist/components/tree-list/tree-list-sortable.d.ts +2 -0
- package/dist/components/tree-list/tree-list-visibility-filter.d.ts +2 -2
- package/dist/components/tree-list/tree-list.d.ts +3 -0
- package/dist/components/tree-list/tree-list.types.d.ts +4 -0
- package/dist/data-table.d.ts +2 -0
- package/dist/data-table.js +806 -793
- package/dist/data-table.js.map +1 -1
- package/dist/diff.d.ts +2 -0
- package/dist/diff.js +529 -533
- package/dist/diff.js.map +1 -1
- package/dist/edit-mode-data-table-DGgRuSW3.js +846 -0
- package/dist/edit-mode-data-table-DGgRuSW3.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1516 -1413
- package/dist/index.js.map +1 -1
- package/dist/{kanban-renderer-toolbar-CpegGbwq.js → kanban-renderer-toolbar-Bl8xXdwU.js} +527 -469
- package/dist/kanban-renderer-toolbar-Bl8xXdwU.js.map +1 -0
- package/dist/kanban-renderer.d.ts +2 -0
- package/dist/kanban-renderer.js +21 -21
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/lazy-markdown-editor-CCOchoJX.js +235 -0
- package/dist/lazy-markdown-editor-CCOchoJX.js.map +1 -0
- package/dist/list-row-DCgdza1i.js +812 -0
- package/dist/list-row-DCgdza1i.js.map +1 -0
- package/dist/markdown-CASvn1Z2.js +1643 -0
- package/dist/markdown-CASvn1Z2.js.map +1 -0
- package/dist/markdown-editor-C4GCyebp.js +1019 -0
- package/dist/markdown-editor-C4GCyebp.js.map +1 -0
- package/dist/{mermaid-renderer-H3IhLqnQ.js → mermaid-renderer-CVnuKs-A.js} +2 -2
- package/dist/{mermaid-renderer-H3IhLqnQ.js.map → mermaid-renderer-CVnuKs-A.js.map} +1 -1
- package/dist/mermaid.d.ts +2 -0
- package/dist/mermaid.js +1 -1
- package/dist/monaco-browser-CgvlArN7.js +21 -0
- package/dist/monaco-browser-CgvlArN7.js.map +1 -0
- package/dist/{param-editor-B8Ff9Nm8.js → param-editor-CkDq623X.js} +2 -2
- package/dist/{param-editor-B8Ff9Nm8.js.map → param-editor-CkDq623X.js.map} +1 -1
- package/dist/param-editor-field-DRgbnL7-.js +2809 -0
- package/dist/param-editor-field-DRgbnL7-.js.map +1 -0
- package/dist/rich-message-DARuDVOX.js +628 -0
- package/dist/{rich-message-DdFYRzTo.js.map → rich-message-DARuDVOX.js.map} +1 -1
- package/dist/rich-text.d.ts +2 -0
- package/dist/rich-text.js +48 -47
- package/dist/rich-text.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/terminal.d.ts +2 -0
- package/dist/theme/primitives/sizes.d.ts +9 -0
- package/dist/{theme-BH4fSst9.js → theme-B-l5_a6F.js} +69 -50
- package/dist/theme-B-l5_a6F.js.map +1 -0
- package/dist/theme-preference-Bpobguh4.js +114 -0
- package/dist/theme-preference-Bpobguh4.js.map +1 -0
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js +1 -1
- package/dist/tree-list-AlO5ZmxQ.js +1262 -0
- package/dist/tree-list-AlO5ZmxQ.js.map +1 -0
- package/dist/utils/theme-preference.d.ts +4 -1
- package/dist/workspace-badge-BR_GgsAG.js +175 -0
- package/dist/workspace-badge-BR_GgsAG.js.map +1 -0
- package/package.json +5 -42
- package/dist/dialog-accept-shortcut-DAEBsoWW.js +0 -7
- package/dist/dialog-accept-shortcut-DAEBsoWW.js.map +0 -1
- package/dist/edit-mode-data-table-D6NeiDJx.js +0 -775
- package/dist/edit-mode-data-table-D6NeiDJx.js.map +0 -1
- package/dist/editor-config-D9OksZ93.js +0 -2416
- package/dist/editor-config-D9OksZ93.js.map +0 -1
- package/dist/kanban-renderer-toolbar-CpegGbwq.js.map +0 -1
- package/dist/lazy-markdown-editor-B7uP2ALS.js +0 -26
- package/dist/lazy-markdown-editor-B7uP2ALS.js.map +0 -1
- package/dist/list-row-9oxy-F0v.js +0 -796
- package/dist/list-row-9oxy-F0v.js.map +0 -1
- package/dist/monaco-browser-CO0NxK_Z.js +0 -19
- package/dist/monaco-browser-CO0NxK_Z.js.map +0 -1
- package/dist/number-input-WUfejtNx.js +0 -343
- package/dist/number-input-WUfejtNx.js.map +0 -1
- package/dist/param-editor-field-Cu4pto_a.js +0 -2845
- package/dist/param-editor-field-Cu4pto_a.js.map +0 -1
- package/dist/rich-message-DdFYRzTo.js +0 -658
- package/dist/theme-BH4fSst9.js.map +0 -1
- package/dist/theme-preference-DyymrYpR.js +0 -123
- package/dist/theme-preference-DyymrYpR.js.map +0 -1
- package/dist/tree-list-uV4UFj0x.js +0 -1116
- package/dist/tree-list-uV4UFj0x.js.map +0 -1
|
@@ -0,0 +1,846 @@
|
|
|
1
|
+
import { jsx as o, jsxs as H } from "react/jsx-runtime";
|
|
2
|
+
import { c as j } from "react/compiler-runtime";
|
|
3
|
+
import { Popover as oe, IconButton as Z, Text as ie, Box as ne, Icon as $, Portal as qe, chakra as Ht, Flex as le, Table as L, Button as Ie, Menu as J, Stack as wt } from "@chakra-ui/react";
|
|
4
|
+
import { isValidElement as Ct, useRef as ft, useEffect as ht, useState as ve } from "react";
|
|
5
|
+
import { S as St } from "./browser-storage-DPtOQJx0.js";
|
|
6
|
+
import { K as Pt, f as Tt, u as Mt } from "./kanban-renderer-toolbar-Bl8xXdwU.js";
|
|
7
|
+
import { Settings2 as Ot, CalendarClock as Nt, Type as $t, Hash as Bt, CheckCircle2 as Vt, Check as gt, X as xt, Minus as Lt, Plus as vt, Trash2 as yt, Pencil as jt, ChevronsLeft as Kt, ChevronLeft as Ft, ChevronRight as Xt, ChevronsRight as Gt } from "lucide-react";
|
|
8
|
+
import { S as Ut, C as Rt, N as Yt, a as qt } from "./lazy-markdown-editor-CCOchoJX.js";
|
|
9
|
+
import { createColumnHelper as Jt } from "@tanstack/react-table";
|
|
10
|
+
import { R as It, L as kt } from "./list-row-DCgdza1i.js";
|
|
11
|
+
const Qt = (t) => {
|
|
12
|
+
const e = j(8), {
|
|
13
|
+
rows: l,
|
|
14
|
+
attributes: n,
|
|
15
|
+
storageKey: a,
|
|
16
|
+
columnControl: s,
|
|
17
|
+
defaultViews: i,
|
|
18
|
+
defaultActiveViewId: r
|
|
19
|
+
} = t;
|
|
20
|
+
let d;
|
|
21
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
22
|
+
viewMode: "list"
|
|
23
|
+
}, e[0] = d) : d = e[0];
|
|
24
|
+
let c;
|
|
25
|
+
return e[1] !== n || e[2] !== s || e[3] !== r || e[4] !== i || e[5] !== l || e[6] !== a ? (c = /* @__PURE__ */ o(Pt, { rows: l, storageKey: a, attributes: n, defaultSettings: d, defaultViews: i, defaultActiveViewId: r, displayControl: s }), e[1] = n, e[2] = s, e[3] = r, e[4] = i, e[5] = l, e[6] = a, e[7] = c) : c = e[7], c;
|
|
26
|
+
}, Zt = (t) => {
|
|
27
|
+
const e = j(10), {
|
|
28
|
+
showDivider: l,
|
|
29
|
+
wrapRows: n,
|
|
30
|
+
onWrapRowsChange: a
|
|
31
|
+
} = t, i = (l === void 0 ? !1 : l) ? "1px" : void 0;
|
|
32
|
+
let r;
|
|
33
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = {
|
|
34
|
+
role: "switch"
|
|
35
|
+
}, e[0] = r) : r = e[0];
|
|
36
|
+
let d;
|
|
37
|
+
e[1] !== a ? (d = (p) => a(p.checked === !0), e[1] = a, e[2] = d) : d = e[2];
|
|
38
|
+
let c;
|
|
39
|
+
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ o(ie, { as: "span", textStyle: "label/S/regular", children: "Wrap rows" }), e[3] = c) : c = e[3];
|
|
40
|
+
let f;
|
|
41
|
+
e[4] !== d || e[5] !== n ? (f = /* @__PURE__ */ o(Ut, { checked: n, inputProps: r, width: "full", flexDirection: "row-reverse", justifyContent: "space-between", onCheckedChange: d, children: c }), e[4] = d, e[5] = n, e[6] = f) : f = e[6];
|
|
42
|
+
let g;
|
|
43
|
+
return e[7] !== i || e[8] !== f ? (g = /* @__PURE__ */ o(ne, { borderBottomWidth: i, borderColor: "border.subtle", padding: "xs", children: f }), e[7] = i, e[8] = f, e[9] = g) : g = e[9], g;
|
|
44
|
+
}, en = (t) => {
|
|
45
|
+
const e = j(16), {
|
|
46
|
+
compact: l,
|
|
47
|
+
wrapRows: n,
|
|
48
|
+
onWrapRowsChange: a
|
|
49
|
+
} = t, s = l === void 0 ? !1 : l;
|
|
50
|
+
let i;
|
|
51
|
+
e[0] !== a || e[1] !== n ? (i = /* @__PURE__ */ o(oe.Positioner, { children: /* @__PURE__ */ o(oe.Content, { width: "min(240px, calc(100vw - 32px))", p: "0", bg: "bg", overflow: "hidden", children: /* @__PURE__ */ o(Zt, { wrapRows: n, onWrapRowsChange: a }) }) }), e[0] = a, e[1] = n, e[2] = i) : i = e[2];
|
|
52
|
+
const r = i, d = s ? "bottom-start" : "bottom-end";
|
|
53
|
+
let c;
|
|
54
|
+
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = {
|
|
55
|
+
mainAxis: 8
|
|
56
|
+
}, e[3] = c) : c = e[3];
|
|
57
|
+
let f;
|
|
58
|
+
e[4] !== d ? (f = {
|
|
59
|
+
placement: d,
|
|
60
|
+
offset: c
|
|
61
|
+
}, e[4] = d, e[5] = f) : f = e[5];
|
|
62
|
+
const g = s ? "2xs" : "sm";
|
|
63
|
+
let p;
|
|
64
|
+
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ o($, { as: Ot, boxSize: "14px" }), e[6] = p) : p = e[6];
|
|
65
|
+
let u;
|
|
66
|
+
e[7] !== g ? (u = /* @__PURE__ */ o(oe.Trigger, { asChild: !0, children: /* @__PURE__ */ o(Z, { "aria-label": "Display settings", variant: "ghost", size: g, children: p }) }), e[7] = g, e[8] = u) : u = e[8];
|
|
67
|
+
let m;
|
|
68
|
+
e[9] !== s || e[10] !== r ? (m = s ? r : /* @__PURE__ */ o(qe, { children: r }), e[9] = s, e[10] = r, e[11] = m) : m = e[11];
|
|
69
|
+
let C;
|
|
70
|
+
return e[12] !== f || e[13] !== u || e[14] !== m ? (C = /* @__PURE__ */ H(oe.Root, { positioning: f, children: [
|
|
71
|
+
u,
|
|
72
|
+
m
|
|
73
|
+
] }), e[12] = f, e[13] = u, e[14] = m, e[15] = C) : C = e[15], C;
|
|
74
|
+
}, mt = (t) => typeof t == "object" && t !== null && "display" in t, bt = (t) => typeof t == "string" || t instanceof String, tn = (t) => typeof t == "number" || t instanceof Number, nn = (t) => typeof t == "boolean" || t instanceof Boolean, ln = (t) => {
|
|
75
|
+
const e = t.map((l) => mt(l) ? l.sortValue ?? null : l instanceof String || l instanceof Number || l instanceof Boolean ? l.valueOf() : Ct(l) ? null : l).filter((l) => l != null);
|
|
76
|
+
return e.length === 0 ? "unknown" : e.every((l) => bt(l) && !Number.isNaN(Date.parse(l.toString()))) ? "date" : e.every((l) => tn(l)) ? "number" : e.every((l) => nn(l)) ? "boolean" : e.every((l) => bt(l)) ? "string" : "unknown";
|
|
77
|
+
}, Ye = {
|
|
78
|
+
boxSize: "14px",
|
|
79
|
+
marginRight: "2px"
|
|
80
|
+
}, on = (t) => {
|
|
81
|
+
const e = ln(t);
|
|
82
|
+
return e === "date" ? /* @__PURE__ */ o($, { as: Nt, ...Ye }) : e === "string" ? /* @__PURE__ */ o($, { as: $t, ...Ye }) : e === "number" ? /* @__PURE__ */ o($, { as: Bt, ...Ye }) : e === "boolean" ? /* @__PURE__ */ o($, { as: Vt, ...Ye }) : null;
|
|
83
|
+
};
|
|
84
|
+
function Un(t) {
|
|
85
|
+
if (mt(t)) return t.display;
|
|
86
|
+
if (Ct(t)) return t;
|
|
87
|
+
switch ((t instanceof String || t instanceof Number || t instanceof Boolean) && (t = t.valueOf()), typeof t) {
|
|
88
|
+
case "boolean":
|
|
89
|
+
return t ? "TRUE" : "FALSE";
|
|
90
|
+
case "number":
|
|
91
|
+
return t;
|
|
92
|
+
case "object":
|
|
93
|
+
return t !== null ? JSON.stringify(t) : "-";
|
|
94
|
+
case "undefined":
|
|
95
|
+
return "-";
|
|
96
|
+
default:
|
|
97
|
+
return t ? String(t) : "-";
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const Yn = Jt(), rn = 30, Dt = (t, e, l) => l ? l(t, e) : typeof t.id == "string" ? t.id : String(e), qn = (t) => typeof t.initialPageSize == "number" && t.initialPageSize > 0 ? t.initialPageSize : rn, Jn = (t) => t.map((e) => e.original), an = (t) => {
|
|
101
|
+
const e = [...t.selectionActions ?? []];
|
|
102
|
+
return t.onCSVDownload && e.push({
|
|
103
|
+
label: "Download CSV",
|
|
104
|
+
onSelect: (l) => {
|
|
105
|
+
t.onCSVDownload?.(l.map((n, a) => Dt(n, a, t.getRowId)));
|
|
106
|
+
}
|
|
107
|
+
}), e;
|
|
108
|
+
}, sn = (t) => t.selectionMode === "multiple" || !!t.onCSVDownload || !!t.selectionActions?.length, Qn = (t) => t.enableRowActivation === !0 && t.activeRowId === t.rowId, ut = (t) => {
|
|
109
|
+
const e = mt(t) ? t.sortValue : t;
|
|
110
|
+
return typeof e == "boolean" ? String(e) : e;
|
|
111
|
+
}, cn = (t, e) => {
|
|
112
|
+
const l = t.map((n) => ut(n[e])).filter((n) => n != null);
|
|
113
|
+
return l.length > 0 && l.every((n) => typeof n == "number");
|
|
114
|
+
}, dn = (t, e) => cn(t, e) ? {
|
|
115
|
+
kind: "number"
|
|
116
|
+
} : {
|
|
117
|
+
kind: "string"
|
|
118
|
+
}, fn = (t, e, l) => e.map((n) => ({
|
|
119
|
+
id: n,
|
|
120
|
+
label: l?.[n] ?? n,
|
|
121
|
+
type: dn(t, n),
|
|
122
|
+
filterable: !0,
|
|
123
|
+
sortable: !0,
|
|
124
|
+
displayable: !0
|
|
125
|
+
})), hn = (t, e, l) => t.map((n, a) => {
|
|
126
|
+
const s = Object.fromEntries(e.map((d) => [d, ut(n[d])])), i = Dt(n, a, l), r = e.length > 0 ? ut(n[e[0]]) : i;
|
|
127
|
+
return {
|
|
128
|
+
id: i,
|
|
129
|
+
title: String(r ?? i),
|
|
130
|
+
attributes: s,
|
|
131
|
+
sourceRow: n
|
|
132
|
+
};
|
|
133
|
+
}), un = (t, e, l) => Tt(t, e, l), Zn = (t, e) => {
|
|
134
|
+
const l = new Set(t), n = e.filter((i) => l.has(i)), a = new Set(n), s = t.filter((i) => !a.has(i));
|
|
135
|
+
return [...n, ...s];
|
|
136
|
+
}, el = (t, e, l) => {
|
|
137
|
+
const n = t.indexOf(e), a = t.indexOf(l);
|
|
138
|
+
if (n < 0 || a < 0 || n === a) return t;
|
|
139
|
+
const s = [...t], [i] = s.splice(n, 1);
|
|
140
|
+
return i ? (s.splice(a, 0, i), s) : t;
|
|
141
|
+
}, gn = (t) => t.toolbarStorageKey ?? `data-table:${t.columnKeys.join("|") || "empty"}`, zt = (t) => {
|
|
142
|
+
const e = j(11), {
|
|
143
|
+
cancelLabel: l,
|
|
144
|
+
saveLabel: n,
|
|
145
|
+
onCancel: a,
|
|
146
|
+
onSave: s
|
|
147
|
+
} = t;
|
|
148
|
+
let i;
|
|
149
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ o(gt, {}), e[0] = i) : i = e[0];
|
|
150
|
+
let r;
|
|
151
|
+
e[1] !== s || e[2] !== n ? (r = /* @__PURE__ */ o(Z, { type: "button", size: "2xs", variant: "ghost", "aria-label": n, onClick: s, children: i }), e[1] = s, e[2] = n, e[3] = r) : r = e[3];
|
|
152
|
+
let d;
|
|
153
|
+
e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ o(xt, {}), e[4] = d) : d = e[4];
|
|
154
|
+
let c;
|
|
155
|
+
e[5] !== l || e[6] !== a ? (c = /* @__PURE__ */ o(Z, { type: "button", size: "2xs", variant: "ghost", "aria-label": l, onClick: a, children: d }), e[5] = l, e[6] = a, e[7] = c) : c = e[7];
|
|
156
|
+
let f;
|
|
157
|
+
return e[8] !== r || e[9] !== c ? (f = /* @__PURE__ */ H(le, { gap: "2xs", flexShrink: "0", children: [
|
|
158
|
+
r,
|
|
159
|
+
c
|
|
160
|
+
] }), e[8] = r, e[9] = c, e[10] = f) : f = e[10], f;
|
|
161
|
+
}, At = (t) => {
|
|
162
|
+
const e = j(12), {
|
|
163
|
+
accessibleName: l,
|
|
164
|
+
textStyle: n,
|
|
165
|
+
value: a,
|
|
166
|
+
onCancel: s,
|
|
167
|
+
onChange: i,
|
|
168
|
+
onSave: r
|
|
169
|
+
} = t, d = ft(null), c = ft(a);
|
|
170
|
+
let f, g;
|
|
171
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = () => {
|
|
172
|
+
const h = d.current;
|
|
173
|
+
if (!h)
|
|
174
|
+
return;
|
|
175
|
+
h.textContent = c.current, h.focus();
|
|
176
|
+
const S = globalThis.getSelection(), b = document.createRange();
|
|
177
|
+
b.selectNodeContents(h), S?.removeAllRanges(), S?.addRange(b);
|
|
178
|
+
}, g = [], e[0] = f, e[1] = g) : (f = e[0], g = e[1]), ht(f, g);
|
|
179
|
+
let p;
|
|
180
|
+
e[2] !== s || e[3] !== r ? (p = (h) => {
|
|
181
|
+
h.key === "Enter" && (h.preventDefault(), r()), h.key === "Escape" && s();
|
|
182
|
+
}, e[2] = s, e[3] = r, e[4] = p) : p = e[4];
|
|
183
|
+
const u = p;
|
|
184
|
+
let m;
|
|
185
|
+
e[5] !== i ? (m = (h) => i(h.currentTarget.textContent ?? ""), e[5] = i, e[6] = m) : m = e[6];
|
|
186
|
+
let C;
|
|
187
|
+
return e[7] !== l || e[8] !== u || e[9] !== m || e[10] !== n ? (C = /* @__PURE__ */ o(Ht.div, { ref: d, role: "textbox", "aria-label": l, contentEditable: !0, suppressContentEditableWarning: !0, height: "10", width: "100%", paddingX: "xs", paddingY: "xs", overflow: "hidden", background: "transparent", border: "none", borderRadius: "0", outline: "none", textStyle: n, textOverflow: "ellipsis", whiteSpace: "nowrap", onInput: m, onKeyDown: u }), e[7] = l, e[8] = u, e[9] = m, e[10] = n, e[11] = C) : C = e[11], C;
|
|
188
|
+
}, mn = (t) => {
|
|
189
|
+
const e = j(12), {
|
|
190
|
+
accessibleName: l,
|
|
191
|
+
draft: n,
|
|
192
|
+
onCancel: a,
|
|
193
|
+
onChange: s,
|
|
194
|
+
onSave: i
|
|
195
|
+
} = t, r = `Rename column ${l}`;
|
|
196
|
+
let d;
|
|
197
|
+
e[0] !== n || e[1] !== a || e[2] !== s || e[3] !== i || e[4] !== r ? (d = /* @__PURE__ */ o(At, { accessibleName: r, textStyle: "label/S/medium", value: n, onChange: s, onSave: i, onCancel: a }), e[0] = n, e[1] = a, e[2] = s, e[3] = i, e[4] = r, e[5] = d) : d = e[5];
|
|
198
|
+
let c;
|
|
199
|
+
e[6] !== a || e[7] !== i ? (c = /* @__PURE__ */ o(ne, { position: "absolute", top: "50%", right: "2xs", transform: "translateY(-50%)", background: "bg.subtle", children: /* @__PURE__ */ o(zt, { saveLabel: "Save column name", cancelLabel: "Cancel column rename", onSave: i, onCancel: a }) }), e[6] = a, e[7] = i, e[8] = c) : c = e[8];
|
|
200
|
+
let f;
|
|
201
|
+
return e[9] !== d || e[10] !== c ? (f = /* @__PURE__ */ H(ne, { position: "absolute", inset: "0", width: "100%", height: "10", background: "bg.subtle", zIndex: "1", children: [
|
|
202
|
+
d,
|
|
203
|
+
c
|
|
204
|
+
] }), e[9] = d, e[10] = c, e[11] = f) : f = e[11], f;
|
|
205
|
+
}, bn = (t) => {
|
|
206
|
+
const e = j(22), {
|
|
207
|
+
anchorRef: l,
|
|
208
|
+
customEditor: n,
|
|
209
|
+
draft: a,
|
|
210
|
+
onCancel: s,
|
|
211
|
+
onChange: i,
|
|
212
|
+
onSave: r
|
|
213
|
+
} = t;
|
|
214
|
+
let d;
|
|
215
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
216
|
+
mainAxis: -40
|
|
217
|
+
}, e[0] = d) : d = e[0];
|
|
218
|
+
let c;
|
|
219
|
+
e[1] !== l ? (c = {
|
|
220
|
+
placement: "bottom-start",
|
|
221
|
+
offset: d,
|
|
222
|
+
getAnchorElement: () => l.current
|
|
223
|
+
}, e[1] = l, e[2] = c) : c = e[2];
|
|
224
|
+
let f, g;
|
|
225
|
+
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = {
|
|
226
|
+
minHeight: "10"
|
|
227
|
+
}, g = {
|
|
228
|
+
maxHeight: "48",
|
|
229
|
+
overscrollBehavior: "contain"
|
|
230
|
+
}, e[3] = f, e[4] = g) : (f = e[3], g = e[4]);
|
|
231
|
+
let p;
|
|
232
|
+
e[5] !== n || e[6] !== a || e[7] !== s || e[8] !== i || e[9] !== r ? (p = n ?? /* @__PURE__ */ o(At, { accessibleName: "Edit cell", textStyle: "paragraph/S/regular", value: a, onChange: i, onSave: r, onCancel: s }), e[5] = n, e[6] = a, e[7] = s, e[8] = i, e[9] = r, e[10] = p) : p = e[10];
|
|
233
|
+
let u;
|
|
234
|
+
e[11] !== p ? (u = /* @__PURE__ */ o(St, { "data-table-cell-editor-body": !0, width: "100%", minHeight: "10", maxHeight: "48", contentProps: f, viewportProps: g, children: p }), e[11] = p, e[12] = u) : u = e[12];
|
|
235
|
+
let m;
|
|
236
|
+
e[13] !== s || e[14] !== r ? (m = /* @__PURE__ */ o(le, { "data-table-cell-editor-footer": !0, height: "8", flexShrink: "0", alignItems: "center", justifyContent: "flex-end", paddingX: "xs", borderTopWidth: "1px", borderColor: "border.subtle", background: "bg.subtle", children: /* @__PURE__ */ o(zt, { saveLabel: "Save cell", cancelLabel: "Cancel cell edit", onSave: r, onCancel: s }) }), e[13] = s, e[14] = r, e[15] = m) : m = e[15];
|
|
237
|
+
let C;
|
|
238
|
+
e[16] !== u || e[17] !== m ? (C = /* @__PURE__ */ o(qe, { children: /* @__PURE__ */ o(oe.Positioner, { children: /* @__PURE__ */ H(oe.Content, { "data-table-cell-editor": !0, width: "calc(var(--reference-width) + 3rem)", minWidth: "calc(var(--reference-width) + 3rem)", maxWidth: "calc(100vw - 2rem)", padding: "0", overflow: "hidden", background: "bg", animation: "none", zIndex: "popover", children: [
|
|
239
|
+
u,
|
|
240
|
+
m
|
|
241
|
+
] }) }) }), e[16] = u, e[17] = m, e[18] = C) : C = e[18];
|
|
242
|
+
let h;
|
|
243
|
+
return e[19] !== c || e[20] !== C ? (h = /* @__PURE__ */ o(oe.Root, { open: !0, closeOnInteractOutside: !1, positioning: c, children: C }), e[19] = c, e[20] = C, e[21] = h) : h = e[21], h;
|
|
244
|
+
}, pn = (t) => t ? {
|
|
245
|
+
height: void 0,
|
|
246
|
+
maxHeight: void 0,
|
|
247
|
+
overflowWrap: "anywhere",
|
|
248
|
+
textOverflow: void 0,
|
|
249
|
+
verticalAlign: "top",
|
|
250
|
+
whiteSpace: "normal"
|
|
251
|
+
} : {
|
|
252
|
+
height: "10",
|
|
253
|
+
maxHeight: "10",
|
|
254
|
+
overflowWrap: void 0,
|
|
255
|
+
textOverflow: "ellipsis",
|
|
256
|
+
verticalAlign: "middle",
|
|
257
|
+
whiteSpace: "nowrap"
|
|
258
|
+
}, wn = (t) => {
|
|
259
|
+
const e = j(45), {
|
|
260
|
+
activeDraft: l,
|
|
261
|
+
column: n,
|
|
262
|
+
context: a,
|
|
263
|
+
editMode: s,
|
|
264
|
+
isActive: i,
|
|
265
|
+
isReadOnly: r,
|
|
266
|
+
wrapRows: d,
|
|
267
|
+
onActivate: c,
|
|
268
|
+
onCancel: f,
|
|
269
|
+
onDraftChange: g,
|
|
270
|
+
onSave: p
|
|
271
|
+
} = t, u = l === void 0 ? "" : l, m = ft(null);
|
|
272
|
+
let C;
|
|
273
|
+
e[0] !== a || e[1] !== s || e[2] !== r ? (C = !r && (s.isCellEditable?.(a) ?? !0), e[0] = a, e[1] = s, e[2] = r, e[3] = C) : C = e[3];
|
|
274
|
+
const h = C;
|
|
275
|
+
let S;
|
|
276
|
+
e[4] !== d ? (S = pn(d), e[4] = d, e[5] = S) : S = e[5];
|
|
277
|
+
const b = S;
|
|
278
|
+
let A;
|
|
279
|
+
if (i) {
|
|
280
|
+
let y;
|
|
281
|
+
e[6] !== u || e[7] !== a || e[8] !== s || e[9] !== g ? (y = s.renderCellEditor?.({
|
|
282
|
+
context: a,
|
|
283
|
+
value: u,
|
|
284
|
+
onChange: g
|
|
285
|
+
}), e[6] = u, e[7] = a, e[8] = s, e[9] = g, e[10] = y) : y = e[10];
|
|
286
|
+
const P = y;
|
|
287
|
+
let O;
|
|
288
|
+
e[11] !== u || e[12] !== P || e[13] !== f || e[14] !== g || e[15] !== p ? (O = /* @__PURE__ */ o(bn, { anchorRef: m, draft: u, customEditor: P, onChange: g, onSave: p, onCancel: f }), e[11] = u, e[12] = P, e[13] = f, e[14] = g, e[15] = p, e[16] = O) : O = e[16], A = O;
|
|
289
|
+
} else {
|
|
290
|
+
let y;
|
|
291
|
+
e[17] !== a || e[18] !== s ? (y = s.renderCell?.(a) ?? String(a.value ?? ""), e[17] = a, e[18] = s, e[19] = y) : y = e[19];
|
|
292
|
+
let P;
|
|
293
|
+
e[20] !== b.overflowWrap || e[21] !== b.whiteSpace || e[22] !== y ? (P = /* @__PURE__ */ o(ne, { width: "100%", minHeight: "5", textAlign: "inherit", overflowWrap: b.overflowWrap, whiteSpace: b.whiteSpace, children: y }), e[20] = b.overflowWrap, e[21] = b.whiteSpace, e[22] = y, e[23] = P) : P = e[23], A = P;
|
|
294
|
+
}
|
|
295
|
+
let k;
|
|
296
|
+
e[24] !== i || e[25] !== h || e[26] !== c ? (k = (y) => {
|
|
297
|
+
!h || i || y.key !== "Enter" && y.key !== " " || (y.preventDefault(), c());
|
|
298
|
+
}, e[24] = i, e[25] = h, e[26] = c, e[27] = k) : k = e[27];
|
|
299
|
+
const W = k, D = n.id, x = String(h), z = i ? "true" : void 0, R = i ? "0" : "xs", I = i ? "visible" : "hidden", E = n.alignment ?? "left", M = h && !i ? "text" : void 0, N = h && !i ? 0 : void 0, w = h && !i ? c : void 0;
|
|
300
|
+
let B;
|
|
301
|
+
return e[28] !== n.id || e[29] !== A || e[30] !== W || e[31] !== b.height || e[32] !== b.maxHeight || e[33] !== b.textOverflow || e[34] !== b.verticalAlign || e[35] !== b.whiteSpace || e[36] !== M || e[37] !== N || e[38] !== w || e[39] !== x || e[40] !== z || e[41] !== R || e[42] !== I || e[43] !== E ? (B = /* @__PURE__ */ o(L.Cell, { ref: m, "data-column-id": D, "data-editable": x, "data-editing": z, padding: R, height: b.height, maxHeight: b.maxHeight, position: "relative", overflow: I, background: "bg", textAlign: E, textStyle: "paragraph/S/regular", textOverflow: b.textOverflow, verticalAlign: b.verticalAlign, whiteSpace: b.whiteSpace, borderRightWidth: "1px", borderBottomWidth: "1px", borderColor: "border.subtle", cursor: M, tabIndex: N, onClick: w, onKeyDown: W, children: A }), e[28] = n.id, e[29] = A, e[30] = W, e[31] = b.height, e[32] = b.maxHeight, e[33] = b.textOverflow, e[34] = b.verticalAlign, e[35] = b.whiteSpace, e[36] = M, e[37] = N, e[38] = w, e[39] = x, e[40] = z, e[41] = R, e[42] = I, e[43] = E, e[44] = B) : B = e[44], B;
|
|
302
|
+
}, _t = (t) => {
|
|
303
|
+
t.stopPropagation();
|
|
304
|
+
}, Cn = (t) => {
|
|
305
|
+
const e = j(8), {
|
|
306
|
+
checked: l,
|
|
307
|
+
indeterminate: n,
|
|
308
|
+
onChange: a
|
|
309
|
+
} = t, s = l ? !0 : n ? "indeterminate" : !1, i = n ? Lt : gt;
|
|
310
|
+
let r;
|
|
311
|
+
e[0] !== i ? (r = /* @__PURE__ */ o($, { as: i, boxSize: "12px", strokeWidth: "3" }), e[0] = i, e[1] = r) : r = e[1];
|
|
312
|
+
let d;
|
|
313
|
+
e[2] !== a ? (d = (f) => a(f.checked === !0), e[2] = a, e[3] = d) : d = e[3];
|
|
314
|
+
let c;
|
|
315
|
+
return e[4] !== s || e[5] !== r || e[6] !== d ? (c = /* @__PURE__ */ o(Rt, { checked: s, "aria-label": "Select all", icon: r, onClick: _t, onCheckedChange: d }), e[4] = s, e[5] = r, e[6] = d, e[7] = c) : c = e[7], c;
|
|
316
|
+
}, Sn = (t) => {
|
|
317
|
+
const e = j(6), {
|
|
318
|
+
checked: l,
|
|
319
|
+
onChange: n
|
|
320
|
+
} = t;
|
|
321
|
+
let a;
|
|
322
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ o($, { as: gt, boxSize: "12px", strokeWidth: "3" }), e[0] = a) : a = e[0];
|
|
323
|
+
let s;
|
|
324
|
+
e[1] !== n ? (s = (r) => n(r.checked === !0), e[1] = n, e[2] = s) : s = e[2];
|
|
325
|
+
let i;
|
|
326
|
+
return e[3] !== l || e[4] !== s ? (i = /* @__PURE__ */ o(L.Cell, { "data-column-id": "rowSelection", height: "10", padding: "xs", textAlign: "center", background: "bg", borderRightWidth: "1px", borderBottomWidth: "1px", borderColor: "border.subtle", children: /* @__PURE__ */ o(Rt, { checked: l, "aria-label": "Select row", icon: a, onClick: _t, onCheckedChange: s }) }), e[3] = l, e[4] = s, e[5] = i) : i = e[5], i;
|
|
327
|
+
}, xn = (t) => {
|
|
328
|
+
const e = j(46), {
|
|
329
|
+
activeCell: l,
|
|
330
|
+
columns: n,
|
|
331
|
+
data: a,
|
|
332
|
+
editMode: s,
|
|
333
|
+
enableSelection: i,
|
|
334
|
+
isReadOnly: r,
|
|
335
|
+
pageIndex: d,
|
|
336
|
+
pageRows: c,
|
|
337
|
+
pageSize: f,
|
|
338
|
+
selectedRowIds: g,
|
|
339
|
+
showNewRow: p,
|
|
340
|
+
wrapRows: u,
|
|
341
|
+
onActivateCell: m,
|
|
342
|
+
onAddRow: C,
|
|
343
|
+
onCancelCell: h,
|
|
344
|
+
onCommitCell: S,
|
|
345
|
+
onDraftChange: b,
|
|
346
|
+
onRemoveRow: A,
|
|
347
|
+
onToggleRowSelection: k,
|
|
348
|
+
rowIdFor: W
|
|
349
|
+
} = t;
|
|
350
|
+
let D;
|
|
351
|
+
if (e[0] !== l || e[1] !== n || e[2] !== a || e[3] !== s || e[4] !== i || e[5] !== r || e[6] !== m || e[7] !== h || e[8] !== S || e[9] !== b || e[10] !== A || e[11] !== k || e[12] !== d || e[13] !== c || e[14] !== f || e[15] !== W || e[16] !== g || e[17] !== u) {
|
|
352
|
+
let R;
|
|
353
|
+
e[19] !== l || e[20] !== n || e[21] !== a || e[22] !== s || e[23] !== i || e[24] !== r || e[25] !== m || e[26] !== h || e[27] !== S || e[28] !== b || e[29] !== A || e[30] !== k || e[31] !== d || e[32] !== f || e[33] !== W || e[34] !== g || e[35] !== u ? (R = (I, E) => {
|
|
354
|
+
const M = d * f + E, N = a.indexOf(I), w = W(I, N), B = /* @__PURE__ */ H(L.Row, { "data-document-row": "true", "data-selected": g.has(w) ? "true" : void 0, "aria-selected": g.has(w), height: u ? void 0 : "10", background: "bg", children: [
|
|
355
|
+
/* @__PURE__ */ o(L.Cell, { "data-column-id": "rowIndex", height: u ? void 0 : "10", padding: "xs", textAlign: "center", textStyle: "paragraph/S/regular", background: "bg.subtle", borderRightWidth: "1px", borderBottomWidth: "1px", borderColor: "border.subtle", verticalAlign: u ? "top" : "middle", children: M + 1 }),
|
|
356
|
+
i ? /* @__PURE__ */ o(Sn, { checked: g.has(w), onChange: (y) => k(w, y) }) : null,
|
|
357
|
+
n.map((y) => {
|
|
358
|
+
const P = {
|
|
359
|
+
row: I,
|
|
360
|
+
rowId: w,
|
|
361
|
+
columnId: y.id,
|
|
362
|
+
value: I[y.id] ?? ""
|
|
363
|
+
}, O = l?.rowId === w && l.columnId === y.id;
|
|
364
|
+
return /* @__PURE__ */ o(wn, { activeDraft: O ? l?.draft : void 0, column: y, context: P, editMode: s, isActive: O, isReadOnly: r, wrapRows: u, onActivate: () => m({
|
|
365
|
+
rowId: w,
|
|
366
|
+
columnId: y.id,
|
|
367
|
+
draft: String(P.value ?? "")
|
|
368
|
+
}), onDraftChange: (Y) => b({
|
|
369
|
+
rowId: w,
|
|
370
|
+
columnId: y.id,
|
|
371
|
+
draft: Y
|
|
372
|
+
}), onSave: S, onCancel: h }, y.id);
|
|
373
|
+
}),
|
|
374
|
+
r ? null : /* @__PURE__ */ o(L.Cell, { "data-column-id": "editControl", width: "min-content", height: u ? void 0 : "10", position: "sticky", right: "0", zIndex: "1", background: "bg", borderLeftWidth: "1px", borderBottomWidth: "1px", borderColor: "border.subtle", verticalAlign: u ? "top" : "middle" })
|
|
375
|
+
] }, w);
|
|
376
|
+
return r ? B : /* @__PURE__ */ o(It, { contentMinWidth: "12rem", actions: [{
|
|
377
|
+
key: "delete-row",
|
|
378
|
+
label: "Delete row",
|
|
379
|
+
icon: /* @__PURE__ */ o($, { as: yt, boxSize: "14px" }),
|
|
380
|
+
onClick: () => A(w)
|
|
381
|
+
}], children: B }, w);
|
|
382
|
+
}, e[19] = l, e[20] = n, e[21] = a, e[22] = s, e[23] = i, e[24] = r, e[25] = m, e[26] = h, e[27] = S, e[28] = b, e[29] = A, e[30] = k, e[31] = d, e[32] = f, e[33] = W, e[34] = g, e[35] = u, e[36] = R) : R = e[36], D = c.map(R), e[0] = l, e[1] = n, e[2] = a, e[3] = s, e[4] = i, e[5] = r, e[6] = m, e[7] = h, e[8] = S, e[9] = b, e[10] = A, e[11] = k, e[12] = d, e[13] = c, e[14] = f, e[15] = W, e[16] = g, e[17] = u, e[18] = D;
|
|
383
|
+
} else
|
|
384
|
+
D = e[18];
|
|
385
|
+
let x;
|
|
386
|
+
e[37] !== n || e[38] !== i || e[39] !== r || e[40] !== C || e[41] !== p ? (x = !r && p ? /* @__PURE__ */ o(L.Row, { children: /* @__PURE__ */ o(L.Cell, { colSpan: n.length + 2 + (i ? 1 : 0), padding: "0", children: /* @__PURE__ */ H(Ie, { size: "xs", variant: "ghost-static", width: "100%", justifyContent: "flex-start", paddingX: "xs", color: "fg.muted", onClick: C, children: [
|
|
387
|
+
/* @__PURE__ */ o($, { as: vt }),
|
|
388
|
+
"New row"
|
|
389
|
+
] }) }) }) : null, e[37] = n, e[38] = i, e[39] = r, e[40] = C, e[41] = p, e[42] = x) : x = e[42];
|
|
390
|
+
let z;
|
|
391
|
+
return e[43] !== D || e[44] !== x ? (z = /* @__PURE__ */ H(L.Body, { children: [
|
|
392
|
+
D,
|
|
393
|
+
x
|
|
394
|
+
] }), e[43] = D, e[44] = x, e[45] = z) : z = e[45], z;
|
|
395
|
+
}, vn = (t) => {
|
|
396
|
+
const e = j(37), {
|
|
397
|
+
activeHeader: l,
|
|
398
|
+
columnIcons: n,
|
|
399
|
+
columns: a,
|
|
400
|
+
data: s,
|
|
401
|
+
editMode: i,
|
|
402
|
+
isReadOnly: r,
|
|
403
|
+
rowDisplayControl: d,
|
|
404
|
+
selectionHeader: c,
|
|
405
|
+
onAddColumn: f,
|
|
406
|
+
onCancelHeaderEdit: g,
|
|
407
|
+
onDeleteColumn: p,
|
|
408
|
+
onHeaderDraftChange: u,
|
|
409
|
+
onHeaderEdit: m,
|
|
410
|
+
onSaveHeader: C
|
|
411
|
+
} = t, h = d ? "2xs" : "xs";
|
|
412
|
+
let S;
|
|
413
|
+
e[0] !== d || e[1] !== h ? (S = /* @__PURE__ */ o(L.ColumnHeader, { "data-column-id": "rowIndex", width: "fit-content", padding: h, background: "bg.subtle", borderRightWidth: "1px", borderBottomWidth: "1px", borderColor: "border.subtle", children: d }), e[0] = d, e[1] = h, e[2] = S) : S = e[2];
|
|
414
|
+
let b;
|
|
415
|
+
e[3] !== c ? (b = c ? /* @__PURE__ */ o(L.ColumnHeader, { "data-column-id": "rowSelection", padding: "xs", textAlign: "center", background: "bg.subtle", borderRightWidth: "1px", borderBottomWidth: "1px", borderColor: "border.subtle", children: c }) : null, e[3] = c, e[4] = b) : b = e[4];
|
|
416
|
+
let A;
|
|
417
|
+
if (e[5] !== l || e[6] !== n || e[7] !== a || e[8] !== s || e[9] !== i || e[10] !== r || e[11] !== g || e[12] !== p || e[13] !== u || e[14] !== m || e[15] !== C) {
|
|
418
|
+
let D;
|
|
419
|
+
e[17] !== l || e[18] !== n || e[19] !== a.length || e[20] !== s || e[21] !== i || e[22] !== r || e[23] !== g || e[24] !== p || e[25] !== u || e[26] !== m || e[27] !== C ? (D = (x) => {
|
|
420
|
+
const z = l?.columnId === x.id, R = n?.[x.id] ?? on(s.map((E) => E[x.id])), I = /* @__PURE__ */ o(L.ColumnHeader, { "data-column-id": x.id, "data-data-column": "true", height: "10", padding: z ? "0" : "xs", position: "relative", overflow: "hidden", background: "bg.subtle", textAlign: x.alignment ?? "left", borderRightWidth: "1px", borderBottomWidth: "1px", borderColor: "border.subtle", cursor: r ? "default" : "context-menu", children: z ? /* @__PURE__ */ o(mn, { accessibleName: x.label || "empty", draft: l.draft, onChange: u, onSave: C, onCancel: g }) : /* @__PURE__ */ H(le, { alignItems: "center", gap: "1", minWidth: "0", overflow: "hidden", children: [
|
|
421
|
+
R,
|
|
422
|
+
/* @__PURE__ */ o(ie, { as: "div", textStyle: "label/S/medium", truncate: !0, children: i.renderHeader?.(x) ?? x.label })
|
|
423
|
+
] }) }, x.id);
|
|
424
|
+
return r ? I : /* @__PURE__ */ o(It, { contentMinWidth: "12rem", actions: [{
|
|
425
|
+
key: "edit-header",
|
|
426
|
+
label: "Rename column",
|
|
427
|
+
icon: /* @__PURE__ */ o($, { as: jt, boxSize: "14px" }),
|
|
428
|
+
onClick: () => m(x)
|
|
429
|
+
}, {
|
|
430
|
+
key: "delete-column",
|
|
431
|
+
label: "Delete column",
|
|
432
|
+
icon: /* @__PURE__ */ o($, { as: yt, boxSize: "14px" }),
|
|
433
|
+
isDisabled: a.length === 1,
|
|
434
|
+
separatorBefore: !0,
|
|
435
|
+
onClick: () => p(x.id)
|
|
436
|
+
}], children: I }, x.id);
|
|
437
|
+
}, e[17] = l, e[18] = n, e[19] = a.length, e[20] = s, e[21] = i, e[22] = r, e[23] = g, e[24] = p, e[25] = u, e[26] = m, e[27] = C, e[28] = D) : D = e[28], A = a.map(D), e[5] = l, e[6] = n, e[7] = a, e[8] = s, e[9] = i, e[10] = r, e[11] = g, e[12] = p, e[13] = u, e[14] = m, e[15] = C, e[16] = A;
|
|
438
|
+
} else
|
|
439
|
+
A = e[16];
|
|
440
|
+
let k;
|
|
441
|
+
e[29] !== r || e[30] !== f ? (k = r ? null : /* @__PURE__ */ o(L.ColumnHeader, { "data-column-id": "editControl", width: "min-content", padding: "2xs", textAlign: "center", position: "sticky", right: "0", zIndex: "3", background: "bg.subtle", borderLeftWidth: "1px", borderBottomWidth: "1px", borderColor: "border.subtle", children: /* @__PURE__ */ o(Z, { size: "xs", variant: "ghost", "aria-label": "Insert column", onClick: f, children: /* @__PURE__ */ o(vt, {}) }) }), e[29] = r, e[30] = f, e[31] = k) : k = e[31];
|
|
442
|
+
let W;
|
|
443
|
+
return e[32] !== S || e[33] !== b || e[34] !== A || e[35] !== k ? (W = /* @__PURE__ */ o(L.Header, { children: /* @__PURE__ */ H(L.Row, { height: "10", background: "bg.subtle", children: [
|
|
444
|
+
S,
|
|
445
|
+
b,
|
|
446
|
+
A,
|
|
447
|
+
k
|
|
448
|
+
] }) }), e[32] = S, e[33] = b, e[34] = A, e[35] = k, e[36] = W) : W = e[36], W;
|
|
449
|
+
};
|
|
450
|
+
function yn(t) {
|
|
451
|
+
const e = j(68), {
|
|
452
|
+
pageCount: l,
|
|
453
|
+
pageIndex: n,
|
|
454
|
+
pageSize: a,
|
|
455
|
+
pageSizeOptions: s,
|
|
456
|
+
totalRows: i,
|
|
457
|
+
onPageChange: r,
|
|
458
|
+
onPageSizeChange: d
|
|
459
|
+
} = t, c = Math.max(l, 1), f = n > 0, g = n < c - 1;
|
|
460
|
+
let p;
|
|
461
|
+
e[0] !== i ? (p = /* @__PURE__ */ H(ie, { textStyle: "label/S/regular", children: [
|
|
462
|
+
i,
|
|
463
|
+
" rows"
|
|
464
|
+
] }), e[0] = i, e[1] = p) : p = e[1];
|
|
465
|
+
let u;
|
|
466
|
+
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ o(ie, { textStyle: "label/S/regular", children: "Rows per page" }), e[2] = u) : u = e[2];
|
|
467
|
+
let m;
|
|
468
|
+
e[3] !== a ? (m = /* @__PURE__ */ o(J.Trigger, { asChild: !0, children: /* @__PURE__ */ o(Ie, { size: "xs", variant: "outline", children: a }) }), e[3] = a, e[4] = m) : m = e[4];
|
|
469
|
+
let C;
|
|
470
|
+
if (e[5] !== d || e[6] !== a || e[7] !== s) {
|
|
471
|
+
let U;
|
|
472
|
+
e[9] !== d || e[10] !== a ? (U = (K) => /* @__PURE__ */ o(J.Item, { value: `${K}`, asChild: !0, children: /* @__PURE__ */ o(kt, { asChild: !0, variant: "full-width", label: `${K}`, isSelected: K === a, onActivate: () => d(K) }) }, K), e[9] = d, e[10] = a, e[11] = U) : U = e[11], C = s.map(U), e[5] = d, e[6] = a, e[7] = s, e[8] = C;
|
|
473
|
+
} else
|
|
474
|
+
C = e[8];
|
|
475
|
+
let h;
|
|
476
|
+
e[12] !== C ? (h = /* @__PURE__ */ o(qe, { children: /* @__PURE__ */ o(J.Positioner, { children: /* @__PURE__ */ o(J.Content, { bg: "bg", children: C }) }) }), e[12] = C, e[13] = h) : h = e[13];
|
|
477
|
+
let S;
|
|
478
|
+
e[14] !== m || e[15] !== h ? (S = /* @__PURE__ */ H(le, { alignItems: "center", gap: "xs", marginRight: "sm", children: [
|
|
479
|
+
u,
|
|
480
|
+
/* @__PURE__ */ H(J.Root, { children: [
|
|
481
|
+
m,
|
|
482
|
+
h
|
|
483
|
+
] })
|
|
484
|
+
] }), e[14] = m, e[15] = h, e[16] = S) : S = e[16];
|
|
485
|
+
let b;
|
|
486
|
+
e[17] !== r ? (b = () => r(0), e[17] = r, e[18] = b) : b = e[18];
|
|
487
|
+
const A = !f;
|
|
488
|
+
let k;
|
|
489
|
+
e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ o($, { as: Kt, boxSize: "14px" }), e[19] = k) : k = e[19];
|
|
490
|
+
let W;
|
|
491
|
+
e[20] !== b || e[21] !== A ? (W = /* @__PURE__ */ o(Z, { size: "xs", "aria-label": "Go to first page", onClick: b, disabled: A, children: k }), e[20] = b, e[21] = A, e[22] = W) : W = e[22];
|
|
492
|
+
let D;
|
|
493
|
+
e[23] !== r || e[24] !== n ? (D = () => r(n - 1), e[23] = r, e[24] = n, e[25] = D) : D = e[25];
|
|
494
|
+
const x = !f;
|
|
495
|
+
let z;
|
|
496
|
+
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ o($, { as: Ft, boxSize: "14px" }), e[26] = z) : z = e[26];
|
|
497
|
+
let R;
|
|
498
|
+
e[27] !== D || e[28] !== x ? (R = /* @__PURE__ */ o(Z, { size: "xs", "aria-label": "Go to previous page", onClick: D, disabled: x, children: z }), e[27] = D, e[28] = x, e[29] = R) : R = e[29];
|
|
499
|
+
let I;
|
|
500
|
+
e[30] !== r || e[31] !== n ? (I = () => r(n + 1), e[30] = r, e[31] = n, e[32] = I) : I = e[32];
|
|
501
|
+
const E = !g;
|
|
502
|
+
let M;
|
|
503
|
+
e[33] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ o($, { as: Xt, boxSize: "14px" }), e[33] = M) : M = e[33];
|
|
504
|
+
let N;
|
|
505
|
+
e[34] !== I || e[35] !== E ? (N = /* @__PURE__ */ o(Z, { size: "xs", "aria-label": "Go to next page", onClick: I, disabled: E, children: M }), e[34] = I, e[35] = E, e[36] = N) : N = e[36];
|
|
506
|
+
let w;
|
|
507
|
+
e[37] !== r || e[38] !== c ? (w = () => r(c - 1), e[37] = r, e[38] = c, e[39] = w) : w = e[39];
|
|
508
|
+
const B = !g;
|
|
509
|
+
let y;
|
|
510
|
+
e[40] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ o($, { as: Gt, boxSize: "14px" }), e[40] = y) : y = e[40];
|
|
511
|
+
let P;
|
|
512
|
+
e[41] !== w || e[42] !== B ? (P = /* @__PURE__ */ o(Z, { size: "xs", "aria-label": "Go to last page", onClick: w, disabled: B, children: y }), e[41] = w, e[42] = B, e[43] = P) : P = e[43];
|
|
513
|
+
let O;
|
|
514
|
+
e[44] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ o(ie, { children: "Page" }), e[44] = O) : O = e[44];
|
|
515
|
+
const Y = `${n + 1}`;
|
|
516
|
+
let G;
|
|
517
|
+
e[45] !== r || e[46] !== c ? (G = (U) => {
|
|
518
|
+
const K = Number.isNaN(U.valueAsNumber) ? 1 : U.valueAsNumber, re = Math.min(c, Math.max(1, K));
|
|
519
|
+
r(re - 1);
|
|
520
|
+
}, e[45] = r, e[46] = c, e[47] = G) : G = e[47];
|
|
521
|
+
let ye;
|
|
522
|
+
e[48] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ye = /* @__PURE__ */ o(Yt, { className: "nodrag" }), e[48] = ye) : ye = e[48];
|
|
523
|
+
let ee;
|
|
524
|
+
e[49] !== Y || e[50] !== G || e[51] !== c ? (ee = /* @__PURE__ */ o(qt, { margin: "2xs", width: "3rem", size: "xs", min: 1, max: c, value: Y, onValueChange: G, children: ye }), e[49] = Y, e[50] = G, e[51] = c, e[52] = ee) : ee = e[52];
|
|
525
|
+
let _;
|
|
526
|
+
e[53] !== c ? (_ = /* @__PURE__ */ H(ie, { children: [
|
|
527
|
+
"of ",
|
|
528
|
+
c
|
|
529
|
+
] }), e[53] = c, e[54] = _) : _ = e[54];
|
|
530
|
+
let q;
|
|
531
|
+
e[55] !== ee || e[56] !== _ ? (q = /* @__PURE__ */ H(le, { alignItems: "center", height: "100%", marginLeft: "sm", marginRight: "md", gap: "xs", children: [
|
|
532
|
+
O,
|
|
533
|
+
ee,
|
|
534
|
+
_
|
|
535
|
+
] }), e[55] = ee, e[56] = _, e[57] = q) : q = e[57];
|
|
536
|
+
let te;
|
|
537
|
+
e[58] !== R || e[59] !== N || e[60] !== P || e[61] !== q || e[62] !== S || e[63] !== W ? (te = /* @__PURE__ */ H(wt, { alignItems: "center", direction: "row", justifyContent: "flex-end", paddingY: "xs", children: [
|
|
538
|
+
S,
|
|
539
|
+
W,
|
|
540
|
+
R,
|
|
541
|
+
N,
|
|
542
|
+
P,
|
|
543
|
+
q
|
|
544
|
+
] }), e[58] = R, e[59] = N, e[60] = P, e[61] = q, e[62] = S, e[63] = W, e[64] = te) : te = e[64];
|
|
545
|
+
let V;
|
|
546
|
+
return e[65] !== p || e[66] !== te ? (V = /* @__PURE__ */ H(le, { alignItems: "center", justifyContent: "space-between", borderTop: "1px solid", borderColor: "border.subtle", paddingX: "xs", children: [
|
|
547
|
+
p,
|
|
548
|
+
te
|
|
549
|
+
] }), e[65] = p, e[66] = te, e[67] = V) : V = e[67], V;
|
|
550
|
+
}
|
|
551
|
+
function Rn(t) {
|
|
552
|
+
const e = j(24), {
|
|
553
|
+
selectedCount: l,
|
|
554
|
+
totalCount: n,
|
|
555
|
+
onClearSelection: a,
|
|
556
|
+
onSelectAll: s,
|
|
557
|
+
actions: i,
|
|
558
|
+
selectedRows: r
|
|
559
|
+
} = t, d = i.length === 1 ? i[0]?.label : "Actions";
|
|
560
|
+
let c;
|
|
561
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ o($, { as: xt, boxSize: "16px" }), e[0] = c) : c = e[0];
|
|
562
|
+
let f;
|
|
563
|
+
e[1] !== a ? (f = /* @__PURE__ */ o(Z, { "aria-label": "clear-selection", onClick: a, size: "xs", children: c }), e[1] = a, e[2] = f) : f = e[2];
|
|
564
|
+
let g;
|
|
565
|
+
e[3] !== l ? (g = /* @__PURE__ */ H(ie, { children: [
|
|
566
|
+
l,
|
|
567
|
+
" rows selected"
|
|
568
|
+
] }), e[3] = l, e[4] = g) : g = e[4];
|
|
569
|
+
let p;
|
|
570
|
+
e[5] !== s || e[6] !== l || e[7] !== n ? (p = l !== n && /* @__PURE__ */ H(Ie, { size: "xs", onClick: s, children: [
|
|
571
|
+
"Select all ",
|
|
572
|
+
n,
|
|
573
|
+
" rows"
|
|
574
|
+
] }), e[5] = s, e[6] = l, e[7] = n, e[8] = p) : p = e[8];
|
|
575
|
+
let u;
|
|
576
|
+
e[9] !== d || e[10] !== i[0] || e[11] !== i.length || e[12] !== r ? (u = i.length === 1 && i[0] ? /* @__PURE__ */ o(Ie, { size: "xs", onClick: () => i[0]?.onSelect(r), children: d }) : null, e[9] = d, e[10] = i[0], e[11] = i.length, e[12] = r, e[13] = u) : u = e[13];
|
|
577
|
+
let m;
|
|
578
|
+
e[14] !== d || e[15] !== i || e[16] !== r ? (m = i.length > 1 ? /* @__PURE__ */ H(J.Root, { children: [
|
|
579
|
+
/* @__PURE__ */ o(J.Trigger, { asChild: !0, children: /* @__PURE__ */ o(Ie, { size: "xs", children: d }) }),
|
|
580
|
+
/* @__PURE__ */ o(qe, { children: /* @__PURE__ */ o(J.Positioner, { children: /* @__PURE__ */ o(J.Content, { bg: "bg", children: i.map((h) => /* @__PURE__ */ o(J.Item, { value: h.label, asChild: !0, children: /* @__PURE__ */ o(kt, { asChild: !0, variant: "full-width", tone: h.destructive ? "danger" : "default", label: h.label, icon: h.icon, onActivate: () => h.onSelect(r) }) }, h.label)) }) }) })
|
|
581
|
+
] }) : null, e[14] = d, e[15] = i, e[16] = r, e[17] = m) : m = e[17];
|
|
582
|
+
let C;
|
|
583
|
+
return e[18] !== f || e[19] !== g || e[20] !== p || e[21] !== u || e[22] !== m ? (C = /* @__PURE__ */ o(le, { position: "absolute", insetX: "sm", bottom: "sm", zIndex: "popover", justifyContent: "center", pointerEvents: "none", children: /* @__PURE__ */ H(wt, { role: "toolbar", "aria-label": "Selection actions", direction: "row", alignItems: "center", layerStyle: "floatingBar", pointerEvents: "auto", maxWidth: "100%", overflowX: "auto", children: [
|
|
584
|
+
f,
|
|
585
|
+
g,
|
|
586
|
+
p,
|
|
587
|
+
u,
|
|
588
|
+
m
|
|
589
|
+
] }) }), e[18] = f, e[19] = g, e[20] = p, e[21] = u, e[22] = m, e[23] = C) : C = e[23], C;
|
|
590
|
+
}
|
|
591
|
+
const pt = (t) => {
|
|
592
|
+
const e = globalThis.crypto?.randomUUID?.() ?? `${Date.now()}-${Math.random()}`;
|
|
593
|
+
return `${t}-${e}`;
|
|
594
|
+
}, In = (t) => ({
|
|
595
|
+
settings: {
|
|
596
|
+
viewMode: "list"
|
|
597
|
+
},
|
|
598
|
+
views: t.defaultViews,
|
|
599
|
+
activeViewId: t.defaultActiveViewId
|
|
600
|
+
}), tl = (t) => {
|
|
601
|
+
const e = j(151), {
|
|
602
|
+
data: l,
|
|
603
|
+
editMode: n,
|
|
604
|
+
fullWidth: a,
|
|
605
|
+
initialPageSize: s,
|
|
606
|
+
pageSizeOptions: i,
|
|
607
|
+
isReadOnly: r,
|
|
608
|
+
getRowId: d,
|
|
609
|
+
columnIcons: c,
|
|
610
|
+
toolbarStorageKey: f,
|
|
611
|
+
defaultViews: g,
|
|
612
|
+
defaultActiveViewId: p
|
|
613
|
+
} = t, u = a === void 0 ? !1 : a, m = s === void 0 ? 30 : s, C = i === void 0 ? [10, 20, 30, 50] : i, h = r === void 0 ? !0 : r, [S, b] = ve(0);
|
|
614
|
+
let A;
|
|
615
|
+
e[0] !== m ? (A = () => Math.min(Math.max(m, 1), 50), e[0] = m, e[1] = A) : A = e[1];
|
|
616
|
+
const [k, W] = ve(A), [D, x] = ve(null), [z, R] = ve(null), [I, E] = ve(kn), [M, N] = ve(!1), w = n?.columns ?? [], B = w.map(Dn), y = Object.fromEntries(w.map(zn)), P = fn(l, B, y), O = hn(l, B, d), Y = gn({
|
|
617
|
+
toolbarStorageKey: f,
|
|
618
|
+
columnKeys: B
|
|
619
|
+
});
|
|
620
|
+
let G;
|
|
621
|
+
e[2] !== t ? (G = In(t), e[2] = t, e[3] = G) : G = e[3];
|
|
622
|
+
const ee = Mt(Y, An, G), _ = un(O, ee, P), q = _.map(_n), te = [...new Set(C.filter(Wn))], V = Math.max(Math.ceil(q.length / k), 1), U = q.slice(S * k, (S + 1) * k);
|
|
623
|
+
let K = "fit-content";
|
|
624
|
+
u && (K = h ? "100%" : "calc(100% + var(--chakra-spacing-10))");
|
|
625
|
+
let re;
|
|
626
|
+
e[4] !== t ? (re = sn(t), e[4] = t, e[5] = re) : re = e[5];
|
|
627
|
+
const F = re;
|
|
628
|
+
let ke;
|
|
629
|
+
e[6] !== t ? (ke = an(t), e[6] = t, e[7] = ke) : ke = e[7];
|
|
630
|
+
const Je = ke;
|
|
631
|
+
let De;
|
|
632
|
+
e[8] !== V || e[9] !== S || e[10] !== b ? (De = () => {
|
|
633
|
+
S < V || b(V - 1);
|
|
634
|
+
}, e[8] = V, e[9] = S, e[10] = b, e[11] = De) : De = e[11];
|
|
635
|
+
let ze;
|
|
636
|
+
e[12] !== V || e[13] !== S ? (ze = [V, S], e[12] = V, e[13] = S, e[14] = ze) : ze = e[14], ht(De, ze);
|
|
637
|
+
let Ae;
|
|
638
|
+
e[15] !== _ || e[16] !== E ? (Ae = () => {
|
|
639
|
+
const v = new Set(_.map(En));
|
|
640
|
+
E((T) => {
|
|
641
|
+
const X = new Set([...T].filter((dt) => v.has(dt)));
|
|
642
|
+
return X.size === T.size && [...X].every((dt) => T.has(dt)) ? T : X;
|
|
643
|
+
});
|
|
644
|
+
}, e[15] = _, e[16] = E, e[17] = Ae) : Ae = e[17];
|
|
645
|
+
let _e;
|
|
646
|
+
if (e[18] !== _ ? (_e = [_], e[18] = _, e[19] = _e) : _e = e[19], ht(Ae, _e), !n)
|
|
647
|
+
return null;
|
|
648
|
+
let We;
|
|
649
|
+
e[20] !== d ? (We = (v, T) => d?.(v, T) ?? String(v.id ?? T), e[20] = d, e[21] = We) : We = e[21];
|
|
650
|
+
const Q = We;
|
|
651
|
+
let Ee;
|
|
652
|
+
e[22] !== D || e[23] !== l || e[24] !== n || e[25] !== Q || e[26] !== x ? (Ee = () => {
|
|
653
|
+
D && (n.onDataChange(l.map((v, T) => Q(v, T) === D.rowId ? {
|
|
654
|
+
...v,
|
|
655
|
+
[D.columnId]: D.draft
|
|
656
|
+
} : v)), x(null));
|
|
657
|
+
}, e[22] = D, e[23] = l, e[24] = n, e[25] = Q, e[26] = x, e[27] = Ee) : Ee = e[27];
|
|
658
|
+
const Qe = Ee;
|
|
659
|
+
let He;
|
|
660
|
+
e[28] !== w || e[29] !== n ? (He = (v, T) => {
|
|
661
|
+
n.onColumnsChange(w.map((X) => X.id === v ? {
|
|
662
|
+
...X,
|
|
663
|
+
...T,
|
|
664
|
+
id: X.id
|
|
665
|
+
} : X));
|
|
666
|
+
}, e[28] = w, e[29] = n, e[30] = He) : He = e[30];
|
|
667
|
+
const Ze = He;
|
|
668
|
+
let Pe;
|
|
669
|
+
e[31] !== z || e[32] !== R || e[33] !== Ze ? (Pe = () => {
|
|
670
|
+
z && (Ze(z.columnId, {
|
|
671
|
+
label: z.draft
|
|
672
|
+
}), R(null));
|
|
673
|
+
}, e[31] = z, e[32] = R, e[33] = Ze, e[34] = Pe) : Pe = e[34];
|
|
674
|
+
const et = Pe;
|
|
675
|
+
let Te;
|
|
676
|
+
e[35] !== w || e[36] !== n ? (Te = () => {
|
|
677
|
+
const v = pt("column");
|
|
678
|
+
n.onColumnsChange([...w, {
|
|
679
|
+
id: v,
|
|
680
|
+
label: `Column ${w.length + 1}`,
|
|
681
|
+
alignment: null
|
|
682
|
+
}]);
|
|
683
|
+
}, e[35] = w, e[36] = n, e[37] = Te) : Te = e[37];
|
|
684
|
+
const tt = Te;
|
|
685
|
+
let Me;
|
|
686
|
+
e[38] !== z?.columnId || e[39] !== w || e[40] !== n || e[41] !== R ? (Me = (v) => {
|
|
687
|
+
w.length !== 1 && (n.onColumnsChange(w.filter((T) => T.id !== v)), z?.columnId === v && R(null));
|
|
688
|
+
}, e[38] = z?.columnId, e[39] = w, e[40] = n, e[41] = R, e[42] = Me) : Me = e[42];
|
|
689
|
+
const nt = Me;
|
|
690
|
+
let Oe;
|
|
691
|
+
e[43] !== w || e[44] !== l || e[45] !== n ? (Oe = () => {
|
|
692
|
+
const v = Object.fromEntries(w.map(Hn));
|
|
693
|
+
v.id = pt("row"), n.onDataChange([...l, v]);
|
|
694
|
+
}, e[43] = w, e[44] = l, e[45] = n, e[46] = Oe) : Oe = e[46];
|
|
695
|
+
const lt = Oe;
|
|
696
|
+
let Ne;
|
|
697
|
+
e[47] !== b || e[48] !== W ? (Ne = (v) => {
|
|
698
|
+
W(Math.min(v, 50)), b(0);
|
|
699
|
+
}, e[47] = b, e[48] = W, e[49] = Ne) : Ne = e[49];
|
|
700
|
+
const Wt = Ne;
|
|
701
|
+
let $e;
|
|
702
|
+
e[50] !== l || e[51] !== n || e[52] !== Q ? ($e = (v) => {
|
|
703
|
+
n.onDataChange(l.filter((T, X) => Q(T, X) !== v));
|
|
704
|
+
}, e[50] = l, e[51] = n, e[52] = Q, e[53] = $e) : $e = e[53];
|
|
705
|
+
const ot = $e;
|
|
706
|
+
let Be;
|
|
707
|
+
e[54] !== E ? (Be = (v, T) => {
|
|
708
|
+
E((X) => {
|
|
709
|
+
const Ue = new Set(X);
|
|
710
|
+
return T ? Ue.add(v) : Ue.delete(v), Ue;
|
|
711
|
+
});
|
|
712
|
+
}, e[54] = E, e[55] = Be) : Be = e[55];
|
|
713
|
+
const it = Be, Ve = _.length > 0 && I.size === _.length;
|
|
714
|
+
let Le;
|
|
715
|
+
if (e[56] !== _ || e[57] !== I) {
|
|
716
|
+
let v;
|
|
717
|
+
e[59] !== I ? (v = (T) => I.has(T.id), e[59] = I, e[60] = v) : v = e[60], Le = _.filter(v).map(Pn), e[56] = _, e[57] = I, e[58] = Le;
|
|
718
|
+
} else
|
|
719
|
+
Le = e[58];
|
|
720
|
+
const Re = Le, rt = !f;
|
|
721
|
+
let je;
|
|
722
|
+
e[61] !== N || e[62] !== rt || e[63] !== M ? (je = /* @__PURE__ */ o(en, { compact: rt, wrapRows: M, onWrapRowsChange: N }), e[61] = N, e[62] = rt, e[63] = M, e[64] = je) : je = e[64];
|
|
723
|
+
const Ke = je;
|
|
724
|
+
let ae;
|
|
725
|
+
e[65] !== p || e[66] !== g || e[67] !== P || e[68] !== O || e[69] !== Y || e[70] !== Ke || e[71] !== f ? (ae = f ? /* @__PURE__ */ o(Qt, { rows: O, storageKey: Y, attributes: P, columnControl: Ke, defaultViews: g, defaultActiveViewId: p }) : null, e[65] = p, e[66] = g, e[67] = P, e[68] = O, e[69] = Y, e[70] = Ke, e[71] = f, e[72] = ae) : ae = e[72];
|
|
726
|
+
let Fe;
|
|
727
|
+
e[73] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Fe = {
|
|
728
|
+
overflowY: "hidden"
|
|
729
|
+
}, e[73] = Fe) : Fe = e[73];
|
|
730
|
+
const Et = K;
|
|
731
|
+
let Xe;
|
|
732
|
+
e[74] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Xe = /* @__PURE__ */ o(ne, { as: "col", width: "9" }), e[74] = Xe) : Xe = e[74];
|
|
733
|
+
let se;
|
|
734
|
+
e[75] !== F ? (se = F ? /* @__PURE__ */ o(ne, { as: "col", width: "9" }) : null, e[75] = F, e[76] = se) : se = e[76];
|
|
735
|
+
let ce;
|
|
736
|
+
e[77] !== w ? (ce = w.map(Tn), e[77] = w, e[78] = ce) : ce = e[78];
|
|
737
|
+
let de;
|
|
738
|
+
e[79] !== h ? (de = h ? null : /* @__PURE__ */ o(ne, { as: "col", width: "10" }), e[79] = h, e[80] = de) : de = e[80];
|
|
739
|
+
let fe;
|
|
740
|
+
e[81] !== se || e[82] !== ce || e[83] !== de ? (fe = /* @__PURE__ */ H("colgroup", { children: [
|
|
741
|
+
Xe,
|
|
742
|
+
se,
|
|
743
|
+
ce,
|
|
744
|
+
de
|
|
745
|
+
] }), e[81] = se, e[82] = ce, e[83] = de, e[84] = fe) : fe = e[84];
|
|
746
|
+
const at = f ? void 0 : Ke;
|
|
747
|
+
let he;
|
|
748
|
+
e[85] !== R ? (he = () => R(null), e[85] = R, e[86] = he) : he = e[86];
|
|
749
|
+
let ue, ge;
|
|
750
|
+
e[87] !== R ? (ue = (v) => R((T) => T && {
|
|
751
|
+
...T,
|
|
752
|
+
draft: v
|
|
753
|
+
}), ge = (v) => R({
|
|
754
|
+
columnId: v.id,
|
|
755
|
+
draft: v.label
|
|
756
|
+
}), e[87] = R, e[88] = ue, e[89] = ge) : (ue = e[88], ge = e[89]);
|
|
757
|
+
let me;
|
|
758
|
+
e[90] !== Ve || e[91] !== F || e[92] !== _ || e[93] !== I || e[94] !== E ? (me = F ? /* @__PURE__ */ o(Cn, { checked: Ve, indeterminate: I.size > 0 && !Ve, onChange: (v) => E(v ? new Set(_.map(Mn)) : /* @__PURE__ */ new Set()) }) : void 0, e[90] = Ve, e[91] = F, e[92] = _, e[93] = I, e[94] = E, e[95] = me) : me = e[95];
|
|
759
|
+
let be;
|
|
760
|
+
e[96] !== z || e[97] !== tt || e[98] !== c || e[99] !== w || e[100] !== et || e[101] !== l || e[102] !== n || e[103] !== h || e[104] !== nt || e[105] !== at || e[106] !== he || e[107] !== ue || e[108] !== ge || e[109] !== me ? (be = /* @__PURE__ */ o(vn, { activeHeader: z, columnIcons: c, columns: w, data: l, editMode: n, isReadOnly: h, rowDisplayControl: at, onAddColumn: tt, onCancelHeaderEdit: he, onDeleteColumn: nt, onHeaderDraftChange: ue, onHeaderEdit: ge, onSaveHeader: et, selectionHeader: me }), e[96] = z, e[97] = tt, e[98] = c, e[99] = w, e[100] = et, e[101] = l, e[102] = n, e[103] = h, e[104] = nt, e[105] = at, e[106] = he, e[107] = ue, e[108] = ge, e[109] = me, e[110] = be) : be = e[110];
|
|
761
|
+
const st = S === V - 1;
|
|
762
|
+
let pe;
|
|
763
|
+
e[111] !== x ? (pe = () => x(null), e[111] = x, e[112] = pe) : pe = e[112];
|
|
764
|
+
let we;
|
|
765
|
+
e[113] !== D || e[114] !== lt || e[115] !== w || e[116] !== Qe || e[117] !== l || e[118] !== n || e[119] !== F || e[120] !== h || e[121] !== S || e[122] !== U || e[123] !== k || e[124] !== ot || e[125] !== Q || e[126] !== I || e[127] !== x || e[128] !== st || e[129] !== pe || e[130] !== it || e[131] !== M ? (we = /* @__PURE__ */ o(xn, { activeCell: D, columns: w, data: l, editMode: n, enableSelection: F, isReadOnly: h, pageIndex: S, pageRows: U, pageSize: k, selectedRowIds: I, showNewRow: st, wrapRows: M, onActivateCell: x, onAddRow: lt, onCancelCell: pe, onCommitCell: Qe, onDraftChange: x, onRemoveRow: ot, onToggleRowSelection: it, rowIdFor: Q }), e[113] = D, e[114] = lt, e[115] = w, e[116] = Qe, e[117] = l, e[118] = n, e[119] = F, e[120] = h, e[121] = S, e[122] = U, e[123] = k, e[124] = ot, e[125] = Q, e[126] = I, e[127] = x, e[128] = st, e[129] = pe, e[130] = it, e[131] = M, e[132] = we) : we = e[132];
|
|
766
|
+
let Ce;
|
|
767
|
+
e[133] !== fe || e[134] !== be || e[135] !== we || e[136] !== K ? (Ce = /* @__PURE__ */ o(St, { "data-table-scroll-area": !0, maxWidth: "100%", showHorizontalScrollbar: !0, showVerticalScrollbar: !1, viewportProps: Fe, children: /* @__PURE__ */ H(L.Root, { "data-edit-mode": "true", size: "sm", tableLayout: "fixed", width: Et, borderWidth: "1px", borderColor: "border.subtle", children: [
|
|
768
|
+
fe,
|
|
769
|
+
be,
|
|
770
|
+
we
|
|
771
|
+
] }) }), e[133] = fe, e[134] = be, e[135] = we, e[136] = K, e[137] = Ce) : Ce = e[137];
|
|
772
|
+
let Se;
|
|
773
|
+
e[138] !== F || e[139] !== _ || e[140] !== Re || e[141] !== Je || e[142] !== E ? (Se = F && Re.length > 0 ? /* @__PURE__ */ o(Rn, { selectedCount: Re.length, totalCount: _.length, onClearSelection: () => E(/* @__PURE__ */ new Set()), onSelectAll: () => E(new Set(_.map(On))), actions: Je, selectedRows: Re }) : null, e[138] = F, e[139] = _, e[140] = Re, e[141] = Je, e[142] = E, e[143] = Se) : Se = e[143];
|
|
774
|
+
let xe;
|
|
775
|
+
e[144] !== Ce || e[145] !== Se ? (xe = /* @__PURE__ */ H(ne, { position: "relative", width: "100%", children: [
|
|
776
|
+
Ce,
|
|
777
|
+
Se
|
|
778
|
+
] }), e[144] = Ce, e[145] = Se, e[146] = xe) : xe = e[146];
|
|
779
|
+
const ct = V > 1 ? /* @__PURE__ */ o(yn, { pageCount: V, pageIndex: S, pageSize: k, pageSizeOptions: te, totalRows: q.length, onPageChange: b, onPageSizeChange: Wt }) : null;
|
|
780
|
+
let Ge;
|
|
781
|
+
return e[147] !== ae || e[148] !== xe || e[149] !== ct ? (Ge = /* @__PURE__ */ H(le, { direction: "column", width: "100%", gap: "2xs", children: [
|
|
782
|
+
ae,
|
|
783
|
+
xe,
|
|
784
|
+
ct
|
|
785
|
+
] }), e[147] = ae, e[148] = xe, e[149] = ct, e[150] = Ge) : Ge = e[150], Ge;
|
|
786
|
+
};
|
|
787
|
+
function kn() {
|
|
788
|
+
return /* @__PURE__ */ new Set();
|
|
789
|
+
}
|
|
790
|
+
function Dn(t) {
|
|
791
|
+
return t.id;
|
|
792
|
+
}
|
|
793
|
+
function zn(t) {
|
|
794
|
+
return [t.id, t.label];
|
|
795
|
+
}
|
|
796
|
+
function An(t) {
|
|
797
|
+
return t.filters;
|
|
798
|
+
}
|
|
799
|
+
function _n(t) {
|
|
800
|
+
return t.sourceRow;
|
|
801
|
+
}
|
|
802
|
+
function Wn(t) {
|
|
803
|
+
return t > 0 && t <= 50;
|
|
804
|
+
}
|
|
805
|
+
function En(t) {
|
|
806
|
+
return t.id;
|
|
807
|
+
}
|
|
808
|
+
function Hn(t) {
|
|
809
|
+
return [t.id, ""];
|
|
810
|
+
}
|
|
811
|
+
function Pn(t) {
|
|
812
|
+
return t.sourceRow;
|
|
813
|
+
}
|
|
814
|
+
function Tn(t) {
|
|
815
|
+
return /* @__PURE__ */ o("col", {}, t.id);
|
|
816
|
+
}
|
|
817
|
+
function Mn(t) {
|
|
818
|
+
return t.id;
|
|
819
|
+
}
|
|
820
|
+
function On(t) {
|
|
821
|
+
return t.id;
|
|
822
|
+
}
|
|
823
|
+
export {
|
|
824
|
+
Zt as D,
|
|
825
|
+
tl as E,
|
|
826
|
+
yn as P,
|
|
827
|
+
Rn as S,
|
|
828
|
+
Zn as a,
|
|
829
|
+
an as b,
|
|
830
|
+
Yn as c,
|
|
831
|
+
fn as d,
|
|
832
|
+
hn as e,
|
|
833
|
+
Un as f,
|
|
834
|
+
on as g,
|
|
835
|
+
gn as h,
|
|
836
|
+
mt as i,
|
|
837
|
+
un as j,
|
|
838
|
+
Dt as k,
|
|
839
|
+
Jn as l,
|
|
840
|
+
el as m,
|
|
841
|
+
Qt as n,
|
|
842
|
+
Qn as o,
|
|
843
|
+
qn as r,
|
|
844
|
+
sn as s
|
|
845
|
+
};
|
|
846
|
+
//# sourceMappingURL=edit-mode-data-table-DGgRuSW3.js.map
|