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