@alneas/appkit-react 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/consumer-ai/api-index.json +10 -42
- package/consumer-ai/package-context.json +2 -2
- package/dist/ai/generative-ui/GenerativeUIRenderer.cjs.map +1 -1
- package/dist/ai/generative-ui/GenerativeUIRenderer.d.cts +5 -5
- package/dist/ai/generative-ui/GenerativeUIRenderer.d.ts +5 -5
- package/dist/ai/generative-ui/GenerativeUIRenderer.js.map +1 -1
- package/dist/consumer-ai/api-index.json +10 -42
- package/dist/consumer-ai/package-context.json +2 -2
- package/dist/tools/components/data-table/data-table.cjs +1 -1
- package/dist/tools/components/data-table/data-table.cjs.map +1 -1
- package/dist/tools/components/data-table/data-table.js +241 -240
- package/dist/tools/components/data-table/data-table.js.map +1 -1
- package/dist/tools/components/kanban/kanban-primitives.cjs +1 -1
- package/dist/tools/components/kanban/kanban-primitives.cjs.map +1 -1
- package/dist/tools/components/kanban/kanban-primitives.d.cts +2 -2
- package/dist/tools/components/kanban/kanban-primitives.d.ts +2 -2
- package/dist/tools/components/kanban/kanban-primitives.js +49 -48
- package/dist/tools/components/kanban/kanban-primitives.js.map +1 -1
- package/dist/tools/components/ui/dnd/Draggable.cjs +1 -1
- package/dist/tools/components/ui/dnd/Draggable.cjs.map +1 -1
- package/dist/tools/components/ui/dnd/Draggable.js +14 -13
- package/dist/tools/components/ui/dnd/Draggable.js.map +1 -1
- package/dist/tools/components/ui/dnd/use-accessible-drag-ref.cjs +2 -0
- package/dist/tools/components/ui/dnd/use-accessible-drag-ref.cjs.map +1 -0
- package/dist/tools/components/ui/dnd/use-accessible-drag-ref.d.cts +8 -0
- package/dist/tools/components/ui/dnd/use-accessible-drag-ref.d.ts +8 -0
- package/dist/tools/components/ui/dnd/use-accessible-drag-ref.js +27 -0
- package/dist/tools/components/ui/dnd/use-accessible-drag-ref.js.map +1 -0
- package/docs/migration.md +24 -4
- package/docs/tools.md +8 -0
- package/llms-full.txt +32 -4
- package/package.json +2 -2
|
@@ -4,32 +4,33 @@ import { buttonVariants as t } from "../../../ui/components/ui/button-variants.j
|
|
|
4
4
|
import { Button as n } from "../../../ui/components/ui/button-components.js";
|
|
5
5
|
import { Input as r } from "../../../ui/components/ui/input.js";
|
|
6
6
|
import { DropdownMenu as i, DropdownMenuCheckboxItem as a, DropdownMenuContent as o, DropdownMenuGroup as s, DropdownMenuLabel as c, DropdownMenuSeparator as l, DropdownMenuTrigger as u } from "../../../ui/components/ui/dropdown-menu.js";
|
|
7
|
-
import { Table as d, TableBody as f, TableCell as p, TableHead as
|
|
7
|
+
import { Table as d, TableBody as f, TableCell as p, TableHead as ee, TableHeader as m, TableRow as h } from "../../../ui/components/ui/table.js";
|
|
8
|
+
import { useAccessibleDragRef as g } from "../ui/dnd/use-accessible-drag-ref.js";
|
|
8
9
|
import { dataTable_filterPlaceholder as te } from "../../paraglide/messages/datatable_filterplaceholder2.js";
|
|
9
|
-
import { dataTable_goToFirstPage as
|
|
10
|
-
import { dataTable_goToLastPage as
|
|
11
|
-
import { dataTable_goToNextPage as
|
|
12
|
-
import { dataTable_goToPreviousPage as
|
|
10
|
+
import { dataTable_goToFirstPage as _ } from "../../paraglide/messages/datatable_gotofirstpage4.js";
|
|
11
|
+
import { dataTable_goToLastPage as v } from "../../paraglide/messages/datatable_gotolastpage4.js";
|
|
12
|
+
import { dataTable_goToNextPage as y } from "../../paraglide/messages/datatable_gotonextpage4.js";
|
|
13
|
+
import { dataTable_goToPreviousPage as b } from "../../paraglide/messages/datatable_gotopreviouspage4.js";
|
|
13
14
|
import { dataTable_items as ne } from "../../paraglide/messages/datatable_items1.js";
|
|
14
15
|
import { dataTable_noResults as re } from "../../paraglide/messages/datatable_noresults2.js";
|
|
15
|
-
import { dataTable_page as
|
|
16
|
-
import { dataTable_rowsPerPage as
|
|
17
|
-
import { dataTable_rowsSelected as
|
|
18
|
-
import { dataTable_toggleColumns as
|
|
19
|
-
import { dataTable_view as
|
|
20
|
-
import { dataTableFeatures as
|
|
21
|
-
import { getLeafColumnIds as
|
|
22
|
-
import { useDataTableStore as
|
|
23
|
-
import { Fragment as
|
|
24
|
-
import * as
|
|
25
|
-
import { ChevronDown as
|
|
26
|
-
import { DragDropProvider as
|
|
27
|
-
import { Feedback as
|
|
28
|
-
import { closestCenter as
|
|
29
|
-
import { isSortable as
|
|
16
|
+
import { dataTable_page as x } from "../../paraglide/messages/datatable_page1.js";
|
|
17
|
+
import { dataTable_rowsPerPage as S } from "../../paraglide/messages/datatable_rowsperpage3.js";
|
|
18
|
+
import { dataTable_rowsSelected as C } from "../../paraglide/messages/datatable_rowsselected2.js";
|
|
19
|
+
import { dataTable_toggleColumns as w } from "../../paraglide/messages/datatable_togglecolumns2.js";
|
|
20
|
+
import { dataTable_view as T } from "../../paraglide/messages/datatable_view1.js";
|
|
21
|
+
import { dataTableFeatures as ie, flexRender as ae, useTable as oe } from "./table-engine.js";
|
|
22
|
+
import { getLeafColumnIds as se, reorderVisibleColumns as ce } from "./column-order.js";
|
|
23
|
+
import { useDataTableStore as E } from "./table-store.js";
|
|
24
|
+
import { Fragment as le, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
25
|
+
import * as k from "react";
|
|
26
|
+
import { ChevronDown as A, ChevronLeft as j, ChevronRight as M, ChevronUp as N, ChevronsLeft as P, ChevronsRight as F, Filter as ue, GripVertical as I, Plus as de, Settings2 as L } from "lucide-react";
|
|
27
|
+
import { DragDropProvider as fe } from "@dnd-kit/react";
|
|
28
|
+
import { Feedback as pe, PointerActivationConstraints as me, PointerSensor as he } from "@dnd-kit/dom";
|
|
29
|
+
import { closestCenter as R } from "@dnd-kit/collision";
|
|
30
|
+
import { isSortable as ge, useSortable as _e } from "@dnd-kit/react/sortable";
|
|
30
31
|
//#region src/tools/components/data-table/data-table.tsx
|
|
31
32
|
function ve({ header: t, enableColumnOrdering: n = !0, enableMultiSort: r = !1, sortIndex: i, sortableIndex: a, sortableGroup: o, registeredIds: s }) {
|
|
32
|
-
let c = n && !t.isPlaceholder && t.column.columns.length === 0, { ref: l, handleRef: u, isDragging: d } =
|
|
33
|
+
let c = n && !t.isPlaceholder && t.column.columns.length === 0, { ref: l, handleRef: u, isDragging: d } = _e({
|
|
33
34
|
id: t.id,
|
|
34
35
|
index: a,
|
|
35
36
|
group: o,
|
|
@@ -41,46 +42,46 @@ function ve({ header: t, enableColumnOrdering: n = !0, enableMultiSort: r = !1,
|
|
|
41
42
|
columnIds: s
|
|
42
43
|
},
|
|
43
44
|
disabled: !c,
|
|
44
|
-
collisionDetector:
|
|
45
|
-
}), f = t.column.getCanSort(),
|
|
45
|
+
collisionDetector: R
|
|
46
|
+
}), f = g(u), p = t.column.getCanSort(), m = t.column.getIsSorted(), h = m !== !1, te = p && typeof t.column.columnDef.header != "function" ? "button" : "span", _ = n ? {
|
|
46
47
|
opacity: d ? .8 : 1,
|
|
47
48
|
zIndex: +!!d,
|
|
48
49
|
position: "relative",
|
|
49
50
|
cursor: "move"
|
|
50
51
|
} : {};
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ O(ee, {
|
|
52
53
|
ref: c ? l : void 0,
|
|
53
54
|
colSpan: t.colSpan,
|
|
54
55
|
"aria-hidden": t.isPlaceholder || void 0,
|
|
55
|
-
style:
|
|
56
|
-
"aria-sort":
|
|
57
|
-
className: e("bg-primary/10 text-primary font-bold border-b border-primary/20",
|
|
58
|
-
onClick:
|
|
59
|
-
|
|
56
|
+
style: _,
|
|
57
|
+
"aria-sort": p ? m === "asc" ? "ascending" : m === "desc" ? "descending" : "none" : void 0,
|
|
58
|
+
className: e("bg-primary/10 text-primary font-bold border-b border-primary/20", p && "cursor-pointer select-none hover:bg-primary/20 transition-colors"),
|
|
59
|
+
onClick: p ? (e) => {
|
|
60
|
+
p && !e.target.closest("button, input, select, [role=checkbox]") && (r && e.shiftKey ? t.column.toggleSorting(void 0, !0) : t.column.toggleSorting());
|
|
60
61
|
} : void 0,
|
|
61
|
-
children: [c && /* @__PURE__ */
|
|
62
|
+
children: [c && /* @__PURE__ */ D("button", {
|
|
62
63
|
type: "button",
|
|
63
|
-
ref:
|
|
64
|
+
ref: f,
|
|
64
65
|
"aria-label": `Reorder column ${t.column.id}`,
|
|
65
66
|
className: "inline-flex h-6 w-6 items-center justify-center cursor-grab",
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ D(I, {
|
|
67
68
|
className: "h-3 w-3",
|
|
68
69
|
"aria-hidden": "true"
|
|
69
70
|
})
|
|
70
|
-
}), t.isPlaceholder ? null : /* @__PURE__ */
|
|
71
|
+
}), t.isPlaceholder ? null : /* @__PURE__ */ O("span", {
|
|
71
72
|
className: "inline-flex items-center gap-1",
|
|
72
|
-
children: [/* @__PURE__ */
|
|
73
|
-
className: e(
|
|
74
|
-
...
|
|
73
|
+
children: [/* @__PURE__ */ D(te, {
|
|
74
|
+
className: e(h && "font-semibold"),
|
|
75
|
+
...te === "button" ? {
|
|
75
76
|
type: "button",
|
|
76
77
|
onClick: (e) => {
|
|
77
78
|
e.stopPropagation(), t.column.toggleSorting(void 0, r && e.shiftKey);
|
|
78
79
|
}
|
|
79
80
|
} : {},
|
|
80
|
-
children:
|
|
81
|
-
}),
|
|
81
|
+
children: ae(t.column.columnDef.header, t.getContext())
|
|
82
|
+
}), h && /* @__PURE__ */ O("span", {
|
|
82
83
|
className: "inline-flex items-center text-xs",
|
|
83
|
-
children: [
|
|
84
|
+
children: [D(m === "asc" ? N : A, { className: "h-3.5 w-3.5" }), r && i !== void 0 && i >= 0 && /* @__PURE__ */ D("span", {
|
|
84
85
|
className: "text-[10px] ml-0.5",
|
|
85
86
|
children: i + 1
|
|
86
87
|
})]
|
|
@@ -88,52 +89,52 @@ function ve({ header: t, enableColumnOrdering: n = !0, enableMultiSort: r = !1,
|
|
|
88
89
|
})]
|
|
89
90
|
});
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
+
function z({ columns: t, data: i, variant: a = "default", filterContent: o, storageKey: s, enableSortingByDefault: c = !0, enableMultiSort: l = !1, showRowNumber: u = !1, itemCount: ee, onAdd: g, pageCount: _, rowCount: v, onPaginationChange: y, onSortingChange: b, onColumnFiltersChange: x, onRowClick: S, onSelectionChange: C, rowIdField: w = "id", manualPagination: T = !1, manualSorting: le = !1, manualFiltering: A = !1, filterColumn: j, sorting: M, pagination: N, enableColumnOrdering: P = !0, containerClassName: F, tableClassName: I, pageSizeOptions: L = [
|
|
92
93
|
10,
|
|
93
94
|
20,
|
|
94
95
|
30,
|
|
95
96
|
50,
|
|
96
97
|
100
|
|
97
|
-
], filterLayout:
|
|
98
|
+
], filterLayout: R = "inline", defaultFilterOpen: _e = !1, activeFiltersContent: z }) {
|
|
98
99
|
"use no memo";
|
|
99
|
-
let
|
|
100
|
+
let be = E((e) => e.getTableSettings), xe = E((e) => e.setTableSettings), H = E((e) => e._hasHydrated), U = k.useSyncExternalStore(k.useCallback(() => () => {}, []), () => !0, () => !1), [W, Se] = k.useState(_e), [Ce, we] = k.useState(M || []), [G, Te] = k.useState([]), [Ee, De] = k.useState({}), [Oe, ke] = k.useState({}), [Ae, je] = k.useState(N || {
|
|
100
101
|
pageIndex: 0,
|
|
101
102
|
pageSize: 10
|
|
102
|
-
}), [K,
|
|
103
|
+
}), [K, Me] = k.useState(se(t)), Ne = N !== void 0, q = M ?? Ce, J = N ?? Ae, Pe = (e) => {
|
|
104
|
+
let t = typeof e == "function" ? e(q) : e;
|
|
105
|
+
M === void 0 && we(t), b?.(t);
|
|
106
|
+
}, Fe = (e) => {
|
|
103
107
|
let t = typeof e == "function" ? e(J) : e;
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
let t = typeof e == "function" ? e(Y) : e;
|
|
107
|
-
M === void 0 && je(t), y?.(t);
|
|
108
|
-
}, [Fe, Ie] = O.useState(null), Le = O.useMemo(() => JSON.stringify([...u ? ["rowNumber"] : [], ...ce(t)]), [t, u]), X = O.useMemo(() => new Set(JSON.parse(Le)), [Le]), Z = s ? JSON.stringify([
|
|
108
|
+
N === void 0 && je(t), y?.(t);
|
|
109
|
+
}, [Ie, Le] = k.useState(null), Re = k.useMemo(() => JSON.stringify([...u ? ["rowNumber"] : [], ...se(t)]), [t, u]), Y = k.useMemo(() => new Set(JSON.parse(Re)), [Re]), X = s ? JSON.stringify([
|
|
109
110
|
s,
|
|
110
|
-
|
|
111
|
-
!!
|
|
112
|
-
!!
|
|
111
|
+
Re,
|
|
112
|
+
!!M,
|
|
113
|
+
!!N
|
|
113
114
|
]) : null;
|
|
114
|
-
if (
|
|
115
|
-
|
|
116
|
-
let e =
|
|
115
|
+
if (H && s && Ie !== X) {
|
|
116
|
+
Le(X);
|
|
117
|
+
let e = be(s);
|
|
117
118
|
if (e) {
|
|
118
|
-
if (!
|
|
119
|
-
let t = e.sorting.filter((e) =>
|
|
120
|
-
t.length > 0 &&
|
|
119
|
+
if (!M && e.sorting && e.sorting.length > 0) {
|
|
120
|
+
let t = e.sorting.filter((e) => Y.has(e.id));
|
|
121
|
+
t.length > 0 && we(t);
|
|
121
122
|
}
|
|
122
123
|
if (e.columnVisibility && Object.keys(e.columnVisibility).length > 0) {
|
|
123
124
|
let t = {};
|
|
124
|
-
for (let [n, r] of Object.entries(e.columnVisibility))
|
|
125
|
+
for (let [n, r] of Object.entries(e.columnVisibility)) Y.has(n) && (t[n] = r);
|
|
125
126
|
Object.keys(t).length > 0 && De(t);
|
|
126
127
|
}
|
|
127
|
-
if (!
|
|
128
|
+
if (!N && e.pageSize && e.pageSize !== 10 && je((t) => ({
|
|
128
129
|
...t,
|
|
129
130
|
pageSize: e.pageSize
|
|
130
131
|
})), e.columnOrder && e.columnOrder.length > 0) {
|
|
131
|
-
let t = e.columnOrder.filter((e) =>
|
|
132
|
-
i.length > 0 &&
|
|
132
|
+
let t = e.columnOrder.filter((e) => Y.has(e)), n = new Set(t), r = Array.from(Y).filter((e) => !n.has(e)), i = [...t, ...r];
|
|
133
|
+
i.length > 0 && Me(i);
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
|
-
let
|
|
137
|
+
let ze = k.useMemo(() => ({
|
|
137
138
|
id: "rowNumber",
|
|
138
139
|
header: "No",
|
|
139
140
|
enableSorting: !1,
|
|
@@ -141,8 +142,8 @@ function ye({ columns: t, data: i, variant: a = "default", filterContent: o, sto
|
|
|
141
142
|
let n = t.store.state.pagination;
|
|
142
143
|
return n ? n.pageIndex * n.pageSize + e.index + 1 : e.index + 1;
|
|
143
144
|
}
|
|
144
|
-
}), []),
|
|
145
|
-
let e = u ? [
|
|
145
|
+
}), []), Z = k.useMemo(() => {
|
|
146
|
+
let e = u ? [ze, ...t] : t;
|
|
146
147
|
return c ? e.map((e) => ({
|
|
147
148
|
...e,
|
|
148
149
|
enableSorting: e.enableSorting !== !1
|
|
@@ -150,78 +151,78 @@ function ye({ columns: t, data: i, variant: a = "default", filterContent: o, sto
|
|
|
150
151
|
}, [
|
|
151
152
|
u,
|
|
152
153
|
t,
|
|
153
|
-
|
|
154
|
+
ze,
|
|
154
155
|
c
|
|
155
|
-
]), Be =
|
|
156
|
-
if (
|
|
156
|
+
]), Be = k.useCallback((e) => {
|
|
157
|
+
if (w) return w.split("_").reduce((e, t) => {
|
|
157
158
|
if (e && typeof e == "object" && t !== "__proto__" && t !== "constructor" && t !== "prototype" && Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
158
159
|
}, e);
|
|
159
|
-
}, [
|
|
160
|
-
|
|
161
|
-
s &&
|
|
160
|
+
}, [w]);
|
|
161
|
+
k.useEffect(() => {
|
|
162
|
+
s && H && Ie === X && xe(s, {
|
|
162
163
|
columnOrder: K,
|
|
163
|
-
columnVisibility:
|
|
164
|
-
sorting:
|
|
165
|
-
pageSize:
|
|
164
|
+
columnVisibility: Ee,
|
|
165
|
+
sorting: q,
|
|
166
|
+
pageSize: J.pageSize
|
|
166
167
|
});
|
|
167
168
|
}, [
|
|
168
169
|
s,
|
|
169
170
|
K,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
]),
|
|
178
|
-
|
|
171
|
+
Ee,
|
|
172
|
+
q,
|
|
173
|
+
J.pageSize,
|
|
174
|
+
xe,
|
|
175
|
+
H,
|
|
176
|
+
Ie,
|
|
177
|
+
X
|
|
178
|
+
]), k.useEffect(() => {
|
|
179
|
+
A && x && x(G);
|
|
179
180
|
}, [
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
G,
|
|
182
|
+
A,
|
|
183
|
+
x
|
|
183
184
|
]);
|
|
184
|
-
let Q =
|
|
185
|
-
features:
|
|
185
|
+
let Q = oe({
|
|
186
|
+
features: ie,
|
|
186
187
|
data: i,
|
|
187
|
-
columns:
|
|
188
|
+
columns: Z,
|
|
188
189
|
pageCount: T ? _ : void 0,
|
|
189
190
|
rowCount: T ? v : void 0,
|
|
190
|
-
getRowId:
|
|
191
|
-
let n =
|
|
191
|
+
getRowId: w ? (e, t) => {
|
|
192
|
+
let n = w.split("_").reduce((e, t) => {
|
|
192
193
|
if (e && typeof e == "object" && t in e) return e[t];
|
|
193
194
|
}, e);
|
|
194
195
|
return String(n === void 0 ? t : n);
|
|
195
196
|
} : void 0,
|
|
196
197
|
state: {
|
|
197
|
-
sorting:
|
|
198
|
-
columnFilters:
|
|
199
|
-
columnVisibility:
|
|
198
|
+
sorting: q,
|
|
199
|
+
columnFilters: G,
|
|
200
|
+
columnVisibility: Ee,
|
|
200
201
|
rowSelection: Oe,
|
|
201
|
-
pagination:
|
|
202
|
+
pagination: J,
|
|
202
203
|
columnOrder: K
|
|
203
204
|
},
|
|
204
205
|
enableRowSelection: !0,
|
|
205
206
|
enableMultiSort: l,
|
|
206
207
|
onRowSelectionChange: ke,
|
|
207
|
-
onSortingChange:
|
|
208
|
-
onColumnFiltersChange:
|
|
208
|
+
onSortingChange: Pe,
|
|
209
|
+
onColumnFiltersChange: Te,
|
|
209
210
|
onColumnVisibilityChange: De,
|
|
210
|
-
onPaginationChange:
|
|
211
|
-
onColumnOrderChange:
|
|
212
|
-
autoResetPageIndex: T ||
|
|
211
|
+
onPaginationChange: Fe,
|
|
212
|
+
onColumnOrderChange: Me,
|
|
213
|
+
autoResetPageIndex: T || Ne ? !1 : void 0,
|
|
213
214
|
manualPagination: T,
|
|
214
|
-
manualSorting:
|
|
215
|
-
manualFiltering:
|
|
215
|
+
manualSorting: le,
|
|
216
|
+
manualFiltering: A
|
|
216
217
|
});
|
|
217
|
-
|
|
218
|
-
|
|
218
|
+
k.useEffect(() => {
|
|
219
|
+
C && C(Q.getFilteredSelectedRowModel().rows.map((e) => e.original));
|
|
219
220
|
}, [
|
|
220
221
|
Oe,
|
|
221
222
|
Q,
|
|
222
|
-
|
|
223
|
+
C
|
|
223
224
|
]);
|
|
224
|
-
let Ve =
|
|
225
|
+
let Ve = k.useRef(null), He = k.useCallback((e) => {
|
|
225
226
|
let t = e.operation.source;
|
|
226
227
|
t && Array.isArray(t.data.columnIds) && (Ve.current = {
|
|
227
228
|
sourceId: String(t.id),
|
|
@@ -230,45 +231,45 @@ function ye({ columns: t, data: i, variant: a = "default", filterContent: o, sto
|
|
|
230
231
|
leafIds: Q.getAllLeafColumns().map((e) => e.id),
|
|
231
232
|
order: [...K]
|
|
232
233
|
});
|
|
233
|
-
}, [Q, K]), Ue =
|
|
234
|
+
}, [Q, K]), Ue = k.useCallback((e) => {
|
|
234
235
|
let t = Ve.current;
|
|
235
236
|
Ve.current = null;
|
|
236
237
|
let { source: n, target: r } = e.operation;
|
|
237
|
-
if (e.canceled || !
|
|
238
|
+
if (e.canceled || !P || !t || !r || !ge(n) || String(n.id) !== t.sourceId) return;
|
|
238
239
|
let i = Q.getAllLeafColumns().map((e) => e.id), a = Q.getHeaderGroups().find((e) => e.id === t.groupId)?.headers.filter((e) => !e.isPlaceholder && e.column.columns.length === 0).map((e) => e.column.id);
|
|
239
|
-
a && JSON.stringify(a) === JSON.stringify(t.ids) && JSON.stringify(i) === JSON.stringify(t.leafIds) && JSON.stringify(K) === JSON.stringify(t.order) &&
|
|
240
|
+
a && JSON.stringify(a) === JSON.stringify(t.ids) && JSON.stringify(i) === JSON.stringify(t.leafIds) && JSON.stringify(K) === JSON.stringify(t.order) && Me((e) => ce(e, i, t.ids, n.data.columnId, n.initialIndex, n.index));
|
|
240
241
|
}, [
|
|
241
242
|
Q,
|
|
242
243
|
K,
|
|
243
|
-
|
|
244
|
-
]), We =
|
|
245
|
-
sensors: (e) => [...e.filter((e) => e !==
|
|
246
|
-
plugins: (e) => [...e,
|
|
244
|
+
P
|
|
245
|
+
]), We = k.useCallback((e) => q.findIndex((t) => t.id === e), [q]), Ge = k.useCallback(() => /* @__PURE__ */ D(fe, {
|
|
246
|
+
sensors: (e) => [...e.filter((e) => e !== he), he.configure({ activationConstraints: [new me.Distance({ value: 8 })] })],
|
|
247
|
+
plugins: (e) => [...e, pe.configure({
|
|
247
248
|
feedback: "clone",
|
|
248
249
|
dropAnimation: { duration: 0 }
|
|
249
250
|
})],
|
|
250
251
|
onDragStart: He,
|
|
251
252
|
onDragEnd: Ue,
|
|
252
|
-
children: /* @__PURE__ */
|
|
253
|
-
className: e("rounded-md border",
|
|
254
|
-
children: /* @__PURE__ */
|
|
253
|
+
children: /* @__PURE__ */ D("div", {
|
|
254
|
+
className: e("rounded-md border", I),
|
|
255
|
+
children: /* @__PURE__ */ O(d, { children: [/* @__PURE__ */ D(m, { children: Q.getHeaderGroups().map((e) => {
|
|
255
256
|
let t = e.headers.filter((e) => !e.isPlaceholder && e.column.columns.length === 0).map((e) => e.column.id);
|
|
256
|
-
return /* @__PURE__ */
|
|
257
|
+
return /* @__PURE__ */ D(h, { children: e.headers.map((n) => /* @__PURE__ */ D(ve, {
|
|
257
258
|
header: n,
|
|
258
|
-
enableColumnOrdering:
|
|
259
|
+
enableColumnOrdering: P,
|
|
259
260
|
enableMultiSort: l,
|
|
260
261
|
sortIndex: We(n.column.id),
|
|
261
262
|
sortableIndex: t.indexOf(n.column.id),
|
|
262
263
|
sortableGroup: e.id,
|
|
263
264
|
registeredIds: t
|
|
264
265
|
}, n.id)) }, e.id);
|
|
265
|
-
}) }), /* @__PURE__ */
|
|
266
|
+
}) }), /* @__PURE__ */ D(f, { children: Q.getRowModel().rows?.length ? Q.getRowModel().rows.map((e) => /* @__PURE__ */ D(h, {
|
|
266
267
|
"data-state": e.getIsSelected() && "selected",
|
|
267
|
-
onClick: () =>
|
|
268
|
-
className:
|
|
269
|
-
children: e.getVisibleCells().map((e) => /* @__PURE__ */
|
|
270
|
-
}, e.id)) : /* @__PURE__ */
|
|
271
|
-
colSpan:
|
|
268
|
+
onClick: () => S && S(Be(e.original)),
|
|
269
|
+
className: S ? "cursor-pointer hover:bg-muted/50" : void 0,
|
|
270
|
+
children: e.getVisibleCells().map((e) => /* @__PURE__ */ D(p, { children: ae(e.column.columnDef.cell, e.getContext()) }, e.id))
|
|
271
|
+
}, e.id)) : /* @__PURE__ */ D(h, { children: /* @__PURE__ */ D(p, {
|
|
272
|
+
colSpan: Z.length,
|
|
272
273
|
className: "h-24 text-center",
|
|
273
274
|
children: re()
|
|
274
275
|
}) }) })] })
|
|
@@ -277,141 +278,141 @@ function ye({ columns: t, data: i, variant: a = "default", filterContent: o, sto
|
|
|
277
278
|
He,
|
|
278
279
|
Ue,
|
|
279
280
|
Q,
|
|
280
|
-
|
|
281
|
+
Z,
|
|
281
282
|
K,
|
|
282
|
-
|
|
283
|
+
P,
|
|
283
284
|
l,
|
|
284
285
|
We,
|
|
285
|
-
|
|
286
|
+
S,
|
|
286
287
|
Be,
|
|
287
|
-
|
|
288
|
-
]), $ = () => /* @__PURE__ */
|
|
289
|
-
className: e("rounded-md border",
|
|
290
|
-
children: /* @__PURE__ */
|
|
288
|
+
I
|
|
289
|
+
]), $ = () => /* @__PURE__ */ D("div", {
|
|
290
|
+
className: e("rounded-md border", I),
|
|
291
|
+
children: /* @__PURE__ */ D(d, { children: /* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(h, { children: /* @__PURE__ */ D(p, {
|
|
291
292
|
className: "h-24 text-center",
|
|
292
|
-
children: /* @__PURE__ */
|
|
293
|
+
children: /* @__PURE__ */ D("div", {
|
|
293
294
|
className: "text-muted-foreground",
|
|
294
295
|
children: "Loading..."
|
|
295
296
|
})
|
|
296
297
|
}) }) }) })
|
|
297
298
|
});
|
|
298
|
-
return a === "minimal" ? /* @__PURE__ */
|
|
299
|
-
className: e("space-y-4",
|
|
300
|
-
children: [
|
|
299
|
+
return a === "minimal" ? /* @__PURE__ */ O("div", {
|
|
300
|
+
className: e("space-y-4", F),
|
|
301
|
+
children: [U ? Ge() : $(), /* @__PURE__ */ D(V, {
|
|
301
302
|
table: Q,
|
|
302
|
-
pageSizeOptions:
|
|
303
|
+
pageSizeOptions: L
|
|
303
304
|
})]
|
|
304
|
-
}) : a === "toolbar" ? /* @__PURE__ */
|
|
305
|
-
className: e("relative h-full",
|
|
306
|
-
children: [g && /* @__PURE__ */
|
|
305
|
+
}) : a === "toolbar" ? /* @__PURE__ */ O("div", {
|
|
306
|
+
className: e("relative h-full", F),
|
|
307
|
+
children: [g && /* @__PURE__ */ D("div", {
|
|
307
308
|
className: "absolute left-0 top-0 w-full h-full z-10 pointer-events-none",
|
|
308
|
-
children: /* @__PURE__ */
|
|
309
|
+
children: /* @__PURE__ */ D("div", {
|
|
309
310
|
className: "fixed right-4 bottom-10 pointer-events-auto",
|
|
310
|
-
children: /* @__PURE__ */
|
|
311
|
+
children: /* @__PURE__ */ D(n, {
|
|
311
312
|
type: "button",
|
|
312
313
|
size: "icon",
|
|
313
314
|
"aria-label": "Add row",
|
|
314
315
|
onClick: g,
|
|
315
316
|
className: "w-12 h-12 rounded-full shadow-lg",
|
|
316
|
-
children: /* @__PURE__ */
|
|
317
|
+
children: /* @__PURE__ */ D(de, { className: "w-6 h-6" })
|
|
317
318
|
})
|
|
318
319
|
})
|
|
319
|
-
}), /* @__PURE__ */
|
|
320
|
+
}), /* @__PURE__ */ O("div", {
|
|
320
321
|
className: "relative h-full flex flex-col",
|
|
321
322
|
children: [
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ O("div", {
|
|
323
324
|
className: "bg-muted p-2 rounded-t-md grid grid-cols-1 sm:grid-cols-[1fr_minmax(0,auto)_1fr] items-center gap-2",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ O("div", {
|
|
325
326
|
className: "flex flex-wrap justify-center items-center gap-2 sm:col-start-2 sm:col-end-3",
|
|
326
327
|
children: [
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
o &&
|
|
329
|
-
o &&
|
|
328
|
+
/* @__PURE__ */ D(B, { table: Q }),
|
|
329
|
+
o && R === "inline" && o,
|
|
330
|
+
o && R === "panel" && /* @__PURE__ */ O(n, {
|
|
330
331
|
type: "button",
|
|
331
|
-
variant:
|
|
332
|
+
variant: W ? "default" : "outline",
|
|
332
333
|
size: "sm",
|
|
333
|
-
onClick: () =>
|
|
334
|
+
onClick: () => Se(!W),
|
|
334
335
|
className: "h-8 gap-1.5",
|
|
335
|
-
children: [/* @__PURE__ */
|
|
336
|
+
children: [/* @__PURE__ */ D(ue, { className: "h-4 w-4" }), /* @__PURE__ */ D("span", { children: "フィルター" })]
|
|
336
337
|
})
|
|
337
338
|
]
|
|
338
|
-
}), /* @__PURE__ */
|
|
339
|
+
}), /* @__PURE__ */ O("div", {
|
|
339
340
|
className: "flex items-center gap-3 justify-center sm:justify-end sm:col-start-3 sm:col-end-4",
|
|
340
|
-
children: [/* @__PURE__ */
|
|
341
|
+
children: [/* @__PURE__ */ D(ye, {
|
|
341
342
|
table: Q,
|
|
342
|
-
pageSizeOptions:
|
|
343
|
-
}), typeof
|
|
343
|
+
pageSizeOptions: L
|
|
344
|
+
}), typeof ee == "number" && /* @__PURE__ */ D("span", {
|
|
344
345
|
className: "text-sm text-muted-foreground whitespace-nowrap",
|
|
345
|
-
children: `${
|
|
346
|
+
children: `${ee.toLocaleString()} ${ne()}`
|
|
346
347
|
})]
|
|
347
348
|
})]
|
|
348
349
|
}),
|
|
349
|
-
o &&
|
|
350
|
-
className: e("border-b transition-all duration-200 ease-in-out overflow-hidden bg-background",
|
|
350
|
+
o && R === "panel" && /* @__PURE__ */ D("div", {
|
|
351
|
+
className: e("border-b transition-all duration-200 ease-in-out overflow-hidden bg-background", W ? "max-h-[500px] p-4" : "max-h-0 p-0 border-none"),
|
|
351
352
|
children: o
|
|
352
353
|
}),
|
|
353
|
-
|
|
354
|
+
z && /* @__PURE__ */ D("div", {
|
|
354
355
|
className: "bg-background px-4 py-1.5 border-b",
|
|
355
|
-
children:
|
|
356
|
+
children: z
|
|
356
357
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ D("div", {
|
|
358
359
|
className: "flex-1 overflow-auto",
|
|
359
|
-
children:
|
|
360
|
+
children: U ? Ge() : $()
|
|
360
361
|
})
|
|
361
362
|
]
|
|
362
363
|
})]
|
|
363
|
-
}) : /* @__PURE__ */
|
|
364
|
-
className: e("space-y-4",
|
|
364
|
+
}) : /* @__PURE__ */ O("div", {
|
|
365
|
+
className: e("space-y-4", F),
|
|
365
366
|
children: [
|
|
366
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ O("div", {
|
|
367
368
|
className: "flex items-center justify-between",
|
|
368
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ D("div", {
|
|
369
370
|
className: "flex items-center py-4",
|
|
370
|
-
children:
|
|
371
|
-
placeholder: te({ column:
|
|
372
|
-
value: Q.getColumn(
|
|
373
|
-
onChange: (e) => Q.getColumn(
|
|
371
|
+
children: j && /* @__PURE__ */ D(r, {
|
|
372
|
+
placeholder: te({ column: j }),
|
|
373
|
+
value: Q.getColumn(j)?.getFilterValue() ?? "",
|
|
374
|
+
onChange: (e) => Q.getColumn(j)?.setFilterValue(e.target.value),
|
|
374
375
|
className: "max-w-sm"
|
|
375
376
|
})
|
|
376
|
-
}), /* @__PURE__ */
|
|
377
|
+
}), /* @__PURE__ */ D(B, { table: Q })]
|
|
377
378
|
}),
|
|
378
|
-
|
|
379
|
+
z && /* @__PURE__ */ D("div", {
|
|
379
380
|
className: "border rounded-md bg-background px-3 py-1",
|
|
380
|
-
children:
|
|
381
|
+
children: z
|
|
381
382
|
}),
|
|
382
|
-
|
|
383
|
-
/* @__PURE__ */
|
|
383
|
+
U ? Ge() : $(),
|
|
384
|
+
/* @__PURE__ */ D(V, {
|
|
384
385
|
table: Q,
|
|
385
|
-
pageSizeOptions:
|
|
386
|
+
pageSizeOptions: L
|
|
386
387
|
}),
|
|
387
|
-
g && /* @__PURE__ */
|
|
388
|
+
g && /* @__PURE__ */ D("div", {
|
|
388
389
|
className: "fixed right-4 bottom-10 z-10",
|
|
389
|
-
children: /* @__PURE__ */
|
|
390
|
+
children: /* @__PURE__ */ D(n, {
|
|
390
391
|
type: "button",
|
|
391
392
|
size: "icon",
|
|
392
393
|
onClick: g,
|
|
393
394
|
className: "w-12 h-12 rounded-full shadow-lg",
|
|
394
|
-
children: /* @__PURE__ */
|
|
395
|
+
children: /* @__PURE__ */ D(de, { className: "w-6 h-6" })
|
|
395
396
|
})
|
|
396
397
|
})
|
|
397
398
|
]
|
|
398
399
|
});
|
|
399
400
|
}
|
|
400
|
-
function
|
|
401
|
-
return /* @__PURE__ */
|
|
401
|
+
function B({ table: e }) {
|
|
402
|
+
return /* @__PURE__ */ O(i, { children: [/* @__PURE__ */ O(u, {
|
|
402
403
|
className: t({
|
|
403
404
|
variant: "default",
|
|
404
405
|
size: "sm",
|
|
405
406
|
className: "h-8"
|
|
406
407
|
}),
|
|
407
|
-
children: [/* @__PURE__ */
|
|
408
|
-
}), /* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ D(L, { className: "mr-2 h-4 w-4" }), T()]
|
|
409
|
+
}), /* @__PURE__ */ D(o, {
|
|
409
410
|
align: "end",
|
|
410
411
|
className: "w-40",
|
|
411
|
-
children: /* @__PURE__ */
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
e.getAllColumns().filter((e) => e.accessorFn !== void 0 && e.getCanHide()).map((e) => /* @__PURE__ */
|
|
412
|
+
children: /* @__PURE__ */ O(s, { children: [
|
|
413
|
+
/* @__PURE__ */ D(c, { children: w() }),
|
|
414
|
+
/* @__PURE__ */ D(l, {}),
|
|
415
|
+
e.getAllColumns().filter((e) => e.accessorFn !== void 0 && e.getCanHide()).map((e) => /* @__PURE__ */ D(a, {
|
|
415
416
|
className: "capitalize",
|
|
416
417
|
checked: e.getIsVisible(),
|
|
417
418
|
onCheckedChange: (t) => e.toggleVisibility(!!t),
|
|
@@ -420,99 +421,99 @@ function R({ table: e }) {
|
|
|
420
421
|
] })
|
|
421
422
|
})] });
|
|
422
423
|
}
|
|
423
|
-
function
|
|
424
|
+
function V({ table: e, pageSizeOptions: t = [
|
|
424
425
|
10,
|
|
425
426
|
20,
|
|
426
427
|
30,
|
|
427
428
|
50,
|
|
428
429
|
100
|
|
429
430
|
] }) {
|
|
430
|
-
return /* @__PURE__ */
|
|
431
|
+
return /* @__PURE__ */ O("div", {
|
|
431
432
|
className: "flex items-center justify-between px-2",
|
|
432
|
-
children: [/* @__PURE__ */
|
|
433
|
+
children: [/* @__PURE__ */ D("div", {
|
|
433
434
|
className: "flex-1 text-sm text-muted-foreground",
|
|
434
|
-
children:
|
|
435
|
+
children: C({
|
|
435
436
|
selected: e.getFilteredSelectedRowModel().rows.length,
|
|
436
437
|
total: e.getFilteredRowModel().rows.length
|
|
437
438
|
})
|
|
438
|
-
}), /* @__PURE__ */
|
|
439
|
+
}), /* @__PURE__ */ O("div", {
|
|
439
440
|
className: "flex items-center space-x-6 lg:space-x-8",
|
|
440
441
|
children: [
|
|
441
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ O("div", {
|
|
442
443
|
className: "flex items-center space-x-2",
|
|
443
|
-
children: [/* @__PURE__ */
|
|
444
|
+
children: [/* @__PURE__ */ D("p", {
|
|
444
445
|
className: "text-sm font-medium",
|
|
445
|
-
children:
|
|
446
|
-
}), /* @__PURE__ */
|
|
447
|
-
"aria-label":
|
|
446
|
+
children: S()
|
|
447
|
+
}), /* @__PURE__ */ D("select", {
|
|
448
|
+
"aria-label": S(),
|
|
448
449
|
value: `${e.store.state.pagination.pageSize}`,
|
|
449
450
|
onChange: (t) => {
|
|
450
451
|
e.setPageSize(Number(t.target.value));
|
|
451
452
|
},
|
|
452
453
|
className: "h-8 w-fit min-w-16 rounded-md border border-input bg-background px-2 py-1 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
453
|
-
children: t.map((e) => /* @__PURE__ */
|
|
454
|
+
children: t.map((e) => /* @__PURE__ */ D("option", {
|
|
454
455
|
value: `${e}`,
|
|
455
456
|
children: e
|
|
456
457
|
}, e))
|
|
457
458
|
})]
|
|
458
459
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ D("div", {
|
|
460
461
|
className: "flex w-24 items-center justify-center text-sm font-medium",
|
|
461
|
-
children:
|
|
462
|
+
children: x({
|
|
462
463
|
current: e.store.state.pagination.pageIndex + 1,
|
|
463
464
|
total: e.getPageCount()
|
|
464
465
|
})
|
|
465
466
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ O("div", {
|
|
467
468
|
className: "flex items-center space-x-2",
|
|
468
469
|
children: [
|
|
469
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ O(n, {
|
|
470
471
|
variant: "default",
|
|
471
472
|
size: "icon",
|
|
472
473
|
className: "hidden h-8 w-8 lg:flex hover:bg-primary/90",
|
|
473
|
-
"aria-label":
|
|
474
|
+
"aria-label": _(),
|
|
474
475
|
onClick: () => e.setPageIndex(0),
|
|
475
476
|
disabled: !e.getCanPreviousPage(),
|
|
476
|
-
children: [/* @__PURE__ */
|
|
477
|
+
children: [/* @__PURE__ */ D("span", {
|
|
477
478
|
className: "sr-only",
|
|
478
|
-
children:
|
|
479
|
-
}), /* @__PURE__ */
|
|
479
|
+
children: _()
|
|
480
|
+
}), /* @__PURE__ */ D(P, { className: "h-4 w-4" })]
|
|
480
481
|
}),
|
|
481
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ O(n, {
|
|
482
483
|
variant: "default",
|
|
483
484
|
size: "icon",
|
|
484
485
|
className: "h-8 w-8 hover:bg-primary/90",
|
|
485
|
-
"aria-label":
|
|
486
|
+
"aria-label": b(),
|
|
486
487
|
onClick: () => e.previousPage(),
|
|
487
488
|
disabled: !e.getCanPreviousPage(),
|
|
488
|
-
children: [/* @__PURE__ */
|
|
489
|
+
children: [/* @__PURE__ */ D("span", {
|
|
489
490
|
className: "sr-only",
|
|
490
|
-
children:
|
|
491
|
-
}), /* @__PURE__ */
|
|
491
|
+
children: b()
|
|
492
|
+
}), /* @__PURE__ */ D(j, { className: "h-4 w-4" })]
|
|
492
493
|
}),
|
|
493
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ O(n, {
|
|
494
495
|
variant: "default",
|
|
495
496
|
size: "icon",
|
|
496
497
|
className: "h-8 w-8 hover:bg-primary/90",
|
|
497
|
-
"aria-label":
|
|
498
|
+
"aria-label": y(),
|
|
498
499
|
onClick: () => e.nextPage(),
|
|
499
500
|
disabled: !e.getCanNextPage(),
|
|
500
|
-
children: [/* @__PURE__ */
|
|
501
|
+
children: [/* @__PURE__ */ D("span", {
|
|
501
502
|
className: "sr-only",
|
|
502
|
-
children:
|
|
503
|
-
}), /* @__PURE__ */
|
|
503
|
+
children: y()
|
|
504
|
+
}), /* @__PURE__ */ D(M, { className: "h-4 w-4" })]
|
|
504
505
|
}),
|
|
505
|
-
/* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ O(n, {
|
|
506
507
|
variant: "default",
|
|
507
508
|
size: "icon",
|
|
508
509
|
className: "hidden h-8 w-8 lg:flex hover:bg-primary/90",
|
|
509
|
-
"aria-label":
|
|
510
|
+
"aria-label": v(),
|
|
510
511
|
onClick: () => e.setPageIndex(e.getPageCount() - 1),
|
|
511
512
|
disabled: !e.getCanNextPage(),
|
|
512
|
-
children: [/* @__PURE__ */
|
|
513
|
+
children: [/* @__PURE__ */ D("span", {
|
|
513
514
|
className: "sr-only",
|
|
514
|
-
children:
|
|
515
|
-
}), /* @__PURE__ */
|
|
515
|
+
children: v()
|
|
516
|
+
}), /* @__PURE__ */ D(F, { className: "h-4 w-4" })]
|
|
516
517
|
})
|
|
517
518
|
]
|
|
518
519
|
})
|
|
@@ -520,7 +521,7 @@ function z({ table: e, pageSizeOptions: t = [
|
|
|
520
521
|
})]
|
|
521
522
|
});
|
|
522
523
|
}
|
|
523
|
-
function
|
|
524
|
+
function ye({ table: e, pageSizeOptions: t = [
|
|
524
525
|
10,
|
|
525
526
|
20,
|
|
526
527
|
30,
|
|
@@ -528,39 +529,39 @@ function be({ table: e, pageSizeOptions: t = [
|
|
|
528
529
|
100
|
|
529
530
|
] }) {
|
|
530
531
|
let r = e.getPageCount();
|
|
531
|
-
return /* @__PURE__ */
|
|
532
|
+
return /* @__PURE__ */ O("div", {
|
|
532
533
|
className: "flex items-center gap-1",
|
|
533
|
-
children: [/* @__PURE__ */
|
|
534
|
-
"aria-label":
|
|
534
|
+
children: [/* @__PURE__ */ D("select", {
|
|
535
|
+
"aria-label": S(),
|
|
535
536
|
value: `${e.store.state.pagination.pageSize}`,
|
|
536
537
|
onChange: (t) => {
|
|
537
538
|
e.setPageSize(Number(t.target.value));
|
|
538
539
|
},
|
|
539
540
|
className: "h-8 w-fit min-w-16 rounded-md border border-input bg-background px-2 py-1 text-sm",
|
|
540
|
-
children: t.map((e) => /* @__PURE__ */
|
|
541
|
+
children: t.map((e) => /* @__PURE__ */ D("option", {
|
|
541
542
|
value: `${e}`,
|
|
542
543
|
children: e
|
|
543
544
|
}, e))
|
|
544
|
-
}), r > 1 && /* @__PURE__ */
|
|
545
|
-
/* @__PURE__ */
|
|
545
|
+
}), r > 1 && /* @__PURE__ */ O(le, { children: [
|
|
546
|
+
/* @__PURE__ */ D(n, {
|
|
546
547
|
variant: "default",
|
|
547
548
|
size: "icon",
|
|
548
549
|
className: "h-8 w-8 hover:bg-primary/90",
|
|
549
|
-
"aria-label":
|
|
550
|
+
"aria-label": _(),
|
|
550
551
|
onClick: () => e.setPageIndex(0),
|
|
551
552
|
disabled: e.store.state.pagination.pageIndex === 0,
|
|
552
|
-
children: /* @__PURE__ */
|
|
553
|
+
children: /* @__PURE__ */ D(P, { className: "h-4 w-4" })
|
|
553
554
|
}),
|
|
554
|
-
/* @__PURE__ */
|
|
555
|
+
/* @__PURE__ */ D(n, {
|
|
555
556
|
variant: "default",
|
|
556
557
|
size: "icon",
|
|
557
558
|
className: "h-8 w-8 hover:bg-primary/90",
|
|
558
|
-
"aria-label":
|
|
559
|
+
"aria-label": b(),
|
|
559
560
|
onClick: () => e.previousPage(),
|
|
560
561
|
disabled: !e.getCanPreviousPage(),
|
|
561
|
-
children: /* @__PURE__ */
|
|
562
|
+
children: /* @__PURE__ */ D(j, { className: "h-4 w-4" })
|
|
562
563
|
}),
|
|
563
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ O("span", {
|
|
564
565
|
className: "text-sm text-muted-foreground whitespace-nowrap px-1",
|
|
565
566
|
children: [
|
|
566
567
|
e.store.state.pagination.pageIndex + 1,
|
|
@@ -568,28 +569,28 @@ function be({ table: e, pageSizeOptions: t = [
|
|
|
568
569
|
r
|
|
569
570
|
]
|
|
570
571
|
}),
|
|
571
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ D(n, {
|
|
572
573
|
variant: "default",
|
|
573
574
|
size: "icon",
|
|
574
575
|
className: "h-8 w-8 hover:bg-primary/90",
|
|
575
|
-
"aria-label":
|
|
576
|
+
"aria-label": y(),
|
|
576
577
|
onClick: () => e.nextPage(),
|
|
577
578
|
disabled: !e.getCanNextPage(),
|
|
578
|
-
children: /* @__PURE__ */
|
|
579
|
+
children: /* @__PURE__ */ D(M, { className: "h-4 w-4" })
|
|
579
580
|
}),
|
|
580
|
-
/* @__PURE__ */
|
|
581
|
+
/* @__PURE__ */ D(n, {
|
|
581
582
|
variant: "default",
|
|
582
583
|
size: "icon",
|
|
583
584
|
className: "h-8 w-8 hover:bg-primary/90",
|
|
584
|
-
"aria-label":
|
|
585
|
+
"aria-label": v(),
|
|
585
586
|
onClick: () => e.setPageIndex(r - 1),
|
|
586
587
|
disabled: e.store.state.pagination.pageIndex === r - 1,
|
|
587
|
-
children: /* @__PURE__ */
|
|
588
|
+
children: /* @__PURE__ */ D(F, { className: "h-4 w-4" })
|
|
588
589
|
})
|
|
589
590
|
] })]
|
|
590
591
|
});
|
|
591
592
|
}
|
|
592
593
|
//#endregion
|
|
593
|
-
export {
|
|
594
|
+
export { z as DataTable, V as DataTablePagination, ye as DataTablePaginationCompact, B as DataTableViewOptions };
|
|
594
595
|
|
|
595
596
|
//# sourceMappingURL=data-table.js.map
|