@soft-stech/bootsman-ui-shadcn 1.3.6 → 1.3.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. package/dist/{BuiAutoForm.vue_vue_type_script_setup_true_lang-BWWNpH1I.js → BuiAutoForm.vue_vue_type_script_setup_true_lang-DyG1WRf2.js} +23 -23
  2. package/dist/BuiAutoFormField.vue_vue_type_script_setup_true_lang-D0xFhEmy.js +284 -0
  3. package/dist/BuiAutoFormFieldObject.vue_vue_type_script_setup_true_lang-C7URAPKt.js +96 -0
  4. package/dist/{BuiDataTable.vue_vue_type_script_setup_true_lang-CUH3nl15.js → BuiDataTable.vue_vue_type_script_setup_true_lang-Bzw8CawP.js} +74 -68
  5. package/dist/assets/main.css +1 -1
  6. package/dist/components/ui/auto-form/BuiAutoForm.js +1 -1
  7. package/dist/components/ui/auto-form/BuiAutoFormField.js +1 -1
  8. package/dist/components/ui/auto-form/BuiAutoFormFieldArray.js +1 -1
  9. package/dist/components/ui/auto-form/BuiAutoFormFieldObject.js +1 -1
  10. package/dist/components/ui/auto-form/BuiAutoFormFieldObjectCard.js +4 -0
  11. package/dist/components/ui/auto-form/constant.js +5 -3
  12. package/dist/components/ui/auto-form/index.js +18 -17
  13. package/dist/components/ui/table/BuiDataTable.js +1 -1
  14. package/dist/components/ui/table/BuiDataTable.vue.d.ts +3 -0
  15. package/dist/components/ui/table/index.js +1 -1
  16. package/dist/index.js +70 -69
  17. package/package.json +1 -1
  18. package/src/components/stories/BuiAutoForm.story.vue +10 -0
  19. package/src/components/stories/BuiDataTable.story.vue +38 -4
  20. package/src/components/ui/auto-form/BuiAutoForm.vue +1 -1
  21. package/src/components/ui/auto-form/BuiAutoFormFieldObjectCard.vue +73 -0
  22. package/src/components/ui/auto-form/constant.ts +2 -1
  23. package/src/components/ui/table/BuiDataTable.vue +7 -1
  24. package/dist/BuiAutoFormField.vue_vue_type_script_setup_true_lang-xmzLQDzl.js +0 -294
@@ -1,23 +1,23 @@
1
- import { defineComponent as L, mergeModels as U, useModel as b, computed as y, watchEffect as F, openBlock as n, createElementBlock as s, 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";
1
+ import { defineComponent as L, mergeModels as U, useModel as y, computed as b, watchEffect as F, openBlock as n, createElementBlock as i, Fragment as g, renderSlot as S, unref as o, createCommentVNode as w, createVNode as d, withCtx as l, renderList as f, createBlock as m, createElementVNode as N, createTextVNode as v, toDisplayString as C } from "vue";
2
2
  import { _ as O } from "./BuiCollapsible.vue_vue_type_script_setup_true_lang-BfgRYJts.js";
3
3
  import { _ as T } from "./BuiCollapsibleTrigger.vue_vue_type_script_setup_true_lang-DJ8YMCCp.js";
4
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 R } from "./utils-DPuEjrVV.js";
7
- import { _ as N } from "./BuiTableRowSubrow.vue_vue_type_script_setup_true_lang-Ch5gemw2.js";
6
+ import { v as $ } from "./utils-DPuEjrVV.js";
7
+ import { _ as z } from "./BuiTableRowSubrow.vue_vue_type_script_setup_true_lang-Ch5gemw2.js";
8
8
  import { useVueTable as H, getCoreRowModel as K, getPaginationRowModel as Y, getSortedRowModel as q, FlexRender as A } from "@tanstack/vue-table";
9
9
  import { _ as J } from "./BuiTable.vue_vue_type_script_setup_true_lang-CUPSwE5z.js";
