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