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