vuetable-next 1.1.0 → 1.2.0

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.
Files changed (45) hide show
  1. package/README.md +311 -270
  2. package/dist/chunks/vue2/createVuetable-GewoatYE.cjs +11 -0
  3. package/dist/chunks/vue2/createVuetable-zwzXUm5x.js +1511 -0
  4. package/dist/chunks/vue3/createVuetable-CE_PTu-W.cjs +5 -0
  5. package/dist/chunks/vue3/createVuetable-wZayTXed.js +1733 -0
  6. package/dist/portable/components/useVuetablePagination.d.ts +1 -0
  7. package/dist/portable/components/useVuetablePaginationInfo.d.ts +1 -0
  8. package/dist/public.d.ts +14 -1
  9. package/dist/structure.css +30 -0
  10. package/dist/style.css +77 -2
  11. package/dist/table.d.ts +13 -0
  12. package/dist/themes/semantic.css +47 -0
  13. package/dist/themes/tailwind.cjs +55 -0
  14. package/dist/themes/tailwind.js +35 -0
  15. package/dist/types/components/Vuetable.vue.d.ts +20 -53
  16. package/dist/types/components/VuetableContext.d.ts +1 -0
  17. package/dist/types/components/VuetableDetailHost.vue.d.ts +1 -1
  18. package/dist/types/components/VuetablePagination.vue.d.ts +13 -16
  19. package/dist/types/components/VuetablePaginationDropdown.vue.d.ts +13 -16
  20. package/dist/types/components/VuetablePaginationInfo.vue.d.ts +13 -1
  21. package/dist/types/components/VuetablePaginationInfoMixin.vue.d.ts +10 -0
  22. package/dist/types/components/VuetablePaginationMixin.vue.d.ts +10 -0
  23. package/dist/types/components/fetchAxios.d.ts +2 -0
  24. package/dist/types/components/resolveVuetableCss.d.ts +2 -0
  25. package/dist/types/components/useVuetableConfig.d.ts +15 -0
  26. package/dist/types/components/useVuetableFixedColumns.d.ts +1 -0
  27. package/dist/types/components/useVuetablePagination.d.ts +1 -0
  28. package/dist/types/components/useVuetablePaginationInfo.d.ts +1 -0
  29. package/dist/types/index.d.ts +3 -2
  30. package/dist/types/table.d.ts +10 -0
  31. package/dist/types/themes/tailwind.d.ts +35 -0
  32. package/dist/vue2-table.cjs +1 -0
  33. package/dist/vue2-table.js +21 -0
  34. package/dist/vue2.cjs +15 -22
  35. package/dist/vue2.js +381 -1737
  36. package/dist/vue3-table.cjs +1 -0
  37. package/dist/vue3-table.js +21 -0
  38. package/dist/vue3.cjs +1 -6
  39. package/dist/vue3.js +454 -1995
  40. package/package.json +23 -4
  41. package/style.css +77 -2
  42. package/dist/vue2.cjs.map +0 -1
  43. package/dist/vue2.js.map +0 -1
  44. package/dist/vue3.cjs.map +0 -1
  45. package/dist/vue3.js.map +0 -1