10
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";
11
+ import { _ as E } from "./BuiTableCell.vue_vue_type_script_setup_true_lang-BrTQJCiZ.js";
12
12
  import { _ as W } from "./BuiTableHead.vue_vue_type_script_setup_true_lang-CCXONmtG.js";
13
13
  import { _ as X } from "./BuiTableHeader.vue_vue_type_script_setup_true_lang-DZOqi3dp.js";
14
- import { _ as P } from "./BuiTableRow.vue_vue_type_script_setup_true_lang-CpEilJsW.js";
14
+ import { _ as R } from "./BuiTableRow.vue_vue_type_script_setup_true_lang-CpEilJsW.js";
15
15
  import { _ as Z } from "./BuiTableEmpty.vue_vue_type_script_setup_true_lang-BJDYHpRG.js";
16
16
  import { _ as ee } from "./BuiTableFooter.vue_vue_type_script_setup_true_lang-Cfxlxsbh.js";
17
17
  const te = {
18
18
  key: 0,
19
19
  class: "w-full py-4"
20
- }, oe = { class: "flex w-full items-center justify-between" }, ne = { class: "inline-block rounded-t bg-background px-4 py-3" }, E = "#UNDEFINED#", we = /* @__PURE__ */ L({
20
+ }, oe = { class: "flex w-full items-center justify-between" }, ne = { class: "inline-block rounded-t bg-background px-4 py-3" }, x = "#UNDEFINED#", we = /* @__PURE__ */ L({
21
21
  __name: "BuiDataTable",
22
22
  props: /* @__PURE__ */ U({
23
23
  columns: {},
@@ -43,7 +43,7 @@ const te = {
43
43
  }),
44
44
  emits: ["update:sorting", "update:pagination", "update:selection", "update:columnVisibility"],
45
45
  setup(c) {
46
- const t = c, $ = b(c, "sorting"), p = b(c, "pagination"), k = b(c, "selection"), D = b(c, "columnVisibility"), I = y(
46
+ const t = c, P = y(c, "sorting"), p = y(c, "pagination"), k = y(c, "selection"), D = y(c, "columnVisibility"), I = b(
47
47
  () => t.manualPagination ? t.totalItems : t.data.length
48
48
  ), u = H({
49
49
  initialState: { pagination: { pageSize: t.pageSize } },
@@ -57,13 +57,13 @@ const te = {
57
57
  getPaginationRowModel: Y(),
58
58
  getSortedRowModel: q(),
59
59
  onSortingChange: (e) => {
60
- R(e, $);
60
+ $(e, P);
61
61
  },
62
62
  onPaginationChange: (e) => {
63
- R(e, p);
63
+ $(e, p);
64
64
  },
65
65
  onRowSelectionChange: (e) => {
66
- R(e, k);
66
+ $(e, k);
67
67
  },
68
68
  autoResetPageIndex: !1,
69
69
  manualPagination: t.manualPagination,
@@ -71,7 +71,7 @@ const te = {
71
71
  manualSorting: t.manualSorting,
72
72
  state: {
73
73
  get sorting() {
74
- return $.value;
74
+ return P.value;
75
75
  },
76
76
  get pagination() {
77
77
  return p.value;
@@ -84,14 +84,14 @@ const te = {
84
84
  }
85
85
  },
86
86
  getRowId: t.getRowId
87
- }), B = y({
87
+ }), B = b({
88
88
  get() {
89
89
  return u.getState().pagination.pageSize;
90
90
  },
91
91
  set(e) {
92
92
  p.value && (p.value.pageSize = e, u.setPageSize(e), u.setPageIndex(0));
93
93
  }
94
- }), _ = y({
94
+ }), _ = b({
95
95
  get() {
96
96
  return u.getState().pagination.pageIndex + 1;
97
97
  },
@@ -103,33 +103,33 @@ const te = {
103
103
  const e = u.getPageCount();
104
104
  e && e < _.value && (_.value = e);
105
105
  });
106
- const M = y(() => t.groupBy ? u.getRowModel().rows.reduce((e, i) => {
107
- const l = i.getValue(t.groupBy) ?? E;
108
- return e[l] = e[l] || [], e[l].push(i), e;
106
+ const M = b(() => t.groupBy ? u.getRowModel().rows.reduce((e, s) => {
107
+ const a = s.getValue(t.groupBy) ?? x;
108
+ return e[a] = e[a] || [], e[a].push(s), e;
109
109
  }, /* @__PURE__ */ Object.create(null)) : null);
110
110
  function h(e) {
111
111
  return (t.groupBy && t.groupLabels ? t.groupLabels[t.groupBy] || [] : [])[e];
112
112
  }
113
- return (e, i) => (n(), s(d, null, [
114
- e.$slots.caption ? (n(), s("div", te, [
115
- w(e.$slots, "caption", { table: o(u) })
116
- ])) : S("", !0),
117
- g(o(J), null, {
118
- default: a(() => [
119
- g(o(X), null, {
120
- default: a(() => [
121
- (n(!0), s(d, null, f(o(u).getHeaderGroups(), (r) => (n(), m(o(P), {
113
+ return (e, s) => (n(), i(g, null, [
114
+ e.$slots.caption ? (n(), i("div", te, [
115
+ S(e.$slots, "caption", { table: o(u) })
116
+ ])) : w("", !0),
117
+ d(o(J), null, {
118
+ default: l(() => [
119
+ d(o(X), null, {
120
+ default: l(() => [
121
+ (n(!0), i(g, null, f(o(u).getHeaderGroups(), (r) => (n(), m(o(R), {
122
122
  key: r.id
123
123
  }, {
124
- default: a(() => [
125
- (n(!0), s(d, null, f(r.headers, (l) => (n(), m(o(W), {
126
- key: l.id
124
+ default: l(() => [
125
+ (n(!0), i(g, null, f(r.headers, (a) => (n(), m(o(W), {
126
+ key: a.id
127
127
  }, {
128
- default: a(() => [
129
- l.isPlaceholder ? S("", !0) : (n(), m(o(A), {
128
+ default: l(() => [
129
+ a.isPlaceholder ? w("", !0) : (n(), m(o(A), {
130
130
  key: 0,
131
- render: l.column.columnDef.header,
132
- props: l.getContext()
131
+ render: a.column.columnDef.header,
132
+ props: a.getContext()
133
133
  }, null, 8, ["render", "props"]))
134
134
  ]),
135
135
  _: 2
@@ -140,36 +140,42 @@ const te = {
140
140
  ]),
141
141
  _: 1
142
142
  }),
143
- g(o(Q), null, {
144
- default: a(() => [
145
- o(u).getRowModel().rows?.length ? (n(), s(d, { key: 0 }, [
146
- t.groupBy && M.value ? (n(!0), s(d, { key: 0 }, f(M.value, (r, l) => (n(), m(o(O), {
143
+ d(o(Q), null, {
144
+ default: l(() => [
145
+ o(u).getRowModel().rows?.length ? (n(), i(g, { key: 0 }, [
146
+ t.groupBy && M.value ? (n(!0), i(g, { key: 0 }, f(M.value, (r, a) => (n(), m(o(O), {
147
147
  asChild: "",
148
- key: l,
148
+ key: a,
149
149
  open: !0
150
150
  }, {
151
- default: a(() => [
152
- g(o(T), { asChild: "" }, {
153
- default: a(() => [
154
- g(o(P), { class: "bg-foreground/[0.04]" }, {
155
- default: a(() => [
156
- g(o(x), {
151
+ default: l(() => [
152
+ d(o(T), { asChild: "" }, {
153
+ default: l(() => [
154
+ d(o(R), { class: "bg-foreground/[0.04]" }, {
155
+ default: l(() => [
156
+ d(o(E), {
157
157
  colspan: e.columns.length,
158
158
  class: "!pb-0"
159
159
  }, {
160
- default: a(() => [
161
- z("div", oe, [
162
- z("div", ne, [
163
- l === E ? (n(), s(d, { key: 0 }, [
160
+ default: l(() => [
161
+ N("div", oe, [
162
+ N("div", ne, [
163
+ a === x ? (n(), i(g, { key: 0 }, [
164
164
  v(C(h(1)), 1)
165
- ], 64)) : (n(), s(d, { key: 1 }, [
166
- v(C(h(0)) + ": " + C(l), 1)
165
+ ], 64)) : (n(), i(g, { key: 1 }, [
166
+ v(C(h(0)) + ": ", 1),
167
+ e.$slots.groupName ? S(e.$slots, "groupName", {
168
+ key: 0,
169
+ group: a
170
+ }) : (n(), i(g, { key: 1 }, [
171
+ v(C(a), 1)
172
+ ], 64))
167
173
  ], 64))
168
174
  ]),
169
- e.$slots.groupByRow ? w(e.$slots, "groupByRow", {
175
+ e.$slots.groupByRow ? S(e.$slots, "groupByRow", {
170
176
  key: 0,
171
- group: l
172
- }) : S("", !0)
177
+ group: a
178
+ }) : w("", !0)
173
179
  ])
174
180
  ]),
175
181
  _: 2
@@ -180,9 +186,9 @@ const te = {
180
186
  ]),
181
187
  _: 2
182
188
  }, 1024),
183
- g(o(j), { asChild: "" }, {
184
- default: a(() => [
185
- (n(!0), s(d, null, f(r, (V) => (n(), m(N, {
189
+ d(o(j), { asChild: "" }, {
190
+ default: l(() => [
191
+ (n(!0), i(g, null, f(r, (V) => (n(), m(z, {
186
192
  key: V.id,
187
193
  columns: t.columns,
188
194
  row: V,
@@ -193,7 +199,7 @@ const te = {
193
199
  }, 1024)
194
200
  ]),
195
201
  _: 2
196
- }, 1024))), 128)) : (n(!0), s(d, { key: 1 }, f(o(u).getRowModel().rows, (r) => (n(), m(N, {
202
+ }, 1024))), 128)) : (n(!0), i(g, { key: 1 }, f(o(u).getRowModel().rows, (r) => (n(), m(z, {
197
203
  key: r.id,
198
204
  columns: t.columns,
199
205
  row: r,
@@ -203,9 +209,9 @@ const te = {
203
209
  key: 1,
204
210
  colspan: e.columns.length
205
211
  }, {
206
- default: a(() => [
207
- w(e.$slots, "nodata", {}, () => [
208
- i[2] || (i[2] = v("No data"))
212
+ default: l(() => [
213
+ S(e.$slots, "nodata", {}, () => [
214
+ s[2] || (s[2] = v("No data"))
209
215
  ])
210
216
  ]),
211
217
  _: 3
@@ -214,20 +220,20 @@ const te = {
214
220
  _: 3
215
221
  }),
216
222
  e.showPagination && I.value > 0 ? (n(), m(o(ee), { key: 0 }, {
217
- default: a(() => [
218
- g(o(P), null, {
219
- default: a(() => [
220
- g(o(x), {
223
+ default: l(() => [
224
+ d(o(R), null, {
225
+ default: l(() => [
226
+ d(o(E), {
221
227
  colspan: e.columns.length
222
228
  }, {
223
- default: a(() => [
224
- g(o(G), {
229
+ default: l(() => [
230
+ d(o(G), {
225
231
  class: "float-right",
226
232
  total: I.value,
227
233
  pageIndex: _.value,
228
- "onUpdate:pageIndex": i[0] || (i[0] = (r) => _.value = r),
234
+ "onUpdate:pageIndex": s[0] || (s[0] = (r) => _.value = r),
229
235
  pageSize: B.value,
230
- "onUpdate:pageSize": i[1] || (i[1] = (r) => B.value = r)
236
+ "onUpdate:pageSize": s[1] || (s[1] = (r) => B.value = r)
231
237
  }, null, 8, ["total", "pageIndex", "pageSize"])
232
238
  ]),
233
239
  _: 1
@@ -237,7 +243,7 @@ const te = {
237
243
  })
238
244
  ]),
239
245
  _: 1
240
- })) : S("", !0)
246
+ })) : w("", !0)
241
247
  ]),
242
248
  _: 3
243
249
  })