vlite3 0.3.4 → 0.3.6

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,4 +1,4 @@
1
- import { defineComponent as ee, ref as v, computed as w, watch as y, onMounted as te, openBlock as n, createElementBlock as i, createVNode as x, normalizeClass as S, createSlots as j, withCtx as R, renderSlot as I, createBlock as D, createCommentVNode as $, createElementVNode as r, Fragment as F, renderList as B, normalizeStyle as A, mergeProps as le, toDisplayString as M, createTextVNode as ae, unref as se } from "vue";
1
+ import { defineComponent as le, ref as b, computed as p, watch as h, openBlock as n, createElementBlock as i, createBlock as R, normalizeClass as S, createSlots as V, withCtx as B, renderSlot as x, createCommentVNode as k, createElementVNode as r, createVNode as F, Fragment as T, renderList as I, normalizeStyle as M, mergeProps as U, toDisplayString as O, createTextVNode as ae, unref as se } from "vue";
2
2
  import oe from "../Icon.vue.js";
3
3
  import ne from "../CheckBox.vue.js";
4
4
  import re from "../Button.vue.js";
@@ -6,20 +6,20 @@ import ie from "../ConfirmationModal.vue.js";
6
6
  import de from "../Pagination/Pagination.vue.js";
7
7
  import ce from "./DataTableHeader.vue.js";
8
8
  import ue from "./DataTableRow.vue.js";
