@soft-stech/bootsman-ui-shadcn 1.4.24 → 1.4.26
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/BuiDataTableColumnList.vue_vue_type_script_setup_true_lang-DsrMMFKz.js +1338 -0
- package/dist/BuiTable.vue_vue_type_script_setup_true_lang-QoPGiEYZ.js +28 -0
- package/dist/{BuiTableHeader.vue_vue_type_script_setup_true_lang-B2getNR7.js → BuiTableHeader.vue_vue_type_script_setup_true_lang-BXgL487_.js} +1 -1
- package/dist/{BuiTooltipContent.vue_vue_type_script_setup_true_lang-ZfTnapKW.js → BuiTooltipContent.vue_vue_type_script_setup_true_lang-CZ1I3edy.js} +3 -3
- package/dist/assets/main.css +1 -1
- package/dist/components/ui/table/BuiDataTable.vue.d.ts +12 -2
- package/dist/components/ui/table/BuiDataTableColumnList.js +4 -0
- package/dist/components/ui/table/BuiDataTableColumnList.vue.d.ts +24 -0
- package/dist/components/ui/table/BuiTable.js +1 -1
- package/dist/components/ui/table/BuiTable.vue.d.ts +1 -0
- package/dist/components/ui/table/BuiTableHeader.js +1 -1
- package/dist/components/ui/table/index.d.ts +1 -0
- package/dist/components/ui/table/index.js +310 -190
- package/dist/components/ui/tooltip/BuiTooltipContent.js +1 -1
- package/dist/components/ui/tooltip/index.js +1 -1
- package/dist/index.js +18 -16
- package/dist/variables.css +1 -1
- package/package.json +7 -5
- package/src/assets/variables.css +9 -8
- package/src/components/stories/BuiDataTable.story.vue +20 -4
- package/src/components/ui/table/BuiDataTable.vue +136 -20
- package/src/components/ui/table/BuiDataTableColumnList.vue +32 -0
- package/src/components/ui/table/BuiTable.vue +1 -0
- package/src/components/ui/table/BuiTableHeader.vue +2 -2
- package/src/components/ui/table/index.ts +1 -0
- package/src/components/ui/tooltip/BuiTooltipContent.vue +1 -1
- package/dist/BuiTable.vue_vue_type_script_setup_true_lang-D8Tseif4.js +0 -27
@@ -1,47 +1,66 @@
|
|
1
|
-
import { _ as
|
2
|
-
import { _ as
|
3
|
-
import { _ as
|
4
|
-
import { _ as
|
5
|
-
import { _ as
|
6
|
-
import { _ as
|
7
|
-
import { defineComponent as
|
8
|
-
import { _ as
|
9
|
-
import { _ as
|
10
|
-
import { _ as
|
11
|
-
import { _ as
|
12
|
-
import { _ as
|
13
|
-
import { _ as
|
14
|
-
import { _ as
|
15
|
-
import "
|
16
|
-
import {
|
17
|
-
import {
|
18
|
-
|
1
|
+
import { _ as J } from "../../../BuiTable.vue_vue_type_script_setup_true_lang-QoPGiEYZ.js";
|
2
|
+
import { _ as Q } from "../../../BuiTableBody.vue_vue_type_script_setup_true_lang-DblqmDim.js";
|
3
|
+
import { _ as O } from "../../../BuiTableCell.vue_vue_type_script_setup_true_lang-CYBx0oJL.js";
|
4
|
+
import { _ as X } from "../../../BuiTableHead.vue_vue_type_script_setup_true_lang-BDSRArVd.js";
|
5
|
+
import { _ as Z } from "../../../BuiTableHeader.vue_vue_type_script_setup_true_lang-BXgL487_.js";
|
6
|
+
import { _ as V } from "../../../BuiTableRow.vue_vue_type_script_setup_true_lang-Bl4nF6yV.js";
|
7
|
+
import { defineComponent as G, computed as w, openBlock as r, createElementBlock as d, Fragment as c, createBlock as f, unref as t, normalizeClass as ee, withCtx as a, renderSlot as y, renderList as z, normalizeStyle as K, createVNode as s, createCommentVNode as S, resolveDynamicComponent as oe, mergeModels as te, useModel as _, watchEffect as ne, ref as M, watch as le, createElementVNode as g, createTextVNode as h, toDisplayString as B } from "vue";
|
8
|
+
import { _ as so } from "../../../BuiTableCaption.vue_vue_type_script_setup_true_lang-CTEP1Sde.js";
|
9
|
+
import { _ as ae } from "../../../BuiTableEmpty.vue_vue_type_script_setup_true_lang-BTyX0sT5.js";
|
10
|
+
import { _ as uo } from "../../../BuiTableFooter.vue_vue_type_script_setup_true_lang-CRyh8XF5.js";
|
11
|
+
import { _ as re } from "../../../BuiCollapsible.vue_vue_type_script_setup_true_lang-DjuQBjGZ.js";
|
12
|
+
import { _ as se } from "../../../BuiCollapsibleTrigger.vue_vue_type_script_setup_true_lang-l-nmwAwq.js";
|
13
|
+
import { _ as ie } from "../../../BuiCollapsibleContent.vue_vue_type_script_setup_true_lang-BiD89zzH.js";
|
14
|
+
import { _ as ue } from "../../../variables-CtE99jPc.js";
|
15
|
+
import { h as de, v as C, _ as me, g as ge } from "../../../utils-CwP7Up6y.js";
|
16
|
+
import { FlexRender as W, useVueTable as pe, getCoreRowModel as ce, getPaginationRowModel as fe, getSortedRowModel as be } from "@tanstack/vue-table";
|
17
|
+
import { _ as ye } from "../../../BuiCommand.vue_vue_type_script_setup_true_lang-BiBVfuW-.js";
|
18
|
+
import { _ as ve } from "../../../BuiCommandEmpty.vue_vue_type_script_setup_true_lang-BkPg_0iY.js";
|
19
|
+
import { _ as we } from "../../../BuiCommandInput.vue_vue_type_script_setup_true_lang-Dxua89Ba.js";
|
20
|
+
import { _ as Se } from "../../../BuiCommandList.vue_vue_type_script_setup_true_lang-CczssFsO.js";
|
21
|
+
import { _ as _e } from "../../../BuiPopover.vue_vue_type_script_setup_true_lang-CGkz30K2.js";
|
22
|
+
import { _ as Ce } from "../../../BuiPopoverTrigger.vue_vue_type_script_setup_true_lang-Du2ZN56l.js";
|
23
|
+
import { _ as he } from "../../../BuiPopoverContent.vue_vue_type_script_setup_true_lang-D5UGzl8u.js";
|
24
|
+
import { _ as ze } from "../../../BuiScrollArea.vue_vue_type_script_setup_true_lang-D-nqw_Ka.js";
|
25
|
+
import { _ as ke } from "../../../BuiDataTableColumnList.vue_vue_type_script_setup_true_lang-DsrMMFKz.js";
|
26
|
+
/**
|
27
|
+
* @license lucide-vue-next v0.441.0 - ISC
|
28
|
+
*
|
29
|
+
* This source code is licensed under the ISC license.
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
31
|
+
*/
|
32
|
+
const $e = de("Settings2Icon", [
|
33
|
+
["path", { d: "M20 7h-9", key: "3s1dr2" }],
|
34
|
+
["path", { d: "M14 17H5", key: "gfn3mx" }],
|
35
|
+
["circle", { cx: "17", cy: "17", r: "3", key: "18b49y" }],
|
36
|
+
["circle", { cx: "7", cy: "7", r: "3", key: "dfmy0x" }]
|
37
|
+
]), Be = "[!fake-empty!]", j = /* @__PURE__ */ G({
|
19
38
|
__name: "BuiTableRowSubrow",
|
20
39
|
props: {
|
21
40
|
row: {},
|
22
41
|
renderSubComponent: { type: Function },
|
23
42
|
columns: {}
|
24
43
|
},
|
25
|
-
setup(
|
26
|
-
const
|
27
|
-
return (
|
28
|
-
|
44
|
+
setup(p) {
|
45
|
+
const n = p, k = w(() => n.row.original.name?.includes(Be));
|
46
|
+
return (i, R) => (r(), d(c, null, [
|
47
|
+
k.value ? S("", !0) : (r(), f(t(V), {
|
29
48
|
key: 0,
|
30
|
-
"data-row-state":
|
31
|
-
class:
|
49
|
+
"data-row-state": i.row.getIsSelected() ? "selected" : void 0,
|
50
|
+
class: ee(n.renderSubComponent?.(i.row) ? "border-b-0" : "")
|
32
51
|
}, {
|
33
|
-
actions:
|
34
|
-
|
52
|
+
actions: a(() => [
|
53
|
+
y(i.$slots, "actions")
|
35
54
|
]),
|
36
|
-
default:
|
37
|
-
(
|
38
|
-
key:
|
39
|
-
style:
|
55
|
+
default: a(() => [
|
56
|
+
(r(!0), d(c, null, z(i.row.getVisibleCells(), (v) => (r(), f(t(O), {
|
57
|
+
key: v.id,
|
58
|
+
style: K({ ...t(Y)(v.column) })
|
40
59
|
}, {
|
41
|
-
default:
|
42
|
-
|
43
|
-
render:
|
44
|
-
props:
|
60
|
+
default: a(() => [
|
61
|
+
s(t(W), {
|
62
|
+
render: v.column.columnDef.cell,
|
63
|
+
props: v.getContext()
|
45
64
|
}, null, 8, ["render", "props"])
|
46
65
|
]),
|
47
66
|
_: 2
|
@@ -49,20 +68,20 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
|
|
49
68
|
]),
|
50
69
|
_: 3
|
51
70
|
}, 8, ["data-row-state", "class"])),
|
52
|
-
|
71
|
+
n.renderSubComponent?.(i.row) ? (r(), f(t(V), {
|
53
72
|
key: 1,
|
54
|
-
"data-row-state":
|
73
|
+
"data-row-state": i.row.getIsSelected() ? "selected" : void 0
|
55
74
|
}, {
|
56
|
-
actions:
|
57
|
-
|
75
|
+
actions: a(() => [
|
76
|
+
y(i.$slots, "actions")
|
58
77
|
]),
|
59
|
-
default:
|
60
|
-
|
61
|
-
colspan:
|
78
|
+
default: a(() => [
|
79
|
+
s(t(O), {
|
80
|
+
colspan: i.columns.length,
|
62
81
|
class: "pt-0"
|
63
82
|
}, {
|
64
|
-
default:
|
65
|
-
(
|
83
|
+
default: a(() => [
|
84
|
+
(r(), f(oe(n.renderSubComponent?.(i.row)?.())))
|
66
85
|
]),
|
67
86
|
_: 1
|
68
87
|
}, 8, ["colspan"])
|
@@ -71,15 +90,15 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
|
|
71
90
|
}, 8, ["data-row-state"])) : S("", !0)
|
72
91
|
], 64));
|
73
92
|
}
|
74
|
-
}),
|
93
|
+
}), Re = {
|
75
94
|
key: 0,
|
76
95
|
class: "w-full py-3"
|
77
|
-
},
|
96
|
+
}, Ie = { class: "absolute right-0 top-0 z-10 h-10 bg-background" }, Pe = { class: "flex h-full items-center border-l border-border/[0.16] bg-foreground/[0.04] px-1" }, xe = ["onDblclick", "onMousedown", "className"], Me = { class: "mt-1 flex w-full items-center justify-between" }, Oe = { class: "relative -mb-[6px] inline-block rounded-t-lg bg-background px-4 py-2 text-sm font-medium shadow-top-shadow" }, Ve = {
|
78
97
|
key: 1,
|
79
98
|
class: "flex w-full justify-end border-x border-b border-border/[0.16] bg-primary/[0.04] px-4 py-1 text-base text-muted-foreground"
|
80
|
-
},
|
99
|
+
}, A = "#UNDEFINED#", lo = /* @__PURE__ */ G({
|
81
100
|
__name: "BuiDataTable",
|
82
|
-
props: /* @__PURE__ */
|
101
|
+
props: /* @__PURE__ */ te({
|
83
102
|
columns: {},
|
84
103
|
data: {},
|
85
104
|
pageSize: { default: 10 },
|
@@ -91,7 +110,9 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
|
|
91
110
|
groupLabels: {},
|
92
111
|
getRowId: {},
|
93
112
|
renderSubComponent: {},
|
94
|
-
freezeHeader: { type: Boolean }
|
113
|
+
freezeHeader: { type: Boolean },
|
114
|
+
columnSearchPlaceholder: { default: "Column name" },
|
115
|
+
columnSearchNotFound: { default: "Not found" }
|
95
116
|
}, {
|
96
117
|
sorting: {},
|
97
118
|
sortingModifiers: {},
|
@@ -100,160 +121,258 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
|
|
100
121
|
selection: {},
|
101
122
|
selectionModifiers: {},
|
102
123
|
columnVisibility: {},
|
103
|
-
columnVisibilityModifiers: {}
|
124
|
+
columnVisibilityModifiers: {},
|
125
|
+
columnSizing: {},
|
126
|
+
columnSizingModifiers: {},
|
127
|
+
columnOrder: {},
|
128
|
+
columnOrderModifiers: {}
|
104
129
|
}),
|
105
|
-
emits: ["update:sorting", "update:pagination", "update:selection", "update:columnVisibility"],
|
106
|
-
setup(
|
107
|
-
const
|
108
|
-
() =>
|
109
|
-
),
|
130
|
+
emits: ["update:sorting", "update:pagination", "update:selection", "update:columnVisibility", "update:columnSizing", "update:columnOrder"],
|
131
|
+
setup(p) {
|
132
|
+
const n = p, k = _(p, "sorting"), i = _(p, "pagination"), R = _(p, "selection"), v = _(p, "columnVisibility"), T = _(p, "columnSizing"), b = _(p, "columnOrder"), N = w(
|
133
|
+
() => n.manualPagination ? n.totalItems : n.data.length
|
134
|
+
), q = n.columns.map((e) => e.meta?.pinLeft && e.id ? e.id : "").filter(Boolean), u = pe({
|
110
135
|
initialState: {
|
111
136
|
// TODO: column freeze
|
112
|
-
|
113
|
-
pagination: { pageSize:
|
137
|
+
columnPinning: { left: q },
|
138
|
+
pagination: { pageSize: n.pageSize }
|
114
139
|
},
|
115
140
|
get data() {
|
116
|
-
return
|
141
|
+
return n.data;
|
117
142
|
},
|
118
143
|
get columns() {
|
119
|
-
return
|
144
|
+
return n.columns;
|
120
145
|
},
|
121
|
-
getCoreRowModel:
|
122
|
-
getPaginationRowModel:
|
123
|
-
getSortedRowModel:
|
146
|
+
getCoreRowModel: ce(),
|
147
|
+
getPaginationRowModel: fe(),
|
148
|
+
getSortedRowModel: be(),
|
124
149
|
onSortingChange: (e) => {
|
125
|
-
|
150
|
+
C(e, k);
|
126
151
|
},
|
127
152
|
onPaginationChange: (e) => {
|
128
|
-
|
153
|
+
C(e, i);
|
129
154
|
},
|
130
155
|
onRowSelectionChange: (e) => {
|
131
|
-
|
156
|
+
C(e, R);
|
157
|
+
},
|
158
|
+
onColumnVisibilityChange: (e) => {
|
159
|
+
C(e, v);
|
160
|
+
},
|
161
|
+
onColumnSizingChange: (e) => {
|
162
|
+
C(e, T);
|
163
|
+
},
|
164
|
+
onColumnOrderChange: (e) => {
|
165
|
+
C(e, b);
|
132
166
|
},
|
133
167
|
autoResetPageIndex: !1,
|
134
|
-
manualPagination:
|
168
|
+
manualPagination: n.manualPagination,
|
135
169
|
// set to false to enable client-side pagination
|
136
|
-
manualSorting:
|
170
|
+
manualSorting: n.manualSorting,
|
171
|
+
enableColumnResizing: !0,
|
172
|
+
columnResizeMode: "onChange",
|
173
|
+
columnResizeDirection: "ltr",
|
137
174
|
state: {
|
138
175
|
get sorting() {
|
139
|
-
return
|
176
|
+
return k.value;
|
140
177
|
},
|
141
178
|
get pagination() {
|
142
|
-
return
|
179
|
+
return i.value;
|
143
180
|
},
|
144
181
|
get rowSelection() {
|
145
|
-
return
|
182
|
+
return R.value;
|
146
183
|
},
|
147
184
|
get columnVisibility() {
|
148
|
-
return
|
185
|
+
return v.value;
|
186
|
+
},
|
187
|
+
get columnSizing() {
|
188
|
+
return T.value;
|
189
|
+
},
|
190
|
+
get columnOrder() {
|
191
|
+
return b.value;
|
149
192
|
}
|
150
193
|
},
|
151
|
-
getRowId:
|
152
|
-
}),
|
194
|
+
getRowId: n.getRowId
|
195
|
+
}), D = w({
|
153
196
|
get() {
|
154
|
-
return
|
197
|
+
return u.getState().pagination.pageSize;
|
155
198
|
},
|
156
199
|
set(e) {
|
157
|
-
|
200
|
+
i.value && (i.value.pageSize = e, u.setPageSize(e), u.setPageIndex(0));
|
158
201
|
}
|
159
|
-
}),
|
202
|
+
}), $ = w({
|
160
203
|
get() {
|
161
|
-
return
|
204
|
+
return u.getState().pagination.pageIndex + 1;
|
162
205
|
},
|
163
206
|
set(e) {
|
164
|
-
|
207
|
+
i.value && (i.value.pageIndex = e - 1, u.setPageIndex(e - 1));
|
165
208
|
}
|
166
209
|
});
|
167
|
-
|
168
|
-
const e =
|
169
|
-
e && e <
|
210
|
+
ne(() => {
|
211
|
+
const e = u.getPageCount();
|
212
|
+
e && e < $.value && ($.value = e);
|
170
213
|
});
|
171
|
-
const
|
172
|
-
const
|
173
|
-
return e[
|
214
|
+
const H = w(() => n.groupBy ? u.getRowModel().rows.reduce((e, o) => {
|
215
|
+
const m = o.getValue(n.groupBy) ?? A;
|
216
|
+
return e[m] = e[m] || [], e[m].push(o), e;
|
174
217
|
}, /* @__PURE__ */ Object.create(null)) : null);
|
175
|
-
function
|
176
|
-
return (
|
218
|
+
function L(e) {
|
219
|
+
return (n.groupBy && n.groupLabels ? n.groupLabels[n.groupBy] || [] : [])[e];
|
177
220
|
}
|
178
|
-
|
179
|
-
e
|
180
|
-
|
221
|
+
const I = M(
|
222
|
+
u.getAllColumns().filter((e) => typeof e.accessorFn < "u" && e.getCanHide()).sort((e, o) => b.value ? b.value?.indexOf(e.id) < 0 && b.value?.indexOf(o.id) >= 0 ? 1 : b.value?.indexOf(e.id) >= 0 && b.value?.indexOf(o.id) < 0 ? -1 : b.value?.indexOf(e.id) - b.value?.indexOf(o.id) : 0)
|
223
|
+
), E = w(() => I.value.map((e) => e.id)), F = M(!1), P = M(""), U = w(
|
224
|
+
() => u.getHeaderGroups().length > 0 ? u.getHeaderGroups()[0].headers : void 0
|
225
|
+
);
|
226
|
+
return le(E, () => {
|
227
|
+
u.setColumnOrder(E.value);
|
228
|
+
}), (e, o) => (r(), d(c, null, [
|
229
|
+
e.$slots.caption ? (r(), d("div", Re, [
|
230
|
+
y(e.$slots, "caption", { table: t(u) })
|
181
231
|
])) : S("", !0),
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
232
|
+
s(t(J), null, {
|
233
|
+
columnVisibility: a(() => [
|
234
|
+
s(t(_e), {
|
235
|
+
open: F.value,
|
236
|
+
"onUpdate:open": o[3] || (o[3] = (l) => F.value = l)
|
186
237
|
}, {
|
187
|
-
default:
|
188
|
-
(t(
|
189
|
-
|
238
|
+
default: a(() => [
|
239
|
+
s(t(Ce), { "as-child": "" }, {
|
240
|
+
default: a(() => [
|
241
|
+
g("div", Ie, [
|
242
|
+
g("div", Pe, [
|
243
|
+
s(t(me), {
|
244
|
+
variant: "ghost",
|
245
|
+
class: "flex h-8 w-8 items-center justify-center text-foreground"
|
246
|
+
}, {
|
247
|
+
default: a(() => [
|
248
|
+
s(t($e), { class: "h-4 w-4 flex-shrink-0 opacity-50" })
|
249
|
+
]),
|
250
|
+
_: 1
|
251
|
+
})
|
252
|
+
])
|
253
|
+
])
|
254
|
+
]),
|
255
|
+
_: 1
|
256
|
+
}),
|
257
|
+
s(t(he), {
|
258
|
+
class: "w-[250px] p-0",
|
259
|
+
align: "start"
|
190
260
|
}, {
|
191
|
-
default:
|
192
|
-
(t(
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
261
|
+
default: a(() => [
|
262
|
+
s(t(ye), null, {
|
263
|
+
default: a(() => [
|
264
|
+
s(t(we), {
|
265
|
+
placeholder: e.columnSearchPlaceholder,
|
266
|
+
modelValue: P.value,
|
267
|
+
"onUpdate:modelValue": o[0] || (o[0] = (l) => P.value = l),
|
268
|
+
onInput: o[1] || (o[1] = (l) => P.value = l.target.value)
|
269
|
+
}, null, 8, ["placeholder", "modelValue"]),
|
270
|
+
s(t(Se), null, {
|
271
|
+
default: a(() => [
|
272
|
+
s(t(ze), { class: "h-[300px]" }, {
|
273
|
+
default: a(() => [
|
274
|
+
s(t(ve), null, {
|
275
|
+
default: a(() => [
|
276
|
+
h(B(e.columnSearchNotFound), 1)
|
277
|
+
]),
|
278
|
+
_: 1
|
279
|
+
}),
|
280
|
+
s(t(ke), {
|
281
|
+
"columns-list": I.value,
|
282
|
+
"onUpdate:columnsList": o[2] || (o[2] = (l) => I.value = l)
|
283
|
+
}, null, 8, ["columns-list"])
|
284
|
+
]),
|
285
|
+
_: 1
|
286
|
+
})
|
287
|
+
]),
|
288
|
+
_: 1
|
289
|
+
})
|
203
290
|
]),
|
204
|
-
_:
|
205
|
-
}
|
291
|
+
_: 1
|
292
|
+
})
|
293
|
+
]),
|
294
|
+
_: 1
|
295
|
+
})
|
296
|
+
]),
|
297
|
+
_: 1
|
298
|
+
}, 8, ["open"])
|
299
|
+
]),
|
300
|
+
default: a(() => [
|
301
|
+
U.value ? (r(), f(t(Z), {
|
302
|
+
key: 0,
|
303
|
+
"freeze-header": n.freezeHeader
|
304
|
+
}, {
|
305
|
+
default: a(() => [
|
306
|
+
(r(!0), d(c, null, z(U.value, (l) => (r(), f(t(X), {
|
307
|
+
key: l.id,
|
308
|
+
style: K({ ...t(Y)(l.column), width: l.getSize() + "px" }),
|
309
|
+
"freeze-header": n.freezeHeader
|
310
|
+
}, {
|
311
|
+
default: a(() => [
|
312
|
+
l.isPlaceholder ? S("", !0) : (r(), f(t(W), {
|
313
|
+
key: 0,
|
314
|
+
render: l.column.columnDef.header,
|
315
|
+
props: l.getContext()
|
316
|
+
}, null, 8, ["render", "props"])),
|
317
|
+
g("div", {
|
318
|
+
onDblclick: () => l.column.resetSize(),
|
319
|
+
onMousedown: (m) => l.getResizeHandler()?.(m),
|
320
|
+
className: t(ge)(
|
321
|
+
"absolute top-0 right-0 h-full w-1 bg-muted-foreground opacity-0 cursor-col-resize select-none touch-none hover:opacity-50",
|
322
|
+
l.column.getIsResizing() ? "bg-primary opacity-50" : ""
|
323
|
+
)
|
324
|
+
}, null, 40, xe)
|
206
325
|
]),
|
207
326
|
_: 2
|
208
|
-
},
|
327
|
+
}, 1032, ["style", "freeze-header"]))), 128))
|
209
328
|
]),
|
210
329
|
_: 1
|
211
|
-
}, 8, ["freeze-header"]),
|
212
|
-
|
213
|
-
default:
|
214
|
-
|
215
|
-
|
330
|
+
}, 8, ["freeze-header"])) : S("", !0),
|
331
|
+
s(t(Q), null, {
|
332
|
+
default: a(() => [
|
333
|
+
t(u).getRowModel().rows?.length ? (r(), d(c, { key: 0 }, [
|
334
|
+
n.groupBy && H.value ? (r(!0), d(c, { key: 0 }, z(H.value, (l, m) => (r(), f(t(re), {
|
216
335
|
asChild: "",
|
217
|
-
key:
|
336
|
+
key: m,
|
218
337
|
open: !0
|
219
338
|
}, {
|
220
|
-
default:
|
221
|
-
|
222
|
-
default:
|
223
|
-
|
224
|
-
actions:
|
225
|
-
|
339
|
+
default: a(() => [
|
340
|
+
s(t(se), { asChild: "" }, {
|
341
|
+
default: a(() => [
|
342
|
+
s(t(V), { class: "bg-foreground/[0.04]" }, {
|
343
|
+
actions: a(() => [
|
344
|
+
y(e.$slots, "groupActions", { group: m })
|
226
345
|
]),
|
227
|
-
default:
|
228
|
-
|
346
|
+
default: a(() => [
|
347
|
+
s(t(O), {
|
229
348
|
colspan: e.columns.length,
|
230
349
|
class: "!pb-0"
|
231
350
|
}, {
|
232
|
-
default:
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
], 64)) : (
|
245
|
-
|
246
|
-
e.$slots.groupName ?
|
351
|
+
default: a(() => [
|
352
|
+
g("div", Me, [
|
353
|
+
g("div", Oe, [
|
354
|
+
o[6] || (o[6] = g("div", { class: "absolute -left-2 bottom-0 h-2 w-2 bg-background" }, null, -1)),
|
355
|
+
o[7] || (o[7] = g("div", { class: "absolute -left-4 bottom-0 h-4 w-4 rounded-lg bg-background" }, null, -1)),
|
356
|
+
o[8] || (o[8] = g("div", { class: "absolute -left-4 bottom-0 h-4 w-4 rounded-lg bg-foreground/[0.04]" }, null, -1)),
|
357
|
+
o[9] || (o[9] = g("div", { class: "absolute -right-2 bottom-0 h-2 w-2 bg-background" }, null, -1)),
|
358
|
+
o[10] || (o[10] = g("div", { class: "absolute -right-4 bottom-0 h-4 w-4 rounded-lg bg-background" }, null, -1)),
|
359
|
+
o[11] || (o[11] = g("div", { class: "absolute -right-4 bottom-0 h-4 w-4 rounded-lg bg-foreground/[0.04]" }, null, -1)),
|
360
|
+
o[12] || (o[12] = g("div", null, null, -1)),
|
361
|
+
m === A ? (r(), d(c, { key: 0 }, [
|
362
|
+
h(B(L(1)), 1)
|
363
|
+
], 64)) : (r(), d(c, { key: 1 }, [
|
364
|
+
h(B(L(0)) + ": ", 1),
|
365
|
+
e.$slots.groupName ? y(e.$slots, "groupName", {
|
247
366
|
key: 0,
|
248
|
-
group:
|
249
|
-
}) : (
|
250
|
-
|
367
|
+
group: m
|
368
|
+
}) : (r(), d(c, { key: 1 }, [
|
369
|
+
h(B(m), 1)
|
251
370
|
], 64))
|
252
371
|
], 64))
|
253
372
|
]),
|
254
|
-
e.$slots.groupByRow ?
|
373
|
+
e.$slots.groupByRow ? y(e.$slots, "groupByRow", {
|
255
374
|
key: 0,
|
256
|
-
group:
|
375
|
+
group: m
|
257
376
|
}) : S("", !0)
|
258
377
|
])
|
259
378
|
]),
|
@@ -265,17 +384,17 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
|
|
265
384
|
]),
|
266
385
|
_: 2
|
267
386
|
}, 1024),
|
268
|
-
|
269
|
-
default:
|
270
|
-
(
|
271
|
-
key:
|
272
|
-
columns:
|
273
|
-
row:
|
274
|
-
renderSubComponent:
|
387
|
+
s(t(ie), { asChild: "" }, {
|
388
|
+
default: a(() => [
|
389
|
+
(r(!0), d(c, null, z(l, (x) => (r(), f(j, {
|
390
|
+
key: x.id,
|
391
|
+
columns: n.columns,
|
392
|
+
row: x,
|
393
|
+
renderSubComponent: n.renderSubComponent
|
275
394
|
}, {
|
276
|
-
actions:
|
277
|
-
|
278
|
-
row:
|
395
|
+
actions: a(() => [
|
396
|
+
y(e.$slots, "rowActions", {
|
397
|
+
row: x.original
|
279
398
|
})
|
280
399
|
]),
|
281
400
|
_: 2
|
@@ -285,26 +404,26 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
|
|
285
404
|
}, 1024)
|
286
405
|
]),
|
287
406
|
_: 2
|
288
|
-
}, 1024))), 128)) : (
|
289
|
-
key:
|
290
|
-
columns:
|
291
|
-
row:
|
292
|
-
renderSubComponent:
|
407
|
+
}, 1024))), 128)) : (r(!0), d(c, { key: 1 }, z(t(u).getRowModel().rows, (l) => (r(), f(j, {
|
408
|
+
key: l.id,
|
409
|
+
columns: n.columns,
|
410
|
+
row: l,
|
411
|
+
renderSubComponent: n.renderSubComponent
|
293
412
|
}, {
|
294
|
-
actions:
|
295
|
-
|
296
|
-
row:
|
413
|
+
actions: a(() => [
|
414
|
+
y(e.$slots, "rowActions", {
|
415
|
+
row: l.original
|
297
416
|
})
|
298
417
|
]),
|
299
418
|
_: 2
|
300
419
|
}, 1032, ["columns", "row", "renderSubComponent"]))), 128))
|
301
|
-
], 64)) : (
|
420
|
+
], 64)) : (r(), f(t(ae), {
|
302
421
|
key: 1,
|
303
422
|
colspan: e.columns.length
|
304
423
|
}, {
|
305
|
-
default:
|
306
|
-
|
307
|
-
|
424
|
+
default: a(() => [
|
425
|
+
y(e.$slots, "nodata", {}, () => [
|
426
|
+
o[13] || (o[13] = h("No data"))
|
308
427
|
])
|
309
428
|
]),
|
310
429
|
_: 3
|
@@ -315,37 +434,38 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
|
|
315
434
|
]),
|
316
435
|
_: 3
|
317
436
|
}),
|
318
|
-
e.showPagination &&
|
319
|
-
|
320
|
-
total:
|
321
|
-
pageIndex:
|
322
|
-
"onUpdate:pageIndex":
|
323
|
-
pageSize:
|
324
|
-
"onUpdate:pageSize":
|
437
|
+
e.showPagination && N.value > 0 ? (r(), d("div", Ve, [
|
438
|
+
s(t(ue), {
|
439
|
+
total: N.value,
|
440
|
+
pageIndex: $.value,
|
441
|
+
"onUpdate:pageIndex": o[4] || (o[4] = (l) => $.value = l),
|
442
|
+
pageSize: D.value,
|
443
|
+
"onUpdate:pageSize": o[5] || (o[5] = (l) => D.value = l)
|
325
444
|
}, null, 8, ["total", "pageIndex", "pageSize"])
|
326
445
|
])) : S("", !0)
|
327
446
|
], 64));
|
328
447
|
}
|
329
448
|
});
|
330
|
-
function
|
331
|
-
const
|
449
|
+
function Y(p) {
|
450
|
+
const n = p.getIsPinned();
|
332
451
|
return {
|
333
|
-
left:
|
334
|
-
position:
|
335
|
-
zIndex:
|
452
|
+
left: n === "left" ? "0" : void 0,
|
453
|
+
position: n ? "sticky" : "relative",
|
454
|
+
zIndex: n ? "1" : "0"
|
336
455
|
};
|
337
456
|
}
|
338
457
|
export {
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
458
|
+
lo as BuiDataTable,
|
459
|
+
ke as BuiDataTableColumnList,
|
460
|
+
J as BuiTable,
|
461
|
+
Q as BuiTableBody,
|
462
|
+
so as BuiTableCaption,
|
463
|
+
O as BuiTableCell,
|
464
|
+
ae as BuiTableEmpty,
|
465
|
+
uo as BuiTableFooter,
|
466
|
+
X as BuiTableHead,
|
467
|
+
Z as BuiTableHeader,
|
468
|
+
V as BuiTableRow,
|
469
|
+
j as BuiTableRowSubrow,
|
470
|
+
Y as getPinningStyle
|
351
471
|
};
|