vuetable-next 1.0.11 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +226 -79
- package/dist/index.js +2 -0
- package/dist/portable/components/useVuetableField.d.ts +2 -0
- package/dist/public.d.ts +82 -1
- package/dist/style.css +2 -2
- package/dist/types/components/Vuetable.vue.d.ts +207 -106
- package/dist/types/components/VuetableColGroup.vue.d.ts +8 -20
- package/dist/types/components/VuetableColGutter.vue.d.ts +1 -0
- package/dist/types/components/VuetableColumn.d.ts +39 -0
- package/dist/types/components/VuetableContext.d.ts +11 -0
- package/dist/types/components/VuetableFieldCheckboxMixin.vue.d.ts +1 -1
- package/dist/types/components/VuetableFieldHandle.vue.d.ts +1 -1
- package/dist/types/components/VuetableFieldMixin.vue.d.ts +1 -1
- package/dist/types/components/VuetableFieldSequence.vue.d.ts +1 -1
- package/dist/types/components/VuetableRenderBoundary.d.ts +17 -0
- package/dist/types/components/VuetableRowHeader.vue.d.ts +15 -3
- package/dist/types/components/createVuetable.d.ts +6 -0
- package/dist/types/components/useVuetableColumnGroups.d.ts +53 -0
- package/dist/types/components/useVuetableColumns.d.ts +12 -0
- package/dist/types/components/useVuetableField.d.ts +2 -0
- package/dist/types/components/useVuetableFixedColumns.d.ts +53 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/vue2.cjs +12 -8
- package/dist/vue2.cjs.map +1 -1
- package/dist/vue2.js +1406 -894
- package/dist/vue2.js.map +1 -1
- package/dist/vue3.cjs +2 -2
- package/dist/vue3.cjs.map +1 -1
- package/dist/vue3.js +1565 -967
- package/dist/vue3.js.map +1 -1
- package/package.json +1 -1
- package/style.css +2 -2
package/dist/vue3.js
CHANGED
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var ta = Object.defineProperty, na = Object.defineProperties;
|
|
2
|
+
var aa = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var yn = Object.getOwnPropertySymbols;
|
|
4
|
+
var la = Object.prototype.hasOwnProperty, oa = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var mn = (e, n, a) => n in e ? ta(e, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[n] = a, q = (e, n) => {
|
|
6
6
|
for (var a in n || (n = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var a of
|
|
10
|
-
|
|
7
|
+
la.call(n, a) && mn(e, a, n[a]);
|
|
8
|
+
if (yn)
|
|
9
|
+
for (var a of yn(n))
|
|
10
|
+
oa.call(n, a) && mn(e, a, n[a]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
}, be = (e, n) => na(e, aa(n));
|
|
13
|
+
var Cn = (e, n, a) => new Promise((u, s) => {
|
|
14
|
+
var b = (l) => {
|
|
15
15
|
try {
|
|
16
|
-
i(a.next(
|
|
17
|
-
} catch (
|
|
18
|
-
d
|
|
16
|
+
i(a.next(l));
|
|
17
|
+
} catch (d) {
|
|
18
|
+
s(d);
|
|
19
19
|
}
|
|
20
|
-
}, c = (
|
|
20
|
+
}, c = (l) => {
|
|
21
21
|
try {
|
|
22
|
-
i(a.throw(
|
|
23
|
-
} catch (
|
|
24
|
-
d
|
|
22
|
+
i(a.throw(l));
|
|
23
|
+
} catch (d) {
|
|
24
|
+
s(d);
|
|
25
25
|
}
|
|
26
|
-
}, i = (
|
|
26
|
+
}, i = (l) => l.done ? u(l.value) : Promise.resolve(l.value).then(b, c);
|
|
27
27
|
i((a = a.apply(e, n)).next());
|
|
28
28
|
});
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
|
|
29
|
+
import * as Ot from "vue-demi";
|
|
30
|
+
import { defineComponent as J, inject as pe, ref as L, computed as P, isVue2 as W, h as ra, markRaw as qn, toRaw as St, watch as _, shallowRef as Ve, onMounted as qt, onUpdated as Rn, onBeforeUnmount as $t, getCurrentInstance as sa, onBeforeUpdate as wn, onBeforeMount as ia, nextTick as De, reactive as Rt, toRefs as ua, provide as ca, set as da, triggerRef as fa, isReadonly as ba, unref as ga, isRef as Hn } from "vue-demi";
|
|
31
|
+
import Pn from "axios";
|
|
32
|
+
import { openBlock as m, createElementBlock as w, mergeProps as Se, createElementVNode as V, normalizeClass as O, normalizeStyle as ne, resolveComponent as ke, Fragment as K, renderList as oe, createBlock as ce, resolveDynamicComponent as Ne, createVNode as Q, createCommentVNode as X, renderSlot as va, normalizeProps as ha, guardReactiveProps as pa, toDisplayString as Xe, withCtx as Pt, Transition as ya, withDirectives as ma, vShow as Ca } from "vue";
|
|
33
|
+
import wa from "mitt";
|
|
34
|
+
const Pa = J({
|
|
34
35
|
name: "vuetable-field-checkbox",
|
|
36
|
+
inheritAttrs: !1,
|
|
35
37
|
props: {
|
|
36
38
|
rowData: { type: Object, required: !1 },
|
|
37
39
|
rowIndex: { type: Number, required: !1 },
|
|
@@ -40,260 +42,304 @@ const Cn = E({
|
|
|
40
42
|
title: { type: String, required: !1 }
|
|
41
43
|
},
|
|
42
44
|
setup(e) {
|
|
43
|
-
const n =
|
|
44
|
-
var
|
|
45
|
-
return
|
|
45
|
+
const n = pe("vuetable"), a = L(null), u = P(() => (n.tableData || []).filter((d) => n.isSelectedRow(d[n.trackBy])).length), s = P(() => {
|
|
46
|
+
var d;
|
|
47
|
+
return u.value > 0 && u.value < (((d = n.tableData) == null ? void 0 : d.length) || 0);
|
|
46
48
|
});
|
|
47
|
-
function
|
|
48
|
-
var
|
|
49
|
-
|
|
49
|
+
function b(d, v) {
|
|
50
|
+
var r;
|
|
51
|
+
d && n.onCheckboxToggled(v.target.checked, (r = e.rowField) == null ? void 0 : r.name, d);
|
|
50
52
|
}
|
|
51
|
-
function c(
|
|
52
|
-
n.onCheckboxToggledAll(
|
|
53
|
+
function c(d) {
|
|
54
|
+
n.onCheckboxToggledAll(d.target.checked);
|
|
53
55
|
}
|
|
54
|
-
function i(
|
|
55
|
-
return !!
|
|
56
|
+
function i(d) {
|
|
57
|
+
return !!d && n.isSelectedRow(d[n.trackBy]);
|
|
56
58
|
}
|
|
57
|
-
function
|
|
58
|
-
return
|
|
59
|
+
function l() {
|
|
60
|
+
return u.value > 0;
|
|
59
61
|
}
|
|
60
|
-
return { vuetable: n, checkbox: a, isIndeterminate:
|
|
62
|
+
return { vuetable: n, checkbox: a, isIndeterminate: s, toggleCheckbox: b, toggleAllCheckbox: c, isSelected: i, isAllItemsInCurrentPageSelected: l };
|
|
61
63
|
}
|
|
62
|
-
}),
|
|
64
|
+
}), de = (e, n) => {
|
|
63
65
|
const a = e.__vccOpts || e;
|
|
64
|
-
for (const [
|
|
65
|
-
a[
|
|
66
|
+
for (const [u, s] of n)
|
|
67
|
+
a[u] = s;
|
|
66
68
|
return a;
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
class: "vuetable-th-component-checkbox"
|
|
70
|
-
|
|
71
|
-
key: 1,
|
|
72
|
-
class: "vuetable-td-component-checkbox"
|
|
73
|
-
}, $n = ["checked"];
|
|
74
|
-
function Sn(e, n, a, o, d, f) {
|
|
75
|
-
return e.isHeader ? (b(), v("th", wn, [
|
|
76
|
-
T("input", {
|
|
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", {
|
|
77
73
|
ref: "checkbox",
|
|
78
74
|
".indeterminate": e.isIndeterminate,
|
|
79
75
|
checked: e.isAllItemsInCurrentPageSelected(),
|
|
80
76
|
type: "checkbox",
|
|
81
77
|
onChange: n[0] || (n[0] = (c) => e.toggleAllCheckbox(c))
|
|
82
|
-
}, null, 40,
|
|
83
|
-
])) : (
|
|
84
|
-
|
|
78
|
+
}, null, 40, ka)
|
|
79
|
+
], 16)) : (m(), w("td", Se({ key: 1 }, e.$attrs, { class: "vuetable-td-component-checkbox" }), [
|
|
80
|
+
V("input", {
|
|
85
81
|
ref: "checkbox",
|
|
86
82
|
checked: e.isSelected(e.rowData),
|
|
87
83
|
type: "checkbox",
|
|
88
84
|
onChange: n[1] || (n[1] = (c) => e.toggleCheckbox(e.rowData, c))
|
|
89
|
-
}, null, 40,
|
|
90
|
-
]));
|
|
85
|
+
}, null, 40, Sa)
|
|
86
|
+
], 16));
|
|
91
87
|
}
|
|
92
|
-
const
|
|
88
|
+
const Ht = /* @__PURE__ */ de(Pa, [["render", $a]]), Fa = J({
|
|
93
89
|
name: "vuetable-field-handle",
|
|
90
|
+
inheritAttrs: !1,
|
|
94
91
|
props: {
|
|
95
92
|
isHeader: { type: Boolean, required: !1, default: !1 },
|
|
96
93
|
title: { type: String, required: !1, default: "" }
|
|
97
94
|
},
|
|
98
95
|
setup() {
|
|
99
|
-
const e =
|
|
100
|
-
function n(a,
|
|
101
|
-
return typeof e.css.renderIcon == "undefined" ? `<i class="${a.join(" ")}" ${
|
|
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);
|
|
102
99
|
}
|
|
103
100
|
return { vuetable: e, renderIconTag: n };
|
|
104
101
|
}
|
|
105
|
-
}),
|
|
106
|
-
function
|
|
107
|
-
return e.isHeader ? (
|
|
108
|
-
key: 0,
|
|
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, {
|
|
109
105
|
class: "vuetable-th-component-handle",
|
|
110
106
|
innerHTML: e.title
|
|
111
|
-
}, null,
|
|
112
|
-
key: 1,
|
|
107
|
+
}), null, 16, Ta)) : (m(), w("td", Se({ key: 1 }, e.$attrs, {
|
|
113
108
|
class: "vuetable-td-component-handle",
|
|
114
109
|
innerHTML: e.renderIconTag(["handle-icon", e.vuetable.css.handleIcon])
|
|
115
|
-
}, null,
|
|
110
|
+
}), null, 16, Oa));
|
|
116
111
|
}
|
|
117
|
-
const
|
|
112
|
+
const Dt = /* @__PURE__ */ de(Fa, [["render", qa]]), Ra = J({
|
|
118
113
|
name: "vuetable-field-sequence",
|
|
114
|
+
inheritAttrs: !1,
|
|
119
115
|
props: {
|
|
120
116
|
rowIndex: { type: Number, required: !1, default: 0 },
|
|
121
117
|
isHeader: { type: Boolean, required: !1, default: !1 },
|
|
122
118
|
title: { type: String, required: !1, default: "" }
|
|
123
119
|
},
|
|
124
120
|
setup(e) {
|
|
125
|
-
const n =
|
|
121
|
+
const n = pe("vuetable");
|
|
126
122
|
function a() {
|
|
127
123
|
return n.tablePagination ? n.tablePagination.from + e.rowIndex : 1 + e.rowIndex;
|
|
128
124
|
}
|
|
129
125
|
return { vuetable: n, renderSequence: a };
|
|
130
126
|
}
|
|
131
|
-
}),
|
|
132
|
-
function
|
|
133
|
-
return e.isHeader ? (
|
|
134
|
-
key: 0,
|
|
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, {
|
|
135
130
|
class: "vuetable-th-component-sequence",
|
|
136
131
|
innerHTML: e.title
|
|
137
|
-
}, null,
|
|
138
|
-
key: 1,
|
|
132
|
+
}), null, 16, Ha)) : (m(), w("td", Se({ key: 1 }, e.$attrs, {
|
|
139
133
|
class: "vuetable-td-component-sequence",
|
|
140
134
|
innerHTML: e.renderSequence()
|
|
141
|
-
}, null,
|
|
135
|
+
}), null, 16, Da));
|
|
142
136
|
}
|
|
143
|
-
const
|
|
137
|
+
const Et = /* @__PURE__ */ de(Ra, [["render", Ea]]), Ma = J({
|
|
144
138
|
name: "vuetable-th-gutter",
|
|
145
139
|
setup() {
|
|
146
|
-
|
|
140
|
+
const e = pe("vuetable"), n = P(() => e.hasFixedRightColumn && e.tableLayout.isFixedHeader);
|
|
141
|
+
return { vuetable: e, pinned: n };
|
|
147
142
|
}
|
|
148
143
|
});
|
|
149
|
-
function
|
|
150
|
-
return
|
|
151
|
-
style:
|
|
152
|
-
class: "vuetable-th-gutter"
|
|
153
|
-
}, null,
|
|
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);
|
|
154
149
|
}
|
|
155
|
-
const
|
|
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({
|
|
156
176
|
name: "vuetable-row-header",
|
|
157
177
|
components: {
|
|
158
|
-
|
|
159
|
-
"vuetable-field-
|
|
160
|
-
"vuetable-field-
|
|
161
|
-
|
|
178
|
+
SlotOutlet: Dn,
|
|
179
|
+
"vuetable-field-checkbox": Ht,
|
|
180
|
+
"vuetable-field-handle": Dt,
|
|
181
|
+
"vuetable-field-sequence": Et,
|
|
182
|
+
VuetableColGutter: _e
|
|
162
183
|
},
|
|
163
184
|
props: {
|
|
164
185
|
vuetable: { type: Object, default: null }
|
|
165
186
|
},
|
|
166
187
|
setup() {
|
|
167
|
-
const e =
|
|
168
|
-
function n(
|
|
169
|
-
return
|
|
188
|
+
const e = pe("vuetable");
|
|
189
|
+
function n(h) {
|
|
190
|
+
return e.columnRevision, e.getColumnSlot(h.name, !0);
|
|
170
191
|
}
|
|
171
|
-
function a(
|
|
192
|
+
function a(h) {
|
|
193
|
+
return h.replace(e.fieldPrefix, "");
|
|
194
|
+
}
|
|
195
|
+
function u(h, y) {
|
|
172
196
|
return [
|
|
173
|
-
`${
|
|
197
|
+
`${h}-${s(y.name)}`,
|
|
174
198
|
y.titleClass || "",
|
|
175
|
-
|
|
199
|
+
e.groupClass(y),
|
|
200
|
+
e.getCellProps(y, "header").class,
|
|
201
|
+
b(y),
|
|
176
202
|
{ sortable: e.isSortable(y) }
|
|
177
203
|
];
|
|
178
204
|
}
|
|
179
|
-
function
|
|
180
|
-
return typeof
|
|
205
|
+
function s(h) {
|
|
206
|
+
return typeof h == "string" && h.replace(/([A-Z])/g, (y) => "_" + y.toLowerCase()).replace(" ", "_").replace(".", "_");
|
|
181
207
|
}
|
|
182
|
-
function
|
|
183
|
-
const y =
|
|
208
|
+
function b(h) {
|
|
209
|
+
const y = d(h);
|
|
184
210
|
return y !== !1 ? e.sortOrder[y].direction == "asc" ? e.css.ascendingClass : e.css.descendingClass : "";
|
|
185
211
|
}
|
|
186
|
-
function
|
|
187
|
-
const y =
|
|
212
|
+
function c(h) {
|
|
213
|
+
const y = d(h);
|
|
188
214
|
return y === !1 ? e.css.sortableIcon : e.sortOrder[y].direction == "asc" ? e.css.ascendingIcon : e.css.descendingIcon;
|
|
189
215
|
}
|
|
190
|
-
function
|
|
191
|
-
return
|
|
216
|
+
function i(h) {
|
|
217
|
+
return d(h) !== !1;
|
|
192
218
|
}
|
|
193
|
-
function
|
|
194
|
-
return e.isSortable(
|
|
219
|
+
function l(h) {
|
|
220
|
+
return e.isSortable(h) && e.css.sortableIcon != "";
|
|
195
221
|
}
|
|
196
|
-
function
|
|
197
|
-
if (!e.isSortable(
|
|
222
|
+
function d(h) {
|
|
223
|
+
if (!e.isSortable(h))
|
|
198
224
|
return !1;
|
|
199
225
|
for (let y = 0; y < e.sortOrder.length; y++)
|
|
200
|
-
if (
|
|
226
|
+
if (v(h, y))
|
|
201
227
|
return y;
|
|
202
228
|
return !1;
|
|
203
229
|
}
|
|
204
|
-
function
|
|
205
|
-
return e.sortOrder[y].field ===
|
|
230
|
+
function v(h, y) {
|
|
231
|
+
return e.sortOrder[y].field === h.name && e.sortOrder[y].sortField === h.sortField;
|
|
206
232
|
}
|
|
207
|
-
function
|
|
208
|
-
const
|
|
209
|
-
if (y.length > 0 &&
|
|
210
|
-
const
|
|
211
|
-
return
|
|
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;
|
|
212
238
|
}
|
|
213
|
-
return
|
|
239
|
+
return F;
|
|
214
240
|
}
|
|
215
|
-
function h
|
|
216
|
-
return typeof
|
|
241
|
+
function f(h) {
|
|
242
|
+
return typeof h.title == "function" ? h.title() : typeof h.title == "undefined" ? h.name.toString().replace(".", " ") : h.title;
|
|
217
243
|
}
|
|
218
|
-
function
|
|
219
|
-
let
|
|
220
|
-
const
|
|
221
|
-
return 1 -
|
|
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;
|
|
222
248
|
}
|
|
223
|
-
function
|
|
224
|
-
return typeof e.css.renderIcon == "undefined" ? `<i class="${
|
|
249
|
+
function $(h, y = "") {
|
|
250
|
+
return typeof e.css.renderIcon == "undefined" ? `<i class="${h.join(" ")}" ${y}></i>` : e.css.renderIcon(h, y);
|
|
225
251
|
}
|
|
226
|
-
function
|
|
227
|
-
e.orderBy(
|
|
252
|
+
function S(h, y) {
|
|
253
|
+
e.orderBy(h, y);
|
|
228
254
|
}
|
|
229
|
-
return { headerTable: e,
|
|
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 };
|
|
230
256
|
}
|
|
231
|
-
}),
|
|
232
|
-
function
|
|
233
|
-
const c =
|
|
234
|
-
return
|
|
235
|
-
(
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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),
|
|
239
267
|
"is-header": "",
|
|
240
268
|
vuetable: e.headerTable,
|
|
241
|
-
"row-field":
|
|
242
|
-
title: e.renderTitle(
|
|
243
|
-
|
|
244
|
-
|
|
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]),
|
|
245
274
|
"onVuetable:headerEvent": e.headerTable.onHeaderEvent,
|
|
246
|
-
onClick: (
|
|
247
|
-
}, null, 40, ["vuetable", "row-field", "title", "class", "style", "onVuetable:headerEvent", "onClick"])) : e.headerTable.isFieldSlot(
|
|
248
|
-
key:
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
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)
|
|
264
310
|
]);
|
|
265
311
|
}
|
|
266
|
-
const
|
|
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 = {
|
|
267
329
|
name: "vuetable-col-group",
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
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);
|
|
278
341
|
}
|
|
279
|
-
})
|
|
280
|
-
function _n(e, n, a, o, d, f) {
|
|
281
|
-
return b(), v("colgroup", null, [
|
|
282
|
-
(b(!0), v(R, null, B(e.vuetable.tableFields, (c, i) => (b(), v(R, null, [
|
|
283
|
-
c.visible ? (b(), v("col", {
|
|
284
|
-
key: i,
|
|
285
|
-
style: A({ width: c.width }),
|
|
286
|
-
class: w(e.columnClass(c, i))
|
|
287
|
-
}, null, 6)) : O("", !0)
|
|
288
|
-
], 64))), 256)),
|
|
289
|
-
e.isHeader && e.vuetable.scrollVisible ? (b(), v("col", {
|
|
290
|
-
key: 0,
|
|
291
|
-
style: A({ width: e.vuetable.scrollBarWidth }),
|
|
292
|
-
class: "vuetable-col-gutter"
|
|
293
|
-
}, null, 4)) : O("", !0)
|
|
294
|
-
]);
|
|
295
|
-
}
|
|
296
|
-
const Mt = /* @__PURE__ */ L(Vn, [["render", _n]]), Nn = E({
|
|
342
|
+
}), kn = W ? Ga : za, Ka = J({
|
|
297
343
|
name: "VuetableDetailHost",
|
|
298
344
|
props: {
|
|
299
345
|
detailComponent: { type: [String, Object], default: "" },
|
|
@@ -302,19 +348,292 @@ const Mt = /* @__PURE__ */ L(Vn, [["render", _n]]), Nn = E({
|
|
|
302
348
|
options: { type: Object, default: () => ({}) }
|
|
303
349
|
},
|
|
304
350
|
setup(e) {
|
|
305
|
-
const n =
|
|
306
|
-
return { tableContext: n, vuetable: a, resolvedDetailComponent:
|
|
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 };
|
|
307
353
|
}
|
|
308
354
|
});
|
|
309
|
-
function
|
|
310
|
-
return
|
|
355
|
+
function Ua(e, n, a, u, s, b) {
|
|
356
|
+
return m(), ce(Ne(e.resolvedDetailComponent), {
|
|
311
357
|
"row-data": e.rowData,
|
|
312
358
|
"row-index": e.rowIndex,
|
|
313
359
|
vuetable: e.tableContext,
|
|
314
360
|
options: e.options
|
|
315
361
|
}, null, 8, ["row-data", "row-index", "vuetable", "options"]);
|
|
316
362
|
}
|
|
317
|
-
const
|
|
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 = {
|
|
318
637
|
table: {
|
|
319
638
|
tableWrapper: "",
|
|
320
639
|
tableHeaderClass: "fixed",
|
|
@@ -347,18 +666,24 @@ const Wn = /* @__PURE__ */ L(Nn, [["render", zn]]), U = {
|
|
|
347
666
|
paginationInfo: {
|
|
348
667
|
infoClass: "left floated left aligned six wide column"
|
|
349
668
|
}
|
|
350
|
-
},
|
|
669
|
+
}, On = /* @__PURE__ */ new WeakMap(), _a = J({
|
|
351
670
|
name: "Vuetable",
|
|
671
|
+
inheritAttrs: W,
|
|
352
672
|
components: {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
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
|
|
359
682
|
},
|
|
360
683
|
props: {
|
|
361
|
-
fields: { type: Array,
|
|
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" },
|
|
362
687
|
loadOnStart: { type: Boolean, required: !1, default: !0 },
|
|
363
688
|
apiUrl: { type: String, required: !1, default: "" },
|
|
364
689
|
httpMethod: { type: String, required: !1, default: "get" },
|
|
@@ -379,7 +704,7 @@ const Wn = /* @__PURE__ */ L(Nn, [["render", zn]]), U = {
|
|
|
379
704
|
perPage: { type: Number, required: !1, default: 10 },
|
|
380
705
|
initialPage: { type: Number, required: !1, default: 1 },
|
|
381
706
|
firstPage: { type: Number, required: !1, default: 1 },
|
|
382
|
-
sortOrder: { type: Array, required: !1, default: () => [] },
|
|
707
|
+
sortOrder: { type: Array, required: !1, default: () => L([]).value },
|
|
383
708
|
multiSort: { type: Boolean, required: !1, default: !1 },
|
|
384
709
|
tableHeight: { type: String, required: !1, default: null },
|
|
385
710
|
multiSortKey: { type: String, required: !1, default: "alt" },
|
|
@@ -397,129 +722,192 @@ const Wn = /* @__PURE__ */ L(Nn, [["render", zn]]), U = {
|
|
|
397
722
|
headerRows: { type: Array, required: !1, default: () => ["VuetableRowHeader"] },
|
|
398
723
|
transform: { type: Function, required: !1, default: null },
|
|
399
724
|
sortParams: { type: Function, required: !1, default: null },
|
|
400
|
-
fieldPrefix: { type: String, required: !1, default: "vuetable-field-" }
|
|
725
|
+
fieldPrefix: { type: String, required: !1, default: "vuetable-field-" },
|
|
726
|
+
eventPrefix: { type: String, required: !1, default: "vuetable:" }
|
|
401
727
|
},
|
|
402
|
-
emits: ["vuetable:load-error", "vuetable:load-success", "vuetable:loaded", "vuetable:loading", "vuetable:scrollbar-visible", "vuetable:pagination-data", "vuetable:row-clicked", "vuetable:row-dblclicked", "vuetable:detail-row-clicked", "vuetable:cell-clicked", "vuetable:cell-dblclicked", "vuetable:cell-rightclicked", "vuetable:row-mouseover", "vuetable:field-event", "vuetable:header-event", "vuetable:checkbox-toggled", "vuetable:checkbox-toggled-all", "vuetable:checkbox-toggled-custom", "vuetable:data-reset", "vuetable:initialized"],
|
|
403
728
|
computed: {
|
|
404
729
|
$_css() {
|
|
405
730
|
return this.tableCss;
|
|
406
731
|
}
|
|
407
732
|
},
|
|
408
|
-
setup(e, { emit: n, slots: a }) {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
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(() => {
|
|
413
784
|
var t;
|
|
414
|
-
return ((t =
|
|
415
|
-
}),
|
|
785
|
+
return ((t = S.value) == null ? void 0 : t.length) || 0;
|
|
786
|
+
}), Ee = P(() => me.value === 0 && e.noDataTemplate.length > 0), Oe = P(() => {
|
|
416
787
|
var t;
|
|
417
|
-
return
|
|
418
|
-
}),
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
}),
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
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();
|
|
430
807
|
});
|
|
431
|
-
const
|
|
432
|
-
vuetable:
|
|
433
|
-
$el:
|
|
808
|
+
const It = Rt(be(q({}, ua(e)), {
|
|
809
|
+
vuetable: d,
|
|
810
|
+
$el: P(() => {
|
|
434
811
|
var t;
|
|
435
|
-
return (t =
|
|
812
|
+
return (t = s == null ? void 0 : s.proxy) == null ? void 0 : t.$el;
|
|
436
813
|
}),
|
|
437
|
-
isApiMode:
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
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
|
|
488
876
|
}));
|
|
489
|
-
|
|
490
|
-
function
|
|
491
|
-
const t = document.createElement("div"),
|
|
492
|
-
t.style.visibility = "hidden", t.style.width = "100px",
|
|
493
|
-
const
|
|
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;
|
|
494
882
|
t.style.overflow = "scroll";
|
|
495
|
-
const
|
|
496
|
-
return document.body.removeChild(t),
|
|
497
|
-
}
|
|
498
|
-
function
|
|
499
|
-
var
|
|
500
|
-
const
|
|
501
|
-
if (
|
|
502
|
-
|
|
503
|
-
|
|
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;
|
|
504
894
|
}
|
|
505
895
|
}
|
|
506
|
-
function
|
|
896
|
+
function Re(t) {
|
|
507
897
|
e.silent || console.error(t);
|
|
508
898
|
}
|
|
509
|
-
function
|
|
510
|
-
return [t,
|
|
899
|
+
function Nn(t, o) {
|
|
900
|
+
return [t, o.dataClass, ...et.groupClass(o), ...Ce(o).class];
|
|
511
901
|
}
|
|
512
|
-
function
|
|
902
|
+
function tt() {
|
|
513
903
|
if (typeof e.fields == "undefined") {
|
|
514
|
-
|
|
904
|
+
g.reconcile();
|
|
515
905
|
return;
|
|
516
906
|
}
|
|
517
|
-
|
|
518
|
-
c.value.push(Qe(t, l));
|
|
519
|
-
});
|
|
907
|
+
v.value = e.fields.map(nt);
|
|
520
908
|
}
|
|
521
|
-
function
|
|
522
|
-
const
|
|
909
|
+
function nt(t, o) {
|
|
910
|
+
const C = {
|
|
523
911
|
name: "",
|
|
524
912
|
// title:
|
|
525
913
|
// this allow the code to detect undefined title
|
|
@@ -530,516 +918,685 @@ const Wn = /* @__PURE__ */ L(Nn, [["render", zn]]), U = {
|
|
|
530
918
|
formatter: null,
|
|
531
919
|
visible: !0,
|
|
532
920
|
width: null,
|
|
533
|
-
$_index:
|
|
921
|
+
$_index: o
|
|
534
922
|
};
|
|
535
923
|
if (typeof t == "string")
|
|
536
|
-
return
|
|
537
|
-
name:
|
|
538
|
-
title:
|
|
924
|
+
return be(q({}, C), {
|
|
925
|
+
name: at(t),
|
|
926
|
+
title: xe(t)
|
|
539
927
|
});
|
|
540
|
-
const
|
|
541
|
-
return
|
|
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;
|
|
542
930
|
}
|
|
543
|
-
function
|
|
544
|
-
return t instanceof Object ?
|
|
931
|
+
function at(t) {
|
|
932
|
+
return t instanceof Object ? qn(St(t)) : t.replace("__", e.fieldPrefix);
|
|
545
933
|
}
|
|
546
|
-
function
|
|
934
|
+
function Pe(t) {
|
|
547
935
|
if (!(t === null || typeof t == "undefined")) {
|
|
548
|
-
if (
|
|
549
|
-
|
|
936
|
+
if (j("loading"), Array.isArray(t)) {
|
|
937
|
+
S.value = t, j("loaded");
|
|
550
938
|
return;
|
|
551
939
|
}
|
|
552
|
-
|
|
553
|
-
|
|
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");
|
|
554
942
|
});
|
|
555
943
|
}
|
|
556
944
|
}
|
|
557
|
-
function
|
|
558
|
-
if (
|
|
559
|
-
return
|
|
945
|
+
function Ue() {
|
|
946
|
+
if (se.value)
|
|
947
|
+
return Fe.value ? !0 : (Re('Invalid your data! Use "track-by" prop to specify.'), !1);
|
|
560
948
|
}
|
|
561
|
-
function
|
|
562
|
-
return
|
|
949
|
+
function xe(t) {
|
|
950
|
+
return lt(t) ? "" : ot(t.replace(".", " "));
|
|
563
951
|
}
|
|
564
|
-
function
|
|
952
|
+
function Bt(t) {
|
|
565
953
|
return typeof t.title == "function" ? t.title() : t.title;
|
|
566
954
|
}
|
|
567
|
-
function
|
|
568
|
-
return
|
|
955
|
+
function Wn(t, o) {
|
|
956
|
+
return gt(t) ? Yt(t, o) : ve(o, t.name, "");
|
|
569
957
|
}
|
|
570
|
-
function
|
|
958
|
+
function lt(t) {
|
|
571
959
|
return t instanceof Object ? !0 : t.slice(0, e.fieldPrefix.length) === e.fieldPrefix || t.slice(0, 2) === "__";
|
|
572
960
|
}
|
|
961
|
+
function Vt(t) {
|
|
962
|
+
return typeof Je(t) != "undefined";
|
|
963
|
+
}
|
|
573
964
|
function Je(t) {
|
|
574
|
-
|
|
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];
|
|
575
967
|
}
|
|
576
|
-
function
|
|
577
|
-
return t.replace(/\w+/g, (
|
|
968
|
+
function ot(t) {
|
|
969
|
+
return t.replace(/\w+/g, (o) => o.charAt(0).toUpperCase() + o.substring(1).toLowerCase());
|
|
578
970
|
}
|
|
579
|
-
function
|
|
580
|
-
return t.split(
|
|
971
|
+
function Nt(t, o = "_") {
|
|
972
|
+
return t.split(o).map((C) => ot(C)).join("");
|
|
581
973
|
}
|
|
582
|
-
function
|
|
583
|
-
if (
|
|
584
|
-
|
|
974
|
+
function fe(t = Gt, o = zt) {
|
|
975
|
+
if (ie.value) {
|
|
976
|
+
sn();
|
|
585
977
|
return;
|
|
586
978
|
}
|
|
587
|
-
return
|
|
979
|
+
return j("loading"), H.value.params = Ut(rt()), ee.value = Wt(e.apiUrl, H.value), ee.value.then(
|
|
588
980
|
t,
|
|
589
|
-
|
|
590
|
-
).catch(() =>
|
|
981
|
+
o
|
|
982
|
+
).catch(() => o());
|
|
591
983
|
}
|
|
592
|
-
function
|
|
593
|
-
return
|
|
984
|
+
function Wt(t, o) {
|
|
985
|
+
return Cn(this, null, function* () {
|
|
594
986
|
if (e.httpFetch)
|
|
595
|
-
return e.httpFetch(t,
|
|
987
|
+
return e.httpFetch(t, o);
|
|
596
988
|
if (e.httpMethod === "get")
|
|
597
|
-
return
|
|
989
|
+
return Pn.get(t, o);
|
|
598
990
|
{
|
|
599
|
-
const
|
|
600
|
-
return delete
|
|
991
|
+
const C = yield H.value.params;
|
|
992
|
+
return delete o.params, delete H.value.params, Pn.post(t, C, H.value);
|
|
601
993
|
}
|
|
602
994
|
});
|
|
603
995
|
}
|
|
604
|
-
function
|
|
605
|
-
|
|
606
|
-
const
|
|
607
|
-
|
|
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.
|
|
608
1000
|
It looks like the data returned from the server does not have pagination information
|
|
609
1001
|
or you may have set it incorrectly.
|
|
610
1002
|
|
|
611
|
-
You can explicitly suppress this warning by setting pagination-path="".`),
|
|
612
|
-
|
|
1003
|
+
You can explicitly suppress this warning by setting pagination-path="".`), De(() => {
|
|
1004
|
+
Ue(), Le(), j("pagination-data", h.value), j("loaded");
|
|
613
1005
|
});
|
|
614
1006
|
}
|
|
615
|
-
function
|
|
616
|
-
|
|
1007
|
+
function Le() {
|
|
1008
|
+
Lt || (we !== null && clearTimeout(we), we = setTimeout(() => {
|
|
1009
|
+
we = null, Ie();
|
|
1010
|
+
}, 80));
|
|
617
1011
|
}
|
|
618
|
-
function
|
|
619
|
-
|
|
620
|
-
const t =
|
|
621
|
-
t != null && (
|
|
1012
|
+
function Ie() {
|
|
1013
|
+
De(() => {
|
|
1014
|
+
const t = b.value;
|
|
1015
|
+
t != null && (ae.value = t.scrollHeight > t.clientHeight, j("scrollbar-visible", ae.value));
|
|
622
1016
|
});
|
|
623
1017
|
}
|
|
624
|
-
function
|
|
625
|
-
console.error("load-error", t),
|
|
1018
|
+
function zt(t) {
|
|
1019
|
+
console.error("load-error", t), j("load-error", t), j("loaded");
|
|
626
1020
|
}
|
|
627
|
-
function
|
|
1021
|
+
function rt() {
|
|
628
1022
|
let t = {};
|
|
629
|
-
return typeof e.queryParams == "function" ? (t = e.queryParams(
|
|
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);
|
|
630
1024
|
}
|
|
631
|
-
function
|
|
1025
|
+
function Kt() {
|
|
632
1026
|
var t;
|
|
633
|
-
return !
|
|
1027
|
+
return !p.value || ((t = p.value[0]) == null ? void 0 : t.field) == "" ? "" : typeof e.sortParams == "function" ? e.sortParams(p.value) : st();
|
|
634
1028
|
}
|
|
635
|
-
function
|
|
636
|
-
return
|
|
1029
|
+
function st() {
|
|
1030
|
+
return p.value.map((t) => `${t.sortField}|${t.direction}`).join(",");
|
|
637
1031
|
}
|
|
638
|
-
function
|
|
639
|
-
for (let
|
|
640
|
-
t[
|
|
1032
|
+
function Ut(t) {
|
|
1033
|
+
for (let o in e.appendParams)
|
|
1034
|
+
t[o] = e.appendParams[o];
|
|
641
1035
|
return t;
|
|
642
1036
|
}
|
|
643
|
-
function
|
|
1037
|
+
function Ze(t) {
|
|
644
1038
|
return t.sortField !== null;
|
|
645
1039
|
}
|
|
646
|
-
function
|
|
647
|
-
if (!
|
|
1040
|
+
function xt(t) {
|
|
1041
|
+
if (!Ze(t))
|
|
648
1042
|
return !1;
|
|
649
|
-
for (let
|
|
650
|
-
if (
|
|
651
|
-
return
|
|
1043
|
+
for (let o = 0; o < p.value.length; o++)
|
|
1044
|
+
if (it(t, o))
|
|
1045
|
+
return o;
|
|
652
1046
|
return !1;
|
|
653
1047
|
}
|
|
654
|
-
function
|
|
655
|
-
return
|
|
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();
|
|
656
1055
|
}
|
|
657
|
-
function
|
|
658
|
-
|
|
659
|
-
const p = e.multiSortKey.toLowerCase() + "Key";
|
|
660
|
-
e.multiSort && l[p] ? it(t) : we(t), r.value = e.firstPage, (ue.value || e.dataManager) && _();
|
|
1056
|
+
function He() {
|
|
1057
|
+
W || fa(p);
|
|
661
1058
|
}
|
|
662
|
-
function
|
|
663
|
-
|
|
1059
|
+
function ut(t, o) {
|
|
1060
|
+
p.value.push({
|
|
664
1061
|
field: t.name,
|
|
665
1062
|
sortField: t.sortField,
|
|
666
|
-
direction:
|
|
667
|
-
});
|
|
1063
|
+
direction: o || "asc"
|
|
1064
|
+
}), He();
|
|
668
1065
|
}
|
|
669
|
-
function
|
|
670
|
-
|
|
1066
|
+
function ct(t) {
|
|
1067
|
+
p.value.splice(t, 1), He();
|
|
671
1068
|
}
|
|
672
|
-
function
|
|
673
|
-
|
|
1069
|
+
function dt(t, o) {
|
|
1070
|
+
p.value[t].direction = o, He();
|
|
674
1071
|
}
|
|
675
|
-
function
|
|
676
|
-
let
|
|
677
|
-
|
|
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);
|
|
678
1075
|
}
|
|
679
|
-
function
|
|
680
|
-
if (
|
|
681
|
-
|
|
1076
|
+
function ft(t) {
|
|
1077
|
+
if (p.value.length === 0) {
|
|
1078
|
+
ut(t, "asc");
|
|
682
1079
|
return;
|
|
683
1080
|
}
|
|
684
|
-
|
|
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();
|
|
685
1082
|
}
|
|
686
|
-
function
|
|
687
|
-
|
|
1083
|
+
function Qt() {
|
|
1084
|
+
E.value = L([]).value;
|
|
688
1085
|
}
|
|
689
|
-
function
|
|
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) {
|
|
690
1093
|
return typeof t.formatter == "function";
|
|
691
1094
|
}
|
|
692
|
-
function
|
|
693
|
-
if (
|
|
694
|
-
return t.formatter(
|
|
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);
|
|
695
1098
|
}
|
|
696
|
-
function
|
|
697
|
-
|
|
698
|
-
let
|
|
699
|
-
return
|
|
700
|
-
if (
|
|
701
|
-
|
|
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];
|
|
702
1105
|
else {
|
|
703
|
-
|
|
1106
|
+
k = C;
|
|
704
1107
|
return;
|
|
705
1108
|
}
|
|
706
|
-
}),
|
|
1109
|
+
}), k;
|
|
707
1110
|
}
|
|
708
|
-
function
|
|
709
|
-
|
|
1111
|
+
function vt(t) {
|
|
1112
|
+
pt(t) || F.value.push(t);
|
|
710
1113
|
}
|
|
711
|
-
function
|
|
712
|
-
|
|
1114
|
+
function ht(t) {
|
|
1115
|
+
F.value = F.value.filter((o) => o !== t);
|
|
713
1116
|
}
|
|
714
|
-
function
|
|
715
|
-
return
|
|
1117
|
+
function pt(t) {
|
|
1118
|
+
return F.value.indexOf(t) >= 0;
|
|
716
1119
|
}
|
|
717
|
-
function
|
|
718
|
-
|
|
1120
|
+
function Xt() {
|
|
1121
|
+
F.value = [];
|
|
719
1122
|
}
|
|
720
|
-
function
|
|
721
|
-
|
|
1123
|
+
function _t() {
|
|
1124
|
+
y.value > e.firstPage && (y.value -= 1, fe());
|
|
722
1125
|
}
|
|
723
|
-
function
|
|
724
|
-
|
|
1126
|
+
function en() {
|
|
1127
|
+
y.value < h.value.last_page && (y.value += 1, fe());
|
|
725
1128
|
}
|
|
726
|
-
function
|
|
727
|
-
t !=
|
|
1129
|
+
function tn(t) {
|
|
1130
|
+
t != y.value && t >= e.firstPage && t <= h.value.last_page && (y.value = t, fe());
|
|
728
1131
|
}
|
|
729
|
-
function
|
|
730
|
-
return
|
|
1132
|
+
function Ae(t) {
|
|
1133
|
+
return D.value.indexOf(t) >= 0;
|
|
731
1134
|
}
|
|
732
|
-
function
|
|
733
|
-
|
|
1135
|
+
function yt(t) {
|
|
1136
|
+
Ae(t) || D.value.push(t), Ie();
|
|
734
1137
|
}
|
|
735
|
-
function
|
|
736
|
-
|
|
737
|
-
|
|
1138
|
+
function mt(t) {
|
|
1139
|
+
Ae(t) && (D.value.splice(
|
|
1140
|
+
D.value.indexOf(t),
|
|
738
1141
|
1
|
|
739
|
-
),
|
|
1142
|
+
), Le());
|
|
740
1143
|
}
|
|
741
|
-
function
|
|
742
|
-
|
|
1144
|
+
function nn(t) {
|
|
1145
|
+
Ae(t) ? mt(t) : yt(t);
|
|
743
1146
|
}
|
|
744
|
-
function
|
|
745
|
-
t < 0 || t
|
|
1147
|
+
function an(t) {
|
|
1148
|
+
t < 0 || t >= v.value.length || (v.value[t].visible = !0);
|
|
746
1149
|
}
|
|
747
|
-
function
|
|
748
|
-
t < 0 || t
|
|
1150
|
+
function ln(t) {
|
|
1151
|
+
t < 0 || t >= v.value.length || (v.value[t].visible = !1);
|
|
749
1152
|
}
|
|
750
|
-
function
|
|
751
|
-
t < 0 || t
|
|
1153
|
+
function on(t) {
|
|
1154
|
+
t < 0 || t >= v.value.length || (v.value[t].visible = !v.value[t].visible);
|
|
752
1155
|
}
|
|
753
|
-
function
|
|
754
|
-
return t = t === null ? 0 : t,
|
|
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, {
|
|
755
1158
|
total: t,
|
|
756
|
-
per_page:
|
|
757
|
-
current_page:
|
|
758
|
-
last_page: Math.ceil(t /
|
|
1159
|
+
per_page: o,
|
|
1160
|
+
current_page: C,
|
|
1161
|
+
last_page: Math.ceil(t / o) || 0,
|
|
759
1162
|
next_page_url: "",
|
|
760
1163
|
prev_page_url: "",
|
|
761
|
-
from: (
|
|
762
|
-
to: Math.min(
|
|
1164
|
+
from: (C - 1) * o + 1,
|
|
1165
|
+
to: Math.min(C * o, t)
|
|
763
1166
|
};
|
|
764
1167
|
}
|
|
765
|
-
function
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
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();
|
|
769
1178
|
}
|
|
770
|
-
function
|
|
1179
|
+
function sn() {
|
|
771
1180
|
if (e.data !== null && Array.isArray(e.data)) {
|
|
772
|
-
|
|
1181
|
+
Pe(e.data);
|
|
773
1182
|
return;
|
|
774
1183
|
}
|
|
775
|
-
e.dataManager ?
|
|
1184
|
+
e.dataManager ? un() : Pe(e.data);
|
|
776
1185
|
}
|
|
777
|
-
function
|
|
778
|
-
const t = e.dataManager(
|
|
779
|
-
|
|
1186
|
+
function un() {
|
|
1187
|
+
const t = e.dataManager(p.value, rn());
|
|
1188
|
+
dn(t) ? t.then((o) => Pe(o)) : Pe(t);
|
|
780
1189
|
}
|
|
781
|
-
function
|
|
1190
|
+
function cn(t) {
|
|
782
1191
|
return typeof t == "object" && t !== null;
|
|
783
1192
|
}
|
|
784
|
-
function
|
|
785
|
-
return
|
|
1193
|
+
function dn(t) {
|
|
1194
|
+
return cn(t) && typeof t.then == "function";
|
|
786
1195
|
}
|
|
787
|
-
function
|
|
788
|
-
return typeof e.rowClass == "function" ? e.rowClass(t,
|
|
1196
|
+
function Gn(t, o) {
|
|
1197
|
+
return typeof e.rowClass == "function" ? e.rowClass(t, o) : e.rowClass;
|
|
789
1198
|
}
|
|
790
|
-
function
|
|
791
|
-
return typeof e.detailRowClass == "function" ? e.detailRowClass(t,
|
|
1199
|
+
function zn(t, o) {
|
|
1200
|
+
return typeof e.detailRowClass == "function" ? e.detailRowClass(t, o) : e.detailRowClass;
|
|
792
1201
|
}
|
|
793
|
-
function
|
|
794
|
-
return
|
|
1202
|
+
function Kn(t, o, C) {
|
|
1203
|
+
return j("row-clicked", { data: t, index: o, event: C }), !0;
|
|
795
1204
|
}
|
|
796
|
-
function
|
|
797
|
-
|
|
1205
|
+
function Un(t, o, C) {
|
|
1206
|
+
j("row-dblclicked", { data: t, index: o, event: C });
|
|
798
1207
|
}
|
|
799
|
-
function
|
|
800
|
-
|
|
1208
|
+
function xn(t, o, C) {
|
|
1209
|
+
j("detail-row-clicked", { data: t, index: o, event: C });
|
|
801
1210
|
}
|
|
802
|
-
function
|
|
803
|
-
|
|
1211
|
+
function Jn(t, o, C, k) {
|
|
1212
|
+
j("cell-clicked", { data: t, index: o, field: C, event: k });
|
|
804
1213
|
}
|
|
805
|
-
function
|
|
806
|
-
|
|
1214
|
+
function Zn(t, o, C, k) {
|
|
1215
|
+
j("cell-dblclicked", { data: t, index: o, field: C, event: k });
|
|
807
1216
|
}
|
|
808
|
-
function
|
|
809
|
-
|
|
1217
|
+
function Qn(t, o, C, k) {
|
|
1218
|
+
j("cell-rightclicked", { data: t, index: o, field: C, event: k });
|
|
810
1219
|
}
|
|
811
|
-
function
|
|
812
|
-
|
|
1220
|
+
function Yn(t, o, C) {
|
|
1221
|
+
j("row-mouseover", { data: t, index: o, event: C });
|
|
813
1222
|
}
|
|
814
|
-
function
|
|
815
|
-
|
|
1223
|
+
function Xn(t, o) {
|
|
1224
|
+
j("field-event", t, o, s == null ? void 0 : s.proxy);
|
|
816
1225
|
}
|
|
817
|
-
function
|
|
818
|
-
|
|
1226
|
+
function fn(t, o) {
|
|
1227
|
+
j("header-event", t, o, s == null ? void 0 : s.proxy);
|
|
819
1228
|
}
|
|
820
|
-
function
|
|
821
|
-
if (
|
|
822
|
-
|
|
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.`);
|
|
823
1232
|
return;
|
|
824
1233
|
}
|
|
825
|
-
const
|
|
826
|
-
t ?
|
|
827
|
-
}
|
|
828
|
-
function
|
|
829
|
-
var
|
|
830
|
-
t ? (
|
|
831
|
-
|
|
832
|
-
}) : (
|
|
833
|
-
|
|
834
|
-
}),
|
|
835
|
-
}
|
|
836
|
-
function
|
|
837
|
-
t === "prev" ?
|
|
838
|
-
}
|
|
839
|
-
function
|
|
840
|
-
return
|
|
841
|
-
}
|
|
842
|
-
function
|
|
843
|
-
return n(
|
|
844
|
-
}
|
|
845
|
-
function
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
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 });
|
|
858
1301
|
}
|
|
859
|
-
}),
|
|
1302
|
+
}), el = {
|
|
860
1303
|
key: 0,
|
|
861
1304
|
class: "vuetable-head-wrapper"
|
|
862
|
-
},
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
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])
|
|
871
1320
|
}, [
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
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,
|
|
878
1345
|
vuetable: e.tableContext,
|
|
879
1346
|
"onVuetable:headerEvent": e.onHeaderEvent
|
|
880
1347
|
}, null, 40, ["index", "vuetable", "onVuetable:headerEvent"]))), 128))
|
|
881
|
-
])
|
|
1348
|
+
]),
|
|
1349
|
+
Q(i, {
|
|
1350
|
+
content: e.getSlot("afterHeader"),
|
|
1351
|
+
scope: e.tableContext.tableLayout
|
|
1352
|
+
}, null, 8, ["content", "scope"])
|
|
882
1353
|
])
|
|
883
1354
|
], 2)
|
|
884
|
-
])) :
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
"
|
|
922
|
-
|
|
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,
|
|
923
1397
|
vuetable: e.tableContext,
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
class: w(e.onDetailRowClass(s, r)),
|
|
957
|
-
onClick: (g) => e.onDetailRowClick(s, r, g)
|
|
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)
|
|
958
1430
|
}, [
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
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);
|
|
991
1531
|
}
|
|
992
|
-
const
|
|
993
|
-
|
|
994
|
-
|
|
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);
|
|
995
1552
|
}
|
|
996
|
-
function
|
|
997
|
-
const a = e === void 0 ||
|
|
998
|
-
var
|
|
999
|
-
return (
|
|
1000
|
-
}),
|
|
1001
|
-
var
|
|
1002
|
-
return ((
|
|
1003
|
-
}),
|
|
1004
|
-
var
|
|
1005
|
-
return ((
|
|
1006
|
-
}),
|
|
1007
|
-
function
|
|
1008
|
-
c.value =
|
|
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));
|
|
1009
1566
|
}
|
|
1010
|
-
function
|
|
1011
|
-
var
|
|
1012
|
-
(
|
|
1567
|
+
function h(R) {
|
|
1568
|
+
var N;
|
|
1569
|
+
(N = a.emit) == null || N.call(a, "vuetable-pagination:change-page", R);
|
|
1013
1570
|
}
|
|
1014
|
-
function
|
|
1015
|
-
|
|
1571
|
+
function y(R) {
|
|
1572
|
+
b.value = R;
|
|
1016
1573
|
}
|
|
1017
|
-
function
|
|
1018
|
-
|
|
1574
|
+
function F() {
|
|
1575
|
+
b.value = null;
|
|
1019
1576
|
}
|
|
1020
|
-
function
|
|
1021
|
-
var
|
|
1022
|
-
return
|
|
1577
|
+
function D(R) {
|
|
1578
|
+
var N;
|
|
1579
|
+
return R === ((N = b.value) == null ? void 0 : N.current_page);
|
|
1023
1580
|
}
|
|
1024
|
-
return
|
|
1025
|
-
tablePagination:
|
|
1581
|
+
return S(), {
|
|
1582
|
+
tablePagination: b,
|
|
1026
1583
|
customCss: c,
|
|
1027
1584
|
eventPrefix: i,
|
|
1028
|
-
lastPage:
|
|
1029
|
-
isOnFirstPage:
|
|
1030
|
-
isOnLastPage:
|
|
1031
|
-
notEnoughPages:
|
|
1032
|
-
windowSize:
|
|
1033
|
-
windowStart:
|
|
1034
|
-
totalPage:
|
|
1035
|
-
setPaginationData:
|
|
1036
|
-
resetData:
|
|
1037
|
-
isCurrentPage:
|
|
1038
|
-
mergeCss:
|
|
1039
|
-
loadPage:
|
|
1585
|
+
lastPage: l,
|
|
1586
|
+
isOnFirstPage: d,
|
|
1587
|
+
isOnLastPage: v,
|
|
1588
|
+
notEnoughPages: g,
|
|
1589
|
+
windowSize: r,
|
|
1590
|
+
windowStart: $,
|
|
1591
|
+
totalPage: f,
|
|
1592
|
+
setPaginationData: y,
|
|
1593
|
+
resetData: F,
|
|
1594
|
+
isCurrentPage: D,
|
|
1595
|
+
mergeCss: S,
|
|
1596
|
+
loadPage: h
|
|
1040
1597
|
};
|
|
1041
1598
|
}
|
|
1042
|
-
const
|
|
1599
|
+
const yl = J({
|
|
1043
1600
|
props: {
|
|
1044
1601
|
css: { type: Object, required: !1, default: () => ({}) },
|
|
1045
1602
|
onEachSide: { type: Number, required: !1, default: 2 },
|
|
@@ -1047,81 +1604,81 @@ const aa = E({
|
|
|
1047
1604
|
},
|
|
1048
1605
|
emits: ["vuetable-pagination:change-page"],
|
|
1049
1606
|
setup(e, { emit: n }) {
|
|
1050
|
-
const a =
|
|
1051
|
-
tablePagination:
|
|
1052
|
-
totalPage:
|
|
1053
|
-
lastPage:
|
|
1607
|
+
const a = Rt(q(q({}, ye.pagination), e.css)), {
|
|
1608
|
+
tablePagination: u,
|
|
1609
|
+
totalPage: s,
|
|
1610
|
+
lastPage: b,
|
|
1054
1611
|
isOnFirstPage: c,
|
|
1055
1612
|
isOnLastPage: i,
|
|
1056
|
-
notEnoughPages:
|
|
1057
|
-
windowSize:
|
|
1058
|
-
windowStart:
|
|
1059
|
-
isCurrentPage:
|
|
1060
|
-
setPaginationData:
|
|
1061
|
-
resetData:
|
|
1062
|
-
} =
|
|
1063
|
-
function
|
|
1064
|
-
n("vuetable-pagination:change-page",
|
|
1065
|
-
}
|
|
1066
|
-
return { tableCss: a, tablePagination:
|
|
1613
|
+
notEnoughPages: l,
|
|
1614
|
+
windowSize: d,
|
|
1615
|
+
windowStart: v,
|
|
1616
|
+
isCurrentPage: r,
|
|
1617
|
+
setPaginationData: f,
|
|
1618
|
+
resetData: g
|
|
1619
|
+
} = Ln(() => e.onEachSide, () => e.firstPage);
|
|
1620
|
+
function $(S) {
|
|
1621
|
+
n("vuetable-pagination:change-page", S);
|
|
1622
|
+
}
|
|
1623
|
+
return { tableCss: a, tablePagination: u, totalPage: s, lastPage: b, isOnFirstPage: c, isOnLastPage: i, notEnoughPages: l, windowSize: d, windowStart: v, isCurrentPage: r, setPaginationData: f, resetData: g, loadPage: $ };
|
|
1067
1624
|
}
|
|
1068
|
-
}),
|
|
1069
|
-
function
|
|
1070
|
-
return
|
|
1071
|
-
class:
|
|
1625
|
+
}), ml = { key: 1 }, Cl = { key: 1 }, wl = ["innerHTML", "onClick"], Pl = ["innerHTML", "onClick"], kl = { key: 1 }, Sl = { key: 1 };
|
|
1626
|
+
function $l(e, n, a, u, s, b) {
|
|
1627
|
+
return ma((m(), w("div", {
|
|
1628
|
+
class: O(e.tableCss.wrapperClass)
|
|
1072
1629
|
}, [
|
|
1073
|
-
|
|
1074
|
-
class:
|
|
1630
|
+
V("a", {
|
|
1631
|
+
class: O(["btn-nav", e.tableCss.linkClass, e.isOnFirstPage ? e.tableCss.disabledClass : ""]),
|
|
1075
1632
|
onClick: n[0] || (n[0] = (c) => e.loadPage(e.firstPage))
|
|
1076
1633
|
}, [
|
|
1077
|
-
e.tableCss.icons.first != "" ? (
|
|
1634
|
+
e.tableCss.icons.first != "" ? (m(), w("i", {
|
|
1078
1635
|
key: 0,
|
|
1079
|
-
class:
|
|
1080
|
-
}, null, 2)) : (
|
|
1636
|
+
class: O([e.tableCss.icons.first])
|
|
1637
|
+
}, null, 2)) : (m(), w("span", ml, " « "))
|
|
1081
1638
|
], 2),
|
|
1082
|
-
|
|
1083
|
-
class:
|
|
1639
|
+
V("a", {
|
|
1640
|
+
class: O(["btn-nav", e.tableCss.linkClass, e.isOnFirstPage ? e.tableCss.disabledClass : ""]),
|
|
1084
1641
|
onClick: n[1] || (n[1] = (c) => e.loadPage("prev"))
|
|
1085
1642
|
}, [
|
|
1086
|
-
e.tableCss.icons.next != "" ? (
|
|
1643
|
+
e.tableCss.icons.next != "" ? (m(), w("i", {
|
|
1087
1644
|
key: 0,
|
|
1088
|
-
class:
|
|
1089
|
-
}, null, 2)) : (
|
|
1645
|
+
class: O([e.tableCss.icons.prev])
|
|
1646
|
+
}, null, 2)) : (m(), w("span", Cl, " ‹ "))
|
|
1090
1647
|
], 2),
|
|
1091
|
-
e.notEnoughPages ? (
|
|
1648
|
+
e.notEnoughPages ? (m(!0), w(K, { key: 0 }, oe(e.totalPage, (c, i) => (m(), w("a", {
|
|
1092
1649
|
key: i,
|
|
1093
|
-
class:
|
|
1650
|
+
class: O([e.tableCss.pageClass, e.isCurrentPage(i + e.firstPage) ? e.tableCss.activeClass : ""]),
|
|
1094
1651
|
innerHTML: c,
|
|
1095
|
-
onClick: (
|
|
1096
|
-
}, null, 10,
|
|
1652
|
+
onClick: (l) => e.loadPage(i + e.firstPage)
|
|
1653
|
+
}, null, 10, wl))), 128)) : (m(!0), w(K, { key: 1 }, oe(e.windowSize, (c, i) => (m(), w("a", {
|
|
1097
1654
|
key: i,
|
|
1098
|
-
class:
|
|
1655
|
+
class: O([e.tableCss.pageClass, e.isCurrentPage(e.windowStart + i + e.firstPage - 1) ? e.tableCss.activeClass : ""]),
|
|
1099
1656
|
innerHTML: e.windowStart + c - 1,
|
|
1100
|
-
onClick: (
|
|
1101
|
-
}, null, 10,
|
|
1102
|
-
|
|
1103
|
-
class:
|
|
1657
|
+
onClick: (l) => e.loadPage(e.windowStart + i + e.firstPage - 1)
|
|
1658
|
+
}, null, 10, Pl))), 128)),
|
|
1659
|
+
V("a", {
|
|
1660
|
+
class: O(["btn-nav", e.tableCss.linkClass, e.isOnLastPage ? e.tableCss.disabledClass : ""]),
|
|
1104
1661
|
onClick: n[2] || (n[2] = (c) => e.loadPage("next"))
|
|
1105
1662
|
}, [
|
|
1106
|
-
e.tableCss.icons.next != "" ? (
|
|
1663
|
+
e.tableCss.icons.next != "" ? (m(), w("i", {
|
|
1107
1664
|
key: 0,
|
|
1108
|
-
class:
|
|
1109
|
-
}, null, 2)) : (
|
|
1665
|
+
class: O([e.tableCss.icons.next])
|
|
1666
|
+
}, null, 2)) : (m(), w("span", kl, " › "))
|
|
1110
1667
|
], 2),
|
|
1111
|
-
|
|
1112
|
-
class:
|
|
1668
|
+
V("a", {
|
|
1669
|
+
class: O(["btn-nav", e.tableCss.linkClass, e.isOnLastPage ? e.tableCss.disabledClass : ""]),
|
|
1113
1670
|
onClick: n[3] || (n[3] = (c) => e.loadPage(e.lastPage))
|
|
1114
1671
|
}, [
|
|
1115
|
-
e.tableCss.icons.last != "" ? (
|
|
1672
|
+
e.tableCss.icons.last != "" ? (m(), w("i", {
|
|
1116
1673
|
key: 0,
|
|
1117
|
-
class:
|
|
1118
|
-
}, null, 2)) : (
|
|
1674
|
+
class: O([e.tableCss.icons.last])
|
|
1675
|
+
}, null, 2)) : (m(), w("span", Sl, " » "))
|
|
1119
1676
|
], 2)
|
|
1120
1677
|
], 2)), [
|
|
1121
|
-
[
|
|
1678
|
+
[Ca, e.tablePagination && e.lastPage > e.firstPage]
|
|
1122
1679
|
]);
|
|
1123
1680
|
}
|
|
1124
|
-
const
|
|
1681
|
+
const Fl = /* @__PURE__ */ de(yl, [["render", $l]]), Tl = J({
|
|
1125
1682
|
props: {
|
|
1126
1683
|
css: { type: Object, required: !1, default: () => ({}) },
|
|
1127
1684
|
pageText: { type: String, required: !1, default: "Page" },
|
|
@@ -1130,90 +1687,90 @@ const da = /* @__PURE__ */ L(aa, [["render", ca]]), fa = E({
|
|
|
1130
1687
|
},
|
|
1131
1688
|
emits: ["vuetable-pagination:change-page"],
|
|
1132
1689
|
setup(e, { emit: n }) {
|
|
1133
|
-
const a =
|
|
1134
|
-
tablePagination:
|
|
1135
|
-
totalPage:
|
|
1690
|
+
const a = wa(), u = Rt(q(q({}, ye.pagination), e.css)), {
|
|
1691
|
+
tablePagination: s,
|
|
1692
|
+
totalPage: b,
|
|
1136
1693
|
lastPage: c,
|
|
1137
1694
|
isOnFirstPage: i,
|
|
1138
|
-
isOnLastPage:
|
|
1139
|
-
notEnoughPages:
|
|
1140
|
-
windowSize:
|
|
1141
|
-
windowStart:
|
|
1142
|
-
isCurrentPage:
|
|
1143
|
-
setPaginationData:
|
|
1144
|
-
resetData:
|
|
1145
|
-
} =
|
|
1146
|
-
function
|
|
1147
|
-
n("vuetable-pagination:change-page",
|
|
1148
|
-
}
|
|
1149
|
-
function y
|
|
1150
|
-
|
|
1151
|
-
}
|
|
1152
|
-
return a.on("vuetable:pagination-data", (
|
|
1153
|
-
|
|
1154
|
-
}), { emitter: a, tableCss:
|
|
1695
|
+
isOnLastPage: l,
|
|
1696
|
+
notEnoughPages: d,
|
|
1697
|
+
windowSize: v,
|
|
1698
|
+
windowStart: r,
|
|
1699
|
+
isCurrentPage: f,
|
|
1700
|
+
setPaginationData: g,
|
|
1701
|
+
resetData: $
|
|
1702
|
+
} = Ln(() => e.onEachSide, () => e.firstPage);
|
|
1703
|
+
function S(y) {
|
|
1704
|
+
n("vuetable-pagination:change-page", y);
|
|
1705
|
+
}
|
|
1706
|
+
function h(y) {
|
|
1707
|
+
S(y.target.selectedIndex + e.firstPage);
|
|
1708
|
+
}
|
|
1709
|
+
return a.on("vuetable:pagination-data", (y) => {
|
|
1710
|
+
g(y);
|
|
1711
|
+
}), { emitter: a, tableCss: u, tablePagination: s, totalPage: b, lastPage: c, isOnFirstPage: i, isOnLastPage: l, notEnoughPages: d, windowSize: v, windowStart: r, isCurrentPage: f, setPaginationData: g, resetData: $, loadPage: S, onPageSelected: h };
|
|
1155
1712
|
}
|
|
1156
|
-
}),
|
|
1157
|
-
function
|
|
1158
|
-
return
|
|
1159
|
-
class:
|
|
1713
|
+
}), Ol = ["value", "selected"];
|
|
1714
|
+
function ql(e, n, a, u, s, b) {
|
|
1715
|
+
return m(), w("div", {
|
|
1716
|
+
class: O([e.tableCss.wrapperClass])
|
|
1160
1717
|
}, [
|
|
1161
|
-
|
|
1162
|
-
class:
|
|
1718
|
+
V("a", {
|
|
1719
|
+
class: O([e.tableCss.linkClass, { [e.tableCss.disabledClass]: e.isOnFirstPage }]),
|
|
1163
1720
|
onClick: n[0] || (n[0] = (c) => e.loadPage("prev"))
|
|
1164
1721
|
}, [
|
|
1165
|
-
|
|
1166
|
-
class:
|
|
1722
|
+
V("i", {
|
|
1723
|
+
class: O(e.tableCss.icons.prev)
|
|
1167
1724
|
}, null, 2)
|
|
1168
1725
|
], 2),
|
|
1169
|
-
|
|
1170
|
-
class:
|
|
1726
|
+
V("select", {
|
|
1727
|
+
class: O(["vuetable-pagination-dropdown", e.tableCss.dropdownClass]),
|
|
1171
1728
|
onChange: n[1] || (n[1] = (c) => e.onPageSelected(c))
|
|
1172
1729
|
}, [
|
|
1173
|
-
(
|
|
1730
|
+
(m(!0), w(K, null, oe(e.totalPage, (c, i) => (m(), w("option", {
|
|
1174
1731
|
key: c,
|
|
1175
|
-
class:
|
|
1732
|
+
class: O([e.tableCss.pageClass]),
|
|
1176
1733
|
value: i + e.firstPage,
|
|
1177
1734
|
selected: e.isCurrentPage(i + e.firstPage)
|
|
1178
|
-
},
|
|
1735
|
+
}, Xe(e.pageText) + " " + Xe(c), 11, Ol))), 128))
|
|
1179
1736
|
], 34),
|
|
1180
|
-
|
|
1181
|
-
class:
|
|
1737
|
+
V("a", {
|
|
1738
|
+
class: O([e.tableCss.linkClass, { [e.tableCss.disabledClass]: e.isOnLastPage }]),
|
|
1182
1739
|
onClick: n[2] || (n[2] = (c) => e.loadPage("next"))
|
|
1183
1740
|
}, [
|
|
1184
|
-
|
|
1185
|
-
class:
|
|
1741
|
+
V("i", {
|
|
1742
|
+
class: O(e.tableCss.icons.next)
|
|
1186
1743
|
}, null, 2)
|
|
1187
1744
|
], 2)
|
|
1188
1745
|
], 2);
|
|
1189
1746
|
}
|
|
1190
|
-
const
|
|
1191
|
-
function
|
|
1192
|
-
const a = e === void 0 ||
|
|
1193
|
-
function
|
|
1194
|
-
c.value =
|
|
1747
|
+
const Rl = /* @__PURE__ */ de(Tl, [["render", ql]]);
|
|
1748
|
+
function Hl(e, n) {
|
|
1749
|
+
const a = e === void 0 || Hn(e) || typeof e == "function" || typeof e == "string" ? { noDataTemplate: e, infoTemplate: n } : e, u = () => x(a.noDataTemplate === void 0 ? "No relevant data" : a.noDataTemplate), s = () => x(a.infoTemplate === void 0 ? "Displaying {from} to {to} of {total} items" : a.infoTemplate), b = L(null), c = L({}), i = P(() => b.value == null || b.value.total == 0), l = P(() => i.value ? x(u) : x(s).replace("{from}", `${b.value.from || 0}`).replace("{to}", `${b.value.to || 0}`).replace("{total}", `${b.value.total || 0}`));
|
|
1750
|
+
function d() {
|
|
1751
|
+
c.value = q(q({}, ye.paginationInfo), x(a.css === void 0 ? {} : a.css));
|
|
1195
1752
|
}
|
|
1196
|
-
function g
|
|
1197
|
-
|
|
1753
|
+
function v(g) {
|
|
1754
|
+
b.value = g;
|
|
1198
1755
|
}
|
|
1199
|
-
function
|
|
1200
|
-
|
|
1756
|
+
function r() {
|
|
1757
|
+
b.value = null;
|
|
1201
1758
|
}
|
|
1202
|
-
function
|
|
1203
|
-
var
|
|
1204
|
-
return
|
|
1759
|
+
function f(g) {
|
|
1760
|
+
var $;
|
|
1761
|
+
return g === (($ = b.value) == null ? void 0 : $.current_page);
|
|
1205
1762
|
}
|
|
1206
|
-
return
|
|
1207
|
-
tablePagination:
|
|
1763
|
+
return d(), {
|
|
1764
|
+
tablePagination: b,
|
|
1208
1765
|
customCss: c,
|
|
1209
|
-
paginationInfo:
|
|
1210
|
-
setPaginationData:
|
|
1211
|
-
resetData:
|
|
1212
|
-
isCurrentPage:
|
|
1213
|
-
mergeCss:
|
|
1766
|
+
paginationInfo: l,
|
|
1767
|
+
setPaginationData: v,
|
|
1768
|
+
resetData: r,
|
|
1769
|
+
isCurrentPage: f,
|
|
1770
|
+
mergeCss: d
|
|
1214
1771
|
};
|
|
1215
1772
|
}
|
|
1216
|
-
const
|
|
1773
|
+
const Dl = J({
|
|
1217
1774
|
props: {
|
|
1218
1775
|
css: { type: null, required: !1, default: () => ({}) },
|
|
1219
1776
|
infoTemplate: { type: String, required: !1, default: "Displaying {from} to {to} of {total} items" },
|
|
@@ -1223,19 +1780,19 @@ const pa = E({
|
|
|
1223
1780
|
const {
|
|
1224
1781
|
tablePagination: n,
|
|
1225
1782
|
paginationInfo: a,
|
|
1226
|
-
setPaginationData:
|
|
1227
|
-
resetData:
|
|
1228
|
-
} =
|
|
1229
|
-
return { tablePagination: n, paginationInfo: a, setPaginationData:
|
|
1783
|
+
setPaginationData: u,
|
|
1784
|
+
resetData: s
|
|
1785
|
+
} = Hl(() => e.noDataTemplate, () => e.infoTemplate), b = L(q(q({}, ye.paginationInfo), e.css));
|
|
1786
|
+
return { tablePagination: n, paginationInfo: a, setPaginationData: u, resetData: s, tableCss: b };
|
|
1230
1787
|
}
|
|
1231
|
-
}),
|
|
1232
|
-
function
|
|
1233
|
-
return
|
|
1234
|
-
class:
|
|
1788
|
+
}), El = ["innerHTML"];
|
|
1789
|
+
function Ml(e, n, a, u, s, b) {
|
|
1790
|
+
return m(), w("div", {
|
|
1791
|
+
class: O(["vuetable-pagination-info", e.tableCss.infoClass]),
|
|
1235
1792
|
innerHTML: e.paginationInfo
|
|
1236
|
-
}, null, 10,
|
|
1793
|
+
}, null, 10, El);
|
|
1237
1794
|
}
|
|
1238
|
-
const
|
|
1795
|
+
const jl = /* @__PURE__ */ de(Dl, [["render", Ml]]), Ll = J({
|
|
1239
1796
|
props: {
|
|
1240
1797
|
rowData: {
|
|
1241
1798
|
type: Object,
|
|
@@ -1260,8 +1817,8 @@ const Ca = /* @__PURE__ */ L(pa, [["render", ma]]), wa = E({
|
|
|
1260
1817
|
default: null
|
|
1261
1818
|
}
|
|
1262
1819
|
}
|
|
1263
|
-
}),
|
|
1264
|
-
mixins: [
|
|
1820
|
+
}), _l = J({
|
|
1821
|
+
mixins: [Ll],
|
|
1265
1822
|
methods: {
|
|
1266
1823
|
toggleCheckbox(e, n) {
|
|
1267
1824
|
this.vuetable.onCheckboxToggled(n.target.checked, this.rowField.name, e);
|
|
@@ -1273,13 +1830,13 @@ const Ca = /* @__PURE__ */ L(pa, [["render", ma]]), wa = E({
|
|
|
1273
1830
|
return this.vuetable.isSelectedRow(e[this.vuetable.trackBy]);
|
|
1274
1831
|
},
|
|
1275
1832
|
isAllItemsInCurrentPageSelected() {
|
|
1276
|
-
var
|
|
1833
|
+
var u;
|
|
1277
1834
|
if (!this.vuetable.tableData) return;
|
|
1278
|
-
let e = this.vuetable.trackBy, n = (
|
|
1835
|
+
let e = this.vuetable.trackBy, n = (u = this.$el) == null ? void 0 : u.querySelector("input[type=checkbox]"), a = this.vuetable.tableData.filter((s) => this.vuetable.isSelectedRow(s[e]));
|
|
1279
1836
|
return a.length <= 0 ? (n && (n.indeterminate = !1), !1) : a.length < this.vuetable.tableData.length ? (n && (n.indeterminate = !0), !0) : (n && (n.indeterminate = !1), !0);
|
|
1280
1837
|
}
|
|
1281
1838
|
}
|
|
1282
|
-
}),
|
|
1839
|
+
}), eo = J({
|
|
1283
1840
|
props: {
|
|
1284
1841
|
css: {
|
|
1285
1842
|
type: Object,
|
|
@@ -1310,7 +1867,7 @@ const Ca = /* @__PURE__ */ L(pa, [["render", ma]]), wa = E({
|
|
|
1310
1867
|
},
|
|
1311
1868
|
methods: {
|
|
1312
1869
|
mergeCss() {
|
|
1313
|
-
this.customCss =
|
|
1870
|
+
this.customCss = q(q({}, ye.paginationInfo), this.css);
|
|
1314
1871
|
},
|
|
1315
1872
|
setPaginationData(e) {
|
|
1316
1873
|
this.tablePagination = e;
|
|
@@ -1319,7 +1876,7 @@ const Ca = /* @__PURE__ */ L(pa, [["render", ma]]), wa = E({
|
|
|
1319
1876
|
this.tablePagination = null;
|
|
1320
1877
|
}
|
|
1321
1878
|
}
|
|
1322
|
-
}),
|
|
1879
|
+
}), to = J({
|
|
1323
1880
|
emits: [
|
|
1324
1881
|
"vuetable-pagination:change-page"
|
|
1325
1882
|
],
|
|
@@ -1376,7 +1933,7 @@ const Ca = /* @__PURE__ */ L(pa, [["render", ma]]), wa = E({
|
|
|
1376
1933
|
},
|
|
1377
1934
|
methods: {
|
|
1378
1935
|
mergeCss() {
|
|
1379
|
-
this.customCss =
|
|
1936
|
+
this.customCss = q(q({}, ye.pagination), this.css);
|
|
1380
1937
|
},
|
|
1381
1938
|
loadPage(e) {
|
|
1382
1939
|
this.$emit("vuetable-pagination:change-page", e);
|
|
@@ -1392,76 +1949,76 @@ const Ca = /* @__PURE__ */ L(pa, [["render", ma]]), wa = E({
|
|
|
1392
1949
|
}
|
|
1393
1950
|
}
|
|
1394
1951
|
});
|
|
1395
|
-
function
|
|
1396
|
-
const n =
|
|
1952
|
+
function Il(e) {
|
|
1953
|
+
const n = pe("vuetable", null);
|
|
1397
1954
|
return {
|
|
1398
|
-
rowData:
|
|
1955
|
+
rowData: P(() => {
|
|
1399
1956
|
var a;
|
|
1400
1957
|
return (a = e.rowData) != null ? a : null;
|
|
1401
1958
|
}),
|
|
1402
|
-
rowIndex:
|
|
1403
|
-
rowField:
|
|
1404
|
-
isHeader:
|
|
1959
|
+
rowIndex: P(() => e.rowIndex),
|
|
1960
|
+
rowField: P(() => e.rowField),
|
|
1961
|
+
isHeader: P(() => {
|
|
1405
1962
|
var a;
|
|
1406
1963
|
return (a = e.isHeader) != null ? a : !1;
|
|
1407
1964
|
}),
|
|
1408
|
-
title:
|
|
1965
|
+
title: P(() => {
|
|
1409
1966
|
var a;
|
|
1410
1967
|
return (a = e.title) != null ? a : "";
|
|
1411
1968
|
}),
|
|
1412
|
-
vuetable:
|
|
1969
|
+
vuetable: P(() => {
|
|
1413
1970
|
var a;
|
|
1414
1971
|
return (a = e.vuetable) != null ? a : n;
|
|
1415
1972
|
})
|
|
1416
1973
|
};
|
|
1417
1974
|
}
|
|
1418
|
-
function
|
|
1419
|
-
const n =
|
|
1975
|
+
function no(e) {
|
|
1976
|
+
const n = Il(e);
|
|
1420
1977
|
function a() {
|
|
1421
|
-
const
|
|
1422
|
-
if (!
|
|
1978
|
+
const r = n.vuetable.value;
|
|
1979
|
+
if (!r)
|
|
1423
1980
|
throw new TypeError('useVuetableFieldCheckbox requires a vuetable prop or a "vuetable" provider.');
|
|
1424
|
-
return
|
|
1981
|
+
return r;
|
|
1425
1982
|
}
|
|
1426
1983
|
a();
|
|
1427
|
-
const
|
|
1428
|
-
const
|
|
1429
|
-
return (
|
|
1430
|
-
}),
|
|
1431
|
-
var
|
|
1432
|
-
return
|
|
1984
|
+
const u = L(null), s = P(() => {
|
|
1985
|
+
const r = a();
|
|
1986
|
+
return (r.tableData || []).filter((f) => r.isSelectedRow(f[r.trackBy])).length;
|
|
1987
|
+
}), b = P(() => {
|
|
1988
|
+
var r;
|
|
1989
|
+
return s.value > 0 && s.value < (((r = a().tableData) == null ? void 0 : r.length) || 0);
|
|
1433
1990
|
});
|
|
1434
|
-
function c(
|
|
1435
|
-
var
|
|
1436
|
-
if (!
|
|
1437
|
-
a().onCheckboxToggled(
|
|
1991
|
+
function c(r, f) {
|
|
1992
|
+
var $;
|
|
1993
|
+
if (!r) return;
|
|
1994
|
+
a().onCheckboxToggled(f.target.checked, ($ = n.rowField.value) == null ? void 0 : $.name, r);
|
|
1438
1995
|
}
|
|
1439
|
-
function i(
|
|
1440
|
-
a().onCheckboxToggledAll(
|
|
1996
|
+
function i(r) {
|
|
1997
|
+
a().onCheckboxToggledAll(r.target.checked);
|
|
1441
1998
|
}
|
|
1442
|
-
function
|
|
1443
|
-
if (!
|
|
1444
|
-
const
|
|
1445
|
-
return
|
|
1999
|
+
function l(r) {
|
|
2000
|
+
if (!r) return !1;
|
|
2001
|
+
const f = a();
|
|
2002
|
+
return f.isSelectedRow(r[f.trackBy]);
|
|
1446
2003
|
}
|
|
1447
|
-
function
|
|
2004
|
+
function d() {
|
|
1448
2005
|
if (a().tableData)
|
|
1449
|
-
return
|
|
2006
|
+
return s.value > 0;
|
|
1450
2007
|
}
|
|
1451
|
-
function
|
|
1452
|
-
|
|
2008
|
+
function v() {
|
|
2009
|
+
u.value && (u.value.indeterminate = n.isHeader.value && b.value);
|
|
1453
2010
|
}
|
|
1454
|
-
return
|
|
1455
|
-
checkbox:
|
|
1456
|
-
selectedCount:
|
|
1457
|
-
isIndeterminate:
|
|
2011
|
+
return qt(v), Rn(v), _([u, n.isHeader, b], v, { flush: "post" }), be(q({}, n), {
|
|
2012
|
+
checkbox: u,
|
|
2013
|
+
selectedCount: s,
|
|
2014
|
+
isIndeterminate: b,
|
|
1458
2015
|
toggleCheckbox: c,
|
|
1459
2016
|
toggleAllCheckbox: i,
|
|
1460
|
-
isSelected:
|
|
1461
|
-
isAllItemsInCurrentPageSelected:
|
|
2017
|
+
isSelected: l,
|
|
2018
|
+
isAllItemsInCurrentPageSelected: d
|
|
1462
2019
|
});
|
|
1463
2020
|
}
|
|
1464
|
-
function
|
|
2021
|
+
function Al(e) {
|
|
1465
2022
|
var n = this.constructor;
|
|
1466
2023
|
return this.then(
|
|
1467
2024
|
function(a) {
|
|
@@ -1476,248 +2033,289 @@ function ka(e) {
|
|
|
1476
2033
|
}
|
|
1477
2034
|
);
|
|
1478
2035
|
}
|
|
1479
|
-
function
|
|
2036
|
+
function Bl(e) {
|
|
1480
2037
|
var n = this;
|
|
1481
|
-
return new n(function(a,
|
|
2038
|
+
return new n(function(a, u) {
|
|
1482
2039
|
if (!(e && typeof e.length != "undefined"))
|
|
1483
|
-
return
|
|
2040
|
+
return u(
|
|
1484
2041
|
new TypeError(
|
|
1485
2042
|
typeof e + " " + e + " is not iterable(cannot read property Symbol(Symbol.iterator))"
|
|
1486
2043
|
)
|
|
1487
2044
|
);
|
|
1488
|
-
var
|
|
1489
|
-
if (
|
|
1490
|
-
var
|
|
1491
|
-
function c(
|
|
1492
|
-
if (
|
|
1493
|
-
var
|
|
1494
|
-
if (typeof
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
function(
|
|
1498
|
-
c(
|
|
2045
|
+
var s = Array.prototype.slice.call(e);
|
|
2046
|
+
if (s.length === 0) return a([]);
|
|
2047
|
+
var b = s.length;
|
|
2048
|
+
function c(l, d) {
|
|
2049
|
+
if (d && (typeof d == "object" || typeof d == "function")) {
|
|
2050
|
+
var v = d.then;
|
|
2051
|
+
if (typeof v == "function") {
|
|
2052
|
+
v.call(
|
|
2053
|
+
d,
|
|
2054
|
+
function(r) {
|
|
2055
|
+
c(l, r);
|
|
1499
2056
|
},
|
|
1500
|
-
function(
|
|
1501
|
-
|
|
2057
|
+
function(r) {
|
|
2058
|
+
s[l] = { status: "rejected", reason: r }, --b === 0 && a(s);
|
|
1502
2059
|
}
|
|
1503
2060
|
);
|
|
1504
2061
|
return;
|
|
1505
2062
|
}
|
|
1506
2063
|
}
|
|
1507
|
-
|
|
2064
|
+
s[l] = { status: "fulfilled", value: d }, --b === 0 && a(s);
|
|
1508
2065
|
}
|
|
1509
|
-
for (var i = 0; i <
|
|
1510
|
-
c(i,
|
|
2066
|
+
for (var i = 0; i < s.length; i++)
|
|
2067
|
+
c(i, s[i]);
|
|
1511
2068
|
});
|
|
1512
2069
|
}
|
|
1513
|
-
function
|
|
2070
|
+
function In(e, n) {
|
|
1514
2071
|
this.name = "AggregateError", this.errors = e, this.message = n || "";
|
|
1515
2072
|
}
|
|
1516
|
-
|
|
1517
|
-
function
|
|
2073
|
+
In.prototype = Error.prototype;
|
|
2074
|
+
function Vl(e) {
|
|
1518
2075
|
var n = this;
|
|
1519
|
-
return new n(function(a,
|
|
2076
|
+
return new n(function(a, u) {
|
|
1520
2077
|
if (!(e && typeof e.length != "undefined"))
|
|
1521
|
-
return
|
|
1522
|
-
var
|
|
1523
|
-
if (
|
|
1524
|
-
for (var
|
|
2078
|
+
return u(new TypeError("Promise.any accepts an array"));
|
|
2079
|
+
var s = Array.prototype.slice.call(e);
|
|
2080
|
+
if (s.length === 0) return u();
|
|
2081
|
+
for (var b = [], c = 0; c < s.length; c++)
|
|
1525
2082
|
try {
|
|
1526
|
-
n.resolve(
|
|
1527
|
-
|
|
1528
|
-
new
|
|
1529
|
-
|
|
2083
|
+
n.resolve(s[c]).then(a).catch(function(i) {
|
|
2084
|
+
b.push(i), b.length === s.length && u(
|
|
2085
|
+
new In(
|
|
2086
|
+
b,
|
|
1530
2087
|
"All promises were rejected"
|
|
1531
2088
|
)
|
|
1532
2089
|
);
|
|
1533
2090
|
});
|
|
1534
2091
|
} catch (i) {
|
|
1535
|
-
|
|
2092
|
+
u(i);
|
|
1536
2093
|
}
|
|
1537
2094
|
});
|
|
1538
2095
|
}
|
|
1539
|
-
var
|
|
1540
|
-
function
|
|
2096
|
+
var Nl = setTimeout;
|
|
2097
|
+
function An(e) {
|
|
1541
2098
|
return !!(e && typeof e.length != "undefined");
|
|
1542
2099
|
}
|
|
1543
|
-
function
|
|
2100
|
+
function Wl() {
|
|
1544
2101
|
}
|
|
1545
|
-
function
|
|
2102
|
+
function Gl(e, n) {
|
|
1546
2103
|
return function() {
|
|
1547
2104
|
e.apply(n, arguments);
|
|
1548
2105
|
};
|
|
1549
2106
|
}
|
|
1550
|
-
function
|
|
1551
|
-
if (!(this instanceof
|
|
2107
|
+
function A(e) {
|
|
2108
|
+
if (!(this instanceof A))
|
|
1552
2109
|
throw new TypeError("Promises must be constructed via new");
|
|
1553
2110
|
if (typeof e != "function") throw new TypeError("not a function");
|
|
1554
|
-
this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [],
|
|
2111
|
+
this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], Vn(e, this);
|
|
1555
2112
|
}
|
|
1556
|
-
function
|
|
2113
|
+
function Bn(e, n) {
|
|
1557
2114
|
for (; e._state === 3; )
|
|
1558
2115
|
e = e._value;
|
|
1559
2116
|
if (e._state === 0) {
|
|
1560
2117
|
e._deferreds.push(n);
|
|
1561
2118
|
return;
|
|
1562
2119
|
}
|
|
1563
|
-
e._handled = !0,
|
|
2120
|
+
e._handled = !0, A._immediateFn(function() {
|
|
1564
2121
|
var a = e._state === 1 ? n.onFulfilled : n.onRejected;
|
|
1565
2122
|
if (a === null) {
|
|
1566
|
-
(e._state === 1 ?
|
|
2123
|
+
(e._state === 1 ? Ft : We)(n.promise, e._value);
|
|
1567
2124
|
return;
|
|
1568
2125
|
}
|
|
1569
|
-
var
|
|
2126
|
+
var u;
|
|
1570
2127
|
try {
|
|
1571
|
-
|
|
1572
|
-
} catch (
|
|
1573
|
-
|
|
2128
|
+
u = a(e._value);
|
|
2129
|
+
} catch (s) {
|
|
2130
|
+
We(n.promise, s);
|
|
1574
2131
|
return;
|
|
1575
2132
|
}
|
|
1576
|
-
|
|
2133
|
+
Ft(n.promise, u);
|
|
1577
2134
|
});
|
|
1578
2135
|
}
|
|
1579
|
-
function
|
|
2136
|
+
function Ft(e, n) {
|
|
1580
2137
|
try {
|
|
1581
2138
|
if (n === e)
|
|
1582
2139
|
throw new TypeError("A promise cannot be resolved with itself.");
|
|
1583
2140
|
if (n && (typeof n == "object" || typeof n == "function")) {
|
|
1584
2141
|
var a = n.then;
|
|
1585
|
-
if (n instanceof
|
|
1586
|
-
e._state = 3, e._value = n,
|
|
2142
|
+
if (n instanceof A) {
|
|
2143
|
+
e._state = 3, e._value = n, Tt(e);
|
|
1587
2144
|
return;
|
|
1588
2145
|
} else if (typeof a == "function") {
|
|
1589
|
-
|
|
2146
|
+
Vn(Gl(a, n), e);
|
|
1590
2147
|
return;
|
|
1591
2148
|
}
|
|
1592
2149
|
}
|
|
1593
|
-
e._state = 1, e._value = n,
|
|
1594
|
-
} catch (
|
|
1595
|
-
|
|
2150
|
+
e._state = 1, e._value = n, Tt(e);
|
|
2151
|
+
} catch (u) {
|
|
2152
|
+
We(e, u);
|
|
1596
2153
|
}
|
|
1597
2154
|
}
|
|
1598
|
-
function
|
|
1599
|
-
e._state = 2, e._value = n,
|
|
2155
|
+
function We(e, n) {
|
|
2156
|
+
e._state = 2, e._value = n, Tt(e);
|
|
1600
2157
|
}
|
|
1601
|
-
function
|
|
1602
|
-
e._state === 2 && e._deferreds.length === 0 &&
|
|
1603
|
-
e._handled ||
|
|
2158
|
+
function Tt(e) {
|
|
2159
|
+
e._state === 2 && e._deferreds.length === 0 && A._immediateFn(function() {
|
|
2160
|
+
e._handled || A._unhandledRejectionFn(e._value);
|
|
1604
2161
|
});
|
|
1605
2162
|
for (var n = 0, a = e._deferreds.length; n < a; n++)
|
|
1606
|
-
|
|
2163
|
+
Bn(e, e._deferreds[n]);
|
|
1607
2164
|
e._deferreds = null;
|
|
1608
2165
|
}
|
|
1609
|
-
function
|
|
2166
|
+
function zl(e, n, a) {
|
|
1610
2167
|
this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof n == "function" ? n : null, this.promise = a;
|
|
1611
2168
|
}
|
|
1612
|
-
function
|
|
2169
|
+
function Vn(e, n) {
|
|
1613
2170
|
var a = !1;
|
|
1614
2171
|
try {
|
|
1615
2172
|
e(
|
|
1616
|
-
function(
|
|
1617
|
-
a || (a = !0,
|
|
2173
|
+
function(u) {
|
|
2174
|
+
a || (a = !0, Ft(n, u));
|
|
1618
2175
|
},
|
|
1619
|
-
function(
|
|
1620
|
-
a || (a = !0,
|
|
2176
|
+
function(u) {
|
|
2177
|
+
a || (a = !0, We(n, u));
|
|
1621
2178
|
}
|
|
1622
2179
|
);
|
|
1623
|
-
} catch (
|
|
2180
|
+
} catch (u) {
|
|
1624
2181
|
if (a) return;
|
|
1625
|
-
a = !0,
|
|
2182
|
+
a = !0, We(n, u);
|
|
1626
2183
|
}
|
|
1627
2184
|
}
|
|
1628
|
-
|
|
2185
|
+
A.prototype.catch = function(e) {
|
|
1629
2186
|
return this.then(null, e);
|
|
1630
2187
|
};
|
|
1631
|
-
|
|
1632
|
-
var a = new this.constructor(
|
|
1633
|
-
return
|
|
2188
|
+
A.prototype.then = function(e, n) {
|
|
2189
|
+
var a = new this.constructor(Wl);
|
|
2190
|
+
return Bn(this, new zl(e, n, a)), a;
|
|
1634
2191
|
};
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
return new
|
|
1638
|
-
if (!
|
|
2192
|
+
A.prototype.finally = Al;
|
|
2193
|
+
A.all = function(e) {
|
|
2194
|
+
return new A(function(n, a) {
|
|
2195
|
+
if (!An(e))
|
|
1639
2196
|
return a(new TypeError("Promise.all accepts an array"));
|
|
1640
|
-
var
|
|
1641
|
-
if (
|
|
1642
|
-
var
|
|
1643
|
-
function
|
|
2197
|
+
var u = Array.prototype.slice.call(e);
|
|
2198
|
+
if (u.length === 0) return n([]);
|
|
2199
|
+
var s = u.length;
|
|
2200
|
+
function b(i, l) {
|
|
1644
2201
|
try {
|
|
1645
|
-
if (
|
|
1646
|
-
var
|
|
1647
|
-
if (typeof
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
function(
|
|
1651
|
-
|
|
2202
|
+
if (l && (typeof l == "object" || typeof l == "function")) {
|
|
2203
|
+
var d = l.then;
|
|
2204
|
+
if (typeof d == "function") {
|
|
2205
|
+
d.call(
|
|
2206
|
+
l,
|
|
2207
|
+
function(v) {
|
|
2208
|
+
b(i, v);
|
|
1652
2209
|
},
|
|
1653
2210
|
a
|
|
1654
2211
|
);
|
|
1655
2212
|
return;
|
|
1656
2213
|
}
|
|
1657
2214
|
}
|
|
1658
|
-
|
|
1659
|
-
} catch (
|
|
1660
|
-
a(
|
|
2215
|
+
u[i] = l, --s === 0 && n(u);
|
|
2216
|
+
} catch (v) {
|
|
2217
|
+
a(v);
|
|
1661
2218
|
}
|
|
1662
2219
|
}
|
|
1663
|
-
for (var c = 0; c <
|
|
1664
|
-
|
|
2220
|
+
for (var c = 0; c < u.length; c++)
|
|
2221
|
+
b(c, u[c]);
|
|
1665
2222
|
});
|
|
1666
2223
|
};
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
return e && typeof e == "object" && e.constructor ===
|
|
2224
|
+
A.any = Vl;
|
|
2225
|
+
A.allSettled = Bl;
|
|
2226
|
+
A.resolve = function(e) {
|
|
2227
|
+
return e && typeof e == "object" && e.constructor === A ? e : new A(function(n) {
|
|
1671
2228
|
n(e);
|
|
1672
2229
|
});
|
|
1673
2230
|
};
|
|
1674
|
-
|
|
1675
|
-
return new
|
|
2231
|
+
A.reject = function(e) {
|
|
2232
|
+
return new A(function(n, a) {
|
|
1676
2233
|
a(e);
|
|
1677
2234
|
});
|
|
1678
2235
|
};
|
|
1679
|
-
|
|
1680
|
-
return new
|
|
1681
|
-
if (!
|
|
2236
|
+
A.race = function(e) {
|
|
2237
|
+
return new A(function(n, a) {
|
|
2238
|
+
if (!An(e))
|
|
1682
2239
|
return a(new TypeError("Promise.race accepts an array"));
|
|
1683
|
-
for (var
|
|
1684
|
-
|
|
2240
|
+
for (var u = 0, s = e.length; u < s; u++)
|
|
2241
|
+
A.resolve(e[u]).then(n, a);
|
|
1685
2242
|
});
|
|
1686
2243
|
};
|
|
1687
|
-
|
|
2244
|
+
A._immediateFn = // @ts-ignore
|
|
1688
2245
|
typeof setImmediate == "function" && function(e) {
|
|
1689
2246
|
setImmediate(e);
|
|
1690
2247
|
} || function(e) {
|
|
1691
|
-
|
|
2248
|
+
Nl(e, 0);
|
|
1692
2249
|
};
|
|
1693
|
-
|
|
2250
|
+
A._unhandledRejectionFn = function(n) {
|
|
1694
2251
|
typeof console != "undefined" && console && console.warn("Possible Unhandled Promise Rejection:", n);
|
|
1695
2252
|
};
|
|
1696
|
-
const
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
2253
|
+
const Kl = [
|
|
2254
|
+
"initialized",
|
|
2255
|
+
"loading",
|
|
2256
|
+
"loaded",
|
|
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);
|
|
1700
2296
|
}
|
|
1701
|
-
const
|
|
2297
|
+
const xl = Object.assign(Ye, { install: Ul });
|
|
1702
2298
|
export {
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
2299
|
+
xl as Vuetable,
|
|
2300
|
+
_e as VuetableColGutter,
|
|
2301
|
+
pl as VuetableColumn,
|
|
2302
|
+
Ht as VuetableFieldCheckbox,
|
|
2303
|
+
_l as VuetableFieldCheckboxMixin,
|
|
2304
|
+
Dt as VuetableFieldHandle,
|
|
2305
|
+
Ll as VuetableFieldMixin,
|
|
2306
|
+
Et as VuetableFieldSequence,
|
|
2307
|
+
Fl as VuetablePagination,
|
|
2308
|
+
Rl as VuetablePaginationDropdown,
|
|
2309
|
+
jl as VuetablePaginationInfo,
|
|
2310
|
+
eo as VuetablePaginationInfoMixin,
|
|
2311
|
+
to as VuetablePaginationMixin,
|
|
2312
|
+
En as VuetableRowHeader,
|
|
2313
|
+
ao as createVuetable,
|
|
2314
|
+
xl as default,
|
|
2315
|
+
Ul as install,
|
|
2316
|
+
Il as useVuetableField,
|
|
2317
|
+
no as useVuetableFieldCheckbox,
|
|
2318
|
+
Ln as useVuetablePagination,
|
|
2319
|
+
Hl as useVuetablePaginationInfo
|
|
1722
2320
|
};
|
|
1723
2321
|
//# sourceMappingURL=vue3.js.map
|