@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.
@@ -1,25 +1,28 @@
1
- import { defineComponent as V, mergeModels as D, useModel as b, computed as S, watchEffect as L, openBlock as n, createElementBlock as i, Fragment as d, renderSlot as z, unref as o, createCommentVNode as v, createVNode as g, withCtx as a, renderList as f, createBlock as p, createElementVNode as U, createTextVNode as w, toDisplayString as y } from "vue";
2
- import { _ as F } from "./BuiCollapsible.vue_vue_type_script_setup_true_lang-BfgRYJts.js";
3
- import { _ as O } from "./BuiCollapsibleTrigger.vue_vue_type_script_setup_true_lang-DJ8YMCCp.js";
4
- import { _ as T } from "./BuiCollapsibleContent.vue_vue_type_script_setup_true_lang-eieHE5yV.js";
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 C } from "./utils-DPuEjrVV.js";
7
- import { _ as x } from "./BuiTableRowSubrow.vue_vue_type_script_setup_true_lang-Ch5gemw2.js";
8
- import { useVueTable as j, getCoreRowModel as H, getPaginationRowModel as K, getSortedRowModel as Y, FlexRender as q } from "@tanstack/vue-table";
9
- import { _ as A } from "./BuiTable.vue_vue_type_script_setup_true_lang-CUPSwE5z.js";
10
- import { _ as J } from "./BuiTableBody.vue_vue_type_script_setup_true_lang-CWT4u-Ma.js";
11
- import { _ as N } from "./BuiTableCell.vue_vue_type_script_setup_true_lang-BrTQJCiZ.js";
12
- import { _ as Q } from "./BuiTableHead.vue_vue_type_script_setup_true_lang-CCXONmtG.js";
13
- import { _ as W } from "./BuiTableHeader.vue_vue_type_script_setup_true_lang-DZOqi3dp.js";
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 X } from "./BuiTableEmpty.vue_vue_type_script_setup_true_lang-BJDYHpRG.js";
16
- import { _ as Z } from "./BuiTableFooter.vue_vue_type_script_setup_true_lang-Cfxlxsbh.js";
17
- const ee = {
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
- }, te = { class: "inline-block rounded-t bg-background px-4 py-3" }, E = "#UNDEFINED#", be = /* @__PURE__ */ V({
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__ */ D({
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, R = b(c, "sorting"), m = b(c, "pagination"), k = b(c, "selection"), I = S(
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
- ), u = j({
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: H(),
55
- getPaginationRowModel: K(),
56
- getSortedRowModel: Y(),
59
+ getCoreRowModel: K(),
60
+ getPaginationRowModel: Y(),
61
+ getSortedRowModel: q(),
57
62
  onSortingChange: (e) => {
58
- C(e, R);
63
+ R(e, $);
59
64
  },
60
65
  onPaginationChange: (e) => {
61
- C(e, m);
66
+ R(e, p);
62
67
  },
63
68
  onRowSelectionChange: (e) => {
64
- C(e, k);
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 R.value;
77
+ return $.value;
73
78
  },
74
79
  get pagination() {
75
- return m.value;
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
- }), $ = S({
90
+ }), h = y({
83
91
  get() {
84
- return u.getState().pagination.pageSize;
92
+ return i.getState().pagination.pageSize;
85
93
  },
86
94
  set(e) {
87
- m.value && (m.value.pageSize = e, u.setPageSize(e), u.setPageIndex(0));
95
+ p.value && (p.value.pageSize = e, i.setPageSize(e), i.setPageIndex(0));
88
96
  }
89
- }), _ = S({
97
+ }), _ = y({
90
98
  get() {
91
- return u.getState().pagination.pageIndex + 1;
99
+ return i.getState().pagination.pageIndex + 1;
92
100
  },
93
101
  set(e) {
94
- m.value && (m.value.pageIndex = e - 1, u.setPageIndex(e - 1));
102
+ p.value && (p.value.pageIndex = e - 1, i.setPageIndex(e - 1));
95
103
  }
96
104
  });
97
- L(() => {
98
- const e = u.getPageCount();
105
+ F(() => {
106
+ const e = i.getPageCount();
99
107
  e && e < _.value && (_.value = e);
100
108
  });
101
- const M = S(() => t.groupBy ? u.getRowModel().rows.reduce((e, s) => {
102
- const r = s.getValue(t.groupBy) ?? E;
103
- return e[r] = e[r] || [], e[r].push(s), 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 h(e) {
113
+ function M(e) {
106
114
  return (t.groupBy && t.groupLabels ? t.groupLabels[t.groupBy] || [] : [])[e];
107
115
  }
108
- return (e, s) => (n(), i(d, null, [
109
- e.$slots.caption ? (n(), i("div", ee, [
110
- z(e.$slots, "caption", { table: o(u) })
111
- ])) : v("", !0),
112
- g(o(A), null, {
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(W), null, {
122
+ g(o(X), null, {
115
123
  default: a(() => [
116
- (n(!0), i(d, null, f(o(u).getHeaderGroups(), (l) => (n(), p(o(P), {
117
- key: l.id
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), i(d, null, f(l.headers, (r) => (n(), p(o(Q), {
121
- key: r.id
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
- r.isPlaceholder ? v("", !0) : (n(), p(o(q), {
132
+ l.isPlaceholder ? S("", !0) : (n(), m(o(A), {
125
133
  key: 0,
126
- render: r.column.columnDef.header,
127
- props: r.getContext()
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(J), null, {
146
+ g(o(Q), null, {
139
147
  default: a(() => [
140
- o(u).getRowModel().rows?.length ? (n(), i(d, { key: 0 }, [
141
- t.groupBy && M.value ? (n(!0), i(d, { key: 0 }, f(M.value, (l, r) => (n(), p(o(F), {
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: r,
151
+ key: l,
144
152
  open: !0
145
153
  }, {
146
154
  default: a(() => [
147
- g(o(O), { asChild: "" }, {
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(N), {
159
+ g(o(x), {
152
160
  colspan: e.columns.length,
153
161
  class: "!pb-0"
154
162
  }, {
155
163
  default: a(() => [
156
- U("div", te, [
157
- r === E ? (n(), i(d, { key: 0 }, [
158
- w(y(h(1)), 1)
159
- ], 64)) : (n(), i(d, { key: 1 }, [
160
- w(y(h(0)) + ": " + y(r), 1)
161
- ], 64))
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(T), { asChild: "" }, {
185
+ g(o(j), { asChild: "" }, {
173
186
  default: a(() => [
174
- (n(!0), i(d, null, f(l, (B) => (n(), p(x, {
175
- key: B.id,
187
+ (n(!0), u(d, null, f(r, (V) => (n(), m(N, {
188
+ key: V.id,
176
189
  columns: t.columns,
177
- row: B,
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), i(d, { key: 1 }, f(o(u).getRowModel().rows, (l) => (n(), p(x, {
186
- key: l.id,
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: l,
201
+ row: r,
189
202
  renderSubComponent: t.renderSubComponent
190
203
  }, null, 8, ["columns", "row", "renderSubComponent"]))), 128))
191
- ], 64)) : (n(), p(o(X), {
204
+ ], 64)) : (n(), m(o(Z), {
192
205
  key: 1,
193
206
  colspan: e.columns.length
194
207
  }, {
195
208
  default: a(() => [
196
- z(e.$slots, "nodata", {}, () => [
197
- s[2] || (s[2] = w("No data"))
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(), p(o(Z), { key: 0 }, {
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(N), {
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] = (l) => _.value = l),
218
- pageSize: $.value,
219
- "onUpdate:pageSize": s[1] || (s[1] = (l) => $.value = l)
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
- })) : v("", !0)
242
+ })) : S("", !0)
230
243
  ]),
231
244
  _: 3
232
245
  })
@@ -234,5 +247,5 @@ const ee = {
234
247
  }
235
248
  });
236
249
  export {
237
- be as _
250
+ ve as _
238
251
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../../../BuiDataTable.vue_vue_type_script_setup_true_lang-CLpLGgTZ.js";
1
+ import { _ as f } from "../../../BuiDataTable.vue_vue_type_script_setup_true_lang-B38w7sKR.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -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
- }>, never>, "onUpdate:sorting" | "onUpdate:pagination" | "onUpdate:selection"> & ({
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-CLpLGgTZ.js";
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-CLpLGgTZ.js";
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soft-stech/bootsman-ui-shadcn",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -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="inline-block rounded-t bg-background px-4 py-3">
169
- <template v-if="key === NO_GROUP_KEY">
170
- {{ getGroupLabel(1) }}
171
- </template>
172
- <template v-else> {{ getGroupLabel(0) }}: {{ key }} </template>
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>