vectis-ui 0.15.0 → 0.16.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/dist/components/VAccordion/VAccordion.css +1 -1
- package/dist/components/VAccordion/VAccordion.d.ts +0 -6
- package/dist/components/VAccordion/VAccordion.js.map +1 -1
- package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js +3 -8
- package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAccordion/context.js.map +1 -1
- package/dist/components/VAvatar/VAvatar.d.ts +0 -3
- package/dist/components/VAvatar/VAvatar.js.map +1 -1
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js +21 -27
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAvatar/VAvatarGroup.d.ts +0 -6
- package/dist/components/VAvatar/VAvatarGroup.js.map +1 -1
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +5 -19
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAvatar/context.d.ts +0 -1
- package/dist/components/VAvatar/context.js.map +1 -1
- package/dist/components/VButton/VButton.d.ts +0 -6
- package/dist/components/VButton/VButton.js.map +1 -1
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js +11 -17
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/VButtonGroup.d.ts +0 -6
- package/dist/components/VButton/VButtonGroup.js.map +1 -1
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js +0 -7
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/context.d.ts +0 -2
- package/dist/components/VButton/context.js.map +1 -1
- package/dist/components/VChip/VChip.d.ts +0 -3
- package/dist/components/VChip/VChip.js.map +1 -1
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VColorInput/VColorInput.d.ts +0 -3
- package/dist/components/VColorInput/VColorInput.js.map +1 -1
- package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js +60 -66
- package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/VCombobox.d.ts +0 -3
- package/dist/components/VCombobox/VCombobox.js.map +1 -1
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +127 -138
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VContextMenu/VContextMenu.d.ts +0 -3
- package/dist/components/VContextMenu/VContextMenu.js.map +1 -1
- package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.css +1 -1
- package/dist/components/VDataTable/VDataTable.d.ts +0 -2
- package/dist/components/VDataTable/VDataTable.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +69 -84
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDateInput/VDateInput.d.ts +0 -3
- package/dist/components/VDateInput/VDateInput.js.map +1 -1
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +32 -37
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFileInput/VFileInput.d.ts +0 -5
- package/dist/components/VFileInput/VFileInput.js.map +1 -1
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +75 -86
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VHotkeys/VHotkeys.d.ts +0 -3
- package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VIconButton/VIconButton.d.ts +0 -3
- package/dist/components/VIconButton/VIconButton.js.map +1 -1
- package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/VInput.css +1 -1
- package/dist/components/VInput/VInput.d.ts +0 -3
- package/dist/components/VInput/VInput.js.map +1 -1
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +18 -24
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/VInputGroup.d.ts +0 -3
- package/dist/components/VInput/VInputGroup.js.map +1 -1
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +0 -7
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/context.d.ts +0 -2
- package/dist/components/VInput/context.js.map +1 -1
- package/dist/components/VInputOTP/VInputOTP.d.ts +0 -3
- package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VListbox/VListboxPanel.d.ts +0 -3
- package/dist/components/VListbox/VListboxPanel.js.map +1 -1
- package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VListbox/VListboxValues.js.map +1 -1
- package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js +4 -14
- package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenu.d.ts +0 -3
- package/dist/components/VMenu/VMenu.js.map +1 -1
- package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuPanel.d.ts +0 -3
- package/dist/components/VMenu/VMenuPanel.js.map +1 -1
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VNumberInput/VNumberInput.d.ts +0 -3
- package/dist/components/VNumberInput/VNumberInput.js.map +1 -1
- package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VPagination/VPagination.d.ts +0 -3
- package/dist/components/VPagination/VPagination.js.map +1 -1
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSelect/VSelect.d.ts +0 -3
- package/dist/components/VSelect/VSelect.js.map +1 -1
- package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js +114 -123
- package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.d.ts +0 -6
- package/dist/components/VSideNavigation/VSideNavigation.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +1 -10
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/context.js.map +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +0 -3
- package/dist/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSlider/VSlider.js.map +1 -1
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +115 -120
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSplitButton/VSplitButton.d.ts +0 -3
- package/dist/components/VSplitButton/VSplitButton.js.map +1 -1
- package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTab.js.map +1 -1
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js +0 -2
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTabs.css +1 -1
- package/dist/components/VTabs/VTabs.d.ts +0 -3
- package/dist/components/VTabs/VTabs.js.map +1 -1
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +2 -15
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/context.d.ts +0 -2
- package/dist/components/VTabs/context.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.d.ts +0 -6
- package/dist/components/VTextarea/VTextarea.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.d.ts +0 -3
- package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +211 -218
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToggle/VToggle.d.ts +0 -3
- package/dist/components/VToggle/VToggle.js.map +1 -1
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/composables/useControlShape.d.ts +1 -5
- package/dist/composables/useControlShape.js +0 -1
- package/dist/composables/useControlShape.js.map +1 -1
- package/dist/composables/useListbox.d.ts +0 -1
- package/dist/composables/useListbox.js +1 -1
- package/dist/composables/useListbox.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokens/index.d.ts +3 -0
- package/dist/tokens/semantic.d.ts +3 -0
- package/dist/tokens/semantic.js +6 -5
- package/dist/tokens/semantic.js.map +1 -1
- package/dist/tokens.json +12 -5
- package/dist/types.d.ts +0 -2
- package/dist/utils/chip.d.ts +4 -6
- package/dist/utils/chip.js +8 -5
- package/dist/utils/chip.js.map +1 -1
- package/package.json +1 -1
|
@@ -31,7 +31,6 @@ import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m
|
|
|
31
31
|
var we = [
|
|
32
32
|
"data-variant",
|
|
33
33
|
"data-striped",
|
|
34
|
-
"data-compact",
|
|
35
34
|
"data-sticky-header",
|
|
36
35
|
"data-selectable",
|
|
37
36
|
"data-virtual"
|
|
@@ -88,7 +87,7 @@ var we = [
|
|
|
88
87
|
key: 1,
|
|
89
88
|
class: "v-data-table-range",
|
|
90
89
|
"aria-live": "polite"
|
|
91
|
-
}, j = /*@__PURE__*/ y({
|
|
90
|
+
}, $e = 46, j = /*@__PURE__*/ y({
|
|
92
91
|
inheritAttrs: !1,
|
|
93
92
|
__name: "VDataTable",
|
|
94
93
|
props: /*@__PURE__*/ b({
|
|
@@ -119,10 +118,6 @@ var we = [
|
|
|
119
118
|
type: Boolean,
|
|
120
119
|
default: !1
|
|
121
120
|
},
|
|
122
|
-
compact: {
|
|
123
|
-
type: Boolean,
|
|
124
|
-
default: !1
|
|
125
|
-
},
|
|
126
121
|
height: { default: void 0 },
|
|
127
122
|
sortIcon: { default: () => u },
|
|
128
123
|
sortAscIcon: { default: () => c },
|
|
@@ -183,11 +178,11 @@ var we = [
|
|
|
183
178
|
"update:search"
|
|
184
179
|
]),
|
|
185
180
|
setup(c, { expose: l, emit: u }) {
|
|
186
|
-
let y = c, b = n(), j = t(), M = f(() => y.loadingText ?? b.value.dataTable.loading),
|
|
187
|
-
l({ el:
|
|
188
|
-
let
|
|
181
|
+
let y = c, b = n(), j = t(), M = f(() => y.loadingText ?? b.value.dataTable.loading), et = f(() => y.searchPlaceholder ?? b.value.dataTable.searchPlaceholder), tt = f(() => y.searchLabel ?? b.value.dataTable.searchLabel), N = f(() => y.perPageText ?? b.value.dataTable.perPage), nt = f(() => y.selectAllLabel ?? b.value.dataTable.selectAll), P = O(c, "sort"), F = O(c, "page"), I = O(c, "perPage"), L = O(c, "selected"), R = O(c, "search"), rt = u, { attrs: it, rootClass: at, rootStyle: ot, forwardedAttrs: st } = ne(), ct = Se(), lt = C(null);
|
|
182
|
+
l({ el: lt });
|
|
183
|
+
let ut = xe(), dt = xe(), ft = () => it["aria-label"] !== void 0 || it["aria-labelledby"] !== void 0, pt = f(() => y.title && !ct.header && !ft() ? ut : void 0), mt = f(() => y.subtitle && !ct.header ? dt : void 0);
|
|
189
184
|
if (e) {
|
|
190
|
-
!
|
|
185
|
+
!pt.value && !ft() && console.warn("[VDataTable] the table has no accessible name: set `title`, or aria-label or aria-labelledby when the `#header` slot replaces it."), y.selectable && !y.rowKey && console.warn("[VDataTable] `selectable` without `rowKey` — index-based identities are corrupted by sorting, filtering and pagination.");
|
|
191
186
|
let e = /* @__PURE__ */ new Set();
|
|
192
187
|
Ce(() => {
|
|
193
188
|
let t = y.rowKey;
|
|
@@ -199,33 +194,33 @@ var we = [
|
|
|
199
194
|
}
|
|
200
195
|
});
|
|
201
196
|
}
|
|
202
|
-
function
|
|
197
|
+
function ht(e, t) {
|
|
203
198
|
if (!y.rowKey) return t;
|
|
204
199
|
let n = e[y.rowKey];
|
|
205
200
|
return typeof n == "string" || typeof n == "number" ? n : String(n);
|
|
206
201
|
}
|
|
207
|
-
let
|
|
202
|
+
let gt = ae(), _t = (e, t) => gt(e, String(e[t] ?? ""), t), z = f(() => {
|
|
208
203
|
if (y.serverSide || !y.searchable) return y.rows;
|
|
209
204
|
let e = oe((R.value ?? "").trim());
|
|
210
|
-
return e ? y.rows.filter((t) => y.columns.some((n) =>
|
|
211
|
-
}),
|
|
212
|
-
function
|
|
213
|
-
return e instanceof Date ? e.getTime() : typeof e == "string" &&
|
|
205
|
+
return e ? y.rows.filter((t) => y.columns.some((n) => _t(t, n.key).includes(e))) : y.rows;
|
|
206
|
+
}), vt = f(() => new Intl.Collator(j.value, { numeric: !0 })), yt = /^\s*[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?\s*$/i;
|
|
207
|
+
function bt(e) {
|
|
208
|
+
return e instanceof Date ? e.getTime() : typeof e == "string" && yt.test(e) ? Number(e) : e;
|
|
214
209
|
}
|
|
215
|
-
let
|
|
210
|
+
let xt = f(() => {
|
|
216
211
|
let e = P.value;
|
|
217
212
|
if (!e || y.serverSide) return z.value;
|
|
218
|
-
let t = e.direction === "asc" ? 1 : -1, n =
|
|
213
|
+
let t = e.direction === "asc" ? 1 : -1, n = vt.value.compare;
|
|
219
214
|
return [...z.value].sort((r, i) => {
|
|
220
|
-
let a =
|
|
215
|
+
let a = bt(r[e.key]), o = bt(i[e.key]);
|
|
221
216
|
return typeof a == "number" && typeof o == "number" ? (a - o) * t : n(String(a ?? ""), String(o ?? "")) * t;
|
|
222
217
|
});
|
|
223
|
-
}), B = f(() => (I.value ?? 0) > 0), V = f(() => y.serverSide ? y.total ?? y.rows.length : z.value.length),
|
|
224
|
-
if (y.serverSide || !B.value) return
|
|
218
|
+
}), B = f(() => (I.value ?? 0) > 0), V = f(() => y.serverSide ? y.total ?? y.rows.length : z.value.length), St = f(() => B.value ? Math.max(1, Math.ceil(V.value / (I.value ?? 1))) : 1), H = f(() => ee(F.value, 1, St.value)), U = f(() => {
|
|
219
|
+
if (y.serverSide || !B.value) return xt.value;
|
|
225
220
|
let e = (H.value - 1) * (I.value ?? 0);
|
|
226
|
-
return
|
|
221
|
+
return xt.value.slice(e, e + (I.value ?? 0));
|
|
227
222
|
});
|
|
228
|
-
function
|
|
223
|
+
function Ct(e) {
|
|
229
224
|
let t = P.value;
|
|
230
225
|
!t || t.key !== e ? P.value = {
|
|
231
226
|
key: e,
|
|
@@ -235,20 +230,20 @@ var we = [
|
|
|
235
230
|
direction: "desc"
|
|
236
231
|
} : P.value = null;
|
|
237
232
|
}
|
|
238
|
-
function
|
|
233
|
+
function wt(e) {
|
|
239
234
|
if (P.value?.key === e.key) return P.value.direction === "asc" ? "ascending" : "descending";
|
|
240
235
|
}
|
|
241
|
-
function
|
|
236
|
+
function Tt(e) {
|
|
242
237
|
return P.value?.key === e.key ? P.value.direction === "asc" ? y.sortAscIcon : y.sortDescIcon : y.sortIcon;
|
|
243
238
|
}
|
|
244
|
-
let W = C(R.value),
|
|
245
|
-
function
|
|
239
|
+
let W = C(R.value), Et = se();
|
|
240
|
+
function Dt() {
|
|
246
241
|
R.value !== W.value && (W.value = R.value, F.value = 1);
|
|
247
242
|
}
|
|
248
243
|
k(R, () => {
|
|
249
|
-
y.serverSide ?
|
|
244
|
+
y.serverSide ? Et.start(Dt, y.searchDebounce) : F.value = 1;
|
|
250
245
|
});
|
|
251
|
-
let G = f(() => y.serverSide ? W.value : R.value),
|
|
246
|
+
let G = f(() => y.serverSide ? W.value : R.value), Ot = f(() => y.emptyText ?? (G.value ? b.value.dataTable.noResults : b.value.dataTable.empty));
|
|
252
247
|
k([
|
|
253
248
|
F,
|
|
254
249
|
() => I.value ?? null,
|
|
@@ -256,7 +251,7 @@ var we = [
|
|
|
256
251
|
() => P.value?.direction ?? null,
|
|
257
252
|
W
|
|
258
253
|
], ([e, t, n, r, i]) => {
|
|
259
|
-
y.serverSide &&
|
|
254
|
+
y.serverSide && rt("update:params", {
|
|
260
255
|
page: e,
|
|
261
256
|
perPage: t,
|
|
262
257
|
sortKey: n,
|
|
@@ -264,13 +259,13 @@ var we = [
|
|
|
264
259
|
search: i
|
|
265
260
|
});
|
|
266
261
|
});
|
|
267
|
-
let K = f(() => new Set(L.value)), q = f(() => U.value.map((e, t) =>
|
|
268
|
-
function
|
|
262
|
+
let K = f(() => new Set(L.value)), q = f(() => U.value.map((e, t) => ht(e, t))), J = f(() => q.value.length > 0 && q.value.every((e) => K.value.has(e))), kt = f(() => !J.value && q.value.some((e) => K.value.has(e))), At = (e) => K.value.has(e);
|
|
263
|
+
function jt(e) {
|
|
269
264
|
L.value = ce(L.value, e);
|
|
270
265
|
}
|
|
271
|
-
let
|
|
272
|
-
function
|
|
273
|
-
if (
|
|
266
|
+
let Mt = f(() => q.value.length === 0 || y.loading);
|
|
267
|
+
function Nt() {
|
|
268
|
+
if (Mt.value) return;
|
|
274
269
|
let e = q.value;
|
|
275
270
|
if (J.value) {
|
|
276
271
|
let t = new Set(e);
|
|
@@ -280,29 +275,26 @@ var we = [
|
|
|
280
275
|
L.value = [...L.value, ...e.filter((e) => !t.has(e))];
|
|
281
276
|
}
|
|
282
277
|
}
|
|
283
|
-
function
|
|
284
|
-
let n =
|
|
278
|
+
function Pt(e, t) {
|
|
279
|
+
let n = Ft.value + t;
|
|
285
280
|
return y.selectRowLabel?.(e, n) ?? b.value.dataTable.selectRow(n + 1);
|
|
286
281
|
}
|
|
287
|
-
let
|
|
288
|
-
function
|
|
282
|
+
let Ft = f(() => B.value ? (H.value - 1) * (I.value ?? 0) : 0), Y = C(null), It = C(null), X = C(null), Z = C(-1);
|
|
283
|
+
function Lt(e) {
|
|
289
284
|
if (!(e instanceof Element)) return -1;
|
|
290
285
|
let t = e.closest("tr");
|
|
291
286
|
return !t || t.parentElement !== X.value || t.dataset.index === void 0 ? -1 : Number(t.dataset.index);
|
|
292
287
|
}
|
|
293
|
-
let
|
|
294
|
-
regular: 46,
|
|
295
|
-
compact: 38
|
|
296
|
-
}, Rt = ge({
|
|
288
|
+
let Rt = ge({
|
|
297
289
|
scrollEl: f(() => y.virtual ? Y.value : null),
|
|
298
290
|
listEl: X,
|
|
299
291
|
count: () => U.value.length,
|
|
300
292
|
key: (e) => q.value[e],
|
|
301
|
-
itemSize: () =>
|
|
293
|
+
itemSize: () => $e,
|
|
302
294
|
overscan: () => 5,
|
|
303
295
|
initialCount: () => 20,
|
|
304
296
|
pinned: () => Z.value >= 0 ? [Z.value] : [],
|
|
305
|
-
insetStart: () => y.stickyHeader ?
|
|
297
|
+
insetStart: () => y.stickyHeader ? It.value?.offsetHeight ?? 0 : 0
|
|
306
298
|
}), zt = Rt.measure, Bt = f(() => y.virtual ? Rt.segments.value : U.value.map((e, t) => ({
|
|
307
299
|
type: "row",
|
|
308
300
|
index: t
|
|
@@ -314,7 +306,7 @@ var we = [
|
|
|
314
306
|
root: () => Y.value,
|
|
315
307
|
canLoad: () => y.hasMore && !y.loading,
|
|
316
308
|
loaded: () => y.rows,
|
|
317
|
-
onLoadMore: () =>
|
|
309
|
+
onLoadMore: () => rt("load-more")
|
|
318
310
|
}), e && k(Bt, (e) => {
|
|
319
311
|
let t = Y.value;
|
|
320
312
|
!y.virtual || !t || U.value.length < 100 || t.scrollHeight > t.clientHeight || e.some((e) => e.type === "spacer") || console.warn("[VDataTable] `virtual` renders every row because the table does not scroll: give it a `height` or a parent with a height.");
|
|
@@ -340,18 +332,17 @@ var we = [
|
|
|
340
332
|
});
|
|
341
333
|
}), Gt = f(() => y.height === void 0 ? void 0 : { blockSize: i(y.height) });
|
|
342
334
|
return (e, t) => (S(), h("div", {
|
|
343
|
-
class: ye(["v-data-table", D(
|
|
344
|
-
style: be([Gt.value, D(
|
|
335
|
+
class: ye(["v-data-table", D(at)]),
|
|
336
|
+
style: be([Gt.value, D(ot)]),
|
|
345
337
|
"data-variant": c.variant,
|
|
346
338
|
"data-striped": c.striped ? "" : void 0,
|
|
347
|
-
"data-compact": c.compact ? "" : void 0,
|
|
348
339
|
"data-sticky-header": c.stickyHeader ? "" : void 0,
|
|
349
340
|
"data-selectable": c.selectable ? "" : void 0,
|
|
350
341
|
"data-virtual": c.virtual ? "" : void 0
|
|
351
342
|
}, [
|
|
352
343
|
c.title || c.subtitle || e.$slots.header || c.searchable ? (S(), h("div", Te, [T(e.$slots, "header", {}, () => [c.title || c.subtitle ? (S(), h("div", Ee, [c.title ? (S(), p(o, {
|
|
353
344
|
key: 0,
|
|
354
|
-
id: D(
|
|
345
|
+
id: D(ut),
|
|
355
346
|
as: "div",
|
|
356
347
|
variant: "heading-4",
|
|
357
348
|
class: "v-data-table-title"
|
|
@@ -360,7 +351,7 @@ var we = [
|
|
|
360
351
|
_: 1
|
|
361
352
|
}, 8, ["id"])) : m("", !0), c.subtitle ? (S(), p(o, {
|
|
362
353
|
key: 1,
|
|
363
|
-
id: D(
|
|
354
|
+
id: D(dt),
|
|
364
355
|
variant: "subtitle",
|
|
365
356
|
tone: "muted",
|
|
366
357
|
class: "v-data-table-subtitle"
|
|
@@ -374,14 +365,12 @@ var we = [
|
|
|
374
365
|
class: "v-data-table-search",
|
|
375
366
|
type: "search",
|
|
376
367
|
size: "sm",
|
|
377
|
-
compact: c.compact,
|
|
378
368
|
"icon-start": D(ve),
|
|
379
369
|
clearable: "",
|
|
380
|
-
placeholder:
|
|
381
|
-
"aria-label":
|
|
370
|
+
placeholder: et.value,
|
|
371
|
+
"aria-label": tt.value
|
|
382
372
|
}, null, 8, [
|
|
383
373
|
"modelValue",
|
|
384
|
-
"compact",
|
|
385
374
|
"icon-start",
|
|
386
375
|
"placeholder",
|
|
387
376
|
"aria-label"
|
|
@@ -393,22 +382,22 @@ var we = [
|
|
|
393
382
|
class: "v-data-table-scroller"
|
|
394
383
|
}, [g("table", x({
|
|
395
384
|
ref_key: "tableEl",
|
|
396
|
-
ref:
|
|
385
|
+
ref: lt,
|
|
397
386
|
class: "v-data-table-table",
|
|
398
|
-
"aria-labelledby":
|
|
399
|
-
"aria-describedby":
|
|
387
|
+
"aria-labelledby": pt.value,
|
|
388
|
+
"aria-describedby": mt.value,
|
|
400
389
|
"aria-rowcount": Vt.value,
|
|
401
390
|
"aria-busy": Ht.value ? "true" : void 0
|
|
402
|
-
}, D(
|
|
391
|
+
}, D(st)), [g("thead", {
|
|
403
392
|
ref_key: "theadEl",
|
|
404
|
-
ref:
|
|
393
|
+
ref: It,
|
|
405
394
|
class: "v-data-table-head"
|
|
406
395
|
}, [g("tr", { "aria-rowindex": c.virtual ? 1 : void 0 }, [c.selectable ? (S(), h("th", je, [v(ue, {
|
|
407
396
|
"model-value": J.value,
|
|
408
|
-
indeterminate:
|
|
409
|
-
disabled:
|
|
410
|
-
"aria-label":
|
|
411
|
-
"onUpdate:modelValue":
|
|
397
|
+
indeterminate: kt.value,
|
|
398
|
+
disabled: Mt.value,
|
|
399
|
+
"aria-label": nt.value,
|
|
400
|
+
"onUpdate:modelValue": Nt
|
|
412
401
|
}, null, 8, [
|
|
413
402
|
"model-value",
|
|
414
403
|
"indeterminate",
|
|
@@ -418,18 +407,18 @@ var we = [
|
|
|
418
407
|
key: t.key,
|
|
419
408
|
scope: "col",
|
|
420
409
|
"data-align": t.align,
|
|
421
|
-
"aria-sort":
|
|
410
|
+
"aria-sort": wt(t)
|
|
422
411
|
}, [t.sortable ? (S(), h("button", {
|
|
423
412
|
key: 0,
|
|
424
413
|
type: "button",
|
|
425
414
|
class: "v-data-table-sort",
|
|
426
415
|
"data-direction": P.value?.key === t.key ? P.value.direction : void 0,
|
|
427
|
-
onClick: (e) =>
|
|
428
|
-
}, [T(e.$slots, `head-${t.key}`, { column: t }, () => [_(E(t.label), 1)]), v(a, x({ class: "v-data-table-sort-icon" }, { ref_for: !0 }, D(r)(
|
|
416
|
+
onClick: (e) => Ct(t.key)
|
|
417
|
+
}, [T(e.$slots, `head-${t.key}`, { column: t }, () => [_(E(t.label), 1)]), v(a, x({ class: "v-data-table-sort-icon" }, { ref_for: !0 }, D(r)(Tt(t))), null, 16)], 8, Ne)) : T(e.$slots, `head-${t.key}`, { column: t }, () => [_(E(t.label), 1)], void 0, 1)], 8, Me))), 128))], 8, Ae)], 512), g("tbody", {
|
|
429
418
|
ref_key: "tbodyEl",
|
|
430
419
|
ref: X,
|
|
431
|
-
onFocusin: t[1] ||= (e) => Z.value =
|
|
432
|
-
onFocusout: t[2] ||= (e) => Z.value =
|
|
420
|
+
onFocusin: t[1] ||= (e) => Z.value = Lt(e.target),
|
|
421
|
+
onFocusout: t[2] ||= (e) => Z.value = Lt(e.relatedTarget)
|
|
433
422
|
}, [c.loading && !Ht.value ? (S(), h("tr", Pe, [g("td", {
|
|
434
423
|
colspan: $.value,
|
|
435
424
|
class: "v-data-table-state"
|
|
@@ -439,7 +428,7 @@ var we = [
|
|
|
439
428
|
}, [T(e.$slots, "empty", { search: G.value }, () => [v(fe, {
|
|
440
429
|
size: "sm",
|
|
441
430
|
icon: G.value ? D(me) : D(pe),
|
|
442
|
-
title:
|
|
431
|
+
title: Ot.value
|
|
443
432
|
}, null, 8, ["icon", "title"])])], 8, ze)])) : (S(), h(d, { key: 2 }, [(S(!0), h(d, null, w(Bt.value, (t) => (S(), h(d, { key: t.type === "row" ? q.value[t.index] : t.key }, [t.type === "spacer" ? (S(), h("tr", Be, [g("td", {
|
|
444
433
|
colspan: $.value,
|
|
445
434
|
style: be({ blockSize: `${t.size}px` })
|
|
@@ -448,13 +437,13 @@ var we = [
|
|
|
448
437
|
ref_for: !0,
|
|
449
438
|
ref: c.virtual ? (e) => D(zt)(e, t.index) : void 0,
|
|
450
439
|
"data-index": c.virtual ? t.index : void 0,
|
|
451
|
-
"aria-rowindex": c.virtual ?
|
|
440
|
+
"aria-rowindex": c.virtual ? Ft.value + t.index + 2 : void 0,
|
|
452
441
|
"data-stripe": c.striped && t.index % 2 == 1 ? "" : void 0,
|
|
453
|
-
"data-selected": c.selectable &&
|
|
442
|
+
"data-selected": c.selectable && At(q.value[t.index]) ? "" : void 0
|
|
454
443
|
}, [c.selectable ? (S(), h("td", Ue, [v(ue, {
|
|
455
|
-
"model-value":
|
|
456
|
-
"aria-label":
|
|
457
|
-
"onUpdate:modelValue": (e) =>
|
|
444
|
+
"model-value": At(q.value[t.index]),
|
|
445
|
+
"aria-label": Pt(U.value[t.index], t.index),
|
|
446
|
+
"onUpdate:modelValue": (e) => jt(q.value[t.index])
|
|
458
447
|
}, null, 8, [
|
|
459
448
|
"model-value",
|
|
460
449
|
"aria-label",
|
|
@@ -475,19 +464,17 @@ var we = [
|
|
|
475
464
|
}, [g("td", { colspan: $.value }, [c.loading ? (S(), h("span", Ke, [v(s), g("span", null, E(M.value), 1)])) : m("", !0)], 8, Ge)], 512)) : m("", !0)], 64))], 544)], 16, ke)], 512), B.value || c.selectable ? (S(), h("div", qe, [c.selectable ? (S(), h("span", Je, E(Ut.value), 1)) : m("", !0), B.value ? (S(), h("div", Ye, [
|
|
476
465
|
c.perPageOptions?.length ? (S(), h("div", Xe, [g("span", Ze, E(N.value), 1), v(re, {
|
|
477
466
|
size: "sm",
|
|
478
|
-
compact: c.compact,
|
|
479
467
|
placement: "top-end",
|
|
480
468
|
"match-trigger": ""
|
|
481
469
|
}, {
|
|
482
470
|
trigger: A(({ triggerProps: e }) => [v(te, x({
|
|
483
471
|
variant: "ghost",
|
|
484
472
|
tone: "neutral",
|
|
485
|
-
size: "sm"
|
|
486
|
-
compact: c.compact
|
|
473
|
+
size: "sm"
|
|
487
474
|
}, e, { "aria-label": D(b).dataTable.perPageValue(N.value, I.value ?? 0) }), {
|
|
488
475
|
default: A(() => [_(E(I.value) + " ", 1), v(a, { name: D(_e) }, null, 8, ["name"])]),
|
|
489
476
|
_: 1
|
|
490
|
-
}, 16, ["
|
|
477
|
+
}, 16, ["aria-label"])]),
|
|
491
478
|
default: A(() => [(S(!0), h(d, null, w(c.perPageOptions, (e) => (S(), p(de, {
|
|
492
479
|
key: e,
|
|
493
480
|
label: String(e),
|
|
@@ -499,16 +486,15 @@ var we = [
|
|
|
499
486
|
"onSelect"
|
|
500
487
|
]))), 128))]),
|
|
501
488
|
_: 1
|
|
502
|
-
}
|
|
489
|
+
})])) : m("", !0),
|
|
503
490
|
c.showRange ? (S(), h("span", Qe, E(Wt.value), 1)) : m("", !0),
|
|
504
491
|
v(ie, {
|
|
505
492
|
modelValue: F.value,
|
|
506
493
|
"onUpdate:modelValue": t[3] ||= (e) => F.value = e,
|
|
507
494
|
label: D(b).dataTable.pagination,
|
|
508
|
-
length:
|
|
495
|
+
length: St.value,
|
|
509
496
|
size: "sm",
|
|
510
497
|
"item-variant": "ghost",
|
|
511
|
-
compact: c.compact,
|
|
512
498
|
align: "end",
|
|
513
499
|
"total-visible": 0,
|
|
514
500
|
"edge-controls": "",
|
|
@@ -516,8 +502,7 @@ var we = [
|
|
|
516
502
|
}, null, 8, [
|
|
517
503
|
"modelValue",
|
|
518
504
|
"label",
|
|
519
|
-
"length"
|
|
520
|
-
"compact"
|
|
505
|
+
"length"
|
|
521
506
|
])
|
|
522
507
|
])) : m("", !0)])) : m("", !0)])
|
|
523
508
|
], 14, we));
|