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