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