bitboss-ui 3.0.0-beta.71 → 3.0.0-beta.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/bin/cli.mjs +9 -3
- package/dist/ai/BbAccordion.md +38 -19
- package/dist/ai/BbBadge.md +25 -22
- package/dist/ai/BbBreadcrumbs.md +1 -1
- package/dist/ai/BbButton.md +32 -27
- package/dist/ai/BbCalendar.md +1 -0
- package/dist/ai/BbCarousel.md +6 -4
- package/dist/ai/BbCheckboxGroup.md +2 -1
- package/dist/ai/BbColorInput.md +1 -1
- package/dist/ai/BbConfirm.md +65 -81
- package/dist/ai/BbConfirmPortal.md +2 -2
- package/dist/ai/BbDatePicker.md +1 -6
- package/dist/ai/BbDatePickerInput.md +2 -2
- package/dist/ai/BbDialog.md +233 -164
- package/dist/ai/BbDropdown.md +52 -16
- package/dist/ai/BbDropdownButton.md +11 -12
- package/dist/ai/BbDropzone.md +12 -8
- package/dist/ai/BbForm.md +100 -13
- package/dist/ai/BbHost.md +2 -2
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbIcon.md +1 -1
- package/dist/ai/BbIndicator.md +17 -15
- package/dist/ai/BbNumberInput.md +7 -5
- package/dist/ai/BbOffCanvas.md +29 -7
- package/dist/ai/BbPagination.md +2 -2
- package/dist/ai/BbPopover.md +15 -9
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbRadioGroup.md +29 -7
- package/dist/ai/BbRating.md +8 -7
- package/dist/ai/BbSelect.md +29 -8
- package/dist/ai/BbSelectPopover.md +9 -3
- package/dist/ai/BbSlider.md +12 -8
- package/dist/ai/BbSpinner.md +3 -2
- package/dist/ai/BbSwitch.md +3 -3
- package/dist/ai/BbSwitchGroup.md +7 -6
- package/dist/ai/BbTable.md +205 -82
- package/dist/ai/BbTabs.md +29 -4
- package/dist/ai/BbTag.md +1 -1
- package/dist/ai/BbTextInput.md +7 -5
- package/dist/ai/BbTextarea.md +4 -3
- package/dist/ai/BbTimePickerInput.md +1 -1
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTooltip.md +22 -17
- package/dist/ai/BbTree.md +49 -24
- package/dist/ai/CommonFieldInput.md +1 -1
- package/dist/ai/changelog.json +242 -9
- package/dist/ai/components.json +52 -51
- package/dist/ai/composables/useBbDialog.md +5 -8
- package/dist/ai/composables/useBbForm.md +3 -0
- package/dist/ai/composables/useConfirm.md +65 -56
- package/dist/ai/composables/useToast.md +2 -1
- package/dist/ai/guides/agent-contract.md +3 -3
- package/dist/ai/guides/app-layout.md +3 -2
- package/dist/ai/guides/eslint-rules.md +3 -1
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/floating-bottom-panel.md +3 -2
- package/dist/ai/guides/icons-policy.md +7 -5
- package/dist/ai/guides/inertia-helpers.md +35 -30
- package/dist/ai/guides/installation-and-plugin-setup.md +17 -14
- package/dist/ai/guides/migration/adoption-checklist.md +2 -2
- package/dist/ai/guides/migration/components/bb-badge.md +12 -1
- package/dist/ai/guides/migration/components/bb-button.md +24 -0
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +11 -0
- package/dist/ai/guides/migration/components/bb-tabs.md +2 -2
- package/dist/ai/guides/migration/components/bb-toast.md +11 -0
- package/dist/ai/guides/migration/components/use-confirm.md +72 -26
- package/dist/ai/guides/migration/v2-to-v3.md +52 -10
- package/dist/ai/guides/migration/v3-beta-css-classes.md +1 -1
- package/dist/ai/guides/options-items-playbook.md +4 -3
- package/dist/ai/guides/passthrough.md +2 -2
- package/dist/ai/helpers/inertia/manifest.json +28 -15
- package/dist/ai/helpers/inertia/messages.ts +3 -3
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +10 -10
- package/dist/ai/helpers/inertia/usePromiseForm.ts +1 -1
- package/dist/ai/helpers/inertia/usePromiseRouter.ts +7 -2
- package/dist/ai/index.md +3 -3
- package/dist/ai/manifest/common.json +3 -3
- package/dist/ai/manifest/components/BbAccordion.json +8 -5
- package/dist/ai/manifest/components/BbAccordion.tree.json +1 -0
- package/dist/ai/manifest/components/BbBadge.json +8 -7
- package/dist/ai/manifest/components/BbBadge.removed.json +3 -1
- package/dist/ai/manifest/components/BbBadge.tree.json +73 -0
- package/dist/ai/manifest/components/BbBreadcrumbs.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +5 -6
- package/dist/ai/manifest/components/BbButton.removed.json +3 -1
- package/dist/ai/manifest/components/BbButton.tree.json +24 -7
- package/dist/ai/manifest/components/BbCalendar.json +2 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbColorInput.json +1 -1
- package/dist/ai/manifest/components/BbColorInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbConfirm.json +2 -2
- package/dist/ai/manifest/components/BbConfirm.removed.json +9 -0
- package/dist/ai/manifest/components/BbConfirm.tree.json +4 -5
- package/dist/ai/manifest/components/BbConfirmPortal.json +3 -3
- package/dist/ai/manifest/components/BbConfirmPortal.removed.json +7 -0
- package/dist/ai/manifest/components/BbDatePicker.json +2 -1
- package/dist/ai/manifest/components/BbDatePicker.tree.json +0 -6
- package/dist/ai/manifest/components/BbDatePickerInput.json +2 -2
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbDialog.json +6 -1
- package/dist/ai/manifest/components/BbDialog.tree.json +41 -1
- package/dist/ai/manifest/components/BbDropdown.json +9 -8
- package/dist/ai/manifest/components/BbDropdown.tree.json +4 -0
- package/dist/ai/manifest/components/BbDropdownButton.json +8 -9
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +3 -1
- package/dist/ai/manifest/components/BbForm.json +3 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.json +6 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +40 -0
- package/dist/ai/manifest/components/BbPagination.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +4 -3
- package/dist/ai/manifest/components/BbRating.json +2 -2
- package/dist/ai/manifest/components/BbSelect.json +16 -15
- package/dist/ai/manifest/components/BbSelect.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +1 -0
- package/dist/ai/manifest/components/BbSwitch.json +4 -4
- package/dist/ai/manifest/components/BbSwitchGroup.json +7 -7
- package/dist/ai/manifest/components/BbTable.json +15 -14
- package/dist/ai/manifest/components/BbTable.tree.json +2 -0
- package/dist/ai/manifest/components/BbTabs.json +3 -3
- package/dist/ai/manifest/components/BbTabsList.json +1 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +1 -1
- package/dist/ai/manifest/components/BbTag.json +1 -1
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextarea.json +1 -1
- package/dist/ai/manifest/components/BbTextarea.tree.json +1 -1
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbToast.removed.json +2 -1
- package/dist/ai/manifest/components/BbTree.json +2 -2
- package/dist/ai/manifest/components/CommonFieldInput.tree.json +3 -3
- package/dist/ai/manifest/index.json +4 -4
- package/dist/ai/manifest/meta.json +5 -1
- package/dist/ai/manifest/types.advanced.json +9 -9
- package/dist/ai/manifest/types.api.json +6 -5
- package/dist/ai/recipes/inertia/approvals-inbox.md +23 -16
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -3
- package/dist/ai/recipes/inertia/onboarding.md +23 -12
- package/dist/ai/recipes/inertia/ownership-atlas.md +34 -18
- package/dist/ai/recipes/inertia/record-form.md +12 -8
- package/dist/ai/recipes/inertia/records-workspace.md +14 -7
- package/dist/ai/recipes/inertia/settings-workspace.md +75 -60
- package/dist/ai/recipes/inertia/upload-center.md +17 -9
- package/dist/ai/recipes/inertia/wizard-form.md +2 -2
- package/dist/ai/recipes/nuxt/approvals-inbox.md +23 -16
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -3
- package/dist/ai/recipes/nuxt/onboarding.md +5 -4
- package/dist/ai/recipes/nuxt/ownership-atlas.md +34 -18
- package/dist/ai/recipes/nuxt/record-form.md +14 -10
- package/dist/ai/recipes/nuxt/records-workspace.md +14 -7
- package/dist/ai/recipes/nuxt/settings-workspace.md +70 -60
- package/dist/ai/recipes/nuxt/upload-center.md +17 -9
- package/dist/ai/recipes/nuxt/wizard-form.md +4 -4
- package/dist/ai/recipes/vue/approvals-inbox.md +23 -16
- package/dist/ai/recipes/vue/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -3
- package/dist/ai/recipes/vue/onboarding.md +5 -4
- package/dist/ai/recipes/vue/ownership-atlas.md +34 -18
- package/dist/ai/recipes/vue/record-form.md +14 -10
- package/dist/ai/recipes/vue/records-workspace.md +14 -7
- package/dist/ai/recipes/vue/settings-workspace.md +70 -60
- package/dist/ai/recipes/vue/upload-center.md +17 -9
- package/dist/ai/recipes/vue/wizard-form.md +4 -4
- package/dist/ai/source/BbAccordion.md +50 -16
- package/dist/ai/source/BbBadge.md +420 -26
- package/dist/ai/source/BbBadgeButton.md +378 -12
- package/dist/ai/source/BbButton.md +205 -55
- package/dist/ai/source/BbCalendar.md +5 -0
- package/dist/ai/source/BbCheckboxGroup.md +38 -13
- package/dist/ai/source/BbConfigScope.md +19 -2
- package/dist/ai/source/BbConfirm.md +74 -80
- package/dist/ai/source/BbConfirmPortal.md +6 -6
- package/dist/ai/source/BbDatePicker.md +9 -2
- package/dist/ai/source/BbDatePickerInput.md +3 -1
- package/dist/ai/source/BbDialog.md +53 -2
- package/dist/ai/source/BbDropdown.md +350 -98
- package/dist/ai/source/BbDropdownButton.md +20 -12
- package/dist/ai/source/BbDropdownGroup.md +136 -58
- package/dist/ai/source/BbForm.md +152 -11
- package/dist/ai/source/BbOffCanvas.md +53 -2
- package/dist/ai/source/BbPagination.md +1 -1
- package/dist/ai/source/BbRadioGroup.md +72 -10
- package/dist/ai/source/BbRating.md +30 -22
- package/dist/ai/source/BbSelect.md +11 -1
- package/dist/ai/source/BbSelectPopover.md +105 -34
- package/dist/ai/source/BbSwitch.md +23 -8
- package/dist/ai/source/BbSwitchGroup.md +67 -21
- package/dist/ai/source/BbTable.md +359 -48
- package/dist/ai/source/BbTabs.md +6 -0
- package/dist/ai/source/BbTabsList.md +10 -0
- package/dist/ai/source/BbTabsPanels.md +6 -0
- package/dist/ai/source/BbTabsRoot.md +6 -0
- package/dist/ai/source/BbTree.md +14 -4
- package/dist/ai/source/CommonFieldInput.md +2 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +7 -3
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +52 -38
- package/dist/components/BbAccordion/ptKeys.generated.d.ts +20 -0
- package/dist/components/BbAccordion/types.d.ts +21 -7
- package/dist/components/BbAccordion/types.js +1 -1
- package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +65 -42
- package/dist/components/BbBadge/types.d.ts +15 -12
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +79 -73
- package/dist/components/BbButton/types.d.ts +7 -6
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +2 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbCalendar/types.d.ts +5 -0
- package/dist/components/BbCalendar/useCalendarGrid.js +1 -1
- package/dist/components/BbCalendar/useDayGrid.js +1 -1
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +10 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbCheckboxGroup/types.d.ts +2 -2
- package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +71 -132
- package/dist/components/BbConfirm/ptKeys.generated.d.ts +5 -5
- package/dist/components/BbConfirm/types.d.ts +5 -5
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +2 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/components/BbDatePicker/types.d.ts +5 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/components/BbDatePickerInput/types.d.ts +2 -1
- package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +263 -235
- package/dist/components/BbDialog/overlayActions.js +94 -0
- package/dist/components/BbDialog/types.d.ts +24 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +382 -332
- package/dist/components/BbDropdown/dropdownHandle.js +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +58 -48
- package/dist/components/BbDropdown/types.d.ts +107 -48
- package/dist/components/BbDropdown/types.js +2 -2
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +71 -71
- package/dist/components/BbDropdownButton/types.d.ts +2 -4
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -1
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +241 -199
- package/dist/components/BbForm/recognizeValidation.d.ts +9 -0
- package/dist/components/BbForm/recognizeValidation.js +55 -0
- package/dist/components/BbForm/validationError.d.ts +10 -0
- package/dist/components/BbForm/validationError.js +11 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +414 -389
- package/dist/components/BbOffCanvas/sheetAttrs.js +5 -5
- package/dist/components/BbOffCanvas/types.d.ts +24 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +10 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +173 -157
- package/dist/components/BbRadioGroup/types.d.ts +9 -3
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +112 -103
- package/dist/components/BbRating/types.d.ts +3 -2
- package/dist/components/BbSelect/BbSelect.vue.d.ts +9 -8
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/components/BbSelect/types.d.ts +8 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +11 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +513 -502
- package/dist/components/BbSelectPopover/types.d.ts +10 -2
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -0
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +85 -73
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +10 -4
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +171 -152
- package/dist/components/BbSwitchGroup/types.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +36 -25
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1338 -1215
- package/dist/components/BbTable/BbTableDataRow.js +2 -1
- package/dist/components/BbTable/BbTableRowMenu.js +36 -0
- package/dist/components/BbTable/types.d.ts +32 -17
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbTabs/types.d.ts +6 -0
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +1 -1
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +88 -94
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/components/BbTree/types.d.ts +8 -2
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +39 -39
- package/dist/composables/formSubmitLock.js +15 -8
- package/dist/composables/overlayRegistry.d.ts +5 -0
- package/dist/composables/overlayRegistry.js +154 -148
- package/dist/composables/useBbDropdown.d.ts +8 -0
- package/dist/composables/useBbDropdown.js +3 -1
- package/dist/composables/useBbTabs.js +138 -138
- package/dist/composables/useConfirm.d.ts +63 -52
- package/dist/composables/useConfirm.js +22 -18
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +7 -7
- package/dist/directives/bbDropdown.js +21 -14
- package/dist/directives/bbTooltip.d.ts +3 -3
- package/dist/directives/createPopoverDirective.js +57 -35
- package/dist/i18n/locales/ar.json +5 -1
- package/dist/i18n/locales/cs.json +5 -1
- package/dist/i18n/locales/da.json +5 -1
- package/dist/i18n/locales/de-CH.json +5 -1
- package/dist/i18n/locales/de.json +5 -1
- package/dist/i18n/locales/el.json +5 -1
- package/dist/i18n/locales/en-GB.json +5 -1
- package/dist/i18n/locales/en.json +5 -1
- package/dist/i18n/locales/es-MX.json +5 -1
- package/dist/i18n/locales/es.json +5 -1
- package/dist/i18n/locales/fa.json +5 -1
- package/dist/i18n/locales/fi.json +5 -1
- package/dist/i18n/locales/fr.json +5 -1
- package/dist/i18n/locales/he.json +5 -1
- package/dist/i18n/locales/hu.json +5 -1
- package/dist/i18n/locales/it.json +5 -1
- package/dist/i18n/locales/ja.json +5 -1
- package/dist/i18n/locales/ko.json +5 -1
- package/dist/i18n/locales/nb.json +5 -1
- package/dist/i18n/locales/nl.json +5 -1
- package/dist/i18n/locales/pl.json +5 -1
- package/dist/i18n/locales/pt-BR.json +5 -1
- package/dist/i18n/locales/pt-PT.json +5 -1
- package/dist/i18n/locales/ro.json +5 -1
- package/dist/i18n/locales/ru.json +5 -1
- package/dist/i18n/locales/sv.json +5 -1
- package/dist/i18n/locales/tr.json +5 -1
- package/dist/i18n/locales/uk.json +5 -1
- package/dist/i18n/locales/zh-CN.json +5 -1
- package/dist/i18n/locales/zh-HK.json +5 -1
- package/dist/i18n/locales/zh-TW.json +5 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -3
- package/dist/llms-full.txt +1997 -1151
- package/dist/llms-medium.txt +21 -18
- package/dist/llms.txt +2 -2
- package/dist/locale-blueprint.json +5 -1
- package/dist/plugin.js +17 -40
- package/dist/pluginCore.js +30 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +26 -5
- package/dist/types/ActionButton.js +11 -0
- package/dist/types/ConfigDefaults.d.ts +34 -3
- package/dist/types/ConfigDefaults.js +14 -8
- package/dist/types/ItemPath.d.ts +33 -4
- package/dist/types/ptComponentMap.d.ts +1 -1
- package/dist/utilities/functions/clickCount.js +14 -0
- package/dist/utilities/functions/hash.js +90 -3
- package/dist/utilities/functions/isEqual.js +61 -3
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite.js +0 -1
- package/llms.txt +2 -2
- package/package.json +12 -2
- package/scripts/README.md +43 -39
- package/scripts/lib/adoption-checklist.json +2 -2
- package/scripts/lib/eslint-disable.mjs +5 -3
- package/scripts/lib/eslint-plugin.d.ts +2 -0
- package/scripts/lib/eslint-plugin.mjs +213 -1
- package/scripts/lib/helpers-add.mjs +21 -2
- package/scripts/lib/redundant-item-accessor.mjs +4 -1
- package/scripts/lib/release-results.mjs +180 -5
- package/scripts/lib/renamed-item-field.mjs +4 -1
- package/scripts/lib/tab-links.mjs +4 -1
- package/scripts/lib/tree-default-expandable.mjs +53 -0
- package/scripts/lib/validate-bb-markup.mjs +536 -52
package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -56,13 +56,13 @@ import { transitions as u } from "../../utilities/misc/transitions.js";
|
|
|
56
56
|
import { removedPropsFor as it } from "../../deprecation/removedProps.js";
|
|
57
57
|
import { warnRemovedAttrs as at } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
58
58
|
import { hasVnodeListener as ot } from "../../utilities/functions/hasVnodeListener.js";
|
|
59
|
-
import { Fragment as st, computed as d, createBlock as ct, createCommentVNode as
|
|
60
|
-
import { createReusableTemplate as
|
|
59
|
+
import { Fragment as st, computed as d, createBlock as ct, createCommentVNode as f, createElementBlock as p, createElementVNode as lt, createSlots as ut, createTextVNode as dt, createVNode as m, defineComponent as ft, getCurrentInstance as pt, guardReactiveProps as h, mergeProps as g, nextTick as mt, normalizeProps as _, onBeforeMount as ht, onBeforeUnmount as gt, onDeactivated as _t, openBlock as v, ref as y, renderList as vt, renderSlot as b, shallowRef as yt, toDisplayString as bt, toRef as x, unref as S, vModelText as xt, watch as C, withCtx as w, withDirectives as St, withKeys as Ct, withModifiers as T } from "vue";
|
|
60
|
+
import { createReusableTemplate as wt, useDebounceFn as Tt, useElementSize as Et, useIntersectionObserver as Dt } from "@vueuse/core";
|
|
61
61
|
// src/components/BbSelectPopover/BbSelectPopover.vue?vue&type=script&setup=true&lang.ts
|
|
62
|
-
var
|
|
62
|
+
var Ot = {
|
|
63
63
|
key: 0,
|
|
64
64
|
class: "bb-select-popover__search-container"
|
|
65
|
-
},
|
|
65
|
+
}, kt = [
|
|
66
66
|
"id",
|
|
67
67
|
"aria-activedescendant",
|
|
68
68
|
"aria-controls",
|
|
@@ -73,8 +73,8 @@ var kt = {
|
|
|
73
73
|
"inputmode",
|
|
74
74
|
"placeholder",
|
|
75
75
|
"tabindex"
|
|
76
|
-
], jt = {
|
|
77
|
-
key:
|
|
76
|
+
], At = ["id"], jt = {
|
|
77
|
+
key: 2,
|
|
78
78
|
"aria-hidden": "true",
|
|
79
79
|
class: "bb-select-popover__search-strip"
|
|
80
80
|
}, Mt = [
|
|
@@ -88,7 +88,7 @@ var kt = {
|
|
|
88
88
|
], Nt = {
|
|
89
89
|
key: 0,
|
|
90
90
|
class: "bb-select-popover__sheet-selection"
|
|
91
|
-
}, Pt = { class: "bb-select-popover__sheet-chips" }, Ft = ["inert"], It = ["inert"],
|
|
91
|
+
}, Pt = { class: "bb-select-popover__sheet-chips" }, Ft = ["inert"], It = ["inert"], E = /*@__PURE__*/ ft({
|
|
92
92
|
__name: "BbSelectPopover",
|
|
93
93
|
props: {
|
|
94
94
|
"pt:root": {},
|
|
@@ -174,6 +174,7 @@ var kt = {
|
|
|
174
174
|
loading: { type: Boolean },
|
|
175
175
|
loadingText: {},
|
|
176
176
|
max: { default: Infinity },
|
|
177
|
+
minQueryLength: { default: 0 },
|
|
177
178
|
modelValue: {},
|
|
178
179
|
modelValueDebounceTime: { default: 0 },
|
|
179
180
|
multiple: { type: Boolean },
|
|
@@ -212,107 +213,108 @@ var kt = {
|
|
|
212
213
|
"update:modelValue",
|
|
213
214
|
"option:add"
|
|
214
215
|
],
|
|
215
|
-
setup(u, { emit:
|
|
216
|
-
let
|
|
216
|
+
setup(u, { emit: ft }) {
|
|
217
|
+
let E = u, D = ft, Lt = Fe(null, "popoverOffset"), O = et({
|
|
217
218
|
component: "BbSelectPopover",
|
|
218
|
-
props:
|
|
219
|
+
props: E,
|
|
219
220
|
parts: Qe.parts,
|
|
220
221
|
states: Qe.states,
|
|
221
222
|
active: { open: () => X.value },
|
|
222
|
-
facts: (e) => ({ known:
|
|
223
|
+
facts: (e) => ({ known: L(e) })
|
|
223
224
|
}), Rt = Ne();
|
|
224
225
|
process.env.NODE_ENV !== "production" && at("BbSelectPopover", it("BbSelectPopover"));
|
|
225
|
-
let [zt, Bt] =
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
let [zt, Bt] = wt(), [Vt, Ht] = wt();
|
|
227
|
+
ht(() => {
|
|
228
|
+
E.multiple && !Array.isArray(E.modelValue) && ie().throw(`BbSelectPopover: \`multiple\` requires an array modelValue, received ${E.modelValue === null ? "null" : typeof E.modelValue}. Seed it with \`[]\` for an empty selection — \`null\`/\`undefined\` are not accepted, because a multi-select with no array has no way to express "nothing selected" separately from "not ready".`);
|
|
228
229
|
});
|
|
229
|
-
let
|
|
230
|
-
if (
|
|
231
|
-
let e = i(
|
|
230
|
+
let k = y(), A = y(null), Ut = y(null), Wt = y(null), Gt = y(null), Kt = y(), qt = d(() => {
|
|
231
|
+
if (E.anchor) {
|
|
232
|
+
let e = i(E.anchor);
|
|
232
233
|
if (e) return e;
|
|
233
234
|
}
|
|
234
|
-
return
|
|
235
|
-
}), { width: Jt } =
|
|
235
|
+
return k.value;
|
|
236
|
+
}), { width: Jt } = Et(() => r(qt.value), {
|
|
236
237
|
width: 0,
|
|
237
238
|
height: 0
|
|
238
|
-
}, { box: "border-box" }), Yt = d(() =>
|
|
239
|
+
}, { box: "border-box" }), Yt = d(() => E.activator != null), Xt = (e) => {
|
|
239
240
|
let t = i(e);
|
|
240
|
-
t && (
|
|
241
|
+
t && (k.value = t);
|
|
241
242
|
};
|
|
242
|
-
|
|
243
|
-
let r =
|
|
244
|
-
t ?
|
|
245
|
-
inPanel: (e) => !!Gt.value?.$el.contains(e) || !!document.getElementById(`${
|
|
243
|
+
C(() => E.activator, (t, n) => {
|
|
244
|
+
let r = k.value;
|
|
245
|
+
t ? k.value = i(t) ?? void 0 : n && (k.value = void 0), r && !k.value && X.value && e({
|
|
246
|
+
inPanel: (e) => !!Gt.value?.$el.contains(e) || !!document.getElementById(`${M}_listbox`)?.closest("dialog")?.contains(e),
|
|
246
247
|
close: $,
|
|
247
|
-
activator: () =>
|
|
248
|
+
activator: () => k.value
|
|
248
249
|
});
|
|
249
250
|
}, { immediate: !0 });
|
|
250
|
-
let { isMobile: Zt } = Ae(), Qt = d(() =>
|
|
251
|
-
if (Qt.value !== "auto" || !Array.isArray(
|
|
251
|
+
let { isMobile: Zt } = Ae(), Qt = d(() => E.disableWriting ?? "auto"), $t = Fe(null, "autoDisableWritingThreshold"), en = pt(), tn = () => {
|
|
252
|
+
if (Qt.value !== "auto" || !Array.isArray(E.items)) return !1;
|
|
252
253
|
let e = $t() ?? 6;
|
|
253
|
-
return !(e > 0) || ot(en, "option:add") ? !1 :
|
|
254
|
-
}, nn =
|
|
254
|
+
return !(e > 0) || ot(en, "option:add") ? !1 : E.items.length < e;
|
|
255
|
+
}, nn = y(tn()), j = d(() => {
|
|
255
256
|
let e = Qt.value;
|
|
256
257
|
return e === "auto" ? !nn.value : e === "mobile" ? !Zt.value : e === "desktop" ? Zt.value : !e;
|
|
257
|
-
}), rn = d(() => Qt.value === "mobile" && Zt.value || Qt.value === "desktop" && !Zt.value ? "none" : void 0), { t: an } = ke(), on = d(() =>
|
|
258
|
-
let e =
|
|
259
|
-
return X.value &&
|
|
260
|
-
}), dn = !1, { resume: fn, pause: pn } =
|
|
258
|
+
}), rn = d(() => Qt.value === "mobile" && Zt.value || Qt.value === "desktop" && !Zt.value ? "none" : void 0), { t: an } = ke(), on = d(() => E.searchInputAriaLabel ?? an("select.searchLabel").value), sn = d(() => !!E.clearable && (P.value.length > 0 || (E.multiple ? Array.isArray(E.modelValue) && E.modelValue.length > 0 : !ae(E.modelValue)))), cn = pe().id.value, M = E.id || cn, ln = d(() => E.ariaInvalid ?? !!E.hasErrors ? "true" : void 0), un = d(() => {
|
|
259
|
+
let e = E.ariaDescribedby, t = Array.isArray(e) ? e.map((e) => e.trim()).filter(Boolean) : typeof e == "string" && e.trim() ? [e.trim()] : [];
|
|
260
|
+
return X.value && I.value !== null && t.push(`${M}_listbox_failed`), X.value && Zn.value && j.value && t.push(`${M}_search_hint`), t.length ? t.join(" ") : void 0;
|
|
261
|
+
}), dn = !1, { resume: fn, pause: pn } = Dt(() => r(k.value), async ([{ intersectionRatio: e }]) => {
|
|
261
262
|
if (dn) {
|
|
262
263
|
dn = !1;
|
|
263
264
|
return;
|
|
264
265
|
}
|
|
265
266
|
if (e >= .99 || !X.value) return;
|
|
266
|
-
let t =
|
|
267
|
+
let t = k.value;
|
|
267
268
|
t && await l(t) || X.value && await $();
|
|
268
269
|
}, {
|
|
269
270
|
threshold: [0, 1],
|
|
270
271
|
immediate: !1
|
|
271
272
|
}), mn = d(() => {
|
|
272
|
-
if (
|
|
273
|
-
if (
|
|
273
|
+
if (E.width === "auto") return "auto";
|
|
274
|
+
if (E.width == null || E.width === "") return Jt.value ? `${Jt.value}px` : "320px";
|
|
274
275
|
try {
|
|
275
|
-
let { value: e, unit: t } = ce(
|
|
276
|
+
let { value: e, unit: t } = ce(E.width);
|
|
276
277
|
return t === "%" ? Jt.value ? `${Jt.value * (e / 100)}px` : "320px" : `${e}${t}`;
|
|
277
278
|
} catch {
|
|
278
|
-
return typeof
|
|
279
|
+
return typeof E.width == "string" ? E.width.trim() : Jt.value ? `${Jt.value}px` : "320px";
|
|
279
280
|
}
|
|
280
|
-
}), hn = d(() =>
|
|
281
|
+
}), hn = d(() => g({ class: "bb-select-popover__panel" }, Z.value ? {} : O.panel ?? {})), gn = d(() => g({
|
|
281
282
|
class: ["bb-select-popover bb-select-popover--sheet", {
|
|
282
|
-
"bb-select-popover--errors":
|
|
283
|
-
"bb-select-popover--warnings":
|
|
283
|
+
"bb-select-popover--errors": Ei.value,
|
|
284
|
+
"bb-select-popover--warnings": Di.value,
|
|
284
285
|
"bb-select-popover--loading": Y.value,
|
|
285
|
-
"bb-select-popover--reloading":
|
|
286
|
+
"bb-select-popover--reloading": wi.value,
|
|
286
287
|
"bb-select-popover--clearable-active": sn.value
|
|
287
288
|
}],
|
|
288
289
|
tabindex: -1
|
|
289
|
-
}, hn.value)), _n = d(() => ({ "--w": mn.value })),
|
|
290
|
-
|
|
290
|
+
}, hn.value)), _n = d(() => ({ "--w": mn.value })), N = () => {
|
|
291
|
+
k.value?.focus();
|
|
291
292
|
}, vn = () => {
|
|
292
293
|
Ut.value instanceof HTMLInputElement && Ut.value.focus();
|
|
293
294
|
}, yn = () => {
|
|
294
295
|
Wt.value instanceof HTMLButtonElement && Wt.value.focus();
|
|
295
296
|
}, bn = () => {
|
|
296
|
-
|
|
297
|
+
j.value ? vn() : yn();
|
|
297
298
|
}, xn = () => {
|
|
298
299
|
let e = document.activeElement;
|
|
299
|
-
return e === Ut.value || !!
|
|
300
|
+
return e === Ut.value || !!k.value?.contains(e);
|
|
300
301
|
}, Sn = (e) => {
|
|
301
|
-
|
|
302
|
+
D("focus", e), Sa();
|
|
302
303
|
}, Cn = (e) => {
|
|
303
|
-
|
|
304
|
+
D("blur", e), Ea();
|
|
304
305
|
}, wn = (e) => {
|
|
305
|
-
|
|
306
|
+
D("change", e);
|
|
306
307
|
}, Tn = (e) => {
|
|
307
|
-
|
|
308
|
+
Sa();
|
|
308
309
|
}, En = (e) => {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
310
|
+
if (D("input", e), Zn.value && !$n) return;
|
|
311
|
+
$n = F.value, Lr();
|
|
312
|
+
let t = Ar;
|
|
313
|
+
Promise.resolve(nr(() => (t = Ar, [
|
|
314
|
+
F.value,
|
|
313
315
|
"search",
|
|
314
|
-
|
|
315
|
-
]))).then((e) =>
|
|
316
|
+
E.modelValue
|
|
317
|
+
]))).then((e) => ji(t, "search", e));
|
|
316
318
|
}, Dn = (e) => {
|
|
317
319
|
Kt.value = e;
|
|
318
320
|
}, On = async (e) => {
|
|
@@ -321,19 +323,19 @@ var kt = {
|
|
|
321
323
|
let n = qt.value?.contains(t), r = !!t.closest(".bb-common-popover");
|
|
322
324
|
if (n || r || e.type === "focusin" && qt.value && t.contains(qt.value)) return;
|
|
323
325
|
let i = t instanceof HTMLLabelElement ? t : t.closest("label");
|
|
324
|
-
i?.control && qt.value?.contains(i.control) || (await $(),
|
|
325
|
-
}, kn = d(() => !(
|
|
326
|
+
i?.control && qt.value?.contains(i.control) || (await $(), Ca());
|
|
327
|
+
}, kn = d(() => !(E.readonly || E.disabled || Y.value && !ar.value.length)), An = new AbortController(), jn = async () => Ze(() => !!A.value, {
|
|
326
328
|
interval: 100,
|
|
327
329
|
signal: An.signal
|
|
328
330
|
}), Mn = () => {
|
|
329
|
-
let e =
|
|
330
|
-
e?.valueHash ?
|
|
331
|
+
let e = bi.value[0];
|
|
332
|
+
e?.valueHash ? A.value?.focusByHash(e.valueHash) : A.value?.focusFirstSelected();
|
|
331
333
|
}, Nn = () => {
|
|
332
|
-
let e =
|
|
333
|
-
e?.valueHash ?
|
|
334
|
+
let e = bi.value[bi.value.length - 1];
|
|
335
|
+
e?.valueHash ? A.value?.focusByHash(e.valueHash) : A.value?.focusLastSelected();
|
|
334
336
|
}, Pn = null, Fn = (e) => {
|
|
335
337
|
let t = (async () => {
|
|
336
|
-
await
|
|
338
|
+
await _a({ focusPopoverContent: !1 }), await jn(), await Ve(E.transitionDuration), e();
|
|
337
339
|
})();
|
|
338
340
|
Pn = t;
|
|
339
341
|
let n = () => {
|
|
@@ -343,17 +345,17 @@ var kt = {
|
|
|
343
345
|
}, In = async () => {
|
|
344
346
|
for (; Pn;) await Pn.catch(() => void 0);
|
|
345
347
|
}, Ln = async () => {
|
|
346
|
-
kn.value && (await In(), X.value ? (
|
|
348
|
+
kn.value && (await In(), X.value ? (ma(), A.value?.focusPrevious()) : await Fn(Nn));
|
|
347
349
|
}, Rn = async () => {
|
|
348
|
-
kn.value && (await In(), X.value ? (
|
|
350
|
+
kn.value && (await In(), X.value ? (ma(), A.value?.focusNext()) : await Fn(Mn));
|
|
349
351
|
}, zn = async (e) => {
|
|
350
|
-
kn.value && (await In(), X.value || await Fn(() => void 0),
|
|
352
|
+
kn.value && (await In(), X.value || await Fn(() => void 0), ma(), e === "first" ? A.value?.focusFirst() : A.value?.focusLast());
|
|
351
353
|
}, Bn = () => zn("first"), Vn = () => zn("last"), Hn = Re({
|
|
352
|
-
candidates: () => (
|
|
354
|
+
candidates: () => (E.groupBy ? ea.value.flatMap((e) => e.options) : Zi.value).filter((e) => !e.disabled),
|
|
353
355
|
getTokens: (e) => [Le(String(e.text ?? ""), Rt.locale)],
|
|
354
|
-
getCurrent: () =>
|
|
356
|
+
getCurrent: () => A.value?.getHighlighted() ?? void 0,
|
|
355
357
|
onMatch: (e) => {
|
|
356
|
-
|
|
358
|
+
ma(), A.value?.focusByHash(e.valueHash);
|
|
357
359
|
},
|
|
358
360
|
locale: () => Rt.locale
|
|
359
361
|
}), Un = async (e) => {
|
|
@@ -363,24 +365,24 @@ var kt = {
|
|
|
363
365
|
let n = t.value.length;
|
|
364
366
|
t.setRangeText(e.key, t.selectionStart ?? n, t.selectionEnd ?? n, "end"), t.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
365
367
|
}, Wn = async (e) => {
|
|
366
|
-
Ie(e) && (
|
|
368
|
+
Ie(e) && (j.value ? Pn && await Un(e) : kn.value && (e.preventDefault(), X.value || (await _a({ focusPopoverContent: !1 }), await jn(), await Ve(E.transitionDuration)), Hn.onKeydown(e)));
|
|
367
369
|
}, Gn = async () => {
|
|
368
370
|
if (!kn.value) return;
|
|
369
371
|
if (await In(), !X.value) {
|
|
370
372
|
await Fn(() => {
|
|
371
|
-
|
|
373
|
+
bi.value.length ? Mn() : j.value ? vn() : yn();
|
|
372
374
|
});
|
|
373
375
|
return;
|
|
374
376
|
}
|
|
375
|
-
if (
|
|
376
|
-
|
|
377
|
+
if (A.value?.getHighlighted()) {
|
|
378
|
+
A.value.confirmOption();
|
|
377
379
|
return;
|
|
378
380
|
}
|
|
379
|
-
if (!
|
|
380
|
-
let e =
|
|
381
|
-
|
|
381
|
+
if (!j.value || Zn.value) return;
|
|
382
|
+
let e = P.value.trim();
|
|
383
|
+
Rr(e) || (D("option:add", e), P.value = "");
|
|
382
384
|
}, Kn = async () => {
|
|
383
|
-
X.value && (await $(),
|
|
385
|
+
X.value && (await $(), N());
|
|
384
386
|
}, qn = {
|
|
385
387
|
ArrowDown: () => Rn(),
|
|
386
388
|
ArrowUp: () => Ln(),
|
|
@@ -395,362 +397,366 @@ var kt = {
|
|
|
395
397
|
t && (e.stopPropagation(), e.preventDefault(), t());
|
|
396
398
|
}, Yn = Symbol("bb-select-popover-escape"), Xn = (e) => {
|
|
397
399
|
X.value && e.key === "Escape" && he(Yn) && (e.stopImmediatePropagation(), e.preventDefault(), Kn());
|
|
398
|
-
},
|
|
399
|
-
|
|
400
|
-
|
|
400
|
+
}, P = y(""), Zn = d(() => E.minQueryLength > 0 && [...P.value.trim()].length < E.minQueryLength), F = d(() => Zn.value ? "" : P.value), Qn = d(() => E.minQueryLength > 1 ? an("select.searchMinLength", E.minQueryLength).value : an("select.searchToStart").value), $n = "";
|
|
401
|
+
C(P, (e) => {
|
|
402
|
+
e || ($n = "");
|
|
403
|
+
}, { flush: "sync" });
|
|
404
|
+
let er = y(!1), { getter: tr, debouncedGetter: nr, clientReproducible: rr, hydratedFromSsr: ir, items: ar, loading: or, error: I, ssrMarker: sr, startedArgs: cr, settledArgs: lr, settledCount: ur, inFlight: dr, discard: fr, discardScheduled: pr } = ye({
|
|
405
|
+
items: x(E, "items"),
|
|
406
|
+
debounce: E.queryDebounceTime,
|
|
401
407
|
marker: !0
|
|
402
|
-
}), { array:
|
|
408
|
+
}), { array: mr, add: hr, remove: gr, set: _r } = le(), vr = d(() => E.multiple ? !!E.modelValue?.length : !ae(E.modelValue)), { getOptionValue: yr } = ee(), { getOptionText: br } = te(), xr = Oe();
|
|
403
409
|
De(null);
|
|
404
|
-
let
|
|
405
|
-
let e = Te(
|
|
410
|
+
let Sr = () => E.knownItems === void 0 ? xr?.rows() : E.knownItems, Cr = /* @__PURE__ */ new WeakSet(), L = (e) => typeof e == "object" && !!e && Cr.has(e), wr = /* @__PURE__ */ new Map(), R = d(() => {
|
|
411
|
+
let e = Te(Sr()), t = /* @__PURE__ */ new Map();
|
|
406
412
|
for (let [n, r] of e) {
|
|
407
|
-
let i = s(r), a =
|
|
413
|
+
let i = s(r), a = wr.get(n), o = a?.contents === i ? a.row : r;
|
|
408
414
|
e.set(n, o), t.set(n, {
|
|
409
415
|
row: o,
|
|
410
416
|
contents: i
|
|
411
|
-
}),
|
|
417
|
+
}), Cr.add(o);
|
|
412
418
|
}
|
|
413
|
-
return
|
|
414
|
-
}),
|
|
415
|
-
alreadyLoaded:
|
|
416
|
-
clientReproducible:
|
|
417
|
-
trigger: d(() => Array.isArray(
|
|
419
|
+
return wr = t, e;
|
|
420
|
+
}), Tr = (e) => s(L(e) ? e.value : yr(e, E.itemValue)), Er = d(() => s([...R.value.values()])), Dr = d(() => R.value.size > 0), Or = d(() => Sr() != null), kr = d(() => Ee(R.value, E.modelValue, E.multiple)), z = y("none"), Ar = 0, jr = d(() => z.value === "none" && kr.value), Mr = d(() => E.prefill === !1 && !Array.isArray(E.items) && j.value && (!vr.value || kr.value)), Nr = d(() => I.value === null ? Mr.value && !F.value ? Qn.value : E.emptyText : E.failedText || an("common.failedText").value), { hasPrefilled: B, isPrefilling: Pr, canLoad: Fr, prefill: Ir, markPrefilled: Lr } = Me({
|
|
421
|
+
alreadyLoaded: ir,
|
|
422
|
+
clientReproducible: rr,
|
|
423
|
+
trigger: d(() => Array.isArray(E.items) || E.prefill === !0 || E.enforceCoherence && vr.value && !jr.value || E.prefill === "interaction" && er.value),
|
|
418
424
|
currentValue: void 0,
|
|
419
425
|
multiple: !1,
|
|
420
426
|
fn: async () => {
|
|
421
|
-
await
|
|
427
|
+
await Mi(F.value, "initial", E.modelValue) === "applied" && (E.stash && hr(...q.value.filter((e) => e.selected).map((e) => e.item)), yi());
|
|
422
428
|
}
|
|
423
|
-
}),
|
|
429
|
+
}), V = d(() => E.multiple ? [].concat(E.modelValue) : [E.modelValue]), { data: H, get: Rr } = ve({ items: V }), U = yt(/* @__PURE__ */ new Map()), W = /* @__PURE__ */ new Map(), zr = /* @__PURE__ */ new Map(), Br = d(() => !!E.stash || Dr.value), Vr = d(() => {
|
|
424
430
|
let e = /* @__PURE__ */ new Map();
|
|
425
|
-
for (let t of
|
|
426
|
-
let n = s(
|
|
431
|
+
for (let t of mr.value) {
|
|
432
|
+
let n = s(yr(t, E.itemValue));
|
|
427
433
|
e.has(n) || e.set(n, t);
|
|
428
434
|
}
|
|
429
435
|
return e;
|
|
430
|
-
}),
|
|
431
|
-
disabled:
|
|
432
|
-
itemText:
|
|
433
|
-
itemProps:
|
|
434
|
-
itemValue:
|
|
436
|
+
}), Hr = d(() => kr.value || Fr.value || er.value), Ur = (e) => U.value.get(e) ?? (Hr.value ? R.value.get(e) : void 0) ?? Vr.value.get(e), Wr = {
|
|
437
|
+
disabled: x(() => E.disabled),
|
|
438
|
+
itemText: E.itemText,
|
|
439
|
+
itemProps: x(() => E.itemProps),
|
|
440
|
+
itemValue: E.itemValue,
|
|
435
441
|
optionDefaults: !0,
|
|
436
|
-
max:
|
|
437
|
-
selectable:
|
|
438
|
-
selectedIndexedByHash:
|
|
439
|
-
},
|
|
440
|
-
...
|
|
441
|
-
items:
|
|
442
|
-
}),
|
|
442
|
+
max: x(() => E.max),
|
|
443
|
+
selectable: x(() => E.selectable),
|
|
444
|
+
selectedIndexedByHash: H
|
|
445
|
+
}, Gr = ue({
|
|
446
|
+
...Wr,
|
|
447
|
+
items: ar
|
|
448
|
+
}), Kr = d(() => {
|
|
443
449
|
let e = /* @__PURE__ */ new Map();
|
|
444
|
-
return
|
|
450
|
+
return Gr.baseOptions.value.forEach((t, n) => {
|
|
445
451
|
e.has(t.valueHash) || e.set(t.valueHash, n);
|
|
446
452
|
}), e;
|
|
447
|
-
}),
|
|
453
|
+
}), G = d(() => {
|
|
448
454
|
let e = /* @__PURE__ */ new Map();
|
|
449
|
-
for (let t of
|
|
455
|
+
for (let t of Gr.baseOptions.value) e.has(t.valueHash) || e.set(t.valueHash, t.item);
|
|
450
456
|
return e;
|
|
451
|
-
}),
|
|
457
|
+
}), qr = (e) => {
|
|
452
458
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
453
|
-
for (let r of
|
|
459
|
+
for (let r of V.value) {
|
|
454
460
|
let i = s(r);
|
|
455
461
|
if (n.has(i)) continue;
|
|
456
462
|
n.add(i);
|
|
457
|
-
let a =
|
|
463
|
+
let a = Ur(i);
|
|
458
464
|
a === void 0 || e().has(i) || t.push(a);
|
|
459
465
|
}
|
|
460
466
|
return t;
|
|
461
|
-
},
|
|
462
|
-
let t =
|
|
463
|
-
return t.length ? e && e.length === t.length && e.every((e, n) => e === t[n]) ? e : t :
|
|
464
|
-
}),
|
|
465
|
-
let t = Q.value ?
|
|
466
|
-
if (e && typeof
|
|
467
|
+
}, Jr = /* @__PURE__ */ new Map(), Yr = [], Xr = y(!1), Zr = (e, t) => t.length ? e && e.length === t.length && e.every((e, n) => e === t[n]) ? e : t : Yr, Qr = d((e) => Zr(e, qr(() => Jr))), $r = d((e) => {
|
|
468
|
+
let t = qr(() => G.value);
|
|
469
|
+
return t.length ? e && e.length === t.length && e.every((e, n) => e === t[n]) ? e : t : Yr;
|
|
470
|
+
}), K = yt([]), ei = [], ti = ({ keepSticky: e = !0 } = {}) => {
|
|
471
|
+
let t = Q.value ? qr(() => Jr) : $r.value, n = [], r = /* @__PURE__ */ new Set(), i = H.value;
|
|
472
|
+
if (e && typeof E.items == "function") for (let e of ei) {
|
|
467
473
|
if (i[e] === void 0) continue;
|
|
468
|
-
let t =
|
|
474
|
+
let t = G.value.get(e) ?? Ur(e);
|
|
469
475
|
t !== void 0 && (n.push({
|
|
470
476
|
valueHash: e,
|
|
471
477
|
row: t
|
|
472
478
|
}), r.add(e));
|
|
473
479
|
}
|
|
474
480
|
for (let e of t) {
|
|
475
|
-
let t =
|
|
481
|
+
let t = Tr(e);
|
|
476
482
|
r.has(t) || (r.add(t), n.push({
|
|
477
483
|
valueHash: t,
|
|
478
484
|
row: e
|
|
479
485
|
}));
|
|
480
486
|
}
|
|
481
|
-
|
|
482
|
-
},
|
|
483
|
-
let e =
|
|
484
|
-
if (
|
|
485
|
-
let t = new Set(
|
|
486
|
-
|
|
487
|
-
},
|
|
488
|
-
let t =
|
|
489
|
-
t.length !==
|
|
490
|
-
},
|
|
491
|
-
let t = [...
|
|
492
|
-
for (let { valueHash: e, row: n } of
|
|
493
|
-
return
|
|
494
|
-
}),
|
|
495
|
-
...
|
|
496
|
-
itemValue: (e) =>
|
|
497
|
-
itemText: (e) =>
|
|
487
|
+
K.value = n, Q.value ? ni = !0 : ei = typeof E.items == "function" ? n.map(({ valueHash: e }) => e) : [];
|
|
488
|
+
}, ni = !1, ri = () => {
|
|
489
|
+
let e = lr();
|
|
490
|
+
if (I.value !== null || e?.[0] || e?.[1] === "search") return;
|
|
491
|
+
let t = new Set(ei);
|
|
492
|
+
K.value = K.value.filter(({ valueHash: e }) => R.value.has(e) || t.has(e) || J.has(e) || !G.value.has(e)), typeof E.items == "function" && (ei = K.value.map(({ valueHash: e }) => e));
|
|
493
|
+
}, ii = (e) => {
|
|
494
|
+
let t = K.value.filter(({ valueHash: t }) => e.has(t) || G.value.has(t));
|
|
495
|
+
t.length !== K.value.length && (K.value = t);
|
|
496
|
+
}, ai = d((e) => {
|
|
497
|
+
let t = [...Qr.value];
|
|
498
|
+
for (let { valueHash: e, row: n } of K.value) Kr.value.has(e) || t.push(Ur(e) ?? n);
|
|
499
|
+
return Zr(e, t);
|
|
500
|
+
}), oi = ue({
|
|
501
|
+
...Wr,
|
|
502
|
+
itemValue: (e) => L(e) ? e.value : yr(e, E.itemValue),
|
|
503
|
+
itemText: (e) => L(e) ? e.label : br(e, E.itemText),
|
|
498
504
|
itemProps: d(() => {
|
|
499
|
-
if (!
|
|
500
|
-
let { all: e } = ne(
|
|
501
|
-
return (t) =>
|
|
505
|
+
if (!E.itemProps) return E.itemProps;
|
|
506
|
+
let { all: e } = ne(E.itemProps);
|
|
507
|
+
return (t) => L(t) ? {} : e(t);
|
|
502
508
|
}),
|
|
503
509
|
selectable: d(() => {
|
|
504
|
-
let e =
|
|
505
|
-
return typeof e == "function" ? (t) =>
|
|
510
|
+
let e = E.selectable;
|
|
511
|
+
return typeof e == "function" ? (t) => L(t) || e(t) : e;
|
|
506
512
|
}),
|
|
507
|
-
items:
|
|
508
|
-
}),
|
|
509
|
-
let e =
|
|
510
|
-
if (!t.length && !(n &&
|
|
511
|
-
let r =
|
|
513
|
+
items: ai
|
|
514
|
+
}), si = d(() => new Set(Qr.value.map(Tr))), q = d(() => {
|
|
515
|
+
let e = Gr.options.value, t = oi.options.value, n = Xr.value && !F.value;
|
|
516
|
+
if (!t.length && !(n && K.value.length)) return e;
|
|
517
|
+
let r = Kr.value;
|
|
512
518
|
if (!n) {
|
|
513
|
-
let n = t.filter((e) => !r.has(e.valueHash) &&
|
|
519
|
+
let n = t.filter((e) => !r.has(e.valueHash) && si.value.has(e.valueHash));
|
|
514
520
|
return n.length ? [...e, ...n] : e;
|
|
515
521
|
}
|
|
516
522
|
let i = new Map(t.map((e) => [e.valueHash, e])), a = [], o = /* @__PURE__ */ new Set(), s = !Q.value;
|
|
517
|
-
for (let { valueHash: t } of
|
|
523
|
+
for (let { valueHash: t } of K.value) {
|
|
518
524
|
let n = r.get(t);
|
|
519
525
|
if (n !== void 0 && s) continue;
|
|
520
526
|
let c = n === void 0 ? i.get(t) : e[n];
|
|
521
527
|
c && !o.has(t) && (a.push(c), o.add(t));
|
|
522
528
|
}
|
|
523
|
-
for (let e of t) r.has(e.valueHash) || o.has(e.valueHash) ||
|
|
529
|
+
for (let e of t) r.has(e.valueHash) || o.has(e.valueHash) || si.value.has(e.valueHash) && (a.push(e), o.add(e.valueHash));
|
|
524
530
|
return a.length ? [...a, ...e.filter((e) => !o.has(e.valueHash))] : e;
|
|
525
|
-
}),
|
|
526
|
-
if (!
|
|
527
|
-
let e =
|
|
528
|
-
|
|
529
|
-
},
|
|
530
|
-
if (!X.value || !
|
|
531
|
-
let t = new Set(
|
|
531
|
+
}), J = /* @__PURE__ */ new Set(), ci = () => {
|
|
532
|
+
if (!ei.length) return;
|
|
533
|
+
let e = H.value;
|
|
534
|
+
ei = ei.filter((t) => e[t] !== void 0);
|
|
535
|
+
}, li = () => !F.value, ui = (e) => {
|
|
536
|
+
if (!X.value || !li()) return;
|
|
537
|
+
let t = new Set(Zi.value.map((e) => e.valueHash));
|
|
532
538
|
for (let n of e) {
|
|
533
539
|
let e = s(n);
|
|
534
|
-
t.has(e) && (
|
|
540
|
+
t.has(e) && (J.add(e), di(e));
|
|
535
541
|
}
|
|
536
|
-
},
|
|
537
|
-
let t = new Set(
|
|
538
|
-
if (t.has(e) ||
|
|
542
|
+
}, di = (e) => {
|
|
543
|
+
let t = new Set(K.value.map((e) => e.valueHash));
|
|
544
|
+
if (t.has(e) || G.value.has(e)) return;
|
|
539
545
|
let n = [];
|
|
540
|
-
for (let r of
|
|
541
|
-
let i =
|
|
546
|
+
for (let r of $r.value) {
|
|
547
|
+
let i = Tr(r);
|
|
542
548
|
if (!t.has(i) && (n.push({
|
|
543
549
|
valueHash: i,
|
|
544
550
|
row: r
|
|
545
551
|
}), i === e)) {
|
|
546
|
-
|
|
552
|
+
K.value = [...K.value, ...n];
|
|
547
553
|
return;
|
|
548
554
|
}
|
|
549
555
|
}
|
|
550
556
|
};
|
|
551
|
-
|
|
552
|
-
let
|
|
557
|
+
xr && (xr.userUnpick = ui, xr.isKnown = L);
|
|
558
|
+
let fi = (e) => ({
|
|
553
559
|
...e,
|
|
554
560
|
loading: Y.value,
|
|
555
|
-
known:
|
|
561
|
+
known: L(e.item)
|
|
556
562
|
});
|
|
557
|
-
|
|
558
|
-
if (X.value ||
|
|
559
|
-
let t =
|
|
560
|
-
t.length !==
|
|
563
|
+
C(H, (e) => {
|
|
564
|
+
if (X.value || ci(), K.value.length) {
|
|
565
|
+
let t = K.value.filter(({ valueHash: t }) => e[t] !== void 0 || J.has(t));
|
|
566
|
+
t.length !== K.value.length && (K.value = t);
|
|
561
567
|
}
|
|
562
|
-
for (let t of [...
|
|
563
|
-
if (
|
|
568
|
+
for (let t of [...W.keys()]) e[t] === void 0 && !R.value.has(t) && W.delete(t);
|
|
569
|
+
if (U.value.size) {
|
|
564
570
|
let t = null;
|
|
565
|
-
for (let n of
|
|
566
|
-
t && (
|
|
571
|
+
for (let n of U.value.keys()) e[n] !== void 0 || R.value.has(n) || (t ??= new Map(U.value), t.delete(n));
|
|
572
|
+
t && (U.value = t);
|
|
567
573
|
}
|
|
568
|
-
|
|
574
|
+
E.stash && mr.value.length && gr((t) => e[s(yr(t, E.itemValue))] !== void 0);
|
|
569
575
|
});
|
|
570
|
-
let { data:
|
|
571
|
-
items:
|
|
576
|
+
let { data: pi } = ve({
|
|
577
|
+
items: q,
|
|
572
578
|
key: "valueHash"
|
|
573
579
|
});
|
|
574
|
-
|
|
580
|
+
C(() => Br.value && (Dr.value || mr.value.length) ? pi.value : null, (e) => {
|
|
575
581
|
if (!e) return;
|
|
576
|
-
let t =
|
|
582
|
+
let t = Dr.value ? [.../* @__PURE__ */ new Set([...Object.keys(H.value), ...R.value.keys()])] : [...Vr.value.keys()], n = null;
|
|
577
583
|
for (let r of t) {
|
|
578
584
|
let t = e[r]?.item;
|
|
579
585
|
if (t === void 0) continue;
|
|
580
|
-
let i =
|
|
581
|
-
if (t !==
|
|
582
|
-
let e =
|
|
583
|
-
if (e?.rows ===
|
|
584
|
-
|
|
586
|
+
let i = U.value.get(r);
|
|
587
|
+
if (t !== R.value.get(r) && t !== Vr.value.get(r) && t !== i) {
|
|
588
|
+
let e = zr.get(r);
|
|
589
|
+
if (e?.rows === ar.value && e.row === t) continue;
|
|
590
|
+
zr.delete(r), W.set(r, t);
|
|
585
591
|
continue;
|
|
586
592
|
}
|
|
587
|
-
let a =
|
|
588
|
-
a !== void 0 && a !== i && (n ??= new Map(
|
|
593
|
+
let a = W.get(r);
|
|
594
|
+
a !== void 0 && a !== i && (n ??= new Map(U.value), n.set(r, a));
|
|
589
595
|
}
|
|
590
|
-
n && (
|
|
596
|
+
n && (U.value = n);
|
|
591
597
|
});
|
|
592
|
-
let { coherent:
|
|
593
|
-
modelValue:
|
|
594
|
-
multiple:
|
|
595
|
-
iteratee: (e) => !!
|
|
596
|
-
}),
|
|
597
|
-
modelValue:
|
|
598
|
-
multiple:
|
|
598
|
+
let { coherent: mi } = de({
|
|
599
|
+
modelValue: x(() => E.modelValue),
|
|
600
|
+
multiple: !!E.multiple,
|
|
601
|
+
iteratee: (e) => !!pi.value[s(e)]
|
|
602
|
+
}), hi = d(() => new Set(ar.value.map((e) => s(yr(e, E.itemValue))))), { coherent: gi, coherentValue: _i } = de({
|
|
603
|
+
modelValue: x(() => E.modelValue),
|
|
604
|
+
multiple: !!E.multiple,
|
|
599
605
|
iteratee: (e) => {
|
|
600
606
|
let t = s(e);
|
|
601
|
-
return
|
|
607
|
+
return hi.value.has(t) || typeof E.items == "function" && z.value !== "revoked" && R.value.has(t);
|
|
602
608
|
}
|
|
603
|
-
}),
|
|
604
|
-
if (!
|
|
605
|
-
let e = s(
|
|
606
|
-
if (e ===
|
|
607
|
-
|
|
608
|
-
|
|
609
|
+
}), vi, yi = () => {
|
|
610
|
+
if (!E.enforceCoherence || gi.value) return !1;
|
|
611
|
+
let e = s(E.modelValue);
|
|
612
|
+
if (e === vi) return !1;
|
|
613
|
+
vi = e, mt(() => {
|
|
614
|
+
vi === e && (vi = void 0);
|
|
609
615
|
});
|
|
610
|
-
let t =
|
|
611
|
-
return
|
|
612
|
-
},
|
|
616
|
+
let t = _i.value;
|
|
617
|
+
return ii(new Set((E.multiple ? [].concat(t) : [t]).map((e) => s(e)))), D("update:modelValue", t), !0;
|
|
618
|
+
}, bi = d(() => V.value.map((e) => pi.value[s(e)]).filter(Boolean)), xi = d(() => I.value === null ? bi.value : V.value.map((e) => {
|
|
613
619
|
let t = s(e);
|
|
614
|
-
return
|
|
620
|
+
return pi.value[t] ?? {
|
|
615
621
|
value: e,
|
|
616
622
|
valueHash: t,
|
|
617
623
|
text: c(e),
|
|
618
624
|
unresolved: !0
|
|
619
625
|
};
|
|
620
|
-
})),
|
|
626
|
+
})), Si = (e) => ({
|
|
621
627
|
item: e.item,
|
|
622
628
|
text: e.text,
|
|
623
629
|
value: e.value,
|
|
624
630
|
selected: e.selected ?? !0,
|
|
625
631
|
disabled: e.disabled ?? !1
|
|
626
|
-
}),
|
|
627
|
-
function
|
|
628
|
-
return !
|
|
632
|
+
}), Ci = d(() => bi.value.map(Si)), Y = d(() => !!(or.value || E.loading)), wi = d(() => Y.value && !Q.value && !Ti.value && q.value.length > 0), Ti = d(() => Y.value && Zi.value.length > 0 && (Q.value || Dr.value && !ar.value.length)), Ei = d(() => !!E.hasErrors), Di = d(() => !!E.hasWarnings && !Ei.value), Oi = d(() => xi.value.map((e) => e.text).filter(Boolean).join(", ") || ""), ki = yt(/* @__PURE__ */ new Set());
|
|
633
|
+
function Ai() {
|
|
634
|
+
return !E.enforceCoherence || z.value === "none" || !Dr.value || typeof E.items != "function" ? !1 : V.value.some((e) => {
|
|
629
635
|
let t = s(e);
|
|
630
|
-
return
|
|
636
|
+
return R.value.has(t) && !ki.value.has(t);
|
|
631
637
|
});
|
|
632
638
|
}
|
|
633
|
-
let
|
|
634
|
-
if (n === "applied" && e ===
|
|
635
|
-
if (typeof
|
|
636
|
-
let e = new Set(
|
|
637
|
-
for (let t of
|
|
638
|
-
|
|
639
|
+
let ji = (e, t, n) => {
|
|
640
|
+
if (n === "applied" && e === Ar) {
|
|
641
|
+
if (typeof E.items == "function" && (Or.value || z.value !== "none")) {
|
|
642
|
+
let e = new Set(ki.value);
|
|
643
|
+
for (let t of G.value.keys()) e.add(t);
|
|
644
|
+
ki.value = e;
|
|
639
645
|
}
|
|
640
|
-
t !== "search" &&
|
|
646
|
+
t !== "search" && z.value === "pending" && (z.value = "revoked", ii(new Set(Object.keys(H.value))));
|
|
641
647
|
}
|
|
642
648
|
};
|
|
643
|
-
async function
|
|
644
|
-
let r =
|
|
645
|
-
return
|
|
649
|
+
async function Mi(e, t, n) {
|
|
650
|
+
let r = Ar, i = await tr(e, t, n);
|
|
651
|
+
return ji(r, t, i), i;
|
|
646
652
|
}
|
|
647
|
-
function
|
|
648
|
-
|
|
653
|
+
function Ni() {
|
|
654
|
+
Pi = !1, da = !1, ni && (ni = !1, ri()), Q.value = !1;
|
|
649
655
|
}
|
|
650
|
-
let
|
|
651
|
-
if (!
|
|
652
|
-
if (
|
|
653
|
-
|
|
656
|
+
let Pi = !1, Fi = !1, Ii = () => {
|
|
657
|
+
if (!vr.value || mi.value) return;
|
|
658
|
+
if (dr()) {
|
|
659
|
+
cr()?.[1] === "search" && (Fi = !0);
|
|
654
660
|
return;
|
|
655
661
|
}
|
|
656
|
-
let e =
|
|
657
|
-
e === "initial" &&
|
|
658
|
-
e === "applied" &&
|
|
662
|
+
let e = B.value ? "model" : "initial";
|
|
663
|
+
e === "initial" && Lr(), Mi(F.value, e, E.modelValue).then((e) => {
|
|
664
|
+
e === "applied" && yi();
|
|
659
665
|
});
|
|
660
|
-
},
|
|
661
|
-
|
|
662
|
-
|
|
666
|
+
}, Li = Tt(Ii, E.depsDebounceTime);
|
|
667
|
+
C(ur, () => {
|
|
668
|
+
Fi && (Fi = !1, Ii());
|
|
663
669
|
});
|
|
664
|
-
let
|
|
665
|
-
if (typeof
|
|
666
|
-
let e =
|
|
667
|
-
|
|
668
|
-
t === "applied" && e !== "search" &&
|
|
670
|
+
let Ri = () => {
|
|
671
|
+
if (typeof E.items != "function" || (Q.value = !0, ti(), Mr.value && !F.value)) return;
|
|
672
|
+
let e = F.value ? "search" : "initial";
|
|
673
|
+
Mi(F.value, e, E.modelValue).then((t) => {
|
|
674
|
+
t === "applied" && e !== "search" && yi();
|
|
669
675
|
});
|
|
670
|
-
},
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
676
|
+
}, zi = () => new Map([...R.value].map(([e, t]) => [e, s(t)])), Bi = zi(), Vi = /* @__PURE__ */ new WeakMap(), Hi = 0, Ui = (e) => typeof e == "function" ? e : Array.isArray(e) ? (Vi.has(e) || Vi.set(e, ++Hi), `array:${Vi.get(e)}`) : e, Wi = d(() => s([E.dependencies, Ui(E.items)])), Gi = d(() => s(E.modelValue)), Ki, qi;
|
|
677
|
+
C([
|
|
678
|
+
Wi,
|
|
679
|
+
Er,
|
|
680
|
+
Gi
|
|
675
681
|
], ([e, t, n], [r, i, a]) => {
|
|
676
682
|
let o = e !== r, s = t !== i, c = n !== a;
|
|
677
683
|
if (s) {
|
|
678
|
-
let e =
|
|
679
|
-
if (
|
|
684
|
+
let e = zi();
|
|
685
|
+
if (U.value.size || W.size) {
|
|
680
686
|
let t = null;
|
|
681
687
|
for (let [n, r] of e) {
|
|
682
|
-
if (
|
|
683
|
-
|
|
684
|
-
let e =
|
|
685
|
-
e !== void 0 &&
|
|
686
|
-
rows:
|
|
688
|
+
if (Bi.get(n) === r) continue;
|
|
689
|
+
W.delete(n);
|
|
690
|
+
let e = G.value.get(n);
|
|
691
|
+
e !== void 0 && zr.set(n, {
|
|
692
|
+
rows: ar.value,
|
|
687
693
|
row: e
|
|
688
|
-
}),
|
|
694
|
+
}), U.value.has(n) && (t ??= new Map(U.value), t.delete(n));
|
|
689
695
|
}
|
|
690
|
-
t && (
|
|
696
|
+
t && (U.value = t);
|
|
691
697
|
}
|
|
692
|
-
if (
|
|
693
|
-
let t =
|
|
694
|
-
for (let r of
|
|
695
|
-
n && (
|
|
698
|
+
if (U.value.size || W.size) {
|
|
699
|
+
let t = H.value, n = null;
|
|
700
|
+
for (let r of Bi.keys()) e.has(r) || t[r] !== void 0 || (W.delete(r), U.value.has(r) && (n ??= new Map(U.value), n.delete(r)));
|
|
701
|
+
n && (U.value = n);
|
|
696
702
|
}
|
|
697
|
-
|
|
703
|
+
Bi = e;
|
|
698
704
|
}
|
|
699
|
-
if (o && Array.isArray(
|
|
700
|
-
if (
|
|
701
|
-
let t =
|
|
702
|
-
|
|
703
|
-
} else o ? (
|
|
704
|
-
}, { flush: "pre" }), fe(() =>
|
|
705
|
-
if (!
|
|
706
|
-
let e =
|
|
707
|
-
if (Array.isArray(
|
|
705
|
+
if (o && Array.isArray(E.items) && Ni(), o && s && c && kr.value) {
|
|
706
|
+
if (z.value = "none", ki.value = /* @__PURE__ */ new Set(), Ar++, Ki = e, typeof E.items != "function") return;
|
|
707
|
+
let t = B.value || dr();
|
|
708
|
+
fr(), X.value ? Ri() : t && (Pi = !0);
|
|
709
|
+
} else o ? (z.value = "pending", ki.value = /* @__PURE__ */ new Set(), Ar++, Ki = void 0, c && (qi = n)) : (c && (qi = void 0), s && !c && !kr.value && Li());
|
|
710
|
+
}, { flush: "pre" }), fe(() => E.modelValue, async () => {
|
|
711
|
+
if (!Fr.value) return;
|
|
712
|
+
let e = Ai() && Gi.value !== qi;
|
|
713
|
+
if (Array.isArray(E.items) && E.enforceCoherence && Dr.value && V.value.some((e) => {
|
|
708
714
|
let t = s(e);
|
|
709
|
-
return
|
|
710
|
-
}) || !
|
|
711
|
-
let e =
|
|
712
|
-
if (e === "initial" &&
|
|
713
|
-
|
|
715
|
+
return R.value.has(t) && !G.value.has(t);
|
|
716
|
+
}) || !mi.value || e) {
|
|
717
|
+
let e = B.value ? "model" : "initial";
|
|
718
|
+
if (e === "initial" && Lr(), await Mi(F.value, e, E.modelValue) !== "applied") return;
|
|
719
|
+
yi() && A.value?.blur();
|
|
714
720
|
}
|
|
715
|
-
}, { debounce:
|
|
716
|
-
if (
|
|
717
|
-
let e =
|
|
718
|
-
if (!
|
|
719
|
-
let t =
|
|
720
|
-
|
|
721
|
-
}, { debounce:
|
|
722
|
-
let
|
|
721
|
+
}, { debounce: E.modelValueDebounceTime }), fe(() => [E.dependencies, E.items], async () => {
|
|
722
|
+
if (Wi.value === Ki && typeof E.items == "function") return;
|
|
723
|
+
let e = Or.value && E.enforceCoherence && vr.value;
|
|
724
|
+
if (!Fr.value && !e) return;
|
|
725
|
+
let t = B.value || Or.value ? "dependencies" : "initial";
|
|
726
|
+
B.value || Lr(), await Mi(F.value, t, E.modelValue) === "applied" && (ii(new Set(Object.keys(H.value))), yi() && A.value?.blur());
|
|
727
|
+
}, { debounce: E.depsDebounceTime });
|
|
728
|
+
let Ji = async (e) => {
|
|
723
729
|
let t = xn();
|
|
724
|
-
if (!
|
|
725
|
-
|
|
726
|
-
},
|
|
730
|
+
if (!E.multiple) for (let e of Object.keys(H.value)) J.add(e);
|
|
731
|
+
J.delete(e.valueHash), E.multiple ? (D("update:modelValue", [...E.modelValue, e.value]), E.stash && hr(e.item)) : (E.stash && _r(e.item), D("update:modelValue", e.value), await mt()), E.multiple && j.value && X.value ? t && vn() : N(), E.multiple || $();
|
|
732
|
+
}, Yi = async (e) => {
|
|
727
733
|
let t = xn();
|
|
728
|
-
if (!
|
|
729
|
-
|
|
734
|
+
if (!E.multiple) {
|
|
735
|
+
sa?.() && Da(), N(), $();
|
|
730
736
|
return;
|
|
731
737
|
}
|
|
732
|
-
|
|
733
|
-
let n = { ...
|
|
734
|
-
delete n[e.valueHash],
|
|
735
|
-
},
|
|
736
|
-
let e = re(
|
|
737
|
-
return e === void 0 ?
|
|
738
|
-
}),
|
|
738
|
+
li() && (J.add(e.valueHash), di(e.valueHash));
|
|
739
|
+
let n = { ...H.value };
|
|
740
|
+
delete n[e.valueHash], D("update:modelValue", Object.values(n)), j.value && X.value ? t && vn() : N();
|
|
741
|
+
}, Xi = d(() => {
|
|
742
|
+
let e = re(E.itemProps, "description");
|
|
743
|
+
return e === void 0 ? q.value.some((e) => e.description !== void 0) : e;
|
|
744
|
+
}), Zi = d(() => {
|
|
739
745
|
if (Q.value) {
|
|
740
|
-
if (!
|
|
741
|
-
let e = new Set(
|
|
742
|
-
return
|
|
746
|
+
if (!K.value.length) return [];
|
|
747
|
+
let e = new Set(K.value.map(({ valueHash: e }) => e));
|
|
748
|
+
return q.value.filter((t) => e.has(t.valueHash));
|
|
743
749
|
}
|
|
744
|
-
if (!
|
|
745
|
-
let e =
|
|
746
|
-
return Array.isArray(e) && e.length ? se(
|
|
747
|
-
}),
|
|
748
|
-
if (ae(
|
|
749
|
-
if (!
|
|
750
|
-
},
|
|
751
|
-
let e =
|
|
752
|
-
return
|
|
753
|
-
let a = r.get(i.valueHash) ?? Infinity, o =
|
|
750
|
+
if (!F.value || !E.multiple && bi.value.some((e) => e.text === F.value) || E.filterBy === !1) return q.value;
|
|
751
|
+
let e = E.filterBy;
|
|
752
|
+
return Array.isArray(e) && e.length ? se(q.value, (t) => oe(t.item, e), F.value) : se(q.value, (e) => oe(e, e.description == null ? ["text"] : ["text", "description"]), F.value);
|
|
753
|
+
}), Qi = Symbol("default"), $i = (e) => {
|
|
754
|
+
if (ae(E.groupBy)) return Qi;
|
|
755
|
+
if (!L(e.item)) return typeof E.groupBy == "function" ? E.groupBy(e.item) : o(e.item, E.groupBy);
|
|
756
|
+
}, ea = d(() => {
|
|
757
|
+
let e = F.value ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([...K.value.map(({ valueHash: e }) => e).filter((e) => Q.value || !Kr.value.has(e)), ...Xr.value ? $r.value.map(Tr) : []]), t = [], n = {}, r = new Map(q.value.map((e, t) => [e.valueHash, t]));
|
|
758
|
+
return Zi.value.forEach((i) => {
|
|
759
|
+
let a = r.get(i.valueHash) ?? Infinity, o = $i(i), c = s(o), l = n[c];
|
|
754
760
|
l || (l = n[c] = {
|
|
755
761
|
id: c,
|
|
756
762
|
data: o ?? null,
|
|
@@ -766,131 +772,131 @@ var kt = {
|
|
|
766
772
|
data: t,
|
|
767
773
|
options: [...r, ...n]
|
|
768
774
|
})).filter((e) => e.options.length);
|
|
769
|
-
}), X =
|
|
770
|
-
|
|
771
|
-
let
|
|
775
|
+
}), X = y(!1);
|
|
776
|
+
C(X, (e) => Xr.value = e, { flush: "sync" });
|
|
777
|
+
let ta = ze(X), na = Be(X, () => E.transitionDuration), ra = Pe("BbSelectPopover", E, {
|
|
772
778
|
adaptive: !0,
|
|
773
779
|
compact: !1
|
|
774
|
-
}),
|
|
775
|
-
|
|
776
|
-
() =>
|
|
780
|
+
}), ia = () => ra.adaptive && Zt.value ? "canvas" : "popover", aa = y(ia()), Z = d(() => aa.value === "canvas");
|
|
781
|
+
C([
|
|
782
|
+
() => ra.adaptive,
|
|
777
783
|
Zt,
|
|
778
784
|
X
|
|
779
785
|
], () => {
|
|
780
|
-
X.value || (
|
|
786
|
+
X.value || (aa.value = ia());
|
|
781
787
|
}), je(Z);
|
|
782
|
-
let
|
|
788
|
+
let oa = Se();
|
|
783
789
|
xe(null);
|
|
784
|
-
let
|
|
790
|
+
let sa = we();
|
|
785
791
|
Ce(null), me({
|
|
786
792
|
active: () => X.value && Z.value,
|
|
787
793
|
input: () => Ut.value
|
|
788
794
|
});
|
|
789
|
-
let
|
|
790
|
-
onShow: () =>
|
|
791
|
-
onShown: () =>
|
|
792
|
-
onHide: () =>
|
|
793
|
-
onHidden: () =>
|
|
794
|
-
},
|
|
795
|
-
...
|
|
795
|
+
let ca = {
|
|
796
|
+
onShow: () => D("show"),
|
|
797
|
+
onShown: () => D("shown"),
|
|
798
|
+
onHide: () => D("hide"),
|
|
799
|
+
onHidden: () => D("hidden")
|
|
800
|
+
}, la = {
|
|
801
|
+
...ca,
|
|
796
802
|
onHidden: () => {
|
|
797
|
-
|
|
803
|
+
ya(), D("hidden");
|
|
798
804
|
}
|
|
799
|
-
},
|
|
805
|
+
}, ua = d(() => ({
|
|
800
806
|
side: "bottom",
|
|
801
807
|
size: "auto",
|
|
802
808
|
draggable: !0,
|
|
803
809
|
focusTarget: ".bb-select-popover--sheet",
|
|
804
810
|
hideClose: !0,
|
|
805
|
-
transitionDuration:
|
|
806
|
-
...
|
|
807
|
-
...nt(
|
|
808
|
-
})),
|
|
809
|
-
|
|
810
|
-
Q.value = !1,
|
|
811
|
-
let e =
|
|
812
|
-
|
|
811
|
+
transitionDuration: E.transitionDuration,
|
|
812
|
+
...E.offCanvasProps?.title ? {} : { "aria-label": Ma.value },
|
|
813
|
+
...nt(E.offCanvasProps)
|
|
814
|
+
})), da = !1, Q = y(!1);
|
|
815
|
+
C(ur, () => {
|
|
816
|
+
Q.value = !1, ni && (ni = !1, ri());
|
|
817
|
+
let e = lr();
|
|
818
|
+
fa && X.value && !F.value && e?.[0] === "" && I.value === null && (fa = !1, ti({ keepSticky: !1 }));
|
|
813
819
|
});
|
|
814
|
-
let
|
|
815
|
-
|
|
816
|
-
X.value && t && !e && (
|
|
817
|
-
}),
|
|
818
|
-
|
|
820
|
+
let fa = !1;
|
|
821
|
+
C(F, (e, t) => {
|
|
822
|
+
X.value && t && !e && (fa = !0);
|
|
823
|
+
}), C(F, () => {
|
|
824
|
+
pa = !1, X.value && A.value?.scrollToTop();
|
|
819
825
|
}, { flush: "post" });
|
|
820
|
-
let
|
|
821
|
-
|
|
826
|
+
let pa = !1, ma = () => {
|
|
827
|
+
pa = !1;
|
|
822
828
|
};
|
|
823
|
-
|
|
824
|
-
|
|
829
|
+
C(ur, async () => {
|
|
830
|
+
pa && X.value && !F.value && lr()?.[0] === "" && (pa = !1, await mt(), X.value && A.value?.scrollToSelected());
|
|
825
831
|
}, { flush: "post" });
|
|
826
|
-
let
|
|
827
|
-
if (
|
|
832
|
+
let ha = () => {
|
|
833
|
+
if (pr(), typeof E.items != "function") return;
|
|
828
834
|
let e = (e) => !!e?.[0];
|
|
829
|
-
(e(
|
|
830
|
-
},
|
|
831
|
-
if (!
|
|
832
|
-
let e =
|
|
833
|
-
|
|
834
|
-
e === "applied" &&
|
|
835
|
+
(e(lr()) || dr() && e(cr())) && (da = !0, fr());
|
|
836
|
+
}, ga = () => {
|
|
837
|
+
if (!da && !Pi) return;
|
|
838
|
+
let e = Pi ? "initial" : "reopen";
|
|
839
|
+
da = !1, Pi = !1, Lr(), Q.value = !0, Mr.value || Mi("", e, E.modelValue).then((e) => {
|
|
840
|
+
e === "applied" && yi();
|
|
835
841
|
});
|
|
836
|
-
},
|
|
837
|
-
if (
|
|
838
|
-
|
|
839
|
-
let t = !
|
|
840
|
-
await
|
|
841
|
-
},
|
|
842
|
-
await
|
|
843
|
-
let e =
|
|
842
|
+
}, _a = async ({ focusPopoverContent: e = !0 } = {}) => {
|
|
843
|
+
if (E.disabled || E.readonly || X.value) return;
|
|
844
|
+
aa.value = ia(), nn.value = tn(), er.value = !0, ga(), ti(), pa = typeof E.items == "function" && !Mr.value && (Q.value || dr() || !B.value), X.value = !0;
|
|
845
|
+
let t = !B.value && !Pr.value && !Mr.value ? Ir() : void 0;
|
|
846
|
+
await va(e), await t;
|
|
847
|
+
}, va = async (e) => {
|
|
848
|
+
await mt(), X.value && (Z.value || (dn = !0, fn(), ge(Yn, { element: () => {
|
|
849
|
+
let e = A.value?.$el;
|
|
844
850
|
return e instanceof Element ? e.closest(".bb-common-popover") : null;
|
|
845
|
-
} }), document.addEventListener("click", On, { capture: !0 }), document.addEventListener("focusin", On, { capture: !0 }), document.addEventListener("keydown", Xn, { capture: !0 }), e && (await Ve(0), X.value && (
|
|
851
|
+
} }), document.addEventListener("click", On, { capture: !0 }), document.addEventListener("focusin", On, { capture: !0 }), document.addEventListener("keydown", Xn, { capture: !0 }), e && (await Ve(0), X.value && (j.value ? vn() : yn()))));
|
|
846
852
|
}, $ = async () => {
|
|
847
|
-
X.value && (X.value = !1,
|
|
848
|
-
},
|
|
849
|
-
|
|
850
|
-
},
|
|
851
|
-
|
|
852
|
-
},
|
|
853
|
-
|
|
854
|
-
},
|
|
853
|
+
X.value && (X.value = !1, A.value?.blur(), Kt.value = void 0, P.value = "", pa = !1, ha(), K.value = [], J.clear(), fa = !1, ni = !1, ci(), Z.value || (Gt.value?.$el.contains(document.activeElement) && k.value?.focus({ preventScroll: !0 }), pn(), _e(Yn), document.removeEventListener("click", On, { capture: !0 }), document.removeEventListener("focusin", On, { capture: !0 }), document.removeEventListener("keydown", Xn, { capture: !0 })));
|
|
854
|
+
}, ya = () => {
|
|
855
|
+
A.value?.blur(), Kt.value = void 0, P.value = "", pa = !1, ha(), K.value = [], J.clear(), fa = !1, ni = !1, ci(), Ca(), N();
|
|
856
|
+
}, ba = () => X.value ? $() : _a(), xa = y(!1), Sa = () => {
|
|
857
|
+
xa.value || (xa.value = !0, D("active"));
|
|
858
|
+
}, Ca = () => {
|
|
859
|
+
xa.value && (xa.value = !1, D("inactive"));
|
|
860
|
+
}, wa = (e) => {
|
|
855
861
|
if (!(e instanceof Node)) return !1;
|
|
856
|
-
let t = !!
|
|
862
|
+
let t = !!k.value?.contains(e), n = A.value?.$el, r = n instanceof Element && !!n.closest(".bb-common-popover")?.contains(e);
|
|
857
863
|
return t || r;
|
|
858
|
-
},
|
|
859
|
-
clearTimeout(
|
|
860
|
-
X.value ||
|
|
864
|
+
}, Ta, Ea = () => {
|
|
865
|
+
clearTimeout(Ta), Ta = setTimeout(() => {
|
|
866
|
+
X.value || wa(document.activeElement) ? Sa() : Ca();
|
|
861
867
|
}, 0);
|
|
862
|
-
},
|
|
863
|
-
|
|
864
|
-
},
|
|
865
|
-
|
|
866
|
-
},
|
|
868
|
+
}, Da = () => {
|
|
869
|
+
ui(V.value), D("update:modelValue", E.multiple ? [] : null);
|
|
870
|
+
}, Oa = () => {
|
|
871
|
+
P.value = "", Da();
|
|
872
|
+
}, ka = d(() => !Y.value && (E.groupBy ? ea.value.every((e) => !e.options.length) : !Zi.value.length)), Aa = d(() => ({
|
|
867
873
|
close: $,
|
|
868
|
-
clear:
|
|
869
|
-
empty:
|
|
874
|
+
clear: Da,
|
|
875
|
+
empty: ka.value,
|
|
870
876
|
focus: bn,
|
|
871
|
-
query:
|
|
872
|
-
selectedOptions:
|
|
873
|
-
titleId: `${
|
|
874
|
-
})),
|
|
875
|
-
|
|
876
|
-
e && (
|
|
877
|
+
query: P.value,
|
|
878
|
+
selectedOptions: Ci.value,
|
|
879
|
+
titleId: `${M}_title`
|
|
880
|
+
})), ja = null, Ma = y();
|
|
881
|
+
C(X, (e) => {
|
|
882
|
+
e && (Ma.value = a(k.value));
|
|
877
883
|
}, {
|
|
878
884
|
immediate: !0,
|
|
879
885
|
flush: "sync"
|
|
880
886
|
});
|
|
881
|
-
let
|
|
882
|
-
let e =
|
|
887
|
+
let Na = d(() => {
|
|
888
|
+
let e = k.value;
|
|
883
889
|
return e ? e.hasAttribute("aria-label") || e.hasAttribute("aria-labelledby") : !1;
|
|
884
|
-
}),
|
|
885
|
-
return
|
|
886
|
-
if (
|
|
890
|
+
}), Pa = d(() => an("select.triggerLabel").value), Fa = y(), Ia = y();
|
|
891
|
+
return C(k, (e) => {
|
|
892
|
+
if (ja &&= (ja(), null), !e) return;
|
|
887
893
|
e.setAttribute("role", "combobox"), e.setAttribute("aria-haspopup", "listbox");
|
|
888
894
|
let t = !e.id;
|
|
889
|
-
t && (e.id = `${
|
|
890
|
-
let n =
|
|
891
|
-
|
|
895
|
+
t && (e.id = `${M}_activator`);
|
|
896
|
+
let n = Na.value, r = async (e) => {
|
|
897
|
+
D("click", e), E.disabled || (e.preventDefault(), E.readonly ? N() : X.value ? (await $(), N()) : await _a());
|
|
892
898
|
}, i = (e) => {
|
|
893
|
-
|
|
899
|
+
E.readonly && !E.disabled && (e.preventDefault(), Sa(), N());
|
|
894
900
|
}, a = (e) => {
|
|
895
901
|
switch (e.key) {
|
|
896
902
|
case "ArrowDown":
|
|
@@ -914,54 +920,54 @@ var kt = {
|
|
|
914
920
|
case "Escape": X.value && (e.preventDefault(), Kn());
|
|
915
921
|
}
|
|
916
922
|
}, o = (e) => {
|
|
917
|
-
|
|
923
|
+
D("focus", e), Sa();
|
|
918
924
|
}, s = (e) => {
|
|
919
|
-
|
|
925
|
+
D("blur", e), Ea();
|
|
920
926
|
};
|
|
921
|
-
e.addEventListener("click", r), e.addEventListener("pointerdown", i), e.addEventListener("keydown", a), e.addEventListener("focus", o), e.addEventListener("blur", s),
|
|
927
|
+
e.addEventListener("click", r), e.addEventListener("pointerdown", i), e.addEventListener("keydown", a), e.addEventListener("focus", o), e.addEventListener("blur", s), ja = () => {
|
|
922
928
|
e.removeEventListener("click", r), e.removeEventListener("pointerdown", i), e.removeEventListener("keydown", a), e.removeEventListener("focus", o), e.removeEventListener("blur", s), e.removeAttribute("role"), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls"), e.removeAttribute("aria-invalid"), e.removeAttribute("aria-describedby"), e.removeAttribute("aria-activedescendant"), n || e.removeAttribute("aria-label"), t && e.removeAttribute("id");
|
|
923
929
|
};
|
|
924
|
-
}, { immediate: !0 }),
|
|
925
|
-
|
|
930
|
+
}, { immediate: !0 }), C([
|
|
931
|
+
k,
|
|
926
932
|
X,
|
|
927
|
-
|
|
933
|
+
ta,
|
|
928
934
|
ln,
|
|
929
935
|
un,
|
|
930
936
|
Kt,
|
|
931
|
-
|
|
932
|
-
|
|
937
|
+
Na,
|
|
938
|
+
Pa
|
|
933
939
|
], ([e, t, n, r, i, a, o, s]) => {
|
|
934
|
-
e && (e.setAttribute("aria-expanded", String(t)), o || e.setAttribute("aria-label", s),
|
|
935
|
-
}, { immediate: !0 }),
|
|
936
|
-
clearTimeout(
|
|
937
|
-
}),
|
|
940
|
+
e && (e.setAttribute("aria-expanded", String(t)), o || e.setAttribute("aria-label", s), Fa.value = e.getAttribute("aria-labelledby") ?? void 0, Ia.value = e.getAttribute("aria-label") ?? void 0, r == null ? e.removeAttribute("aria-invalid") : e.setAttribute("aria-invalid", r), n ? e.setAttribute("aria-controls", `${M}_listbox`) : e.removeAttribute("aria-controls"), i == null ? e.removeAttribute("aria-describedby") : e.setAttribute("aria-describedby", i), t && a ? e.setAttribute("aria-activedescendant", a) : e.removeAttribute("aria-activedescendant"));
|
|
941
|
+
}, { immediate: !0 }), gt(() => {
|
|
942
|
+
clearTimeout(Ta), ja?.(), An.abort(), _e(Yn), document.removeEventListener("click", On, { capture: !0 }), document.removeEventListener("focusin", On, { capture: !0 }), document.removeEventListener("keydown", Xn, { capture: !0 });
|
|
943
|
+
}), _t(() => {
|
|
938
944
|
$();
|
|
939
|
-
}), (e, n) => (
|
|
940
|
-
|
|
941
|
-
Yt.value ?
|
|
945
|
+
}), (e, n) => (v(), p(st, null, [
|
|
946
|
+
m(S(be), { value: S(sr) }, null, 8, ["value"]),
|
|
947
|
+
Yt.value ? f("", !0) : b(e.$slots, "activator", _(h({
|
|
942
948
|
props: { ref: Xt },
|
|
943
949
|
shown: X.value,
|
|
944
950
|
disabled: u.disabled,
|
|
945
951
|
readonly: u.readonly,
|
|
946
952
|
loading: Y.value,
|
|
947
|
-
query:
|
|
948
|
-
selectedOptions:
|
|
949
|
-
text:
|
|
950
|
-
clear:
|
|
953
|
+
query: P.value,
|
|
954
|
+
selectedOptions: Ci.value,
|
|
955
|
+
text: Oi.value,
|
|
956
|
+
clear: Da,
|
|
951
957
|
focus: bn,
|
|
952
|
-
open:
|
|
958
|
+
open: _a,
|
|
953
959
|
close: $,
|
|
954
|
-
toggle:
|
|
960
|
+
toggle: ba
|
|
955
961
|
})), void 0, void 0, 0),
|
|
956
|
-
|
|
957
|
-
default:
|
|
958
|
-
|
|
959
|
-
id: `${
|
|
962
|
+
m(S(zt), null, {
|
|
963
|
+
default: w(() => [j.value ? (v(), p("div", Ot, [
|
|
964
|
+
St(lt("input", g({
|
|
965
|
+
id: `${S(M)}_search`,
|
|
960
966
|
ref_key: "searchInput",
|
|
961
967
|
ref: Ut,
|
|
962
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
968
|
+
"onUpdate:modelValue": n[0] ||= (e) => P.value = e,
|
|
963
969
|
"aria-activedescendant": Kt.value,
|
|
964
|
-
"aria-controls":
|
|
970
|
+
"aria-controls": S(ta) ? `${S(M)}_listbox` : void 0,
|
|
965
971
|
"aria-describedby": un.value,
|
|
966
972
|
"aria-invalid": ln.value,
|
|
967
973
|
"aria-label": on.value,
|
|
@@ -972,42 +978,47 @@ var kt = {
|
|
|
972
978
|
role: "searchbox",
|
|
973
979
|
tabindex: X.value ? 0 : -1,
|
|
974
980
|
type: "text",
|
|
975
|
-
onBlur:
|
|
976
|
-
onChange:
|
|
977
|
-
onFocus:
|
|
978
|
-
onInput:
|
|
981
|
+
onBlur: T(Cn, ["stop"]),
|
|
982
|
+
onChange: T(wn, ["stop"]),
|
|
983
|
+
onFocus: T(Sn, ["stop"]),
|
|
984
|
+
onInput: T(En, ["stop"]),
|
|
979
985
|
onKeydown: Jn
|
|
980
|
-
},
|
|
981
|
-
p(
|
|
986
|
+
}, S(O).input), null, 16, kt), [[xt, P.value]]),
|
|
987
|
+
X.value && Zn.value ? (v(), p("span", {
|
|
988
|
+
key: 0,
|
|
989
|
+
id: `${S(M)}_search_hint`,
|
|
990
|
+
class: "bb-sr-only"
|
|
991
|
+
}, bt(Qn.value), 9, At)) : f("", !0),
|
|
992
|
+
m(qe, {
|
|
982
993
|
"aria-hidden": "true",
|
|
983
994
|
class: "bb-select-popover__search-error-icon",
|
|
984
995
|
focusable: "false"
|
|
985
996
|
}),
|
|
986
|
-
|
|
997
|
+
m(Je, {
|
|
987
998
|
"aria-hidden": "true",
|
|
988
999
|
class: "bb-select-popover__search-warning-icon",
|
|
989
1000
|
focusable: "false"
|
|
990
1001
|
}),
|
|
991
|
-
|
|
1002
|
+
m(Ue, {
|
|
992
1003
|
"aria-hidden": "true",
|
|
993
1004
|
class: "bb-select-popover__search-icon",
|
|
994
1005
|
focusable: "false",
|
|
995
|
-
icon:
|
|
1006
|
+
icon: S(Ye)
|
|
996
1007
|
}, null, 8, ["icon"]),
|
|
997
|
-
u.clearable ? (
|
|
998
|
-
key:
|
|
1008
|
+
u.clearable ? (v(), ct(Ge, g({
|
|
1009
|
+
key: 1,
|
|
999
1010
|
class: "bb-select-popover__clear",
|
|
1000
1011
|
tabindex: sn.value && X.value ? 0 : -1,
|
|
1001
|
-
onClick:
|
|
1002
|
-
onMousedown: n[1] ||=
|
|
1003
|
-
},
|
|
1004
|
-
|
|
1005
|
-
])) : (
|
|
1012
|
+
onClick: T(Oa, ["stop"]),
|
|
1013
|
+
onMousedown: n[1] ||= T(() => {}, ["prevent"])
|
|
1014
|
+
}, S(O).clear), null, 16, ["tabindex"])) : f("", !0),
|
|
1015
|
+
wi.value ? (v(), p("div", jt)) : f("", !0)
|
|
1016
|
+
])) : (v(), p("button", {
|
|
1006
1017
|
key: 1,
|
|
1007
1018
|
ref_key: "popoverFocusProxy",
|
|
1008
1019
|
ref: Wt,
|
|
1009
1020
|
"aria-activedescendant": Kt.value,
|
|
1010
|
-
"aria-controls": `${
|
|
1021
|
+
"aria-controls": `${S(M)}_listbox`,
|
|
1011
1022
|
"aria-describedby": un.value,
|
|
1012
1023
|
"aria-expanded": X.value,
|
|
1013
1024
|
"aria-invalid": ln.value,
|
|
@@ -1019,56 +1030,56 @@ var kt = {
|
|
|
1019
1030
|
onFocus: Tn,
|
|
1020
1031
|
onKeydown: [
|
|
1021
1032
|
Wn,
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1033
|
+
Ct(T(Rn, ["stop", "prevent"]), ["down"]),
|
|
1034
|
+
Ct(T(Vn, ["stop", "prevent"]), ["end"]),
|
|
1035
|
+
Ct(T(Gn, ["stop", "prevent"]), ["enter"]),
|
|
1036
|
+
Ct(T(Kn, ["stop", "prevent"]), ["esc"]),
|
|
1037
|
+
Ct(T(Bn, ["stop", "prevent"]), ["home"]),
|
|
1038
|
+
Ct(T(Ln, ["stop", "prevent"]), ["up"])
|
|
1028
1039
|
]
|
|
1029
1040
|
}, null, 40, Mt))]),
|
|
1030
1041
|
_: 1
|
|
1031
1042
|
}),
|
|
1032
|
-
|
|
1033
|
-
default:
|
|
1034
|
-
id: `${
|
|
1043
|
+
m(S(Vt), null, {
|
|
1044
|
+
default: w(() => [m(Xe, {
|
|
1045
|
+
id: `${S(M)}_listbox`,
|
|
1035
1046
|
ref_key: "optionsContainer",
|
|
1036
|
-
ref:
|
|
1037
|
-
compact:
|
|
1038
|
-
described:
|
|
1039
|
-
"empty-text":
|
|
1040
|
-
"failed-text":
|
|
1041
|
-
groups: u.groupBy ?
|
|
1047
|
+
ref: A,
|
|
1048
|
+
compact: S(ra).compact,
|
|
1049
|
+
described: Xi.value,
|
|
1050
|
+
"empty-text": Nr.value,
|
|
1051
|
+
"failed-text": S(I) === null ? void 0 : Nr.value,
|
|
1052
|
+
groups: u.groupBy ? ea.value : void 0,
|
|
1042
1053
|
"header-height": u.headerHeight,
|
|
1043
|
-
"list-label": Z.value ?
|
|
1044
|
-
"list-labelledby": Z.value ? void 0 :
|
|
1054
|
+
"list-label": Z.value ? Ma.value : Ia.value,
|
|
1055
|
+
"list-labelledby": Z.value ? void 0 : Fa.value,
|
|
1045
1056
|
loading: Y.value,
|
|
1046
|
-
"loading-below":
|
|
1057
|
+
"loading-below": Ti.value,
|
|
1047
1058
|
"loading-text": u.loadingText,
|
|
1048
1059
|
multiple: u.multiple,
|
|
1049
1060
|
open: X.value,
|
|
1050
1061
|
"option-height": u.itemHeight,
|
|
1051
|
-
options: u.groupBy ? void 0 :
|
|
1052
|
-
passthrough:
|
|
1062
|
+
options: u.groupBy ? void 0 : Zi.value,
|
|
1063
|
+
passthrough: S(O),
|
|
1053
1064
|
"onFocused:change": Dn,
|
|
1054
|
-
"onOption:selected":
|
|
1055
|
-
"onOption:unselected":
|
|
1056
|
-
onPointerdown:
|
|
1057
|
-
onTouchmovePassive:
|
|
1058
|
-
onWheelPassive:
|
|
1059
|
-
},
|
|
1060
|
-
loading:
|
|
1061
|
-
empty:
|
|
1065
|
+
"onOption:selected": Ji,
|
|
1066
|
+
"onOption:unselected": Yi,
|
|
1067
|
+
onPointerdown: ma,
|
|
1068
|
+
onTouchmovePassive: ma,
|
|
1069
|
+
onWheelPassive: ma
|
|
1070
|
+
}, ut({
|
|
1071
|
+
loading: w(() => [b(e.$slots, "loading", { query: P.value })]),
|
|
1072
|
+
empty: w(() => [b(e.$slots, "empty", {
|
|
1062
1073
|
close: $,
|
|
1063
|
-
error:
|
|
1074
|
+
error: S(I),
|
|
1064
1075
|
focus: bn,
|
|
1065
|
-
query:
|
|
1076
|
+
query: P.value
|
|
1066
1077
|
})]),
|
|
1067
|
-
group:
|
|
1078
|
+
group: w((t) => [b(e.$slots, "group", _(h(t)))]),
|
|
1068
1079
|
_: 2
|
|
1069
1080
|
}, [e.$slots.option ? {
|
|
1070
1081
|
name: "option",
|
|
1071
|
-
fn:
|
|
1082
|
+
fn: w((t) => [b(e.$slots, "option", _(h(fi(t))))]),
|
|
1072
1083
|
key: "0"
|
|
1073
1084
|
} : void 0]), 1032, [
|
|
1074
1085
|
"id",
|
|
@@ -1091,90 +1102,90 @@ var kt = {
|
|
|
1091
1102
|
])]),
|
|
1092
1103
|
_: 3
|
|
1093
1104
|
}),
|
|
1094
|
-
Z.value ? (
|
|
1105
|
+
Z.value ? (v(), ct(We, g({
|
|
1095
1106
|
key: 1,
|
|
1096
1107
|
modelValue: X.value,
|
|
1097
1108
|
"onUpdate:modelValue": n[3] ||= (e) => X.value = e,
|
|
1098
1109
|
class: "bb-select-popover__sheet",
|
|
1099
|
-
pt:
|
|
1110
|
+
pt: S(O).forward({
|
|
1100
1111
|
header: "header",
|
|
1101
1112
|
footer: "footer",
|
|
1102
1113
|
panel: "root",
|
|
1103
1114
|
sheet: "root"
|
|
1104
|
-
},
|
|
1105
|
-
},
|
|
1106
|
-
default:
|
|
1107
|
-
u.multiple &&
|
|
1115
|
+
}, S($e).states, () => u.offCanvasProps?.pt)
|
|
1116
|
+
}, g(ua.value, la, S(t)(S(tt)(e.$attrs)))), ut({
|
|
1117
|
+
default: w(() => [lt("div", _(h(gn.value)), [
|
|
1118
|
+
u.multiple && xi.value.length ? (v(), p("div", Nt, [lt("div", Pt, [(v(!0), p(st, null, vt(xi.value, (e) => (v(), ct(He, g({
|
|
1108
1119
|
key: e.valueHash,
|
|
1109
1120
|
class: "bb-select-popover__sheet-chip",
|
|
1110
1121
|
clearable: !u.disabled && !u.readonly,
|
|
1111
1122
|
size: "xl",
|
|
1112
1123
|
variant: "secondary"
|
|
1113
|
-
}, { ref_for: !0 }, e.unresolved ? void 0 :
|
|
1114
|
-
"onClick:clear": (t) =>
|
|
1115
|
-
onMousedown: n[2] ||=
|
|
1124
|
+
}, { ref_for: !0 }, e.unresolved ? void 0 : S(oa)?.(e.item), {
|
|
1125
|
+
"onClick:clear": (t) => Yi(e),
|
|
1126
|
+
onMousedown: n[2] ||= T(() => {}, ["prevent"])
|
|
1116
1127
|
}), {
|
|
1117
|
-
default:
|
|
1128
|
+
default: w(() => [dt(bt(e.text), 1)]),
|
|
1118
1129
|
_: 2
|
|
1119
|
-
}, 1040, ["clearable", "onClick:clear"]))), 128))])])) :
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
default:
|
|
1130
|
+
}, 1040, ["clearable", "onClick:clear"]))), 128))])])) : f("", !0),
|
|
1131
|
+
m(S(Bt)),
|
|
1132
|
+
m(rt, null, {
|
|
1133
|
+
default: w(() => [m(S(Ht))]),
|
|
1123
1134
|
_: 1
|
|
1124
1135
|
})
|
|
1125
1136
|
], 16)]),
|
|
1126
1137
|
_: 2
|
|
1127
1138
|
}, [e.$slots.header ? {
|
|
1128
1139
|
name: "header",
|
|
1129
|
-
fn:
|
|
1130
|
-
...
|
|
1140
|
+
fn: w(({ titleId: t }) => [b(e.$slots, "header", _(h({
|
|
1141
|
+
...Aa.value,
|
|
1131
1142
|
titleId: t
|
|
1132
1143
|
})))]),
|
|
1133
1144
|
key: "0"
|
|
1134
1145
|
} : void 0, e.$slots.footer ? {
|
|
1135
1146
|
name: "footer",
|
|
1136
|
-
fn:
|
|
1147
|
+
fn: w(() => [b(e.$slots, "footer", _(h(Aa.value)))]),
|
|
1137
1148
|
key: "1"
|
|
1138
|
-
} : void 0]), 1040, ["modelValue", "pt"])) : (
|
|
1149
|
+
} : void 0]), 1040, ["modelValue", "pt"])) : (v(), ct(Ke, g({
|
|
1139
1150
|
key: 2,
|
|
1140
1151
|
ref_key: "popoverSurface",
|
|
1141
1152
|
ref: Gt,
|
|
1142
1153
|
modelValue: X.value,
|
|
1143
1154
|
"onUpdate:modelValue": n[4] ||= (e) => X.value = e,
|
|
1144
1155
|
anchor: qt.value,
|
|
1145
|
-
"aria-hidden":
|
|
1156
|
+
"aria-hidden": S(na) || void 0,
|
|
1146
1157
|
boundary: u.boundary,
|
|
1147
1158
|
"bubble-attrs": hn.value,
|
|
1148
1159
|
class: ["bb-select-popover", {
|
|
1149
|
-
"bb-select-popover--errors":
|
|
1150
|
-
"bb-select-popover--warnings":
|
|
1160
|
+
"bb-select-popover--errors": Ei.value,
|
|
1161
|
+
"bb-select-popover--warnings": Di.value,
|
|
1151
1162
|
"bb-select-popover--loading": Y.value,
|
|
1152
|
-
"bb-select-popover--reloading":
|
|
1163
|
+
"bb-select-popover--reloading": wi.value,
|
|
1153
1164
|
"bb-select-popover--clearable-active": sn.value,
|
|
1154
|
-
"bb-select-popover--compact":
|
|
1165
|
+
"bb-select-popover--compact": S(ra).compact
|
|
1155
1166
|
}],
|
|
1156
1167
|
"disable-flip": u.disableFlip,
|
|
1157
1168
|
"hide-arrow": "",
|
|
1158
|
-
offset: u.offset ??
|
|
1169
|
+
offset: u.offset ?? S(Lt)() ?? 4,
|
|
1159
1170
|
padding: u.padding,
|
|
1160
1171
|
placement: u.placement,
|
|
1161
1172
|
style: _n.value,
|
|
1162
1173
|
tag: "span",
|
|
1163
1174
|
"transition-duration": u.transitionDuration
|
|
1164
|
-
},
|
|
1165
|
-
default:
|
|
1166
|
-
e.$slots.header ? (
|
|
1175
|
+
}, g(ca, e.$attrs, S(O).root)), {
|
|
1176
|
+
default: w(() => [
|
|
1177
|
+
e.$slots.header ? (v(), p("div", g({
|
|
1167
1178
|
key: 0,
|
|
1168
1179
|
class: "bb-select-popover__header",
|
|
1169
|
-
inert:
|
|
1170
|
-
},
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
e.$slots.footer ? (
|
|
1180
|
+
inert: S(na)
|
|
1181
|
+
}, S(O).header), [b(e.$slots, "header", _(h(Aa.value)))], 16, Ft)) : f("", !0),
|
|
1182
|
+
m(S(Bt)),
|
|
1183
|
+
m(S(Ht)),
|
|
1184
|
+
e.$slots.footer ? (v(), p("div", g({
|
|
1174
1185
|
key: 1,
|
|
1175
1186
|
class: "bb-select-popover__footer",
|
|
1176
|
-
inert:
|
|
1177
|
-
},
|
|
1187
|
+
inert: S(na)
|
|
1188
|
+
}, S(O).footer), [b(e.$slots, "footer", _(h(Aa.value)))], 16, It)) : f("", !0)
|
|
1178
1189
|
]),
|
|
1179
1190
|
_: 3
|
|
1180
1191
|
}, 16, [
|
|
@@ -1194,4 +1205,4 @@ var kt = {
|
|
|
1194
1205
|
], 64));
|
|
1195
1206
|
}
|
|
1196
1207
|
});
|
|
1197
|
-
export {
|
|
1208
|
+
export { E as default };
|