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