bitboss-ui 3.0.0-beta.74 → 3.0.0-beta.75
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/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +2 -2
- package/dist/ai/BbCalendar.md +5 -2
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +12 -0
- package/dist/ai/BbColorPalette.md +11 -6
- package/dist/ai/BbDatePicker.md +12 -0
- package/dist/ai/BbDatePickerInput.md +17 -1
- package/dist/ai/BbDialog.md +3 -1
- package/dist/ai/BbDropdown.md +155 -60
- package/dist/ai/BbDropdownButton.md +25 -6
- package/dist/ai/BbNumberInput.md +3 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +79 -67
- package/dist/ai/BbSelectPopover.md +24 -5
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +17 -16
- package/dist/ai/BbTimePicker.md +12 -0
- package/dist/ai/BbTimePickerInput.md +15 -1
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTree.md +5 -1
- package/dist/ai/CommonPopover.md +1 -0
- package/dist/ai/FlatListBox.md +1 -0
- package/dist/ai/GroupedListBox.md +1 -0
- package/dist/ai/ListBox.md +1 -0
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +163 -6
- package/dist/ai/components.json +32 -34
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +8 -4
- package/dist/ai/guides/design-tokens.md +13 -0
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
- package/dist/ai/guides/migration/components/bb-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +22 -5
- package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
- package/dist/ai/guides/passthrough.md +3 -3
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +1 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
- package/dist/ai/manifest/components/BbCarousel.json +0 -3
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbColorInput.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbDatePicker.json +3 -0
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -0
- package/dist/ai/manifest/components/BbDropdown.json +20 -14
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +13 -3
- package/dist/ai/manifest/components/BbDropdownButton.json +13 -7
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +2 -0
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbSelect.json +10 -7
- package/dist/ai/manifest/components/BbSelectPopover.json +6 -3
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -1
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbTable.json +6 -6
- package/dist/ai/manifest/components/BbTable.tree.json +4 -0
- package/dist/ai/manifest/components/BbTimePicker.json +5 -2
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -0
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +2 -1
- package/dist/ai/manifest/components/ListBox.json +2 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +0 -3
- package/dist/ai/manifest/types.advanced.json +6 -6
- package/dist/ai/manifest/types.api.json +1 -3
- package/dist/ai/source/BbAvatar.md +119 -9
- package/dist/ai/source/BbBadge.md +12 -5
- package/dist/ai/source/BbBreadcrumbs.md +52 -54
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCarousel.md +31 -28
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +18 -0
- package/dist/ai/source/BbDatePicker.md +18 -0
- package/dist/ai/source/BbDatePickerInput.md +40 -1
- package/dist/ai/source/BbDialog.md +14 -1
- package/dist/ai/source/BbDropdown.md +211 -39
- package/dist/ai/source/BbDropdownButton.md +27 -2
- package/dist/ai/source/BbDropdownGroup.md +104 -38
- package/dist/ai/source/BbGallery.md +76 -55
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbNumberInput.md +17 -10
- package/dist/ai/source/BbOffCanvas.md +14 -1
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbSelect.md +35 -20
- package/dist/ai/source/BbSelectPopover.md +116 -8
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +72 -26
- package/dist/ai/source/BbTimePicker.md +19 -0
- package/dist/ai/source/BbTimePickerInput.md +15 -0
- package/dist/ai/source/BbToast.md +2 -2
- package/dist/ai/source/BbToastPortal.md +2 -2
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/CommonPopover.md +24 -1
- package/dist/ai/source/FlatListBox.md +26 -5
- package/dist/ai/source/GroupedListBox.md +63 -11
- package/dist/ai/source/ListBox.md +4 -0
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +61 -43
- package/dist/components/BbAvatar/avatarIdentity.js +25 -0
- package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
- package/dist/components/BbAvatar/types.d.ts +24 -5
- package/dist/components/BbAvatar/types.js +5 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +80 -79
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +152 -158
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
- package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
- package/dist/components/BbColorInput/types.d.ts +7 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +213 -202
- package/dist/components/BbColorPalette/types.d.ts +7 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +3 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +84 -73
- package/dist/components/BbDatePicker/types.d.ts +7 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +495 -510
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +219 -211
- package/dist/components/BbDialog/leaveGhost.js +22 -17
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +92 -87
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +412 -369
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +382 -338
- package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
- package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +117 -102
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +73 -45
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbDropdown/types.d.ts +65 -41
- package/dist/components/BbDropdown/types.js +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -72
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +48 -0
- package/dist/components/BbDropdownButton/types.d.ts +13 -2
- package/dist/components/BbDropdownButton/types.js +2 -0
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +318 -296
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +9 -5
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +152 -144
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +167 -163
- package/dist/components/BbSelect/types.d.ts +23 -20
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +3 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +680 -637
- package/dist/components/BbSelectPopover/types.d.ts +10 -4
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
- package/dist/components/BbSwitchGroup/types.d.ts +3 -6
- package/dist/components/BbTable/BbTable.vue.d.ts +1 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1086 -1069
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +3 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +145 -134
- package/dist/components/BbTimePicker/types.d.ts +7 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +3 -1
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +268 -259
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +12 -12
- package/dist/components/BbToast/types.d.ts +2 -2
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
- package/dist/components/BbTree/types.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +115 -96
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +194 -166
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/locales/ar.json +2 -0
- package/dist/i18n/locales/cs.json +2 -0
- package/dist/i18n/locales/da.json +2 -0
- package/dist/i18n/locales/de-CH.json +2 -0
- package/dist/i18n/locales/de.json +2 -0
- package/dist/i18n/locales/el.json +2 -0
- package/dist/i18n/locales/en-GB.json +2 -0
- package/dist/i18n/locales/en.json +2 -0
- package/dist/i18n/locales/es-MX.json +2 -0
- package/dist/i18n/locales/es.json +2 -0
- package/dist/i18n/locales/fa.json +2 -0
- package/dist/i18n/locales/fi.json +2 -0
- package/dist/i18n/locales/fr.json +2 -0
- package/dist/i18n/locales/he.json +2 -0
- package/dist/i18n/locales/hu.json +2 -0
- package/dist/i18n/locales/it.json +2 -0
- package/dist/i18n/locales/ja.json +2 -0
- package/dist/i18n/locales/ko.json +2 -0
- package/dist/i18n/locales/nb.json +2 -0
- package/dist/i18n/locales/nl.json +2 -0
- package/dist/i18n/locales/pl.json +2 -0
- package/dist/i18n/locales/pt-BR.json +2 -0
- package/dist/i18n/locales/pt-PT.json +2 -0
- package/dist/i18n/locales/ro.json +2 -0
- package/dist/i18n/locales/ru.json +2 -0
- package/dist/i18n/locales/sv.json +2 -0
- package/dist/i18n/locales/tr.json +2 -0
- package/dist/i18n/locales/uk.json +2 -0
- package/dist/i18n/locales/zh-CN.json +2 -0
- package/dist/i18n/locales/zh-HK.json +2 -0
- package/dist/i18n/locales/zh-TW.json +2 -0
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +2 -2
- package/dist/llms-full.txt +573 -276
- package/dist/llms-medium.txt +8 -4
- package/dist/llms.txt +1 -1
- package/dist/locale-blueprint.json +2 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -3
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/ptComponentMap.d.ts +3 -3
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite.js +4 -1
- package/llms.txt +1 -1
- package/package.json +3 -1
- package/scripts/README.md +2 -0
- package/scripts/lib/agent-setup.mjs +44 -26
- package/scripts/lib/validate-bb-markup.mjs +20 -0
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
|
@@ -5,61 +5,63 @@ import { useConfigDefaults as r } from "../../composables/useConfigDefaults.js";
|
|
|
5
5
|
import { clamp as i } from "../../utilities/functions/clamp.js";
|
|
6
6
|
import { hash as a } from "../../utilities/functions/hash.js";
|
|
7
7
|
import { isNil as o } from "../../utilities/functions/isNil.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import ce from "
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
import ge from "
|
|
26
|
-
import _e from "./
|
|
27
|
-
import ve from "./
|
|
28
|
-
import ye from "./
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import at from "
|
|
41
|
-
import
|
|
42
|
-
import {
|
|
8
|
+
import { slotContent as s } from "../../utilities/functions/slotContent.js";
|
|
9
|
+
import { when as c } from "../../utilities/functions/when.js";
|
|
10
|
+
import { useId as l } from "../../composables/useId.js";
|
|
11
|
+
import { useItemValue as u } from "../../composables/useItemValue.js";
|
|
12
|
+
import { useItemsGetter as d } from "../../composables/useItemsGetter.js";
|
|
13
|
+
import { SsrMarker as f } from "../../composables/ssrMarker.js";
|
|
14
|
+
import { usePrefill as p } from "../../composables/usePrefill.js";
|
|
15
|
+
import { useIndexById as ee } from "../../composables/useIndexById.js";
|
|
16
|
+
import { useBaseOptions as te } from "../../composables/useBaseOptions.js";
|
|
17
|
+
import { useHashedWatcher as ne } from "../../composables/useHashedWatcher.js";
|
|
18
|
+
import { useTableWidthContext as re } from "../../composables/useTableWidthContext.js";
|
|
19
|
+
import { useLocale as ie } from "../../composables/useLocale.js";
|
|
20
|
+
import { removedPropsFor as ae } from "../../deprecation/removedProps.js";
|
|
21
|
+
import { warnRemovedAttrs as oe } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
22
|
+
import { parseCount as se, parsePositiveInteger as ce } from "../../utilities/functions/parsePaginationNumber.js";
|
|
23
|
+
import le from "../BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue.js";
|
|
24
|
+
import { useToggleFocus as ue } from "../../composables/useToggleInput.js";
|
|
25
|
+
import { preventReadonlyClick as de, preventReadonlyKeydown as fe, revertReadonlyChange as pe, syncCheckedToData as me, syncIndeterminate as he, toggleInputAttrs as ge } from "../../utilities/functions/toggleInput.js";
|
|
26
|
+
import _e from "./BbTableDataRow.js";
|
|
27
|
+
import ve from "./BbTableExpandRow.js";
|
|
28
|
+
import ye from "./BbTableEdgeRow.js";
|
|
29
|
+
import be from "./BbTableRowMenu.js";
|
|
30
|
+
import { hasVisibleRow as xe } from "../BbDropdown/normalizeGroups.js";
|
|
31
|
+
import { pressedInteractive as Se, useRowReorder as Ce } from "./useRowReorder.js";
|
|
32
|
+
import { BB_TABLE_PT as we } from "./types.js";
|
|
33
|
+
import { usePassthrough as Te } from "../../composables/usePassthrough.js";
|
|
34
|
+
import { applyFixedTableColumns as Ee, cellRole as De, columnKeyToSlotName as Oe, completeColumnOrder as ke, estimateFromProfile as Ae, estimateSamples as je, fitFloors as Me, floorTextPx as Ne, lockColumnOrder as Pe, mergeCellClasses as Fe, mergeHeaderClasses as Ie, mergeRowClasses as Le, moveColumnKey as Re, orderColumns as ze, profileValues as Be, readResolvedTracks as Ve, reorderRange as He, rowNameText as Ue, sameColumnOrder as We, sampleForEstimate as Ge } from "./utils.js";
|
|
35
|
+
import { createMeasuredFloors as Ke } from "./measuredFloors.js";
|
|
36
|
+
import { useBbTableHost as qe } from "../../composables/useBbTable.js";
|
|
37
|
+
import { useLogger as Je } from "../../composables/useLogger.js";
|
|
38
|
+
import { flowsRtl as Ye, isRtl as Xe } from "../../composables/useDirection.js";
|
|
39
|
+
import { escapeStackDepth as Ze, isTopEscapeEntry as Qe, pushEscapeEntry as $e, removeEscapeEntry as et } from "../../utils/overlayEscapeStack.js";
|
|
40
|
+
import { GRID_FOCUSABLE as tt, GRID_MANAGED_ATTR as nt, cellWidgets as rt, restoreTabOrder as it, takeOutOfTabOrder as at } from "./gridWidgets.js";
|
|
41
|
+
import ot from "../BbBaseButton/BbBaseButton.vue.js";
|
|
42
|
+
import { runRetry as st } from "../../utils/loadRetry.js";
|
|
43
|
+
import { Fragment as ct, computed as m, createBlock as lt, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as ut, createVNode as dt, defineComponent as v, getCurrentInstance as ft, guardReactiveProps as pt, isReactive as mt, mergeModels as ht, mergeProps as y, nextTick as b, normalizeClass as gt, normalizeProps as _t, normalizeStyle as vt, onBeforeUnmount as x, onBeforeUpdate as yt, onDeactivated as bt, onMounted as xt, onUpdated as St, openBlock as S, reactive as Ct, ref as C, renderList as wt, renderSlot as Tt, resolveDynamicComponent as Et, shallowRef as Dt, toDisplayString as w, toRaw as Ot, toRef as kt, unref as T, useAttrs as At, useModel as jt, useSlots as Mt, watch as E, watchEffect as Nt, withCtx as Pt, withModifiers as Ft } from "vue";
|
|
44
|
+
import { defaultRangeExtractor as It, elementScroll as Lt, observeElementOffset as Rt, observeElementRect as zt, observeWindowOffset as Bt, observeWindowRect as Vt, useVirtualizer as Ht, windowScroll as Ut } from "@tanstack/vue-virtual";
|
|
43
45
|
// src/components/BbTable/BbTable.vue?vue&type=script&setup=true&lang.ts
|
|
44
|
-
var
|
|
46
|
+
var Wt = {
|
|
45
47
|
key: 0,
|
|
46
48
|
class: "bb-sr-only"
|
|
47
|
-
},
|
|
49
|
+
}, Gt = ["id", "hidden"], Kt = ["id"], qt = ["id"], Jt = {
|
|
48
50
|
"aria-live": "polite",
|
|
49
51
|
class: "bb-table-loading__text bb-sr-only",
|
|
50
52
|
role: "status"
|
|
51
|
-
},
|
|
53
|
+
}, Yt = ["id"], Xt = {
|
|
52
54
|
"aria-live": "polite",
|
|
53
55
|
class: "bb-table__row-reorder-status bb-sr-only",
|
|
54
56
|
role: "status"
|
|
55
|
-
},
|
|
57
|
+
}, Zt = {
|
|
56
58
|
"aria-live": "polite",
|
|
57
59
|
class: "bb-table__reorder-status bb-sr-only",
|
|
58
60
|
role: "status"
|
|
59
|
-
},
|
|
61
|
+
}, Qt = ["inert"], $t = ["aria-rowindex"], en = ["tabindex"], tn = { class: "bb-table-header__content bb-sr-only" }, nn = ["tabindex"], rn = { class: "bb-table-header__content" }, an = { class: "bb-table-check__label-text bb-sr-only" }, on = {
|
|
60
62
|
key: 1,
|
|
61
63
|
class: "bb-table-radio__label-text bb-sr-only"
|
|
62
|
-
},
|
|
64
|
+
}, sn = [
|
|
63
65
|
"aria-describedby",
|
|
64
66
|
"aria-sort",
|
|
65
67
|
"data-column-key",
|
|
@@ -68,28 +70,34 @@ var Ht = {
|
|
|
68
70
|
"onFocus",
|
|
69
71
|
"onKeydown",
|
|
70
72
|
"onMousedown"
|
|
71
|
-
],
|
|
73
|
+
], cn = { class: "bb-table-header__content" }, ln = {
|
|
72
74
|
key: 1,
|
|
73
75
|
class: "bb-table-header__content"
|
|
74
|
-
},
|
|
76
|
+
}, un = ["onDblclick", "onPointerdown"], dn = ["tabindex"], fn = { class: "bb-table-header__content bb-sr-only" }, pn = ["aria-rowindex"], mn = ["role"], hn = ["role"], gn = ["role"], _n = {
|
|
75
77
|
key: 0,
|
|
76
78
|
class: "bb-table-skeleton__cell-content"
|
|
77
|
-
},
|
|
79
|
+
}, vn = {
|
|
78
80
|
key: 1,
|
|
79
81
|
class: "bb-table-skeleton__avatar"
|
|
80
|
-
},
|
|
82
|
+
}, yn = {
|
|
81
83
|
key: 2,
|
|
82
84
|
class: "bb-table-skeleton__avatar-text"
|
|
83
|
-
},
|
|
85
|
+
}, bn = { class: "bb-table-skeleton__cell-content" }, xn = {
|
|
84
86
|
key: 3,
|
|
85
87
|
class: "bb-table-skeleton__image"
|
|
86
|
-
},
|
|
88
|
+
}, Sn = {
|
|
87
89
|
key: 4,
|
|
88
90
|
class: "bb-table-skeleton__badge"
|
|
89
|
-
},
|
|
91
|
+
}, Cn = ["role"], wn = ["aria-rowindex"], Tn = ["aria-colspan", "role"], En = {
|
|
92
|
+
key: 0,
|
|
93
|
+
class: "bb-table-empty__content bb-table-empty__content--failed"
|
|
94
|
+
}, Dn = { class: "bb-table-empty__failed" }, On = { class: "bb-table-empty__text" }, kn = {
|
|
95
|
+
key: 1,
|
|
96
|
+
class: "bb-table-empty__content"
|
|
97
|
+
}, An = { class: "bb-table-empty__text" }, jn = ["data-index"], Mn = ["role"], Nn = "__bb-row-drag", Pn = 500, Fn = 10, In = 1e3, Ln = 48, Rn = 10, zn = "bb-table-resizing", Bn = 5, Vn = 10, Hn = 500, Un = 40, Wn = 12, Gn = 4, Kn = 12, qn = "a, button:not(.bb-table-sort), input, select, textarea, [contenteditable], [role=\"button\"], .bb-table-header__resizer", Jn = 12, Yn = 10, Xn = "a[href], button:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]:not([tabindex=\"-1\"])", Zn = 600, Qn = -1, $n = -2, er = -3, tr = 120, nr = 6, rr = 800, ir = 120, ar = 10, D = /*@__PURE__*/ v({
|
|
90
98
|
inheritAttrs: !1,
|
|
91
99
|
__name: "BbTable",
|
|
92
|
-
props: /*@__PURE__*/
|
|
100
|
+
props: /*@__PURE__*/ ht({
|
|
93
101
|
"pt:root": {},
|
|
94
102
|
"pt:root:empty": {},
|
|
95
103
|
"pt:root:loading": {},
|
|
@@ -253,7 +261,7 @@ var Ht = {
|
|
|
253
261
|
},
|
|
254
262
|
highlightedModifiers: {}
|
|
255
263
|
}),
|
|
256
|
-
emits: /*@__PURE__*/
|
|
264
|
+
emits: /*@__PURE__*/ ht([
|
|
257
265
|
"click:row",
|
|
258
266
|
"contextmenu:row",
|
|
259
267
|
"dblclick:row",
|
|
@@ -275,59 +283,59 @@ var Ht = {
|
|
|
275
283
|
"update:order",
|
|
276
284
|
"update:highlighted"
|
|
277
285
|
]),
|
|
278
|
-
setup(v, { emit:
|
|
279
|
-
let D =
|
|
286
|
+
setup(v, { emit: ht }) {
|
|
287
|
+
let D = jt(v, "selectAll"), or = jt(v, "sort"), sr = jt(v, "order"), cr = jt(v, "highlighted"), O = v, k = ht, A = Mt(), lr = jt(O, "expandedItems"), ur = r("BbTable", O, { compact: !1 }), j = Te({
|
|
280
288
|
component: "BbTable",
|
|
281
|
-
attrs:
|
|
289
|
+
attrs: At(),
|
|
282
290
|
props: O,
|
|
283
|
-
parts:
|
|
284
|
-
states:
|
|
291
|
+
parts: we.parts,
|
|
292
|
+
states: we.states,
|
|
285
293
|
active: {
|
|
286
|
-
loading: () =>
|
|
294
|
+
loading: () => ns.value,
|
|
287
295
|
empty: () => !J.value.length
|
|
288
296
|
}
|
|
289
|
-
}),
|
|
297
|
+
}), dr = (e) => ({
|
|
290
298
|
sorted: !!e,
|
|
291
299
|
sortedDesc: e === "desc"
|
|
292
300
|
});
|
|
293
|
-
process.env.NODE_ENV !== "production" &&
|
|
301
|
+
process.env.NODE_ENV !== "production" && oe("BbTable", ae("BbTable"), {
|
|
294
302
|
slotKeys: () => (O.columns ?? []).map((e) => e.key),
|
|
295
303
|
fixedSlots: ["header:prepend", "header:append"]
|
|
296
304
|
});
|
|
297
|
-
let M = C(!!A.actions),
|
|
298
|
-
|
|
299
|
-
let e =
|
|
300
|
-
e !==
|
|
305
|
+
let M = C(!!A.actions), fr = C(!!A.expand), pr = C(!!A.tbody), mr = C(!!A.thead), hr = () => Object.keys(A).filter((e) => /:(first|last)$/.test(e)).sort().join(" "), gr = C(hr());
|
|
306
|
+
yt(() => {
|
|
307
|
+
let e = hr();
|
|
308
|
+
e !== gr.value && (gr.value = e);
|
|
301
309
|
let t = !!A.actions;
|
|
302
|
-
t !== M.value && (M.value = t), !!A.expand !==
|
|
310
|
+
t !== M.value && (M.value = t), !!A.expand !== fr.value && (fr.value = !!A.expand), !!A.tbody !== pr.value && (pr.value = !!A.tbody), !!A.thead !== mr.value && (mr.value = !!A.thead);
|
|
303
311
|
});
|
|
304
|
-
let N = m(() => !!O.keyboardNavigation && !
|
|
305
|
-
O.multiple && !Array.isArray(O.modelValue) &&
|
|
306
|
-
let
|
|
312
|
+
let N = m(() => !!O.keyboardNavigation && !pr.value), _r = m(() => N.value && fr.value), vr = m(() => _r.value ? "treegrid" : N.value ? "grid" : "table"), yr = m(() => N.value ? "gridcell" : "cell"), br = m(() => new Set(O.columns.filter((e) => e.rowHeader).map((e) => String(e.key)))), P = m(() => N.value && !mr.value), { getItemValue: xr } = u(), Sr = l().id.value, Cr = (e) => `expanded_${Sr}_${e}`;
|
|
313
|
+
O.multiple && !Array.isArray(O.modelValue) && Je().throw("BbTable is set for multiple selection but modelValue is not an array.");
|
|
314
|
+
let wr = ["actions", "select"];
|
|
307
315
|
if (process.env.NODE_ENV !== "production") {
|
|
308
|
-
let e = O.columns.filter((e) =>
|
|
309
|
-
for (let t of e)
|
|
316
|
+
let e = O.columns.filter((e) => wr.includes(e.key));
|
|
317
|
+
for (let t of e) Je().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
318
|
}
|
|
311
|
-
let { t: F } =
|
|
319
|
+
let { t: F } = ie(), I = C(), L = C(), { id: Tr, parentId: Er, parentNode: Dr, node: Or, cssVars: kr, parentVar: Ar, setTracks: jr } = re({
|
|
312
320
|
id: () => O.id,
|
|
313
321
|
container: () => L.value,
|
|
314
322
|
inheritFrom: () => typeof O.inheritColumnWidths == "string" ? O.inheritColumnWidths : void 0
|
|
315
|
-
}),
|
|
323
|
+
}), Mr = m(() => `${Tr.value}__caption`), Nr = m(() => `${Tr.value}__header_instructions`), Pr = m(() => `${Tr.value}__sort_instructions`), Fr = m(() => !O.multiSort && O.columns.some((e) => e.sortable)), Ir = (e) => {
|
|
316
324
|
let t = [];
|
|
317
|
-
return
|
|
318
|
-
},
|
|
325
|
+
return Lr.value && t.push(Nr.value), Fr.value && e.sortable && (Lr.value || P.value) && t.push(Pr.value), t.join(" ") || void 0;
|
|
326
|
+
}, Lr = m(() => !!(O.reorderable || O.resizable)), R = C(null), Rr = C(null), z = m(() => !!O.reorderableRows && !pr.value), zr = m(() => `${Tr.value}__row-reorder-instructions`), Br = Ce({
|
|
319
327
|
bodyRef: R,
|
|
320
328
|
containerRef: L,
|
|
321
|
-
enabled: () => z.value && !
|
|
329
|
+
enabled: () => z.value && !rs.value,
|
|
322
330
|
count: () => Y.value.length,
|
|
323
331
|
indexOf: (e) => Y.value.findIndex((t) => t.valueHash === e),
|
|
324
332
|
itemAt: (e) => {
|
|
325
|
-
let t =
|
|
326
|
-
return !Array.isArray(O.items) ||
|
|
333
|
+
let t = Ot(Y.value[e]?.item);
|
|
334
|
+
return !Array.isArray(O.items) || mt(O.items) ? t : O.items.find((e) => Ot(e) === t) ?? t;
|
|
327
335
|
},
|
|
328
336
|
valueHashAt: (e) => Y.value[e]?.valueHash,
|
|
329
|
-
spanOf: (e) => q.value ?
|
|
330
|
-
labelAt: (e) => Y.value[e] ?
|
|
337
|
+
spanOf: (e) => q.value ? Sl(e) : null,
|
|
338
|
+
labelAt: (e) => Y.value[e] ? Ue(Ac(e).cols, br.value) : "",
|
|
331
339
|
emit: (e) => k("reorder:rows", e),
|
|
332
340
|
text: {
|
|
333
341
|
lifted: (e, t, n) => F("table.rowLifted", e, t, n).value,
|
|
@@ -336,14 +344,14 @@ var Ht = {
|
|
|
336
344
|
cancelled: (e, t, n) => F("table.rowMoveCancelled", e, t, n).value
|
|
337
345
|
}
|
|
338
346
|
});
|
|
339
|
-
x(
|
|
340
|
-
let
|
|
341
|
-
z.value &&
|
|
342
|
-
},
|
|
343
|
-
|
|
347
|
+
x(Br.stop);
|
|
348
|
+
let Vr = (e) => {
|
|
349
|
+
z.value && Br.onBodyPointerDown(e), ri(e);
|
|
350
|
+
}, Hr = C(null), Ur = Dt([]), Wr = Ct(/* @__PURE__ */ new Set()), Gr = null, Kr = 0, qr = !1, Jr = !1, Yr = null, Xr = () => {
|
|
351
|
+
Yr && clearTimeout(Yr.timer), Yr = null;
|
|
344
352
|
};
|
|
345
|
-
x(
|
|
346
|
-
let
|
|
353
|
+
x(Xr);
|
|
354
|
+
let Zr = (e, t, n) => {
|
|
347
355
|
let r = e.getBoundingClientRect(), i = t - r.left, a = n - r.top;
|
|
348
356
|
return {
|
|
349
357
|
contextElement: e,
|
|
@@ -362,182 +370,182 @@ var Ht = {
|
|
|
362
370
|
};
|
|
363
371
|
}
|
|
364
372
|
};
|
|
365
|
-
},
|
|
373
|
+
}, Qr = (e) => {
|
|
366
374
|
let t = e.target;
|
|
367
375
|
if (!(t instanceof Element)) return null;
|
|
368
376
|
let n = t.closest(".bb-table__row");
|
|
369
|
-
return !n || n.closest(".bb-table__body") !== R.value ||
|
|
370
|
-
},
|
|
377
|
+
return !n || n.closest(".bb-table__body") !== R.value || Se(e, n) ? null : n;
|
|
378
|
+
}, $r = (e, t, n, r) => {
|
|
371
379
|
let i = new MouseEvent("contextmenu", {
|
|
372
380
|
bubbles: !0,
|
|
373
381
|
cancelable: !0,
|
|
374
382
|
clientX: t,
|
|
375
383
|
clientY: n
|
|
376
384
|
});
|
|
377
|
-
|
|
385
|
+
Gr = r;
|
|
378
386
|
try {
|
|
379
387
|
e.dispatchEvent(i);
|
|
380
388
|
} finally {
|
|
381
|
-
|
|
389
|
+
Gr = null;
|
|
382
390
|
}
|
|
383
391
|
return i.defaultPrevented;
|
|
384
|
-
},
|
|
385
|
-
let r =
|
|
392
|
+
}, ei = (e, t, n) => {
|
|
393
|
+
let r = Gr;
|
|
386
394
|
if (!O.rowMenu || e.defaultPrevented) return;
|
|
387
|
-
if (e.isTrusted &&
|
|
395
|
+
if (e.isTrusted && Wr.has(t) && performance.now() - Kr < 1e3) {
|
|
388
396
|
e.preventDefault(), e.stopPropagation();
|
|
389
397
|
return;
|
|
390
398
|
}
|
|
391
399
|
let i = O.rowMenu(n);
|
|
392
|
-
if (!
|
|
393
|
-
e.preventDefault(), e.stopPropagation(), r && (
|
|
400
|
+
if (!xe(i)) return;
|
|
401
|
+
e.preventDefault(), e.stopPropagation(), r && (Kr = performance.now());
|
|
394
402
|
let a = e.currentTarget, o = document.activeElement, s = o instanceof HTMLElement && a.contains(o) ? o : null;
|
|
395
|
-
|
|
396
|
-
let c =
|
|
403
|
+
Jr = !0, Wr.clear(), Wr.add(t), Ur.value = i;
|
|
404
|
+
let c = Zr(a, e.clientX, e.clientY);
|
|
397
405
|
b(async () => {
|
|
398
|
-
await
|
|
406
|
+
await Hr.value?.open(c, r === "keyboard" ? "keyboard" : "pointer", s), Jr = !1;
|
|
399
407
|
});
|
|
400
|
-
},
|
|
401
|
-
!
|
|
402
|
-
},
|
|
403
|
-
if (!O.rowMenu || e.key !== "ContextMenu" && !(e.key === "F10" && e.shiftKey) || !
|
|
408
|
+
}, ti = () => {
|
|
409
|
+
!Jr && !Hr.value?.isOpen() && Wr.clear();
|
|
410
|
+
}, ni = (e) => {
|
|
411
|
+
if (!O.rowMenu || e.key !== "ContextMenu" && !(e.key === "F10" && e.shiftKey) || !Qr(e)) return;
|
|
404
412
|
let t = e.target, n = t.getBoundingClientRect();
|
|
405
|
-
|
|
406
|
-
},
|
|
407
|
-
if (
|
|
413
|
+
$r(t, n.left, n.bottom, "keyboard") && e.preventDefault();
|
|
414
|
+
}, ri = (e) => {
|
|
415
|
+
if (qr = !1, Xr(), !O.rowMenu || e.pointerType !== "touch" || !Qr(e)) return;
|
|
408
416
|
let t = e.target, { clientX: n, clientY: r } = e;
|
|
409
|
-
|
|
417
|
+
Yr = {
|
|
410
418
|
x: n,
|
|
411
419
|
y: r,
|
|
412
420
|
timer: setTimeout(() => {
|
|
413
|
-
|
|
414
|
-
},
|
|
421
|
+
Yr = null, t.isConnected && $r(t, n, r, "touch") && (qr = !0);
|
|
422
|
+
}, Pn)
|
|
415
423
|
};
|
|
416
|
-
},
|
|
424
|
+
}, ii = [
|
|
417
425
|
[
|
|
418
426
|
"click",
|
|
419
427
|
(e) => {
|
|
420
|
-
|
|
428
|
+
qr && (qr = !1, e.preventDefault(), e.stopPropagation());
|
|
421
429
|
},
|
|
422
430
|
!0
|
|
423
431
|
],
|
|
424
432
|
[
|
|
425
433
|
"keydown",
|
|
426
|
-
|
|
434
|
+
ni,
|
|
427
435
|
!1
|
|
428
436
|
],
|
|
429
437
|
[
|
|
430
438
|
"pointercancel",
|
|
431
|
-
|
|
439
|
+
Xr,
|
|
432
440
|
!1
|
|
433
441
|
],
|
|
434
442
|
[
|
|
435
443
|
"pointermove",
|
|
436
444
|
(e) => {
|
|
437
|
-
|
|
445
|
+
Yr && Math.hypot(e.clientX - Yr.x, e.clientY - Yr.y) > Fn && Xr();
|
|
438
446
|
},
|
|
439
447
|
!1
|
|
440
448
|
],
|
|
441
449
|
[
|
|
442
450
|
"pointerup",
|
|
443
|
-
|
|
451
|
+
Xr,
|
|
444
452
|
!1
|
|
445
453
|
],
|
|
446
454
|
[
|
|
447
455
|
"touchend",
|
|
448
456
|
(e) => {
|
|
449
|
-
|
|
457
|
+
qr && e.cancelable && e.preventDefault();
|
|
450
458
|
},
|
|
451
459
|
!1
|
|
452
460
|
]
|
|
453
461
|
];
|
|
454
|
-
|
|
455
|
-
for (let [e, t, n] of
|
|
462
|
+
xt(() => {
|
|
463
|
+
for (let [e, t, n] of ii) R.value?.addEventListener(e, t, { capture: n });
|
|
456
464
|
}), x(() => {
|
|
457
|
-
for (let [e, t, n] of
|
|
465
|
+
for (let [e, t, n] of ii) R.value?.removeEventListener(e, t, { capture: n });
|
|
458
466
|
});
|
|
459
|
-
let
|
|
460
|
-
describedBy:
|
|
467
|
+
let ai = m(() => z.value ? {
|
|
468
|
+
describedBy: zr.value,
|
|
461
469
|
nameFor: (e) => F("table.moveRow", e).value.trim(),
|
|
462
|
-
onKeydown:
|
|
463
|
-
} : null),
|
|
464
|
-
let e = new Set(
|
|
470
|
+
onKeydown: Br.onKeydown
|
|
471
|
+
} : null), oi = C(/* @__PURE__ */ new Set()), si = m(() => {
|
|
472
|
+
let e = new Set(oi.value);
|
|
465
473
|
for (let t of O.columns) t.hidden && e.add(String(t.key));
|
|
466
474
|
return e;
|
|
467
|
-
}),
|
|
468
|
-
let e =
|
|
475
|
+
}), ci = m(() => {
|
|
476
|
+
let e = si.value;
|
|
469
477
|
return e.size ? O.columns.filter((t) => !e.has(String(t.key))) : O.columns;
|
|
470
|
-
}),
|
|
471
|
-
if (
|
|
472
|
-
let t =
|
|
473
|
-
|
|
478
|
+
}), li = (e) => {
|
|
479
|
+
if (si.value.has(e)) return;
|
|
480
|
+
let t = wi(e), n = mi.value.indexOf(e), r = !!t && t.contains(document.activeElement) && (Lr.value || P.value);
|
|
481
|
+
oi.value = /* @__PURE__ */ new Set([...oi.value, e]), k("hide:column", e), r && b(() => Ti(n));
|
|
474
482
|
};
|
|
475
483
|
E(() => O.columns.map((e) => [String(e.key), !!e.hidden]), (e, t) => {
|
|
476
|
-
if (!t || !
|
|
477
|
-
let n = new Map(t), r =
|
|
484
|
+
if (!t || !oi.value.size) return;
|
|
485
|
+
let n = new Map(t), r = oi.value, i = e.filter(([e, t]) => n.has(e) && n.get(e) !== t && r.has(e) && !t);
|
|
478
486
|
if (!i.length) return;
|
|
479
487
|
let a = new Set(r);
|
|
480
488
|
for (let [e] of i) a.delete(e);
|
|
481
|
-
|
|
489
|
+
oi.value = a;
|
|
482
490
|
});
|
|
483
|
-
let
|
|
484
|
-
let e =
|
|
491
|
+
let ui = m(() => O.columns.map((e) => String(e.key))), di = m(() => new Set(O.columns.filter((e) => e.reorderable === !1).map((e) => String(e.key)))), fi = (e) => di.value.size ? Pe(ke(e, ui.value), ui.value, di.value) : ke(e, ui.value), pi = C(null), B = m(() => {
|
|
492
|
+
let e = ci.value, t = pi.value ?? sr.value;
|
|
485
493
|
if (!t.length) return e;
|
|
486
|
-
let n =
|
|
494
|
+
let n = di.value.size ? fi(t) : t, r = ze(e, n);
|
|
487
495
|
return r.every((t, n) => t === e[n]) ? e : r;
|
|
488
|
-
}),
|
|
489
|
-
let n =
|
|
496
|
+
}), mi = m(() => B.value.map((e) => String(e.key))), hi = (e, t) => {
|
|
497
|
+
let n = fi(sr.value), r = gi(e, t);
|
|
490
498
|
if (r === null) return null;
|
|
491
|
-
let i =
|
|
492
|
-
return
|
|
493
|
-
},
|
|
494
|
-
let n =
|
|
499
|
+
let i = Re(n, ui.value, e, r, si.value);
|
|
500
|
+
return We(i, n) ? null : i;
|
|
501
|
+
}, gi = (e, t) => {
|
|
502
|
+
let n = mi.value, r = He(n, n.indexOf(e), di.value);
|
|
495
503
|
return r ? Math.max(r.min, Math.min(r.max, t)) : null;
|
|
496
|
-
},
|
|
504
|
+
}, _i = C("");
|
|
497
505
|
E(() => O.reorderable, () => {
|
|
498
|
-
|
|
506
|
+
_i.value = "";
|
|
499
507
|
});
|
|
500
|
-
let
|
|
508
|
+
let vi = (e, t) => {
|
|
501
509
|
let n = B.value, r = n.findIndex((t) => String(t.key) === e);
|
|
502
|
-
r < 0 || r === t || (
|
|
503
|
-
},
|
|
504
|
-
let e =
|
|
510
|
+
r < 0 || r === t || (_i.value = F("table.columnMoved", n[r].label, r + 1, n.length).value);
|
|
511
|
+
}, yi = C(null), bi = m(() => {
|
|
512
|
+
let e = mi.value, t = yi.value;
|
|
505
513
|
return t !== null && e.includes(t) ? t : e[0] ?? null;
|
|
506
|
-
}),
|
|
514
|
+
}), xi = (e, t) => {
|
|
507
515
|
if (!t.sortable) return;
|
|
508
516
|
let n = e.target;
|
|
509
517
|
if (!(n instanceof Element)) return;
|
|
510
518
|
let r = e.currentTarget;
|
|
511
519
|
if (!r.contains(n) || n.closest(".bb-table-sort")) return;
|
|
512
|
-
let i = n.closest(
|
|
513
|
-
i && r.contains(i) || (e.shiftKey || !window.getSelection()?.toString()) &&
|
|
514
|
-
},
|
|
520
|
+
let i = n.closest(qn);
|
|
521
|
+
i && r.contains(i) || (e.shiftKey || !window.getSelection()?.toString()) && Pa(t.key, e);
|
|
522
|
+
}, Si = (e, t) => {
|
|
515
523
|
if (!t.sortable || !e.shiftKey) return;
|
|
516
524
|
let n = e.target;
|
|
517
525
|
if (!(n instanceof Element)) return;
|
|
518
|
-
let r = n.closest(
|
|
526
|
+
let r = n.closest(qn), i = e.currentTarget;
|
|
519
527
|
r && i.contains(r) || window.getSelection()?.removeAllRanges();
|
|
520
|
-
},
|
|
521
|
-
|
|
522
|
-
},
|
|
523
|
-
let t =
|
|
524
|
-
n && (
|
|
525
|
-
},
|
|
526
|
-
|
|
528
|
+
}, Ci = (e) => {
|
|
529
|
+
Lr.value && (yi.value = e);
|
|
530
|
+
}, wi = (e) => I.value?.querySelector(`:scope > .bb-table__head > .bb-table__header-row > [data-column-key="${CSS.escape(e)}"]`) ?? null, Ti = (e) => {
|
|
531
|
+
let t = mi.value, n = t[Math.max(0, Math.min(t.length - 1, e))];
|
|
532
|
+
n && (yi.value = n, wi(n)?.focus());
|
|
533
|
+
}, Ei = async (e, t) => {
|
|
534
|
+
Ma = (e.key === "Enter" || e.key === " ") && e.shiftKey;
|
|
527
535
|
let n = P.value;
|
|
528
|
-
if (!
|
|
536
|
+
if (!Lr.value && !n) return;
|
|
529
537
|
let r = e.currentTarget, i = e.target;
|
|
530
538
|
if (!(i instanceof Element) || i !== r && !i.closest(".bb-table-sort")) return;
|
|
531
|
-
let a =
|
|
539
|
+
let a = Xe(r);
|
|
532
540
|
if (e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
533
|
-
if (!
|
|
541
|
+
if (!ji(t) || e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
534
542
|
e.preventDefault();
|
|
535
543
|
let n = e.key === "ArrowRight" !== a, i = V.value[t] ?? r.getBoundingClientRect().width;
|
|
536
|
-
|
|
544
|
+
Bi({ [t]: i + (n ? 1 : -1) * Rn });
|
|
537
545
|
return;
|
|
538
546
|
}
|
|
539
547
|
if (e.ctrlKey || e.metaKey) return;
|
|
540
|
-
let o =
|
|
548
|
+
let o = mi.value, s = o.indexOf(t);
|
|
541
549
|
if (s < 0) return;
|
|
542
550
|
let c;
|
|
543
551
|
switch (e.key) {
|
|
@@ -556,71 +564,71 @@ var Ht = {
|
|
|
556
564
|
case "Enter":
|
|
557
565
|
case " ":
|
|
558
566
|
if (i !== r || !B.value[s]?.sortable) return;
|
|
559
|
-
e.preventDefault(),
|
|
567
|
+
e.preventDefault(), Pa(t, e);
|
|
560
568
|
return;
|
|
561
569
|
default: return;
|
|
562
570
|
}
|
|
563
571
|
if (n && (!e.shiftKey || !O.reorderable)) return;
|
|
564
572
|
if (e.preventDefault(), !e.shiftKey) {
|
|
565
|
-
|
|
573
|
+
Ti(c);
|
|
566
574
|
return;
|
|
567
575
|
}
|
|
568
576
|
if (!O.reorderable) return;
|
|
569
|
-
let l =
|
|
570
|
-
l && (
|
|
577
|
+
let l = hi(t, c);
|
|
578
|
+
l && (_i.value = "", sr.value = l, yi.value = t, await b(), Di(t, n), Oi = mi.value.indexOf(t) === l.indexOf(t) ? null : {
|
|
571
579
|
key: t,
|
|
572
580
|
index: l.indexOf(t),
|
|
573
581
|
inGrid: n,
|
|
574
|
-
until: Date.now() +
|
|
575
|
-
},
|
|
576
|
-
},
|
|
577
|
-
let n =
|
|
578
|
-
n?.focus(), n && t && n.parentElement && (
|
|
582
|
+
until: Date.now() + In
|
|
583
|
+
}, vi(t, s));
|
|
584
|
+
}, Di = (e, t) => {
|
|
585
|
+
let n = wi(e);
|
|
586
|
+
n?.focus(), n && t && n.parentElement && (Fc.value = {
|
|
579
587
|
key: null,
|
|
580
588
|
row: -1,
|
|
581
589
|
col: Array.prototype.indexOf.call(n.parentElement.children, n)
|
|
582
590
|
});
|
|
583
|
-
},
|
|
584
|
-
E(
|
|
585
|
-
let t =
|
|
591
|
+
}, Oi = null;
|
|
592
|
+
E(mi, (e) => {
|
|
593
|
+
let t = Oi;
|
|
586
594
|
if (!t) return;
|
|
587
595
|
if (Date.now() > t.until) {
|
|
588
|
-
|
|
596
|
+
Oi = null;
|
|
589
597
|
return;
|
|
590
598
|
}
|
|
591
599
|
if (e.indexOf(t.key) !== t.index) return;
|
|
592
|
-
|
|
600
|
+
Oi = null;
|
|
593
601
|
let n = document.activeElement, r = I.value;
|
|
594
|
-
(!n || n === document.body || r?.contains(n)) && n !==
|
|
595
|
-
}, { flush: "post" }), process.env.NODE_ENV !== "production" && (E(
|
|
596
|
-
new Set(e).size !== e.length &&
|
|
602
|
+
(!n || n === document.body || r?.contains(n)) && n !== wi(t.key) && Di(t.key, t.inGrid);
|
|
603
|
+
}, { flush: "post" }), process.env.NODE_ENV !== "production" && (E(sr, (e) => {
|
|
604
|
+
new Set(e).size !== e.length && Je().warn("BbTable: `order` lists a key more than once — the first occurrence wins.");
|
|
597
605
|
}, { immediate: !0 }), E(() => O.columns.some((e) => e.snap != null) && (!!O.reorderable || B.value !== O.columns), (e) => {
|
|
598
|
-
e &&
|
|
606
|
+
e && Je().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
607
|
}, { immediate: !0 }));
|
|
600
|
-
let
|
|
608
|
+
let ki = m(() => !!O.resizable && !K.value), Ai = m(() => new Set(O.columns.filter((e) => e.resizable === !1).map((e) => String(e.key)))), ji = (e) => ki.value && !Ai.value.has(e), V = C({}), Mi = C(null), Ni = C(null), Pi = (e) => {
|
|
601
609
|
let t = String(e.key);
|
|
602
|
-
return
|
|
603
|
-
},
|
|
610
|
+
return Mi.value?.[t] ?? V.value[t] ?? e.width ?? (q.value ? Wa.value[t] : void 0);
|
|
611
|
+
}, Fi = (e) => {
|
|
604
612
|
let t = String(e.key);
|
|
605
|
-
return
|
|
606
|
-
},
|
|
607
|
-
let e = /* @__PURE__ */ new Map(), t =
|
|
613
|
+
return Mi.value?.[t] !== void 0 || t in V.value;
|
|
614
|
+
}, Ii = m(() => Object.keys(Mi.value ?? {}).join(" ")), Li = m(() => /* @__PURE__ */ new Set([...Object.keys(V.value), ...Ii.value.split(" ").filter(Boolean)])), Ri = m(() => {
|
|
615
|
+
let e = /* @__PURE__ */ new Map(), t = Li.value, n = q.value, r = Wa.value;
|
|
608
616
|
for (let i of B.value) {
|
|
609
617
|
let a = String(i.key), o = n && i.width == null, s = [];
|
|
610
618
|
o && s.push("bb-table__cell--nowrap"), t.has(a) && s.push("bb-table__cell--resized"), (t.has(a) || o && a in r) && s.push("bb-table__cell--clip"), s.length && e.set(a, s.join(" "));
|
|
611
619
|
}
|
|
612
620
|
return e;
|
|
613
|
-
}),
|
|
621
|
+
}), zi = m(() => Mi.value !== null || Object.keys(V.value).length > 0), Bi = (e) => {
|
|
614
622
|
let t = { ...V.value }, n = [];
|
|
615
623
|
for (let [r, i] of Object.entries(e)) {
|
|
616
|
-
let e = Math.max(
|
|
624
|
+
let e = Math.max(Ln, Math.round(i));
|
|
617
625
|
t[r] !== e && (t[r] = e, n.push([r, e]));
|
|
618
626
|
}
|
|
619
627
|
if (n.length) {
|
|
620
628
|
V.value = t;
|
|
621
629
|
for (let [e, t] of n) k("resize:column", e, t);
|
|
622
630
|
}
|
|
623
|
-
},
|
|
631
|
+
}, Vi = (e) => {
|
|
624
632
|
if (!(e in V.value)) return;
|
|
625
633
|
let { [e]: t, ...n } = V.value;
|
|
626
634
|
V.value = n, k("resize:column", e, null);
|
|
@@ -633,43 +641,43 @@ var Ht = {
|
|
|
633
641
|
for (let [e] of i) delete a[e];
|
|
634
642
|
V.value = a;
|
|
635
643
|
});
|
|
636
|
-
let H = null,
|
|
637
|
-
document.removeEventListener("pointermove",
|
|
638
|
-
},
|
|
639
|
-
if (
|
|
644
|
+
let H = null, Hi = () => {
|
|
645
|
+
document.removeEventListener("pointermove", Wi), document.removeEventListener("pointerup", Gi), document.removeEventListener("pointercancel", Ki), document.removeEventListener("keydown", qi, !0), window.removeEventListener("blur", Ki);
|
|
646
|
+
}, Ui = () => {
|
|
647
|
+
if (Hi(), H) try {
|
|
640
648
|
H.handle.releasePointerCapture(H.pointerId);
|
|
641
649
|
} catch {}
|
|
642
|
-
document.documentElement.classList.remove(
|
|
643
|
-
},
|
|
650
|
+
document.documentElement.classList.remove(zn), H = null, Mi.value = null, Ni.value = null, I.value && (I.value.style.gridTemplateColumns = Mo.value);
|
|
651
|
+
}, Wi = (e) => {
|
|
644
652
|
if (!H || e.pointerId !== H.pointerId) return;
|
|
645
653
|
let t = (e.clientX - H.x0) * (H.rtl ? -1 : 1);
|
|
646
|
-
t = Math.max(
|
|
654
|
+
t = Math.max(Ln - H.startWidth, t);
|
|
647
655
|
let { neighbour: n } = H;
|
|
648
|
-
e.shiftKey && n ? (t = Math.min(n.startWidth -
|
|
656
|
+
e.shiftKey && n ? (t = Math.min(n.startWidth - Ln, t), Mi.value = {
|
|
649
657
|
[H.key]: Math.round(H.startWidth + t),
|
|
650
658
|
[n.key]: Math.round(n.startWidth - t)
|
|
651
|
-
}) :
|
|
652
|
-
},
|
|
659
|
+
}) : Mi.value = { [H.key]: Math.round(H.startWidth + t) };
|
|
660
|
+
}, Gi = (e) => {
|
|
653
661
|
if (!H || e.pointerId !== H.pointerId) return;
|
|
654
|
-
let { key: t, startWidth: n, neighbour: r } = H, i =
|
|
655
|
-
if (
|
|
662
|
+
let { key: t, startWidth: n, neighbour: r } = H, i = Mi.value;
|
|
663
|
+
if (Ui(), !i) return;
|
|
656
664
|
let a = {};
|
|
657
|
-
i[t] !== Math.round(n) && (a[t] = i[t]), r && i[r.key] !== void 0 && i[r.key] !== Math.round(r.startWidth) && (a[r.key] = i[r.key]),
|
|
658
|
-
},
|
|
659
|
-
H && (e instanceof PointerEvent && e.pointerId !== H.pointerId ||
|
|
660
|
-
},
|
|
661
|
-
H && e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(),
|
|
662
|
-
},
|
|
663
|
-
if (!
|
|
664
|
-
let n =
|
|
665
|
+
i[t] !== Math.round(n) && (a[t] = i[t]), r && i[r.key] !== void 0 && i[r.key] !== Math.round(r.startWidth) && (a[r.key] = i[r.key]), Bi(a);
|
|
666
|
+
}, Ki = (e) => {
|
|
667
|
+
H && (e instanceof PointerEvent && e.pointerId !== H.pointerId || Ui());
|
|
668
|
+
}, qi = (e) => {
|
|
669
|
+
H && e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(), Ui());
|
|
670
|
+
}, Ji = (e, t) => {
|
|
671
|
+
if (!ji(t) || rs.value || H || !e.isPrimary || e.button !== 0) return;
|
|
672
|
+
let n = wi(t);
|
|
665
673
|
if (!n) return;
|
|
666
674
|
e.preventDefault();
|
|
667
675
|
let r = e.currentTarget;
|
|
668
676
|
try {
|
|
669
677
|
r.setPointerCapture(e.pointerId);
|
|
670
678
|
} catch {}
|
|
671
|
-
document.documentElement.classList.add(
|
|
672
|
-
let i =
|
|
679
|
+
document.documentElement.classList.add(zn);
|
|
680
|
+
let i = mi.value, a = i[i.indexOf(t) + 1], o = a && ji(a) ? a : void 0, s = o ? wi(o) : null;
|
|
673
681
|
H = {
|
|
674
682
|
pointerId: e.pointerId,
|
|
675
683
|
handle: r,
|
|
@@ -680,38 +688,38 @@ var Ht = {
|
|
|
680
688
|
key: o,
|
|
681
689
|
startWidth: s.getBoundingClientRect().width
|
|
682
690
|
} : null,
|
|
683
|
-
rtl:
|
|
684
|
-
},
|
|
691
|
+
rtl: Ye(n)
|
|
692
|
+
}, Ni.value = t, document.addEventListener("pointermove", Wi), document.addEventListener("pointerup", Gi), document.addEventListener("pointercancel", Ki), document.addEventListener("keydown", qi, !0), window.addEventListener("blur", Ki);
|
|
685
693
|
};
|
|
686
|
-
x(
|
|
687
|
-
let U = C("idle"),
|
|
688
|
-
let e =
|
|
694
|
+
x(Ui);
|
|
695
|
+
let U = C("idle"), Yi = C(null), Xi = C(""), Zi = C(), Qi = Symbol("bb-table-column-drag"), W = null, $i = (e) => Math.max(0, Math.min(1, e)), ea = () => {
|
|
696
|
+
let e = Ya.value ? L.value?.parentElement ?? null : L.value ?? null;
|
|
689
697
|
for (; e;) {
|
|
690
698
|
let t = getComputedStyle(e).overflowX;
|
|
691
699
|
if (t === "auto" || t === "scroll") return e;
|
|
692
700
|
e = e.parentElement;
|
|
693
701
|
}
|
|
694
702
|
return null;
|
|
695
|
-
},
|
|
703
|
+
}, ta = () => {
|
|
696
704
|
let e = W?.scrollport?.getBoundingClientRect(), t = Math.max(e?.left ?? 0, 0), n = Math.min(e?.right ?? window.innerWidth, window.innerWidth);
|
|
697
705
|
return {
|
|
698
706
|
left: t,
|
|
699
707
|
right: Math.max(t + 1, n)
|
|
700
708
|
};
|
|
701
|
-
},
|
|
702
|
-
let e =
|
|
709
|
+
}, na = (e) => Array.from(e.children).filter((e) => e instanceof HTMLElement && e.classList.contains("bb-table__cell-column-header") && !!e.dataset.columnKey), ra = () => {
|
|
710
|
+
let e = Zi.value;
|
|
703
711
|
e?.isConnected && !e.matches(":popover-open") && e.showPopover();
|
|
704
|
-
},
|
|
705
|
-
let e =
|
|
712
|
+
}, ia = () => {
|
|
713
|
+
let e = Zi.value;
|
|
706
714
|
e && e.matches(":popover-open") && e.hidePopover();
|
|
707
|
-
},
|
|
708
|
-
let n =
|
|
709
|
-
n && (n.style.translate = `${e +
|
|
710
|
-
},
|
|
715
|
+
}, aa = (e, t) => {
|
|
716
|
+
let n = Zi.value;
|
|
717
|
+
n && (n.style.translate = `${e + Kn}px ${t + Kn}px`);
|
|
718
|
+
}, oa = (e) => {
|
|
711
719
|
if (!W || U.value !== "dragging") return;
|
|
712
|
-
let t =
|
|
720
|
+
let t = ta(), n = Math.max(t.left, Math.min(e, t.right - 1)), r = na(W.row);
|
|
713
721
|
if (r.length < 2) return;
|
|
714
|
-
let i = (e) => e.style.position === "sticky", a = new Map(r.map((e) => [e, e.getBoundingClientRect()])), o = [...r.filter(i), ...r.filter((e) => !i(e))].filter((e) => e.dataset.columnKey !== W.key), s =
|
|
722
|
+
let i = (e) => e.style.position === "sticky", a = new Map(r.map((e) => [e, e.getBoundingClientRect()])), o = [...r.filter(i), ...r.filter((e) => !i(e))].filter((e) => e.dataset.columnKey !== W.key), s = mi.value, c = s.indexOf(W.key);
|
|
715
723
|
if (c < 0) return;
|
|
716
724
|
let l = Infinity, u = -Infinity;
|
|
717
725
|
for (let e of a.values()) l = Math.min(l, e.left), u = Math.max(u, e.right);
|
|
@@ -726,82 +734,82 @@ var Ht = {
|
|
|
726
734
|
if (!e) return;
|
|
727
735
|
d = e.dataset.columnKey, f = s.indexOf(d);
|
|
728
736
|
}
|
|
729
|
-
if (f < 0 || (f =
|
|
737
|
+
if (f < 0 || (f = gi(W.key, f) ?? c, f === c)) return;
|
|
730
738
|
let p = f > c;
|
|
731
739
|
if (W.target?.key === d && W.target.after === p) return;
|
|
732
|
-
let ee =
|
|
733
|
-
|
|
740
|
+
let ee = Re(W.base, ui.value, W.key, f, si.value), te = pi.value ?? W.base;
|
|
741
|
+
We(ee, te) ? W.target = {
|
|
734
742
|
key: d,
|
|
735
743
|
after: p
|
|
736
|
-
} : ((W.rtl ? !p : p) ? n <= W.lastMoveX +
|
|
744
|
+
} : ((W.rtl ? !p : p) ? n <= W.lastMoveX + Gn : n >= W.lastMoveX - Gn) || (W.target = {
|
|
737
745
|
key: d,
|
|
738
746
|
after: p
|
|
739
|
-
}, W.lastMoveX = n,
|
|
740
|
-
},
|
|
747
|
+
}, W.lastMoveX = n, pi.value = ee);
|
|
748
|
+
}, sa = () => {
|
|
741
749
|
if (!W || U.value !== "dragging" || !W.scrollDirection) {
|
|
742
750
|
W && (W.raf = void 0);
|
|
743
751
|
return;
|
|
744
752
|
}
|
|
745
|
-
let e =
|
|
746
|
-
r && (r.scrollLeft += W.scrollDirection * n),
|
|
747
|
-
},
|
|
753
|
+
let e = ta(), t = W.scrollDirection < 0 ? W.lastX - e.left : e.right - W.lastX, n = Math.ceil(Wn * (1 - $i(t / Un))), r = W.scrollport ?? document.scrollingElement;
|
|
754
|
+
r && (r.scrollLeft += W.scrollDirection * n), oa(W.lastX), W.raf = requestAnimationFrame(sa);
|
|
755
|
+
}, ca = () => {
|
|
748
756
|
if (!W) return;
|
|
749
|
-
let e =
|
|
750
|
-
W.scrollDirection = t <
|
|
751
|
-
},
|
|
752
|
-
document.removeEventListener("pointermove",
|
|
753
|
-
},
|
|
757
|
+
let e = ta(), t = W.lastX - e.left, n = e.right - W.lastX;
|
|
758
|
+
W.scrollDirection = t < Un ? -1 : +(n < Un), W.scrollDirection && W.raf === void 0 && (W.raf = requestAnimationFrame(sa));
|
|
759
|
+
}, la = () => {
|
|
760
|
+
document.removeEventListener("pointermove", pa), document.removeEventListener("pointerup", ma), document.removeEventListener("pointercancel", ha), document.removeEventListener("keydown", _a, !0), document.removeEventListener("dragstart", va), document.removeEventListener("contextmenu", va, !0), window.removeEventListener("blur", ha), W?.row.removeEventListener("lostpointercapture", ga);
|
|
761
|
+
}, ua = () => {
|
|
754
762
|
if (W) {
|
|
755
|
-
clearTimeout(W.timer), W.raf !== void 0 && cancelAnimationFrame(W.raf),
|
|
763
|
+
clearTimeout(W.timer), W.raf !== void 0 && cancelAnimationFrame(W.raf), la();
|
|
756
764
|
try {
|
|
757
765
|
W.row.hasPointerCapture(W.pointerId) && W.row.releasePointerCapture(W.pointerId);
|
|
758
766
|
} catch {}
|
|
759
|
-
|
|
767
|
+
ia(), et(Qi), Yi.value = null, pi.value = null, U.value = "idle", W = null;
|
|
760
768
|
}
|
|
761
|
-
},
|
|
762
|
-
W && (W.raf !== void 0 && cancelAnimationFrame(W.raf), W.raf = void 0, W.scrollDirection = 0,
|
|
763
|
-
},
|
|
769
|
+
}, da = () => {
|
|
770
|
+
W && (W.raf !== void 0 && cancelAnimationFrame(W.raf), W.raf = void 0, W.scrollDirection = 0, ia(), et(Qi), Yi.value = null, pi.value = null, U.value = "cancelled");
|
|
771
|
+
}, fa = () => {
|
|
764
772
|
if (W && U.value === "armed") {
|
|
765
773
|
clearTimeout(W.timer), W.timer = void 0;
|
|
766
774
|
try {
|
|
767
775
|
W.row.setPointerCapture(W.pointerId);
|
|
768
776
|
} catch {}
|
|
769
|
-
W.row.addEventListener("lostpointercapture",
|
|
777
|
+
W.row.addEventListener("lostpointercapture", ga), W.base = fi(sr.value), W.rtl = Ye(W.row), W.scrollport = ea(), W.lastMoveX = W.x0, W.target = null, pi.value = W.base, Yi.value = W.key, Xi.value = W.label, U.value = "dragging", $e(Qi), ra(), aa(W.lastX, W.lastY), oa(W.lastX), ca();
|
|
770
778
|
}
|
|
771
|
-
},
|
|
779
|
+
}, pa = (e) => {
|
|
772
780
|
if (W && e.pointerId === W.pointerId) {
|
|
773
781
|
if (W.lastX = e.clientX, W.lastY = e.clientY, U.value === "armed") {
|
|
774
782
|
let t = Math.hypot(e.clientX - W.x0, e.clientY - W.y0);
|
|
775
783
|
if (W.pointerType === "touch") {
|
|
776
|
-
t >=
|
|
784
|
+
t >= Vn && ua();
|
|
777
785
|
return;
|
|
778
786
|
}
|
|
779
|
-
if (t <
|
|
780
|
-
|
|
781
|
-
} else U.value === "dragging" && (
|
|
787
|
+
if (t < Bn) return;
|
|
788
|
+
fa();
|
|
789
|
+
} else U.value === "dragging" && (aa(e.clientX, e.clientY), oa(e.clientX), ca());
|
|
782
790
|
}
|
|
783
|
-
},
|
|
791
|
+
}, ma = (e) => {
|
|
784
792
|
if (!W || e.pointerId !== W.pointerId) return;
|
|
785
|
-
let { key: t } = W, n = W.base ? W.base.filter((e) =>
|
|
786
|
-
|
|
787
|
-
},
|
|
788
|
-
W && (e instanceof PointerEvent && e.pointerId !== W.pointerId ||
|
|
789
|
-
},
|
|
790
|
-
W && U.value === "dragging" &&
|
|
791
|
-
},
|
|
792
|
-
W && U.value === "dragging" && e.key === "Escape" &&
|
|
793
|
-
},
|
|
793
|
+
let { key: t } = W, n = W.base ? W.base.filter((e) => ui.value.includes(e) && !si.value.has(e)).indexOf(t) : -1, r = U.value === "dragging" && pi.value !== null && !We(pi.value, W.base) ? pi.value : null;
|
|
794
|
+
ua(), r && (_i.value = "", sr.value = r, b(() => vi(t, n)));
|
|
795
|
+
}, ha = (e) => {
|
|
796
|
+
W && (e instanceof PointerEvent && e.pointerId !== W.pointerId || ua());
|
|
797
|
+
}, ga = () => {
|
|
798
|
+
W && U.value === "dragging" && ua();
|
|
799
|
+
}, _a = (e) => {
|
|
800
|
+
W && U.value === "dragging" && e.key === "Escape" && Qe(Qi) && (e.preventDefault(), e.stopImmediatePropagation(), da());
|
|
801
|
+
}, va = (e) => {
|
|
794
802
|
W && U.value !== "idle" && e.preventDefault();
|
|
795
|
-
},
|
|
796
|
-
if (!O.reorderable ||
|
|
803
|
+
}, ya = (e) => {
|
|
804
|
+
if (!O.reorderable || rs.value || A.thead || !e.isPrimary || e.button !== 0 || W || B.value.length < 2) return;
|
|
797
805
|
let t = e.target;
|
|
798
806
|
if (!(t instanceof Element)) return;
|
|
799
807
|
let n = e.currentTarget, r = t.closest(".bb-table__cell-column-header");
|
|
800
808
|
if (!r || r.parentElement !== n || !r.dataset.columnKey) return;
|
|
801
|
-
let i = t.closest(
|
|
809
|
+
let i = t.closest(qn);
|
|
802
810
|
if (i && r.contains(i)) return;
|
|
803
811
|
let a = r.dataset.columnKey, o = B.value.find((e) => String(e.key) === a);
|
|
804
|
-
o && (
|
|
812
|
+
o && (di.value.has(a) || (W = {
|
|
805
813
|
pointerId: e.pointerId,
|
|
806
814
|
pointerType: e.pointerType,
|
|
807
815
|
key: a,
|
|
@@ -819,33 +827,33 @@ var Ht = {
|
|
|
819
827
|
timer: void 0,
|
|
820
828
|
raf: void 0,
|
|
821
829
|
scrollDirection: 0
|
|
822
|
-
}, U.value = "armed", document.addEventListener("pointermove",
|
|
823
|
-
},
|
|
830
|
+
}, U.value = "armed", document.addEventListener("pointermove", pa), document.addEventListener("pointerup", ma), document.addEventListener("pointercancel", ha), document.addEventListener("keydown", _a, !0), document.addEventListener("dragstart", va), document.addEventListener("contextmenu", va, !0), window.addEventListener("blur", ha), e.pointerType === "touch" && (W.timer = setTimeout(fa, Hn))));
|
|
831
|
+
}, ba = (e) => {
|
|
824
832
|
W && (U.value === "dragging" || U.value === "cancelled") && e.cancelable && e.preventDefault();
|
|
825
833
|
};
|
|
826
|
-
x(
|
|
827
|
-
let
|
|
828
|
-
E(() => Object.keys(
|
|
829
|
-
let
|
|
830
|
-
let e =
|
|
834
|
+
x(ua);
|
|
835
|
+
let xa = m(() => o(cr.value) ? [] : [cr.value]), { data: Sa } = ee({ items: xa }), { data: Ca } = ee({ items: lr });
|
|
836
|
+
E(() => Object.keys(Ca.value).sort().join("\0"), () => Br.cancel());
|
|
837
|
+
let wa = ft(), Ta = () => {
|
|
838
|
+
let e = wa?.vnode.props ?? {};
|
|
831
839
|
return "highlighted" in e || "onUpdate:highlighted" in e || G.highlighted !== void 0;
|
|
832
|
-
},
|
|
833
|
-
process.env.NODE_ENV !== "production" && (
|
|
834
|
-
},
|
|
835
|
-
if (!
|
|
836
|
-
t &&
|
|
840
|
+
}, Ea = (e) => O.highlightable === !1 || typeof O.highlightable == "function" && !O.highlightable(e), Da = !1, Oa = () => {
|
|
841
|
+
process.env.NODE_ENV !== "production" && (Da || (Da = !0, Je().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.")));
|
|
842
|
+
}, ka = (e, { viaSlot: t = !1 } = {}) => {
|
|
843
|
+
if (!Ta()) {
|
|
844
|
+
t && Oa();
|
|
837
845
|
return;
|
|
838
846
|
}
|
|
839
|
-
if (
|
|
840
|
-
let n = e.valueHash in
|
|
841
|
-
|
|
842
|
-
},
|
|
843
|
-
let n =
|
|
844
|
-
if (
|
|
847
|
+
if (Ea(e.item)) return;
|
|
848
|
+
let n = e.valueHash in Sa.value;
|
|
849
|
+
cr.value = n ? null : e.value;
|
|
850
|
+
}, Aa = (e) => !(e.currentTarget instanceof Element) || Se(e, e.currentTarget), ja = (e) => !Aa(e) && !window.getSelection()?.toString(), Ma = !1, Na = (e) => or.value.find(([t]) => t === e)?.[1] ?? null, Pa = (e, t) => {
|
|
851
|
+
let n = Na(e), r = !!t?.shiftKey || t instanceof MouseEvent && t.detail === 0 && Ma;
|
|
852
|
+
if (Ma = !1, !O.multiSort && !r) {
|
|
845
853
|
let t = n === null ? "asc" : n === "asc" ? "desc" : null;
|
|
846
|
-
|
|
847
|
-
} else n === null ?
|
|
848
|
-
}, { state: G, isReady:
|
|
854
|
+
or.value = t ? [[e, t]] : [];
|
|
855
|
+
} else n === null ? or.value = [...or.value, [e, "asc"]] : n === "asc" ? or.value = or.value.map((t) => t[0] === e ? [e, "desc"] : t) : or.value = or.value.filter(([t]) => t !== e);
|
|
856
|
+
}, { state: G, isReady: Fa } = qe(() => Tr.value, {
|
|
849
857
|
selected: {
|
|
850
858
|
get: () => O.modelValue,
|
|
851
859
|
set: (e) => k("update:modelValue", e)
|
|
@@ -861,73 +869,73 @@ var Ht = {
|
|
|
861
869
|
}
|
|
862
870
|
},
|
|
863
871
|
sort: {
|
|
864
|
-
get: () =>
|
|
872
|
+
get: () => or.value,
|
|
865
873
|
set: (e) => {
|
|
866
|
-
|
|
874
|
+
or.value = e;
|
|
867
875
|
}
|
|
868
876
|
},
|
|
869
877
|
order: {
|
|
870
|
-
get: () =>
|
|
878
|
+
get: () => sr.value,
|
|
871
879
|
set: (e) => {
|
|
872
|
-
|
|
880
|
+
sr.value = e;
|
|
873
881
|
}
|
|
874
882
|
},
|
|
875
883
|
highlighted: {
|
|
876
|
-
get: () =>
|
|
884
|
+
get: () => cr.value,
|
|
877
885
|
set: (e) => {
|
|
878
|
-
|
|
886
|
+
cr.value = e;
|
|
879
887
|
}
|
|
880
888
|
},
|
|
881
|
-
page: { get: () => O.page === void 0 ? O.virtual ? 1 : void 0 :
|
|
889
|
+
page: { get: () => O.page === void 0 ? O.virtual ? 1 : void 0 : ce(O.page, 1) },
|
|
882
890
|
perPage: {
|
|
883
|
-
get: () =>
|
|
891
|
+
get: () => se(O.perPage),
|
|
884
892
|
infer: () => Array.isArray(O.items) ? O.items.length : void 0
|
|
885
893
|
},
|
|
886
894
|
totalItems: {
|
|
887
|
-
get: () =>
|
|
895
|
+
get: () => se(O.totalItems),
|
|
888
896
|
infer: () => Array.isArray(O.items) ? O.items.length : void 0
|
|
889
897
|
},
|
|
890
|
-
totalPages: { get: () => O.totalPages === void 0 ? void 0 :
|
|
891
|
-
}),
|
|
892
|
-
|
|
893
|
-
|
|
898
|
+
totalPages: { get: () => O.totalPages === void 0 ? void 0 : ce(O.totalPages, 1) }
|
|
899
|
+
}), Ia = m(() => O.columns.some((e) => e.snap != null)), La = m(() => !!O.inheritColumnWidths || Ia.value), Ra = m(() => O.fixed || Ia.value || ci.value.some((e) => e.width != null) || zi.value || La.value && !!Er.value), K = m(() => La.value && !!Er.value), za = C(""), Ba = C(0);
|
|
900
|
+
Nt(() => {
|
|
901
|
+
Or.depth = K.value ? (Dr.value?.depth ?? 0) + 1 : 0;
|
|
894
902
|
});
|
|
895
|
-
let
|
|
903
|
+
let Va = m(() => Ua.value === "drag-handle" || Ua.value === "select" ? Ba.value * Or.depth : 0), Ha = (e, t) => {
|
|
896
904
|
if (!t) return 0;
|
|
897
905
|
if (/^-?[\d.]+px$/.test(t)) return parseFloat(t);
|
|
898
906
|
let n = document.createElement("span");
|
|
899
907
|
n.style.cssText = `position:absolute;visibility:hidden;width:${t}`, e.appendChild(n);
|
|
900
908
|
let r = n.getBoundingClientRect().width;
|
|
901
909
|
return n.remove(), r;
|
|
902
|
-
},
|
|
910
|
+
}, Ua = m(() => {
|
|
903
911
|
if (!K.value) return null;
|
|
904
|
-
let e =
|
|
912
|
+
let e = za.value || "select";
|
|
905
913
|
return e === "drag-handle" && z.value ? "drag-handle" : e !== "content" && O.selectable ? "select" : "content";
|
|
906
914
|
});
|
|
907
|
-
|
|
908
|
-
|
|
915
|
+
Nt(() => {
|
|
916
|
+
Or.ordered = !!O.reorderable || sr.value.length > 0;
|
|
909
917
|
});
|
|
910
|
-
let q = m(() => !!O.virtual && !K.value && !A.tbody),
|
|
918
|
+
let q = m(() => !!O.virtual && !K.value && !A.tbody), Wa = C({}), Ga = C({}), Ka = C(""), qa = m(() => q.value && !!Ka.value && ko.value.every((e) => !e.contentSized)), Ja = (e) => q.value && e.width == null && !Fi(e) && String(e.key) in Wa.value, Ya = K, Xa = (e) => {
|
|
911
919
|
if (typeof e == "number") return `${e}px`;
|
|
912
920
|
let t = e.trim();
|
|
913
921
|
return /^-?\d*\.?\d+$/.test(t) ? `${t}px` : t;
|
|
914
|
-
},
|
|
915
|
-
let e =
|
|
922
|
+
}, Za = m(() => Dr.value?.keys ?? []), Qa = m(() => +(Za.value[0] === "select")), $a = m(() => Za.value.length), eo = m(() => {
|
|
923
|
+
let e = Za.value;
|
|
916
924
|
return e[e.length - 1] === "actions" ? e.length - 1 : e.length;
|
|
917
|
-
}),
|
|
918
|
-
let t =
|
|
919
|
-
return t ?
|
|
920
|
-
},
|
|
921
|
-
if (!
|
|
925
|
+
}), to = (e) => Za.value.indexOf(e), no = (e) => {
|
|
926
|
+
let t = Za.value[e];
|
|
927
|
+
return t ? Ar(t, "0px") : "0px";
|
|
928
|
+
}, ro = (e, t) => {
|
|
929
|
+
if (!Er.value || t - e <= 1e-6) return null;
|
|
922
930
|
let n = [];
|
|
923
931
|
for (let r = Math.floor(e); r < Math.ceil(t - 1e-6); r++) {
|
|
924
932
|
let i = Math.min(t, r + 1) - Math.max(e, r);
|
|
925
933
|
if (i <= 1e-6) continue;
|
|
926
|
-
let a =
|
|
934
|
+
let a = no(r);
|
|
927
935
|
n.push(i >= 1 - 1e-6 ? a : `${Number(i.toFixed(4))} * ${a}`);
|
|
928
936
|
}
|
|
929
937
|
return n.length ? n.length === 1 && !n[0].includes("*") ? n[0] : `calc(${n.join(" + ")})` : null;
|
|
930
|
-
},
|
|
938
|
+
}, io = (e) => {
|
|
931
939
|
let t = /^(.+)\.(\d+)$/.exec(e);
|
|
932
940
|
return t ? {
|
|
933
941
|
key: t[1],
|
|
@@ -936,9 +944,9 @@ var Ht = {
|
|
|
936
944
|
key: e,
|
|
937
945
|
fraction: 0
|
|
938
946
|
};
|
|
939
|
-
},
|
|
947
|
+
}, ao = (e) => {
|
|
940
948
|
if (Array.isArray(e)) {
|
|
941
|
-
let t =
|
|
949
|
+
let t = io(e[0]), n = io(e[1]), r = to(t.key), i = to(n.key);
|
|
942
950
|
if (r < 0 || i < 0) return null;
|
|
943
951
|
let a = r + t.fraction, o = n.fraction > 0 ? i + n.fraction : i + 1;
|
|
944
952
|
return o > a ? {
|
|
@@ -947,9 +955,9 @@ var Ht = {
|
|
|
947
955
|
explicit: !0
|
|
948
956
|
} : null;
|
|
949
957
|
}
|
|
950
|
-
let t =
|
|
958
|
+
let t = io(e), n = to(t.key);
|
|
951
959
|
if (n < 0) {
|
|
952
|
-
let t =
|
|
960
|
+
let t = to(e);
|
|
953
961
|
return t < 0 ? null : {
|
|
954
962
|
start: t,
|
|
955
963
|
end: t + 1,
|
|
@@ -961,20 +969,20 @@ var Ht = {
|
|
|
961
969
|
end: n + 1,
|
|
962
970
|
explicit: !1
|
|
963
971
|
};
|
|
964
|
-
},
|
|
965
|
-
let e = B.value, t =
|
|
972
|
+
}, oo = m(() => !!Dr.value?.ordered), so = m(() => {
|
|
973
|
+
let e = B.value, t = Qa.value, n = eo.value, r = $a.value, i = oo.value, a = e.map(() => null), o = /* @__PURE__ */ new Set(), s = (e) => {
|
|
966
974
|
for (let t = Math.floor(e.start); t < e.end - 1e-6; t++) o.add(t);
|
|
967
975
|
};
|
|
968
976
|
i || (e.forEach((e, t) => {
|
|
969
977
|
if (e.snap == null) return;
|
|
970
|
-
let n =
|
|
978
|
+
let n = ao(e.snap);
|
|
971
979
|
n && (a[t] = {
|
|
972
980
|
...n,
|
|
973
981
|
overflow: !1
|
|
974
982
|
}, s(a[t]));
|
|
975
983
|
}), e.forEach((e, r) => {
|
|
976
984
|
if (a[r] || e.snap != null) return;
|
|
977
|
-
let i =
|
|
985
|
+
let i = to(String(e.key));
|
|
978
986
|
i < t || i >= n || o.has(i) || (a[r] = {
|
|
979
987
|
start: i,
|
|
980
988
|
end: i + 1,
|
|
@@ -1022,10 +1030,10 @@ var Ht = {
|
|
|
1022
1030
|
let i = u[r + 1];
|
|
1023
1031
|
i && !i.overflow && i.start > t.end && (t.end = i.start), r === e.length - 1 && e[r].width == null && (t.end = Math.max(t.end, n));
|
|
1024
1032
|
}), u;
|
|
1025
|
-
}),
|
|
1033
|
+
}), co = (e) => K.value && e.overflow, lo = m(() => {
|
|
1026
1034
|
let e = /* @__PURE__ */ new Map();
|
|
1027
1035
|
if (!K.value) return e;
|
|
1028
|
-
let t =
|
|
1036
|
+
let t = so.value, n = B.value, r = (e) => !t[e].overflow && Pi(n[e]) == null, i = t.length - 1;
|
|
1029
1037
|
for (; i >= 0 && t[i].overflow;) i--;
|
|
1030
1038
|
return t.forEach((a, o) => {
|
|
1031
1039
|
if (!a.overflow || o > i) return;
|
|
@@ -1034,16 +1042,16 @@ var Ht = {
|
|
|
1034
1042
|
for (let e = o + 1; e < t.length && s < 0; e++) r(e) && (s = e);
|
|
1035
1043
|
s < 0 || e.set(s, [...e.get(s) ?? [], String(n[o].key)]);
|
|
1036
1044
|
}), e;
|
|
1037
|
-
}),
|
|
1038
|
-
process.env.NODE_ENV !== "production" && (E(() =>
|
|
1039
|
-
e &&
|
|
1040
|
-
}, { immediate: !0 }), E(() =>
|
|
1041
|
-
e !== null &&
|
|
1045
|
+
}), uo = m(() => new Set([...lo.value.values()].flat()));
|
|
1046
|
+
process.env.NODE_ENV !== "production" && (E(() => Ia.value && oo.value, (e) => {
|
|
1047
|
+
e && Je().warn("BbTable: `snap` targets are ignored under a parent that uses `order` / `reorderable` — the parent's columns can move, so the child inherits by position. Keep the parent's order static (no `reorderable`, an empty `order`) to snap by key.");
|
|
1048
|
+
}, { immediate: !0 }), E(() => so.value.find((e) => e.demoted)?.demoted ?? null, (e) => {
|
|
1049
|
+
e !== null && Je().warn(`BbTable: column '${e}' snaps to a parent column that sits BEFORE the column preceding it — the child's order disagrees with the parent's, so the snap cannot tile and the column flows into the next free parent track instead. Declare the child's columns in the parent's order.`);
|
|
1042
1050
|
}, { immediate: !0 }));
|
|
1043
|
-
let
|
|
1051
|
+
let fo = m(() => so.value.some((e, t) => co(e) && !uo.value.has(String(B.value[t].key)))), po = (e) => {
|
|
1044
1052
|
let t = B.value[e];
|
|
1045
|
-
return (t ?
|
|
1046
|
-
},
|
|
1053
|
+
return (t ? Pi(t) : null) == null && !K.value;
|
|
1054
|
+
}, mo = m(() => {
|
|
1047
1055
|
if (!K.value) return -1;
|
|
1048
1056
|
let e = B.value;
|
|
1049
1057
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
@@ -1051,38 +1059,38 @@ var Ht = {
|
|
|
1051
1059
|
if (n.width == null && n.snap == null) return t;
|
|
1052
1060
|
}
|
|
1053
1061
|
return -1;
|
|
1054
|
-
}),
|
|
1055
|
-
let e =
|
|
1056
|
-
return !
|
|
1057
|
-
}),
|
|
1058
|
-
let e =
|
|
1059
|
-
return !
|
|
1060
|
-
}),
|
|
1061
|
-
let e =
|
|
1062
|
+
}), ho = m(() => {
|
|
1063
|
+
let e = so.value, t = e.find((e) => !e.overflow) ?? e[0];
|
|
1064
|
+
return !La.value || !Er.value || !t ? null : ro(0, t.start);
|
|
1065
|
+
}), go = m(() => {
|
|
1066
|
+
let e = so.value, t = e[e.length - 1];
|
|
1067
|
+
return !La.value || !Er.value || !t || fo.value ? null : ro(t.end, $a.value);
|
|
1068
|
+
}), _o = (e) => Or.tracks[e] ?? null, vo = (e, t, n) => !La.value || !Er.value ? null : n ? t ? `calc(${e ?? "0px"} - ${t})` : null : e, yo = m(() => !!O.selectable || z.value), bo = m(() => {
|
|
1069
|
+
let e = _o("select"), t = Va.value;
|
|
1062
1070
|
return e && t ? `calc(${e} + ${t}px)` : e;
|
|
1063
|
-
}),
|
|
1064
|
-
let n = q.value ?
|
|
1065
|
-
return n == null ? e &&
|
|
1066
|
-
},
|
|
1071
|
+
}), xo = m(() => vo(ho.value, yo.value ? bo.value : null, yo.value)), So = m(() => fo.value ? null : vo(go.value, M.value ? _o("actions") : null, M.value)), Co = m(() => xo.value !== null), wo = m(() => So.value !== null), To = (e, t) => {
|
|
1072
|
+
let n = q.value ? Ga.value[t] : null;
|
|
1073
|
+
return n == null ? e && Do.value ? "minmax(auto, max-content)" : "max-content" : `${n}px`;
|
|
1074
|
+
}, Eo = m(() => {
|
|
1067
1075
|
let e = {};
|
|
1068
|
-
if (!
|
|
1069
|
-
let t =
|
|
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 &&
|
|
1071
|
-
}),
|
|
1076
|
+
if (!Do.value) return e;
|
|
1077
|
+
let t = ho.value, n = z.value && !!O.selectable, r = Va.value, i = (e, t) => r && Ua.value === t ? `calc(${e} + ${r}px)` : e, a = Rr.value && r && Ua.value === "drag-handle" ? `calc(${Rr.value} - ${r}px)` : Rr.value;
|
|
1078
|
+
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 && go.value && !fo.value && (e["--min-a"] = go.value), e;
|
|
1079
|
+
}), Do = m(() => Object.keys(Dr.value?.tracks ?? {}).length > 0), Oo = (e) => /^(auto|min-content|max-content|(fit-content|minmax)\(.*\)|-?[\d.]+fr)$/.test(e.trim()), ko = m(() => {
|
|
1072
1080
|
let e = [], t = z.value && !!O.selectable;
|
|
1073
1081
|
z.value && e.push({
|
|
1074
|
-
key:
|
|
1075
|
-
width:
|
|
1076
|
-
contentSized:
|
|
1082
|
+
key: Nn,
|
|
1083
|
+
width: To(t ? null : ho.value, Nn),
|
|
1084
|
+
contentSized: Ga.value[Nn] == null
|
|
1077
1085
|
}), O.selectable && e.push({
|
|
1078
1086
|
key: "select",
|
|
1079
|
-
width:
|
|
1080
|
-
contentSized:
|
|
1087
|
+
width: To(z.value ? ho.value && Rr.value ? `calc(${ho.value} - ${Rr.value})` : null : ho.value, "select"),
|
|
1088
|
+
contentSized: Ga.value.select == null
|
|
1081
1089
|
});
|
|
1082
|
-
let n = B.value, r = n.length - 1, i = !K.value && n.length > 0 && n.every((e) => e.width != null && !
|
|
1090
|
+
let n = B.value, r = n.length - 1, i = !K.value && n.length > 0 && n.every((e) => e.width != null && !Oo(Xa(e.width)));
|
|
1083
1091
|
return n.forEach((t, n) => {
|
|
1084
|
-
let a = String(t.key), o =
|
|
1085
|
-
if (s != null &&
|
|
1092
|
+
let a = String(t.key), o = Pi(t), s = o == null ? null : Xa(o), c = so.value[n], l = null, u = null;
|
|
1093
|
+
if (s != null && Oo(s) ? u = s : s != null && i && !Fi(t) ? u = `minmax(${s}, ${parseFloat(s) || 1}fr)` : s != null && Ja(t) ? u = `minmax(${s}, 1fr)` : s == null ? po(n) ? u = O.fixed ? "minmax(0, 1fr)" : "auto" : Do.value ? co(c) ? u = "min-content" : (l = ro(c.start, c.end), l === null && (u = "auto")) : u = "max-content" : l = s, u !== null) {
|
|
1086
1094
|
e.push({
|
|
1087
1095
|
key: a,
|
|
1088
1096
|
width: u,
|
|
@@ -1091,8 +1099,8 @@ var Ht = {
|
|
|
1091
1099
|
return;
|
|
1092
1100
|
}
|
|
1093
1101
|
let d = [];
|
|
1094
|
-
n === 0 &&
|
|
1095
|
-
let f = (
|
|
1102
|
+
n === 0 && Co.value && d.push("var(--offset-internal-start, 0px)"), n === r && wo.value && d.push("var(--offset-internal-end, 0px)");
|
|
1103
|
+
let f = (lo.value.get(n) ?? []).map((e) => Or.tracks[e]).filter(Boolean), p = [...d, l].join(" + "), ee = d.length || f.length ? `calc(${[p, ...f].join(" - ")})` : l, te = n === mo.value && !fo.value ? `minmax(${ee}, 1fr)` : ee;
|
|
1096
1104
|
e.push({
|
|
1097
1105
|
key: a,
|
|
1098
1106
|
width: te,
|
|
@@ -1100,198 +1108,200 @@ var Ht = {
|
|
|
1100
1108
|
});
|
|
1101
1109
|
}), M.value && e.push({
|
|
1102
1110
|
key: "actions",
|
|
1103
|
-
width:
|
|
1104
|
-
contentSized:
|
|
1111
|
+
width: To(go.value, "actions"),
|
|
1112
|
+
contentSized: Ga.value.actions == null
|
|
1105
1113
|
}), e;
|
|
1106
|
-
}),
|
|
1114
|
+
}), Ao = m(() => {
|
|
1107
1115
|
let e = B.value, t = [];
|
|
1108
|
-
for (let n of
|
|
1116
|
+
for (let n of ko.value) n.contentSized || e.some((e) => String(e.key) === n.key) && t.push(n.key);
|
|
1109
1117
|
return t.join(" ");
|
|
1110
|
-
}),
|
|
1111
|
-
E(
|
|
1112
|
-
H && I.value ? I.value.style.gridTemplateColumns = e :
|
|
1118
|
+
}), jo = m(() => new Set(Ao.value.split(" ").filter(Boolean))), Mo = m(() => ko.value.map((e) => e.width).join(" ")), No = C(Mo.value), Po = m(() => `grid-template-columns: ${No.value}`);
|
|
1119
|
+
E(Mo, (e) => {
|
|
1120
|
+
H && I.value ? I.value.style.gridTemplateColumns = e : No.value = e;
|
|
1113
1121
|
}, { flush: "sync" });
|
|
1114
|
-
let
|
|
1122
|
+
let Fo = m(() => {
|
|
1115
1123
|
let e = {};
|
|
1116
|
-
return
|
|
1117
|
-
}),
|
|
1124
|
+
return xo.value && (e["--offset-start"] = xo.value), So.value && (e["--offset-end"] = So.value), Object.assign(e, Eo.value), Or.depth && (e["--depth"] = String(Or.depth)), e;
|
|
1125
|
+
}), Io = C({}), Lo = [
|
|
1118
1126
|
.62,
|
|
1119
1127
|
.42,
|
|
1120
1128
|
.78,
|
|
1121
1129
|
.52
|
|
1122
|
-
],
|
|
1130
|
+
], Ro = (e) => {
|
|
1123
1131
|
let t = ["transparent 0"], n = 0;
|
|
1124
1132
|
return e.forEach((e, r) => {
|
|
1125
|
-
let i =
|
|
1126
|
-
if (a >=
|
|
1127
|
-
let e = Math.round(n +
|
|
1133
|
+
let i = Lo[r % Lo.length], a = Math.round((e - 24) * i);
|
|
1134
|
+
if (a >= Yn) {
|
|
1135
|
+
let e = Math.round(n + Jn);
|
|
1128
1136
|
t.push(`transparent ${e}px`, `currentColor ${e}px ${e + a}px`, `transparent ${e + a}px`);
|
|
1129
1137
|
}
|
|
1130
1138
|
n += e;
|
|
1131
1139
|
}), `linear-gradient(90deg, ${t.join(",")})`;
|
|
1132
|
-
},
|
|
1140
|
+
}, zo = (e) => {
|
|
1133
1141
|
if (!q.value) {
|
|
1134
|
-
|
|
1142
|
+
Io.value["--placeholder-bars"] && (Io.value = {});
|
|
1135
1143
|
return;
|
|
1136
1144
|
}
|
|
1137
1145
|
let t = e.map((e) => parseFloat(e));
|
|
1138
|
-
t.some((e) => !(e >= 0)) || (
|
|
1139
|
-
...
|
|
1140
|
-
"--placeholder-bars":
|
|
1146
|
+
t.some((e) => !(e >= 0)) || (Io.value = {
|
|
1147
|
+
...Io.value,
|
|
1148
|
+
"--placeholder-bars": Ro(t)
|
|
1141
1149
|
});
|
|
1142
|
-
},
|
|
1150
|
+
}, Bo = () => {
|
|
1143
1151
|
if (!q.value) return;
|
|
1144
|
-
let e = Math.round(
|
|
1152
|
+
let e = Math.round(cl.value || Gc.value);
|
|
1145
1153
|
if (!(e > 0)) return;
|
|
1146
1154
|
let t = `${e}px`;
|
|
1147
|
-
|
|
1148
|
-
...
|
|
1155
|
+
Io.value["--row-h"] !== t && (Io.value = {
|
|
1156
|
+
...Io.value,
|
|
1149
1157
|
"--row-h": t
|
|
1150
1158
|
});
|
|
1151
|
-
},
|
|
1152
|
-
...
|
|
1159
|
+
}, Vo = m(() => ({
|
|
1160
|
+
...kr.value,
|
|
1153
1161
|
...K.value ? null : { "--ts": z.value && !O.selectable ? 1 : 0 },
|
|
1154
|
-
...
|
|
1155
|
-
...
|
|
1156
|
-
...O.fixedHeaders || q.value ? { "--stuck-head-h": `${
|
|
1157
|
-
...
|
|
1158
|
-
})),
|
|
1159
|
-
let e = I.value, t =
|
|
1162
|
+
...Fo.value,
|
|
1163
|
+
...Io.value,
|
|
1164
|
+
...O.fixedHeaders || q.value ? { "--stuck-head-h": `${Wo.value}px` } : null,
|
|
1165
|
+
...qa.value ? { "--virtual-row-tracks": Ka.value } : null
|
|
1166
|
+
})), Ho = () => {
|
|
1167
|
+
let e = I.value, t = ko.value.length;
|
|
1160
1168
|
if (!e || !t) return [];
|
|
1161
1169
|
let n = e.querySelector(":scope > .bb-table__head > .bb-table__header-row"), r = [...n ? [n] : [], ...Array.from(e.querySelectorAll(":scope > .bb-table__head > [role=\"row\"], :scope > .bb-table__body > [role=\"row\"]"))].find((e) => e.children.length >= t);
|
|
1162
1170
|
return r ? Array.from(r.children) : [];
|
|
1163
|
-
},
|
|
1171
|
+
}, Uo = "", Wo = C(0), Go = () => {
|
|
1164
1172
|
let e = I.value;
|
|
1165
1173
|
if (!e) return;
|
|
1166
1174
|
if (K.value) {
|
|
1167
1175
|
let t = getComputedStyle(e), n = t.getPropertyValue("--indent-at").trim();
|
|
1168
|
-
n !==
|
|
1169
|
-
let r =
|
|
1170
|
-
r !==
|
|
1176
|
+
n !== za.value && (za.value = n);
|
|
1177
|
+
let r = Ha(e, t.getPropertyValue("--indent").trim());
|
|
1178
|
+
r !== Ba.value && (Ba.value = r);
|
|
1171
1179
|
}
|
|
1172
1180
|
if (O.fixedHeaders || q.value) {
|
|
1173
1181
|
let t = e.querySelector(":scope > .bb-table__head"), n = t ? Math.round(t.getBoundingClientRect().height) : 0;
|
|
1174
|
-
n !==
|
|
1182
|
+
n !== Wo.value && (Wo.value = n);
|
|
1175
1183
|
}
|
|
1176
|
-
let t =
|
|
1184
|
+
let t = Ve(e);
|
|
1177
1185
|
if (!t) return;
|
|
1178
|
-
let n =
|
|
1186
|
+
let n = ko.value.map((e) => e.key);
|
|
1179
1187
|
if (t.length !== n.length) return;
|
|
1180
|
-
let r = t.join(" "), i = `${
|
|
1181
|
-
if (i ===
|
|
1182
|
-
a &&
|
|
1188
|
+
let r = t.join(" "), i = `${Qo.value}|${r}`, a = qu.value !== Ko;
|
|
1189
|
+
if (i === Uo) {
|
|
1190
|
+
a && qo(e, t);
|
|
1183
1191
|
return;
|
|
1184
1192
|
}
|
|
1185
|
-
|
|
1193
|
+
Uo = i;
|
|
1186
1194
|
let o = {};
|
|
1187
1195
|
n.forEach((e, n) => {
|
|
1188
1196
|
o[e] = t[n];
|
|
1189
1197
|
});
|
|
1190
|
-
let s =
|
|
1191
|
-
if (u && c && o[c] && (o[c] = `calc(${o[c]} - max(0px, ${u}))`, !O.selectable && !z.value &&
|
|
1192
|
-
let e = o[
|
|
1193
|
-
|
|
1198
|
+
let s = mi.value, c = s[0], l = s[s.length - 1], u = xo.value, d = So.value;
|
|
1199
|
+
if (u && c && o[c] && (o[c] = `calc(${o[c]} - max(0px, ${u}))`, !O.selectable && !z.value && ho.value && (o.select = ho.value)), Nn in o) {
|
|
1200
|
+
let e = o[Nn];
|
|
1201
|
+
Rr.value !== e && (Rr.value = e), o.select = o.select ? `calc(${e} + ${o.select})` : e, delete o[Nn];
|
|
1194
1202
|
}
|
|
1195
|
-
let f =
|
|
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 &&
|
|
1203
|
+
let f = Va.value;
|
|
1204
|
+
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 && go.value && (o.actions = go.value));
|
|
1197
1205
|
let p = [
|
|
1198
1206
|
..."select" in o ? ["select"] : [],
|
|
1199
1207
|
...s,
|
|
1200
1208
|
..."actions" in o ? ["actions"] : []
|
|
1201
1209
|
];
|
|
1202
|
-
|
|
1203
|
-
},
|
|
1204
|
-
|
|
1205
|
-
},
|
|
1206
|
-
if (!
|
|
1207
|
-
|
|
1208
|
-
let e =
|
|
1209
|
-
e.forEach((e) =>
|
|
1210
|
+
El(t), zo(t), q.value && (Ka.value = r), Jo = t, jr(o, p), (Ku.value.length || a) && qo(e, t), Ku.value.length && xc();
|
|
1211
|
+
}, Ko = "", qo = (e, t) => {
|
|
1212
|
+
Ee(e, Ku.value, t) && (Ko = qu.value);
|
|
1213
|
+
}, Jo = null, Yo, Xo = () => {
|
|
1214
|
+
if (!Yo) return;
|
|
1215
|
+
Yo.disconnect();
|
|
1216
|
+
let e = Ho();
|
|
1217
|
+
e.forEach((e) => Yo?.observe(e)), e.length && Go();
|
|
1210
1218
|
};
|
|
1211
|
-
|
|
1212
|
-
|
|
1219
|
+
xt(() => {
|
|
1220
|
+
Yo = new ResizeObserver(Go), Xo();
|
|
1213
1221
|
}), x(() => {
|
|
1214
|
-
|
|
1222
|
+
Yo?.disconnect();
|
|
1215
1223
|
});
|
|
1216
|
-
let
|
|
1217
|
-
E([
|
|
1218
|
-
b(
|
|
1219
|
-
I.value &&
|
|
1224
|
+
let Zo = m(() => ko.value.map((e) => e.key).join(" ")), Qo = m(() => mi.value.join(" "));
|
|
1225
|
+
E([Zo, Qo], () => {
|
|
1226
|
+
b(Xo), requestAnimationFrame(() => {
|
|
1227
|
+
I.value && Go();
|
|
1220
1228
|
});
|
|
1221
1229
|
}, { flush: "post" });
|
|
1222
|
-
let
|
|
1230
|
+
let $o = (e, t) => O.accessibleLabel ? O.accessibleLabel(e, t) : F("table.select", Ue(e, br.value)).value, es = m(() => O.selectable ? "fieldset" : "div"), ts = m(() => O.legend || O.caption || F("table.selectableLegend").value), ns = m(() => O.loading || fs.value), rs = m(() => ns.value && !O.interactiveWhileLoading), is = m(() => Fa.value && !o(G.page) && !o(G.perPage) && !o(G.totalItems) && G.page >= 1 && G.perPage > 0 && G.totalItems >= 0), as = m(() => ({
|
|
1223
1231
|
"bb-table": !0,
|
|
1224
1232
|
[`bb-table--align-${O.align}`]: !0,
|
|
1225
|
-
"bb-table--compact":
|
|
1233
|
+
"bb-table--compact": ur.compact,
|
|
1226
1234
|
"bb-table--reorderable": !!O.reorderable,
|
|
1227
1235
|
"bb-table--rows-reorderable": z.value,
|
|
1228
|
-
"bb-table--resizable":
|
|
1229
|
-
"bb-table--fixed":
|
|
1230
|
-
"bb-table--inherit-widths":
|
|
1231
|
-
[`bb-table--indent-${
|
|
1236
|
+
"bb-table--resizable": ki.value,
|
|
1237
|
+
"bb-table--fixed": Ra.value,
|
|
1238
|
+
"bb-table--inherit-widths": Ya.value,
|
|
1239
|
+
[`bb-table--indent-${Ua.value}`]: !!Ua.value,
|
|
1232
1240
|
"bb-table--fixed-header": O.fixedHeaders || q.value,
|
|
1233
1241
|
"bb-table--virtual": q.value,
|
|
1234
|
-
"bb-table--virtual-flat":
|
|
1235
|
-
"bb-table--loading":
|
|
1242
|
+
"bb-table--virtual-flat": qa.value,
|
|
1243
|
+
"bb-table--loading": ns.value,
|
|
1236
1244
|
"bb-table--empty": !J.value.length,
|
|
1237
1245
|
"bb-table--selectable": !!O.selectable,
|
|
1238
|
-
"bb-table--overflow-left":
|
|
1239
|
-
"bb-table--overflow-right":
|
|
1240
|
-
"bb-table--pinned-left":
|
|
1241
|
-
"bb-table--pinned-right":
|
|
1246
|
+
"bb-table--overflow-left": rc.value,
|
|
1247
|
+
"bb-table--overflow-right": ic.value,
|
|
1248
|
+
"bb-table--pinned-left": sc.value,
|
|
1249
|
+
"bb-table--pinned-right": cc.value,
|
|
1242
1250
|
"scrollbar-border": !0
|
|
1243
|
-
})),
|
|
1244
|
-
items:
|
|
1251
|
+
})), os = m(() => ci.value.length + Number(z.value) + Number(!!O.selectable) + Number(M.value)), ss = m(() => Object.fromEntries(O.columns.map((e) => [e.key, Oe(e.key)]))), { getter: cs, clientReproducible: ls, hydratedFromSsr: us, items: ds, loading: fs, error: ps, retry: ms, ssrMarker: hs } = d({
|
|
1252
|
+
items: kt(O, "items"),
|
|
1245
1253
|
marker: !0
|
|
1246
|
-
}),
|
|
1247
|
-
|
|
1248
|
-
|
|
1254
|
+
}), gs = m(() => O.failedText || F("common.failedText").value), _s = async () => {
|
|
1255
|
+
await ms() === "applied" && ws();
|
|
1256
|
+
}, { hasPrefilled: vs, whenPrefilled: ys } = p({
|
|
1257
|
+
alreadyLoaded: us,
|
|
1258
|
+
clientReproducible: ls,
|
|
1249
1259
|
trigger: !0,
|
|
1250
1260
|
fn: async () => {
|
|
1251
|
-
await
|
|
1261
|
+
await cs(void 0, "initial", G.selected) === "applied" && ws();
|
|
1252
1262
|
}
|
|
1253
|
-
}), { data:
|
|
1263
|
+
}), { data: bs } = ee({ items: m(() => {
|
|
1254
1264
|
let e = G.selected;
|
|
1255
1265
|
return O.multiple ? e ?? [] : e == null ? [] : [e];
|
|
1256
|
-
}) }), { options: J, baseOptions: Y } =
|
|
1257
|
-
disabled:
|
|
1258
|
-
items:
|
|
1266
|
+
}) }), { options: J, baseOptions: Y } = te({
|
|
1267
|
+
disabled: kt(() => O.disabled),
|
|
1268
|
+
items: ds,
|
|
1259
1269
|
itemText: void 0,
|
|
1260
1270
|
itemValue: O.itemValue,
|
|
1261
|
-
max:
|
|
1271
|
+
max: kt(() => O.max),
|
|
1262
1272
|
selectable: !0,
|
|
1263
|
-
selectedIndexedByHash:
|
|
1264
|
-
}),
|
|
1265
|
-
E(Y, () =>
|
|
1273
|
+
selectedIndexedByHash: bs
|
|
1274
|
+
}), xs = m(() => !ns.value && !J.value.length);
|
|
1275
|
+
E(Y, () => Br.sync(), { flush: "post" });
|
|
1266
1276
|
let X = m(() => {
|
|
1267
|
-
let e = new Set(
|
|
1268
|
-
if (!e.size ||
|
|
1277
|
+
let e = new Set(gr.value.split(" ").filter(Boolean));
|
|
1278
|
+
if (!e.size || pr.value || !J.value.length) return {
|
|
1269
1279
|
first: !1,
|
|
1270
1280
|
last: !1
|
|
1271
1281
|
};
|
|
1272
|
-
let t = (t) => B.value.some((n) => e.has(`${
|
|
1282
|
+
let t = (t) => B.value.some((n) => e.has(`${ss.value[n.key]}:${t}`));
|
|
1273
1283
|
return {
|
|
1274
1284
|
first: t("first"),
|
|
1275
1285
|
last: t("last")
|
|
1276
1286
|
};
|
|
1277
|
-
}),
|
|
1287
|
+
}), Ss = async (e) => {
|
|
1278
1288
|
O.multiple ? G.selected = (G.selected ?? []).concat(e.value) : G.selected = e.value;
|
|
1279
|
-
},
|
|
1289
|
+
}, Cs = async (e) => {
|
|
1280
1290
|
if (O.multiple) {
|
|
1281
|
-
let t = { ...
|
|
1291
|
+
let t = { ...bs.value };
|
|
1282
1292
|
delete t[e.valueHash], G.selected = Object.values(t);
|
|
1283
1293
|
} else G.selected = null;
|
|
1284
1294
|
};
|
|
1285
|
-
|
|
1295
|
+
ne(() => [
|
|
1286
1296
|
O.dependencies,
|
|
1287
1297
|
O.items,
|
|
1288
1298
|
typeof O.items == "function" ? [G.page, G.perPage] : void 0
|
|
1289
1299
|
], async (e, t) => {
|
|
1290
|
-
if (
|
|
1300
|
+
if (vs.value || await ys(), !vs.value) return;
|
|
1291
1301
|
let n = (n) => a(e?.[n]) !== a(t?.[n]), r = t && !n(0) && !n(1) && n(2) ? "pagination" : "dependencies";
|
|
1292
|
-
await
|
|
1302
|
+
await cs(void 0, r, G.selected) === "applied" && ws();
|
|
1293
1303
|
}, { debounce: O.depsDebounceTime });
|
|
1294
|
-
let
|
|
1304
|
+
let ws = () => {
|
|
1295
1305
|
if (!O.enforceCoherence) return;
|
|
1296
1306
|
let e = new Set(J.value.map((e) => e.valueHash)), t = (t) => e.has(a(t));
|
|
1297
1307
|
if (O.multiple) {
|
|
@@ -1299,9 +1309,9 @@ var Ht = {
|
|
|
1299
1309
|
e.every(t) || (G.selected = e.filter(t));
|
|
1300
1310
|
} else !o(G.selected) && !t(G.selected) && (G.selected = null);
|
|
1301
1311
|
let n = G.unselected ?? [];
|
|
1302
|
-
n.every(t) || (G.unselected = n.filter(t)), !o(
|
|
1303
|
-
},
|
|
1304
|
-
let n =
|
|
1312
|
+
n.every(t) || (G.unselected = n.filter(t)), !o(cr.value) && !t(cr.value) && (cr.value = null), lr.value.every(t) || (lr.value = lr.value.filter(t));
|
|
1313
|
+
}, Ts = (e, t) => {
|
|
1314
|
+
let n = xr(t, e.key);
|
|
1305
1315
|
return e.formatter && (!o(n) || e.formatOnNull !== !1) && (n = e.formatter(n, e.key, t)), o(n) ? e.placeholder ? {
|
|
1306
1316
|
content: e.placeholder,
|
|
1307
1317
|
kind: "placeholder"
|
|
@@ -1312,16 +1322,16 @@ var Ht = {
|
|
|
1312
1322
|
content: n,
|
|
1313
1323
|
kind: "value"
|
|
1314
1324
|
};
|
|
1315
|
-
},
|
|
1316
|
-
let r = () => n().content, i =
|
|
1325
|
+
}, Es = (e, t) => Ts(e, t).content, Ds = (e, t, n) => {
|
|
1326
|
+
let r = () => n().content, i = ss.value[e.key], a = e.align ?? "start";
|
|
1317
1327
|
return {
|
|
1318
1328
|
align: a,
|
|
1319
1329
|
get classes() {
|
|
1320
1330
|
let n = String(e.key);
|
|
1321
|
-
return
|
|
1331
|
+
return Fe(Bs.value.has(n) ? [
|
|
1322
1332
|
`bb-table__cell--${a}`,
|
|
1323
1333
|
"bb-table__cell--fluid",
|
|
1324
|
-
...
|
|
1334
|
+
...Fs(n, r())
|
|
1325
1335
|
] : [`bb-table__cell--${a}`], O.tdClass, e.tdClass, r(), e.key, t.item);
|
|
1326
1336
|
},
|
|
1327
1337
|
get content() {
|
|
@@ -1334,19 +1344,19 @@ var Ht = {
|
|
|
1334
1344
|
label: e.label,
|
|
1335
1345
|
slotName: i
|
|
1336
1346
|
};
|
|
1337
|
-
},
|
|
1347
|
+
}, Os = m(() => {
|
|
1338
1348
|
let e = {};
|
|
1339
1349
|
if (O.fixed || K.value || q.value || A.thead) return e;
|
|
1340
|
-
let t =
|
|
1341
|
-
for (let n of B.value)
|
|
1350
|
+
let t = Ge(ds.value ?? []);
|
|
1351
|
+
for (let n of B.value) Pi(n) ?? (A[ss.value[n.key]] || (e[String(n.key)] = t.map((e) => w(Es(n, e)))));
|
|
1342
1352
|
return e;
|
|
1343
|
-
}),
|
|
1353
|
+
}), ks = m(() => Z.value?.em ?? 0), As = Ke({
|
|
1344
1354
|
table: () => I.value,
|
|
1345
1355
|
container: () => L.value,
|
|
1346
|
-
columns: () =>
|
|
1347
|
-
em: () =>
|
|
1356
|
+
columns: () => Rs(),
|
|
1357
|
+
em: () => ks.value,
|
|
1348
1358
|
plan: () => {
|
|
1349
|
-
let { stage: e, hold: t, floors: n, wrapLabels: r } =
|
|
1359
|
+
let { stage: e, hold: t, floors: n, wrapLabels: r } = Us.value;
|
|
1350
1360
|
return JSON.stringify([
|
|
1351
1361
|
e,
|
|
1352
1362
|
t,
|
|
@@ -1354,18 +1364,18 @@ var Ht = {
|
|
|
1354
1364
|
[...r]
|
|
1355
1365
|
]);
|
|
1356
1366
|
}
|
|
1357
|
-
}),
|
|
1358
|
-
|
|
1367
|
+
}), js = m(() => {
|
|
1368
|
+
As.version.value;
|
|
1359
1369
|
let e = {};
|
|
1360
|
-
for (let [t, n] of Object.entries(
|
|
1370
|
+
for (let [t, n] of Object.entries(Os.value)) e[t] = Be(n, As.lookup(t));
|
|
1361
1371
|
return e;
|
|
1362
|
-
}),
|
|
1372
|
+
}), Ms = m(() => {
|
|
1363
1373
|
let e = [];
|
|
1364
|
-
for (let [t, n] of Object.entries(
|
|
1374
|
+
for (let [t, n] of Object.entries(js.value)) n && e.push(`${t}\u0001${+!!n.prose}\u0001${n.usual}`);
|
|
1365
1375
|
return e.join("");
|
|
1366
|
-
}),
|
|
1376
|
+
}), Ns = m(() => {
|
|
1367
1377
|
let e = /* @__PURE__ */ new Map();
|
|
1368
|
-
for (let t of
|
|
1378
|
+
for (let t of Ms.value.split("")) {
|
|
1369
1379
|
if (!t) continue;
|
|
1370
1380
|
let [n, r, i] = t.split("");
|
|
1371
1381
|
e.set(n, {
|
|
@@ -1374,28 +1384,28 @@ var Ht = {
|
|
|
1374
1384
|
});
|
|
1375
1385
|
}
|
|
1376
1386
|
return e;
|
|
1377
|
-
}),
|
|
1378
|
-
let e =
|
|
1379
|
-
if (!
|
|
1380
|
-
let t =
|
|
1381
|
-
for (let e of B.value) A[
|
|
1387
|
+
}), Ps = m(() => {
|
|
1388
|
+
let e = ds.value ?? [];
|
|
1389
|
+
if (!je(e.length)) return null;
|
|
1390
|
+
let t = Ge(e), n = /* @__PURE__ */ new Map();
|
|
1391
|
+
for (let e of B.value) A[ss.value[e.key]] || n.set(String(e.key), new Set(t.map((t) => w(Es(e, t)).trim())));
|
|
1382
1392
|
return n;
|
|
1383
|
-
}),
|
|
1384
|
-
let n =
|
|
1393
|
+
}), Fs = (e, t) => {
|
|
1394
|
+
let n = Ns.value.get(e);
|
|
1385
1395
|
if (!n) return [];
|
|
1386
1396
|
let r = w(t);
|
|
1387
|
-
return
|
|
1388
|
-
},
|
|
1389
|
-
let e = {}, t =
|
|
1397
|
+
return Ps.value?.get(e)?.has(r.trim()) === !1 ? [] : De(r, n);
|
|
1398
|
+
}, Is = m(() => {
|
|
1399
|
+
let e = {}, t = js.value, n = Z.value?.padEm ?? 1.5, r = Z.value?.head, i = Z.value ? Z.value.rootEm / Z.value.em : 1, a = n / i;
|
|
1390
1400
|
for (let o of B.value) {
|
|
1391
1401
|
let s = String(o.key);
|
|
1392
1402
|
if (!(s in t)) continue;
|
|
1393
|
-
let c = o.sortable ? 1.3 : 0, l =
|
|
1394
|
-
l.squeeze = (l.squeeze - a) * i + n,
|
|
1403
|
+
let c = o.sortable ? 1.3 : 0, l = Ae(t[s], r ? Vs(o.label ?? "", r.transform) : o.label ?? "", n + As.extraPadOf(s), c, r, a, As.labelOf(s, c));
|
|
1404
|
+
l.squeeze = (l.squeeze - a) * i + n, Ls(o) || (l.labelWrap = l.label, l.wrapped = l.hard), e[String(o.key)] = l;
|
|
1395
1405
|
}
|
|
1396
1406
|
return e;
|
|
1397
|
-
}),
|
|
1398
|
-
let t =
|
|
1407
|
+
}), Ls = (e) => {
|
|
1408
|
+
let t = ss.value[e.key];
|
|
1399
1409
|
return ![
|
|
1400
1410
|
`${t}:header`,
|
|
1401
1411
|
`${t}:header:prepend`,
|
|
@@ -1403,8 +1413,8 @@ var Ht = {
|
|
|
1403
1413
|
"header:prepend",
|
|
1404
1414
|
"header:append"
|
|
1405
1415
|
].some((e) => A[e]);
|
|
1406
|
-
},
|
|
1407
|
-
let e =
|
|
1416
|
+
}, Rs = () => {
|
|
1417
|
+
let e = Os.value, t = Number(z.value) + Number(!!O.selectable), n = [];
|
|
1408
1418
|
return B.value.forEach((r, i) => {
|
|
1409
1419
|
let a = String(r.key);
|
|
1410
1420
|
a in e && n.push({
|
|
@@ -1412,56 +1422,56 @@ var Ht = {
|
|
|
1412
1422
|
index: i + t,
|
|
1413
1423
|
values: e[a],
|
|
1414
1424
|
placeholder: r.placeholder || void 0,
|
|
1415
|
-
prose:
|
|
1416
|
-
label:
|
|
1425
|
+
prose: Ns.value.get(a)?.prose ?? !1,
|
|
1426
|
+
label: Ls(r) && r.label || void 0,
|
|
1417
1427
|
dynamic: typeof O.tdClass == "function" || typeof r.tdClass == "function" || typeof O.rowClass == "function"
|
|
1418
1428
|
});
|
|
1419
1429
|
}), n;
|
|
1420
|
-
},
|
|
1430
|
+
}, zs = m(() => Object.keys(Is.value).join(" ")), Bs = m(() => new Set(zs.value.split(" ").filter(Boolean))), Z = C(null), Vs = (e, t) => t === "uppercase" ? e.toUpperCase() : t === "lowercase" ? e.toLowerCase() : t === "capitalize" ? e.replace(/(^|\s)(\S)/g, (e, t, n) => t + n.toUpperCase()) : e, Hs = m(() => {
|
|
1421
1431
|
let e = Z.value;
|
|
1422
1432
|
if (!e) return 0;
|
|
1423
1433
|
let t = B.value.reduce((e, t) => {
|
|
1424
|
-
let n =
|
|
1434
|
+
let n = Pi(t), r = n == null ? "" : Xa(n);
|
|
1425
1435
|
return e + (/^[\d.]+px$/.test(r) ? parseFloat(r) : 0);
|
|
1426
1436
|
}, 0);
|
|
1427
1437
|
return Math.max(0, (e.width - t) / e.em);
|
|
1428
|
-
}),
|
|
1438
|
+
}), Us = m(() => Me(Is.value, Hs.value, Z.value ? {
|
|
1429
1439
|
em: Z.value.em,
|
|
1430
1440
|
padEm: Z.value.padEm
|
|
1431
|
-
} : void 0)),
|
|
1432
|
-
let { hold: e } =
|
|
1433
|
-
return
|
|
1434
|
-
}),
|
|
1435
|
-
let { floors: e } =
|
|
1441
|
+
} : void 0)), Ws = m(() => {
|
|
1442
|
+
let { hold: e } = Us.value;
|
|
1443
|
+
return zs.value && e !== "none" ? `bb-table__table--hold-${e}` : void 0;
|
|
1444
|
+
}), Gs = m(() => Us.value.wrapLabels), Ks = m(() => {
|
|
1445
|
+
let { floors: e } = Us.value, t = Z.value, n = t?.padEm ?? 1.5, r = {};
|
|
1436
1446
|
for (let i in e) {
|
|
1437
1447
|
let a = Math.max(0, e[i] - n);
|
|
1438
|
-
r[i] = { "--floor": t ? `${
|
|
1448
|
+
r[i] = { "--floor": t ? `${Ne(e[i], n, t.em)}px` : `calc(${a.toFixed(2)} * var(--bb-fs, 1em))` };
|
|
1439
1449
|
}
|
|
1440
1450
|
return r;
|
|
1441
|
-
}), Q,
|
|
1451
|
+
}), Q, qs = 0, Js, Ys = (e) => {
|
|
1442
1452
|
let t = [];
|
|
1443
1453
|
for (let n = e.parentElement; n; n = n.parentElement) getComputedStyle(n).containerType !== "normal" && t.push(`${n.clientWidth}x${n.clientHeight}`);
|
|
1444
1454
|
return t.join(",");
|
|
1445
|
-
},
|
|
1455
|
+
}, Xs = (e) => {
|
|
1446
1456
|
let t = getComputedStyle(e), n = t.getPropertyValue("--bb-fs").trim(), r = [
|
|
1447
1457
|
n,
|
|
1448
1458
|
t.fontSize,
|
|
1449
1459
|
getComputedStyle(document.documentElement).fontSize,
|
|
1450
1460
|
/v(w|h|i|b|min|max)|cq/.test(n) ? `${window.innerWidth}x${window.innerHeight}` : "",
|
|
1451
|
-
/cq/.test(n) ?
|
|
1461
|
+
/cq/.test(n) ? Ys(e) : ""
|
|
1452
1462
|
].join("|");
|
|
1453
|
-
if (
|
|
1463
|
+
if (Js?.key === r) return Js.em;
|
|
1454
1464
|
let i = document.createElement("span");
|
|
1455
1465
|
i.style.cssText = "position:absolute;visibility:hidden;font-size:var(--bb-fs,1em)", e.append(i);
|
|
1456
1466
|
let a = parseFloat(getComputedStyle(i).fontSize);
|
|
1457
|
-
return i.remove(),
|
|
1467
|
+
return i.remove(), Js = {
|
|
1458
1468
|
key: r,
|
|
1459
1469
|
em: a
|
|
1460
1470
|
}, a;
|
|
1461
|
-
},
|
|
1471
|
+
}, Zs = () => {
|
|
1462
1472
|
let e = L.value, t = I.value;
|
|
1463
1473
|
if (!e?.isConnected || !t) return;
|
|
1464
|
-
let n = getComputedStyle(t), r = parseFloat(n.fontSize) || 16, i =
|
|
1474
|
+
let n = getComputedStyle(t), r = parseFloat(n.fontSize) || 16, i = Xs(e) || r, a = 2 * (parseFloat(n.getPropertyValue("--px")) || 12) / i, o = 0;
|
|
1465
1475
|
for (let e of t.querySelectorAll(":scope > .bb-table__head > [role=\"row\"] > :is(.bb-table__cell-column-header--row-drag, .bb-table__cell-column-header--select, .bb-table__cell-column-header--actions)")) o += e.getBoundingClientRect().width;
|
|
1466
1476
|
let s = e.clientWidth ? Math.max(1, e.clientWidth - o) : 0, c = t.querySelector(".bb-table-header__content"), l;
|
|
1467
1477
|
if (c) {
|
|
@@ -1480,7 +1490,7 @@ var Ht = {
|
|
|
1480
1490
|
padEm: a,
|
|
1481
1491
|
head: l
|
|
1482
1492
|
});
|
|
1483
|
-
},
|
|
1493
|
+
}, Qs = {
|
|
1484
1494
|
units: {
|
|
1485
1495
|
whole: ".bb-table__cell--fluid:is(.bb-table__cell--line, .bb-table__cell--token)",
|
|
1486
1496
|
word: ".bb-table__cell--fluid.bb-table__cell--word"
|
|
@@ -1494,130 +1504,133 @@ var Ht = {
|
|
|
1494
1504
|
word: ".bb-table__cell--fluid:is(.bb-table__cell--line, .bb-table__cell--word)"
|
|
1495
1505
|
},
|
|
1496
1506
|
none: {}
|
|
1497
|
-
},
|
|
1498
|
-
let { stage: e, hold: t, floors: n } =
|
|
1499
|
-
e >= 7 || !Object.keys(n).length ||
|
|
1500
|
-
},
|
|
1501
|
-
|
|
1502
|
-
},
|
|
1503
|
-
cancelAnimationFrame(
|
|
1507
|
+
}, $s = () => {
|
|
1508
|
+
let { stage: e, hold: t, floors: n } = Us.value;
|
|
1509
|
+
e >= 7 || !Object.keys(n).length || As.guard(t, Qs[t]);
|
|
1510
|
+
}, ec = (e = !1) => {
|
|
1511
|
+
Zs(), q.value || (As.checkTypography(), As.measure(e), b($s));
|
|
1512
|
+
}, tc = () => {
|
|
1513
|
+
cancelAnimationFrame(qs), qs = requestAnimationFrame(() => ec());
|
|
1504
1514
|
};
|
|
1505
|
-
|
|
1506
|
-
L.value && typeof ResizeObserver < "u" && (q.value ||
|
|
1515
|
+
xt(() => {
|
|
1516
|
+
L.value && typeof ResizeObserver < "u" && (q.value || ec(!0), Q = new ResizeObserver(tc), Q.observe(L.value), I.value && !q.value && Q.observe(I.value), As.onFontsChanged(() => !q.value && tc()));
|
|
1507
1517
|
}), E([I, q], ([e, t], [n]) => {
|
|
1508
1518
|
Q && (n && Q.unobserve(n), e && !t && Q.observe(e));
|
|
1509
1519
|
});
|
|
1510
|
-
let
|
|
1511
|
-
E(
|
|
1512
|
-
Object.entries(e).every(([e, n]) =>
|
|
1520
|
+
let nc = (e, t) => e?.length === t.length && e.every((e, n) => e === t[n]);
|
|
1521
|
+
E(Os, (e, t) => {
|
|
1522
|
+
Object.entries(e).every(([e, n]) => nc(t?.[e], n)) || (As.rowsChanged(), Q && tc());
|
|
1513
1523
|
}), E(L, (e, t) => {
|
|
1514
|
-
Q && (t && Q.unobserve(t), e && Q.observe(e),
|
|
1524
|
+
Q && (t && Q.unobserve(t), e && Q.observe(e), tc());
|
|
1515
1525
|
}), E(() => [
|
|
1516
1526
|
!!O.selectable,
|
|
1517
1527
|
z.value,
|
|
1518
1528
|
M.value
|
|
1519
|
-
], () => Q &&
|
|
1520
|
-
Q?.disconnect(), cancelAnimationFrame(
|
|
1529
|
+
], () => Q && tc()), x(() => {
|
|
1530
|
+
Q?.disconnect(), cancelAnimationFrame(qs), As.dispose();
|
|
1521
1531
|
});
|
|
1522
|
-
let
|
|
1523
|
-
let t =
|
|
1524
|
-
return t ?
|
|
1532
|
+
let rc = C(!1), ic = C(!1), ac = C(!1), oc = C(!1), sc = C(!1), cc = C(!1), lc, uc = 0, dc = 0, fc = (e) => {
|
|
1533
|
+
let t = Jo;
|
|
1534
|
+
return t ? Ku.value.reduce((n, r) => {
|
|
1525
1535
|
let i = typeof r == "number" ? {
|
|
1526
1536
|
index: r,
|
|
1527
1537
|
position: "left"
|
|
1528
1538
|
} : r;
|
|
1529
1539
|
return i.position === e ? n + (parseFloat(t[i.index] ?? "") || 0) : n;
|
|
1530
1540
|
}, 0) : 0;
|
|
1531
|
-
},
|
|
1541
|
+
}, pc = 0, mc = !1, hc = "", gc = () => {
|
|
1532
1542
|
let e = L.value;
|
|
1533
1543
|
if (!e) return;
|
|
1534
|
-
let t =
|
|
1535
|
-
|
|
1536
|
-
},
|
|
1544
|
+
let t = pc, n = mc ? t + e.scrollLeft : e.scrollLeft;
|
|
1545
|
+
rc.value = t > 1 && n > 1, ic.value = t > 1 && t - n > 1;
|
|
1546
|
+
}, _c = () => {
|
|
1537
1547
|
let e = L.value;
|
|
1538
1548
|
if (!e) return;
|
|
1539
|
-
|
|
1540
|
-
let t =
|
|
1541
|
-
r !==
|
|
1542
|
-
},
|
|
1543
|
-
|
|
1549
|
+
pc = K.value ? 0 : e.scrollWidth - e.clientWidth, mc = Ye(e), ac.value = !K.value && (pc > 1 || e.scrollHeight - e.clientHeight > 1), vc();
|
|
1550
|
+
let t = fc(mc ? "right" : "left"), n = fc(mc ? "left" : "right"), r = `${t} ${n}`;
|
|
1551
|
+
r !== hc && (hc = r, e.style.setProperty("--pin-l", `${t}px`), e.style.setProperty("--pin-r", `${n}px`)), K.value || e.style.setProperty("--vw", `${e.clientWidth}px`), sc.value = t > 0, cc.value = n > 0, gc();
|
|
1552
|
+
}, vc = () => {
|
|
1553
|
+
oc.value = !!L.value?.querySelector(Xn);
|
|
1544
1554
|
};
|
|
1545
|
-
|
|
1546
|
-
let
|
|
1555
|
+
St(vc);
|
|
1556
|
+
let yc = m(() => {
|
|
1547
1557
|
if (N.value) return { tabindex: -1 };
|
|
1548
|
-
if (!
|
|
1549
|
-
if (
|
|
1558
|
+
if (!ac.value) return {};
|
|
1559
|
+
if (oc.value) return { tabindex: -1 };
|
|
1550
1560
|
let e = j.rootAttrs;
|
|
1551
1561
|
return {
|
|
1552
1562
|
tabindex: 0,
|
|
1553
|
-
...(O.caption || e["aria-label"] || e["aria-labelledby"]) &&
|
|
1554
|
-
...O.caption ? { "aria-labelledby":
|
|
1563
|
+
...(O.caption || e["aria-label"] || e["aria-labelledby"]) && es.value === "div" ? { role: "region" } : {},
|
|
1564
|
+
...O.caption ? { "aria-labelledby": Mr.value } : {}
|
|
1555
1565
|
};
|
|
1556
|
-
}),
|
|
1557
|
-
cancelAnimationFrame(
|
|
1558
|
-
},
|
|
1559
|
-
cancelAnimationFrame(
|
|
1566
|
+
}), bc = () => {
|
|
1567
|
+
cancelAnimationFrame(uc), uc = requestAnimationFrame(gc);
|
|
1568
|
+
}, xc = () => {
|
|
1569
|
+
cancelAnimationFrame(dc), dc = requestAnimationFrame(_c);
|
|
1560
1570
|
};
|
|
1561
|
-
|
|
1571
|
+
xt(() => {
|
|
1562
1572
|
let e = L.value, t = I.value;
|
|
1563
|
-
e && t && (e.addEventListener("scroll",
|
|
1573
|
+
e && t && (e.addEventListener("scroll", bc, { passive: !0 }), typeof ResizeObserver < "u" && (lc = new ResizeObserver(xc), lc.observe(e), lc.observe(t)));
|
|
1564
1574
|
}), E(L, (e, t) => {
|
|
1565
|
-
t?.removeEventListener("scroll",
|
|
1575
|
+
t?.removeEventListener("scroll", bc), e && (e.addEventListener("scroll", bc, { passive: !0 }), lc && (t && lc.unobserve(t), lc.observe(e), xc()));
|
|
1566
1576
|
}), E(I, (e, t) => {
|
|
1567
|
-
|
|
1577
|
+
lc && (t && lc.unobserve(t), e && lc.observe(e), xc());
|
|
1568
1578
|
}), x(() => {
|
|
1569
|
-
L.value?.removeEventListener("scroll",
|
|
1579
|
+
L.value?.removeEventListener("scroll", bc), lc?.disconnect(), cancelAnimationFrame(uc), cancelAnimationFrame(dc);
|
|
1570
1580
|
});
|
|
1571
|
-
let
|
|
1572
|
-
let t = e.align ?? "start", n = `${
|
|
1581
|
+
let Sc = m(() => B.value.map((e) => {
|
|
1582
|
+
let t = e.align ?? "start", n = `${ss.value[e.key]}:header`, r = Na(e.key), i = r ?? e.sorted, a = i ? i === "asc" ? "ascending" : "descending" : void 0;
|
|
1573
1583
|
return {
|
|
1574
1584
|
align: t,
|
|
1575
1585
|
key: e.key,
|
|
1576
1586
|
label: e.label,
|
|
1577
1587
|
slotName: n,
|
|
1578
|
-
classes:
|
|
1588
|
+
classes: Ie([`bb-table__cell-column-header--${t}`], O.thClass, e.thClass),
|
|
1579
1589
|
sortable: !!e.sortable,
|
|
1580
1590
|
sortDirection: a,
|
|
1581
1591
|
sortOrder: r
|
|
1582
1592
|
};
|
|
1583
|
-
})),
|
|
1584
|
-
let
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1593
|
+
})), Cc = (e, t) => [`${ss.value[e]}:header:${t}`, `header:${t}`].filter((e) => A[e]), wc = (e) => {
|
|
1594
|
+
for (let t of e.names) {
|
|
1595
|
+
let n = s(A[t], e.scope);
|
|
1596
|
+
if (n) return n;
|
|
1597
|
+
}
|
|
1598
|
+
return null;
|
|
1599
|
+
};
|
|
1600
|
+
wc.props = ["names", "scope"];
|
|
1601
|
+
let Tc = (e) => ({
|
|
1589
1602
|
classes: e.classes,
|
|
1590
1603
|
columnKey: e.key,
|
|
1591
|
-
items:
|
|
1604
|
+
items: ds.value,
|
|
1592
1605
|
label: e.label,
|
|
1593
1606
|
sortable: e.sortable,
|
|
1594
1607
|
sortOrder: e.sortOrder,
|
|
1595
|
-
toggleSort: (t) =>
|
|
1596
|
-
hideColumn: () =>
|
|
1597
|
-
}),
|
|
1608
|
+
toggleSort: (t) => Pa(e.key, t),
|
|
1609
|
+
hideColumn: () => li(e.key)
|
|
1610
|
+
}), Ec = (e, t) => {
|
|
1598
1611
|
let n = J.value[e];
|
|
1599
1612
|
return n && n.valueHash === t ? n : J.value.find((e) => e.valueHash === t);
|
|
1600
|
-
},
|
|
1601
|
-
let t = Y.value[e], n = B.value, r = m(() => n.map((e) =>
|
|
1613
|
+
}, Dc = (e) => {
|
|
1614
|
+
let t = Y.value[e], n = B.value, r = m(() => n.map((e) => Ts(e, t.item))), i = n.map((e, n) => Ds(e, t, () => r.value[n]));
|
|
1602
1615
|
return {
|
|
1603
1616
|
get accessibleLabel() {
|
|
1604
|
-
return
|
|
1617
|
+
return $o(i, t.item);
|
|
1605
1618
|
},
|
|
1606
1619
|
cols: i,
|
|
1607
1620
|
get rowClasses() {
|
|
1608
|
-
return
|
|
1621
|
+
return Le(O.rowClass, B.value, i, t.item);
|
|
1609
1622
|
},
|
|
1610
1623
|
onRowClick: (n) => {
|
|
1611
|
-
let r =
|
|
1612
|
-
r &&
|
|
1624
|
+
let r = Ec(e, t.valueHash);
|
|
1625
|
+
r && ja(n) && (ka(r), k("click:row", n, r.item));
|
|
1613
1626
|
},
|
|
1614
1627
|
onRowContextMenu: (n) => {
|
|
1615
|
-
let r =
|
|
1616
|
-
r && !
|
|
1628
|
+
let r = Ec(e, t.valueHash);
|
|
1629
|
+
r && !Aa(n) && (k("contextmenu:row", n, r.item), ei(n, r.valueHash, r.item));
|
|
1617
1630
|
},
|
|
1618
1631
|
onRowDblClick: (n) => {
|
|
1619
|
-
let r =
|
|
1620
|
-
r && !
|
|
1632
|
+
let r = Ec(e, t.valueHash);
|
|
1633
|
+
r && !Aa(n) && k("dblclick:row", n, r.item);
|
|
1621
1634
|
},
|
|
1622
1635
|
item: t.item,
|
|
1623
1636
|
get text() {
|
|
@@ -1626,24 +1639,24 @@ var Ht = {
|
|
|
1626
1639
|
valueHash: t.valueHash,
|
|
1627
1640
|
value: t.value
|
|
1628
1641
|
};
|
|
1629
|
-
},
|
|
1630
|
-
Y.value,
|
|
1642
|
+
}, Oc = m(() => {
|
|
1643
|
+
Y.value, ss.value, O.tdClass, O.rowClass, O.accessibleLabel;
|
|
1631
1644
|
for (let e of B.value) e.align, e.formatOnNull, e.formatter, e.key, e.label, e.placeholder, e.tdClass;
|
|
1632
1645
|
return /* @__PURE__ */ new Map();
|
|
1633
|
-
}),
|
|
1634
|
-
if (!(!q.value || e.size <=
|
|
1635
|
-
for (let t of e.keys()) if (e.delete(t), e.size <=
|
|
1646
|
+
}), kc = (e) => {
|
|
1647
|
+
if (!(!q.value || e.size <= Zn)) {
|
|
1648
|
+
for (let t of e.keys()) if (e.delete(t), e.size <= Zn) break;
|
|
1636
1649
|
}
|
|
1637
|
-
},
|
|
1638
|
-
let t =
|
|
1650
|
+
}, Ac = (e) => {
|
|
1651
|
+
let t = Oc.value, n = t.get(e);
|
|
1639
1652
|
if (n) return n;
|
|
1640
|
-
let r =
|
|
1641
|
-
return t.set(e, r),
|
|
1642
|
-
},
|
|
1643
|
-
let t =
|
|
1653
|
+
let r = Dc(e);
|
|
1654
|
+
return t.set(e, r), kc(t), r;
|
|
1655
|
+
}, jc = m(() => (Oc.value, $.value, J.value, Sa.value, O.selectable, O.highlightable, /* @__PURE__ */ new Map())), Mc = /* @__PURE__ */ new Map(), Nc = /* @__PURE__ */ new WeakMap(), Pc = (e) => {
|
|
1656
|
+
let t = jc.value, n = t.get(e.index);
|
|
1644
1657
|
if (n) return n;
|
|
1645
|
-
let r =
|
|
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 &&
|
|
1658
|
+
let r = Ac(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 Sa.value, c = Mc.get(r.valueHash);
|
|
1659
|
+
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 && Nc.get(c) === a && c.highlighted === s) return t.set(e.index, c), kc(t), c;
|
|
1647
1660
|
let l = {
|
|
1648
1661
|
get accessibleLabel() {
|
|
1649
1662
|
return r.accessibleLabel;
|
|
@@ -1669,43 +1682,43 @@ var Ht = {
|
|
|
1669
1682
|
return o();
|
|
1670
1683
|
},
|
|
1671
1684
|
get highlightable() {
|
|
1672
|
-
return
|
|
1685
|
+
return Ta() && !Ea(r.item);
|
|
1673
1686
|
},
|
|
1674
1687
|
expandProps: {},
|
|
1675
|
-
toggleExpanded: () =>
|
|
1676
|
-
toggleHighlighted: () =>
|
|
1677
|
-
toggleSelected: () =>
|
|
1688
|
+
toggleExpanded: () => du(r.valueHash),
|
|
1689
|
+
toggleHighlighted: () => ka(r, { viaSlot: !0 }),
|
|
1690
|
+
toggleSelected: () => Tu(l)
|
|
1678
1691
|
};
|
|
1679
|
-
return l.expandProps =
|
|
1680
|
-
},
|
|
1692
|
+
return l.expandProps = uu(l), Nc.set(l, a), t.set(e.index, l), kc(t), Mc.delete(r.valueHash), Mc.set(r.valueHash, l), Mc.size > Zn && Mc.delete(Mc.keys().next().value), l;
|
|
1693
|
+
}, Fc = Dt({
|
|
1681
1694
|
key: null,
|
|
1682
1695
|
row: 0,
|
|
1683
1696
|
col: null
|
|
1684
|
-
}),
|
|
1697
|
+
}), Ic = m(() => {
|
|
1685
1698
|
if (!N.value) return null;
|
|
1686
1699
|
let e = /* @__PURE__ */ new Map();
|
|
1687
1700
|
for (let t of $.value) e.set(t.key, t.virtualIndex);
|
|
1688
1701
|
return e;
|
|
1689
|
-
}),
|
|
1702
|
+
}), Lc = m(() => {
|
|
1690
1703
|
if (!N.value) return null;
|
|
1691
|
-
let e = $.value.length, t =
|
|
1692
|
-
if (n = t.row ===
|
|
1693
|
-
let r = t.col === null && (!
|
|
1704
|
+
let e = $.value.length, t = Fc.value, n;
|
|
1705
|
+
if (n = t.row === $n && X.value.first || t.row === er && X.value.last ? t.row : !e || t.row < 0 ? P.value ? -1 : e ? 0 : null : (t.key === null ? void 0 : Ic.value?.get(t.key)) ?? i(t.row, 0, e - 1), n === null) return null;
|
|
1706
|
+
let r = t.col === null && (!_r.value || n < 0) ? 0 : t.col;
|
|
1694
1707
|
return {
|
|
1695
1708
|
row: n,
|
|
1696
1709
|
col: r
|
|
1697
1710
|
};
|
|
1698
|
-
}),
|
|
1699
|
-
let t =
|
|
1711
|
+
}), Rc = (e) => {
|
|
1712
|
+
let t = Lc.value;
|
|
1700
1713
|
return !t || t.row !== e ? -2 : t.col ?? -1;
|
|
1701
|
-
},
|
|
1714
|
+
}, zc = (e) => {
|
|
1702
1715
|
if (!P.value) return;
|
|
1703
|
-
let t =
|
|
1704
|
-
return !t || t.row !== -1 ? -1 : Math.min(t.col ?? 0,
|
|
1716
|
+
let t = Lc.value;
|
|
1717
|
+
return !t || t.row !== -1 ? -1 : Math.min(t.col ?? 0, os.value - 1) === e ? 0 : -1;
|
|
1705
1718
|
}, $ = m(() => {
|
|
1706
1719
|
let e = [], t = 0, n = ((G.page ?? 0) - 1) * (G.perPage ?? 0), r = 1 + Number(X.value.first);
|
|
1707
1720
|
return Y.value.forEach((i, a) => {
|
|
1708
|
-
let o = i.valueHash in
|
|
1721
|
+
let o = i.valueHash in Ca.value, s = n + r + a + 1 + t;
|
|
1709
1722
|
e.push({
|
|
1710
1723
|
kind: "row",
|
|
1711
1724
|
index: a,
|
|
@@ -1722,7 +1735,7 @@ var Ht = {
|
|
|
1722
1735
|
rowIndex: s
|
|
1723
1736
|
}));
|
|
1724
1737
|
}), e;
|
|
1725
|
-
}),
|
|
1738
|
+
}), Bc = (e, t, n, r) => {
|
|
1726
1739
|
let i;
|
|
1727
1740
|
return {
|
|
1728
1741
|
kind: t,
|
|
@@ -1731,13 +1744,13 @@ var Ht = {
|
|
|
1731
1744
|
virtualIndex: e.virtualIndex,
|
|
1732
1745
|
height: r,
|
|
1733
1746
|
get item() {
|
|
1734
|
-
return i ??=
|
|
1747
|
+
return i ??= Pc(e);
|
|
1735
1748
|
}
|
|
1736
1749
|
};
|
|
1737
|
-
},
|
|
1750
|
+
}, Vc = Dt(null), Hc = C(0), Uc = (e) => /^(auto|scroll)$/.test(getComputedStyle(e).overflowY), Wc = () => {
|
|
1738
1751
|
let e = L.value, t = R.value, n = I.value;
|
|
1739
1752
|
if (!q.value || !e || !t || !n) {
|
|
1740
|
-
|
|
1753
|
+
Vc.value = null;
|
|
1741
1754
|
return;
|
|
1742
1755
|
}
|
|
1743
1756
|
let r = e.getBoundingClientRect(), i = n.getBoundingClientRect().bottom - r.top, a = getComputedStyle(e).maxHeight !== "none" || e.scrollHeight > e.clientHeight + 1 || e.clientHeight > i + 1, o = window;
|
|
@@ -1745,7 +1758,7 @@ var Ht = {
|
|
|
1745
1758
|
else {
|
|
1746
1759
|
let t = e.parentElement;
|
|
1747
1760
|
for (; t && t !== document.body && t !== document.documentElement;) {
|
|
1748
|
-
if (
|
|
1761
|
+
if (Uc(t)) {
|
|
1749
1762
|
o = t;
|
|
1750
1763
|
break;
|
|
1751
1764
|
}
|
|
@@ -1753,46 +1766,46 @@ var Ht = {
|
|
|
1753
1766
|
}
|
|
1754
1767
|
}
|
|
1755
1768
|
let s = t.querySelector(":scope > .bb-table__edge-row--first"), c = t.getBoundingClientRect().top + (s?.offsetHeight ?? 0), l = o === window ? c + window.scrollY : c - o.getBoundingClientRect().top + o.scrollTop;
|
|
1756
|
-
|
|
1757
|
-
},
|
|
1769
|
+
Hc.value !== l && (Hc.value = l), Vc.value !== o && (Vc.value = o);
|
|
1770
|
+
}, Gc = C(37), Kc = () => {
|
|
1758
1771
|
let e = L.value;
|
|
1759
1772
|
if (!e) return;
|
|
1760
1773
|
let t = parseFloat(getComputedStyle(e).getPropertyValue("--cell-h"));
|
|
1761
|
-
t > 0 && (
|
|
1762
|
-
},
|
|
1774
|
+
t > 0 && (Gc.value = t + 1);
|
|
1775
|
+
}, qc = C(null), Jc = (e) => {
|
|
1763
1776
|
if (!q.value || !R.value) return;
|
|
1764
1777
|
let t = e.target;
|
|
1765
1778
|
for (; t && t.parentElement !== R.value;) t = t.parentElement;
|
|
1766
1779
|
let n = Number(t?.dataset.index);
|
|
1767
|
-
|
|
1768
|
-
},
|
|
1780
|
+
qc.value = Number.isInteger(n) ? n : null;
|
|
1781
|
+
}, Yc = (e) => {
|
|
1769
1782
|
if (!q.value) return;
|
|
1770
1783
|
let t = e.relatedTarget;
|
|
1771
|
-
t && R.value?.contains(t) || (
|
|
1772
|
-
},
|
|
1784
|
+
t && R.value?.contains(t) || (qc.value = null);
|
|
1785
|
+
}, Xc = C(0), Zc = 0, Qc = C(!1), $c, el = {
|
|
1773
1786
|
offset: 0,
|
|
1774
1787
|
time: 0
|
|
1775
|
-
},
|
|
1776
|
-
|
|
1777
|
-
},
|
|
1778
|
-
clearTimeout(
|
|
1779
|
-
},
|
|
1780
|
-
let t = performance.now(), n = t -
|
|
1781
|
-
if (
|
|
1788
|
+
}, tl = 0, nl = /* @__PURE__ */ new Set(), rl = null, il = 0, al = (e) => {
|
|
1789
|
+
il = il ? il * .7 + e * .3 : e;
|
|
1790
|
+
}, ol = () => {
|
|
1791
|
+
clearTimeout($c), $c = void 0, Qc.value && (Qc.value = !1, hl());
|
|
1792
|
+
}, sl = (e) => {
|
|
1793
|
+
let t = performance.now(), n = t - el.time, r = e - el.offset;
|
|
1794
|
+
if (el = {
|
|
1782
1795
|
offset: e,
|
|
1783
1796
|
time: t
|
|
1784
|
-
},
|
|
1785
|
-
let i =
|
|
1786
|
-
if (n > 0 && n < 250 && i &&
|
|
1787
|
-
let e =
|
|
1788
|
-
Math.abs(r) / n *
|
|
1797
|
+
}, tl > 0) return;
|
|
1798
|
+
let i = rl;
|
|
1799
|
+
if (n > 0 && n < 250 && i && il) {
|
|
1800
|
+
let e = fl?.scrollRect?.height ?? 0, t = (i.end - i.start + e) / 2;
|
|
1801
|
+
Math.abs(r) / n * il > t && (Qc.value = !0);
|
|
1789
1802
|
}
|
|
1790
|
-
clearTimeout(
|
|
1791
|
-
},
|
|
1792
|
-
let e =
|
|
1793
|
-
if (!e?.size || e.size ===
|
|
1794
|
-
if (
|
|
1795
|
-
|
|
1803
|
+
clearTimeout($c), $c = setTimeout(ol, ir);
|
|
1804
|
+
}, cl = C(0), ll = -1, ul = !1, dl = () => {
|
|
1805
|
+
let e = fl?.itemSizeCache;
|
|
1806
|
+
if (!e?.size || e.size === ll) return;
|
|
1807
|
+
if (ll = e.size, ul) {
|
|
1808
|
+
Bo();
|
|
1796
1809
|
return;
|
|
1797
1810
|
}
|
|
1798
1811
|
let t = /* @__PURE__ */ new Map(), n = 0;
|
|
@@ -1804,78 +1817,78 @@ var Ht = {
|
|
|
1804
1817
|
if (n >= 5) {
|
|
1805
1818
|
let e = 0, r = -1;
|
|
1806
1819
|
for (let [n, i] of t) (i > r || i === r && n < e) && (r = i, e = n);
|
|
1807
|
-
e > 0 && !
|
|
1820
|
+
e > 0 && !ul && (cl.value = e, n >= 20 && (ul = !0));
|
|
1808
1821
|
}
|
|
1809
|
-
|
|
1810
|
-
},
|
|
1822
|
+
Bo();
|
|
1823
|
+
}, fl = null, pl = !1;
|
|
1811
1824
|
E(q, (e) => {
|
|
1812
|
-
|
|
1825
|
+
pl = e;
|
|
1813
1826
|
}, { immediate: !0 });
|
|
1814
|
-
let
|
|
1815
|
-
if (
|
|
1816
|
-
let t = q.value ?
|
|
1817
|
-
|
|
1827
|
+
let ml = Dt([]), hl = (e = !1) => {
|
|
1828
|
+
if (Zc &&= (cancelAnimationFrame(Zc), 0), !fl) return;
|
|
1829
|
+
let t = q.value ? fl.getVirtualItems() : [];
|
|
1830
|
+
Xc.value = fl.getTotalSize();
|
|
1818
1831
|
let n = [], r = null;
|
|
1819
1832
|
if (t.length) {
|
|
1820
|
-
let e =
|
|
1833
|
+
let e = fl.measurementsCache, i = $.value.length, a = fl.range, o = a ? a.startIndex : t[0].index, s = a ? a.endIndex : t[t.length - 1].index;
|
|
1821
1834
|
for (let e of t) n.push({
|
|
1822
1835
|
index: e.index,
|
|
1823
1836
|
start: e.start,
|
|
1824
1837
|
end: e.end,
|
|
1825
1838
|
size: e.size
|
|
1826
1839
|
});
|
|
1827
|
-
let c = e?.[Math.max(0, o -
|
|
1840
|
+
let c = e?.[Math.max(0, o - nr)], l = e?.[Math.min(i - 1, s + nr)] ?? c;
|
|
1828
1841
|
c && l && (r = {
|
|
1829
1842
|
start: c.start,
|
|
1830
1843
|
end: l.end
|
|
1831
1844
|
});
|
|
1832
1845
|
}
|
|
1833
|
-
let i = !
|
|
1834
|
-
if (
|
|
1846
|
+
let i = !gl || !r || gl.start !== r.start || gl.end !== r.end;
|
|
1847
|
+
if (gl = r, ml.value = n, !r) return;
|
|
1835
1848
|
if (!e || !i) {
|
|
1836
|
-
|
|
1849
|
+
rl = r;
|
|
1837
1850
|
return;
|
|
1838
1851
|
}
|
|
1839
1852
|
let a = performance.now(), o = r;
|
|
1840
1853
|
b(() => {
|
|
1841
|
-
|
|
1854
|
+
al(performance.now() - a), rl = o;
|
|
1842
1855
|
});
|
|
1843
|
-
},
|
|
1844
|
-
|
|
1845
|
-
|
|
1856
|
+
}, gl = null, _l = () => {
|
|
1857
|
+
Zc ||= requestAnimationFrame(() => {
|
|
1858
|
+
Zc = 0, dl(), hl();
|
|
1846
1859
|
});
|
|
1847
|
-
},
|
|
1848
|
-
t ? (
|
|
1849
|
-
},
|
|
1850
|
-
let e =
|
|
1860
|
+
}, vl = (e, t) => {
|
|
1861
|
+
t ? (sl(e.getScrollOffset()), hl(!0)) : _l();
|
|
1862
|
+
}, yl = (e) => $.value[e]?.key ?? e, bl = (e) => ($.value[e]?.kind === "expand" ? 3 : 1) * (cl.value || Gc.value), xl = Ht(m(() => {
|
|
1863
|
+
let e = Vc.value, t = typeof window < "u" && e === window, n = qc.value, r = Lc.value?.row, i = r != null && r >= 0 ? r : null;
|
|
1851
1864
|
return {
|
|
1852
|
-
onChange:
|
|
1865
|
+
onChange: vl,
|
|
1853
1866
|
count: q.value ? $.value.length : 0,
|
|
1854
1867
|
enabled: q.value,
|
|
1855
1868
|
getScrollElement: () => e,
|
|
1856
|
-
estimateSize:
|
|
1857
|
-
getItemKey:
|
|
1858
|
-
overscan:
|
|
1859
|
-
scrollMargin:
|
|
1869
|
+
estimateSize: bl,
|
|
1870
|
+
getItemKey: yl,
|
|
1871
|
+
overscan: nr,
|
|
1872
|
+
scrollMargin: Hc.value,
|
|
1860
1873
|
initialRect: {
|
|
1861
1874
|
width: 0,
|
|
1862
|
-
height:
|
|
1875
|
+
height: rr
|
|
1863
1876
|
},
|
|
1864
1877
|
rangeExtractor: (e) => {
|
|
1865
|
-
let t = e.endIndex - e.startIndex >
|
|
1878
|
+
let t = e.endIndex - e.startIndex > tr ? {
|
|
1866
1879
|
...e,
|
|
1867
|
-
endIndex: e.startIndex +
|
|
1868
|
-
} : e, r =
|
|
1880
|
+
endIndex: e.startIndex + tr
|
|
1881
|
+
} : e, r = It(t), a = [n, i].filter((t) => t != null && t < e.count && !r.includes(t));
|
|
1869
1882
|
return a.length ? [.../* @__PURE__ */ new Set([...r, ...a])].sort((e, t) => e - t) : r;
|
|
1870
1883
|
},
|
|
1871
|
-
observeElementRect: t ?
|
|
1872
|
-
observeElementOffset: t ?
|
|
1873
|
-
scrollToFn: t ?
|
|
1884
|
+
observeElementRect: t ? Vt : zt,
|
|
1885
|
+
observeElementOffset: t ? Bt : Rt,
|
|
1886
|
+
scrollToFn: t ? Ut : Lt
|
|
1874
1887
|
};
|
|
1875
1888
|
}));
|
|
1876
|
-
|
|
1877
|
-
let
|
|
1878
|
-
let t =
|
|
1889
|
+
fl = xl.value;
|
|
1890
|
+
let Sl = (e) => {
|
|
1891
|
+
let t = fl.measurementsCache, n = $.value, r = n.findIndex((t) => t.kind === "row" && t.index === e);
|
|
1879
1892
|
if (r < 0 || !t?.[r]) return null;
|
|
1880
1893
|
let i = n[r + 1]?.kind === "expand" && t[r + 1] ? r + 1 : r;
|
|
1881
1894
|
return {
|
|
@@ -1883,13 +1896,13 @@ var Ht = {
|
|
|
1883
1896
|
end: t[i].end
|
|
1884
1897
|
};
|
|
1885
1898
|
};
|
|
1886
|
-
|
|
1887
|
-
let
|
|
1888
|
-
|
|
1889
|
-
},
|
|
1890
|
-
let t = [], n = 0, r =
|
|
1891
|
-
for (let i = 0; i < e.length && t.length <
|
|
1892
|
-
let e =
|
|
1899
|
+
hl();
|
|
1900
|
+
let Cl = (e) => {
|
|
1901
|
+
pl && fl?.measureElement(e);
|
|
1902
|
+
}, wl = (e) => {
|
|
1903
|
+
let t = [], n = 0, r = nr;
|
|
1904
|
+
for (let i = 0; i < e.length && t.length < tr && !(n >= rr && r-- <= 0); i++) {
|
|
1905
|
+
let e = bl(i);
|
|
1893
1906
|
t.push({
|
|
1894
1907
|
index: i,
|
|
1895
1908
|
start: n,
|
|
@@ -1898,110 +1911,110 @@ var Ht = {
|
|
|
1898
1911
|
}), n += e;
|
|
1899
1912
|
}
|
|
1900
1913
|
return t;
|
|
1901
|
-
},
|
|
1914
|
+
}, Tl = m(() => {
|
|
1902
1915
|
let e = $.value;
|
|
1903
|
-
if (
|
|
1904
|
-
let t =
|
|
1916
|
+
if (jc.value, !q.value) return e.map((e) => Bc(e, e.kind, e.key, 0));
|
|
1917
|
+
let t = ml.value.length ? ml.value : wl(e);
|
|
1905
1918
|
if (!t.length) return [];
|
|
1906
|
-
let n = [], r =
|
|
1919
|
+
let n = [], r = Hc.value, i = Qc.value, a = r, o;
|
|
1907
1920
|
for (let r of t) {
|
|
1908
1921
|
let t = e[r.index];
|
|
1909
1922
|
if (!t) continue;
|
|
1910
1923
|
let s = r.start - a;
|
|
1911
|
-
s > .5 && n.push(
|
|
1924
|
+
s > .5 && n.push(Bc(t, "spacer", `s:${t.key}`, s)), i && t.kind === "row" && !nl.has(t.key) ? n.push(Bc(t, "placeholder", `p:${t.key}`, r.size)) : n.push(Bc(t, t.kind, t.key, 0)), a = r.end, o = t;
|
|
1912
1925
|
}
|
|
1913
|
-
let s =
|
|
1914
|
-
return s > .5 && o && n.push(
|
|
1926
|
+
let s = Xc.value - (a - r);
|
|
1927
|
+
return s > .5 && o && n.push(Bc(o, "spacer", "s:end", s)), n;
|
|
1915
1928
|
});
|
|
1916
|
-
E(
|
|
1917
|
-
if (q.value) for (let t of e) (t.kind === "row" || t.kind === "expand") &&
|
|
1929
|
+
E(Tl, (e) => {
|
|
1930
|
+
if (q.value) for (let t of e) (t.kind === "row" || t.kind === "expand") && nl.add(t.key);
|
|
1918
1931
|
}, { flush: "post" });
|
|
1919
|
-
let
|
|
1932
|
+
let El = (e) => {
|
|
1920
1933
|
let t = I.value;
|
|
1921
1934
|
if (!q.value || !t || !t.querySelector(":scope > .bb-table__body > .bb-table__row")) return;
|
|
1922
1935
|
let n = B.value, r = null, i = null;
|
|
1923
|
-
if (
|
|
1924
|
-
if (t.key === "select" || t.key === "actions" || t.key ===
|
|
1925
|
-
if (t.key in
|
|
1936
|
+
if (ko.value.forEach((t, a) => {
|
|
1937
|
+
if (t.key === "select" || t.key === "actions" || t.key === Nn) {
|
|
1938
|
+
if (t.key in Ga.value) return;
|
|
1926
1939
|
let n = parseFloat(e[a]);
|
|
1927
1940
|
if (!(n > 0)) return;
|
|
1928
|
-
(i ??= { ...
|
|
1941
|
+
(i ??= { ...Ga.value })[t.key] = n;
|
|
1929
1942
|
return;
|
|
1930
1943
|
}
|
|
1931
1944
|
let o = n.find((e) => String(e.key) === t.key);
|
|
1932
1945
|
if (!o || o.width != null) return;
|
|
1933
1946
|
let s = String(o.key);
|
|
1934
|
-
if (s in
|
|
1947
|
+
if (s in Wa.value || s in (r ?? {})) return;
|
|
1935
1948
|
let c = parseFloat(e[a]);
|
|
1936
|
-
c > 0 && ((r ??= { ...
|
|
1937
|
-
}), !r && !i ||
|
|
1949
|
+
c > 0 && ((r ??= { ...Wa.value })[s] = c);
|
|
1950
|
+
}), !r && !i || Dl) return;
|
|
1938
1951
|
let a = r, o = i;
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
...
|
|
1952
|
+
Dl = requestAnimationFrame(() => {
|
|
1953
|
+
Dl = 0, a && (Wa.value = {
|
|
1954
|
+
...Wa.value,
|
|
1942
1955
|
...a
|
|
1943
|
-
}), o && (
|
|
1944
|
-
...
|
|
1956
|
+
}), o && (Ga.value = {
|
|
1957
|
+
...Ga.value,
|
|
1945
1958
|
...o
|
|
1946
1959
|
});
|
|
1947
1960
|
});
|
|
1948
|
-
},
|
|
1961
|
+
}, Dl = 0;
|
|
1949
1962
|
E([() => q.value, () => J.value.length === 0], ([e, t]) => {
|
|
1950
|
-
(!e || t) && (Object.keys(
|
|
1951
|
-
}), E(
|
|
1952
|
-
q.value &&
|
|
1963
|
+
(!e || t) && (Object.keys(Wa.value).length && (Wa.value = {}), Object.keys(Ga.value).length && (Ga.value = {}), Ka.value = "");
|
|
1964
|
+
}), E(Gc, () => {
|
|
1965
|
+
q.value && xl.value.measure();
|
|
1953
1966
|
});
|
|
1954
|
-
let
|
|
1955
|
-
|
|
1967
|
+
let Ol, kl, Al = () => {
|
|
1968
|
+
Ol?.disconnect(), Ol = void 0, kl?.(), kl = void 0;
|
|
1956
1969
|
let e = L.value;
|
|
1957
1970
|
if (!q.value || !e) return;
|
|
1958
1971
|
let t = 0, n = () => {
|
|
1959
1972
|
t ||= requestAnimationFrame(() => {
|
|
1960
|
-
t = 0,
|
|
1973
|
+
t = 0, Wc();
|
|
1961
1974
|
});
|
|
1962
1975
|
};
|
|
1963
|
-
if (
|
|
1976
|
+
if (Vc.value === e) Ol = new ResizeObserver(() => Wc()), Ol.observe(e);
|
|
1964
1977
|
else {
|
|
1965
1978
|
window.addEventListener("resize", n);
|
|
1966
1979
|
let e = new ResizeObserver(n);
|
|
1967
|
-
e.observe(document.documentElement),
|
|
1980
|
+
e.observe(document.documentElement), kl = () => {
|
|
1968
1981
|
window.removeEventListener("resize", n), e.disconnect(), t && cancelAnimationFrame(t);
|
|
1969
1982
|
};
|
|
1970
1983
|
}
|
|
1971
1984
|
};
|
|
1972
|
-
E(
|
|
1973
|
-
let
|
|
1985
|
+
E(Vc, Al);
|
|
1986
|
+
let jl;
|
|
1974
1987
|
E(() => [q.value, X.value.first], ([e]) => {
|
|
1975
|
-
|
|
1988
|
+
jl?.disconnect(), jl = void 0, Wc();
|
|
1976
1989
|
let t = R.value?.querySelector(":scope > .bb-table__edge-row--first");
|
|
1977
|
-
e && t && typeof ResizeObserver < "u" && (
|
|
1978
|
-
}, { flush: "post" }), x(() =>
|
|
1990
|
+
e && t && typeof ResizeObserver < "u" && (jl = new ResizeObserver(() => requestAnimationFrame(Wc)), jl.observe(t));
|
|
1991
|
+
}, { flush: "post" }), x(() => jl?.disconnect()), E(() => [q.value, $.value.length], () => {
|
|
1979
1992
|
b(() => {
|
|
1980
|
-
|
|
1993
|
+
Kc(), Wc(), Al(), nl = /* @__PURE__ */ new Set(), ll = -1, ul = !1, hl();
|
|
1981
1994
|
});
|
|
1982
1995
|
}, { flush: "post" });
|
|
1983
|
-
let
|
|
1984
|
-
q.value && Object.keys(
|
|
1985
|
-
let e = I.value, t = e ?
|
|
1986
|
-
t &&
|
|
1996
|
+
let Ml = () => {
|
|
1997
|
+
q.value && Object.keys(Wa.value).length && (Wa.value = {}, b(() => requestAnimationFrame(() => {
|
|
1998
|
+
let e = I.value, t = e ? Ve(e) : null;
|
|
1999
|
+
t && El(t);
|
|
1987
2000
|
})));
|
|
1988
|
-
},
|
|
2001
|
+
}, Nl, Pl = () => {
|
|
1989
2002
|
let e = typeof document < "u" ? document.fonts : void 0;
|
|
1990
|
-
e && !
|
|
2003
|
+
e && !Nl && (e.status !== "loaded" && e.ready.then(Ml), e.addEventListener("loadingdone", Ml), Nl = () => e.removeEventListener("loadingdone", Ml));
|
|
1991
2004
|
};
|
|
1992
|
-
|
|
1993
|
-
|
|
2005
|
+
xt(() => {
|
|
2006
|
+
Kc(), Bo(), Wc(), Al(), hl(), q.value && Pl();
|
|
1994
2007
|
}), E(q, (e) => {
|
|
1995
|
-
e &&
|
|
2008
|
+
e && Pl(), Jo && zo(Jo), Bo();
|
|
1996
2009
|
}), x(() => {
|
|
1997
|
-
|
|
2010
|
+
Ol?.disconnect(), kl?.(), Nl?.(), Zc && cancelAnimationFrame(Zc);
|
|
1998
2011
|
});
|
|
1999
|
-
let
|
|
2000
|
-
let n = e >= 0 ?
|
|
2012
|
+
let Fl = () => new Promise((e) => requestAnimationFrame(() => e())), Il = () => I.value?.querySelector(":scope > .bb-table__head > .bb-table__header-row") ?? null, Ll = (e) => R.value?.querySelector(`:scope > [role="row"][data-index="${e}"]`) ?? null, Rl = (e) => R.value?.querySelector(`:scope > .bb-table__edge-row--${e === $n ? "first" : "last"}`) ?? null, zl = (e, t) => {
|
|
2013
|
+
let n = e >= 0 ? Ll(e) : e === Qn ? Il() : Rl(e);
|
|
2001
2014
|
if (!n || t === null) return n;
|
|
2002
2015
|
let r = n.children;
|
|
2003
2016
|
return r[Math.min(t, r.length - 1)] ?? null;
|
|
2004
|
-
},
|
|
2017
|
+
}, Bl = (e) => e >= 0 && $.value[e]?.kind === "expand" ? 1 : os.value, Vl = (e) => {
|
|
2005
2018
|
let t = I.value;
|
|
2006
2019
|
if (!t || !(e instanceof Element) || !t.contains(e)) return null;
|
|
2007
2020
|
let n = null;
|
|
@@ -2010,7 +2023,7 @@ var Ht = {
|
|
|
2010
2023
|
if (i && i.parentElement === t && r.getAttribute("role") === "row") {
|
|
2011
2024
|
let t = r, a = i.classList.contains("bb-table__head");
|
|
2012
2025
|
if ((a ? !P.value : i !== R.value) || a && !t.classList.contains("bb-table__header-row")) return null;
|
|
2013
|
-
let o = !a && t.classList.contains("bb-table__edge-row"), s = a ?
|
|
2026
|
+
let o = !a && t.classList.contains("bb-table__edge-row"), s = a ? Qn : o ? t.classList.contains("bb-table__edge-row--first") ? $n : er : Number(t.dataset.index);
|
|
2014
2027
|
if (!Number.isInteger(s)) return null;
|
|
2015
2028
|
if (!n) return {
|
|
2016
2029
|
row: s,
|
|
@@ -2031,19 +2044,19 @@ var Ht = {
|
|
|
2031
2044
|
n = r, r = i;
|
|
2032
2045
|
}
|
|
2033
2046
|
return null;
|
|
2034
|
-
},
|
|
2035
|
-
|
|
2047
|
+
}, Hl = async (e, t) => {
|
|
2048
|
+
Fc.value = {
|
|
2036
2049
|
key: e < 0 ? null : $.value[e]?.key ?? null,
|
|
2037
2050
|
row: e,
|
|
2038
2051
|
col: t
|
|
2039
2052
|
};
|
|
2040
|
-
let n =
|
|
2053
|
+
let n = zl(e, t);
|
|
2041
2054
|
if (!n && e >= 0 && q.value) {
|
|
2042
|
-
|
|
2055
|
+
tl++, ol();
|
|
2043
2056
|
try {
|
|
2044
|
-
for (let r = 0; r < 8 && !n; r++)
|
|
2057
|
+
for (let r = 0; r < 8 && !n; r++) xl.value.scrollToIndex(e, { align: "auto" }), await Fl(), await b(), n = zl(e, t);
|
|
2045
2058
|
} finally {
|
|
2046
|
-
|
|
2059
|
+
tl--;
|
|
2047
2060
|
}
|
|
2048
2061
|
}
|
|
2049
2062
|
if (n && (n.focus(), n.scrollIntoView({
|
|
@@ -2051,96 +2064,96 @@ var Ht = {
|
|
|
2051
2064
|
inline: "nearest"
|
|
2052
2065
|
}), q.value && e >= 0)) for (let e = 0; e < 4; e++) {
|
|
2053
2066
|
let e = n.getBoundingClientRect().top;
|
|
2054
|
-
if (await
|
|
2067
|
+
if (await Fl(), n.scrollIntoView({
|
|
2055
2068
|
block: "nearest",
|
|
2056
2069
|
inline: "nearest"
|
|
2057
2070
|
}), Math.abs(n.getBoundingClientRect().top - e) < .5) break;
|
|
2058
2071
|
}
|
|
2059
|
-
},
|
|
2072
|
+
}, Ul = null, Wl = 0, Gl = (e) => {
|
|
2060
2073
|
if (e.closest("[data-bb-table-id]") !== L.value) return !1;
|
|
2061
|
-
let t =
|
|
2062
|
-
return !!t?.inside && t.cell !==
|
|
2063
|
-
},
|
|
2064
|
-
let t = e.querySelectorAll(
|
|
2065
|
-
e.matches("a[href], area[href], button, input:not([type=\"hidden\"]), select, textarea, iframe, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]") &&
|
|
2066
|
-
for (let e of t)
|
|
2067
|
-
},
|
|
2068
|
-
for (let t of e.querySelectorAll(`[${
|
|
2069
|
-
},
|
|
2070
|
-
|
|
2071
|
-
},
|
|
2072
|
-
let e =
|
|
2073
|
-
|
|
2074
|
-
},
|
|
2075
|
-
let t =
|
|
2076
|
-
return t ? (
|
|
2077
|
-
},
|
|
2078
|
-
|
|
2074
|
+
let t = Vl(e);
|
|
2075
|
+
return !!t?.inside && t.cell !== Ul;
|
|
2076
|
+
}, Kl = (e) => {
|
|
2077
|
+
let t = e.querySelectorAll(tt);
|
|
2078
|
+
e.matches("a[href], area[href], button, input:not([type=\"hidden\"]), select, textarea, iframe, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]") && Gl(e) && at(e);
|
|
2079
|
+
for (let e of t) Gl(e) && at(e);
|
|
2080
|
+
}, ql = (e) => {
|
|
2081
|
+
for (let t of e.querySelectorAll(`[${nt}]`)) t.closest("[data-bb-table-id]") === L.value && it(t);
|
|
2082
|
+
}, Jl = (e) => {
|
|
2083
|
+
Ul !== e && (Yl(), Ul = e, Wl = Ze(), ql(e));
|
|
2084
|
+
}, Yl = () => {
|
|
2085
|
+
let e = Ul;
|
|
2086
|
+
Ul = null, e?.isConnected && N.value && Kl(e);
|
|
2087
|
+
}, Xl = (e) => {
|
|
2088
|
+
let t = rt(e)[0];
|
|
2089
|
+
return t ? (Jl(e), t.focus(), !0) : !1;
|
|
2090
|
+
}, Zl = null, Ql = () => {
|
|
2091
|
+
Zl?.disconnect(), Zl = null;
|
|
2079
2092
|
let e = I.value;
|
|
2080
|
-
e && (N.value ? (
|
|
2093
|
+
e && (N.value ? (Kl(e), Zl = new MutationObserver((e) => {
|
|
2081
2094
|
for (let t of e) {
|
|
2082
2095
|
if (t.type === "childList") {
|
|
2083
|
-
for (let e of t.addedNodes) e instanceof Element &&
|
|
2096
|
+
for (let e of t.addedNodes) e instanceof Element && Kl(e);
|
|
2084
2097
|
continue;
|
|
2085
2098
|
}
|
|
2086
2099
|
let e = t.target;
|
|
2087
|
-
e.getAttribute("tabindex") !== "-1" && (e.removeAttribute(
|
|
2100
|
+
e.getAttribute("tabindex") !== "-1" && (e.removeAttribute(nt), Kl(e));
|
|
2088
2101
|
}
|
|
2089
|
-
}),
|
|
2102
|
+
}), Zl.observe(e, {
|
|
2090
2103
|
childList: !0,
|
|
2091
2104
|
subtree: !0,
|
|
2092
2105
|
attributes: !0,
|
|
2093
2106
|
attributeFilter: ["tabindex"]
|
|
2094
|
-
})) : (
|
|
2107
|
+
})) : (Ul = null, ql(e)));
|
|
2095
2108
|
};
|
|
2096
|
-
|
|
2097
|
-
let
|
|
2098
|
-
let t =
|
|
2109
|
+
xt(Ql), E(N, () => b(Ql)), x(() => Zl?.disconnect());
|
|
2110
|
+
let $l = (e) => {
|
|
2111
|
+
let t = Vl(e.target);
|
|
2099
2112
|
if (!t) return;
|
|
2100
|
-
t.inside && t.cell ?
|
|
2101
|
-
let n =
|
|
2102
|
-
n && n.row === t.row &&
|
|
2113
|
+
t.inside && t.cell ? Jl(t.cell) : Yl();
|
|
2114
|
+
let n = Lc.value, r = t.cell ?? t.rowEl;
|
|
2115
|
+
n && n.row === t.row && zl(n.row, n.col) === r || (Fc.value = {
|
|
2103
2116
|
key: t.row < 0 ? null : $.value[t.row]?.key ?? null,
|
|
2104
2117
|
row: t.row,
|
|
2105
2118
|
col: t.cell ? t.col : null
|
|
2106
2119
|
});
|
|
2107
|
-
},
|
|
2108
|
-
N.value &&
|
|
2120
|
+
}, eu = (e) => {
|
|
2121
|
+
N.value && $l(e);
|
|
2109
2122
|
};
|
|
2110
2123
|
E(I, (e, t) => {
|
|
2111
|
-
t?.removeEventListener("focusin",
|
|
2112
|
-
}, { flush: "sync" }), x(() => I.value?.removeEventListener("focusin",
|
|
2113
|
-
let
|
|
2124
|
+
t?.removeEventListener("focusin", eu), e?.addEventListener("focusin", eu);
|
|
2125
|
+
}, { flush: "sync" }), x(() => I.value?.removeEventListener("focusin", eu));
|
|
2126
|
+
let tu = (e) => {
|
|
2114
2127
|
let t = e.relatedTarget;
|
|
2115
|
-
|
|
2116
|
-
},
|
|
2128
|
+
Ul && !(t instanceof Node && Ul.contains(t)) && Yl();
|
|
2129
|
+
}, nu = (e) => {
|
|
2117
2130
|
let t = $.value[e];
|
|
2118
|
-
O.selectable && t && t.kind === "row" &&
|
|
2119
|
-
},
|
|
2131
|
+
O.selectable && t && t.kind === "row" && Eu(Pc(t));
|
|
2132
|
+
}, ru = () => !O.selectable || !_u() ? !1 : (hu.value?.click(), !0), iu = (e) => {
|
|
2120
2133
|
e.row >= 0 && $.value[e.row]?.kind === "row" && e.rowEl.click();
|
|
2121
|
-
},
|
|
2134
|
+
}, au = (e) => e >= 0 ? e : e === er ? $.value.length : e === $n ? -1 : X.value.first ? -2 : -1, ou = (e) => {
|
|
2122
2135
|
let t = $.value.length;
|
|
2123
|
-
return e >= t ? X.value.last ?
|
|
2124
|
-
},
|
|
2136
|
+
return e >= t ? X.value.last ? er : t - 1 : e >= 0 ? e : e === -1 && X.value.first ? $n : Qn;
|
|
2137
|
+
}, su = (e, t, n = !1) => {
|
|
2125
2138
|
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
|
-
return s < o ? e :
|
|
2127
|
-
},
|
|
2128
|
-
if (e.defaultPrevented || z.value &&
|
|
2129
|
-
let t =
|
|
2139
|
+
return s < o ? e : ou(i(au(e) + t, o, s));
|
|
2140
|
+
}, cu = (e) => {
|
|
2141
|
+
if (e.defaultPrevented || z.value && Br.onGridKeydown(e)) return;
|
|
2142
|
+
let t = Vl(e.target);
|
|
2130
2143
|
if (!t) return;
|
|
2131
2144
|
let n = e.key;
|
|
2132
2145
|
if (t.inside) {
|
|
2133
|
-
if (!t.cell || !(n === "F2" || n === "Escape" &&
|
|
2146
|
+
if (!t.cell || !(n === "F2" || n === "Escape" && Ze() <= Wl) || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
2134
2147
|
e.preventDefault(), e.stopPropagation(), t.cell.focus();
|
|
2135
2148
|
return;
|
|
2136
2149
|
}
|
|
2137
2150
|
if ((e.ctrlKey || e.metaKey) && !e.altKey && n.toLowerCase() === "a") {
|
|
2138
|
-
|
|
2151
|
+
ru() && e.preventDefault();
|
|
2139
2152
|
return;
|
|
2140
2153
|
}
|
|
2141
2154
|
if (e.altKey || e.metaKey || e.shiftKey && n !== " ") return;
|
|
2142
|
-
let r = e.ctrlKey, i =
|
|
2143
|
-
e.preventDefault(), (n !== t.row || r !== (t.cell ? t.col : null)) &&
|
|
2155
|
+
let r = e.ctrlKey, i = Xe(t.rowEl), a = i ? "ArrowLeft" : "ArrowRight", o = i ? "ArrowRight" : "ArrowLeft", s = $.value.length - 1, c = _r.value, l = (n, r) => {
|
|
2156
|
+
e.preventDefault(), (n !== t.row || r !== (t.cell ? t.col : null)) && Hl(n, r);
|
|
2144
2157
|
}, u = () => e.preventDefault();
|
|
2145
2158
|
if (!t.cell) {
|
|
2146
2159
|
if (!c) return;
|
|
@@ -2148,137 +2161,137 @@ var Ht = {
|
|
|
2148
2161
|
switch (n) {
|
|
2149
2162
|
case "ArrowDown": return l(Math.min(t.row + 1, s), null);
|
|
2150
2163
|
case "ArrowUp": return l(Math.max(t.row - 1, 0), null);
|
|
2151
|
-
case "PageDown": return l(Math.min(t.row +
|
|
2152
|
-
case "PageUp": return l(Math.max(t.row -
|
|
2164
|
+
case "PageDown": return l(Math.min(t.row + ar, s), null);
|
|
2165
|
+
case "PageUp": return l(Math.max(t.row - ar, 0), null);
|
|
2153
2166
|
case "Home": return l(0, null);
|
|
2154
2167
|
case "End": return l(s, null);
|
|
2155
2168
|
case a:
|
|
2156
2169
|
if (i && !r.expanded) {
|
|
2157
|
-
u(),
|
|
2170
|
+
u(), du(Y.value[r.index].valueHash);
|
|
2158
2171
|
return;
|
|
2159
2172
|
}
|
|
2160
2173
|
return l(t.row, 0);
|
|
2161
2174
|
case o:
|
|
2162
|
-
u(), i && r.expanded &&
|
|
2175
|
+
u(), i && r.expanded && du(Y.value[r.index].valueHash);
|
|
2163
2176
|
return;
|
|
2164
2177
|
case "Enter":
|
|
2165
2178
|
case " ":
|
|
2166
|
-
u(), e.shiftKey && n === " " ?
|
|
2179
|
+
u(), e.shiftKey && n === " " ? nu(t.row) : iu(t);
|
|
2167
2180
|
return;
|
|
2168
2181
|
}
|
|
2169
2182
|
return;
|
|
2170
2183
|
}
|
|
2171
|
-
let d =
|
|
2184
|
+
let d = Lc.value, f = d && d.row === t.row && d.col !== null ? d.col : t.col, p = (e) => Bl(e) - 1, ee = !!O.selectable && t.col === Number(z.value);
|
|
2172
2185
|
switch (n) {
|
|
2173
2186
|
case a: return l(t.row, Math.min(t.col + 1, p(t.row)));
|
|
2174
2187
|
case o: return t.col > 0 ? l(t.row, t.col - 1) : c && t.row >= 0 ? l(t.row, null) : u();
|
|
2175
|
-
case "ArrowDown": return l(
|
|
2176
|
-
case "ArrowUp": return l(
|
|
2177
|
-
case "PageDown": return l(t.row ===
|
|
2178
|
-
case "PageUp": return l(t.row ===
|
|
2179
|
-
case "Home": return r ? l(
|
|
2188
|
+
case "ArrowDown": return l(su(t.row, 1), f);
|
|
2189
|
+
case "ArrowUp": return l(su(t.row, -1), f);
|
|
2190
|
+
case "PageDown": return l(t.row === Qn && s < 0 ? t.row : su(t.row, ar), f);
|
|
2191
|
+
case "PageUp": return l(t.row === Qn ? t.row : su(t.row, -10, !0), f);
|
|
2192
|
+
case "Home": return r ? l(su(t.row, -Infinity), c ? f : 0) : l(t.row, 0);
|
|
2180
2193
|
case "End": {
|
|
2181
2194
|
if (!r) return l(t.row, p(t.row));
|
|
2182
|
-
let e =
|
|
2195
|
+
let e = su(t.row, Infinity);
|
|
2183
2196
|
return l(e, c ? f : p(e));
|
|
2184
2197
|
}
|
|
2185
2198
|
case "F2":
|
|
2186
|
-
u(),
|
|
2199
|
+
u(), Xl(t.cell);
|
|
2187
2200
|
return;
|
|
2188
2201
|
case "Enter":
|
|
2189
2202
|
case " ": {
|
|
2190
|
-
if (u(), t.row ===
|
|
2191
|
-
ee && !e.shiftKey ?
|
|
2203
|
+
if (u(), t.row === Qn) {
|
|
2204
|
+
ee && !e.shiftKey ? ru() : n === "Enter" && Xl(t.cell);
|
|
2192
2205
|
return;
|
|
2193
2206
|
}
|
|
2194
2207
|
if (n === " " && e.shiftKey) {
|
|
2195
|
-
|
|
2208
|
+
nu(t.row);
|
|
2196
2209
|
return;
|
|
2197
2210
|
}
|
|
2198
2211
|
let r = $.value[t.row]?.kind === "row";
|
|
2199
2212
|
if (ee && r) {
|
|
2200
|
-
|
|
2213
|
+
nu(t.row);
|
|
2201
2214
|
return;
|
|
2202
2215
|
}
|
|
2203
|
-
if (n === "Enter" &&
|
|
2204
|
-
|
|
2216
|
+
if (n === "Enter" && Xl(t.cell)) return;
|
|
2217
|
+
iu(t);
|
|
2205
2218
|
return;
|
|
2206
2219
|
}
|
|
2207
2220
|
}
|
|
2208
|
-
},
|
|
2209
|
-
e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || (e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
2210
|
-
},
|
|
2211
|
-
"aria-controls": o(
|
|
2221
|
+
}, lu = (e, t) => {
|
|
2222
|
+
e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), du(t)));
|
|
2223
|
+
}, uu = (e) => ({
|
|
2224
|
+
"aria-controls": o(Ca.value[e.valueHash]) ? void 0 : Cr(e.valueHash),
|
|
2212
2225
|
"aria-expanded": e.expanded ? "true" : "false",
|
|
2213
2226
|
onClick: (t) => {
|
|
2214
|
-
t.stopPropagation(),
|
|
2227
|
+
t.stopPropagation(), du(e.valueHash);
|
|
2215
2228
|
},
|
|
2216
|
-
onKeydown: (t) =>
|
|
2217
|
-
}),
|
|
2229
|
+
onKeydown: (t) => lu(t, e.valueHash)
|
|
2230
|
+
}), du = (e) => {
|
|
2218
2231
|
let t = J.value.find((t) => t.valueHash === e);
|
|
2219
|
-
t && (e in
|
|
2232
|
+
t && (e in Ca.value ? lr.value = lr.value.filter((t) => a(t) !== e) : lr.value = [...lr.value, t.value]);
|
|
2220
2233
|
};
|
|
2221
2234
|
E(D, () => {
|
|
2222
|
-
|
|
2235
|
+
mu.clear(), G.unselected = [], G.selected = [];
|
|
2223
2236
|
});
|
|
2224
|
-
let
|
|
2237
|
+
let fu = m(() => {
|
|
2225
2238
|
let e = Array.isArray(G.selected) ? G.selected.length : 0;
|
|
2226
|
-
return !!(O.multiple && e > 0 && !D.value || D.value &&
|
|
2227
|
-
}),
|
|
2228
|
-
selected: !!D.value && !
|
|
2229
|
-
indeterminate:
|
|
2239
|
+
return !!(O.multiple && e > 0 && !D.value || D.value && mu.size > 0);
|
|
2240
|
+
}), pu = m(() => j.part("selectIcon", {
|
|
2241
|
+
selected: !!D.value && !fu.value,
|
|
2242
|
+
indeterminate: fu.value,
|
|
2230
2243
|
disabled: !!O.disabled
|
|
2231
|
-
})),
|
|
2244
|
+
})), mu = Ct(/* @__PURE__ */ new Set());
|
|
2232
2245
|
E(() => G.unselected, (e) => {
|
|
2233
|
-
|
|
2234
|
-
|
|
2246
|
+
mu.clear(), (e ?? []).forEach((e) => {
|
|
2247
|
+
mu.add(a(e));
|
|
2235
2248
|
});
|
|
2236
2249
|
}, { immediate: !0 });
|
|
2237
|
-
let
|
|
2238
|
-
E([() =>
|
|
2239
|
-
let
|
|
2240
|
-
onBlur: () =>
|
|
2250
|
+
let hu = C(null), gu = ue(), _u = () => !O.disableSelectAll && O.multiple;
|
|
2251
|
+
E([() => fu.value, _u], () => gu.onBlur());
|
|
2252
|
+
let vu = {
|
|
2253
|
+
onBlur: () => gu.onBlur(),
|
|
2241
2254
|
onChange: (e) => {
|
|
2242
|
-
e.target instanceof HTMLInputElement && (
|
|
2255
|
+
e.target instanceof HTMLInputElement && (pe(e.target, O.readonly, !!D.value) ? he(hu.value, fu.value) : (he(hu.value, fu.value), D.value = e.target.checked, me(() => hu.value, () => !!D.value, () => fu.value)));
|
|
2243
2256
|
},
|
|
2244
|
-
onFocus:
|
|
2245
|
-
onClick: (e) =>
|
|
2246
|
-
onKeydown: (e) =>
|
|
2247
|
-
},
|
|
2248
|
-
...
|
|
2257
|
+
onFocus: gu.onFocus,
|
|
2258
|
+
onClick: (e) => de(e, O.readonly),
|
|
2259
|
+
onKeydown: (e) => fe(e, O.readonly)
|
|
2260
|
+
}, yu = m(() => ({
|
|
2261
|
+
...ge("checkbox", {
|
|
2249
2262
|
checked: !!D.value,
|
|
2250
2263
|
disabled: O.disabled,
|
|
2251
|
-
indeterminate:
|
|
2264
|
+
indeterminate: fu.value,
|
|
2252
2265
|
name: `select_all_${O.name || ""}`,
|
|
2253
2266
|
readonly: O.readonly,
|
|
2254
2267
|
required: !1,
|
|
2255
2268
|
value: !0
|
|
2256
2269
|
}),
|
|
2257
|
-
...
|
|
2258
|
-
})),
|
|
2270
|
+
...vu
|
|
2271
|
+
})), bu = (e) => {
|
|
2259
2272
|
let t = G.unselected ?? [];
|
|
2260
|
-
|
|
2261
|
-
},
|
|
2273
|
+
xu(e) ? (Cs(e), k("item:unselected", e.value), mu.add(e.valueHash), G.unselected = [...t, e.value]) : (D.value || Ss(e), k("item:selected", e.value), mu.delete(e.valueHash), G.unselected = t.filter((t) => a(t) !== a(e.value)));
|
|
2274
|
+
}, xu = (e) => D.value && mu.has(e.valueHash) ? !1 : e.selected ? !0 : D.value && !(typeof O.selectable == "function" && !O.selectable(e.item)), Su = m(() => {
|
|
2262
2275
|
let e = /* @__PURE__ */ new Map();
|
|
2263
2276
|
for (let t of J.value) e.set(t.valueHash, t);
|
|
2264
2277
|
return e;
|
|
2265
|
-
}),
|
|
2278
|
+
}), Cu = (e) => {
|
|
2266
2279
|
if (O.disabled || O.readonly || typeof O.selectable == "function" && !O.selectable(e.item)) return !0;
|
|
2267
|
-
let t =
|
|
2280
|
+
let t = Su.value.get(e.valueHash);
|
|
2268
2281
|
return !t || !!t.disabled;
|
|
2269
|
-
},
|
|
2270
|
-
|
|
2271
|
-
},
|
|
2272
|
-
if (
|
|
2273
|
-
let t = (e) => e === void 0 ? -1 : J.value.findIndex((t) => t.valueHash === e), n = t(
|
|
2282
|
+
}, wu, Tu = (e) => {
|
|
2283
|
+
Cu(e) || (bu(e), wu = e.valueHash);
|
|
2284
|
+
}, Eu = (e) => {
|
|
2285
|
+
if (Cu(e)) return;
|
|
2286
|
+
let t = (e) => e === void 0 ? -1 : J.value.findIndex((t) => t.valueHash === e), n = t(wu), r = t(e.valueHash);
|
|
2274
2287
|
if (!O.multiple || n < 0 || r < 0) {
|
|
2275
|
-
|
|
2288
|
+
Tu(e);
|
|
2276
2289
|
return;
|
|
2277
2290
|
}
|
|
2278
|
-
let i = !
|
|
2291
|
+
let i = !xu(e), o = n <= r ? 1 : -1, s = [];
|
|
2279
2292
|
for (let e = n; e !== r + o; e += o) {
|
|
2280
2293
|
let t = J.value[e];
|
|
2281
|
-
if (t.disabled ||
|
|
2294
|
+
if (t.disabled || xu(t) === i) continue;
|
|
2282
2295
|
let { item: n } = Y.value[e];
|
|
2283
2296
|
(typeof O.selectable != "function" || O.selectable(n)) && s.push(t);
|
|
2284
2297
|
}
|
|
@@ -2286,61 +2299,61 @@ var Ht = {
|
|
|
2286
2299
|
let e = O.max - (G.selected ?? []).length;
|
|
2287
2300
|
s = s.slice(0, Math.max(0, e));
|
|
2288
2301
|
}
|
|
2289
|
-
if (
|
|
2302
|
+
if (wu = e.valueHash, !s.length) return;
|
|
2290
2303
|
let c = new Set(s.map((e) => e.valueHash)), l = G.unselected ?? [];
|
|
2291
2304
|
if (i) {
|
|
2292
2305
|
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)
|
|
2306
|
+
for (let e of s) mu.delete(e.valueHash), k("item:selected", e.value);
|
|
2294
2307
|
} else {
|
|
2295
2308
|
G.selected = (G.selected ?? []).filter((e) => !c.has(a(e))), G.unselected = [...l, ...s.map((e) => e.value)];
|
|
2296
|
-
for (let e of s)
|
|
2309
|
+
for (let e of s) mu.add(e.valueHash), k("item:unselected", e.value);
|
|
2297
2310
|
}
|
|
2298
|
-
},
|
|
2311
|
+
}, Du = c((e) => typeof e != "string", JSON.stringify), Ou = m(() => [].concat(G.selected ?? []).map((e) => ({
|
|
2299
2312
|
disabled: O.disabled,
|
|
2300
2313
|
name: O.name,
|
|
2301
2314
|
type: "hidden",
|
|
2302
|
-
value:
|
|
2303
|
-
}))),
|
|
2315
|
+
value: Du(e)
|
|
2316
|
+
}))), ku = [
|
|
2304
2317
|
70,
|
|
2305
2318
|
45,
|
|
2306
2319
|
85,
|
|
2307
2320
|
55
|
|
2308
|
-
],
|
|
2321
|
+
], Au = m(() => i(J.value.length || O.columns.length || 1, 4, 10)), ju = m(() => {
|
|
2309
2322
|
let e = /* @__PURE__ */ new Map();
|
|
2310
|
-
for (let [t, n] of
|
|
2323
|
+
for (let [t, n] of or.value) e.has(t) || e.set(t, n);
|
|
2311
2324
|
return e;
|
|
2312
|
-
}),
|
|
2325
|
+
}), Mu = m(() => vt([Po.value, j.table.style])), Nu = m(() => {
|
|
2313
2326
|
let { style: e, ...t } = j.table;
|
|
2314
2327
|
return {
|
|
2315
2328
|
...y({
|
|
2316
2329
|
ref: I,
|
|
2317
|
-
class: ["bb-table__table",
|
|
2318
|
-
role:
|
|
2319
|
-
"aria-labelledby": O.caption ?
|
|
2330
|
+
class: ["bb-table__table", Ws.value],
|
|
2331
|
+
role: vr.value,
|
|
2332
|
+
"aria-labelledby": O.caption ? Mr.value : void 0,
|
|
2320
2333
|
"aria-multiselectable": N.value && O.selectable && O.multiple ? "true" : void 0,
|
|
2321
|
-
"aria-rowcount":
|
|
2334
|
+
"aria-rowcount": zu.value === void 0 ? void 0 : zu.value + Vu.value,
|
|
2322
2335
|
...N.value ? {
|
|
2323
|
-
onKeydown:
|
|
2324
|
-
onFocusout:
|
|
2336
|
+
onKeydown: cu,
|
|
2337
|
+
onFocusout: tu
|
|
2325
2338
|
} : {}
|
|
2326
2339
|
}, t),
|
|
2327
|
-
style:
|
|
2340
|
+
style: Mu.value
|
|
2328
2341
|
};
|
|
2329
|
-
}),
|
|
2342
|
+
}), Pu = m(() => vt([Vo.value, j.rootAttrs.style])), Fu = m(() => {
|
|
2330
2343
|
let { style: e, ...t } = j.rootAttrs;
|
|
2331
2344
|
return {
|
|
2332
2345
|
...y({
|
|
2333
2346
|
id: O.id,
|
|
2334
2347
|
ref: L,
|
|
2335
|
-
"aria-busy":
|
|
2336
|
-
class:
|
|
2337
|
-
"data-bb-table-id":
|
|
2348
|
+
"aria-busy": ns.value,
|
|
2349
|
+
class: as.value,
|
|
2350
|
+
"data-bb-table-id": Tr.value,
|
|
2338
2351
|
inert: O.disabled,
|
|
2339
|
-
...
|
|
2352
|
+
...yc.value
|
|
2340
2353
|
}, t),
|
|
2341
|
-
style:
|
|
2354
|
+
style: Pu.value
|
|
2342
2355
|
};
|
|
2343
|
-
}),
|
|
2356
|
+
}), Iu = m(() => ({
|
|
2344
2357
|
passthrough: j,
|
|
2345
2358
|
slots: A,
|
|
2346
2359
|
selectable: O.selectable,
|
|
@@ -2348,83 +2361,83 @@ var Ht = {
|
|
|
2348
2361
|
readonly: !!O.readonly,
|
|
2349
2362
|
actions: M.value,
|
|
2350
2363
|
grid: N.value,
|
|
2351
|
-
treegrid:
|
|
2352
|
-
cellRole:
|
|
2353
|
-
rowHeaderKeys:
|
|
2354
|
-
contentInert:
|
|
2355
|
-
hasRowIndex:
|
|
2356
|
-
rowOffset:
|
|
2357
|
-
setSize:
|
|
2358
|
-
columnSpan:
|
|
2359
|
-
inputName:
|
|
2364
|
+
treegrid: _r.value,
|
|
2365
|
+
cellRole: yr.value,
|
|
2366
|
+
rowHeaderKeys: br.value,
|
|
2367
|
+
contentInert: rs.value,
|
|
2368
|
+
hasRowIndex: is.value,
|
|
2369
|
+
rowOffset: is.value ? ((G.page ?? 1) - 1) * (G.perPage ?? 0) : 0,
|
|
2370
|
+
setSize: is.value ? G.totalItems ?? void 0 : void 0,
|
|
2371
|
+
columnSpan: os.value,
|
|
2372
|
+
inputName: Sr,
|
|
2360
2373
|
tdClass: O.tdClass,
|
|
2361
|
-
cellClasses:
|
|
2362
|
-
sortOrders:
|
|
2363
|
-
measureRow:
|
|
2364
|
-
expandRegionId:
|
|
2365
|
-
selectRange:
|
|
2366
|
-
rowReorder:
|
|
2367
|
-
menuRows:
|
|
2368
|
-
})),
|
|
2374
|
+
cellClasses: Ri.value,
|
|
2375
|
+
sortOrders: ju.value,
|
|
2376
|
+
measureRow: Cl,
|
|
2377
|
+
expandRegionId: Cr,
|
|
2378
|
+
selectRange: Eu,
|
|
2379
|
+
rowReorder: ai.value,
|
|
2380
|
+
menuRows: Wr
|
|
2381
|
+
})), Lu = m(() => ({
|
|
2369
2382
|
passthrough: j,
|
|
2370
2383
|
slots: A,
|
|
2371
2384
|
selectable: !!O.selectable,
|
|
2372
2385
|
rowDrag: z.value,
|
|
2373
2386
|
actions: M.value,
|
|
2374
|
-
cellRole:
|
|
2387
|
+
cellRole: yr.value,
|
|
2375
2388
|
grid: N.value,
|
|
2376
|
-
rowHeaderKeys:
|
|
2377
|
-
contentInert:
|
|
2389
|
+
rowHeaderKeys: br.value,
|
|
2390
|
+
contentInert: rs.value,
|
|
2378
2391
|
columns: B.value.map((e) => {
|
|
2379
2392
|
let t = e.align ?? "start";
|
|
2380
2393
|
return {
|
|
2381
2394
|
key: String(e.key),
|
|
2382
|
-
slotName:
|
|
2383
|
-
classes:
|
|
2395
|
+
slotName: ss.value[e.key],
|
|
2396
|
+
classes: Bs.value.has(String(e.key)) ? [`bb-table__cell--${t}`, "bb-table__cell--fluid"] : [`bb-table__cell--${t}`]
|
|
2384
2397
|
};
|
|
2385
2398
|
}),
|
|
2386
|
-
cellClasses:
|
|
2387
|
-
items:
|
|
2388
|
-
})),
|
|
2399
|
+
cellClasses: Ri.value,
|
|
2400
|
+
items: ds.value ?? []
|
|
2401
|
+
})), Ru = m(() => zu.value === void 0 ? {
|
|
2389
2402
|
first: void 0,
|
|
2390
2403
|
last: void 0
|
|
2391
2404
|
} : {
|
|
2392
2405
|
first: ((G.page ?? 1) - 1) * (G.perPage ?? 0) + 2,
|
|
2393
|
-
last:
|
|
2394
|
-
}),
|
|
2395
|
-
if (
|
|
2406
|
+
last: zu.value
|
|
2407
|
+
}), zu = m(() => {
|
|
2408
|
+
if (!is.value || G.totalItems == null) return;
|
|
2396
2409
|
let e = G.totalItems + 1;
|
|
2397
|
-
if (
|
|
2398
|
-
if (!J.value.length) return O.loading ? A.loading ? e : Math.max(e,
|
|
2410
|
+
if (pr.value) return e;
|
|
2411
|
+
if (!J.value.length) return O.loading ? A.loading ? e : Math.max(e, Au.value + 1) : Math.max(e, 2);
|
|
2399
2412
|
let t = $.value.length - Y.value.length;
|
|
2400
2413
|
return e + Number(X.value.first) + Number(X.value.last) + t;
|
|
2401
|
-
}),
|
|
2402
|
-
let e =
|
|
2403
|
-
|
|
2404
|
-
let n =
|
|
2414
|
+
}), Bu = C(null), Vu = C(0), Hu = /* @__PURE__ */ new WeakMap(), Uu = (e) => Array.from(e.querySelectorAll("[role=\"row\"]")).filter((t) => t.parentElement?.closest("[role=\"rowgroup\"], [role=\"table\"], [role=\"grid\"], [role=\"treegrid\"]") === e), Wu = () => {
|
|
2415
|
+
let e = Bu.value, t = e && A.tfoot ? Uu(e) : [];
|
|
2416
|
+
Vu.value = t.length;
|
|
2417
|
+
let n = zu.value;
|
|
2405
2418
|
t.forEach((e, t) => {
|
|
2406
2419
|
let r = e.getAttribute("aria-rowindex");
|
|
2407
|
-
if (r !== null &&
|
|
2408
|
-
|
|
2420
|
+
if (r !== null && Hu.get(e) !== r) {
|
|
2421
|
+
Hu.delete(e);
|
|
2409
2422
|
return;
|
|
2410
2423
|
}
|
|
2411
2424
|
if (n === void 0) {
|
|
2412
|
-
r !== null && e.removeAttribute("aria-rowindex"),
|
|
2425
|
+
r !== null && e.removeAttribute("aria-rowindex"), Hu.delete(e);
|
|
2413
2426
|
return;
|
|
2414
2427
|
}
|
|
2415
2428
|
let i = String(n + 1 + t);
|
|
2416
|
-
r !== i && e.setAttribute("aria-rowindex", i),
|
|
2429
|
+
r !== i && e.setAttribute("aria-rowindex", i), Hu.set(e, i);
|
|
2417
2430
|
});
|
|
2418
|
-
},
|
|
2419
|
-
|
|
2420
|
-
|
|
2431
|
+
}, Gu;
|
|
2432
|
+
xt(() => {
|
|
2433
|
+
Wu(), Bu.value && typeof MutationObserver < "u" && (Gu = new MutationObserver(Wu), Gu.observe(Bu.value, {
|
|
2421
2434
|
childList: !0,
|
|
2422
2435
|
subtree: !0,
|
|
2423
2436
|
attributes: !0,
|
|
2424
2437
|
attributeFilter: ["role", "aria-rowindex"]
|
|
2425
2438
|
}));
|
|
2426
|
-
}), E(
|
|
2427
|
-
let
|
|
2439
|
+
}), E(zu, Wu, { flush: "post" }), x(() => Gu?.disconnect());
|
|
2440
|
+
let Ku = m(() => {
|
|
2428
2441
|
let e = [], t = Number(z.value), n = t + +!!O.selectable;
|
|
2429
2442
|
return t && (O.selectable && O.fixedSelect || B.value.some((e) => e.fixed === "left")) && e.push({
|
|
2430
2443
|
index: 0,
|
|
@@ -2441,274 +2454,274 @@ var Ht = {
|
|
|
2441
2454
|
index: B.value.length + n,
|
|
2442
2455
|
position: "right"
|
|
2443
2456
|
}), e;
|
|
2444
|
-
}),
|
|
2457
|
+
}), qu = m(() => Ku.value.map((e) => typeof e == "number" ? `${e}:left` : `${e.index}:${e.position}`).join(","));
|
|
2445
2458
|
return E(() => [
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2459
|
+
Tl.value,
|
|
2460
|
+
qu.value,
|
|
2461
|
+
Zo.value
|
|
2449
2462
|
], ([, e, t], n) => {
|
|
2450
|
-
let r = n?.[1], i =
|
|
2463
|
+
let r = n?.[1], i = Ku.value;
|
|
2451
2464
|
if (I.value && (e.length || r?.length)) {
|
|
2452
2465
|
let a = e === r && t === n?.[2];
|
|
2453
|
-
|
|
2466
|
+
Ee(I.value, i, a ? Jo : null, a) && (Ko = e), e !== r && xc();
|
|
2454
2467
|
}
|
|
2455
|
-
A.thead && b(
|
|
2456
|
-
}, { flush: "post" }),
|
|
2457
|
-
|
|
2458
|
-
}), (r, i) => (S(),
|
|
2459
|
-
default:
|
|
2460
|
-
|
|
2461
|
-
v.selectable ? (S(), g("legend",
|
|
2468
|
+
A.thead && b(Xo);
|
|
2469
|
+
}, { flush: "post" }), bt(() => {
|
|
2470
|
+
Ui(), ua(), Br.stop();
|
|
2471
|
+
}), (r, i) => (S(), lt(Et(es.value), _t(pt(Fu.value)), {
|
|
2472
|
+
default: Pt(() => [
|
|
2473
|
+
dt(T(f), { value: T(hs) }, null, 8, ["value"]),
|
|
2474
|
+
v.selectable ? (S(), g("legend", Wt, w(ts.value), 1)) : h("", !0),
|
|
2462
2475
|
v.caption ? (S(), g("div", y({
|
|
2463
2476
|
key: 1,
|
|
2464
|
-
id:
|
|
2477
|
+
id: Mr.value,
|
|
2465
2478
|
class: "bb-table__caption",
|
|
2466
2479
|
hidden: !v.displayCaption
|
|
2467
|
-
}, T(j).caption), w(v.caption), 17,
|
|
2480
|
+
}, T(j).caption), w(v.caption), 17, Gt)) : h("", !0),
|
|
2468
2481
|
v.reorderable || v.resizable ? (S(), g("div", {
|
|
2469
2482
|
key: 2,
|
|
2470
|
-
id:
|
|
2483
|
+
id: Nr.value,
|
|
2471
2484
|
hidden: ""
|
|
2472
|
-
}, [v.reorderable ? (S(), g(
|
|
2473
|
-
|
|
2485
|
+
}, [v.reorderable ? (S(), g(ct, { key: 0 }, [ut(w(T(F)("table.reorderInstructions").value), 1)], 64)) : h("", !0), v.resizable && !K.value ? (S(), g(ct, { key: 1 }, [ut(w(T(F)("table.resizeInstructions").value), 1)], 64)) : h("", !0)], 8, Kt)) : h("", !0),
|
|
2486
|
+
Fr.value ? (S(), g("div", {
|
|
2474
2487
|
key: 3,
|
|
2475
|
-
id: kr.value,
|
|
2476
|
-
hidden: ""
|
|
2477
|
-
}, w(T(F)("table.sortInstructions").value), 9, Gt)) : h("", !0),
|
|
2478
|
-
_("span", Kt, w(Zo.value ? v.loadingText || T(F)("common.loadingText").value : ""), 1),
|
|
2479
|
-
z.value ? (S(), g(ot, { key: 4 }, [_("div", {
|
|
2480
2488
|
id: Pr.value,
|
|
2481
2489
|
hidden: ""
|
|
2482
|
-
}, w(T(F)("table.
|
|
2483
|
-
|
|
2490
|
+
}, w(T(F)("table.sortInstructions").value), 9, qt)) : h("", !0),
|
|
2491
|
+
_("span", Jt, w(ns.value ? v.loadingText || T(F)("common.loadingText").value : T(ps) === null ? "" : gs.value), 1),
|
|
2492
|
+
z.value ? (S(), g(ct, { key: 4 }, [_("div", {
|
|
2493
|
+
id: zr.value,
|
|
2494
|
+
hidden: ""
|
|
2495
|
+
}, w(T(F)("table.rowReorderInstructions").value), 9, Yt), _("span", Xt, w(T(Br).status.value), 1)], 64)) : h("", !0),
|
|
2496
|
+
v.reorderable ? (S(), g(ct, { key: 5 }, [_("span", Zt, w(_i.value), 1), _("div", {
|
|
2484
2497
|
ref_key: "ghostRef",
|
|
2485
|
-
ref:
|
|
2498
|
+
ref: Zi,
|
|
2486
2499
|
"aria-hidden": "true",
|
|
2487
2500
|
class: "bb-table-column-ghost",
|
|
2488
2501
|
popover: "manual"
|
|
2489
|
-
}, [
|
|
2502
|
+
}, [dt(e, y({
|
|
2490
2503
|
class: "bb-table__drag-icon",
|
|
2491
2504
|
icon: T(t),
|
|
2492
2505
|
size: "1em"
|
|
2493
|
-
}, T(j).dragIcon), null, 16, ["icon"]), _("span", null, w(
|
|
2494
|
-
_("div",
|
|
2506
|
+
}, T(j).dragIcon), null, 16, ["icon"]), _("span", null, w(Xi.value), 1)], 512)], 64)) : h("", !0),
|
|
2507
|
+
_("div", _t(pt(Nu.value)), [
|
|
2495
2508
|
_("div", y({
|
|
2496
2509
|
class: ["bb-table__head", {
|
|
2497
2510
|
"bb-table__head--dragging": U.value === "dragging",
|
|
2498
|
-
"bb-table__head--resizing":
|
|
2511
|
+
"bb-table__head--resizing": Ni.value !== null
|
|
2499
2512
|
}],
|
|
2500
|
-
inert:
|
|
2513
|
+
inert: rs.value,
|
|
2501
2514
|
role: "rowgroup"
|
|
2502
|
-
}, T(j).head), [
|
|
2503
|
-
"aria-rowindex":
|
|
2515
|
+
}, T(j).head), [Tt(r.$slots, "thead", { empty: xs.value }, () => [_("div", y({
|
|
2516
|
+
"aria-rowindex": is.value ? 1 : void 0,
|
|
2504
2517
|
class: ["bb-table__header-row", v.headerRowClass],
|
|
2505
2518
|
role: "row",
|
|
2506
|
-
onPointerdown:
|
|
2507
|
-
onTouchmove:
|
|
2519
|
+
onPointerdown: ya,
|
|
2520
|
+
onTouchmove: ba
|
|
2508
2521
|
}, T(j).headerRow), [
|
|
2509
2522
|
z.value ? (S(), g("div", y({
|
|
2510
2523
|
key: 0,
|
|
2511
2524
|
class: ["bb-table__cell-column-header bb-table__cell-column-header--row-drag", v.thClass],
|
|
2512
2525
|
role: "columnheader",
|
|
2513
|
-
tabindex:
|
|
2514
|
-
}, T(j).cellColumnHeader), [_("span",
|
|
2526
|
+
tabindex: zc(0)
|
|
2527
|
+
}, T(j).cellColumnHeader), [_("span", tn, w(T(F)("table.rowReorderHeader").value), 1)], 16, en)) : h("", !0),
|
|
2515
2528
|
v.selectable ? (S(), g("div", y({
|
|
2516
2529
|
key: 1,
|
|
2517
2530
|
class: ["bb-table__cell-column-header bb-table__cell-column-header--select", v.thClass],
|
|
2518
2531
|
role: "columnheader",
|
|
2519
|
-
tabindex:
|
|
2520
|
-
}, T(j).cellColumnHeader), [
|
|
2532
|
+
tabindex: zc(Number(z.value))
|
|
2533
|
+
}, T(j).cellColumnHeader), [Tt(r.$slots, "select:header", {
|
|
2521
2534
|
multiple: v.multiple,
|
|
2522
2535
|
selectAll: !!D.value,
|
|
2523
2536
|
text: v.selectText || T(F)("table.selectText").value
|
|
2524
|
-
}, () => [_("span",
|
|
2537
|
+
}, () => [_("span", rn, [!v.disableSelectAll && v.multiple ? (S(), g("label", {
|
|
2525
2538
|
key: 0,
|
|
2526
|
-
class:
|
|
2539
|
+
class: gt(["bb-table-check__label", { "bb-table-check__label--disabled": v.disabled }])
|
|
2527
2540
|
}, [(S(), g("span", {
|
|
2528
|
-
key:
|
|
2541
|
+
key: fu.value.toString(),
|
|
2529
2542
|
class: "bb-table-check"
|
|
2530
2543
|
}, [_("input", y({
|
|
2531
2544
|
ref_key: "selectAllInput",
|
|
2532
|
-
ref:
|
|
2533
|
-
},
|
|
2545
|
+
ref: hu
|
|
2546
|
+
}, yu.value), null, 16), dt(le, y({
|
|
2534
2547
|
checked: !!D.value,
|
|
2535
2548
|
class: "bb-table__select-icon",
|
|
2536
2549
|
disabled: !!v.disabled,
|
|
2537
|
-
"focus-visible": T(
|
|
2538
|
-
focused: T(
|
|
2550
|
+
"focus-visible": T(gu).focusVisible.value,
|
|
2551
|
+
focused: T(gu).focused.value,
|
|
2539
2552
|
"has-errors": !1,
|
|
2540
2553
|
"has-warnings": !1,
|
|
2541
|
-
indeterminate: !!
|
|
2554
|
+
indeterminate: !!fu.value,
|
|
2542
2555
|
readonly: !!v.readonly
|
|
2543
|
-
},
|
|
2556
|
+
}, pu.value), null, 16, [
|
|
2544
2557
|
"checked",
|
|
2545
2558
|
"disabled",
|
|
2546
2559
|
"focus-visible",
|
|
2547
2560
|
"focused",
|
|
2548
2561
|
"indeterminate",
|
|
2549
2562
|
"readonly"
|
|
2550
|
-
])])), _("span",
|
|
2551
|
-
(S(!0), g(
|
|
2563
|
+
])])), _("span", an, w(v.selectAllLabel || T(F)("table.selectAllLabel").value), 1)], 2)) : v.multiple ? h("", !0) : (S(), g("span", on, w(v.selectText || T(F)("table.selectText").value), 1))])])], 16, nn)) : h("", !0),
|
|
2564
|
+
(S(!0), g(ct, null, wt(Sc.value, (t, i) => (S(), g("div", y({
|
|
2552
2565
|
key: t.key,
|
|
2553
|
-
"aria-describedby":
|
|
2566
|
+
"aria-describedby": Ir(t),
|
|
2554
2567
|
"aria-sort": t.sortDirection ?? (t.sortable ? "none" : void 0),
|
|
2555
2568
|
class: ["bb-table__cell-column-header", [t.classes, {
|
|
2556
2569
|
"bb-table__cell-column-header--edge-start": i === 0,
|
|
2557
|
-
"bb-table__cell-column-header--edge-end": i ===
|
|
2558
|
-
"bb-table__cell-column-header--clip":
|
|
2559
|
-
"bb-table__cell-column-header--dragging":
|
|
2560
|
-
"bb-table__cell-column-header--locked": v.reorderable &&
|
|
2570
|
+
"bb-table__cell-column-header--edge-end": i === Sc.value.length - 1,
|
|
2571
|
+
"bb-table__cell-column-header--clip": jo.value.has(t.key),
|
|
2572
|
+
"bb-table__cell-column-header--dragging": Yi.value === t.key,
|
|
2573
|
+
"bb-table__cell-column-header--locked": v.reorderable && di.value.has(t.key),
|
|
2561
2574
|
"bb-table__cell-column-header--sortable": t.sortable,
|
|
2562
2575
|
"bb-table__cell-column-header--sorted": !!t.sortOrder,
|
|
2563
2576
|
"bb-table__cell-column-header--sorted-desc": t.sortOrder === "desc",
|
|
2564
|
-
"bb-table__cell-column-header--resizing":
|
|
2565
|
-
"bb-table__cell-column-header--floored": t.key in
|
|
2566
|
-
"bb-table__cell-column-header--wrap":
|
|
2577
|
+
"bb-table__cell-column-header--resizing": Ni.value === t.key,
|
|
2578
|
+
"bb-table__cell-column-header--floored": t.key in Ks.value,
|
|
2579
|
+
"bb-table__cell-column-header--wrap": Gs.value.has(t.key)
|
|
2567
2580
|
}]],
|
|
2568
|
-
style:
|
|
2569
|
-
"data-column-key":
|
|
2581
|
+
style: Ks.value[t.key],
|
|
2582
|
+
"data-column-key": Lr.value || P.value ? t.key : void 0,
|
|
2570
2583
|
role: "columnheader",
|
|
2571
|
-
tabindex: P.value ?
|
|
2572
|
-
onClick: (e) =>
|
|
2573
|
-
onFocus: (e) =>
|
|
2574
|
-
onKeydown: (e) =>
|
|
2575
|
-
onMousedown: (e) =>
|
|
2576
|
-
}, { ref_for: !0 }, T(j).part("cellColumnHeader",
|
|
2577
|
-
|
|
2584
|
+
tabindex: P.value ? zc(i + Number(z.value) + Number(!!v.selectable)) : Lr.value ? t.key === bi.value ? 0 : -1 : void 0,
|
|
2585
|
+
onClick: (e) => xi(e, t),
|
|
2586
|
+
onFocus: (e) => Ci(t.key),
|
|
2587
|
+
onKeydown: (e) => Ei(e, t.key),
|
|
2588
|
+
onMousedown: (e) => Si(e, t)
|
|
2589
|
+
}, { ref_for: !0 }, T(j).part("cellColumnHeader", dr(t.sortOrder))), [
|
|
2590
|
+
Cc(t.key, "prepend").length ? (S(), lt(wc, {
|
|
2578
2591
|
key: 0,
|
|
2579
|
-
|
|
2580
|
-
scope:
|
|
2581
|
-
}, null, 8, ["
|
|
2582
|
-
|
|
2592
|
+
names: Cc(t.key, "prepend"),
|
|
2593
|
+
scope: Tc(t)
|
|
2594
|
+
}, null, 8, ["names", "scope"])) : h("", !0),
|
|
2595
|
+
Tt(r.$slots, t.slotName, {
|
|
2583
2596
|
classes: t.classes,
|
|
2584
|
-
hideColumn: () =>
|
|
2585
|
-
items: T(
|
|
2597
|
+
hideColumn: () => li(t.key),
|
|
2598
|
+
items: T(ds),
|
|
2586
2599
|
label: t.label,
|
|
2587
2600
|
sortOrder: t.sortOrder,
|
|
2588
2601
|
sortable: t.sortable,
|
|
2589
|
-
toggleSort: (e) =>
|
|
2590
|
-
}, () => [t.sortable ? (S(),
|
|
2602
|
+
toggleSort: (e) => Pa(t.key, e)
|
|
2603
|
+
}, () => [t.sortable ? (S(), lt(ot, {
|
|
2591
2604
|
key: 0,
|
|
2592
|
-
"aria-describedby":
|
|
2593
|
-
class:
|
|
2605
|
+
"aria-describedby": Fr.value && !Lr.value && !P.value ? Pr.value : void 0,
|
|
2606
|
+
class: gt(["bb-table-sort", {
|
|
2594
2607
|
"bb-table-sort--asc": t.sortOrder === "asc",
|
|
2595
2608
|
"bb-table-sort--desc": t.sortOrder === "desc"
|
|
2596
2609
|
}]),
|
|
2597
|
-
tabindex:
|
|
2610
|
+
tabindex: Lr.value || P.value ? -1 : void 0,
|
|
2598
2611
|
type: "button",
|
|
2599
|
-
onClick: (e) =>
|
|
2612
|
+
onClick: (e) => Pa(t.key, e)
|
|
2600
2613
|
}, {
|
|
2601
|
-
default:
|
|
2614
|
+
default: Pt(() => [_("span", cn, w(t.label), 1), dt(e, y({
|
|
2602
2615
|
class: "bb-table__sort-icon",
|
|
2603
2616
|
icon: T(n),
|
|
2604
2617
|
size: "1em"
|
|
2605
|
-
}, { ref_for: !0 }, T(j).part("sortIcon",
|
|
2618
|
+
}, { ref_for: !0 }, T(j).part("sortIcon", dr(t.sortOrder))), null, 16, ["icon"])]),
|
|
2606
2619
|
_: 2
|
|
2607
2620
|
}, 1032, [
|
|
2608
2621
|
"aria-describedby",
|
|
2609
2622
|
"class",
|
|
2610
2623
|
"tabindex",
|
|
2611
2624
|
"onClick"
|
|
2612
|
-
])) : (S(), g("span",
|
|
2613
|
-
|
|
2625
|
+
])) : (S(), g("span", ln, w(t.label), 1))]),
|
|
2626
|
+
Cc(t.key, "append").length ? (S(), lt(wc, {
|
|
2614
2627
|
key: 1,
|
|
2615
|
-
|
|
2616
|
-
scope:
|
|
2617
|
-
}, null, 8, ["
|
|
2618
|
-
|
|
2628
|
+
names: Cc(t.key, "append"),
|
|
2629
|
+
scope: Tc(t)
|
|
2630
|
+
}, null, 8, ["names", "scope"])) : h("", !0),
|
|
2631
|
+
ji(String(t.key)) ? (S(), g("div", {
|
|
2619
2632
|
key: 2,
|
|
2620
2633
|
"aria-hidden": "true",
|
|
2621
2634
|
class: "bb-table-header__resizer",
|
|
2622
|
-
onDblclick:
|
|
2623
|
-
onPointerdown: (e) =>
|
|
2624
|
-
}, null, 40,
|
|
2625
|
-
], 16,
|
|
2635
|
+
onDblclick: Ft((e) => Vi(t.key), ["stop"]),
|
|
2636
|
+
onPointerdown: (e) => Ji(e, t.key)
|
|
2637
|
+
}, null, 40, un)) : h("", !0)
|
|
2638
|
+
], 16, sn))), 128)),
|
|
2626
2639
|
M.value ? (S(), g("div", y({
|
|
2627
2640
|
key: 2,
|
|
2628
2641
|
class: ["bb-table__cell-column-header bb-table__cell-column-header--actions", v.thClass],
|
|
2629
2642
|
role: "columnheader",
|
|
2630
|
-
tabindex:
|
|
2631
|
-
}, T(j).cellColumnHeader), [
|
|
2632
|
-
], 16,
|
|
2643
|
+
tabindex: zc(os.value - 1)
|
|
2644
|
+
}, T(j).cellColumnHeader), [Tt(r.$slots, "actions:header", { text: v.actionsText || T(F)("table.actionsText").value }, () => [_("span", fn, w(v.actionsText || T(F)("table.actionsText").value), 1)])], 16, dn)) : h("", !0)
|
|
2645
|
+
], 16, $t)])], 16, Qt),
|
|
2633
2646
|
_("div", y({
|
|
2634
2647
|
ref_key: "bodyRef",
|
|
2635
2648
|
ref: R,
|
|
2636
2649
|
class: "bb-table__body",
|
|
2637
2650
|
role: "rowgroup",
|
|
2638
|
-
onPointerdown:
|
|
2639
|
-
onFocusin:
|
|
2640
|
-
onFocusout:
|
|
2641
|
-
}, T(j).body), [
|
|
2651
|
+
onPointerdown: Vr,
|
|
2652
|
+
onFocusin: Jc,
|
|
2653
|
+
onFocusout: Yc
|
|
2654
|
+
}, T(j).body), [ns.value && !T(J).length ? Tt(r.$slots, "loading", { items: T(ds) }, () => [(S(!0), g(ct, null, wt(Au.value, (e, t) => (S(), g("div", {
|
|
2642
2655
|
key: t,
|
|
2643
|
-
"aria-rowindex":
|
|
2656
|
+
"aria-rowindex": is.value ? t + 2 : void 0,
|
|
2644
2657
|
class: "bb-table-skeleton__row",
|
|
2645
2658
|
role: "row"
|
|
2646
2659
|
}, [
|
|
2647
2660
|
z.value ? (S(), g("div", {
|
|
2648
2661
|
key: 0,
|
|
2649
2662
|
class: "bb-table-skeleton__cell bb-table-skeleton__cell--row-drag",
|
|
2650
|
-
role:
|
|
2651
|
-
}, null, 8,
|
|
2663
|
+
role: yr.value
|
|
2664
|
+
}, null, 8, mn)) : h("", !0),
|
|
2652
2665
|
v.selectable ? (S(), g("div", {
|
|
2653
2666
|
key: 1,
|
|
2654
2667
|
class: "bb-table-skeleton__cell bb-table-skeleton__cell--select",
|
|
2655
|
-
role:
|
|
2656
|
-
}, [...i[
|
|
2657
|
-
(S(!0), g(
|
|
2668
|
+
role: yr.value
|
|
2669
|
+
}, [...i[1] ||= [_("div", { class: "bb-table-skeleton__placeholder" }, null, -1)]], 8, hn)) : h("", !0),
|
|
2670
|
+
(S(!0), g(ct, null, wt(B.value, (e, n) => (S(), g("div", {
|
|
2658
2671
|
key: e.key,
|
|
2659
|
-
class:
|
|
2660
|
-
role:
|
|
2661
|
-
}, [!e.skeleton || e.skeleton === "text" ? (S(), g("div",
|
|
2672
|
+
class: gt(["bb-table-skeleton__cell", [`bb-table-skeleton__cell--${e.skeleton ?? "text"}`]]),
|
|
2673
|
+
role: yr.value
|
|
2674
|
+
}, [!e.skeleton || e.skeleton === "text" ? (S(), g("div", _n, [_("div", {
|
|
2662
2675
|
class: "bb-table-skeleton__line",
|
|
2663
|
-
style:
|
|
2676
|
+
style: vt({ width: `${ku[(t + n) % 4]}%` })
|
|
2664
2677
|
}, null, 4), _("div", {
|
|
2665
2678
|
class: "bb-table-skeleton__line",
|
|
2666
|
-
style:
|
|
2667
|
-
}, null, 4)])) : e.skeleton === "avatar" ? (S(), g("div",
|
|
2679
|
+
style: vt({ width: `${ku[(t + n + 2) % 4]}%` })
|
|
2680
|
+
}, null, 4)])) : e.skeleton === "avatar" ? (S(), g("div", vn)) : e.skeleton === "avatar-text" ? (S(), g("div", yn, [i[2] ||= _("div", { class: "bb-table-skeleton__avatar" }, null, -1), _("div", bn, [_("div", {
|
|
2668
2681
|
class: "bb-table-skeleton__line",
|
|
2669
|
-
style:
|
|
2682
|
+
style: vt({ width: `${ku[(t + n) % 4]}%` })
|
|
2670
2683
|
}, null, 4), _("div", {
|
|
2671
2684
|
class: "bb-table-skeleton__line",
|
|
2672
|
-
style:
|
|
2673
|
-
}, null, 4)])])) : e.skeleton === "image" ? (S(), g("div",
|
|
2685
|
+
style: vt({ width: `${ku[(t + n + 2) % 4]}%` })
|
|
2686
|
+
}, null, 4)])])) : e.skeleton === "image" ? (S(), g("div", xn)) : e.skeleton === "badge" ? (S(), g("div", Sn)) : h("", !0)], 10, gn))), 128)),
|
|
2674
2687
|
M.value ? (S(), g("div", {
|
|
2675
2688
|
key: 2,
|
|
2676
2689
|
class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions",
|
|
2677
|
-
role:
|
|
2678
|
-
}, [...i[
|
|
2679
|
-
], 8,
|
|
2680
|
-
X.value.first ? (S(),
|
|
2690
|
+
role: yr.value
|
|
2691
|
+
}, [...i[3] ||= [_("div", { class: "bb-table-skeleton__placeholder" }, null, -1)]], 8, Cn)) : h("", !0)
|
|
2692
|
+
], 8, pn))), 128))], void 0, 0) : T(J).length ? Tt(r.$slots, "tbody", {}, () => [
|
|
2693
|
+
X.value.first ? (S(), lt(T(ye), {
|
|
2681
2694
|
key: 0,
|
|
2682
|
-
context:
|
|
2695
|
+
context: Lu.value,
|
|
2683
2696
|
edge: "first",
|
|
2684
2697
|
fixed: v.fixedFirst,
|
|
2685
|
-
"row-index":
|
|
2686
|
-
stop:
|
|
2698
|
+
"row-index": Ru.value.first,
|
|
2699
|
+
stop: Rc($n)
|
|
2687
2700
|
}, null, 8, [
|
|
2688
2701
|
"context",
|
|
2689
2702
|
"fixed",
|
|
2690
2703
|
"row-index",
|
|
2691
2704
|
"stop"
|
|
2692
2705
|
])) : h("", !0),
|
|
2693
|
-
(S(!0), g(
|
|
2706
|
+
(S(!0), g(ct, null, wt(Tl.value, (e) => (S(), g(ct, { key: e.key }, [e.kind === "spacer" ? (S(), g("div", {
|
|
2694
2707
|
key: 0,
|
|
2695
2708
|
"aria-hidden": "true",
|
|
2696
2709
|
class: "bb-table-spacer__row bb-table-placeholder__row",
|
|
2697
|
-
style:
|
|
2710
|
+
style: vt({ height: `${e.height}px` })
|
|
2698
2711
|
}, null, 4)) : e.kind === "placeholder" ? (S(), g("div", {
|
|
2699
2712
|
key: 1,
|
|
2700
2713
|
"aria-hidden": "true",
|
|
2701
2714
|
class: "bb-table-placeholder__row bb-table-placeholder__row--pending",
|
|
2702
2715
|
"data-index": e.virtualIndex,
|
|
2703
|
-
style:
|
|
2704
|
-
}, null, 12,
|
|
2716
|
+
style: vt({ height: `${e.height}px` })
|
|
2717
|
+
}, null, 12, jn)) : e.kind === "row" ? (S(), lt(T(_e), {
|
|
2705
2718
|
key: 2,
|
|
2706
|
-
context:
|
|
2719
|
+
context: Iu.value,
|
|
2707
2720
|
index: e.index,
|
|
2708
2721
|
item: e.item,
|
|
2709
|
-
"select-blocked":
|
|
2710
|
-
selected:
|
|
2711
|
-
stop:
|
|
2722
|
+
"select-blocked": Cu(e.item),
|
|
2723
|
+
selected: xu(e.item),
|
|
2724
|
+
stop: Rc(e.virtualIndex),
|
|
2712
2725
|
"virtual-index": e.virtualIndex
|
|
2713
2726
|
}, null, 8, [
|
|
2714
2727
|
"context",
|
|
@@ -2718,12 +2731,12 @@ var Ht = {
|
|
|
2718
2731
|
"selected",
|
|
2719
2732
|
"stop",
|
|
2720
2733
|
"virtual-index"
|
|
2721
|
-
])) : (S(),
|
|
2734
|
+
])) : (S(), lt(T(ve), {
|
|
2722
2735
|
key: 3,
|
|
2723
|
-
context:
|
|
2736
|
+
context: Iu.value,
|
|
2724
2737
|
item: e.item,
|
|
2725
|
-
selected:
|
|
2726
|
-
stop:
|
|
2738
|
+
selected: xu(e.item),
|
|
2739
|
+
stop: Rc(e.virtualIndex),
|
|
2727
2740
|
"virtual-index": e.virtualIndex
|
|
2728
2741
|
}, null, 8, [
|
|
2729
2742
|
"context",
|
|
@@ -2732,13 +2745,13 @@ var Ht = {
|
|
|
2732
2745
|
"stop",
|
|
2733
2746
|
"virtual-index"
|
|
2734
2747
|
]))], 64))), 128)),
|
|
2735
|
-
X.value.last ? (S(),
|
|
2748
|
+
X.value.last ? (S(), lt(T(ye), {
|
|
2736
2749
|
key: 1,
|
|
2737
|
-
context:
|
|
2750
|
+
context: Lu.value,
|
|
2738
2751
|
edge: "last",
|
|
2739
2752
|
fixed: v.fixedLast,
|
|
2740
|
-
"row-index":
|
|
2741
|
-
stop:
|
|
2753
|
+
"row-index": Ru.value.last,
|
|
2754
|
+
stop: Rc(er)
|
|
2742
2755
|
}, null, 8, [
|
|
2743
2756
|
"context",
|
|
2744
2757
|
"fixed",
|
|
@@ -2747,32 +2760,36 @@ var Ht = {
|
|
|
2747
2760
|
])) : h("", !0)
|
|
2748
2761
|
], void 0, 2) : (S(), g("div", {
|
|
2749
2762
|
key: 1,
|
|
2750
|
-
"aria-rowindex":
|
|
2763
|
+
"aria-rowindex": is.value ? 2 : void 0,
|
|
2751
2764
|
class: "bb-table-empty__row",
|
|
2752
2765
|
role: "row"
|
|
2753
2766
|
}, [_("div", {
|
|
2754
|
-
"aria-colspan":
|
|
2767
|
+
"aria-colspan": os.value,
|
|
2755
2768
|
class: "bb-table-empty__cell",
|
|
2756
|
-
role:
|
|
2757
|
-
}, [
|
|
2769
|
+
role: yr.value
|
|
2770
|
+
}, [T(ps) === null ? (S(), g("div", kn, [Tt(r.$slots, "empty", {}, () => [_("span", An, w(v.emptyText || T(F)("common.emptyText").value), 1)])])) : (S(), g("div", En, [_("span", Dn, [_("span", On, w(gs.value), 1), _("button", {
|
|
2771
|
+
class: "bb-load-retry",
|
|
2772
|
+
type: "button",
|
|
2773
|
+
onClick: i[0] ||= (e) => T(st)(e, _s, () => I.value)
|
|
2774
|
+
}, w(T(F)("common.retryLabel").value), 1)])]))], 8, Tn)], 8, wn))], 16),
|
|
2758
2775
|
_("div", y({
|
|
2759
2776
|
ref_key: "footRef",
|
|
2760
|
-
ref:
|
|
2777
|
+
ref: Bu,
|
|
2761
2778
|
class: "bb-table__foot",
|
|
2762
2779
|
role: A.tfoot ? "rowgroup" : void 0
|
|
2763
|
-
}, T(j).foot), [
|
|
2764
|
-
columnCount:
|
|
2765
|
-
empty:
|
|
2766
|
-
})], 16,
|
|
2780
|
+
}, T(j).foot), [Tt(r.$slots, "tfoot", {
|
|
2781
|
+
columnCount: os.value,
|
|
2782
|
+
empty: xs.value
|
|
2783
|
+
})], 16, Mn)
|
|
2767
2784
|
], 16),
|
|
2768
|
-
(S(!0), g(
|
|
2769
|
-
v.rowMenu ? (S(),
|
|
2785
|
+
(S(!0), g(ct, null, wt(Ou.value, (e) => (S(), g("input", y({ key: e.value }, { ref_for: !0 }, e), null, 16))), 128)),
|
|
2786
|
+
v.rowMenu ? (S(), lt(T(be), {
|
|
2770
2787
|
key: 6,
|
|
2771
2788
|
ref_key: "rowMenuEl",
|
|
2772
|
-
ref:
|
|
2773
|
-
items:
|
|
2789
|
+
ref: Hr,
|
|
2790
|
+
items: Ur.value,
|
|
2774
2791
|
label: v.actionsText || T(F)("table.actionsText").value,
|
|
2775
|
-
onHide:
|
|
2792
|
+
onHide: ti
|
|
2776
2793
|
}, null, 8, ["items", "label"])) : h("", !0)
|
|
2777
2794
|
]),
|
|
2778
2795
|
_: 3
|