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