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/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -3,41 +3,44 @@ import { useConfig as t } from "../../composables/useConfig.js";
|
|
|
3
3
|
import { useConfigDefaults as n } from "../../composables/useConfigDefaults.js";
|
|
4
4
|
import { useFormBinding as r } from "../../composables/useFormBinding.js";
|
|
5
5
|
import { useLocale as i } from "../../composables/useLocale.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { useOpenProp as a } from "../../composables/useOpenModel.js";
|
|
7
|
+
import { useLogger as o } from "../../composables/useLogger.js";
|
|
8
|
+
import { useMobile as s } from "../../composables/useMobile.js";
|
|
9
|
+
import { SEGMENTED_CONTROL_NATIVE_ATTRS as c, formControlPtActive as l, usePassthrough as u, variantPt as d } from "../../composables/usePassthrough.js";
|
|
10
|
+
import { fieldRuns as f, useSegmentedFields as ee } from "../../composables/useSegmentedFields.js";
|
|
10
11
|
import { removedPropsFor as te } from "../../deprecation/removedProps.js";
|
|
11
12
|
import { formatOfType as ne, isCoarseType as re, isLabelType as ie, unitOfType as ae } from "../../types/DatePickerType.js";
|
|
12
|
-
import { isoMondayOf as
|
|
13
|
+
import { isoMondayOf as p, isoWeekOf as oe, isoWeekStart as se, isoWeeksInYear as ce, weekBoundAsDay as le } from "../../utilities/functions/isoWeek.js";
|
|
13
14
|
import { toInnerValue as ue, toOuterValue as de } from "../../utilities/functions/convertDateValue.js";
|
|
14
15
|
import { isEmpty as fe } from "../../utilities/functions/empty.js";
|
|
15
16
|
import { hash as pe } from "../../utilities/functions/hash.js";
|
|
16
17
|
import { isNotEmpty as me } from "../../utilities/functions/isNotEmpty.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import ve from "../../
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import Oe from "../
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
27
|
-
import Me from "../
|
|
28
|
-
import Ne from "../
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import
|
|
35
|
-
import st from "
|
|
36
|
-
import
|
|
37
|
-
import lt from "dayjs/plugin/
|
|
38
|
-
import ut from "
|
|
18
|
+
import { isNotNil as he } from "../../utilities/functions/isNotNil.js";
|
|
19
|
+
import { normalizeDateBound as ge } from "../../utilities/functions/normalizeDateBound.js";
|
|
20
|
+
import { isDateDisabled as _e } from "../../utilities/functions/isDateDisabled.js";
|
|
21
|
+
import { warnRemovedAttrs as ve } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
22
|
+
import ye from "../../assets/svgs/calendar.svg_raw.js";
|
|
23
|
+
import { calendars as be, localeOf as xe } from "../../utilities/calendar/index.js";
|
|
24
|
+
import { foldDigits as Se } from "../../utilities/calendar/digits.js";
|
|
25
|
+
import { formatDateOf as Ce, intlLocaleOf as we, spokenClockOf as Te, spokenDateOptionsOf as Ee, useDayjsLocale as De, weekSpanOf as Oe } from "../BbCalendar/useDayjsLocale.js";
|
|
26
|
+
import { useHydrated as ke } from "../../composables/useHydrated.js";
|
|
27
|
+
import Ae from "../BbDatePicker/BbDatePicker.vue.js";
|
|
28
|
+
import { BB_DATE_PICKER_PT as je, DATE_PICKER_CALENDAR_PARTS as Me } from "../BbDatePicker/types.js";
|
|
29
|
+
import Ne from "../BbIcon/BbIcon.vue.js";
|
|
30
|
+
import Pe from "../CommonField/CommonField.vue.js";
|
|
31
|
+
import Fe from "../CommonFieldInput/CommonFieldInput.vue.js";
|
|
32
|
+
import { useMeridiem as Ie } from "../CommonTimeSelector/useMeridiem.js";
|
|
33
|
+
import { BB_DATE_PICKER_INPUT_PT as Le } from "./types.js";
|
|
34
|
+
import { dateLayoutFromHint as Re, dateReadsRtl as ze, monthLayoutFromHint as Be } from "./dateFieldLayout.js";
|
|
35
|
+
import { calendarFieldSpecs as Ve, calendarFieldsOf as He, eraHint as Ue, matchEra as We } from "./calendarFields.js";
|
|
36
|
+
import { Fragment as Ge, computed as m, createBlock as Ke, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as qe, createVNode as Je, defineComponent as Ye, guardReactiveProps as Xe, mergeProps as v, normalizeClass as Ze, normalizeProps as Qe, normalizeStyle as $e, onBeforeUnmount as et, onDeactivated as tt, openBlock as y, ref as b, renderList as nt, renderSlot as x, toDisplayString as rt, toRaw as it, unref as S, useAttrs as at, useSlots as ot, watch as st, withCtx as C, withDirectives as ct } from "vue";
|
|
37
|
+
import w from "dayjs";
|
|
38
|
+
import lt from "dayjs/plugin/customParseFormat";
|
|
39
|
+
import { formatCalendarDate as T, formatDigits as ut } from "virtual:bitboss-ui/calendars";
|
|
40
|
+
import dt from "dayjs/plugin/isSameOrAfter";
|
|
41
|
+
import ft from "dayjs/plugin/isSameOrBefore";
|
|
39
42
|
// src/components/BbDatePickerInput/BbDatePickerInput.vue?vue&type=script&setup=true&lang.ts
|
|
40
|
-
var
|
|
43
|
+
var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
41
44
|
"id",
|
|
42
45
|
"aria-describedby",
|
|
43
46
|
"aria-disabled",
|
|
@@ -60,8 +63,8 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
60
63
|
"onInput",
|
|
61
64
|
"onKeydown",
|
|
62
65
|
"onPaste"
|
|
63
|
-
],
|
|
64
|
-
mixins: [
|
|
66
|
+
], _t = ["onClick"], vt = ["onClick"], yt = ["aria-disabled", "disabled"], bt = ["id"], E = "YYYY-MM-DD", xt = "YYYY-MM-DDTHH:mm", St = /*@__PURE__*/ Ye({
|
|
67
|
+
mixins: [d(Le)],
|
|
65
68
|
inheritAttrs: !1,
|
|
66
69
|
__name: "BbDatePickerInput",
|
|
67
70
|
props: {
|
|
@@ -353,6 +356,7 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
353
356
|
"pt:item:errors": {},
|
|
354
357
|
"pt:item:open": {},
|
|
355
358
|
"pt:item:loading": {},
|
|
359
|
+
open: { type: Boolean },
|
|
356
360
|
pt: {},
|
|
357
361
|
adaptive: {
|
|
358
362
|
type: Boolean,
|
|
@@ -429,6 +433,7 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
429
433
|
"show",
|
|
430
434
|
"shown",
|
|
431
435
|
"hide",
|
|
436
|
+
"update:open",
|
|
432
437
|
"hidden",
|
|
433
438
|
"active",
|
|
434
439
|
"error",
|
|
@@ -437,184 +442,190 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
437
442
|
"update:modelValue",
|
|
438
443
|
"update:time"
|
|
439
444
|
],
|
|
440
|
-
setup(
|
|
441
|
-
let
|
|
445
|
+
setup(d, { emit: Ye }) {
|
|
446
|
+
let St = d, Ct = Ye, wt = ot(), { props: D, emit: O, showAsterisk: Tt, errors: Et, required: Dt, ariaRequired: Ot, model: kt, readonly: At, locked: jt } = r(St, Ct, {
|
|
442
447
|
componentName: "BbDatePickerInput",
|
|
443
|
-
identifierFallback: () =>
|
|
444
|
-
leaveOn: "inactive"
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
448
|
+
identifierFallback: () => St.label,
|
|
449
|
+
leaveOn: "inactive",
|
|
450
|
+
emptyValue: () => null
|
|
451
|
+
}), Mt = /^\d{4}-\d{2}-\d{2}(:append)?$/, Nt = () => Object.keys(wt).filter((e) => Mt.test(e)), k = t();
|
|
452
|
+
process.env.NODE_ENV !== "production" && ve("BbDatePickerInput", te("BbDatePickerInput"), { fixedSlots: ["append:outer"] });
|
|
453
|
+
let Pt = b(!1), Ft = b(!1), It = () => {
|
|
454
|
+
Ft.value = !1;
|
|
455
|
+
}, Lt = b(!1), Rt = () => {
|
|
456
|
+
Lt.value = !0, O("show");
|
|
457
|
+
}, zt = () => {
|
|
458
|
+
Lt.value = !1, O("hide");
|
|
459
|
+
}, { model: Bt, set: Vt } = a(St, Ct);
|
|
460
|
+
tt(() => {
|
|
461
|
+
Pt.value ? _n() : It();
|
|
462
|
+
}), et(It);
|
|
463
|
+
let Ht = m(() => D.persistentHint || Ft.value), Ut = m(() => me(D.modelValue)), A = n("BbDatePickerInput", D, {
|
|
458
464
|
labelMode: "outside",
|
|
459
465
|
autocomplete: "off",
|
|
460
466
|
compact: !1,
|
|
461
467
|
reverse: !1,
|
|
462
468
|
floating: !1
|
|
463
|
-
}),
|
|
469
|
+
}), Wt = m(() => A.labelMode), Gt = [
|
|
464
470
|
"panel",
|
|
465
471
|
"sheet",
|
|
466
|
-
...
|
|
467
|
-
], j =
|
|
472
|
+
...Me
|
|
473
|
+
], j = u({
|
|
468
474
|
component: "BbDatePickerInput",
|
|
469
|
-
attrs:
|
|
470
|
-
controlAttrs:
|
|
471
|
-
props:
|
|
472
|
-
parts:
|
|
473
|
-
states:
|
|
475
|
+
attrs: at(),
|
|
476
|
+
controlAttrs: c,
|
|
477
|
+
props: D,
|
|
478
|
+
parts: Le.parts,
|
|
479
|
+
states: Le.states,
|
|
474
480
|
active: {
|
|
475
|
-
...
|
|
476
|
-
open: () =>
|
|
481
|
+
...l(D, () => Ut.value),
|
|
482
|
+
open: () => Lt.value
|
|
477
483
|
},
|
|
478
484
|
variant: {
|
|
479
|
-
...
|
|
480
|
-
current: () =>
|
|
485
|
+
...Le.variant,
|
|
486
|
+
current: () => D.variant ?? "outline"
|
|
481
487
|
}
|
|
482
|
-
}), M =
|
|
483
|
-
let { calendar: e } =
|
|
484
|
-
return e === "gregory" ? void 0 :
|
|
485
|
-
}) : null,
|
|
486
|
-
|
|
487
|
-
let { t: I } = i(),
|
|
488
|
-
let n = [e,
|
|
488
|
+
}), M = m(() => D.type === "datetime"), N = m(() => re(D.type)), Kt = m(() => A.floating || ie(D.type)), P = m(() => D.type === "week"), qt = m(() => ae(D.type)), F = T ? m(() => {
|
|
489
|
+
let { calendar: e } = xe(k.locale);
|
|
490
|
+
return e === "gregory" ? void 0 : be[e];
|
|
491
|
+
}) : null, Jt = m(() => ne(D.type, F?.value));
|
|
492
|
+
w.extend(lt), w.extend(dt), w.extend(ft), De();
|
|
493
|
+
let { t: I } = i(), Yt = o(), L = b(null), Xt = (e) => `bdpi-description_${e}`, Zt = (e, t) => {
|
|
494
|
+
let n = [e, Xt(t)].filter((e) => !!e?.trim()).flatMap((e) => e.split(/\s+/)).filter(Boolean);
|
|
489
495
|
return Array.from(new Set(n)).join(" ");
|
|
490
|
-
}, { isMobile:
|
|
491
|
-
|
|
492
|
-
},
|
|
496
|
+
}, { isMobile: Qt } = s(), $t = m(() => D.disableWriting === "mobile" ? !Qt.value : D.disableWriting === "desktop" ? Qt.value : !D.disableWriting), en = m(() => !$t.value && !on.value && !D.disabled && !D.readonly), tn = () => {
|
|
497
|
+
en.value && !Lt.value && (L.value?.$el)?.querySelector(".bb-segmented-field__activator")?.click();
|
|
498
|
+
}, nn = (e) => {
|
|
493
499
|
let t = e.target;
|
|
494
|
-
t?.closest(".bb-field-input__box") && (t.closest(".bb-segmented-field__activator, .bb-clearable-button, .bb-date-picker__panel, [role=\"dialog\"]") ||
|
|
495
|
-
},
|
|
496
|
-
if (
|
|
497
|
-
else if (
|
|
498
|
-
else if (
|
|
500
|
+
t?.closest(".bb-field-input__box") && (t.closest(".bb-segmented-field__activator, .bb-clearable-button, .bb-date-picker__panel, [role=\"dialog\"]") || tn());
|
|
501
|
+
}, rn = (e) => e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "Backspace" || e.key === "Delete" || e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey, an = (e, t) => {
|
|
502
|
+
if (en.value && (t.key === "Enter" || t.key === " ")) t.preventDefault(), tn();
|
|
503
|
+
else if (D.readonly && rn(t)) t.preventDefault();
|
|
504
|
+
else if (T && V.value?.eras.length && e.field === "year" && (t.key === "ArrowUp" || t.key === "ArrowDown")) {
|
|
499
505
|
t.preventDefault();
|
|
500
|
-
let n =
|
|
501
|
-
a !== i && (n.year = String(a),
|
|
502
|
-
} else
|
|
503
|
-
},
|
|
504
|
-
if (P.value) return
|
|
506
|
+
let n = J.value[e.segment], r = V.value.lastYearOf(n.era), i = n.year ? parseInt(n.year, 10) : 0, a = n.year ? Math.min(Math.max(i + (t.key === "ArrowUp" ? 1 : -1), 1), r) : 1;
|
|
507
|
+
a !== i && (n.year = String(a), X(), $({ finalize: !1 })), t.target.value = tr(n.year);
|
|
508
|
+
} else lr(e, t);
|
|
509
|
+
}, on = m(() => D.disableCalendar === "mobile" ? Qt.value : D.disableCalendar === "desktop" ? !Qt.value : !!D.disableCalendar), sn = m(() => !!D.readonly || !$t.value), cn = (e) => $t.value ? Hn.value[e].kind === "enum" ? "none" : "numeric" : "none", ln = (e) => e.includes("T"), R = (e) => {
|
|
510
|
+
if (P.value) return w(le(e, "min"), E, !0);
|
|
505
511
|
if (N.value) {
|
|
506
|
-
let t =
|
|
507
|
-
return t.isValid() ? t :
|
|
512
|
+
let t = w(e, Jt.value, !0);
|
|
513
|
+
return t.isValid() ? t : w(e);
|
|
508
514
|
}
|
|
509
|
-
return
|
|
510
|
-
}, z =
|
|
511
|
-
for (let [e, t] of [["min",
|
|
512
|
-
let
|
|
513
|
-
!
|
|
514
|
-
let
|
|
515
|
-
floating:
|
|
516
|
-
utc:
|
|
517
|
-
type:
|
|
515
|
+
return ln(e) ? w(e, xt, !0) : w(e, E, !0);
|
|
516
|
+
}, z = m(() => ge(D.min, D.type, "min", (e) => Yt.warn(`BbDatePickerInput: ${e}`), F?.value)), B = m(() => ge(D.max, D.type, "max", (e) => Yt.warn(`BbDatePickerInput: ${e}`), F?.value));
|
|
517
|
+
for (let [e, t] of [["min", D.min], ["max", D.max]]) t && (R(t).isValid() || Yt.throw(P.value ? `BbDatePickerInput: ${e} must be a week (YYYY-Www) or a date (YYYY-MM-DD) with type="week"` : N.value ? `BbDatePickerInput: ${e} must be a ${Jt.value} value (a longer date is accepted and rounded to the ${qt.value}) with type="${D.type}"` : `BbDatePickerInput: ${e} must be in the format YYYY-MM-DD or YYYY-MM-DDTHH:mm`), (N.value || P.value) && (e === "min" ? z.value : B.value));
|
|
518
|
+
let un = D.disableWriting !== !0 && D.disableWriting !== "desktop", dn = D.disableCalendar !== !0 && D.disableCalendar !== "desktop", fn = D.disableWriting !== !0 && D.disableWriting !== "mobile", pn = D.disableCalendar !== !0 && D.disableCalendar !== "mobile";
|
|
519
|
+
!un && !dn && Yt.throw("BbDatePickerInput: desktop users would have no interaction method — disableWriting:true (or \"desktop\") and disableCalendar:true (or \"desktop\") cannot be combined."), !fn && !pn && Yt.throw("BbDatePickerInput: mobile users would have no interaction method — combine disableWriting:\"mobile\" with disableCalendar:\"desktop\" to keep calendar interaction on mobile while staying keyboard-first on desktop.");
|
|
520
|
+
let mn = m(() => ({
|
|
521
|
+
floating: Kt.value,
|
|
522
|
+
utc: D.utc,
|
|
523
|
+
type: D.type,
|
|
518
524
|
calendar: F?.value
|
|
519
|
-
})), V =
|
|
520
|
-
let { calendar: e, intl: t } =
|
|
521
|
-
if (e === "gregory" ||
|
|
522
|
-
let n =
|
|
523
|
-
return n ?
|
|
524
|
-
}) : null, H = (e) => de(e,
|
|
525
|
-
|
|
525
|
+
})), V = T ? m(() => {
|
|
526
|
+
let { calendar: e, intl: t } = xe(k.locale);
|
|
527
|
+
if (e === "gregory" || D.type === "week") return null;
|
|
528
|
+
let n = be[e];
|
|
529
|
+
return n ? He(n, t, (e, t) => Ce(e, k.locale, t)) : null;
|
|
530
|
+
}) : null, H = (e) => de(e, mn.value), hn = (e) => ue(e, mn.value), gn = () => {
|
|
531
|
+
Pt.value || (Ft.value = !0, O("active"), Pt.value = !0, document.addEventListener("focusin", U), document.addEventListener("click", U, !0));
|
|
526
532
|
}, U = (e) => {
|
|
527
533
|
let t = e.target;
|
|
528
|
-
t instanceof HTMLElement &&
|
|
529
|
-
},
|
|
530
|
-
$({ finalize: !0 }),
|
|
531
|
-
},
|
|
532
|
-
let n =
|
|
534
|
+
t instanceof HTMLElement && L.value?.$el && (e.type === "focusin" && t.contains(L.value.$el) || L.value.$el.contains(t) || _n());
|
|
535
|
+
}, _n = () => {
|
|
536
|
+
$({ finalize: !0 }), Ir() && (Pr(), X()), Pt.value = !1, It(), O("inactive"), document.removeEventListener("focusin", U), document.removeEventListener("click", U, !0);
|
|
537
|
+
}, vn = (e, t) => {
|
|
538
|
+
let n = hn(t);
|
|
533
539
|
if (!n.isValid()) return;
|
|
534
|
-
let r =
|
|
535
|
-
|
|
536
|
-
},
|
|
540
|
+
let r = J.value[e];
|
|
541
|
+
T && V.value ? qn(r, n) : (r.day = n.format("DD"), r.month = n.format("MM"), r.year = n.format("YYYY"));
|
|
542
|
+
}, yn = (e) => {
|
|
537
543
|
let { week: t, year: n } = oe(e);
|
|
538
544
|
return {
|
|
539
545
|
week: String(t).padStart(2, "0"),
|
|
540
546
|
year: String(n).padStart(4, "0")
|
|
541
547
|
};
|
|
542
|
-
},
|
|
543
|
-
if (e === null &&
|
|
544
|
-
else if (e === null || Array.isArray(e) && !e.length)
|
|
548
|
+
}, bn = { "onUpdate:modelValue": (e) => {
|
|
549
|
+
if (e === null && D.range && (e = []), !M.value) O("update:modelValue", e);
|
|
550
|
+
else if (e === null || Array.isArray(e) && !e.length) J.value.start = Y(), J.value.end = Y(), X(), Q(D.range ? [] : null);
|
|
545
551
|
else if (Array.isArray(e)) {
|
|
546
552
|
let [t, n] = e;
|
|
547
|
-
t ?
|
|
548
|
-
} else
|
|
549
|
-
} },
|
|
550
|
-
let t =
|
|
551
|
-
return P.value ? !!(t.week && t.year && t.year.length === 4) : !!(t.day && t.month && (
|
|
552
|
-
},
|
|
553
|
+
t ? vn("start", t) : J.value.start = Y(), n ? vn("end", n) : J.value.end = Y(), X(), $({ finalize: !1 });
|
|
554
|
+
} else vn("start", e), X(), $({ finalize: !1 });
|
|
555
|
+
} }, xn = (e) => {
|
|
556
|
+
let t = J.value[e];
|
|
557
|
+
return P.value ? !!(t.week && t.year && t.year.length === 4) : !!(t.day && t.month && (T ? Sn(t) : t.year.length === 4));
|
|
558
|
+
}, Sn = (e) => {
|
|
553
559
|
let t = V.value;
|
|
554
560
|
return t ? t.eras.length && !e.era ? !1 : t.yearFullLength ? e.year.length === t.yearDigits : !!e.year : e.year.length === 4;
|
|
555
|
-
},
|
|
556
|
-
|
|
557
|
-
},
|
|
558
|
-
let n =
|
|
559
|
-
e === "hour" ?
|
|
560
|
-
},
|
|
561
|
-
if (P.value) return I("datePicker.weekSpan", String(oe(e).week),
|
|
562
|
-
let t =
|
|
563
|
-
return M.value ? `${t} ${
|
|
564
|
-
},
|
|
565
|
-
if (
|
|
566
|
-
let t =
|
|
561
|
+
}, Cn = b("start"), wn = (e, t) => {
|
|
562
|
+
Cn.value = e.segment, ur(e, t), O("focus", t);
|
|
563
|
+
}, Tn = m(() => D.range ? xn(Cn.value) ? Cn.value : xn("end") ? "end" : "start" : "start"), En = ({ unit: e, value: t }) => {
|
|
564
|
+
let n = J.value[Tn.value];
|
|
565
|
+
e === "hour" ? yr(n, parseInt(t, 10)) : e === "meridiem" ? n.meridiem = G.label(t === "PM" ? "PM" : "AM") : n[e] = t, n.hour ||= D.ampm ? "12" : "00", D.ampm && !n.meridiem && (n.meridiem = G.am.value), n.minute ||= "00", D.seconds && !n.second && (n.second = "00"), X(), $({ finalize: !1 });
|
|
566
|
+
}, Dn = m(() => Ee(D.type)), { isHydrated: On } = ke(), kn = (e) => {
|
|
567
|
+
if (P.value) return I("datePicker.weekSpan", String(oe(e).week), Oe(p(e), k.locale)).value;
|
|
568
|
+
let t = Ce(e, k.locale, Dn.value);
|
|
569
|
+
return M.value ? `${t} ${Te(e, k.locale, !!D.ampm, !!D.seconds, On.value)}` : t;
|
|
570
|
+
}, An = (e) => {
|
|
571
|
+
if (sr(e) !== "complete") return null;
|
|
572
|
+
let t = J.value[e];
|
|
567
573
|
if (P.value) {
|
|
568
574
|
let e = se(parseInt(t.year, 10), parseInt(t.week, 10));
|
|
569
575
|
return e.isValid() ? e : null;
|
|
570
576
|
}
|
|
571
|
-
let n =
|
|
572
|
-
if (
|
|
573
|
-
let e = V.value.dateOf(
|
|
577
|
+
let n = K.value;
|
|
578
|
+
if (T && V.value) {
|
|
579
|
+
let e = V.value.dateOf(Gn(t), n), r = M.value ? Rr(t) : null;
|
|
574
580
|
return !e || M.value && !r ? null : r ? e.hour(+r.hour).minute(+r.minute).second(+r.second) : e;
|
|
575
581
|
}
|
|
576
|
-
let r = n.has("day") ? t.day.padStart(2, "0") : "01", i = n.has("month") ? t.month.padStart(2, "0") : "01", a = `${t.year.padStart(4, "0")}-${i}-${r}`, o =
|
|
577
|
-
M.value && (a += `T${
|
|
578
|
-
let s =
|
|
582
|
+
let r = n.has("day") ? t.day.padStart(2, "0") : "01", i = n.has("month") ? t.month.padStart(2, "0") : "01", a = `${t.year.padStart(4, "0")}-${i}-${r}`, o = E;
|
|
583
|
+
M.value && (a += `T${Vr(e)}`, o += D.seconds ? "THH:mm:ss" : "THH:mm");
|
|
584
|
+
let s = w(a, o, !0);
|
|
579
585
|
return s.isValid() ? s : null;
|
|
580
|
-
},
|
|
581
|
-
if (
|
|
582
|
-
let e =
|
|
583
|
-
return !e || !t ? I("datePickerInput.emptyRange").value : I("datePickerInput.changeSelectionRange",
|
|
586
|
+
}, jn = m(() => {
|
|
587
|
+
if (D.range) {
|
|
588
|
+
let e = An("start"), t = An("end");
|
|
589
|
+
return !e || !t ? I("datePickerInput.emptyRange").value : I("datePickerInput.changeSelectionRange", kn(e), kn(t)).value;
|
|
584
590
|
}
|
|
585
|
-
let e =
|
|
586
|
-
return e ? I("datePickerInput.changeSelection",
|
|
587
|
-
}),
|
|
591
|
+
let e = An("start");
|
|
592
|
+
return e ? I("datePickerInput.changeSelection", kn(e)).value : I("datePickerInput.emptySelection").value;
|
|
593
|
+
}), W = (e) => {
|
|
588
594
|
if (!e.isValid()) return !0;
|
|
589
595
|
if (P.value) {
|
|
590
|
-
let t =
|
|
591
|
-
return n && t.isBefore(R(n), "day") || r && t.add(6, "day").isAfter(R(r), "day") ? !0 : typeof
|
|
596
|
+
let t = p(e), n = z.value, r = B.value;
|
|
597
|
+
return n && t.isBefore(R(n), "day") || r && t.add(6, "day").isAfter(R(r), "day") ? !0 : typeof D.selectable == "function" && !D.selectable(H(t));
|
|
592
598
|
}
|
|
593
599
|
let t = !0;
|
|
594
|
-
if (
|
|
595
|
-
min:
|
|
596
|
-
max:
|
|
597
|
-
selectable:
|
|
598
|
-
type:
|
|
600
|
+
if (T && F.value && N.value) return _e(e, {
|
|
601
|
+
min: D.min,
|
|
602
|
+
max: D.max,
|
|
603
|
+
selectable: D.selectable,
|
|
604
|
+
type: D.type,
|
|
599
605
|
calendar: F.value
|
|
600
606
|
});
|
|
601
|
-
let n = (e) => N.value ?
|
|
602
|
-
return r && (t &&= e.isSameOrAfter(R(r), n(r))), i && (t &&= e.isSameOrBefore(R(i), n(i))), typeof
|
|
603
|
-
},
|
|
604
|
-
|
|
605
|
-
|
|
607
|
+
let n = (e) => N.value ? qt.value : M.value && ln(e) ? "minute" : "day", r = z.value, i = B.value;
|
|
608
|
+
return r && (t &&= e.isSameOrAfter(R(r), n(r))), i && (t &&= e.isSameOrBefore(R(i), n(i))), typeof D.selectable == "function" && (t &&= D.selectable(H(e))), !t;
|
|
609
|
+
}, Mn = m(() => {
|
|
610
|
+
let e = An("start"), t = [e, e && D.range ? An("end") : null].filter(he);
|
|
611
|
+
if (!t.some(W)) return kt.value;
|
|
612
|
+
let n = t.map(H);
|
|
613
|
+
return D.range ? n : n[0];
|
|
614
|
+
}), Nn = () => {
|
|
615
|
+
D.range ? (O("update:modelValue", []), M.value && (Hr.value = [], O("update:time", []))) : (O("update:modelValue", null), M.value && (Hr.value = null, O("update:time", null)));
|
|
616
|
+
}, Pn = /* @__PURE__ */ new Set([
|
|
606
617
|
"hour",
|
|
607
618
|
"minute",
|
|
608
619
|
"second",
|
|
609
620
|
"meridiem"
|
|
610
|
-
]),
|
|
621
|
+
]), G = Ie(), Fn = (e, t) => G.isPm(t) ? e === 12 ? 12 : e + 12 : e === 12 ? 0 : e, In = (e) => {
|
|
611
622
|
let t = e >= 12 ? "PM" : "AM", n = e % 12;
|
|
612
623
|
return n === 0 && (n = 12), {
|
|
613
624
|
hour: String(n).padStart(2, "0"),
|
|
614
625
|
meridiem: t
|
|
615
626
|
};
|
|
616
|
-
},
|
|
617
|
-
if (
|
|
627
|
+
}, Ln = m(() => {
|
|
628
|
+
if (D.type === "year") return {
|
|
618
629
|
order: ["year"],
|
|
619
630
|
separator: "/"
|
|
620
631
|
};
|
|
@@ -623,12 +634,12 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
623
634
|
separator: " "
|
|
624
635
|
};
|
|
625
636
|
let e = I("datePickerInput.monthFormatSingle").value;
|
|
626
|
-
if (
|
|
637
|
+
if (D.type === "month") return Be(e) ?? {
|
|
627
638
|
order: ["month", "year"],
|
|
628
639
|
separator: "/"
|
|
629
640
|
};
|
|
630
641
|
let t = I("datePickerInput.dateFormatSingle").value;
|
|
631
|
-
return
|
|
642
|
+
return Re(t, e) ?? {
|
|
632
643
|
order: [
|
|
633
644
|
"day",
|
|
634
645
|
"month",
|
|
@@ -636,36 +647,36 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
636
647
|
],
|
|
637
648
|
separator: "/"
|
|
638
649
|
};
|
|
639
|
-
}),
|
|
640
|
-
let e =
|
|
641
|
-
if (!
|
|
650
|
+
}), Rn = m(() => {
|
|
651
|
+
let e = Ln.value.order;
|
|
652
|
+
if (!T || !V.value?.eras.length) return e;
|
|
642
653
|
let t = e.indexOf("year") + +!V.value.eraFirst;
|
|
643
654
|
return [
|
|
644
655
|
...e.slice(0, t),
|
|
645
656
|
"era",
|
|
646
657
|
...e.slice(t)
|
|
647
658
|
];
|
|
648
|
-
}),
|
|
659
|
+
}), K = m(() => new Set(Rn.value)), zn = m(() => {
|
|
649
660
|
if (!M.value) return [];
|
|
650
661
|
let e = ["hour", "minute"];
|
|
651
|
-
return
|
|
652
|
-
}),
|
|
653
|
-
let e = [...
|
|
662
|
+
return D.seconds && e.push("second"), D.ampm && e.push("meridiem"), e;
|
|
663
|
+
}), q = m(() => {
|
|
664
|
+
let e = [...Rn.value, ...zn.value], t = e.map((e) => ({
|
|
654
665
|
segment: "start",
|
|
655
666
|
field: e
|
|
656
667
|
}));
|
|
657
|
-
if (!
|
|
668
|
+
if (!D.range) return t;
|
|
658
669
|
let n = e.map((e) => ({
|
|
659
670
|
segment: "end",
|
|
660
671
|
field: e
|
|
661
672
|
}));
|
|
662
673
|
return [...t, ...n];
|
|
663
|
-
}),
|
|
674
|
+
}), Bn = m(() => {
|
|
664
675
|
let e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
|
|
665
|
-
return
|
|
676
|
+
return q.value.forEach((n, r) => {
|
|
666
677
|
e.has(n.segment) || (e.add(n.segment), t.add(r));
|
|
667
678
|
}), t;
|
|
668
|
-
}),
|
|
679
|
+
}), Vn = (e) => Bn.value.has(e), Hn = m(() => ({
|
|
669
680
|
era: {
|
|
670
681
|
kind: "enum",
|
|
671
682
|
maxLength: 0
|
|
@@ -703,7 +714,7 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
703
714
|
requireFullLength: !0,
|
|
704
715
|
label: "Year"
|
|
705
716
|
},
|
|
706
|
-
hour:
|
|
717
|
+
hour: D.ampm ? {
|
|
707
718
|
kind: "numeric",
|
|
708
719
|
maxLength: 2,
|
|
709
720
|
max: 12,
|
|
@@ -735,25 +746,25 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
735
746
|
autoAdvanceFrom: 6,
|
|
736
747
|
label: "Second"
|
|
737
748
|
},
|
|
738
|
-
meridiem:
|
|
739
|
-
...
|
|
740
|
-
})),
|
|
749
|
+
meridiem: G.fieldSpec.value,
|
|
750
|
+
...Wn?.value
|
|
751
|
+
})), Un = (e) => Hn.value[e].kind === "numeric" ? void 0 : Hn.value[e].maxLength, Wn = T ? m(() => V.value ? Ve(V.value) : null) : null, Gn = (e) => ({
|
|
741
752
|
era: e.era,
|
|
742
753
|
year: e.year,
|
|
743
754
|
month: e.month,
|
|
744
755
|
day: e.day
|
|
745
|
-
}),
|
|
746
|
-
|
|
756
|
+
}), Kn = /* @__PURE__ */ new WeakMap(), qn = (e, t) => {
|
|
757
|
+
Kn.set(it(e), t);
|
|
747
758
|
let n = V.value.fieldsOf(t);
|
|
748
|
-
e.era = n.era, e.year = n.year,
|
|
749
|
-
},
|
|
759
|
+
e.era = n.era, e.year = n.year, K.value.has("month") && (e.month = n.month), K.value.has("day") && (e.day = n.day);
|
|
760
|
+
}, Jn = m(() => f(q.value, (e) => e === "meridiem" ? "meridiem" : Pn.has(e) ? "time" : "date")), Yn = (e) => e.items.at(-1).index, Xn = m(() => ze(we(k.locale))), Zn = (e) => e.kind === "meridiem" || e.kind === "date" && Xn.value ? void 0 : "ltr", Qn = (e, t) => {
|
|
750
761
|
if (e.segment !== t.segment) return "–";
|
|
751
762
|
if (t.field === "meridiem") return "\xA0";
|
|
752
|
-
let n =
|
|
753
|
-
return n && r ? ":" : !n && r ? "\xA0" :
|
|
754
|
-
}, { fields:
|
|
755
|
-
fieldOrder:
|
|
756
|
-
specs:
|
|
763
|
+
let n = Pn.has(e.field), r = Pn.has(t.field);
|
|
764
|
+
return n && r ? ":" : !n && r ? "\xA0" : T && (e.field === "era" && t.field === "year" || e.field === "year" && t.field === "era") ? V.value?.eraSeparator ?? " " : ut && Xn.value ? `\u200F${Ln.value.separator}` : Ln.value.separator;
|
|
765
|
+
}, { fields: J, fieldRefs: $n, descriptorKey: er, displayOf: tr, emptyFieldGroup: Y, getSizedValue: nr, minChars: rr, updateAllSizedValues: X, isOwnField: ir, focusField: ar, focusFirstField: or, segmentStatus: sr, onFieldInput: cr, onFieldKeydown: lr, onFieldFocus: ur, onFieldBlur: dr, onFieldPaste: fr } = ee({
|
|
766
|
+
fieldOrder: q,
|
|
767
|
+
specs: Hn,
|
|
757
768
|
segments: ["start", "end"],
|
|
758
769
|
fieldKeys: [
|
|
759
770
|
"era",
|
|
@@ -778,13 +789,13 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
778
789
|
" "
|
|
779
790
|
],
|
|
780
791
|
onDirty: () => $({ finalize: !1 }),
|
|
781
|
-
numberingSystem:
|
|
782
|
-
}),
|
|
783
|
-
if (
|
|
784
|
-
let n =
|
|
792
|
+
numberingSystem: ut ? () => xe(k.locale).numberingSystem : void 0
|
|
793
|
+
}), pr = (e, t) => {
|
|
794
|
+
if (T && e.field === "era" && V.value) {
|
|
795
|
+
let n = J.value[e.segment], r = t.target, i = Se(r.value), a = We(V.value, i, n.era), o = i.replace(/\D/g, "");
|
|
785
796
|
if (a && a !== n.era) n.era = a, $({ finalize: !1 });
|
|
786
797
|
else if (o && V.value.eraFirst) {
|
|
787
|
-
n.era ||= V.value.fieldsOf(
|
|
798
|
+
n.era ||= V.value.fieldsOf(mr()).era, n.year = o.slice(0, Hn.value.year.maxLength), r.value = n.era, X(), ar({
|
|
788
799
|
segment: e.segment,
|
|
789
800
|
field: "year"
|
|
790
801
|
}, { caretToEnd: !0 }), $({ finalize: !1 });
|
|
@@ -792,21 +803,21 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
792
803
|
}
|
|
793
804
|
}
|
|
794
805
|
if (e.field === "meridiem") {
|
|
795
|
-
let n =
|
|
806
|
+
let n = J.value[e.segment], r = G.match(t.target.value, n.meridiem);
|
|
796
807
|
r && r !== n.meridiem && (n.meridiem = r, $({ finalize: !1 }));
|
|
797
808
|
}
|
|
798
|
-
|
|
809
|
+
cr(e, t);
|
|
799
810
|
};
|
|
800
|
-
|
|
801
|
-
for (let n of Object.values(
|
|
802
|
-
|
|
811
|
+
G.onRelabel((e, t) => {
|
|
812
|
+
for (let n of Object.values(J.value)) n.meridiem === e && (n.meridiem = t);
|
|
813
|
+
X();
|
|
803
814
|
});
|
|
804
|
-
let
|
|
805
|
-
let { min: e, max: t } = V.value.system.range, n =
|
|
806
|
-
return
|
|
807
|
-
},
|
|
808
|
-
if (
|
|
809
|
-
},
|
|
815
|
+
let mr = () => {
|
|
816
|
+
let { min: e, max: t } = V.value.system.range, n = w().format(E);
|
|
817
|
+
return w(n < e ? e : n > t ? t : n);
|
|
818
|
+
}, hr = (e, t) => D.range ? `${t}-${e.segment}-${e.field}` : `${t}-${e.field}`, gr = (e) => {
|
|
819
|
+
if (D.name) return D.range ? `${D.name}-${e.segment}-${e.field}` : `${D.name}-${e.field}`;
|
|
820
|
+
}, _r = {
|
|
810
821
|
era: "datePickerInput.eraField",
|
|
811
822
|
week: "datePickerInput.weekField",
|
|
812
823
|
day: "datePickerInput.dayField",
|
|
@@ -816,23 +827,23 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
816
827
|
minute: "datePickerInput.minuteField",
|
|
817
828
|
second: "datePickerInput.secondField",
|
|
818
829
|
meridiem: "datePickerInput.meridiemField"
|
|
819
|
-
},
|
|
820
|
-
let t = I(
|
|
821
|
-
return
|
|
822
|
-
},
|
|
823
|
-
if (!
|
|
830
|
+
}, vr = (e) => {
|
|
831
|
+
let t = I(_r[e.field]).value;
|
|
832
|
+
return D.range ? I(e.segment === "start" ? "datePickerInput.startFieldLabel" : "datePickerInput.endFieldLabel", t).value : t;
|
|
833
|
+
}, yr = (e, t) => {
|
|
834
|
+
if (!D.ampm) {
|
|
824
835
|
e.hour = String(t).padStart(2, "0");
|
|
825
836
|
return;
|
|
826
837
|
}
|
|
827
|
-
let n =
|
|
828
|
-
e.hour = n.hour, e.meridiem =
|
|
829
|
-
},
|
|
838
|
+
let n = In(t);
|
|
839
|
+
e.hour = n.hour, e.meridiem = G.label(n.meridiem);
|
|
840
|
+
}, br = (e) => {
|
|
830
841
|
if (!e.hour) return 0;
|
|
831
842
|
let t = parseInt(e.hour, 10);
|
|
832
|
-
return
|
|
833
|
-
},
|
|
843
|
+
return D.ampm ? Fn(t, e.meridiem || "AM") : t;
|
|
844
|
+
}, xr = m(() => D.seconds ? "HH:mm:ss" : "HH:mm"), Sr = (e) => e.format(xr.value), Cr = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, wr = (e) => {
|
|
834
845
|
if (!e) return null;
|
|
835
|
-
let t =
|
|
846
|
+
let t = Cr.exec(e);
|
|
836
847
|
if (!t) return null;
|
|
837
848
|
let [, n, r, i] = t;
|
|
838
849
|
return parseInt(n, 10) > 23 || parseInt(r, 10) > 59 || i && parseInt(i, 10) > 59 ? null : {
|
|
@@ -840,97 +851,97 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
840
851
|
minute: r.padStart(2, "0"),
|
|
841
852
|
second: (i ?? "").padStart(i ? 2 : 0, "0")
|
|
842
853
|
};
|
|
843
|
-
},
|
|
854
|
+
}, Tr = (e, t) => {
|
|
844
855
|
if (!M.value) return;
|
|
845
|
-
let n =
|
|
846
|
-
n ? (
|
|
847
|
-
},
|
|
848
|
-
if (
|
|
849
|
-
let e =
|
|
850
|
-
return I(
|
|
856
|
+
let n = wr(t);
|
|
857
|
+
n ? (yr(e, parseInt(n.hour, 10)), e.minute = n.minute, e.second = D.seconds ? n.second : "") : (e.hour = "", e.minute = "", e.second = "", e.meridiem = "");
|
|
858
|
+
}, Er = m(() => D.seconds ? "datePickerInput.timeFormatSeconds" : "datePickerInput.timeFormat"), Dr = m(() => T && V.value?.eras.length ? Ue(V.value, Or.value, I("datePickerInput.dateFormatSingle").value, I("datePickerInput.eraField").value) : Or.value), Or = m(() => {
|
|
859
|
+
if (D.type === "week" || D.type === "month" || D.type === "year") {
|
|
860
|
+
let e = D.type;
|
|
861
|
+
return I(D.range ? `datePickerInput.${e}FormatRange` : `datePickerInput.${e}FormatSingle`).value;
|
|
851
862
|
}
|
|
852
|
-
if (!M.value) return I(
|
|
853
|
-
let e = `${I("datePickerInput.dateFormatSingle").value} ${I(
|
|
854
|
-
return
|
|
855
|
-
}),
|
|
856
|
-
if (!e) return
|
|
857
|
-
let t =
|
|
858
|
-
if (!t.isValid()) return
|
|
859
|
-
let n =
|
|
863
|
+
if (!M.value) return I(D.range ? "datePickerInput.dateFormatRange" : "datePickerInput.dateFormatSingle").value;
|
|
864
|
+
let e = `${I("datePickerInput.dateFormatSingle").value} ${I(Er.value).value}`;
|
|
865
|
+
return D.range ? `${e} – ${e}` : e;
|
|
866
|
+
}), kr = m(() => D.placeholder || Dr.value), Ar = m(() => q.value.every((e) => !J.value[e.segment][e.field])), jr = (e) => {
|
|
867
|
+
if (!e) return Y();
|
|
868
|
+
let t = hn(e);
|
|
869
|
+
if (!t.isValid()) return Y();
|
|
870
|
+
let n = Y();
|
|
860
871
|
return P.value ? {
|
|
861
872
|
...n,
|
|
862
|
-
...
|
|
863
|
-
} : (
|
|
864
|
-
},
|
|
865
|
-
if (!e)
|
|
866
|
-
start:
|
|
867
|
-
end:
|
|
873
|
+
...yn(t)
|
|
874
|
+
} : (T && V.value ? qn(n, t) : (K.value.has("day") && (n.day = t.format("DD")), K.value.has("month") && (n.month = t.format("MM")), n.year = t.format("YYYY")), M.value && !A.floating && (yr(n, t.hour()), n.minute = t.format("mm"), n.second = D.seconds ? t.format("ss") : ""), n);
|
|
875
|
+
}, Mr = (e) => Array.isArray(D.time) ? D.time[e === "start" ? 0 : 1] : e === "start" ? D.time : void 0, Nr = (e) => {
|
|
876
|
+
if (!e) J.value = {
|
|
877
|
+
start: Y(),
|
|
878
|
+
end: Y()
|
|
868
879
|
};
|
|
869
880
|
else {
|
|
870
|
-
if (
|
|
881
|
+
if (D.range) {
|
|
871
882
|
let [t, n] = Array.isArray(e) ? e : [];
|
|
872
|
-
|
|
873
|
-
start:
|
|
874
|
-
end:
|
|
883
|
+
J.value = {
|
|
884
|
+
start: jr(t),
|
|
885
|
+
end: jr(n)
|
|
875
886
|
};
|
|
876
|
-
} else Array.isArray(e) ?
|
|
877
|
-
start:
|
|
878
|
-
end:
|
|
879
|
-
} :
|
|
880
|
-
start:
|
|
881
|
-
end:
|
|
887
|
+
} else Array.isArray(e) ? J.value = {
|
|
888
|
+
start: Y(),
|
|
889
|
+
end: Y()
|
|
890
|
+
} : J.value = {
|
|
891
|
+
start: jr(e),
|
|
892
|
+
end: Y()
|
|
882
893
|
};
|
|
883
894
|
if (M.value && A.floating) for (let e of ["start", "end"]) {
|
|
884
|
-
let t =
|
|
885
|
-
t.day &&
|
|
895
|
+
let t = J.value[e];
|
|
896
|
+
t.day && Tr(t, Mr(e));
|
|
886
897
|
}
|
|
887
898
|
}
|
|
888
|
-
},
|
|
889
|
-
|
|
899
|
+
}, Pr = () => {
|
|
900
|
+
Nr(D.modelValue);
|
|
890
901
|
};
|
|
891
|
-
|
|
892
|
-
|
|
902
|
+
Nr(D.modelValue), X(), T && st(V, () => {
|
|
903
|
+
Nr(D.modelValue), X();
|
|
893
904
|
});
|
|
894
|
-
let
|
|
905
|
+
let Fr = (e) => {
|
|
895
906
|
if (!M.value || A.floating) return;
|
|
896
907
|
let t;
|
|
897
|
-
t = e ? Array.isArray(e) ? e.map((e) =>
|
|
908
|
+
t = e ? Array.isArray(e) ? e.map((e) => Sr(hn(e))) : Sr(hn(e)) : null, Hr.value = t, O("update:time", t);
|
|
898
909
|
};
|
|
899
|
-
|
|
910
|
+
st(() => D.modelValue, (e) => {
|
|
900
911
|
if (e === null || Array.isArray(e) && e.length === 0) {
|
|
901
|
-
|
|
912
|
+
Nr(e), X(), Fr(e);
|
|
902
913
|
return;
|
|
903
914
|
}
|
|
904
915
|
let t = document.activeElement;
|
|
905
|
-
t &&
|
|
906
|
-
}),
|
|
907
|
-
if (!M.value || pe(e ?? null) === pe(
|
|
916
|
+
t && ir(t) || (Nr(e), X(), Fr(e));
|
|
917
|
+
}), st(() => D.time, (e) => {
|
|
918
|
+
if (!M.value || pe(e ?? null) === pe(Hr.value ?? null)) return;
|
|
908
919
|
let t = document.activeElement;
|
|
909
|
-
if (!(t &&
|
|
920
|
+
if (!(t && ir(t))) {
|
|
910
921
|
for (let e of ["start", "end"]) {
|
|
911
|
-
if (e === "end" && !
|
|
912
|
-
let t =
|
|
913
|
-
t !== void 0 &&
|
|
922
|
+
if (e === "end" && !D.range) break;
|
|
923
|
+
let t = Mr(e), n = J.value[e];
|
|
924
|
+
t !== void 0 && Tr(n, t);
|
|
914
925
|
}
|
|
915
|
-
|
|
926
|
+
X(), $({ finalize: !1 });
|
|
916
927
|
}
|
|
917
928
|
});
|
|
918
|
-
let
|
|
919
|
-
let t =
|
|
929
|
+
let Ir = () => sr("start") === "partial" ? !0 : D.range ? sr("end") === "partial" : !1, Lr = (e) => {
|
|
930
|
+
let t = J.value[e], n = K.value;
|
|
920
931
|
if (P.value) {
|
|
921
932
|
if (!t.week || !t.year) return null;
|
|
922
933
|
let n = parseInt(t.year, 10), r = parseInt(t.week, 10);
|
|
923
934
|
if (n < 1e3 || n > 9999 || r < 1) return null;
|
|
924
935
|
let i = ce(n);
|
|
925
|
-
r > i && (
|
|
936
|
+
r > i && (J.value[e].week = String(i).padStart(2, "0"));
|
|
926
937
|
let a = se(n, Math.min(r, i));
|
|
927
938
|
return a.isValid() ? a : null;
|
|
928
939
|
}
|
|
929
940
|
if (n.has("day") && !t.day || n.has("month") && !t.month || !t.year) return null;
|
|
930
|
-
if (
|
|
931
|
-
let r = M.value ?
|
|
941
|
+
if (T && V.value) {
|
|
942
|
+
let r = M.value ? Rr(t) : null;
|
|
932
943
|
if (M.value && !r) return null;
|
|
933
|
-
let i =
|
|
944
|
+
let i = Gn(t), a = Kn.get(it(J.value[e]));
|
|
934
945
|
if (a && !V.value.eras.length && n.has("month")) {
|
|
935
946
|
let e = V.value.fieldsOf(a), n = parseInt(t.year, 10) - parseInt(e.year, 10);
|
|
936
947
|
n && parseInt(t.month, 10) === parseInt(e.month, 10) && (i = {
|
|
@@ -940,92 +951,92 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
940
951
|
}
|
|
941
952
|
let o = V.value.nearest(i, n);
|
|
942
953
|
if (!o) return null;
|
|
943
|
-
|
|
954
|
+
Kn.set(it(J.value[e]), o);
|
|
944
955
|
let s = V.value.fieldsOf(o);
|
|
945
956
|
for (let r of [
|
|
946
957
|
"era",
|
|
947
958
|
"year",
|
|
948
959
|
"month",
|
|
949
960
|
"day"
|
|
950
|
-
]) n.has(r) && (r === "era" ? t.era !== s.era : parseInt(t[r], 10) !== parseInt(s[r], 10)) && (
|
|
961
|
+
]) n.has(r) && (r === "era" ? t.era !== s.era : parseInt(t[r], 10) !== parseInt(s[r], 10)) && (J.value[e][r] = s[r]);
|
|
951
962
|
return r ? o.hour(+r.hour).minute(+r.minute).second(+r.second) : o;
|
|
952
963
|
}
|
|
953
964
|
let r = n.has("day") ? parseInt(t.day, 10) : 1, i = n.has("month") ? parseInt(t.month, 10) : 1, a = parseInt(t.year, 10);
|
|
954
965
|
if (r < 1 || r > 31 || i < 1 || i > 12 || a < 1e3 || a > 9999) return null;
|
|
955
966
|
let o = t.year.padStart(4, "0"), s = String(i).padStart(2, "0"), c = String(r).padStart(2, "0"), l = "", u = "";
|
|
956
967
|
if (M.value) {
|
|
957
|
-
let e =
|
|
968
|
+
let e = Rr(t);
|
|
958
969
|
if (!e) return null;
|
|
959
970
|
l = `T${e.hour}:${e.minute}:${e.second}`, u = "THH:mm:ss";
|
|
960
971
|
}
|
|
961
|
-
let
|
|
962
|
-
if (!
|
|
963
|
-
let t =
|
|
964
|
-
|
|
972
|
+
let d = `${o}-${s}-${c}${l}`, f = w(d, E + u, !0);
|
|
973
|
+
if (!f.isValid()) {
|
|
974
|
+
let t = w(`${o}-${s}-01`, E, !0).endOf("month").date(), n = Math.min(r, t), i = `${o}-${s}-${String(n).padStart(2, "0")}${l}`;
|
|
975
|
+
f = w(i, E + u, !0), J.value[e].day = String(n).padStart(2, "0");
|
|
965
976
|
}
|
|
966
|
-
return
|
|
967
|
-
},
|
|
968
|
-
if (
|
|
977
|
+
return f.isValid() ? f : null;
|
|
978
|
+
}, Rr = (e) => {
|
|
979
|
+
if (D.ampm && e.hour) {
|
|
969
980
|
let t = parseInt(e.hour, 10);
|
|
970
981
|
if (t < 1 || t > 12) return null;
|
|
971
982
|
}
|
|
972
|
-
let t = String(
|
|
983
|
+
let t = String(br(e)).padStart(2, "0"), n = (e.minute || "0").padStart(2, "0"), r = ((D.seconds ? e.second : "") || "0").padStart(2, "0");
|
|
973
984
|
return parseInt(t, 10) > 23 || parseInt(n, 10) > 59 || parseInt(r, 10) > 59 ? null : {
|
|
974
985
|
hour: t,
|
|
975
986
|
minute: n,
|
|
976
987
|
second: r
|
|
977
988
|
};
|
|
978
|
-
},
|
|
979
|
-
let t =
|
|
989
|
+
}, zr = (e) => {
|
|
990
|
+
let t = Y();
|
|
980
991
|
return P.value ? {
|
|
981
992
|
...t,
|
|
982
|
-
...
|
|
983
|
-
} : (
|
|
984
|
-
},
|
|
993
|
+
...yn(e)
|
|
994
|
+
} : (T && V.value ? qn(t, e) : (K.value.has("day") && (t.day = e.format("DD")), K.value.has("month") && (t.month = e.format("MM")), t.year = e.format("YYYY")), M.value && (yr(t, e.hour()), t.minute = e.format("mm"), t.second = D.seconds ? e.format("ss") : ""), t);
|
|
995
|
+
}, Br = (e) => {
|
|
985
996
|
if (P.value) {
|
|
986
|
-
let t =
|
|
987
|
-
return n && t.isBefore(n, "day") && (t =
|
|
997
|
+
let t = p(e), n = z.value ? R(z.value) : null, r = B.value ? R(B.value) : null;
|
|
998
|
+
return n && t.isBefore(n, "day") && (t = p(n), t.isBefore(n, "day") && (t = t.add(1, "week"))), r && t.add(6, "day").isAfter(r, "day") && (t = p(r), t.add(6, "day").isAfter(r, "day") && (t = t.subtract(1, "week"))), t.isSame(p(e), "day") || W(t) ? null : t;
|
|
988
999
|
}
|
|
989
|
-
let t = (t, n) => M.value && !n ? t.hour(e.hour()).minute(e.minute()).second(e.second()) : t, n = !!(
|
|
1000
|
+
let t = (t, n) => M.value && !n ? t.hour(e.hour()).minute(e.minute()).second(e.second()) : t, n = !!(T && F.value && N.value), r = n ? "day" : qt.value, i = N.value ? r : M.value ? "minute" : "day", a = e, o = z.value, s = B.value;
|
|
990
1001
|
if (o) {
|
|
991
|
-
let e =
|
|
1002
|
+
let e = ln(o), n = R(o);
|
|
992
1003
|
a.isBefore(n, N.value ? r : M.value && e ? "minute" : "day") && (a = N.value ? n : t(n, e));
|
|
993
1004
|
}
|
|
994
1005
|
if (s) {
|
|
995
|
-
let e =
|
|
996
|
-
a.isAfter(i, N.value ? r : M.value && e ? "minute" : "day") && (a = N.value ? n ? i : i.startOf(
|
|
1006
|
+
let e = ln(s), i = R(s);
|
|
1007
|
+
a.isAfter(i, N.value ? r : M.value && e ? "minute" : "day") && (a = N.value ? n ? i : i.startOf(qt.value) : t(i, e));
|
|
997
1008
|
}
|
|
998
|
-
return a.isSame(e, i) ||
|
|
999
|
-
},
|
|
1000
|
-
|
|
1001
|
-
},
|
|
1002
|
-
let t =
|
|
1003
|
-
return
|
|
1004
|
-
},
|
|
1005
|
-
if (
|
|
1009
|
+
return a.isSame(e, i) || W(a) ? null : a;
|
|
1010
|
+
}, Z = (e) => {
|
|
1011
|
+
O("error", e);
|
|
1012
|
+
}, Vr = (e) => {
|
|
1013
|
+
let t = J.value[e], n = String(br(t)).padStart(2, "0"), r = (t.minute || "0").padStart(2, "0");
|
|
1014
|
+
return D.seconds ? `${n}:${r}:${(t.second || "0").padStart(2, "0")}` : `${n}:${r}`;
|
|
1015
|
+
}, Hr = b(void 0), Q = (e) => {
|
|
1016
|
+
if (O("update:modelValue", e), !M.value) return;
|
|
1006
1017
|
let t;
|
|
1007
|
-
t = e === null ? null : Array.isArray(e) ? e.map((e, t) =>
|
|
1018
|
+
t = e === null ? null : Array.isArray(e) ? e.map((e, t) => Vr(t === 0 ? "start" : "end")) : Vr("start"), Hr.value = t, O("update:time", t);
|
|
1008
1019
|
}, $ = (e = {}) => {
|
|
1009
|
-
let t = !!e.finalize, n =
|
|
1010
|
-
if (!
|
|
1020
|
+
let t = !!e.finalize, n = sr("start");
|
|
1021
|
+
if (!D.range) {
|
|
1011
1022
|
if (n === "empty") {
|
|
1012
1023
|
Q(null);
|
|
1013
1024
|
return;
|
|
1014
1025
|
}
|
|
1015
1026
|
if (n === "partial") return;
|
|
1016
|
-
let e =
|
|
1027
|
+
let e = Lr("start");
|
|
1017
1028
|
if (!e) return;
|
|
1018
|
-
if (
|
|
1029
|
+
if (W(e)) {
|
|
1019
1030
|
if (!t) return;
|
|
1020
|
-
let n = H(e), r =
|
|
1031
|
+
let n = H(e), r = Br(e);
|
|
1021
1032
|
if (r) {
|
|
1022
1033
|
let e = H(r);
|
|
1023
|
-
|
|
1034
|
+
J.value.start = zr(r), Q(e), Z({
|
|
1024
1035
|
code: "disabled_date",
|
|
1025
1036
|
original: n,
|
|
1026
1037
|
normalized: e
|
|
1027
1038
|
});
|
|
1028
|
-
} else
|
|
1039
|
+
} else J.value.start = Y(), Q(null), Z({
|
|
1029
1040
|
code: "disabled_date",
|
|
1030
1041
|
original: n,
|
|
1031
1042
|
normalized: null
|
|
@@ -1035,29 +1046,29 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
1035
1046
|
Q(H(e));
|
|
1036
1047
|
return;
|
|
1037
1048
|
}
|
|
1038
|
-
let r =
|
|
1049
|
+
let r = sr("end");
|
|
1039
1050
|
if (n === "empty" && r === "empty") {
|
|
1040
1051
|
Q([]);
|
|
1041
1052
|
return;
|
|
1042
1053
|
}
|
|
1043
1054
|
if (n === "partial" || r === "partial" || n === "empty") return;
|
|
1044
|
-
let i =
|
|
1055
|
+
let i = Lr("start");
|
|
1045
1056
|
if (!i) return;
|
|
1046
|
-
let a = r === "empty" ? null :
|
|
1047
|
-
if (
|
|
1057
|
+
let a = r === "empty" ? null : Lr("end"), o = H(i), s = a ? H(a) : null, c = i, l = !1;
|
|
1058
|
+
if (W(i)) {
|
|
1048
1059
|
if (!t) return;
|
|
1049
|
-
let e =
|
|
1060
|
+
let e = Br(i), n = s ? [o, s] : [o];
|
|
1050
1061
|
if (!e) {
|
|
1051
|
-
|
|
1062
|
+
J.value.start = Y(), J.value.end = Y(), Q([]), Z({
|
|
1052
1063
|
code: "disabled_range_start",
|
|
1053
1064
|
original: n,
|
|
1054
1065
|
normalized: []
|
|
1055
1066
|
});
|
|
1056
1067
|
return;
|
|
1057
1068
|
}
|
|
1058
|
-
if (c = e, l = !0,
|
|
1069
|
+
if (c = e, l = !0, J.value.start = zr(e), !a) {
|
|
1059
1070
|
let t = [H(e)];
|
|
1060
|
-
Q(t),
|
|
1071
|
+
Q(t), Z({
|
|
1061
1072
|
code: "disabled_range_start",
|
|
1062
1073
|
original: n,
|
|
1063
1074
|
normalized: t
|
|
@@ -1069,261 +1080,237 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
1069
1080
|
Q([H(c)]);
|
|
1070
1081
|
return;
|
|
1071
1082
|
}
|
|
1072
|
-
let u = a,
|
|
1073
|
-
if (
|
|
1083
|
+
let u = a, d = !1;
|
|
1084
|
+
if (W(a)) {
|
|
1074
1085
|
if (!t) return;
|
|
1075
|
-
let e =
|
|
1086
|
+
let e = Br(a), n = [o, s];
|
|
1076
1087
|
if (!e) {
|
|
1077
1088
|
let e = [H(c)];
|
|
1078
|
-
|
|
1089
|
+
J.value.end = Y(), Q(e), l && Z({
|
|
1079
1090
|
code: "disabled_range_start",
|
|
1080
1091
|
original: n,
|
|
1081
1092
|
normalized: e
|
|
1082
|
-
}),
|
|
1093
|
+
}), Z({
|
|
1083
1094
|
code: "disabled_range_end",
|
|
1084
1095
|
original: n,
|
|
1085
1096
|
normalized: e
|
|
1086
1097
|
});
|
|
1087
1098
|
return;
|
|
1088
1099
|
}
|
|
1089
|
-
u = e,
|
|
1100
|
+
u = e, d = !0, J.value.end = zr(e);
|
|
1090
1101
|
}
|
|
1091
1102
|
if (u.isBefore(c, M.value ? "second" : "day")) {
|
|
1092
1103
|
if (!t) return;
|
|
1093
|
-
let e = [H(c), H(u)], n = [H(u), H(c)], r = { ...
|
|
1094
|
-
|
|
1104
|
+
let e = [H(c), H(u)], n = [H(u), H(c)], r = { ...J.value.start };
|
|
1105
|
+
J.value.start = { ...J.value.end }, J.value.end = r, X(), Q(n), l && Z({
|
|
1095
1106
|
code: "disabled_range_start",
|
|
1096
1107
|
original: [o, s],
|
|
1097
1108
|
normalized: n
|
|
1098
|
-
}),
|
|
1109
|
+
}), d && Z({
|
|
1099
1110
|
code: "disabled_range_end",
|
|
1100
1111
|
original: [o, s],
|
|
1101
1112
|
normalized: n
|
|
1102
|
-
}),
|
|
1113
|
+
}), Z({
|
|
1103
1114
|
code: "end_before_start",
|
|
1104
1115
|
original: e,
|
|
1105
1116
|
normalized: n
|
|
1106
1117
|
});
|
|
1107
1118
|
return;
|
|
1108
1119
|
}
|
|
1109
|
-
let
|
|
1110
|
-
Q(
|
|
1120
|
+
let f = [H(c), H(u)];
|
|
1121
|
+
Q(f), l && Z({
|
|
1111
1122
|
code: "disabled_range_start",
|
|
1112
1123
|
original: s ? [o, s] : [o],
|
|
1113
|
-
normalized:
|
|
1114
|
-
}),
|
|
1124
|
+
normalized: f
|
|
1125
|
+
}), d && Z({
|
|
1115
1126
|
code: "disabled_range_end",
|
|
1116
1127
|
original: [o, s],
|
|
1117
|
-
normalized:
|
|
1128
|
+
normalized: f
|
|
1118
1129
|
});
|
|
1119
1130
|
};
|
|
1120
|
-
return
|
|
1121
|
-
document.removeEventListener("focusin", U), document.removeEventListener("click", U);
|
|
1122
|
-
}), (t, n) => (
|
|
1123
|
-
id:
|
|
1131
|
+
return et(() => {
|
|
1132
|
+
document.removeEventListener("focusin", U), document.removeEventListener("click", U, !0);
|
|
1133
|
+
}), (t, n) => (y(), Ke(Pe, v({
|
|
1134
|
+
id: d.id,
|
|
1124
1135
|
class: "bb-date-picker-input",
|
|
1125
|
-
clearable:
|
|
1126
|
-
compact:
|
|
1127
|
-
description:
|
|
1128
|
-
disabled:
|
|
1129
|
-
errors:
|
|
1130
|
-
"has-errors":
|
|
1131
|
-
"has-value":
|
|
1132
|
-
"has-warnings":
|
|
1133
|
-
"hide-label":
|
|
1134
|
-
hint:
|
|
1135
|
-
"input-align":
|
|
1136
|
-
label:
|
|
1137
|
-
"label-align":
|
|
1138
|
-
"label-mode":
|
|
1139
|
-
"label-position":
|
|
1140
|
-
layout:
|
|
1141
|
-
loading:
|
|
1142
|
-
name:
|
|
1143
|
-
passthrough:
|
|
1144
|
-
readonly:
|
|
1145
|
-
reverse:
|
|
1146
|
-
"show-asterisk":
|
|
1147
|
-
"show-hint":
|
|
1148
|
-
warnings:
|
|
1149
|
-
},
|
|
1150
|
-
label:
|
|
1151
|
-
input:
|
|
1136
|
+
clearable: d.clearable && Ut.value,
|
|
1137
|
+
compact: S(A).compact,
|
|
1138
|
+
description: d.description,
|
|
1139
|
+
disabled: d.disabled,
|
|
1140
|
+
errors: S(Et),
|
|
1141
|
+
"has-errors": d.hasErrors,
|
|
1142
|
+
"has-value": Ut.value,
|
|
1143
|
+
"has-warnings": d.hasWarnings,
|
|
1144
|
+
"hide-label": d.hideLabel,
|
|
1145
|
+
hint: d.hint,
|
|
1146
|
+
"input-align": d.inputAlign,
|
|
1147
|
+
label: d.label,
|
|
1148
|
+
"label-align": d.labelAlign,
|
|
1149
|
+
"label-mode": Wt.value,
|
|
1150
|
+
"label-position": d.labelPosition,
|
|
1151
|
+
layout: S(A).layout,
|
|
1152
|
+
loading: d.loading,
|
|
1153
|
+
name: d.name,
|
|
1154
|
+
passthrough: S(j),
|
|
1155
|
+
readonly: S(At),
|
|
1156
|
+
reverse: S(A).reverse,
|
|
1157
|
+
"show-asterisk": S(Tt),
|
|
1158
|
+
"show-hint": Ht.value,
|
|
1159
|
+
warnings: d.warnings
|
|
1160
|
+
}, S(j).forwardAttrs), qe({
|
|
1161
|
+
label: C((e) => [x(t.$slots, "label", Qe(Xe(e)))]),
|
|
1162
|
+
input: C(({ id: r, hasErrors: i, hasWarnings: a, ariaDescribedby: o }) => [Je(Fe, {
|
|
1152
1163
|
ref_key: "wrapper",
|
|
1153
|
-
ref:
|
|
1154
|
-
active:
|
|
1155
|
-
"append:icon":
|
|
1156
|
-
class:
|
|
1157
|
-
clearable:
|
|
1158
|
-
compact:
|
|
1159
|
-
disabled:
|
|
1164
|
+
ref: L,
|
|
1165
|
+
active: Pt.value,
|
|
1166
|
+
"append:icon": S(D)["append:icon"],
|
|
1167
|
+
class: Ze(["bb-date-picker-input__field", { "bb-date-picker-input__field--range": d.range }]),
|
|
1168
|
+
clearable: d.clearable && !S(fe)(S(kt)),
|
|
1169
|
+
compact: S(A).compact,
|
|
1170
|
+
disabled: d.disabled,
|
|
1160
1171
|
"has-errors": i,
|
|
1161
|
-
"has-value":
|
|
1172
|
+
"has-value": Ut.value,
|
|
1162
1173
|
"has-warnings": a,
|
|
1163
|
-
loading:
|
|
1164
|
-
passthrough:
|
|
1165
|
-
"prepend:icon":
|
|
1166
|
-
readonly:
|
|
1167
|
-
variant:
|
|
1168
|
-
onClick:
|
|
1169
|
-
"onClick:clear":
|
|
1170
|
-
onFocusin:
|
|
1171
|
-
},
|
|
1172
|
-
"prepend:outer":
|
|
1173
|
-
prepend:
|
|
1174
|
-
append:
|
|
1174
|
+
loading: d.loading,
|
|
1175
|
+
passthrough: S(j),
|
|
1176
|
+
"prepend:icon": S(D)["prepend:icon"],
|
|
1177
|
+
readonly: S(At),
|
|
1178
|
+
variant: d.variant,
|
|
1179
|
+
onClick: nn,
|
|
1180
|
+
"onClick:clear": Nn,
|
|
1181
|
+
onFocusin: gn
|
|
1182
|
+
}, qe({
|
|
1183
|
+
"prepend:outer": C(() => [x(t.$slots, "prepend:outer")]),
|
|
1184
|
+
prepend: C(() => [x(t.$slots, "prepend")]),
|
|
1185
|
+
append: C(() => [on.value ? h("", !0) : (y(), Ke(Ae, {
|
|
1175
1186
|
key: 0,
|
|
1176
|
-
"active-segment":
|
|
1177
|
-
adaptive:
|
|
1178
|
-
ampm:
|
|
1179
|
-
anchor:
|
|
1180
|
-
clearable:
|
|
1181
|
-
disabled:
|
|
1182
|
-
"first-day-of-week":
|
|
1183
|
-
floating:
|
|
1184
|
-
label:
|
|
1185
|
-
max:
|
|
1186
|
-
min:
|
|
1187
|
-
"model-value":
|
|
1188
|
-
"number-of-months":
|
|
1189
|
-
"off-canvas-props":
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1187
|
+
"active-segment": Tn.value,
|
|
1188
|
+
adaptive: S(A).adaptive,
|
|
1189
|
+
ampm: d.ampm,
|
|
1190
|
+
anchor: L.value,
|
|
1191
|
+
clearable: d.clearable,
|
|
1192
|
+
disabled: d.disabled,
|
|
1193
|
+
"first-day-of-week": d.firstDayOfWeek,
|
|
1194
|
+
floating: S(A).floating,
|
|
1195
|
+
label: jn.value,
|
|
1196
|
+
max: d.max,
|
|
1197
|
+
min: d.min,
|
|
1198
|
+
"model-value": Mn.value,
|
|
1199
|
+
"number-of-months": d.numberOfMonths,
|
|
1200
|
+
"off-canvas-props": d.offCanvasProps,
|
|
1201
|
+
open: S(Bt),
|
|
1202
|
+
pt: S(j).forward(Gt, S(je).states),
|
|
1203
|
+
range: S(D).range,
|
|
1204
|
+
readonly: S(At),
|
|
1205
|
+
seconds: d.seconds,
|
|
1206
|
+
selectable: d.selectable,
|
|
1207
|
+
step: d.step,
|
|
1208
|
+
time: d.time,
|
|
1209
|
+
"transition-duration": d.transitionDuration,
|
|
1210
|
+
type: d.type,
|
|
1211
|
+
utc: d.utc,
|
|
1212
|
+
onGridPick: bn["onUpdate:modelValue"],
|
|
1213
|
+
onHidden: n[1] ||= (e) => S(O)("hidden"),
|
|
1214
|
+
onHide: zt,
|
|
1215
|
+
onShow: Rt,
|
|
1216
|
+
onShown: n[2] ||= (e) => S(O)("shown"),
|
|
1217
|
+
onTimePick: En,
|
|
1218
|
+
"onUpdate:open": S(Vt)
|
|
1219
|
+
}, qe({
|
|
1220
|
+
activator: C(({ props: e }) => [_("button", v({
|
|
1221
|
+
"aria-disabled": S(jt) || void 0,
|
|
1209
1222
|
class: "bb-segmented-field__activator",
|
|
1210
|
-
disabled:
|
|
1223
|
+
disabled: d.disabled || d.readonly,
|
|
1211
1224
|
type: "button"
|
|
1212
|
-
},
|
|
1225
|
+
}, v(e, S(j).activator)), [Je(Ne, {
|
|
1213
1226
|
class: "bb-segmented-field__trigger-icon",
|
|
1214
|
-
icon:
|
|
1215
|
-
}, null, 8, ["icon"])], 16,
|
|
1216
|
-
day:
|
|
1217
|
-
"day:append":
|
|
1227
|
+
icon: S(ye)
|
|
1228
|
+
}, null, 8, ["icon"])], 16, yt)]),
|
|
1229
|
+
day: C((e) => [x(t.$slots, "day", Qe(Xe(e)))]),
|
|
1230
|
+
"day:append": C((e) => [x(t.$slots, "day:append", Qe(Xe(e)))]),
|
|
1218
1231
|
_: 2
|
|
1219
|
-
}, [
|
|
1232
|
+
}, [nt(Nt(), (e) => ({
|
|
1220
1233
|
name: e,
|
|
1221
|
-
fn:
|
|
1222
|
-
}))]), 1032, [
|
|
1223
|
-
"active-segment",
|
|
1224
|
-
"adaptive",
|
|
1225
|
-
"ampm",
|
|
1226
|
-
"anchor",
|
|
1227
|
-
"clearable",
|
|
1228
|
-
"disabled",
|
|
1229
|
-
"first-day-of-week",
|
|
1230
|
-
"floating",
|
|
1231
|
-
"label",
|
|
1232
|
-
"max",
|
|
1233
|
-
"min",
|
|
1234
|
-
"model-value",
|
|
1235
|
-
"number-of-months",
|
|
1236
|
-
"off-canvas-props",
|
|
1237
|
-
"pt",
|
|
1238
|
-
"range",
|
|
1239
|
-
"readonly",
|
|
1240
|
-
"seconds",
|
|
1241
|
-
"selectable",
|
|
1242
|
-
"step",
|
|
1243
|
-
"time",
|
|
1244
|
-
"transition-duration",
|
|
1245
|
-
"type",
|
|
1246
|
-
"utc",
|
|
1247
|
-
"onGridPick"
|
|
1248
|
-
])), b(t.$slots, "append", {}, () => [t.$slots.suffix ? (v(), h("span", _({
|
|
1234
|
+
fn: C((n) => [x(t.$slots, e, Qe(Xe(n)))])
|
|
1235
|
+
}))]), 1032, /* @__PURE__ */ "active-segment.adaptive.ampm.anchor.clearable.disabled.first-day-of-week.floating.label.max.min.model-value.number-of-months.off-canvas-props.open.pt.range.readonly.seconds.selectable.step.time.transition-duration.type.utc.onGridPick.onUpdate:open".split("."))), x(t.$slots, "append", {}, () => [t.$slots.suffix ? (y(), g("span", v({
|
|
1249
1236
|
key: 0,
|
|
1250
1237
|
class: "bb-field-input__suffix"
|
|
1251
|
-
},
|
|
1252
|
-
"append:outer":
|
|
1253
|
-
default:
|
|
1254
|
-
class:
|
|
1255
|
-
"bb-segmented-field__fields--empty":
|
|
1256
|
-
"bb-segmented-field__fields--range":
|
|
1238
|
+
}, S(j).suffix), [x(t.$slots, "suffix")], 16)) : h("", !0)])]),
|
|
1239
|
+
"append:outer": C(() => [x(t.$slots, "append:outer")]),
|
|
1240
|
+
default: C(() => [_("div", {
|
|
1241
|
+
class: Ze(["bb-segmented-field__fields", {
|
|
1242
|
+
"bb-segmented-field__fields--empty": Ar.value,
|
|
1243
|
+
"bb-segmented-field__fields--range": d.range
|
|
1257
1244
|
}]),
|
|
1258
|
-
style:
|
|
1259
|
-
}, [
|
|
1245
|
+
style: $e({ "--fields-min-ch": S(rr) })
|
|
1246
|
+
}, [Ar.value ? (y(), g("span", {
|
|
1260
1247
|
key: 0,
|
|
1261
1248
|
"aria-hidden": "true",
|
|
1262
1249
|
class: "bb-segmented-field__placeholder",
|
|
1263
|
-
onClick: n[0] ||= (...e) =>
|
|
1264
|
-
},
|
|
1265
|
-
class:
|
|
1266
|
-
dir:
|
|
1267
|
-
}, [(
|
|
1268
|
-
n.field === "week" ? (
|
|
1250
|
+
onClick: n[0] ||= (...e) => S(or) && S(or)(...e)
|
|
1251
|
+
}, rt(kr.value), 1)) : h("", !0), (y(!0), g(Ge, null, nt(Jn.value, (t, n) => (y(), g(Ge, { key: t.key }, [_("span", {
|
|
1252
|
+
class: Ze(["bb-segmented-field__run", `bb-segmented-field__run--${t.kind}`]),
|
|
1253
|
+
dir: Zn(t)
|
|
1254
|
+
}, [(y(!0), g(Ge, null, nt(t.items, ({ descriptor: n, index: a }, s) => (y(), g(Ge, { key: S(er)(n) }, [
|
|
1255
|
+
n.field === "week" ? (y(), g("span", {
|
|
1269
1256
|
key: 0,
|
|
1270
1257
|
"aria-hidden": "true",
|
|
1271
1258
|
class: "bb-segmented-field__separator bb-segmented-field__week-prefix",
|
|
1272
|
-
onClick: (e) =>
|
|
1273
|
-
}, "W", 8,
|
|
1274
|
-
|
|
1259
|
+
onClick: (e) => S(ar)(n, { select: !0 })
|
|
1260
|
+
}, "W", 8, mt)) : h("", !0),
|
|
1261
|
+
_("span", {
|
|
1275
1262
|
class: "bb-segmented-field__field-sizer",
|
|
1276
|
-
"data-value":
|
|
1277
|
-
}, [
|
|
1278
|
-
id: a === 0 ? r :
|
|
1263
|
+
"data-value": S(nr)(n)
|
|
1264
|
+
}, [ct(_("input", v({
|
|
1265
|
+
id: a === 0 ? r : hr(n, r),
|
|
1279
1266
|
ref_for: !0,
|
|
1280
|
-
ref: (e) =>
|
|
1281
|
-
"aria-describedby":
|
|
1282
|
-
"aria-disabled":
|
|
1267
|
+
ref: (e) => S($n)[S(er)(n)] = e,
|
|
1268
|
+
"aria-describedby": Zt(o, r),
|
|
1269
|
+
"aria-disabled": d.disabled || void 0,
|
|
1283
1270
|
"aria-invalid": i ? "true" : void 0,
|
|
1284
|
-
"aria-label":
|
|
1285
|
-
"aria-readonly":
|
|
1286
|
-
autocomplete:
|
|
1287
|
-
autofocus:
|
|
1271
|
+
"aria-label": vr(n),
|
|
1272
|
+
"aria-readonly": sn.value || void 0,
|
|
1273
|
+
autocomplete: S(A).autocomplete,
|
|
1274
|
+
autofocus: d.autofocus && a === 0,
|
|
1288
1275
|
class: ["bb-segmented-field__input", [`bb-segmented-field__input--${n.field}`, `bb-segmented-field__input--${n.segment}`]],
|
|
1289
|
-
disabled:
|
|
1290
|
-
inputmode:
|
|
1291
|
-
maxlength:
|
|
1292
|
-
name:
|
|
1293
|
-
readonly:
|
|
1294
|
-
required:
|
|
1295
|
-
"aria-required":
|
|
1296
|
-
tabindex:
|
|
1276
|
+
disabled: d.disabled,
|
|
1277
|
+
inputmode: cn(n.field),
|
|
1278
|
+
maxlength: Un(n.field),
|
|
1279
|
+
name: gr(n),
|
|
1280
|
+
readonly: sn.value,
|
|
1281
|
+
required: S(Dt),
|
|
1282
|
+
"aria-required": S(Ot),
|
|
1283
|
+
tabindex: Vn(a) ? 0 : -1,
|
|
1297
1284
|
type: "text",
|
|
1298
|
-
value:
|
|
1299
|
-
onBlur: (e) =>
|
|
1300
|
-
onFocus: (e) =>
|
|
1301
|
-
onInput: (e) =>
|
|
1302
|
-
onKeydown: (e) =>
|
|
1303
|
-
onPaste: (e) =>
|
|
1304
|
-
}, { ref_for: !0 },
|
|
1305
|
-
s < t.items.length - 1 ? (
|
|
1285
|
+
value: S(tr)(S(J)[n.segment][n.field]),
|
|
1286
|
+
onBlur: (e) => S(dr)(n),
|
|
1287
|
+
onFocus: (e) => wn(n, e),
|
|
1288
|
+
onInput: (e) => pr(n, e),
|
|
1289
|
+
onKeydown: (e) => an(n, e),
|
|
1290
|
+
onPaste: (e) => S(fr)(n, e)
|
|
1291
|
+
}, { ref_for: !0 }, v(S(j).controlAttrs, S(j).input)), null, 16, gt), [[S(e)]])], 8, ht),
|
|
1292
|
+
s < t.items.length - 1 ? (y(), g("span", {
|
|
1306
1293
|
key: 1,
|
|
1307
1294
|
"aria-hidden": "true",
|
|
1308
1295
|
class: "bb-segmented-field__separator",
|
|
1309
1296
|
role: "presentation",
|
|
1310
|
-
onClick: (e) =>
|
|
1311
|
-
},
|
|
1312
|
-
], 64))), 128))], 10,
|
|
1297
|
+
onClick: (e) => S(ar)(q.value[a + 1], { select: !0 })
|
|
1298
|
+
}, rt(Qn(q.value[a], q.value[a + 1])), 9, _t)) : h("", !0)
|
|
1299
|
+
], 64))), 128))], 10, pt), n < Jn.value.length - 1 ? (y(), g("span", {
|
|
1313
1300
|
key: 0,
|
|
1314
1301
|
"aria-hidden": "true",
|
|
1315
|
-
class:
|
|
1302
|
+
class: Ze(["bb-segmented-field__separator", { "bb-segmented-field__separator--range": q.value[Yn(t)].segment !== q.value[Yn(t) + 1].segment }]),
|
|
1316
1303
|
role: "presentation",
|
|
1317
|
-
onClick: (e) =>
|
|
1318
|
-
},
|
|
1319
|
-
id:
|
|
1304
|
+
onClick: (e) => S(ar)(q.value[Yn(t) + 1], { select: !0 })
|
|
1305
|
+
}, rt(Qn(q.value[Yn(t)], q.value[Yn(t) + 1])), 11, vt)) : h("", !0)], 64))), 128))], 6), _("span", {
|
|
1306
|
+
id: Xt(r),
|
|
1320
1307
|
class: "bb-date-picker-input__accessible-description",
|
|
1321
1308
|
hidden: ""
|
|
1322
|
-
},
|
|
1309
|
+
}, rt(S(I)("datePickerInput.dateFormat")) + " " + rt(Dr.value), 9, bt)]),
|
|
1323
1310
|
_: 2
|
|
1324
1311
|
}, [t.$slots.prefix ? {
|
|
1325
1312
|
name: "prefix",
|
|
1326
|
-
fn:
|
|
1313
|
+
fn: C(() => [x(t.$slots, "prefix")]),
|
|
1327
1314
|
key: "0"
|
|
1328
1315
|
} : void 0]), 1032, [
|
|
1329
1316
|
"active",
|
|
@@ -1344,7 +1331,7 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
1344
1331
|
_: 2
|
|
1345
1332
|
}, [t.$slots.description ? {
|
|
1346
1333
|
name: "description",
|
|
1347
|
-
fn:
|
|
1334
|
+
fn: C((e) => [x(t.$slots, "description", Qe(Xe(e)))]),
|
|
1348
1335
|
key: "0"
|
|
1349
1336
|
} : void 0]), 1040, [
|
|
1350
1337
|
"id",
|
|
@@ -1375,4 +1362,4 @@ var dt = ["dir"], ft = ["onClick"], pt = ["data-value"], mt = [
|
|
|
1375
1362
|
]));
|
|
1376
1363
|
}
|
|
1377
1364
|
});
|
|
1378
|
-
export {
|
|
1365
|
+
export { St as default };
|