package/dist/vue2.js CHANGED
@@ -1,1547 +1,229 @@
1
- var sa = Object.defineProperty, ia = Object.defineProperties;
2
- var ua = Object.getOwnPropertyDescriptors;
3
- var sn = Object.getOwnPropertySymbols;
4
- var ca = Object.prototype.hasOwnProperty, da = Object.prototype.propertyIsEnumerable;
5
- var un = (e, a, t) => a in e ? sa(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, z = (e, a) => {
6
- for (var t in a || (a = {}))
7
- ca.call(a, t) && un(e, t, a[t]);
8
- if (sn)
9
- for (var t of sn(a))
10
- da.call(a, t) && un(e, t, a[t]);
1
+ var J = Object.defineProperty, K = Object.defineProperties;
2
+ var Q = Object.getOwnPropertyDescriptors;
3
+ var U = Object.getOwnPropertySymbols;
4
+ var W = Object.prototype.hasOwnProperty, X = Object.prototype.propertyIsEnumerable;
5
+ var q = (e, n, t) => n in e ? J(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, N = (e, n) => {
6
+ for (var t in n || (n = {}))
7
+ W.call(n, t) && q(e, t, n[t]);
8
+ if (U)
9
+ for (var t of U(n))
10
+ X.call(n, t) && q(e, t, n[t]);
11
11
  return e;
12
- }, ye = (e, a) => ia(e, ua(a));
13
- import * as mt from "vue-demi";
14
- import { defineComponent as N, inject as se, ref as E, computed as y, isVue2 as A, h as fa, markRaw as Dn, toRaw as bt, watch as G, shallowRef as Re, onMounted as yt, onUpdated as Hn, onBeforeUnmount as gt, getCurrentInstance as va, onBeforeUpdate as cn, onBeforeMount as ba, nextTick as Ce, reactive as Ct, toRefs as ga, provide as pa, set as ha, isReadonly as ma, triggerRef as ya, unref as Ca, isRef as In } from "vue-demi";
15
- import dn from "axios";
16
- import Pa from "mitt";
17
- const qe = N({
18
- name: "vuetable-field-checkbox",
19
- inheritAttrs: !1,
20
- props: {
21
- rowData: { type: Object, required: !1 },
22
- rowIndex: { type: Number, required: !1 },
23
- rowField: { type: Object, required: !1, default: null },
24
- isHeader: { type: Boolean, required: !1, default: !1 },
25
- title: { type: String, required: !1 }
26
- },
27
- setup(e) {
28
- const a = se("vuetable"), t = E(null), r = y(() => (a.tableData || []).filter((u) => a.isSelectedRow(u[a.trackBy])).length), s = y(() => {
29
- var u;
30
- return r.value > 0 && r.value < (((u = a.tableData) == null ? void 0 : u.length) || 0);
31
- });
32
- function l(u, p) {
33
- var i;
34
- u && a.onCheckboxToggled(p.target.checked, (i = e.rowField) == null ? void 0 : i.name, u);
35
- }
36
- function d(u) {
37
- a.onCheckboxToggledAll(u.target.checked);
38
- }
39
- function v(u) {
40
- return !!u && a.isSelectedRow(u[a.trackBy]);
41
- }
42
- function c() {
43
- return r.value > 0;
44
- }
45
- return { vuetable: a, checkbox: t, isIndeterminate: s, toggleCheckbox: l, toggleAllCheckbox: d, isSelected: v, isAllItemsInCurrentPageSelected: c };
46
- }
47
- });
48
- var _a = function() {
49
- var e = this, a = e.$createElement, t = e._self._c || a;
50
- return e.isHeader ? t("th", e._b({ staticClass: "vuetable-th-component-checkbox" }, "th", e.$attrs, !1), [t("input", { ref: "checkbox", attrs: { type: "checkbox" }, domProps: { indeterminate: e.isIndeterminate, checked: e.isAllItemsInCurrentPageSelected() }, on: { change: function(r) {
51
- return e.toggleAllCheckbox(r);
52
- } } })]) : t("td", e._b({ staticClass: "vuetable-td-component-checkbox" }, "td", e.$attrs, !1), [t("input", { ref: "checkbox", attrs: { type: "checkbox" }, domProps: { checked: e.isSelected(e.rowData) }, on: { change: function(r) {
53
- return e.toggleCheckbox(e.rowData, r);
54
- } } })]);
55
- }, wa = [];
56
- qe.render = _a;
57
- qe.staticRenderFns = wa;
58
- const Ee = N({
59
- name: "vuetable-field-handle",
60
- inheritAttrs: !1,
61
- props: {
62
- isHeader: { type: Boolean, required: !1, default: !1 },
63
- title: { type: String, required: !1, default: "" }
64
- },
65
- setup() {
66
- const e = se("vuetable");
67
- function a(t, r = "") {
68
- return typeof e.css.renderIcon == "undefined" ? `<i class="${t.join(" ")}" ${r}></i>` : e.css.renderIcon(t, r);
69
- }
70
- return { vuetable: e, renderIconTag: a };
71
- }
72
- });
73
- var xa = function() {
74
- var e = this, a = e.$createElement, t = e._self._c || a;
75
- return e.isHeader ? t("th", e._b({ staticClass: "vuetable-th-component-handle", domProps: { innerHTML: e._s(e.title) } }, "th", e.$attrs, !1)) : t("td", e._b({ staticClass: "vuetable-td-component-handle", domProps: { innerHTML: e._s(e.renderIconTag(["handle-icon", e.vuetable.css.handleIcon])) } }, "td", e.$attrs, !1));
76
- }, Sa = [];
77
- Ee.render = xa;
78
- Ee.staticRenderFns = Sa;
79
- const je = N({
80
- name: "vuetable-field-sequence",
81
- inheritAttrs: !1,
82
- props: {
83
- rowIndex: { type: Number, required: !1, default: 0 },
84
- isHeader: { type: Boolean, required: !1, default: !1 },
85
- title: { type: String, required: !1, default: "" }
86
- },
87
- setup(e) {
88
- const a = se("vuetable");
89
- function t() {
90
- return a.tablePagination ? a.tablePagination.from + e.rowIndex : 1 + e.rowIndex;
91
- }
92
- return { vuetable: a, renderSequence: t };
93
- }
94
- });
95
- var ka = function() {
96
- var e = this, a = e.$createElement, t = e._self._c || a;
97
- return e.isHeader ? t("th", e._b({ staticClass: "vuetable-th-component-sequence", domProps: { innerHTML: e._s(e.title) } }, "th", e.$attrs, !1)) : t("td", e._b({ staticClass: "vuetable-td-component-sequence", domProps: { innerHTML: e._s(e.renderSequence()) } }, "td", e.$attrs, !1));
98
- }, Oa = [];
99
- je.render = ka;
100
- je.staticRenderFns = Oa;
101
- const be = N({
102
- name: "vuetable-th-gutter",
103
- setup() {
104
- const e = se("vuetable"), a = y(() => e.hasFixedRightColumn && e.tableLayout.isFixedHeader);
105
- return { vuetable: e, pinned: a };
106
- }
107
- });
108
- var $a = function() {
109
- var e = this, a = e.$createElement, t = e._self._c || a;
110
- return t("th", { staticClass: "vuetable-th-gutter", class: { "vuetable-fixed-column": e.pinned, "vuetable-fixed-header": e.pinned }, style: { width: e.vuetable.scrollBarWidth, position: e.pinned ? "sticky" : void 0, right: e.pinned ? "0px" : void 0 } });
111
- }, Fa = [];
112
- be.render = $a;
113
- be.staticRenderFns = Fa;
114
- be._scopeId = "data-v-05d64983";
115
- const Pt = (e, { slots: a }) => {
116
- var r, s;
117
- const t = (r = a.default) == null ? void 0 : r.call(a)[0];
118
- return (s = e.onRendered) == null || s.call(e), t;
119
- };
120
- Pt.props = ["revision", "onRendered"];
121
- Pt.inheritAttrs = !1;
122
- const _t = (e, { slots: a }) => mt.renderSlot({ default: e.content }, "default", e.scope, a.default);
123
- _t.props = ["content", "scope"];
124
- _t.inheritAttrs = !1;
125
- const Ra = mt.isVue2 ? {
126
- functional: !0,
127
- props: ["revision", "onRendered"],
128
- render: (e, a) => {
129
- var r, s, l, d, v;
130
- const t = (l = (s = (r = a.scopedSlots).default) == null ? void 0 : s.call(r)[0]) != null ? l : a.children[0];
131
- return (v = (d = a.props).onRendered) == null || v.call(d), t;
132
- }
133
- } : Pt, An = mt.isVue2 ? {
134
- functional: !0,
135
- props: ["content", "scope"],
136
- render: (e, a) => {
137
- var t, r, s, l, d;
138
- return (d = (r = (t = a.props).content) == null ? void 0 : r.call(t, a.props.scope)) != null ? d : (l = (s = a.scopedSlots).default) == null ? void 0 : l.call(s);
139
- }
140
- } : _t, Ne = N({
141
- name: "vuetable-row-header",
142
- components: {
143
- SlotOutlet: An,
144
- "vuetable-field-checkbox": qe,
145
- "vuetable-field-handle": Ee,
146
- "vuetable-field-sequence": je,
147
- VuetableColGutter: be
148
- },
149
- props: {
150
- vuetable: { type: Object, default: null }
151
- },
152
- setup() {
153
- const e = se("vuetable");
154
- function a(f) {
155
- return e.columnRevision, e.getColumnSlot(f.name, !0);
156
- }
157
- function t(f) {
158
- return f.replace(e.fieldPrefix, "");
159
- }
160
- function r(f, g) {
161
- return [
162
- `${f}-${s(g.name)}`,
163
- g.titleClass || "",
164
- e.groupClass(g),
165
- e.getCellProps(g, "header").class,
166
- l(g),
167
- { sortable: e.isSortable(g) }
168
- ];
169
- }
170
- function s(f) {
171
- return typeof f == "string" && f.replace(/([A-Z])/g, (g) => "_" + g.toLowerCase()).replace(" ", "_").replace(".", "_");
172
- }
173
- function l(f) {
174
- const g = u(f);
175
- return g !== !1 ? e.sortOrder[g].direction == "asc" ? e.css.ascendingClass : e.css.descendingClass : "";
176
- }
177
- function d(f) {
178
- const g = u(f);
179
- return g === !1 ? e.css.sortableIcon : e.sortOrder[g].direction == "asc" ? e.css.ascendingIcon : e.css.descendingIcon;
180
- }
181
- function v(f) {
182
- return u(f) !== !1;
183
- }
184
- function c(f) {
185
- return e.isSortable(f) && e.css.sortableIcon != "";
186
- }
187
- function u(f) {
188
- if (!e.isSortable(f))
189
- return !1;
190
- for (let g = 0; g < e.sortOrder.length; g++)
191
- if (p(f, g))
192
- return g;
193
- return !1;
194
- }
195
- function p(f, g) {
196
- return e.sortOrder[g].field === f.name && e.sortOrder[g].sortField === f.sortField;
197
- }
198
- function i(f, g = !1) {
199
- const _ = g ? "" : m(f);
200
- if ((g || _.length > 0) && v(f) || c(f)) {
201
- const O = `opacity:${w(f)};position:relative;float:right`, k = e.showSortIcons ? x(["sort-icon", d(f)], `style="${O}"`) : "";
202
- return _ + " " + k;
203
- }
204
- return _;
205
- }
206
- function m(f) {
207
- return typeof f.title == "function" ? f.title() : typeof f.title == "undefined" ? f.name.toString().replace(".", " ") : f.title;
208
- }
209
- function w(f) {
210
- let O = 0.3;
211
- const k = e.sortOrder.length, D = u(f);
212
- return 1 - k * O < 0.3 && (O = (1 - 0.3) / (k - 1)), 1 - (D === !1 ? 0 : D) * O;
213
- }
214
- function x(f, g = "") {
215
- return typeof e.css.renderIcon == "undefined" ? `<i class="${f.join(" ")}" ${g}></i>` : e.css.renderIcon(f, g);
216
- }
217
- function S(f, g) {
218
- e.orderBy(f, g);
219
- }
220
- return { headerTable: e, getHeaderSlot: a, stripPrefix: t, headerClass: r, toSnakeCase: s, sortClass: l, sortIcon: d, isInCurrentSortGroup: v, hasSortableIcon: c, currentSortOrderPosition: u, fieldIsInSortOrderPosition: p, renderTitle: i, getTitle: m, sortIconOpacity: w, renderIconTag: x, onColumnHeaderClicked: S, VuetableColGutter: be };
221
- }
222
- });
223
- var Ta = function() {
224
- var e = this, a = e.$createElement, t = e._self._c || a;
225
- return t("tr", [e._l(e.headerTable.tableFields, function(r, s) {
226
- return [r.visible ? [e.headerTable.isFieldComponent(r.name) ? [t(r.name, { key: e.headerTable.getColumnKey(r) + ":0.0.0:" + e.headerTable.getColumnKey(r), tag: "component", class: e.headerClass("vuetable-th-component", r), style: [{ width: r.width }, e.headerTable.getCellProps(r, "header").style], attrs: { "is-header": "", vuetable: e.headerTable, "row-field": r, title: e.renderTitle(r), "data-vuetable-column": e.headerTable.getCellProps(r, "header")["data-vuetable-column"] }, on: { "vuetable:header-event": e.headerTable.onHeaderEvent, click: function(l) {
227
- return e.onColumnHeaderClicked(r, l);
228
- } } })] : e.headerTable.isFieldSlot(r.name) ? [t("th", { key: e.headerTable.getColumnKey(r) + ":0.0.0.0:" + e.headerTable.getColumnKey(r), class: e.headerClass("vuetable-th-slot", r), style: [{ width: r.width }, e.headerTable.getCellProps(r, "header").style], attrs: { "data-vuetable-column": e.headerTable.getCellProps(r, "header")["data-vuetable-column"] }, domProps: { innerHTML: e._s(e.renderTitle(r)) }, on: { click: function(l) {
229
- return e.onColumnHeaderClicked(r, l);
230
- } } })] : e.getHeaderSlot(r) ? [t("th", { key: e.headerTable.getColumnKey(r) + ":0.0.0.0:" + e.headerTable.getColumnKey(r), class: e.headerClass("vuetable-th", r), style: [{ width: r.width }, e.headerTable.getCellProps(r, "header").style], attrs: { id: "_" + r.name, "data-vuetable-column": e.headerTable.getCellProps(r, "header")["data-vuetable-column"] }, on: { click: function(l) {
231
- return e.onColumnHeaderClicked(r, l);
232
- } } }, [t("slot-outlet", { attrs: { content: e.getHeaderSlot(r), scope: { column: r, index: s } } }), e._v(" "), t("span", { domProps: { innerHTML: e._s(e.renderTitle(r, !0)) } })], 1)] : [t("th", { key: e.headerTable.getColumnKey(r) + ":0.0.0.0:" + e.headerTable.getColumnKey(r), class: e.headerClass("vuetable-th", r), style: [{ width: r.width }, e.headerTable.getCellProps(r, "header").style], attrs: { id: "_" + r.name, "data-vuetable-column": e.headerTable.getCellProps(r, "header")["data-vuetable-column"] }, domProps: { innerHTML: e._s(e.renderTitle(r)) }, on: { click: function(l) {
233
- return e.onColumnHeaderClicked(r, l);
234
- } } })]] : e._e()];
235
- }), e._v(" "), e.headerTable.scrollVisible ? t("VuetableColGutter") : e._e()], 2);
236
- }, qa = [];
237
- Ne.render = Ta;
238
- Ne.staticRenderFns = qa;
239
- function Mn(e, a, t) {
240
- const r = new Map(a.tableFields.map((c, u) => [c, u])), s = a.groupBy != null, l = s ? a.tableLayout.headerGroups : [{ key: "fields", fields: a.tableFields.filter((c) => c.visible) }], d = () => e("col", { style: { width: a.scrollBarWidth }, class: "vuetable-col-gutter" }), v = l.map((c) => e("colgroup", { key: c.key }, [
241
- ...c.fields.map((u) => {
242
- var p;
243
- const m = (typeof u.name == "object" && u.name !== null ? u.name.name || "component" : u.name).replace(a.fieldPrefix, ""), w = (p = u.$_index) != null ? p : r.get(u);
244
- return e("col", {
245
- key: a.getColumnKey(u),
246
- style: { width: t && a.getHeaderWidth(u) || u.width },
247
- class: [`vuetable-col-${m}`, u.titleClass, `${m}-${w}`, a.groupClass(u)]
248
- });
249
- }),
250
- ...!s && t && a.scrollVisible ? [d()] : []
251
- ]));
252
- return s && t && a.scrollVisible && v.push(e("colgroup", { key: "gutter" }, [d()])), v;
253
- }
254
- const Bn = { isHeader: { type: Boolean, default: !1 } }, Ea = {
255
- name: "vuetable-col-group",
256
- functional: !0,
257
- inject: ["vuetable"],
258
- props: Bn,
259
- render: (e, a) => Mn(e, a.injections.vuetable, a.props.isHeader)
260
- }, ja = N({
261
- name: "vuetable-col-group",
262
- inheritAttrs: !1,
263
- props: Bn,
264
- setup(e) {
265
- const a = se("vuetable");
266
- return () => Mn(fa, a, e.isHeader);
267
- }
268
- }), fn = A ? Ea : ja, wt = N({
269
- name: "VuetableDetailHost",
270
- props: {
271
- detailComponent: { type: [String, Object], default: "" },
272
- rowData: { type: Object, required: !0 },
273
- rowIndex: { type: Number, required: !0 },
274
- options: { type: Object, default: () => ({}) }
275
- },
276
- setup(e) {
277
- const a = se("vuetable"), t = y(() => a.vuetable), r = y(() => typeof e.detailComponent == "object" ? Dn(bt(e.detailComponent)) : e.detailComponent);
278
- return { tableContext: a, vuetable: t, resolvedDetailComponent: r };
279
- }
280
- });
281
- var Da = function() {
282
- var e = this, a = e.$createElement, t = e._self._c || a;
283
- return t(e.resolvedDetailComponent, { tag: "component", attrs: { "row-data": e.rowData, "row-index": e.rowIndex, vuetable: e.tableContext, options: e.options } });
284
- }, Ha = [];
285
- wt.render = Da;
286
- wt.staticRenderFns = Ha;
287
- function vn(e, a, t) {
288
- return e === void 0 ? t : e === "" || e === a || !!e;
289
- }
290
- function bn(e) {
291
- if (typeof e == "function")
292
- return (a) => {
293
- const t = e(a);
294
- return Array.isArray(t) ? t : t == null ? [] : [t];
295
- };
296
- }
297
- function Ia(e) {
298
- let a = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), s = !1;
299
- function l(v) {
300
- const c = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Set();
301
- function p(i) {
302
- var w, x, S, f, g, _, O, k, D, ne;
303
- if (Array.isArray(i)) {
304
- i.forEach(p);
305
- return;
306
- }
307
- if (!i || typeof i != "object") return;
308
- const m = A ? (x = (w = i.componentOptions) == null ? void 0 : w.Ctor) == null ? void 0 : x.options : i.type;
309
- if ((m == null ? void 0 : m.__vuetableColumn) === !0) {
310
- const $ = A ? z(z({}, (S = i.data) == null ? void 0 : S.attrs), (f = i.componentOptions) == null ? void 0 : f.propsData) : i.props || {}, P = $.field;
311
- if (typeof P != "string" || !P) {
312
- u.add("VuetableColumn requires a non-empty field.");
313
- return;
314
- }
315
- if (c.has(P)) {
316
- u.add(`Duplicate VuetableColumn field: ${P}. The first declaration wins.`);
317
- return;
318
- }
319
- const h = (M, re) => {
320
- var X;
321
- return (X = $[M]) != null ? X : $[re];
322
- }, F = A ? [(g = i.data) == null ? void 0 : g.staticClass, (_ = i.data) == null ? void 0 : _.class] : $.class, T = A ? ((O = i.data) == null ? void 0 : O.scopedSlots) || {} : i.children || {}, q = A ? (k = i.componentOptions) == null ? void 0 : k.children : Array.isArray(T) ? T : void 0;
323
- c.set(P, {
324
- field: {
325
- name: P,
326
- title: $.label,
327
- sortField: vn($.sortable, "sortable", !1) ? h("sortField", "sort-field") || P : null,
328
- width: (D = $.width) != null ? D : null,
329
- fixed: $.fixed,
330
- fixedOrder: Object.prototype.hasOwnProperty.call($, "fixedOrder") ? $.fixedOrder : $["fixed-order"],
331
- group: (ne = $.group) != null ? ne : null,
332
- visible: vn($.visible, "visible", !0),
333
- titleClass: [F, h("headerClass", "header-class")],
334
- dataClass: [F, h("cellClass", "cell-class")],
335
- $_columnKey: P
336
- },
337
- cell: bn(T.default) || (q != null && q.length ? () => q : void 0),
338
- header: bn(T.header)
339
- });
340
- return;
341
- }
342
- typeof i.type == "symbol" && Array.isArray(i.children) && p(i.children);
343
- }
344
- p(v), u.forEach((i) => {
345
- r.has(i) || e.warn(i);
346
- }), r = u, a = c, s = c.size > 0;
347
- }
348
- function d() {
349
- const v = /* @__PURE__ */ new Map(), c = [...a].map(([u, p], i) => {
350
- const m = e.normalize(p.field, i);
351
- v.set(u, m);
352
- const w = t.get(u), x = e.fields.value.find((S) => S.$_columnKey === u);
353
- if (!w || !x) return z({}, m);
354
- for (const S of Object.keys(m))
355
- JSON.stringify(m[S]) !== JSON.stringify(w[S]) && (x[S] = m[S]);
356
- return x;
357
- });
358
- (c.length !== e.fields.value.length || c.some((u, p) => u !== e.fields.value[p])) && (e.fields.value = c), t = v;
359
- }
360
- return {
361
- discover: l,
362
- reconcile: d,
363
- hasDeclarations: () => s,
364
- getColumnSlot: (v, c = !1) => {
365
- var u, p;
366
- return c ? (u = a.get(v)) == null ? void 0 : u.header : (p = a.get(v)) == null ? void 0 : p.cell;
367
- }
368
- };
369
- }
370
- function Q(e) {
371
- return e.fixed === "left" || e.fixed === "right" ? e.fixed : void 0;
372
- }
373
- function gn(e, a) {
374
- const t = Object.keys(a);
375
- return t.length === Object.keys(e).length && t.every((r) => e[r] === a[r]);
376
- }
377
- function pn(e, a) {
378
- return e.$_columnKey || (typeof e.name == "string" ? e.name : e.name || a);
379
- }
380
- function Aa(e) {
381
- const a = /* @__PURE__ */ new Map();
382
- let t = /* @__PURE__ */ new Map(), r = 0, s = 0;
383
- const l = (v) => typeof v == "number" && Number.isInteger(v) && v >= 1;
384
- return G(() => e.fields.value.map((v, c) => ({ field: v, identity: pn(v, c), side: Q(v), order: v.fixedOrder })), (v) => {
385
- const c = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
386
- for (const { field: p, identity: i, side: m, order: w } of v) {
387
- const x = c.get(i) || 0;
388
- c.set(i, x + 1);
389
- const S = a.get(i) || [], f = S[x] || { key: r++, sequence: 0, invalidOrder: !1 };
390
- S[x] = f, a.set(i, S), f.side !== m && (f.side = m, f.sequence = m ? s++ : 0);
391
- const g = w !== void 0 && !l(w);
392
- g && !f.invalidOrder && e.warn(`fixedOrder for ${String(p.name)} must be a positive integer; treating it as automatic.`), f.invalidOrder = g, u.set(p, f);
393
- }
394
- t = u;
395
- }, { immediate: !0, flush: "sync" }), G(() => e.fields.value.map(pn), (v) => {
396
- const c = /* @__PURE__ */ new Map();
397
- for (const u of v) c.set(u, (c.get(u) || 0) + 1);
398
- for (const [u, p] of a) {
399
- const i = c.get(u);
400
- i === void 0 ? a.delete(u) : p.length = i;
401
- }
402
- }), { orderedFields: y(() => {
403
- if (e.mode.value === "in-place" || !e.fields.value.some((i) => Q(i))) return e.fields.value;
404
- const v = [], c = [], u = [], p = (i, m) => {
405
- const w = i.map((_) => {
406
- var O;
407
- return { field: _, order: l(_.fixedOrder) ? _.fixedOrder : void 0, sequence: ((O = t.get(_)) == null ? void 0 : O.sequence) || 0 };
408
- }), x = new Set(w.filter((_) => _.order !== void 0).map((_) => _.order)), S = w.filter((_) => _.order === void 0).sort((_, O) => _.sequence - O.sequence);
409
- let f = 1;
410
- for (const _ of S) {
411
- for (; x.has(f); ) f++;
412
- _.order = f++;
413
- }
414
- const g = w.sort((_, O) => _.order - O.order || _.sequence - O.sequence).map((_) => _.field);
415
- return m === "right" ? g.reverse() : g;
416
- };
417
- for (const i of e.fields.value) {
418
- const m = Q(i);
419
- m === "left" ? v.push(i) : m === "right" ? u.push(i) : c.push(i);
420
- }
421
- return [...p(v, "left"), ...c, ...p(u, "right")];
422
- }), getColumnKey: (v) => {
423
- var c, u, p, i;
424
- return (i = (p = (u = v.$_columnKey) != null ? u : (c = t.get(v)) == null ? void 0 : c.key) != null ? p : v.$_index) != null ? i : 0;
425
- } };
426
- }
427
- function Ma(e) {
428
- const a = Re({}), t = Re({}), r = Re(), s = Re(), l = y(() => new Map(e.fields.value.map((P, h) => [P, h]))), d = y(() => e.fields.value.filter((P) => P.visible)), v = y(() => new Map(d.value.map((P, h) => [P, h]))), c = y(() => d.value.some((P) => Q(P))), u = y(() => d.value.some((P) => Q(P) === "right")), p = y(() => c.value && e.isFixedHeader.value && r.value !== void 0 ? `${r.value}px` : e.scrollBarWidth.value), i = y(() => {
429
- const P = /* @__PURE__ */ new Map();
430
- for (const h of ["left", "right"]) {
431
- let F = 0;
432
- const T = h === "left" ? d.value : [...d.value].reverse();
433
- for (const q of T)
434
- Q(q) === h && (P.set(q, F), F += a.value[String(l.value.get(q))] || 0);
435
- }
436
- return P;
437
- });
438
- let m = !1, w = !1, x, S = !1, f;
439
- const g = /* @__PURE__ */ new Set();
440
- function _(P, h) {
441
- var q;
442
- const F = Q(P);
443
- if (!P.visible || !F) return { class: [], style: {} };
444
- const T = F === "right" && h === "header" && e.isFixedHeader.value && e.scrollVisible.value ? (q = s.value) != null ? q : Number.parseFloat(p.value) || 0 : 0;
445
- return {
446
- class: ["vuetable-fixed-column", `vuetable-fixed-${F}`, `vuetable-fixed-${h}`],
447
- style: { position: "sticky", [F]: `${(i.value.get(P) || 0) + T}px` }
448
- };
449
- }
450
- function O(P, h = "body") {
451
- if (!c.value || !P.visible || !Q(P)) return { class: [], style: {} };
452
- const F = l.value.get(P);
453
- if (F === void 0) return { class: [], style: {} };
454
- const T = _(P, h);
455
- return T["data-vuetable-column"] = String(F), T;
456
- }
457
- function k(P, h = "header") {
458
- if (!c.value) return { class: [], style: {} };
459
- const F = v.value.get(P[0]), T = P.length ? Q(P[0]) : void 0;
460
- return !T || F === void 0 || !P.every((q, M) => d.value[F + M] === q && Q(q) === T) ? { class: [], style: {} } : _(T === "left" ? P[0] : P[P.length - 1], h);
461
- }
462
- function D(P) {
463
- if (!c.value || !e.isFixedHeader.value) return;
464
- const h = t.value[String(l.value.get(P))];
465
- return h === void 0 ? void 0 : `${h}px`;
466
- }
467
- function ne() {
468
- var xe, ge, Se;
469
- if (x = void 0, w || !m) return;
470
- const P = e.root(), h = P && c.value ? P.querySelector(":scope > .vuetable-body-wrapper") : null, F = P && c.value ? P.querySelector(":scope > .vuetable-head-wrapper") : null, T = h == null ? void 0 : h.querySelector(":scope > table.vuetable"), q = F == null ? void 0 : F.querySelector(":scope > table.vuetable"), M = new Set(c.value ? [P, h, F, T, q].filter((H) => !!H) : []), re = /* @__PURE__ */ new Map(), X = {};
471
- let le, _e;
472
- if (c.value && e.isFixedHeader.value) {
473
- const H = (ge = (xe = T == null ? void 0 : T.tBodies[0]) == null ? void 0 : xe.rows[0]) == null ? void 0 : ge.cells;
474
- if ((H == null ? void 0 : H.length) === d.value.length && Array.from(H).every((L) => L.colSpan === 1) && d.value.forEach((L, ee) => {
475
- const W = H[ee], J = W.getBoundingClientRect().width;
476
- re.set(W, J), Number.isFinite(J) && J > 0 && (X[String(l.value.get(L))] = J, M.add(W));
477
- }), e.scrollVisible.value && h && h.offsetWidth > 0) {
478
- const L = window.getComputedStyle(h);
479
- le = Math.max(0, h.offsetWidth - h.clientWidth - (Number.parseFloat(L.borderLeftWidth) || 0) - (Number.parseFloat(L.borderRightWidth) || 0));
480
- }
481
- const U = q == null ? void 0 : q.querySelector(":scope > thead > tr > .vuetable-th-gutter"), Y = U == null ? void 0 : U.getBoundingClientRect().width;
482
- U && Y !== void 0 && Number.isFinite(Y) && Y > 0 && (_e = Y, M.add(U));
483
- }
484
- const ue = {};
485
- for (const H of d.value) {
486
- if (!Q(H)) continue;
487
- const U = String(l.value.get(H)), Y = `[data-vuetable-column="${U}"]`, L = [
488
- `:scope > .vuetable-body-wrapper > table.vuetable > tbody > tr > ${Y}`,
489
- `:scope > .vuetable-head-wrapper > table.vuetable > thead > tr > ${Y}, :scope > .vuetable-body-wrapper > table.vuetable > thead > tr > ${Y}`
490
- ];
491
- for (const ee of L) {
492
- const W = P && c.value ? P.querySelector(ee) : null, J = W ? (Se = re.get(W)) != null ? Se : W.getBoundingClientRect().width : void 0;
493
- if (W && J !== void 0 && Number.isFinite(J) && J > 0) {
494
- ue[U] = J, M.add(W);
495
- break;
496
- }
497
- }
498
- }
499
- for (const H of g)
500
- M.has(H) || (f == null || f.unobserve(H), g.delete(H));
501
- for (const H of M)
502
- g.has(H) || (f == null || f.observe(H), g.add(H));
503
- gn(a.value, ue) || (a.value = ue);
504
- const we = !gn(t.value, X), ce = r.value !== le;
505
- we && (t.value = X), ce && (r.value = le), s.value = _e, (we || ce) && $();
506
- }
507
- function $() {
508
- !m || w || x !== void 0 || !c.value && g.size === 0 && Object.keys(a.value).length === 0 || (S = typeof requestAnimationFrame == "function", x = S ? requestAnimationFrame(ne) : setTimeout(ne, 0));
509
- }
510
- return yt(() => {
511
- m = !0, typeof ResizeObserver != "undefined" && (f = new ResizeObserver($)), window.addEventListener("resize", $), $();
512
- }), Hn($), gt(() => {
513
- w = !0, m = !1, f == null || f.disconnect(), g.clear(), window.removeEventListener("resize", $), x !== void 0 && (S ? cancelAnimationFrame(x) : clearTimeout(x));
514
- }), { enabled: c, hasFixedRightColumn: u, headerGutterWidth: p, getHeaderWidth: D, getCellProps: O, getSpanProps: k, schedule: $ };
515
- }
516
- function Ba(e) {
517
- return typeof e == "string" && e.trim() !== "" || typeof e == "number" && Number.isFinite(e) ? e : null;
518
- }
519
- function La(e) {
520
- const a = y(() => e.fields.value.filter((d) => d.visible)), t = y(() => {
521
- const d = e.groupBy();
522
- return d == null ? [] : a.value.reduce((v, c, u) => {
523
- const p = Ba(d in c && Object.prototype.hasOwnProperty.call(c, d) ? c[d] : null), i = v[v.length - 1];
524
- return i && i.value === p ? (i.fields.push(c), i.colspan++, i.endIndex = u) : v.push({ key: `${typeof p}:${String(p)}:${u}`, value: p, fields: [c], colspan: 1, startIndex: u, endIndex: u }), v;
525
- }, []);
526
- }), r = y(() => t.value.flatMap((d) => {
527
- const v = [];
528
- return d.fields.forEach((c, u) => {
529
- const p = Q(c), i = v[v.length - 1];
530
- if (i && i.fixed === p)
531
- i.fields.push(c), i.colspan++, i.endIndex++, i.isGroupEnd = i.endIndex === d.endIndex;
532
- else {
533
- const m = d.startIndex + u;
534
- v.push(ye(z({}, d), { key: `${d.key}:${p || "none"}:${m}`, groupKey: d.key, fields: [c], colspan: 1, startIndex: m, endIndex: m, fixed: p, isGroupStart: m === d.startIndex, isGroupEnd: m === d.endIndex }));
535
- }
536
- }), v;
537
- })), s = y(() => {
538
- const d = /* @__PURE__ */ new Map();
539
- for (const v of t.value) {
540
- d.set(v.fields[0], ["vuetable-group-start"]);
541
- const c = v.fields[v.fields.length - 1];
542
- d.set(c, [...d.get(c) || [], "vuetable-group-end"]);
543
- }
544
- return d;
545
- });
546
- return { scope: y(() => ({
547
- fields: e.fields.value,
548
- visibleFields: a.value,
549
- groups: t.value,
550
- headerGroups: r.value,
551
- getCellProps: e.getCellProps,
552
- getSpanProps: e.getSpanProps,
553
- columnCount: a.value.length,
554
- isFixedHeader: e.isFixedHeader.value,
555
- scrollVisible: e.scrollVisible.value,
556
- scrollBarWidth: e.scrollBarWidth.value
557
- })), groupClass: (d) => s.value.get(d) || [] };
558
- }
559
- const ie = {
560
- table: {
561
- tableWrapper: "",
562
- tableHeaderClass: "fixed",
563
- tableBodyClass: "fixed",
564
- tableClass: "ui blue selectable unstackable celled table",
565
- loadingClass: "loading",
566
- ascendingIcon: "blue chevron up icon",
567
- descendingIcon: "blue chevron down icon",
568
- ascendingClass: "sorted-asc",
569
- descendingClass: "sorted-desc",
570
- sortableIcon: "grey sort icon",
571
- handleIcon: "grey sidebar icon"
572
- },
573
- pagination: {
574
- wrapperClass: "ui right floated pagination menu",
575
- activeClass: "active large",
576
- disabledClass: "disabled",
577
- pageClass: "item",
578
- linkClass: "icon item",
579
- paginationClass: "ui bottom attached segment grid",
580
- paginationInfoClass: "left floated left aligned six wide column",
581
- dropdownClass: "ui search dropdown",
582
- icons: {
583
- first: "angle double left icon",
584
- prev: "left chevron icon",
585
- next: "right chevron icon",
586
- last: "angle double right icon"
587
- }
588
- },
589
- paginationInfo: {
590
- infoClass: "left floated left aligned six wide column"
591
- }
592
- };
593
- var Va = Object.defineProperty, Na = Object.defineProperties, Ga = Object.getOwnPropertyDescriptors, hn = Object.getOwnPropertySymbols, Wa = Object.prototype.hasOwnProperty, Ka = Object.prototype.propertyIsEnumerable, mn = (e, a, t) => a in e ? Va(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, te = (e, a) => {
594
- for (var t in a || (a = {}))
595
- Wa.call(a, t) && mn(e, t, a[t]);
596
- if (hn)
597
- for (var t of hn(a))
598
- Ka.call(a, t) && mn(e, t, a[t]);
599
- return e;
600
- }, ft = (e, a) => Na(e, Ga(a)), za = (e, a, t) => new Promise((r, s) => {
601
- var l = (c) => {
602
- try {
603
- v(t.next(c));
604
- } catch (u) {
605
- s(u);
606
- }
607
- }, d = (c) => {
608
- try {
609
- v(t.throw(c));
610
- } catch (u) {
611
- s(u);
612
- }
613
- }, v = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(l, d);
614
- v((t = t.apply(e, a)).next());
615
- });
616
- const yn = /* @__PURE__ */ new WeakMap(), Pe = N({
617
- name: "Vuetable",
618
- inheritAttrs: A,
619
- components: {
620
- RenderBoundary: Ra,
621
- SlotOutlet: An,
622
- VuetableRowHeader: Ne,
623
- VuetableColGroup: fn,
624
- VuetableColGutter: be,
625
- VuetableDetailHost: wt,
626
- "vuetable-field-checkbox": qe,
627
- "vuetable-field-handle": Ee,
628
- "vuetable-field-sequence": je
629
- },
630
- props: {
631
- fields: { type: Array, default: void 0 },
632
- groupBy: { type: String, default: null },
633
- fixedMode: { type: String, default: "edges", validator: (e) => e === "edges" || e === "in-place" },
634
- loadOnStart: { type: Boolean, required: !1, default: !0 },
635
- apiUrl: { type: String, required: !1, default: "" },
636
- httpMethod: { type: String, required: !1, default: "get" },
637
- reactiveApiUrl: { type: Boolean, required: !1, default: !0 },
638
- apiMode: { type: Boolean, required: !1, default: !0 },
639
- data: { type: null, required: !1, default: null },
640
- dataManager: { type: Function, required: !1, default: null },
641
- dataPath: { type: String, required: !1, default: "data" },
642
- paginationPath: { type: String, required: !1, default: "links.pagination" },
643
- queryParams: { type: [Object, Function], required: !1, default: () => ({
644
- sort: "sort",
645
- page: "page",
646
- perPage: "per_page"
647
- }) },
648
- appendParams: { type: Object, required: !1, default: () => ({}) },
649
- httpOptions: { type: Object, required: !1, default: () => ({}) },
650
- httpFetch: { type: Function, required: !1, default: null },
651
- perPage: { type: Number, required: !1, default: 10 },
652
- initialPage: { type: Number, required: !1, default: 1 },
653
- firstPage: { type: Number, required: !1, default: 1 },
654
- sortOrder: { type: Array, required: !1, default: () => E([]).value },
655
- multiSort: { type: Boolean, required: !1, default: !1 },
656
- tableHeight: { type: String, required: !1, default: null },
657
- multiSortKey: { type: String, required: !1, default: "alt" },
658
- rowClass: { type: [String, Function], required: !1, default: "" },
659
- detailRowComponent: { type: [String, Object], required: !1, default: "" },
660
- detailRowTransition: { type: String, required: !1, default: "" },
661
- detailRowClass: { type: [String, Function], required: !1, default: "vuetable-detail-row" },
662
- detailRowOptions: { type: Object, required: !1, default: () => ({}) },
663
- trackBy: { type: String, required: !1, default: "id" },
664
- css: { type: Object, required: !1, default: () => ({}) },
665
- minRows: { type: Number, required: !1, default: 0 },
666
- silent: { type: Boolean, required: !1, default: !1 },
667
- noDataTemplate: { type: String, required: !1, default: "No Data Available" },
668
- showSortIcons: { type: Boolean, required: !1, default: !0 },
669
- headerRows: { type: Array, required: !1, default: () => ["VuetableRowHeader"] },
670
- transform: { type: Function, required: !1, default: null },
671
- sortParams: { type: Function, required: !1, default: null },
672
- fieldPrefix: { type: String, required: !1, default: "vuetable-field-" },
673
- eventPrefix: { type: String, required: !1, default: "vuetable:" }
674
- },
675
- computed: {
676
- $_css() {
677
- return this.tableCss;
678
- }
679
- },
680
- setup(e, { emit: a, slots: t, attrs: r }) {
681
- var s;
682
- const l = va(), d = E(), v = E(0);
683
- let c = te(te({}, e), r), u = Object.keys(t).length > 0;
684
- cn(() => {
685
- var n, o, b, C;
686
- if (A) {
687
- const Z = l == null ? void 0 : l.proxy;
688
- (x.hasDeclarations() || Be("default") || (n = Z == null ? void 0 : Z.$slots) != null && n.default || (C = (b = (o = Z == null ? void 0 : Z.$vnode) == null ? void 0 : o.data) == null ? void 0 : b.scopedSlots) != null && C.default) && v.value++;
689
- return;
690
- }
691
- const I = te(te({}, e), r), B = Object.keys(I), ve = B.length === Object.keys(c).length && B.every((Z) => I[Z] === c[Z]), K = Object.keys(t).length > 0;
692
- (ve || u || K) && v.value++, u = K, c = I;
693
- });
694
- const p = y(() => l == null ? void 0 : l.proxy), i = E([]), m = Aa({ fields: i, mode: y(() => e.fixedMode || "edges"), warn: he }), w = y({
695
- get: () => m.orderedFields.value,
696
- set: (n) => {
697
- i.value = n;
698
- }
699
- }), x = Ia({ fields: i, normalize: Ke, warn: he }), S = x.getColumnSlot, f = E(null), g = E(null), _ = E(e.initialPage), O = E([]), k = E([]), D = E(0), ne = E("17px"), $ = E(!1), P = Ve(e.sortOrder), h = A ? E(P) : Re(P);
700
- let F = !1;
701
- const T = y({
702
- get: () => h.value,
703
- set: (n) => {
704
- F = !0, h.value = Ve(n), Fe();
705
- }
706
- });
707
- A && l && ba(() => Object.defineProperty(l.proxy, "sortOrder", {
708
- configurable: !0,
709
- enumerable: !0,
710
- get: () => T.value,
711
- set: (n) => {
712
- T.value = n;
713
- }
714
- }));
715
- const q = (s = l == null ? void 0 : l.proxy) == null ? void 0 : s.$parent;
716
- if (q) {
717
- let n = yn.get(q);
718
- if (!n) {
719
- n = /* @__PURE__ */ new Set(), yn.set(q, n);
720
- const b = n, C = () => b.forEach((I) => I());
721
- A ? q.$on("hook:beforeUpdate", C) : cn(C, q.$);
722
- }
723
- n.add(at);
724
- const o = n;
725
- gt(() => o.delete(at));
726
- }
727
- const M = E(e.httpOptions), re = E(), X = y(() => te(te({}, ie.table), e.css)), le = y(() => {
728
- var n, o;
729
- return (n = f.value) != null && n.length ? ((o = f.value) == null ? void 0 : o.length) > 0 : !1;
730
- }), _e = y(() => le.value && e.detailRowComponent !== ""), ue = y(() => f.value && typeof f.value[0][e.trackBy] != "undefined"), we = y(() => w.value.filter((n) => n.visible).length), ce = y(() => {
731
- var n;
732
- return ((n = f.value) == null ? void 0 : n.length) || 0;
733
- }), xe = y(() => ce.value === 0 && e.noDataTemplate.length > 0), ge = y(() => {
734
- var n;
735
- return f.value === null || ((n = f.value) == null ? void 0 : n.length) === 0;
736
- }), Se = y(() => ge.value ? !0 : f.value.length < e.minRows), H = y(() => ge.value ? e.minRows : f.value.length >= e.minRows ? 0 : e.minRows - f.value.length), U = y(() => e.apiMode), Y = y(() => !e.apiMode), L = y(() => e.tableHeight != null), ee = Ma({ fields: w, root: () => {
737
- var n;
738
- return (n = l == null ? void 0 : l.proxy) == null ? void 0 : n.$el;
739
- }, isFixedHeader: L, scrollVisible: $, scrollBarWidth: ne }), { getCellProps: W, getSpanProps: J, enabled: Kn } = ee, Ge = La({ fields: w, groupBy: () => e.groupBy, isFixedHeader: L, scrollVisible: $, scrollBarWidth: ee.headerGutterWidth, getCellProps: W, getSpanProps: J });
740
- We(), Fe(), Ce(() => {
741
- R("initialized", w.value);
742
- });
743
- let De = !1, Ot = !1, pe = null, de = null;
744
- function He() {
745
- const n = d.value;
746
- pe && (!De || !L.value || pe !== n) && (pe.removeEventListener("scroll", Ie), pe = null), !(!De || !L.value || !n) && (ne.value = Ft() + "px", pe !== n && (n.addEventListener("scroll", Ie), pe = n), D.value = -1, Ie({ currentTarget: n }), Oe());
747
- }
748
- G(L, () => {
749
- A ? Ce(He) : He();
750
- }, { flush: "post" }), yt(() => {
751
- De = !0, e.loadOnStart && ae(), He();
752
- }), gt(() => {
753
- De = !1, Ot = !0, de !== null && (clearTimeout(de), de = null), He();
754
- });
755
- const $t = Ct(ft(te({}, ga(e)), {
756
- vuetable: p,
757
- $el: y(() => {
758
- var n;
759
- return (n = l == null ? void 0 : l.proxy) == null ? void 0 : n.$el;
760
- }),
761
- isApiMode: U,
762
- tableLayout: Ge.scope,
763
- groupClass: Ge.groupClass,
764
- getCellProps: W,
765
- getSpanProps: J,
766
- fixedColumnsEnabled: Kn,
767
- hasFixedRightColumn: ee.hasFixedRightColumn,
768
- scheduleFixedColumns: ee.schedule,
769
- getHeaderWidth: ee.getHeaderWidth,
770
- getColumnKey: m.getColumnKey,
771
- tableFields: w,
772
- tableData: f,
773
- tablePagination: g,
774
- selectedTo: O,
775
- countVisibleFields: we,
776
- dataIsAvailable: le,
777
- countTableData: ce,
778
- displayEmptyDataRow: xe,
779
- useDetailRow: _e,
780
- hasRowIdentifier: ue,
781
- lessThanMinRows: Se,
782
- blankRows: H,
783
- scrollVisible: $,
784
- scrollBarWidth: ee.headerGutterWidth,
785
- sortOrder: h,
786
- css: X,
787
- $_css: X,
788
- isFieldSlot: Tt,
789
- getColumnSlot: S,
790
- columnRevision: v,
791
- onHeaderEvent: nn,
792
- setData: fe,
793
- getFieldTitle: Rt,
794
- orderBy: Mt,
795
- camelCase: qt,
796
- clearSortOrder: Lt,
797
- toggleDetailRow: zt,
798
- showDetailRow: it,
799
- hideDetailRow: ut,
800
- isVisibleDetailRow: $e,
801
- reload: ct,
802
- fireEvent: R,
803
- singleColumnSort: nt,
804
- removeSortColumn: et,
805
- setSortColumnDirection: tt,
806
- clearSelectedValues: Nt,
807
- showField: Ut,
808
- hideField: Jt,
809
- toggleField: Zt,
810
- onCheckboxToggled: an,
811
- onCheckboxToggledAll: rn,
812
- checkIfRowIdentifierExists: Ae,
813
- changePage: ln,
814
- resetData: on,
815
- refresh: dt,
816
- isFieldComponent: Ue,
817
- makeTitle: Me,
818
- getAllQueryParams: Ze,
819
- isSortable: Le,
820
- getDefaultSortParam: Qe,
821
- getObjectValue: oe,
822
- isSelectedRow: st
823
- }));
824
- pa("vuetable", $t);
825
- function Ft() {
826
- const n = document.createElement("div"), o = document.createElement("div");
827
- n.style.visibility = "hidden", n.style.width = "100px", o.style.width = "100%", n.appendChild(o), document.body.appendChild(n);
828
- const b = n.offsetWidth;
829
- n.style.overflow = "scroll";
830
- const C = o.offsetWidth;
831
- return document.body.removeChild(n), b - C;
832
- }
833
- function Ie(n) {
834
- var o, b;
835
- const C = n.currentTarget;
836
- if (!C) return;
837
- const I = C.scrollLeft;
838
- if (I != D.value) {
839
- const B = (b = (o = d.value) == null ? void 0 : o.parentElement) == null ? void 0 : b.querySelector(".vuetable-head-wrapper");
840
- B != null && (B.scrollLeft = I), D.value = I;
841
- }
842
- }
843
- function he(n) {
844
- e.silent || console.error(n);
845
- }
846
- function zn(n, o) {
847
- return [n, o.dataClass, ...Ge.groupClass(o), ...W(o).class];
848
- }
849
- function We() {
850
- if (typeof e.fields == "undefined") {
851
- x.reconcile();
852
- return;
853
- }
854
- i.value = e.fields.map(Ke);
855
- }
856
- function Ke(n, o) {
857
- const b = {
858
- name: "",
859
- // title:
860
- // this allow the code to detect undefined title
861
- // and replace it with capitalized name instead
862
- titleClass: "",
863
- dataClass: "",
864
- sortField: null,
865
- formatter: null,
866
- visible: !0,
867
- width: null,
868
- $_index: o
869
- };
870
- if (typeof n == "string")
871
- return ft(te({}, b), {
872
- name: ze(n),
873
- title: Me(n)
874
- });
875
- const C = Object.assign({}, b, n);
876
- return C.name = ze(C.name), C.title === void 0 && (C.title = Me(C.name)), C.formatter !== null && typeof C.formatter != "function" && (console.error(C.name + " field formatter must be a function"), C.formatter = null), C;
877
- }
878
- function ze(n) {
879
- return n instanceof Object ? Dn(bt(n)) : n.replace("__", e.fieldPrefix);
880
- }
881
- function fe(n) {
882
- if (!(n === null || typeof n == "undefined")) {
883
- if (R("loading"), Array.isArray(n)) {
884
- f.value = n, R("loaded");
885
- return;
886
- }
887
- f.value = oe(n, e.dataPath, null), g.value = oe(n, e.paginationPath, null), Ce(() => {
888
- Ae(), ke(), R("pagination-data", g.value), R("loaded");
889
- });
890
- }
891
- }
892
- function Ae() {
893
- if (le.value)
894
- return ue.value ? !0 : (he('Invalid your data! Use "track-by" prop to specify.'), !1);
895
- }
896
- function Me(n) {
897
- return Ue(n) ? "" : Je(n.replace(".", " "));
898
- }
899
- function Rt(n) {
900
- return typeof n.title == "function" ? n.title() : n.title;
901
- }
902
- function Un(n, o) {
903
- return rt(n) ? Vt(n, o) : oe(o, n.name, "");
904
- }
905
- function Ue(n) {
906
- return n instanceof Object ? !0 : n.slice(0, e.fieldPrefix.length) === e.fieldPrefix || n.slice(0, 2) === "__";
907
- }
908
- function Tt(n) {
909
- return typeof Be(n) != "undefined";
910
- }
911
- function Be(n) {
912
- var o, b;
913
- return A ? (b = (o = l == null ? void 0 : l.proxy) == null ? void 0 : o.$scopedSlots) == null ? void 0 : b[n] : t[n];
914
- }
915
- function Je(n) {
916
- return n.replace(/\w+/g, (o) => o.charAt(0).toUpperCase() + o.substring(1).toLowerCase());
917
- }
918
- function qt(n, o = "_") {
919
- return n.split(o).map((b) => Je(b)).join("");
920
- }
921
- function ae(n = jt, o = Dt) {
922
- if (Y.value) {
923
- Yt();
924
- return;
925
- }
926
- return R("loading"), M.value.params = It(Ze()), re.value = Et(e.apiUrl, M.value), re.value.then(
927
- n,
928
- o
929
- ).catch(() => o());
930
- }
931
- function Et(n, o) {
932
- return za(this, null, function* () {
933
- if (e.httpFetch)
934
- return e.httpFetch(n, o);
935
- if (e.httpMethod === "get")
936
- return dn.get(n, o);
937
- {
938
- const b = yield M.value.params;
939
- return delete o.params, delete M.value.params, dn.post(n, b, M.value);
940
- }
941
- });
942
- }
943
- function jt(n) {
944
- R("load-success", n);
945
- const o = e.transform ? e.transform(n.data) : n.data;
946
- f.value = oe(o, e.dataPath, null), g.value = oe(o, e.paginationPath, null), g.value === null && he(`vuetable: pagination-path ${e.paginationPath} not found.
947
- It looks like the data returned from the server does not have pagination information
948
- or you may have set it incorrectly.
949
-
950
- You can explicitly suppress this warning by setting pagination-path="".`), Ce(() => {
951
- Ae(), ke(), R("pagination-data", g.value), R("loaded");
952
- });
953
- }
954
- function ke() {
955
- Ot || (de !== null && clearTimeout(de), de = setTimeout(() => {
956
- de = null, Oe();
957
- }, 80));
958
- }
959
- function Oe() {
960
- Ce(() => {
961
- const n = d.value;
962
- n != null && ($.value = n.scrollHeight > n.clientHeight, R("scrollbar-visible", $.value));
963
- });
964
- }
965
- function Dt(n) {
966
- console.error("load-error", n), R("load-error", n), R("loaded");
967
- }
968
- function Ze() {
969
- let n = {};
970
- return typeof e.queryParams == "function" ? (n = e.queryParams(h.value, _.value, e.perPage), typeof n == "object" ? n : {}) : (n[e.queryParams.sort] = Ht(), n[e.queryParams.page] = _.value, n[e.queryParams.perPage] = e.perPage, n);
971
- }
972
- function Ht() {
973
- var n;
974
- return !h.value || ((n = h.value[0]) == null ? void 0 : n.field) == "" ? "" : typeof e.sortParams == "function" ? e.sortParams(h.value) : Qe();
975
- }
976
- function Qe() {
977
- return h.value.map((n) => `${n.sortField}|${n.direction}`).join(",");
978
- }
979
- function It(n) {
980
- for (let o in e.appendParams)
981
- n[o] = e.appendParams[o];
982
- return n;
983
- }
984
- function Le(n) {
985
- return n.sortField !== null;
986
- }
987
- function At(n) {
988
- if (!Le(n))
989
- return !1;
990
- for (let o = 0; o < h.value.length; o++)
991
- if (Ye(n, o))
992
- return o;
993
- return !1;
994
- }
995
- function Ye(n, o) {
996
- return h.value[o].field === n.name && h.value[o].sortField === n.sortField;
997
- }
998
- function Mt(n, o) {
999
- if (!Le(n)) return;
1000
- const b = e.multiSortKey.toLowerCase() + "Key";
1001
- e.multiSort && o[b] ? Bt(n) : nt(n), _.value = e.firstPage, (U.value || e.dataManager) && ae();
1002
- }
1003
- function me() {
1004
- A || ya(h);
1005
- }
1006
- function Xe(n, o) {
1007
- h.value.push({
1008
- field: n.name,
1009
- sortField: n.sortField,
1010
- direction: o || "asc"
1011
- }), me();
1012
- }
1013
- function et(n) {
1014
- h.value.splice(n, 1), me();
1015
- }
1016
- function tt(n, o) {
1017
- h.value[n].direction = o, me();
1018
- }
1019
- function Bt(n) {
1020
- let o = At(n);
1021
- o === !1 ? Xe(n, "asc") : h.value[o].direction === "asc" ? tt(o, "desc") : et(o);
1022
- }
1023
- function nt(n) {
1024
- if (h.value.length === 0) {
1025
- Xe(n, "asc");
1026
- return;
1027
- }
1028
- h.value.splice(1), Ye(n, 0) ? h.value[0].direction = h.value[0].direction === "asc" ? "desc" : "asc" : h.value[0].direction = "asc", h.value[0].field = n.name, h.value[0].sortField = n.sortField, me();
1029
- }
1030
- function Lt() {
1031
- T.value = E([]).value;
1032
- }
1033
- function at() {
1034
- var n;
1035
- if (!F) return;
1036
- const o = A ? (n = l == null ? void 0 : l.proxy) == null ? void 0 : n.$options.propsData : l == null ? void 0 : l.vnode.props;
1037
- (o == null ? void 0 : o.sortOrder) === void 0 && (o == null ? void 0 : o["sort-order"]) === void 0 || (F = !1, h.value = Ve(e.sortOrder), Fe());
1038
- }
1039
- function rt(n) {
1040
- return typeof n.formatter == "function";
1041
- }
1042
- function Vt(n, o) {
1043
- if (rt(n) && typeof n.formatter == "function")
1044
- return n.formatter(oe(o, n.name), l == null ? void 0 : l.proxy);
1045
- }
1046
- function oe(n, o, b) {
1047
- b = typeof b == "undefined" ? null : b;
1048
- let C = n;
1049
- return o.trim() != "" && o.split(".").forEach((B) => {
1050
- if (C !== null && typeof C[B] != "undefined" && C[B] !== null)
1051
- C = C[B];
1052
- else {
1053
- C = b;
1054
- return;
1055
- }
1056
- }), C;
1057
- }
1058
- function lt(n) {
1059
- st(n) || O.value.push(n);
1060
- }
1061
- function ot(n) {
1062
- O.value = O.value.filter((o) => o !== n);
1063
- }
1064
- function st(n) {
1065
- return O.value.indexOf(n) >= 0;
1066
- }
1067
- function Nt() {
1068
- O.value = [];
1069
- }
1070
- function Gt() {
1071
- _.value > e.firstPage && (_.value -= 1, ae());
1072
- }
1073
- function Wt() {
1074
- _.value < g.value.last_page && (_.value += 1, ae());
1075
- }
1076
- function Kt(n) {
1077
- n != _.value && n >= e.firstPage && n <= g.value.last_page && (_.value = n, ae());
1078
- }
1079
- function $e(n) {
1080
- return k.value.indexOf(n) >= 0;
1081
- }
1082
- function it(n) {
1083
- $e(n) || k.value.push(n), Oe();
1084
- }
1085
- function ut(n) {
1086
- $e(n) && (k.value.splice(
1087
- k.value.indexOf(n),
1088
- 1
1089
- ), ke());
1090
- }
1091
- function zt(n) {
1092
- $e(n) ? ut(n) : it(n);
1093
- }
1094
- function Ut(n) {
1095
- n < 0 || n >= i.value.length || (i.value[n].visible = !0);
1096
- }
1097
- function Jt(n) {
1098
- n < 0 || n >= i.value.length || (i.value[n].visible = !1);
1099
- }
1100
- function Zt(n) {
1101
- n < 0 || n >= i.value.length || (i.value[n].visible = !i.value[n].visible);
1102
- }
1103
- function Qt(n = null, o = null, b = null) {
1104
- return n = n === null ? 0 : n, o = o === null ? e.perPage : o, b = b === null ? _.value : b, {
1105
- total: n,
1106
- per_page: o,
1107
- current_page: b,
1108
- last_page: Math.ceil(n / o) || 0,
1109
- next_page_url: "",
1110
- prev_page_url: "",
1111
- from: (b - 1) * o + 1,
1112
- to: Math.min(b * o, n)
1113
- };
1114
- }
1115
- function Ve(n) {
1116
- const o = (b) => ma(b) || Object.isFrozen(bt(b));
1117
- return o(n) || n.some(o) ? E(n.map((b) => te({}, b))).value : n;
1118
- }
1119
- function Fe() {
1120
- let n = !1;
1121
- h.value.forEach((o) => {
1122
- const b = o.sortField || o.field;
1123
- o.sortField !== b && (ha(o, "sortField", b), n = !0);
1124
- }), n && me();
1125
- }
1126
- function Yt() {
1127
- if (e.data !== null && Array.isArray(e.data)) {
1128
- fe(e.data);
1129
- return;
1130
- }
1131
- e.dataManager ? Xt() : fe(e.data);
1132
- }
1133
- function Xt() {
1134
- const n = e.dataManager(h.value, Qt());
1135
- tn(n) ? n.then((o) => fe(o)) : fe(n);
1136
- }
1137
- function en(n) {
1138
- return typeof n == "object" && n !== null;
1139
- }
1140
- function tn(n) {
1141
- return en(n) && typeof n.then == "function";
1142
- }
1143
- function Jn(n, o) {
1144
- return typeof e.rowClass == "function" ? e.rowClass(n, o) : e.rowClass;
1145
- }
1146
- function Zn(n, o) {
1147
- return typeof e.detailRowClass == "function" ? e.detailRowClass(n, o) : e.detailRowClass;
1148
- }
1149
- function Qn(n, o, b) {
1150
- return R("row-clicked", { data: n, index: o, event: b }), !0;
1151
- }
1152
- function Yn(n, o, b) {
1153
- R("row-dblclicked", { data: n, index: o, event: b });
1154
- }
1155
- function Xn(n, o, b) {
1156
- R("detail-row-clicked", { data: n, index: o, event: b });
1157
- }
1158
- function ea(n, o, b, C) {
1159
- R("cell-clicked", { data: n, index: o, field: b, event: C });
1160
- }
1161
- function ta(n, o, b, C) {
1162
- R("cell-dblclicked", { data: n, index: o, field: b, event: C });
1163
- }
1164
- function na(n, o, b, C) {
1165
- R("cell-rightclicked", { data: n, index: o, field: b, event: C });
1166
- }
1167
- function aa(n, o, b) {
1168
- R("row-mouseover", { data: n, index: o, event: b });
1169
- }
1170
- function ra(n, o) {
1171
- R("field-event", n, o, l == null ? void 0 : l.proxy);
1172
- }
1173
- function nn(n, o) {
1174
- R("header-event", n, o, l == null ? void 0 : l.proxy);
1175
- }
1176
- function an(n, o, b) {
1177
- if (b[e.trackBy] === void 0) {
1178
- he(`checkbox field: The "${e.trackBy}" field does not exist! Make sure the field you specify in "track-by" prop does exist.`);
1179
- return;
1180
- }
1181
- const C = b[e.trackBy];
1182
- n ? lt(C) : ot(C), R("checkbox-toggled", n, o);
1183
- }
1184
- function rn(n) {
1185
- var o, b;
1186
- n ? (o = f.value) == null || o.forEach((C) => {
1187
- lt(C[e.trackBy]);
1188
- }) : (b = f.value) == null || b.forEach((C) => {
1189
- ot(C[e.trackBy]);
1190
- }), R("checkbox-toggled-all", n);
1191
- }
1192
- function ln(n) {
1193
- n === "prev" ? Gt() : n === "next" ? Wt() : Kt(n);
1194
- }
1195
- function ct() {
1196
- return ae();
1197
- }
1198
- function R(n, ...o) {
1199
- return a(`${e.eventPrefix}${n}`, ...o);
1200
- }
1201
- function la() {
1202
- var n, o, b, C;
1203
- if (x.discover((C = (n = Be("default")) == null ? void 0 : n()) != null ? C : A ? (b = (o = l == null ? void 0 : l.proxy) == null ? void 0 : o.$slots) == null ? void 0 : b.default : void 0), e.fields === void 0 && x.reconcile(), A) return {};
1204
- const I = String(e.eventPrefix), B = [I, `${I}x`.replace(/-(\w)/g, (K, Z) => Z.toUpperCase()).slice(0, -1)].map((K) => `on${K.charAt(0).toUpperCase()}${K.slice(1)}`), ve = {};
1205
- for (const K in r)
1206
- if (Object.prototype.hasOwnProperty.call(r, K)) {
1207
- if (/^on[^a-z]/.test(K)) {
1208
- const Z = K.replace(/(?:Once|Passive|Capture)+$/, "");
1209
- if (!K.startsWith("on:") && !/^on[A-Z][a-z0-9]*$/.test(Z) && (I === "" || B.some((oa) => Z.startsWith(oa)))) continue;
1210
- }
1211
- ve[K] = r[K];
1212
- }
1213
- return ve;
1214
- }
1215
- function dt() {
1216
- return _.value = e.firstPage, ae();
1217
- }
1218
- function on() {
1219
- f.value = null, g.value = null, R("data-reset");
1220
- }
1221
- return G(() => e.multiSort, (n) => {
1222
- !n && h.value.length > 1 && (h.value.splice(1), me(), ae());
1223
- }), G(() => e.apiUrl, (n, o) => e.reactiveApiUrl && n !== o && dt()), G(() => e.data, fe, { immediate: !0 }), G([f, ce], () => {
1224
- L.value && Ce(ke);
1225
- }), G(() => e.tableHeight, (n, o) => {
1226
- (n == null || o != null) && Oe();
1227
- }), G(() => {
1228
- var n;
1229
- return { source: e.fields, fields: (n = e.fields) == null ? void 0 : n.map((o) => ({ source: o, fixed: typeof o == "object" && o !== null ? o.fixed : void 0, fixedOrder: typeof o == "object" && o !== null ? o.fixedOrder : void 0 })) };
1230
- }, (n, o) => {
1231
- var b;
1232
- if (!o || n.source !== o.source || !n.fields || n.fields.length !== ((b = o.fields) == null ? void 0 : b.length) || n.fields.some((C, I) => {
1233
- var B;
1234
- return C.source !== ((B = o.fields) == null ? void 0 : B[I].source);
1235
- })) {
1236
- We();
1237
- return;
1238
- }
1239
- n.fields.forEach((C, I) => {
1240
- var B, ve;
1241
- C.fixed !== ((B = o.fields) == null ? void 0 : B[I].fixed) && (i.value[I].fixed = C.fixed), C.fixedOrder !== ((ve = o.fields) == null ? void 0 : ve[I].fixedOrder) && (i.value[I].fixedOrder = C.fixedOrder);
1242
- });
1243
- }, { immediate: !0 }), G(() => e.perPage, ct), G(() => e.sortOrder, (n, o) => {
1244
- (n !== o || h.value === n || F) && (F = !1, h.value = Ve(n)), Fe();
1245
- }, { flush: "sync" }), G(() => e.sortOrder.slice(), at), G(() => e.httpOptions, (n) => {
1246
- M.value = n;
1247
- }, { immediate: !0 }), ft(te({}, A ? {} : { sortOrder: T }), { bodyRevision: v, getSlot: Be, getRootAttrs: la, tableContext: $t, fireEvent: R, bodyWrapper: d, vuetable: p, tableFields: w, tableData: f, tablePagination: g, currentPage: _, selectedTo: O, visibleDetailRows: k, lastScrollPosition: D, scrollBarWidth: ne, scrollVisible: $, order: h, optionsHttp: M, instanceFetch: re, tableCss: X, dataIsAvailable: le, useDetailRow: _e, hasRowIdentifier: ue, countVisibleFields: we, countTableData: ce, displayEmptyDataRow: xe, emptyDataTable: ge, lessThanMinRows: Se, blankRows: H, isApiMode: U, isDataMode: Y, isFixedHeader: L, getScrollBarWidth: Ft, handleScroll: Ie, warn: he, bodyClass: zn, normalizeFields: We, newField: Ke, normalizeFieldName: ze, setData: fe, checkIfRowIdentifierExists: Ae, makeTitle: Me, getFieldTitle: Rt, renderNormalField: Un, isFieldComponent: Ue, isFieldSlot: Tt, titleCase: Je, camelCase: qt, loadData: ae, fetch: Et, loadSuccess: jt, updateHeader: ke, checkScrollbarVisibility: Oe, loadFailed: Dt, getAllQueryParams: Ze, getSortParam: Ht, getDefaultSortParam: Qe, getAppendParams: It, isSortable: Le, currentSortOrderPosition: At, fieldIsInSortOrderPosition: Ye, orderBy: Mt, addSortColumn: Xe, removeSortColumn: et, setSortColumnDirection: tt, multiColumnSort: Bt, singleColumnSort: nt, clearSortOrder: Lt, hasFormatter: rt, callFormatter: Vt, getObjectValue: oe, selectId: lt, unselectId: ot, isSelectedRow: st, clearSelectedValues: Nt, gotoPreviousPage: Gt, gotoNextPage: Wt, gotoPage: Kt, isVisibleDetailRow: $e, showDetailRow: it, hideDetailRow: ut, toggleDetailRow: zt, showField: Ut, hideField: Jt, toggleField: Zt, makePagination: Qt, normalizeSortOrder: Fe, handleDataMode: Yt, callDataManager: Xt, isObject: en, isPromiseObject: tn, onRowClass: Jn, onDetailRowClass: Zn, onRowClicked: Qn, onRowDoubleClicked: Yn, onDetailRowClick: Xn, onCellClicked: ea, onCellDoubleClicked: ta, onCellRightClicked: na, onMouseOver: aa, onFieldEvent: ra, onHeaderEvent: nn, onCheckboxToggled: an, onCheckboxToggledAll: rn, changePage: ln, reload: ct, refresh: dt, resetData: on, VuetableColGroup: fn });
1248
- }
1249
- });
1250
- var Ua = function() {
1251
- var e = this, a = e.$createElement, t = e._self._c || a;
1252
- return t("div", e._b({ class: [e.tableCss.tableWrapper, { "vuetable-fixed-columns": e.tableContext.fixedColumnsEnabled }] }, "div", e.getRootAttrs(), !1), [e.isFixedHeader ? t("div", { staticClass: "vuetable-head-wrapper" }, [t("table", { class: ["vuetable", "fixed-header", e.tableCss.tableClass, e.tableCss.tableHeaderClass] }, [t("vuetable-col-group", { attrs: { "is-header": "" } }), e._v(" "), t("thead", [t("slot-outlet", { attrs: { content: e.getSlot("beforeHeader"), scope: e.tableContext.tableLayout } }), e._t("tableHeader", function() {
1253
- return [e.tableContext.tableLayout.groups.length && e.getSlot("tableHeaderGroups") ? t("slot-outlet", { attrs: { content: e.getSlot("tableHeaderGroups"), scope: e.tableContext.tableLayout } }) : e.tableContext.tableLayout.groups.length ? t("tr", { staticClass: "vuetable-header-groups" }, [e._l(e.tableContext.tableLayout.headerGroups, function(r) {
1254
- return t("th", { key: r.key, class: [e.tableContext.tableLayout.getSpanProps(r.fields).class, { "vuetable-group-start": r.isGroupStart, "vuetable-group-end": r.isGroupEnd }], style: e.tableContext.tableLayout.getSpanProps(r.fields).style, attrs: { colspan: r.colspan, scope: "colgroup" } }, [e._v(`
1255
- ` + e._s(r.value) + `
1256
- `)]);
1257
- }), e.scrollVisible ? t("vuetable-col-gutter") : e._e()], 2) : e._e(), e._l(e.headerRows, function(r, s) {
1258
- return t(r, { key: s, tag: "component", attrs: { index: s, vuetable: e.tableContext }, on: { "vuetable:header-event": e.onHeaderEvent } });
1259
- })];
1260
- }, null, e.tableContext.tableLayout), t("slot-outlet", { attrs: { content: e.getSlot("afterHeader"), scope: e.tableContext.tableLayout } })], 2)], 1)]) : e._e(), e._v(" "), t("render-boundary", { attrs: { revision: e.bodyRevision, "on-rendered": e.tableContext.fixedColumnsEnabled ? e.tableContext.scheduleFixedColumns : void 0 } }, [t("div", { ref: "bodyWrapper", staticClass: "vuetable-body-wrapper", class: { "fixed-header": e.isFixedHeader }, style: { height: e.tableHeight } }, [t("table", { class: ["vuetable", e.isFixedHeader ? "fixed-header" : "", e.tableCss.tableClass, e.tableCss.tableBodyClass] }, [t("vuetable-col-group"), e._v(" "), e.isFixedHeader ? e._e() : t("thead", [t("slot-outlet", { attrs: { content: e.getSlot("beforeHeader"), scope: e.tableContext.tableLayout } }), t("slot-outlet", { attrs: { content: e.getSlot("tableHeader"), scope: e.tableContext.tableLayout } }, [e.tableContext.tableLayout.groups.length && e.getSlot("tableHeaderGroups") ? t("slot-outlet", { attrs: { content: e.getSlot("tableHeaderGroups"), scope: e.tableContext.tableLayout } }) : e.tableContext.tableLayout.groups.length ? t("tr", { staticClass: "vuetable-header-groups" }, [e._l(e.tableContext.tableLayout.headerGroups, function(r) {
1261
- return t("th", { key: r.key, class: [e.tableContext.tableLayout.getSpanProps(r.fields).class, { "vuetable-group-start": r.isGroupStart, "vuetable-group-end": r.isGroupEnd }], style: e.tableContext.tableLayout.getSpanProps(r.fields).style, attrs: { colspan: r.colspan, scope: "colgroup" } }, [e._v(`
1262
- ` + e._s(r.value) + `
1263
- `)]);
1264
- }), e.scrollVisible ? t("vuetable-col-gutter") : e._e()], 2) : e._e(), e._l(e.headerRows, function(r, s) {
1265
- return t(r, { key: s, tag: "component", attrs: { index: s, vuetable: e.tableContext }, on: { "vuetable:header-event": e.onHeaderEvent } });
1266
- })], 2), t("slot-outlet", { attrs: { content: e.getSlot("afterHeader"), scope: e.tableContext.tableLayout } })], 1), e._v(" "), t("tfoot", [t("slot-outlet", { attrs: { content: e.getSlot("beforeFooter"), scope: e.tableContext.tableLayout } }), t("slot-outlet", { attrs: { content: e.getSlot("tableFooter"), scope: e.tableContext.tableLayout } }), t("slot-outlet", { attrs: { content: e.getSlot("afterFooter"), scope: e.tableContext.tableLayout } })], 1), e._v(" "), t("tbody", { staticClass: "vuetable-body" }, [e._l(e.tableData, function(r, s) {
1267
- return [t("tr", { key: s + ":0", class: e.onRowClass(r, s), attrs: { "item-index": s }, on: { click: function(l) {
1268
- return e.onRowClicked(r, s, l);
1269
- }, dblclick: function(l) {
1270
- return e.onRowDoubleClicked(r, s, l);
1271
- }, mouseover: function(l) {
1272
- return e.onMouseOver(r, s, l);
1273
- } } }, [e._l(e.tableFields, function(l) {
1274
- return [l.visible ? [e.isFieldComponent(l.name) ? [t(l.name, { key: e.tableContext.getColumnKey(l) + ":0.0.0:" + e.tableContext.getColumnKey(l), tag: "component", class: e.bodyClass("vuetable-component", l), style: [{ width: l.width || void 0 }, e.tableContext.getCellProps(l).style], attrs: { "row-data": r, "row-index": s, "row-field": l, vuetable: e.tableContext, "data-vuetable-column": e.tableContext.getCellProps(l)["data-vuetable-column"] }, on: { "vuetable:field-event": e.onFieldEvent } })] : e.isFieldSlot(l.name) ? [t("td", { key: e.tableContext.getColumnKey(l) + ":0.0.0.0:" + e.tableContext.getColumnKey(l), class: e.bodyClass("vuetable-slot", l), style: [{ width: l.width || void 0 }, e.tableContext.getCellProps(l).style], attrs: { "data-vuetable-column": e.tableContext.getCellProps(l)["data-vuetable-column"] } }, [t("slot-outlet", { attrs: { content: e.getSlot(l.name), scope: { rowData: r, rowIndex: s, rowField: l } } })], 1)] : e.tableContext.getColumnSlot(l.name) ? [t("td", { key: e.tableContext.getColumnKey(l) + ":0.0.0.0:" + e.tableContext.getColumnKey(l), class: e.bodyClass("vuetable-td-" + l.name, l), style: [{ width: l.width || void 0 }, e.tableContext.getCellProps(l).style], attrs: { "data-vuetable-column": e.tableContext.getCellProps(l)["data-vuetable-column"] }, on: { click: function(d) {
1275
- return e.onCellClicked(r, s, l, d);
1276
- }, dblclick: function(d) {
1277
- return e.onCellDoubleClicked(r, s, l, d);
1278
- }, contextmenu: function(d) {
1279
- return e.onCellRightClicked(r, s, l, d);
1280
- } } }, [t("slot-outlet", { attrs: { content: e.tableContext.getColumnSlot(l.name), scope: { row: r, index: s, column: l } } })], 1)] : [t("td", { key: e.tableContext.getColumnKey(l) + ":0.0.0.0:" + e.tableContext.getColumnKey(l), class: e.bodyClass("vuetable-td-" + l.name, l), style: [{ width: l.width || void 0 }, e.tableContext.getCellProps(l).style], attrs: { "data-vuetable-column": e.tableContext.getCellProps(l)["data-vuetable-column"] }, domProps: { innerHTML: e._s(e.renderNormalField(l, r)) }, on: { click: function(d) {
1281
- return e.onCellClicked(r, s, l, d);
1282
- }, dblclick: function(d) {
1283
- return e.onCellDoubleClicked(r, s, l, d);
1284
- }, contextmenu: function(d) {
1285
- return e.onCellRightClicked(r, s, l, d);
1286
- } } })]] : e._e()];
1287
- })], 2), e._v(" "), e.useDetailRow ? [t("transition", { key: s + ":1.0:" + s, attrs: { name: e.detailRowTransition } }, [e.isVisibleDetailRow(r[e.trackBy]) ? t("tr", { class: e.onDetailRowClass(r, s), on: { click: function(l) {
1288
- return e.onDetailRowClick(r, s, l);
1289
- } } }, [t("td", { attrs: { colspan: e.countVisibleFields } }, [t("vuetable-detail-host", { attrs: { "detail-component": e.detailRowComponent, "row-data": r, "row-index": s, options: e.detailRowOptions } })], 1)]) : e._e()])] : e._e()];
1290
- }), e._v(" "), e.displayEmptyDataRow ? [t("tr", [t("td", { staticClass: "vuetable-empty-result", attrs: { colspan: e.countVisibleFields }, domProps: { innerHTML: e._s(e.noDataTemplate) } })])] : e._e(), e._v(" "), e.lessThanMinRows ? e._l(e.blankRows, function(r) {
1291
- return t("tr", { key: r, staticClass: "blank-row" }, [e._l(e.tableFields, function(s) {
1292
- return [s.visible ? t("td", { key: e.tableContext.getColumnKey(s), class: [e.tableContext.groupClass(s), e.tableContext.getCellProps(s).class], style: e.tableContext.getCellProps(s).style, attrs: { "data-vuetable-column": e.tableContext.getCellProps(s)["data-vuetable-column"] } }, [e._v(`
1293
-  
1294
- `)]) : e._e()];
1295
- })], 2);
1296
- }) : e._e()], 2)], 1)])])], 1);
1297
- }, Ja = [];
1298
- Pe.render = Ua;
1299
- Pe.staticRenderFns = Ja;
1300
- const Za = Object.assign(N({
1301
- name: "VuetableColumn",
1302
- inheritAttrs: !1,
1303
- props: {
1304
- field: { type: String, required: !0 },
1305
- label: String,
1306
- sortable: Boolean,
1307
- sortField: String,
1308
- width: String,
1309
- fixed: { type: String, validator: (e) => e === "left" || e === "right" },
1310
- fixedOrder: Number,
1311
- visible: { type: Boolean, default: !0 },
1312
- headerClass: String,
1313
- cellClass: String,
1314
- group: { type: [String, Number], default: null }
1315
- },
1316
- render: () => null
1317
- }), { __vuetableColumn: !0 });
1318
- function V(e) {
1319
- return typeof e == "function" ? e() : Ca(e);
1320
- }
1321
- function Ln(e, a) {
1322
- const t = e === void 0 || In(e) || typeof e == "function" || typeof e == "number" ? { onEachSide: e, firstPage: a } : e, r = () => V(t.onEachSide === void 0 ? 2 : t.onEachSide), s = () => V(t.firstPage === void 0 ? 1 : t.firstPage), l = E(null), d = E({}), v = E("vuetable-pagination:"), c = y(() => {
1323
- var k, D;
1324
- return (D = (k = l.value) == null ? void 0 : k.last_page) != null ? D : 0;
1325
- }), u = y(() => {
1326
- var k;
1327
- return ((k = l.value) == null ? void 0 : k.current_page) === V(s);
1328
- }), p = y(() => {
1329
- var k;
1330
- return ((k = l.value) == null ? void 0 : k.current_page) === c.value;
1331
- }), i = y(() => V(r) * 2 + 1), m = y(() => l.value ? l.value.last_page - V(s) + 1 : 0), w = y(() => m.value < V(r) * 2 + 4), x = y(() => !l.value || l.value.current_page <= V(r) ? 1 : l.value.current_page >= m.value - V(r) ? m.value - V(r) * 2 : l.value.current_page - V(r));
1332
- function S() {
1333
- d.value = z(z({}, ie.pagination), V(t.css === void 0 ? {} : t.css));
1334
- }
1335
- function f(k) {
1336
- var D;
1337
- (D = t.emit) == null || D.call(t, "vuetable-pagination:change-page", k);
1338
- }
1339
- function g(k) {
1340
- l.value = k;
1341
- }
1342
- function _() {
1343
- l.value = null;
1344
- }
1345
- function O(k) {
1346
- var D;
1347
- return k === ((D = l.value) == null ? void 0 : D.current_page);
1348
- }
1349
- return S(), {
1350
- tablePagination: l,
1351
- customCss: d,
1352
- eventPrefix: v,
12
+ }, A = (e, n) => K(e, Q(n));
13
+ import { r as C, u as E, a as B, c as Y, i as Z, V as ee, b as te, d as ne, e as ae, f as se, g as ie } from "./chunks/vue2/createVuetable-zwzXUm5x.js";
14
+ import { h as Le } from "./chunks/vue2/createVuetable-zwzXUm5x.js";
15
+ import { unref as oe, isRef as L, ref as S, computed as f, defineComponent as _, inject as le, onMounted as re, onUpdated as ue, watch as ce } from "vue-demi";
16
+ import de from "mitt";
17
+ function b(e) {
18
+ return typeof e == "function" ? e() : oe(e);
19
+ }
20
+ function H(e, n) {
21
+ const t = e === void 0 || L(e) || typeof e == "function" || typeof e == "number" ? { onEachSide: e, firstPage: n } : e, a = () => b(t.onEachSide === void 0 ? 2 : t.onEachSide), s = () => b(t.firstPage === void 0 ? 1 : t.firstPage), i = S(null), l = S({}), u = S("vuetable-pagination:"), c = f(() => {
22
+ var v, P;
23
+ return (P = (v = i.value) == null ? void 0 : v.last_page) != null ? P : 0;
24
+ }), d = f(() => {
25
+ var v;
26
+ return ((v = i.value) == null ? void 0 : v.current_page) === b(s);
27
+ }), g = f(() => {
28
+ var v;
29
+ return ((v = i.value) == null ? void 0 : v.current_page) === c.value;
30
+ }), o = f(() => b(a) * 2 + 1), p = f(() => i.value ? i.value.last_page - b(s) + 1 : 0), m = f(() => p.value < b(a) * 2 + 4), h = f(() => !i.value || i.value.current_page <= b(a) ? 1 : i.value.current_page >= p.value - b(a) ? p.value - b(a) * 2 : i.value.current_page - b(a));
31
+ function w() {
32
+ l.value = C("pagination", b(t.css === void 0 ? {} : t.css), b(t.unstyled === void 0 ? !1 : t.unstyled));
33
+ }
34
+ function x(v) {
35
+ var P;
36
+ (P = t.emit) == null || P.call(t, "vuetable-pagination:change-page", v);
37
+ }
38
+ function $(v) {
39
+ i.value = v;
40
+ }
41
+ function y() {
42
+ i.value = null;
43
+ }
44
+ function O(v) {
45
+ var P;
46
+ return v === ((P = i.value) == null ? void 0 : P.current_page);
47
+ }
48
+ return w(), {
49
+ tablePagination: i,
50
+ customCss: l,
51
+ eventPrefix: u,
1353
52
  lastPage: c,
1354
- isOnFirstPage: u,
1355
- isOnLastPage: p,
1356
- notEnoughPages: w,
1357
- windowSize: i,
1358
- windowStart: x,
1359
- totalPage: m,
1360
- setPaginationData: g,
1361
- resetData: _,
53
+ isOnFirstPage: d,
54
+ isOnLastPage: g,
55
+ notEnoughPages: m,
56
+ windowSize: o,
57
+ windowStart: h,
58
+ totalPage: p,
59
+ setPaginationData: $,
60
+ resetData: y,
1362
61
  isCurrentPage: O,
1363
- mergeCss: S,
1364
- loadPage: f
62
+ mergeCss: w,
63
+ loadPage: x
1365
64
  };
1366
65
  }
1367
- var Qa = Object.defineProperty, Cn = Object.getOwnPropertySymbols, Ya = Object.prototype.hasOwnProperty, Xa = Object.prototype.propertyIsEnumerable, Pn = (e, a, t) => a in e ? Qa(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, _n = (e, a) => {
1368
- for (var t in a || (a = {}))
1369
- Ya.call(a, t) && Pn(e, t, a[t]);
1370
- if (Cn)
1371
- for (var t of Cn(a))
1372
- Xa.call(a, t) && Pn(e, t, a[t]);
1373
- return e;
1374
- };
1375
- const xt = N({
66
+ const j = _({
1376
67
  props: {
1377
68
  css: { type: Object, required: !1, default: () => ({}) },
69
+ unstyled: { type: Boolean, required: !1, default: void 0 },
1378
70
  onEachSide: { type: Number, required: !1, default: 2 },
1379
71
  firstPage: { type: Number, required: !1, default: 1 }
1380
72
  },
1381
73
  emits: ["vuetable-pagination:change-page"],
1382
- setup(e, { emit: a }) {
1383
- const t = Ct(_n(_n({}, ie.pagination), e.css)), {
1384
- tablePagination: r,
1385
- totalPage: s,
74
+ setup(e, { emit: n }) {
75
+ const t = E(e), a = f(() => C("pagination", e.css, t.value)), {
76
+ tablePagination: s,
77
+ totalPage: i,
1386
78
  lastPage: l,
1387
- isOnFirstPage: d,
1388
- isOnLastPage: v,
1389
- notEnoughPages: c,
1390
- windowSize: u,
1391
- windowStart: p,
1392
- isCurrentPage: i,
79
+ isOnFirstPage: u,
80
+ isOnLastPage: c,
81
+ notEnoughPages: d,
82
+ windowSize: g,
83
+ windowStart: o,
84
+ isCurrentPage: p,
1393
85
  setPaginationData: m,
1394
- resetData: w
1395
- } = Ln(() => e.onEachSide, () => e.firstPage);
1396
- function x(S) {
1397
- a("vuetable-pagination:change-page", S);
86
+ resetData: h
87
+ } = H(() => e.onEachSide, () => e.firstPage);
88
+ function w(x) {
89
+ n("vuetable-pagination:change-page", x);
1398
90
  }
1399
- return { tableCss: t, tablePagination: r, totalPage: s, lastPage: l, isOnFirstPage: d, isOnLastPage: v, notEnoughPages: c, windowSize: u, windowStart: p, isCurrentPage: i, setPaginationData: m, resetData: w, loadPage: x };
91
+ return { resolvedUnstyled: t, tableCss: a, tablePagination: s, totalPage: i, lastPage: l, isOnFirstPage: u, isOnLastPage: c, notEnoughPages: d, windowSize: g, windowStart: o, isCurrentPage: p, setPaginationData: m, resetData: h, loadPage: w };
1400
92
  }
1401
93
  });
1402
- var er = function() {
1403
- var e = this, a = e.$createElement, t = e._self._c || a;
1404
- return t("div", { directives: [{ name: "show", rawName: "v-show", value: e.tablePagination && e.lastPage > e.firstPage, expression: "tablePagination && lastPage > firstPage" }], class: e.tableCss.wrapperClass }, [t("a", { class: ["btn-nav", e.tableCss.linkClass, e.isOnFirstPage ? e.tableCss.disabledClass : ""], on: { click: function(r) {
94
+ var fe = function() {
95
+ var e = this, n = e.$createElement, t = e._self._c || n;
96
+ return t("div", { directives: [{ name: "show", rawName: "v-show", value: e.tablePagination && e.lastPage > e.firstPage, expression: "tablePagination && lastPage > firstPage" }], class: [e.tableCss.wrapperClass, { "vuetable-unstyled": e.resolvedUnstyled, "vuetable-styled": !e.resolvedUnstyled }] }, [t("a", { class: ["btn-nav", e.tableCss.linkClass, e.isOnFirstPage ? e.tableCss.disabledClass : ""], attrs: { "aria-label": "First page" }, on: { click: function(a) {
1405
97
  return e.loadPage(e.firstPage);
1406
- } } }, [e.tableCss.icons.first != "" ? t("i", { class: [e.tableCss.icons.first] }) : t("span", [e._v(`
1407
- «
1408
- `)])]), e._v(" "), t("a", { class: ["btn-nav", e.tableCss.linkClass, e.isOnFirstPage ? e.tableCss.disabledClass : ""], on: { click: function(r) {
98
+ } } }, [e.tableCss.icons && e.tableCss.icons.first ? t("i", { class: [e.tableCss.icons.first] }) : t("span", [e._v(`
99
+ First
100
+ `)])]), e._v(" "), t("a", { class: ["btn-nav", e.tableCss.linkClass, e.isOnFirstPage ? e.tableCss.disabledClass : ""], attrs: { "aria-label": "Previous page" }, on: { click: function(a) {
1409
101
  return e.loadPage("prev");
1410
- } } }, [e.tableCss.icons.next != "" ? t("i", { class: [e.tableCss.icons.prev] }) : t("span", [e._v(`
1411
-  ‹
1412
- `)])]), e._v(" "), e.notEnoughPages ? e._l(e.totalPage, function(r, s) {
1413
- return t("a", { key: s, class: [e.tableCss.pageClass, e.isCurrentPage(s + e.firstPage) ? e.tableCss.activeClass : ""], domProps: { innerHTML: e._s(r) }, on: { click: function(l) {
102
+ } } }, [e.tableCss.icons && e.tableCss.icons.prev ? t("i", { class: [e.tableCss.icons.prev] }) : t("span", [e._v(`
103
+ Previous
104
+ `)])]), e._v(" "), e.notEnoughPages ? e._l(e.totalPage, function(a, s) {
105
+ return t("a", { key: s, class: [e.tableCss.pageClass, e.isCurrentPage(s + e.firstPage) ? e.tableCss.activeClass : ""], domProps: { innerHTML: e._s(a) }, on: { click: function(i) {
1414
106
  return e.loadPage(s + e.firstPage);
1415
107
  } } });
1416
- }) : e._l(e.windowSize, function(r, s) {
1417
- return t("a", { key: s, class: [e.tableCss.pageClass, e.isCurrentPage(e.windowStart + s + e.firstPage - 1) ? e.tableCss.activeClass : ""], domProps: { innerHTML: e._s(e.windowStart + r - 1) }, on: { click: function(l) {
108
+ }) : e._l(e.windowSize, function(a, s) {
109
+ return t("a", { key: s, class: [e.tableCss.pageClass, e.isCurrentPage(e.windowStart + s + e.firstPage - 1) ? e.tableCss.activeClass : ""], domProps: { innerHTML: e._s(e.windowStart + a - 1) }, on: { click: function(i) {
1418
110
  return e.loadPage(e.windowStart + s + e.firstPage - 1);
1419
111
  } } });
1420
- }), e._v(" "), t("a", { class: ["btn-nav", e.tableCss.linkClass, e.isOnLastPage ? e.tableCss.disabledClass : ""], on: { click: function(r) {
112
+ }), e._v(" "), t("a", { class: ["btn-nav", e.tableCss.linkClass, e.isOnLastPage ? e.tableCss.disabledClass : ""], attrs: { "aria-label": "Next page" }, on: { click: function(a) {
1421
113
  return e.loadPage("next");
1422
- } } }, [e.tableCss.icons.next != "" ? t("i", { class: [e.tableCss.icons.next] }) : t("span", [e._v(`
1423
- › 
1424
- `)])]), e._v(" "), t("a", { class: ["btn-nav", e.tableCss.linkClass, e.isOnLastPage ? e.tableCss.disabledClass : ""], on: { click: function(r) {
114
+ } } }, [e.tableCss.icons && e.tableCss.icons.next ? t("i", { class: [e.tableCss.icons.next] }) : t("span", [e._v(`
115
+ Next
116
+ `)])]), e._v(" "), t("a", { class: ["btn-nav", e.tableCss.linkClass, e.isOnLastPage ? e.tableCss.disabledClass : ""], attrs: { "aria-label": "Last page" }, on: { click: function(a) {
1425
117
  return e.loadPage(e.lastPage);
1426
- } } }, [e.tableCss.icons.last != "" ? t("i", { class: [e.tableCss.icons.last] }) : t("span", [e._v(`
1427
- »
118
+ } } }, [e.tableCss.icons && e.tableCss.icons.last ? t("i", { class: [e.tableCss.icons.last] }) : t("span", [e._v(`
119
+ Last
1428
120
  `)])])], 2);
1429
- }, tr = [];
1430
- xt.render = er;
1431
- xt.staticRenderFns = tr;
1432
- var nr = Object.defineProperty, wn = Object.getOwnPropertySymbols, ar = Object.prototype.hasOwnProperty, rr = Object.prototype.propertyIsEnumerable, xn = (e, a, t) => a in e ? nr(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, Sn = (e, a) => {
1433
- for (var t in a || (a = {}))
1434
- ar.call(a, t) && xn(e, t, a[t]);
1435
- if (wn)
1436
- for (var t of wn(a))
1437
- rr.call(a, t) && xn(e, t, a[t]);
1438
- return e;
1439
- };
1440
- const St = N({
121
+ }, ge = [];
122
+ j.render = fe;
123
+ j.staticRenderFns = ge;
124
+ const I = _({
1441
125
  props: {
1442
126
  css: { type: Object, required: !1, default: () => ({}) },
127
+ unstyled: { type: Boolean, required: !1, default: void 0 },
1443
128
  pageText: { type: String, required: !1, default: "Page" },
1444
129
  onEachSide: { type: Number, required: !1, default: 2 },
1445
130
  firstPage: { type: Number, required: !1, default: 1 }
1446
131
  },
1447
132
  emits: ["vuetable-pagination:change-page"],
1448
- setup(e, { emit: a }) {
1449
- const t = Pa(), r = Ct(Sn(Sn({}, ie.pagination), e.css)), {
1450
- tablePagination: s,
133
+ setup(e, { emit: n }) {
134
+ const t = de(), a = E(e), s = f(() => C("pagination", e.css, a.value)), {
135
+ tablePagination: i,
1451
136
  totalPage: l,
1452
- lastPage: d,
1453
- isOnFirstPage: v,
1454
- isOnLastPage: c,
1455
- notEnoughPages: u,
1456
- windowSize: p,
1457
- windowStart: i,
137
+ lastPage: u,
138
+ isOnFirstPage: c,
139
+ isOnLastPage: d,
140
+ notEnoughPages: g,
141
+ windowSize: o,
142
+ windowStart: p,
1458
143
  isCurrentPage: m,
1459
- setPaginationData: w,
1460
- resetData: x
1461
- } = Ln(() => e.onEachSide, () => e.firstPage);
1462
- function S(g) {
1463
- a("vuetable-pagination:change-page", g);
144
+ setPaginationData: h,
145
+ resetData: w
146
+ } = H(() => e.onEachSide, () => e.firstPage);
147
+ function x(y) {
148
+ n("vuetable-pagination:change-page", y);
1464
149
  }
1465
- function f(g) {
1466
- S(g.target.selectedIndex + e.firstPage);
150
+ function $(y) {
151
+ x(y.target.selectedIndex + e.firstPage);
1467
152
  }
1468
- return t.on("vuetable:pagination-data", (g) => {
1469
- w(g);
1470
- }), { emitter: t, tableCss: r, tablePagination: s, totalPage: l, lastPage: d, isOnFirstPage: v, isOnLastPage: c, notEnoughPages: u, windowSize: p, windowStart: i, isCurrentPage: m, setPaginationData: w, resetData: x, loadPage: S, onPageSelected: f };
153
+ return t.on("vuetable:pagination-data", (y) => {
154
+ h(y);
155
+ }), { resolvedUnstyled: a, emitter: t, tableCss: s, tablePagination: i, totalPage: l, lastPage: u, isOnFirstPage: c, isOnLastPage: d, notEnoughPages: g, windowSize: o, windowStart: p, isCurrentPage: m, setPaginationData: h, resetData: w, loadPage: x, onPageSelected: $ };
1471
156
  }
1472
157
  });
1473
- var lr = function() {
1474
- var e, a, t = this, r = t.$createElement, s = t._self._c || r;
1475
- return s("div", { class: [t.tableCss.wrapperClass] }, [s("a", { class: [t.tableCss.linkClass, (e = {}, e[t.tableCss.disabledClass] = t.isOnFirstPage, e)], on: { click: function(l) {
158
+ var be = function() {
159
+ var e, n, t = this, a = t.$createElement, s = t._self._c || a;
160
+ return s("div", { class: [t.tableCss.wrapperClass, { "vuetable-unstyled": t.resolvedUnstyled, "vuetable-styled": !t.resolvedUnstyled }] }, [s("a", { class: [t.tableCss.linkClass, (e = {}, e[t.tableCss.disabledClass] = t.isOnFirstPage, e)], attrs: { "aria-label": "Previous page" }, on: { click: function(i) {
1476
161
  return t.loadPage("prev");
1477
- } } }, [s("i", { class: t.tableCss.icons.prev })]), t._v(" "), s("select", { class: ["vuetable-pagination-dropdown", t.tableCss.dropdownClass], on: { change: function(l) {
1478
- return t.onPageSelected(l);
1479
- } } }, t._l(t.totalPage, function(l, d) {
1480
- return s("option", { key: l, class: [t.tableCss.pageClass], domProps: { value: d + t.firstPage, selected: t.isCurrentPage(d + t.firstPage) } }, [t._v(`
1481
- ` + t._s(t.pageText) + " " + t._s(l) + `
162
+ } } }, [t.tableCss.icons && t.tableCss.icons.prev ? s("i", { class: t.tableCss.icons.prev }) : s("span", [t._v(`
163
+ Previous
164
+ `)])]), t._v(" "), s("select", { class: ["vuetable-pagination-dropdown", t.tableCss.dropdownClass], on: { change: function(i) {
165
+ return t.onPageSelected(i);
166
+ } } }, t._l(t.totalPage, function(i, l) {
167
+ return s("option", { key: i, class: [t.tableCss.pageClass], domProps: { value: l + t.firstPage, selected: t.isCurrentPage(l + t.firstPage) } }, [t._v(`
168
+ ` + t._s(t.pageText) + " " + t._s(i) + `
1482
169
  `)]);
1483
- }), 0), t._v(" "), s("a", { class: [t.tableCss.linkClass, (a = {}, a[t.tableCss.disabledClass] = t.isOnLastPage, a)], on: { click: function(l) {
170
+ }), 0), t._v(" "), s("a", { class: [t.tableCss.linkClass, (n = {}, n[t.tableCss.disabledClass] = t.isOnLastPage, n)], attrs: { "aria-label": "Next page" }, on: { click: function(i) {
1484
171
  return t.loadPage("next");
1485
- } } }, [s("i", { class: t.tableCss.icons.next })])]);
1486
- }, or = [];
1487
- St.render = lr;
1488
- St.staticRenderFns = or;
1489
- function sr(e, a) {
1490
- const t = e === void 0 || In(e) || typeof e == "function" || typeof e == "string" ? { noDataTemplate: e, infoTemplate: a } : e, r = () => V(t.noDataTemplate === void 0 ? "No relevant data" : t.noDataTemplate), s = () => V(t.infoTemplate === void 0 ? "Displaying {from} to {to} of {total} items" : t.infoTemplate), l = E(null), d = E({}), v = y(() => l.value == null || l.value.total == 0), c = y(() => v.value ? V(r) : V(s).replace("{from}", `${l.value.from || 0}`).replace("{to}", `${l.value.to || 0}`).replace("{total}", `${l.value.total || 0}`));
1491
- function u() {
1492
- d.value = z(z({}, ie.paginationInfo), V(t.css === void 0 ? {} : t.css));
172
+ } } }, [t.tableCss.icons && t.tableCss.icons.next ? s("i", { class: t.tableCss.icons.next }) : s("span", [t._v(`
173
+ Next
174
+ `)])])]);
175
+ }, pe = [];
176
+ I.render = be;
177
+ I.staticRenderFns = pe;
178
+ function ve(e, n) {
179
+ const t = e === void 0 || L(e) || typeof e == "function" || typeof e == "string" ? { noDataTemplate: e, infoTemplate: n } : e, a = () => b(t.noDataTemplate === void 0 ? "No relevant data" : t.noDataTemplate), s = () => b(t.infoTemplate === void 0 ? "Displaying {from} to {to} of {total} items" : t.infoTemplate), i = S(null), l = S({}), u = f(() => i.value == null || i.value.total == 0), c = f(() => u.value ? b(a) : b(s).replace("{from}", `${i.value.from || 0}`).replace("{to}", `${i.value.to || 0}`).replace("{total}", `${i.value.total || 0}`));
180
+ function d() {
181
+ l.value = C("paginationInfo", b(t.css === void 0 ? {} : t.css), b(t.unstyled === void 0 ? !1 : t.unstyled));
1493
182
  }
1494
- function p(w) {
1495
- l.value = w;
183
+ function g(m) {
184
+ i.value = m;
1496
185
  }
1497
- function i() {
1498
- l.value = null;
186
+ function o() {
187
+ i.value = null;
1499
188
  }
1500
- function m(w) {
1501
- var x;
1502
- return w === ((x = l.value) == null ? void 0 : x.current_page);
189
+ function p(m) {
190
+ var h;
191
+ return m === ((h = i.value) == null ? void 0 : h.current_page);
1503
192
  }
1504
- return u(), {
1505
- tablePagination: l,
1506
- customCss: d,
193
+ return d(), {
194
+ tablePagination: i,
195
+ customCss: l,
1507
196
  paginationInfo: c,
1508
- setPaginationData: p,
1509
- resetData: i,
1510
- isCurrentPage: m,
1511
- mergeCss: u
197
+ setPaginationData: g,
198
+ resetData: o,
199
+ isCurrentPage: p,
200
+ mergeCss: d
1512
201
  };
1513
202
  }
1514
- var ir = Object.defineProperty, kn = Object.getOwnPropertySymbols, ur = Object.prototype.hasOwnProperty, cr = Object.prototype.propertyIsEnumerable, On = (e, a, t) => a in e ? ir(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, $n = (e, a) => {
1515
- for (var t in a || (a = {}))
1516
- ur.call(a, t) && On(e, t, a[t]);
1517
- if (kn)
1518
- for (var t of kn(a))
1519
- cr.call(a, t) && On(e, t, a[t]);
1520
- return e;
1521
- };
1522
- const kt = N({
203
+ const R = _({
1523
204
  props: {
1524
205
  css: { type: null, required: !1, default: () => ({}) },
206
+ unstyled: { type: Boolean, required: !1, default: void 0 },
1525
207
  infoTemplate: { type: String, required: !1, default: "Displaying {from} to {to} of {total} items" },
1526
208
  noDataTemplate: { type: String, required: !1, default: "No relevant data" }
1527
209
  },
1528
210
  setup(e) {
1529
211
  const {
1530
- tablePagination: a,
212
+ tablePagination: n,
1531
213
  paginationInfo: t,
1532
- setPaginationData: r,
214
+ setPaginationData: a,
1533
215
  resetData: s
1534
- } = sr(() => e.noDataTemplate, () => e.infoTemplate), l = E($n($n({}, ie.paginationInfo), e.css));
1535
- return { tablePagination: a, paginationInfo: t, setPaginationData: r, resetData: s, tableCss: l };
216
+ } = ve(() => e.noDataTemplate, () => e.infoTemplate), i = E(e), l = f(() => C("paginationInfo", e.css, i.value));
217
+ return { resolvedUnstyled: i, tablePagination: n, paginationInfo: t, setPaginationData: a, resetData: s, tableCss: l };
1536
218
  }
1537
219
  });
1538
- var dr = function() {
1539
- var e = this, a = e.$createElement, t = e._self._c || a;
1540
- return t("div", { class: ["vuetable-pagination-info", e.tableCss.infoClass], domProps: { innerHTML: e._s(e.paginationInfo) } });
1541
- }, fr = [];
1542
- kt.render = dr;
1543
- kt.staticRenderFns = fr;
1544
- const vr = N({
220
+ var he = function() {
221
+ var e = this, n = e.$createElement, t = e._self._c || n;
222
+ return t("div", { class: ["vuetable-pagination-info", e.tableCss.infoClass, { "vuetable-unstyled": e.resolvedUnstyled, "vuetable-styled": !e.resolvedUnstyled }], domProps: { innerHTML: e._s(e.paginationInfo) } });
223
+ }, me = [];
224
+ R.render = he;
225
+ R.staticRenderFns = me;
226
+ const Pe = _({
1545
227
  props: {
1546
228
  rowData: {
1547
229
  type: Object,
@@ -1566,11 +248,11 @@ const vr = N({
1566
248
  default: null
1567
249
  }
1568
250
  }
1569
- }), Dr = N({
1570
- mixins: [vr],
251
+ }), Re = _({
252
+ mixins: [Pe],
1571
253
  methods: {
1572
- toggleCheckbox(e, a) {
1573
- this.vuetable.onCheckboxToggled(a.target.checked, this.rowField.name, e);
254
+ toggleCheckbox(e, n) {
255
+ this.vuetable.onCheckboxToggled(n.target.checked, this.rowField.name, e);
1574
256
  },
1575
257
  toggleAllCheckbox(e) {
1576
258
  this.vuetable.onCheckboxToggledAll(e.target.checked);
@@ -1581,21 +263,13 @@ const vr = N({
1581
263
  isAllItemsInCurrentPageSelected() {
1582
264
  var e;
1583
265
  if (!this.vuetable.tableData) return;
1584
- let a = this.vuetable.trackBy, t = (e = this.$el) == null ? void 0 : e.querySelector("input[type=checkbox]"), r = this.vuetable.tableData.filter((s) => this.vuetable.isSelectedRow(s[a]));
1585
- return r.length <= 0 ? (t && (t.indeterminate = !1), !1) : r.length < this.vuetable.tableData.length ? (t && (t.indeterminate = !0), !0) : (t && (t.indeterminate = !1), !0);
266
+ let n = this.vuetable.trackBy, t = (e = this.$el) == null ? void 0 : e.querySelector("input[type=checkbox]"), a = this.vuetable.tableData.filter((s) => this.vuetable.isSelectedRow(s[n]));
267
+ return a.length <= 0 ? (t && (t.indeterminate = !1), !1) : a.length < this.vuetable.tableData.length ? (t && (t.indeterminate = !0), !0) : (t && (t.indeterminate = !1), !0);
1586
268
  }
1587
269
  }
1588
- });
1589
- var br = Object.defineProperty, Fn = Object.getOwnPropertySymbols, gr = Object.prototype.hasOwnProperty, pr = Object.prototype.propertyIsEnumerable, Rn = (e, a, t) => a in e ? br(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, Tn = (e, a) => {
1590
- for (var t in a || (a = {}))
1591
- gr.call(a, t) && Rn(e, t, a[t]);
1592
- if (Fn)
1593
- for (var t of Fn(a))
1594
- pr.call(a, t) && Rn(e, t, a[t]);
1595
- return e;
1596
- };
1597
- const Hr = N({
270
+ }), Ue = _({
1598
271
  props: {
272
+ unstyled: { type: Boolean, default: void 0 },
1599
273
  css: {
1600
274
  type: Object,
1601
275
  default: () => ({})
@@ -1616,6 +290,10 @@ const Hr = N({
1616
290
  };
1617
291
  },
1618
292
  computed: {
293
+ resolvedUnstyled() {
294
+ var e, n;
295
+ return B(this.unstyled, this, (n = (e = this.$) == null ? void 0 : e.appContext) == null ? void 0 : n.provides);
296
+ },
1619
297
  paginationInfo() {
1620
298
  return this.tablePagination == null || this.tablePagination.total === 0 ? this.noDataTemplate : this.infoTemplate.replace("{from}", `${this.tablePagination.from || 0}`).replace("{to}", `${this.tablePagination.to || 0}`).replace("{total}", `${this.tablePagination.total || 0}`);
1621
299
  }
@@ -1623,9 +301,14 @@ const Hr = N({
1623
301
  created() {
1624
302
  this.mergeCss();
1625
303
  },
304
+ watch: {
305
+ resolvedUnstyled() {
306
+ this.mergeCss();
307
+ }
308
+ },
1626
309
  methods: {
1627
310
  mergeCss() {
1628
- this.customCss = Tn(Tn({}, ie.paginationInfo), this.css);
311
+ this.customCss = C("paginationInfo", this.css, this.resolvedUnstyled);
1629
312
  },
1630
313
  setPaginationData(e) {
1631
314
  this.tablePagination = e;
@@ -1634,20 +317,12 @@ const Hr = N({
1634
317
  this.tablePagination = null;
1635
318
  }
1636
319
  }
1637
- });
1638
- var hr = Object.defineProperty, qn = Object.getOwnPropertySymbols, mr = Object.prototype.hasOwnProperty, yr = Object.prototype.propertyIsEnumerable, En = (e, a, t) => a in e ? hr(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, jn = (e, a) => {
1639
- for (var t in a || (a = {}))
1640
- mr.call(a, t) && En(e, t, a[t]);
1641
- if (qn)
1642
- for (var t of qn(a))
1643
- yr.call(a, t) && En(e, t, a[t]);
1644
- return e;
1645
- };
1646
- const Ir = N({
320
+ }), qe = _({
1647
321
  emits: [
1648
322
  "vuetable-pagination:change-page"
1649
323
  ],
1650
324
  props: {
325
+ unstyled: { type: Boolean, default: void 0 },
1651
326
  css: {
1652
327
  type: Object,
1653
328
  default() {
@@ -1676,6 +351,10 @@ const Ir = N({
1676
351
  this.mergeCss();
1677
352
  },
1678
353
  computed: {
354
+ resolvedUnstyled() {
355
+ var e, n;
356
+ return B(this.unstyled, this, (n = (e = this.$) == null ? void 0 : e.appContext) == null ? void 0 : n.provides);
357
+ },
1679
358
  totalPage() {
1680
359
  return this.tablePagination === null ? 0 : this.tablePagination.last_page - this.firstPage + 1;
1681
360
  },
@@ -1698,9 +377,14 @@ const Ir = N({
1698
377
  return !this.tablePagination || this.tablePagination.current_page <= this.onEachSide ? 1 : this.tablePagination.current_page >= this.totalPage - this.onEachSide ? this.totalPage - this.onEachSide * 2 : this.tablePagination.current_page - this.onEachSide;
1699
378
  }
1700
379
  },
380
+ watch: {
381
+ resolvedUnstyled() {
382
+ this.mergeCss();
383
+ }
384
+ },
1701
385
  methods: {
1702
386
  mergeCss() {
1703
- this.customCss = jn(jn({}, ie.pagination), this.css);
387
+ this.customCss = C("pagination", this.css, this.resolvedUnstyled);
1704
388
  },
1705
389
  loadPage(e) {
1706
390
  this.$emit("vuetable-pagination:change-page", e);
@@ -1716,373 +400,333 @@ const Ir = N({
1716
400
  }
1717
401
  }
1718
402
  });
1719
- function Cr(e) {
1720
- const a = se("vuetable", null);
403
+ function ye(e) {
404
+ const n = le("vuetable", null);
1721
405
  return {
1722
- rowData: y(() => {
406
+ rowData: f(() => {
1723
407
  var t;
1724
408
  return (t = e.rowData) != null ? t : null;
1725
409
  }),
1726
- rowIndex: y(() => e.rowIndex),
1727
- rowField: y(() => e.rowField),
1728
- isHeader: y(() => {
410
+ rowIndex: f(() => e.rowIndex),
411
+ rowField: f(() => e.rowField),
412
+ isHeader: f(() => {
1729
413
  var t;
1730
414
  return (t = e.isHeader) != null ? t : !1;
1731
415
  }),
1732
- title: y(() => {
416
+ title: f(() => {
1733
417
  var t;
1734
418
  return (t = e.title) != null ? t : "";
1735
419
  }),
1736
- vuetable: y(() => {
420
+ vuetable: f(() => {
1737
421
  var t;
1738
- return (t = e.vuetable) != null ? t : a;
422
+ return (t = e.vuetable) != null ? t : n;
1739
423
  })
1740
424
  };
1741
425
  }
1742
- function Ar(e) {
1743
- const a = Cr(e);
426
+ function Ne(e) {
427
+ const n = ye(e);
1744
428
  function t() {
1745
- const i = a.vuetable.value;
1746
- if (!i)
429
+ const o = n.vuetable.value;
430
+ if (!o)
1747
431
  throw new TypeError('useVuetableFieldCheckbox requires a vuetable prop or a "vuetable" provider.');
1748
- return i;
432
+ return o;
1749
433
  }
1750
434
  t();
1751
- const r = E(null), s = y(() => {
1752
- const i = t();
1753
- return (i.tableData || []).filter((m) => i.isSelectedRow(m[i.trackBy])).length;
1754
- }), l = y(() => {
1755
- var i;
1756
- return s.value > 0 && s.value < (((i = t().tableData) == null ? void 0 : i.length) || 0);
435
+ const a = S(null), s = f(() => {
436
+ const o = t();
437
+ return (o.tableData || []).filter((p) => o.isSelectedRow(p[o.trackBy])).length;
438
+ }), i = f(() => {
439
+ var o;
440
+ return s.value > 0 && s.value < (((o = t().tableData) == null ? void 0 : o.length) || 0);
1757
441
  });
1758
- function d(i, m) {
1759
- var x;
1760
- if (!i) return;
1761
- t().onCheckboxToggled(m.target.checked, (x = a.rowField.value) == null ? void 0 : x.name, i);
442
+ function l(o, p) {
443
+ var h;
444
+ if (!o) return;
445
+ t().onCheckboxToggled(p.target.checked, (h = n.rowField.value) == null ? void 0 : h.name, o);
1762
446
  }
1763
- function v(i) {
1764
- t().onCheckboxToggledAll(i.target.checked);
447
+ function u(o) {
448
+ t().onCheckboxToggledAll(o.target.checked);
1765
449
  }
1766
- function c(i) {
1767
- if (!i) return !1;
1768
- const m = t();
1769
- return m.isSelectedRow(i[m.trackBy]);
450
+ function c(o) {
451
+ if (!o) return !1;
452
+ const p = t();
453
+ return p.isSelectedRow(o[p.trackBy]);
1770
454
  }
1771
- function u() {
455
+ function d() {
1772
456
  if (t().tableData)
1773
457
  return s.value > 0;
1774
458
  }
1775
- function p() {
1776
- r.value && (r.value.indeterminate = a.isHeader.value && l.value);
459
+ function g() {
460
+ a.value && (a.value.indeterminate = n.isHeader.value && i.value);
1777
461
  }
1778
- return yt(p), Hn(p), G([r, a.isHeader, l], p, { flush: "post" }), ye(z({}, a), {
1779
- checkbox: r,
462
+ return re(g), ue(g), ce([a, n.isHeader, i], g, { flush: "post" }), A(N({}, n), {
463
+ checkbox: a,
1780
464
  selectedCount: s,
1781
- isIndeterminate: l,
1782
- toggleCheckbox: d,
1783
- toggleAllCheckbox: v,
465
+ isIndeterminate: i,
466
+ toggleCheckbox: l,
467
+ toggleAllCheckbox: u,
1784
468
  isSelected: c,
1785
- isAllItemsInCurrentPageSelected: u
469
+ isAllItemsInCurrentPageSelected: d
1786
470
  });
1787
471
  }
1788
- function Pr(e) {
1789
- var a = this.constructor;
472
+ function Ce(e) {
473
+ var n = this.constructor;
1790
474
  return this.then(
1791
475
  function(t) {
1792
- return a.resolve(e()).then(function() {
476
+ return n.resolve(e()).then(function() {
1793
477
  return t;
1794
478
  });
1795
479
  },
1796
480
  function(t) {
1797
- return a.resolve(e()).then(function() {
1798
- return a.reject(t);
481
+ return n.resolve(e()).then(function() {
482
+ return n.reject(t);
1799
483
  });
1800
484
  }
1801
485
  );
1802
486
  }
1803
- function _r(e) {
1804
- var a = this;
1805
- return new a(function(t, r) {
487
+ function _e(e) {
488
+ var n = this;
489
+ return new n(function(t, a) {
1806
490
  if (!(e && typeof e.length != "undefined"))
1807
- return r(
491
+ return a(
1808
492
  new TypeError(
1809
493
  typeof e + " " + e + " is not iterable(cannot read property Symbol(Symbol.iterator))"
1810
494
  )
1811
495
  );
1812
496
  var s = Array.prototype.slice.call(e);
1813
497
  if (s.length === 0) return t([]);
1814
- var l = s.length;
1815
- function d(c, u) {
1816
- if (u && (typeof u == "object" || typeof u == "function")) {
1817
- var p = u.then;
1818
- if (typeof p == "function") {
1819
- p.call(
1820
- u,
1821
- function(i) {
1822
- d(c, i);
498
+ var i = s.length;
499
+ function l(c, d) {
500
+ if (d && (typeof d == "object" || typeof d == "function")) {
501
+ var g = d.then;
502
+ if (typeof g == "function") {
503
+ g.call(
504
+ d,
505
+ function(o) {
506
+ l(c, o);
1823
507
  },
1824
- function(i) {
1825
- s[c] = { status: "rejected", reason: i }, --l === 0 && t(s);
508
+ function(o) {
509
+ s[c] = { status: "rejected", reason: o }, --i === 0 && t(s);
1826
510
  }
1827
511
  );
1828
512
  return;
1829
513
  }
1830
514
  }
1831
- s[c] = { status: "fulfilled", value: u }, --l === 0 && t(s);
515
+ s[c] = { status: "fulfilled", value: d }, --i === 0 && t(s);
1832
516
  }
1833
- for (var v = 0; v < s.length; v++)
1834
- d(v, s[v]);
517
+ for (var u = 0; u < s.length; u++)
518
+ l(u, s[u]);
1835
519
  });
1836
520
  }
1837
- function Vn(e, a) {
1838
- this.name = "AggregateError", this.errors = e, this.message = a || "";
521
+ function M(e, n) {
522
+ this.name = "AggregateError", this.errors = e, this.message = n || "";
1839
523
  }
1840
- Vn.prototype = Error.prototype;
1841
- function wr(e) {
1842
- var a = this;
1843
- return new a(function(t, r) {
524
+ M.prototype = Error.prototype;
525
+ function we(e) {
526
+ var n = this;
527
+ return new n(function(t, a) {
1844
528
  if (!(e && typeof e.length != "undefined"))
1845
- return r(new TypeError("Promise.any accepts an array"));
529
+ return a(new TypeError("Promise.any accepts an array"));
1846
530
  var s = Array.prototype.slice.call(e);
1847
- if (s.length === 0) return r();
1848
- for (var l = [], d = 0; d < s.length; d++)
531
+ if (s.length === 0) return a();
532
+ for (var i = [], l = 0; l < s.length; l++)
1849
533
  try {
1850
- a.resolve(s[d]).then(t).catch(function(v) {
1851
- l.push(v), l.length === s.length && r(
1852
- new Vn(
1853
- l,
534
+ n.resolve(s[l]).then(t).catch(function(u) {
535
+ i.push(u), i.length === s.length && a(
536
+ new M(
537
+ i,
1854
538
  "All promises were rejected"
1855
539
  )
1856
540
  );
1857
541
  });
1858
- } catch (v) {
1859
- r(v);
542
+ } catch (u) {
543
+ a(u);
1860
544
  }
1861
545
  });
1862
546
  }
1863
- var xr = setTimeout;
1864
- function Nn(e) {
547
+ var xe = setTimeout;
548
+ function V(e) {
1865
549
  return !!(e && typeof e.length != "undefined");
1866
550
  }
1867
- function Sr() {
551
+ function Se() {
1868
552
  }
1869
- function kr(e, a) {
553
+ function ke(e, n) {
1870
554
  return function() {
1871
- e.apply(a, arguments);
555
+ e.apply(n, arguments);
1872
556
  };
1873
557
  }
1874
- function j(e) {
1875
- if (!(this instanceof j))
558
+ function r(e) {
559
+ if (!(this instanceof r))
1876
560
  throw new TypeError("Promises must be constructed via new");
1877
561
  if (typeof e != "function") throw new TypeError("not a function");
1878
- this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], Wn(e, this);
562
+ this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], G(e, this);
1879
563
  }
1880
- function Gn(e, a) {
564
+ function z(e, n) {
1881
565
  for (; e._state === 3; )
1882
566
  e = e._value;
1883
567
  if (e._state === 0) {
1884
- e._deferreds.push(a);
568
+ e._deferreds.push(n);
1885
569
  return;
1886
570
  }
1887
- e._handled = !0, j._immediateFn(function() {
1888
- var t = e._state === 1 ? a.onFulfilled : a.onRejected;
571
+ e._handled = !0, r._immediateFn(function() {
572
+ var t = e._state === 1 ? n.onFulfilled : n.onRejected;
1889
573
  if (t === null) {
1890
- (e._state === 1 ? pt : Te)(a.promise, e._value);
574
+ (e._state === 1 ? T : k)(n.promise, e._value);
1891
575
  return;
1892
576
  }
1893
- var r;
577
+ var a;
1894
578
  try {
1895
- r = t(e._value);
579
+ a = t(e._value);
1896
580
  } catch (s) {
1897
- Te(a.promise, s);
581
+ k(n.promise, s);
1898
582
  return;
1899
583
  }
1900
- pt(a.promise, r);
584
+ T(n.promise, a);
1901
585
  });
1902
586
  }
1903
- function pt(e, a) {
587
+ function T(e, n) {
1904
588
  try {
1905
- if (a === e)
589
+ if (n === e)
1906
590
  throw new TypeError("A promise cannot be resolved with itself.");
1907
- if (a && (typeof a == "object" || typeof a == "function")) {
1908
- var t = a.then;
1909
- if (a instanceof j) {
1910
- e._state = 3, e._value = a, ht(e);
591
+ if (n && (typeof n == "object" || typeof n == "function")) {
592
+ var t = n.then;
593
+ if (n instanceof r) {
594
+ e._state = 3, e._value = n, D(e);
1911
595
  return;
1912
596
  } else if (typeof t == "function") {
1913
- Wn(kr(t, a), e);
597
+ G(ke(t, n), e);
1914
598
  return;
1915
599
  }
1916
600
  }
1917
- e._state = 1, e._value = a, ht(e);
1918
- } catch (r) {
1919
- Te(e, r);
601
+ e._state = 1, e._value = n, D(e);
602
+ } catch (a) {
603
+ k(e, a);
1920
604
  }
1921
605
  }
1922
- function Te(e, a) {
1923
- e._state = 2, e._value = a, ht(e);
606
+ function k(e, n) {
607
+ e._state = 2, e._value = n, D(e);
1924
608
  }
1925
- function ht(e) {
1926
- e._state === 2 && e._deferreds.length === 0 && j._immediateFn(function() {
1927
- e._handled || j._unhandledRejectionFn(e._value);
609
+ function D(e) {
610
+ e._state === 2 && e._deferreds.length === 0 && r._immediateFn(function() {
611
+ e._handled || r._unhandledRejectionFn(e._value);
1928
612
  });
1929
- for (var a = 0, t = e._deferreds.length; a < t; a++)
1930
- Gn(e, e._deferreds[a]);
613
+ for (var n = 0, t = e._deferreds.length; n < t; n++)
614
+ z(e, e._deferreds[n]);
1931
615
  e._deferreds = null;
1932
616
  }
1933
- function Or(e, a, t) {
1934
- this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof a == "function" ? a : null, this.promise = t;
617
+ function $e(e, n, t) {
618
+ this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof n == "function" ? n : null, this.promise = t;
1935
619
  }
1936
- function Wn(e, a) {
620
+ function G(e, n) {
1937
621
  var t = !1;
1938
622
  try {
1939
623
  e(
1940
- function(r) {
1941
- t || (t = !0, pt(a, r));
624
+ function(a) {
625
+ t || (t = !0, T(n, a));
1942
626
  },
1943
- function(r) {
1944
- t || (t = !0, Te(a, r));
627
+ function(a) {
628
+ t || (t = !0, k(n, a));
1945
629
  }
1946
630
  );
1947
- } catch (r) {
631
+ } catch (a) {
1948
632
  if (t) return;
1949
- t = !0, Te(a, r);
633
+ t = !0, k(n, a);
1950
634
  }
1951
635
  }
1952
- j.prototype.catch = function(e) {
636
+ r.prototype.catch = function(e) {
1953
637
  return this.then(null, e);
1954
638
  };
1955
- j.prototype.then = function(e, a) {
1956
- var t = new this.constructor(Sr);
1957
- return Gn(this, new Or(e, a, t)), t;
639
+ r.prototype.then = function(e, n) {
640
+ var t = new this.constructor(Se);
641
+ return z(this, new $e(e, n, t)), t;
1958
642
  };
1959
- j.prototype.finally = Pr;
1960
- j.all = function(e) {
1961
- return new j(function(a, t) {
1962
- if (!Nn(e))
643
+ r.prototype.finally = Ce;
644
+ r.all = function(e) {
645
+ return new r(function(n, t) {
646
+ if (!V(e))
1963
647
  return t(new TypeError("Promise.all accepts an array"));
1964
- var r = Array.prototype.slice.call(e);
1965
- if (r.length === 0) return a([]);
1966
- var s = r.length;
1967
- function l(v, c) {
648
+ var a = Array.prototype.slice.call(e);
649
+ if (a.length === 0) return n([]);
650
+ var s = a.length;
651
+ function i(u, c) {
1968
652
  try {
1969
653
  if (c && (typeof c == "object" || typeof c == "function")) {
1970
- var u = c.then;
1971
- if (typeof u == "function") {
1972
- u.call(
654
+ var d = c.then;
655
+ if (typeof d == "function") {
656
+ d.call(
1973
657
  c,
1974
- function(p) {
1975
- l(v, p);
658
+ function(g) {
659
+ i(u, g);
1976
660
  },
1977
661
  t
1978
662
  );
1979
663
  return;
1980
664
  }
1981
665
  }
1982
- r[v] = c, --s === 0 && a(r);
1983
- } catch (p) {
1984
- t(p);
666
+ a[u] = c, --s === 0 && n(a);
667
+ } catch (g) {
668
+ t(g);
1985
669
  }
1986
670
  }
1987
- for (var d = 0; d < r.length; d++)
1988
- l(d, r[d]);
671
+ for (var l = 0; l < a.length; l++)
672
+ i(l, a[l]);
1989
673
  });
1990
674
  };
1991
- j.any = wr;
1992
- j.allSettled = _r;
1993
- j.resolve = function(e) {
1994
- return e && typeof e == "object" && e.constructor === j ? e : new j(function(a) {
1995
- a(e);
675
+ r.any = we;
676
+ r.allSettled = _e;
677
+ r.resolve = function(e) {
678
+ return e && typeof e == "object" && e.constructor === r ? e : new r(function(n) {
679
+ n(e);
1996
680
  });
1997
681
  };
1998
- j.reject = function(e) {
1999
- return new j(function(a, t) {
682
+ r.reject = function(e) {
683
+ return new r(function(n, t) {
2000
684
  t(e);
2001
685
  });
2002
686
  };
2003
- j.race = function(e) {
2004
- return new j(function(a, t) {
2005
- if (!Nn(e))
687
+ r.race = function(e) {
688
+ return new r(function(n, t) {
689
+ if (!V(e))
2006
690
  return t(new TypeError("Promise.race accepts an array"));
2007
- for (var r = 0, s = e.length; r < s; r++)
2008
- j.resolve(e[r]).then(a, t);
691
+ for (var a = 0, s = e.length; a < s; a++)
692
+ r.resolve(e[a]).then(n, t);
2009
693
  });
2010
694
  };
2011
- j._immediateFn = // @ts-ignore
695
+ r._immediateFn = // @ts-ignore
2012
696
  typeof setImmediate == "function" && function(e) {
2013
697
  setImmediate(e);
2014
698
  } || function(e) {
2015
- xr(e, 0);
699
+ xe(e, 0);
2016
700
  };
2017
- j._unhandledRejectionFn = function(a) {
2018
- typeof console != "undefined" && console && console.warn("Possible Unhandled Promise Rejection:", a);
701
+ r._unhandledRejectionFn = function(n) {
702
+ typeof console != "undefined" && console && console.warn("Possible Unhandled Promise Rejection:", n);
2019
703
  };
2020
- const $r = [
2021
- "initialized",
2022
- "loading",
2023
- "loaded",
2024
- "pagination-data",
2025
- "load-success",
2026
- "scrollbar-visible",
2027
- "load-error",
2028
- "row-clicked",
2029
- "row-dblclicked",
2030
- "detail-row-clicked",
2031
- "cell-clicked",
2032
- "cell-dblclicked",
2033
- "cell-rightclicked",
2034
- "row-mouseover",
2035
- "field-event",
2036
- "header-event",
2037
- "checkbox-toggled",
2038
- "checkbox-toggled-all",
2039
- "data-reset",
2040
- "checkbox-toggled-custom"
2041
- ];
2042
- function Mr(e = {}) {
2043
- var r, s;
2044
- if (A) throw new Error("createVuetable requires Vue 3. Use the generic Vuetable component on Vue 2.");
2045
- const a = (r = e.eventPrefix) != null ? r : "vuetable:", t = ye(z({}, Pe), {
2046
- props: ye(z({}, Pe.props), {
2047
- eventPrefix: ye(z({}, Pe.props.eventPrefix), {
2048
- default: a,
2049
- validator: (l) => l === a
2050
- })
2051
- }),
2052
- emits: [...new Set([...$r, ...(s = e.events) != null ? s : []].reduce((l, d) => {
2053
- const v = `${a}${d}`, c = v.replace(/-(\w)/g, (u, p) => p.toUpperCase());
2054
- return l.push(v, c.charAt(0).toLowerCase() + c.slice(1)), l;
2055
- }, []))]
2056
- });
2057
- return delete t.install, t;
2058
- }
2059
- const vt = typeof globalThis == "object" ? globalThis : typeof self == "object" ? self : void 0;
2060
- vt && !vt.Promise && (vt.Promise = j);
2061
- function Fr(e) {
2062
- e.component("vuetable", Rr), e.component("vuetable-column", Za), e.component("vuetable-col-gutter", be), e.component("vuetable-field-checkbox", qe), e.component("vuetable-field-handle", Ee), e.component("vuetable-field-sequence", je), e.component("vuetable-pagination", xt), e.component("vuetable-pagination-dropdown", St), e.component("vuetable-pagination-info", kt), e.component("vuetable-row-header", Ne);
704
+ const F = typeof globalThis == "object" ? globalThis : typeof self == "object" ? self : void 0;
705
+ F && !F.Promise && (F.Promise = r);
706
+ function Fe(e, n) {
707
+ Z(e, n), e.component("vuetable", Te), e.component("vuetable-column", ee), e.component("vuetable-col-gutter", te), e.component("vuetable-field-checkbox", ne), e.component("vuetable-field-handle", ae), e.component("vuetable-field-sequence", se), e.component("vuetable-pagination", j), e.component("vuetable-pagination-dropdown", I), e.component("vuetable-pagination-info", R), e.component("vuetable-row-header", ie);
2063
708
  }
2064
- const Rr = Object.assign(Pe, { install: Fr });
709
+ const Te = Object.assign(Y, { install: Fe });
2065
710
  export {
2066
- Rr as Vuetable,
2067
- be as VuetableColGutter,
2068
- Za as VuetableColumn,
2069
- qe as VuetableFieldCheckbox,
2070
- Dr as VuetableFieldCheckboxMixin,
2071
- Ee as VuetableFieldHandle,
2072
- vr as VuetableFieldMixin,
2073
- je as VuetableFieldSequence,
2074
- xt as VuetablePagination,
2075
- St as VuetablePaginationDropdown,
2076
- kt as VuetablePaginationInfo,
2077
- Hr as VuetablePaginationInfoMixin,
2078
- Ir as VuetablePaginationMixin,
2079
- Ne as VuetableRowHeader,
2080
- Mr as createVuetable,
2081
- Rr as default,
2082
- Fr as install,
2083
- Cr as useVuetableField,
2084
- Ar as useVuetableFieldCheckbox,
2085
- Ln as useVuetablePagination,
2086
- sr as useVuetablePaginationInfo
711
+ Te as Vuetable,
712
+ te as VuetableColGutter,
713
+ ee as VuetableColumn,
714
+ ne as VuetableFieldCheckbox,
715
+ Re as VuetableFieldCheckboxMixin,
716
+ ae as VuetableFieldHandle,
717
+ Pe as VuetableFieldMixin,
718
+ se as VuetableFieldSequence,
719
+ j as VuetablePagination,
720
+ I as VuetablePaginationDropdown,
721
+ R as VuetablePaginationInfo,
722
+ Ue as VuetablePaginationInfoMixin,
723
+ qe as VuetablePaginationMixin,
724
+ ie as VuetableRowHeader,
725
+ Le as createVuetable,
726
+ Te as default,
727
+ Fe as install,
728
+ ye as useVuetableField,
729
+ Ne as useVuetableFieldCheckbox,
730
+ H as useVuetablePagination,
731
+ ve as useVuetablePaginationInfo
2087
732
  };
2088
- //# sourceMappingURL=vue2.js.map