@soft-stech/bootsman-ui-shadcn 1.4.14 → 1.4.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,84 +1,85 @@
1
- import { _ as j } from "../../../BuiTable.vue_vue_type_script_setup_true_lang-CKRiQHpD.js";
2
- import { _ as A } from "../../../BuiTableBody.vue_vue_type_script_setup_true_lang-DblqmDim.js";
3
- import { _ as M } from "../../../BuiTableCell.vue_vue_type_script_setup_true_lang-CYBx0oJL.js";
4
- import { _ as H } from "../../../BuiTableHead.vue_vue_type_script_setup_true_lang-uE4Py8ky.js";
5
- import { _ as O } from "../../../BuiTableHeader.vue_vue_type_script_setup_true_lang-BcnB4-3x.js";
6
- import { _ as k } from "../../../BuiTableRow.vue_vue_type_script_setup_true_lang-Bl4nF6yV.js";
7
- import { defineComponent as E, openBlock as n, createElementBlock as s, Fragment as d, createVNode as m, unref as a, normalizeClass as G, withCtx as l, renderSlot as c, renderList as S, createBlock as p, normalizeStyle as x, resolveDynamicComponent as K, createCommentVNode as v, mergeModels as Y, useModel as B, computed as _, watchEffect as q, createElementVNode as f, createTextVNode as $, toDisplayString as P } from "vue";
8
- import { _ as Re } from "../../../BuiTableCaption.vue_vue_type_script_setup_true_lang-CTEP1Sde.js";
9
- import { _ as J } from "../../../BuiTableEmpty.vue_vue_type_script_setup_true_lang-BTyX0sT5.js";
10
- import { _ as Ie } from "../../../BuiTableFooter.vue_vue_type_script_setup_true_lang-CRyh8XF5.js";
11
- import { _ as Q } from "../../../BuiCollapsible.vue_vue_type_script_setup_true_lang-DjuQBjGZ.js";
12
- import { _ as W } from "../../../BuiCollapsibleTrigger.vue_vue_type_script_setup_true_lang-l-nmwAwq.js";
1
+ import { _ as A } from "../../../BuiTable.vue_vue_type_script_setup_true_lang-CKRiQHpD.js";
2
+ import { _ as O } from "../../../BuiTableBody.vue_vue_type_script_setup_true_lang-DblqmDim.js";
3
+ import { _ as T } from "../../../BuiTableCell.vue_vue_type_script_setup_true_lang-CYBx0oJL.js";
4
+ import { _ as j } from "../../../BuiTableHead.vue_vue_type_script_setup_true_lang-uE4Py8ky.js";
5
+ import { _ as H } from "../../../BuiTableHeader.vue_vue_type_script_setup_true_lang-BcnB4-3x.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 o, 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 Me } 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
13
  import { _ as X } from "../../../BuiCollapsibleContent.vue_vue_type_script_setup_true_lang-BiD89zzH.js";
14
14
  import { _ as Z } from "../../../variables-Dw5mPbg_.js";
15
15
  import "vee-validate";
