bitboss-ui 3.0.0-beta.73 → 3.0.0-beta.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/bin/bitboss-ui-mcp.mjs +101 -3
- package/bin/bitboss-ui.mjs +6 -1
- package/bin/cli.mjs +31 -5
- package/dist/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +5 -5
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +2 -2
- package/dist/ai/BbCalendar.md +9 -5
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +12 -0
- package/dist/ai/BbColorPalette.md +19 -15
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +16 -3
- package/dist/ai/BbDatePickerInput.md +17 -1
- package/dist/ai/BbDialog.md +16 -4
- package/dist/ai/BbDropdown.md +175 -67
- package/dist/ai/BbDropdownButton.md +27 -8
- package/dist/ai/BbForm.md +4 -1
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbNumberInput.md +8 -4
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +79 -67
- package/dist/ai/BbSelectPopover.md +24 -5
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +59 -34
- package/dist/ai/BbTimePicker.md +16 -3
- package/dist/ai/BbTimePickerInput.md +15 -1
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/BbTree.md +5 -1
- package/dist/ai/CommonPopover.md +1 -0
- package/dist/ai/FlatListBox.md +1 -0
- package/dist/ai/GroupedListBox.md +1 -0
- package/dist/ai/ListBox.md +1 -0
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +215 -6
- package/dist/ai/components.json +77 -43
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +8 -4
- package/dist/ai/guides/design-tokens.md +33 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- package/dist/ai/guides/inertia-helpers.md +613 -53
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
- package/dist/ai/guides/migration/components/bb-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +46 -5
- package/dist/ai/guides/migration/v3-beta-tooling.md +4 -0
- package/dist/ai/guides/passthrough.md +3 -3
- package/dist/ai/guides/preset-components.md +15 -2
- package/dist/ai/guides/reporting.md +49 -0
- package/dist/ai/helpers/inertia/manifest.json +33 -38
- package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
- package/dist/ai/helpers/inertia/useQuery.ts +24 -6
- package/dist/ai/helpers/inertia/utils.ts +552 -3
- package/dist/ai/index.md +2 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
- package/dist/ai/manifest/components/BbCalendar.json +2 -2
- package/dist/ai/manifest/components/BbCarousel.json +0 -3
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbColorInput.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.json +7 -4
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +6 -3
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +7 -1
- package/dist/ai/manifest/components/BbDropdown.json +23 -17
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +16 -5
- package/dist/ai/manifest/components/BbDropdownButton.json +15 -9
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +2 -0
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbSelect.json +10 -7
- package/dist/ai/manifest/components/BbSelectPopover.json +7 -4
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -1
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbTable.json +6 -6
- package/dist/ai/manifest/components/BbTable.tree.json +16 -6
- package/dist/ai/manifest/components/BbTimePicker.json +7 -4
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbToastPortal.json +1 -1
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +2 -1
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +2 -1
- package/dist/ai/manifest/components/ListBox.json +2 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +36 -3
- package/dist/ai/manifest/types.advanced.json +81 -80
- package/dist/ai/manifest/types.api.json +64 -65
- package/dist/ai/manifest/types.wrapper.json +155 -118
- package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
- package/dist/ai/source/BbAlert.md +16 -4
- package/dist/ai/source/BbAvatar.md +121 -9
- package/dist/ai/source/BbBadge.md +12 -5
- package/dist/ai/source/BbBreadcrumbs.md +56 -55
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCalendar.md +22 -12
- package/dist/ai/source/BbCarousel.md +31 -28
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +59 -12
- package/dist/ai/source/BbConfirm.md +7 -0
- package/dist/ai/source/BbConfirmPortal.md +9 -4
- package/dist/ai/source/BbDatePicker.md +71 -22
- package/dist/ai/source/BbDatePickerInput.md +72 -9
- package/dist/ai/source/BbDialog.md +45 -2
- package/dist/ai/source/BbDropdown.md +263 -63
- package/dist/ai/source/BbDropdownButton.md +27 -2
- package/dist/ai/source/BbDropdownGroup.md +121 -59
- package/dist/ai/source/BbForm.md +73 -6
- package/dist/ai/source/BbGallery.md +76 -55
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbHoverCard.md +7 -0
- package/dist/ai/source/BbHoverCardPortal.md +9 -5
- package/dist/ai/source/BbNumberInput.md +22 -16
- package/dist/ai/source/BbOffCanvas.md +48 -2
- package/dist/ai/source/BbPopover.md +7 -0
- package/dist/ai/source/BbPopoverPortal.md +9 -5
- package/dist/ai/source/BbRadio.md +4 -3
- package/dist/ai/source/BbRadioGroup.md +19 -10
- package/dist/ai/source/BbSelect.md +35 -20
- package/dist/ai/source/BbSelectPopover.md +116 -8
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +126 -32
- package/dist/ai/source/BbTag.md +10 -3
- package/dist/ai/source/BbTimePicker.md +69 -15
- package/dist/ai/source/BbTimePickerInput.md +45 -7
- package/dist/ai/source/BbToast.md +16 -2
- package/dist/ai/source/BbToastPortal.md +18 -6
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/CommonFieldInput.md +11 -5
- package/dist/ai/source/CommonPopover.md +28 -2
- package/dist/ai/source/FlatListBox.md +26 -5
- package/dist/ai/source/GroupedListBox.md +63 -11
- package/dist/ai/source/ListBox.md +4 -0
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +61 -43
- package/dist/components/BbAvatar/avatarIdentity.js +25 -0
- package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
- package/dist/components/BbAvatar/types.d.ts +24 -5
- package/dist/components/BbAvatar/types.js +5 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +80 -79
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +152 -158
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +235 -234
- package/dist/components/BbCalendar/types.d.ts +2 -2
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
- package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
- package/dist/components/BbColorInput/types.d.ts +7 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +239 -223
- package/dist/components/BbColorPalette/types.d.ts +8 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
- package/dist/components/BbConfirm/types.d.ts +5 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +4 -2
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +160 -143
- package/dist/components/BbDatePicker/types.d.ts +9 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +483 -496
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +252 -236
- package/dist/components/BbDialog/leaveGhost.js +38 -0
- package/dist/components/BbDialog/overlayActions.js +34 -20
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +92 -87
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +419 -368
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +384 -340
- package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
- package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +133 -119
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +73 -45
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbDropdown/types.d.ts +73 -58
- package/dist/components/BbDropdown/types.js +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -72
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +48 -0
- package/dist/components/BbDropdownButton/types.d.ts +13 -2
- package/dist/components/BbDropdownButton/types.js +2 -0
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
- package/dist/components/BbForm/types.d.ts +31 -0
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +318 -296
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
- package/dist/components/BbHoverCard/types.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +10 -6
- package/dist/components/BbNumberInput/numberDisplay.js +102 -106
- package/dist/components/BbNumberInput/types.d.ts +4 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +425 -409
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
- package/dist/components/BbPopover/types.d.ts +5 -0
- package/dist/components/BbRadio/types.d.ts +4 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -106
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +167 -163
- package/dist/components/BbSelect/types.d.ts +23 -20
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +3 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +680 -637
- package/dist/components/BbSelectPopover/types.d.ts +10 -4
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
- package/dist/components/BbSwitchGroup/types.d.ts +3 -6
- package/dist/components/BbTable/BbTable.vue.d.ts +1 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1182 -1165
- package/dist/components/BbTable/BbTableDataRow.js +96 -96
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +157 -140
- package/dist/components/BbTimePicker/types.d.ts +9 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +3 -1
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +278 -268
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +12 -12
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
- package/dist/components/BbToast/types.d.ts +7 -2
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
- package/dist/components/BbTree/types.d.ts +1 -1
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +14 -2
- package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +115 -96
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +194 -166
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
- package/dist/composables/formSubmitLock.js +2 -1
- package/dist/composables/overlayRegistry.js +52 -42
- package/dist/composables/useActiveInactiveState.js +8 -4
- package/dist/composables/useBbDialog.js +5 -5
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/composables/useOwnModel.js +16 -0
- package/dist/composables/useSegmentedFields.js +31 -20
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/currencyDigits.js +58 -0
- package/dist/i18n/locales/ar.json +2 -0
- package/dist/i18n/locales/cs.json +2 -0
- package/dist/i18n/locales/da.json +2 -0
- package/dist/i18n/locales/de-CH.json +2 -0
- package/dist/i18n/locales/de.json +2 -0
- package/dist/i18n/locales/el.json +2 -0
- package/dist/i18n/locales/en-GB.json +2 -0
- package/dist/i18n/locales/en.json +2 -0
- package/dist/i18n/locales/es-MX.json +2 -0
- package/dist/i18n/locales/es.json +2 -0
- package/dist/i18n/locales/fa.json +2 -0
- package/dist/i18n/locales/fi.json +2 -0
- package/dist/i18n/locales/fr.json +2 -0
- package/dist/i18n/locales/he.json +2 -0
- package/dist/i18n/locales/hu.json +2 -0
- package/dist/i18n/locales/it.json +2 -0
- package/dist/i18n/locales/ja.json +2 -0
- package/dist/i18n/locales/ko.json +2 -0
- package/dist/i18n/locales/nb.json +2 -0
- package/dist/i18n/locales/nl.json +2 -0
- package/dist/i18n/locales/pl.json +2 -0
- package/dist/i18n/locales/pt-BR.json +2 -0
- package/dist/i18n/locales/pt-PT.json +2 -0
- package/dist/i18n/locales/ro.json +2 -0
- package/dist/i18n/locales/ru.json +2 -0
- package/dist/i18n/locales/sv.json +2 -0
- package/dist/i18n/locales/tr.json +2 -0
- package/dist/i18n/locales/uk.json +2 -0
- package/dist/i18n/locales/zh-CN.json +2 -0
- package/dist/i18n/locales/zh-HK.json +2 -0
- package/dist/i18n/locales/zh-TW.json +2 -0
- package/dist/i18n/regionDates.js +250 -0
- package/dist/i18n/regionHints.js +30 -41
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +35 -31
- package/dist/llms-full.txt +1428 -400
- package/dist/llms-medium.txt +8 -4
- package/dist/llms.txt +4 -2
- package/dist/locale-blueprint.json +2 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -1
- package/dist/types/CommonProps.d.ts +8 -0
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/ptComponentMap.d.ts +3 -3
- package/dist/utilities/functions/hash.js +97 -64
- package/dist/utilities/functions/isEqual.js +33 -25
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +2 -1
- package/dist/vite.js +11 -4
- package/llms.txt +4 -2
- package/package.json +3 -2
- package/scripts/README.md +3 -1
- package/scripts/lib/adoption-checklist.json +6 -5
- package/scripts/lib/agent-manifest.mjs +33 -6
- package/scripts/lib/agent-setup.mjs +90 -24
- package/scripts/lib/cldr-pins.ts +182 -0
- package/scripts/lib/engines-include.d.mts +5 -0
- package/scripts/lib/engines-include.mjs +40 -0
- package/scripts/lib/eslint-plugin.mjs +8 -2
- package/scripts/lib/hidden-label-placeholder.mjs +25 -5
- package/scripts/lib/idiom-scan.mjs +30 -3
- package/scripts/lib/legacy-agent-files.json +152 -0
- package/scripts/lib/mcp-config.mjs +74 -7
- package/scripts/lib/portal-names.mjs +78 -8
- package/scripts/lib/release-results.mjs +5 -2
- package/scripts/lib/report.mjs +340 -0
- package/scripts/lib/run-beat.mjs +14 -0
- package/scripts/lib/run-records.mjs +313 -0
- package/scripts/lib/selector-log.mjs +98 -0
- package/scripts/lib/ticket-beat.mjs +30 -0
- package/scripts/lib/validate-bb-markup.mjs +37 -2
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -26,124 +26,133 @@ var x = ["id"], S = ["id"], C = /*@__PURE__*/ l({
|
|
|
26
26
|
passthrough: {},
|
|
27
27
|
options: {}
|
|
28
28
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
emits: ["retry"],
|
|
30
|
+
setup(l, { emit: C }) {
|
|
31
|
+
let w = l, T = C, E = i(() => !!w.hasWarnings && !w.hasErrors), { t: D } = e(), O = i(() => ({
|
|
32
|
+
root: `${w.block}__list`,
|
|
33
|
+
loading: `${w.block}__loading`,
|
|
34
|
+
empty: `${w.block}__empty`,
|
|
35
|
+
option: `${w.block}__item`,
|
|
36
|
+
label: `${w.block}__label`,
|
|
37
|
+
description: `${w.block}__item-description`
|
|
38
|
+
})), k = i(() => w.listLayout ?? "horizontal"), A = h(null), j = h(), M = h(), N = i(() => j.value ? {
|
|
39
|
+
"--row-h": `${j.value}px`,
|
|
40
|
+
...Object.fromEntries(Object.entries(M.value ?? {}).filter(([, e]) => e).map(([e, t]) => [`--row-${e}`, `${t}px`]))
|
|
41
|
+
} : void 0), P, F = () => Array.from(A.value?.children ?? []).filter((e) => e.classList.contains(O.value.option)), I = () => {
|
|
42
|
+
let e = F(), t = e.map((e) => e.offsetHeight);
|
|
42
43
|
if (!t.length) {
|
|
43
|
-
|
|
44
|
+
j.value = M.value = void 0;
|
|
44
45
|
return;
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
-
let n = getComputedStyle(e[t.indexOf(
|
|
48
|
-
|
|
47
|
+
j.value = Math.min(...t);
|
|
48
|
+
let n = getComputedStyle(e[t.indexOf(j.value)]), r = (e) => parseFloat(e) || 0, [i, a] = [r(n.borderLeftWidth), r(n.borderRightWidth)], o = n.direction === "rtl";
|
|
49
|
+
M.value = {
|
|
49
50
|
bs: r(n.borderTopWidth),
|
|
50
51
|
be: r(n.borderBottomWidth),
|
|
51
52
|
is: o ? a : i,
|
|
52
53
|
ie: o ? i : a
|
|
53
54
|
};
|
|
54
|
-
},
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
for (let e of
|
|
58
|
-
|
|
55
|
+
}, L = () => {
|
|
56
|
+
if (P?.disconnect(), typeof ResizeObserver < "u") {
|
|
57
|
+
P ??= new ResizeObserver(I);
|
|
58
|
+
for (let e of F()) P.observe(e);
|
|
59
|
+
I();
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
|
-
p(
|
|
62
|
-
let
|
|
62
|
+
p(L), b(() => w.options, L, { flush: "post" }), f(() => P?.disconnect());
|
|
63
|
+
let R = [
|
|
63
64
|
"auto",
|
|
64
65
|
"horizontal",
|
|
65
66
|
"vertical",
|
|
66
67
|
"label-fill",
|
|
67
68
|
"input-fill"
|
|
68
|
-
],
|
|
69
|
-
let e =
|
|
70
|
-
return
|
|
71
|
-
}),
|
|
72
|
-
if (
|
|
73
|
-
let [e, t] =
|
|
69
|
+
], z = (e) => /^[\S]+\s[\S]+$/.test(e), B = i(() => {
|
|
70
|
+
let e = w.itemLayout ?? "auto";
|
|
71
|
+
return R.includes(e) ? e : z(e) ? "ratio" : "auto";
|
|
72
|
+
}), V = (e) => B.value !== "vertical" && n.includes(e) ? e : void 0, H = i(() => V(w.itemLabelAlign)), U = i(() => V(w.itemInputAlign)), W = i(() => {
|
|
73
|
+
if (B.value !== "ratio") return;
|
|
74
|
+
let [e, t] = w.itemLayout.split(/\s+/).map((e) => e.length);
|
|
74
75
|
return { gridTemplateColumns: `minmax(0, ${e}fr) minmax(0, ${t}fr)` };
|
|
75
|
-
}),
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
},
|
|
76
|
+
}), G = t().id, K = (e) => `${G.value}-option-${e}__text`, q = (e) => `${G.value}-option-${e}__description`, J = h(null), Y = h(!1), X = (e, t) => {
|
|
77
|
+
J.value = t, Y.value = e.target instanceof Element && e.target.matches(":focus-visible");
|
|
78
|
+
}, Z = (e) => {
|
|
79
|
+
J.value === e && (J.value = null, Y.value = !1);
|
|
80
|
+
}, Q = (e, t) => {
|
|
80
81
|
let n = {
|
|
81
|
-
onFocusin: (e) =>
|
|
82
|
-
onFocusout: () =>
|
|
83
|
-
}, r =
|
|
82
|
+
onFocusin: (e) => X(e, t),
|
|
83
|
+
onFocusout: () => Z(t)
|
|
84
|
+
}, r = w.passthrough?.part?.("item", $(e, t), e.item);
|
|
84
85
|
return r ? u(n, r) : n;
|
|
85
|
-
},
|
|
86
|
-
let n =
|
|
86
|
+
}, $ = (e, t) => {
|
|
87
|
+
let n = J.value === t;
|
|
87
88
|
return {
|
|
88
89
|
selected: !!e.selected,
|
|
89
90
|
checked: !!e.selected,
|
|
90
91
|
disabled: e.disabled || void 0,
|
|
91
92
|
focused: n,
|
|
92
|
-
focusVisible: n &&
|
|
93
|
+
focusVisible: n && Y.value
|
|
93
94
|
};
|
|
94
95
|
};
|
|
95
96
|
return (e, t) => (m(), o("span", u({
|
|
96
97
|
ref_key: "listEl",
|
|
97
|
-
ref:
|
|
98
|
-
class: [
|
|
99
|
-
[`${
|
|
100
|
-
[`${
|
|
101
|
-
[`${
|
|
102
|
-
[`${
|
|
103
|
-
[`${
|
|
104
|
-
[`${
|
|
105
|
-
[`${
|
|
98
|
+
ref: A,
|
|
99
|
+
class: [O.value.root, {
|
|
100
|
+
[`${O.value.root}--errors`]: l.hasErrors,
|
|
101
|
+
[`${O.value.root}--warnings`]: E.value,
|
|
102
|
+
[`${O.value.root}--${k.value}`]: !0,
|
|
103
|
+
[`${O.value.root}--block`]: l.listBlock,
|
|
104
|
+
[`${O.value.root}--strip`]: !!l.variant,
|
|
105
|
+
[`${O.value.root}--${l.variant}`]: !!l.variant,
|
|
106
|
+
[`${O.value.root}--no-transition`]: !!l.variant && !l.indicatorReady
|
|
106
107
|
}],
|
|
107
|
-
style:
|
|
108
|
+
style: N.value
|
|
108
109
|
}, l.passthrough?.list), [
|
|
109
110
|
_(e.$slots, "prepend"),
|
|
110
111
|
!l.options.length && l.loading ? (m(), o("span", {
|
|
111
112
|
key: 0,
|
|
112
|
-
class: d(
|
|
113
|
-
}, [_(e.$slots, "loading", {}, () => [c(v(l.loadingText || y(
|
|
113
|
+
class: d(O.value.loading)
|
|
114
|
+
}, [_(e.$slots, "loading", {}, () => [c(v(l.loadingText || y(D)("common.loadingText").value), 1)])], 2)) : !l.options.length && l.error != null ? (m(), o("span", {
|
|
114
115
|
key: 1,
|
|
115
|
-
class: d(
|
|
116
|
-
|
|
116
|
+
class: d([O.value.empty, `${O.value.empty}--failed`]),
|
|
117
|
+
role: "status"
|
|
118
|
+
}, [s("span", null, v(l.failedText || y(D)("common.failedText").value), 1), s("button", {
|
|
119
|
+
class: "bb-load-retry",
|
|
120
|
+
type: "button",
|
|
121
|
+
onClick: t[0] ||= (e) => T("retry", e)
|
|
122
|
+
}, v(y(D)("common.retryLabel").value), 1)], 2)) : l.options.length ? a("", !0) : (m(), o("span", {
|
|
123
|
+
key: 2,
|
|
124
|
+
class: d(O.value.empty)
|
|
125
|
+
}, [_(e.$slots, "empty", {}, () => [c(v(l.emptyText || y(D)("common.emptyText").value), 1)])], 2)),
|
|
117
126
|
(m(!0), o(r, null, g(l.options, (t, n) => (m(), o("label", u({
|
|
118
127
|
key: t?.valueHash || n,
|
|
119
|
-
class: [`${
|
|
120
|
-
[`${
|
|
121
|
-
[`${
|
|
122
|
-
[`${
|
|
123
|
-
[`${
|
|
124
|
-
[`${
|
|
125
|
-
[`${
|
|
126
|
-
[`${
|
|
127
|
-
[`${
|
|
128
|
-
[`${
|
|
129
|
-
[`${
|
|
128
|
+
class: [`${O.value.option}`, {
|
|
129
|
+
[`${O.value.option}--selected`]: t.selected,
|
|
130
|
+
[`${O.value.option}--description`]: t.description,
|
|
131
|
+
[`${O.value.option}--disabled`]: t.disabled,
|
|
132
|
+
[`${O.value.option}--focused`]: J.value === n,
|
|
133
|
+
[`${O.value.option}--focus-visible`]: J.value === n && Y.value,
|
|
134
|
+
[`${O.value.option}--${B.value}`]: !0,
|
|
135
|
+
[`${O.value.option}--reverse`]: l.itemReverse,
|
|
136
|
+
[`${O.value.option}--aligned`]: !!(H.value || U.value),
|
|
137
|
+
[`${O.value.option}--label-align-${H.value}`]: !!H.value,
|
|
138
|
+
[`${O.value.option}--input-align-${U.value}`]: !!U.value
|
|
130
139
|
}],
|
|
131
|
-
style:
|
|
132
|
-
}, { ref_for: !0 },
|
|
140
|
+
style: W.value
|
|
141
|
+
}, { ref_for: !0 }, Q(t, n)), [
|
|
133
142
|
_(e.$slots, "input", {
|
|
134
|
-
descriptionId: t.description ?
|
|
143
|
+
descriptionId: t.description ? q(n) : void 0,
|
|
135
144
|
index: n,
|
|
136
|
-
labelId:
|
|
145
|
+
labelId: K(n),
|
|
137
146
|
option: t,
|
|
138
|
-
rowStates:
|
|
147
|
+
rowStates: $(t, n)
|
|
139
148
|
}),
|
|
140
149
|
s("span", u({
|
|
141
|
-
id:
|
|
150
|
+
id: K(n),
|
|
142
151
|
class: {
|
|
143
|
-
[
|
|
152
|
+
[O.value.label]: !0,
|
|
144
153
|
"bb-sr-only": l.hideLabel
|
|
145
154
|
}
|
|
146
|
-
}, { ref_for: !0 }, l.passthrough?.part?.("label",
|
|
155
|
+
}, { ref_for: !0 }, l.passthrough?.part?.("label", $(t, n), t.item)), [_(e.$slots, "label", {
|
|
147
156
|
checked: !!t.selected,
|
|
148
157
|
description: t.description,
|
|
149
158
|
item: t.item,
|
|
@@ -151,12 +160,12 @@ var x = ["id"], S = ["id"], C = /*@__PURE__*/ l({
|
|
|
151
160
|
}, () => [c(v(t.text), 1)])], 16, x),
|
|
152
161
|
t.description ? (m(), o("span", u({
|
|
153
162
|
key: 0,
|
|
154
|
-
id:
|
|
163
|
+
id: q(n),
|
|
155
164
|
class: {
|
|
156
|
-
[
|
|
165
|
+
[O.value.description]: !0,
|
|
157
166
|
"bb-sr-only": l.hideLabel
|
|
158
167
|
}
|
|
159
|
-
}, { ref_for: !0 }, l.passthrough?.part?.("itemDescription",
|
|
168
|
+
}, { ref_for: !0 }, l.passthrough?.part?.("itemDescription", $(t, n), t.item)), v(t.description), 17, S)) : a("", !0)
|
|
160
169
|
], 16))), 128)),
|
|
161
170
|
_(e.$slots, "append")
|
|
162
171
|
], 16));
|
|
@@ -3,6 +3,7 @@ import { getCurrentScope as e, inject as t, onScopeDispose as n, provide as r, s
|
|
|
3
3
|
var a = Symbol.for("bitboss-ui:form-submit-lock"), o = Symbol.for("bitboss-ui:overlay-submit-guard"), s = () => {
|
|
4
4
|
let e = i([]), t = {
|
|
5
5
|
saving: () => e.value.some((e) => e.locked()),
|
|
6
|
+
pending: () => e.value.some((e) => e.pending()),
|
|
6
7
|
forms: () => e.value,
|
|
7
8
|
onSubmitted: null
|
|
8
9
|
};
|
|
@@ -18,7 +19,7 @@ var a = Symbol.for("bitboss-ui:form-submit-lock"), o = Symbol.for("bitboss-ui:ov
|
|
|
18
19
|
r(o, null);
|
|
19
20
|
}, l = (r) => {
|
|
20
21
|
let i = t(o, null);
|
|
21
|
-
if (!i) return
|
|
22
|
+
if (!i) return null;
|
|
22
23
|
let a = i.register(r);
|
|
23
24
|
return e() && n(a), (e) => i.submitted(r, e);
|
|
24
25
|
};
|
|
@@ -206,20 +206,24 @@ var g = Symbol("abort"), _ = (e) => (typeof e == "object" || typeof e == "functi
|
|
|
206
206
|
completed: !1,
|
|
207
207
|
reason: j ?? "hide"
|
|
208
208
|
}), j = null;
|
|
209
|
-
}, { flush: "sync" })
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
209
|
+
}, { flush: "sync" });
|
|
210
|
+
let R = !1;
|
|
211
|
+
a() && u(() => {
|
|
212
|
+
R = !0, P && P.for === A && A || L({
|
|
213
|
+
completed: !1,
|
|
214
|
+
reason: "unmounted"
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
let z = b.enabled === !1 ? o(F, null) : null, B = (e) => {
|
|
218
|
+
z ? z.record(e) : j = e;
|
|
219
|
+
}, V = (e, t) => {
|
|
216
220
|
let n = {
|
|
217
221
|
completed: !0,
|
|
218
222
|
value: t
|
|
219
223
|
};
|
|
220
|
-
e?.resolve(n), e?.onSettled?.(n), A || (N = n, b.model.value = !1);
|
|
221
|
-
},
|
|
222
|
-
if (
|
|
224
|
+
e?.resolve(n), e?.onSettled?.(n), A || (N = n, R || (b.model.value = !1));
|
|
225
|
+
}, H = (e) => {
|
|
226
|
+
if (z) return z.complete(e);
|
|
223
227
|
if (P) return P.promise;
|
|
224
228
|
let t = A, n = [b.onComplete?.(), t?.onComplete].filter((e) => typeof e == "function");
|
|
225
229
|
A = null;
|
|
@@ -238,7 +242,7 @@ var g = Symbol("abort"), _ = (e) => (typeof e == "object" || typeof e == "functi
|
|
|
238
242
|
return a(), Promise.reject(e);
|
|
239
243
|
}
|
|
240
244
|
if (o === g) return a(), Promise.resolve();
|
|
241
|
-
if (!_(o) || A || !b.model.value) return
|
|
245
|
+
if (!_(o) || A || !b.model.value) return V(t, e), Promise.resolve();
|
|
242
246
|
A = t, M.value = !0;
|
|
243
247
|
let s = {
|
|
244
248
|
for: t,
|
|
@@ -248,39 +252,45 @@ var g = Symbol("abort"), _ = (e) => (typeof e == "object" || typeof e == "functi
|
|
|
248
252
|
if (await t === !1) return g;
|
|
249
253
|
for (; r < n.length;) if (await n[r++](e) === !1) return g;
|
|
250
254
|
})(o).then((n) => {
|
|
251
|
-
P === s && (I(), A === t && n
|
|
255
|
+
P === s && (I(), A === t && (n === g ? R && L({
|
|
256
|
+
completed: !1,
|
|
257
|
+
reason: "unmounted"
|
|
258
|
+
}) : (A = null, V(t, e))));
|
|
252
259
|
}, (e) => {
|
|
253
|
-
if (P === s) throw I(),
|
|
260
|
+
if (P === s) throw I(), R && A === t && L({
|
|
261
|
+
completed: !1,
|
|
262
|
+
reason: "unmounted"
|
|
263
|
+
}), e;
|
|
254
264
|
}), P = s, s.promise;
|
|
255
265
|
};
|
|
256
266
|
b.enabled !== !1 && d(F, {
|
|
257
|
-
record:
|
|
258
|
-
complete:
|
|
267
|
+
record: B,
|
|
268
|
+
complete: H
|
|
259
269
|
});
|
|
260
|
-
let
|
|
261
|
-
if (
|
|
270
|
+
let U = b.enabled === !1 ? null : x(y, C?.appContext), W = C ? S(C) : null, K = b.enabled === !1 ? null : t(), q = !!K && K.family === y && n(K, W), J = !!K && K.family === y && !K.surface && (K.expectedIds.size ? K.expectedIds.has(m(b.id) ?? "") : q);
|
|
271
|
+
if (K && !J && q && !K.surface) {
|
|
262
272
|
let e = m(b.id);
|
|
263
|
-
e &&
|
|
273
|
+
e && K.strayIds.add(e);
|
|
264
274
|
}
|
|
265
|
-
let
|
|
275
|
+
let Y = r(() => J ? K.domId : m(b.id) ?? ""), X = (e) => {
|
|
266
276
|
b.model.value = !0;
|
|
267
277
|
};
|
|
268
|
-
if (
|
|
278
|
+
if (U) {
|
|
269
279
|
let e = null;
|
|
270
|
-
|
|
280
|
+
X = (t) => {
|
|
271
281
|
e ? e.show(void 0, t) : b.model.value = !0;
|
|
272
282
|
};
|
|
273
283
|
let t = () => {
|
|
274
284
|
if (!e) return;
|
|
275
|
-
let t =
|
|
276
|
-
t?.delete(e), t && !t.size &&
|
|
285
|
+
let t = U.byId.get(e.id);
|
|
286
|
+
t?.delete(e), t && !t.size && U.byId.delete(e.id), e = null, U.version.value++;
|
|
277
287
|
}, n = (n) => {
|
|
278
288
|
t(), n && (e = {
|
|
279
289
|
id: n,
|
|
280
|
-
owner:
|
|
290
|
+
owner: W,
|
|
281
291
|
element: b.element,
|
|
282
|
-
domId: () =>
|
|
283
|
-
openingRoot:
|
|
292
|
+
domId: () => Y.value,
|
|
293
|
+
openingRoot: K?.instance ?? null,
|
|
284
294
|
open: () => b.model.value,
|
|
285
295
|
data: () => E.value,
|
|
286
296
|
show(e, t, n, r) {
|
|
@@ -298,7 +308,7 @@ var g = Symbol("abort"), _ = (e) => (typeof e == "object" || typeof e == "functi
|
|
|
298
308
|
onComplete: n,
|
|
299
309
|
onSettled: r,
|
|
300
310
|
result: a
|
|
301
|
-
}, E.value = T(e), O = t, k =
|
|
311
|
+
}, E.value = T(e), O = t && b.element()?.contains(t) ? null : t, k = O ? G(O) : [], b.model.value = !0;
|
|
302
312
|
let o = A;
|
|
303
313
|
return s(() => {
|
|
304
314
|
A === o && !b.model.value && L({
|
|
@@ -308,45 +318,45 @@ var g = Symbol("abort"), _ = (e) => (typeof e == "object" || typeof e == "functi
|
|
|
308
318
|
}), a;
|
|
309
319
|
},
|
|
310
320
|
hide() {
|
|
311
|
-
|
|
321
|
+
B("hide"), b.model.value = !1;
|
|
312
322
|
},
|
|
313
|
-
complete:
|
|
323
|
+
complete: H,
|
|
314
324
|
reset: D
|
|
315
|
-
},
|
|
325
|
+
}, U.byId.has(n) || U.byId.set(n, /* @__PURE__ */ new Set()), U.byId.get(n).add(e), U.version.value++);
|
|
316
326
|
};
|
|
317
|
-
if (n(m(b.id)), h(() => m(b.id), n),
|
|
327
|
+
if (n(m(b.id)), h(() => m(b.id), n), J && e) {
|
|
318
328
|
let t = e, n = {
|
|
319
329
|
id: () => m(b.id),
|
|
320
330
|
show: (e, n, r, i) => t.show(e, n, r, i),
|
|
321
331
|
dismiss(e) {
|
|
322
|
-
|
|
332
|
+
B(e), b.model.value = !1;
|
|
323
333
|
},
|
|
324
334
|
data: () => E.value,
|
|
325
|
-
complete: (e) =>
|
|
335
|
+
complete: (e) => H(e),
|
|
326
336
|
reset: () => D()
|
|
327
337
|
};
|
|
328
|
-
|
|
329
|
-
|
|
338
|
+
K.surface = n, a() && u(() => {
|
|
339
|
+
K.surface === n && (K.surface = null);
|
|
330
340
|
});
|
|
331
341
|
}
|
|
332
|
-
C && (c(() =>
|
|
342
|
+
C && (c(() => U.version.value++), l(() => U.version.value++)), a() && u(t);
|
|
333
343
|
}
|
|
334
344
|
return {
|
|
335
345
|
data: E,
|
|
336
|
-
domId:
|
|
337
|
-
onDemand:
|
|
338
|
-
record:
|
|
339
|
-
complete:
|
|
346
|
+
domId: Y,
|
|
347
|
+
onDemand: J,
|
|
348
|
+
record: B,
|
|
349
|
+
complete: H,
|
|
340
350
|
completing: M,
|
|
341
351
|
closingResult: () => N ?? {
|
|
342
352
|
completed: !1,
|
|
343
353
|
reason: "hide"
|
|
344
354
|
},
|
|
345
355
|
reset: D,
|
|
346
|
-
show: (e) =>
|
|
356
|
+
show: (e) => X(e),
|
|
347
357
|
afterHidden() {
|
|
348
358
|
if (b.model.value) return;
|
|
349
|
-
E.value = w(),
|
|
359
|
+
E.value = w(), J && K.settled && K.hidden();
|
|
350
360
|
let e = O, t = k;
|
|
351
361
|
if (O = null, k = [], !e || typeof document > "u") return;
|
|
352
362
|
let n = document.activeElement, r = b.element();
|
|
@@ -6,15 +6,19 @@ var i = (i) => {
|
|
|
6
6
|
if (!(t instanceof HTMLElement)) return;
|
|
7
7
|
let n = e(i.value);
|
|
8
8
|
n && (a.value = n.contains(t));
|
|
9
|
-
}, s = (
|
|
10
|
-
|
|
9
|
+
}, s = (t) => {
|
|
10
|
+
let n = e(i.value);
|
|
11
|
+
t.target instanceof HTMLElement && n && t.target !== n && t.target.contains(n) || o(t.target);
|
|
11
12
|
}, c = (e) => {
|
|
12
13
|
o(e.target);
|
|
13
14
|
};
|
|
14
15
|
return t(() => {
|
|
15
|
-
document.addEventListener("focusin", s, { passive: !0 }), document.addEventListener("click", c, {
|
|
16
|
+
document.addEventListener("focusin", s, { passive: !0 }), document.addEventListener("click", c, {
|
|
17
|
+
passive: !0,
|
|
18
|
+
capture: !0
|
|
19
|
+
});
|
|
16
20
|
}), n(() => {
|
|
17
|
-
document.removeEventListener("focusin", s), document.removeEventListener("click", c);
|
|
21
|
+
document.removeEventListener("focusin", s), document.removeEventListener("click", c, { capture: !0 });
|
|
18
22
|
}), { active: a };
|
|
19
23
|
};
|
|
20
24
|
export { i as useActiveInactiveState };
|
|
@@ -22,9 +22,9 @@ var h = {
|
|
|
22
22
|
reason: "unmounted"
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
|
-
let w = (e, t) => {
|
|
26
|
-
let { promise:
|
|
27
|
-
return C.add(
|
|
25
|
+
let w = (e, t, r) => {
|
|
26
|
+
let { promise: i, cancel: a } = n(() => v.value, (n) => n.show(e, r, t), () => S("show"));
|
|
27
|
+
return C.add(a), i.then(() => C.delete(a)), i;
|
|
28
28
|
};
|
|
29
29
|
return {
|
|
30
30
|
isReady: u(() => !!v.value),
|
|
@@ -35,8 +35,8 @@ var h = {
|
|
|
35
35
|
completed: !1,
|
|
36
36
|
reason: e
|
|
37
37
|
});
|
|
38
|
-
let r = n?.onComplete;
|
|
39
|
-
return v.value ? v.value.show(t,
|
|
38
|
+
let r = n?.onComplete, i = document.activeElement, a = i instanceof HTMLElement && i !== document.body ? i : null;
|
|
39
|
+
return v.value ? v.value.show(t, a, r) : _ ? w(t, r, a) : (S("show"), Promise.resolve({
|
|
40
40
|
completed: !1,
|
|
41
41
|
reason: "missing"
|
|
42
42
|
}));
|
|
@@ -22,66 +22,68 @@ var m = ([e, t, n], r) => e === void 0 ? {
|
|
|
22
22
|
f(_, (e, t) => {
|
|
23
23
|
Array.isArray(e) && Array.isArray(t) && v.value === t && (v.value = e);
|
|
24
24
|
});
|
|
25
|
-
let y = c(0), b = 0, x = null, S = null, C = c(0),
|
|
26
|
-
e.counted && (e.counted = !1, y.value--),
|
|
27
|
-
},
|
|
28
|
-
let e =
|
|
29
|
-
e && (
|
|
25
|
+
let y = c(0), b = 0, x = null, S = null, C = null, w = c(0), T = l(null), E = 0, D = null, O = (e) => {
|
|
26
|
+
e.counted && (e.counted = !1, y.value--), D === e && (D = null);
|
|
27
|
+
}, k = () => {
|
|
28
|
+
let e = D;
|
|
29
|
+
e && (O(e), e.controller.abort());
|
|
30
30
|
};
|
|
31
|
-
s(
|
|
32
|
-
let
|
|
33
|
-
if (
|
|
34
|
-
let e =
|
|
35
|
-
Array.isArray(e) ? (v.value = e,
|
|
31
|
+
s(k, !0);
|
|
32
|
+
let A = t(), j = `bb-items:${d()}`, M = c(""), N = !1, P = null, F = A.enabled && !e && g.marker ? r(o()) : void 0;
|
|
33
|
+
if (F) {
|
|
34
|
+
let e = A.get(F);
|
|
35
|
+
Array.isArray(e) ? (v.value = e, P = e, N = !0) : process.env.NODE_ENV !== "production" && console.warn(`[bitboss-ui] The server transferred an \`items\` provider's rows as "${F}", but the SSR-state adapter on the client has no such entry. The client requests them again, and this component will not match the server HTML.`), process.env.NODE_ENV !== "production" && F !== j && i(F, j);
|
|
36
36
|
}
|
|
37
|
-
let
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
if (Array.isArray(_.value)) return ++b,
|
|
37
|
+
let I = (t) => {
|
|
38
|
+
A.enabled && e && (h(t) ? (A.set(j, t), M.value = j) : (process.env.NODE_ENV !== "production" && console.warn("[bitboss-ui] An `items` provider resolved rows that cannot be serialized into the SSR payload (a row carries a function or a symbol — a class instance or an ORM model, most likely). The server-rendered options were dropped so hydration still matches; the client will fetch them again. Return plain objects to keep the server-side resolution."), v.value = []));
|
|
39
|
+
}, L = async (...t) => {
|
|
40
|
+
if (Array.isArray(_.value)) return ++b, k(), v.value = _.value, T.value = null, C = null, "applied";
|
|
41
41
|
if (typeof _.value != "function") return "skipped";
|
|
42
|
-
if (
|
|
43
|
-
let e =
|
|
44
|
-
return
|
|
42
|
+
if (P) {
|
|
43
|
+
let e = P;
|
|
44
|
+
return P = null, ++b, k(), v.value = e, "applied";
|
|
45
45
|
}
|
|
46
46
|
let n = ++b;
|
|
47
|
-
|
|
47
|
+
k();
|
|
48
48
|
let r = {
|
|
49
49
|
controller: new AbortController(),
|
|
50
50
|
counted: !0
|
|
51
51
|
};
|
|
52
|
-
|
|
52
|
+
D = r, x = t, y.value++;
|
|
53
53
|
let i = () => r.controller.signal.aborted || n !== b;
|
|
54
54
|
try {
|
|
55
55
|
let e = await _.value(m(t, r.controller.signal));
|
|
56
|
-
return i() ? "superseded" : (v.value = e,
|
|
56
|
+
return i() ? "superseded" : (v.value = e, T.value = null, C = null, S = t, w.value++, I(e), "applied");
|
|
57
57
|
} catch (n) {
|
|
58
58
|
if (i()) return "superseded";
|
|
59
59
|
v.value = [];
|
|
60
60
|
let r = n ?? /* @__PURE__ */ Error("The items provider rejected without a reason");
|
|
61
|
-
return e || (
|
|
61
|
+
return e || (T.value = r), C = t, S = t, w.value++, console.error(r), "failed";
|
|
62
62
|
} finally {
|
|
63
|
-
|
|
63
|
+
O(r);
|
|
64
64
|
}
|
|
65
|
-
},
|
|
65
|
+
}, R = p((e, t) => e === E ? L(...t()) : void 0, g.debounce || 0), z = (e) => Array.isArray(_.value) ? L(...e()) : R(E, e), { isHydrated: B } = n();
|
|
66
66
|
return {
|
|
67
|
-
getter:
|
|
68
|
-
debouncedGetter:
|
|
67
|
+
getter: L,
|
|
68
|
+
debouncedGetter: z,
|
|
69
69
|
items: v,
|
|
70
70
|
clientReproducible: a(() => Array.isArray(_.value)),
|
|
71
|
-
hydratedFromSsr:
|
|
72
|
-
loading: a(() =>
|
|
73
|
-
error:
|
|
71
|
+
hydratedFromSsr: N,
|
|
72
|
+
loading: a(() => B.value ? y.value > 0 : !1),
|
|
73
|
+
error: T,
|
|
74
74
|
inFlight: () => y.value > 0,
|
|
75
|
+
failedArgs: () => C,
|
|
76
|
+
retry: () => C ? L(...C) : Promise.resolve("skipped"),
|
|
75
77
|
startedArgs: () => x,
|
|
76
78
|
settledArgs: () => S,
|
|
77
|
-
settledCount:
|
|
79
|
+
settledCount: w,
|
|
78
80
|
discard: () => {
|
|
79
|
-
|
|
81
|
+
E++, ++b, k();
|
|
80
82
|
},
|
|
81
83
|
discardScheduled: () => {
|
|
82
|
-
|
|
84
|
+
E++;
|
|
83
85
|
},
|
|
84
|
-
ssrMarker:
|
|
86
|
+
ssrMarker: M
|
|
85
87
|
};
|
|
86
88
|
};
|
|
87
89
|
export { g as useItemsGetter };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useOwnModel as e } from "./useOwnModel.js";
|
|
2
|
+
import { nextTick as t, onMounted as n, watch as r } from "vue";
|
|
3
|
+
// src/composables/useOpenModel.ts
|
|
4
|
+
function i(t, n) {
|
|
5
|
+
return e(t, "open", n, () => !1);
|
|
6
|
+
}
|
|
7
|
+
function a(e, a, o) {
|
|
8
|
+
let { model: s, set: c } = i(e, a), l = async (e) => {
|
|
9
|
+
if (e !== o.isOpen()) {
|
|
10
|
+
if (!e) return void o.close();
|
|
11
|
+
await o.open(), await t(), s.value && !o.isOpen() && c(!1);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
r(o.isOpen, (e) => {
|
|
15
|
+
s.value !== e && c(e);
|
|
16
|
+
}), r(s, (e) => void l(e)), n(() => {
|
|
17
|
+
s.value && l(!0);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export { a as useOpenModel, i as useOpenProp };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { hasVnodeListener as e } from "../utilities/functions/hasVnodeListener.js";
|
|
2
|
+
import { computed as t, getCurrentInstance as n, shallowRef as r, watch as i } from "vue";
|
|
3
|
+
// src/composables/useOwnModel.ts
|
|
4
|
+
function a(a, o, s, c) {
|
|
5
|
+
let l = n(), u = `update:${o}`, d = r(a[o]);
|
|
6
|
+
return i(() => a[o], (e) => d.value = e), {
|
|
7
|
+
model: t(() => {
|
|
8
|
+
let t = e(l, u) ? a[o] : d.value;
|
|
9
|
+
return t === void 0 ? c() : t;
|
|
10
|
+
}),
|
|
11
|
+
set: (e) => {
|
|
12
|
+
d.value = e, s(u, e);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export { a as useOwnModel };
|