laif-ds 0.2.74 → 0.2.76
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/CHANGELOG.md +446 -0
- package/dist/agent-docs/adoption-report.json +615 -0
- package/dist/agent-docs/components/Accordion.md +46 -16
- package/dist/agent-docs/components/Alert.md +90 -95
- package/dist/agent-docs/components/AlertDialog.md +132 -126
- package/dist/agent-docs/components/AppEditor.md +90 -90
- package/dist/agent-docs/components/AppRadioGroup.md +18 -18
- package/dist/agent-docs/components/AppSidebar.md +129 -122
- package/dist/agent-docs/components/AppStepper.md +81 -77
- package/dist/agent-docs/components/AspectRatio.md +70 -62
- package/dist/agent-docs/components/AudioVisualizer.md +5 -5
- package/dist/agent-docs/components/Avatar.md +112 -113
- package/dist/agent-docs/components/Badge.md +123 -118
- package/dist/agent-docs/components/Breadcrumb.md +8 -1
- package/dist/agent-docs/components/Button.md +131 -129
- package/dist/agent-docs/components/Card.md +172 -147
- package/dist/agent-docs/components/Carousel.md +148 -129
- package/dist/agent-docs/components/Chat.md +121 -109
- package/dist/agent-docs/components/ChatMessage.md +72 -61
- package/dist/agent-docs/components/Checkbox.md +150 -135
- package/dist/agent-docs/components/CircularProgress.md +53 -49
- package/dist/agent-docs/components/CodeHighlighter.md +4 -4
- package/dist/agent-docs/components/Collapsible.md +114 -95
- package/dist/agent-docs/components/Command.md +141 -142
- package/dist/agent-docs/components/Confirmer.md +182 -175
- package/dist/agent-docs/components/ContextMenu.md +196 -191
- package/dist/agent-docs/components/DataCrossTable.md +114 -94
- package/dist/agent-docs/components/DataTable.md +32 -24
- package/dist/agent-docs/components/Dialog.md +130 -125
- package/dist/agent-docs/components/Drawer.md +141 -127
- package/dist/agent-docs/components/FilePreviewer.md +138 -139
- package/dist/agent-docs/components/FileUploader.md +149 -129
- package/dist/agent-docs/components/Form.md +3 -1
- package/dist/agent-docs/components/FormComposer.md +163 -137
- package/dist/agent-docs/components/GanttChart.md +125 -122
- package/dist/agent-docs/components/HoverCard.md +1 -1
- package/dist/agent-docs/components/Icon.md +98 -99
- package/dist/agent-docs/components/Input.md +173 -138
- package/dist/agent-docs/components/InputOtp.md +6 -1
- package/dist/agent-docs/components/InputSelector.md +94 -97
- package/dist/agent-docs/components/InterruptPrompt.md +4 -4
- package/dist/agent-docs/components/MarkdownRenderer.md +5 -2
- package/dist/agent-docs/components/Menubar.md +60 -57
- package/dist/agent-docs/components/MessageInput.md +134 -131
- package/dist/agent-docs/components/MessageList.md +110 -96
- package/dist/agent-docs/components/MultipleSelector.md +147 -146
- package/dist/agent-docs/components/NavigationMenu.md +6 -2
- package/dist/agent-docs/components/Popover.md +112 -103
- package/dist/agent-docs/components/PromptSuggestions.md +5 -5
- package/dist/agent-docs/components/RadioGroup.md +97 -90
- package/dist/agent-docs/components/Resizable.md +4 -1
- package/dist/agent-docs/components/ResizePrompt.md +12 -13
- package/dist/agent-docs/components/ScrollArea.md +6 -2
- package/dist/agent-docs/components/SecurePdfViewer.md +10 -6
- package/dist/agent-docs/components/Select.md +131 -132
- package/dist/agent-docs/components/Sheet.md +8 -1
- package/dist/agent-docs/components/ShikiHighlighter.md +5 -5
- package/dist/agent-docs/components/Sidebar.md +94 -85
- package/dist/agent-docs/components/Slider.md +62 -58
- package/dist/agent-docs/components/Sonner.md +1 -0
- package/dist/agent-docs/components/Spinner.md +14 -14
- package/dist/agent-docs/components/Stepper.md +93 -67
- package/dist/agent-docs/components/Switch.md +41 -42
- package/dist/agent-docs/components/TableSkeleton.md +8 -8
- package/dist/agent-docs/components/Tabs.md +106 -86
- package/dist/agent-docs/components/TextArea.md +51 -52
- package/dist/agent-docs/components/ThemeSwitcher.md +72 -69
- package/dist/agent-docs/components/Toaster.md +1 -0
- package/dist/agent-docs/components/Tooltip.md +102 -91
- package/dist/agent-docs/components/Typo.md +68 -65
- package/dist/agent-docs/components/WeeklyCalendar.md +63 -64
- package/dist/agent-docs/components-list.md +1 -0
- package/dist/agent-docs/manifest.json +5981 -0
- package/dist/agent-docs/truncated-cell.md +342 -0
- package/dist/components/editor/editor-hooks/use-update-toolbar.js +6 -6
- package/dist/components/editor/plugins/actions/counter-character-plugin.js +6 -6
- package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +18 -18
- package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +10 -10
- package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +9 -9
- package/dist/components/ui/app-checkbox.js +1 -1
- package/dist/components/ui/app-dialog.js +70 -64
- package/dist/components/ui/app-editor.js +51 -51
- package/dist/components/ui/app-form.js +81 -81
- package/dist/components/ui/app-multiple-select-dropdown.js +36 -36
- package/dist/components/ui/app-select.js +109 -104
- package/dist/components/ui/app-sidebar.js +41 -41
- package/dist/components/ui/app-stepper.js +1 -1
- package/dist/components/ui/app-time-picker.js +18 -18
- package/dist/components/ui/app-tooltip.js +1 -1
- package/dist/components/ui/async-select.js +5 -5
- package/dist/components/ui/audio-visualizer.js +61 -58
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/carousel.js +2 -2
- package/dist/components/ui/chart.js +1 -1
- package/dist/components/ui/chat-message.js +8 -8
- package/dist/components/ui/chat.js +86 -88
- package/dist/components/ui/command.js +2 -2
- package/dist/components/ui/copy-button.js +4 -4
- package/dist/components/ui/date-picker.js +20 -20
- package/dist/components/ui/file-preview/index.js +13 -13
- package/dist/components/ui/file-previewer.js +12 -11
- package/dist/components/ui/file-uploader.js +86 -78
- package/dist/components/ui/form.js +2 -2
- package/dist/components/ui/gantt/components/Chart/Bars/Bars.js +56 -56
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarItem/BarItem.js +12 -12
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsItems/BarItems.js +1 -1
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRow.js +4 -4
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/RepeteadBars/RepeteadBars.js +2 -2
- package/dist/components/ui/gantt/components/Chart/Chart.js +23 -23
- package/dist/components/ui/gantt/components/Chart/Scale/Scale.js +1 -1
- package/dist/components/ui/gantt/components/Chart/Tree/Tree.js +34 -34
- package/dist/components/ui/gantt/components/Controls/Controls.js +5 -5
- package/dist/components/ui/gantt/components/Gantt/Gantt.js +4 -4
- package/dist/components/ui/gantt/hooks/useGanttCalculate.js +25 -18
- package/dist/components/ui/input-selector.js +1 -1
- package/dist/components/ui/input.js +23 -23
- package/dist/components/ui/kanban.js +8 -9
- package/dist/components/ui/markdown-renderer.js +41 -35
- package/dist/components/ui/message-input.js +45 -44
- package/dist/components/ui/multiple-selector.js +91 -82
- package/dist/components/ui/secure-pdf-viewer.js +19 -7
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/slider.js +1 -1
- package/dist/components/ui/spinner.js +4 -4
- package/dist/components/ui/stepper.js +157 -138
- package/dist/components/ui/tables/data-cross-table/data-cross-table-buttons.js +29 -29
- package/dist/components/ui/tables/data-cross-table/data-cross-table.js +258 -246
- package/dist/components/ui/tables/data-table/components/data-table-advanced-filter.js +4 -1
- package/dist/components/ui/tables/data-table/components/data-table-body.js +211 -367
- package/dist/components/ui/tables/data-table/components/data-table-filter-inputs.js +114 -112
- package/dist/components/ui/tables/data-table/components/data-table-filters.js +116 -96
- package/dist/components/ui/tables/data-table/components/data-table-header.js +211 -0
- package/dist/components/ui/tables/data-table/components/data-table-searchbar.js +8 -8
- package/dist/components/ui/tables/data-table/components/data-table-skeleton-rows.js +33 -0
- package/dist/components/ui/tables/data-table/data-table.js +258 -250
- package/dist/components/ui/tables/data-table/data-table.service.js +112 -97
- package/dist/components/ui/tables/data-table/data-table.utils.js +25 -15
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/theme-switcher.js +1 -1
- package/dist/components/ui/toggle-group.js +2 -2
- package/dist/components/ui/truncated-cell.js +100 -0
- package/dist/components/ui/weekly-calendar/appointment-card.js +16 -16
- package/dist/components/ui/weekly-calendar/calendar-context.js +6 -6
- package/dist/components/ui/weekly-calendar/calendar-header.js +12 -12
- package/dist/components/ui/weekly-calendar/day-column.js +16 -16
- package/dist/components/ui/weekly-calendar/time-column.js +4 -4
- package/dist/components/ui/weekly-calendar/weekly-calendar.js +4 -4
- package/dist/hooks/use-audio-recording.js +1 -1
- package/dist/hooks/use-auto-scroll.js +18 -18
- package/dist/hooks/use-autosize-textarea.js +12 -13
- package/dist/index.d.ts +100 -45
- package/dist/index.js +362 -360
- package/dist/lib/utils.js +6 -6
- package/dist/styles.v3.css +1 -1
- package/package.json +14 -4
|
@@ -144,7 +144,10 @@ function J({
|
|
|
144
144
|
u({
|
|
145
145
|
...s,
|
|
146
146
|
columnId: String(r),
|
|
147
|
-
columnAccessorKey: (
|
|
147
|
+
columnAccessorKey: (
|
|
148
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
149
|
+
(d.column.columnDef?.accessorKey ?? String(r)) || ""
|
|
150
|
+
),
|
|
148
151
|
columnLabel: d.column.columnDef.meta?.headerLabel || (typeof d.column.columnDef.header == "string" ? d.column.columnDef.header : "") || d.id,
|
|
149
152
|
columnType: d.column.columnDef.meta?.type,
|
|
150
153
|
operator: String(N || "eq"),
|
|
@@ -1,406 +1,250 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
loading: v,
|
|
2
|
+
import { jsx as s, jsxs as C } from "react/jsx-runtime";
|
|
3
|
+
import { flexRender as oe } from "../../../../../node_modules/@tanstack/react-table/build/lib/index.js";
|
|
4
|
+
import { useRef as ne, useState as G, useMemo as b, useCallback as F, useLayoutEffect as re, useEffect as B } from "react";
|
|
5
|
+
import { cn as L } from "../../../../../lib/utils.js";
|
|
6
|
+
import { ScrollArea as se, ScrollBar as P } from "../../../scroll-area.js";
|
|
7
|
+
import { Table as ie, TableBody as A, TableRow as I, TableCell as M } from "../../../table.js";
|
|
8
|
+
import { getPinnedStyle as ce } from "../data-table.service.js";
|
|
9
|
+
import { DataTableHeaderComponent as le } from "./data-table-header.js";
|
|
10
|
+
import { SkeletonRows as ue } from "./data-table-skeleton-rows.js";
|
|
11
|
+
function Re({
|
|
12
|
+
table: u,
|
|
13
|
+
tableContainerRef: i,
|
|
14
|
+
loading: d,
|
|
16
15
|
data: W,
|
|
17
|
-
emptyComponent:
|
|
18
|
-
notFoundMessage:
|
|
19
|
-
onAddFilter:
|
|
20
|
-
maxSortedColumns:
|
|
21
|
-
i18n:
|
|
22
|
-
isServerSide:
|
|
23
|
-
filterBadges:
|
|
24
|
-
advancedFilterBadge:
|
|
25
|
-
searchbarGlobalFilter:
|
|
16
|
+
emptyComponent: j,
|
|
17
|
+
notFoundMessage: V,
|
|
18
|
+
onAddFilter: $,
|
|
19
|
+
maxSortedColumns: U = 3,
|
|
20
|
+
i18n: J,
|
|
21
|
+
isServerSide: p = !1,
|
|
22
|
+
filterBadges: K = [],
|
|
23
|
+
advancedFilterBadge: R,
|
|
24
|
+
searchbarGlobalFilter: Q,
|
|
25
|
+
serverDebounceTime: D = 750,
|
|
26
|
+
rowClassName: x
|
|
26
27
|
}) {
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
31
|
-
if (
|
|
28
|
+
const X = (e) => {
|
|
29
|
+
if (K.some((r) => r.columnId === e)) return !0;
|
|
30
|
+
const o = (r) => r.some((c) => c.columnId === e), n = (r) => r ? r.some((c) => o(c.conditions) ? !0 : c.groups ? n(c.groups) : !1) : !1;
|
|
31
|
+
if (R?.rootGroup) {
|
|
32
|
+
if (o(R.rootGroup.conditions))
|
|
32
33
|
return !0;
|
|
33
|
-
if (
|
|
34
|
-
return
|
|
34
|
+
if (R.rootGroup.groups)
|
|
35
|
+
return n(R.rootGroup.groups);
|
|
35
36
|
}
|
|
36
37
|
return !1;
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const e =
|
|
50
|
-
return
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
38
|
+
}, z = ne({}), [k, Y] = G({}), [Z, N] = G(8), [v, _] = G(!1), y = b(() => {
|
|
39
|
+
let e;
|
|
40
|
+
const t = (o) => {
|
|
41
|
+
clearTimeout(e), e = setTimeout(
|
|
42
|
+
() => _(o),
|
|
43
|
+
D
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
return t.cancel = () => {
|
|
47
|
+
clearTimeout(e);
|
|
48
|
+
}, t;
|
|
49
|
+
}, [D]), q = b(() => {
|
|
50
|
+
const e = u.getHeaderGroups()[0];
|
|
51
|
+
return e ? e.headers : [];
|
|
52
|
+
}, [u.getHeaderGroups]), g = b(
|
|
53
|
+
() => q.filter((e) => e.column.getIsVisible()),
|
|
54
|
+
[q]
|
|
55
|
+
), H = b(
|
|
56
|
+
() => g.filter((e) => e.column.columnDef.meta?.pinned === "left"),
|
|
57
|
+
[g]
|
|
58
|
+
), S = b(
|
|
59
|
+
() => g.filter((e) => e.column.columnDef.meta?.pinned === "right"),
|
|
60
|
+
[g]
|
|
61
|
+
), ee = b(
|
|
62
|
+
() => g.map((e) => e.id).join("|"),
|
|
63
|
+
[g]
|
|
64
|
+
), te = u.getState().pagination, T = F(() => {
|
|
65
|
+
const e = i.current;
|
|
66
|
+
if (!e) return 8;
|
|
67
|
+
const t = e.querySelector("thead tr"), o = e.querySelector("tbody tr"), n = t?.getBoundingClientRect().height ?? 40, r = o?.getBoundingClientRect().height ?? 32.5, O = e.offsetHeight - n, w = Math.floor(O / r);
|
|
68
|
+
return w > 1 ? w : 8;
|
|
69
|
+
}, [i]), a = F(
|
|
70
|
+
(e = 0) => {
|
|
71
|
+
const t = {};
|
|
72
|
+
let o = !1;
|
|
73
|
+
if (!i.current) {
|
|
74
|
+
e < 5 && setTimeout(() => a(e + 1), 100);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const n = i.current.querySelector(
|
|
78
|
+
"tbody tr:first-child"
|
|
79
|
+
);
|
|
80
|
+
let r = 0;
|
|
81
|
+
for (const w of H) {
|
|
82
|
+
const f = w.column.id;
|
|
83
|
+
t[f] = { side: "left", offset: r };
|
|
84
|
+
let l = 0;
|
|
85
|
+
const m = n?.querySelector(
|
|
86
|
+
`[data-column-id="${f}"]`
|
|
87
|
+
), h = z.current[f];
|
|
88
|
+
m && m.offsetWidth > 0 ? l = m.getBoundingClientRect().width : h && h.offsetWidth > 0 ? l = h.getBoundingClientRect().width : (o = !0, l = 150), r += l;
|
|
89
|
+
}
|
|
90
|
+
let c = 0;
|
|
91
|
+
for (const w of [...S].reverse()) {
|
|
92
|
+
const f = w.column.id;
|
|
93
|
+
t[f] = { side: "right", offset: c };
|
|
94
|
+
let l = 0;
|
|
95
|
+
const m = n?.querySelector(
|
|
96
|
+
`[data-column-id="${f}"]`
|
|
97
|
+
), h = z.current[f];
|
|
98
|
+
m && m.offsetWidth > 0 ? l = m.getBoundingClientRect().width : h && h.offsetWidth > 0 ? l = h.getBoundingClientRect().width : (o = !0, l = 150), c += l;
|
|
99
|
+
}
|
|
100
|
+
Y(t);
|
|
101
|
+
const O = T();
|
|
102
|
+
N(O), o && e < 5 && setTimeout(
|
|
103
|
+
() => a(e + 1),
|
|
104
|
+
100 * (e + 1)
|
|
105
|
+
);
|
|
106
|
+
},
|
|
107
|
+
[T, H, S, i]
|
|
108
|
+
);
|
|
109
|
+
return re(() => {
|
|
89
110
|
(() => {
|
|
90
111
|
requestAnimationFrame(() => {
|
|
91
112
|
requestAnimationFrame(() => {
|
|
92
113
|
setTimeout(() => {
|
|
93
|
-
|
|
114
|
+
a();
|
|
94
115
|
}, 50);
|
|
95
116
|
});
|
|
96
117
|
});
|
|
97
118
|
})();
|
|
98
119
|
}, [
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
120
|
+
H,
|
|
121
|
+
S,
|
|
122
|
+
ee,
|
|
123
|
+
d,
|
|
103
124
|
W,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
125
|
+
te,
|
|
126
|
+
a
|
|
127
|
+
]), B(() => {
|
|
128
|
+
const e = () => {
|
|
129
|
+
clearTimeout(e.timeout), e.timeout = setTimeout(() => a(), 100);
|
|
108
130
|
};
|
|
109
|
-
window.addEventListener("resize",
|
|
110
|
-
const
|
|
111
|
-
let
|
|
112
|
-
return
|
|
113
|
-
|
|
114
|
-
}),
|
|
115
|
-
window.removeEventListener("resize",
|
|
131
|
+
window.addEventListener("resize", e);
|
|
132
|
+
const t = i.current;
|
|
133
|
+
let o = null;
|
|
134
|
+
return t && typeof ResizeObserver < "u" && (o = new ResizeObserver(() => {
|
|
135
|
+
a();
|
|
136
|
+
}), o.observe(t)), () => {
|
|
137
|
+
window.removeEventListener("resize", e), clearTimeout(e.timeout), o && o.disconnect();
|
|
116
138
|
};
|
|
117
|
-
}, []),
|
|
118
|
-
if (
|
|
119
|
-
const
|
|
120
|
-
const
|
|
121
|
-
|
|
139
|
+
}, [a, i]), B(() => {
|
|
140
|
+
if (d) {
|
|
141
|
+
const e = () => {
|
|
142
|
+
const n = T();
|
|
143
|
+
N(n);
|
|
122
144
|
};
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
let
|
|
126
|
-
return
|
|
127
|
-
|
|
128
|
-
}),
|
|
129
|
-
|
|
145
|
+
e();
|
|
146
|
+
const t = i.current;
|
|
147
|
+
let o = null;
|
|
148
|
+
return t && typeof ResizeObserver < "u" && (o = new ResizeObserver(() => {
|
|
149
|
+
e();
|
|
150
|
+
}), o.observe(t)), () => {
|
|
151
|
+
o && o.disconnect();
|
|
130
152
|
};
|
|
131
153
|
}
|
|
132
|
-
}, [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
if (!r || !e || r.side !== e) return;
|
|
136
|
-
const l = r.side === "left" ? `${r.offset}px` : void 0, c = r.side === "right" ? `${r.offset}px` : void 0;
|
|
137
|
-
return {
|
|
138
|
-
position: "sticky",
|
|
139
|
-
left: l,
|
|
140
|
-
right: c,
|
|
141
|
-
zIndex: t ? 49 : 48,
|
|
142
|
-
background: "var(--d-background)",
|
|
143
|
-
// Use separate shadow for pinned columns to avoid conflicts
|
|
144
|
-
boxShadow: e === "left" ? `inset -1px ${t ? "0" : "-1px"} 0 var(--d-border), 2px 0 4px -2px rgba(0,0,0,0.1)` : `inset 1px ${t ? "0" : "-1px"} 0 var(--d-border), -2px 0 4px -2px rgba(0,0,0,0.1)`
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
return /* @__PURE__ */ n(
|
|
154
|
+
}, [T, d, i]), B(() => (d ? (_(!0), y.cancel()) : y(!1), () => {
|
|
155
|
+
y.cancel();
|
|
156
|
+
}), [d, y]), /* @__PURE__ */ s(
|
|
148
157
|
"div",
|
|
149
158
|
{
|
|
150
159
|
className: "flex max-h-full min-h-0 max-w-full min-w-0 flex-1",
|
|
151
|
-
ref:
|
|
152
|
-
children: /* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
|
|
158
|
-
{
|
|
159
|
-
ref: (t) => {
|
|
160
|
-
I.current[e.column.id] = t;
|
|
161
|
-
},
|
|
162
|
-
className: u(
|
|
163
|
-
"bg-d-background sticky top-0 h-8 px-0",
|
|
164
|
-
e.column.columnDef.meta?.pinned ? "z-[49]" : "z-10"
|
|
165
|
-
),
|
|
166
|
-
style: N(
|
|
167
|
-
e.column.id,
|
|
168
|
-
e.column.columnDef.meta?.pinned,
|
|
169
|
-
!0
|
|
170
|
-
),
|
|
171
|
-
children: e.isPlaceholder ? null : /* @__PURE__ */ i(te, { children: [
|
|
172
|
-
/* @__PURE__ */ n(
|
|
173
|
-
oe,
|
|
174
|
-
{
|
|
175
|
-
asChild: !0,
|
|
176
|
-
onClick: (t) => {
|
|
177
|
-
e.column.columnDef.meta?.sortable || e.column.columnDef.meta?.filterable || (t.preventDefault(), t.stopPropagation());
|
|
178
|
-
},
|
|
179
|
-
children: /* @__PURE__ */ i(
|
|
180
|
-
"div",
|
|
181
|
-
{
|
|
182
|
-
className: u(
|
|
183
|
-
"flex h-full items-center justify-between gap-2 px-2",
|
|
184
|
-
e.column.columnDef.meta?.sortable || e.column.columnDef.meta?.filterable ? "hover:bg-d-secondary-foreground/10 cursor-pointer" : "cursor-not-allowed"
|
|
185
|
-
),
|
|
186
|
-
children: [
|
|
187
|
-
B(
|
|
188
|
-
e.column.columnDef.header,
|
|
189
|
-
e.getContext()
|
|
190
|
-
),
|
|
191
|
-
/* @__PURE__ */ i("div", { className: "flex flex-row items-center gap-1", children: [
|
|
192
|
-
e.column.columnDef.meta?.searchable && /* @__PURE__ */ n(
|
|
193
|
-
z,
|
|
194
|
-
{
|
|
195
|
-
name: "Search",
|
|
196
|
-
className: u(
|
|
197
|
-
"text-d-foreground/30 max-h-3.5 max-w-3.5",
|
|
198
|
-
!!J && "text-d-primary"
|
|
199
|
-
)
|
|
200
|
-
}
|
|
201
|
-
),
|
|
202
|
-
e.column.columnDef.meta?.filterable && /* @__PURE__ */ n(
|
|
203
|
-
z,
|
|
204
|
-
{
|
|
205
|
-
name: "Filter",
|
|
206
|
-
className: u(
|
|
207
|
-
"text-d-foreground/30 max-h-3.5 max-w-3.5",
|
|
208
|
-
K(e.column.id) && "text-d-primary"
|
|
209
|
-
)
|
|
210
|
-
}
|
|
211
|
-
),
|
|
212
|
-
e.column.columnDef.meta?.sortable && /* @__PURE__ */ i("div", { className: "flex flex-col py-1", children: [
|
|
213
|
-
/* @__PURE__ */ n(
|
|
214
|
-
S,
|
|
215
|
-
{
|
|
216
|
-
iconLeft: "ChevronUp",
|
|
217
|
-
size: "icon",
|
|
218
|
-
className: u(
|
|
219
|
-
"hover:bg-d-foreground/10 max-h-4 max-w-6",
|
|
220
|
-
e.column.getIsSorted() === "asc" && "hover:text-d-destructive hover:bg-d-destructive/20"
|
|
221
|
-
),
|
|
222
|
-
variant: e.column.getIsSorted() === "asc" ? "ghost-accent" : "ghost",
|
|
223
|
-
onClick: (t) => {
|
|
224
|
-
e.column.getIsSorted() === "asc" ? e.column.clearSorting() : e.column.toggleSorting(
|
|
225
|
-
!1,
|
|
226
|
-
!0
|
|
227
|
-
), t.stopPropagation(), t.preventDefault();
|
|
228
|
-
},
|
|
229
|
-
disabled: s.getState().sorting.length >= h && !e.column.getIsSorted()
|
|
230
|
-
}
|
|
231
|
-
),
|
|
232
|
-
/* @__PURE__ */ n(
|
|
233
|
-
S,
|
|
234
|
-
{
|
|
235
|
-
iconLeft: "ChevronDown",
|
|
236
|
-
size: "icon",
|
|
237
|
-
className: u(
|
|
238
|
-
"hover:bg-d-foreground/10 max-h-4 max-w-6",
|
|
239
|
-
e.column.getIsSorted() === "desc" && "hover:text-d-destructive hover:bg-d-destructive/20"
|
|
240
|
-
),
|
|
241
|
-
variant: e.column.getIsSorted() === "desc" ? "ghost-accent" : "ghost",
|
|
242
|
-
onClick: (t) => {
|
|
243
|
-
e.column.getIsSorted() === "desc" ? e.column.clearSorting() : e.column.toggleSorting(
|
|
244
|
-
!0,
|
|
245
|
-
!0
|
|
246
|
-
), t.stopPropagation(), t.preventDefault();
|
|
247
|
-
},
|
|
248
|
-
disabled: s.getState().sorting.length >= h && !e.column.getIsSorted()
|
|
249
|
-
}
|
|
250
|
-
)
|
|
251
|
-
] })
|
|
252
|
-
] })
|
|
253
|
-
]
|
|
254
|
-
}
|
|
255
|
-
)
|
|
256
|
-
}
|
|
257
|
-
),
|
|
258
|
-
/* @__PURE__ */ n(ne, { className: "w-40 p-0", children: /* @__PURE__ */ i("div", { className: "flex flex-col text-sm", children: [
|
|
259
|
-
e.column.columnDef.meta?.sortable && /* @__PURE__ */ i(
|
|
260
|
-
"div",
|
|
261
|
-
{
|
|
262
|
-
className: u(
|
|
263
|
-
"group hover:bg-d-secondary-foreground/5 relative flex cursor-pointer items-center justify-between rounded px-2 py-1.5",
|
|
264
|
-
e.column.getIsSorted() && "bg-d-secondary-foreground/5",
|
|
265
|
-
s.getState().sorting.length >= h && !e.column.getIsSorted() && "pointer-events-none cursor-not-allowed opacity-60"
|
|
266
|
-
),
|
|
267
|
-
"aria-disabled": s.getState().sorting.length >= h && !e.column.getIsSorted(),
|
|
268
|
-
children: [
|
|
269
|
-
/* @__PURE__ */ n("span", { className: "text-md", children: w.sorting.sort }),
|
|
270
|
-
/* @__PURE__ */ n(z, { name: "ChevronRight", size: "xs" }),
|
|
271
|
-
/* @__PURE__ */ i("div", { className: "bg-d-background border-d-border absolute top-0 left-full ml-0 hidden w-48 flex-col rounded-md border p-1 shadow-md group-hover:flex", children: [
|
|
272
|
-
/* @__PURE__ */ n(
|
|
273
|
-
S,
|
|
274
|
-
{
|
|
275
|
-
className: "justify-start",
|
|
276
|
-
variant: "ghost",
|
|
277
|
-
size: "sm",
|
|
278
|
-
iconLeft: e.column.columnDef.meta?.type === "number" ? "ArrowDown01" : e.column.columnDef.meta?.type === "string" ? "ArrowDownAz" : "ArrowDownNarrowWide",
|
|
279
|
-
onClick: () => {
|
|
280
|
-
!e.column.getIsSorted() && s.getState().sorting.length >= h || e.column.toggleSorting(
|
|
281
|
-
!1,
|
|
282
|
-
!0
|
|
283
|
-
);
|
|
284
|
-
},
|
|
285
|
-
children: w.sorting.ascending
|
|
286
|
-
}
|
|
287
|
-
),
|
|
288
|
-
/* @__PURE__ */ n(
|
|
289
|
-
S,
|
|
290
|
-
{
|
|
291
|
-
className: "justify-start",
|
|
292
|
-
variant: "ghost",
|
|
293
|
-
size: "sm",
|
|
294
|
-
iconLeft: e.column.columnDef.meta?.type === "number" ? "ArrowUp01" : e.column.columnDef.meta?.type === "string" ? "ArrowUpAz" : "ArrowUpNarrowWide",
|
|
295
|
-
onClick: () => {
|
|
296
|
-
!e.column.getIsSorted() && s.getState().sorting.length >= h || e.column.toggleSorting(!0, !0);
|
|
297
|
-
},
|
|
298
|
-
children: w.sorting.descending
|
|
299
|
-
}
|
|
300
|
-
),
|
|
301
|
-
e.column.getIsSorted() && /* @__PURE__ */ n(
|
|
302
|
-
S,
|
|
303
|
-
{
|
|
304
|
-
className: "text-d-destructive/80 hover:text-d-destructive justify-start",
|
|
305
|
-
variant: "ghost",
|
|
306
|
-
size: "sm",
|
|
307
|
-
iconLeft: "CircleX",
|
|
308
|
-
onClick: () => e.column.clearSorting(),
|
|
309
|
-
children: w.sorting.clearSort
|
|
310
|
-
}
|
|
311
|
-
)
|
|
312
|
-
] })
|
|
313
|
-
]
|
|
314
|
-
}
|
|
315
|
-
),
|
|
316
|
-
e.column.columnDef.meta?.filterable && /* @__PURE__ */ i(
|
|
317
|
-
"div",
|
|
318
|
-
{
|
|
319
|
-
className: "hover:bg-d-secondary-foreground/5 relative flex cursor-pointer items-center justify-between rounded px-2 py-1.5",
|
|
320
|
-
onClick: () => V(e),
|
|
321
|
-
children: [
|
|
322
|
-
/* @__PURE__ */ n("span", { className: "text-md", children: w.filters.filter }),
|
|
323
|
-
/* @__PURE__ */ n(z, { name: "Filter", size: "xs" })
|
|
324
|
-
]
|
|
325
|
-
}
|
|
326
|
-
)
|
|
327
|
-
] }) })
|
|
328
|
-
] })
|
|
329
|
-
},
|
|
330
|
-
e.id
|
|
331
|
-
)) }, o.id)) }),
|
|
332
|
-
/* @__PURE__ */ n(ie, { children: v && A ? Array.from({ length: H }).map((o, e) => /* @__PURE__ */ n(y, { children: s.getHeaderGroups()[0].headers.map((t, r) => /* @__PURE__ */ n(
|
|
333
|
-
R,
|
|
160
|
+
ref: i,
|
|
161
|
+
children: /* @__PURE__ */ C(se, { className: "border-d-border h-full min-h-0 w-full rounded-md border", children: [
|
|
162
|
+
/* @__PURE__ */ s(P, { orientation: "horizontal", className: "z-[100]" }),
|
|
163
|
+
/* @__PURE__ */ s(P, { orientation: "vertical" }),
|
|
164
|
+
/* @__PURE__ */ C(ie, { className: "w-full min-w-max", children: [
|
|
165
|
+
/* @__PURE__ */ s(
|
|
166
|
+
le,
|
|
334
167
|
{
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
`skeleton-cell-${e}-${r}`
|
|
348
|
-
)) }, `skeleton-row-${e}`)) : v && !A ? Array.from({ length: H }).map((o, e) => /* @__PURE__ */ n(y, { children: s.getHeaderGroups()[0].headers.map((t, r) => /* @__PURE__ */ n(
|
|
349
|
-
R,
|
|
168
|
+
table: u,
|
|
169
|
+
headerRefs: z,
|
|
170
|
+
pinnedOffsets: k,
|
|
171
|
+
maxSortedColumns: U,
|
|
172
|
+
i18n: J,
|
|
173
|
+
searchbarGlobalFilter: Q,
|
|
174
|
+
isColumnFiltered: X,
|
|
175
|
+
onAddFilter: $
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
/* @__PURE__ */ s(
|
|
179
|
+
A,
|
|
350
180
|
{
|
|
351
|
-
"data-
|
|
352
|
-
className:
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
)
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
y,
|
|
181
|
+
"data-table-body": "skeleton",
|
|
182
|
+
className: p && v || !p && d ? "" : "absolute -z-100 h-0 min-h-0 overflow-hidden opacity-0",
|
|
183
|
+
children: (p && v || !p && d) && /* @__PURE__ */ s(
|
|
184
|
+
ue,
|
|
185
|
+
{
|
|
186
|
+
skeletonRowCount: Z,
|
|
187
|
+
pinnedOffsets: k,
|
|
188
|
+
table: u
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
),
|
|
193
|
+
/* @__PURE__ */ s(
|
|
194
|
+
A,
|
|
366
195
|
{
|
|
367
|
-
"data-
|
|
368
|
-
className: "
|
|
369
|
-
children:
|
|
370
|
-
|
|
196
|
+
"data-table-body": "data",
|
|
197
|
+
className: p && v || !p && d ? "absolute -z-100 h-0 min-h-0 overflow-hidden opacity-0" : "",
|
|
198
|
+
children: u.getRowModel().rows?.length ? u.getRowModel().rows.map((e) => /* @__PURE__ */ s(
|
|
199
|
+
I,
|
|
371
200
|
{
|
|
372
|
-
"data-
|
|
373
|
-
className:
|
|
374
|
-
"border-0",
|
|
375
|
-
|
|
201
|
+
"data-state": e.getIsSelected() && "selected",
|
|
202
|
+
className: L(
|
|
203
|
+
"border-0 shadow-[inset_0_-1px_0_var(--d-border)]",
|
|
204
|
+
typeof x == "function" ? x(e) : x
|
|
376
205
|
),
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
206
|
+
children: e.getVisibleCells().map((t) => {
|
|
207
|
+
const o = t.column.columnDef.meta?.cellClassName, n = typeof o == "function" ? o(t.getValue(), e.original) : o;
|
|
208
|
+
return /* @__PURE__ */ s(
|
|
209
|
+
M,
|
|
210
|
+
{
|
|
211
|
+
"data-column-id": t.column.id,
|
|
212
|
+
className: L(
|
|
213
|
+
"border-0",
|
|
214
|
+
t.column.columnDef.meta?.pinned ? "bg-d-background z-[50]" : "shadow-[inset_-1px_0_0_var(--d-border)]",
|
|
215
|
+
n
|
|
216
|
+
),
|
|
217
|
+
style: ce(
|
|
218
|
+
t.column.id,
|
|
219
|
+
k,
|
|
220
|
+
t.column.columnDef.meta?.pinned,
|
|
221
|
+
!1
|
|
222
|
+
),
|
|
223
|
+
children: oe(
|
|
224
|
+
t.column.columnDef.cell,
|
|
225
|
+
t.getContext()
|
|
226
|
+
)
|
|
227
|
+
},
|
|
228
|
+
t.id
|
|
229
|
+
);
|
|
230
|
+
})
|
|
386
231
|
},
|
|
387
232
|
e.id
|
|
388
|
-
))
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
children: U || M
|
|
233
|
+
)) : /* @__PURE__ */ s(I, { children: /* @__PURE__ */ s(
|
|
234
|
+
M,
|
|
235
|
+
{
|
|
236
|
+
colSpan: u?.getHeaderGroups()?.[0]?.headers?.length ?? 1,
|
|
237
|
+
className: "pt-4 text-center",
|
|
238
|
+
children: j || V
|
|
239
|
+
}
|
|
240
|
+
) })
|
|
397
241
|
}
|
|
398
|
-
)
|
|
242
|
+
)
|
|
399
243
|
] })
|
|
400
244
|
] })
|
|
401
245
|
}
|
|
402
246
|
);
|
|
403
247
|
}
|
|
404
248
|
export {
|
|
405
|
-
|
|
249
|
+
Re as DataTableBody
|
|
406
250
|
};
|