16
- import { v as I } from "../../../utils-CwP7Up6y.js";
17
- import { FlexRender as F, useVueTable as ee, getCoreRowModel as oe, getPaginationRowModel as te, getSortedRowModel as ne } from "@tanstack/vue-table";
18
- const N = /* @__PURE__ */ E({
16
+ import { v as M } from "../../../utils-CwP7Up6y.js";
17
+ import { FlexRender as L, useVueTable as ee, getCoreRowModel as te, getPaginationRowModel as oe, getSortedRowModel as ne } from "@tanstack/vue-table";
18
+ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
19
19
  __name: "BuiTableRowSubrow",
20
20
  props: {
21
21
  row: {},
22
22
  renderSubComponent: { type: Function },
23
23
  columns: {}
24
24
  },
25
- setup(b) {
26
- const o = b;
27
- return (i, w) => (n(), s(d, null, [
28
- m(a(k), {
29
- "data-row-state": i.row.getIsSelected() ? "selected" : void 0,
30
- class: G(o.renderSubComponent?.(i.row) ? "border-b-0" : "")
25
+ setup(f) {
26
+ const t = f, C = v(() => t.row.original.name.includes(ae));
27
+ return (r, $) => (o(), u(d, null, [
28
+ C.value ? S("", !0) : (o(), m(a(R), {
29
+ key: 0,
30
+ "data-row-state": r.row.getIsSelected() ? "selected" : void 0,
31
+ class: G(t.renderSubComponent?.(r.row) ? "border-b-0" : "")
31
32
  }, {
32
33
  actions: l(() => [
33
- c(i.$slots, "actions")
34
+ c(r.$slots, "actions")
34
35
  ]),
35
36
  default: l(() => [
36
- (n(!0), s(d, null, S(i.row.getVisibleCells(), (y) => (n(), p(a(M), {
37
- key: y.id,
38
- style: x({ ...a(L)(y.column) })
37
+ (o(!0), u(d, null, y(r.row.getVisibleCells(), (w) => (o(), m(a(T), {
38
+ key: w.id,
39
+ style: F({ ...a(U)(w.column) })
39
40
  }, {
40
41
  default: l(() => [
41
- m(a(F), {
42
- render: y.column.columnDef.cell,
43
- props: y.getContext()
42
+ p(a(L), {
43
+ render: w.column.columnDef.cell,
44
+ props: w.getContext()
44
45
  }, null, 8, ["render", "props"])
45
46
  ]),
46
47
  _: 2
47
48
  }, 1032, ["style"]))), 128))
48
49
  ]),
49
50
  _: 3
50
- }, 8, ["data-row-state", "class"]),
51
- o.renderSubComponent?.(i.row) ? (n(), p(a(k), {
52
- key: 0,
53
- "data-row-state": i.row.getIsSelected() ? "selected" : void 0
51
+ }, 8, ["data-row-state", "class"])),
52
+ t.renderSubComponent?.(r.row) ? (o(), m(a(R), {
53
+ key: 1,
54
+ "data-row-state": r.row.getIsSelected() ? "selected" : void 0
54
55
  }, {
55
56
  actions: l(() => [
56
- c(i.$slots, "actions")
57
+ c(r.$slots, "actions")
57
58
  ]),
58
59
  default: l(() => [
59
- m(a(M), {
60
- colspan: i.columns.length,
60
+ p(a(T), {
61
+ colspan: r.columns.length,
61
62
  class: "pt-0"
62
63
  }, {
63
64
  default: l(() => [
64
- (n(), p(K(o.renderSubComponent?.(i.row)?.())))
65
+ (o(), m(K(t.renderSubComponent?.(r.row)?.())))
65
66
  ]),
66
67
  _: 1
67
68
  }, 8, ["colspan"])
68
69
  ]),
69
70
  _: 3
70
- }, 8, ["data-row-state"])) : v("", !0)
71
+ }, 8, ["data-row-state"])) : S("", !0)
71
72
  ], 64));
72
73
  }
73
- }), ae = {
74
+ }), le = {
74
75
  key: 0,
75
76
  class: "w-full py-3"
76
- }, le = { class: "mt-1 flex w-full items-center justify-between" }, re = { class: "relative -mb-[5px] inline-block rounded-t-lg bg-background px-4 py-2 text-sm font-medium shadow-top-shadow" }, se = {
77
+ }, re = { class: "mt-1 flex w-full items-center justify-between" }, se = { class: "relative -mb-[5px] inline-block rounded-t-lg bg-background px-4 py-2 text-sm font-medium shadow-top-shadow" }, ue = {
77
78
  key: 1,
78
79
  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"
79
- }, D = "#UNDEFINED#", _e = /* @__PURE__ */ E({
80
+ }, D = "#UNDEFINED#", _e = /* @__PURE__ */ x({
80
81
  __name: "BuiDataTable",
81
- props: /* @__PURE__ */ Y({
82
+ props: /* @__PURE__ */ W({
82
83
  columns: {},
83
84
  data: {},
84
85
  pageSize: { default: 10 },
@@ -101,99 +102,99 @@ const N = /* @__PURE__ */ E({
101
102
  columnVisibilityModifiers: {}
102
103
  }),
103
104
  emits: ["update:sorting", "update:pagination", "update:selection", "update:columnVisibility"],
104
- setup(b) {
105
- const o = b, i = B(b, "sorting"), w = B(b, "pagination"), y = B(b, "selection"), U = B(b, "columnVisibility"), T = _(
106
- () => o.manualPagination ? o.totalItems : o.data.length
105
+ setup(f) {
106
+ const t = f, C = k(f, "sorting"), r = k(f, "pagination"), $ = k(f, "selection"), w = k(f, "columnVisibility"), V = v(
107
+ () => t.manualPagination ? t.totalItems : t.data.length
107
108
  ), g = ee({
108
109
  initialState: {
109
110
  // TODO: column freeze
110
111
  //columnPinning: { left: ['id'] },
111
- pagination: { pageSize: o.pageSize }
112
+ pagination: { pageSize: t.pageSize }
112
113
  },
113
114
  get data() {
114
- return o.data;
115
+ return t.data;
115
116
  },
116
117
  get columns() {
117
- return o.columns;
118
+ return t.columns;
118
119
  },
119
- getCoreRowModel: oe(),
120
- getPaginationRowModel: te(),
120
+ getCoreRowModel: te(),
121
+ getPaginationRowModel: oe(),
121
122
  getSortedRowModel: ne(),
122
123
  onSortingChange: (e) => {
123
- I(e, i);
124
+ M(e, C);
124
125
  },
125
126
  onPaginationChange: (e) => {
126
- I(e, w);
127
+ M(e, r);
127
128
  },
128
129
  onRowSelectionChange: (e) => {
129
- I(e, y);
130
+ M(e, $);
130
131
  },
131
132
  autoResetPageIndex: !1,
132
- manualPagination: o.manualPagination,
133
+ manualPagination: t.manualPagination,
133
134
  // set to false to enable client-side pagination
134
- manualSorting: o.manualSorting,
135
+ manualSorting: t.manualSorting,
135
136
  state: {
136
137
  get sorting() {
137
- return i.value;
138
+ return C.value;
138
139
  },
139
140
  get pagination() {
140
- return w.value;
141
+ return r.value;
141
142
  },
142
143
  get rowSelection() {
143
- return y.value;
144
+ return $.value;
144
145
  },
145
146
  get columnVisibility() {
146
- return U.value;
147
+ return w.value;
147
148
  }
148
149
  },
149
- getRowId: o.getRowId
150
- }), V = _({
150
+ getRowId: t.getRowId
151
+ }), z = v({
151
152
  get() {
152
153
  return g.getState().pagination.pageSize;
153
154
  },
154
155
  set(e) {
155
- w.value && (w.value.pageSize = e, g.setPageSize(e), g.setPageIndex(0));
156
+ r.value && (r.value.pageSize = e, g.setPageSize(e), g.setPageIndex(0));
156
157
  }
157
- }), C = _({
158
+ }), B = v({
158
159
  get() {
159
160
  return g.getState().pagination.pageIndex + 1;
160
161
  },
161
162
  set(e) {
162
- w.value && (w.value.pageIndex = e - 1, g.setPageIndex(e - 1));
163
+ r.value && (r.value.pageIndex = e - 1, g.setPageIndex(e - 1));
163
164
  }
164
165
  });
165
- q(() => {
166
+ Y(() => {
166
167
  const e = g.getPageCount();
167
- e && e < C.value && (C.value = e);
168
+ e && e < B.value && (B.value = e);
168
169
  });
169
- const z = _(() => o.groupBy ? g.getRowModel().rows.reduce((e, t) => {
170
- const r = t.getValue(o.groupBy) ?? D;
171
- return e[r] = e[r] || [], e[r].push(t), e;
170
+ const h = v(() => t.groupBy ? g.getRowModel().rows.reduce((e, n) => {
171
+ const s = n.getValue(t.groupBy) ?? D;
172
+ return e[s] = e[s] || [], e[s].push(n), e;
172
173
  }, /* @__PURE__ */ Object.create(null)) : null);
173
- function h(e) {
174
- return (o.groupBy && o.groupLabels ? o.groupLabels[o.groupBy] || [] : [])[e];
174
+ function N(e) {
175
+ return (t.groupBy && t.groupLabels ? t.groupLabels[t.groupBy] || [] : [])[e];
175
176
  }
176
- return (e, t) => (n(), s(d, null, [
177
- e.$slots.caption ? (n(), s("div", ae, [
177
+ return (e, n) => (o(), u(d, null, [
178
+ e.$slots.caption ? (o(), u("div", le, [
178
179
  c(e.$slots, "caption", { table: a(g) })
179
- ])) : v("", !0),
180
- m(a(j), null, {
180
+ ])) : S("", !0),
181
+ p(a(A), null, {
181
182
  default: l(() => [
182
- m(a(O), null, {
183
+ p(a(H), null, {
183
184
  default: l(() => [
184
- (n(!0), s(d, null, S(a(g).getHeaderGroups(), (u) => (n(), p(a(k), {
185
- key: u.id
185
+ (o(!0), u(d, null, y(a(g).getHeaderGroups(), (i) => (o(), m(a(R), {
186
+ key: i.id
186
187
  }, {
187
188
  default: l(() => [
188
- (n(!0), s(d, null, S(u.headers, (r) => (n(), p(a(H), {
189
- key: r.id,
190
- style: x({ ...a(L)(r.column) })
189
+ (o(!0), u(d, null, y(i.headers, (s) => (o(), m(a(j), {
190
+ key: s.id,
191
+ style: F({ ...a(U)(s.column) })
191
192
  }, {
192
193
  default: l(() => [
193
- r.isPlaceholder ? v("", !0) : (n(), p(a(F), {
194
+ s.isPlaceholder ? S("", !0) : (o(), m(a(L), {
194
195
  key: 0,
195
- render: r.column.columnDef.header,
196
- props: r.getContext()
196
+ render: s.column.columnDef.header,
197
+ props: s.getContext()
197
198
  }, null, 8, ["render", "props"]))
198
199
  ]),
199
200
  _: 2
@@ -204,52 +205,52 @@ const N = /* @__PURE__ */ E({
204
205
  ]),
205
206
  _: 1
206
207
  }),
207
- m(a(A), null, {
208
+ p(a(O), null, {
208
209
  default: l(() => [
209
- a(g).getRowModel().rows?.length ? (n(), s(d, { key: 0 }, [
210
- o.groupBy && z.value ? (n(!0), s(d, { key: 0 }, S(z.value, (u, r) => (n(), p(a(Q), {
210
+ a(g).getRowModel().rows?.length ? (o(), u(d, { key: 0 }, [
211
+ t.groupBy && h.value ? (o(!0), u(d, { key: 0 }, y(h.value, (i, s) => (o(), m(a(J), {
211
212
  asChild: "",
212
- key: r,
213
+ key: s,
213
214
  open: !0
214
215
  }, {
215
216
  default: l(() => [
216
- m(a(W), { asChild: "" }, {
217
+ p(a(Q), { asChild: "" }, {
217
218
  default: l(() => [
218
- m(a(k), { class: "bg-foreground/[0.04]" }, {
219
+ p(a(R), { class: "bg-foreground/[0.04]" }, {
219
220
  actions: l(() => [
220
- c(e.$slots, "groupActions", { group: r })
221
+ c(e.$slots, "groupActions", { group: s })
221
222
  ]),
222
223
  default: l(() => [
223
- m(a(M), {
224
+ p(a(T), {
224
225
  colspan: e.columns.length,
225
226
  class: "!pb-0"
226
227
  }, {
227
228
  default: l(() => [
228
- f("div", le, [
229
- f("div", re, [
230
- t[2] || (t[2] = f("div", { class: "absolute -left-2 bottom-0 h-2 w-2 bg-background" }, null, -1)),
231
- t[3] || (t[3] = f("div", { class: "absolute -left-4 bottom-0 h-4 w-4 rounded-lg bg-background" }, null, -1)),
232
- t[4] || (t[4] = f("div", { class: "absolute -left-4 bottom-0 h-4 w-4 rounded-lg bg-foreground/[0.04]" }, null, -1)),
233
- t[5] || (t[5] = f("div", { class: "absolute -right-2 bottom-0 h-2 w-2 bg-background" }, null, -1)),
234
- t[6] || (t[6] = f("div", { class: "absolute -right-4 bottom-0 h-4 w-4 rounded-lg bg-background" }, null, -1)),
235
- t[7] || (t[7] = f("div", { class: "absolute -right-4 bottom-0 h-4 w-4 rounded-lg bg-foreground/[0.04]" }, null, -1)),
236
- t[8] || (t[8] = f("div", null, null, -1)),
237
- r === D ? (n(), s(d, { key: 0 }, [
238
- $(P(h(1)), 1)
239
- ], 64)) : (n(), s(d, { key: 1 }, [
240
- $(P(h(0)) + ": ", 1),
229
+ b("div", re, [
230
+ b("div", se, [
231
+ n[2] || (n[2] = b("div", { class: "absolute -left-2 bottom-0 h-2 w-2 bg-background" }, null, -1)),
232
+ n[3] || (n[3] = b("div", { class: "absolute -left-4 bottom-0 h-4 w-4 rounded-lg bg-background" }, null, -1)),
233
+ n[4] || (n[4] = b("div", { class: "absolute -left-4 bottom-0 h-4 w-4 rounded-lg bg-foreground/[0.04]" }, null, -1)),
234
+ n[5] || (n[5] = b("div", { class: "absolute -right-2 bottom-0 h-2 w-2 bg-background" }, null, -1)),
235
+ n[6] || (n[6] = b("div", { class: "absolute -right-4 bottom-0 h-4 w-4 rounded-lg bg-background" }, null, -1)),
236
+ n[7] || (n[7] = b("div", { class: "absolute -right-4 bottom-0 h-4 w-4 rounded-lg bg-foreground/[0.04]" }, null, -1)),
237
+ n[8] || (n[8] = b("div", null, null, -1)),
238
+ s === D ? (o(), u(d, { key: 0 }, [
239
+ _(I(N(1)), 1)
240
+ ], 64)) : (o(), u(d, { key: 1 }, [
241
+ _(I(N(0)) + ": ", 1),
241
242
  e.$slots.groupName ? c(e.$slots, "groupName", {
242
243
  key: 0,
243
- group: r
244
- }) : (n(), s(d, { key: 1 }, [
245
- $(P(r), 1)
244
+ group: s
245
+ }) : (o(), u(d, { key: 1 }, [
246
+ _(I(s), 1)
246
247
  ], 64))
247
248
  ], 64))
248
249
  ]),
249
250
  e.$slots.groupByRow ? c(e.$slots, "groupByRow", {
250
251
  key: 0,
251
- group: r
252
- }) : v("", !0)
252
+ group: s
253
+ }) : S("", !0)
253
254
  ])
254
255
  ]),
255
256
  _: 2
@@ -260,17 +261,17 @@ const N = /* @__PURE__ */ E({
260
261
  ]),
261
262
  _: 2
262
263
  }, 1024),
263
- m(a(X), { asChild: "" }, {
264
+ p(a(X), { asChild: "" }, {
264
265
  default: l(() => [
265
- (n(!0), s(d, null, S(u, (R) => (n(), p(N, {
266
- key: R.id,
267
- columns: o.columns,
268
- row: R,
269
- renderSubComponent: o.renderSubComponent
266
+ (o(!0), u(d, null, y(i, (P) => (o(), m(E, {
267
+ key: P.id,
268
+ columns: t.columns,
269
+ row: P,
270
+ renderSubComponent: t.renderSubComponent
270
271
  }, {
271
272
  actions: l(() => [
272
273
  c(e.$slots, "rowActions", {
273
- row: R.original
274
+ row: P.original
274
275
  })
275
276
  ]),
276
277
  _: 2
@@ -280,26 +281,26 @@ const N = /* @__PURE__ */ E({
280
281
  }, 1024)
281
282
  ]),
282
283
  _: 2
283
- }, 1024))), 128)) : (n(!0), s(d, { key: 1 }, S(a(g).getRowModel().rows, (u) => (n(), p(N, {
284
- key: u.id,
285
- columns: o.columns,
286
- row: u,
287
- renderSubComponent: o.renderSubComponent
284
+ }, 1024))), 128)) : (o(!0), u(d, { key: 1 }, y(a(g).getRowModel().rows, (i) => (o(), m(E, {
285
+ key: i.id,
286
+ columns: t.columns,
287
+ row: i,
288
+ renderSubComponent: t.renderSubComponent
288
289
  }, {
289
290
  actions: l(() => [
290
291
  c(e.$slots, "rowActions", {
291
- row: u.original
292
+ row: i.original
292
293
  })
293
294
  ]),
294
295
  _: 2
295
296
  }, 1032, ["columns", "row", "renderSubComponent"]))), 128))
296
- ], 64)) : (n(), p(a(J), {
297
+ ], 64)) : (o(), m(a(q), {
297
298
  key: 1,
298
299
  colspan: e.columns.length
299
300
  }, {
300
301
  default: l(() => [
301
302
  c(e.$slots, "nodata", {}, () => [
302
- t[9] || (t[9] = $("No data"))
303
+ n[9] || (n[9] = _("No data"))
303
304
  ])
304
305
  ]),
305
306
  _: 3
@@ -310,37 +311,37 @@ const N = /* @__PURE__ */ E({
310
311
  ]),
311
312
  _: 3
312
313
  }),
313
- e.showPagination && T.value > 0 ? (n(), s("div", se, [
314
- m(a(Z), {
315
- total: T.value,
316
- pageIndex: C.value,
317
- "onUpdate:pageIndex": t[0] || (t[0] = (u) => C.value = u),
318
- pageSize: V.value,
319
- "onUpdate:pageSize": t[1] || (t[1] = (u) => V.value = u)
314
+ e.showPagination && V.value > 0 ? (o(), u("div", ue, [
315
+ p(a(Z), {
316
+ total: V.value,
317
+ pageIndex: B.value,
318
+ "onUpdate:pageIndex": n[0] || (n[0] = (i) => B.value = i),
319
+ pageSize: z.value,
320
+ "onUpdate:pageSize": n[1] || (n[1] = (i) => z.value = i)
320
321
  }, null, 8, ["total", "pageIndex", "pageSize"])
321
- ])) : v("", !0)
322
+ ])) : S("", !0)
322
323
  ], 64));
323
324
  }
324
325
  });
325
- function L(b) {
326
- const o = b.getIsPinned();
326
+ function U(f) {
327
+ const t = f.getIsPinned();
327
328
  return {
328
- left: o === "left" ? "0" : void 0,
329
- position: o ? "sticky" : "relative",
330
- zIndex: o ? "1" : "0"
329
+ left: t === "left" ? "0" : void 0,
330
+ position: t ? "sticky" : "relative",
331
+ zIndex: t ? "1" : "0"
331
332
  };
332
333
  }
333
334
  export {
334
335
  _e as BuiDataTable,
335
- j as BuiTable,
336
- A as BuiTableBody,
337
- Re as BuiTableCaption,
338
- M as BuiTableCell,
339
- J as BuiTableEmpty,
340
- Ie as BuiTableFooter,
341
- H as BuiTableHead,
342
- O as BuiTableHeader,
343
- k as BuiTableRow,
344
- N as BuiTableRowSubrow,
345
- L as getPinningStyle
336
+ A as BuiTable,
337
+ O as BuiTableBody,
338
+ Pe as BuiTableCaption,
339
+ T as BuiTableCell,
340
+ q as BuiTableEmpty,
341
+ Me as BuiTableFooter,
342
+ j as BuiTableHead,
343
+ H as BuiTableHeader,
344
+ R as BuiTableRow,
345
+ E as BuiTableRowSubrow,
346
+ U as getPinningStyle
346
347
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soft-stech/bootsman-ui-shadcn",
3
- "version": "1.4.14",
3
+ "version": "1.4.16",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -2,16 +2,25 @@
2
2
  import { BuiTableCell, BuiTableRow } from '@/components/ui/table'
3
3
  import { FlexRender, type ColumnDef, type Row } from '@tanstack/vue-table'
4
4
  import { getPinningStyle } from './'
5
+ import { computed } from 'vue'
5
6
 
6
7
  const props = defineProps<{
7
8
  row: Row<TData>
8
9
  renderSubComponent?: (row: Row<TData>) => (() => any) | undefined
9
10
  columns: ColumnDef<TData, TValue>[]
10
11
  }>()
12
+
13
+ // иногда мы используем фейковые строки с пустыми значениями, лучше их скрыть
14
+ const FAKE_ROW = '[!fake-empty!]'
15
+ const isEmptyRow = computed(() => {
16
+ // @ts-expect-error name с таким значением это наше внутреннее соглашение. См. Боцман Дашборд, таблицу Projects/Namespaces
17
+ return props.row.original.name.includes(FAKE_ROW)
18
+ })
11
19
  </script>
12
20
 
13
21
  <template>
14
22
  <BuiTableRow
23
+ v-if="!isEmptyRow"
15
24
  :data-row-state="row.getIsSelected() ? 'selected' : undefined"
16
25
  :class="props.renderSubComponent?.(row) ? 'border-b-0' : ''"
17
26
  >