vuetable-next 1.0.12 → 1.1.1

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