@soft-stech/bootsman-ui-shadcn 1.3.3 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{BuiDataTable.vue_vue_type_script_setup_true_lang-CLpLGgTZ.js → BuiDataTable.vue_vue_type_script_setup_true_lang-B38w7sKR.js} +96 -83
- package/dist/components/ui/table/BuiDataTable.js +1 -1
- package/dist/components/ui/table/BuiDataTable.vue.d.ts +9 -2
- package/dist/components/ui/table/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/stories/BuiDataTable.story.vue +4 -1
- package/src/components/ui/table/BuiDataTable.vue +16 -6
@@ -1,25 +1,28 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { _ as
|
3
|
-
import { _ as
|
4
|
-
import { _ as
|
1
|
+
import { defineComponent as L, mergeModels as U, useModel as b, computed as y, watchEffect as F, openBlock as n, createElementBlock as u, Fragment as d, renderSlot as w, unref as o, createCommentVNode as S, createVNode as g, withCtx as a, renderList as f, createBlock as m, createElementVNode as z, createTextVNode as v, toDisplayString as C } from "vue";
|
2
|
+
import { _ as O } from "./BuiCollapsible.vue_vue_type_script_setup_true_lang-BfgRYJts.js";
|
3
|
+
import { _ as T } from "./BuiCollapsibleTrigger.vue_vue_type_script_setup_true_lang-DJ8YMCCp.js";
|
4
|
+
import { _ as j } from "./BuiCollapsibleContent.vue_vue_type_script_setup_true_lang-eieHE5yV.js";
|
5
5
|
import { _ as G } from "./BuiPaginationCommon.vue_vue_type_script_setup_true_lang-DjLAqoa-.js";
|
6
|
-
import { v as
|
7
|
-
import { _ as
|
8
|
-
import { useVueTable as
|
9
|
-
import { _ as
|
10
|
-
import { _ as
|
11
|
-
import { _ as
|
12
|
-
import { _ as
|
13
|
-
import { _ as
|
6
|
+
import { v as R } from "./utils-DPuEjrVV.js";
|
7
|
+
import { _ as N } from "./BuiTableRowSubrow.vue_vue_type_script_setup_true_lang-Ch5gemw2.js";
|
8
|
+
import { useVueTable as H, getCoreRowModel as K, getPaginationRowModel as Y, getSortedRowModel as q, FlexRender as A } from "@tanstack/vue-table";
|
9
|
+
import { _ as J } from "./BuiTable.vue_vue_type_script_setup_true_lang-CUPSwE5z.js";
|
10
|
+
import { _ as Q } from "./BuiTableBody.vue_vue_type_script_setup_true_lang-CWT4u-Ma.js";
|
11
|
+
import { _ as x } from "./BuiTableCell.vue_vue_type_script_setup_true_lang-BrTQJCiZ.js";
|
12
|
+
import { _ as W } from "./BuiTableHead.vue_vue_type_script_setup_true_lang-CCXONmtG.js";
|
13
|
+
import { _ as X } from "./BuiTableHeader.vue_vue_type_script_setup_true_lang-DZOqi3dp.js";
|
14
14
|
import { _ as P } from "./BuiTableRow.vue_vue_type_script_setup_true_lang-CpEilJsW.js";
|
15
|
-
import { _ as
|
16
|
-
import { _ as
|
17
|
-
const
|
15
|
+
import { _ as Z } from "./BuiTableEmpty.vue_vue_type_script_setup_true_lang-BJDYHpRG.js";
|
16
|
+
import { _ as ee } from "./BuiTableFooter.vue_vue_type_script_setup_true_lang-Cfxlxsbh.js";
|
17
|
+
const te = {
|
18
18
|
key: 0,
|
19
19
|
class: "w-full py-4"
|
20
|
-
},
|
20
|
+
}, oe = { class: "flex w-full items-center justify-between" }, ne = { class: "inline-block rounded-t bg-background px-4 py-3" }, ae = {
|
21
|
+
key: 0,
|
22
|
+
class: ""
|
23
|
+
}, E = "#UNDEFINED#", ve = /* @__PURE__ */ L({
|
21
24
|
__name: "BuiDataTable",
|
22
|
-
props: /* @__PURE__ */
|
25
|
+
props: /* @__PURE__ */ U({
|
23
26
|
columns: {},
|
24
27
|
data: {},
|
25
28
|
pageSize: { default: 10 },
|
@@ -37,13 +40,15 @@ const ee = {
|
|
37
40
|
pagination: {},
|
38
41
|
paginationModifiers: {},
|
39
42
|
selection: {},
|
40
|
-
selectionModifiers: {}
|
43
|
+
selectionModifiers: {},
|
44
|
+
columnVisibility: {},
|
45
|
+
columnVisibilityModifiers: {}
|
41
46
|
}),
|
42
|
-
emits: ["update:sorting", "update:pagination", "update:selection"],
|
47
|
+
emits: ["update:sorting", "update:pagination", "update:selection", "update:columnVisibility"],
|
43
48
|
setup(c) {
|
44
|
-
const t = c,
|
49
|
+
const t = c, $ = b(c, "sorting"), p = b(c, "pagination"), k = b(c, "selection"), D = b(c, "columnVisibility"), I = y(
|
45
50
|
() => t.manualPagination ? t.totalItems : t.data.length
|
46
|
-
),
|
51
|
+
), i = H({
|
47
52
|
initialState: { pagination: { pageSize: t.pageSize } },
|
48
53
|
get data() {
|
49
54
|
return t.data;
|
@@ -51,17 +56,17 @@ const ee = {
|
|
51
56
|
get columns() {
|
52
57
|
return t.columns;
|
53
58
|
},
|
54
|
-
getCoreRowModel:
|
55
|
-
getPaginationRowModel:
|
56
|
-
getSortedRowModel:
|
59
|
+
getCoreRowModel: K(),
|
60
|
+
getPaginationRowModel: Y(),
|
61
|
+
getSortedRowModel: q(),
|
57
62
|
onSortingChange: (e) => {
|
58
|
-
|
63
|
+
R(e, $);
|
59
64
|
},
|
60
65
|
onPaginationChange: (e) => {
|
61
|
-
|
66
|
+
R(e, p);
|
62
67
|
},
|
63
68
|
onRowSelectionChange: (e) => {
|
64
|
-
|
69
|
+
R(e, k);
|
65
70
|
},
|
66
71
|
autoResetPageIndex: !1,
|
67
72
|
manualPagination: t.manualPagination,
|
@@ -69,62 +74,65 @@ const ee = {
|
|
69
74
|
manualSorting: t.manualSorting,
|
70
75
|
state: {
|
71
76
|
get sorting() {
|
72
|
-
return
|
77
|
+
return $.value;
|
73
78
|
},
|
74
79
|
get pagination() {
|
75
|
-
return
|
80
|
+
return p.value;
|
76
81
|
},
|
77
82
|
get rowSelection() {
|
78
83
|
return k.value;
|
84
|
+
},
|
85
|
+
get columnVisibility() {
|
86
|
+
return D.value;
|
79
87
|
}
|
80
88
|
},
|
81
89
|
getRowId: t.getRowId
|
82
|
-
}),
|
90
|
+
}), h = y({
|
83
91
|
get() {
|
84
|
-
return
|
92
|
+
return i.getState().pagination.pageSize;
|
85
93
|
},
|
86
94
|
set(e) {
|
87
|
-
|
95
|
+
p.value && (p.value.pageSize = e, i.setPageSize(e), i.setPageIndex(0));
|
88
96
|
}
|
89
|
-
}), _ =
|
97
|
+
}), _ = y({
|
90
98
|
get() {
|
91
|
-
return
|
99
|
+
return i.getState().pagination.pageIndex + 1;
|
92
100
|
},
|
93
101
|
set(e) {
|
94
|
-
|
102
|
+
p.value && (p.value.pageIndex = e - 1, i.setPageIndex(e - 1));
|
95
103
|
}
|
96
104
|
});
|
97
|
-
|
98
|
-
const e =
|
105
|
+
F(() => {
|
106
|
+
const e = i.getPageCount();
|
99
107
|
e && e < _.value && (_.value = e);
|
100
108
|
});
|
101
|
-
const
|
102
|
-
const
|
103
|
-
return e[
|
109
|
+
const B = y(() => t.groupBy ? i.getRowModel().rows.reduce((e, s) => {
|
110
|
+
const l = s.getValue(t.groupBy) ?? E;
|
111
|
+
return e[l] = e[l] || [], e[l].push(s), e;
|
104
112
|
}, /* @__PURE__ */ Object.create(null)) : null);
|
105
|
-
function
|
113
|
+
function M(e) {
|
106
114
|
return (t.groupBy && t.groupLabels ? t.groupLabels[t.groupBy] || [] : [])[e];
|
107
115
|
}
|
108
|
-
return (e, s) => (n(),
|
109
|
-
e.$slots.caption ? (n(),
|
110
|
-
|
111
|
-
])) :
|
112
|
-
g(o(
|
116
|
+
return (e, s) => (n(), u(d, null, [
|
117
|
+
e.$slots.caption ? (n(), u("div", te, [
|
118
|
+
w(e.$slots, "caption", { table: o(i) })
|
119
|
+
])) : S("", !0),
|
120
|
+
g(o(J), null, {
|
113
121
|
default: a(() => [
|
114
|
-
g(o(
|
122
|
+
g(o(X), null, {
|
115
123
|
default: a(() => [
|
116
|
-
(n(!0),
|
117
|
-
key:
|
124
|
+
(n(!0), u(d, null, f(o(i).getHeaderGroups(), (r) => (n(), m(o(P), {
|
125
|
+
key: r.id
|
118
126
|
}, {
|
119
127
|
default: a(() => [
|
120
|
-
(n(!0),
|
121
|
-
key:
|
128
|
+
(n(!0), u(d, null, f(r.headers, (l) => (n(), m(o(W), {
|
129
|
+
key: l.id
|
122
130
|
}, {
|
123
131
|
default: a(() => [
|
124
|
-
|
132
|
+
l.isPlaceholder ? S("", !0) : (n(), m(o(A), {
|
125
133
|
key: 0,
|
126
|
-
render:
|
127
|
-
props:
|
134
|
+
render: l.column.columnDef.header,
|
135
|
+
props: l.getContext()
|
128
136
|
}, null, 8, ["render", "props"]))
|
129
137
|
]),
|
130
138
|
_: 2
|
@@ -135,30 +143,35 @@ const ee = {
|
|
135
143
|
]),
|
136
144
|
_: 1
|
137
145
|
}),
|
138
|
-
g(o(
|
146
|
+
g(o(Q), null, {
|
139
147
|
default: a(() => [
|
140
|
-
o(
|
141
|
-
t.groupBy &&
|
148
|
+
o(i).getRowModel().rows?.length ? (n(), u(d, { key: 0 }, [
|
149
|
+
t.groupBy && B.value ? (n(!0), u(d, { key: 0 }, f(B.value, (r, l) => (n(), m(o(O), {
|
142
150
|
asChild: "",
|
143
|
-
key:
|
151
|
+
key: l,
|
144
152
|
open: !0
|
145
153
|
}, {
|
146
154
|
default: a(() => [
|
147
|
-
g(o(
|
155
|
+
g(o(T), { asChild: "" }, {
|
148
156
|
default: a(() => [
|
149
157
|
g(o(P), { class: "bg-foreground/[0.04]" }, {
|
150
158
|
default: a(() => [
|
151
|
-
g(o(
|
159
|
+
g(o(x), {
|
152
160
|
colspan: e.columns.length,
|
153
161
|
class: "!pb-0"
|
154
162
|
}, {
|
155
163
|
default: a(() => [
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
164
|
+
z("div", oe, [
|
165
|
+
z("div", ne, [
|
166
|
+
l === E ? (n(), u(d, { key: 0 }, [
|
167
|
+
v(C(M(1)), 1)
|
168
|
+
], 64)) : (n(), u(d, { key: 1 }, [
|
169
|
+
v(C(M(0)) + ": " + C(l), 1)
|
170
|
+
], 64))
|
171
|
+
]),
|
172
|
+
e.$slots.groupByRow ? (n(), u("div", ae, [
|
173
|
+
w(e.$slots, "groupByRow", { group: l })
|
174
|
+
])) : S("", !0)
|
162
175
|
])
|
163
176
|
]),
|
164
177
|
_: 2
|
@@ -169,12 +182,12 @@ const ee = {
|
|
169
182
|
]),
|
170
183
|
_: 2
|
171
184
|
}, 1024),
|
172
|
-
g(o(
|
185
|
+
g(o(j), { asChild: "" }, {
|
173
186
|
default: a(() => [
|
174
|
-
(n(!0),
|
175
|
-
key:
|
187
|
+
(n(!0), u(d, null, f(r, (V) => (n(), m(N, {
|
188
|
+
key: V.id,
|
176
189
|
columns: t.columns,
|
177
|
-
row:
|
190
|
+
row: V,
|
178
191
|
renderSubComponent: t.renderSubComponent
|
179
192
|
}, null, 8, ["columns", "row", "renderSubComponent"]))), 128))
|
180
193
|
]),
|
@@ -182,19 +195,19 @@ const ee = {
|
|
182
195
|
}, 1024)
|
183
196
|
]),
|
184
197
|
_: 2
|
185
|
-
}, 1024))), 128)) : (n(!0),
|
186
|
-
key:
|
198
|
+
}, 1024))), 128)) : (n(!0), u(d, { key: 1 }, f(o(i).getRowModel().rows, (r) => (n(), m(N, {
|
199
|
+
key: r.id,
|
187
200
|
columns: t.columns,
|
188
|
-
row:
|
201
|
+
row: r,
|
189
202
|
renderSubComponent: t.renderSubComponent
|
190
203
|
}, null, 8, ["columns", "row", "renderSubComponent"]))), 128))
|
191
|
-
], 64)) : (n(),
|
204
|
+
], 64)) : (n(), m(o(Z), {
|
192
205
|
key: 1,
|
193
206
|
colspan: e.columns.length
|
194
207
|
}, {
|
195
208
|
default: a(() => [
|
196
|
-
|
197
|
-
s[2] || (s[2] =
|
209
|
+
w(e.$slots, "nodata", {}, () => [
|
210
|
+
s[2] || (s[2] = v("No data"))
|
198
211
|
])
|
199
212
|
]),
|
200
213
|
_: 3
|
@@ -202,11 +215,11 @@ const ee = {
|
|
202
215
|
]),
|
203
216
|
_: 3
|
204
217
|
}),
|
205
|
-
e.showPagination && I.value > 0 ? (n(),
|
218
|
+
e.showPagination && I.value > 0 ? (n(), m(o(ee), { key: 0 }, {
|
206
219
|
default: a(() => [
|
207
220
|
g(o(P), null, {
|
208
221
|
default: a(() => [
|
209
|
-
g(o(
|
222
|
+
g(o(x), {
|
210
223
|
colspan: e.columns.length
|
211
224
|
}, {
|
212
225
|
default: a(() => [
|
@@ -214,9 +227,9 @@ const ee = {
|
|
214
227
|
class: "float-right",
|
215
228
|
total: I.value,
|
216
229
|
pageIndex: _.value,
|
217
|
-
"onUpdate:pageIndex": s[0] || (s[0] = (
|
218
|
-
pageSize:
|
219
|
-
"onUpdate:pageSize": s[1] || (s[1] = (
|
230
|
+
"onUpdate:pageIndex": s[0] || (s[0] = (r) => _.value = r),
|
231
|
+
pageSize: h.value,
|
232
|
+
"onUpdate:pageSize": s[1] || (s[1] = (r) => h.value = r)
|
220
233
|
}, null, 8, ["total", "pageIndex", "pageSize"])
|
221
234
|
]),
|
222
235
|
_: 1
|
@@ -226,7 +239,7 @@ const ee = {
|
|
226
239
|
})
|
227
240
|
]),
|
228
241
|
_: 1
|
229
|
-
})) :
|
242
|
+
})) : S("", !0)
|
230
243
|
]),
|
231
244
|
_: 3
|
232
245
|
})
|
@@ -234,5 +247,5 @@ const ee = {
|
|
234
247
|
}
|
235
248
|
});
|
236
249
|
export {
|
237
|
-
|
250
|
+
ve as _
|
238
251
|
};
|
@@ -1,17 +1,20 @@
|
|
1
|
-
import { ColumnDef, PaginationState, Row, RowSelectionState, SortingState } from '@tanstack/vue-table';
|
1
|
+
import { ColumnDef, PaginationState, Row, RowSelectionState, SortingState, VisibilityState } from '@tanstack/vue-table';
|
2
2
|
declare const _default: <TData, TValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
4
4
|
readonly "onUpdate:sorting"?: ((sorting: SortingState) => any) | undefined;
|
5
5
|
readonly "onUpdate:pagination"?: ((pagination: PaginationState) => any) | undefined;
|
6
6
|
readonly "onUpdate:selection"?: ((selection: RowSelectionState) => any) | undefined;
|
7
|
+
readonly "onUpdate:columnVisibility"?: ((columnVisibility: VisibilityState) => any) | undefined;
|
7
8
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{
|
8
9
|
"onUpdate:sorting"?: ((sorting: SortingState) => any) | undefined;
|
9
10
|
"onUpdate:pagination"?: ((pagination: PaginationState) => any) | undefined;
|
10
11
|
"onUpdate:selection"?: ((selection: RowSelectionState) => any) | undefined;
|
11
|
-
|
12
|
+
"onUpdate:columnVisibility"?: ((columnVisibility: VisibilityState) => any) | undefined;
|
13
|
+
}>, never>, "onUpdate:sorting" | "onUpdate:pagination" | "onUpdate:selection" | "onUpdate:columnVisibility"> & ({
|
12
14
|
sorting?: SortingState;
|
13
15
|
pagination?: PaginationState;
|
14
16
|
selection?: RowSelectionState;
|
17
|
+
columnVisibility?: VisibilityState;
|
15
18
|
} & {
|
16
19
|
columns: ColumnDef<TData, TValue>[];
|
17
20
|
data: TData[];
|
@@ -31,12 +34,16 @@ declare const _default: <TData, TValue>(__VLS_props: NonNullable<Awaited<typeof
|
|
31
34
|
caption?(_: {
|
32
35
|
table: import('@tanstack/vue-table').Table<TData>;
|
33
36
|
}): any;
|
37
|
+
groupByRow?(_: {
|
38
|
+
group: string | number;
|
39
|
+
}): any;
|
34
40
|
nodata?(_: {}): any;
|
35
41
|
};
|
36
42
|
emit: {
|
37
43
|
'update:sorting': [sorting: SortingState];
|
38
44
|
'update:pagination': [pagination: PaginationState];
|
39
45
|
'update:selection': [selection: RowSelectionState];
|
46
|
+
'update:columnVisibility': [columnVisibility: VisibilityState];
|
40
47
|
};
|
41
48
|
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
42
49
|
[key: string]: any;
|
@@ -8,7 +8,7 @@ import { _ as x } from "../../../BuiTableRowSubrow.vue_vue_type_script_setup_tru
|
|
8
8
|
import { _ } from "../../../BuiTableCaption.vue_vue_type_script_setup_true_lang-053YvtXp.js";
|
9
9
|
import { _ as w } from "../../../BuiTableEmpty.vue_vue_type_script_setup_true_lang-BJDYHpRG.js";
|
10
10
|
import { _ as C } from "../../../BuiTableFooter.vue_vue_type_script_setup_true_lang-Cfxlxsbh.js";
|
11
|
-
import { _ as R } from "../../../BuiDataTable.vue_vue_type_script_setup_true_lang-
|
11
|
+
import { _ as R } from "../../../BuiDataTable.vue_vue_type_script_setup_true_lang-B38w7sKR.js";
|
12
12
|
export {
|
13
13
|
R as BuiDataTable,
|
14
14
|
e as BuiTable,
|
package/dist/index.js
CHANGED
@@ -116,7 +116,7 @@ import { _ as jt } from "./BuiTableRowSubrow.vue_vue_type_script_setup_true_lang
|
|
116
116
|
import { _ as Ot } from "./BuiTableCaption.vue_vue_type_script_setup_true_lang-053YvtXp.js";
|
117
117
|
import { _ as qt } from "./BuiTableEmpty.vue_vue_type_script_setup_true_lang-BJDYHpRG.js";
|
118
118
|
import { _ as Jt } from "./BuiTableFooter.vue_vue_type_script_setup_true_lang-Cfxlxsbh.js";
|
119
|
-
import { _ as Qt } from "./BuiDataTable.vue_vue_type_script_setup_true_lang-
|
119
|
+
import { _ as Qt } from "./BuiDataTable.vue_vue_type_script_setup_true_lang-B38w7sKR.js";
|
120
120
|
import { BuiTabsList as Xt, BuiTabsTrigger as Yt, tabsListVariants as Zt, tabsTriggerVariants as $t } from "./components/ui/tabs/index.js";
|
121
121
|
import { BuiTextarea as ra, textareaVariants as ea } from "./components/ui/textarea/index.js";
|
122
122
|
import { BuiToast as aa, BuiToaster as ia, toastVariants as ua } from "./components/ui/toast/index.js";
|
package/package.json
CHANGED
@@ -53,7 +53,8 @@ const columns: ColumnDef<Task>[] = [
|
|
53
53
|
{
|
54
54
|
accessorKey: 'priority',
|
55
55
|
header: ({ column }) => tableColumnSortCommon(column, 'Priorities')
|
56
|
-
}
|
56
|
+
},
|
57
|
+
{ id: 'hiddenColumn', header: 'Hidden Column', cell: 'secret info' }
|
57
58
|
]
|
58
59
|
const data = ref<Task[]>(tasks)
|
59
60
|
|
@@ -137,6 +138,7 @@ function updateRows() {
|
|
137
138
|
:groupBy="groupBy === 'none' ? undefined : groupBy"
|
138
139
|
:groupLabels="groupLabels"
|
139
140
|
:renderSubComponent="renderSubComponent"
|
141
|
+
:columnVisibility="{ hiddenColumn: false }"
|
140
142
|
>
|
141
143
|
<template #caption="{ table }">
|
142
144
|
<div class="flex justify-between">
|
@@ -162,6 +164,7 @@ function updateRows() {
|
|
162
164
|
</div>
|
163
165
|
</template>
|
164
166
|
<template #nodata>Нет данных</template>
|
167
|
+
<template #groupByRow="{ group }"> Optional slot for: `{{ group }}` </template>
|
165
168
|
</BuiDataTable>
|
166
169
|
</Variant>
|
167
170
|
</Story>
|
@@ -12,7 +12,8 @@ import type {
|
|
12
12
|
PaginationState,
|
13
13
|
Row,
|
14
14
|
RowSelectionState,
|
15
|
-
SortingState
|
15
|
+
SortingState,
|
16
|
+
VisibilityState
|
16
17
|
} from '@tanstack/vue-table'
|
17
18
|
import {
|
18
19
|
FlexRender,
|
@@ -55,6 +56,7 @@ const props = withDefaults(
|
|
55
56
|
const sorting = defineModel<SortingState>('sorting')
|
56
57
|
const pagination = defineModel<PaginationState>('pagination')
|
57
58
|
const rowSelection = defineModel<RowSelectionState>('selection')
|
59
|
+
const columnVisibility = defineModel<VisibilityState>('columnVisibility')
|
58
60
|
const computedItems = computed(() =>
|
59
61
|
props.manualPagination ? props.totalItems : props.data.length
|
60
62
|
)
|
@@ -90,6 +92,9 @@ const table = useVueTable({
|
|
90
92
|
},
|
91
93
|
get rowSelection() {
|
92
94
|
return rowSelection.value
|
95
|
+
},
|
96
|
+
get columnVisibility() {
|
97
|
+
return columnVisibility.value
|
93
98
|
}
|
94
99
|
},
|
95
100
|
getRowId: props.getRowId
|
@@ -165,11 +170,16 @@ function getGroupLabel(index: number) {
|
|
165
170
|
<BuiCollapsibleTrigger asChild>
|
166
171
|
<BuiTableRow class="bg-foreground/[0.04]">
|
167
172
|
<BuiTableCell :colspan="columns.length" class="!pb-0">
|
168
|
-
<div class="
|
169
|
-
<
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
+
<div class="flex w-full items-center justify-between">
|
174
|
+
<div class="inline-block rounded-t bg-background px-4 py-3">
|
175
|
+
<template v-if="key === NO_GROUP_KEY">
|
176
|
+
{{ getGroupLabel(1) }}
|
177
|
+
</template>
|
178
|
+
<template v-else> {{ getGroupLabel(0) }}: {{ key }} </template>
|
179
|
+
</div>
|
180
|
+
<div v-if="$slots.groupByRow" class="">
|
181
|
+
<slot name="groupByRow" :group="key" />
|
182
|
+
</div>
|
173
183
|
</div>
|
174
184
|
</BuiTableCell>
|
175
185
|
</BuiTableRow>
|