vuetable-next 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +311 -270
  2. package/dist/chunks/vue2/createVuetable-GewoatYE.cjs +11 -0
  3. package/dist/chunks/vue2/createVuetable-zwzXUm5x.js +1511 -0
  4. package/dist/chunks/vue3/createVuetable-CE_PTu-W.cjs +5 -0
  5. package/dist/chunks/vue3/createVuetable-wZayTXed.js +1733 -0
  6. package/dist/portable/components/useVuetablePagination.d.ts +1 -0
  7. package/dist/portable/components/useVuetablePaginationInfo.d.ts +1 -0
  8. package/dist/public.d.ts +14 -1
  9. package/dist/structure.css +30 -0
  10. package/dist/style.css +77 -2
  11. package/dist/table.d.ts +13 -0
  12. package/dist/themes/semantic.css +47 -0
  13. package/dist/themes/tailwind.cjs +55 -0
  14. package/dist/themes/tailwind.js +35 -0
  15. package/dist/types/components/Vuetable.vue.d.ts +20 -53
  16. package/dist/types/components/VuetableContext.d.ts +1 -0
  17. package/dist/types/components/VuetableDetailHost.vue.d.ts +1 -1
  18. package/dist/types/components/VuetablePagination.vue.d.ts +13 -16
  19. package/dist/types/components/VuetablePaginationDropdown.vue.d.ts +13 -16
  20. package/dist/types/components/VuetablePaginationInfo.vue.d.ts +13 -1
  21. package/dist/types/components/VuetablePaginationInfoMixin.vue.d.ts +10 -0
  22. package/dist/types/components/VuetablePaginationMixin.vue.d.ts +10 -0
  23. package/dist/types/components/fetchAxios.d.ts +2 -0
  24. package/dist/types/components/resolveVuetableCss.d.ts +2 -0
  25. package/dist/types/components/useVuetableConfig.d.ts +15 -0
  26. package/dist/types/components/useVuetableFixedColumns.d.ts +1 -0
  27. package/dist/types/components/useVuetablePagination.d.ts +1 -0
  28. package/dist/types/components/useVuetablePaginationInfo.d.ts +1 -0
  29. package/dist/types/index.d.ts +3 -2
  30. package/dist/types/table.d.ts +10 -0
  31. package/dist/types/themes/tailwind.d.ts +35 -0
  32. package/dist/vue2-table.cjs +1 -0
  33. package/dist/vue2-table.js +21 -0
  34. package/dist/vue2.cjs +15 -22
  35. package/dist/vue2.js +381 -1737
  36. package/dist/vue3-table.cjs +1 -0
  37. package/dist/vue3-table.js +21 -0
  38. package/dist/vue3.cjs +1 -6
  39. package/dist/vue3.js +454 -1995
  40. package/package.json +23 -4
  41. package/style.css +77 -2
  42. package/dist/vue2.cjs.map +0 -1
  43. package/dist/vue2.js.map +0 -1
  44. package/dist/vue3.cjs.map +0 -1
  45. package/dist/vue3.js.map +0 -1