9
- import me from "./DataTableToolbar.vue.js";
10
- const fe = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, ge = { class: "hover:bg-transparent" }, ve = {
9
+ import fe from "./DataTableToolbar.vue.js";
10
+ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, ve = { class: "hover:bg-transparent" }, ge = {
11
11
  key: 0,
12
12
  scope: "col",
13
13
  class: "w-[48px] px-0 text-center font-medium text-muted-foreground",
14
14
  style: { width: "48px" }
15
- }, ye = { class: "flex items-center justify-center" }, be = { class: "[&_tr:last-child]:border-0" }, pe = {
15
+ }, be = { class: "flex items-center justify-center" }, ye = { class: "[&_tr:last-child]:border-0" }, we = {
16
16
  key: 0,
17
17
  class: "w-[48px] px-0 py-4 align-middle text-center",
18
18
  style: { width: "48px" }
19
- }, we = { key: 2 }, ke = ["colspan"], Pe = { class: "flex flex-col items-center justify-center gap-2 text-muted-foreground p-8" }, Ce = { class: "flex h-12 w-12 items-center justify-center rounded-full bg-muted" }, xe = { class: "mt-1 text-base font-semibold text-foreground" }, Se = { class: "text-sm max-w-sm mx-auto" }, Ie = {
19
+ }, pe = { key: 2 }, ke = ["colspan"], Pe = { class: "flex flex-col items-center justify-center gap-2 text-muted-foreground p-8" }, Ce = { class: "flex h-12 w-12 items-center justify-center rounded-full bg-muted" }, Se = { class: "mt-1 text-base font-semibold text-foreground" }, xe = { class: "text-sm max-w-sm mx-auto" }, Ie = {
20
20
  key: 0,
21
21
  class: "mt-4"
22
- }, $e = { key: 0 }, je = /* @__PURE__ */ ee({
22
+ }, $e = { key: 1 }, Ae = /* @__PURE__ */ le({
23
23
  __name: "DataTable",
24
24
  props: {
25
25
  rows: { default: () => [] },
@@ -37,11 +37,14 @@ const fe = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, g
37
37
  emptyDescription: { default: "No results found. Try adjusting your filters or search terms." },
38
38
  emptyIcon: { default: "lucide:inbox" },
39
39
  showPagination: { type: Boolean, default: !0 },
40
- paginationPosition: {},
40
+ paginationProps: { default: () => ({
41
+ alignment: "between",
42
+ navType: "icon",
43
+ showItemsPerPage: !0,
44
+ itemsPerPageOptions: [10, 25, 50, 100],
45
+ showPageInfo: !1
46
+ }) },
41
47
  pageInfo: {},
42
- itemsPerPage: { default: 10 },
43
- itemsPerPageOptions: { default: () => [10, 25, 50, 100] },
44
- showItemsPerPage: { type: Boolean, default: !0 },
45
48
  striped: { type: Boolean, default: !1 },
46
49
  hoverable: { type: Boolean, default: !0 },
47
50
  bordered: { type: Boolean, default: !0 },
@@ -52,40 +55,47 @@ const fe = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, g
52
55
  variant: { default: "default" }
53
56
  },
54
57
  emits: ["change", "select", "rowClick", "update:itemsPerPage", "update:selectedRows", "delete"],
55
- setup(l, { emit: U }) {
56
- const O = (e, t) => {
58
+ setup(l, { emit: L }) {
59
+ const W = (e, t) => {
57
60
  if (!(!e || !t))
58
61
  return t.includes(".") ? t.split(".").reduce((s, u) => s?.[u], e) : e[t];
59
- }, c = (e, t) => O(e, t), a = l, b = U, d = v({ field: "", order: "" }), k = v(a.itemsPerPage), h = v(a.pageInfo?.currentPage || 1), p = v(a.search || ""), P = v(!1), g = v("initial"), L = w(() => a.loading && (g.value === "initial" || g.value === "page"));
60
- y(
62
+ }, c = (e, t) => W(e, t), a = l, y = L, d = b({ field: "", order: "" }), P = b(
63
+ a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10
64
+ ), v = b(a.pageInfo?.currentPage || 1), w = b(a.search || ""), C = b(!1), g = b("initial"), q = p(() => a.loading && (g.value === "initial" || g.value === "page"));
65
+ h(
61
66
  () => a.loading,
62
67
  (e, t) => {
63
68
  !e && t && (g.value = "idle");
64
69
  }
65
- ), y(
70
+ ), h(
66
71
  () => a.search,
67
72
  (e) => {
68
- e !== void 0 && e !== p.value && (p.value = e);
73
+ e !== void 0 && e !== w.value && (w.value = e);
69
74
  }
70
75
  );
71
76
  let z = null;
72
- y(p, (e) => {
77
+ h(w, (e) => {
73
78
  z && clearTimeout(z), z = setTimeout(() => {
74
- h.value = 1, g.value = "search", C();
79
+ v.value = 1, g.value = "search", $();
75
80
  }, 300);
76
- }), y(
77
- () => a.itemsPerPage,
81
+ }), h(
82
+ () => a.pageInfo?.itemsPerPage,
78
83
  (e) => {
79
- k.value = e;
84
+ e !== void 0 && (P.value = e);
80
85
  }
81
- ), y(
86
+ ), h(
87
+ () => a.paginationProps?.itemsPerPage,
88
+ (e) => {
89
+ e !== void 0 && (P.value = e);
90
+ }
91
+ ), h(
82
92
  () => a.pageInfo?.currentPage,
83
93
  (e) => {
84
- e && (h.value = e);
94
+ e && (v.value = e);
85
95
  }
86
96
  );
87
- const E = (e) => c(e, a.keyField), o = v(/* @__PURE__ */ new Set());
88
- y(
97
+ const N = (e) => c(e, a.keyField), o = b(/* @__PURE__ */ new Set());
98
+ h(
89
99
  () => a.selectedRows,
90
100
  (e) => {
91
101
  const t = new Set((e || []).map((s) => c(s, a.keyField)));
@@ -93,107 +103,110 @@ const fe = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, g
93
103
  },
94
104
  { immediate: !0, deep: !0 }
95
105
  );
96
- const T = w(() => a.rows.length === 0 ? !1 : a.rows.every((e) => o.value.has(c(e, a.keyField)))), N = w(() => o.value.size > 0 && !T.value), W = w(() => {
106
+ const D = p(() => a.rows.length === 0 ? !1 : a.rows.every((e) => o.value.has(c(e, a.keyField)))), j = p(() => o.value.size > 0 && !D.value), G = p(() => {
97
107
  const e = [...a.selectedRows || [], ...a.rows], t = /* @__PURE__ */ new Map();
98
108
  return e.forEach((s) => t.set(c(s, a.keyField), s)), Array.from(o.value).map((s) => t.get(s)).filter(Boolean);
99
- }), q = (e) => {
100
- e ? a.rows.forEach((t) => o.value.add(c(t, a.keyField))) : o.value.size > 0 && a.rows.forEach((t) => o.value.delete(c(t, a.keyField))), V();
101
- }, G = (e) => {
102
- o.value.has(e) ? o.value.delete(e) : o.value.add(e), V();
103
- }, V = () => {
109
+ }), H = (e) => {
110
+ e ? a.rows.forEach((t) => o.value.add(c(t, a.keyField))) : o.value.size > 0 && a.rows.forEach((t) => o.value.delete(c(t, a.keyField))), A();
111
+ }, J = (e) => {
112
+ o.value.has(e) ? o.value.delete(e) : o.value.add(e), A();
113
+ }, A = () => {
104
114
  const e = a.selectedRows || [], t = /* @__PURE__ */ new Set(), s = [];
105
- a.rows.forEach((m) => {
106
- const f = c(m, a.keyField);
107
- o.value.has(f) && (s.push(m), t.add(f));
108
- }), e.forEach((m) => {
109
- const f = c(m, a.keyField);
110
- !t.has(f) && o.value.has(f) && (s.push(m), t.add(f));
115
+ a.rows.forEach((f) => {
116
+ const m = c(f, a.keyField);
117
+ o.value.has(m) && (s.push(f), t.add(m));
118
+ }), e.forEach((f) => {
119
+ const m = c(f, a.keyField);
120
+ !t.has(m) && o.value.has(m) && (s.push(f), t.add(m));
111
121
  });
112
122
  const u = {
113
123
  selected: s,
114
- all: T.value,
115
- indeterminate: N.value
124
+ all: D.value,
125
+ indeterminate: j.value
116
126
  };
117
- b("select", u), b("update:selectedRows", s);
118
- }, H = (e) => {
119
- d.value.field === e ? d.value.order === "asc" ? d.value.order = "desc" : d.value.order === "desc" ? (d.value.order = "", d.value.field = "") : d.value.order = "asc" : (d.value.field = e, d.value.order = "asc"), h.value = 1, g.value = "sort", C();
120
- }, J = (e) => {
121
- h.value = e, g.value = "page", C();
127
+ y("select", u), y("update:selectedRows", s);
122
128
  }, K = (e) => {
123
- k.value = e, h.value = 1, g.value = "limit", b("update:itemsPerPage", e), C();
129
+ d.value.field === e ? d.value.order === "asc" ? d.value.order = "desc" : d.value.order === "desc" ? (d.value.order = "", d.value.field = "") : d.value.order = "asc" : (d.value.field = e, d.value.order = "asc"), v.value = 1, g.value = "sort", $();
124
130
  }, Q = (e) => {
125
- b("rowClick", e);
126
- }, X = () => {
127
- const e = W.value;
128
- b("delete", e), P.value = !1;
129
- }, C = () => {
130
- b("change", {
131
- pagination: {
132
- page: h.value,
133
- limit: k.value
134
- },
135
- sorting: { ...d.value },
136
- search: p.value
137
- });
138
- }, Y = w(() => [
131
+ v.value = e, g.value = "page", $();
132
+ }, X = (e) => {
133
+ P.value = e, v.value = 1, g.value = "limit", y("update:itemsPerPage", e), $();
134
+ }, Y = (e) => {
135
+ y("rowClick", e);
136
+ }, Z = () => {
137
+ const e = G.value;
138
+ y("delete", e), C.value = !1;
139
+ };
140
+ let E = null;
141
+ const $ = () => {
142
+ E && clearTimeout(E), E = setTimeout(() => {
143
+ y("change", {
144
+ pagination: {
145
+ page: v.value,
146
+ limit: P.value
147
+ },
148
+ sorting: { ...d.value },
149
+ search: w.value
150
+ });
151
+ }, 10);
152
+ }, _ = p(() => [
139
153
  "w-full flex flex-col",
140
154
  a.variant === "raised" ? "bg-background shadow-sm p-2 rounded-lg" : "bg-background rounded",
141
155
  "overflow-hidden",
142
156
  a.bordered ? "border border-border" : "",
143
157
  a.class
144
- ].join(" ")), Z = w(() => ["w-full caption-bottom -text-fs-1", a.tableClass].join(" ")), _ = (e) => e.width ? e.width : "auto";
145
- return y(
158
+ ].join(" ")), ee = p(() => ["w-full caption-bottom -text-fs-1", a.tableClass].join(" ")), te = (e) => e.width ? e.width : "auto";
159
+ return h(
146
160
  () => a.rows,
147
161
  () => {
148
162
  const e = new Set(a.rows.map((t) => c(t, a.keyField)));
149
163
  o.value = new Set([...o.value].filter((t) => e.has(t)));
150
164
  }
151
- ), te(() => {
152
- C();
153
- }), (e, t) => (n(), i("div", fe, [
154
- x(me, {
155
- modelValue: p.value,
156
- "onUpdate:modelValue": t[1] || (t[1] = (s) => p.value = s),
165
+ ), (e, t) => (n(), i("div", me, [
166
+ l.showSearch || e.$slots?.["toolbar-left"] || e.$slots?.["toolbar-right"] ? (n(), R(fe, {
167
+ key: 0,
168
+ modelValue: w.value,
169
+ "onUpdate:modelValue": t[1] || (t[1] = (s) => w.value = s),
157
170
  "show-search": l.showSearch,
158
171
  placeholder: l.searchPlaceholder,
159
172
  class: S(l.toolbarClass),
160
173
  "search-class": l.toolbarSearchClass
161
- }, j({ _: 2 }, [
174
+ }, V({ _: 2 }, [
162
175
  e.$slots?.["toolbar-left"] ? {
163
176
  name: "left",
164
- fn: R(() => [
165
- I(e.$slots, "toolbar-left")
177
+ fn: B(() => [
178
+ x(e.$slots, "toolbar-left")
166
179
  ]),
167
180
  key: "0"
168
181
  } : void 0,
169
182
  o.value.size > 0 ? {
170
183
  name: "delete",
171
- fn: R(() => [
172
- o.value.size > 0 ? (n(), D(re, {
184
+ fn: B(() => [
185
+ o.value.size > 0 ? (n(), R(re, {
173
186
  key: 0,
174
187
  rounded: "full",
175
188
  variant: "outline",
176
189
  size: "lg",
177
190
  icon: "lucide:trash-2",
178
- onClick: t[0] || (t[0] = (s) => P.value = !0)
179
- })) : $("", !0)
191
+ onClick: t[0] || (t[0] = (s) => C.value = !0)
192
+ })) : k("", !0)
180
193
  ]),
181
194
  key: "1"
182
195
  } : void 0,
183
196
  e.$slots?.["toolbar-right"] ? {
184
197
  name: "right",
185
- fn: R(() => [
186
- I(e.$slots, "toolbar-right")
198
+ fn: B(() => [
199
+ x(e.$slots, "toolbar-right")
187
200
  ]),
188
201
  key: "2"
189
202
  } : void 0
190
- ]), 1032, ["modelValue", "show-search", "placeholder", "class", "search-class"]),
203
+ ]), 1032, ["modelValue", "show-search", "placeholder", "class", "search-class"])) : k("", !0),
191
204
  r("div", {
192
- class: S(Y.value)
205
+ class: S(_.value)
193
206
  }, [
194
207
  r("div", he, [
195
208
  r("table", {
196
- class: S([Z.value, "data-table"])
209
+ class: S([ee.value, "data-table"])
197
210
  }, [
198
211
  r("thead", {
199
212
  class: S([
@@ -201,94 +214,94 @@ const fe = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, g
201
214
  l.variant === "raised" ? "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg" : ""
202
215
  ])
203
216
  }, [
204
- r("tr", ge, [
205
- l.selectable ? (n(), i("th", ve, [
206
- r("div", ye, [
207
- x(ne, {
208
- "model-value": T.value,
209
- indeterminate: N.value,
217
+ r("tr", ve, [
218
+ l.selectable ? (n(), i("th", ge, [
219
+ r("div", be, [
220
+ F(ne, {
221
+ "model-value": D.value,
222
+ indeterminate: j.value,
210
223
  size: "xs",
211
- "onUpdate:modelValue": q
224
+ "onUpdate:modelValue": H
212
225
  }, null, 8, ["model-value", "indeterminate"])
213
226
  ])
214
- ])) : $("", !0),
215
- (n(!0), i(F, null, B(l.headers, (s) => (n(), D(ce, {
227
+ ])) : k("", !0),
228
+ (n(!0), i(T, null, I(l.headers, (s) => (n(), R(ce, {
216
229
  key: s.field,
217
230
  header: s,
218
231
  "sort-config": d.value,
219
232
  compact: l.compact,
220
233
  "table-sortable": l.sortable,
221
- onSort: H,
234
+ onSort: K,
222
235
  class: "last:pr-5!",
223
- style: A({
224
- width: _(s)
236
+ style: M({
237
+ width: te(s)
225
238
  })
226
239
  }, null, 8, ["header", "sort-config", "compact", "table-sortable", "style"]))), 128))
227
240
  ])
228
241
  ], 2),
229
- r("tbody", be, [
230
- L.value ? (n(!0), i(F, { key: 0 }, B(Math.min(k.value, 15), (s) => (n(), i("tr", {
242
+ r("tbody", ye, [
243
+ q.value ? (n(!0), i(T, { key: 0 }, I(Math.min(P.value, 15), (s) => (n(), i("tr", {
231
244
  key: "skeleton-" + s,
232
245
  class: "border-b border-border/70 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
233
246
  }, [
234
- l.selectable ? (n(), i("td", pe, [...t[4] || (t[4] = [
247
+ l.selectable ? (n(), i("td", we, [...t[4] || (t[4] = [
235
248
  r("div", { class: "flex items-center justify-center" }, [
236
249
  r("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
237
250
  ], -1)
238
- ])])) : $("", !0),
239
- (n(!0), i(F, null, B(l.headers, (u) => (n(), i("td", {
251
+ ])])) : k("", !0),
252
+ (n(!0), i(T, null, I(l.headers, (u) => (n(), i("td", {
240
253
  key: u.field,
241
254
  class: S(["p-5! align-middle last:pr-6!", [u.hideOnMobile ? "hidden md:table-cell" : ""]])
242
255
  }, [
243
256
  r("div", {
244
257
  class: "rounded-md bg-muted/50 animate-pulse h-4 w-full",
245
- style: A({
258
+ style: M({
246
259
  width: `${50 + Math.random() * 40}%`
247
260
  })
248
261
  }, null, 4)
249
262
  ], 2))), 128))
250
- ]))), 128)) : l.rows.length > 0 ? (n(!0), i(F, { key: 1 }, B(l.rows, (s, u) => (n(), D(ue, {
251
- key: E(s),
263
+ ]))), 128)) : l.rows.length > 0 ? (n(!0), i(T, { key: 1 }, I(l.rows, (s, u) => (n(), R(ue, {
264
+ key: N(s),
252
265
  row: s,
253
266
  headers: l.headers,
254
267
  index: u,
255
268
  "key-field": l.keyField,
256
269
  selectable: l.selectable,
257
- "is-selected": o.value.has(E(s)),
270
+ "is-selected": o.value.has(N(s)),
258
271
  hoverable: l.hoverable,
259
272
  striped: l.striped,
260
273
  compact: l.compact,
261
- onSelect: G,
262
- onRowClick: Q,
274
+ onSelect: J,
275
+ onRowClick: Y,
263
276
  class: "[&_td:last-child]:pr-3.5!"
264
- }, j({ _: 2 }, [
265
- B(l.headers, (m) => ({
266
- name: m.field,
267
- fn: R((f) => [
268
- I(e.$slots, m.field, le({ ref_for: !0 }, f))
277
+ }, V({ _: 2 }, [
278
+ I(l.headers, (f) => ({
279
+ name: f.field,
280
+ fn: B((m) => [
281
+ x(e.$slots, f.field, U({ ref_for: !0 }, m))
269
282
  ])
270
283
  }))
271
- ]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]))), 128)) : (n(), i("tr", we, [
284
+ ]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]))), 128)) : (n(), i("tr", pe, [
272
285
  r("td", {
273
286
  colspan: l.selectable ? l.headers.length + 1 : l.headers.length,
274
287
  class: "h-96 text-center align-middle hover:bg-transparent"
275
288
  }, [
276
289
  r("div", Pe, [
277
290
  r("div", Ce, [
278
- x(oe, {
291
+ F(oe, {
279
292
  icon: l.emptyIcon,
280
293
  class: "h-6 w-6 text-muted-foreground/80"
281
294
  }, null, 8, ["icon"])
282
295
  ]),
283
- r("h3", xe, M(l.emptyTitle), 1),
284
- r("p", Se, [
285
- I(e.$slots, "empty-description", {}, () => [
286
- ae(M(l.emptyDescription), 1)
296
+ r("h3", Se, O(l.emptyTitle), 1),
297
+ r("p", xe, [
298
+ x(e.$slots, "empty-description", {}, () => [
299
+ ae(O(l.emptyDescription), 1)
287
300
  ])
288
301
  ]),
289
302
  e.$slots["empty-action"] ? (n(), i("div", Ie, [
290
- I(e.$slots, "empty-action")
291
- ])) : $("", !0)
303
+ x(e.$slots, "empty-action")
304
+ ])) : k("", !0)
292
305
  ])
293
306
  ], 8, ke)
294
307
  ]))
@@ -297,33 +310,29 @@ const fe = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, g
297
310
  ])
298
311
  ], 2),
299
312
  l.showPagination && l.pageInfo && l.pageInfo.totalPages > 1 ? (n(), i("div", $e, [
300
- x(se(de), {
301
- "current-page": h.value,
313
+ F(se(de), U({
314
+ "current-page": v.value,
302
315
  "total-pages": l.pageInfo.totalPages,
303
- "show-page-info": !1,
304
- "show-items-per-page": l.showItemsPerPage,
305
- "items-per-page": k.value,
306
- "items-per-page-options": l.itemsPerPageOptions,
307
- "nav-type": "icon",
308
- alignment: a.paginationPosition,
309
- onChange: J,
310
- "onUpdate:itemsPerPage": K
311
- }, null, 8, ["current-page", "total-pages", "show-items-per-page", "items-per-page", "items-per-page-options", "alignment"])
312
- ])) : $("", !0),
313
- x(ie, {
314
- show: P.value,
315
- "onUpdate:show": t[2] || (t[2] = (s) => P.value = s),
316
+ "total-items": l.pageInfo.totalItems
317
+ }, l.paginationProps, {
318
+ onChange: Q,
319
+ "onUpdate:itemsPerPage": X
320
+ }), null, 16, ["current-page", "total-pages", "total-items"])
321
+ ])) : k("", !0),
322
+ F(ie, {
323
+ show: C.value,
324
+ "onUpdate:show": t[2] || (t[2] = (s) => C.value = s),
316
325
  title: "Confirm Deletion",
317
326
  description: "Are you sure you want to delete the selected items?",
318
327
  "confirm-text": "Delete",
319
328
  "cancel-text": "Cancel",
320
329
  variant: "danger",
321
- onConfirm: X,
322
- onCancel: t[3] || (t[3] = (s) => P.value = !1)
330
+ onConfirm: Z,
331
+ onCancel: t[3] || (t[3] = (s) => C.value = !1)
323
332
  }, null, 8, ["show"])
324
333
  ]));
325
334
  }
326
335
  });
327
336
  export {
328
- je as default
337
+ Ae as default
329
338
  };
@@ -1,3 +1,5 @@
1
+ import { PageInfo, PaginationProps } from '../Pagination';
2
+ export type DataTablePaginationProps = Omit<PaginationProps, 'currentPage' | 'totalPages'>;
1
3
  export interface PaginationConfig {
2
4
  page: number;
3
5
  limit: number;
@@ -34,12 +36,6 @@ export interface TableHeader {
34
36
  addStatusColor?: boolean;
35
37
  type?: 'text' | 'price' | 'date' | 'number';
36
38
  }
37
- export interface PageInfo {
38
- currentPage: number;
39
- totalPages: number;
40
- totalItems: number;
41
- itemsPerPage?: number;
42
- }
43
39
  export interface DataTableProps {
44
40
  rows: any[];
45
41
  selectedRows?: any[];
@@ -56,11 +52,8 @@ export interface DataTableProps {
56
52
  emptyDescription?: string;
57
53
  emptyIcon?: string;
58
54
  showPagination?: boolean;
59
- paginationPosition?: 'start' | 'center' | 'end' | 'between';
55
+ paginationProps?: DataTablePaginationProps;
60
56
  pageInfo?: PageInfo;
61
- itemsPerPage?: number;
62
- itemsPerPageOptions?: number[];
63
- showItemsPerPage?: boolean;
64
57
  striped?: boolean;
65
58
  hoverable?: boolean;
66
59
  bordered?: boolean;
@@ -117,9 +117,6 @@ export interface IForm {
117
117
  maxFileSize?: number;
118
118
  /** Maximum number of files allowed when multiple is true */
119
119
  maxFiles?: number;
120
- /** i18n keys */
121
- labelI8n?: string;
122
- placeholderI8n?: string;
123
120
  }
124
121
  /**
125
122
  * Timeline step for multi-step forms
@@ -1,22 +1,10 @@
1
- interface Props {
2
- currentPage?: number;
3
- totalPages: number;
4
- siblingCount?: number;
5
- disabled?: boolean;
6
- showEdges?: boolean;
7
- showPageInfo?: boolean;
8
- showItemsPerPage?: boolean;
9
- itemsPerPage?: number;
10
- itemsPerPageOptions?: number[];
11
- navType?: 'text' | 'icon';
12
- alignment?: 'start' | 'center' | 'end' | 'between';
13
- }
14
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
1
+ import { PaginationProps } from '.';
2
+ declare const _default: import('vue').DefineComponent<PaginationProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
15
3
  change: (value: number) => any;
16
4
  "update:currentPage": (value: number) => any;
17
5
  "update:itemsPerPage": (value: number) => any;
18
6
  "change:itemsPerPage": (value: number) => any;
19
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
7
+ }, string, import('vue').PublicProps, Readonly<PaginationProps> & Readonly<{
20
8
  onChange?: (value: number) => any;
21
9
  "onUpdate:currentPage"?: (value: number) => any;
22
10
  "onUpdate:itemsPerPage"?: (value: number) => any;
@@ -24,7 +12,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
24
12
  }>, {
25
13
  disabled: boolean;
26
14
  currentPage: number;
27
- siblingCount: number;
15
+ totalItems: number;
28
16
  showEdges: boolean;
29
17
  showPageInfo: boolean;
30
18
  showItemsPerPage: boolean;