bitboss-ui 3.0.0-beta.48 → 3.0.0-beta.49
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 +24 -7
- package/bin/bitboss-ui-mcp.mjs +15 -3
- package/bin/bitboss-ui.mjs +115 -13
- package/dist/ai/BbAvatar.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +65 -65
- package/dist/ai/BbButton.md +16 -5
- package/dist/ai/BbCheckbox.md +0 -2
- package/dist/ai/BbCheckboxGroup.md +13 -20
- package/dist/ai/BbDatePickerInput.md +4 -2
- package/dist/ai/BbDialog.md +1 -8
- package/dist/ai/BbDropdown.md +231 -220
- package/dist/ai/BbDropdownButton.md +65 -65
- package/dist/ai/BbDropdownGroup.md +2 -2
- package/dist/ai/BbDropzone.md +10 -10
- package/dist/ai/BbForm.md +43 -52
- package/dist/ai/BbHoverCard.md +4 -2
- package/dist/ai/BbNumberInput.md +88 -21
- package/dist/ai/BbPopover.md +29 -23
- package/dist/ai/BbProgress.md +48 -22
- package/dist/ai/BbRadioGroup.md +13 -19
- package/dist/ai/BbSelect.md +16 -36
- package/dist/ai/BbSelectPopover.md +14 -30
- package/dist/ai/BbSmoothHeight.md +0 -2
- package/dist/ai/BbSwitchGroup.md +13 -20
- package/dist/ai/BbTable.md +11 -10
- package/dist/ai/BbTabs.md +106 -105
- package/dist/ai/BbTabsList.md +2 -2
- package/dist/ai/BbTabsPanels.md +1 -1
- package/dist/ai/BbTabsRoot.md +2 -2
- package/dist/ai/BbTooltip.md +24 -10
- package/dist/ai/BbTree.md +14 -11
- package/dist/ai/changelog.json +256 -5
- package/dist/ai/components.json +36 -34
- package/dist/ai/composables/useBbDropdownContext.md +16 -16
- package/dist/ai/composables/useBbFormField.md +5 -1
- package/dist/ai/composables/useBbTabsContext.md +14 -14
- package/dist/ai/guides/agent-contract.md +27 -27
- package/dist/ai/guides/ai-router.md +1 -1
- package/dist/ai/guides/component-picker.md +3 -3
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +10 -10
- package/dist/ai/guides/inertia-helpers.md +120 -67
- package/dist/ai/guides/installation-and-plugin-setup.md +43 -15
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +3 -2
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -16
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +9 -8
- package/dist/ai/guides/migration/components/bb-dropdown.md +15 -14
- package/dist/ai/guides/migration/components/bb-radio-group.md +2 -1
- package/dist/ai/guides/migration/components/bb-select-popover.md +6 -1
- package/dist/ai/guides/migration/components/bb-select.md +10 -2
- package/dist/ai/guides/migration/components/bb-switch-group.md +2 -1
- package/dist/ai/guides/migration/components/bb-tabs.md +9 -8
- package/dist/ai/guides/migration/components/bb-tooltip.md +1 -1
- package/dist/ai/guides/migration/v2-to-v3.md +114 -17
- package/dist/ai/guides/migration/v3-beta-tooling.md +11 -0
- package/dist/ai/guides/options-items-playbook.md +30 -24
- package/dist/ai/guides/passthrough.md +2 -2
- package/dist/ai/guides/preset-components.md +18 -3
- package/dist/ai/guides/typescript-generic-components.md +1 -1
- package/dist/ai/guides/validated-forms.md +11 -22
- package/dist/ai/guides/validation-providers.md +4 -3
- package/dist/ai/helpers/inertia/manifest.json +636 -0
- package/dist/ai/helpers/inertia/types.ts +15 -0
- package/dist/ai/helpers/inertia/useAsyncFn.ts +110 -0
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +102 -0
- package/dist/ai/helpers/inertia/useDeleteCmd.ts +30 -0
- package/dist/ai/helpers/inertia/useHasChanged.ts +36 -0
- package/dist/ai/helpers/inertia/useIndexById.ts +23 -0
- package/dist/ai/helpers/inertia/useLazyProp.ts +148 -0
- package/dist/ai/helpers/inertia/useLazyPropGetter.ts +50 -0
- package/dist/ai/helpers/inertia/useLoading.ts +20 -0
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +88 -0
- package/dist/ai/helpers/inertia/usePromiseForm.ts +62 -0
- package/dist/ai/helpers/inertia/useProp.ts +63 -0
- package/dist/ai/helpers/inertia/useQuery.ts +19 -0
- package/dist/ai/helpers/inertia/useQueryObject.ts +116 -0
- package/dist/ai/helpers/inertia/useResourceContext.ts +69 -0
- package/dist/ai/helpers/inertia/useRouteQuery.ts +54 -0
- package/dist/ai/helpers/inertia/useScreenSizes.ts +23 -0
- package/dist/ai/helpers/inertia/useTableContext.ts +34 -0
- package/dist/ai/helpers/inertia/useTableSelectionContext.ts +48 -0
- package/dist/ai/helpers/inertia/useUntil.ts +33 -0
- package/dist/ai/helpers/inertia/utils.ts +24 -0
- package/dist/ai/index.md +6 -6
- package/dist/ai/manifest/components/BbBreadcrumbs.json +10 -6
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbDropdown.json +23 -20
- package/dist/ai/manifest/components/BbDropdown.tree.json +2 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +22 -19
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdownGroup.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +1 -0
- package/dist/ai/manifest/components/BbNumberInput.json +6 -1
- package/dist/ai/manifest/components/BbNumberInput.tree.json +2 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -0
- package/dist/ai/manifest/components/BbProgress.json +6 -6
- package/dist/ai/manifest/components/BbProgress.tree.json +1 -0
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbSelect.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbTabs.json +7 -6
- package/dist/ai/manifest/components/BbTabsList.json +3 -3
- package/dist/ai/manifest/components/BbTabsPanels.json +1 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +5 -4
- package/dist/ai/manifest/components/BbTooltip.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +2 -0
- package/dist/ai/manifest/types.advanced.json +10 -9
- package/dist/ai/manifest/types.api.json +5 -4
- package/dist/ai/recipes/inertia/approvals-inbox.md +16 -18
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +23 -33
- package/dist/ai/recipes/inertia/layout-scaffold.md +16 -16
- package/dist/ai/recipes/inertia/onboarding.md +6 -10
- package/dist/ai/recipes/inertia/ownership-atlas.md +15 -18
- package/dist/ai/recipes/inertia/record-form.md +11 -11
- package/dist/ai/recipes/inertia/records-workspace.md +38 -41
- package/dist/ai/recipes/inertia/settings-workspace.md +26 -38
- package/dist/ai/recipes/inertia/upload-center.md +31 -39
- package/dist/ai/recipes/inertia/wizard-form.md +10 -19
- package/dist/ai/recipes/nuxt/approvals-inbox.md +7 -8
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +14 -24
- package/dist/ai/recipes/nuxt/layout-scaffold.md +16 -16
- package/dist/ai/recipes/nuxt/onboarding.md +2 -6
- package/dist/ai/recipes/nuxt/ownership-atlas.md +7 -9
- package/dist/ai/recipes/nuxt/record-form.md +5 -5
- package/dist/ai/recipes/nuxt/records-workspace.md +29 -31
- package/dist/ai/recipes/nuxt/settings-workspace.md +22 -34
- package/dist/ai/recipes/nuxt/upload-center.md +22 -29
- package/dist/ai/recipes/nuxt/wizard-form.md +3 -11
- package/dist/ai/recipes/vue/approvals-inbox.md +7 -8
- package/dist/ai/recipes/vue/inline-edit-workspace.md +14 -24
- package/dist/ai/recipes/vue/layout-scaffold.md +16 -16
- package/dist/ai/recipes/vue/onboarding.md +2 -6
- package/dist/ai/recipes/vue/ownership-atlas.md +7 -9
- package/dist/ai/recipes/vue/record-form.md +5 -5
- package/dist/ai/recipes/vue/records-workspace.md +29 -31
- package/dist/ai/recipes/vue/settings-workspace.md +22 -34
- package/dist/ai/recipes/vue/upload-center.md +22 -29
- package/dist/ai/recipes/vue/wizard-form.md +3 -11
- package/dist/ai/source/BbAccordion.md +1 -1
- package/dist/ai/source/BbAlert.md +3 -3
- package/dist/ai/source/BbBadge.md +2 -2
- package/dist/ai/source/BbBadgeButton.md +5 -4
- package/dist/ai/source/BbBaseButton.md +1 -1
- package/dist/ai/source/BbBaseRadioIcon.md +1 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +1 -0
- package/dist/ai/source/BbBreadcrumbs.md +63 -42
- package/dist/ai/source/BbButton.md +71 -33
- package/dist/ai/source/BbCalendar.md +17 -16
- package/dist/ai/source/BbCheckbox.md +3 -2
- package/dist/ai/source/BbCheckboxGroup.md +11 -4
- package/dist/ai/source/BbColorInput.md +10 -9
- package/dist/ai/source/BbConfirm.md +1 -1
- package/dist/ai/source/BbConfirmPortal.md +1 -1
- package/dist/ai/source/BbDatePicker.md +2 -2
- package/dist/ai/source/BbDatePickerInput.md +47 -20
- package/dist/ai/source/BbDialog.md +5 -5
- package/dist/ai/source/BbDropdown.md +230 -158
- package/dist/ai/source/BbDropdownButton.md +19 -12
- package/dist/ai/source/BbDropdownGroup.md +126 -93
- package/dist/ai/source/BbForm.md +25 -1
- package/dist/ai/source/BbIndicator.md +4 -0
- package/dist/ai/source/BbNumberInput.md +855 -19
- package/dist/ai/source/BbOffCanvas.md +27 -11
- package/dist/ai/source/BbPagination.md +3 -3
- package/dist/ai/source/BbPopover.md +152 -8
- package/dist/ai/source/BbPopoverPortal.md +11 -0
- package/dist/ai/source/BbProgress.md +82 -18
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbRating.md +11 -9
- package/dist/ai/source/BbSelect.md +16 -10
- package/dist/ai/source/BbSelectPopover.md +29 -23
- package/dist/ai/source/BbSlider.md +12 -6
- package/dist/ai/source/BbSwitch.md +3 -2
- package/dist/ai/source/BbSwitchGroup.md +5 -2
- package/dist/ai/source/BbTable.md +102 -18
- package/dist/ai/source/BbTabs.md +27 -23
- package/dist/ai/source/BbTabsList.md +26 -22
- package/dist/ai/source/BbTabsPanels.md +26 -22
- package/dist/ai/source/BbTabsRoot.md +25 -21
- package/dist/ai/source/BbTag.md +10 -9
- package/dist/ai/source/BbTextInput.md +5 -4
- package/dist/ai/source/BbTextarea.md +6 -5
- package/dist/ai/source/BbTimePicker.md +1 -1
- package/dist/ai/source/BbTimePickerInput.md +46 -9
- package/dist/ai/source/BbToast.md +10 -7
- package/dist/ai/source/BbToastPortal.md +10 -7
- package/dist/ai/source/BbTooltip.md +54 -8
- package/dist/ai/source/BbTree.md +21 -3
- package/dist/ai/source/CommonField.md +6 -4
- package/dist/ai/source/CommonFieldInput.md +15 -10
- package/dist/ai/source/CommonPopover.md +6 -0
- package/dist/ai/source/CommonTimeSelector.md +5 -4
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +10 -8
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +45 -45
- package/dist/components/BbBreadcrumbs/types.d.ts +25 -17
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +84 -71
- package/dist/components/BbButton/toggleRoving.d.ts +6 -0
- package/dist/components/BbButton/toggleRoving.js +45 -0
- package/dist/components/BbButton/types.d.ts +4 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +178 -178
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +28 -28
- package/dist/components/BbCalendar/useCalendarGrid.js +141 -139
- package/dist/components/BbCalendar/useDayjsLocale.d.ts +38 -15
- package/dist/components/BbCalendar/useDayjsLocale.js +31 -30
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +48 -48
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbCheckboxGroup/types.d.ts +6 -2
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +363 -349
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +91 -86
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +298 -289
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +322 -356
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +17 -15
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +40 -0
- package/dist/components/BbDropdown/DropdownRow.vue.js +5 -0
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/BbDropdown/normalizeGroups.d.ts +8 -2
- package/dist/components/BbDropdown/normalizeGroups.js +60 -46
- package/dist/components/BbDropdown/types.d.ts +119 -88
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +11 -2
- package/dist/components/BbDropdownButton/types.d.ts +2 -2
- package/dist/components/BbForm/BbForm.vue.d.ts +9 -0
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +114 -105
- package/dist/components/BbForm/BbFormCustomField.js +1 -1
- package/dist/components/BbForm/bindFormField.js +2 -1
- package/dist/components/BbForm/formFields.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +0 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +452 -125
- package/dist/components/BbNumberInput/numberDisplay.d.ts +256 -0
- package/dist/components/BbNumberInput/numberDisplay.js +499 -0
- package/dist/components/BbNumberInput/types.d.ts +54 -1
- package/dist/components/BbNumberInput/warroom/corpus.d.ts +58 -0
- package/dist/components/BbNumberInput/warroom/currency-verify.rows.d.ts +28 -0
- package/dist/components/BbNumberInput/warroom/currency.rows.d.ts +2 -0
- package/dist/components/BbNumberInput/warroom/harness.d.ts +217 -0
- package/dist/components/BbNumberInput/warroom/oracle.d.ts +150 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -0
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +207 -164
- package/dist/components/BbPopover/types.d.ts +11 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +15 -7
- package/dist/components/BbProgress/types.d.ts +23 -7
- package/dist/components/BbProgress/types.js +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +102 -101
- package/dist/components/BbRadioGroup/types.d.ts +6 -2
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +63 -63
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +156 -154
- package/dist/components/BbSelect/types.d.ts +6 -2
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbSelectPopover/types.d.ts +6 -2
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +153 -153
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +62 -62
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +131 -130
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +711 -676
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/types.d.ts +25 -21
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +76 -76
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +58 -58
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +82 -82
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +246 -236
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +102 -97
- package/dist/components/BbTooltip/tooltipWarmup.d.ts +23 -0
- package/dist/components/BbTooltip/tooltipWarmup.js +7 -0
- package/dist/components/BbTooltip/types.d.ts +7 -2
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +29 -21
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +10 -7
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +37 -36
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/composables/formSubmitLock.d.ts +6 -0
- package/dist/composables/formSubmitLock.js +4 -0
- package/dist/composables/useBaseOptions.d.ts +7 -1
- package/dist/composables/useBaseOptions.js +32 -32
- package/dist/composables/useBbDropdownContext.d.ts +8 -8
- package/dist/composables/useBbFormField.d.ts +9 -0
- package/dist/composables/useBbFormField.js +5 -3
- package/dist/composables/useBbTabsContext.d.ts +10 -10
- package/dist/composables/useBbTabsContext.js +18 -18
- package/dist/composables/useFormBinding.d.ts +11 -0
- package/dist/composables/useFormBinding.js +15 -13
- package/dist/composables/useItemText.d.ts +5 -1
- package/dist/composables/useItemText.js +8 -3
- package/dist/composables/useItemValue.d.ts +5 -1
- package/dist/composables/useItemValue.js +8 -3
- package/dist/composables/useLocale.js +10 -9
- package/dist/deprecation/ai-deprecations.json.d.ts +130 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.js +1 -1
- package/dist/directives/bbDropdown.js +1 -1
- package/dist/i18n/index.d.ts +7 -12
- package/dist/i18n/locales/cs.json +11 -14
- package/dist/i18n/locales/da.json +13 -16
- package/dist/i18n/locales/de-CH.json +137 -0
- package/dist/i18n/locales/de.json +14 -17
- package/dist/i18n/locales/el.json +10 -13
- package/dist/i18n/locales/en-GB.json +137 -0
- package/dist/i18n/locales/en.json +8 -11
- package/dist/i18n/locales/es-MX.json +137 -0
- package/dist/i18n/locales/es.json +16 -19
- package/dist/i18n/locales/fi.json +8 -11
- package/dist/i18n/locales/fr.json +23 -26
- package/dist/i18n/locales/hu.json +8 -11
- package/dist/i18n/locales/it.json +12 -15
- package/dist/i18n/locales/ja.json +13 -16
- package/dist/i18n/locales/ko.json +10 -13
- package/dist/i18n/locales/nb.json +13 -16
- package/dist/i18n/locales/nl.json +21 -24
- package/dist/i18n/locales/pl.json +10 -13
- package/dist/i18n/locales/{pt.json → pt-BR.json} +19 -22
- package/dist/i18n/locales/pt-PT.json +137 -0
- package/dist/i18n/locales/ro.json +22 -25
- package/dist/i18n/locales/ru.json +11 -14
- package/dist/i18n/locales/sv.json +16 -19
- package/dist/i18n/locales/tr.json +14 -17
- package/dist/i18n/locales/uk.json +11 -14
- package/dist/i18n/locales/{zh-cn.json → zh-CN.json} +10 -13
- package/dist/i18n/locales/zh-HK.json +137 -0
- package/dist/i18n/locales/zh-TW.json +137 -0
- package/dist/i18n/regionHints.d.ts +16 -0
- package/dist/i18n/regionHints.js +49 -0
- package/dist/i18n/regions.d.ts +286 -0
- package/dist/i18n/regions.js +265 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/llms-full.txt +1785 -1637
- package/dist/llms-medium.txt +74 -46
- package/dist/llms.txt +7 -7
- package/dist/locale-blueprint.json +16 -13
- package/dist/styles.css +2 -2
- package/dist/types/ptComponentMap.d.ts +1 -1
- package/dist/utilities/functions/slotKey.d.ts +2 -2
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +22 -19
- package/dist/vite.js +309 -297
- package/llms.txt +7 -7
- package/package.json +5 -3
- package/scripts/lib/agent-manifest.mjs +2 -1
- package/scripts/lib/eslint-disable.mjs +12 -4
- package/scripts/lib/eslint-plugin.d.ts +5 -1
- package/scripts/lib/eslint-plugin.mjs +187 -6
- package/scripts/lib/helper-canon.mjs +176 -0
- package/scripts/lib/helpers-add.mjs +1303 -0
- package/scripts/lib/local-components.mjs +33 -4
- package/scripts/lib/locale-check.mjs +165 -0
- package/scripts/lib/redundant-item-accessor.mjs +398 -0
- package/scripts/lib/renamed-item-field.mjs +343 -0
- package/scripts/lib/slot-key.mjs +2 -2
- package/scripts/lib/slot-renames.mjs +1 -1
- package/scripts/lib/validate-bb-markup.mjs +123 -56
- package/dist/i18n/index.js +0 -27
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import ne from "
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
1
|
+
import { BB_FORM_SUBMIT_LOCK as e } from "../../composables/formSubmitLock.js";
|
|
2
|
+
import { isEqual as t } from "../../utilities/functions/isEqual.js";
|
|
3
|
+
import { BB_FORM_CONNECTION as n } from "../../composables/useFormBinding.js";
|
|
4
|
+
import { messagesByKey as r, useBbFormContextHost as i } from "../../composables/useBbFormContext.js";
|
|
5
|
+
import { BB_FORM_FIELDS as a, byDocumentOrder as o, focusTarget as ee } from "./formFields.js";
|
|
6
|
+
import { bindFormField as te, nameToPath as s } from "./bindFormField.js";
|
|
7
|
+
import { customFieldsOf as ne } from "../../composables/useBbFormField.js";
|
|
8
|
+
import re from "./BbFormCustomField.js";
|
|
9
|
+
import { schemaRequires as ie, toFormSchema as ae } from "./formSchema.js";
|
|
10
|
+
import { Fragment as oe, computed as c, createBlock as se, createElementBlock as l, defineComponent as u, getCurrentInstance as ce, mergeProps as le, nextTick as d, openBlock as f, provide as p, reactive as m, ref as h, renderList as ue, renderSlot as de, shallowReactive as fe, unref as g, useTemplateRef as pe, watch as me, withModifiers as he } from "vue";
|
|
10
11
|
import { useForm as ge } from "vee-validate";
|
|
11
12
|
//#region src/components/BbForm/BbForm.vue?vue&type=script&setup=true&lang.ts
|
|
12
13
|
var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
@@ -17,18 +18,19 @@ var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
|
17
18
|
keepValuesOnUnmount: { type: [Boolean, Object] },
|
|
18
19
|
validationMode: {},
|
|
19
20
|
model: {},
|
|
20
|
-
fieldErrors: {}
|
|
21
|
+
fieldErrors: {},
|
|
22
|
+
disableSubmitLock: { type: Boolean }
|
|
21
23
|
},
|
|
22
24
|
emits: ["submit", "invalid"],
|
|
23
25
|
setup(u, { expose: ve, emit: ye }) {
|
|
24
|
-
let
|
|
26
|
+
let _ = u, be = ye, xe = c(() => ae(g(_.schema))), { handleSubmit: Se, isSubmitting: Ce, submitCount: v, resetForm: we, meta: y, values: b, errors: x, validate: S, setFieldError: C, setValues: w } = ge({
|
|
25
27
|
validationSchema: xe.value ? xe : void 0,
|
|
26
|
-
keepValuesOnUnmount: c(() =>
|
|
28
|
+
keepValuesOnUnmount: c(() => g(_.keepValuesOnUnmount) ?? !1)
|
|
27
29
|
}), T = (e) => e.replace(/\.(0|[1-9]\d*)(?=\.|$)/g, "[$1]"), E = fe(/* @__PURE__ */ new Set()), D = m({}), O = m({}), k = {}, A = () => {
|
|
28
30
|
for (let e of Object.keys(O)) delete O[e];
|
|
29
31
|
for (let e of Object.keys(k)) delete k[e];
|
|
30
32
|
}, j = (e) => [...E].some((t) => T(t.name()) === e), M = c(() => {
|
|
31
|
-
let e = /* @__PURE__ */ new Map(), t =
|
|
33
|
+
let e = /* @__PURE__ */ new Map(), t = r(_.fieldErrors);
|
|
32
34
|
for (let [n, r] of Object.entries(t)) {
|
|
33
35
|
let t = T(s(n)), i = e.get(t);
|
|
34
36
|
e.set(t, {
|
|
@@ -37,10 +39,11 @@ var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
|
37
39
|
});
|
|
38
40
|
}
|
|
39
41
|
return e;
|
|
40
|
-
}), N = (e) => M.value.get(T(e))?.messages ?? [],
|
|
41
|
-
p(
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
}), N = (e) => M.value.get(T(e))?.messages ?? [], Te = ne(_.id);
|
|
43
|
+
p(n, { bind: te }), p(a, {
|
|
44
|
+
locked: () => Le(),
|
|
45
|
+
isRequired: (e) => ie(g(_.schema), e),
|
|
46
|
+
validationMode: () => _.validationMode,
|
|
44
47
|
fieldErrors: N,
|
|
45
48
|
register: (e) => {
|
|
46
49
|
E.add(e);
|
|
@@ -48,17 +51,17 @@ var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
|
48
51
|
delete D[t];
|
|
49
52
|
let n = O[t];
|
|
50
53
|
n && (C(t, n), k[t] = n, delete O[t]);
|
|
51
|
-
let r = Object.keys(
|
|
54
|
+
let r = Object.keys(F.value).find((e) => T(e) === t);
|
|
52
55
|
if (r) {
|
|
53
|
-
let e =
|
|
56
|
+
let e = F.value[r];
|
|
54
57
|
C(t, e), k[t] = e;
|
|
55
|
-
let { [r]: n, ...i } =
|
|
56
|
-
|
|
58
|
+
let { [r]: n, ...i } = F.value;
|
|
59
|
+
F.value = i;
|
|
57
60
|
}
|
|
58
61
|
return (t) => {
|
|
59
|
-
E.delete(e), K.add(e.name()), (U(e.name()) ||
|
|
62
|
+
E.delete(e), K.add(e.name()), (U(e.name()) || _.model) && X();
|
|
60
63
|
let n = T(e.name()), r = (k[n] ?? []).filter((e) => t.errors.includes(e));
|
|
61
|
-
delete k[n], !(!
|
|
64
|
+
delete k[n], !(!g(_.keepValuesOnUnmount) || j(n)) && (r.length && (O[n] = r), D[n] = {
|
|
62
65
|
key: e.name(),
|
|
63
66
|
label: e.label(),
|
|
64
67
|
validationLabel: e.validationLabel(),
|
|
@@ -70,11 +73,11 @@ var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
|
70
73
|
moved: (e) => {
|
|
71
74
|
q.add(e), X();
|
|
72
75
|
},
|
|
73
|
-
model: () =>
|
|
74
|
-
read: (e) => G(
|
|
75
|
-
write: (
|
|
76
|
-
let r =
|
|
77
|
-
!r ||
|
|
76
|
+
model: () => _.model,
|
|
77
|
+
read: (e) => G(_.model, e),
|
|
78
|
+
write: (e, n) => {
|
|
79
|
+
let r = _.model;
|
|
80
|
+
!r || t(G(r, e), n) || Ge(r, e, n);
|
|
78
81
|
}
|
|
79
82
|
});
|
|
80
83
|
let P = c(() => {
|
|
@@ -96,57 +99,57 @@ var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
|
96
99
|
touched: t.touched()
|
|
97
100
|
};
|
|
98
101
|
return e;
|
|
99
|
-
}),
|
|
102
|
+
}), Ee = c(() => {
|
|
100
103
|
let e = {};
|
|
101
104
|
for (let [t, n] of Object.entries(P.value)) n.errors.length && (e[t] = n.errors);
|
|
102
105
|
return e;
|
|
103
|
-
}),
|
|
104
|
-
let e = new Set(Object.keys(P.value).map((e) => T(s(e)))), t = { ...
|
|
106
|
+
}), F = h({}), De = c(() => {
|
|
107
|
+
let e = new Set(Object.keys(P.value).map((e) => T(s(e)))), t = { ...F.value };
|
|
105
108
|
for (let [n, { key: r, messages: i }] of M.value) {
|
|
106
109
|
if (e.has(n)) continue;
|
|
107
110
|
let a = t[r] ?? [];
|
|
108
111
|
t[r] = [...a, ...i.filter((e) => !a.includes(e))];
|
|
109
112
|
}
|
|
110
113
|
return t;
|
|
111
|
-
}),
|
|
112
|
-
let
|
|
114
|
+
}), Oe = (e, t = {}) => {
|
|
115
|
+
let n = document.activeElement, i = new Map(Object.keys(P.value).map((e) => [T(s(e)), e]));
|
|
113
116
|
A();
|
|
114
117
|
let a = {}, o = {};
|
|
115
|
-
for (let [t,
|
|
118
|
+
for (let [t, n] of Object.entries(r(e))) {
|
|
116
119
|
let e = T(s(t));
|
|
117
120
|
if (!i.has(e)) {
|
|
118
|
-
a[s(t)] =
|
|
121
|
+
a[s(t)] = n;
|
|
119
122
|
continue;
|
|
120
123
|
}
|
|
121
|
-
o[i.get(e)] =
|
|
124
|
+
o[i.get(e)] = n, j(e) ? (C(e, n), k[e] = n) : O[e] = n;
|
|
122
125
|
}
|
|
123
|
-
|
|
124
|
-
},
|
|
126
|
+
F.value = a, $(), t.focus !== !1 && Object.keys(o).length && ke(o, n);
|
|
127
|
+
}, ke = async (e, t) => {
|
|
125
128
|
await d();
|
|
126
129
|
let n = Q.value, r = document.activeElement;
|
|
127
|
-
r !== t && r && r !== document.body || (!r || r === document.body ?
|
|
128
|
-
},
|
|
129
|
-
me(() =>
|
|
130
|
-
let t =
|
|
131
|
-
|
|
132
|
-
let n = Object.entries(e).some(([e, n]) => n.some((n) => !t[e]?.includes(n))), r =
|
|
130
|
+
r !== t && r && r !== document.body || (!r || r === document.body ? v.value === 0 : !n?.contains(r)) || Fe(e);
|
|
131
|
+
}, Ae = r(_.fieldErrors), je = v.value;
|
|
132
|
+
me(() => r(_.fieldErrors), (e) => {
|
|
133
|
+
let t = Ae;
|
|
134
|
+
Ae = e;
|
|
135
|
+
let n = Object.entries(e).some(([e, n]) => n.some((n) => !t[e]?.includes(n))), r = v.value !== je;
|
|
133
136
|
if (!Object.keys(e).length || !n && !r) return;
|
|
134
|
-
|
|
137
|
+
je = v.value;
|
|
135
138
|
let i = {};
|
|
136
139
|
for (let e of E) {
|
|
137
140
|
let t = N(e.name());
|
|
138
141
|
t.length && (i[e.name()] = t);
|
|
139
142
|
}
|
|
140
|
-
Object.keys(i).length &&
|
|
143
|
+
Object.keys(i).length && ke(i, document.activeElement);
|
|
141
144
|
});
|
|
142
|
-
let
|
|
143
|
-
let t = JSON.parse(JSON.stringify(b)), n = e ?
|
|
145
|
+
let Me = (e) => {
|
|
146
|
+
let t = JSON.parse(JSON.stringify(b)), n = e ? Ne(t, e) : t, r = {};
|
|
144
147
|
for (let e of E) {
|
|
145
148
|
let t = e.errors();
|
|
146
149
|
t.length && (r[T(e.name())] = [...t]);
|
|
147
150
|
}
|
|
148
|
-
let i =
|
|
149
|
-
|
|
151
|
+
let i = v.value;
|
|
152
|
+
we({
|
|
150
153
|
values: n,
|
|
151
154
|
submitCount: i
|
|
152
155
|
}, { force: !0 });
|
|
@@ -155,25 +158,25 @@ var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
|
155
158
|
dirty: !1,
|
|
156
159
|
touched: !1
|
|
157
160
|
});
|
|
158
|
-
},
|
|
161
|
+
}, Ne = (e, t) => {
|
|
159
162
|
let n = { ...e };
|
|
160
163
|
for (let [e, r] of Object.entries(t)) {
|
|
161
164
|
let t = n[e];
|
|
162
|
-
n[e] =
|
|
165
|
+
n[e] = Pe(t) && Pe(r) ? Ne(t, r) : r;
|
|
163
166
|
}
|
|
164
167
|
return n;
|
|
165
|
-
},
|
|
168
|
+
}, Pe = (e) => !!e && typeof e == "object" && Object.getPrototypeOf(e) === Object.prototype, Fe = (e) => {
|
|
166
169
|
let t = Q.value;
|
|
167
170
|
if (!t) return;
|
|
168
|
-
let n = [...E].filter((t) => e[t.name()] !== void 0).map((e) => e.el()).filter((e) => !!e && t.contains(e)).sort(
|
|
171
|
+
let n = [...E].filter((t) => e[t.name()] !== void 0).map((e) => e.el()).filter((e) => !!e && t.contains(e)).sort(o);
|
|
169
172
|
for (let e of n) {
|
|
170
|
-
let t =
|
|
173
|
+
let t = ee(e);
|
|
171
174
|
if (t) {
|
|
172
175
|
t.focus();
|
|
173
176
|
return;
|
|
174
177
|
}
|
|
175
178
|
}
|
|
176
|
-
},
|
|
179
|
+
}, Ie = async (e) => {
|
|
177
180
|
let t = {};
|
|
178
181
|
for (let [n, r] of Object.entries(e.results ?? {})) {
|
|
179
182
|
let e = r?.errors;
|
|
@@ -186,26 +189,32 @@ var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
|
186
189
|
}, r = document.activeElement;
|
|
187
190
|
be("invalid", n), await d();
|
|
188
191
|
let i = document.activeElement;
|
|
189
|
-
i !== r && i && i !== document.body ||
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
192
|
+
i !== r && i && i !== document.body || Fe(n.errors);
|
|
193
|
+
}, I = ce(), L = h(0), Le = () => L.value > 0 && !_.disableSubmitLock;
|
|
194
|
+
p(e, { locked: Le });
|
|
195
|
+
let Re = !1, ze = (e) => {
|
|
196
|
+
let t = I?.appContext.config.errorHandler;
|
|
197
|
+
t ? t(e, I?.proxy ?? null, "component event handler") : console.error(e);
|
|
198
|
+
}, Be = (e) => typeof e?.then == "function", Ve = (e) => {
|
|
199
|
+
let t = I?.vnode.props, n = (e) => Array.isArray(e) ? e : typeof e == "function" ? [e] : [], r = n(t?.onSubmit);
|
|
200
|
+
if (!Re) {
|
|
196
201
|
let e = n(t?.onSubmitOnce);
|
|
197
|
-
e.length && (
|
|
202
|
+
e.length && (Re = !0, r.push(...e));
|
|
198
203
|
}
|
|
199
204
|
if (!r.length) return;
|
|
200
205
|
let i = [];
|
|
201
206
|
for (let t of r) try {
|
|
202
207
|
let n = t(e);
|
|
203
|
-
|
|
208
|
+
Be(n) && i.push(Promise.resolve(n).catch(ze));
|
|
204
209
|
} catch (e) {
|
|
205
|
-
|
|
210
|
+
ze(e);
|
|
206
211
|
}
|
|
207
|
-
|
|
208
|
-
|
|
212
|
+
if (!i.length) return;
|
|
213
|
+
let a = Promise.all(i);
|
|
214
|
+
return L.value++, a.finally(() => {
|
|
215
|
+
L.value--;
|
|
216
|
+
});
|
|
217
|
+
}, He = Se((e) => Ve(e), Ie), R = (e) => e.split(/\.|\[(\d+)\]/).filter((e) => e !== void 0 && e !== ""), z = (e, t) => e === t || e.startsWith(`${t}.`) || e.startsWith(`${t}[`), B = (e) => Array.isArray(e) ? e.map(B) : e && Object.getPrototypeOf(e) === Object.prototype ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, B(t)])) : e, V = (e) => {
|
|
209
218
|
let t = T(s(e)), n = R(t);
|
|
210
219
|
if (!n.length) return;
|
|
211
220
|
let [r, ...i] = n, a = b[r];
|
|
@@ -219,7 +228,7 @@ var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
|
219
228
|
for (let e of Object.keys(x.value)) z(T(e), t) && C(e, void 0);
|
|
220
229
|
for (let e of Object.keys(O)) z(e, t) && delete O[e];
|
|
221
230
|
for (let e of Object.keys(k)) z(e, t) && delete k[e];
|
|
222
|
-
|
|
231
|
+
F.value = Object.fromEntries(Object.entries(F.value).filter(([e]) => !z(T(e), t)));
|
|
223
232
|
for (let e of Object.keys(D)) z(e, t) && delete D[e];
|
|
224
233
|
$();
|
|
225
234
|
}, H = (e) => R(s(e)).join("."), U = (e) => {
|
|
@@ -229,38 +238,38 @@ var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
|
229
238
|
index: Number(t[e])
|
|
230
239
|
};
|
|
231
240
|
return null;
|
|
232
|
-
},
|
|
241
|
+
}, Ue = (e) => e.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, b), W = (e) => {
|
|
233
242
|
let t = H(e);
|
|
234
243
|
return [...E].some((e) => {
|
|
235
244
|
let n = H(e.name());
|
|
236
245
|
return n === t || n.startsWith(`${t}.`);
|
|
237
246
|
});
|
|
238
|
-
},
|
|
239
|
-
let t =
|
|
247
|
+
}, We = (e) => {
|
|
248
|
+
let t = Ue(e);
|
|
240
249
|
if (!Array.isArray(t)) return;
|
|
241
250
|
let n = -1;
|
|
242
251
|
for (let t of E) {
|
|
243
252
|
let r = U(t.name());
|
|
244
253
|
r && r.container === e && (n = Math.max(n, r.index));
|
|
245
254
|
}
|
|
246
|
-
let r = G(
|
|
255
|
+
let r = G(_.model, e);
|
|
247
256
|
Array.isArray(r) && (n = Math.max(n, r.length - 1));
|
|
248
257
|
for (let r = t.length - 1; r > n; r--) V(`${e}.${r}`);
|
|
249
|
-
}, G = (e, t) => R(s(t)).reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e),
|
|
258
|
+
}, G = (e, t) => R(s(t)).reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e), Ge = (e, t, n) => {
|
|
250
259
|
let r = R(s(t)), i = e;
|
|
251
260
|
r.slice(0, -1).forEach((e, t) => {
|
|
252
261
|
let n = i[e];
|
|
253
262
|
(!n || typeof n != "object") && (i[e] = /^(0|[1-9]\d*)$/.test(r[t + 1]) ? [] : {}), i = i[e];
|
|
254
263
|
}), i[r[r.length - 1]] = n;
|
|
255
|
-
},
|
|
264
|
+
}, Ke = (e, t) => {
|
|
256
265
|
let n = R(s(t)), r = G(e, n.slice(0, -1).join(".")), i = n[n.length - 1];
|
|
257
266
|
!r || typeof r != "object" || Array.isArray(r) || i in r && delete r[i];
|
|
258
267
|
}, K = /* @__PURE__ */ new Set(), q = /* @__PURE__ */ new Set(), J = /* @__PURE__ */ new Set(), Y = !1, X = () => {
|
|
259
|
-
Y || (Y = !0, d().then(() => d()).then(
|
|
260
|
-
},
|
|
268
|
+
Y || (Y = !0, d().then(() => d()).then(qe));
|
|
269
|
+
}, qe = () => {
|
|
261
270
|
Y = !1;
|
|
262
271
|
for (let e of E) e.reassert();
|
|
263
|
-
let e = !!
|
|
272
|
+
let e = !!g(_.keepValuesOnUnmount), t = /* @__PURE__ */ new Set();
|
|
264
273
|
if (!e) for (let e of E) {
|
|
265
274
|
let n = U(e.name());
|
|
266
275
|
n && t.add(n.container);
|
|
@@ -269,7 +278,7 @@ var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
|
269
278
|
let n = U(e), r = n !== null && H(e) === `${n.container}.${n.index}`;
|
|
270
279
|
n && (r || q.has(e)) ? (r && J.has(e) && !W(e) && V(e), t.add(n.container)) : W(e) || V(e);
|
|
271
280
|
}
|
|
272
|
-
let n =
|
|
281
|
+
let n = _.model;
|
|
273
282
|
if (n) {
|
|
274
283
|
for (let e of E) {
|
|
275
284
|
let n = U(e.name());
|
|
@@ -277,15 +286,15 @@ var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
|
277
286
|
}
|
|
278
287
|
for (let r of K) {
|
|
279
288
|
let i = U(r);
|
|
280
|
-
i ? t.add(i.container) : !e && !W(r) &&
|
|
289
|
+
i ? t.add(i.container) : !e && !W(r) && Ke(n, r);
|
|
281
290
|
}
|
|
282
291
|
}
|
|
283
292
|
K.clear(), q.clear(), J.clear();
|
|
284
|
-
for (let e of t)
|
|
293
|
+
for (let e of t) We(e);
|
|
285
294
|
$();
|
|
286
|
-
},
|
|
295
|
+
}, Je = (e) => {
|
|
287
296
|
J.add(e), X();
|
|
288
|
-
},
|
|
297
|
+
}, Ye = (e) => (F.value = {}, He(e)), Xe = (e, t) => {
|
|
289
298
|
let n = e;
|
|
290
299
|
for (let e of t.split(/\.|\[(\d+)\]/).filter(Boolean)) {
|
|
291
300
|
if (!n || typeof n != "object" || !(e in n)) return !1;
|
|
@@ -293,31 +302,31 @@ var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
|
293
302
|
}
|
|
294
303
|
return !0;
|
|
295
304
|
}, Z = (...e) => {
|
|
296
|
-
|
|
297
|
-
for (let [e, t] of Object.entries(D))
|
|
305
|
+
we(...e), F.value = {}, A();
|
|
306
|
+
for (let [e, t] of Object.entries(D)) Xe(b, e) ? Object.assign(t, {
|
|
298
307
|
dirty: !1,
|
|
299
308
|
touched: !1
|
|
300
309
|
}) : delete D[e];
|
|
301
|
-
}, Q = pe("form-el"), $ =
|
|
310
|
+
}, Q = pe("form-el"), $ = i(() => _.id, {
|
|
302
311
|
state: () => ({
|
|
303
312
|
valid: y.value.valid,
|
|
304
313
|
dirty: y.value.dirty,
|
|
305
314
|
touched: y.value.touched,
|
|
306
315
|
pending: y.value.pending,
|
|
307
316
|
submitting: Ce.value,
|
|
308
|
-
submitCount:
|
|
317
|
+
submitCount: v.value,
|
|
309
318
|
values: { ...b },
|
|
310
|
-
errors:
|
|
319
|
+
errors: Ee.value,
|
|
311
320
|
fields: P.value,
|
|
312
|
-
unmatchedErrors:
|
|
321
|
+
unmatchedErrors: De.value
|
|
313
322
|
}),
|
|
314
323
|
actions: {
|
|
315
|
-
submit: () => void
|
|
324
|
+
submit: () => void Ye(),
|
|
316
325
|
reset: () => Z(),
|
|
317
|
-
snapshot:
|
|
326
|
+
snapshot: Me,
|
|
318
327
|
validate: async () => (await S()).valid,
|
|
319
|
-
setErrors:
|
|
320
|
-
removeField:
|
|
328
|
+
setErrors: Oe,
|
|
329
|
+
removeField: Je
|
|
321
330
|
}
|
|
322
331
|
});
|
|
323
332
|
return ve({ $el: Q }), (e, t) => (f(), l("form", {
|
|
@@ -325,20 +334,20 @@ var _e = ["id"], ve = /*@__PURE__*/ u({
|
|
|
325
334
|
ref: "form-el",
|
|
326
335
|
novalidate: "",
|
|
327
336
|
onReset: t[0] ||= he((e) => Z(), ["prevent"]),
|
|
328
|
-
onSubmit:
|
|
329
|
-
}, [de(e.$slots, "default",
|
|
330
|
-
errors:
|
|
337
|
+
onSubmit: Ye
|
|
338
|
+
}, [de(e.$slots, "default", le({
|
|
339
|
+
errors: Ee.value,
|
|
331
340
|
fields: P.value,
|
|
332
|
-
isSubmitting:
|
|
333
|
-
removeField:
|
|
341
|
+
isSubmitting: g(Ce),
|
|
342
|
+
removeField: Je,
|
|
334
343
|
resetForm: Z,
|
|
335
|
-
setErrors:
|
|
336
|
-
snapshot:
|
|
337
|
-
submitCount:
|
|
338
|
-
unmatchedErrors:
|
|
339
|
-
validate:
|
|
340
|
-
values:
|
|
341
|
-
},
|
|
344
|
+
setErrors: Oe,
|
|
345
|
+
snapshot: Me,
|
|
346
|
+
submitCount: g(v),
|
|
347
|
+
unmatchedErrors: De.value,
|
|
348
|
+
validate: g(S),
|
|
349
|
+
values: g(b)
|
|
350
|
+
}, g(y))), (f(!0), l(oe, null, ue(g(Te), (e) => (f(), se(g(re), {
|
|
342
351
|
key: e.key,
|
|
343
352
|
spec: e
|
|
344
353
|
}, null, 8, ["spec"]))), 128))], 40, _e));
|
|
@@ -23,7 +23,7 @@ var u = i({
|
|
|
23
23
|
for (let t of d?.fieldErrors(f()) ?? []) e.includes(t) || e.push(t);
|
|
24
24
|
return e;
|
|
25
25
|
});
|
|
26
|
-
c(y, (e) => u.errors = [...e], { immediate: !0 }), c(() => t(u.rules) || !!d?.isRequired(f()), (e) => u.required = e, { immediate: !0 }), u.bound = !0;
|
|
26
|
+
c(y, (e) => u.errors = [...e], { immediate: !0 }), c(() => t(u.rules) || !!d?.isRequired(f()), (e) => u.required = e, { immediate: !0 }), c(() => !!d?.locked(), (e) => u.locked = e, { immediate: !0 }), u.bound = !0;
|
|
27
27
|
let b;
|
|
28
28
|
return s(() => {
|
|
29
29
|
b = d?.register({
|
|
@@ -60,6 +60,11 @@ export type BbFormFieldsContext = {
|
|
|
60
60
|
model: () => Record<string, unknown> | undefined;
|
|
61
61
|
read: (path: string) => unknown;
|
|
62
62
|
write: (path: string, value: unknown) => void;
|
|
63
|
+
/**
|
|
64
|
+
* Q60.17 — a `@submit` promise is pending and the form locks while it
|
|
65
|
+
* runs (no `disable-submit-lock`): every joined control is read-only.
|
|
66
|
+
*/
|
|
67
|
+
locked: () => boolean;
|
|
63
68
|
};
|
|
64
69
|
export declare const BB_FORM_FIELDS: InjectionKey<BbFormFieldsContext>;
|
|
65
70
|
/**
|
|
@@ -38,7 +38,6 @@ declare const __VLS_base: import('vue').DefineComponent<BbNumberInputProps, {},
|
|
|
38
38
|
max: number;
|
|
39
39
|
autocomplete: string;
|
|
40
40
|
min: number;
|
|
41
|
-
maxPrecision: number;
|
|
42
41
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
43
42
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
44
43
|
declare const _default: typeof __VLS_export;
|