@soft-stech/bootsman-ui-shadcn 1.4.25 → 1.4.27

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