@@ -0,0 +1,1733 @@
1
+ var tl = Object.defineProperty, nl = Object.defineProperties;
2
+ var ll = Object.getOwnPropertyDescriptors;
3
+ var _e = Object.getOwnPropertySymbols;
4
+ var gn = Object.prototype.hasOwnProperty, mn = Object.prototype.propertyIsEnumerable;
5
+ var pn = (e, l, a) => l in e ? tl(e, l, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[l] = a, V = (e, l) => {
6
+ for (var a in l || (l = {}))
7
+ gn.call(l, a) && pn(e, a, l[a]);
8
+ if (_e)
9
+ for (var a of _e(l))
10
+ mn.call(l, a) && pn(e, a, l[a]);
11
+ return e;
12
+ }, pe = (e, l) => nl(e, ll(l));
13
+ var Cn = (e, l) => {
14
+ var a = {};
15
+ for (var d in e)
16
+ gn.call(e, d) && l.indexOf(d) < 0 && (a[d] = e[d]);
17
+ if (e != null && _e)
18
+ for (var d of _e(e))
19
+ l.indexOf(d) < 0 && mn.call(e, d) && (a[d] = e[d]);
20
+ return a;
21
+ };
22
+ var Pt = (e, l, a) => new Promise((d, i) => {
23
+ var w = (r) => {
24
+ try {
25
+ s(a.next(r));
26
+ } catch (u) {
27
+ i(u);
28
+ }
29
+ }, b = (r) => {
30
+ try {
31
+ s(a.throw(r));
32
+ } catch (u) {
33
+ i(u);
34
+ }
35
+ }, s = (r) => r.done ? d(r.value) : Promise.resolve(r.value).then(w, b);
36
+ s((a = a.apply(e, l)).next());
37
+ });
38
+ import * as jt from "vue-demi";
39
+ import { getCurrentInstance as qn, computed as O, defineComponent as ye, inject as Se, ref as G, isVue2 as I, h as ol, markRaw as Hn, toRaw as qt, watch as X, shallowRef as Me, onMounted as Tn, onUpdated as rl, onBeforeUnmount as Ht, onBeforeUpdate as wn, onBeforeMount as al, nextTick as xe, reactive as sl, toRefs as il, provide as ul, set as cl, triggerRef as dl, isReadonly as fl } from "vue-demi";
40
+ import { openBlock as m, createElementBlock as S, mergeProps as ke, createElementVNode as ae, normalizeClass as K, normalizeStyle as ee, resolveComponent as we, Fragment as U, renderList as he, createBlock as ce, resolveDynamicComponent as Ge, createVNode as z, createCommentVNode as _, renderSlot as bl, normalizeProps as vl, guardReactiveProps as hl, toDisplayString as kn, withCtx as Ft, Transition as yl } from "vue";
41
+ const Mn = Symbol.for("vuetable-next/config");
42
+ function So(e, l = {}) {
43
+ var d;
44
+ const a = Object.freeze({ unstyled: (d = l.unstyled) != null ? d : !1 });
45
+ e.prototype ? e.prototype.$vuetableConfig = a : typeof e.provide == "function" && e.provide(Mn, a);
46
+ }
47
+ function pl(e, l, a) {
48
+ var i, w, b, s, r, u, g;
49
+ if (e !== void 0) return e;
50
+ const d = (b = (w = (i = l == null ? void 0 : l.$root) == null ? void 0 : i.$options) == null ? void 0 : w.vuetable) == null ? void 0 : b.unstyled;
51
+ return d !== void 0 ? d : a ? (r = (s = a[Mn]) == null ? void 0 : s.unstyled) != null ? r : !1 : l && "$vuetableConfig" in l && (g = (u = l.$vuetableConfig) == null ? void 0 : u.unstyled) != null ? g : !1;
52
+ }
53
+ function gl(e) {
54
+ const l = qn();
55
+ return O(() => {
56
+ var a;
57
+ return pl(e.unstyled, l == null ? void 0 : l.proxy, (a = l == null ? void 0 : l.appContext) == null ? void 0 : a.provides);
58
+ });
59
+ }
60
+ let We;
61
+ function Tt(e, l = /* @__PURE__ */ new WeakMap()) {
62
+ if (e === null || typeof e != "object") return e;
63
+ const a = Object.getPrototypeOf(e);
64
+ if (!Array.isArray(e) && a !== Object.prototype && a !== null) return e;
65
+ if (l.has(e)) return l.get(e);
66
+ const d = Array.isArray(e) ? new Array(e.length) : Object.create(a);
67
+ l.set(e, d);
68
+ for (const i of Reflect.ownKeys(e))
69
+ Object.prototype.propertyIsEnumerable.call(e, i) && Object.defineProperty(d, i, {
70
+ value: Tt(Reflect.get(e, i), l),
71
+ enumerable: !0,
72
+ configurable: !0,
73
+ writable: !0
74
+ });
75
+ return d;
76
+ }
77
+ function ml(e, l, a) {
78
+ return Pt(this, null, function* () {
79
+ const d = Tt(V({}, l)), i = d.headers;
80
+ Object.prototype.toString.call(i) === "[object AxiosHeaders]" ? d.headers = Tt(V({}, i)) : typeof Headers != "undefined" && i instanceof Headers && (d.headers = new Headers(i));
81
+ const w = a, b = e;
82
+ if (We || (We = import("axios").then((u) => u.default).catch((u) => {
83
+ throw We = void 0, u;
84
+ })), w === "post") {
85
+ const r = d, { params: u } = r, g = Cn(r, ["params"]), [o, y] = yield Promise.all([We, u]);
86
+ return o.post(b, y, g);
87
+ }
88
+ return (yield We).get(b, d);
89
+ });
90
+ }
91
+ const Cl = ye({
92
+ name: "vuetable-field-checkbox",
93
+ inheritAttrs: !1,
94
+ props: {
95
+ rowData: { type: Object, required: !1 },
96
+ rowIndex: { type: Number, required: !1 },
97
+ rowField: { type: Object, required: !1, default: null },
98
+ isHeader: { type: Boolean, required: !1, default: !1 },
99
+ title: { type: String, required: !1 }
100
+ },
101
+ setup(e) {
102
+ const l = Se("vuetable"), a = G(null), d = O(() => (l.tableData || []).filter((u) => l.isSelectedRow(u[l.trackBy])).length), i = O(() => {
103
+ var u;
104
+ return d.value > 0 && d.value < (((u = l.tableData) == null ? void 0 : u.length) || 0);
105
+ });
106
+ function w(u, g) {
107
+ var o;
108
+ u && l.onCheckboxToggled(g.target.checked, (o = e.rowField) == null ? void 0 : o.name, u);
109
+ }
110
+ function b(u) {
111
+ l.onCheckboxToggledAll(u.target.checked);
112
+ }
113
+ function s(u) {
114
+ return !!u && l.isSelectedRow(u[l.trackBy]);
115
+ }
116
+ function r() {
117
+ return d.value > 0;
118
+ }
119
+ return { vuetable: l, checkbox: a, isIndeterminate: i, toggleCheckbox: w, toggleAllCheckbox: b, isSelected: s, isAllItemsInCurrentPageSelected: r };
120
+ }
121
+ }), Oe = (e, l) => {
122
+ const a = e.__vccOpts || e;
123
+ for (const [d, i] of l)
124
+ a[d] = i;
125
+ return a;
126
+ }, wl = [".indeterminate", "checked"], kl = ["checked"];
127
+ function Sl(e, l, a, d, i, w) {
128
+ return e.isHeader ? (m(), S("th", ke({ key: 0 }, e.$attrs, { class: "vuetable-th-component-checkbox" }), [
129
+ ae("input", {
130
+ ref: "checkbox",
131
+ ".indeterminate": e.isIndeterminate,
132
+ checked: e.isAllItemsInCurrentPageSelected(),
133
+ type: "checkbox",
134
+ onChange: l[0] || (l[0] = (b) => e.toggleAllCheckbox(b))
135
+ }, null, 40, wl)
136
+ ], 16)) : (m(), S("td", ke({ key: 1 }, e.$attrs, { class: "vuetable-td-component-checkbox" }), [
137
+ ae("input", {
138
+ ref: "checkbox",
139
+ checked: e.isSelected(e.rowData),
140
+ type: "checkbox",
141
+ onChange: l[1] || (l[1] = (b) => e.toggleCheckbox(e.rowData, b))
142
+ }, null, 40, kl)
143
+ ], 16));
144
+ }
145
+ const jn = /* @__PURE__ */ Oe(Cl, [["render", Sl]]), Ol = ye({
146
+ name: "vuetable-field-handle",
147
+ inheritAttrs: !1,
148
+ props: {
149
+ isHeader: { type: Boolean, required: !1, default: !1 },
150
+ title: { type: String, required: !1, default: "" }
151
+ },
152
+ setup() {
153
+ const e = Se("vuetable");
154
+ function l(a, d = "") {
155
+ return !e.css.handleIcon && typeof e.css.renderIcon != "function" ? "" : typeof e.css.renderIcon == "undefined" ? `<i class="${a.join(" ")}" ${d}></i>` : e.css.renderIcon(a, d);
156
+ }
157
+ return { vuetable: e, renderIconTag: l };
158
+ }
159
+ }), $l = ["innerHTML"], Pl = ["innerHTML"];
160
+ function Fl(e, l, a, d, i, w) {
161
+ return e.isHeader ? (m(), S("th", ke({ key: 0 }, e.$attrs, {
162
+ class: "vuetable-th-component-handle",
163
+ innerHTML: e.title
164
+ }), null, 16, $l)) : (m(), S("td", ke({ key: 1 }, e.$attrs, {
165
+ class: "vuetable-td-component-handle",
166
+ innerHTML: e.renderIconTag(["handle-icon", e.vuetable.css.handleIcon])
167
+ }), null, 16, Pl));
168
+ }
169
+ const Dn = /* @__PURE__ */ Oe(Ol, [["render", Fl]]), Rl = ye({
170
+ name: "vuetable-field-sequence",
171
+ inheritAttrs: !1,
172
+ props: {
173
+ rowIndex: { type: Number, required: !1, default: 0 },
174
+ isHeader: { type: Boolean, required: !1, default: !1 },
175
+ title: { type: String, required: !1, default: "" }
176
+ },
177
+ setup(e) {
178
+ const l = Se("vuetable");
179
+ function a() {
180
+ return l.tablePagination ? l.tablePagination.from + e.rowIndex : 1 + e.rowIndex;
181
+ }
182
+ return { vuetable: l, renderSequence: a };
183
+ }
184
+ }), ql = ["innerHTML"], Hl = ["innerHTML"];
185
+ function Tl(e, l, a, d, i, w) {
186
+ return e.isHeader ? (m(), S("th", ke({ key: 0 }, e.$attrs, {
187
+ class: "vuetable-th-component-sequence",
188
+ innerHTML: e.title
189
+ }), null, 16, ql)) : (m(), S("td", ke({ key: 1 }, e.$attrs, {
190
+ class: "vuetable-td-component-sequence",
191
+ innerHTML: e.renderSequence()
192
+ }), null, 16, Hl));
193
+ }
194
+ const Vn = /* @__PURE__ */ Oe(Rl, [["render", Tl]]), Ml = ye({
195
+ name: "vuetable-th-gutter",
196
+ setup() {
197
+ const e = Se("vuetable"), l = O(() => e.hasFixedRightColumn && e.tableLayout.isFixedHeader);
198
+ return { vuetable: e, pinned: l };
199
+ }
200
+ });
201
+ function jl(e, l, a, d, i, w) {
202
+ return m(), S("th", {
203
+ style: ee({ width: e.vuetable.scrollBarWidth, padding: "0 !important", borderLeftWidth: "0 !important", borderRightWidth: "0 !important", position: e.pinned ? "sticky" : void 0, right: e.pinned ? "0px" : void 0 }),
204
+ class: K([{ "vuetable-fixed-column": e.pinned, "vuetable-fixed-header": e.pinned }, "vuetable-th-gutter"])
205
+ }, null, 6);
206
+ }
207
+ const Mt = /* @__PURE__ */ Oe(Ml, [["render", jl]]), Dt = (e, { slots: l }) => {
208
+ var d, i;
209
+ const a = (d = l.default) == null ? void 0 : d.call(l)[0];
210
+ return (i = e.onRendered) == null || i.call(e), a;
211
+ };
212
+ Dt.props = ["revision", "onRendered"];
213
+ Dt.inheritAttrs = !1;
214
+ const Vt = (e, { slots: l }) => jt.renderSlot({ default: e.content }, "default", e.scope, l.default);
215
+ Vt.props = ["content", "scope"];
216
+ Vt.inheritAttrs = !1;
217
+ const Dl = jt.isVue2 ? {
218
+ functional: !0,
219
+ props: ["revision", "onRendered"],
220
+ render: (e, l) => {
221
+ var d, i, w, b, s;
222
+ const a = (w = (i = (d = l.scopedSlots).default) == null ? void 0 : i.call(d)[0]) != null ? w : l.children[0];
223
+ return (s = (b = l.props).onRendered) == null || s.call(b), a;
224
+ }
225
+ } : Dt, Bn = jt.isVue2 ? {
226
+ functional: !0,
227
+ props: ["content", "scope"],
228
+ render: (e, l) => {
229
+ var a, d, i, w, b;
230
+ return (b = (d = (a = l.props).content) == null ? void 0 : d.call(a, l.props.scope)) != null ? b : (w = (i = l.scopedSlots).default) == null ? void 0 : w.call(i);
231
+ }
232
+ } : Vt, Vl = ye({
233
+ name: "vuetable-row-header",
234
+ components: {
235
+ SlotOutlet: Bn,
236
+ "vuetable-field-checkbox": jn,
237
+ "vuetable-field-handle": Dn,
238
+ "vuetable-field-sequence": Vn,
239
+ VuetableColGutter: Mt
240
+ },
241
+ props: {
242
+ vuetable: { type: Object, default: null }
243
+ },
244
+ setup() {
245
+ const e = Se("vuetable");
246
+ function l(f) {
247
+ return e.columnRevision, e.getColumnSlot(f.name, !0);
248
+ }
249
+ function a(f) {
250
+ return f.replace(e.fieldPrefix, "");
251
+ }
252
+ function d(f, k) {
253
+ return [
254
+ `${f}-${i(k.name)}`,
255
+ k.titleClass || "",
256
+ e.groupClass(k),
257
+ e.getCellProps(k, "header").class,
258
+ w(k),
259
+ { sortable: e.isSortable(k) }
260
+ ];
261
+ }
262
+ function i(f) {
263
+ return typeof f == "string" && f.replace(/([A-Z])/g, (k) => "_" + k.toLowerCase()).replace(" ", "_").replace(".", "_");
264
+ }
265
+ function w(f) {
266
+ const k = u(f);
267
+ return k !== !1 ? e.sortOrder[k].direction == "asc" ? e.css.ascendingClass : e.css.descendingClass : "";
268
+ }
269
+ function b(f) {
270
+ const k = u(f);
271
+ return k === !1 ? e.css.sortableIcon : e.sortOrder[k].direction == "asc" ? e.css.ascendingIcon : e.css.descendingIcon;
272
+ }
273
+ function s(f) {
274
+ return u(f) !== !1;
275
+ }
276
+ function r(f) {
277
+ return e.isSortable(f) && (!!e.css.sortableIcon || typeof e.css.renderIcon == "function");
278
+ }
279
+ function u(f) {
280
+ if (!e.isSortable(f))
281
+ return !1;
282
+ for (let k = 0; k < e.sortOrder.length; k++)
283
+ if (g(f, k))
284
+ return k;
285
+ return !1;
286
+ }
287
+ function g(f, k) {
288
+ return e.sortOrder[k].field === f.name && e.sortOrder[k].sortField === f.sortField;
289
+ }
290
+ function o(f, k = !1) {
291
+ const C = k ? "" : y(f);
292
+ if ((k || C.length > 0) && s(f) || r(f)) {
293
+ const F = `opacity:${v(f)};position:relative;float:right`, x = e.showSortIcons && (b(f) || e.css.renderIcon) ? $(["sort-icon", b(f)].filter(Boolean), `style="${F}"`) : "";
294
+ return C + " " + x;
295
+ }
296
+ return C;
297
+ }
298
+ function y(f) {
299
+ return typeof f.title == "function" ? f.title() : typeof f.title == "undefined" ? f.name.toString().replace(".", " ") : f.title;
300
+ }
301
+ function v(f) {
302
+ let F = 0.3;
303
+ const x = e.sortOrder.length, te = u(f);
304
+ return 1 - x * F < 0.3 && (F = (1 - 0.3) / (x - 1)), 1 - (te === !1 ? 0 : te) * F;
305
+ }
306
+ function $(f, k = "") {
307
+ return typeof e.css.renderIcon == "undefined" ? `<i class="${f.join(" ")}" ${k}></i>` : e.css.renderIcon(f, k);
308
+ }
309
+ function j(f, k) {
310
+ e.orderBy(f, k);
311
+ }
312
+ return { headerTable: e, getHeaderSlot: l, stripPrefix: a, headerClass: d, toSnakeCase: i, sortClass: w, sortIcon: b, isInCurrentSortGroup: s, hasSortableIcon: r, currentSortOrderPosition: u, fieldIsInSortOrderPosition: g, renderTitle: o, getTitle: y, sortIconOpacity: v, renderIconTag: $, onColumnHeaderClicked: j, VuetableColGutter: Mt };
313
+ }
314
+ }), Bl = ["data-vuetable-column", "innerHTML", "onClick"], Ll = ["id", "data-vuetable-column", "onClick"], Al = ["innerHTML"], El = ["id", "data-vuetable-column", "innerHTML", "onClick"];
315
+ function Il(e, l, a, d, i, w) {
316
+ const b = we("slot-outlet"), s = we("VuetableColGutter");
317
+ return m(), S("tr", null, [
318
+ (m(!0), S(U, null, he(e.headerTable.tableFields, (r, u) => (m(), S(U, {
319
+ key: e.headerTable.getColumnKey(r)
320
+ }, [
321
+ r.visible ? (m(), S(U, { key: 0 }, [
322
+ e.headerTable.isFieldComponent(r.name) ? (m(), ce(Ge(r.name), {
323
+ key: e.headerTable.getColumnKey(r),
324
+ "is-header": "",
325
+ vuetable: e.headerTable,
326
+ "row-field": r,
327
+ title: e.renderTitle(r),
328
+ "data-vuetable-column": e.headerTable.getCellProps(r, "header")["data-vuetable-column"],
329
+ class: K(e.headerClass("vuetable-th-component", r)),
330
+ style: ee([{ width: r.width }, e.headerTable.getCellProps(r, "header").style]),
331
+ "onVuetable:headerEvent": e.headerTable.onHeaderEvent,
332
+ onClick: (g) => e.onColumnHeaderClicked(r, g)
333
+ }, null, 40, ["vuetable", "row-field", "title", "data-vuetable-column", "class", "style", "onVuetable:headerEvent", "onClick"])) : e.headerTable.isFieldSlot(r.name) ? (m(), S("th", {
334
+ key: e.headerTable.getColumnKey(r),
335
+ "data-vuetable-column": e.headerTable.getCellProps(r, "header")["data-vuetable-column"],
336
+ class: K(e.headerClass("vuetable-th-slot", r)),
337
+ style: ee([{ width: r.width }, e.headerTable.getCellProps(r, "header").style]),
338
+ innerHTML: e.renderTitle(r),
339
+ onClick: (g) => e.onColumnHeaderClicked(r, g)
340
+ }, null, 14, Bl)) : e.getHeaderSlot(r) ? (m(), S("th", {
341
+ key: e.headerTable.getColumnKey(r),
342
+ id: "_" + r.name,
343
+ "data-vuetable-column": e.headerTable.getCellProps(r, "header")["data-vuetable-column"],
344
+ class: K(e.headerClass("vuetable-th", r)),
345
+ style: ee([{ width: r.width }, e.headerTable.getCellProps(r, "header").style]),
346
+ onClick: (g) => e.onColumnHeaderClicked(r, g)
347
+ }, [
348
+ z(b, {
349
+ content: e.getHeaderSlot(r),
350
+ scope: { column: r, index: u }
351
+ }, null, 8, ["content", "scope"]),
352
+ ae("span", {
353
+ innerHTML: e.renderTitle(r, !0)
354
+ }, null, 8, Al)
355
+ ], 14, Ll)) : (m(), S("th", {
356
+ key: e.headerTable.getColumnKey(r),
357
+ id: "_" + r.name,
358
+ "data-vuetable-column": e.headerTable.getCellProps(r, "header")["data-vuetable-column"],
359
+ class: K(e.headerClass("vuetable-th", r)),
360
+ style: ee([{ width: r.width }, e.headerTable.getCellProps(r, "header").style]),
361
+ innerHTML: e.renderTitle(r),
362
+ onClick: (g) => e.onColumnHeaderClicked(r, g)
363
+ }, null, 14, El))
364
+ ], 64)) : _("", !0)
365
+ ], 64))), 128)),
366
+ e.headerTable.scrollVisible ? (m(), ce(s, { key: 0 })) : _("", !0)
367
+ ]);
368
+ }
369
+ const xl = /* @__PURE__ */ Oe(Vl, [["render", Il]]);
370
+ function Ln(e, l, a) {
371
+ const d = new Map(l.tableFields.map((r, u) => [r, u])), i = l.groupBy != null, w = i ? l.tableLayout.headerGroups : [{ key: "fields", fields: l.tableFields.filter((r) => r.visible) }], b = () => e("col", { style: { width: l.scrollBarWidth }, class: "vuetable-col-gutter" }), s = w.map((r) => e("colgroup", { key: r.key }, [
372
+ ...r.fields.map((u) => {
373
+ var v;
374
+ const o = (typeof u.name == "object" && u.name !== null ? u.name.name || "component" : u.name).replace(l.fieldPrefix, ""), y = (v = u.$_index) != null ? v : d.get(u);
375
+ return e("col", {
376
+ key: l.getColumnKey(u),
377
+ style: { width: a && l.getHeaderWidth(u) || u.width },
378
+ class: [`vuetable-col-${o}`, u.titleClass, `${o}-${y}`, l.groupClass(u)]
379
+ });
380
+ }),
381
+ ...!i && a && l.scrollVisible ? [b()] : []
382
+ ]));
383
+ return i && a && l.scrollVisible && s.push(e("colgroup", { key: "gutter" }, [b()])), s;
384
+ }
385
+ const An = { isHeader: { type: Boolean, default: !1 } }, Wl = {
386
+ name: "vuetable-col-group",
387
+ functional: !0,
388
+ inject: ["vuetable"],
389
+ props: An,
390
+ render: (e, l) => Ln(e, l.injections.vuetable, l.props.isHeader)
391
+ }, Gl = ye({
392
+ name: "vuetable-col-group",
393
+ inheritAttrs: !1,
394
+ props: An,
395
+ setup(e) {
396
+ const l = Se("vuetable");
397
+ return () => Ln(ol, l, e.isHeader);
398
+ }
399
+ }), Sn = I ? Wl : Gl, Kl = ye({
400
+ name: "VuetableDetailHost",
401
+ props: {
402
+ detailComponent: { type: [String, Object], default: "" },
403
+ rowData: { type: Object, required: !0 },
404
+ rowIndex: { type: Number, required: !0 },
405
+ options: { type: Object, default: () => ({}) }
406
+ },
407
+ setup(e) {
408
+ const l = Se("vuetable"), a = O(() => l.vuetable), d = O(() => typeof e.detailComponent == "object" ? Hn(qt(e.detailComponent)) : e.detailComponent);
409
+ return { tableContext: l, vuetable: a, resolvedDetailComponent: d };
410
+ }
411
+ });
412
+ function Nl(e, l, a, d, i, w) {
413
+ return m(), ce(Ge(e.resolvedDetailComponent), {
414
+ "row-data": e.rowData,
415
+ "row-index": e.rowIndex,
416
+ vuetable: e.tableContext,
417
+ options: e.options
418
+ }, null, 8, ["row-data", "row-index", "vuetable", "options"]);
419
+ }
420
+ const zl = /* @__PURE__ */ Oe(Kl, [["render", Nl]]);
421
+ function On(e, l, a) {
422
+ return e === void 0 ? a : e === "" || e === l || !!e;
423
+ }
424
+ function $n(e) {
425
+ if (typeof e == "function")
426
+ return (l) => {
427
+ const a = e(l);
428
+ return Array.isArray(a) ? a : a == null ? [] : [a];
429
+ };
430
+ }
431
+ function Ul(e) {
432
+ let l = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Set(), i = !1;
433
+ function w(s) {
434
+ const r = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Set();
435
+ function g(o) {
436
+ var v, $, j, f, k, C, F, x, te, fe;
437
+ if (Array.isArray(o)) {
438
+ o.forEach(g);
439
+ return;
440
+ }
441
+ if (!o || typeof o != "object") return;
442
+ const y = I ? ($ = (v = o.componentOptions) == null ? void 0 : v.Ctor) == null ? void 0 : $.options : o.type;
443
+ if ((y == null ? void 0 : y.__vuetableColumn) === !0) {
444
+ const E = I ? V(V({}, (j = o.data) == null ? void 0 : j.attrs), (f = o.componentOptions) == null ? void 0 : f.propsData) : o.props || {}, W = E.field;
445
+ if (typeof W != "string" || !W) {
446
+ u.add("VuetableColumn requires a non-empty field.");
447
+ return;
448
+ }
449
+ if (r.has(W)) {
450
+ u.add(`Duplicate VuetableColumn field: ${W}. The first declaration wins.`);
451
+ return;
452
+ }
453
+ const J = (H, A) => {
454
+ var ne;
455
+ return (ne = E[H]) != null ? ne : E[A];
456
+ }, h = I ? [(k = o.data) == null ? void 0 : k.staticClass, (C = o.data) == null ? void 0 : C.class] : E.class, P = I ? ((F = o.data) == null ? void 0 : F.scopedSlots) || {} : o.children || {}, q = I ? (x = o.componentOptions) == null ? void 0 : x.children : Array.isArray(P) ? P : void 0;
457
+ r.set(W, {
458
+ field: {
459
+ name: W,
460
+ title: E.label,
461
+ sortField: On(E.sortable, "sortable", !1) ? J("sortField", "sort-field") || W : null,
462
+ width: (te = E.width) != null ? te : null,
463
+ fixed: E.fixed,
464
+ fixedOrder: Object.prototype.hasOwnProperty.call(E, "fixedOrder") ? E.fixedOrder : E["fixed-order"],
465
+ group: (fe = E.group) != null ? fe : null,
466
+ visible: On(E.visible, "visible", !0),
467
+ titleClass: [h, J("headerClass", "header-class")],
468
+ dataClass: [h, J("cellClass", "cell-class")],
469
+ $_columnKey: W
470
+ },
471
+ cell: $n(P.default) || (q != null && q.length ? () => q : void 0),
472
+ header: $n(P.header)
473
+ });
474
+ return;
475
+ }
476
+ typeof o.type == "symbol" && Array.isArray(o.children) && g(o.children);
477
+ }
478
+ g(s), u.forEach((o) => {
479
+ d.has(o) || e.warn(o);
480
+ }), d = u, l = r, i = r.size > 0;
481
+ }
482
+ function b() {
483
+ const s = /* @__PURE__ */ new Map(), r = [...l].map(([u, g], o) => {
484
+ const y = e.normalize(g.field, o);
485
+ s.set(u, y);
486
+ const v = a.get(u), $ = e.fields.value.find((j) => j.$_columnKey === u);
487
+ if (!v || !$) return V({}, y);
488
+ for (const j of Object.keys(y))
489
+ JSON.stringify(y[j]) !== JSON.stringify(v[j]) && ($[j] = y[j]);
490
+ return $;
491
+ });
492
+ (r.length !== e.fields.value.length || r.some((u, g) => u !== e.fields.value[g])) && (e.fields.value = r), a = s;
493
+ }
494
+ return {
495
+ discover: w,
496
+ reconcile: b,
497
+ hasDeclarations: () => i,
498
+ getColumnSlot: (s, r = !1) => {
499
+ var u, g;
500
+ return r ? (u = l.get(s)) == null ? void 0 : u.header : (g = l.get(s)) == null ? void 0 : g.cell;
501
+ }
502
+ };
503
+ }
504
+ function se(e) {
505
+ return e.fixed === "left" || e.fixed === "right" ? e.fixed : void 0;
506
+ }
507
+ function Pn(e, l) {
508
+ const a = Object.keys(l);
509
+ return a.length === Object.keys(e).length && a.every((d) => e[d] === l[d]);
510
+ }
511
+ function Fn(e, l) {
512
+ return e.$_columnKey || (typeof e.name == "string" ? e.name : e.name || l);
513
+ }
514
+ function Jl(e) {
515
+ const l = /* @__PURE__ */ new Map();
516
+ let a = /* @__PURE__ */ new Map(), d = 0, i = 0;
517
+ const w = (s) => typeof s == "number" && Number.isInteger(s) && s >= 1;
518
+ return X(() => e.fields.value.map((s, r) => ({ field: s, identity: Fn(s, r), side: se(s), order: s.fixedOrder })), (s) => {
519
+ const r = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
520
+ for (const { field: g, identity: o, side: y, order: v } of s) {
521
+ const $ = r.get(o) || 0;
522
+ r.set(o, $ + 1);
523
+ const j = l.get(o) || [], f = j[$] || { key: d++, sequence: 0, invalidOrder: !1 };
524
+ j[$] = f, l.set(o, j), f.side !== y && (f.side = y, f.sequence = y ? i++ : 0);
525
+ const k = v !== void 0 && !w(v);
526
+ k && !f.invalidOrder && e.warn(`fixedOrder for ${String(g.name)} must be a positive integer; treating it as automatic.`), f.invalidOrder = k, u.set(g, f);
527
+ }
528
+ a = u;
529
+ }, { immediate: !0, flush: "sync" }), X(() => e.fields.value.map(Fn), (s) => {
530
+ const r = /* @__PURE__ */ new Map();
531
+ for (const u of s) r.set(u, (r.get(u) || 0) + 1);
532
+ for (const [u, g] of l) {
533
+ const o = r.get(u);
534
+ o === void 0 ? l.delete(u) : g.length = o;
535
+ }
536
+ }), { orderedFields: O(() => {
537
+ if (e.mode.value === "in-place" || !e.fields.value.some((o) => se(o))) return e.fields.value;
538
+ const s = [], r = [], u = [], g = (o, y) => {
539
+ const v = o.map((C) => {
540
+ var F;
541
+ return { field: C, order: w(C.fixedOrder) ? C.fixedOrder : void 0, sequence: ((F = a.get(C)) == null ? void 0 : F.sequence) || 0 };
542
+ }), $ = new Set(v.filter((C) => C.order !== void 0).map((C) => C.order)), j = v.filter((C) => C.order === void 0).sort((C, F) => C.sequence - F.sequence);
543
+ let f = 1;
544
+ for (const C of j) {
545
+ for (; $.has(f); ) f++;
546
+ C.order = f++;
547
+ }
548
+ const k = v.sort((C, F) => C.order - F.order || C.sequence - F.sequence).map((C) => C.field);
549
+ return y === "right" ? k.reverse() : k;
550
+ };
551
+ for (const o of e.fields.value) {
552
+ const y = se(o);
553
+ y === "left" ? s.push(o) : y === "right" ? u.push(o) : r.push(o);
554
+ }
555
+ return [...g(s, "left"), ...r, ...g(u, "right")];
556
+ }), getColumnKey: (s) => {
557
+ var r, u, g, o;
558
+ return (o = (g = (u = s.$_columnKey) != null ? u : (r = a.get(s)) == null ? void 0 : r.key) != null ? g : s.$_index) != null ? o : 0;
559
+ } };
560
+ }
561
+ function Zl(e) {
562
+ const l = Me({}), a = Me({}), d = Me(), i = Me(), w = Me(), b = O(() => new Map(e.fields.value.map((h, P) => [h, P]))), s = O(() => e.fields.value.filter((h) => h.visible)), r = O(() => new Map(s.value.map((h, P) => [h, P]))), u = O(() => s.value.some((h) => se(h))), g = O(() => u.value || e.isFixedHeader.value), o = O(() => s.value.some((h) => se(h) === "right")), y = O(() => e.isFixedHeader.value && i.value !== void 0 ? `${i.value}px` : e.scrollBarWidth.value), v = O(() => {
563
+ const h = /* @__PURE__ */ new Map();
564
+ for (const P of ["left", "right"]) {
565
+ let q = 0;
566
+ const H = P === "left" ? s.value : [...s.value].reverse();
567
+ for (const A of H)
568
+ se(A) === P && (h.set(A, q), q += l.value[String(b.value.get(A))] || 0);
569
+ }
570
+ return h;
571
+ });
572
+ let $ = !1, j = !1, f, k = !1, C;
573
+ const F = /* @__PURE__ */ new Set();
574
+ function x(h, P) {
575
+ var A;
576
+ const q = se(h);
577
+ if (!h.visible || !q) return { class: [], style: {} };
578
+ const H = q === "right" && P === "header" && e.isFixedHeader.value && e.scrollVisible.value ? (A = w.value) != null ? A : Number.parseFloat(y.value) || 0 : 0;
579
+ return {
580
+ class: ["vuetable-fixed-column", `vuetable-fixed-${q}`, `vuetable-fixed-${P}`],
581
+ style: { position: "sticky", [q]: `${(v.value.get(h) || 0) + H}px` }
582
+ };
583
+ }
584
+ function te(h, P = "body") {
585
+ if (!u.value || !h.visible || !se(h)) return { class: [], style: {} };
586
+ const q = b.value.get(h);
587
+ if (q === void 0) return { class: [], style: {} };
588
+ const H = x(h, P);
589
+ return H["data-vuetable-column"] = String(q), H;
590
+ }
591
+ function fe(h, P = "header") {
592
+ if (!u.value) return { class: [], style: {} };
593
+ const q = r.value.get(h[0]), H = h.length ? se(h[0]) : void 0;
594
+ return !H || q === void 0 || !h.every((A, ne) => s.value[q + ne] === A && se(A) === H) ? { class: [], style: {} } : x(H === "left" ? h[0] : h[h.length - 1], P);
595
+ }
596
+ function E(h) {
597
+ if (!e.isFixedHeader.value) return;
598
+ const P = a.value[String(b.value.get(h))];
599
+ return P === void 0 ? void 0 : `${P}px`;
600
+ }
601
+ function W() {
602
+ var Pe, Ve, Be;
603
+ if (f = void 0, j || !$) return;
604
+ const h = e.root(), P = h && g.value ? h.querySelector(":scope > .vuetable-body-wrapper") : null, q = h && g.value ? h.querySelector(":scope > .vuetable-head-wrapper") : null, H = P == null ? void 0 : P.querySelector(":scope > table.vuetable"), A = q == null ? void 0 : q.querySelector(":scope > table.vuetable"), ne = new Set(g.value ? [h, P, q, H, A].filter((D) => !!D) : []), re = /* @__PURE__ */ new Map(), be = {};
605
+ let ie, je, ge;
606
+ if (e.isFixedHeader.value) {
607
+ const D = (Ve = (Pe = H == null ? void 0 : H.tBodies[0]) == null ? void 0 : Pe.rows[0]) == null ? void 0 : Ve.cells;
608
+ if ((D == null ? void 0 : D.length) === s.value.length && Array.from(D).every((B) => B.colSpan === 1 && !B.classList.contains("vuetable-empty-result")) && s.value.forEach((B, de) => {
609
+ const Z = D[de], le = Z.getBoundingClientRect().width;
610
+ re.set(Z, le), Number.isFinite(le) && le > 0 && (be[String(b.value.get(B))] = le, ne.add(Z));
611
+ }), e.scrollVisible.value && P && P.offsetWidth > 0) {
612
+ const B = window.getComputedStyle(P);
613
+ ie = Math.max(0, P.offsetWidth - P.clientWidth - (Number.parseFloat(B.borderLeftWidth) || 0) - (Number.parseFloat(B.borderRightWidth) || 0));
614
+ }
615
+ if (H && s.value.length > 0 && Object.keys(be).length === s.value.length) {
616
+ const B = H.getBoundingClientRect().width;
617
+ if (Number.isFinite(B) && B > 0) {
618
+ const de = window.getComputedStyle(H), Z = de.borderCollapse === "collapse" ? 0 : Number.parseFloat(de.borderSpacing) || 0, le = e.scrollVisible.value ? (ie != null ? ie : Number.parseFloat(e.scrollBarWidth.value) || 0) + Z : 0;
619
+ ge = `${B + le}px`;
620
+ }
621
+ }
622
+ const ue = A == null ? void 0 : A.querySelector(":scope > thead > tr > .vuetable-th-gutter"), N = ue == null ? void 0 : ue.getBoundingClientRect().width;
623
+ ue && N !== void 0 && Number.isFinite(N) && N > 0 && (je = N, ne.add(ue));
624
+ }
625
+ const $e = {};
626
+ for (const D of s.value) {
627
+ if (!se(D)) continue;
628
+ const ue = String(b.value.get(D)), N = `[data-vuetable-column="${ue}"]`, B = [
629
+ `:scope > .vuetable-body-wrapper > table.vuetable > tbody > tr > ${N}`,
630
+ `:scope > .vuetable-head-wrapper > table.vuetable > thead > tr > ${N}, :scope > .vuetable-body-wrapper > table.vuetable > thead > tr > ${N}`
631
+ ];
632
+ for (const de of B) {
633
+ const Z = h && u.value ? h.querySelector(de) : null, le = Z ? (Be = re.get(Z)) != null ? Be : Z.getBoundingClientRect().width : void 0;
634
+ if (Z && le !== void 0 && Number.isFinite(le) && le > 0) {
635
+ $e[ue] = le, ne.add(Z);
636
+ break;
637
+ }
638
+ }
639
+ }
640
+ for (const D of F)
641
+ ne.has(D) || (C == null || C.unobserve(D), F.delete(D));
642
+ for (const D of ne)
643
+ F.has(D) || (C == null || C.observe(D), F.add(D));
644
+ Pn(l.value, $e) || (l.value = $e);
645
+ const me = !Pn(a.value, be), De = i.value !== ie;
646
+ me && (a.value = be), De && (i.value = ie), d.value !== ge && (d.value = ge), w.value = je, (me || De) && J();
647
+ }
648
+ function J() {
649
+ !$ || j || f !== void 0 || !g.value && F.size === 0 && Object.keys(l.value).length === 0 || (k = typeof requestAnimationFrame == "function", f = k ? requestAnimationFrame(W) : setTimeout(W, 0));
650
+ }
651
+ return Tn(() => {
652
+ $ = !0, typeof ResizeObserver != "undefined" && (C = new ResizeObserver(J)), window.addEventListener("resize", J), J();
653
+ }), rl(J), Ht(() => {
654
+ j = !0, $ = !1, C == null || C.disconnect(), F.clear(), window.removeEventListener("resize", J), f !== void 0 && (k ? cancelAnimationFrame(f) : clearTimeout(f));
655
+ }), { enabled: u, hasFixedRightColumn: o, headerGutterWidth: y, headerTableWidth: d, getHeaderWidth: E, getCellProps: te, getSpanProps: fe, schedule: J };
656
+ }
657
+ function Ql(e) {
658
+ return typeof e == "string" && e.trim() !== "" || typeof e == "number" && Number.isFinite(e) ? e : null;
659
+ }
660
+ function Yl(e) {
661
+ const l = O(() => e.fields.value.filter((b) => b.visible)), a = O(() => {
662
+ const b = e.groupBy();
663
+ return b == null ? [] : l.value.reduce((s, r, u) => {
664
+ const g = Ql(b in r && Object.prototype.hasOwnProperty.call(r, b) ? r[b] : null), o = s[s.length - 1];
665
+ return o && o.value === g ? (o.fields.push(r), o.colspan++, o.endIndex = u) : s.push({ key: `${typeof g}:${String(g)}:${u}`, value: g, fields: [r], colspan: 1, startIndex: u, endIndex: u }), s;
666
+ }, []);
667
+ }), d = O(() => a.value.flatMap((b) => {
668
+ const s = [];
669
+ return b.fields.forEach((r, u) => {
670
+ const g = se(r), o = s[s.length - 1];
671
+ if (o && o.fixed === g)
672
+ o.fields.push(r), o.colspan++, o.endIndex++, o.isGroupEnd = o.endIndex === b.endIndex;
673
+ else {
674
+ const y = b.startIndex + u;
675
+ s.push(pe(V({}, b), { key: `${b.key}:${g || "none"}:${y}`, groupKey: b.key, fields: [r], colspan: 1, startIndex: y, endIndex: y, fixed: g, isGroupStart: y === b.startIndex, isGroupEnd: y === b.endIndex }));
676
+ }
677
+ }), s;
678
+ })), i = O(() => {
679
+ const b = /* @__PURE__ */ new Map();
680
+ for (const s of a.value) {
681
+ b.set(s.fields[0], ["vuetable-group-start"]);
682
+ const r = s.fields[s.fields.length - 1];
683
+ b.set(r, [...b.get(r) || [], "vuetable-group-end"]);
684
+ }
685
+ return b;
686
+ });
687
+ return { scope: O(() => ({
688
+ fields: e.fields.value,
689
+ visibleFields: l.value,
690
+ groups: a.value,
691
+ headerGroups: d.value,
692
+ getCellProps: e.getCellProps,
693
+ getSpanProps: e.getSpanProps,
694
+ columnCount: l.value.length,
695
+ isFixedHeader: e.isFixedHeader.value,
696
+ scrollVisible: e.scrollVisible.value,
697
+ scrollBarWidth: e.scrollBarWidth.value
698
+ })), groupClass: (b) => i.value.get(b) || [] };
699
+ }
700
+ const Xl = {
701
+ table: {
702
+ tableWrapper: "",
703
+ tableHeaderClass: "fixed",
704
+ tableBodyClass: "fixed",
705
+ tableClass: "ui blue selectable unstackable celled table",
706
+ loadingClass: "loading",
707
+ ascendingIcon: "blue chevron up icon",
708
+ descendingIcon: "blue chevron down icon",
709
+ ascendingClass: "sorted-asc",
710
+ descendingClass: "sorted-desc",
711
+ sortableIcon: "grey sort icon",
712
+ handleIcon: "grey sidebar icon"
713
+ },
714
+ pagination: {
715
+ wrapperClass: "ui right floated pagination menu",
716
+ activeClass: "active large",
717
+ disabledClass: "disabled",
718
+ pageClass: "item",
719
+ linkClass: "icon item",
720
+ paginationClass: "ui bottom attached segment grid",
721
+ paginationInfoClass: "left floated left aligned six wide column",
722
+ dropdownClass: "ui search dropdown",
723
+ icons: {
724
+ first: "angle double left icon",
725
+ prev: "left chevron icon",
726
+ next: "right chevron icon",
727
+ last: "angle double right icon"
728
+ }
729
+ },
730
+ paginationInfo: {
731
+ infoClass: "left floated left aligned six wide column"
732
+ }
733
+ };
734
+ function _l(e, l = {}, a = !1) {
735
+ const d = Xl[e], i = a ? Object.fromEntries(Object.entries(d).map(([b, s]) => [
736
+ b,
737
+ typeof s == "object" ? Object.fromEntries(Object.keys(s).map((r) => [r, ""])) : ""
738
+ ])) : d, w = V(V({}, i), l);
739
+ if (e === "table" && !a)
740
+ for (const b of ["tableClass", "ascendingIcon", "descendingIcon", "sortableIcon", "handleIcon"])
741
+ Object.prototype.hasOwnProperty.call(l || {}, b) || (w[b] += b === "tableClass" ? " vuetable-semantic-table" : " vuetable-semantic-icon");
742
+ return w;
743
+ }
744
+ const Rn = /* @__PURE__ */ new WeakMap(), eo = ye({
745
+ name: "Vuetable",
746
+ inheritAttrs: I,
747
+ components: {
748
+ RenderBoundary: Dl,
749
+ SlotOutlet: Bn,
750
+ VuetableRowHeader: xl,
751
+ VuetableColGroup: Sn,
752
+ VuetableColGutter: Mt,
753
+ VuetableDetailHost: zl,
754
+ "vuetable-field-checkbox": jn,
755
+ "vuetable-field-handle": Dn,
756
+ "vuetable-field-sequence": Vn
757
+ },
758
+ props: {
759
+ fields: { type: Array, default: void 0 },
760
+ groupBy: { type: String, default: null },
761
+ fixedMode: { type: String, default: "edges", validator: (e) => e === "edges" || e === "in-place" },
762
+ loadOnStart: { type: Boolean, required: !1, default: !0 },
763
+ apiUrl: { type: String, required: !1, default: "" },
764
+ httpMethod: { type: String, required: !1, default: "get" },
765
+ reactiveApiUrl: { type: Boolean, required: !1, default: !0 },
766
+ apiMode: { type: Boolean, required: !1, default: !0 },
767
+ data: { type: null, required: !1, default: null },
768
+ dataManager: { type: Function, required: !1, default: null },
769
+ dataPath: { type: String, required: !1, default: "data" },
770
+ paginationPath: { type: String, required: !1, default: "links.pagination" },
771
+ queryParams: { type: [Object, Function], required: !1, default: () => ({
772
+ sort: "sort",
773
+ page: "page",
774
+ perPage: "per_page"
775
+ }) },
776
+ appendParams: { type: Object, required: !1, default: () => ({}) },
777
+ httpOptions: { type: Object, required: !1, default: () => ({}) },
778
+ httpFetch: { type: Function, required: !1, default: null },
779
+ perPage: { type: Number, required: !1, default: 10 },
780
+ initialPage: { type: Number, required: !1, default: 1 },
781
+ firstPage: { type: Number, required: !1, default: 1 },
782
+ sortOrder: { type: Array, required: !1, default: () => G([]).value },
783
+ multiSort: { type: Boolean, required: !1, default: !1 },
784
+ tableHeight: { type: String, required: !1, default: null },
785
+ multiSortKey: { type: String, required: !1, default: "alt" },
786
+ rowClass: { type: [String, Function], required: !1, default: "" },
787
+ detailRowComponent: { type: [String, Object], required: !1, default: "" },
788
+ detailRowTransition: { type: String, required: !1, default: "" },
789
+ detailRowClass: { type: [String, Function], required: !1, default: "vuetable-detail-row" },
790
+ detailRowOptions: { type: Object, required: !1, default: () => ({}) },
791
+ trackBy: { type: String, required: !1, default: "id" },
792
+ css: { type: Object, required: !1, default: () => ({}) },
793
+ unstyled: { type: Boolean, required: !1, default: void 0 },
794
+ minRows: { type: Number, required: !1, default: 0 },
795
+ silent: { type: Boolean, required: !1, default: !1 },
796
+ noDataTemplate: { type: String, required: !1, default: "No Data Available" },
797
+ showSortIcons: { type: Boolean, required: !1, default: !0 },
798
+ headerRows: { type: Array, required: !1, default: () => ["VuetableRowHeader"] },
799
+ transform: { type: Function, required: !1, default: null },
800
+ sortParams: { type: Function, required: !1, default: null },
801
+ fieldPrefix: { type: String, required: !1, default: "vuetable-field-" },
802
+ eventPrefix: { type: String, required: !1, default: "vuetable:" }
803
+ },
804
+ computed: {
805
+ $_css() {
806
+ return this.tableCss;
807
+ }
808
+ },
809
+ setup(e, { emit: l, slots: a, attrs: d }) {
810
+ var yn;
811
+ const i = qn(), w = gl(e), b = G(), s = G(0);
812
+ let r = V(V({}, e), d), u = Object.keys(a).length > 0;
813
+ wn(() => {
814
+ var T, L, Q, oe;
815
+ if (I) {
816
+ const Y = i == null ? void 0 : i.proxy;
817
+ ($.hasDeclarations() || Je("default") || (T = Y == null ? void 0 : Y.$slots) != null && T.default || (oe = (Q = (L = Y == null ? void 0 : Y.$vnode) == null ? void 0 : L.data) == null ? void 0 : Q.scopedSlots) != null && oe.default) && s.value++;
818
+ return;
819
+ }
820
+ const t = V(V({}, e), d), n = Object.keys(t), c = n.length === Object.keys(r).length && n.every((Y) => t[Y] === r[Y]), p = Object.keys(a).length > 0;
821
+ (c || u || p) && s.value++, u = p, r = t;
822
+ });
823
+ const g = O(() => i == null ? void 0 : i.proxy), o = G([]), y = Jl({ fields: o, mode: O(() => e.fixedMode || "edges"), warn: qe }), v = O({
824
+ get: () => y.orderedFields.value,
825
+ set: (t) => {
826
+ o.value = t;
827
+ }
828
+ }), $ = Ul({ fields: o, normalize: nt, warn: qe }), j = $.getColumnSlot, f = G(null), k = O(() => {
829
+ const t = /* @__PURE__ */ new Map();
830
+ return (f.value || []).map((c) => {
831
+ const p = c[e.trackBy];
832
+ if (typeof p != "string" && (typeof p != "number" || !Number.isFinite(p))) return null;
833
+ const T = JSON.stringify(["id", p]);
834
+ return t.set(T, (t.get(T) || 0) + 1), T;
835
+ }).map((c, p) => c !== null && t.get(c) === 1 ? c : JSON.stringify(["index", p]));
836
+ }), C = G(null), F = G(e.initialPage), x = G([]), te = G([]), fe = G(0), E = G("17px"), W = G(!1), J = Xe(e.sortOrder), h = I ? G(J) : Me(J);
837
+ let P = !1;
838
+ const q = O({
839
+ get: () => h.value,
840
+ set: (t) => {
841
+ P = !0, h.value = Xe(t), Ie();
842
+ }
843
+ });
844
+ I && i && al(() => Object.defineProperty(i.proxy, "sortOrder", {
845
+ configurable: !0,
846
+ enumerable: !0,
847
+ get: () => q.value,
848
+ set: (t) => {
849
+ q.value = t;
850
+ }
851
+ }));
852
+ const H = (yn = i == null ? void 0 : i.proxy) == null ? void 0 : yn.$parent;
853
+ if (H) {
854
+ let t = Rn.get(H);
855
+ if (!t) {
856
+ t = /* @__PURE__ */ new Set(), Rn.set(H, t);
857
+ const c = t, p = () => c.forEach((T) => T());
858
+ I ? H.$on("hook:beforeUpdate", p) : wn(p, H.$);
859
+ }
860
+ t.add(pt);
861
+ const n = t;
862
+ Ht(() => n.delete(pt));
863
+ }
864
+ const A = G(e.httpOptions), ne = G();
865
+ let re = 0;
866
+ const be = O(() => _l("table", e.css, w.value));
867
+ X(be, () => {
868
+ s.value++;
869
+ });
870
+ const ie = O(() => {
871
+ var t, n;
872
+ return (t = f.value) != null && t.length ? ((n = f.value) == null ? void 0 : n.length) > 0 : !1;
873
+ }), je = O(() => ie.value && e.detailRowComponent !== ""), ge = O(() => f.value && typeof f.value[0][e.trackBy] != "undefined"), $e = O(() => v.value.filter((t) => t.visible).length), me = O(() => {
874
+ var t;
875
+ return ((t = f.value) == null ? void 0 : t.length) || 0;
876
+ }), De = O(() => me.value === 0 && e.noDataTemplate.length > 0), Pe = O(() => {
877
+ var t;
878
+ return f.value === null || ((t = f.value) == null ? void 0 : t.length) === 0;
879
+ }), Ve = O(() => Pe.value ? !0 : f.value.length < e.minRows), Be = O(() => Pe.value ? e.minRows : f.value.length >= e.minRows ? 0 : e.minRows - f.value.length), D = O(() => e.apiMode), ue = O(() => !e.apiMode), N = O(() => e.tableHeight != null), B = Zl({ fields: v, root: () => {
880
+ var t;
881
+ return (t = i == null ? void 0 : i.proxy) == null ? void 0 : t.$el;
882
+ }, isFixedHeader: N, scrollVisible: W, scrollBarWidth: E }), { getCellProps: de, getSpanProps: Z, enabled: le } = B, et = Yl({ fields: v, groupBy: () => e.groupBy, isFixedHeader: N, scrollVisible: W, scrollBarWidth: B.headerGutterWidth, getCellProps: de, getSpanProps: Z });
883
+ tt(), Ie(), xe(() => {
884
+ Fe || M("initialized", v.value);
885
+ });
886
+ let Ke = !1, Fe = !1, Re = null, Ce = null;
887
+ function Ne() {
888
+ const t = b.value;
889
+ Re && (!Ke || !N.value || Re !== t) && (Re.removeEventListener("scroll", ze), Re = null), !(!Ke || !N.value || !t) && (E.value = Lt() + "px", Re !== t && (t.addEventListener("scroll", ze), Re = t), fe.value = -1, ze({ currentTarget: t }), Ae());
890
+ }
891
+ X(N, () => {
892
+ I ? xe(Ne) : Ne();
893
+ }, { flush: "post" }), Tn(() => {
894
+ Ke = !0, e.loadOnStart && ve(), Ne();
895
+ }), Ht(() => {
896
+ Ke = !1, Fe = !0, re++, Ce !== null && (clearTimeout(Ce), Ce = null), Ne();
897
+ });
898
+ const Bt = sl(pe(V({}, il(e)), {
899
+ vuetable: g,
900
+ $el: O(() => {
901
+ var t;
902
+ return (t = i == null ? void 0 : i.proxy) == null ? void 0 : t.$el;
903
+ }),
904
+ isApiMode: D,
905
+ tableLayout: et.scope,
906
+ groupClass: et.groupClass,
907
+ getCellProps: de,
908
+ getSpanProps: Z,
909
+ fixedColumnsEnabled: le,
910
+ hasFixedRightColumn: B.hasFixedRightColumn,
911
+ headerTableWidth: B.headerTableWidth,
912
+ scheduleFixedColumns: B.schedule,
913
+ getHeaderWidth: B.getHeaderWidth,
914
+ getColumnKey: y.getColumnKey,
915
+ tableFields: v,
916
+ tableData: f,
917
+ tablePagination: C,
918
+ selectedTo: x,
919
+ countVisibleFields: $e,
920
+ dataIsAvailable: ie,
921
+ countTableData: me,
922
+ displayEmptyDataRow: De,
923
+ useDetailRow: je,
924
+ hasRowIdentifier: ge,
925
+ lessThanMinRows: Ve,
926
+ blankRows: Be,
927
+ scrollVisible: W,
928
+ scrollBarWidth: B.headerGutterWidth,
929
+ sortOrder: h,
930
+ css: be,
931
+ $_css: be,
932
+ unstyled: w,
933
+ isFieldSlot: It,
934
+ getColumnSlot: j,
935
+ columnRevision: s,
936
+ onHeaderEvent: dn,
937
+ setData: ot,
938
+ getFieldTitle: Et,
939
+ orderBy: Ut,
940
+ camelCase: xt,
941
+ clearSortOrder: Zt,
942
+ toggleDetailRow: tn,
943
+ showDetailRow: kt,
944
+ hideDetailRow: St,
945
+ isVisibleDetailRow: Ee,
946
+ reload: Ot,
947
+ fireEvent: M,
948
+ singleColumnSort: yt,
949
+ removeSortColumn: vt,
950
+ setSortColumnDirection: ht,
951
+ clearSelectedValues: Yt,
952
+ showField: nn,
953
+ hideField: ln,
954
+ toggleField: on,
955
+ onCheckboxToggled: fn,
956
+ onCheckboxToggledAll: bn,
957
+ checkIfRowIdentifierExists: rt,
958
+ changePage: vn,
959
+ resetData: hn,
960
+ refresh: $t,
961
+ isFieldComponent: at,
962
+ makeTitle: Ue,
963
+ getAllQueryParams: ct,
964
+ isSortable: Ye,
965
+ getDefaultSortParam: dt,
966
+ getObjectValue: Te,
967
+ isSelectedRow: wt
968
+ }));
969
+ ul("vuetable", Bt);
970
+ function Lt() {
971
+ const t = document.createElement("div"), n = document.createElement("div");
972
+ t.style.visibility = "hidden", t.style.width = "100px", n.style.width = "100%", t.appendChild(n), document.body.appendChild(t);
973
+ const c = t.offsetWidth;
974
+ t.style.overflow = "scroll";
975
+ const p = n.offsetWidth;
976
+ return document.body.removeChild(t), c - p;
977
+ }
978
+ function ze(t) {
979
+ var p, T;
980
+ const n = t.currentTarget;
981
+ if (!n) return;
982
+ const c = n.scrollLeft;
983
+ if (c != fe.value) {
984
+ const L = (T = (p = b.value) == null ? void 0 : p.parentElement) == null ? void 0 : T.querySelector(".vuetable-head-wrapper");
985
+ L != null && (L.scrollLeft = c), fe.value = c;
986
+ }
987
+ }
988
+ function qe(t) {
989
+ e.silent || console.error(t);
990
+ }
991
+ function En(t, n) {
992
+ return [t, n.dataClass, ...et.groupClass(n), ...de(n).class];
993
+ }
994
+ function tt() {
995
+ if (typeof e.fields == "undefined") {
996
+ $.reconcile();
997
+ return;
998
+ }
999
+ o.value = e.fields.map(nt);
1000
+ }
1001
+ function nt(t, n) {
1002
+ const c = {
1003
+ name: "",
1004
+ // title:
1005
+ // this allow the code to detect undefined title
1006
+ // and replace it with capitalized name instead
1007
+ titleClass: "",
1008
+ dataClass: "",
1009
+ sortField: null,
1010
+ formatter: null,
1011
+ visible: !0,
1012
+ width: null,
1013
+ $_index: n
1014
+ };
1015
+ if (typeof t == "string")
1016
+ return pe(V({}, c), {
1017
+ name: lt(t),
1018
+ title: Ue(t)
1019
+ });
1020
+ const p = Object.assign({}, c, t);
1021
+ return p.name = lt(p.name), p.title === void 0 && (p.title = Ue(p.name)), p.formatter !== null && typeof p.formatter != "function" && (console.error(p.name + " field formatter must be a function"), p.formatter = null), p;
1022
+ }
1023
+ function lt(t) {
1024
+ return t instanceof Object ? Hn(qt(t)) : t.replace("__", e.fieldPrefix);
1025
+ }
1026
+ function ot(t) {
1027
+ t === null || typeof t == "undefined" || Le(t, ++re);
1028
+ }
1029
+ function R(t) {
1030
+ return !Fe && t === re;
1031
+ }
1032
+ function Le(t, n) {
1033
+ if (!(!R(n) || t === null || typeof t == "undefined") && (M("loading"), !!R(n))) {
1034
+ if (Array.isArray(t)) {
1035
+ if (f.value = t, !R(n)) return;
1036
+ M("loaded");
1037
+ return;
1038
+ }
1039
+ At(t, n);
1040
+ }
1041
+ }
1042
+ function At(t, n, c = !1) {
1043
+ const p = Te(t, e.dataPath, null);
1044
+ if (!R(n) || (f.value = p, !R(n))) return;
1045
+ const T = Te(t, e.paginationPath, null);
1046
+ R(n) && (C.value = T, R(n) && (c && C.value === null && qe(`vuetable: pagination-path ${e.paginationPath} not found.
1047
+ It looks like the data returned from the server does not have pagination information
1048
+ or you may have set it incorrectly.
1049
+
1050
+ You can explicitly suppress this warning by setting pagination-path="".`), xe(() => {
1051
+ R(n) && (rt(), R(n) && (Ze(), R(n) && (M("pagination-data", C.value), R(n) && M("loaded"))));
1052
+ })));
1053
+ }
1054
+ function rt() {
1055
+ if (ie.value)
1056
+ return ge.value ? !0 : (qe('Invalid your data! Use "track-by" prop to specify.'), !1);
1057
+ }
1058
+ function Ue(t) {
1059
+ return at(t) ? "" : st(t.replace(".", " "));
1060
+ }
1061
+ function Et(t) {
1062
+ return typeof t.title == "function" ? t.title() : t.title;
1063
+ }
1064
+ function In(t, n) {
1065
+ return gt(t) ? Qt(t, n) : Te(n, t.name, "");
1066
+ }
1067
+ function at(t) {
1068
+ return t instanceof Object ? !0 : t.slice(0, e.fieldPrefix.length) === e.fieldPrefix || t.slice(0, 2) === "__";
1069
+ }
1070
+ function It(t) {
1071
+ return typeof Je(t) != "undefined";
1072
+ }
1073
+ function Je(t) {
1074
+ var n, c;
1075
+ return I ? (c = (n = i == null ? void 0 : i.proxy) == null ? void 0 : n.$scopedSlots) == null ? void 0 : c[t] : a[t];
1076
+ }
1077
+ function st(t) {
1078
+ return t.replace(/\w+/g, (n) => n.charAt(0).toUpperCase() + n.substring(1).toLowerCase());
1079
+ }
1080
+ function xt(t, n = "_") {
1081
+ return t.split(n).map((c) => st(c)).join("");
1082
+ }
1083
+ function ve(t = it, n = Qe) {
1084
+ const c = ++re;
1085
+ if (ue.value) {
1086
+ an(c);
1087
+ return;
1088
+ }
1089
+ if (!R(c) || (M("loading"), !R(c))) return Promise.resolve();
1090
+ const p = V({}, A.value), T = ct();
1091
+ if (!R(c) || (p.params = Nt(V({}, T)), !R(c))) return Promise.resolve();
1092
+ const L = Wt(e.apiUrl, p);
1093
+ return R(c) && (ne.value = L), L.then(
1094
+ (Q) => {
1095
+ if (R(c))
1096
+ return t === it ? Gt(Q, c) : t(Q);
1097
+ },
1098
+ (Q) => {
1099
+ if (R(c))
1100
+ return n === Qe ? ut(Q, c) : n(Q);
1101
+ }
1102
+ ).catch(() => {
1103
+ if (R(c))
1104
+ return n === Qe ? ut(void 0, c) : n();
1105
+ });
1106
+ }
1107
+ function Wt(t, n) {
1108
+ return Pt(this, null, function* () {
1109
+ const c = e.httpFetch, p = e.httpMethod;
1110
+ return c ? c(t, n) : yield ml(t, n, p);
1111
+ });
1112
+ }
1113
+ function it(t) {
1114
+ Gt(t, re);
1115
+ }
1116
+ function Gt(t, n) {
1117
+ if (!R(n) || (M("load-success", t), !R(n))) return;
1118
+ const c = e.transform ? e.transform(t.data) : t.data;
1119
+ R(n) && At(c, n, !0);
1120
+ }
1121
+ function Ze() {
1122
+ Fe || (Ce !== null && clearTimeout(Ce), Ce = setTimeout(() => {
1123
+ Ce = null, Ae();
1124
+ }, 80));
1125
+ }
1126
+ function Ae() {
1127
+ Fe || xe(() => {
1128
+ if (Fe) return;
1129
+ const t = b.value;
1130
+ t != null && (W.value = t.scrollHeight > t.clientHeight, M("scrollbar-visible", W.value));
1131
+ });
1132
+ }
1133
+ function Qe(t) {
1134
+ ut(t, re);
1135
+ }
1136
+ function ut(t, n) {
1137
+ R(n) && (console.error("load-error", t), R(n) && (M("load-error", t), R(n) && M("loaded")));
1138
+ }
1139
+ function ct() {
1140
+ let t = {};
1141
+ return typeof e.queryParams == "function" ? (t = e.queryParams(h.value, F.value, e.perPage), typeof t == "object" ? t : {}) : (t[e.queryParams.sort] = Kt(), t[e.queryParams.page] = F.value, t[e.queryParams.perPage] = e.perPage, t);
1142
+ }
1143
+ function Kt() {
1144
+ var t;
1145
+ return !h.value || ((t = h.value[0]) == null ? void 0 : t.field) == "" ? "" : typeof e.sortParams == "function" ? e.sortParams(h.value) : dt();
1146
+ }
1147
+ function dt() {
1148
+ return h.value.map((t) => `${t.sortField}|${t.direction}`).join(",");
1149
+ }
1150
+ function Nt(t) {
1151
+ for (let n in e.appendParams)
1152
+ t[n] = e.appendParams[n];
1153
+ return t;
1154
+ }
1155
+ function Ye(t) {
1156
+ return t.sortField !== null;
1157
+ }
1158
+ function zt(t) {
1159
+ if (!Ye(t))
1160
+ return !1;
1161
+ for (let n = 0; n < h.value.length; n++)
1162
+ if (ft(t, n))
1163
+ return n;
1164
+ return !1;
1165
+ }
1166
+ function ft(t, n) {
1167
+ return h.value[n].field === t.name && h.value[n].sortField === t.sortField;
1168
+ }
1169
+ function Ut(t, n) {
1170
+ if (!Ye(t)) return;
1171
+ const c = e.multiSortKey.toLowerCase() + "Key";
1172
+ e.multiSort && n[c] ? Jt(t) : yt(t), F.value = e.firstPage, (D.value || e.dataManager) && ve();
1173
+ }
1174
+ function He() {
1175
+ I || dl(h);
1176
+ }
1177
+ function bt(t, n) {
1178
+ h.value.push({
1179
+ field: t.name,
1180
+ sortField: t.sortField,
1181
+ direction: n || "asc"
1182
+ }), He();
1183
+ }
1184
+ function vt(t) {
1185
+ h.value.splice(t, 1), He();
1186
+ }
1187
+ function ht(t, n) {
1188
+ h.value[t].direction = n, He();
1189
+ }
1190
+ function Jt(t) {
1191
+ let n = zt(t);
1192
+ n === !1 ? bt(t, "asc") : h.value[n].direction === "asc" ? ht(n, "desc") : vt(n);
1193
+ }
1194
+ function yt(t) {
1195
+ if (h.value.length === 0) {
1196
+ bt(t, "asc");
1197
+ return;
1198
+ }
1199
+ h.value.splice(1), ft(t, 0) ? h.value[0].direction = h.value[0].direction === "asc" ? "desc" : "asc" : h.value[0].direction = "asc", h.value[0].field = t.name, h.value[0].sortField = t.sortField, He();
1200
+ }
1201
+ function Zt() {
1202
+ q.value = G([]).value;
1203
+ }
1204
+ function pt() {
1205
+ var n;
1206
+ if (!P) return;
1207
+ const t = I ? (n = i == null ? void 0 : i.proxy) == null ? void 0 : n.$options.propsData : i == null ? void 0 : i.vnode.props;
1208
+ (t == null ? void 0 : t.sortOrder) === void 0 && (t == null ? void 0 : t["sort-order"]) === void 0 || (P = !1, h.value = Xe(e.sortOrder), Ie());
1209
+ }
1210
+ function gt(t) {
1211
+ return typeof t.formatter == "function";
1212
+ }
1213
+ function Qt(t, n) {
1214
+ if (gt(t) && typeof t.formatter == "function")
1215
+ return t.formatter(Te(n, t.name), i == null ? void 0 : i.proxy);
1216
+ }
1217
+ function Te(t, n, c) {
1218
+ c = typeof c == "undefined" ? null : c;
1219
+ let p = t;
1220
+ return n.trim() != "" && n.split(".").forEach((L) => {
1221
+ if (p !== null && typeof p[L] != "undefined" && p[L] !== null)
1222
+ p = p[L];
1223
+ else {
1224
+ p = c;
1225
+ return;
1226
+ }
1227
+ }), p;
1228
+ }
1229
+ function mt(t) {
1230
+ wt(t) || x.value.push(t);
1231
+ }
1232
+ function Ct(t) {
1233
+ x.value = x.value.filter((n) => n !== t);
1234
+ }
1235
+ function wt(t) {
1236
+ return x.value.indexOf(t) >= 0;
1237
+ }
1238
+ function Yt() {
1239
+ x.value = [];
1240
+ }
1241
+ function Xt() {
1242
+ F.value > e.firstPage && (F.value -= 1, ve());
1243
+ }
1244
+ function _t() {
1245
+ F.value < C.value.last_page && (F.value += 1, ve());
1246
+ }
1247
+ function en(t) {
1248
+ t != F.value && t >= e.firstPage && t <= C.value.last_page && (F.value = t, ve());
1249
+ }
1250
+ function Ee(t) {
1251
+ return te.value.indexOf(t) >= 0;
1252
+ }
1253
+ function kt(t) {
1254
+ Ee(t) || te.value.push(t), Ae();
1255
+ }
1256
+ function St(t) {
1257
+ Ee(t) && (te.value.splice(
1258
+ te.value.indexOf(t),
1259
+ 1
1260
+ ), Ze());
1261
+ }
1262
+ function tn(t) {
1263
+ Ee(t) ? St(t) : kt(t);
1264
+ }
1265
+ function nn(t) {
1266
+ t < 0 || t >= o.value.length || (o.value[t].visible = !0);
1267
+ }
1268
+ function ln(t) {
1269
+ t < 0 || t >= o.value.length || (o.value[t].visible = !1);
1270
+ }
1271
+ function on(t) {
1272
+ t < 0 || t >= o.value.length || (o.value[t].visible = !o.value[t].visible);
1273
+ }
1274
+ function rn(t = null, n = null, c = null) {
1275
+ return t = t === null ? 0 : t, n = n === null ? e.perPage : n, c = c === null ? F.value : c, {
1276
+ total: t,
1277
+ per_page: n,
1278
+ current_page: c,
1279
+ last_page: Math.ceil(t / n) || 0,
1280
+ next_page_url: "",
1281
+ prev_page_url: "",
1282
+ from: (c - 1) * n + 1,
1283
+ to: Math.min(c * n, t)
1284
+ };
1285
+ }
1286
+ function Xe(t) {
1287
+ const n = (c) => fl(c) || Object.isFrozen(qt(c));
1288
+ return n(t) || t.some(n) ? G(t.map((c) => V({}, c))).value : t;
1289
+ }
1290
+ function Ie() {
1291
+ let t = !1;
1292
+ h.value.forEach((n) => {
1293
+ const c = n.sortField || n.field;
1294
+ n.sortField !== c && (cl(n, "sortField", c), t = !0);
1295
+ }), t && He();
1296
+ }
1297
+ function xn() {
1298
+ an(++re);
1299
+ }
1300
+ function an(t) {
1301
+ if (R(t)) {
1302
+ if (e.data !== null && Array.isArray(e.data)) {
1303
+ Le(e.data, t);
1304
+ return;
1305
+ }
1306
+ e.dataManager ? sn(t) : Le(e.data, t);
1307
+ }
1308
+ }
1309
+ function Wn() {
1310
+ sn(++re);
1311
+ }
1312
+ function sn(t) {
1313
+ if (!R(t)) return;
1314
+ const n = e.dataManager(h.value, rn());
1315
+ cn(n) ? n.then((c) => Le(c, t)) : Le(n, t);
1316
+ }
1317
+ function un(t) {
1318
+ return typeof t == "object" && t !== null;
1319
+ }
1320
+ function cn(t) {
1321
+ return un(t) && typeof t.then == "function";
1322
+ }
1323
+ function Gn(t, n) {
1324
+ return typeof e.rowClass == "function" ? e.rowClass(t, n) : e.rowClass;
1325
+ }
1326
+ function Kn(t, n) {
1327
+ return typeof e.detailRowClass == "function" ? e.detailRowClass(t, n) : e.detailRowClass;
1328
+ }
1329
+ function Nn(t, n, c) {
1330
+ return M("row-clicked", { data: t, index: n, event: c }), !0;
1331
+ }
1332
+ function zn(t, n, c) {
1333
+ M("row-dblclicked", { data: t, index: n, event: c });
1334
+ }
1335
+ function Un(t, n, c) {
1336
+ M("detail-row-clicked", { data: t, index: n, event: c });
1337
+ }
1338
+ function Jn(t, n, c, p) {
1339
+ M("cell-clicked", { data: t, index: n, field: c, event: p });
1340
+ }
1341
+ function Zn(t, n, c, p) {
1342
+ M("cell-dblclicked", { data: t, index: n, field: c, event: p });
1343
+ }
1344
+ function Qn(t, n, c, p) {
1345
+ M("cell-rightclicked", { data: t, index: n, field: c, event: p });
1346
+ }
1347
+ function Yn(t, n, c) {
1348
+ M("row-mouseover", { data: t, index: n, event: c });
1349
+ }
1350
+ function Xn(t, n) {
1351
+ M("field-event", t, n, i == null ? void 0 : i.proxy);
1352
+ }
1353
+ function dn(t, n) {
1354
+ M("header-event", t, n, i == null ? void 0 : i.proxy);
1355
+ }
1356
+ function fn(t, n, c) {
1357
+ if (c[e.trackBy] === void 0) {
1358
+ qe(`checkbox field: The "${e.trackBy}" field does not exist! Make sure the field you specify in "track-by" prop does exist.`);
1359
+ return;
1360
+ }
1361
+ const p = c[e.trackBy];
1362
+ t ? mt(p) : Ct(p), M("checkbox-toggled", t, n, c);
1363
+ }
1364
+ function bn(t) {
1365
+ var n, c;
1366
+ t ? (n = f.value) == null || n.forEach((p) => {
1367
+ mt(p[e.trackBy]);
1368
+ }) : (c = f.value) == null || c.forEach((p) => {
1369
+ Ct(p[e.trackBy]);
1370
+ }), M("checkbox-toggled-all", t);
1371
+ }
1372
+ function vn(t) {
1373
+ t === "prev" ? Xt() : t === "next" ? _t() : en(t);
1374
+ }
1375
+ function Ot() {
1376
+ return ve();
1377
+ }
1378
+ function M(t, ...n) {
1379
+ return l(`${e.eventPrefix}${t}`, ...n);
1380
+ }
1381
+ function _n() {
1382
+ var p, T, L, Q;
1383
+ if ($.discover((Q = (p = Je("default")) == null ? void 0 : p()) != null ? Q : I ? (L = (T = i == null ? void 0 : i.proxy) == null ? void 0 : T.$slots) == null ? void 0 : L.default : void 0), e.fields === void 0 && $.reconcile(), I) return {};
1384
+ const t = String(e.eventPrefix), n = [t, `${t}x`.replace(/-(\w)/g, (oe, Y) => Y.toUpperCase()).slice(0, -1)].map((oe) => `on${oe.charAt(0).toUpperCase()}${oe.slice(1)}`), c = {};
1385
+ for (const oe in d)
1386
+ if (Object.prototype.hasOwnProperty.call(d, oe)) {
1387
+ if (/^on[^a-z]/.test(oe)) {
1388
+ const Y = oe.replace(/(?:Once|Passive|Capture)+$/, "");
1389
+ if (!oe.startsWith("on:") && !/^on[A-Z][a-z0-9]*$/.test(Y) && (t === "" || n.some((el) => Y.startsWith(el)))) continue;
1390
+ }
1391
+ c[oe] = d[oe];
1392
+ }
1393
+ return c;
1394
+ }
1395
+ function $t() {
1396
+ return F.value = e.firstPage, ve();
1397
+ }
1398
+ function hn() {
1399
+ const t = ++re;
1400
+ R(t) && (f.value = null, R(t) && (C.value = null, R(t) && M("data-reset")));
1401
+ }
1402
+ return X(() => e.multiSort, (t) => {
1403
+ !t && h.value.length > 1 && (h.value.splice(1), He(), ve());
1404
+ }), X(() => e.apiUrl, (t, n) => e.reactiveApiUrl && t !== n && $t()), X(() => e.data, ot, { immediate: !0 }), X([f, me], () => {
1405
+ N.value && xe(Ze);
1406
+ }), X(() => e.tableHeight, (t, n) => {
1407
+ (t == null || n != null) && Ae();
1408
+ }), X(() => {
1409
+ var t;
1410
+ return { source: e.fields, fields: (t = e.fields) == null ? void 0 : t.map((n) => ({ source: n, fixed: typeof n == "object" && n !== null ? n.fixed : void 0, fixedOrder: typeof n == "object" && n !== null ? n.fixedOrder : void 0 })) };
1411
+ }, (t, n) => {
1412
+ var c;
1413
+ if (!n || t.source !== n.source || !t.fields || t.fields.length !== ((c = n.fields) == null ? void 0 : c.length) || t.fields.some((p, T) => {
1414
+ var L;
1415
+ return p.source !== ((L = n.fields) == null ? void 0 : L[T].source);
1416
+ })) {
1417
+ tt();
1418
+ return;
1419
+ }
1420
+ t.fields.forEach((p, T) => {
1421
+ var L, Q;
1422
+ p.fixed !== ((L = n.fields) == null ? void 0 : L[T].fixed) && (o.value[T].fixed = p.fixed), p.fixedOrder !== ((Q = n.fields) == null ? void 0 : Q[T].fixedOrder) && (o.value[T].fixedOrder = p.fixedOrder);
1423
+ });
1424
+ }, { immediate: !0 }), X(() => e.perPage, Ot), X(() => e.sortOrder, (t, n) => {
1425
+ (t !== n || h.value === t || P) && (P = !1, h.value = Xe(t)), Ie();
1426
+ }, { flush: "sync" }), X(() => e.sortOrder.slice(), pt), X(() => e.httpOptions, (t) => {
1427
+ A.value = t;
1428
+ }, { immediate: !0 }), pe(V({}, I ? {} : { sortOrder: q }), { bodyRevision: s, getSlot: Je, getRootAttrs: _n, tableContext: Bt, fireEvent: M, bodyWrapper: b, vuetable: g, tableFields: v, tableData: f, rowKeys: k, tablePagination: C, currentPage: F, selectedTo: x, visibleDetailRows: te, lastScrollPosition: fe, scrollBarWidth: E, scrollVisible: W, order: h, optionsHttp: A, instanceFetch: ne, tableCss: be, dataIsAvailable: ie, useDetailRow: je, hasRowIdentifier: ge, countVisibleFields: $e, countTableData: me, displayEmptyDataRow: De, emptyDataTable: Pe, lessThanMinRows: Ve, blankRows: Be, isApiMode: D, isDataMode: ue, isFixedHeader: N, getScrollBarWidth: Lt, handleScroll: ze, warn: qe, bodyClass: En, normalizeFields: tt, newField: nt, normalizeFieldName: lt, setData: ot, checkIfRowIdentifierExists: rt, makeTitle: Ue, getFieldTitle: Et, renderNormalField: In, isFieldComponent: at, isFieldSlot: It, titleCase: st, camelCase: xt, loadData: ve, fetch: Wt, loadSuccess: it, updateHeader: Ze, checkScrollbarVisibility: Ae, loadFailed: Qe, getAllQueryParams: ct, getSortParam: Kt, getDefaultSortParam: dt, getAppendParams: Nt, isSortable: Ye, currentSortOrderPosition: zt, fieldIsInSortOrderPosition: ft, orderBy: Ut, addSortColumn: bt, removeSortColumn: vt, setSortColumnDirection: ht, multiColumnSort: Jt, singleColumnSort: yt, clearSortOrder: Zt, hasFormatter: gt, callFormatter: Qt, getObjectValue: Te, selectId: mt, unselectId: Ct, isSelectedRow: wt, clearSelectedValues: Yt, gotoPreviousPage: Xt, gotoNextPage: _t, gotoPage: en, isVisibleDetailRow: Ee, showDetailRow: kt, hideDetailRow: St, toggleDetailRow: tn, showField: nn, hideField: ln, toggleField: on, makePagination: rn, normalizeSortOrder: Ie, handleDataMode: xn, callDataManager: Wn, isObject: un, isPromiseObject: cn, onRowClass: Gn, onDetailRowClass: Kn, onRowClicked: Nn, onRowDoubleClicked: zn, onDetailRowClick: Un, onCellClicked: Jn, onCellDoubleClicked: Zn, onCellRightClicked: Qn, onMouseOver: Yn, onFieldEvent: Xn, onHeaderEvent: dn, onCheckboxToggled: fn, onCheckboxToggledAll: bn, changePage: vn, reload: Ot, refresh: $t, resetData: hn, VuetableColGroup: Sn });
1429
+ }
1430
+ }), to = {
1431
+ key: 0,
1432
+ class: "vuetable-head-wrapper"
1433
+ }, no = {
1434
+ key: 1,
1435
+ class: "vuetable-header-groups"
1436
+ }, lo = ["colspan"], oo = { key: 0 }, ro = {
1437
+ key: 1,
1438
+ class: "vuetable-header-groups"
1439
+ }, ao = ["colspan"], so = { class: "vuetable-body" }, io = ["item-index", "onClick", "onDblclick", "onMouseover"], uo = ["data-vuetable-column"], co = ["data-vuetable-column", "onClick", "onDblclick", "onContextmenu"], fo = ["data-vuetable-column", "innerHTML", "onClick", "onDblclick", "onContextmenu"], bo = ["onClick"], vo = ["colspan"], ho = { key: 0 }, yo = ["colspan", "innerHTML"], po = ["data-vuetable-column"];
1440
+ function go(e, l, a, d, i, w) {
1441
+ const b = we("vuetable-col-group"), s = we("slot-outlet"), r = we("vuetable-col-gutter"), u = we("vuetable-detail-host"), g = we("render-boundary");
1442
+ return m(), S("div", ke(e.getRootAttrs(), {
1443
+ class: ["vuetable-root", e.tableCss.tableWrapper, { "vuetable-fixed-columns": e.tableContext.fixedColumnsEnabled, "vuetable-unstyled": e.tableContext.unstyled, "vuetable-styled": !e.tableContext.unstyled }]
1444
+ }), [
1445
+ e.isFixedHeader ? (m(), S("div", to, [
1446
+ ae("table", {
1447
+ style: ee({ width: e.tableContext.headerTableWidth, boxSizing: e.tableContext.headerTableWidth ? "border-box" : void 0 }),
1448
+ class: K(["vuetable", "fixed-header", e.tableCss.tableClass, e.tableCss.tableHeaderClass, { "vuetable-styled": !e.tableContext.unstyled }])
1449
+ }, [
1450
+ z(b, { "is-header": "" }),
1451
+ ae("thead", null, [
1452
+ z(s, {
1453
+ content: e.getSlot("beforeHeader"),
1454
+ scope: e.tableContext.tableLayout
1455
+ }, null, 8, ["content", "scope"]),
1456
+ bl(e.$slots, "tableHeader", vl(hl(e.tableContext.tableLayout)), () => [
1457
+ e.tableContext.tableLayout.groups.length && e.getSlot("tableHeaderGroups") ? (m(), ce(s, {
1458
+ key: 0,
1459
+ content: e.getSlot("tableHeaderGroups"),
1460
+ scope: e.tableContext.tableLayout
1461
+ }, null, 8, ["content", "scope"])) : e.tableContext.tableLayout.groups.length ? (m(), S("tr", no, [
1462
+ (m(!0), S(U, null, he(e.tableContext.tableLayout.headerGroups, (o) => (m(), S("th", {
1463
+ key: o.key,
1464
+ style: ee(e.tableContext.tableLayout.getSpanProps(o.fields).style),
1465
+ colspan: o.colspan,
1466
+ class: K([e.tableContext.tableLayout.getSpanProps(o.fields).class, { "vuetable-group-start": o.isGroupStart, "vuetable-group-end": o.isGroupEnd }]),
1467
+ scope: "colgroup"
1468
+ }, kn(o.value), 15, lo))), 128)),
1469
+ e.scrollVisible ? (m(), ce(r, { key: 0 })) : _("", !0)
1470
+ ])) : _("", !0),
1471
+ (m(!0), S(U, null, he(e.headerRows, (o, y) => (m(), ce(Ge(o), {
1472
+ key: y,
1473
+ index: y,
1474
+ vuetable: e.tableContext,
1475
+ "onVuetable:headerEvent": e.onHeaderEvent
1476
+ }, null, 40, ["index", "vuetable", "onVuetable:headerEvent"]))), 128))
1477
+ ]),
1478
+ z(s, {
1479
+ content: e.getSlot("afterHeader"),
1480
+ scope: e.tableContext.tableLayout
1481
+ }, null, 8, ["content", "scope"])
1482
+ ])
1483
+ ], 6)
1484
+ ])) : _("", !0),
1485
+ z(g, {
1486
+ revision: e.bodyRevision,
1487
+ "on-rendered": e.isFixedHeader || e.tableContext.fixedColumnsEnabled ? e.tableContext.scheduleFixedColumns : void 0
1488
+ }, {
1489
+ default: Ft(() => [
1490
+ ae("div", {
1491
+ ref: "bodyWrapper",
1492
+ class: K([{ "fixed-header": e.isFixedHeader }, "vuetable-body-wrapper"]),
1493
+ style: ee({ height: e.tableHeight })
1494
+ }, [
1495
+ ae("table", {
1496
+ class: K(["vuetable", e.isFixedHeader ? "fixed-header" : "", e.tableCss.tableClass, e.tableCss.tableBodyClass, { "vuetable-styled": !e.tableContext.unstyled }])
1497
+ }, [
1498
+ z(b),
1499
+ e.isFixedHeader ? _("", !0) : (m(), S("thead", oo, [
1500
+ z(s, {
1501
+ content: e.getSlot("beforeHeader"),
1502
+ scope: e.tableContext.tableLayout
1503
+ }, null, 8, ["content", "scope"]),
1504
+ z(s, {
1505
+ content: e.getSlot("tableHeader"),
1506
+ scope: e.tableContext.tableLayout
1507
+ }, {
1508
+ default: Ft(() => [
1509
+ e.tableContext.tableLayout.groups.length && e.getSlot("tableHeaderGroups") ? (m(), ce(s, {
1510
+ key: 0,
1511
+ content: e.getSlot("tableHeaderGroups"),
1512
+ scope: e.tableContext.tableLayout
1513
+ }, null, 8, ["content", "scope"])) : e.tableContext.tableLayout.groups.length ? (m(), S("tr", ro, [
1514
+ (m(!0), S(U, null, he(e.tableContext.tableLayout.headerGroups, (o) => (m(), S("th", {
1515
+ key: o.key,
1516
+ style: ee(e.tableContext.tableLayout.getSpanProps(o.fields).style),
1517
+ colspan: o.colspan,
1518
+ class: K([e.tableContext.tableLayout.getSpanProps(o.fields).class, { "vuetable-group-start": o.isGroupStart, "vuetable-group-end": o.isGroupEnd }]),
1519
+ scope: "colgroup"
1520
+ }, kn(o.value), 15, ao))), 128)),
1521
+ e.scrollVisible ? (m(), ce(r, { key: 0 })) : _("", !0)
1522
+ ])) : _("", !0),
1523
+ (m(!0), S(U, null, he(e.headerRows, (o, y) => (m(), ce(Ge(o), {
1524
+ key: y,
1525
+ index: y,
1526
+ vuetable: e.tableContext,
1527
+ "onVuetable:headerEvent": e.onHeaderEvent
1528
+ }, null, 40, ["index", "vuetable", "onVuetable:headerEvent"]))), 128))
1529
+ ]),
1530
+ _: 1
1531
+ }, 8, ["content", "scope"]),
1532
+ z(s, {
1533
+ content: e.getSlot("afterHeader"),
1534
+ scope: e.tableContext.tableLayout
1535
+ }, null, 8, ["content", "scope"])
1536
+ ])),
1537
+ ae("tfoot", null, [
1538
+ z(s, {
1539
+ content: e.getSlot("beforeFooter"),
1540
+ scope: e.tableContext.tableLayout
1541
+ }, null, 8, ["content", "scope"]),
1542
+ z(s, {
1543
+ content: e.getSlot("tableFooter"),
1544
+ scope: e.tableContext.tableLayout
1545
+ }, null, 8, ["content", "scope"]),
1546
+ z(s, {
1547
+ content: e.getSlot("afterFooter"),
1548
+ scope: e.tableContext.tableLayout
1549
+ }, null, 8, ["content", "scope"])
1550
+ ]),
1551
+ ae("tbody", so, [
1552
+ (m(!0), S(U, null, he(e.tableData, (o, y) => (m(), S(U, {
1553
+ key: e.rowKeys[y]
1554
+ }, [
1555
+ ae("tr", {
1556
+ "item-index": y,
1557
+ class: K(e.onRowClass(o, y)),
1558
+ onClick: (v) => e.onRowClicked(o, y, v),
1559
+ onDblclick: (v) => e.onRowDoubleClicked(o, y, v),
1560
+ onMouseover: (v) => e.onMouseOver(o, y, v)
1561
+ }, [
1562
+ (m(!0), S(U, null, he(e.tableFields, (v) => (m(), S(U, {
1563
+ key: e.tableContext.getColumnKey(v)
1564
+ }, [
1565
+ v.visible ? (m(), S(U, { key: 0 }, [
1566
+ e.isFieldComponent(v.name) ? (m(), ce(Ge(v.name), {
1567
+ key: e.tableContext.getColumnKey(v),
1568
+ "row-data": o,
1569
+ "row-index": y,
1570
+ "row-field": v,
1571
+ vuetable: e.tableContext,
1572
+ "data-vuetable-column": e.tableContext.getCellProps(v)["data-vuetable-column"],
1573
+ class: K(e.bodyClass("vuetable-component", v)),
1574
+ style: ee([{ width: v.width || void 0 }, e.tableContext.getCellProps(v).style]),
1575
+ "onVuetable:fieldEvent": e.onFieldEvent
1576
+ }, null, 40, ["row-data", "row-index", "row-field", "vuetable", "data-vuetable-column", "class", "style", "onVuetable:fieldEvent"])) : e.isFieldSlot(v.name) ? (m(), S("td", {
1577
+ key: e.tableContext.getColumnKey(v),
1578
+ "data-vuetable-column": e.tableContext.getCellProps(v)["data-vuetable-column"],
1579
+ class: K(e.bodyClass("vuetable-slot", v)),
1580
+ style: ee([{ width: v.width || void 0 }, e.tableContext.getCellProps(v).style])
1581
+ }, [
1582
+ z(s, {
1583
+ content: e.getSlot(v.name),
1584
+ scope: { rowData: o, rowIndex: y, rowField: v }
1585
+ }, null, 8, ["content", "scope"])
1586
+ ], 14, uo)) : e.tableContext.getColumnSlot(v.name) ? (m(), S("td", {
1587
+ key: e.tableContext.getColumnKey(v),
1588
+ "data-vuetable-column": e.tableContext.getCellProps(v)["data-vuetable-column"],
1589
+ class: K(e.bodyClass("vuetable-td-" + v.name, v)),
1590
+ style: ee([{ width: v.width || void 0 }, e.tableContext.getCellProps(v).style]),
1591
+ onClick: ($) => e.onCellClicked(o, y, v, $),
1592
+ onDblclick: ($) => e.onCellDoubleClicked(o, y, v, $),
1593
+ onContextmenu: ($) => e.onCellRightClicked(o, y, v, $)
1594
+ }, [
1595
+ z(s, {
1596
+ content: e.tableContext.getColumnSlot(v.name),
1597
+ scope: { row: o, index: y, column: v }
1598
+ }, null, 8, ["content", "scope"])
1599
+ ], 46, co)) : (m(), S("td", {
1600
+ key: e.tableContext.getColumnKey(v),
1601
+ "data-vuetable-column": e.tableContext.getCellProps(v)["data-vuetable-column"],
1602
+ class: K(e.bodyClass("vuetable-td-" + v.name, v)),
1603
+ style: ee([{ width: v.width || void 0 }, e.tableContext.getCellProps(v).style]),
1604
+ innerHTML: e.renderNormalField(v, o),
1605
+ onClick: ($) => e.onCellClicked(o, y, v, $),
1606
+ onDblclick: ($) => e.onCellDoubleClicked(o, y, v, $),
1607
+ onContextmenu: ($) => e.onCellRightClicked(o, y, v, $)
1608
+ }, null, 46, fo))
1609
+ ], 64)) : _("", !0)
1610
+ ], 64))), 128))
1611
+ ], 42, io),
1612
+ e.useDetailRow ? (m(), ce(yl, {
1613
+ key: "detail:" + e.rowKeys[y],
1614
+ name: e.detailRowTransition
1615
+ }, {
1616
+ default: Ft(() => [
1617
+ e.isVisibleDetailRow(o[e.trackBy]) ? (m(), S("tr", {
1618
+ key: "detail:" + e.rowKeys[y],
1619
+ class: K(e.onDetailRowClass(o, y)),
1620
+ onClick: (v) => e.onDetailRowClick(o, y, v)
1621
+ }, [
1622
+ ae("td", { colspan: e.countVisibleFields }, [
1623
+ z(u, {
1624
+ "detail-component": e.detailRowComponent,
1625
+ "row-data": o,
1626
+ "row-index": y,
1627
+ options: e.detailRowOptions
1628
+ }, null, 8, ["detail-component", "row-data", "row-index", "options"])
1629
+ ], 8, vo)
1630
+ ], 10, bo)) : _("", !0)
1631
+ ]),
1632
+ _: 2
1633
+ }, 1032, ["name"])) : _("", !0)
1634
+ ], 64))), 128)),
1635
+ e.displayEmptyDataRow ? (m(), S("tr", ho, [
1636
+ ae("td", {
1637
+ colspan: e.countVisibleFields,
1638
+ class: "vuetable-empty-result",
1639
+ innerHTML: e.noDataTemplate
1640
+ }, null, 8, yo)
1641
+ ])) : _("", !0),
1642
+ e.lessThanMinRows ? (m(!0), S(U, { key: 1 }, he(e.blankRows, (o) => (m(), S("tr", {
1643
+ key: o,
1644
+ class: "blank-row"
1645
+ }, [
1646
+ (m(!0), S(U, null, he(e.tableFields, (y) => (m(), S(U, null, [
1647
+ y.visible ? (m(), S("td", {
1648
+ key: e.tableContext.getColumnKey(y),
1649
+ "data-vuetable-column": e.tableContext.getCellProps(y)["data-vuetable-column"],
1650
+ class: K([e.tableContext.groupClass(y), e.tableContext.getCellProps(y).class]),
1651
+ style: ee(e.tableContext.getCellProps(y).style)
1652
+ }, "   ", 14, po)) : _("", !0)
1653
+ ], 64))), 256))
1654
+ ]))), 128)) : _("", !0)
1655
+ ])
1656
+ ], 2)
1657
+ ], 6)
1658
+ ]),
1659
+ _: 1
1660
+ }, 8, ["revision", "on-rendered"])
1661
+ ], 16);
1662
+ }
1663
+ const Rt = /* @__PURE__ */ Oe(eo, [["render", go]]), Oo = Object.assign(ye({
1664
+ name: "VuetableColumn",
1665
+ inheritAttrs: !1,
1666
+ props: {
1667
+ field: { type: String, required: !0 },
1668
+ label: String,
1669
+ sortable: Boolean,
1670
+ sortField: String,
1671
+ width: String,
1672
+ fixed: { type: String, validator: (e) => e === "left" || e === "right" },
1673
+ fixedOrder: Number,
1674
+ visible: { type: Boolean, default: !0 },
1675
+ headerClass: String,
1676
+ cellClass: String,
1677
+ group: { type: [String, Number], default: null }
1678
+ },
1679
+ render: () => null
1680
+ }), { __vuetableColumn: !0 }), mo = [
1681
+ "initialized",
1682
+ "loading",
1683
+ "loaded",
1684
+ "pagination-data",
1685
+ "load-success",
1686
+ "scrollbar-visible",
1687
+ "load-error",
1688
+ "row-clicked",
1689
+ "row-dblclicked",
1690
+ "detail-row-clicked",
1691
+ "cell-clicked",
1692
+ "cell-dblclicked",
1693
+ "cell-rightclicked",
1694
+ "row-mouseover",
1695
+ "field-event",
1696
+ "header-event",
1697
+ "checkbox-toggled",
1698
+ "checkbox-toggled-all",
1699
+ "data-reset",
1700
+ "checkbox-toggled-custom"
1701
+ ];
1702
+ function $o(e = {}) {
1703
+ var d, i;
1704
+ if (I) throw new Error("createVuetable requires Vue 3. Use the generic Vuetable component on Vue 2.");
1705
+ const l = (d = e.eventPrefix) != null ? d : "vuetable:", a = pe(V({}, Rt), {
1706
+ props: pe(V({}, Rt.props), {
1707
+ eventPrefix: pe(V({}, Rt.props.eventPrefix), {
1708
+ default: l,
1709
+ validator: (w) => w === l
1710
+ })
1711
+ }),
1712
+ emits: [...new Set([...mo, ...(i = e.events) != null ? i : []].reduce((w, b) => {
1713
+ const s = `${l}${b}`, r = s.replace(/-(\w)/g, (u, g) => g.toUpperCase());
1714
+ return w.push(s, r.charAt(0).toLowerCase() + r.slice(1)), w;
1715
+ }, []))]
1716
+ });
1717
+ return delete a.install, a;
1718
+ }
1719
+ export {
1720
+ Rt as V,
1721
+ Oe as _,
1722
+ pl as a,
1723
+ Oo as b,
1724
+ Mt as c,
1725
+ jn as d,
1726
+ Dn as e,
1727
+ Vn as f,
1728
+ xl as g,
1729
+ $o as h,
1730
+ So as i,
1731
+ _l as r,
1732
+ gl as u
1733
+ };