bitboss-ui 3.0.0-beta.4 → 3.0.0-beta.41
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 +317 -98
- package/bin/bitboss-ui-mcp.mjs +1566 -75
- package/bin/bitboss-ui.mjs +716 -72
- package/dist/ai/BbAccordion.md +178 -56
- package/dist/ai/BbAlert.md +140 -28
- package/dist/ai/BbAsterisk.md +61 -4
- package/dist/ai/BbAvatar.md +194 -53
- package/dist/ai/BbBadge.md +250 -50
- package/dist/ai/BbBadgeButton.md +74 -21
- package/dist/ai/BbBaseButton.md +132 -51
- package/dist/ai/BbBaseCheckboxIcon.md +118 -26
- package/dist/ai/BbBaseRadioIcon.md +115 -26
- package/dist/ai/BbBaseSwitchIcon.md +123 -28
- package/dist/ai/BbBreadcrumbs.md +221 -51
- package/dist/ai/BbButton.md +389 -107
- package/dist/ai/BbCalendar.md +667 -0
- package/dist/ai/BbCheckbox.md +242 -80
- package/dist/ai/BbCheckboxGroup.md +575 -66
- package/dist/ai/BbCollapsible.md +158 -39
- package/dist/ai/BbColorInput.md +322 -82
- package/dist/ai/BbColorPalette.md +261 -61
- package/dist/ai/BbConfirm.md +220 -51
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +272 -37
- package/dist/ai/BbDatePickerInput.md +321 -92
- package/dist/ai/BbDialog.md +492 -87
- package/dist/ai/BbDropdown.md +1182 -104
- package/dist/ai/BbDropdownButton.md +239 -61
- package/dist/ai/BbDropdownGroup.md +5 -5
- package/dist/ai/BbDropzone.md +140 -36
- package/dist/ai/BbForm.md +1165 -40
- package/dist/ai/BbIcon.md +100 -33
- package/dist/ai/BbIndicator.md +79 -12
- package/dist/ai/BbNumberInput.md +257 -87
- package/dist/ai/BbOffCanvas.md +396 -91
- package/dist/ai/BbPagination.md +199 -32
- package/dist/ai/BbPopover.md +219 -54
- package/dist/ai/BbProgress.md +137 -71
- package/dist/ai/BbPtScope.md +136 -0
- package/dist/ai/BbRadio.md +234 -43
- package/dist/ai/BbRadioGroup.md +529 -91
- package/dist/ai/BbRating.md +243 -61
- package/dist/ai/BbSelect.md +690 -120
- package/dist/ai/BbSelectPopover.md +434 -122
- package/dist/ai/BbSlider.md +275 -79
- package/dist/ai/BbSmoothHeight.md +142 -34
- package/dist/ai/BbSpinner.md +179 -81
- package/dist/ai/BbSwitch.md +249 -63
- package/dist/ai/BbSwitchGroup.md +394 -65
- package/dist/ai/BbTable.md +1666 -222
- package/dist/ai/BbTabs.md +898 -178
- package/dist/ai/BbTabsList.md +81 -7
- package/dist/ai/BbTabsPanels.md +77 -0
- package/dist/ai/BbTabsRoot.md +16 -15
- package/dist/ai/BbTag.md +256 -76
- package/dist/ai/BbTextInput.md +480 -102
- package/dist/ai/BbTextarea.md +310 -96
- package/dist/ai/BbTimePicker.md +159 -24
- package/dist/ai/BbTimePickerInput.md +277 -46
- package/dist/ai/BbToast.md +286 -40
- package/dist/ai/BbToastPortal.md +3 -3
- package/dist/ai/BbTooltip.md +187 -34
- package/dist/ai/BbTree.md +260 -85
- package/dist/ai/ChipsBox.md +43 -2
- package/dist/ai/ClearableButton.md +12 -0
- package/dist/ai/CommaBox.md +2 -1
- package/dist/ai/CommonField.md +63 -0
- package/dist/ai/CommonFieldInput.md +90 -0
- package/dist/ai/CommonPopover.md +17 -12
- package/dist/ai/CommonTimeSelector.md +63 -0
- package/dist/ai/ErrorIcon.md +20 -0
- package/dist/ai/FlatListBox.md +41 -11
- package/dist/ai/GroupedListBox.md +42 -12
- package/dist/ai/ListBox.md +46 -11
- package/dist/ai/OptionsContainer.md +13 -10
- package/dist/ai/WarningIcon.md +20 -0
- package/dist/ai/changelog.json +4025 -141
- package/dist/ai/components.json +51872 -10136
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useBbDropdownContext.md +168 -0
- package/dist/ai/composables/useBbFormContext.md +51 -24
- package/dist/ai/composables/useBbFormField.md +134 -0
- package/dist/ai/composables/useBbTableContext.md +41 -19
- package/dist/ai/composables/useConfirm.md +16 -8
- package/dist/ai/composables/useCountdown.md +1 -1
- package/dist/ai/composables/useId.md +10 -10
- package/dist/ai/composables/useMobile.md +17 -10
- package/dist/ai/composables/useToast.md +25 -19
- package/dist/ai/design-tokens.json +940 -0
- package/dist/ai/design-tokens.manifest.yaml +175 -0
- package/dist/ai/guides/agent-contract.md +168 -22
- package/dist/ai/guides/ai-router.md +79 -40
- package/dist/ai/guides/app-layout.md +8 -4
- package/dist/ai/guides/coherence-playbook.md +8 -8
- package/dist/ai/guides/component-picker.md +42 -34
- package/dist/ai/guides/design-language.md +274 -97
- package/dist/ai/guides/design-tokens.md +493 -105
- package/dist/ai/guides/fetch-items-playbook.md +22 -16
- package/dist/ai/guides/icons-policy.md +67 -35
- package/dist/ai/guides/inertia-helpers.md +4 -1
- package/dist/ai/guides/inline-edit-playbook.md +13 -6
- package/dist/ai/guides/installation-and-plugin-setup.md +817 -73
- package/dist/ai/guides/migration/components/bb-accordion.md +37 -0
- package/dist/ai/guides/migration/components/bb-alert.md +2 -2
- package/dist/ai/guides/migration/components/bb-avatar.md +13 -14
- package/dist/ai/guides/migration/components/bb-badge.md +5 -5
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +9 -8
- package/dist/ai/guides/migration/components/bb-button.md +80 -20
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +116 -29
- package/dist/ai/guides/migration/components/bb-checkbox.md +53 -10
- package/dist/ai/guides/migration/components/bb-chip.md +6 -6
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-input.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-palette.md +16 -9
- package/dist/ai/guides/migration/components/bb-date-picker-input.md +45 -35
- package/dist/ai/guides/migration/components/bb-dialog.md +69 -36
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +7 -1
- package/dist/ai/guides/migration/components/bb-dropdown.md +31 -8
- package/dist/ai/guides/migration/components/bb-dropzone.md +8 -0
- package/dist/ai/guides/migration/components/bb-icon.md +7 -7
- package/dist/ai/guides/migration/components/bb-intersection.md +1 -1
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -31
- package/dist/ai/guides/migration/components/bb-pagination.md +10 -0
- package/dist/ai/guides/migration/components/bb-popover.md +19 -11
- package/dist/ai/guides/migration/components/bb-radio-group.md +14 -0
- package/dist/ai/guides/migration/components/bb-rating.md +61 -24
- package/dist/ai/guides/migration/components/bb-select-popover.md +9 -1
- package/dist/ai/guides/migration/components/bb-select.md +21 -4
- package/dist/ai/guides/migration/components/bb-slider.md +14 -6
- package/dist/ai/guides/migration/components/bb-switch-group.md +14 -0
- package/dist/ai/guides/migration/components/bb-table.md +574 -33
- package/dist/ai/guides/migration/components/bb-tabs.md +91 -41
- package/dist/ai/guides/migration/components/bb-tag.md +9 -7
- package/dist/ai/guides/migration/components/bb-text-input.md +12 -12
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/components/bb-tooltip.md +18 -0
- package/dist/ai/guides/migration/components/bb-tree.md +11 -9
- package/dist/ai/guides/migration/components/use-confirm.md +9 -1
- package/dist/ai/guides/migration/v2-to-v3.md +828 -240
- package/dist/ai/guides/migration/v3-beta-css-classes.md +751 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +119 -0
- package/dist/ai/guides/options-items-playbook.md +161 -12
- package/dist/ai/guides/page-shell.md +1 -1
- package/dist/ai/guides/passthrough.md +958 -0
- package/dist/ai/guides/preset-components.md +361 -0
- package/dist/ai/guides/ssr-prefill.md +127 -0
- package/dist/ai/guides/validated-forms.md +466 -55
- package/dist/ai/guides/validation-libraries.md +171 -0
- package/dist/ai/guides/validation-providers.md +113 -0
- package/dist/ai/index.md +45 -44
- package/dist/ai/recipes/inertia/approvals-inbox.md +26 -10
- package/dist/ai/recipes/inertia/command-palette.md +2 -2
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +46 -30
- package/dist/ai/recipes/inertia/layout-scaffold.md +6 -2
- package/dist/ai/recipes/inertia/onboarding.md +30 -8
- package/dist/ai/recipes/inertia/ownership-atlas.md +72 -49
- package/dist/ai/recipes/inertia/record-form.md +53 -19
- package/dist/ai/recipes/inertia/records-workspace.md +201 -49
- package/dist/ai/recipes/inertia/settings-workspace.md +3809 -0
- package/dist/ai/recipes/inertia/upload-center.md +54 -43
- package/dist/ai/recipes/inertia/wizard-form.md +98 -14
- package/dist/ai/recipes/nuxt/approvals-inbox.md +26 -10
- package/dist/ai/recipes/nuxt/command-palette.md +2 -2
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +68 -52
- package/dist/ai/recipes/nuxt/layout-scaffold.md +6 -2
- package/dist/ai/recipes/nuxt/onboarding.md +30 -8
- package/dist/ai/recipes/nuxt/record-form.md +66 -22
- package/dist/ai/recipes/nuxt/records-workspace.md +199 -48
- package/dist/ai/recipes/nuxt/settings-workspace.md +3898 -0
- package/dist/ai/recipes/nuxt/upload-center.md +52 -41
- package/dist/ai/recipes/nuxt/wizard-form.md +98 -14
- package/dist/ai/recipes/vue/approvals-inbox.md +28 -12
- package/dist/ai/recipes/vue/command-palette.md +2 -2
- package/dist/ai/recipes/vue/inline-edit-workspace.md +69 -53
- package/dist/ai/recipes/vue/layout-scaffold.md +6 -2
- package/dist/ai/recipes/vue/onboarding.md +32 -8
- package/dist/ai/recipes/vue/record-form.md +81 -54
- package/dist/ai/recipes/vue/records-workspace.md +198 -49
- package/dist/ai/recipes/vue/settings-workspace.md +3836 -0
- package/dist/ai/recipes/vue/upload-center.md +53 -42
- package/dist/ai/recipes/vue/wizard-form.md +97 -14
- package/dist/ai/source/BbAccordion.md +90 -24
- package/dist/ai/source/BbAlert.md +209 -62
- package/dist/ai/source/BbAsterisk.md +54 -4
- package/dist/ai/source/BbAvatar.md +73 -16
- package/dist/ai/source/BbBadge.md +265 -97
- package/dist/ai/source/BbBadgeButton.md +218 -79
- package/dist/ai/source/BbBaseButton.md +108 -12
- package/dist/ai/source/BbBaseCheckboxIcon.md +151 -36
- package/dist/ai/source/BbBaseRadioIcon.md +121 -17
- package/dist/ai/source/BbBaseSwitchIcon.md +138 -28
- package/dist/ai/source/BbBreadcrumbs.md +363 -69
- package/dist/ai/source/BbButton.md +563 -174
- package/dist/ai/source/BbCalendar.md +1744 -0
- package/dist/ai/source/BbCheckbox.md +470 -68
- package/dist/ai/source/BbCheckboxGroup.md +976 -95
- package/dist/ai/source/BbCollapsible.md +96 -8
- package/dist/ai/source/BbColorInput.md +597 -67
- package/dist/ai/source/BbColorPalette.md +1284 -65
- package/dist/ai/source/BbConfirm.md +149 -7
- package/dist/ai/source/BbConfirmPortal.md +89 -3
- package/dist/ai/source/BbDatePicker.md +527 -381
- package/dist/ai/source/BbDatePickerInput.md +2015 -118
- package/dist/ai/source/BbDialog.md +531 -64
- package/dist/ai/source/BbDropdown.md +885 -175
- package/dist/ai/source/BbDropdownButton.md +377 -79
- package/dist/ai/source/BbDropdownGroup.md +687 -96
- package/dist/ai/source/BbDropzone.md +140 -31
- package/dist/ai/source/BbForm.md +875 -17
- package/dist/ai/source/BbIcon.md +130 -52
- package/dist/ai/source/BbIndicator.md +117 -60
- package/dist/ai/source/BbNumberInput.md +667 -84
- package/dist/ai/source/BbOffCanvas.md +1007 -261
- package/dist/ai/source/BbPagination.md +203 -31
- package/dist/ai/source/BbPopover.md +267 -90
- package/dist/ai/source/BbProgress.md +88 -26
- package/dist/ai/source/BbPtScope.md +54 -0
- package/dist/ai/source/BbRadio.md +388 -58
- package/dist/ai/source/BbRadioGroup.md +940 -109
- package/dist/ai/source/BbRating.md +736 -84
- package/dist/ai/source/BbSelect.md +1096 -96
- package/dist/ai/source/BbSelectPopover.md +807 -114
- package/dist/ai/source/BbSlider.md +1390 -98
- package/dist/ai/source/BbSmoothHeight.md +48 -2
- package/dist/ai/source/BbSpinner.md +62 -6
- package/dist/ai/source/BbSwitch.md +297 -60
- package/dist/ai/source/BbSwitchGroup.md +761 -83
- package/dist/ai/source/BbTable.md +6950 -1864
- package/dist/ai/source/BbTabs.md +368 -111
- package/dist/ai/source/BbTabsList.md +503 -146
- package/dist/ai/source/BbTabsPanels.md +625 -0
- package/dist/ai/source/BbTabsRoot.md +319 -100
- package/dist/ai/source/BbTag.md +796 -87
- package/dist/ai/source/BbTextInput.md +497 -68
- package/dist/ai/source/BbTextarea.md +550 -65
- package/dist/ai/source/BbTimePicker.md +395 -69
- package/dist/ai/source/BbTimePickerInput.md +1233 -106
- package/dist/ai/source/BbToast.md +250 -74
- package/dist/ai/source/BbToastPortal.md +210 -66
- package/dist/ai/source/BbTooltip.md +181 -30
- package/dist/ai/source/BbTree.md +76 -11
- package/dist/ai/source/ChipsBox.md +25 -5
- package/dist/ai/source/CommaBox.md +21 -6
- package/dist/ai/source/{BbBaseInputContainer.md → CommonField.md} +467 -250
- package/dist/ai/source/CommonFieldInput.md +848 -0
- package/dist/ai/source/CommonPopover.md +116 -30
- package/dist/ai/source/CommonTimeSelector.md +726 -0
- package/dist/ai/source/ErrorIcon.md +2 -2
- package/dist/ai/source/FlatListBox.md +188 -17
- package/dist/ai/source/GroupedListBox.md +236 -44
- package/dist/ai/source/GuidesComponent.md +14 -7
- package/dist/ai/source/ListBox.md +46 -8
- package/dist/ai/source/OptionsContainer.md +288 -60
- package/dist/ai/source/WarningIcon.md +2 -2
- package/dist/assets/css/reset.css_inline.js +1 -1
- package/dist/assets/svgs/star.svg_raw.js +4 -0
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +49 -32
- package/dist/components/BbAccordion/types.d.ts +35 -3
- package/dist/components/BbAccordion/types.js +11 -0
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +46 -30
- package/dist/components/BbAlert/types.d.ts +37 -3
- package/dist/components/BbAlert/types.js +13 -0
- package/dist/components/BbAsterisk/BbAsterisk.vue.d.ts +3 -1
- package/dist/components/BbAsterisk/BbAsterisk.vue_vue_type_script_setup_true_lang.js +23 -8
- package/dist/components/BbAsterisk/types.d.ts +18 -0
- package/dist/components/BbAsterisk/types.js +7 -0
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +57 -44
- package/dist/components/BbAvatar/types.d.ts +23 -0
- package/dist/components/BbAvatar/types.js +7 -0
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -18
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +96 -53
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +27 -8
- package/dist/components/BbBadge/badgeButtonContext.d.ts +25 -8
- package/dist/components/BbBadge/types.d.ts +46 -3
- package/dist/components/BbBadge/types.js +13 -0
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +109 -96
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/BbBaseButton/types.d.ts +33 -3
- package/dist/components/BbBaseButton/types.js +9 -2
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue_vue_type_script_setup_true_lang.js +50 -18
- package/dist/components/BbBaseCheckboxIcon/types.d.ts +31 -2
- package/dist/components/BbBaseCheckboxIcon/types.js +8 -0
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue_vue_type_script_setup_true_lang.js +45 -15
- package/dist/components/BbBaseRadioIcon/types.d.ts +31 -2
- package/dist/components/BbBaseRadioIcon/types.js +8 -0
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue_vue_type_script_setup_true_lang.js +48 -16
- package/dist/components/BbBaseSwitchIcon/types.d.ts +31 -2
- package/dist/components/BbBaseSwitchIcon/types.js +8 -0
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +187 -132
- package/dist/components/BbBreadcrumbs/types.d.ts +45 -3
- package/dist/components/BbBreadcrumbs/types.js +12 -0
- package/dist/components/BbButton/BbButton.vue.d.ts +5 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +107 -81
- package/dist/components/BbButton/types.d.ts +113 -2
- package/dist/components/BbButton/types.js +12 -0
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +34 -0
- package/dist/components/BbCalendar/BbCalendar.vue.js +6 -0
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +608 -0
- package/dist/components/BbCalendar/CalendarMonthPanel.vue.js +5 -0
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/components/BbCalendar/CalendarYearPanel.vue.js +5 -0
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/components/BbCalendar/calendarHost.d.ts +29 -0
- package/dist/components/BbCalendar/calendarHost.js +10 -0
- package/dist/components/BbCalendar/types.d.ts +225 -0
- package/dist/components/BbCalendar/types.js +29 -0
- package/dist/components/{BbBaseDatePicker/useDatePickerContext.d.ts → BbCalendar/useCalendarContext.d.ts} +10 -7
- package/dist/components/BbCalendar/useCalendarContext.js +11 -0
- package/dist/components/BbCalendar/useCalendarGrid.d.ts +208 -0
- package/dist/components/BbCalendar/useCalendarGrid.js +274 -0
- package/dist/components/BbCalendar/useDayGrid.d.ts +79 -0
- package/dist/components/BbCalendar/useDayGrid.js +204 -0
- package/dist/components/BbCalendar/useToday.d.ts +23 -0
- package/dist/components/BbCalendar/useToday.js +21 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +7 -7
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +214 -72
- package/dist/components/BbCheckbox/types.d.ts +180 -13
- package/dist/components/BbCheckbox/types.js +8 -0
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +15 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +338 -90
- package/dist/components/BbCheckboxGroup/types.d.ts +195 -20
- package/dist/components/BbCheckboxGroup/types.js +10 -0
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +2 -1
- package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +41 -19
- package/dist/components/BbCollapsible/types.d.ts +44 -1
- package/dist/components/BbCollapsible/types.js +7 -0
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +17 -7
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +330 -86
- package/dist/components/BbColorInput/types.d.ts +230 -12
- package/dist/components/BbColorInput/types.js +24 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +10 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +515 -108
- package/dist/components/BbColorPalette/types.d.ts +76 -7
- package/dist/components/BbColorPalette/types.js +12 -0
- package/dist/components/BbConfirm/BbConfirm.vue.d.ts +2 -1
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +125 -76
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +1 -0
- package/dist/components/BbConfirm/types.d.ts +49 -0
- package/dist/components/BbConfirm/types.js +17 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +16 -10
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +320 -223
- package/dist/components/BbDatePicker/types.d.ts +111 -17
- package/dist/components/BbDatePicker/types.js +33 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +16 -4
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +1172 -87
- package/dist/components/BbDatePickerInput/types.d.ts +224 -19
- package/dist/components/BbDatePickerInput/types.js +39 -0
- package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +227 -136
- package/dist/components/BbDialog/types.d.ts +92 -3
- package/dist/components/BbDialog/types.js +16 -0
- package/dist/components/BbDialog/useDialogStack.d.ts +12 -0
- package/dist/components/BbDialog/useDialogStack.js +9 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +108 -96
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +10 -2
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +337 -268
- package/dist/components/BbDropdown/BbDropdownGroup.vue.d.ts +5 -1
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +8 -2
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +377 -293
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +129 -118
- package/dist/components/BbDropdown/normalizeGroups.js +55 -31
- package/dist/components/BbDropdown/types.d.ts +288 -30
- package/dist/components/BbDropdown/types.js +21 -2
- package/dist/components/BbDropdown/useDropdownContext.d.ts +10 -4
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +18 -3
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +172 -40
- package/dist/components/BbDropdownButton/types.d.ts +137 -8
- package/dist/components/BbDropdownButton/types.js +35 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +2 -2
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +186 -144
- package/dist/components/BbDropzone/types.d.ts +38 -4
- package/dist/components/BbDropzone/types.js +16 -0
- package/dist/components/BbForm/BbForm.vue.d.ts +94 -0
- package/dist/{validated → components/BbForm}/BbForm.vue.js +1 -1
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +317 -0
- package/dist/components/BbForm/BbFormCustomField.d.ts +14 -0
- package/dist/components/BbForm/BbFormCustomField.js +43 -0
- package/dist/components/BbForm/bindFormField.d.ts +16 -0
- package/dist/components/BbForm/bindFormField.js +85 -0
- package/dist/components/BbForm/formFields.d.ts +64 -0
- package/dist/components/BbForm/formFields.js +11 -0
- package/dist/components/BbForm/formSchema.d.ts +56 -0
- package/dist/components/BbForm/formSchema.js +196 -0
- package/dist/components/BbForm/standardSchema.d.ts +59 -0
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +58 -48
- package/dist/components/BbIcon/iconCache.d.ts +63 -0
- package/dist/components/BbIcon/iconCache.js +35 -0
- package/dist/components/BbIcon/types.d.ts +22 -2
- package/dist/components/BbIcon/types.js +7 -0
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +34 -21
- package/dist/components/BbIndicator/types.d.ts +24 -0
- package/dist/components/BbIndicator/types.js +7 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +12 -8
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +308 -85
- package/dist/components/BbNumberInput/types.d.ts +201 -18
- package/dist/components/BbNumberInput/types.js +8 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +311 -210
- package/dist/components/BbOffCanvas/types.d.ts +79 -6
- package/dist/components/BbOffCanvas/types.js +15 -0
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +125 -90
- package/dist/components/BbPagination/types.d.ts +38 -0
- package/dist/components/BbPagination/types.js +13 -0
- package/dist/components/BbPopover/BbPopover.vue.d.ts +4 -4
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +219 -179
- package/dist/components/BbPopover/types.d.ts +51 -5
- package/dist/components/BbPopover/types.js +14 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +29 -16
- package/dist/components/BbProgress/types.d.ts +25 -0
- package/dist/components/BbProgress/types.js +7 -0
- package/dist/components/BbPtScope/BbPtScope.vue.d.ts +12 -0
- package/dist/components/BbPtScope/BbPtScope.vue.js +5 -0
- package/dist/components/BbPtScope/BbPtScope.vue_vue_type_script_setup_true_lang.js +13 -0
- package/dist/components/BbPtScope/types.d.ts +15 -0
- package/dist/components/BbRadio/BbRadio.vue.d.ts +7 -7
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +172 -59
- package/dist/components/BbRadio/types.d.ts +152 -13
- package/dist/components/BbRadio/types.js +8 -0
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +14 -2
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +319 -92
- package/dist/components/BbRadioGroup/types.d.ts +198 -22
- package/dist/components/BbRadioGroup/types.js +10 -0
- package/dist/components/BbRating/BbRating.vue.d.ts +10 -8
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +259 -78
- package/dist/components/BbRating/types.d.ts +174 -13
- package/dist/components/BbRating/types.js +21 -0
- package/dist/components/BbSelect/BbSelect.vue.d.ts +17 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +553 -83
- package/dist/components/BbSelect/types.d.ts +235 -20
- package/dist/components/BbSelect/types.js +41 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +15 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +541 -391
- package/dist/components/BbSelectPopover/types.d.ts +124 -8
- package/dist/components/BbSelectPopover/types.js +24 -0
- package/dist/components/BbSlider/BbSlider.vue.d.ts +13 -8
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +472 -96
- package/dist/components/BbSlider/types.d.ts +202 -13
- package/dist/components/BbSlider/types.js +26 -0
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue_vue_type_script_setup_true_lang.js +60 -48
- package/dist/components/BbSmoothHeight/types.d.ts +19 -0
- package/dist/components/BbSmoothHeight/types.js +7 -0
- package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +27 -14
- package/dist/components/BbSpinner/types.d.ts +22 -1
- package/dist/components/BbSpinner/types.js +7 -0
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +7 -7
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +220 -78
- package/dist/components/BbSwitch/types.d.ts +25 -10
- package/dist/components/BbSwitch/types.js +5 -0
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +14 -2
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +338 -90
- package/dist/components/BbSwitchGroup/types.d.ts +30 -7
- package/dist/components/BbSwitchGroup/types.js +5 -0
- package/dist/components/BbTable/BbTable.vue.d.ts +27 -6
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +2013 -685
- package/dist/components/BbTable/BbTableDataRow.d.ts +196 -0
- package/dist/components/BbTable/BbTableDataRow.js +151 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +84 -0
- package/dist/components/BbTable/BbTableExpandRow.js +62 -0
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +120 -0
- package/dist/components/BbTable/BbTableSelectToggle.js +122 -0
- package/dist/components/BbTable/gridWidgets.d.ts +30 -0
- package/dist/components/BbTable/gridWidgets.js +14 -0
- package/dist/components/BbTable/types.d.ts +473 -123
- package/dist/components/BbTable/types.js +31 -0
- package/dist/components/BbTable/utils.d.ts +145 -4
- package/dist/components/BbTable/utils.js +154 -37
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -1
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +62 -26
- package/dist/components/BbTabs/BbTabsList.vue.d.ts +3 -10
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +143 -81
- package/dist/components/BbTabs/BbTabsPanels.vue.d.ts +12 -0
- package/dist/components/{BbBaseSwitch/BbBaseSwitch.vue.js → BbTabs/BbTabsPanels.vue.js} +2 -2
- package/dist/components/BbTabs/BbTabsPanels.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/BbTabs/BbTabsRoot.vue.d.ts +3 -1
- package/dist/components/BbTabs/BbTabsRoot.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbTabs/types.d.ts +183 -23
- package/dist/components/BbTabs/types.js +34 -0
- package/dist/components/BbTag/BbTag.vue.d.ts +13 -10
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +383 -92
- package/dist/components/BbTag/types.d.ts +139 -14
- package/dist/components/BbTag/types.js +22 -0
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +10 -8
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +257 -84
- package/dist/components/BbTextInput/types.d.ts +168 -13
- package/dist/components/BbTextInput/types.js +8 -0
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +7 -7
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +291 -94
- package/dist/components/BbTextarea/types.d.ts +158 -14
- package/dist/components/BbTextarea/types.js +8 -0
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +12 -4
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +199 -122
- package/dist/components/BbTimePicker/types.d.ts +94 -7
- package/dist/components/BbTimePicker/types.js +18 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +14 -4
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +749 -86
- package/dist/components/BbTimePickerInput/types.d.ts +171 -22
- package/dist/components/BbTimePickerInput/types.js +25 -0
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +63 -25
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +4 -1
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -76
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +1 -0
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +4 -1
- package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +72 -64
- package/dist/components/BbToast/types.d.ts +54 -1
- package/dist/components/BbToast/types.js +28 -0
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +104 -87
- package/dist/components/BbTooltip/types.d.ts +40 -2
- package/dist/components/BbTooltip/types.js +7 -0
- package/dist/components/BbTree/BbTree.vue.d.ts +15 -3
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +51 -29
- package/dist/components/BbTree/BbTreeLevel.vue.d.ts +1 -1
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +17 -16
- package/dist/components/BbTree/context.d.ts +9 -1
- package/dist/components/BbTree/types.d.ts +40 -5
- package/dist/components/BbTree/types.js +7 -0
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +46 -44
- package/dist/components/ChipsBox/types.d.ts +7 -0
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +11 -7
- package/dist/components/CommaBox/types.d.ts +7 -0
- package/dist/components/{BbBaseInputContainer/BbBaseInputContainer.vue.d.ts → CommonField/CommonField.vue.d.ts} +5 -5
- package/dist/components/{BbBaseRadio/BbBaseRadio.vue.js → CommonField/CommonField.vue.js} +2 -2
- package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +189 -0
- package/dist/components/CommonField/messageHeightMatrix.d.ts +2 -0
- package/dist/components/{BbBaseInputContainer → CommonField}/types.d.ts +52 -16
- package/dist/components/{CommonInputWrapper/CommonInputWrapper.vue.d.ts → CommonFieldInput/CommonFieldInput.vue.d.ts} +5 -4
- package/dist/components/{BbBaseRadioGroup/BbBaseRadioGroup.vue.js → CommonFieldInput/CommonFieldInput.vue.js} +2 -2
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +120 -0
- package/dist/components/CommonFieldInput/boxBorderMatrix.d.ts +10 -0
- package/dist/components/{CommonInputWrapper → CommonFieldInput}/types.d.ts +27 -8
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +11 -2
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +76 -63
- package/dist/components/CommonPopover/types.d.ts +27 -8
- package/dist/components/{BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.d.ts → CommonTimeSelector/CommonTimeSelector.vue.d.ts} +21 -2
- package/dist/components/{BbBaseColorPalette/BbBaseColorPalette.vue.js → CommonTimeSelector/CommonTimeSelector.vue.js} +2 -2
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +232 -0
- package/dist/components/CommonTimeSelector/types.d.ts +6 -0
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +5 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +165 -95
- package/dist/components/FlatListBox/types.d.ts +24 -2
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +5 -1
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +217 -134
- package/dist/components/GroupedListBox/types.d.ts +24 -2
- package/dist/components/ListBox/ListBox.vue.d.ts +5 -1
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +95 -69
- package/dist/components/ListBox/types.d.ts +24 -2
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +109 -37
- package/dist/components/OptionsContainer/types.d.ts +53 -9
- package/dist/components/Transitions/ScaleFade.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/Transitions/Slide.vue.js +1 -1
- package/dist/composables/useBaseOptions.d.ts +12 -1
- package/dist/composables/useBaseOptions.js +77 -37
- package/dist/composables/useBbConfig.d.ts +27 -6
- package/dist/composables/useBbConfig.js +8 -2
- package/dist/composables/useBbDropdownContext.d.ts +5 -0
- package/dist/composables/useBbFormContext.d.ts +131 -8
- package/dist/composables/useBbFormContext.js +49 -30
- package/dist/composables/useBbFormField.d.ts +40 -0
- package/dist/composables/useBbFormField.js +39 -0
- package/dist/composables/useBbTableContext.d.ts +45 -1
- package/dist/composables/useBbTableContext.js +93 -87
- package/dist/composables/useBbTabsContext.d.ts +15 -9
- package/dist/composables/useBbTabsContext.js +121 -90
- package/dist/composables/useClosingInert.d.ts +4 -4
- package/dist/composables/useCoarsePointer.js +7 -10
- package/dist/composables/useCoherence.js +1 -1
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +15 -0
- package/dist/composables/useConfirm.d.ts +39 -7
- package/dist/composables/useConfirm.js +50 -41
- package/dist/composables/useEscapeStackEntry.d.ts +13 -0
- package/dist/composables/useEscapeStackEntry.js +16 -0
- package/dist/composables/useFormBinding.d.ts +116 -0
- package/dist/composables/useFormBinding.js +34 -0
- package/dist/composables/useHydrated.d.ts +18 -0
- package/dist/composables/useHydrated.js +13 -7
- package/dist/composables/useId.d.ts +4 -3
- package/dist/composables/useId.js +1 -7
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useKeyboardInset.d.ts +28 -0
- package/dist/composables/useKeyboardInset.js +32 -0
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +7 -10
- package/dist/composables/usePassthrough.d.ts +228 -0
- package/dist/composables/usePassthrough.js +247 -0
- package/dist/composables/usePrefill.d.ts +22 -2
- package/dist/composables/usePrefill.js +35 -19
- package/dist/composables/useSafeAreaInternal.js +1 -1
- package/dist/composables/useSegmentedFields.d.ts +2 -2
- package/dist/composables/useSsrState.d.ts +20 -0
- package/dist/composables/useSsrState.js +13 -0
- package/dist/composables/useTableWidthContext.d.ts +24 -4
- package/dist/composables/useTableWidthContext.js +31 -28
- package/dist/composables/useToast.d.ts +18 -1
- package/dist/composables/useToast.js +31 -18
- package/dist/composables/useToggleInput.d.ts +44 -0
- package/dist/composables/useToggleInput.js +39 -0
- package/dist/composables/useViewportWidth.d.ts +5 -25
- package/dist/composables/useViewportWidth.js +14 -7
- package/dist/deprecation/ai-deprecations.json.d.ts +1977 -289
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.js +9 -4
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/bbTooltip.d.ts +6 -0
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +92 -37
- package/dist/i18n/index.d.ts +10 -16
- package/dist/i18n/locales/cs.json +9 -5
- package/dist/i18n/locales/da.json +9 -5
- package/dist/i18n/locales/de.json +9 -5
- package/dist/i18n/locales/el.json +9 -5
- package/dist/i18n/locales/en.json +9 -5
- package/dist/i18n/locales/es.json +9 -5
- package/dist/i18n/locales/fi.json +9 -5
- package/dist/i18n/locales/fr.json +9 -5
- package/dist/i18n/locales/hu.json +9 -5
- package/dist/i18n/locales/it.json +9 -5
- package/dist/i18n/locales/ja.json +9 -5
- package/dist/i18n/locales/ko.json +9 -5
- package/dist/i18n/locales/nb.json +9 -5
- package/dist/i18n/locales/nl.json +9 -5
- package/dist/i18n/locales/pl.json +9 -5
- package/dist/i18n/locales/pt.json +9 -5
- package/dist/i18n/locales/ro.json +9 -5
- package/dist/i18n/locales/ru.json +9 -5
- package/dist/i18n/locales/sv.json +9 -5
- package/dist/i18n/locales/tr.json +9 -5
- package/dist/i18n/locales/uk.json +9 -5
- package/dist/i18n/locales/zh-cn.json +9 -5
- package/dist/icon-scan.d.ts +276 -0
- package/dist/icon-scan.js +485 -0
- package/dist/icons-whitelist.d.ts +5 -4
- package/dist/index.d.ts +40 -21
- package/dist/index.js +78 -71
- package/dist/llms-full.txt +61164 -27972
- package/dist/llms-medium.txt +1482 -366
- package/dist/llms.txt +32 -15
- package/dist/locale-blueprint.json +9 -5
- package/dist/nuxt-auto-imports.d.ts +76 -0
- package/dist/nuxt-auto-imports.js +32 -0
- package/dist/nuxt-module.d.ts +30 -15
- package/dist/nuxt.js +35 -9
- package/dist/passthrough-deduper.js +5 -0
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +29 -19
- package/dist/project-dts.d.ts +84 -0
- package/dist/project-dts.js +170 -0
- package/dist/reset.css +1 -1
- package/dist/runtime/nuxt-plugin.js +34 -21
- package/dist/styles.css +3 -2
- package/dist/types/AlertVariant.d.ts +10 -1
- package/dist/types/BadgeVariant.d.ts +16 -5
- package/dist/types/ButtonVariant.d.ts +12 -1
- package/dist/types/ColumnName.d.ts +30 -3
- package/dist/types/CommonProps.d.ts +2 -2
- package/dist/types/Config.d.ts +94 -1
- package/dist/types/ConfirmVariant.d.ts +8 -1
- package/dist/types/DropdownItemVariant.d.ts +8 -1
- package/dist/types/FieldLayout.d.ts +32 -0
- package/dist/types/IndicatorVariant.d.ts +11 -1
- package/dist/types/InputVariant.d.ts +30 -0
- package/dist/types/ItemProps.d.ts +50 -0
- package/dist/types/Option.d.ts +6 -0
- package/dist/types/PtScope.d.ts +15 -0
- package/dist/types/RegistryKey.d.ts +10 -0
- package/dist/types/TabsVariant.d.ts +25 -0
- package/dist/types/ToastVariant.d.ts +12 -2
- package/dist/types/TooltipVariant.d.ts +8 -1
- package/dist/types/passthrough.d.ts +362 -0
- package/dist/types/passthrough.js +78 -0
- package/dist/types/ptComponentMap.d.ts +62 -0
- package/dist/utilities/functions/hasVnodeListener.d.ts +16 -0
- package/dist/utilities/functions/hasVnodeListener.js +12 -0
- package/dist/utilities/functions/isImeComposing.d.ts +7 -0
- package/dist/utilities/functions/isImeComposing.js +4 -0
- package/dist/utilities/functions/itemProps.d.ts +46 -0
- package/dist/utilities/functions/itemProps.js +47 -0
- package/dist/utilities/functions/slotKey.d.ts +13 -8
- package/dist/utilities/functions/slotKey.js +78 -2
- package/dist/utilities/functions/snapToStep.js +2 -1
- package/dist/utilities/functions/toggleInput.d.ts +98 -0
- package/dist/utilities/functions/toggleInput.js +56 -0
- package/dist/utilities/functions/warnRemovedAttrs.d.ts +27 -1
- package/dist/utilities/functions/warnRemovedAttrs.js +75 -14
- package/dist/utilities/misc/listboxMetrics.d.ts +9 -3
- package/dist/utilities/misc/listboxMetrics.js +5 -2
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
- package/dist/utilities/misc/ssrStateInjectionKey.js +4 -0
- package/dist/utils/cssLayers.d.ts +91 -0
- package/dist/utils/cssLayers.js +43 -0
- package/dist/utils/injectLibraryStyles.d.ts +3 -1
- package/dist/utils/injectLibraryStyles.js +24 -23
- package/dist/utils/overlayEscapeStack.d.ts +10 -0
- package/dist/utils/overlayEscapeStack.js +5 -3
- package/dist/utils/passthrough.d.ts +67 -0
- package/dist/utils/passthrough.js +100 -0
- package/dist/utils/passthroughDeduper.d.ts +2 -0
- package/dist/utils/ptScope.d.ts +8 -0
- package/dist/utils/ptScope.js +4 -0
- package/dist/utils/versionCheck.d.ts +19 -0
- package/dist/utils/versionCheck.js +18 -0
- package/dist/vite-plugin.d.ts +301 -53
- package/dist/vite.js +547 -375
- package/llms.txt +33 -16
- package/package.json +49 -27
- package/scripts/lib/check-fix.mjs +129 -0
- package/scripts/lib/component-attr-targets.ts +123 -0
- package/scripts/lib/component-tree.ts +648 -0
- package/scripts/lib/css-class-check.mjs +326 -0
- package/scripts/lib/css-class-surface.mjs +292 -0
- package/scripts/lib/css-color-resolve.mjs +172 -0
- package/scripts/lib/css-local-check.mjs +267 -0
- package/scripts/lib/design-token-manifest.mjs +499 -0
- package/scripts/lib/doc-sections.mjs +248 -0
- package/scripts/lib/ensure-manifest.mjs +28 -5
- package/scripts/lib/eslint-disable.mjs +141 -0
- package/scripts/lib/eslint-plugin.d.ts +64 -1
- package/scripts/lib/eslint-plugin.mjs +1285 -30
- package/scripts/lib/hand-imported-styles.mjs +326 -0
- package/scripts/lib/hand-roll-hints.mjs +50 -6
- package/scripts/lib/html-attributes.mjs +353 -0
- package/scripts/lib/local-components.mjs +177 -0
- package/scripts/lib/mcp-config.mjs +87 -58
- package/scripts/lib/migrate-fix.mjs +62 -3
- package/scripts/lib/project-variant-dts.mjs +122 -0
- package/scripts/lib/public-type-exports.mjs +273 -0
- package/scripts/lib/slot-key.mjs +147 -0
- package/scripts/lib/slot-renames.mjs +46 -0
- package/scripts/lib/squashed-slot-words.mjs +133 -0
- package/scripts/lib/validate-bb-markup.mjs +2213 -76
- package/scripts/lib/wrapper-props.mjs +188 -0
- package/dist/ai/BbBaseCheckbox.md +0 -49
- package/dist/ai/BbBaseCheckboxGroup.md +0 -64
- package/dist/ai/BbBaseColorInput.md +0 -65
- package/dist/ai/BbBaseColorPalette.md +0 -39
- package/dist/ai/BbBaseDatePicker.md +0 -43
- package/dist/ai/BbBaseDatePickerInput.md +0 -73
- package/dist/ai/BbBaseInputContainer.md +0 -48
- package/dist/ai/BbBaseNumberInput.md +0 -71
- package/dist/ai/BbBaseRadio.md +0 -46
- package/dist/ai/BbBaseRadioGroup.md +0 -64
- package/dist/ai/BbBaseRating.md +0 -52
- package/dist/ai/BbBaseSelect.md +0 -88
- package/dist/ai/BbBaseSlider.md +0 -56
- package/dist/ai/BbBaseSwitch.md +0 -49
- package/dist/ai/BbBaseSwitchGroup.md +0 -64
- package/dist/ai/BbBaseTag.md +0 -68
- package/dist/ai/BbBaseTextInput.md +0 -75
- package/dist/ai/BbBaseTextarea.md +0 -62
- package/dist/ai/BbBaseTimePickerInput.md +0 -62
- package/dist/ai/BbTabsPanes.md +0 -27
- package/dist/ai/CommonInputWrapper.md +0 -42
- package/dist/ai/source/BbBaseCheckbox.md +0 -461
- package/dist/ai/source/BbBaseCheckboxGroup.md +0 -554
- package/dist/ai/source/BbBaseColorInput.md +0 -431
- package/dist/ai/source/BbBaseColorPalette.md +0 -942
- package/dist/ai/source/BbBaseDatePicker.md +0 -1448
- package/dist/ai/source/BbBaseDatePickerInput.md +0 -1940
- package/dist/ai/source/BbBaseNumberInput.md +0 -617
- package/dist/ai/source/BbBaseRadio.md +0 -381
- package/dist/ai/source/BbBaseRadioGroup.md +0 -539
- package/dist/ai/source/BbBaseRating.md +0 -607
- package/dist/ai/source/BbBaseSelect.md +0 -945
- package/dist/ai/source/BbBaseSlider.md +0 -1144
- package/dist/ai/source/BbBaseSwitch.md +0 -246
- package/dist/ai/source/BbBaseSwitchGroup.md +0 -302
- package/dist/ai/source/BbBaseTag.md +0 -694
- package/dist/ai/source/BbBaseTextInput.md +0 -511
- package/dist/ai/source/BbBaseTextarea.md +0 -504
- package/dist/ai/source/BbBaseTimePickerInput.md +0 -1037
- package/dist/ai/source/BbTabsPanes.md +0 -377
- package/dist/ai/source/CommonInputWrapper.md +0 -584
- package/dist/alert-variants.d.ts +0 -19
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/badge-variants.d.ts +0 -19
- package/dist/button-variants.d.ts +0 -21
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.d.ts +0 -40
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.js +0 -6
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +0 -145
- package/dist/components/BbBaseCheckbox/types.d.ts +0 -224
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.js +0 -6
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +0 -257
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.d.ts +0 -43
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.js +0 -6
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue_vue_type_script_setup_true_lang.js +0 -184
- package/dist/components/BbBaseColorInput/types.d.ts +0 -219
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue.d.ts +0 -13
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue_vue_type_script_setup_true_lang.js +0 -395
- package/dist/components/BbBaseColorPalette/types.d.ts +0 -40
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.d.ts +0 -20
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.js +0 -6
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +0 -407
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +0 -47
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +0 -318
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +0 -115
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue_vue_type_script_setup_true_lang.js +0 -116
- package/dist/components/BbBaseDatePicker/types.d.ts +0 -108
- package/dist/components/BbBaseDatePicker/useDatePickerContext.js +0 -11
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +0 -31
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.js +0 -6
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -737
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.js +0 -6
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue_vue_type_script_setup_true_lang.js +0 -204
- package/dist/components/BbBaseDatePickerInput/types.d.ts +0 -325
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.js +0 -6
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.d.ts +0 -52
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.js +0 -6
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue_vue_type_script_setup_true_lang.js +0 -215
- package/dist/components/BbBaseNumberInput/types.d.ts +0 -211
- package/dist/components/BbBaseRadio/BbBaseRadio.vue.d.ts +0 -33
- package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +0 -113
- package/dist/components/BbBaseRadio/types.d.ts +0 -179
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -179
- package/dist/components/BbBaseRadioGroup/types.d.ts +0 -223
- package/dist/components/BbBaseRating/BbBaseRating.vue.d.ts +0 -38
- package/dist/components/BbBaseRating/BbBaseRating.vue.js +0 -6
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +0 -192
- package/dist/components/BbBaseRating/types.d.ts +0 -176
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.d.ts +0 -19
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.js +0 -6
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +0 -311
- package/dist/components/BbBaseSelect/types.d.ts +0 -297
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.d.ts +0 -35
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.js +0 -6
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +0 -340
- package/dist/components/BbBaseSlider/types.d.ts +0 -200
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.d.ts +0 -35
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +0 -146
- package/dist/components/BbBaseSwitch/types.d.ts +0 -10
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.js +0 -6
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseSwitchGroup/types.d.ts +0 -8
- package/dist/components/BbBaseTag/BbBaseTag.vue.d.ts +0 -50
- package/dist/components/BbBaseTag/BbBaseTag.vue.js +0 -6
- package/dist/components/BbBaseTag/BbBaseTag.vue_vue_type_script_setup_true_lang.js +0 -266
- package/dist/components/BbBaseTag/types.d.ts +0 -160
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.d.ts +0 -45
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.js +0 -6
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue_vue_type_script_setup_true_lang.js +0 -200
- package/dist/components/BbBaseTextInput/types.d.ts +0 -209
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.d.ts +0 -39
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.js +0 -6
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue_vue_type_script_setup_true_lang.js +0 -187
- package/dist/components/BbBaseTextarea/types.d.ts +0 -170
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +0 -27
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.js +0 -6
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -519
- package/dist/components/BbBaseTimePickerInput/types.d.ts +0 -151
- package/dist/components/BbTabs/BbTabsPanes.vue.d.ts +0 -16
- package/dist/components/BbTabs/BbTabsPanes.vue.js +0 -6
- package/dist/components/BbTabs/BbTabsPanes.vue_vue_type_script_setup_true_lang.js +0 -35
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue.js +0 -6
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue_vue_type_script_setup_true_lang.js +0 -107
- package/dist/confirm-variants.d.ts +0 -17
- package/dist/dropdown-item-variants.d.ts +0 -17
- package/dist/indicator-variants.d.ts +0 -20
- package/dist/locale-registry.d.ts +0 -37
- package/dist/toast-variants.d.ts +0 -20
- package/dist/tooltip-variants.d.ts +0 -17
- package/dist/types/InputDirection.d.ts +0 -15
- package/dist/validated/BbCheckbox.vue.d.ts +0 -29
- package/dist/validated/BbCheckbox.vue.js +0 -5
- package/dist/validated/BbCheckbox.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbCheckboxGroup.vue.d.ts +0 -34
- package/dist/validated/BbCheckboxGroup.vue.js +0 -5
- package/dist/validated/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -82
- package/dist/validated/BbColorInput.vue.d.ts +0 -37
- package/dist/validated/BbColorInput.vue.js +0 -5
- package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbDatePickerInput.vue.d.ts +0 -41
- package/dist/validated/BbDatePickerInput.vue.js +0 -5
- package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -90
- package/dist/validated/BbDropzone.vue.d.ts +0 -24
- package/dist/validated/BbDropzone.vue.js +0 -5
- package/dist/validated/BbDropzone.vue_vue_type_script_setup_true_lang.js +0 -45
- package/dist/validated/BbForm.vue.d.ts +0 -28
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +0 -42
- package/dist/validated/BbNumberInput.vue.d.ts +0 -36
- package/dist/validated/BbNumberInput.vue.js +0 -5
- package/dist/validated/BbNumberInput.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbRadioGroup.vue.d.ts +0 -34
- package/dist/validated/BbRadioGroup.vue.js +0 -5
- package/dist/validated/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -78
- package/dist/validated/BbRating.vue.d.ts +0 -30
- package/dist/validated/BbRating.vue.js +0 -5
- package/dist/validated/BbRating.vue_vue_type_script_setup_true_lang.js +0 -63
- package/dist/validated/BbSelect.vue.d.ts +0 -46
- package/dist/validated/BbSelect.vue.js +0 -5
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +0 -109
- package/dist/validated/BbSlider.vue.d.ts +0 -36
- package/dist/validated/BbSlider.vue.js +0 -5
- package/dist/validated/BbSlider.vue_vue_type_script_setup_true_lang.js +0 -69
- package/dist/validated/BbSwitch.vue.d.ts +0 -29
- package/dist/validated/BbSwitch.vue.js +0 -5
- package/dist/validated/BbSwitch.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbSwitchGroup.vue.d.ts +0 -34
- package/dist/validated/BbSwitchGroup.vue.js +0 -5
- package/dist/validated/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -82
- package/dist/validated/BbTag.vue.d.ts +0 -36
- package/dist/validated/BbTag.vue.js +0 -5
- package/dist/validated/BbTag.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbTextInput.vue.d.ts +0 -36
- package/dist/validated/BbTextInput.vue.js +0 -5
- package/dist/validated/BbTextInput.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbTextarea.vue.d.ts +0 -36
- package/dist/validated/BbTextarea.vue.js +0 -5
- package/dist/validated/BbTextarea.vue_vue_type_script_setup_true_lang.js +0 -70
- package/dist/validated/BbTimePickerInput.vue.d.ts +0 -37
- package/dist/validated/BbTimePickerInput.vue.js +0 -5
- package/dist/validated/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -81
- package/dist/validated/index.d.ts +0 -43
- package/dist/validated/useValidatedField.d.ts +0 -93
- package/dist/validated/useValidatedField.js +0 -51
- package/dist/validated.js +0 -21
- /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.d.ts → BbCalendar/CalendarMonthPanel.vue.d.ts} +0 -0
- /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.d.ts → BbCalendar/CalendarYearPanel.vue.d.ts} +0 -0
- /package/dist/{components/BbBaseDatePicker/typeahead.d.ts → composables/useTypeahead.d.ts} +0 -0
- /package/dist/{components/BbBaseDatePicker/typeahead.js → composables/useTypeahead.js} +0 -0
|
@@ -1,99 +1,239 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import i from "
|
|
6
|
-
import a from "
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { useLogger as e } from "../../composables/useLogger.js";
|
|
2
|
+
import { isNil as t } from "../../utilities/functions/isNil.js";
|
|
3
|
+
import { usePassthrough as n } from "../../composables/usePassthrough.js";
|
|
4
|
+
import { hash as r } from "../../utilities/functions/hash.js";
|
|
5
|
+
import { useBbTableContextHost as i } from "../../composables/useBbTableContext.js";
|
|
6
|
+
import { useId as a } from "../../composables/useId.js";
|
|
7
|
+
import { escapeStackDepth as o, isTopEscapeEntry as s, pushEscapeEntry as c, removeEscapeEntry as l } from "../../utils/overlayEscapeStack.js";
|
|
8
|
+
import { removedPropsFor as u } from "../../deprecation/removedProps.js";
|
|
9
|
+
import { warnRemovedAttrs as d } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
10
|
+
import f from "../BbBaseButton/BbBaseButton.vue.js";
|
|
11
|
+
import { useLocale as p } from "../../composables/useLocale.js";
|
|
12
|
+
import { useItemsGetter as m } from "../../composables/useItemsGetter.js";
|
|
13
|
+
import { useItemValue as ee } from "../../composables/useItemValue.js";
|
|
14
|
+
import { useHashedWatcher as te } from "../../composables/useHashedWatcher.js";
|
|
14
15
|
import { clamp as ne } from "../../utilities/functions/clamp.js";
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
16
|
+
import re from "../BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue.js";
|
|
17
|
+
import { preventReadonlyClick as ie, preventReadonlyKeydown as ae, revertReadonlyChange as oe, syncCheckedToData as se, syncIndeterminate as ce, toggleInputAttrs as le } from "../../utilities/functions/toggleInput.js";
|
|
18
|
+
import { useToggleFocus as ue } from "../../composables/useToggleInput.js";
|
|
19
|
+
import { useIndexById as de } from "../../composables/useIndexById.js";
|
|
20
|
+
import { useBaseOptions as fe } from "../../composables/useBaseOptions.js";
|
|
21
|
+
import { usePrefill as pe } from "../../composables/usePrefill.js";
|
|
22
|
+
import { parseCount as me, parsePositiveInteger as he } from "../../utilities/functions/parsePaginationNumber.js";
|
|
23
|
+
import { when as ge } from "../../utilities/functions/when.js";
|
|
24
|
+
import { useTableWidthContext as _e } from "../../composables/useTableWidthContext.js";
|
|
25
|
+
import ve from "./BbTableDataRow.js";
|
|
26
|
+
import ye from "./BbTableExpandRow.js";
|
|
27
|
+
import { BB_TABLE_PT as be } from "./types.js";
|
|
28
|
+
import { applyFixedTableColumns as xe, columnKeyToSlotName as Se, completeColumnOrder as Ce, estimateTrack as we, fitFloors as Te, lockColumnOrder as Ee, mergeCellClasses as De, mergeHeaderClasses as Oe, mergeRowClasses as ke, moveColumnKey as Ae, orderColumns as je, readResolvedTracks as Me, reorderRange as Ne, sameColumnOrder as Pe } from "./utils.js";
|
|
29
|
+
import { GRID_FOCUSABLE as Fe, GRID_MANAGED_ATTR as Ie, cellWidgets as Le, restoreTabOrder as Re, takeOutOfTabOrder as ze } from "./gridWidgets.js";
|
|
30
|
+
import { Fragment as Be, computed as h, createBlock as Ve, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as He, createVNode as Ue, defineComponent as We, getCurrentInstance as Ge, guardReactiveProps as Ke, mergeModels as qe, mergeProps as y, nextTick as b, normalizeClass as Je, normalizeProps as Ye, normalizeStyle as Xe, onBeforeUnmount as Ze, onBeforeUpdate as Qe, onDeactivated as $e, onMounted as et, openBlock as x, reactive as tt, ref as S, renderList as nt, renderSlot as rt, resolveDynamicComponent as it, shallowRef as at, toDisplayString as C, toRef as ot, unref as w, useAttrs as st, useModel as ct, useSlots as lt, watch as T, watchEffect as ut, withCtx as dt, withModifiers as ft } from "vue";
|
|
31
|
+
import { defaultRangeExtractor as pt, elementScroll as mt, observeElementOffset as ht, observeElementRect as gt, observeWindowOffset as _t, observeWindowRect as vt, useVirtualizer as yt, windowScroll as bt } from "@tanstack/vue-virtual";
|
|
26
32
|
//#region src/components/BbTable/BbTable.vue?vue&type=script&setup=true&lang.ts
|
|
27
|
-
var
|
|
33
|
+
var xt = {
|
|
28
34
|
key: 0,
|
|
29
|
-
class: "sr-only"
|
|
30
|
-
},
|
|
35
|
+
class: "bb-sr-only"
|
|
36
|
+
}, St = ["id"], Ct = ["id"], wt = {
|
|
37
|
+
"aria-live": "polite",
|
|
38
|
+
class: "bb-table-loading__text bb-sr-only",
|
|
39
|
+
role: "status"
|
|
40
|
+
}, Tt = {
|
|
41
|
+
"aria-live": "polite",
|
|
42
|
+
class: "bb-table__reorder-status bb-sr-only",
|
|
43
|
+
role: "status"
|
|
44
|
+
}, Et = ["inert"], Dt = ["aria-rowindex"], Ot = ["tabindex"], kt = { class: "bb-table-header__content" }, At = { class: "bb-table-check__label-text bb-sr-only" }, jt = {
|
|
31
45
|
key: 1,
|
|
32
|
-
class: "bb-table-radio__label-text sr-only"
|
|
33
|
-
},
|
|
46
|
+
class: "bb-table-radio__label-text bb-sr-only"
|
|
47
|
+
}, Mt = [
|
|
48
|
+
"aria-describedby",
|
|
49
|
+
"aria-sort",
|
|
50
|
+
"data-column-key",
|
|
51
|
+
"tabindex",
|
|
52
|
+
"onClick",
|
|
53
|
+
"onFocus",
|
|
54
|
+
"onKeydown"
|
|
55
|
+
], Nt = { class: "bb-table-header__content" }, Pt = {
|
|
34
56
|
key: 1,
|
|
35
57
|
class: "bb-table-header__content"
|
|
36
|
-
},
|
|
37
|
-
key: 0,
|
|
38
|
-
class: "bb-table-skeleton__cell bb-table-skeleton__cell--select"
|
|
39
|
-
}, Ve = {
|
|
58
|
+
}, Ft = ["onDblclick", "onPointerdown"], It = ["tabindex"], Lt = { class: "bb-table-header__content bb-sr-only" }, Rt = ["aria-rowindex"], zt = ["role"], Bt = ["role"], Vt = {
|
|
40
59
|
key: 0,
|
|
41
60
|
class: "bb-table-skeleton__cell-content"
|
|
42
|
-
},
|
|
61
|
+
}, Ht = {
|
|
43
62
|
key: 1,
|
|
44
63
|
class: "bb-table-skeleton__avatar"
|
|
45
|
-
},
|
|
64
|
+
}, Ut = {
|
|
46
65
|
key: 2,
|
|
47
66
|
class: "bb-table-skeleton__avatar-text"
|
|
48
|
-
},
|
|
67
|
+
}, Wt = { class: "bb-table-skeleton__cell-content" }, Gt = {
|
|
49
68
|
key: 3,
|
|
50
69
|
class: "bb-table-skeleton__image"
|
|
51
|
-
},
|
|
70
|
+
}, Kt = {
|
|
52
71
|
key: 4,
|
|
53
72
|
class: "bb-table-skeleton__badge"
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions"
|
|
57
|
-
}, Je = ["aria-rowindex"], Ye = ["colspan"], Xe = { class: "bb-table-no-data__text" }, Ze = [
|
|
58
|
-
"aria-current",
|
|
59
|
-
"aria-rowindex",
|
|
60
|
-
"inert",
|
|
61
|
-
"tabindex",
|
|
62
|
-
"onClick",
|
|
63
|
-
"onContextmenu",
|
|
64
|
-
"onDblclick",
|
|
65
|
-
"onFocus",
|
|
66
|
-
"onKeydown"
|
|
67
|
-
], Qe = { class: "bb-table-check__label-text sr-only" }, $e = { class: "bb-table-radio__label-text sr-only" }, et = ["id", "aria-rowindex"], tt = ["colspan"], nt = ["aria-rowindex"], rt = ["colspan"], it = { class: "bb-table-loading__text sr-only" }, at = 10, k = /*@__PURE__*/ y({
|
|
73
|
+
}, qt = ["role"], Jt = ["aria-rowindex"], Yt = ["aria-colspan", "role"], Xt = { class: "bb-table-empty__text" }, Zt = ["data-index"], Qt = ["role"], $t = 1e3, en = 48, tn = 10, nn = "bb-table-resizing", rn = 5, an = 10, on = 500, sn = 40, cn = 12, ln = 4, un = 12, dn = "a, button:not(.bb-table-sort), input, select, textarea, [contenteditable], [role=\"button\"], .bb-table-header__resizer", fn = 12, pn = 10, mn = 600, hn = 120, gn = 6, _n = 800, vn = 120, yn = 10, E = /*@__PURE__*/ We({
|
|
74
|
+
inheritAttrs: !1,
|
|
68
75
|
__name: "BbTable",
|
|
69
|
-
props: /*@__PURE__*/
|
|
76
|
+
props: /*@__PURE__*/ qe({
|
|
77
|
+
"pt:root": {},
|
|
78
|
+
"pt:caption": {},
|
|
79
|
+
"pt:table": {},
|
|
80
|
+
"pt:head": {},
|
|
81
|
+
"pt:headerRow": {},
|
|
82
|
+
"pt:cellColumnHeader": {},
|
|
83
|
+
"pt:sortIcon": {},
|
|
84
|
+
"pt:body": {},
|
|
85
|
+
"pt:cell": {},
|
|
86
|
+
"pt:selectIcon": {},
|
|
87
|
+
"pt:dragIcon": {},
|
|
88
|
+
"pt:foot": {},
|
|
89
|
+
"pt:root:loading": {},
|
|
90
|
+
"pt:root:empty": {},
|
|
91
|
+
"pt:root:sorted": {},
|
|
92
|
+
"pt:root:sortedDesc": {},
|
|
93
|
+
"pt:root:expanded": {},
|
|
94
|
+
"pt:root:disabled": {},
|
|
95
|
+
"pt:root:selected": {},
|
|
96
|
+
"pt:root:indeterminate": {},
|
|
97
|
+
"pt:root:highlighted": {},
|
|
98
|
+
"pt:caption:loading": {},
|
|
99
|
+
"pt:caption:empty": {},
|
|
100
|
+
"pt:caption:sorted": {},
|
|
101
|
+
"pt:caption:sortedDesc": {},
|
|
102
|
+
"pt:caption:expanded": {},
|
|
103
|
+
"pt:caption:disabled": {},
|
|
104
|
+
"pt:caption:selected": {},
|
|
105
|
+
"pt:caption:indeterminate": {},
|
|
106
|
+
"pt:caption:highlighted": {},
|
|
107
|
+
"pt:table:loading": {},
|
|
108
|
+
"pt:table:empty": {},
|
|
109
|
+
"pt:table:sorted": {},
|
|
110
|
+
"pt:table:sortedDesc": {},
|
|
111
|
+
"pt:table:expanded": {},
|
|
112
|
+
"pt:table:disabled": {},
|
|
113
|
+
"pt:table:selected": {},
|
|
114
|
+
"pt:table:indeterminate": {},
|
|
115
|
+
"pt:table:highlighted": {},
|
|
116
|
+
"pt:head:loading": {},
|
|
117
|
+
"pt:head:empty": {},
|
|
118
|
+
"pt:head:sorted": {},
|
|
119
|
+
"pt:head:sortedDesc": {},
|
|
120
|
+
"pt:head:expanded": {},
|
|
121
|
+
"pt:head:disabled": {},
|
|
122
|
+
"pt:head:selected": {},
|
|
123
|
+
"pt:head:indeterminate": {},
|
|
124
|
+
"pt:head:highlighted": {},
|
|
125
|
+
"pt:headerRow:loading": {},
|
|
126
|
+
"pt:headerRow:empty": {},
|
|
127
|
+
"pt:headerRow:sorted": {},
|
|
128
|
+
"pt:headerRow:sortedDesc": {},
|
|
129
|
+
"pt:headerRow:expanded": {},
|
|
130
|
+
"pt:headerRow:disabled": {},
|
|
131
|
+
"pt:headerRow:selected": {},
|
|
132
|
+
"pt:headerRow:indeterminate": {},
|
|
133
|
+
"pt:headerRow:highlighted": {},
|
|
134
|
+
"pt:cellColumnHeader:loading": {},
|
|
135
|
+
"pt:cellColumnHeader:empty": {},
|
|
136
|
+
"pt:cellColumnHeader:sorted": {},
|
|
137
|
+
"pt:cellColumnHeader:sortedDesc": {},
|
|
138
|
+
"pt:cellColumnHeader:expanded": {},
|
|
139
|
+
"pt:cellColumnHeader:disabled": {},
|
|
140
|
+
"pt:cellColumnHeader:selected": {},
|
|
141
|
+
"pt:cellColumnHeader:indeterminate": {},
|
|
142
|
+
"pt:cellColumnHeader:highlighted": {},
|
|
143
|
+
"pt:sortIcon:loading": {},
|
|
144
|
+
"pt:sortIcon:empty": {},
|
|
145
|
+
"pt:sortIcon:sorted": {},
|
|
146
|
+
"pt:sortIcon:sortedDesc": {},
|
|
147
|
+
"pt:sortIcon:expanded": {},
|
|
148
|
+
"pt:sortIcon:disabled": {},
|
|
149
|
+
"pt:sortIcon:selected": {},
|
|
150
|
+
"pt:sortIcon:indeterminate": {},
|
|
151
|
+
"pt:sortIcon:highlighted": {},
|
|
152
|
+
"pt:body:loading": {},
|
|
153
|
+
"pt:body:empty": {},
|
|
154
|
+
"pt:body:sorted": {},
|
|
155
|
+
"pt:body:sortedDesc": {},
|
|
156
|
+
"pt:body:expanded": {},
|
|
157
|
+
"pt:body:disabled": {},
|
|
158
|
+
"pt:body:selected": {},
|
|
159
|
+
"pt:body:indeterminate": {},
|
|
160
|
+
"pt:body:highlighted": {},
|
|
161
|
+
"pt:row:loading": {},
|
|
162
|
+
"pt:row:empty": {},
|
|
163
|
+
"pt:row:sorted": {},
|
|
164
|
+
"pt:row:sortedDesc": {},
|
|
165
|
+
"pt:row:expanded": {},
|
|
166
|
+
"pt:row:disabled": {},
|
|
167
|
+
"pt:row:selected": {},
|
|
168
|
+
"pt:row:indeterminate": {},
|
|
169
|
+
"pt:row:highlighted": {},
|
|
170
|
+
"pt:cell:loading": {},
|
|
171
|
+
"pt:cell:empty": {},
|
|
172
|
+
"pt:cell:sorted": {},
|
|
173
|
+
"pt:cell:sortedDesc": {},
|
|
174
|
+
"pt:cell:expanded": {},
|
|
175
|
+
"pt:cell:disabled": {},
|
|
176
|
+
"pt:cell:selected": {},
|
|
177
|
+
"pt:cell:indeterminate": {},
|
|
178
|
+
"pt:cell:highlighted": {},
|
|
179
|
+
"pt:selectIcon:loading": {},
|
|
180
|
+
"pt:selectIcon:empty": {},
|
|
181
|
+
"pt:selectIcon:sorted": {},
|
|
182
|
+
"pt:selectIcon:sortedDesc": {},
|
|
183
|
+
"pt:selectIcon:expanded": {},
|
|
184
|
+
"pt:selectIcon:disabled": {},
|
|
185
|
+
"pt:selectIcon:selected": {},
|
|
186
|
+
"pt:selectIcon:indeterminate": {},
|
|
187
|
+
"pt:selectIcon:highlighted": {},
|
|
188
|
+
"pt:dragIcon:loading": {},
|
|
189
|
+
"pt:dragIcon:empty": {},
|
|
190
|
+
"pt:dragIcon:sorted": {},
|
|
191
|
+
"pt:dragIcon:sortedDesc": {},
|
|
192
|
+
"pt:dragIcon:expanded": {},
|
|
193
|
+
"pt:dragIcon:disabled": {},
|
|
194
|
+
"pt:dragIcon:selected": {},
|
|
195
|
+
"pt:dragIcon:indeterminate": {},
|
|
196
|
+
"pt:dragIcon:highlighted": {},
|
|
197
|
+
"pt:foot:loading": {},
|
|
198
|
+
"pt:foot:empty": {},
|
|
199
|
+
"pt:foot:sorted": {},
|
|
200
|
+
"pt:foot:sortedDesc": {},
|
|
201
|
+
"pt:foot:expanded": {},
|
|
202
|
+
"pt:foot:disabled": {},
|
|
203
|
+
"pt:foot:selected": {},
|
|
204
|
+
"pt:foot:indeterminate": {},
|
|
205
|
+
"pt:foot:highlighted": {},
|
|
206
|
+
"pt:row": {},
|
|
207
|
+
pt: {},
|
|
70
208
|
accessibleLabel: {},
|
|
71
|
-
actions: { type: Boolean },
|
|
72
209
|
actionsText: {},
|
|
73
210
|
align: { default: "left" },
|
|
74
|
-
id: {},
|
|
75
|
-
inheritColumnWidths: { type: [Boolean, String] },
|
|
76
|
-
disableSelectAll: { type: Boolean },
|
|
77
211
|
caption: {},
|
|
78
212
|
compact: { type: Boolean },
|
|
79
213
|
dependencies: { default: () => [] },
|
|
80
214
|
depsDebounceTime: { default: 0 },
|
|
81
215
|
disabled: { type: Boolean },
|
|
82
|
-
|
|
216
|
+
disableSelectAll: { type: Boolean },
|
|
83
217
|
displayCaption: { type: Boolean },
|
|
218
|
+
enforceCoherence: { type: Boolean },
|
|
219
|
+
expandedItems: {},
|
|
84
220
|
fixed: { type: Boolean },
|
|
85
|
-
|
|
221
|
+
fixedActions: { type: Boolean },
|
|
86
222
|
fixedHeaders: { type: Boolean },
|
|
223
|
+
fixedSelect: { type: Boolean },
|
|
224
|
+
headerRowClass: {},
|
|
87
225
|
highlighted: {},
|
|
226
|
+
id: {},
|
|
227
|
+
inheritColumnWidths: { type: [Boolean, String] },
|
|
228
|
+
interactiveWhileLoading: { type: Boolean },
|
|
88
229
|
items: {
|
|
89
230
|
type: [Array, Function],
|
|
90
231
|
default: () => []
|
|
91
232
|
},
|
|
92
|
-
keyboardNavigation: { type: Boolean },
|
|
93
233
|
itemValue: {},
|
|
234
|
+
keyboardNavigation: { type: Boolean },
|
|
94
235
|
legend: {},
|
|
95
236
|
loading: { type: Boolean },
|
|
96
|
-
interactiveWhileLoading: { type: Boolean },
|
|
97
237
|
loadingText: {},
|
|
98
238
|
max: { default: Infinity },
|
|
99
239
|
modelValue: { default: () => [] },
|
|
@@ -102,23 +242,25 @@ var Oe = {
|
|
|
102
242
|
default: !0
|
|
103
243
|
},
|
|
104
244
|
name: {},
|
|
105
|
-
|
|
245
|
+
emptyText: {},
|
|
246
|
+
order: {},
|
|
106
247
|
page: {},
|
|
107
248
|
perPage: {},
|
|
108
249
|
readonly: { type: Boolean },
|
|
250
|
+
reorderable: { type: Boolean },
|
|
251
|
+
resizable: { type: Boolean },
|
|
109
252
|
rowClass: {},
|
|
110
|
-
headerRowClass: {},
|
|
111
|
-
selectAll: { type: Boolean },
|
|
112
253
|
selectable: { type: [Boolean, Function] },
|
|
113
|
-
|
|
114
|
-
expandedItems: {},
|
|
254
|
+
selectAll: { type: Boolean },
|
|
115
255
|
selectAllLabel: {},
|
|
116
256
|
selectText: {},
|
|
257
|
+
sort: {},
|
|
117
258
|
tdClass: {},
|
|
118
259
|
thClass: {},
|
|
119
260
|
totalItems: {},
|
|
120
261
|
totalPages: {},
|
|
121
262
|
unselectedItems: { default: () => [] },
|
|
263
|
+
virtual: { type: Boolean },
|
|
122
264
|
columns: { default: () => [] }
|
|
123
265
|
}, {
|
|
124
266
|
selectAll: {
|
|
@@ -132,6 +274,11 @@ var Oe = {
|
|
|
132
274
|
default: () => []
|
|
133
275
|
},
|
|
134
276
|
sortModifiers: {},
|
|
277
|
+
order: {
|
|
278
|
+
required: !1,
|
|
279
|
+
default: () => []
|
|
280
|
+
},
|
|
281
|
+
orderModifiers: {},
|
|
135
282
|
highlighted: {
|
|
136
283
|
required: !1,
|
|
137
284
|
default: void 0
|
|
@@ -143,7 +290,7 @@ var Oe = {
|
|
|
143
290
|
},
|
|
144
291
|
expandedItemsModifiers: {}
|
|
145
292
|
}),
|
|
146
|
-
emits: /*@__PURE__*/
|
|
293
|
+
emits: /*@__PURE__*/ qe([
|
|
147
294
|
"click:row",
|
|
148
295
|
"contextmenu:row",
|
|
149
296
|
"dblclick:row",
|
|
@@ -151,6 +298,9 @@ var Oe = {
|
|
|
151
298
|
"update:modelValue",
|
|
152
299
|
"update:selectAll",
|
|
153
300
|
"update:sort",
|
|
301
|
+
"update:order",
|
|
302
|
+
"resize:column",
|
|
303
|
+
"hide:column",
|
|
154
304
|
"update:expandedItems",
|
|
155
305
|
"update:unselectedItems",
|
|
156
306
|
"item:selected",
|
|
@@ -158,752 +308,1930 @@ var Oe = {
|
|
|
158
308
|
], [
|
|
159
309
|
"update:selectAll",
|
|
160
310
|
"update:sort",
|
|
311
|
+
"update:order",
|
|
161
312
|
"update:highlighted",
|
|
162
313
|
"update:expandedItems"
|
|
163
314
|
]),
|
|
164
|
-
setup(
|
|
165
|
-
let
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
315
|
+
setup(We, { emit: qe }) {
|
|
316
|
+
let E = ct(We, "selectAll"), D = ct(We, "sort"), O = ct(We, "order"), k = ct(We, "highlighted"), bn = ct(We, "expandedItems"), A = We, j = qe, M = lt(), N = n({
|
|
317
|
+
component: "BbTable",
|
|
318
|
+
attrs: st(),
|
|
319
|
+
props: A,
|
|
320
|
+
parts: be.parts,
|
|
321
|
+
states: be.states,
|
|
322
|
+
active: {
|
|
323
|
+
loading: () => xa.value,
|
|
324
|
+
empty: () => !Z.value.length
|
|
325
|
+
}
|
|
326
|
+
}), xn = (e) => ({
|
|
327
|
+
sorted: !!e,
|
|
328
|
+
sortedDesc: e === "desc"
|
|
329
|
+
});
|
|
330
|
+
process.env.NODE_ENV !== "production" && d("BbTable", u("BbTable"), { slotKeys: () => (A.columns ?? []).map((e) => e.key) });
|
|
331
|
+
let P = S(!!M.actions), Sn = S(!!M.expand), Cn = S(!!M.tbody), wn = S(!!M.thead);
|
|
332
|
+
Qe(() => {
|
|
333
|
+
let e = !!M.actions;
|
|
334
|
+
e !== P.value && (P.value = e), !!M.expand !== Sn.value && (Sn.value = !!M.expand), !!M.tbody !== Cn.value && (Cn.value = !!M.tbody), !!M.thead !== wn.value && (wn.value = !!M.thead);
|
|
335
|
+
});
|
|
336
|
+
let F = h(() => !!A.keyboardNavigation && !Cn.value), Tn = h(() => F.value && Sn.value), En = h(() => Tn.value ? "treegrid" : F.value ? "grid" : "table"), Dn = h(() => F.value ? "gridcell" : "cell"), On = h(() => new Set(A.columns.filter((e) => e.rowHeader).map((e) => String(e.key)))), kn = h(() => F.value && !wn.value), { getItemValue: An } = ee(), jn = a().id.value, Mn = (e) => `expanded_${jn}_${e}`;
|
|
337
|
+
A.multiple && !Array.isArray(A.modelValue) && e().throw("BbTable is set for multiple selection but modelValue is not an array.");
|
|
338
|
+
let Nn = ["actions", "select"], Pn = ["prepend", "append"], Fn = (e) => Pn.includes(e);
|
|
170
339
|
if (process.env.NODE_ENV !== "production") {
|
|
171
|
-
let
|
|
172
|
-
for (let
|
|
340
|
+
let t = A.columns.filter((e) => Nn.includes(e.key));
|
|
341
|
+
for (let n of t) e().warn(`BbTable: \`{ key: '${String(n.key)}' }\` is a reserved column and must not appear in \`columns\`. ` + (n.key === "actions" ? "Fill the `#actions` slot instead — the slot creates the column." : "Selection is controlled by the `selectable` prop."));
|
|
342
|
+
for (let t of A.columns) {
|
|
343
|
+
let n = Se(t.key);
|
|
344
|
+
Fn(n) && e().warn(`BbTable: column key '${String(t.key)}' normalizes to the slot name '${n}', which collides with the table-wide \`#header:${n}\` slot. That name keeps its table-wide meaning and per-column header slots are unavailable for this column.`);
|
|
345
|
+
}
|
|
173
346
|
}
|
|
174
|
-
let { t:
|
|
175
|
-
id: () =>
|
|
176
|
-
container: () =>
|
|
177
|
-
inheritFrom: () => typeof
|
|
178
|
-
}),
|
|
179
|
-
let
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
347
|
+
let { t: I } = p(), L = S(), R = S(), { id: In, parentId: Ln, parentNode: Rn, node: zn, cssVars: Bn, parentVar: Vn, setTracks: Hn } = _e({
|
|
348
|
+
id: () => A.id,
|
|
349
|
+
container: () => R.value,
|
|
350
|
+
inheritFrom: () => typeof A.inheritColumnWidths == "string" ? A.inheritColumnWidths : void 0
|
|
351
|
+
}), Un = h(() => `${In.value}__caption`), Wn = h(() => `${In.value}__header_instructions`), Gn = h(() => !!(A.reorderable || A.resizable)), Kn = S(/* @__PURE__ */ new Set()), qn = h(() => {
|
|
352
|
+
let e = new Set(Kn.value);
|
|
353
|
+
for (let t of A.columns) t.hidden && e.add(String(t.key));
|
|
354
|
+
return e;
|
|
355
|
+
}), Jn = h(() => {
|
|
356
|
+
let e = qn.value;
|
|
357
|
+
return e.size ? A.columns.filter((t) => !e.has(String(t.key))) : A.columns;
|
|
358
|
+
}), Yn = (e) => {
|
|
359
|
+
if (qn.value.has(e)) return;
|
|
360
|
+
let t = sr(e), n = V.value.indexOf(e), r = !!t && t.contains(document.activeElement) && (Gn.value || kn.value);
|
|
361
|
+
Kn.value = /* @__PURE__ */ new Set([...Kn.value, e]), j("hide:column", e), r && b(() => cr(n));
|
|
362
|
+
};
|
|
363
|
+
T(() => A.columns.map((e) => [String(e.key), !!e.hidden]), (e, t) => {
|
|
364
|
+
if (!t || !Kn.value.size) return;
|
|
365
|
+
let n = new Map(t), r = Kn.value, i = e.filter(([e, t]) => n.has(e) && n.get(e) !== t && r.has(e) && !t);
|
|
366
|
+
if (!i.length) return;
|
|
367
|
+
let a = new Set(r);
|
|
368
|
+
for (let [e] of i) a.delete(e);
|
|
369
|
+
Kn.value = a;
|
|
370
|
+
});
|
|
371
|
+
let Xn = h(() => A.columns.map((e) => String(e.key))), Zn = h(() => new Set(A.columns.filter((e) => e.reorderable === !1).map((e) => String(e.key)))), Qn = (e) => Zn.value.size ? Ee(Ce(e, Xn.value), Xn.value, Zn.value) : Ce(e, Xn.value), z = S(null), B = h(() => {
|
|
372
|
+
let e = Jn.value, t = z.value ?? O.value;
|
|
373
|
+
if (!t.length) return e;
|
|
374
|
+
let n = je(e, Zn.value.size ? Qn(t) : t);
|
|
375
|
+
return n.every((t, n) => t === e[n]) ? e : n;
|
|
376
|
+
}), V = h(() => B.value.map((e) => String(e.key))), $n = (e, t) => {
|
|
377
|
+
let n = Qn(O.value), r = er(e, t);
|
|
378
|
+
if (r === null) return null;
|
|
379
|
+
let i = Ae(n, Xn.value, e, r, qn.value);
|
|
380
|
+
return Pe(i, n) ? null : i;
|
|
381
|
+
}, er = (e, t) => {
|
|
382
|
+
let n = V.value, r = Ne(n, n.indexOf(e), Zn.value);
|
|
383
|
+
return r ? Math.max(r.min, Math.min(r.max, t)) : null;
|
|
384
|
+
}, tr = S("");
|
|
385
|
+
T(() => A.reorderable, () => {
|
|
386
|
+
tr.value = "";
|
|
387
|
+
});
|
|
388
|
+
let nr = (e, t) => {
|
|
389
|
+
let n = B.value, r = n.findIndex((t) => String(t.key) === e);
|
|
390
|
+
r < 0 || r === t || (tr.value = I("table.columnMoved", n[r].label, r + 1, n.length).value);
|
|
391
|
+
}, rr = S(null), ir = h(() => {
|
|
392
|
+
let e = V.value, t = rr.value;
|
|
393
|
+
return t !== null && e.includes(t) ? t : e[0] ?? null;
|
|
394
|
+
}), ar = (e, t) => {
|
|
395
|
+
if (!t.sortable) return;
|
|
396
|
+
let n = e.target;
|
|
397
|
+
if (!(n instanceof Element)) return;
|
|
398
|
+
let r = e.currentTarget;
|
|
399
|
+
if (n.closest(".bb-table-sort")) return;
|
|
400
|
+
let i = n.closest(dn);
|
|
401
|
+
i && r.contains(i) || window.getSelection()?.toString() || fi(t.key);
|
|
402
|
+
}, or = (e) => {
|
|
403
|
+
Gn.value && (rr.value = e);
|
|
404
|
+
}, sr = (e) => L.value?.querySelector(`:scope > .bb-table__head > .bb-table__header-row > [data-column-key="${CSS.escape(e)}"]`) ?? null, cr = (e) => {
|
|
405
|
+
let t = V.value, n = t[Math.max(0, Math.min(t.length - 1, e))];
|
|
406
|
+
n && (rr.value = n, sr(n)?.focus());
|
|
407
|
+
}, lr = async (e, t) => {
|
|
408
|
+
let n = kn.value;
|
|
409
|
+
if (!Gn.value && !n) return;
|
|
410
|
+
let r = e.currentTarget, i = e.target;
|
|
411
|
+
if (!(i instanceof Element) || i !== r && !i.closest(".bb-table-sort")) return;
|
|
412
|
+
let a = getComputedStyle(r).direction === "rtl";
|
|
413
|
+
if (e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
414
|
+
if (!fr.value || e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
415
|
+
e.preventDefault();
|
|
416
|
+
let n = e.key === "ArrowRight" !== a, i = H.value[t] ?? r.getBoundingClientRect().width;
|
|
417
|
+
xr({ [t]: i + (n ? 1 : -1) * tn });
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
if (e.ctrlKey || e.metaKey) return;
|
|
421
|
+
let o = V.value, s = o.indexOf(t);
|
|
422
|
+
if (s < 0) return;
|
|
423
|
+
let c;
|
|
424
|
+
switch (e.key) {
|
|
425
|
+
case "ArrowLeft":
|
|
426
|
+
c = a ? s + 1 : s - 1;
|
|
427
|
+
break;
|
|
428
|
+
case "ArrowRight":
|
|
429
|
+
c = a ? s - 1 : s + 1;
|
|
430
|
+
break;
|
|
431
|
+
case "Home":
|
|
432
|
+
c = 0;
|
|
433
|
+
break;
|
|
434
|
+
case "End":
|
|
435
|
+
c = o.length - 1;
|
|
436
|
+
break;
|
|
437
|
+
case "Enter":
|
|
438
|
+
case " ":
|
|
439
|
+
if (i !== r || !B.value[s]?.sortable) return;
|
|
440
|
+
e.preventDefault(), fi(t);
|
|
441
|
+
return;
|
|
442
|
+
default: return;
|
|
443
|
+
}
|
|
444
|
+
if (n && (!e.shiftKey || !A.reorderable)) return;
|
|
445
|
+
if (e.preventDefault(), !e.shiftKey) {
|
|
446
|
+
cr(c);
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
if (!A.reorderable) return;
|
|
450
|
+
let l = $n(t, c);
|
|
451
|
+
l && (tr.value = "", O.value = l, rr.value = t, await b(), ur(t, n), dr = V.value.indexOf(t) === l.indexOf(t) ? null : {
|
|
452
|
+
key: t,
|
|
453
|
+
index: l.indexOf(t),
|
|
454
|
+
inGrid: n,
|
|
455
|
+
until: Date.now() + $t
|
|
456
|
+
}, nr(t, s));
|
|
457
|
+
}, ur = (e, t) => {
|
|
458
|
+
let n = sr(e);
|
|
459
|
+
n?.focus(), n && t && n.parentElement && (oo.value = {
|
|
460
|
+
key: null,
|
|
461
|
+
row: -1,
|
|
462
|
+
col: Array.prototype.indexOf.call(n.parentElement.children, n)
|
|
463
|
+
});
|
|
464
|
+
}, dr = null;
|
|
465
|
+
T(V, (e) => {
|
|
466
|
+
let t = dr;
|
|
467
|
+
if (!t) return;
|
|
468
|
+
if (Date.now() > t.until) {
|
|
469
|
+
dr = null;
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
if (e.indexOf(t.key) !== t.index) return;
|
|
473
|
+
dr = null;
|
|
474
|
+
let n = document.activeElement, r = L.value;
|
|
475
|
+
(!n || n === document.body || r?.contains(n)) && n !== sr(t.key) && ur(t.key, t.inGrid);
|
|
476
|
+
}, { flush: "post" }), process.env.NODE_ENV !== "production" && (T(O, (t) => {
|
|
477
|
+
new Set(t).size !== t.length && e().warn("BbTable: `order` lists a key more than once — the first occurrence wins.");
|
|
478
|
+
}, { immediate: !0 }), T(() => A.columns.some((e) => e.snap != null) && (!!A.reorderable || B.value !== A.columns), (t) => {
|
|
479
|
+
t && e().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.");
|
|
480
|
+
}, { immediate: !0 }));
|
|
481
|
+
let fr = h(() => !!A.resizable && !q.value), H = S({}), pr = S(null), mr = S(null), hr = (e) => {
|
|
482
|
+
let t = String(e.key);
|
|
483
|
+
return pr.value?.[t] ?? H.value[t] ?? e.width ?? (J.value ? Y.value[t] : void 0);
|
|
484
|
+
}, gr = (e) => {
|
|
485
|
+
let t = String(e.key);
|
|
486
|
+
return pr.value?.[t] !== void 0 || t in H.value;
|
|
487
|
+
}, _r = h(() => Object.keys(pr.value ?? {}).join(" ")), vr = h(() => /* @__PURE__ */ new Set([...Object.keys(H.value), ..._r.value.split(" ").filter(Boolean)])), yr = h(() => {
|
|
488
|
+
let e = /* @__PURE__ */ new Map(), t = vr.value, n = J.value, r = Y.value;
|
|
489
|
+
for (let i of B.value) {
|
|
490
|
+
let a = String(i.key), o = n && i.width == null, s = [];
|
|
491
|
+
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(" "));
|
|
492
|
+
}
|
|
493
|
+
return e;
|
|
494
|
+
}), br = h(() => pr.value !== null || Object.keys(H.value).length > 0), xr = (e) => {
|
|
495
|
+
let t = { ...H.value }, n = [];
|
|
496
|
+
for (let [r, i] of Object.entries(e)) {
|
|
497
|
+
let e = Math.max(en, Math.round(i));
|
|
498
|
+
t[r] !== e && (t[r] = e, n.push([r, e]));
|
|
499
|
+
}
|
|
500
|
+
if (n.length) {
|
|
501
|
+
H.value = t;
|
|
502
|
+
for (let [e, t] of n) j("resize:column", e, t);
|
|
503
|
+
}
|
|
504
|
+
}, Sr = (e) => {
|
|
505
|
+
if (!(e in H.value)) return;
|
|
506
|
+
let { [e]: t, ...n } = H.value;
|
|
507
|
+
H.value = n, j("resize:column", e, null);
|
|
508
|
+
};
|
|
509
|
+
T(() => A.columns.map((e) => [String(e.key), e.width]), (e, t) => {
|
|
510
|
+
if (!t || !Object.keys(H.value).length) return;
|
|
511
|
+
let n = new Map(t), r = H.value, i = e.filter(([e, t]) => n.has(e) && n.get(e) !== t && e in r && t !== r[e]);
|
|
512
|
+
if (!i.length) return;
|
|
513
|
+
let a = { ...r };
|
|
514
|
+
for (let [e] of i) delete a[e];
|
|
515
|
+
H.value = a;
|
|
516
|
+
});
|
|
517
|
+
let U = null, Cr = () => {
|
|
518
|
+
document.removeEventListener("pointermove", Tr), document.removeEventListener("pointerup", Er), document.removeEventListener("pointercancel", Dr), document.removeEventListener("keydown", Or, !0), window.removeEventListener("blur", Dr);
|
|
519
|
+
}, wr = () => {
|
|
520
|
+
if (Cr(), U) try {
|
|
521
|
+
U.handle.releasePointerCapture(U.pointerId);
|
|
522
|
+
} catch {}
|
|
523
|
+
document.documentElement.classList.remove(nn), U = null, pr.value = null, mr.value = null, L.value && (L.value.style.gridTemplateColumns = Zi.value);
|
|
524
|
+
}, Tr = (e) => {
|
|
525
|
+
if (!U || e.pointerId !== U.pointerId) return;
|
|
526
|
+
let t = (e.clientX - U.x0) * (U.rtl ? -1 : 1);
|
|
527
|
+
t = Math.max(en - U.startWidth, t);
|
|
528
|
+
let { neighbour: n } = U;
|
|
529
|
+
if (e.shiftKey && n) {
|
|
530
|
+
t = Math.min(n.startWidth - en, t), pr.value = {
|
|
531
|
+
[U.key]: Math.round(U.startWidth + t),
|
|
532
|
+
[n.key]: Math.round(n.startWidth - t)
|
|
533
|
+
};
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
pr.value = { [U.key]: Math.round(U.startWidth + t) };
|
|
537
|
+
}, Er = (e) => {
|
|
538
|
+
if (!U || e.pointerId !== U.pointerId) return;
|
|
539
|
+
let { key: t, startWidth: n, neighbour: r } = U, i = pr.value;
|
|
540
|
+
if (wr(), !i) return;
|
|
541
|
+
let a = {};
|
|
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]), xr(a);
|
|
543
|
+
}, Dr = (e) => {
|
|
544
|
+
U && (e instanceof PointerEvent && e.pointerId !== U.pointerId || wr());
|
|
545
|
+
}, Or = (e) => {
|
|
546
|
+
!U || e.key !== "Escape" || (e.preventDefault(), e.stopImmediatePropagation(), wr());
|
|
547
|
+
}, kr = (e, t) => {
|
|
548
|
+
if (!fr.value || Sa.value || U || !e.isPrimary || e.button !== 0) return;
|
|
549
|
+
let n = sr(t);
|
|
550
|
+
if (!n) return;
|
|
551
|
+
e.preventDefault();
|
|
552
|
+
let r = e.currentTarget;
|
|
553
|
+
try {
|
|
554
|
+
r.setPointerCapture(e.pointerId);
|
|
555
|
+
} catch {}
|
|
556
|
+
document.documentElement.classList.add(nn);
|
|
557
|
+
let i = V.value, a = i[i.indexOf(t) + 1], o = a ? sr(a) : null;
|
|
558
|
+
U = {
|
|
559
|
+
pointerId: e.pointerId,
|
|
560
|
+
handle: r,
|
|
561
|
+
key: t,
|
|
562
|
+
x0: e.clientX,
|
|
563
|
+
startWidth: n.getBoundingClientRect().width,
|
|
564
|
+
neighbour: a && o ? {
|
|
565
|
+
key: a,
|
|
566
|
+
startWidth: o.getBoundingClientRect().width
|
|
567
|
+
} : null,
|
|
568
|
+
rtl: getComputedStyle(n).direction === "rtl"
|
|
569
|
+
}, mr.value = t, document.addEventListener("pointermove", Tr), document.addEventListener("pointerup", Er), document.addEventListener("pointercancel", Dr), document.addEventListener("keydown", Or, !0), window.addEventListener("blur", Dr);
|
|
570
|
+
};
|
|
571
|
+
Ze(wr);
|
|
572
|
+
let W = S("idle"), Ar = S(null), jr = S(""), Mr = S(), Nr = Symbol("bb-table-column-drag"), G = null, Pr = (e) => Math.max(0, Math.min(1, e)), Fr = () => {
|
|
573
|
+
let e = bi.value ? R.value?.parentElement ?? null : R.value ?? null;
|
|
574
|
+
for (; e;) {
|
|
575
|
+
let t = getComputedStyle(e).overflowX;
|
|
576
|
+
if (t === "auto" || t === "scroll") return e;
|
|
577
|
+
e = e.parentElement;
|
|
578
|
+
}
|
|
579
|
+
return null;
|
|
580
|
+
}, Ir = () => {
|
|
581
|
+
let e = G?.scrollport?.getBoundingClientRect(), t = Math.max(e?.left ?? 0, 0), n = Math.min(e?.right ?? window.innerWidth, window.innerWidth);
|
|
582
|
+
return {
|
|
583
|
+
left: t,
|
|
584
|
+
right: Math.max(t + 1, n)
|
|
585
|
+
};
|
|
586
|
+
}, Lr = (e) => Array.from(e.children).filter((e) => e instanceof HTMLElement && e.classList.contains("bb-table__cell-column-header") && !!e.dataset.columnKey), Rr = () => {
|
|
587
|
+
let e = Mr.value;
|
|
588
|
+
e?.isConnected && !e.matches(":popover-open") && e.showPopover();
|
|
589
|
+
}, zr = () => {
|
|
590
|
+
let e = Mr.value;
|
|
591
|
+
e && e.matches(":popover-open") && e.hidePopover();
|
|
592
|
+
}, Br = (e, t) => {
|
|
593
|
+
let n = Mr.value;
|
|
594
|
+
n && (n.style.translate = `${e + un}px ${t + un}px`);
|
|
595
|
+
}, Vr = (e) => {
|
|
596
|
+
if (!G || W.value !== "dragging") return;
|
|
597
|
+
let t = Ir(), n = Math.max(t.left, Math.min(e, t.right - 1)), r = Lr(G.row);
|
|
598
|
+
if (r.length < 2) return;
|
|
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 !== G.key), s = V.value, c = s.indexOf(G.key);
|
|
600
|
+
if (c < 0) return;
|
|
601
|
+
let l = Infinity, u = -Infinity;
|
|
602
|
+
for (let e of a.values()) l = Math.min(l, e.left), u = Math.max(u, e.right);
|
|
603
|
+
let d, f;
|
|
604
|
+
if (n < l) d = "\0start", f = G.rtl ? s.length - 1 : 0;
|
|
605
|
+
else if (n >= u) d = "\0end", f = G.rtl ? 0 : s.length - 1;
|
|
606
|
+
else {
|
|
607
|
+
let e = o.find((e) => {
|
|
608
|
+
let t = a.get(e);
|
|
609
|
+
return n >= t.left && n < t.right;
|
|
610
|
+
});
|
|
611
|
+
if (!e) return;
|
|
612
|
+
d = e.dataset.columnKey, f = s.indexOf(d);
|
|
613
|
+
}
|
|
614
|
+
if (f < 0 || (f = er(G.key, f) ?? c, f === c)) return;
|
|
615
|
+
let p = f > c;
|
|
616
|
+
if (G.target?.key === d && G.target.after === p) return;
|
|
617
|
+
let m = Ae(G.base, Xn.value, G.key, f, qn.value);
|
|
618
|
+
if (Pe(m, z.value ?? G.base)) {
|
|
619
|
+
G.target = {
|
|
620
|
+
key: d,
|
|
621
|
+
after: p
|
|
622
|
+
};
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
((G.rtl ? !p : p) ? n <= G.lastMoveX + ln : n >= G.lastMoveX - ln) || (G.target = {
|
|
626
|
+
key: d,
|
|
627
|
+
after: p
|
|
628
|
+
}, G.lastMoveX = n, z.value = m);
|
|
629
|
+
}, Hr = () => {
|
|
630
|
+
if (!G || W.value !== "dragging" || !G.scrollDirection) {
|
|
631
|
+
G && (G.raf = void 0);
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
let e = Ir(), t = G.scrollDirection < 0 ? G.lastX - e.left : e.right - G.lastX, n = Math.ceil(cn * (1 - Pr(t / sn))), r = G.scrollport ?? document.scrollingElement;
|
|
635
|
+
r && (r.scrollLeft += G.scrollDirection * n), Vr(G.lastX), G.raf = requestAnimationFrame(Hr);
|
|
636
|
+
}, Ur = () => {
|
|
637
|
+
if (!G) return;
|
|
638
|
+
let e = Ir(), t = G.lastX - e.left, n = e.right - G.lastX;
|
|
639
|
+
G.scrollDirection = t < sn ? -1 : +(n < sn), G.scrollDirection && G.raf === void 0 && (G.raf = requestAnimationFrame(Hr));
|
|
640
|
+
}, Wr = () => {
|
|
641
|
+
document.removeEventListener("pointermove", Jr), document.removeEventListener("pointerup", Yr), document.removeEventListener("pointercancel", Xr), document.removeEventListener("keydown", Qr, !0), document.removeEventListener("dragstart", $r), document.removeEventListener("contextmenu", $r, !0), window.removeEventListener("blur", Xr), G?.row.removeEventListener("lostpointercapture", Zr);
|
|
642
|
+
}, Gr = () => {
|
|
643
|
+
if (G) {
|
|
644
|
+
clearTimeout(G.timer), G.raf !== void 0 && cancelAnimationFrame(G.raf), Wr();
|
|
645
|
+
try {
|
|
646
|
+
G.row.hasPointerCapture(G.pointerId) && G.row.releasePointerCapture(G.pointerId);
|
|
647
|
+
} catch {}
|
|
648
|
+
zr(), l(Nr), Ar.value = null, z.value = null, W.value = "idle", G = null;
|
|
649
|
+
}
|
|
650
|
+
}, Kr = () => {
|
|
651
|
+
G && (G.raf !== void 0 && cancelAnimationFrame(G.raf), G.raf = void 0, G.scrollDirection = 0, zr(), l(Nr), Ar.value = null, z.value = null, W.value = "cancelled");
|
|
652
|
+
}, qr = () => {
|
|
653
|
+
if (!(!G || W.value !== "armed")) {
|
|
654
|
+
clearTimeout(G.timer), G.timer = void 0;
|
|
655
|
+
try {
|
|
656
|
+
G.row.setPointerCapture(G.pointerId);
|
|
657
|
+
} catch {}
|
|
658
|
+
G.row.addEventListener("lostpointercapture", Zr), G.base = Qn(O.value), G.rtl = getComputedStyle(G.row).direction === "rtl", G.scrollport = Fr(), G.lastMoveX = G.x0, G.target = null, z.value = G.base, Ar.value = G.key, jr.value = G.label, W.value = "dragging", c(Nr), Rr(), Br(G.lastX, G.lastY), Vr(G.lastX), Ur();
|
|
659
|
+
}
|
|
660
|
+
}, Jr = (e) => {
|
|
661
|
+
if (!(!G || e.pointerId !== G.pointerId)) {
|
|
662
|
+
if (G.lastX = e.clientX, G.lastY = e.clientY, W.value === "armed") {
|
|
663
|
+
let t = Math.hypot(e.clientX - G.x0, e.clientY - G.y0);
|
|
664
|
+
if (G.pointerType === "touch") {
|
|
665
|
+
t >= an && Gr();
|
|
666
|
+
return;
|
|
667
|
+
}
|
|
668
|
+
if (t < rn) return;
|
|
669
|
+
qr();
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
W.value === "dragging" && (Br(e.clientX, e.clientY), Vr(e.clientX), Ur());
|
|
673
|
+
}
|
|
674
|
+
}, Yr = (e) => {
|
|
675
|
+
if (!G || e.pointerId !== G.pointerId) return;
|
|
676
|
+
let { key: t } = G, n = G.base ? G.base.filter((e) => Xn.value.includes(e) && !qn.value.has(e)).indexOf(t) : -1, r = W.value === "dragging" && z.value !== null && !Pe(z.value, G.base) ? z.value : null;
|
|
677
|
+
Gr(), r && (tr.value = "", O.value = r, b(() => nr(t, n)));
|
|
678
|
+
}, Xr = (e) => {
|
|
679
|
+
G && (e instanceof PointerEvent && e.pointerId !== G.pointerId || Gr());
|
|
680
|
+
}, Zr = () => {
|
|
681
|
+
G && W.value === "dragging" && Gr();
|
|
682
|
+
}, Qr = (e) => {
|
|
683
|
+
!G || W.value !== "dragging" || e.key !== "Escape" || !s(Nr) || (e.preventDefault(), e.stopImmediatePropagation(), Kr());
|
|
684
|
+
}, $r = (e) => {
|
|
685
|
+
G && W.value !== "idle" && e.preventDefault();
|
|
686
|
+
}, ei = (e) => {
|
|
687
|
+
if (!A.reorderable || Sa.value || M.thead || !e.isPrimary || e.button !== 0 || G || B.value.length < 2) return;
|
|
688
|
+
let t = e.target;
|
|
689
|
+
if (!(t instanceof Element)) return;
|
|
690
|
+
let n = e.currentTarget, r = t.closest(".bb-table__cell-column-header");
|
|
691
|
+
if (!r || r.parentElement !== n || !r.dataset.columnKey) return;
|
|
692
|
+
let i = t.closest(dn);
|
|
693
|
+
if (i && r.contains(i)) return;
|
|
694
|
+
let a = r.dataset.columnKey, o = B.value.find((e) => String(e.key) === a);
|
|
695
|
+
o && (Zn.value.has(a) || (G = {
|
|
696
|
+
pointerId: e.pointerId,
|
|
697
|
+
pointerType: e.pointerType,
|
|
698
|
+
key: a,
|
|
699
|
+
label: o.label,
|
|
700
|
+
row: n,
|
|
701
|
+
x0: e.clientX,
|
|
702
|
+
y0: e.clientY,
|
|
703
|
+
lastX: e.clientX,
|
|
704
|
+
lastY: e.clientY,
|
|
705
|
+
lastMoveX: e.clientX,
|
|
706
|
+
rtl: !1,
|
|
707
|
+
base: [],
|
|
708
|
+
scrollport: null,
|
|
709
|
+
target: null,
|
|
710
|
+
timer: void 0,
|
|
711
|
+
raf: void 0,
|
|
712
|
+
scrollDirection: 0
|
|
713
|
+
}, W.value = "armed", document.addEventListener("pointermove", Jr), document.addEventListener("pointerup", Yr), document.addEventListener("pointercancel", Xr), document.addEventListener("keydown", Qr, !0), document.addEventListener("dragstart", $r), document.addEventListener("contextmenu", $r, !0), window.addEventListener("blur", Xr), e.pointerType === "touch" && (G.timer = setTimeout(qr, on))));
|
|
714
|
+
}, ti = (e) => {
|
|
715
|
+
G && (W.value === "dragging" || W.value === "cancelled") && e.cancelable && e.preventDefault();
|
|
716
|
+
};
|
|
717
|
+
Ze(Gr);
|
|
718
|
+
let { data: ni } = de({ items: h(() => t(k.value) ? [] : [k.value]) }), { data: ri } = de({ items: bn }), ii = h(() => k.value !== void 0 || K.highlighted !== void 0), ai = Ge(), oi = () => {
|
|
719
|
+
let e = ai?.vnode.props ?? {};
|
|
720
|
+
return "highlighted" in e || "onUpdate:highlighted" in e;
|
|
721
|
+
};
|
|
722
|
+
process.env.NODE_ENV !== "production" && T(() => k.value === void 0 && oi(), (t) => {
|
|
723
|
+
t && e().warn("BbTable: `highlighted` is bound but its value is `undefined`, so the highlight mechanic stays off. Initialise it to `null` — `ref(null)`, not `ref()` — to be considered bound. `undefined` means \"never initialised\" and switches highlight off entirely; `null` means \"initialised and currently empty\".");
|
|
724
|
+
}, { immediate: !0 });
|
|
725
|
+
let si = !1, ci = () => {
|
|
726
|
+
process.env.NODE_ENV !== "production" && (si || (si = !0, e().warn("BbTable: `toggleHighlighted` was called from a slot, but highlight is not connected, so nothing happened. Bind `v-model:highlighted` (initialised to `null`), or seed `highlighted` through `useBbTableContext(id, { highlighted })`, or drop the call — with nothing bound the table has nowhere to put the value.")));
|
|
727
|
+
}, li = (e, { viaSlot: t = !1 } = {}) => {
|
|
728
|
+
if (!ii.value) {
|
|
729
|
+
t && ci();
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
let n = e.valueHash in ni.value;
|
|
733
|
+
k.value = n ? null : e.value;
|
|
734
|
+
}, ui = (e, t) => {
|
|
735
|
+
e.target instanceof Element && (e.target.closest("a, button, input, label, select, textarea, [contenteditable], [role=\"button\"]") || window.getSelection()?.toString() || li(t));
|
|
736
|
+
}, di = (e) => D.value.find(([t]) => t === e)?.[1] ?? null, fi = (e) => {
|
|
737
|
+
let t = di(e);
|
|
738
|
+
t === null ? D.value = [...D.value, [e, "asc"]] : t === "asc" ? D.value = D.value.map((t) => t[0] === e ? [e, "desc"] : t) : D.value = D.value.filter(([t]) => t !== e);
|
|
739
|
+
}, { state: K, isReady: pi } = i(() => In.value, {
|
|
187
740
|
selected: {
|
|
188
|
-
get: () =>
|
|
189
|
-
set: (e) =>
|
|
741
|
+
get: () => A.modelValue,
|
|
742
|
+
set: (e) => j("update:modelValue", e)
|
|
190
743
|
},
|
|
191
744
|
unselected: {
|
|
192
|
-
get: () =>
|
|
193
|
-
set: (e) =>
|
|
745
|
+
get: () => A.unselectedItems,
|
|
746
|
+
set: (e) => j("update:unselectedItems", e)
|
|
194
747
|
},
|
|
195
748
|
all: {
|
|
196
|
-
get: () =>
|
|
749
|
+
get: () => E.value,
|
|
197
750
|
set: (e) => {
|
|
198
|
-
|
|
751
|
+
E.value = e;
|
|
199
752
|
}
|
|
200
753
|
},
|
|
201
754
|
sort: {
|
|
202
|
-
get: () =>
|
|
755
|
+
get: () => D.value,
|
|
203
756
|
set: (e) => {
|
|
204
|
-
|
|
757
|
+
D.value = e;
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
order: {
|
|
761
|
+
get: () => O.value,
|
|
762
|
+
set: (e) => {
|
|
763
|
+
O.value = e;
|
|
205
764
|
}
|
|
206
765
|
},
|
|
207
766
|
highlighted: {
|
|
208
|
-
get: () =>
|
|
767
|
+
get: () => k.value,
|
|
209
768
|
set: (e) => {
|
|
210
|
-
|
|
769
|
+
k.value = e;
|
|
211
770
|
}
|
|
212
771
|
},
|
|
213
|
-
page: { get: () =>
|
|
772
|
+
page: { get: () => A.page === void 0 ? A.virtual ? 1 : void 0 : he(A.page, 1) },
|
|
214
773
|
perPage: {
|
|
215
|
-
get: () =>
|
|
216
|
-
infer: () => Array.isArray(
|
|
774
|
+
get: () => me(A.perPage),
|
|
775
|
+
infer: () => Array.isArray(A.items) ? A.items.length : void 0
|
|
217
776
|
},
|
|
218
777
|
totalItems: {
|
|
219
|
-
get: () =>
|
|
220
|
-
infer: () => Array.isArray(
|
|
778
|
+
get: () => me(A.totalItems),
|
|
779
|
+
infer: () => Array.isArray(A.items) ? A.items.length : void 0
|
|
221
780
|
},
|
|
222
|
-
totalPages: { get: () =>
|
|
223
|
-
}),
|
|
781
|
+
totalPages: { get: () => A.totalPages === void 0 ? void 0 : he(A.totalPages, 1) }
|
|
782
|
+
}), mi = h(() => A.columns.some((e) => e.snap != null)), hi = h(() => !!A.inheritColumnWidths || mi.value), gi = h(() => A.fixed || mi.value || Jn.value.some((e) => e.width != null) || br.value || hi.value && !!Ln.value), q = h(() => hi.value && !!Ln.value);
|
|
783
|
+
ut(() => {
|
|
784
|
+
zn.ordered = !!A.reorderable || O.value.length > 0;
|
|
785
|
+
});
|
|
786
|
+
let J = h(() => !!A.virtual && !q.value && !M.tbody), Y = S({}), X = S({}), _i = S(""), vi = h(() => J.value && !!_i.value && Ji.value.every((e) => !e.contentSized)), yi = (e) => J.value && e.width == null && !gr(e) && String(e.key) in Y.value, bi = q, xi = (e) => {
|
|
224
787
|
if (typeof e == "number") return `${e}px`;
|
|
225
788
|
let t = e.trim();
|
|
226
789
|
return /^-?\d*\.?\d+$/.test(t) ? `${t}px` : t;
|
|
227
|
-
},
|
|
228
|
-
let e =
|
|
229
|
-
return e ?
|
|
230
|
-
}),
|
|
231
|
-
let
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}), Tt = h(() => +("select" in (ut.value?.tracks ?? {}))), Et = h(() => Tt.value + Ct.value), Dt = h(() => wt.value.length), Ot = (e) => {
|
|
236
|
-
let t = wt.value[e];
|
|
237
|
-
return t ? ft(t, "0px") : "0px";
|
|
238
|
-
}, kt = (e, t) => {
|
|
239
|
-
if (!R.value || t - e <= 1e-6) return null;
|
|
790
|
+
}, Si = h(() => Rn.value?.keys ?? []), Ci = h(() => +(Si.value[0] === "select")), wi = h(() => Si.value.length), Ti = h(() => {
|
|
791
|
+
let e = Si.value;
|
|
792
|
+
return e[e.length - 1] === "actions" ? e.length - 1 : e.length;
|
|
793
|
+
}), Ei = (e) => Si.value.indexOf(e), Di = (e) => {
|
|
794
|
+
let t = Si.value[e];
|
|
795
|
+
return t ? Vn(t, "0px") : "0px";
|
|
796
|
+
}, Oi = (e, t) => {
|
|
797
|
+
if (!Ln.value || t - e <= 1e-6) return null;
|
|
240
798
|
let n = [];
|
|
241
799
|
for (let r = Math.floor(e); r < Math.ceil(t - 1e-6); r++) {
|
|
242
800
|
let i = Math.min(t, r + 1) - Math.max(e, r);
|
|
243
801
|
if (i <= 1e-6) continue;
|
|
244
|
-
let a =
|
|
802
|
+
let a = Di(r);
|
|
245
803
|
n.push(i >= .999999 ? a : `${Number(i.toFixed(4))} * ${a}`);
|
|
246
804
|
}
|
|
247
805
|
return n.length ? n.length === 1 && !n[0].includes("*") ? n[0] : `calc(${n.join(" + ")})` : null;
|
|
248
|
-
},
|
|
249
|
-
let
|
|
250
|
-
return
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
806
|
+
}, ki = (e) => {
|
|
807
|
+
let t = /^(.+)\.(\d+)$/.exec(e);
|
|
808
|
+
return t ? {
|
|
809
|
+
key: t[1],
|
|
810
|
+
fraction: Number(`0.${t[2]}`)
|
|
811
|
+
} : {
|
|
812
|
+
key: e,
|
|
813
|
+
fraction: 0
|
|
814
|
+
};
|
|
815
|
+
}, Ai = (e) => {
|
|
816
|
+
if (Array.isArray(e)) {
|
|
817
|
+
let t = ki(e[0]), n = ki(e[1]), r = Ei(t.key), i = Ei(n.key);
|
|
818
|
+
if (r < 0 || i < 0) return null;
|
|
819
|
+
let a = r + t.fraction, o = n.fraction > 0 ? i + n.fraction : i + 1;
|
|
820
|
+
return o > a ? {
|
|
821
|
+
start: a,
|
|
822
|
+
end: o,
|
|
823
|
+
explicit: !0
|
|
824
|
+
} : null;
|
|
825
|
+
}
|
|
826
|
+
let t = ki(e), n = Ei(t.key);
|
|
827
|
+
if (n < 0) {
|
|
828
|
+
let t = Ei(e);
|
|
829
|
+
return t < 0 ? null : {
|
|
830
|
+
start: t,
|
|
831
|
+
end: t + 1,
|
|
832
|
+
explicit: !1
|
|
260
833
|
};
|
|
834
|
+
}
|
|
835
|
+
return {
|
|
836
|
+
start: n,
|
|
837
|
+
end: n + 1,
|
|
838
|
+
explicit: !1
|
|
839
|
+
};
|
|
840
|
+
}, ji = h(() => !!Rn.value?.ordered), Mi = h(() => {
|
|
841
|
+
let e = B.value, t = Ci.value, n = Ti.value, r = wi.value, i = ji.value, a = e.map(() => null), o = /* @__PURE__ */ new Set(), s = (e) => {
|
|
842
|
+
for (let t = Math.floor(e.start); t < e.end - 1e-6; t++) o.add(t);
|
|
843
|
+
};
|
|
844
|
+
i || (e.forEach((e, t) => {
|
|
845
|
+
if (e.snap == null) return;
|
|
846
|
+
let n = Ai(e.snap);
|
|
847
|
+
n && (a[t] = {
|
|
848
|
+
...n,
|
|
849
|
+
overflow: !1
|
|
850
|
+
}, s(a[t]));
|
|
851
|
+
}), e.forEach((e, r) => {
|
|
852
|
+
if (a[r] || e.snap != null) return;
|
|
853
|
+
let i = Ei(String(e.key));
|
|
854
|
+
i < t || i >= n || o.has(i) || (a[r] = {
|
|
855
|
+
start: i,
|
|
856
|
+
end: i + 1,
|
|
857
|
+
explicit: !1,
|
|
858
|
+
overflow: !1
|
|
859
|
+
}, o.add(i));
|
|
860
|
+
}));
|
|
861
|
+
let c = 0, l = 0, u = e.map((i, s) => {
|
|
862
|
+
let u = a[s], d;
|
|
863
|
+
if (u && u.start + 1e-6 < c && (a[s] = null, u = null, d = String(i.key)), !u) {
|
|
864
|
+
let i = Math.max(c, t), f = n;
|
|
865
|
+
for (let t = s + 1; t < e.length; t++) {
|
|
866
|
+
let e = a[t];
|
|
867
|
+
e && (f = Math.min(f, e.start));
|
|
868
|
+
}
|
|
869
|
+
let p = Math.max(Math.floor(i), t);
|
|
870
|
+
for (; p < f && o.has(p);) p++;
|
|
871
|
+
if (p < f && p + 1e-6 >= i) o.add(p), u = {
|
|
872
|
+
start: i,
|
|
873
|
+
end: p + 1,
|
|
874
|
+
explicit: !1,
|
|
875
|
+
overflow: !1
|
|
876
|
+
};
|
|
877
|
+
else if (p < f) o.add(p), u = {
|
|
878
|
+
start: i,
|
|
879
|
+
end: p + 1,
|
|
880
|
+
explicit: !1,
|
|
881
|
+
overflow: !1
|
|
882
|
+
};
|
|
883
|
+
else {
|
|
884
|
+
let e = Math.max(r, n) + l++;
|
|
885
|
+
u = {
|
|
886
|
+
start: e,
|
|
887
|
+
end: e + 1,
|
|
888
|
+
explicit: !1,
|
|
889
|
+
overflow: !0
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
d && (u.demoted = d);
|
|
893
|
+
}
|
|
894
|
+
return c = Math.max(c, u.end), u;
|
|
261
895
|
});
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
896
|
+
return u.forEach((t, r) => {
|
|
897
|
+
if (t.overflow || t.explicit) return;
|
|
898
|
+
let i = u[r + 1];
|
|
899
|
+
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));
|
|
900
|
+
}), u;
|
|
901
|
+
}), Ni = (e) => q.value && e.overflow;
|
|
902
|
+
process.env.NODE_ENV !== "production" && (T(() => mi.value && ji.value, (t) => {
|
|
903
|
+
t && e().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.");
|
|
904
|
+
}, { immediate: !0 }), T(() => Mi.value.find((e) => e.demoted)?.demoted ?? null, (t) => {
|
|
905
|
+
t !== null && e().warn(`BbTable: column '${t}' 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.`);
|
|
906
|
+
}, { immediate: !0 }));
|
|
907
|
+
let Pi = h(() => Mi.value.some(Ni)), Fi = (e) => {
|
|
908
|
+
let t = B.value[e];
|
|
909
|
+
return (t ? hr(t) : null) == null && !q.value;
|
|
910
|
+
}, Ii = h(() => {
|
|
911
|
+
if (!q.value) return -1;
|
|
912
|
+
let e = B.value;
|
|
913
|
+
for (let t = e.length - 1; t >= 0; t--) {
|
|
914
|
+
let n = e[t];
|
|
915
|
+
if (n.width == null && n.snap == null) return t;
|
|
267
916
|
}
|
|
268
917
|
return -1;
|
|
269
|
-
}),
|
|
270
|
-
let e =
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
actions: null
|
|
282
|
-
}), zt = h(() => {
|
|
283
|
-
let e = (e) => V.value ? ft(e) : "auto", t = (t) => H.value && U[t] ? U[t] : e(t), n = [];
|
|
284
|
-
N.selectable && n.push({
|
|
918
|
+
}), Li = h(() => {
|
|
919
|
+
let e = Mi.value[0];
|
|
920
|
+
return !hi.value || !Ln.value || !e ? null : Oi(0, e.start);
|
|
921
|
+
}), Ri = h(() => {
|
|
922
|
+
let e = Mi.value, t = e[e.length - 1];
|
|
923
|
+
return !hi.value || !Ln.value || !t || Pi.value ? null : Oi(t.end, wi.value);
|
|
924
|
+
}), zi = (e) => zn.tracks[e] ?? null, Bi = (e, t, n) => !hi.value || !Ln.value ? null : n ? t ? `calc(${e ?? "0px"} - ${t})` : null : e, Vi = h(() => Bi(Li.value, A.selectable ? zi("select") : null, !!A.selectable)), Hi = h(() => Pi.value ? null : Bi(Ri.value, P.value ? zi("actions") : null, P.value)), Ui = h(() => Vi.value !== null), Wi = h(() => Hi.value !== null), Gi = (e, t) => {
|
|
925
|
+
let n = J.value ? X.value[t] : null;
|
|
926
|
+
return n == null ? e && Ki.value ? `minmax(${e}, max-content)` : "max-content" : `${n}px`;
|
|
927
|
+
}, Ki = h(() => Object.keys(Rn.value?.tracks ?? {}).length > 0), qi = (e) => /^(auto|min-content|max-content|(fit-content|minmax)\(.*\)|-?[\d.]+fr)$/.test(e.trim()), Ji = h(() => {
|
|
928
|
+
let e = [];
|
|
929
|
+
A.selectable && e.push({
|
|
285
930
|
key: "select",
|
|
286
|
-
width:
|
|
931
|
+
width: Gi(Li.value, "select"),
|
|
932
|
+
contentSized: X.value.select == null
|
|
287
933
|
});
|
|
288
|
-
let
|
|
289
|
-
return
|
|
290
|
-
let
|
|
291
|
-
if (t
|
|
292
|
-
|
|
293
|
-
key:
|
|
294
|
-
width:
|
|
934
|
+
let t = B.value, n = t.length - 1, r = !q.value && t.length > 0 && t.every((e) => e.width != null);
|
|
935
|
+
return t.forEach((t, i) => {
|
|
936
|
+
let a = String(t.key), o = hr(t), s = o == null ? null : xi(o), c = Mi.value[i], l = null, u = null;
|
|
937
|
+
if (s != null && qi(s) ? u = s : s != null && r && !gr(t) ? u = `minmax(${s}, ${parseFloat(s) || 1}fr)` : s != null && yi(t) ? u = `minmax(${s}, 1fr)` : s == null ? Fi(i) ? u = A.fixed ? "minmax(0, 1fr)" : "auto" : Ki.value ? Ni(c) ? u = "min-content" : (l = Oi(c.start, c.end), l === null && (u = "auto")) : u = "max-content" : l = s, u !== null) {
|
|
938
|
+
e.push({
|
|
939
|
+
key: a,
|
|
940
|
+
width: u,
|
|
941
|
+
contentSized: /^(auto|min-content|max-content)$/.test(u)
|
|
295
942
|
});
|
|
296
943
|
return;
|
|
297
944
|
}
|
|
298
|
-
let
|
|
299
|
-
|
|
300
|
-
let
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
width: l
|
|
945
|
+
let d = [];
|
|
946
|
+
i === 0 && Ui.value && d.push("var(--offset-internal-start, 0px)"), i === n && Wi.value && d.push("var(--offset-internal-end, 0px)");
|
|
947
|
+
let f = d.length ? `calc(${[...d, l].join(" + ")})` : l, p = i === Ii.value && !Pi.value ? `minmax(${f}, 1fr)` : f;
|
|
948
|
+
e.push({
|
|
949
|
+
key: a,
|
|
950
|
+
width: p,
|
|
951
|
+
contentSized: !1
|
|
306
952
|
});
|
|
307
|
-
}),
|
|
953
|
+
}), P.value && e.push({
|
|
308
954
|
key: "actions",
|
|
309
|
-
width:
|
|
310
|
-
|
|
311
|
-
|
|
955
|
+
width: Gi(Ri.value, "actions"),
|
|
956
|
+
contentSized: X.value.actions == null
|
|
957
|
+
}), e;
|
|
958
|
+
}), Yi = h(() => {
|
|
959
|
+
let e = B.value, t = [];
|
|
960
|
+
for (let n of Ji.value) n.contentSized || e.some((e) => String(e.key) === n.key) && t.push(n.key);
|
|
961
|
+
return t.join(" ");
|
|
962
|
+
}), Xi = h(() => new Set(Yi.value.split(" ").filter(Boolean))), Zi = h(() => Ji.value.map((e) => e.width).join(" ")), Qi = S(Zi.value), $i = h(() => `grid-template-columns: ${Qi.value}`);
|
|
963
|
+
T(Zi, (e) => {
|
|
964
|
+
if (U && L.value) {
|
|
965
|
+
L.value.style.gridTemplateColumns = e;
|
|
966
|
+
return;
|
|
967
|
+
}
|
|
968
|
+
Qi.value = e;
|
|
969
|
+
}, { flush: "sync" });
|
|
970
|
+
let ea = h(() => {
|
|
312
971
|
let e = {};
|
|
313
|
-
return
|
|
314
|
-
}),
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}, Wt = () => {
|
|
327
|
-
let e = I.value;
|
|
328
|
-
if (!e) return;
|
|
329
|
-
let t = [
|
|
330
|
-
"block",
|
|
331
|
-
"flex",
|
|
332
|
-
"grid",
|
|
333
|
-
"flow-root",
|
|
334
|
-
"list-item"
|
|
335
|
-
], n = [
|
|
336
|
-
"BUTTON",
|
|
337
|
-
"INPUT",
|
|
338
|
-
"SELECT",
|
|
339
|
-
"TEXTAREA",
|
|
340
|
-
"IMG",
|
|
341
|
-
"svg",
|
|
342
|
-
"VIDEO",
|
|
343
|
-
"CANVAS"
|
|
344
|
-
], r = (e) => {
|
|
345
|
-
let i = getComputedStyle(e), a = i.display.includes("flex") || i.display.includes("grid"), o = 0, s = 0;
|
|
346
|
-
if (e.querySelectorAll(":scope > *").forEach((e) => {
|
|
347
|
-
let i = getComputedStyle(e);
|
|
348
|
-
if (i.position === "absolute" || i.position === "fixed") return;
|
|
349
|
-
let c = parseFloat(i.marginLeft) + parseFloat(i.marginRight), l = !a && !n.includes(e.tagName) && i.cssFloat === "none" && t.includes(i.display) ? r(e) + parseFloat(i.paddingLeft) + parseFloat(i.paddingRight) + parseFloat(i.borderLeftWidth) + parseFloat(i.borderRightWidth) : e.getBoundingClientRect().width;
|
|
350
|
-
o += l + (c || 0), s += 1;
|
|
351
|
-
}), s === 0) {
|
|
352
|
-
let t = document.createRange();
|
|
353
|
-
return t.selectNodeContents(e), t.getBoundingClientRect().width;
|
|
354
|
-
}
|
|
355
|
-
if (s > 1) {
|
|
356
|
-
let e = parseFloat(i.columnGap);
|
|
357
|
-
e && (o += e * (s - 1));
|
|
972
|
+
return Vi.value && (e["--offset-start"] = Vi.value), Hi.value && (e["--offset-end"] = Hi.value), e;
|
|
973
|
+
}), ta = S({}), na = [
|
|
974
|
+
.62,
|
|
975
|
+
.42,
|
|
976
|
+
.78,
|
|
977
|
+
.52
|
|
978
|
+
], ra = (e) => {
|
|
979
|
+
let t = ["transparent 0"], n = 0;
|
|
980
|
+
return e.forEach((e, r) => {
|
|
981
|
+
let i = na[r % na.length], a = Math.round((e - fn * 2) * i);
|
|
982
|
+
if (a >= pn) {
|
|
983
|
+
let e = Math.round(n + fn);
|
|
984
|
+
t.push(`transparent ${e}px`, `currentColor ${e}px ${e + a}px`, `transparent ${e + a}px`);
|
|
358
985
|
}
|
|
359
|
-
|
|
360
|
-
},
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}, Kt = C([]), qt = C([]), W = C(0), Jt = C(null), Yt = () => {
|
|
371
|
-
let e = L.value;
|
|
372
|
-
if (!e || !H.value || !N.columns.some((e) => e.width != null) && !Mt.value && Pt.value < 0) return;
|
|
373
|
-
let t = e.offsetWidth, n = +!!N.selectable, r = U.select ? parseFloat(U.select) : 0, i = U.actions ? parseFloat(U.actions) : 0, a = Ht(), o = 0, s = 0;
|
|
374
|
-
N.columns.forEach((e, t) => {
|
|
375
|
-
let r = a[n + t]?.getBoundingClientRect().width ?? 0;
|
|
376
|
-
e.width != null && (o += r), Nt(t) || (s += r);
|
|
986
|
+
n += e;
|
|
987
|
+
}), `linear-gradient(90deg, ${t.join(",")})`;
|
|
988
|
+
}, ia = (e) => {
|
|
989
|
+
if (!J.value) {
|
|
990
|
+
ta.value["--placeholder-bars"] && (ta.value = {});
|
|
991
|
+
return;
|
|
992
|
+
}
|
|
993
|
+
let t = e.map((e) => parseFloat(e));
|
|
994
|
+
t.some((e) => !(e >= 0)) || (ta.value = {
|
|
995
|
+
...ta.value,
|
|
996
|
+
"--placeholder-bars": ra(t)
|
|
377
997
|
});
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
`height:${e.offsetHeight}px`,
|
|
387
|
-
"overflow:visible"
|
|
388
|
-
].join(";");
|
|
389
|
-
let l = e.cloneNode(!0);
|
|
390
|
-
l.classList.remove("bb-table--fixed"), l.querySelectorAll(".bb-table-expand__row").forEach((e) => e.remove());
|
|
391
|
-
let u = Array.from(l.querySelectorAll("col"));
|
|
392
|
-
N.columns.forEach((e, t) => {
|
|
393
|
-
if (e.width == null) {
|
|
394
|
-
let e = u[n + t];
|
|
395
|
-
e && (e.style.width = "");
|
|
396
|
-
}
|
|
998
|
+
}, aa = () => {
|
|
999
|
+
if (!J.value) return;
|
|
1000
|
+
let e = Math.round(Fo.value || vo.value);
|
|
1001
|
+
if (!(e > 0)) return;
|
|
1002
|
+
let t = `${e}px`;
|
|
1003
|
+
ta.value["--row-h"] !== t && (ta.value = {
|
|
1004
|
+
...ta.value,
|
|
1005
|
+
"--row-h": t
|
|
397
1006
|
});
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
1007
|
+
}, oa = h(() => ({
|
|
1008
|
+
...Bn.value,
|
|
1009
|
+
...ea.value,
|
|
1010
|
+
...ta.value,
|
|
1011
|
+
...A.fixedHeaders || J.value ? { "--stuck-head-h": `${la.value}px` } : null,
|
|
1012
|
+
...vi.value ? { "--virtual-row-tracks": _i.value } : null
|
|
1013
|
+
})), sa = () => {
|
|
1014
|
+
let e = L.value, t = Ji.value.length;
|
|
1015
|
+
if (!e || !t) return [];
|
|
1016
|
+
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);
|
|
1017
|
+
return r ? Array.from(r.children) : [];
|
|
1018
|
+
}, ca = "", la = S(0), ua = () => {
|
|
1019
|
+
let e = L.value;
|
|
1020
|
+
if (!e) return;
|
|
1021
|
+
if (A.fixedHeaders || J.value) {
|
|
1022
|
+
let t = e.querySelector(":scope > .bb-table__head"), n = t ? Math.round(t.getBoundingClientRect().height) : 0;
|
|
1023
|
+
n !== la.value && (la.value = n);
|
|
1024
|
+
}
|
|
1025
|
+
let t = Me(e);
|
|
1026
|
+
if (!t) return;
|
|
1027
|
+
let n = Ji.value.map((e) => e.key);
|
|
1028
|
+
if (t.length !== n.length) return;
|
|
1029
|
+
let r = t.join(" "), i = `${_a.value}|${r}`, a = nc.value !== da;
|
|
1030
|
+
if (i === ca) {
|
|
1031
|
+
a && fa(e, t);
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
ca = i;
|
|
1035
|
+
let o = {};
|
|
1036
|
+
n.forEach((e, n) => {
|
|
1037
|
+
o[e] = t[n];
|
|
404
1038
|
});
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
let e = L.value, t = I.value;
|
|
421
|
-
Qt = !!e && !!t && t.getBoundingClientRect().width > e.clientWidth + 1;
|
|
422
|
-
}, en = () => {
|
|
423
|
-
G !== null && clearTimeout(G), G = setTimeout(() => {
|
|
424
|
-
G = null, Yt(), be(() => {
|
|
425
|
-
Zt.value = !1, $t();
|
|
426
|
-
});
|
|
427
|
-
}, 200);
|
|
428
|
-
}, K, tn, nn = () => {
|
|
429
|
-
K && (K.disconnect(), Ht().forEach((e) => K?.observe(e)), Gt());
|
|
1039
|
+
let s = V.value, c = s[0], l = s[s.length - 1], u = Vi.value, d = Hi.value;
|
|
1040
|
+
u && c && o[c] && (o[c] = `calc(${o[c]} - (${u}))`, !A.selectable && Li.value && (o.select = Li.value)), d && l && o[l] && (o[l] = `calc(${o[l]} - (${d}))`, !P.value && Ri.value && (o.actions = Ri.value));
|
|
1041
|
+
let f = [
|
|
1042
|
+
..."select" in o ? ["select"] : [],
|
|
1043
|
+
...s,
|
|
1044
|
+
..."actions" in o ? ["actions"] : []
|
|
1045
|
+
];
|
|
1046
|
+
Qo(t), ia(t), J.value && (_i.value = r), pa = t, Hn(o, f), (tc.value.length || a) && fa(e, t);
|
|
1047
|
+
}, da = "", fa = (e, t) => {
|
|
1048
|
+
xe(e, tc.value, t) && (da = nc.value);
|
|
1049
|
+
}, pa = null, ma, ha = () => {
|
|
1050
|
+
if (!ma) return;
|
|
1051
|
+
ma.disconnect();
|
|
1052
|
+
let e = sa();
|
|
1053
|
+
e.forEach((e) => ma?.observe(e)), e.length && ua();
|
|
430
1054
|
};
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
}
|
|
442
|
-
let
|
|
1055
|
+
et(() => {
|
|
1056
|
+
ma = new ResizeObserver(ua), ha();
|
|
1057
|
+
}), Ze(() => {
|
|
1058
|
+
ma?.disconnect();
|
|
1059
|
+
});
|
|
1060
|
+
let ga = h(() => Ji.value.map((e) => e.key).join(" ")), _a = h(() => V.value.join(" "));
|
|
1061
|
+
T([ga, _a], () => {
|
|
1062
|
+
b(ha), requestAnimationFrame(() => {
|
|
1063
|
+
L.value && ua();
|
|
1064
|
+
});
|
|
1065
|
+
}, { flush: "post" });
|
|
1066
|
+
let va = (e, t) => A.accessibleLabel ? A.accessibleLabel(e, t) : [I("table.select").value, ...e.map((e) => e.content)].join(" "), ya = h(() => A.selectable ? "fieldset" : "div"), ba = h(() => A.legend || A.caption || I("table.selectableLegend").value), xa = h(() => A.loading || ja.value), Sa = h(() => xa.value && !A.interactiveWhileLoading), Ca = h(() => pi.value && !t(K.page) && !t(K.perPage) && !t(K.totalItems) && K.page >= 1 && K.perPage > 0 && K.totalItems >= 0), wa = h(() => ({
|
|
443
1067
|
"bb-table": !0,
|
|
444
|
-
[`bb-table--align-${
|
|
445
|
-
"bb-table--compact":
|
|
446
|
-
"bb-table--
|
|
447
|
-
"bb-table--
|
|
448
|
-
"bb-table--fixed
|
|
449
|
-
"bb-table--
|
|
450
|
-
"bb-table--
|
|
451
|
-
"bb-table--
|
|
452
|
-
"bb-table--
|
|
1068
|
+
[`bb-table--align-${A.align}`]: !0,
|
|
1069
|
+
"bb-table--compact": A.compact,
|
|
1070
|
+
"bb-table--reorderable": !!A.reorderable,
|
|
1071
|
+
"bb-table--resizable": fr.value,
|
|
1072
|
+
"bb-table--fixed": gi.value,
|
|
1073
|
+
"bb-table--inherit-widths": bi.value,
|
|
1074
|
+
"bb-table--fixed-header": A.fixedHeaders || J.value,
|
|
1075
|
+
"bb-table--virtual": J.value,
|
|
1076
|
+
"bb-table--virtual-flat": vi.value,
|
|
1077
|
+
"bb-table--loading": xa.value,
|
|
1078
|
+
"bb-table--empty": !Z.value.length,
|
|
1079
|
+
"bb-table--selectable": !!A.selectable,
|
|
453
1080
|
"scrollbar-border": !0
|
|
454
|
-
})),
|
|
1081
|
+
})), Ta = h(() => Jn.value.length + Number(!!A.selectable) + Number(P.value)), Ea = h(() => Object.fromEntries(A.columns.map((e) => [e.key, Se(e.key)]))), { getter: Da, clientReproducible: Oa, hydratedFromSsr: ka, items: Aa, loading: ja } = m({ items: ot(A, "items") }), { hasPrefilled: Ma, whenPrefilled: Na } = pe({
|
|
1082
|
+
alreadyLoaded: ka,
|
|
1083
|
+
clientReproducible: Oa,
|
|
455
1084
|
trigger: !0,
|
|
456
1085
|
fn: async (e) => {
|
|
457
|
-
await
|
|
1086
|
+
await Da(e, K.selected), Ra();
|
|
458
1087
|
}
|
|
459
|
-
}), { data:
|
|
460
|
-
|
|
461
|
-
|
|
1088
|
+
}), { data: Pa } = de({ items: h(() => {
|
|
1089
|
+
let e = K.selected;
|
|
1090
|
+
return A.multiple ? e ?? [] : e == null ? [] : [e];
|
|
1091
|
+
}) }), { options: Z, baseOptions: Fa } = fe({
|
|
1092
|
+
disabled: ot(A, "disabled"),
|
|
1093
|
+
items: Aa,
|
|
462
1094
|
itemText: void 0,
|
|
463
|
-
itemValue:
|
|
464
|
-
max:
|
|
1095
|
+
itemValue: A.itemValue,
|
|
1096
|
+
max: ot(A, "max"),
|
|
465
1097
|
selectable: !0,
|
|
466
|
-
selectedIndexedByHash:
|
|
467
|
-
}),
|
|
468
|
-
|
|
469
|
-
},
|
|
470
|
-
if (
|
|
471
|
-
let t = { ...
|
|
472
|
-
delete t[e.valueHash],
|
|
473
|
-
} else
|
|
1098
|
+
selectedIndexedByHash: Pa
|
|
1099
|
+
}), Ia = async (e) => {
|
|
1100
|
+
A.multiple ? K.selected = (K.selected ?? []).concat(e.value) : K.selected = e.value;
|
|
1101
|
+
}, La = async (e) => {
|
|
1102
|
+
if (A.multiple) {
|
|
1103
|
+
let t = { ...Pa.value };
|
|
1104
|
+
delete t[e.valueHash], K.selected = Object.values(t);
|
|
1105
|
+
} else K.selected = null;
|
|
474
1106
|
};
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
typeof
|
|
1107
|
+
te(() => [
|
|
1108
|
+
A.dependencies,
|
|
1109
|
+
A.items,
|
|
1110
|
+
typeof A.items == "function" ? [K.page, K.perPage] : void 0
|
|
479
1111
|
], async () => {
|
|
480
|
-
|
|
481
|
-
}, { debounce:
|
|
482
|
-
let
|
|
483
|
-
if (!
|
|
484
|
-
let e = new Set(
|
|
485
|
-
if (
|
|
486
|
-
let e =
|
|
487
|
-
e.every(
|
|
488
|
-
} else !
|
|
489
|
-
let
|
|
490
|
-
|
|
491
|
-
},
|
|
492
|
-
let
|
|
493
|
-
return e.formatter && (!
|
|
494
|
-
align:
|
|
495
|
-
classes
|
|
496
|
-
|
|
1112
|
+
Ma.value || await Na(), Ma.value && (await Da(!0, K.selected), Ra());
|
|
1113
|
+
}, { debounce: A.depsDebounceTime });
|
|
1114
|
+
let Ra = () => {
|
|
1115
|
+
if (!A.enforceCoherence) return;
|
|
1116
|
+
let e = new Set(Z.value.map((e) => e.valueHash)), n = (t) => e.has(r(t));
|
|
1117
|
+
if (A.multiple) {
|
|
1118
|
+
let e = K.selected ?? [];
|
|
1119
|
+
e.every(n) || (K.selected = e.filter(n));
|
|
1120
|
+
} else !t(K.selected) && !n(K.selected) && (K.selected = null);
|
|
1121
|
+
let i = K.unselected ?? [];
|
|
1122
|
+
i.every(n) || (K.unselected = i.filter(n)), !t(k.value) && !n(k.value) && (k.value = null), bn.value.every(n) || (bn.value = bn.value.filter(n));
|
|
1123
|
+
}, za = (e, n) => {
|
|
1124
|
+
let r = Ea.value[e.key], i = e.align ?? "left", a = An(n.item, e.key);
|
|
1125
|
+
return e.formatter && (!t(a) || e.formatOnNull !== !1) && (a = e.formatter(a, e.key, n.item)), e.placeholder && t(a) && (a = e.placeholder), {
|
|
1126
|
+
align: i,
|
|
1127
|
+
get classes() {
|
|
1128
|
+
return De(Ha.value.has(String(e.key)) ? [`bb-table__cell--${i}`, "bb-table__cell--fluid"] : [`bb-table__cell--${i}`], A.tdClass, e.tdClass, a, e.key, n.item);
|
|
1129
|
+
},
|
|
1130
|
+
content: a,
|
|
497
1131
|
key: e.key,
|
|
498
1132
|
label: e.label,
|
|
499
|
-
slotName:
|
|
1133
|
+
slotName: r
|
|
500
1134
|
};
|
|
501
|
-
},
|
|
502
|
-
let
|
|
1135
|
+
}, Ba = h(() => {
|
|
1136
|
+
let e = {};
|
|
1137
|
+
if (A.fixed || q.value || J.value || M.thead) return e;
|
|
1138
|
+
let n = (Aa.value ?? []).slice(0, 200), r = Ua.value?.padEm ?? 1.5;
|
|
1139
|
+
for (let i of B.value) {
|
|
1140
|
+
if (hr(i) != null || M[Ea.value[i.key]]) continue;
|
|
1141
|
+
let a = n.map((e) => {
|
|
1142
|
+
let n = An(e, i.key);
|
|
1143
|
+
return i.formatter && (!t(n) || i.formatOnNull !== !1) && (n = i.formatter(n, i.key, e)), i.placeholder && t(n) && (n = i.placeholder), t(n) ? "" : String(n);
|
|
1144
|
+
});
|
|
1145
|
+
e[String(i.key)] = we(a, i.label ?? "", r, i.sortable ? 1.3 : 0);
|
|
1146
|
+
}
|
|
1147
|
+
return e;
|
|
1148
|
+
}), Va = h(() => Object.keys(Ba.value).join(" ")), Ha = h(() => new Set(Va.value.split(" ").filter(Boolean))), Ua = S(null), Wa = h(() => {
|
|
1149
|
+
let e = Ua.value;
|
|
1150
|
+
if (!e) return 0;
|
|
1151
|
+
let t = B.value.reduce((e, t) => {
|
|
1152
|
+
let n = hr(t), r = n == null ? "" : xi(n);
|
|
1153
|
+
return e + (/^[\d.]+px$/.test(r) ? parseFloat(r) : 0);
|
|
1154
|
+
}, 0);
|
|
1155
|
+
return Math.max(0, (e.width - t) / e.em);
|
|
1156
|
+
}), Ga = h(() => {
|
|
1157
|
+
let e = Te(Ba.value, Wa.value), t = Ua.value, n = t?.padEm ?? 1.5, r = {};
|
|
1158
|
+
for (let i in e) {
|
|
1159
|
+
let a = Math.max(0, e[i] - n);
|
|
1160
|
+
r[i] = { "--floor": t ? `${Math.floor(a * t.em)}px` : `${a.toFixed(2)}rem` };
|
|
1161
|
+
}
|
|
1162
|
+
return r;
|
|
1163
|
+
}), Ka, qa = 0;
|
|
1164
|
+
et(() => {
|
|
1165
|
+
let e = R.value, t = L.value;
|
|
1166
|
+
if (!e || !t || typeof ResizeObserver > "u") return;
|
|
1167
|
+
let n = () => {
|
|
1168
|
+
let n = getComputedStyle(t), r = parseFloat(n.fontSize) || 16, i = 2 * (parseFloat(n.getPropertyValue("--px")) || 12) / r, a = e.clientWidth, o = Ua.value;
|
|
1169
|
+
(o?.width !== a || o.em !== r || o.padEm !== i) && (Ua.value = {
|
|
1170
|
+
width: a,
|
|
1171
|
+
em: r,
|
|
1172
|
+
padEm: i
|
|
1173
|
+
});
|
|
1174
|
+
};
|
|
1175
|
+
Ka = new ResizeObserver(() => {
|
|
1176
|
+
cancelAnimationFrame(qa), qa = requestAnimationFrame(n);
|
|
1177
|
+
}), Ka.observe(e);
|
|
1178
|
+
}), Ze(() => {
|
|
1179
|
+
Ka?.disconnect(), cancelAnimationFrame(qa);
|
|
1180
|
+
});
|
|
1181
|
+
let Ja = h(() => B.value.map((e) => {
|
|
1182
|
+
let t = e.align ?? "left", n = Ea.value[e.key], r = Fn(n) ? `header:${n} (shadowed)` : `header:${n}`, i = di(e.key), a = i ?? e.sorted, o = a ? a === "asc" ? "ascending" : "descending" : void 0;
|
|
503
1183
|
return {
|
|
504
1184
|
align: t,
|
|
505
1185
|
key: e.key,
|
|
506
1186
|
label: e.label,
|
|
507
|
-
slotName:
|
|
508
|
-
classes:
|
|
1187
|
+
slotName: r,
|
|
1188
|
+
classes: Oe([`bb-table__cell-column-header--${t}`], A.thClass, e.thClass),
|
|
509
1189
|
sortable: !!e.sortable,
|
|
510
|
-
sortDirection:
|
|
511
|
-
sortOrder:
|
|
1190
|
+
sortDirection: o,
|
|
1191
|
+
sortOrder: i
|
|
512
1192
|
};
|
|
513
|
-
})),
|
|
514
|
-
let n =
|
|
515
|
-
return n
|
|
516
|
-
},
|
|
517
|
-
|
|
1193
|
+
})), Ya = (e, t) => {
|
|
1194
|
+
let n = Ea.value[e];
|
|
1195
|
+
return (Fn(n) ? void 0 : M[`header:${n}:${t}`]) ?? M[`header:${t}`];
|
|
1196
|
+
}, Xa = (e) => ({
|
|
1197
|
+
classes: e.classes,
|
|
1198
|
+
columnKey: e.key,
|
|
1199
|
+
items: Aa.value,
|
|
1200
|
+
label: e.label,
|
|
1201
|
+
sortable: e.sortable,
|
|
1202
|
+
sortOrder: e.sortOrder,
|
|
1203
|
+
toggleSort: () => fi(e.key),
|
|
1204
|
+
hideColumn: () => Yn(e.key)
|
|
1205
|
+
}), Za = (e, t) => {
|
|
1206
|
+
let n = Z.value[e];
|
|
1207
|
+
return n && n.valueHash === t ? n : Z.value.find((e) => e.valueHash === t);
|
|
1208
|
+
}, Qa = (e) => {
|
|
1209
|
+
let t = Fa.value[e], n = B.value.map((e) => za(e, t));
|
|
518
1210
|
return {
|
|
519
|
-
accessibleLabel:
|
|
1211
|
+
accessibleLabel: va(n, t.item),
|
|
520
1212
|
cols: n,
|
|
521
|
-
rowClasses
|
|
1213
|
+
get rowClasses() {
|
|
1214
|
+
return ke(A.rowClass, B.value, n, t.item);
|
|
1215
|
+
},
|
|
522
1216
|
onRowClick: (n) => {
|
|
523
|
-
let r =
|
|
524
|
-
r && (
|
|
1217
|
+
let r = Za(e, t.valueHash);
|
|
1218
|
+
r && (ui(n, r), j("click:row", n, r.item));
|
|
525
1219
|
},
|
|
526
1220
|
onRowContextMenu: (n) => {
|
|
527
|
-
let r =
|
|
528
|
-
r &&
|
|
1221
|
+
let r = Za(e, t.valueHash);
|
|
1222
|
+
r && j("contextmenu:row", n, r.item);
|
|
529
1223
|
},
|
|
530
1224
|
onRowDblClick: (n) => {
|
|
531
|
-
let r =
|
|
532
|
-
r &&
|
|
1225
|
+
let r = Za(e, t.valueHash);
|
|
1226
|
+
r && j("dblclick:row", n, r.item);
|
|
1227
|
+
},
|
|
1228
|
+
item: t.item,
|
|
1229
|
+
get text() {
|
|
1230
|
+
return t.text;
|
|
533
1231
|
},
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
valueHash: e.valueHash,
|
|
537
|
-
value: e.value
|
|
1232
|
+
valueHash: t.valueHash,
|
|
1233
|
+
value: t.value
|
|
538
1234
|
};
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
1235
|
+
}, $a = h(() => {
|
|
1236
|
+
Fa.value, Ea.value, A.tdClass, A.rowClass, A.accessibleLabel;
|
|
1237
|
+
for (let e of B.value) e.align, e.formatOnNull, e.formatter, e.key, e.label, e.placeholder, e.tdClass;
|
|
1238
|
+
return /* @__PURE__ */ new Map();
|
|
1239
|
+
}), eo = (e) => {
|
|
1240
|
+
if (!(!J.value || e.size <= mn)) {
|
|
1241
|
+
for (let t of e.keys()) if (e.delete(t), e.size <= mn) break;
|
|
1242
|
+
}
|
|
1243
|
+
}, to = (e) => {
|
|
1244
|
+
let t = $a.value, n = t.get(e);
|
|
1245
|
+
if (n) return n;
|
|
1246
|
+
let r = Qa(e);
|
|
1247
|
+
return t.set(e, r), eo(t), r;
|
|
1248
|
+
}, no = h(() => ($a.value, Q.value, Z.value, ni.value, A.selectable, /* @__PURE__ */ new Map())), ro = /* @__PURE__ */ new Map(), io = /* @__PURE__ */ new WeakMap(), ao = (e) => {
|
|
1249
|
+
let t = no.value, n = t.get(e.index);
|
|
1250
|
+
if (n) return n;
|
|
1251
|
+
let r = to(e.index), i = Z.value[e.index], a = !!i.disabled, o = () => !A.selectable || typeof A.selectable == "function" && !A.selectable(r.item) || a, s = r.valueHash in ni.value, c = ro.get(r.valueHash);
|
|
1252
|
+
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 && io.get(c) === a && c.highlighted === s) return t.set(e.index, c), eo(t), c;
|
|
1253
|
+
let l = {
|
|
1254
|
+
accessibleLabel: r.accessibleLabel,
|
|
1255
|
+
cols: r.cols,
|
|
1256
|
+
item: r.item,
|
|
1257
|
+
onRowClick: r.onRowClick,
|
|
1258
|
+
onRowContextMenu: r.onRowContextMenu,
|
|
1259
|
+
onRowDblClick: r.onRowDblClick,
|
|
1260
|
+
get rowClasses() {
|
|
1261
|
+
return r.rowClasses;
|
|
1262
|
+
},
|
|
1263
|
+
get text() {
|
|
1264
|
+
return r.text;
|
|
1265
|
+
},
|
|
1266
|
+
value: r.value,
|
|
1267
|
+
valueHash: r.valueHash,
|
|
1268
|
+
expanded: e.expanded,
|
|
1269
|
+
highlighted: s,
|
|
1270
|
+
rowIndex: e.rowIndex,
|
|
1271
|
+
selected: i.selected,
|
|
1272
|
+
get disabled() {
|
|
1273
|
+
return o();
|
|
1274
|
+
},
|
|
1275
|
+
expandProps: {},
|
|
1276
|
+
toggleExpanded: () => Ms(r.valueHash),
|
|
1277
|
+
toggleHighlighted: () => li(r, { viaSlot: !0 }),
|
|
1278
|
+
toggleSelected: () => Ws(l)
|
|
1279
|
+
};
|
|
1280
|
+
return l.expandProps = js(l), io.set(l, a), t.set(e.index, l), eo(t), ro.delete(r.valueHash), ro.set(r.valueHash, l), ro.size > mn && ro.delete(ro.keys().next().value), l;
|
|
1281
|
+
}, oo = at({
|
|
1282
|
+
key: null,
|
|
1283
|
+
row: 0,
|
|
1284
|
+
col: null
|
|
1285
|
+
}), so = h(() => {
|
|
1286
|
+
if (!F.value) return null;
|
|
1287
|
+
let e = /* @__PURE__ */ new Map();
|
|
1288
|
+
for (let t of Q.value) e.set(t.key, t.virtualIndex);
|
|
1289
|
+
return e;
|
|
1290
|
+
}), co = h(() => {
|
|
1291
|
+
if (!F.value) return null;
|
|
1292
|
+
let e = Q.value.length, t = oo.value, n;
|
|
1293
|
+
if (n = !e || t.row < 0 ? kn.value ? -1 : e ? 0 : null : (t.key === null ? void 0 : so.value?.get(t.key)) ?? ne(t.row, 0, e - 1), n === null) return null;
|
|
1294
|
+
let r = t.col === null && (!Tn.value || n < 0) ? 0 : t.col;
|
|
1295
|
+
return {
|
|
1296
|
+
row: n,
|
|
1297
|
+
col: r
|
|
1298
|
+
};
|
|
1299
|
+
}), lo = (e) => {
|
|
1300
|
+
let t = co.value;
|
|
1301
|
+
return !t || t.row !== e ? -2 : t.col ?? -1;
|
|
1302
|
+
}, uo = (e) => {
|
|
1303
|
+
if (!kn.value) return;
|
|
1304
|
+
let t = co.value;
|
|
1305
|
+
return !t || t.row !== -1 ? -1 : Math.min(t.col ?? 0, Ta.value - 1) === e ? 0 : -1;
|
|
1306
|
+
}, Q = h(() => {
|
|
1307
|
+
let e = [], t = 0, n = ((K.page ?? 0) - 1) * (K.perPage ?? 0);
|
|
1308
|
+
return Fa.value.forEach((r, i) => {
|
|
1309
|
+
let a = r.valueHash in ri.value, o = n + 1 + i + 1 + t;
|
|
1310
|
+
e.push({
|
|
1311
|
+
kind: "row",
|
|
1312
|
+
index: i,
|
|
1313
|
+
key: `r:${r.valueHash}`,
|
|
1314
|
+
virtualIndex: e.length,
|
|
1315
|
+
expanded: a,
|
|
1316
|
+
rowIndex: o
|
|
1317
|
+
}), a && (t++, e.push({
|
|
1318
|
+
kind: "expand",
|
|
1319
|
+
index: i,
|
|
1320
|
+
key: `x:${r.valueHash}`,
|
|
1321
|
+
virtualIndex: e.length,
|
|
1322
|
+
expanded: a,
|
|
1323
|
+
rowIndex: o
|
|
1324
|
+
}));
|
|
1325
|
+
}), e;
|
|
1326
|
+
}), fo = (e, t, n, r) => {
|
|
1327
|
+
let i;
|
|
1328
|
+
return {
|
|
1329
|
+
kind: t,
|
|
1330
|
+
index: e.index,
|
|
1331
|
+
key: n,
|
|
1332
|
+
virtualIndex: e.virtualIndex,
|
|
1333
|
+
height: r,
|
|
1334
|
+
get item() {
|
|
1335
|
+
return i ??= ao(e);
|
|
1336
|
+
}
|
|
1337
|
+
};
|
|
1338
|
+
}, po = at(null), mo = S(0), ho = S(null), go = (e) => /^(auto|scroll)$/.test(getComputedStyle(e).overflowY), _o = () => {
|
|
1339
|
+
let e = R.value, t = ho.value, n = L.value;
|
|
1340
|
+
if (!J.value || !e || !t || !n) {
|
|
1341
|
+
po.value = null;
|
|
1342
|
+
return;
|
|
1343
|
+
}
|
|
1344
|
+
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;
|
|
1345
|
+
if (a) o = e;
|
|
1346
|
+
else {
|
|
1347
|
+
let t = e.parentElement;
|
|
1348
|
+
for (; t && t !== document.body && t !== document.documentElement;) {
|
|
1349
|
+
if (go(t)) {
|
|
1350
|
+
o = t;
|
|
1351
|
+
break;
|
|
1352
|
+
}
|
|
1353
|
+
t = t.parentElement;
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
let s = t.getBoundingClientRect().top, c = o === window ? s + window.scrollY : s - o.getBoundingClientRect().top + o.scrollTop;
|
|
1357
|
+
mo.value !== c && (mo.value = c), po.value !== o && (po.value = o);
|
|
1358
|
+
}, vo = S(37), yo = () => {
|
|
1359
|
+
let e = R.value;
|
|
1360
|
+
if (!e) return;
|
|
1361
|
+
let t = parseFloat(getComputedStyle(e).getPropertyValue("--cell-h"));
|
|
1362
|
+
t > 0 && (vo.value = t + 1);
|
|
1363
|
+
}, bo = S(null), xo = (e) => {
|
|
1364
|
+
if (!J.value || !ho.value) return;
|
|
1365
|
+
let t = e.target;
|
|
1366
|
+
for (; t && t.parentElement !== ho.value;) t = t.parentElement;
|
|
1367
|
+
let n = Number(t?.dataset.index);
|
|
1368
|
+
bo.value = Number.isInteger(n) ? n : null;
|
|
1369
|
+
}, So = (e) => {
|
|
1370
|
+
if (!J.value) return;
|
|
1371
|
+
let t = e.relatedTarget;
|
|
1372
|
+
(!t || !ho.value?.contains(t)) && (bo.value = null);
|
|
1373
|
+
}, Co = S(0), wo = 0, To = S(!1), Eo, Do = {
|
|
1374
|
+
offset: 0,
|
|
1375
|
+
time: 0
|
|
1376
|
+
}, Oo = 0, ko = /* @__PURE__ */ new Set(), Ao = null, jo = 0, Mo = (e) => {
|
|
1377
|
+
jo = jo ? jo * .7 + e * .3 : e;
|
|
1378
|
+
}, No = () => {
|
|
1379
|
+
clearTimeout(Eo), Eo = void 0, To.value && (To.value = !1, Ho());
|
|
1380
|
+
}, Po = (e) => {
|
|
1381
|
+
let t = performance.now(), n = t - Do.time, r = e - Do.offset;
|
|
1382
|
+
if (Do = {
|
|
1383
|
+
offset: e,
|
|
1384
|
+
time: t
|
|
1385
|
+
}, Oo > 0) return;
|
|
1386
|
+
let i = Ao;
|
|
1387
|
+
if (n > 0 && n < 250 && i && jo) {
|
|
1388
|
+
let e = zo?.scrollRect?.height ?? 0, t = (i.end - i.start + e) / 2;
|
|
1389
|
+
Math.abs(r) / n * jo > t && (To.value = !0);
|
|
1390
|
+
}
|
|
1391
|
+
clearTimeout(Eo), Eo = setTimeout(No, vn);
|
|
1392
|
+
}, Fo = S(0), Io = -1, Lo = !1, Ro = () => {
|
|
1393
|
+
let e = zo?.itemSizeCache;
|
|
1394
|
+
if (!e?.size || e.size === Io) return;
|
|
1395
|
+
if (Io = e.size, Lo) {
|
|
1396
|
+
aa();
|
|
1397
|
+
return;
|
|
1398
|
+
}
|
|
1399
|
+
let t = /* @__PURE__ */ new Map(), n = 0;
|
|
1400
|
+
for (let [r, i] of e) {
|
|
1401
|
+
if (typeof r != "string" || !r.startsWith("r:")) continue;
|
|
1402
|
+
let e = Math.round(i);
|
|
1403
|
+
t.set(e, (t.get(e) ?? 0) + 1), n++;
|
|
1404
|
+
}
|
|
1405
|
+
if (n >= 5) {
|
|
1406
|
+
let e = 0, r = -1;
|
|
1407
|
+
for (let [n, i] of t) (i > r || i === r && n < e) && (r = i, e = n);
|
|
1408
|
+
e > 0 && !Lo && (Fo.value = e, n >= 20 && (Lo = !0));
|
|
1409
|
+
}
|
|
1410
|
+
aa();
|
|
1411
|
+
}, zo = null, Bo = !1;
|
|
1412
|
+
T(J, (e) => {
|
|
1413
|
+
Bo = e;
|
|
1414
|
+
}, { immediate: !0 });
|
|
1415
|
+
let Vo = at([]), Ho = (e = !1) => {
|
|
1416
|
+
if (wo &&= (cancelAnimationFrame(wo), 0), !zo) return;
|
|
1417
|
+
let t = J.value ? zo.getVirtualItems() : [];
|
|
1418
|
+
Co.value = zo.getTotalSize();
|
|
1419
|
+
let n = [], r = null;
|
|
1420
|
+
if (t.length) {
|
|
1421
|
+
let e = zo.measurementsCache, i = Q.value.length, a = zo.range, o = a ? a.startIndex : t[0].index, s = a ? a.endIndex : t[t.length - 1].index;
|
|
1422
|
+
for (let e of t) n.push({
|
|
1423
|
+
index: e.index,
|
|
1424
|
+
start: e.start,
|
|
1425
|
+
end: e.end,
|
|
1426
|
+
size: e.size
|
|
1427
|
+
});
|
|
1428
|
+
let c = e?.[Math.max(0, o - gn)], l = e?.[Math.min(i - 1, s + gn)] ?? c;
|
|
1429
|
+
c && l && (r = {
|
|
1430
|
+
start: c.start,
|
|
1431
|
+
end: l.end
|
|
1432
|
+
});
|
|
1433
|
+
}
|
|
1434
|
+
let i = !Uo || !r || Uo.start !== r.start || Uo.end !== r.end;
|
|
1435
|
+
if (Uo = r, Vo.value = n, !r) return;
|
|
1436
|
+
if (!e || !i) {
|
|
1437
|
+
Ao = r;
|
|
1438
|
+
return;
|
|
1439
|
+
}
|
|
1440
|
+
let a = performance.now(), o = r;
|
|
1441
|
+
b(() => {
|
|
1442
|
+
Mo(performance.now() - a), Ao = o;
|
|
1443
|
+
});
|
|
1444
|
+
}, Uo = null, Wo = () => {
|
|
1445
|
+
wo ||= requestAnimationFrame(() => {
|
|
1446
|
+
wo = 0, Ro(), Ho();
|
|
1447
|
+
});
|
|
1448
|
+
}, Go = (e, t) => {
|
|
1449
|
+
t ? (Po(e.getScrollOffset()), Ho(!0)) : Wo();
|
|
1450
|
+
}, Ko = (e) => Q.value[e]?.key ?? e, qo = (e) => (Q.value[e]?.kind === "expand" ? 3 : 1) * (Fo.value || vo.value), Jo = yt(h(() => {
|
|
1451
|
+
let e = po.value, t = typeof window < "u" && e === window, n = bo.value, r = co.value?.row, i = r != null && r >= 0 ? r : null;
|
|
1452
|
+
return {
|
|
1453
|
+
onChange: Go,
|
|
1454
|
+
count: J.value ? Q.value.length : 0,
|
|
1455
|
+
enabled: J.value,
|
|
1456
|
+
getScrollElement: () => e,
|
|
1457
|
+
estimateSize: qo,
|
|
1458
|
+
getItemKey: Ko,
|
|
1459
|
+
overscan: gn,
|
|
1460
|
+
scrollMargin: mo.value,
|
|
1461
|
+
initialRect: {
|
|
1462
|
+
width: 0,
|
|
1463
|
+
height: _n
|
|
1464
|
+
},
|
|
1465
|
+
rangeExtractor: (e) => {
|
|
1466
|
+
let t = pt(e.endIndex - e.startIndex > hn ? {
|
|
1467
|
+
...e,
|
|
1468
|
+
endIndex: e.startIndex + hn
|
|
1469
|
+
} : e), r = [n, i].filter((n) => n != null && n < e.count && !t.includes(n));
|
|
1470
|
+
return r.length ? [.../* @__PURE__ */ new Set([...t, ...r])].sort((e, t) => e - t) : t;
|
|
1471
|
+
},
|
|
1472
|
+
observeElementRect: t ? vt : gt,
|
|
1473
|
+
observeElementOffset: t ? _t : ht,
|
|
1474
|
+
scrollToFn: t ? bt : mt
|
|
1475
|
+
};
|
|
1476
|
+
}));
|
|
1477
|
+
zo = Jo.value, Ho();
|
|
1478
|
+
let Yo = (e) => {
|
|
1479
|
+
Bo && zo?.measureElement(e);
|
|
1480
|
+
}, Xo = (e) => {
|
|
1481
|
+
let t = [], n = 0, r = gn;
|
|
1482
|
+
for (let i = 0; i < e.length && t.length < hn && !(n >= _n && r-- <= 0); i++) {
|
|
1483
|
+
let e = qo(i);
|
|
1484
|
+
t.push({
|
|
1485
|
+
index: i,
|
|
1486
|
+
start: n,
|
|
1487
|
+
end: n + e,
|
|
1488
|
+
size: e
|
|
1489
|
+
}), n += e;
|
|
1490
|
+
}
|
|
1491
|
+
return t;
|
|
1492
|
+
}, Zo = h(() => {
|
|
1493
|
+
let e = Q.value;
|
|
1494
|
+
if (no.value, !J.value) return e.map((e) => fo(e, e.kind, e.key, 0));
|
|
1495
|
+
let t = Vo.value.length ? Vo.value : Xo(e);
|
|
1496
|
+
if (!t.length) return [];
|
|
1497
|
+
let n = [], r = mo.value, i = To.value, a = r, o;
|
|
1498
|
+
for (let r of t) {
|
|
1499
|
+
let t = e[r.index];
|
|
1500
|
+
if (!t) continue;
|
|
1501
|
+
let s = r.start - a;
|
|
1502
|
+
s > .5 && n.push(fo(t, "spacer", `s:${t.key}`, s)), i && t.kind === "row" && !ko.has(t.key) ? n.push(fo(t, "placeholder", `p:${t.key}`, r.size)) : n.push(fo(t, t.kind, t.key, 0)), a = r.end, o = t;
|
|
1503
|
+
}
|
|
1504
|
+
let s = Co.value - (a - r);
|
|
1505
|
+
return s > .5 && o && n.push(fo(o, "spacer", "s:end", s)), n;
|
|
1506
|
+
});
|
|
1507
|
+
T(Zo, (e) => {
|
|
1508
|
+
if (J.value) for (let t of e) (t.kind === "row" || t.kind === "expand") && ko.add(t.key);
|
|
1509
|
+
}, { flush: "post" });
|
|
1510
|
+
let Qo = (e) => {
|
|
1511
|
+
let t = L.value;
|
|
1512
|
+
if (!J.value || !t || !t.querySelector(":scope > .bb-table__body > .bb-table__row")) return;
|
|
1513
|
+
let n = B.value, r = null, i = null;
|
|
1514
|
+
if (Ji.value.forEach((t, a) => {
|
|
1515
|
+
if (t.key === "select" || t.key === "actions") {
|
|
1516
|
+
if (t.key in X.value) return;
|
|
1517
|
+
let n = parseFloat(e[a]);
|
|
1518
|
+
if (!(n > 0)) return;
|
|
1519
|
+
(i ??= { ...X.value })[t.key] = n;
|
|
1520
|
+
return;
|
|
1521
|
+
}
|
|
1522
|
+
let o = n.find((e) => String(e.key) === t.key);
|
|
1523
|
+
if (!o || o.width != null) return;
|
|
1524
|
+
let s = String(o.key);
|
|
1525
|
+
if (s in Y.value || s in (r ?? {})) return;
|
|
1526
|
+
let c = parseFloat(e[a]);
|
|
1527
|
+
c > 0 && ((r ??= { ...Y.value })[s] = c);
|
|
1528
|
+
}), !r && !i || $o) return;
|
|
1529
|
+
let a = r, o = i;
|
|
1530
|
+
$o = requestAnimationFrame(() => {
|
|
1531
|
+
$o = 0, a && (Y.value = {
|
|
1532
|
+
...Y.value,
|
|
1533
|
+
...a
|
|
1534
|
+
}), o && (X.value = {
|
|
1535
|
+
...X.value,
|
|
1536
|
+
...o
|
|
1537
|
+
});
|
|
1538
|
+
});
|
|
1539
|
+
}, $o = 0;
|
|
1540
|
+
T([() => J.value, () => Z.value.length === 0], ([e, t]) => {
|
|
1541
|
+
(!e || t) && (Object.keys(Y.value).length && (Y.value = {}), Object.keys(X.value).length && (X.value = {}), _i.value = "");
|
|
1542
|
+
}), T(vo, () => {
|
|
1543
|
+
J.value && Jo.value.measure();
|
|
1544
|
+
});
|
|
1545
|
+
let es, ts, ns = () => {
|
|
1546
|
+
es?.disconnect(), es = void 0, ts?.(), ts = void 0;
|
|
1547
|
+
let e = R.value;
|
|
1548
|
+
if (!J.value || !e) return;
|
|
1549
|
+
let t = 0, n = () => {
|
|
1550
|
+
t ||= requestAnimationFrame(() => {
|
|
1551
|
+
t = 0, _o();
|
|
1552
|
+
});
|
|
1553
|
+
};
|
|
1554
|
+
if (po.value === e) es = new ResizeObserver(() => _o()), es.observe(e);
|
|
1555
|
+
else {
|
|
1556
|
+
window.addEventListener("resize", n);
|
|
1557
|
+
let e = new ResizeObserver(n);
|
|
1558
|
+
e.observe(document.documentElement), ts = () => {
|
|
1559
|
+
window.removeEventListener("resize", n), e.disconnect(), t && cancelAnimationFrame(t);
|
|
550
1560
|
};
|
|
1561
|
+
}
|
|
1562
|
+
};
|
|
1563
|
+
T(po, ns), T(() => [J.value, Q.value.length], () => {
|
|
1564
|
+
b(() => {
|
|
1565
|
+
yo(), _o(), ns(), ko = /* @__PURE__ */ new Set(), Io = -1, Lo = !1, Ho();
|
|
551
1566
|
});
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
|
|
1567
|
+
}, { flush: "post" });
|
|
1568
|
+
let rs = () => {
|
|
1569
|
+
!J.value || !Object.keys(Y.value).length || (Y.value = {}, b(() => requestAnimationFrame(() => {
|
|
1570
|
+
let e = L.value, t = e ? Me(e) : null;
|
|
1571
|
+
t && Qo(t);
|
|
1572
|
+
})));
|
|
1573
|
+
}, is, as = () => {
|
|
1574
|
+
let e = typeof document < "u" ? document.fonts : void 0;
|
|
1575
|
+
!e || is || (e.status !== "loaded" && e.ready.then(rs), e.addEventListener("loadingdone", rs), is = () => e.removeEventListener("loadingdone", rs));
|
|
1576
|
+
};
|
|
1577
|
+
et(() => {
|
|
1578
|
+
yo(), aa(), _o(), ns(), Ho(), J.value && as();
|
|
1579
|
+
}), T(J, (e) => {
|
|
1580
|
+
e && as(), pa && ia(pa), aa();
|
|
1581
|
+
}), Ze(() => {
|
|
1582
|
+
es?.disconnect(), ts?.(), is?.(), wo && cancelAnimationFrame(wo);
|
|
555
1583
|
});
|
|
556
|
-
let
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
if (!
|
|
564
|
-
let n =
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
1584
|
+
let os = () => new Promise((e) => requestAnimationFrame(() => e())), ss = () => L.value?.querySelector(":scope > .bb-table__head > .bb-table__header-row") ?? null, cs = (e) => ho.value?.querySelector(`:scope > [role="row"][data-index="${e}"]`) ?? null, ls = (e, t) => {
|
|
1585
|
+
let n = e < 0 ? ss() : cs(e);
|
|
1586
|
+
if (!n || t === null) return n;
|
|
1587
|
+
let r = n.children;
|
|
1588
|
+
return r[Math.min(t, r.length - 1)] ?? null;
|
|
1589
|
+
}, us = (e) => e >= 0 && Q.value[e]?.kind === "expand" ? 1 : Ta.value, ds = (e) => {
|
|
1590
|
+
let t = L.value;
|
|
1591
|
+
if (!t || !(e instanceof Element) || !t.contains(e)) return null;
|
|
1592
|
+
let n = null;
|
|
1593
|
+
for (let r = e; r && r !== t;) {
|
|
1594
|
+
let i = r.parentElement;
|
|
1595
|
+
if (i && i.parentElement === t && r.getAttribute("role") === "row") {
|
|
1596
|
+
let t = r, a = i.classList.contains("bb-table__head");
|
|
1597
|
+
if ((a ? !kn.value : i !== ho.value) || a && !t.classList.contains("bb-table__header-row")) return null;
|
|
1598
|
+
let o = a ? -1 : Number(t.dataset.index);
|
|
1599
|
+
if (!Number.isInteger(o)) return null;
|
|
1600
|
+
if (!n) return {
|
|
1601
|
+
row: o,
|
|
1602
|
+
rowEl: t,
|
|
1603
|
+
cell: null,
|
|
1604
|
+
col: -1,
|
|
1605
|
+
inside: !1
|
|
1606
|
+
};
|
|
1607
|
+
let s = n;
|
|
1608
|
+
return {
|
|
1609
|
+
row: o,
|
|
1610
|
+
rowEl: t,
|
|
1611
|
+
cell: s,
|
|
1612
|
+
col: Array.prototype.indexOf.call(t.children, s),
|
|
1613
|
+
inside: s !== e
|
|
1614
|
+
};
|
|
1615
|
+
}
|
|
1616
|
+
n = r, r = i;
|
|
1617
|
+
}
|
|
1618
|
+
return null;
|
|
1619
|
+
}, fs = async (e, t) => {
|
|
1620
|
+
oo.value = {
|
|
1621
|
+
key: e < 0 ? null : Q.value[e]?.key ?? null,
|
|
1622
|
+
row: e,
|
|
1623
|
+
col: t
|
|
568
1624
|
};
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
1625
|
+
let n = ls(e, t);
|
|
1626
|
+
if (!n && e >= 0 && J.value) {
|
|
1627
|
+
Oo++, No();
|
|
1628
|
+
try {
|
|
1629
|
+
for (let r = 0; r < 8 && !n; r++) Jo.value.scrollToIndex(e, { align: "auto" }), await os(), await b(), n = ls(e, t);
|
|
1630
|
+
} finally {
|
|
1631
|
+
Oo--;
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
if (n && (n.focus(), n.scrollIntoView({
|
|
1635
|
+
block: "nearest",
|
|
1636
|
+
inline: "nearest"
|
|
1637
|
+
}), J.value && e >= 0)) for (let e = 0; e < 4; e++) {
|
|
1638
|
+
let e = n.getBoundingClientRect().top;
|
|
1639
|
+
if (await os(), n.scrollIntoView({
|
|
1640
|
+
block: "nearest",
|
|
1641
|
+
inline: "nearest"
|
|
1642
|
+
}), Math.abs(n.getBoundingClientRect().top - e) < .5) break;
|
|
1643
|
+
}
|
|
1644
|
+
}, ps = null, ms = 0, hs = (e) => {
|
|
1645
|
+
if (e.closest("[data-bb-table-id]") !== R.value) return !1;
|
|
1646
|
+
let t = ds(e);
|
|
1647
|
+
return !!t?.inside && t.cell !== ps;
|
|
1648
|
+
}, gs = (e) => {
|
|
1649
|
+
let t = e.querySelectorAll(Fe);
|
|
1650
|
+
e.matches("a[href], area[href], button, input:not([type=\"hidden\"]), select, textarea, iframe, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]") && hs(e) && ze(e);
|
|
1651
|
+
for (let e of t) hs(e) && ze(e);
|
|
1652
|
+
}, _s = (e) => {
|
|
1653
|
+
for (let t of e.querySelectorAll(`[${Ie}]`)) t.closest("[data-bb-table-id]") === R.value && Re(t);
|
|
1654
|
+
}, vs = (e) => {
|
|
1655
|
+
ps !== e && (ys(), ps = e, ms = o(), _s(e));
|
|
1656
|
+
}, ys = () => {
|
|
1657
|
+
let e = ps;
|
|
1658
|
+
ps = null, e?.isConnected && F.value && gs(e);
|
|
1659
|
+
}, bs = (e) => {
|
|
1660
|
+
let t = Le(e)[0];
|
|
1661
|
+
return t ? (vs(e), t.focus(), !0) : !1;
|
|
1662
|
+
}, xs = null, Ss = () => {
|
|
1663
|
+
xs?.disconnect(), xs = null;
|
|
1664
|
+
let e = L.value;
|
|
1665
|
+
if (e) {
|
|
1666
|
+
if (!F.value) {
|
|
1667
|
+
ps = null, _s(e);
|
|
1668
|
+
return;
|
|
1669
|
+
}
|
|
1670
|
+
gs(e), xs = new MutationObserver((e) => {
|
|
1671
|
+
for (let t of e) {
|
|
1672
|
+
if (t.type === "childList") {
|
|
1673
|
+
for (let e of t.addedNodes) e instanceof Element && gs(e);
|
|
1674
|
+
continue;
|
|
1675
|
+
}
|
|
1676
|
+
let e = t.target;
|
|
1677
|
+
e.getAttribute("tabindex") !== "-1" && (e.removeAttribute(Ie), gs(e));
|
|
1678
|
+
}
|
|
1679
|
+
}), xs.observe(e, {
|
|
1680
|
+
childList: !0,
|
|
1681
|
+
subtree: !0,
|
|
1682
|
+
attributes: !0,
|
|
1683
|
+
attributeFilter: ["tabindex"]
|
|
1684
|
+
});
|
|
1685
|
+
}
|
|
1686
|
+
};
|
|
1687
|
+
et(Ss), T(F, () => b(Ss)), Ze(() => xs?.disconnect());
|
|
1688
|
+
let Cs = (e) => {
|
|
1689
|
+
let t = ds(e.target);
|
|
1690
|
+
if (!t) return;
|
|
1691
|
+
t.inside && t.cell ? vs(t.cell) : ys();
|
|
1692
|
+
let n = co.value, r = t.cell ?? t.rowEl;
|
|
1693
|
+
n && n.row === t.row && ls(n.row, n.col) === r || (oo.value = {
|
|
1694
|
+
key: t.row < 0 ? null : Q.value[t.row]?.key ?? null,
|
|
1695
|
+
row: t.row,
|
|
1696
|
+
col: t.cell ? t.col : null
|
|
1697
|
+
});
|
|
1698
|
+
}, ws = (e) => {
|
|
1699
|
+
F.value && Cs(e);
|
|
1700
|
+
};
|
|
1701
|
+
T(L, (e, t) => {
|
|
1702
|
+
t?.removeEventListener("focusin", ws), e?.addEventListener("focusin", ws);
|
|
1703
|
+
}, { flush: "sync" }), Ze(() => L.value?.removeEventListener("focusin", ws));
|
|
1704
|
+
let Ts = (e) => {
|
|
1705
|
+
let t = e.relatedTarget;
|
|
1706
|
+
ps && !(t instanceof Node && ps.contains(t)) && ys();
|
|
1707
|
+
}, Es = (e) => {
|
|
1708
|
+
let t = Q.value[e];
|
|
1709
|
+
!A.selectable || !t || t.kind !== "row" || ao(t).toggleSelected();
|
|
1710
|
+
}, Ds = () => !A.selectable || !Ls() ? !1 : (Fs.value?.click(), !0), Os = (e) => {
|
|
1711
|
+
e.row >= 0 && Q.value[e.row]?.kind === "row" && e.rowEl.click();
|
|
1712
|
+
}, ks = (e) => {
|
|
1713
|
+
if (e.defaultPrevented) return;
|
|
1714
|
+
let t = ds(e.target);
|
|
1715
|
+
if (!t) return;
|
|
1716
|
+
let n = e.key;
|
|
1717
|
+
if (t.inside) {
|
|
1718
|
+
if (!t.cell || !(n === "F2" || n === "Escape" && o() <= ms) || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
1719
|
+
e.preventDefault(), e.stopPropagation(), t.cell.focus();
|
|
1720
|
+
return;
|
|
1721
|
+
}
|
|
1722
|
+
if ((e.ctrlKey || e.metaKey) && !e.altKey && n.toLowerCase() === "a") {
|
|
1723
|
+
Ds() && e.preventDefault();
|
|
1724
|
+
return;
|
|
1725
|
+
}
|
|
1726
|
+
if (e.altKey || e.metaKey || e.shiftKey && n !== " ") return;
|
|
1727
|
+
let r = e.ctrlKey, i = getComputedStyle(t.rowEl).direction === "rtl", a = i ? "ArrowLeft" : "ArrowRight", s = i ? "ArrowRight" : "ArrowLeft", c = Q.value.length - 1, l = kn.value ? -1 : 0, u = Tn.value, d = (n, r) => {
|
|
1728
|
+
e.preventDefault(), !(n === t.row && r === (t.cell ? t.col : null)) && fs(n, r);
|
|
1729
|
+
}, f = () => e.preventDefault();
|
|
1730
|
+
if (!t.cell) {
|
|
1731
|
+
if (!u) return;
|
|
1732
|
+
let r = Q.value[t.row], i = r?.kind === "row";
|
|
1733
|
+
switch (n) {
|
|
1734
|
+
case "ArrowDown": return d(Math.min(t.row + 1, c), null);
|
|
1735
|
+
case "ArrowUp": return d(Math.max(t.row - 1, 0), null);
|
|
1736
|
+
case "PageDown": return d(Math.min(t.row + yn, c), null);
|
|
1737
|
+
case "PageUp": return d(Math.max(t.row - yn, 0), null);
|
|
1738
|
+
case "Home": return d(0, null);
|
|
1739
|
+
case "End": return d(c, null);
|
|
1740
|
+
case a:
|
|
1741
|
+
if (i && !r.expanded) {
|
|
1742
|
+
f(), Ms(Fa.value[r.index].valueHash);
|
|
1743
|
+
return;
|
|
1744
|
+
}
|
|
1745
|
+
return d(t.row, 0);
|
|
1746
|
+
case s:
|
|
1747
|
+
f(), i && r.expanded && Ms(Fa.value[r.index].valueHash);
|
|
1748
|
+
return;
|
|
1749
|
+
case "Enter":
|
|
1750
|
+
case " ":
|
|
1751
|
+
f(), e.shiftKey && n === " " ? Es(t.row) : Os(t);
|
|
1752
|
+
return;
|
|
1753
|
+
}
|
|
1754
|
+
return;
|
|
1755
|
+
}
|
|
1756
|
+
let p = co.value, m = p && p.row === t.row && p.col !== null ? p.col : t.col, ee = (e) => us(e) - 1, te = !!A.selectable && t.col === 0;
|
|
1757
|
+
switch (n) {
|
|
1758
|
+
case a: return d(t.row, Math.min(t.col + 1, ee(t.row)));
|
|
1759
|
+
case s: return t.col > 0 ? d(t.row, t.col - 1) : u && t.row >= 0 ? d(t.row, null) : f();
|
|
1760
|
+
case "ArrowDown": return d(Math.max(Math.min(t.row + 1, c), t.row), m);
|
|
1761
|
+
case "ArrowUp": return d(Math.max(t.row - 1, l), m);
|
|
1762
|
+
case "PageDown": return d(c < 0 ? t.row : ne(t.row + yn, 0, c), m);
|
|
1763
|
+
case "PageUp": return d(t.row < 0 ? t.row : Math.max(t.row - yn, 0), m);
|
|
1764
|
+
case "Home": return r ? d(l, u ? m : 0) : d(t.row, 0);
|
|
1765
|
+
case "End": {
|
|
1766
|
+
if (!r) return d(t.row, ee(t.row));
|
|
1767
|
+
let e = c < 0 ? t.row : c;
|
|
1768
|
+
return d(e, u ? m : ee(e));
|
|
1769
|
+
}
|
|
1770
|
+
case "F2":
|
|
1771
|
+
f(), bs(t.cell);
|
|
1772
|
+
return;
|
|
588
1773
|
case "Enter":
|
|
589
|
-
case " ":
|
|
590
|
-
|
|
591
|
-
|
|
1774
|
+
case " ": {
|
|
1775
|
+
if (f(), t.row < 0) {
|
|
1776
|
+
te && !e.shiftKey ? Ds() : n === "Enter" && bs(t.cell);
|
|
1777
|
+
return;
|
|
1778
|
+
}
|
|
1779
|
+
if (n === " " && e.shiftKey) {
|
|
1780
|
+
Es(t.row);
|
|
1781
|
+
return;
|
|
1782
|
+
}
|
|
1783
|
+
let r = Q.value[t.row]?.kind === "row";
|
|
1784
|
+
if (te && r) {
|
|
1785
|
+
Es(t.row);
|
|
1786
|
+
return;
|
|
1787
|
+
}
|
|
1788
|
+
if (n === "Enter" && bs(t.cell)) return;
|
|
1789
|
+
Os(t);
|
|
1790
|
+
return;
|
|
1791
|
+
}
|
|
592
1792
|
}
|
|
593
|
-
},
|
|
594
|
-
e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(),
|
|
595
|
-
},
|
|
596
|
-
"aria-controls":
|
|
1793
|
+
}, As = (e, t) => {
|
|
1794
|
+
e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), Ms(t)));
|
|
1795
|
+
}, js = (e) => ({
|
|
1796
|
+
"aria-controls": t(ri.value[e.valueHash]) ? void 0 : Mn(e.valueHash),
|
|
597
1797
|
"aria-expanded": e.expanded ? "true" : "false",
|
|
598
1798
|
onClick: (t) => {
|
|
599
|
-
t.stopPropagation(),
|
|
1799
|
+
t.stopPropagation(), Ms(e.valueHash);
|
|
600
1800
|
},
|
|
601
|
-
onKeydown: (t) =>
|
|
602
|
-
}),
|
|
603
|
-
let t =
|
|
604
|
-
t && (e in
|
|
1801
|
+
onKeydown: (t) => As(t, e.valueHash)
|
|
1802
|
+
}), Ms = (e) => {
|
|
1803
|
+
let t = Z.value.find((t) => t.valueHash === e);
|
|
1804
|
+
t && (e in ri.value ? bn.value = bn.value.filter((t) => r(t) !== e) : bn.value = [...bn.value, t.value]);
|
|
605
1805
|
};
|
|
606
|
-
|
|
607
|
-
|
|
1806
|
+
T(E, () => {
|
|
1807
|
+
Ps.clear(), K.unselected = [], K.selected = [];
|
|
608
1808
|
});
|
|
609
|
-
let
|
|
610
|
-
let e = Array.isArray(
|
|
611
|
-
return !!(
|
|
612
|
-
}),
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
1809
|
+
let $ = h(() => {
|
|
1810
|
+
let e = Array.isArray(K.selected) ? K.selected.length : 0;
|
|
1811
|
+
return !!(A.multiple && e > 0 && !E.value || E.value && Ps.size > 0);
|
|
1812
|
+
}), Ns = h(() => N.part("selectIcon", {
|
|
1813
|
+
selected: !!E.value && !$.value,
|
|
1814
|
+
indeterminate: $.value,
|
|
1815
|
+
disabled: !!A.disabled
|
|
1816
|
+
})), Ps = tt(/* @__PURE__ */ new Set());
|
|
1817
|
+
T(() => K.unselected, (e) => {
|
|
1818
|
+
Ps.clear(), (e ?? []).forEach((e) => {
|
|
1819
|
+
Ps.add(r(e));
|
|
616
1820
|
});
|
|
617
1821
|
}, { immediate: !0 });
|
|
618
|
-
let
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
1822
|
+
let Fs = S(null), Is = ue(), Ls = () => !A.disableSelectAll && A.multiple;
|
|
1823
|
+
T([() => $.value, Ls], () => Is.onBlur());
|
|
1824
|
+
let Rs = {
|
|
1825
|
+
onBlur: () => Is.onBlur(),
|
|
1826
|
+
onChange: (e) => {
|
|
1827
|
+
if (e.target instanceof HTMLInputElement) {
|
|
1828
|
+
if (oe(e.target, A.readonly, !!E.value)) {
|
|
1829
|
+
ce(Fs.value, $.value);
|
|
1830
|
+
return;
|
|
1831
|
+
}
|
|
1832
|
+
ce(Fs.value, $.value), E.value = e.target.checked, se(() => Fs.value, () => !!E.value, () => $.value);
|
|
1833
|
+
}
|
|
1834
|
+
},
|
|
1835
|
+
onFocus: Is.onFocus,
|
|
1836
|
+
onClick: (e) => ie(e, A.readonly),
|
|
1837
|
+
onKeydown: (e) => ae(e, A.readonly)
|
|
1838
|
+
}, zs = h(() => ({
|
|
1839
|
+
...le("checkbox", {
|
|
1840
|
+
checked: !!E.value,
|
|
1841
|
+
disabled: A.disabled,
|
|
1842
|
+
indeterminate: $.value,
|
|
1843
|
+
name: `select_all_${A.name || ""}`,
|
|
1844
|
+
readonly: A.readonly,
|
|
1845
|
+
required: !1,
|
|
1846
|
+
value: !0
|
|
1847
|
+
}),
|
|
1848
|
+
...Rs
|
|
1849
|
+
})), Bs = (e) => {
|
|
1850
|
+
let t = K.unselected ?? [];
|
|
1851
|
+
if (Vs(e)) {
|
|
1852
|
+
La(e), j("item:unselected", e.value), Ps.add(e.valueHash), K.unselected = [...t, e.value];
|
|
622
1853
|
return;
|
|
623
1854
|
}
|
|
624
|
-
|
|
625
|
-
},
|
|
626
|
-
|
|
627
|
-
let t
|
|
1855
|
+
E.value || Ia(e), j("item:selected", e.value), Ps.delete(e.valueHash), K.unselected = t.filter((t) => r(t) !== r(e.value));
|
|
1856
|
+
}, Vs = (e) => E.value && Ps.has(e.valueHash) ? !1 : e.selected || E.value, Hs = h(() => {
|
|
1857
|
+
let e = /* @__PURE__ */ new Map();
|
|
1858
|
+
for (let t of Z.value) e.set(t.valueHash, t);
|
|
1859
|
+
return e;
|
|
1860
|
+
}), Us = (e) => {
|
|
1861
|
+
if (A.disabled || A.readonly || typeof A.selectable == "function" && !A.selectable(e.item)) return !0;
|
|
1862
|
+
let t = Hs.value.get(e.valueHash);
|
|
628
1863
|
return !t || !!t.disabled;
|
|
629
|
-
},
|
|
630
|
-
|
|
631
|
-
},
|
|
632
|
-
disabled:
|
|
633
|
-
name:
|
|
1864
|
+
}, Ws = (e) => {
|
|
1865
|
+
Us(e) || Bs(e);
|
|
1866
|
+
}, Gs = ge((e) => typeof e != "string", JSON.stringify), Ks = h(() => [].concat(K.selected ?? []).map((e) => ({
|
|
1867
|
+
disabled: A.disabled,
|
|
1868
|
+
name: A.name,
|
|
634
1869
|
type: "hidden",
|
|
635
|
-
value:
|
|
636
|
-
}))),
|
|
1870
|
+
value: Gs(e)
|
|
1871
|
+
}))), qs = [
|
|
637
1872
|
70,
|
|
638
1873
|
45,
|
|
639
1874
|
85,
|
|
640
1875
|
55
|
|
641
|
-
],
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
1876
|
+
], Js = h(() => ne(Z.value.length || A.columns.length || 1, 4, 10)), Ys = h(() => {
|
|
1877
|
+
let e = /* @__PURE__ */ new Map();
|
|
1878
|
+
for (let [t, n] of D.value) e.has(t) || e.set(t, n);
|
|
1879
|
+
return e;
|
|
1880
|
+
}), Xs = h(() => Xe([$i.value, N.table.style])), Zs = h(() => {
|
|
1881
|
+
let { style: e, ...t } = N.table;
|
|
1882
|
+
return {
|
|
1883
|
+
...y({
|
|
1884
|
+
ref: L,
|
|
1885
|
+
class: "bb-table__table",
|
|
1886
|
+
role: En.value,
|
|
1887
|
+
"aria-labelledby": A.caption ? Un.value : void 0,
|
|
1888
|
+
"aria-multiselectable": F.value && A.selectable && A.multiple ? "true" : void 0,
|
|
1889
|
+
"aria-rowcount": Ca.value && K.totalItems != null ? K.totalItems + 1 : void 0,
|
|
1890
|
+
...F.value ? {
|
|
1891
|
+
onKeydown: ks,
|
|
1892
|
+
onFocusout: Ts
|
|
1893
|
+
} : {}
|
|
1894
|
+
}, t),
|
|
1895
|
+
style: Xs.value
|
|
1896
|
+
};
|
|
1897
|
+
}), Qs = h(() => Xe([oa.value, N.rootAttrs.style])), $s = h(() => {
|
|
1898
|
+
let { style: e, ...t } = N.rootAttrs;
|
|
1899
|
+
return {
|
|
1900
|
+
...y({
|
|
1901
|
+
id: A.id,
|
|
1902
|
+
ref: R,
|
|
1903
|
+
"aria-busy": xa.value,
|
|
1904
|
+
class: wa.value,
|
|
1905
|
+
"data-bb-table-id": In.value,
|
|
1906
|
+
inert: A.disabled
|
|
1907
|
+
}, t),
|
|
1908
|
+
style: Qs.value
|
|
1909
|
+
};
|
|
1910
|
+
}), ec = h(() => ({
|
|
1911
|
+
passthrough: N,
|
|
1912
|
+
slots: M,
|
|
1913
|
+
selectable: A.selectable,
|
|
1914
|
+
multiple: !!A.multiple,
|
|
1915
|
+
readonly: !!A.readonly,
|
|
1916
|
+
actions: P.value,
|
|
1917
|
+
grid: F.value,
|
|
1918
|
+
treegrid: Tn.value,
|
|
1919
|
+
cellRole: Dn.value,
|
|
1920
|
+
rowHeaderKeys: On.value,
|
|
1921
|
+
contentInert: Sa.value,
|
|
1922
|
+
hasRowIndex: Ca.value,
|
|
1923
|
+
rowOffset: Ca.value ? ((K.page ?? 1) - 1) * (K.perPage ?? 0) : 0,
|
|
1924
|
+
setSize: Ca.value ? K.totalItems ?? void 0 : void 0,
|
|
1925
|
+
columnSpan: Ta.value,
|
|
1926
|
+
inputName: jn,
|
|
1927
|
+
tdClass: A.tdClass,
|
|
1928
|
+
cellClasses: yr.value,
|
|
1929
|
+
sortOrders: Ys.value,
|
|
1930
|
+
measureRow: Yo,
|
|
1931
|
+
expandRegionId: Mn
|
|
1932
|
+
})), tc = h(() => {
|
|
1933
|
+
let e = [], t = +!!A.selectable;
|
|
1934
|
+
return A.selectable && A.fixedSelect && e.push({
|
|
1935
|
+
index: 0,
|
|
1936
|
+
position: "left"
|
|
1937
|
+
}), B.value.forEach((n, r) => {
|
|
1938
|
+
n.fixed && e.push({
|
|
1939
|
+
index: r + t,
|
|
1940
|
+
position: n.fixed
|
|
1941
|
+
});
|
|
1942
|
+
}), P.value && A.fixedActions && e.push({
|
|
1943
|
+
index: B.value.length + t,
|
|
1944
|
+
position: "right"
|
|
1945
|
+
}), e;
|
|
1946
|
+
}), nc = h(() => tc.value.map((e) => typeof e == "number" ? `${e}:left` : `${e.index}:${e.position}`).join(","));
|
|
1947
|
+
return T(() => [
|
|
1948
|
+
Zo.value,
|
|
1949
|
+
nc.value,
|
|
1950
|
+
ga.value
|
|
1951
|
+
], ([, e, t], n) => {
|
|
1952
|
+
let r = n?.[1], i = tc.value;
|
|
1953
|
+
if (L.value && (e.length || r?.length)) {
|
|
1954
|
+
let a = e === r && t === n?.[2];
|
|
1955
|
+
xe(L.value, i, a ? pa : null, a) && (da = e);
|
|
1956
|
+
}
|
|
1957
|
+
M.thead && b(ha);
|
|
1958
|
+
}, { flush: "post" }), $e(() => {
|
|
1959
|
+
wr(), Gr();
|
|
1960
|
+
}), (e, t) => (x(), Ve(it(ya.value), Ye(Ke($s.value)), {
|
|
1961
|
+
default: dt(() => [
|
|
1962
|
+
e.selectable ? (x(), _("legend", xt, C(ba.value), 1)) : g("", !0),
|
|
1963
|
+
e.caption ? (x(), _("div", y({
|
|
1964
|
+
key: 1,
|
|
1965
|
+
id: Un.value,
|
|
1966
|
+
class: ["bb-table__caption", { "bb-sr-only": !e.displayCaption }]
|
|
1967
|
+
}, w(N).caption), C(e.caption), 17, St)) : g("", !0),
|
|
1968
|
+
e.reorderable || e.resizable ? (x(), _("div", {
|
|
1969
|
+
key: 2,
|
|
1970
|
+
id: Wn.value,
|
|
1971
|
+
class: "bb-sr-only"
|
|
1972
|
+
}, [e.reorderable ? (x(), _(Be, { key: 0 }, [He(C(w(I)("table.reorderInstructions").value), 1)], 64)) : g("", !0), e.resizable && !q.value ? (x(), _(Be, { key: 1 }, [He(C(w(I)("table.resizeInstructions").value), 1)], 64)) : g("", !0)], 8, Ct)) : g("", !0),
|
|
1973
|
+
v("span", wt, C(xa.value ? e.loadingText || w(I)("common.loadingText").value : ""), 1),
|
|
1974
|
+
e.reorderable ? (x(), _(Be, { key: 3 }, [v("span", Tt, C(tr.value), 1), v("div", {
|
|
1975
|
+
ref_key: "ghostRef",
|
|
1976
|
+
ref: Mr,
|
|
1977
|
+
"aria-hidden": "true",
|
|
1978
|
+
class: "bb-table-column-ghost",
|
|
1979
|
+
popover: "manual"
|
|
1980
|
+
}, [(x(), _("svg", y({
|
|
1981
|
+
"aria-hidden": "true",
|
|
1982
|
+
class: "bb-table__drag-icon",
|
|
1983
|
+
fill: "none",
|
|
1984
|
+
height: "1em",
|
|
1985
|
+
stroke: "currentColor",
|
|
1986
|
+
"stroke-linecap": "round",
|
|
1987
|
+
"stroke-linejoin": "round",
|
|
1988
|
+
"stroke-width": "2",
|
|
1989
|
+
viewBox: "0 0 24 24",
|
|
1990
|
+
width: "1em"
|
|
1991
|
+
}, w(N).dragIcon), t[0] ||= [v("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)), v("span", null, C(jr.value), 1)], 512)], 64)) : g("", !0),
|
|
1992
|
+
v("div", Ye(Ke(Zs.value)), [
|
|
1993
|
+
v("div", y({
|
|
1994
|
+
class: ["bb-table__head", {
|
|
1995
|
+
"bb-table__head--dragging": W.value === "dragging",
|
|
1996
|
+
"bb-table__head--resizing": mr.value !== null
|
|
1997
|
+
}],
|
|
1998
|
+
inert: Sa.value,
|
|
1999
|
+
role: "rowgroup"
|
|
2000
|
+
}, w(N).head), [rt(e.$slots, "thead", {}, () => [v("div", y({
|
|
2001
|
+
"aria-rowindex": Ca.value ? 1 : void 0,
|
|
2002
|
+
class: ["bb-table__header-row", e.headerRowClass],
|
|
2003
|
+
role: "row",
|
|
2004
|
+
onPointerdown: ei,
|
|
2005
|
+
onTouchmove: ti
|
|
2006
|
+
}, w(N).headerRow), [
|
|
2007
|
+
e.selectable ? (x(), _("div", y({
|
|
674
2008
|
key: 0,
|
|
675
|
-
class:
|
|
676
|
-
|
|
677
|
-
|
|
2009
|
+
class: ["bb-table__cell-column-header bb-table__cell-column-header--select", e.thClass],
|
|
2010
|
+
role: "columnheader",
|
|
2011
|
+
tabindex: uo(0)
|
|
2012
|
+
}, w(N).cellColumnHeader), [rt(e.$slots, "header:select", {
|
|
678
2013
|
multiple: e.multiple,
|
|
679
|
-
selectAll: !!
|
|
680
|
-
text: e.selectText ||
|
|
681
|
-
}, () => [v("span",
|
|
2014
|
+
selectAll: !!E.value,
|
|
2015
|
+
text: e.selectText || w(I)("table.selectText").value
|
|
2016
|
+
}, () => [v("span", kt, [!e.disableSelectAll && e.multiple ? (x(), _("label", {
|
|
682
2017
|
key: 0,
|
|
683
|
-
class:
|
|
684
|
-
}, [(
|
|
685
|
-
key:
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
2018
|
+
class: Je(["bb-table-check__label", { "bb-table-check__label--disabled": e.disabled }])
|
|
2019
|
+
}, [(x(), _("span", {
|
|
2020
|
+
key: $.value.toString(),
|
|
2021
|
+
class: "bb-table-check"
|
|
2022
|
+
}, [v("input", y({
|
|
2023
|
+
ref_key: "selectAllInput",
|
|
2024
|
+
ref: Fs
|
|
2025
|
+
}, zs.value), null, 16), Ue(re, y({
|
|
2026
|
+
checked: !!E.value,
|
|
2027
|
+
class: "bb-table__select-icon",
|
|
2028
|
+
disabled: !!e.disabled,
|
|
2029
|
+
"focus-visible": w(Is).focusVisible.value,
|
|
2030
|
+
focused: w(Is).focused.value,
|
|
2031
|
+
"has-errors": !1,
|
|
2032
|
+
"has-warnings": !1,
|
|
2033
|
+
indeterminate: !!$.value,
|
|
2034
|
+
readonly: !!e.readonly
|
|
2035
|
+
}, Ns.value), null, 16, [
|
|
696
2036
|
"checked",
|
|
697
2037
|
"disabled",
|
|
2038
|
+
"focus-visible",
|
|
2039
|
+
"focused",
|
|
698
2040
|
"indeterminate",
|
|
699
|
-
"name",
|
|
700
2041
|
"readonly"
|
|
701
|
-
])), v("span",
|
|
702
|
-
(
|
|
703
|
-
key:
|
|
704
|
-
"aria-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
"bb-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
},
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
2042
|
+
])])), v("span", At, C(e.selectAllLabel || w(I)("table.selectAllLabel").value), 1)], 2)) : e.multiple ? g("", !0) : (x(), _("span", jt, C(e.selectText || w(I)("table.selectText").value), 1))])])], 16, Ot)) : g("", !0),
|
|
2043
|
+
(x(!0), _(Be, null, nt(Ja.value, (n, r) => (x(), _("div", y({
|
|
2044
|
+
key: n.key,
|
|
2045
|
+
"aria-describedby": Gn.value ? Wn.value : void 0,
|
|
2046
|
+
"aria-sort": n.sortDirection ?? (n.sortable ? "none" : void 0),
|
|
2047
|
+
class: ["bb-table__cell-column-header", [n.classes, {
|
|
2048
|
+
"bb-table__cell-column-header--edge-start": r === 0,
|
|
2049
|
+
"bb-table__cell-column-header--edge-end": r === Ja.value.length - 1,
|
|
2050
|
+
"bb-table__cell-column-header--clip": Xi.value.has(n.key),
|
|
2051
|
+
"bb-table__cell-column-header--dragging": Ar.value === n.key,
|
|
2052
|
+
"bb-table__cell-column-header--locked": e.reorderable && Zn.value.has(n.key),
|
|
2053
|
+
"bb-table__cell-column-header--sortable": n.sortable,
|
|
2054
|
+
"bb-table__cell-column-header--sorted": !!n.sortOrder,
|
|
2055
|
+
"bb-table__cell-column-header--sorted-desc": n.sortOrder === "desc",
|
|
2056
|
+
"bb-table__cell-column-header--resizing": mr.value === n.key,
|
|
2057
|
+
"bb-table__cell-column-header--floored": n.key in Ga.value
|
|
2058
|
+
}]],
|
|
2059
|
+
style: Ga.value[n.key],
|
|
2060
|
+
"data-column-key": Gn.value || kn.value ? n.key : void 0,
|
|
2061
|
+
role: "columnheader",
|
|
2062
|
+
tabindex: kn.value ? uo(r + Number(!!e.selectable)) : Gn.value ? n.key === ir.value ? 0 : -1 : void 0,
|
|
2063
|
+
onClick: (e) => ar(e, n),
|
|
2064
|
+
onFocus: (e) => or(n.key),
|
|
2065
|
+
onKeydown: (e) => lr(e, n.key),
|
|
2066
|
+
ref_for: !0
|
|
2067
|
+
}, w(N).part("cellColumnHeader", xn(n.sortOrder))), [
|
|
2068
|
+
Ya(n.key, "prepend") ? (x(), Ve(it(Ya(n.key, "prepend")), y({
|
|
2069
|
+
key: 0,
|
|
2070
|
+
ref_for: !0
|
|
2071
|
+
}, Xa(n)), null, 16)) : g("", !0),
|
|
2072
|
+
rt(e.$slots, n.slotName, {
|
|
2073
|
+
classes: n.classes,
|
|
2074
|
+
hideColumn: () => Yn(n.key),
|
|
2075
|
+
items: w(Aa),
|
|
2076
|
+
label: n.label,
|
|
2077
|
+
sortOrder: n.sortOrder,
|
|
2078
|
+
sortable: n.sortable,
|
|
2079
|
+
toggleSort: () => fi(n.key)
|
|
2080
|
+
}, () => [n.sortable ? (x(), Ve(f, {
|
|
2081
|
+
key: 0,
|
|
2082
|
+
class: Je(["bb-table-sort", {
|
|
2083
|
+
"bb-table-sort--asc": n.sortOrder === "asc",
|
|
2084
|
+
"bb-table-sort--desc": n.sortOrder === "desc"
|
|
2085
|
+
}]),
|
|
2086
|
+
tabindex: Gn.value || kn.value ? -1 : void 0,
|
|
2087
|
+
type: "button",
|
|
2088
|
+
onClick: () => fi(n.key)
|
|
2089
|
+
}, {
|
|
2090
|
+
default: dt(() => [v("span", Nt, C(n.label), 1), (x(), _("svg", y({
|
|
2091
|
+
"aria-hidden": "true",
|
|
2092
|
+
class: "bb-table__sort-icon",
|
|
2093
|
+
fill: "none",
|
|
2094
|
+
height: "1em",
|
|
2095
|
+
stroke: "currentColor",
|
|
2096
|
+
"stroke-linecap": "round",
|
|
2097
|
+
"stroke-linejoin": "round",
|
|
2098
|
+
"stroke-width": "2",
|
|
2099
|
+
viewBox: "0 0 24 24",
|
|
2100
|
+
width: "1em",
|
|
2101
|
+
ref_for: !0
|
|
2102
|
+
}, w(N).part("sortIcon", xn(n.sortOrder))), t[1] ||= [v("path", { d: "M12 20V4m-7 7l7-7l7 7" }, null, -1)], 16))]),
|
|
2103
|
+
_: 2
|
|
2104
|
+
}, 1032, [
|
|
2105
|
+
"class",
|
|
2106
|
+
"tabindex",
|
|
2107
|
+
"onClick"
|
|
2108
|
+
])) : (x(), _("span", Pt, C(n.label), 1))]),
|
|
2109
|
+
Ya(n.key, "append") ? (x(), Ve(it(Ya(n.key, "append")), y({
|
|
2110
|
+
key: 1,
|
|
2111
|
+
ref_for: !0
|
|
2112
|
+
}, Xa(n)), null, 16)) : g("", !0),
|
|
2113
|
+
e.resizable && !q.value ? (x(), _("div", {
|
|
2114
|
+
key: 2,
|
|
2115
|
+
"aria-hidden": "true",
|
|
2116
|
+
class: "bb-table-header__resizer",
|
|
2117
|
+
onDblclick: ft((e) => Sr(n.key), ["stop"]),
|
|
2118
|
+
onPointerdown: (e) => kr(e, n.key)
|
|
2119
|
+
}, null, 40, Ft)) : g("", !0)
|
|
2120
|
+
], 16, Mt))), 128)),
|
|
2121
|
+
P.value ? (x(), _("div", y({
|
|
734
2122
|
key: 1,
|
|
735
|
-
class:
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
2123
|
+
class: ["bb-table__cell-column-header bb-table__cell-column-header--actions", e.thClass],
|
|
2124
|
+
role: "columnheader",
|
|
2125
|
+
tabindex: uo(Ta.value - 1)
|
|
2126
|
+
}, w(N).cellColumnHeader), [rt(e.$slots, "header:actions", { text: e.actionsText || w(I)("table.actionsText").value }, () => [v("span", Lt, C(e.actionsText || w(I)("table.actionsText").value), 1)])], 16, It)) : g("", !0)
|
|
2127
|
+
], 16, Dt)])], 16, Et),
|
|
2128
|
+
v("div", y({
|
|
2129
|
+
ref_key: "bodyRef",
|
|
2130
|
+
ref: ho,
|
|
2131
|
+
class: "bb-table__body",
|
|
2132
|
+
role: "rowgroup",
|
|
2133
|
+
onFocusin: xo,
|
|
2134
|
+
onFocusout: So
|
|
2135
|
+
}, w(N).body), [xa.value && !w(Z).length ? rt(e.$slots, "loading", {
|
|
740
2136
|
key: 0,
|
|
741
|
-
items:
|
|
742
|
-
}, () => [(
|
|
2137
|
+
items: w(Aa)
|
|
2138
|
+
}, () => [(x(!0), _(Be, null, nt(Js.value, (n, r) => (x(), _("div", {
|
|
743
2139
|
key: r,
|
|
744
|
-
"aria-rowindex":
|
|
745
|
-
class: "bb-table-skeleton__row"
|
|
2140
|
+
"aria-rowindex": Ca.value ? r + 2 : void 0,
|
|
2141
|
+
class: "bb-table-skeleton__row",
|
|
2142
|
+
role: "row"
|
|
746
2143
|
}, [
|
|
747
|
-
e.selectable ? (
|
|
748
|
-
|
|
2144
|
+
e.selectable ? (x(), _("div", {
|
|
2145
|
+
key: 0,
|
|
2146
|
+
class: "bb-table-skeleton__cell bb-table-skeleton__cell--select",
|
|
2147
|
+
role: Dn.value
|
|
2148
|
+
}, t[2] ||= [v("div", { class: "bb-table-skeleton__placeholder" }, null, -1)], 8, zt)) : g("", !0),
|
|
2149
|
+
(x(!0), _(Be, null, nt(B.value, (e, n) => (x(), _("div", {
|
|
749
2150
|
key: e.key,
|
|
750
|
-
class:
|
|
751
|
-
|
|
2151
|
+
class: Je(["bb-table-skeleton__cell", [`bb-table-skeleton__cell--${e.skeleton ?? "text"}`]]),
|
|
2152
|
+
role: Dn.value
|
|
2153
|
+
}, [!e.skeleton || e.skeleton === "text" ? (x(), _("div", Vt, [v("div", {
|
|
752
2154
|
class: "bb-table-skeleton__line",
|
|
753
|
-
style:
|
|
2155
|
+
style: Xe({ width: `${qs[(r + n) % 4]}%` })
|
|
754
2156
|
}, null, 4), v("div", {
|
|
755
2157
|
class: "bb-table-skeleton__line",
|
|
756
|
-
style:
|
|
757
|
-
}, null, 4)])) : e.skeleton === "avatar" ? (
|
|
2158
|
+
style: Xe({ width: `${qs[(r + n + 2) % 4]}%` })
|
|
2159
|
+
}, null, 4)])) : e.skeleton === "avatar" ? (x(), _("div", Ht)) : e.skeleton === "avatar-text" ? (x(), _("div", Ut, [t[3] ||= v("div", { class: "bb-table-skeleton__avatar" }, null, -1), v("div", Wt, [v("div", {
|
|
758
2160
|
class: "bb-table-skeleton__line",
|
|
759
|
-
style:
|
|
2161
|
+
style: Xe({ width: `${qs[(r + n) % 4]}%` })
|
|
760
2162
|
}, null, 4), v("div", {
|
|
761
2163
|
class: "bb-table-skeleton__line",
|
|
762
|
-
style:
|
|
763
|
-
}, null, 4)])])) : e.skeleton === "image" ? (
|
|
764
|
-
|
|
765
|
-
], 8, ze))), 128))]) : D(Y).length ? T(e.$slots, "tbody", { key: 2 }, () => [(S(!0), _(m, null, w(wn.value, (t, n) => (S(), _(m, { key: t.valueHash }, [v("tr", {
|
|
766
|
-
"aria-current": t.highlighted ? "true" : void 0,
|
|
767
|
-
"aria-rowindex": J.value && t.rowIndex ? t.rowIndex : void 0,
|
|
768
|
-
class: b(["bb-table-data__row", [t.rowClasses, { "bb-table-data__row--highlighted": t.highlighted }]]),
|
|
769
|
-
inert: sn.value,
|
|
770
|
-
tabindex: e.keyboardNavigation ? n === X.value ? 0 : -1 : void 0,
|
|
771
|
-
onClick: t.onRowClick,
|
|
772
|
-
onContextmenu: t.onRowContextMenu,
|
|
773
|
-
onDblclick: t.onRowDblClick,
|
|
774
|
-
onFocus: () => Dn(n),
|
|
775
|
-
onKeydown: (e) => On(e, n)
|
|
776
|
-
}, [
|
|
777
|
-
e.selectable ? (S(), _("td", {
|
|
778
|
-
key: 0,
|
|
779
|
-
class: b(["bb-table-data__cell bb-table-data__cell--select", e.tdClass])
|
|
780
|
-
}, [T(e.$slots, "select", {
|
|
781
|
-
checked: $(t),
|
|
782
|
-
disabled: Pn(t),
|
|
783
|
-
inputName: D(st),
|
|
784
|
-
item: t.item,
|
|
785
|
-
readonly: !!e.readonly,
|
|
786
|
-
toggleSelected: () => Fn(t),
|
|
787
|
-
value: t.value
|
|
788
|
-
}, () => [e.multiple ? (S(), _("label", {
|
|
789
|
-
key: 0,
|
|
790
|
-
class: b(["bb-table-check__label", { "bb-table-check__label--disabled": t.disabled }])
|
|
791
|
-
}, [_e(d, {
|
|
792
|
-
checked: $(t),
|
|
793
|
-
class: "bb-table-check",
|
|
794
|
-
disabled: t.disabled,
|
|
795
|
-
readonly: e.readonly,
|
|
796
|
-
onChange: () => Nn(t)
|
|
797
|
-
}, null, 8, [
|
|
798
|
-
"checked",
|
|
799
|
-
"disabled",
|
|
800
|
-
"readonly",
|
|
801
|
-
"onChange"
|
|
802
|
-
]), v("span", Qe, E(t.accessibleLabel), 1)], 2)) : (S(), _("label", {
|
|
2164
|
+
style: Xe({ width: `${qs[(r + n + 2) % 4]}%` })
|
|
2165
|
+
}, null, 4)])])) : e.skeleton === "image" ? (x(), _("div", Gt)) : e.skeleton === "badge" ? (x(), _("div", Kt)) : g("", !0)], 10, Bt))), 128)),
|
|
2166
|
+
P.value ? (x(), _("div", {
|
|
803
2167
|
key: 1,
|
|
804
|
-
class:
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
disabled: t.disabled,
|
|
809
|
-
name: D(st),
|
|
810
|
-
readonly: e.readonly,
|
|
811
|
-
value: t.value,
|
|
812
|
-
onChange: () => Nn(t)
|
|
813
|
-
}, null, 8, [
|
|
814
|
-
"checked",
|
|
815
|
-
"disabled",
|
|
816
|
-
"name",
|
|
817
|
-
"readonly",
|
|
818
|
-
"value",
|
|
819
|
-
"onChange"
|
|
820
|
-
]), v("span", $e, E(t.accessibleLabel), 1)], 2))])], 2)) : g("", !0),
|
|
821
|
-
(S(!0), _(m, null, w(t.cols, (n, r) => (S(), _("td", {
|
|
822
|
-
key: n.key,
|
|
823
|
-
class: b(["bb-table-data__cell", [n.classes, {
|
|
824
|
-
"bb-table-data__cell--edge-start": r === 0,
|
|
825
|
-
"bb-table-data__cell--edge-end": r === t.cols.length - 1
|
|
826
|
-
}]])
|
|
827
|
-
}, [T(e.$slots, n.slotName, {
|
|
828
|
-
classes: n.classes,
|
|
829
|
-
content: n.content,
|
|
830
|
-
expandProps: jn(t),
|
|
831
|
-
expanded: t.expanded,
|
|
832
|
-
highlighted: t.highlighted,
|
|
833
|
-
item: t.item,
|
|
834
|
-
selected: $(t),
|
|
835
|
-
sortOrder: gt(n.key),
|
|
836
|
-
toggleExpanded: () => Z(t.valueHash),
|
|
837
|
-
toggleHighlighted: () => z(t),
|
|
838
|
-
toggleSelected: () => Fn(t),
|
|
839
|
-
value: t.value
|
|
840
|
-
}, () => [ge(E(n.content), 1)])], 2))), 128)),
|
|
841
|
-
e.actions ? (S(), _("td", {
|
|
842
|
-
key: 1,
|
|
843
|
-
class: b(["bb-table__cell bb-table__cell--actions", e.tdClass])
|
|
844
|
-
}, [T(e.$slots, "actions", {
|
|
845
|
-
expandProps: jn(t),
|
|
846
|
-
expanded: t.expanded,
|
|
847
|
-
highlighted: t.highlighted,
|
|
848
|
-
item: t.item,
|
|
849
|
-
selected: $(t),
|
|
850
|
-
toggleExpanded: () => Z(t.valueHash),
|
|
851
|
-
toggleHighlighted: () => z(t),
|
|
852
|
-
toggleSelected: () => Fn(t),
|
|
853
|
-
value: t.value
|
|
854
|
-
})], 2)) : g("", !0)
|
|
855
|
-
], 42, Ze), t.expanded ? (S(), _("tr", {
|
|
2168
|
+
class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions",
|
|
2169
|
+
role: Dn.value
|
|
2170
|
+
}, t[4] ||= [v("div", { class: "bb-table-skeleton__placeholder" }, null, -1)], 8, qt)) : g("", !0)
|
|
2171
|
+
], 8, Rt))), 128))]) : w(Z).length ? rt(e.$slots, "tbody", { key: 2 }, () => [(x(!0), _(Be, null, nt(Zo.value, (e) => (x(), _(Be, { key: e.key }, [e.kind === "spacer" ? (x(), _("div", {
|
|
856
2172
|
key: 0,
|
|
857
|
-
|
|
858
|
-
"
|
|
859
|
-
|
|
860
|
-
},
|
|
861
|
-
class: "bb-table-expand__cell",
|
|
862
|
-
colspan: ln.value
|
|
863
|
-
}, [T(e.$slots, "expand", {
|
|
864
|
-
expandProps: jn(t),
|
|
865
|
-
expanded: t.expanded,
|
|
866
|
-
highlighted: t.highlighted,
|
|
867
|
-
item: t.item,
|
|
868
|
-
selected: $(t),
|
|
869
|
-
toggleExpanded: () => Z(t.valueHash),
|
|
870
|
-
toggleHighlighted: () => z(t),
|
|
871
|
-
toggleSelected: () => Fn(t),
|
|
872
|
-
value: t.value
|
|
873
|
-
})], 8, tt)], 10, et)) : g("", !0)], 64))), 128))]) : (S(), _("tr", {
|
|
2173
|
+
"aria-hidden": "true",
|
|
2174
|
+
class: "bb-table-spacer__row bb-table-placeholder__row",
|
|
2175
|
+
style: Xe({ height: `${e.height}px` })
|
|
2176
|
+
}, null, 4)) : e.kind === "placeholder" ? (x(), _("div", {
|
|
874
2177
|
key: 1,
|
|
875
|
-
"aria-
|
|
876
|
-
class: "bb-table-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
2178
|
+
"aria-hidden": "true",
|
|
2179
|
+
class: "bb-table-placeholder__row bb-table-placeholder__row--pending",
|
|
2180
|
+
"data-index": e.virtualIndex,
|
|
2181
|
+
style: Xe({ height: `${e.height}px` })
|
|
2182
|
+
}, null, 12, Zt)) : e.kind === "row" ? (x(), Ve(w(ve), {
|
|
2183
|
+
key: 2,
|
|
2184
|
+
context: ec.value,
|
|
2185
|
+
index: e.index,
|
|
2186
|
+
item: e.item,
|
|
2187
|
+
"select-blocked": Us(e.item),
|
|
2188
|
+
selected: Vs(e.item),
|
|
2189
|
+
stop: lo(e.virtualIndex),
|
|
2190
|
+
"virtual-index": e.virtualIndex
|
|
2191
|
+
}, null, 8, [
|
|
2192
|
+
"context",
|
|
2193
|
+
"index",
|
|
2194
|
+
"item",
|
|
2195
|
+
"select-blocked",
|
|
2196
|
+
"selected",
|
|
2197
|
+
"stop",
|
|
2198
|
+
"virtual-index"
|
|
2199
|
+
])) : (x(), Ve(w(ye), {
|
|
881
2200
|
key: 3,
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
2201
|
+
context: ec.value,
|
|
2202
|
+
item: e.item,
|
|
2203
|
+
selected: Vs(e.item),
|
|
2204
|
+
stop: lo(e.virtualIndex),
|
|
2205
|
+
"virtual-index": e.virtualIndex
|
|
2206
|
+
}, null, 8, [
|
|
2207
|
+
"context",
|
|
2208
|
+
"item",
|
|
2209
|
+
"selected",
|
|
2210
|
+
"stop",
|
|
2211
|
+
"virtual-index"
|
|
2212
|
+
]))], 64))), 128))]) : (x(), _("div", {
|
|
2213
|
+
key: 1,
|
|
2214
|
+
"aria-rowindex": Ca.value ? 2 : void 0,
|
|
2215
|
+
class: "bb-table-empty__row",
|
|
2216
|
+
role: "row"
|
|
2217
|
+
}, [v("div", {
|
|
2218
|
+
"aria-colspan": Ta.value,
|
|
2219
|
+
class: "bb-table-empty__cell",
|
|
2220
|
+
role: Dn.value
|
|
2221
|
+
}, [rt(e.$slots, "empty", {}, () => [v("span", Xt, C(e.emptyText || w(I)("common.emptyText").value), 1)])], 8, Yt)], 8, Jt))], 16),
|
|
2222
|
+
v("div", y({
|
|
2223
|
+
class: "bb-table__foot",
|
|
2224
|
+
role: M.tfoot ? "rowgroup" : void 0
|
|
2225
|
+
}, w(N).foot), [rt(e.$slots, "tfoot", { columnCount: Ta.value })], 16, Qt)
|
|
2226
|
+
], 16),
|
|
2227
|
+
(x(!0), _(Be, null, nt(Ks.value, (e) => (x(), _("input", y({
|
|
893
2228
|
key: e.value,
|
|
894
2229
|
ref_for: !0
|
|
895
2230
|
}, e), null, 16))), 128))
|
|
896
2231
|
]),
|
|
897
2232
|
_: 3
|
|
898
|
-
},
|
|
899
|
-
"id",
|
|
900
|
-
"aria-busy",
|
|
901
|
-
"class",
|
|
902
|
-
"data-bb-table-id",
|
|
903
|
-
"inert",
|
|
904
|
-
"style"
|
|
905
|
-
]));
|
|
2233
|
+
}, 16));
|
|
906
2234
|
}
|
|
907
2235
|
});
|
|
908
2236
|
//#endregion
|
|
909
|
-
export {
|
|
2237
|
+
export { E as default };
|