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