bitboss-ui 3.0.0-beta.73 → 3.0.0-beta.74
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 +4 -2
- package/bin/bitboss-ui-mcp.mjs +101 -3
- package/bin/bitboss-ui.mjs +6 -1
- package/bin/cli.mjs +31 -5
- package/dist/ai/BbBadge.md +4 -4
- package/dist/ai/BbCalendar.md +4 -3
- package/dist/ai/BbColorPalette.md +8 -9
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +4 -3
- package/dist/ai/BbDialog.md +14 -4
- package/dist/ai/BbDropdown.md +23 -10
- package/dist/ai/BbDropdownButton.md +2 -2
- package/dist/ai/BbForm.md +4 -1
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbNumberInput.md +5 -3
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbTable.md +43 -19
- package/dist/ai/BbTimePicker.md +4 -3
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/changelog.json +56 -4
- package/dist/ai/components.json +54 -18
- package/dist/ai/guides/design-tokens.md +20 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/inertia-helpers.md +613 -53
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/v2-to-v3.md +24 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +3 -0
- package/dist/ai/guides/preset-components.md +15 -2
- package/dist/ai/guides/reporting.md +49 -0
- package/dist/ai/helpers/inertia/manifest.json +33 -38
- package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
- package/dist/ai/helpers/inertia/useQuery.ts +24 -6
- package/dist/ai/helpers/inertia/utils.ts +552 -3
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
- package/dist/ai/manifest/components/BbCalendar.json +2 -2
- package/dist/ai/manifest/components/BbColorPalette.json +3 -3
- package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +3 -3
- package/dist/ai/manifest/components/BbDialog.tree.json +5 -1
- package/dist/ai/manifest/components/BbDropdown.json +3 -3
- package/dist/ai/manifest/components/BbDropdown.tree.json +3 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +1 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +1 -1
- package/dist/ai/manifest/components/BbTable.tree.json +12 -6
- package/dist/ai/manifest/components/BbTimePicker.json +3 -3
- package/dist/ai/manifest/components/BbToastPortal.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +36 -0
- package/dist/ai/manifest/types.advanced.json +81 -80
- package/dist/ai/manifest/types.api.json +66 -65
- package/dist/ai/manifest/types.wrapper.json +155 -118
- package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
- package/dist/ai/source/BbAlert.md +16 -4
- package/dist/ai/source/BbAvatar.md +2 -0
- package/dist/ai/source/BbBreadcrumbs.md +4 -1
- package/dist/ai/source/BbCalendar.md +22 -12
- package/dist/ai/source/BbColorPalette.md +41 -12
- package/dist/ai/source/BbConfirm.md +7 -0
- package/dist/ai/source/BbConfirmPortal.md +9 -4
- package/dist/ai/source/BbDatePicker.md +53 -22
- package/dist/ai/source/BbDatePickerInput.md +32 -8
- package/dist/ai/source/BbDialog.md +31 -1
- package/dist/ai/source/BbDropdown.md +52 -24
- package/dist/ai/source/BbDropdownGroup.md +17 -21
- package/dist/ai/source/BbForm.md +73 -6
- package/dist/ai/source/BbHoverCard.md +7 -0
- package/dist/ai/source/BbHoverCardPortal.md +9 -5
- package/dist/ai/source/BbNumberInput.md +5 -6
- package/dist/ai/source/BbOffCanvas.md +34 -1
- package/dist/ai/source/BbPopover.md +7 -0
- package/dist/ai/source/BbPopoverPortal.md +9 -5
- package/dist/ai/source/BbRadio.md +4 -3
- package/dist/ai/source/BbRadioGroup.md +7 -5
- package/dist/ai/source/BbTable.md +54 -6
- package/dist/ai/source/BbTag.md +10 -3
- package/dist/ai/source/BbTimePicker.md +50 -15
- package/dist/ai/source/BbTimePickerInput.md +30 -7
- package/dist/ai/source/BbToast.md +14 -0
- package/dist/ai/source/BbToastPortal.md +16 -4
- package/dist/ai/source/CommonFieldInput.md +11 -5
- package/dist/ai/source/CommonPopover.md +4 -1
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +235 -234
- package/dist/components/BbCalendar/types.d.ts +2 -2
- package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +197 -192
- package/dist/components/BbColorPalette/types.d.ts +1 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
- package/dist/components/BbConfirm/types.d.ts +5 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +145 -139
- package/dist/components/BbDatePicker/types.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +337 -335
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +253 -245
- package/dist/components/BbDialog/leaveGhost.js +33 -0
- package/dist/components/BbDialog/overlayActions.js +34 -20
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +11 -3
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +119 -120
- package/dist/components/BbDropdown/types.d.ts +8 -17
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
- package/dist/components/BbForm/types.d.ts +31 -0
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
- package/dist/components/BbHoverCard/types.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbNumberInput/numberDisplay.js +102 -106
- package/dist/components/BbNumberInput/types.d.ts +4 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +385 -377
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
- package/dist/components/BbPopover/types.d.ts +5 -0
- package/dist/components/BbRadio/types.d.ts +4 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +10 -12
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +231 -231
- package/dist/components/BbTable/BbTableDataRow.js +96 -96
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +106 -100
- package/dist/components/BbTimePicker/types.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +214 -213
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
- package/dist/components/BbToast/types.d.ts +5 -0
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
- package/dist/composables/formSubmitLock.js +2 -1
- package/dist/composables/overlayRegistry.js +52 -42
- package/dist/composables/useActiveInactiveState.js +8 -4
- package/dist/composables/useBbDialog.js +5 -5
- package/dist/composables/useOwnModel.js +16 -0
- package/dist/composables/useSegmentedFields.js +31 -20
- package/dist/i18n/currencyDigits.js +58 -0
- package/dist/i18n/regionDates.js +250 -0
- package/dist/i18n/regionHints.js +30 -41
- package/dist/index.d.ts +34 -30
- package/dist/llms-full.txt +860 -129
- package/dist/llms.txt +3 -1
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +3 -1
- package/dist/types/CommonProps.d.ts +8 -0
- package/dist/utilities/functions/hash.js +97 -64
- package/dist/utilities/functions/isEqual.js +33 -25
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +2 -1
- package/dist/vite.js +8 -4
- package/llms.txt +3 -1
- package/package.json +1 -2
- package/scripts/README.md +1 -1
- package/scripts/lib/adoption-checklist.json +6 -5
- package/scripts/lib/agent-manifest.mjs +33 -6
- package/scripts/lib/agent-setup.mjs +54 -6
- package/scripts/lib/cldr-pins.ts +182 -0
- package/scripts/lib/engines-include.d.mts +5 -0
- package/scripts/lib/engines-include.mjs +40 -0
- package/scripts/lib/eslint-plugin.mjs +8 -2
- package/scripts/lib/hidden-label-placeholder.mjs +25 -5
- package/scripts/lib/idiom-scan.mjs +30 -3
- package/scripts/lib/legacy-agent-files.json +152 -0
- package/scripts/lib/mcp-config.mjs +74 -7
- package/scripts/lib/portal-names.mjs +78 -8
- package/scripts/lib/release-results.mjs +5 -2
- package/scripts/lib/report.mjs +340 -0
- package/scripts/lib/run-beat.mjs +14 -0
- package/scripts/lib/run-records.mjs +313 -0
- package/scripts/lib/selector-log.mjs +98 -0
- package/scripts/lib/ticket-beat.mjs +30 -0
- package/scripts/lib/validate-bb-markup.mjs +17 -2
|
@@ -276,46 +276,46 @@ var Ht = {
|
|
|
276
276
|
"update:highlighted"
|
|
277
277
|
]),
|
|
278
278
|
setup(v, { emit: pt }) {
|
|
279
|
-
let D = kt(v, "selectAll"),
|
|
279
|
+
let D = kt(v, "selectAll"), tr = kt(v, "sort"), nr = kt(v, "order"), rr = kt(v, "highlighted"), O = v, k = pt, A = At(), ir = kt(O, "expandedItems"), ar = r("BbTable", O, { compact: !1 }), j = we({
|
|
280
280
|
component: "BbTable",
|
|
281
281
|
attrs: Ot(),
|
|
282
|
-
props:
|
|
282
|
+
props: O,
|
|
283
283
|
parts: Ce.parts,
|
|
284
284
|
states: Ce.states,
|
|
285
285
|
active: {
|
|
286
286
|
loading: () => Zo.value,
|
|
287
287
|
empty: () => !J.value.length
|
|
288
288
|
}
|
|
289
|
-
}),
|
|
289
|
+
}), or = (e) => ({
|
|
290
290
|
sorted: !!e,
|
|
291
291
|
sortedDesc: e === "desc"
|
|
292
292
|
});
|
|
293
293
|
process.env.NODE_ENV !== "production" && ae("BbTable", ie("BbTable"), {
|
|
294
|
-
slotKeys: () => (
|
|
294
|
+
slotKeys: () => (O.columns ?? []).map((e) => e.key),
|
|
295
295
|
fixedSlots: ["header:prepend", "header:append"]
|
|
296
296
|
});
|
|
297
|
-
let
|
|
297
|
+
let M = C(!!A.actions), sr = C(!!A.expand), cr = C(!!A.tbody), lr = C(!!A.thead), ur = () => Object.keys(A).filter((e) => /:(first|last)$/.test(e)).sort().join(" "), dr = C(ur());
|
|
298
298
|
_t(() => {
|
|
299
|
-
let e =
|
|
300
|
-
e !==
|
|
301
|
-
let t = !!
|
|
302
|
-
t !==
|
|
299
|
+
let e = ur();
|
|
300
|
+
e !== dr.value && (dr.value = e);
|
|
301
|
+
let t = !!A.actions;
|
|
302
|
+
t !== M.value && (M.value = t), !!A.expand !== sr.value && (sr.value = !!A.expand), !!A.tbody !== cr.value && (cr.value = !!A.tbody), !!A.thead !== lr.value && (lr.value = !!A.thead);
|
|
303
303
|
});
|
|
304
|
-
let
|
|
305
|
-
|
|
304
|
+
let N = m(() => !!O.keyboardNavigation && !cr.value), fr = m(() => N.value && sr.value), pr = m(() => fr.value ? "treegrid" : N.value ? "grid" : "table"), mr = m(() => N.value ? "gridcell" : "cell"), hr = m(() => new Set(O.columns.filter((e) => e.rowHeader).map((e) => String(e.key)))), P = m(() => N.value && !lr.value), { getItemValue: gr } = l(), _r = c().id.value, vr = (e) => `expanded_${_r}_${e}`;
|
|
305
|
+
O.multiple && !Array.isArray(O.modelValue) && qe().throw("BbTable is set for multiple selection but modelValue is not an array.");
|
|
306
306
|
let yr = ["actions", "select"];
|
|
307
307
|
if (process.env.NODE_ENV !== "production") {
|
|
308
|
-
let e =
|
|
308
|
+
let e = O.columns.filter((e) => yr.includes(e.key));
|
|
309
309
|
for (let t of e) qe().warn(`BbTable: \`{ key: '${String(t.key)}' }\` is a reserved column and must not appear in \`columns\`. ` + (t.key === "actions" ? "Fill the `#actions` slot instead — the slot creates the column." : "Selection is controlled by the `selectable` prop."));
|
|
310
310
|
}
|
|
311
311
|
let { t: F } = re(), I = C(), L = C(), { id: br, parentId: xr, parentNode: Sr, node: Cr, cssVars: wr, parentVar: Tr, setTracks: Er } = ne({
|
|
312
|
-
id: () =>
|
|
312
|
+
id: () => O.id,
|
|
313
313
|
container: () => L.value,
|
|
314
|
-
inheritFrom: () => typeof
|
|
315
|
-
}), Dr = m(() => `${br.value}__caption`), Or = m(() => `${br.value}__header_instructions`), kr = m(() => `${br.value}__sort_instructions`), Ar = m(() => !
|
|
314
|
+
inheritFrom: () => typeof O.inheritColumnWidths == "string" ? O.inheritColumnWidths : void 0
|
|
315
|
+
}), Dr = m(() => `${br.value}__caption`), Or = m(() => `${br.value}__header_instructions`), kr = m(() => `${br.value}__sort_instructions`), Ar = m(() => !O.multiSort && O.columns.some((e) => e.sortable)), jr = (e) => {
|
|
316
316
|
let t = [];
|
|
317
|
-
return Mr.value && t.push(Or.value), Ar.value && e.sortable && (Mr.value ||
|
|
318
|
-
}, Mr = m(() => !!(
|
|
317
|
+
return Mr.value && t.push(Or.value), Ar.value && e.sortable && (Mr.value || P.value) && t.push(kr.value), t.join(" ") || void 0;
|
|
318
|
+
}, Mr = m(() => !!(O.reorderable || O.resizable)), R = C(null), Nr = C(null), z = m(() => !!O.reorderableRows && !cr.value), Pr = m(() => `${br.value}__row-reorder-instructions`), Fr = Se({
|
|
319
319
|
bodyRef: R,
|
|
320
320
|
containerRef: L,
|
|
321
321
|
enabled: () => z.value && !Qo.value,
|
|
@@ -323,12 +323,12 @@ var Ht = {
|
|
|
323
323
|
indexOf: (e) => Y.value.findIndex((t) => t.valueHash === e),
|
|
324
324
|
itemAt: (e) => {
|
|
325
325
|
let t = Et(Y.value[e]?.item);
|
|
326
|
-
return !Array.isArray(
|
|
326
|
+
return !Array.isArray(O.items) || ft(O.items) ? t : O.items.find((e) => Et(e) === t) ?? t;
|
|
327
327
|
},
|
|
328
328
|
valueHashAt: (e) => Y.value[e]?.valueHash,
|
|
329
329
|
spanOf: (e) => q.value ? ml(e) : null,
|
|
330
|
-
labelAt: (e) => Y.value[e] ? He(Sc(e).cols,
|
|
331
|
-
emit: (e) =>
|
|
330
|
+
labelAt: (e) => Y.value[e] ? He(Sc(e).cols, hr.value) : "",
|
|
331
|
+
emit: (e) => k("reorder:rows", e),
|
|
332
332
|
text: {
|
|
333
333
|
lifted: (e, t, n) => F("table.rowLifted", e, t, n).value,
|
|
334
334
|
position: (e, t) => F("table.rowPosition", e, t).value,
|
|
@@ -383,12 +383,12 @@ var Ht = {
|
|
|
383
383
|
return i.defaultPrevented;
|
|
384
384
|
}, Yr = (e, t, n) => {
|
|
385
385
|
let r = Br;
|
|
386
|
-
if (!
|
|
386
|
+
if (!O.rowMenu || e.defaultPrevented) return;
|
|
387
387
|
if (e.isTrusted && zr.has(t) && performance.now() - Vr < 1e3) {
|
|
388
388
|
e.preventDefault(), e.stopPropagation();
|
|
389
389
|
return;
|
|
390
390
|
}
|
|
391
|
-
let i =
|
|
391
|
+
let i = O.rowMenu(n);
|
|
392
392
|
if (!be(i)) return;
|
|
393
393
|
e.preventDefault(), e.stopPropagation(), r && (Vr = performance.now());
|
|
394
394
|
let a = e.currentTarget, o = document.activeElement, s = o instanceof HTMLElement && a.contains(o) ? o : null;
|
|
@@ -400,11 +400,11 @@ var Ht = {
|
|
|
400
400
|
}, Xr = () => {
|
|
401
401
|
!Ur && !Lr.value?.isOpen() && zr.clear();
|
|
402
402
|
}, Zr = (e) => {
|
|
403
|
-
if (!
|
|
403
|
+
if (!O.rowMenu || e.key !== "ContextMenu" && !(e.key === "F10" && e.shiftKey) || !qr(e)) return;
|
|
404
404
|
let t = e.target, n = t.getBoundingClientRect();
|
|
405
405
|
Jr(t, n.left, n.bottom, "keyboard") && e.preventDefault();
|
|
406
406
|
}, Qr = (e) => {
|
|
407
|
-
if (Hr = !1, Gr(), !
|
|
407
|
+
if (Hr = !1, Gr(), !O.rowMenu || e.pointerType !== "touch" || !qr(e)) return;
|
|
408
408
|
let t = e.target, { clientX: n, clientY: r } = e;
|
|
409
409
|
Wr = {
|
|
410
410
|
x: n,
|
|
@@ -462,17 +462,17 @@ var Ht = {
|
|
|
462
462
|
onKeydown: Fr.onKeydown
|
|
463
463
|
} : null), ti = C(/* @__PURE__ */ new Set()), ni = m(() => {
|
|
464
464
|
let e = new Set(ti.value);
|
|
465
|
-
for (let t of
|
|
465
|
+
for (let t of O.columns) t.hidden && e.add(String(t.key));
|
|
466
466
|
return e;
|
|
467
467
|
}), ri = m(() => {
|
|
468
468
|
let e = ni.value;
|
|
469
|
-
return e.size ?
|
|
469
|
+
return e.size ? O.columns.filter((t) => !e.has(String(t.key))) : O.columns;
|
|
470
470
|
}), ii = (e) => {
|
|
471
471
|
if (ni.value.has(e)) return;
|
|
472
|
-
let t = yi(e), n = li.value.indexOf(e), r = !!t && t.contains(document.activeElement) && (Mr.value ||
|
|
473
|
-
ti.value = /* @__PURE__ */ new Set([...ti.value, e]),
|
|
472
|
+
let t = yi(e), n = li.value.indexOf(e), r = !!t && t.contains(document.activeElement) && (Mr.value || P.value);
|
|
473
|
+
ti.value = /* @__PURE__ */ new Set([...ti.value, e]), k("hide:column", e), r && b(() => bi(n));
|
|
474
474
|
};
|
|
475
|
-
E(() =>
|
|
475
|
+
E(() => O.columns.map((e) => [String(e.key), !!e.hidden]), (e, t) => {
|
|
476
476
|
if (!t || !ti.value.size) return;
|
|
477
477
|
let n = new Map(t), r = ti.value, i = e.filter(([e, t]) => n.has(e) && n.get(e) !== t && r.has(e) && !t);
|
|
478
478
|
if (!i.length) return;
|
|
@@ -480,13 +480,13 @@ var Ht = {
|
|
|
480
480
|
for (let [e] of i) a.delete(e);
|
|
481
481
|
ti.value = a;
|
|
482
482
|
});
|
|
483
|
-
let ai = m(() =>
|
|
484
|
-
let e = ri.value, t = ci.value ??
|
|
483
|
+
let ai = m(() => O.columns.map((e) => String(e.key))), oi = m(() => new Set(O.columns.filter((e) => e.reorderable === !1).map((e) => String(e.key)))), si = (e) => oi.value.size ? Ne(Oe(e, ai.value), ai.value, oi.value) : Oe(e, ai.value), ci = C(null), B = m(() => {
|
|
484
|
+
let e = ri.value, t = ci.value ?? nr.value;
|
|
485
485
|
if (!t.length) return e;
|
|
486
486
|
let n = oi.value.size ? si(t) : t, r = Re(e, n);
|
|
487
487
|
return r.every((t, n) => t === e[n]) ? e : r;
|
|
488
488
|
}), li = m(() => B.value.map((e) => String(e.key))), ui = (e, t) => {
|
|
489
|
-
let n = si(
|
|
489
|
+
let n = si(nr.value), r = di(e, t);
|
|
490
490
|
if (r === null) return null;
|
|
491
491
|
let i = Le(n, ai.value, e, r, ni.value);
|
|
492
492
|
return Ue(i, n) ? null : i;
|
|
@@ -494,7 +494,7 @@ var Ht = {
|
|
|
494
494
|
let n = li.value, r = Ve(n, n.indexOf(e), oi.value);
|
|
495
495
|
return r ? Math.max(r.min, Math.min(r.max, t)) : null;
|
|
496
496
|
}, fi = C("");
|
|
497
|
-
E(() =>
|
|
497
|
+
E(() => O.reorderable, () => {
|
|
498
498
|
fi.value = "";
|
|
499
499
|
});
|
|
500
500
|
let pi = (e, t) => {
|
|
@@ -524,7 +524,7 @@ var Ht = {
|
|
|
524
524
|
n && (mi.value = n, yi(n)?.focus());
|
|
525
525
|
}, xi = async (e, t) => {
|
|
526
526
|
Da = (e.key === "Enter" || e.key === " ") && e.shiftKey;
|
|
527
|
-
let n =
|
|
527
|
+
let n = P.value;
|
|
528
528
|
if (!Mr.value && !n) return;
|
|
529
529
|
let r = e.currentTarget, i = e.target;
|
|
530
530
|
if (!(i instanceof Element) || i !== r && !i.closest(".bb-table-sort")) return;
|
|
@@ -560,14 +560,14 @@ var Ht = {
|
|
|
560
560
|
return;
|
|
561
561
|
default: return;
|
|
562
562
|
}
|
|
563
|
-
if (n && (!e.shiftKey || !
|
|
563
|
+
if (n && (!e.shiftKey || !O.reorderable)) return;
|
|
564
564
|
if (e.preventDefault(), !e.shiftKey) {
|
|
565
565
|
bi(c);
|
|
566
566
|
return;
|
|
567
567
|
}
|
|
568
|
-
if (!
|
|
568
|
+
if (!O.reorderable) return;
|
|
569
569
|
let l = ui(t, c);
|
|
570
|
-
l && (fi.value = "",
|
|
570
|
+
l && (fi.value = "", nr.value = l, mi.value = t, await b(), Si(t, n), Ci = li.value.indexOf(t) === l.indexOf(t) ? null : {
|
|
571
571
|
key: t,
|
|
572
572
|
index: l.indexOf(t),
|
|
573
573
|
inGrid: n,
|
|
@@ -592,12 +592,12 @@ var Ht = {
|
|
|
592
592
|
Ci = null;
|
|
593
593
|
let n = document.activeElement, r = I.value;
|
|
594
594
|
(!n || n === document.body || r?.contains(n)) && n !== yi(t.key) && Si(t.key, t.inGrid);
|
|
595
|
-
}, { flush: "post" }), process.env.NODE_ENV !== "production" && (E(
|
|
595
|
+
}, { flush: "post" }), process.env.NODE_ENV !== "production" && (E(nr, (e) => {
|
|
596
596
|
new Set(e).size !== e.length && qe().warn("BbTable: `order` lists a key more than once — the first occurrence wins.");
|
|
597
|
-
}, { immediate: !0 }), E(() =>
|
|
597
|
+
}, { immediate: !0 }), E(() => O.columns.some((e) => e.snap != null) && (!!O.reorderable || B.value !== O.columns), (e) => {
|
|
598
598
|
e && qe().warn("BbTable: `snap` names a PARENT column and the child renders in its own order — it does not compose with `order` / `reorderable` / a `hidden` column on the snapped table itself. Order and hide on the parent (a key-snapped child follows it), or drop the snaps.");
|
|
599
599
|
}, { immediate: !0 }));
|
|
600
|
-
let wi = m(() => !!
|
|
600
|
+
let wi = m(() => !!O.resizable && !K.value), Ti = m(() => new Set(O.columns.filter((e) => e.resizable === !1).map((e) => String(e.key)))), Ei = (e) => wi.value && !Ti.value.has(e), V = C({}), Di = C(null), Oi = C(null), ki = (e) => {
|
|
601
601
|
let t = String(e.key);
|
|
602
602
|
return Di.value?.[t] ?? V.value[t] ?? e.width ?? (q.value ? za.value[t] : void 0);
|
|
603
603
|
}, Ai = (e) => {
|
|
@@ -618,14 +618,14 @@ var Ht = {
|
|
|
618
618
|
}
|
|
619
619
|
if (n.length) {
|
|
620
620
|
V.value = t;
|
|
621
|
-
for (let [e, t] of n)
|
|
621
|
+
for (let [e, t] of n) k("resize:column", e, t);
|
|
622
622
|
}
|
|
623
623
|
}, Ii = (e) => {
|
|
624
624
|
if (!(e in V.value)) return;
|
|
625
625
|
let { [e]: t, ...n } = V.value;
|
|
626
|
-
V.value = n,
|
|
626
|
+
V.value = n, k("resize:column", e, null);
|
|
627
627
|
};
|
|
628
|
-
E(() =>
|
|
628
|
+
E(() => O.columns.map((e) => [String(e.key), e.width]), (e, t) => {
|
|
629
629
|
if (!t || !Object.keys(V.value).length) return;
|
|
630
630
|
let n = new Map(t), r = V.value, i = e.filter(([e, t]) => n.has(e) && n.get(e) !== t && e in r && t !== r[e]);
|
|
631
631
|
if (!i.length) return;
|
|
@@ -766,7 +766,7 @@ var Ht = {
|
|
|
766
766
|
try {
|
|
767
767
|
W.row.setPointerCapture(W.pointerId);
|
|
768
768
|
} catch {}
|
|
769
|
-
W.row.addEventListener("lostpointercapture", da), W.base = si(
|
|
769
|
+
W.row.addEventListener("lostpointercapture", da), W.base = si(nr.value), W.rtl = Je(W.row), W.scrollport = Yi(), W.lastMoveX = W.x0, W.target = null, ci.value = W.base, Wi.value = W.key, Gi.value = W.label, U.value = "dragging", Qe(qi), Qi(), ea(W.lastX, W.lastY), ta(W.lastX), ra();
|
|
770
770
|
}
|
|
771
771
|
}, ca = (e) => {
|
|
772
772
|
if (W && e.pointerId === W.pointerId) {
|
|
@@ -783,7 +783,7 @@ var Ht = {
|
|
|
783
783
|
}, la = (e) => {
|
|
784
784
|
if (!W || e.pointerId !== W.pointerId) return;
|
|
785
785
|
let { key: t } = W, n = W.base ? W.base.filter((e) => ai.value.includes(e) && !ni.value.has(e)).indexOf(t) : -1, r = U.value === "dragging" && ci.value !== null && !Ue(ci.value, W.base) ? ci.value : null;
|
|
786
|
-
aa(), r && (fi.value = "",
|
|
786
|
+
aa(), r && (fi.value = "", nr.value = r, b(() => pi(t, n)));
|
|
787
787
|
}, ua = (e) => {
|
|
788
788
|
W && (e instanceof PointerEvent && e.pointerId !== W.pointerId || aa());
|
|
789
789
|
}, da = () => {
|
|
@@ -793,7 +793,7 @@ var Ht = {
|
|
|
793
793
|
}, pa = (e) => {
|
|
794
794
|
W && U.value !== "idle" && e.preventDefault();
|
|
795
795
|
}, ma = (e) => {
|
|
796
|
-
if (!
|
|
796
|
+
if (!O.reorderable || Qo.value || A.thead || !e.isPrimary || e.button !== 0 || W || B.value.length < 2) return;
|
|
797
797
|
let t = e.target;
|
|
798
798
|
if (!(t instanceof Element)) return;
|
|
799
799
|
let n = e.currentTarget, r = t.closest(".bb-table__cell-column-header");
|
|
@@ -824,12 +824,12 @@ var Ht = {
|
|
|
824
824
|
W && (U.value === "dragging" || U.value === "cancelled") && e.cancelable && e.preventDefault();
|
|
825
825
|
};
|
|
826
826
|
x(aa);
|
|
827
|
-
let ga = m(() => o(
|
|
827
|
+
let ga = m(() => o(rr.value) ? [] : [rr.value]), { data: _a } = p({ items: ga }), { data: va } = p({ items: ir });
|
|
828
828
|
E(() => Object.keys(va.value).sort().join("\0"), () => Fr.cancel());
|
|
829
829
|
let ya = ut(), ba = () => {
|
|
830
830
|
let e = ya?.vnode.props ?? {};
|
|
831
831
|
return "highlighted" in e || "onUpdate:highlighted" in e || G.highlighted !== void 0;
|
|
832
|
-
}, xa = (e) =>
|
|
832
|
+
}, xa = (e) => O.highlightable === !1 || typeof O.highlightable == "function" && !O.highlightable(e), Sa = !1, Ca = () => {
|
|
833
833
|
process.env.NODE_ENV !== "production" && (Sa || (Sa = !0, qe().warn("BbTable: `toggleHighlighted` was called from a slot, but highlight is not bound, so nothing happened. Bind `v-model:highlighted`, or provide `highlighted` through `useBbTable(id, { highlighted })`, or drop the call — with nothing bound the table has nowhere to put the value.")));
|
|
834
834
|
}, wa = (e, { viaSlot: t = !1 } = {}) => {
|
|
835
835
|
if (!ba()) {
|
|
@@ -838,21 +838,21 @@ var Ht = {
|
|
|
838
838
|
}
|
|
839
839
|
if (xa(e.item)) return;
|
|
840
840
|
let n = e.valueHash in _a.value;
|
|
841
|
-
|
|
842
|
-
}, Ta = (e) => !(e.currentTarget instanceof Element) || xe(e, e.currentTarget), Ea = (e) => !Ta(e) && !window.getSelection()?.toString(), Da = !1, Oa = (e) =>
|
|
841
|
+
rr.value = n ? null : e.value;
|
|
842
|
+
}, Ta = (e) => !(e.currentTarget instanceof Element) || xe(e, e.currentTarget), Ea = (e) => !Ta(e) && !window.getSelection()?.toString(), Da = !1, Oa = (e) => tr.value.find(([t]) => t === e)?.[1] ?? null, ka = (e, t) => {
|
|
843
843
|
let n = Oa(e), r = !!t?.shiftKey || t instanceof MouseEvent && t.detail === 0 && Da;
|
|
844
|
-
if (Da = !1, !
|
|
844
|
+
if (Da = !1, !O.multiSort && !r) {
|
|
845
845
|
let t = n === null ? "asc" : n === "asc" ? "desc" : null;
|
|
846
|
-
|
|
847
|
-
} else n === null ?
|
|
846
|
+
tr.value = t ? [[e, t]] : [];
|
|
847
|
+
} else n === null ? tr.value = [...tr.value, [e, "asc"]] : n === "asc" ? tr.value = tr.value.map((t) => t[0] === e ? [e, "desc"] : t) : tr.value = tr.value.filter(([t]) => t !== e);
|
|
848
848
|
}, { state: G, isReady: Aa } = Ke(() => br.value, {
|
|
849
849
|
selected: {
|
|
850
|
-
get: () =>
|
|
851
|
-
set: (e) =>
|
|
850
|
+
get: () => O.modelValue,
|
|
851
|
+
set: (e) => k("update:modelValue", e)
|
|
852
852
|
},
|
|
853
853
|
unselected: {
|
|
854
|
-
get: () =>
|
|
855
|
-
set: (e) =>
|
|
854
|
+
get: () => O.unselectedItems,
|
|
855
|
+
set: (e) => k("update:unselectedItems", e)
|
|
856
856
|
},
|
|
857
857
|
all: {
|
|
858
858
|
get: () => D.value,
|
|
@@ -861,34 +861,34 @@ var Ht = {
|
|
|
861
861
|
}
|
|
862
862
|
},
|
|
863
863
|
sort: {
|
|
864
|
-
get: () =>
|
|
864
|
+
get: () => tr.value,
|
|
865
865
|
set: (e) => {
|
|
866
|
-
|
|
866
|
+
tr.value = e;
|
|
867
867
|
}
|
|
868
868
|
},
|
|
869
869
|
order: {
|
|
870
|
-
get: () =>
|
|
870
|
+
get: () => nr.value,
|
|
871
871
|
set: (e) => {
|
|
872
|
-
|
|
872
|
+
nr.value = e;
|
|
873
873
|
}
|
|
874
874
|
},
|
|
875
875
|
highlighted: {
|
|
876
|
-
get: () =>
|
|
876
|
+
get: () => rr.value,
|
|
877
877
|
set: (e) => {
|
|
878
|
-
|
|
878
|
+
rr.value = e;
|
|
879
879
|
}
|
|
880
880
|
},
|
|
881
|
-
page: { get: () =>
|
|
881
|
+
page: { get: () => O.page === void 0 ? O.virtual ? 1 : void 0 : se(O.page, 1) },
|
|
882
882
|
perPage: {
|
|
883
|
-
get: () => oe(
|
|
884
|
-
infer: () => Array.isArray(
|
|
883
|
+
get: () => oe(O.perPage),
|
|
884
|
+
infer: () => Array.isArray(O.items) ? O.items.length : void 0
|
|
885
885
|
},
|
|
886
886
|
totalItems: {
|
|
887
|
-
get: () => oe(
|
|
888
|
-
infer: () => Array.isArray(
|
|
887
|
+
get: () => oe(O.totalItems),
|
|
888
|
+
infer: () => Array.isArray(O.items) ? O.items.length : void 0
|
|
889
889
|
},
|
|
890
|
-
totalPages: { get: () =>
|
|
891
|
-
}), ja = m(() =>
|
|
890
|
+
totalPages: { get: () => O.totalPages === void 0 ? void 0 : se(O.totalPages, 1) }
|
|
891
|
+
}), ja = m(() => O.columns.some((e) => e.snap != null)), Ma = m(() => !!O.inheritColumnWidths || ja.value), Na = m(() => O.fixed || ja.value || ri.value.some((e) => e.width != null) || Pi.value || Ma.value && !!xr.value), K = m(() => Ma.value && !!xr.value), Pa = C(""), Fa = C(0);
|
|
892
892
|
jt(() => {
|
|
893
893
|
Cr.depth = K.value ? (Sr.value?.depth ?? 0) + 1 : 0;
|
|
894
894
|
});
|
|
@@ -902,12 +902,12 @@ var Ht = {
|
|
|
902
902
|
}, Ra = m(() => {
|
|
903
903
|
if (!K.value) return null;
|
|
904
904
|
let e = Pa.value || "select";
|
|
905
|
-
return e === "drag-handle" && z.value ? "drag-handle" : e !== "content" &&
|
|
905
|
+
return e === "drag-handle" && z.value ? "drag-handle" : e !== "content" && O.selectable ? "select" : "content";
|
|
906
906
|
});
|
|
907
907
|
jt(() => {
|
|
908
|
-
Cr.ordered = !!
|
|
908
|
+
Cr.ordered = !!O.reorderable || nr.value.length > 0;
|
|
909
909
|
});
|
|
910
|
-
let q = m(() => !!
|
|
910
|
+
let q = m(() => !!O.virtual && !K.value && !A.tbody), za = C({}), Ba = C({}), Va = C(""), Ha = m(() => q.value && !!Va.value && wo.value.every((e) => !e.contentSized)), Ua = (e) => q.value && e.width == null && !Ai(e) && String(e.key) in za.value, Wa = K, Ga = (e) => {
|
|
911
911
|
if (typeof e == "number") return `${e}px`;
|
|
912
912
|
let t = e.trim();
|
|
913
913
|
return /^-?\d*\.?\d+$/.test(t) ? `${t}px` : t;
|
|
@@ -1057,32 +1057,32 @@ var Ht = {
|
|
|
1057
1057
|
}), uo = m(() => {
|
|
1058
1058
|
let e = no.value, t = e[e.length - 1];
|
|
1059
1059
|
return !Ma.value || !xr.value || !t || oo.value ? null : Qa(t.end, Ja.value);
|
|
1060
|
-
}), fo = (e) => Cr.tracks[e] ?? null, po = (e, t, n) => !Ma.value || !xr.value ? null : n ? t ? `calc(${e ?? "0px"} - ${t})` : null : e, mo = m(() => !!
|
|
1060
|
+
}), fo = (e) => Cr.tracks[e] ?? null, po = (e, t, n) => !Ma.value || !xr.value ? null : n ? t ? `calc(${e ?? "0px"} - ${t})` : null : e, mo = m(() => !!O.selectable || z.value), ho = m(() => {
|
|
1061
1061
|
let e = fo("select"), t = Ia.value;
|
|
1062
1062
|
return e && t ? `calc(${e} + ${t}px)` : e;
|
|
1063
|
-
}), go = m(() => po(lo.value, mo.value ? ho.value : null, mo.value)), _o = m(() => oo.value ? null : po(uo.value,
|
|
1063
|
+
}), go = m(() => po(lo.value, mo.value ? ho.value : null, mo.value)), _o = m(() => oo.value ? null : po(uo.value, M.value ? fo("actions") : null, M.value)), vo = m(() => go.value !== null), yo = m(() => _o.value !== null), bo = (e, t) => {
|
|
1064
1064
|
let n = q.value ? Ba.value[t] : null;
|
|
1065
1065
|
return n == null ? e && So.value ? "minmax(auto, max-content)" : "max-content" : `${n}px`;
|
|
1066
1066
|
}, xo = m(() => {
|
|
1067
1067
|
let e = {};
|
|
1068
1068
|
if (!So.value) return e;
|
|
1069
|
-
let t = lo.value, n = z.value && !!
|
|
1070
|
-
return z.value && !n && t && (e["--min-g"] = i(t, "drag-handle")),
|
|
1069
|
+
let t = lo.value, n = z.value && !!O.selectable, r = Ia.value, i = (e, t) => r && Ra.value === t ? `calc(${e} + ${r}px)` : e, a = Nr.value && r && Ra.value === "drag-handle" ? `calc(${Nr.value} - ${r}px)` : Nr.value;
|
|
1070
|
+
return z.value && !n && t && (e["--min-g"] = i(t, "drag-handle")), O.selectable && t && (z.value ? a && (e["--min-s"] = i(`calc(${t} - ${a})`, "select")) : e["--min-s"] = i(t, "select")), M.value && uo.value && !oo.value && (e["--min-a"] = uo.value), e;
|
|
1071
1071
|
}), So = m(() => Object.keys(Sr.value?.tracks ?? {}).length > 0), Co = (e) => /^(auto|min-content|max-content|(fit-content|minmax)\(.*\)|-?[\d.]+fr)$/.test(e.trim()), wo = m(() => {
|
|
1072
|
-
let e = [], t = z.value && !!
|
|
1072
|
+
let e = [], t = z.value && !!O.selectable;
|
|
1073
1073
|
z.value && e.push({
|
|
1074
1074
|
key: On,
|
|
1075
1075
|
width: bo(t ? null : lo.value, On),
|
|
1076
1076
|
contentSized: Ba.value[On] == null
|
|
1077
|
-
}),
|
|
1077
|
+
}), O.selectable && e.push({
|
|
1078
1078
|
key: "select",
|
|
1079
1079
|
width: bo(z.value ? lo.value && Nr.value ? `calc(${lo.value} - ${Nr.value})` : null : lo.value, "select"),
|
|
1080
1080
|
contentSized: Ba.value.select == null
|
|
1081
1081
|
});
|
|
1082
|
-
let n = B.value, r = n.length - 1, i = !K.value && n.length > 0 && n.every((e) => e.width != null);
|
|
1082
|
+
let n = B.value, r = n.length - 1, i = !K.value && n.length > 0 && n.every((e) => e.width != null && !Co(Ga(e.width)));
|
|
1083
1083
|
return n.forEach((t, n) => {
|
|
1084
1084
|
let a = String(t.key), o = ki(t), s = o == null ? null : Ga(o), c = no.value[n], l = null, u = null;
|
|
1085
|
-
if (s != null && Co(s) ? u = s : s != null && i && !Ai(t) ? u = `minmax(${s}, ${parseFloat(s) || 1}fr)` : s != null && Ua(t) ? u = `minmax(${s}, 1fr)` : s == null ? so(n) ? u =
|
|
1085
|
+
if (s != null && Co(s) ? u = s : s != null && i && !Ai(t) ? u = `minmax(${s}, ${parseFloat(s) || 1}fr)` : s != null && Ua(t) ? u = `minmax(${s}, 1fr)` : s == null ? so(n) ? u = O.fixed ? "minmax(0, 1fr)" : "auto" : So.value ? ro(c) ? u = "min-content" : (l = Qa(c.start, c.end), l === null && (u = "auto")) : u = "max-content" : l = s, u !== null) {
|
|
1086
1086
|
e.push({
|
|
1087
1087
|
key: a,
|
|
1088
1088
|
width: u,
|
|
@@ -1098,7 +1098,7 @@ var Ht = {
|
|
|
1098
1098
|
width: te,
|
|
1099
1099
|
contentSized: !1
|
|
1100
1100
|
});
|
|
1101
|
-
}),
|
|
1101
|
+
}), M.value && e.push({
|
|
1102
1102
|
key: "actions",
|
|
1103
1103
|
width: bo(uo.value, "actions"),
|
|
1104
1104
|
contentSized: Ba.value.actions == null
|
|
@@ -1150,10 +1150,10 @@ var Ht = {
|
|
|
1150
1150
|
});
|
|
1151
1151
|
}, Io = m(() => ({
|
|
1152
1152
|
...wr.value,
|
|
1153
|
-
...K.value ? null : { "--ts": z.value && !
|
|
1153
|
+
...K.value ? null : { "--ts": z.value && !O.selectable ? 1 : 0 },
|
|
1154
1154
|
...Ao.value,
|
|
1155
1155
|
...jo.value,
|
|
1156
|
-
...
|
|
1156
|
+
...O.fixedHeaders || q.value ? { "--stuck-head-h": `${zo.value}px` } : null,
|
|
1157
1157
|
...Ha.value ? { "--virtual-row-tracks": Va.value } : null
|
|
1158
1158
|
})), Lo = () => {
|
|
1159
1159
|
let e = I.value, t = wo.value.length;
|
|
@@ -1169,7 +1169,7 @@ var Ht = {
|
|
|
1169
1169
|
let r = La(e, t.getPropertyValue("--indent").trim());
|
|
1170
1170
|
r !== Fa.value && (Fa.value = r);
|
|
1171
1171
|
}
|
|
1172
|
-
if (
|
|
1172
|
+
if (O.fixedHeaders || q.value) {
|
|
1173
1173
|
let t = e.querySelector(":scope > .bb-table__head"), n = t ? Math.round(t.getBoundingClientRect().height) : 0;
|
|
1174
1174
|
n !== zo.value && (zo.value = n);
|
|
1175
1175
|
}
|
|
@@ -1188,12 +1188,12 @@ var Ht = {
|
|
|
1188
1188
|
o[e] = t[n];
|
|
1189
1189
|
});
|
|
1190
1190
|
let s = li.value, c = s[0], l = s[s.length - 1], u = go.value, d = _o.value;
|
|
1191
|
-
if (u && c && o[c] && (o[c] = `calc(${o[c]} - max(0px, ${u}))`, !
|
|
1191
|
+
if (u && c && o[c] && (o[c] = `calc(${o[c]} - max(0px, ${u}))`, !O.selectable && !z.value && lo.value && (o.select = lo.value)), On in o) {
|
|
1192
1192
|
let e = o[On];
|
|
1193
1193
|
Nr.value !== e && (Nr.value = e), o.select = o.select ? `calc(${e} + ${o.select})` : e, delete o[On];
|
|
1194
1194
|
}
|
|
1195
1195
|
let f = Ia.value;
|
|
1196
|
-
f && o.select && c && o[c] && (o.select = `calc(${o.select} - ${f}px)`, o[c] = `calc(${o[c]} + ${f}px)`), d && l && o[l] && (o[l] = `calc(${o[l]} - max(0px, ${d}))`, !
|
|
1196
|
+
f && o.select && c && o[c] && (o.select = `calc(${o.select} - ${f}px)`, o[c] = `calc(${o[c]} + ${f}px)`), d && l && o[l] && (o[l] = `calc(${o[l]} - max(0px, ${d}))`, !M.value && uo.value && (o.actions = uo.value));
|
|
1197
1197
|
let p = [
|
|
1198
1198
|
..."select" in o ? ["select"] : [],
|
|
1199
1199
|
...s,
|
|
@@ -1219,29 +1219,29 @@ var Ht = {
|
|
|
1219
1219
|
I.value && Bo();
|
|
1220
1220
|
});
|
|
1221
1221
|
}, { flush: "post" });
|
|
1222
|
-
let Jo = (e, t) =>
|
|
1222
|
+
let Jo = (e, t) => O.accessibleLabel ? O.accessibleLabel(e, t) : F("table.select", He(e, hr.value)).value, Yo = m(() => O.selectable ? "fieldset" : "div"), Xo = m(() => O.legend || O.caption || F("table.selectableLegend").value), Zo = m(() => O.loading || ss.value), Qo = m(() => Zo.value && !O.interactiveWhileLoading), $o = m(() => Aa.value && !o(G.page) && !o(G.perPage) && !o(G.totalItems) && G.page >= 1 && G.perPage > 0 && G.totalItems >= 0), es = m(() => ({
|
|
1223
1223
|
"bb-table": !0,
|
|
1224
|
-
[`bb-table--align-${
|
|
1225
|
-
"bb-table--compact":
|
|
1226
|
-
"bb-table--reorderable": !!
|
|
1224
|
+
[`bb-table--align-${O.align}`]: !0,
|
|
1225
|
+
"bb-table--compact": ar.compact,
|
|
1226
|
+
"bb-table--reorderable": !!O.reorderable,
|
|
1227
1227
|
"bb-table--rows-reorderable": z.value,
|
|
1228
1228
|
"bb-table--resizable": wi.value,
|
|
1229
1229
|
"bb-table--fixed": Na.value,
|
|
1230
1230
|
"bb-table--inherit-widths": Wa.value,
|
|
1231
1231
|
[`bb-table--indent-${Ra.value}`]: !!Ra.value,
|
|
1232
|
-
"bb-table--fixed-header":
|
|
1232
|
+
"bb-table--fixed-header": O.fixedHeaders || q.value,
|
|
1233
1233
|
"bb-table--virtual": q.value,
|
|
1234
1234
|
"bb-table--virtual-flat": Ha.value,
|
|
1235
1235
|
"bb-table--loading": Zo.value,
|
|
1236
1236
|
"bb-table--empty": !J.value.length,
|
|
1237
|
-
"bb-table--selectable": !!
|
|
1237
|
+
"bb-table--selectable": !!O.selectable,
|
|
1238
1238
|
"bb-table--overflow-left": Ys.value,
|
|
1239
1239
|
"bb-table--overflow-right": Xs.value,
|
|
1240
1240
|
"bb-table--pinned-left": $s.value,
|
|
1241
1241
|
"bb-table--pinned-right": ec.value,
|
|
1242
1242
|
"scrollbar-border": !0
|
|
1243
|
-
})), ts = m(() => ri.value.length + Number(z.value) + Number(!!
|
|
1244
|
-
items: Dt(
|
|
1243
|
+
})), ts = m(() => ri.value.length + Number(z.value) + Number(!!O.selectable) + Number(M.value)), ns = m(() => Object.fromEntries(O.columns.map((e) => [e.key, De(e.key)]))), { getter: rs, clientReproducible: is, hydratedFromSsr: as, items: os, loading: ss, error: cs, ssrMarker: ls } = u({
|
|
1244
|
+
items: Dt(O, "items"),
|
|
1245
1245
|
marker: !0
|
|
1246
1246
|
}), { hasPrefilled: us, whenPrefilled: ds } = f({
|
|
1247
1247
|
alreadyLoaded: as,
|
|
@@ -1252,20 +1252,20 @@ var Ht = {
|
|
|
1252
1252
|
}
|
|
1253
1253
|
}), { data: fs } = p({ items: m(() => {
|
|
1254
1254
|
let e = G.selected;
|
|
1255
|
-
return
|
|
1255
|
+
return O.multiple ? e ?? [] : e == null ? [] : [e];
|
|
1256
1256
|
}) }), { options: J, baseOptions: Y } = ee({
|
|
1257
|
-
disabled: Dt(() =>
|
|
1257
|
+
disabled: Dt(() => O.disabled),
|
|
1258
1258
|
items: os,
|
|
1259
1259
|
itemText: void 0,
|
|
1260
|
-
itemValue:
|
|
1261
|
-
max: Dt(() =>
|
|
1260
|
+
itemValue: O.itemValue,
|
|
1261
|
+
max: Dt(() => O.max),
|
|
1262
1262
|
selectable: !0,
|
|
1263
1263
|
selectedIndexedByHash: fs
|
|
1264
1264
|
}), ps = m(() => !Zo.value && !J.value.length);
|
|
1265
1265
|
E(Y, () => Fr.sync(), { flush: "post" });
|
|
1266
1266
|
let X = m(() => {
|
|
1267
|
-
let e = new Set(
|
|
1268
|
-
if (!e.size ||
|
|
1267
|
+
let e = new Set(dr.value.split(" ").filter(Boolean));
|
|
1268
|
+
if (!e.size || cr.value || !J.value.length) return {
|
|
1269
1269
|
first: !1,
|
|
1270
1270
|
last: !1
|
|
1271
1271
|
};
|
|
@@ -1275,31 +1275,31 @@ var Ht = {
|
|
|
1275
1275
|
last: t("last")
|
|
1276
1276
|
};
|
|
1277
1277
|
}), ms = async (e) => {
|
|
1278
|
-
|
|
1278
|
+
O.multiple ? G.selected = (G.selected ?? []).concat(e.value) : G.selected = e.value;
|
|
1279
1279
|
}, hs = async (e) => {
|
|
1280
|
-
if (
|
|
1280
|
+
if (O.multiple) {
|
|
1281
1281
|
let t = { ...fs.value };
|
|
1282
1282
|
delete t[e.valueHash], G.selected = Object.values(t);
|
|
1283
1283
|
} else G.selected = null;
|
|
1284
1284
|
};
|
|
1285
1285
|
te(() => [
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
typeof
|
|
1286
|
+
O.dependencies,
|
|
1287
|
+
O.items,
|
|
1288
|
+
typeof O.items == "function" ? [G.page, G.perPage] : void 0
|
|
1289
1289
|
], async (e, t) => {
|
|
1290
1290
|
if (us.value || await ds(), !us.value) return;
|
|
1291
1291
|
let n = (n) => a(e?.[n]) !== a(t?.[n]), r = t && !n(0) && !n(1) && n(2) ? "pagination" : "dependencies";
|
|
1292
1292
|
await rs(void 0, r, G.selected) === "applied" && gs();
|
|
1293
|
-
}, { debounce:
|
|
1293
|
+
}, { debounce: O.depsDebounceTime });
|
|
1294
1294
|
let gs = () => {
|
|
1295
|
-
if (!
|
|
1295
|
+
if (!O.enforceCoherence) return;
|
|
1296
1296
|
let e = new Set(J.value.map((e) => e.valueHash)), t = (t) => e.has(a(t));
|
|
1297
|
-
if (
|
|
1297
|
+
if (O.multiple) {
|
|
1298
1298
|
let e = G.selected ?? [];
|
|
1299
1299
|
e.every(t) || (G.selected = e.filter(t));
|
|
1300
1300
|
} else !o(G.selected) && !t(G.selected) && (G.selected = null);
|
|
1301
1301
|
let n = G.unselected ?? [];
|
|
1302
|
-
n.every(t) || (G.unselected = n.filter(t)), !o(
|
|
1302
|
+
n.every(t) || (G.unselected = n.filter(t)), !o(rr.value) && !t(rr.value) && (rr.value = null), ir.value.every(t) || (ir.value = ir.value.filter(t));
|
|
1303
1303
|
}, _s = (e, t) => {
|
|
1304
1304
|
let n = gr(t, e.key);
|
|
1305
1305
|
return e.formatter && (!o(n) || e.formatOnNull !== !1) && (n = e.formatter(n, e.key, t)), o(n) ? e.placeholder ? {
|
|
@@ -1322,7 +1322,7 @@ var Ht = {
|
|
|
1322
1322
|
`bb-table__cell--${a}`,
|
|
1323
1323
|
"bb-table__cell--fluid",
|
|
1324
1324
|
...Ds(n, r())
|
|
1325
|
-
] : [`bb-table__cell--${a}`],
|
|
1325
|
+
] : [`bb-table__cell--${a}`], O.tdClass, e.tdClass, r(), e.key, t.item);
|
|
1326
1326
|
},
|
|
1327
1327
|
get content() {
|
|
1328
1328
|
return r();
|
|
@@ -1336,9 +1336,9 @@ var Ht = {
|
|
|
1336
1336
|
};
|
|
1337
1337
|
}, bs = m(() => {
|
|
1338
1338
|
let e = {};
|
|
1339
|
-
if (
|
|
1339
|
+
if (O.fixed || K.value || q.value || A.thead) return e;
|
|
1340
1340
|
let t = We(os.value ?? []);
|
|
1341
|
-
for (let n of B.value) ki(n) ?? (
|
|
1341
|
+
for (let n of B.value) ki(n) ?? (A[ns.value[n.key]] || (e[String(n.key)] = t.map((e) => w(vs(n, e)))));
|
|
1342
1342
|
return e;
|
|
1343
1343
|
}), xs = m(() => Z.value?.em ?? 0), Ss = Ge({
|
|
1344
1344
|
table: () => I.value,
|
|
@@ -1378,7 +1378,7 @@ var Ht = {
|
|
|
1378
1378
|
let e = os.value ?? [];
|
|
1379
1379
|
if (!Ae(e.length)) return null;
|
|
1380
1380
|
let t = We(e), n = /* @__PURE__ */ new Map();
|
|
1381
|
-
for (let e of B.value)
|
|
1381
|
+
for (let e of B.value) A[ns.value[e.key]] || n.set(String(e.key), new Set(t.map((t) => w(vs(e, t)).trim())));
|
|
1382
1382
|
return n;
|
|
1383
1383
|
}), Ds = (e, t) => {
|
|
1384
1384
|
let n = Ts.value.get(e);
|
|
@@ -1402,9 +1402,9 @@ var Ht = {
|
|
|
1402
1402
|
`${t}:header:append`,
|
|
1403
1403
|
"header:prepend",
|
|
1404
1404
|
"header:append"
|
|
1405
|
-
].some((e) =>
|
|
1405
|
+
].some((e) => A[e]);
|
|
1406
1406
|
}, As = () => {
|
|
1407
|
-
let e = bs.value, t = Number(z.value) + Number(!!
|
|
1407
|
+
let e = bs.value, t = Number(z.value) + Number(!!O.selectable), n = [];
|
|
1408
1408
|
return B.value.forEach((r, i) => {
|
|
1409
1409
|
let a = String(r.key);
|
|
1410
1410
|
a in e && n.push({
|
|
@@ -1414,7 +1414,7 @@ var Ht = {
|
|
|
1414
1414
|
placeholder: r.placeholder || void 0,
|
|
1415
1415
|
prose: Ts.value.get(a)?.prose ?? !1,
|
|
1416
1416
|
label: ks(r) && r.label || void 0,
|
|
1417
|
-
dynamic: typeof
|
|
1417
|
+
dynamic: typeof O.tdClass == "function" || typeof r.tdClass == "function" || typeof O.rowClass == "function"
|
|
1418
1418
|
});
|
|
1419
1419
|
}), n;
|
|
1420
1420
|
}, js = m(() => Object.keys(Os.value).join(" ")), Ms = m(() => new Set(js.value.split(" ").filter(Boolean))), Z = C(null), Ns = (e, t) => t === "uppercase" ? e.toUpperCase() : t === "lowercase" ? e.toLowerCase() : t === "capitalize" ? e.replace(/(^|\s)(\S)/g, (e, t, n) => t + n.toUpperCase()) : e, Ps = m(() => {
|
|
@@ -1513,9 +1513,9 @@ var Ht = {
|
|
|
1513
1513
|
}), E(L, (e, t) => {
|
|
1514
1514
|
Q && (t && Q.unobserve(t), e && Q.observe(e), qs());
|
|
1515
1515
|
}), E(() => [
|
|
1516
|
-
!!
|
|
1516
|
+
!!O.selectable,
|
|
1517
1517
|
z.value,
|
|
1518
|
-
|
|
1518
|
+
M.value
|
|
1519
1519
|
], () => Q && qs()), x(() => {
|
|
1520
1520
|
Q?.disconnect(), cancelAnimationFrame(zs), Ss.dispose();
|
|
1521
1521
|
});
|
|
@@ -1544,14 +1544,14 @@ var Ht = {
|
|
|
1544
1544
|
};
|
|
1545
1545
|
bt(uc);
|
|
1546
1546
|
let dc = m(() => {
|
|
1547
|
-
if (
|
|
1547
|
+
if (N.value) return { tabindex: -1 };
|
|
1548
1548
|
if (!Zs.value) return {};
|
|
1549
1549
|
if (Qs.value) return { tabindex: -1 };
|
|
1550
|
-
let e =
|
|
1550
|
+
let e = j.rootAttrs;
|
|
1551
1551
|
return {
|
|
1552
1552
|
tabindex: 0,
|
|
1553
|
-
...(
|
|
1554
|
-
...
|
|
1553
|
+
...(O.caption || e["aria-label"] || e["aria-labelledby"]) && Yo.value === "div" ? { role: "region" } : {},
|
|
1554
|
+
...O.caption ? { "aria-labelledby": Dr.value } : {}
|
|
1555
1555
|
};
|
|
1556
1556
|
}), fc = () => {
|
|
1557
1557
|
cancelAnimationFrame(nc), nc = requestAnimationFrame(cc);
|
|
@@ -1575,15 +1575,15 @@ var Ht = {
|
|
|
1575
1575
|
key: e.key,
|
|
1576
1576
|
label: e.label,
|
|
1577
1577
|
slotName: n,
|
|
1578
|
-
classes: Fe([`bb-table__cell-column-header--${t}`],
|
|
1578
|
+
classes: Fe([`bb-table__cell-column-header--${t}`], O.thClass, e.thClass),
|
|
1579
1579
|
sortable: !!e.sortable,
|
|
1580
1580
|
sortDirection: a,
|
|
1581
1581
|
sortOrder: r
|
|
1582
1582
|
};
|
|
1583
1583
|
})), hc = (e, t) => {
|
|
1584
1584
|
let n = `${ns.value[e]}:header:${t}`;
|
|
1585
|
-
return
|
|
1586
|
-
}, gc = (e) =>
|
|
1585
|
+
return A[n] ? n : A[`header:${t}`] ? `header:${t}` : void 0;
|
|
1586
|
+
}, gc = (e) => A[e.name]?.(e.scope);
|
|
1587
1587
|
gc.props = ["name", "scope"];
|
|
1588
1588
|
let _c = (e) => ({
|
|
1589
1589
|
classes: e.classes,
|
|
@@ -1605,19 +1605,19 @@ var Ht = {
|
|
|
1605
1605
|
},
|
|
1606
1606
|
cols: i,
|
|
1607
1607
|
get rowClasses() {
|
|
1608
|
-
return Ie(
|
|
1608
|
+
return Ie(O.rowClass, B.value, i, t.item);
|
|
1609
1609
|
},
|
|
1610
1610
|
onRowClick: (n) => {
|
|
1611
1611
|
let r = vc(e, t.valueHash);
|
|
1612
|
-
r && Ea(n) && (wa(r),
|
|
1612
|
+
r && Ea(n) && (wa(r), k("click:row", n, r.item));
|
|
1613
1613
|
},
|
|
1614
1614
|
onRowContextMenu: (n) => {
|
|
1615
1615
|
let r = vc(e, t.valueHash);
|
|
1616
|
-
r && !Ta(n) && (
|
|
1616
|
+
r && !Ta(n) && (k("contextmenu:row", n, r.item), Yr(n, r.valueHash, r.item));
|
|
1617
1617
|
},
|
|
1618
1618
|
onRowDblClick: (n) => {
|
|
1619
1619
|
let r = vc(e, t.valueHash);
|
|
1620
|
-
r && !Ta(n) &&
|
|
1620
|
+
r && !Ta(n) && k("dblclick:row", n, r.item);
|
|
1621
1621
|
},
|
|
1622
1622
|
item: t.item,
|
|
1623
1623
|
get text() {
|
|
@@ -1627,7 +1627,7 @@ var Ht = {
|
|
|
1627
1627
|
value: t.value
|
|
1628
1628
|
};
|
|
1629
1629
|
}, bc = m(() => {
|
|
1630
|
-
Y.value, ns.value,
|
|
1630
|
+
Y.value, ns.value, O.tdClass, O.rowClass, O.accessibleLabel;
|
|
1631
1631
|
for (let e of B.value) e.align, e.formatOnNull, e.formatter, e.key, e.label, e.placeholder, e.tdClass;
|
|
1632
1632
|
return /* @__PURE__ */ new Map();
|
|
1633
1633
|
}), xc = (e) => {
|
|
@@ -1639,10 +1639,10 @@ var Ht = {
|
|
|
1639
1639
|
if (n) return n;
|
|
1640
1640
|
let r = yc(e);
|
|
1641
1641
|
return t.set(e, r), xc(t), r;
|
|
1642
|
-
}, Cc = m(() => (bc.value, $.value, J.value, _a.value,
|
|
1642
|
+
}, Cc = m(() => (bc.value, $.value, J.value, _a.value, O.selectable, O.highlightable, /* @__PURE__ */ new Map())), wc = /* @__PURE__ */ new Map(), Tc = /* @__PURE__ */ new WeakMap(), Ec = (e) => {
|
|
1643
1643
|
let t = Cc.value, n = t.get(e.index);
|
|
1644
1644
|
if (n) return n;
|
|
1645
|
-
let r = Sc(e.index), i = J.value[e.index], a = !!i.disabled, o = () => !
|
|
1645
|
+
let r = Sc(e.index), i = J.value[e.index], a = !!i.disabled, o = () => !O.selectable || typeof O.selectable == "function" && !O.selectable(r.item) || a, s = r.valueHash in _a.value, c = wc.get(r.valueHash);
|
|
1646
1646
|
if (c && c.item === r.item && c.cols === r.cols && c.onRowClick === r.onRowClick && c.expanded === e.expanded && c.rowIndex === e.rowIndex && c.selected === i.selected && Tc.get(c) === a && c.highlighted === s) return t.set(e.index, c), xc(t), c;
|
|
1647
1647
|
let l = {
|
|
1648
1648
|
get accessibleLabel() {
|
|
@@ -1682,15 +1682,15 @@ var Ht = {
|
|
|
1682
1682
|
row: 0,
|
|
1683
1683
|
col: null
|
|
1684
1684
|
}), Oc = m(() => {
|
|
1685
|
-
if (!
|
|
1685
|
+
if (!N.value) return null;
|
|
1686
1686
|
let e = /* @__PURE__ */ new Map();
|
|
1687
1687
|
for (let t of $.value) e.set(t.key, t.virtualIndex);
|
|
1688
1688
|
return e;
|
|
1689
1689
|
}), kc = m(() => {
|
|
1690
|
-
if (!
|
|
1690
|
+
if (!N.value) return null;
|
|
1691
1691
|
let e = $.value.length, t = Dc.value, n;
|
|
1692
|
-
if (n = t.row === Jn && X.value.first || t.row === Yn && X.value.last ? t.row : !e || t.row < 0 ?
|
|
1693
|
-
let r = t.col === null && (!
|
|
1692
|
+
if (n = t.row === Jn && X.value.first || t.row === Yn && X.value.last ? t.row : !e || t.row < 0 ? P.value ? -1 : e ? 0 : null : (t.key === null ? void 0 : Oc.value?.get(t.key)) ?? i(t.row, 0, e - 1), n === null) return null;
|
|
1693
|
+
let r = t.col === null && (!fr.value || n < 0) ? 0 : t.col;
|
|
1694
1694
|
return {
|
|
1695
1695
|
row: n,
|
|
1696
1696
|
col: r
|
|
@@ -1699,7 +1699,7 @@ var Ht = {
|
|
|
1699
1699
|
let t = kc.value;
|
|
1700
1700
|
return !t || t.row !== e ? -2 : t.col ?? -1;
|
|
1701
1701
|
}, jc = (e) => {
|
|
1702
|
-
if (!
|
|
1702
|
+
if (!P.value) return;
|
|
1703
1703
|
let t = kc.value;
|
|
1704
1704
|
return !t || t.row !== -1 ? -1 : Math.min(t.col ?? 0, ts.value - 1) === e ? 0 : -1;
|
|
1705
1705
|
}, $ = m(() => {
|
|
@@ -2009,7 +2009,7 @@ var Ht = {
|
|
|
2009
2009
|
let i = r.parentElement;
|
|
2010
2010
|
if (i && i.parentElement === t && r.getAttribute("role") === "row") {
|
|
2011
2011
|
let t = r, a = i.classList.contains("bb-table__head");
|
|
2012
|
-
if ((a ? !
|
|
2012
|
+
if ((a ? !P.value : i !== R.value) || a && !t.classList.contains("bb-table__header-row")) return null;
|
|
2013
2013
|
let o = !a && t.classList.contains("bb-table__edge-row"), s = a ? qn : o ? t.classList.contains("bb-table__edge-row--first") ? Jn : Yn : Number(t.dataset.index);
|
|
2014
2014
|
if (!Number.isInteger(s)) return null;
|
|
2015
2015
|
if (!n) return {
|
|
@@ -2070,14 +2070,14 @@ var Ht = {
|
|
|
2070
2070
|
Fl !== e && (Vl(), Fl = e, Il = Xe(), zl(e));
|
|
2071
2071
|
}, Vl = () => {
|
|
2072
2072
|
let e = Fl;
|
|
2073
|
-
Fl = null, e?.isConnected &&
|
|
2073
|
+
Fl = null, e?.isConnected && N.value && Rl(e);
|
|
2074
2074
|
}, Hl = (e) => {
|
|
2075
2075
|
let t = nt(e)[0];
|
|
2076
2076
|
return t ? (Bl(e), t.focus(), !0) : !1;
|
|
2077
2077
|
}, Ul = null, Wl = () => {
|
|
2078
2078
|
Ul?.disconnect(), Ul = null;
|
|
2079
2079
|
let e = I.value;
|
|
2080
|
-
e && (
|
|
2080
|
+
e && (N.value ? (Rl(e), Ul = new MutationObserver((e) => {
|
|
2081
2081
|
for (let t of e) {
|
|
2082
2082
|
if (t.type === "childList") {
|
|
2083
2083
|
for (let e of t.addedNodes) e instanceof Element && Rl(e);
|
|
@@ -2093,7 +2093,7 @@ var Ht = {
|
|
|
2093
2093
|
attributeFilter: ["tabindex"]
|
|
2094
2094
|
})) : (Fl = null, zl(e)));
|
|
2095
2095
|
};
|
|
2096
|
-
yt(Wl), E(
|
|
2096
|
+
yt(Wl), E(N, () => b(Wl)), x(() => Ul?.disconnect());
|
|
2097
2097
|
let Gl = (e) => {
|
|
2098
2098
|
let t = Nl(e.target);
|
|
2099
2099
|
if (!t) return;
|
|
@@ -2105,7 +2105,7 @@ var Ht = {
|
|
|
2105
2105
|
col: t.cell ? t.col : null
|
|
2106
2106
|
});
|
|
2107
2107
|
}, Kl = (e) => {
|
|
2108
|
-
|
|
2108
|
+
N.value && Gl(e);
|
|
2109
2109
|
};
|
|
2110
2110
|
E(I, (e, t) => {
|
|
2111
2111
|
t?.removeEventListener("focusin", Kl), e?.addEventListener("focusin", Kl);
|
|
@@ -2115,14 +2115,14 @@ var Ht = {
|
|
|
2115
2115
|
Fl && !(t instanceof Node && Fl.contains(t)) && Vl();
|
|
2116
2116
|
}, Jl = (e) => {
|
|
2117
2117
|
let t = $.value[e];
|
|
2118
|
-
|
|
2119
|
-
}, Yl = () => !
|
|
2118
|
+
O.selectable && t && t.kind === "row" && vu(Ec(t));
|
|
2119
|
+
}, Yl = () => !O.selectable || !lu() ? !1 : (su.value?.click(), !0), Xl = (e) => {
|
|
2120
2120
|
e.row >= 0 && $.value[e.row]?.kind === "row" && e.rowEl.click();
|
|
2121
2121
|
}, Zl = (e) => e >= 0 ? e : e === Yn ? $.value.length : e === Jn ? -1 : X.value.first ? -2 : -1, Ql = (e) => {
|
|
2122
2122
|
let t = $.value.length;
|
|
2123
2123
|
return e >= t ? X.value.last ? Yn : t - 1 : e >= 0 ? e : e === -1 && X.value.first ? Jn : qn;
|
|
2124
2124
|
}, $l = (e, t, n = !1) => {
|
|
2125
|
-
let r = $.value.length, a = X.value.first ? -1 : 0, o = n ? a :
|
|
2125
|
+
let r = $.value.length, a = X.value.first ? -1 : 0, o = n ? a : P.value ? a - 1 : a, s = X.value.last ? r : r - 1;
|
|
2126
2126
|
return s < o ? e : Ql(i(Zl(e) + t, o, s));
|
|
2127
2127
|
}, eu = (e) => {
|
|
2128
2128
|
if (e.defaultPrevented || z.value && Fr.onGridKeydown(e)) return;
|
|
@@ -2139,7 +2139,7 @@ var Ht = {
|
|
|
2139
2139
|
return;
|
|
2140
2140
|
}
|
|
2141
2141
|
if (e.altKey || e.metaKey || e.shiftKey && n !== " ") return;
|
|
2142
|
-
let r = e.ctrlKey, i = Ye(t.rowEl), a = i ? "ArrowLeft" : "ArrowRight", o = i ? "ArrowRight" : "ArrowLeft", s = $.value.length - 1, c =
|
|
2142
|
+
let r = e.ctrlKey, i = Ye(t.rowEl), a = i ? "ArrowLeft" : "ArrowRight", o = i ? "ArrowRight" : "ArrowLeft", s = $.value.length - 1, c = fr.value, l = (n, r) => {
|
|
2143
2143
|
e.preventDefault(), (n !== t.row || r !== (t.cell ? t.col : null)) && Pl(n, r);
|
|
2144
2144
|
}, u = () => e.preventDefault();
|
|
2145
2145
|
if (!t.cell) {
|
|
@@ -2168,7 +2168,7 @@ var Ht = {
|
|
|
2168
2168
|
}
|
|
2169
2169
|
return;
|
|
2170
2170
|
}
|
|
2171
|
-
let d = kc.value, f = d && d.row === t.row && d.col !== null ? d.col : t.col, p = (e) => Ml(e) - 1, ee = !!
|
|
2171
|
+
let d = kc.value, f = d && d.row === t.row && d.col !== null ? d.col : t.col, p = (e) => Ml(e) - 1, ee = !!O.selectable && t.col === Number(z.value);
|
|
2172
2172
|
switch (n) {
|
|
2173
2173
|
case a: return l(t.row, Math.min(t.col + 1, p(t.row)));
|
|
2174
2174
|
case o: return t.col > 0 ? l(t.row, t.col - 1) : c && t.row >= 0 ? l(t.row, null) : u();
|
|
@@ -2216,54 +2216,54 @@ var Ht = {
|
|
|
2216
2216
|
onKeydown: (t) => tu(t, e.valueHash)
|
|
2217
2217
|
}), ru = (e) => {
|
|
2218
2218
|
let t = J.value.find((t) => t.valueHash === e);
|
|
2219
|
-
t && (e in va.value ?
|
|
2219
|
+
t && (e in va.value ? ir.value = ir.value.filter((t) => a(t) !== e) : ir.value = [...ir.value, t.value]);
|
|
2220
2220
|
};
|
|
2221
2221
|
E(D, () => {
|
|
2222
2222
|
ou.clear(), G.unselected = [], G.selected = [];
|
|
2223
2223
|
});
|
|
2224
2224
|
let iu = m(() => {
|
|
2225
2225
|
let e = Array.isArray(G.selected) ? G.selected.length : 0;
|
|
2226
|
-
return !!(
|
|
2227
|
-
}), au = m(() =>
|
|
2226
|
+
return !!(O.multiple && e > 0 && !D.value || D.value && ou.size > 0);
|
|
2227
|
+
}), au = m(() => j.part("selectIcon", {
|
|
2228
2228
|
selected: !!D.value && !iu.value,
|
|
2229
2229
|
indeterminate: iu.value,
|
|
2230
|
-
disabled: !!
|
|
2230
|
+
disabled: !!O.disabled
|
|
2231
2231
|
})), ou = xt(/* @__PURE__ */ new Set());
|
|
2232
2232
|
E(() => G.unselected, (e) => {
|
|
2233
2233
|
ou.clear(), (e ?? []).forEach((e) => {
|
|
2234
2234
|
ou.add(a(e));
|
|
2235
2235
|
});
|
|
2236
2236
|
}, { immediate: !0 });
|
|
2237
|
-
let su = C(null), cu = le(), lu = () => !
|
|
2237
|
+
let su = C(null), cu = le(), lu = () => !O.disableSelectAll && O.multiple;
|
|
2238
2238
|
E([() => iu.value, lu], () => cu.onBlur());
|
|
2239
2239
|
let uu = {
|
|
2240
2240
|
onBlur: () => cu.onBlur(),
|
|
2241
2241
|
onChange: (e) => {
|
|
2242
|
-
e.target instanceof HTMLInputElement && (fe(e.target,
|
|
2242
|
+
e.target instanceof HTMLInputElement && (fe(e.target, O.readonly, !!D.value) ? me(su.value, iu.value) : (me(su.value, iu.value), D.value = e.target.checked, pe(() => su.value, () => !!D.value, () => iu.value)));
|
|
2243
2243
|
},
|
|
2244
2244
|
onFocus: cu.onFocus,
|
|
2245
|
-
onClick: (e) => ue(e,
|
|
2246
|
-
onKeydown: (e) => de(e,
|
|
2245
|
+
onClick: (e) => ue(e, O.readonly),
|
|
2246
|
+
onKeydown: (e) => de(e, O.readonly)
|
|
2247
2247
|
}, du = m(() => ({
|
|
2248
2248
|
...he("checkbox", {
|
|
2249
2249
|
checked: !!D.value,
|
|
2250
|
-
disabled:
|
|
2250
|
+
disabled: O.disabled,
|
|
2251
2251
|
indeterminate: iu.value,
|
|
2252
|
-
name: `select_all_${
|
|
2253
|
-
readonly:
|
|
2252
|
+
name: `select_all_${O.name || ""}`,
|
|
2253
|
+
readonly: O.readonly,
|
|
2254
2254
|
required: !1,
|
|
2255
2255
|
value: !0
|
|
2256
2256
|
}),
|
|
2257
2257
|
...uu
|
|
2258
2258
|
})), fu = (e) => {
|
|
2259
2259
|
let t = G.unselected ?? [];
|
|
2260
|
-
pu(e) ? (hs(e),
|
|
2261
|
-
}, pu = (e) => D.value && ou.has(e.valueHash) ? !1 : e.selected ? !0 : D.value && !(typeof
|
|
2260
|
+
pu(e) ? (hs(e), k("item:unselected", e.value), ou.add(e.valueHash), G.unselected = [...t, e.value]) : (D.value || ms(e), k("item:selected", e.value), ou.delete(e.valueHash), G.unselected = t.filter((t) => a(t) !== a(e.value)));
|
|
2261
|
+
}, pu = (e) => D.value && ou.has(e.valueHash) ? !1 : e.selected ? !0 : D.value && !(typeof O.selectable == "function" && !O.selectable(e.item)), mu = m(() => {
|
|
2262
2262
|
let e = /* @__PURE__ */ new Map();
|
|
2263
2263
|
for (let t of J.value) e.set(t.valueHash, t);
|
|
2264
2264
|
return e;
|
|
2265
2265
|
}), hu = (e) => {
|
|
2266
|
-
if (
|
|
2266
|
+
if (O.disabled || O.readonly || typeof O.selectable == "function" && !O.selectable(e.item)) return !0;
|
|
2267
2267
|
let t = mu.value.get(e.valueHash);
|
|
2268
2268
|
return !t || !!t.disabled;
|
|
2269
2269
|
}, gu, _u = (e) => {
|
|
@@ -2271,7 +2271,7 @@ var Ht = {
|
|
|
2271
2271
|
}, vu = (e) => {
|
|
2272
2272
|
if (hu(e)) return;
|
|
2273
2273
|
let t = (e) => e === void 0 ? -1 : J.value.findIndex((t) => t.valueHash === e), n = t(gu), r = t(e.valueHash);
|
|
2274
|
-
if (!
|
|
2274
|
+
if (!O.multiple || n < 0 || r < 0) {
|
|
2275
2275
|
_u(e);
|
|
2276
2276
|
return;
|
|
2277
2277
|
}
|
|
@@ -2280,24 +2280,24 @@ var Ht = {
|
|
|
2280
2280
|
let t = J.value[e];
|
|
2281
2281
|
if (t.disabled || pu(t) === i) continue;
|
|
2282
2282
|
let { item: n } = Y.value[e];
|
|
2283
|
-
(typeof
|
|
2283
|
+
(typeof O.selectable != "function" || O.selectable(n)) && s.push(t);
|
|
2284
2284
|
}
|
|
2285
|
-
if (i && !D.value &&
|
|
2286
|
-
let e =
|
|
2285
|
+
if (i && !D.value && O.max !== void 0) {
|
|
2286
|
+
let e = O.max - (G.selected ?? []).length;
|
|
2287
2287
|
s = s.slice(0, Math.max(0, e));
|
|
2288
2288
|
}
|
|
2289
2289
|
if (gu = e.valueHash, !s.length) return;
|
|
2290
2290
|
let c = new Set(s.map((e) => e.valueHash)), l = G.unselected ?? [];
|
|
2291
2291
|
if (i) {
|
|
2292
2292
|
D.value || (G.selected = [...G.selected ?? [], ...s.map((e) => e.value)]), G.unselected = l.filter((e) => !c.has(a(e)));
|
|
2293
|
-
for (let e of s) ou.delete(e.valueHash),
|
|
2293
|
+
for (let e of s) ou.delete(e.valueHash), k("item:selected", e.value);
|
|
2294
2294
|
} else {
|
|
2295
2295
|
G.selected = (G.selected ?? []).filter((e) => !c.has(a(e))), G.unselected = [...l, ...s.map((e) => e.value)];
|
|
2296
|
-
for (let e of s) ou.add(e.valueHash),
|
|
2296
|
+
for (let e of s) ou.add(e.valueHash), k("item:unselected", e.value);
|
|
2297
2297
|
}
|
|
2298
2298
|
}, yu = s((e) => typeof e != "string", JSON.stringify), bu = m(() => [].concat(G.selected ?? []).map((e) => ({
|
|
2299
|
-
disabled:
|
|
2300
|
-
name:
|
|
2299
|
+
disabled: O.disabled,
|
|
2300
|
+
name: O.name,
|
|
2301
2301
|
type: "hidden",
|
|
2302
2302
|
value: yu(e)
|
|
2303
2303
|
}))), xu = [
|
|
@@ -2305,59 +2305,59 @@ var Ht = {
|
|
|
2305
2305
|
45,
|
|
2306
2306
|
85,
|
|
2307
2307
|
55
|
|
2308
|
-
], Su = m(() => i(J.value.length ||
|
|
2308
|
+
], Su = m(() => i(J.value.length || O.columns.length || 1, 4, 10)), Cu = m(() => {
|
|
2309
2309
|
let e = /* @__PURE__ */ new Map();
|
|
2310
|
-
for (let [t, n] of
|
|
2310
|
+
for (let [t, n] of tr.value) e.has(t) || e.set(t, n);
|
|
2311
2311
|
return e;
|
|
2312
|
-
}), wu = m(() => gt([ko.value,
|
|
2313
|
-
let { style: e, ...t } =
|
|
2312
|
+
}), wu = m(() => gt([ko.value, j.table.style])), Tu = m(() => {
|
|
2313
|
+
let { style: e, ...t } = j.table;
|
|
2314
2314
|
return {
|
|
2315
2315
|
...y({
|
|
2316
2316
|
ref: I,
|
|
2317
2317
|
class: ["bb-table__table", Is.value],
|
|
2318
|
-
role:
|
|
2319
|
-
"aria-labelledby":
|
|
2320
|
-
"aria-multiselectable":
|
|
2318
|
+
role: pr.value,
|
|
2319
|
+
"aria-labelledby": O.caption ? Dr.value : void 0,
|
|
2320
|
+
"aria-multiselectable": N.value && O.selectable && O.multiple ? "true" : void 0,
|
|
2321
2321
|
"aria-rowcount": ju.value === void 0 ? void 0 : ju.value + Nu.value,
|
|
2322
|
-
...
|
|
2322
|
+
...N.value ? {
|
|
2323
2323
|
onKeydown: eu,
|
|
2324
2324
|
onFocusout: ql
|
|
2325
2325
|
} : {}
|
|
2326
2326
|
}, t),
|
|
2327
2327
|
style: wu.value
|
|
2328
2328
|
};
|
|
2329
|
-
}), Eu = m(() => gt([Io.value,
|
|
2330
|
-
let { style: e, ...t } =
|
|
2329
|
+
}), Eu = m(() => gt([Io.value, j.rootAttrs.style])), Du = m(() => {
|
|
2330
|
+
let { style: e, ...t } = j.rootAttrs;
|
|
2331
2331
|
return {
|
|
2332
2332
|
...y({
|
|
2333
|
-
id:
|
|
2333
|
+
id: O.id,
|
|
2334
2334
|
ref: L,
|
|
2335
2335
|
"aria-busy": Zo.value,
|
|
2336
2336
|
class: es.value,
|
|
2337
2337
|
"data-bb-table-id": br.value,
|
|
2338
|
-
inert:
|
|
2338
|
+
inert: O.disabled,
|
|
2339
2339
|
...dc.value
|
|
2340
2340
|
}, t),
|
|
2341
2341
|
style: Eu.value
|
|
2342
2342
|
};
|
|
2343
2343
|
}), Ou = m(() => ({
|
|
2344
|
-
passthrough:
|
|
2345
|
-
slots:
|
|
2346
|
-
selectable:
|
|
2347
|
-
multiple: !!
|
|
2348
|
-
readonly: !!
|
|
2349
|
-
actions:
|
|
2350
|
-
grid:
|
|
2351
|
-
treegrid:
|
|
2352
|
-
cellRole:
|
|
2353
|
-
rowHeaderKeys:
|
|
2344
|
+
passthrough: j,
|
|
2345
|
+
slots: A,
|
|
2346
|
+
selectable: O.selectable,
|
|
2347
|
+
multiple: !!O.multiple,
|
|
2348
|
+
readonly: !!O.readonly,
|
|
2349
|
+
actions: M.value,
|
|
2350
|
+
grid: N.value,
|
|
2351
|
+
treegrid: fr.value,
|
|
2352
|
+
cellRole: mr.value,
|
|
2353
|
+
rowHeaderKeys: hr.value,
|
|
2354
2354
|
contentInert: Qo.value,
|
|
2355
2355
|
hasRowIndex: $o.value,
|
|
2356
2356
|
rowOffset: $o.value ? ((G.page ?? 1) - 1) * (G.perPage ?? 0) : 0,
|
|
2357
2357
|
setSize: $o.value ? G.totalItems ?? void 0 : void 0,
|
|
2358
2358
|
columnSpan: ts.value,
|
|
2359
2359
|
inputName: _r,
|
|
2360
|
-
tdClass:
|
|
2360
|
+
tdClass: O.tdClass,
|
|
2361
2361
|
cellClasses: Ni.value,
|
|
2362
2362
|
sortOrders: Cu.value,
|
|
2363
2363
|
measureRow: hl,
|
|
@@ -2366,14 +2366,14 @@ var Ht = {
|
|
|
2366
2366
|
rowReorder: ei.value,
|
|
2367
2367
|
menuRows: zr
|
|
2368
2368
|
})), ku = m(() => ({
|
|
2369
|
-
passthrough:
|
|
2370
|
-
slots:
|
|
2371
|
-
selectable: !!
|
|
2369
|
+
passthrough: j,
|
|
2370
|
+
slots: A,
|
|
2371
|
+
selectable: !!O.selectable,
|
|
2372
2372
|
rowDrag: z.value,
|
|
2373
|
-
actions:
|
|
2374
|
-
cellRole:
|
|
2375
|
-
grid:
|
|
2376
|
-
rowHeaderKeys:
|
|
2373
|
+
actions: M.value,
|
|
2374
|
+
cellRole: mr.value,
|
|
2375
|
+
grid: N.value,
|
|
2376
|
+
rowHeaderKeys: hr.value,
|
|
2377
2377
|
contentInert: Qo.value,
|
|
2378
2378
|
columns: B.value.map((e) => {
|
|
2379
2379
|
let t = e.align ?? "start";
|
|
@@ -2394,12 +2394,12 @@ var Ht = {
|
|
|
2394
2394
|
}), ju = m(() => {
|
|
2395
2395
|
if (!$o.value || G.totalItems == null) return;
|
|
2396
2396
|
let e = G.totalItems + 1;
|
|
2397
|
-
if (
|
|
2398
|
-
if (!J.value.length) return
|
|
2397
|
+
if (cr.value) return e;
|
|
2398
|
+
if (!J.value.length) return O.loading ? A.loading ? e : Math.max(e, Su.value + 1) : Math.max(e, 2);
|
|
2399
2399
|
let t = $.value.length - Y.value.length;
|
|
2400
2400
|
return e + Number(X.value.first) + Number(X.value.last) + t;
|
|
2401
2401
|
}), Mu = C(null), Nu = C(0), Pu = /* @__PURE__ */ new WeakMap(), Fu = (e) => Array.from(e.querySelectorAll("[role=\"row\"]")).filter((t) => t.parentElement?.closest("[role=\"rowgroup\"], [role=\"table\"], [role=\"grid\"], [role=\"treegrid\"]") === e), Iu = () => {
|
|
2402
|
-
let e = Mu.value, t = e &&
|
|
2402
|
+
let e = Mu.value, t = e && A.tfoot ? Fu(e) : [];
|
|
2403
2403
|
Nu.value = t.length;
|
|
2404
2404
|
let n = ju.value;
|
|
2405
2405
|
t.forEach((e, t) => {
|
|
@@ -2425,11 +2425,11 @@ var Ht = {
|
|
|
2425
2425
|
}));
|
|
2426
2426
|
}), E(ju, Iu, { flush: "post" }), x(() => Lu?.disconnect());
|
|
2427
2427
|
let Ru = m(() => {
|
|
2428
|
-
let e = [], t = Number(z.value), n = t + +!!
|
|
2429
|
-
return t && (
|
|
2428
|
+
let e = [], t = Number(z.value), n = t + +!!O.selectable;
|
|
2429
|
+
return t && (O.selectable && O.fixedSelect || B.value.some((e) => e.fixed === "left")) && e.push({
|
|
2430
2430
|
index: 0,
|
|
2431
2431
|
position: "left"
|
|
2432
|
-
}),
|
|
2432
|
+
}), O.selectable && O.fixedSelect && e.push({
|
|
2433
2433
|
index: t,
|
|
2434
2434
|
position: "left"
|
|
2435
2435
|
}), B.value.forEach((t, r) => {
|
|
@@ -2437,7 +2437,7 @@ var Ht = {
|
|
|
2437
2437
|
index: r + n,
|
|
2438
2438
|
position: t.fixed
|
|
2439
2439
|
});
|
|
2440
|
-
}),
|
|
2440
|
+
}), M.value && O.fixedActions && e.push({
|
|
2441
2441
|
index: B.value.length + n,
|
|
2442
2442
|
position: "right"
|
|
2443
2443
|
}), e;
|
|
@@ -2452,7 +2452,7 @@ var Ht = {
|
|
|
2452
2452
|
let a = e === r && t === n?.[2];
|
|
2453
2453
|
Te(I.value, i, a ? Uo : null, a) && (Vo = e), e !== r && pc();
|
|
2454
2454
|
}
|
|
2455
|
-
|
|
2455
|
+
A.thead && b(Go);
|
|
2456
2456
|
}, { flush: "post" }), vt(() => {
|
|
2457
2457
|
Ri(), aa(), Fr.stop();
|
|
2458
2458
|
}), (r, i) => (S(), st(wt(Yo.value), ht(dt(Du.value)), {
|
|
@@ -2464,7 +2464,7 @@ var Ht = {
|
|
|
2464
2464
|
id: Dr.value,
|
|
2465
2465
|
class: "bb-table__caption",
|
|
2466
2466
|
hidden: !v.displayCaption
|
|
2467
|
-
}, T(
|
|
2467
|
+
}, T(j).caption), w(v.caption), 17, Ut)) : h("", !0),
|
|
2468
2468
|
v.reorderable || v.resizable ? (S(), g("div", {
|
|
2469
2469
|
key: 2,
|
|
2470
2470
|
id: Or.value,
|
|
@@ -2490,7 +2490,7 @@ var Ht = {
|
|
|
2490
2490
|
class: "bb-table__drag-icon",
|
|
2491
2491
|
icon: T(t),
|
|
2492
2492
|
size: "1em"
|
|
2493
|
-
}, T(
|
|
2493
|
+
}, T(j).dragIcon), null, 16, ["icon"]), _("span", null, w(Gi.value), 1)], 512)], 64)) : h("", !0),
|
|
2494
2494
|
_("div", ht(dt(Tu.value)), [
|
|
2495
2495
|
_("div", y({
|
|
2496
2496
|
class: ["bb-table__head", {
|
|
@@ -2499,25 +2499,25 @@ var Ht = {
|
|
|
2499
2499
|
}],
|
|
2500
2500
|
inert: Qo.value,
|
|
2501
2501
|
role: "rowgroup"
|
|
2502
|
-
}, T(
|
|
2502
|
+
}, T(j).head), [Ct(r.$slots, "thead", { empty: ps.value }, () => [_("div", y({
|
|
2503
2503
|
"aria-rowindex": $o.value ? 1 : void 0,
|
|
2504
2504
|
class: ["bb-table__header-row", v.headerRowClass],
|
|
2505
2505
|
role: "row",
|
|
2506
2506
|
onPointerdown: ma,
|
|
2507
2507
|
onTouchmove: ha
|
|
2508
|
-
}, T(
|
|
2508
|
+
}, T(j).headerRow), [
|
|
2509
2509
|
z.value ? (S(), g("div", y({
|
|
2510
2510
|
key: 0,
|
|
2511
2511
|
class: ["bb-table__cell-column-header bb-table__cell-column-header--row-drag", v.thClass],
|
|
2512
2512
|
role: "columnheader",
|
|
2513
2513
|
tabindex: jc(0)
|
|
2514
|
-
}, T(
|
|
2514
|
+
}, T(j).cellColumnHeader), [_("span", $t, w(T(F)("table.rowReorderHeader").value), 1)], 16, Qt)) : h("", !0),
|
|
2515
2515
|
v.selectable ? (S(), g("div", y({
|
|
2516
2516
|
key: 1,
|
|
2517
2517
|
class: ["bb-table__cell-column-header bb-table__cell-column-header--select", v.thClass],
|
|
2518
2518
|
role: "columnheader",
|
|
2519
2519
|
tabindex: jc(Number(z.value))
|
|
2520
|
-
}, T(
|
|
2520
|
+
}, T(j).cellColumnHeader), [Ct(r.$slots, "select:header", {
|
|
2521
2521
|
multiple: v.multiple,
|
|
2522
2522
|
selectAll: !!D.value,
|
|
2523
2523
|
text: v.selectText || T(F)("table.selectText").value
|
|
@@ -2566,14 +2566,14 @@ var Ht = {
|
|
|
2566
2566
|
"bb-table__cell-column-header--wrap": Ls.value.has(t.key)
|
|
2567
2567
|
}]],
|
|
2568
2568
|
style: Rs.value[t.key],
|
|
2569
|
-
"data-column-key": Mr.value ||
|
|
2569
|
+
"data-column-key": Mr.value || P.value ? t.key : void 0,
|
|
2570
2570
|
role: "columnheader",
|
|
2571
|
-
tabindex:
|
|
2571
|
+
tabindex: P.value ? jc(i + Number(z.value) + Number(!!v.selectable)) : Mr.value ? t.key === hi.value ? 0 : -1 : void 0,
|
|
2572
2572
|
onClick: (e) => gi(e, t),
|
|
2573
2573
|
onFocus: (e) => vi(t.key),
|
|
2574
2574
|
onKeydown: (e) => xi(e, t.key),
|
|
2575
2575
|
onMousedown: (e) => _i(e, t)
|
|
2576
|
-
}, { ref_for: !0 }, T(
|
|
2576
|
+
}, { ref_for: !0 }, T(j).part("cellColumnHeader", or(t.sortOrder))), [
|
|
2577
2577
|
hc(t.key, "prepend") ? (S(), st(gc, {
|
|
2578
2578
|
key: 0,
|
|
2579
2579
|
name: hc(t.key, "prepend"),
|
|
@@ -2589,12 +2589,12 @@ var Ht = {
|
|
|
2589
2589
|
toggleSort: (e) => ka(t.key, e)
|
|
2590
2590
|
}, () => [t.sortable ? (S(), st(at, {
|
|
2591
2591
|
key: 0,
|
|
2592
|
-
"aria-describedby": Ar.value && !Mr.value && !
|
|
2592
|
+
"aria-describedby": Ar.value && !Mr.value && !P.value ? kr.value : void 0,
|
|
2593
2593
|
class: mt(["bb-table-sort", {
|
|
2594
2594
|
"bb-table-sort--asc": t.sortOrder === "asc",
|
|
2595
2595
|
"bb-table-sort--desc": t.sortOrder === "desc"
|
|
2596
2596
|
}]),
|
|
2597
|
-
tabindex: Mr.value ||
|
|
2597
|
+
tabindex: Mr.value || P.value ? -1 : void 0,
|
|
2598
2598
|
type: "button",
|
|
2599
2599
|
onClick: (e) => ka(t.key, e)
|
|
2600
2600
|
}, {
|
|
@@ -2602,7 +2602,7 @@ var Ht = {
|
|
|
2602
2602
|
class: "bb-table__sort-icon",
|
|
2603
2603
|
icon: T(n),
|
|
2604
2604
|
size: "1em"
|
|
2605
|
-
}, { ref_for: !0 }, T(
|
|
2605
|
+
}, { ref_for: !0 }, T(j).part("sortIcon", or(t.sortOrder))), null, 16, ["icon"])]),
|
|
2606
2606
|
_: 2
|
|
2607
2607
|
}, 1032, [
|
|
2608
2608
|
"aria-describedby",
|
|
@@ -2623,12 +2623,12 @@ var Ht = {
|
|
|
2623
2623
|
onPointerdown: (e) => Ui(e, t.key)
|
|
2624
2624
|
}, null, 40, cn)) : h("", !0)
|
|
2625
2625
|
], 16, an))), 128)),
|
|
2626
|
-
|
|
2626
|
+
M.value ? (S(), g("div", y({
|
|
2627
2627
|
key: 2,
|
|
2628
2628
|
class: ["bb-table__cell-column-header bb-table__cell-column-header--actions", v.thClass],
|
|
2629
2629
|
role: "columnheader",
|
|
2630
2630
|
tabindex: jc(ts.value - 1)
|
|
2631
|
-
}, T(
|
|
2631
|
+
}, T(j).cellColumnHeader), [Ct(r.$slots, "actions:header", { text: v.actionsText || T(F)("table.actionsText").value }, () => [_("span", un, w(v.actionsText || T(F)("table.actionsText").value), 1)])], 16, ln)) : h("", !0)
|
|
2632
2632
|
], 16, Zt)])], 16, Xt),
|
|
2633
2633
|
_("div", y({
|
|
2634
2634
|
ref_key: "bodyRef",
|
|
@@ -2638,7 +2638,7 @@ var Ht = {
|
|
|
2638
2638
|
onPointerdown: Ir,
|
|
2639
2639
|
onFocusin: Bc,
|
|
2640
2640
|
onFocusout: Vc
|
|
2641
|
-
}, T(
|
|
2641
|
+
}, T(j).body), [Zo.value && !T(J).length ? Ct(r.$slots, "loading", { items: T(os) }, () => [(S(!0), g(ot, null, St(Su.value, (e, t) => (S(), g("div", {
|
|
2642
2642
|
key: t,
|
|
2643
2643
|
"aria-rowindex": $o.value ? t + 2 : void 0,
|
|
2644
2644
|
class: "bb-table-skeleton__row",
|
|
@@ -2647,17 +2647,17 @@ var Ht = {
|
|
|
2647
2647
|
z.value ? (S(), g("div", {
|
|
2648
2648
|
key: 0,
|
|
2649
2649
|
class: "bb-table-skeleton__cell bb-table-skeleton__cell--row-drag",
|
|
2650
|
-
role:
|
|
2650
|
+
role: mr.value
|
|
2651
2651
|
}, null, 8, fn)) : h("", !0),
|
|
2652
2652
|
v.selectable ? (S(), g("div", {
|
|
2653
2653
|
key: 1,
|
|
2654
2654
|
class: "bb-table-skeleton__cell bb-table-skeleton__cell--select",
|
|
2655
|
-
role:
|
|
2655
|
+
role: mr.value
|
|
2656
2656
|
}, [...i[0] ||= [_("div", { class: "bb-table-skeleton__placeholder" }, null, -1)]], 8, pn)) : h("", !0),
|
|
2657
2657
|
(S(!0), g(ot, null, St(B.value, (e, n) => (S(), g("div", {
|
|
2658
2658
|
key: e.key,
|
|
2659
2659
|
class: mt(["bb-table-skeleton__cell", [`bb-table-skeleton__cell--${e.skeleton ?? "text"}`]]),
|
|
2660
|
-
role:
|
|
2660
|
+
role: mr.value
|
|
2661
2661
|
}, [!e.skeleton || e.skeleton === "text" ? (S(), g("div", hn, [_("div", {
|
|
2662
2662
|
class: "bb-table-skeleton__line",
|
|
2663
2663
|
style: gt({ width: `${xu[(t + n) % 4]}%` })
|
|
@@ -2671,10 +2671,10 @@ var Ht = {
|
|
|
2671
2671
|
class: "bb-table-skeleton__line",
|
|
2672
2672
|
style: gt({ width: `${xu[(t + n + 2) % 4]}%` })
|
|
2673
2673
|
}, null, 4)])])) : e.skeleton === "image" ? (S(), g("div", yn)) : e.skeleton === "badge" ? (S(), g("div", bn)) : h("", !0)], 10, mn))), 128)),
|
|
2674
|
-
|
|
2674
|
+
M.value ? (S(), g("div", {
|
|
2675
2675
|
key: 2,
|
|
2676
2676
|
class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions",
|
|
2677
|
-
role:
|
|
2677
|
+
role: mr.value
|
|
2678
2678
|
}, [...i[2] ||= [_("div", { class: "bb-table-skeleton__placeholder" }, null, -1)]], 8, xn)) : h("", !0)
|
|
2679
2679
|
], 8, dn))), 128))], void 0, 0) : T(J).length ? Ct(r.$slots, "tbody", {}, () => [
|
|
2680
2680
|
X.value.first ? (S(), st(T(ve), {
|
|
@@ -2753,14 +2753,14 @@ var Ht = {
|
|
|
2753
2753
|
}, [_("div", {
|
|
2754
2754
|
"aria-colspan": ts.value,
|
|
2755
2755
|
class: "bb-table-empty__cell",
|
|
2756
|
-
role:
|
|
2756
|
+
role: mr.value
|
|
2757
2757
|
}, [_("div", wn, [Ct(r.$slots, "empty", { error: T(cs) }, () => [_("span", Tn, w(T(cs) === null ? v.emptyText || T(F)("common.emptyText").value : v.failedText || T(F)("common.failedText").value), 1)])])], 8, Cn)], 8, Sn))], 16),
|
|
2758
2758
|
_("div", y({
|
|
2759
2759
|
ref_key: "footRef",
|
|
2760
2760
|
ref: Mu,
|
|
2761
2761
|
class: "bb-table__foot",
|
|
2762
|
-
role:
|
|
2763
|
-
}, T(
|
|
2762
|
+
role: A.tfoot ? "rowgroup" : void 0
|
|
2763
|
+
}, T(j).foot), [Ct(r.$slots, "tfoot", {
|
|
2764
2764
|
columnCount: ts.value,
|
|
2765
2765
|
empty: ps.value
|
|
2766
2766
|
})], 16, Dn)
|