@stackcraftmx/calcita 0.47.0 → 0.51.0
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 +173 -12
- package/cli/calcita.js +15 -0
- package/cli/checkTexts.js +209 -0
- package/cli/packageVersions.js +6 -1
- package/cli/projectFiles.js +4 -2
- package/cli/templates/project/README.md.tpl +21 -1
- package/cli/templates/project/eslint.config.js.tpl +27 -0
- package/cli/templates/project/src/app/appTexts.js.tpl +2 -1
- package/cli/templates/project/src/core/publicPaths.js.tpl +10 -2
- package/cli/templates/project/vite.config.js.tpl +8 -1
- package/dist/DataTable/AuditTrailDialog.js +3 -2
- package/dist/DataTable/AuditTrailDialog.js.map +1 -1
- package/dist/DataTable/ColumnFilters/HeaderFilterPopover.js +3 -2
- package/dist/DataTable/ColumnFilters/HeaderFilterPopover.js.map +1 -1
- package/dist/DataTable/ColumnFilters/MultiSelectColumnFilter.js +3 -2
- package/dist/DataTable/ColumnFilters/MultiSelectColumnFilter.js.map +1 -1
- package/dist/DataTable/ColumnFilters/SortableFilterHeader.js +3 -2
- package/dist/DataTable/ColumnFilters/SortableFilterHeader.js.map +1 -1
- package/dist/DataTable/EmptyState.js +3 -2
- package/dist/DataTable/EmptyState.js.map +1 -1
- package/dist/DataTable/FilterChips.js +3 -2
- package/dist/DataTable/FilterChips.js.map +1 -1
- package/dist/DataTable/GoToPage.js +3 -2
- package/dist/DataTable/GoToPage.js.map +1 -1
- package/dist/DataTable/ServerTable.js +95 -28
- package/dist/DataTable/ServerTable.js.map +1 -1
- package/dist/DataTable/ServerTableFilterDrawer.js +8 -3
- package/dist/DataTable/ServerTableFilterDrawer.js.map +1 -1
- package/dist/DataTable/StackedCell.js +60 -0
- package/dist/DataTable/StackedCell.js.map +1 -0
- package/dist/DataTable/TableCardsView.js +88 -0
- package/dist/DataTable/TableCardsView.js.map +1 -0
- package/dist/DataTable/columnWidths.js +30 -0
- package/dist/DataTable/columnWidths.js.map +1 -0
- package/dist/DataTable/columns.js +47 -1
- package/dist/DataTable/columns.js.map +1 -1
- package/dist/DataTable/fixedColumns.js +24 -0
- package/dist/DataTable/fixedColumns.js.map +1 -0
- package/dist/DataTable/useTableView.js +29 -0
- package/dist/DataTable/useTableView.js.map +1 -0
- package/dist/access/PermissionMatrix.js +3 -2
- package/dist/access/PermissionMatrix.js.map +1 -1
- package/dist/account/AccountProvider.js +1 -1
- package/dist/account/AccountSecuritySection.js +3 -2
- package/dist/account/AccountSecuritySection.js.map +1 -1
- package/dist/account/DemoTotpCodeButton.js +3 -2
- package/dist/account/DemoTotpCodeButton.js.map +1 -1
- package/dist/account/ProfileScreen.js +3 -2
- package/dist/account/ProfileScreen.js.map +1 -1
- package/dist/account/SignInScreen.js +3 -2
- package/dist/account/SignInScreen.js.map +1 -1
- package/dist/appShell/AccountMenu.js +3 -2
- package/dist/appShell/AccountMenu.js.map +1 -1
- package/dist/appShell/AppLayout.js +3 -2
- package/dist/appShell/AppLayout.js.map +1 -1
- package/dist/appShell/AppearanceSettings.js +3 -2
- package/dist/appShell/AppearanceSettings.js.map +1 -1
- package/dist/appShell/AuthLayout.js +3 -2
- package/dist/appShell/AuthLayout.js.map +1 -1
- package/dist/appShell/BarActionButton.js +11 -4
- package/dist/appShell/BarActionButton.js.map +1 -1
- package/dist/appShell/BarActions.js +3 -2
- package/dist/appShell/BarActions.js.map +1 -1
- package/dist/appShell/BarCapsule.js +3 -2
- package/dist/appShell/BarCapsule.js.map +1 -1
- package/dist/appShell/BarSearch.js +3 -2
- package/dist/appShell/BarSearch.js.map +1 -1
- package/dist/appShell/HeaderTools.js +3 -2
- package/dist/appShell/HeaderTools.js.map +1 -1
- package/dist/appShell/MobileTabBar.js +3 -2
- package/dist/appShell/MobileTabBar.js.map +1 -1
- package/dist/appShell/SettingsMenu.js +3 -2
- package/dist/appShell/SettingsMenu.js.map +1 -1
- package/dist/appShell/SideMenu.js +3 -2
- package/dist/appShell/SideMenu.js.map +1 -1
- package/dist/appShell/SideMenuEntry.js +3 -2
- package/dist/appShell/SideMenuEntry.js.map +1 -1
- package/dist/appShell/SubmenuActionsMenu.js +3 -2
- package/dist/appShell/SubmenuActionsMenu.js.map +1 -1
- package/dist/appShell/TabBarEditor.js +3 -2
- package/dist/appShell/TabBarEditor.js.map +1 -1
- package/dist/appShell/TopMenu.js +3 -2
- package/dist/appShell/TopMenu.js.map +1 -1
- package/dist/appShell/Wordmark.js +3 -2
- package/dist/appShell/Wordmark.js.map +1 -1
- package/dist/auth/PasswordChecklist.js +3 -2
- package/dist/auth/PasswordChecklist.js.map +1 -1
- package/dist/calendar/EventCalendar.js +3 -2
- package/dist/calendar/EventCalendar.js.map +1 -1
- package/dist/calendar/EventDetails.js +3 -2
- package/dist/calendar/EventDetails.js.map +1 -1
- package/dist/datePickers/DateInput.js +28 -22
- package/dist/datePickers/DateInput.js.map +1 -1
- package/dist/datePickers/DateTimeInput.js +33 -27
- package/dist/datePickers/DateTimeInput.js.map +1 -1
- package/dist/datePickers/MonthInput.js +27 -21
- package/dist/datePickers/MonthInput.js.map +1 -1
- package/dist/datePickers/TimeInput.js +26 -20
- package/dist/datePickers/TimeInput.js.map +1 -1
- package/dist/datePickers/usePickerField.js +5 -4
- package/dist/datePickers/usePickerField.js.map +1 -1
- package/dist/downloads/DownloadManager.js +3 -2
- package/dist/downloads/DownloadManager.js.map +1 -1
- package/dist/feedback/ConfirmDialog.js +3 -2
- package/dist/feedback/ConfirmDialog.js.map +1 -1
- package/dist/feedback/ModalWaiting.js +3 -2
- package/dist/feedback/ModalWaiting.js.map +1 -1
- package/dist/feedback/NewBuildNotice.js +3 -2
- package/dist/feedback/NewBuildNotice.js.map +1 -1
- package/dist/filepond/FileDropzone.js +3 -2
- package/dist/filepond/FileDropzone.js.map +1 -1
- package/dist/forms/FormProblemAlert.js +3 -2
- package/dist/forms/FormProblemAlert.js.map +1 -1
- package/dist/forms/SubmitButton.js +7 -2
- package/dist/forms/SubmitButton.js.map +1 -1
- package/dist/forms/auth/SignInForm.js +3 -2
- package/dist/forms/auth/SignInForm.js.map +1 -1
- package/dist/forms/fieldRules.js +30 -0
- package/dist/forms/fieldRules.js.map +1 -0
- package/dist/forms/security/SecondStepForm.js +3 -2
- package/dist/forms/security/SecondStepForm.js.map +1 -1
- package/dist/forms/security/TwoStepVerificationCard.js +3 -2
- package/dist/forms/security/TwoStepVerificationCard.js.map +1 -1
- package/dist/forms/useValidationText.js +18 -0
- package/dist/forms/useValidationText.js.map +1 -0
- package/dist/forms/validation.js +35 -31
- package/dist/forms/validation.js.map +1 -1
- package/dist/forms/validationMessages.js +64 -7
- package/dist/forms/validationMessages.js.map +1 -1
- package/dist/forms.js +3 -0
- package/dist/forms.js.map +1 -1
- package/dist/hookForm/FormProblemAlert.js +3 -2
- package/dist/hookForm/FormProblemAlert.js.map +1 -1
- package/dist/hookForm/SubmitButton.js +7 -2
- package/dist/hookForm/SubmitButton.js.map +1 -1
- package/dist/inbox/InboxLayout.js +3 -2
- package/dist/inbox/InboxLayout.js.map +1 -1
- package/dist/inbox/MessageList.js +3 -2
- package/dist/inbox/MessageList.js.map +1 -1
- package/dist/inbox/MessageView.js +3 -2
- package/dist/inbox/MessageView.js.map +1 -1
- package/dist/index.js +186 -163
- package/dist/index.js.map +1 -1
- package/dist/inputs/CatalogInput.js +32 -25
- package/dist/inputs/CatalogInput.js.map +1 -1
- package/dist/inputs/CheckboxGroupInput.js +8 -5
- package/dist/inputs/CheckboxGroupInput.js.map +1 -1
- package/dist/inputs/ColorInput.js +7 -4
- package/dist/inputs/ColorInput.js.map +1 -1
- package/dist/inputs/FieldFrame.js +10 -4
- package/dist/inputs/FieldFrame.js.map +1 -1
- package/dist/inputs/FormSection.js +1 -1
- package/dist/inputs/MaskedInput.js +1 -0
- package/dist/inputs/MaskedInput.js.map +1 -1
- package/dist/inputs/NumberInput.js +29 -24
- package/dist/inputs/NumberInput.js.map +1 -1
- package/dist/inputs/RepeatingFields.js +8 -5
- package/dist/inputs/RepeatingFields.js.map +1 -1
- package/dist/inputs/SelectInput.js +8 -5
- package/dist/inputs/SelectInput.js.map +1 -1
- package/dist/inputs/TextInput.js +5 -3
- package/dist/inputs/TextInput.js.map +1 -1
- package/dist/inputs/TransferListInput.js +8 -5
- package/dist/inputs/TransferListInput.js.map +1 -1
- package/dist/inputs/WizardLayout.js +3 -2
- package/dist/inputs/WizardLayout.js.map +1 -1
- package/dist/kanban/KanbanBoard.js +3 -2
- package/dist/kanban/KanbanBoard.js.map +1 -1
- package/dist/legal/CookieNotice.js +3 -2
- package/dist/legal/CookieNotice.js.map +1 -1
- package/dist/legal/TermsAcceptanceDialog.js +3 -2
- package/dist/legal/TermsAcceptanceDialog.js.map +1 -1
- package/dist/locales/en.js +24 -0
- package/dist/locales/en.js.map +1 -1
- package/dist/locales/es.js +24 -0
- package/dist/locales/es.js.map +1 -1
- package/dist/maps/MapView.js +3 -2
- package/dist/maps/MapView.js.map +1 -1
- package/dist/mexico/CfdiSummary.js +3 -2
- package/dist/mexico/CfdiSummary.js.map +1 -1
- package/dist/mexico/EfirmaFields.js +3 -2
- package/dist/mexico/EfirmaFields.js.map +1 -1
- package/dist/mexico/mexicoIdentifiers.js +5 -0
- package/dist/mexico/mexicoIdentifiers.js.map +1 -1
- package/dist/mexico/mexicoRules.js +9 -4
- package/dist/mexico/mexicoRules.js.map +1 -1
- package/dist/mexico.js +4 -2
- package/dist/pwa/InstallAppSetting.js +3 -2
- package/dist/pwa/InstallAppSetting.js.map +1 -1
- package/dist/pwa/InstallInstructionsDialog.js +3 -2
- package/dist/pwa/InstallInstructionsDialog.js.map +1 -1
- package/dist/pwa/InstallPromptBanner.js +3 -2
- package/dist/pwa/InstallPromptBanner.js.map +1 -1
- package/dist/react-hook-form.js +3 -0
- package/dist/react-hook-form.js.map +1 -1
- package/dist/richText/RichTextEditor.js +7 -4
- package/dist/richText/RichTextEditor.js.map +1 -1
- package/dist/richText/RichTextView.js +3 -2
- package/dist/richText/RichTextView.js.map +1 -1
- package/dist/security/ActivityLog.js +3 -2
- package/dist/security/ActivityLog.js.map +1 -1
- package/dist/security/RecoveryCodesDialog.js +3 -2
- package/dist/security/RecoveryCodesDialog.js.map +1 -1
- package/dist/security/SessionsCard.js +3 -2
- package/dist/security/SessionsCard.js.map +1 -1
- package/dist/table.js +21 -2
- package/dist/table.js.map +1 -1
- package/dist/theme/themePieces.js +70 -4
- package/dist/theme/themePieces.js.map +1 -1
- package/dist/toolkit/ToolkitProvider.js +8 -1
- package/dist/toolkit/ToolkitProvider.js.map +1 -1
- package/dist/toolkit/browserNavigation.js +19 -4
- package/dist/toolkit/browserNavigation.js.map +1 -1
- package/dist/toolkit/combineTexts.js +32 -0
- package/dist/toolkit/combineTexts.js.map +1 -0
- package/dist/toolkit/hashNavigation.js +17 -3
- package/dist/toolkit/hashNavigation.js.map +1 -1
- package/dist/toolkit/navigationPaths.js +15 -0
- package/dist/toolkit/navigationPaths.js.map +1 -1
- package/dist/toolkit/pathIndex.js +66 -0
- package/dist/toolkit/pathIndex.js.map +1 -0
- package/dist/toolkit/toolkitSettings.js +19 -1
- package/dist/toolkit/toolkitSettings.js.map +1 -1
- package/dist/types/DataTable/AuditTrailDialog.d.ts +6 -17
- package/dist/types/DataTable/ColumnFilters/HeaderFilterPopover.d.ts +6 -5
- package/dist/types/DataTable/ColumnFilters/MultiSelectColumnFilter.d.ts +6 -9
- package/dist/types/DataTable/ColumnFilters/SortableFilterHeader.d.ts +6 -14
- package/dist/types/DataTable/EmptyState.d.ts +6 -9
- package/dist/types/DataTable/FilterChips.d.ts +6 -11
- package/dist/types/DataTable/GoToPage.d.ts +6 -9
- package/dist/types/DataTable/ServerTable.d.ts +16 -80
- package/dist/types/DataTable/ServerTableFilterDrawer.d.ts +6 -13
- package/dist/types/DataTable/StackedCell.d.ts +12 -0
- package/dist/types/DataTable/TableCardsView.d.ts +27 -0
- package/dist/types/DataTable/columnWidths.d.ts +21 -0
- package/dist/types/DataTable/columns.d.ts +111 -0
- package/dist/types/DataTable/fixedColumns.d.ts +29 -0
- package/dist/types/DataTable/index.d.ts +6 -1
- package/dist/types/DataTable/useTableView.d.ts +22 -0
- package/dist/types/access/PermissionMatrix.d.ts +6 -10
- package/dist/types/account/AccountSecuritySection.d.ts +6 -7
- package/dist/types/account/DemoTotpCodeButton.d.ts +6 -5
- package/dist/types/account/ProfileScreen.d.ts +6 -18
- package/dist/types/account/SignInScreen.d.ts +6 -13
- package/dist/types/appShell/AccountMenu.d.ts +6 -11
- package/dist/types/appShell/AppLayout.d.ts +3 -40
- package/dist/types/appShell/AppearanceSettings.d.ts +6 -12
- package/dist/types/appShell/AuthLayout.d.ts +3 -11
- package/dist/types/appShell/BarActionButton.d.ts +6 -10
- package/dist/types/appShell/BarActions.d.ts +6 -15
- package/dist/types/appShell/BarCapsule.d.ts +6 -9
- package/dist/types/appShell/BarSearch.d.ts +6 -15
- package/dist/types/appShell/HeaderTools.d.ts +6 -16
- package/dist/types/appShell/MobileTabBar.d.ts +6 -13
- package/dist/types/appShell/SettingsMenu.d.ts +6 -10
- package/dist/types/appShell/SideMenu.d.ts +6 -20
- package/dist/types/appShell/SideMenuEntry.d.ts +6 -11
- package/dist/types/appShell/SubmenuActionsMenu.d.ts +6 -12
- package/dist/types/appShell/TabBarEditor.d.ts +6 -9
- package/dist/types/appShell/TopMenu.d.ts +6 -5
- package/dist/types/appShell/Wordmark.d.ts +6 -7
- package/dist/types/auth/PasswordChecklist.d.ts +6 -9
- package/dist/types/calendar/EventCalendar.d.ts +6 -23
- package/dist/types/calendar/EventDetails.d.ts +6 -10
- package/dist/types/datePickers/DateInput.d.ts +7 -22
- package/dist/types/datePickers/DateTimeInput.d.ts +7 -27
- package/dist/types/datePickers/MonthInput.d.ts +7 -21
- package/dist/types/datePickers/TimeInput.d.ts +7 -21
- package/dist/types/datePickers/usePickerField.d.ts +5 -1
- package/dist/types/downloads/DownloadManager.d.ts +6 -6
- package/dist/types/feedback/ConfirmDialog.d.ts +6 -18
- package/dist/types/feedback/ModalWaiting.d.ts +6 -9
- package/dist/types/feedback/NewBuildNotice.d.ts +6 -10
- package/dist/types/filepond/FileDropzone.d.ts +6 -29
- package/dist/types/forms/FormProblemAlert.d.ts +6 -5
- package/dist/types/forms/SubmitButton.d.ts +6 -6
- package/dist/types/forms/auth/SignInForm.d.ts +6 -11
- package/dist/types/forms/fieldRules.d.ts +44 -0
- package/dist/types/forms/index.d.ts +1 -0
- package/dist/types/forms/security/SecondStepForm.d.ts +6 -14
- package/dist/types/forms/security/TwoStepVerificationCard.d.ts +6 -21
- package/dist/types/forms/useValidationText.d.ts +12 -0
- package/dist/types/forms/validation.d.ts +117 -174
- package/dist/types/forms/validationMessages.d.ts +54 -6
- package/dist/types/forms.d.ts +1 -1
- package/dist/types/hookForm/FormProblemAlert.d.ts +6 -5
- package/dist/types/hookForm/SubmitButton.d.ts +6 -13
- package/dist/types/inbox/InboxLayout.d.ts +6 -17
- package/dist/types/inbox/MessageList.d.ts +6 -18
- package/dist/types/inbox/MessageView.d.ts +6 -14
- package/dist/types/index.d.ts +8 -1
- package/dist/types/inputs/CatalogInput.d.ts +7 -24
- package/dist/types/inputs/CheckboxGroupInput.d.ts +7 -18
- package/dist/types/inputs/ColorInput.d.ts +7 -16
- package/dist/types/inputs/FieldFrame.d.ts +6 -10
- package/dist/types/inputs/MaskedInput.d.ts +3 -0
- package/dist/types/inputs/NumberInput.d.ts +7 -20
- package/dist/types/inputs/RepeatingFields.d.ts +7 -28
- package/dist/types/inputs/SelectInput.d.ts +7 -20
- package/dist/types/inputs/TextInput.d.ts +3 -0
- package/dist/types/inputs/TransferListInput.d.ts +7 -20
- package/dist/types/inputs/WizardLayout.d.ts +6 -19
- package/dist/types/kanban/KanbanBoard.d.ts +6 -25
- package/dist/types/legal/CookieNotice.d.ts +6 -16
- package/dist/types/legal/TermsAcceptanceDialog.d.ts +6 -18
- package/dist/types/locales/en.d.ts +24 -0
- package/dist/types/locales/es.d.ts +24 -0
- package/dist/types/maps/MapView.d.ts +6 -17
- package/dist/types/mexico/CfdiSummary.d.ts +6 -11
- package/dist/types/mexico/EfirmaFields.d.ts +6 -16
- package/dist/types/mexico/mexicoIdentifiers.d.ts +7 -0
- package/dist/types/mexico/mexicoRules.d.ts +19 -3
- package/dist/types/mexico.d.ts +2 -2
- package/dist/types/pwa/InstallAppSetting.d.ts +6 -6
- package/dist/types/pwa/InstallInstructionsDialog.d.ts +6 -9
- package/dist/types/pwa/InstallPromptBanner.d.ts +6 -11
- package/dist/types/react-hook-form.d.ts +1 -0
- package/dist/types/richText/RichTextEditor.d.ts +7 -22
- package/dist/types/richText/RichTextView.d.ts +6 -9
- package/dist/types/security/ActivityLog.d.ts +6 -9
- package/dist/types/security/RecoveryCodesDialog.d.ts +6 -11
- package/dist/types/security/SessionsCard.d.ts +6 -11
- package/dist/types/table.d.ts +3 -1
- package/dist/types/theme/themePieces.d.ts +55 -3
- package/dist/types/toolkit/ToolkitProvider.d.ts +13 -1
- package/dist/types/toolkit/browserNavigation.d.ts +7 -3
- package/dist/types/toolkit/combineTexts.d.ts +6 -0
- package/dist/types/toolkit/hashNavigation.d.ts +4 -2
- package/dist/types/toolkit/navigationPaths.d.ts +35 -0
- package/dist/types/toolkit/pathIndex.d.ts +27 -0
- package/dist/types/toolkit/toolkitSettings.d.ts +7 -4
- package/dist/types/ui/actions/ActionsMenu.d.ts +9 -11
- package/dist/types/ui/actions/CopyButton.d.ts +6 -12
- package/dist/types/ui/actions/DownloadMenu.d.ts +6 -29
- package/dist/types/ui/actions/SecretField.d.ts +6 -11
- package/dist/types/ui/actions/SelectionActions.d.ts +6 -13
- package/dist/types/ui/cards/RecordCard.d.ts +6 -31
- package/dist/types/ui/cards/RecordCardSkeleton.d.ts +6 -11
- package/dist/types/ui/countdown/Countdown.d.ts +6 -15
- package/dist/types/ui/documents/PdfViewerDialog.d.ts +6 -13
- package/dist/types/ui/filters/DateRangeFilter.d.ts +6 -10
- package/dist/types/ui/filters/FilterDrawer.d.ts +6 -17
- package/dist/types/ui/filters/PeriodRangeSelector.d.ts +6 -13
- package/dist/types/ui/filters/QuickFilters.d.ts +6 -12
- package/dist/types/ui/help/HelpButton.d.ts +6 -10
- package/dist/types/ui/help/HelpCarouselDialog.d.ts +6 -14
- package/dist/types/ui/labels/MarkedText.d.ts +10 -0
- package/dist/types/ui/labels/Tag.d.ts +6 -12
- package/dist/types/ui/labels/markedTextPieces.d.ts +22 -0
- package/dist/types/ui/layout/CollapsibleSection.d.ts +6 -12
- package/dist/types/ui/layout/ContentDialog.d.ts +6 -10
- package/dist/types/ui/layout/DefinitionList.d.ts +6 -9
- package/dist/types/ui/layout/DetailHeader.d.ts +6 -10
- package/dist/types/ui/layout/ErrorPage.d.ts +6 -17
- package/dist/types/ui/layout/FullPageLoader.d.ts +6 -6
- package/dist/types/ui/layout/GlassPanel.d.ts +6 -8
- package/dist/types/ui/layout/PageHeader.d.ts +6 -10
- package/dist/types/ui/layout/PageHeading.d.ts +6 -11
- package/dist/types/ui/layout/ProfileHeader.d.ts +6 -11
- package/dist/types/ui/layout/ScrollableRow.d.ts +6 -13
- package/dist/types/ui/layout/SectionCard.d.ts +6 -8
- package/dist/types/ui/metrics/BarList.d.ts +6 -12
- package/dist/types/ui/metrics/CalendarHeatmap.d.ts +6 -19
- package/dist/types/ui/metrics/ChartTooltip.d.ts +6 -6
- package/dist/types/ui/metrics/ColumnChart.d.ts +6 -25
- package/dist/types/ui/metrics/LineChart.d.ts +6 -20
- package/dist/types/ui/metrics/MetricCard.d.ts +6 -17
- package/dist/types/ui/metrics/TableToggle.d.ts +6 -6
- package/dist/types/ui/metrics/chartParts.d.ts +15 -30
- package/dist/types/ui/navigation/BackButton.d.ts +6 -9
- package/dist/types/ui/navigation/ColorSchemeToggle.d.ts +6 -9
- package/dist/types/ui/navigation/FontSizeToggle.d.ts +6 -8
- package/dist/types/ui/navigation/LanguageToggle.d.ts +6 -8
- package/dist/types/ui/navigation/PageBreadcrumbs.d.ts +6 -7
- package/dist/types/ui/navigation/RouteTabs.d.ts +7 -12
- package/dist/types/ui/timeline/GroupedTimeline.d.ts +6 -23
- package/dist/types/upload/AttachmentsInput.d.ts +11 -1
- package/dist/types/upload/FileDropzone.d.ts +6 -21
- package/dist/types/upload/FileInput.d.ts +7 -24
- package/dist/types/upload/FileUploadInput.d.ts +7 -31
- package/dist/types/upload/ImageInput.d.ts +7 -25
- package/dist/types/upload/TemplateDownloadButton.d.ts +6 -18
- package/dist/ui/actions/ActionsMenu.js +14 -5
- package/dist/ui/actions/ActionsMenu.js.map +1 -1
- package/dist/ui/actions/CopyButton.js +8 -3
- package/dist/ui/actions/CopyButton.js.map +1 -1
- package/dist/ui/actions/DownloadMenu.js +3 -2
- package/dist/ui/actions/DownloadMenu.js.map +1 -1
- package/dist/ui/actions/SecretField.js +8 -3
- package/dist/ui/actions/SecretField.js.map +1 -1
- package/dist/ui/actions/SelectionActions.js +3 -2
- package/dist/ui/actions/SelectionActions.js.map +1 -1
- package/dist/ui/cards/RecordCard.js +4 -3
- package/dist/ui/cards/RecordCard.js.map +1 -1
- package/dist/ui/cards/RecordCardSkeleton.js +8 -3
- package/dist/ui/cards/RecordCardSkeleton.js.map +1 -1
- package/dist/ui/countdown/Countdown.js +3 -2
- package/dist/ui/countdown/Countdown.js.map +1 -1
- package/dist/ui/documents/PdfViewerDialog.js +3 -2
- package/dist/ui/documents/PdfViewerDialog.js.map +1 -1
- package/dist/ui/filters/DateRangeFilter.js +3 -2
- package/dist/ui/filters/DateRangeFilter.js.map +1 -1
- package/dist/ui/filters/FilterDrawer.js +3 -2
- package/dist/ui/filters/FilterDrawer.js.map +1 -1
- package/dist/ui/filters/PeriodRangeSelector.js +3 -2
- package/dist/ui/filters/PeriodRangeSelector.js.map +1 -1
- package/dist/ui/filters/QuickFilters.js +3 -2
- package/dist/ui/filters/QuickFilters.js.map +1 -1
- package/dist/ui/help/HelpButton.js +8 -3
- package/dist/ui/help/HelpButton.js.map +1 -1
- package/dist/ui/help/HelpCarouselDialog.js +3 -2
- package/dist/ui/help/HelpCarouselDialog.js.map +1 -1
- package/dist/ui/labels/MarkedText.js +31 -0
- package/dist/ui/labels/MarkedText.js.map +1 -0
- package/dist/ui/labels/Tag.js +3 -2
- package/dist/ui/labels/Tag.js.map +1 -1
- package/dist/ui/labels/markedTextPieces.js +64 -0
- package/dist/ui/labels/markedTextPieces.js.map +1 -0
- package/dist/ui/layout/CollapsibleSection.js +3 -2
- package/dist/ui/layout/CollapsibleSection.js.map +1 -1
- package/dist/ui/layout/ContentDialog.js +3 -2
- package/dist/ui/layout/ContentDialog.js.map +1 -1
- package/dist/ui/layout/DefinitionList.js +3 -2
- package/dist/ui/layout/DefinitionList.js.map +1 -1
- package/dist/ui/layout/DetailHeader.js +3 -2
- package/dist/ui/layout/DetailHeader.js.map +1 -1
- package/dist/ui/layout/ErrorPage.js +3 -2
- package/dist/ui/layout/ErrorPage.js.map +1 -1
- package/dist/ui/layout/FullPageLoader.js +3 -2
- package/dist/ui/layout/FullPageLoader.js.map +1 -1
- package/dist/ui/layout/GlassPanel.js +3 -2
- package/dist/ui/layout/GlassPanel.js.map +1 -1
- package/dist/ui/layout/PageHeader.js +3 -2
- package/dist/ui/layout/PageHeader.js.map +1 -1
- package/dist/ui/layout/PageHeading.js +3 -2
- package/dist/ui/layout/PageHeading.js.map +1 -1
- package/dist/ui/layout/ProfileHeader.js +3 -2
- package/dist/ui/layout/ProfileHeader.js.map +1 -1
- package/dist/ui/layout/ScrollableRow.js +3 -2
- package/dist/ui/layout/ScrollableRow.js.map +1 -1
- package/dist/ui/layout/SectionCard.js +3 -2
- package/dist/ui/layout/SectionCard.js.map +1 -1
- package/dist/ui/metrics/BarList.js +3 -2
- package/dist/ui/metrics/BarList.js.map +1 -1
- package/dist/ui/metrics/CalendarHeatmap.js +3 -2
- package/dist/ui/metrics/CalendarHeatmap.js.map +1 -1
- package/dist/ui/metrics/ChartTooltip.js +3 -2
- package/dist/ui/metrics/ChartTooltip.js.map +1 -1
- package/dist/ui/metrics/ColumnChart.js +3 -2
- package/dist/ui/metrics/ColumnChart.js.map +1 -1
- package/dist/ui/metrics/LineChart.js +3 -2
- package/dist/ui/metrics/LineChart.js.map +1 -1
- package/dist/ui/metrics/MetricCard.js +3 -2
- package/dist/ui/metrics/MetricCard.js.map +1 -1
- package/dist/ui/metrics/TableToggle.js +3 -2
- package/dist/ui/metrics/TableToggle.js.map +1 -1
- package/dist/ui/metrics/chartParts.js +7 -4
- package/dist/ui/metrics/chartParts.js.map +1 -1
- package/dist/ui/navigation/BackButton.js +7 -2
- package/dist/ui/navigation/BackButton.js.map +1 -1
- package/dist/ui/navigation/ColorSchemeToggle.js +3 -2
- package/dist/ui/navigation/ColorSchemeToggle.js.map +1 -1
- package/dist/ui/navigation/FontSizeToggle.js +3 -2
- package/dist/ui/navigation/FontSizeToggle.js.map +1 -1
- package/dist/ui/navigation/LanguageToggle.js +3 -2
- package/dist/ui/navigation/LanguageToggle.js.map +1 -1
- package/dist/ui/navigation/PageBreadcrumbs.js +3 -2
- package/dist/ui/navigation/PageBreadcrumbs.js.map +1 -1
- package/dist/ui/navigation/RouteTabs.js +8 -4
- package/dist/ui/navigation/RouteTabs.js.map +1 -1
- package/dist/ui/timeline/GroupedTimeline.js +3 -2
- package/dist/ui/timeline/GroupedTimeline.js.map +1 -1
- package/dist/upload/AttachmentsInput.js +9 -6
- package/dist/upload/AttachmentsInput.js.map +1 -1
- package/dist/upload/FileChip.js +2 -1
- package/dist/upload/FileChip.js.map +1 -1
- package/dist/upload/FileDropzone.js +5 -4
- package/dist/upload/FileDropzone.js.map +1 -1
- package/dist/upload/FileInput.js +9 -6
- package/dist/upload/FileInput.js.map +1 -1
- package/dist/upload/FileUploadInput.js +9 -6
- package/dist/upload/FileUploadInput.js.map +1 -1
- package/dist/upload/ImageInput.js +8 -5
- package/dist/upload/ImageInput.js.map +1 -1
- package/dist/upload/TemplateDownloadButton.js +3 -2
- package/dist/upload/TemplateDownloadButton.js.map +1 -1
- package/package.json +1 -1
- package/cli/templates/project/src/app/combineTexts.js.tpl +0 -31
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
* @param {{children: import('react').ReactNode, disabled?: boolean, isPending?: boolean} & Omit<import('@mui/material/Button').ButtonProps, 'type'|'children'>} props
|
|
3
|
-
* lo demás va al Button de MUI (sx, size, fullWidth…)
|
|
4
|
-
*/
|
|
5
|
-
export default function SubmitButton({ children, disabled, isPending, ...buttonProps }: {
|
|
1
|
+
declare const SubmitButton: (props: {
|
|
6
2
|
children: import('react').ReactNode;
|
|
7
3
|
disabled?: boolean;
|
|
8
4
|
isPending?: boolean;
|
|
9
|
-
} & Omit<import(
|
|
5
|
+
} & Omit<import("@mui/material/Button").ButtonProps<"button", {}>, "children" | "type"> & {
|
|
6
|
+
slots?: Record<string, import('react').ElementType>;
|
|
7
|
+
slotProps?: Record<string, object | ((partProps: object) => object)>;
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
9
|
+
export default SubmitButton;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @param {object} props
|
|
3
|
-
* @param {(values: {email: string, password: string, remember: boolean}) => Promise<unknown>} props.onSubmit entra; si
|
|
4
|
-
* el servidor dice que no, truena con su problema
|
|
5
|
-
* @param {string} [props.forgotPasswordPath] sin ella no sale la liga de «¿Olvidó su contraseña?»
|
|
6
|
-
* @param {boolean} [props.showRememberMe] por omisión sí
|
|
7
|
-
* @param {string} [props.initialEmail]
|
|
8
|
-
* @param {object} [props.texts] los textos que cambian, con la forma de `auth` en los textos del paquete
|
|
9
|
-
*/
|
|
10
|
-
export default function SignInForm(props: {
|
|
1
|
+
declare const SignInForm: (props: {
|
|
11
2
|
onSubmit: (values: {
|
|
12
3
|
email: string;
|
|
13
4
|
password: string;
|
|
@@ -17,4 +8,8 @@ export default function SignInForm(props: {
|
|
|
17
8
|
showRememberMe?: boolean;
|
|
18
9
|
initialEmail?: string;
|
|
19
10
|
texts?: object;
|
|
20
|
-
}
|
|
11
|
+
} & {
|
|
12
|
+
slots?: Record<string, import('react').ElementType>;
|
|
13
|
+
slotProps?: Record<string, object | ((partProps: object) => object)>;
|
|
14
|
+
}) => import("react").JSX.Element;
|
|
15
|
+
export default SignInForm;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Igual a otro campo del mismo formulario (o del mismo renglón de una lista): la confirmación de una contraseña, de una CLABE
|
|
3
|
+
* o de un correo.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} otherField el campo con el que se compara, en el mismo objeto ('password')
|
|
6
|
+
* @param {object} [options]
|
|
7
|
+
* @param {string} [options.otherLabel] cómo se llama ese campo en el mensaje («Debe ser igual a la contraseña»); sin él,
|
|
8
|
+
* «No coincide»
|
|
9
|
+
* @returns {{name: string, message: {key: string, values: object, rule: string}, test: (value: unknown, context: {parent?: object}) => boolean}}
|
|
10
|
+
*/
|
|
11
|
+
export declare function sameAsFieldRule(otherField: string, { otherLabel }?: {
|
|
12
|
+
otherLabel?: string;
|
|
13
|
+
}): {
|
|
14
|
+
name: string;
|
|
15
|
+
message: {
|
|
16
|
+
key: string;
|
|
17
|
+
values: object;
|
|
18
|
+
rule: string;
|
|
19
|
+
};
|
|
20
|
+
test: (value: unknown, context: {
|
|
21
|
+
parent?: object;
|
|
22
|
+
}) => boolean;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Un porcentaje: un número entre min y max (por omisión 0 y 100), con decimales. Acepta el texto que deja NumberInput
|
|
26
|
+
* ('12.5') o un número.
|
|
27
|
+
*
|
|
28
|
+
* @param {object} [options]
|
|
29
|
+
* @param {number} [options.min] por omisión 0
|
|
30
|
+
* @param {number} [options.max] por omisión 100
|
|
31
|
+
* @returns {{name: string, message: {key: string, values: object, rule: string}, test: (value: unknown) => boolean}}
|
|
32
|
+
*/
|
|
33
|
+
export declare function percentRule({ min, max }?: {
|
|
34
|
+
min?: number;
|
|
35
|
+
max?: number;
|
|
36
|
+
}): {
|
|
37
|
+
name: string;
|
|
38
|
+
message: {
|
|
39
|
+
key: string;
|
|
40
|
+
values: object;
|
|
41
|
+
rule: string;
|
|
42
|
+
};
|
|
43
|
+
test: (value: unknown) => boolean;
|
|
44
|
+
};
|
|
@@ -11,6 +11,7 @@ export { default as FormProblemAlert } from './FormProblemAlert.js';
|
|
|
11
11
|
export { default as FormRepeatingFields } from './FormRepeatingFields.js';
|
|
12
12
|
export { default as FormTransferListField } from './FormTransferListField.js';
|
|
13
13
|
export { listTotalAtMostRule, listTotalOf, orderedInListRule, uniqueInListRule } from './listRules.js';
|
|
14
|
+
export { percentRule, sameAsFieldRule } from './fieldRules.js';
|
|
14
15
|
export { default as FormSelectField } from './FormSelectField.js';
|
|
15
16
|
export { default as FormServerProblem } from './FormServerProblem.js';
|
|
16
17
|
export { default as FormTextField } from './FormTextField.js';
|
|
@@ -4,19 +4,7 @@ export declare const SECOND_STEP_METHOD: Readonly<{
|
|
|
4
4
|
totp: "totp";
|
|
5
5
|
recoveryCode: "recoveryCode";
|
|
6
6
|
}>;
|
|
7
|
-
|
|
8
|
-
* @param {object} props
|
|
9
|
-
* @param {string[]} props.methods los que tiene la cuenta (SECOND_STEP_METHOD), como los mandó el servidor
|
|
10
|
-
* @param {boolean} [props.canUsePasskeys] passkeysSupported() de /passkeys
|
|
11
|
-
* @param {() => Promise<unknown>} [props.onUsePasskey] firma con la llave y termina de entrar; truena si no se pudo
|
|
12
|
-
* @param {(input: {method: string, code: string}) => Promise<unknown>} props.onSubmitCode manda el código ya limpio y
|
|
13
|
-
* termina de entrar; truena con el ApiError si no
|
|
14
|
-
* @param {(message: string|null) => void} props.onCancel regresa a escribir la contraseña (con el motivo, si lo hay)
|
|
15
|
-
* @param {import('react').ReactNode} [props.footer] abajo del botón, dentro del formulario: puede llenar el código con
|
|
16
|
-
* useFormikContext (p. ej. el atajo de los ejemplos)
|
|
17
|
-
* @param {object} [props.texts] los textos que cambian, con la forma de `security` en los textos del paquete
|
|
18
|
-
*/
|
|
19
|
-
export default function SecondStepForm(props: {
|
|
7
|
+
declare const SecondStepForm: (props: {
|
|
20
8
|
methods: string[];
|
|
21
9
|
canUsePasskeys?: boolean;
|
|
22
10
|
onUsePasskey?: () => Promise<unknown>;
|
|
@@ -27,4 +15,8 @@ export default function SecondStepForm(props: {
|
|
|
27
15
|
onCancel: (message: string | null) => void;
|
|
28
16
|
footer?: import('react').ReactNode;
|
|
29
17
|
texts?: object;
|
|
30
|
-
}
|
|
18
|
+
} & {
|
|
19
|
+
slots?: Record<string, import('react').ElementType>;
|
|
20
|
+
slotProps?: Record<string, object | ((partProps: object) => object)>;
|
|
21
|
+
}) => import("react").JSX.Element;
|
|
22
|
+
export default SecondStepForm;
|
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @param {object} props
|
|
3
|
-
* @param {{isEnabled: boolean, enabledAt?: string|null, passkeys: Array<{id: string, name: string, createdAt: string, lastUsedAt?: string|null}>, totp: {isEnabled: boolean, enabledAt?: string|null}, recoveryCodesRemaining: number}} props.security
|
|
4
|
-
* @param {(security: {isEnabled: boolean, enabledAt?: string|null, passkeys: Array<{id: string, name: string, createdAt: string, lastUsedAt?: string|null}>, totp: {isEnabled: boolean, enabledAt?: string|null}, recoveryCodesRemaining: number}) => void} props.onSecurityChange
|
|
5
|
-
* @param {object} props.actions lo que hace el proyecto en cada caso; cada una regresa {security, recoveryCodes?}
|
|
6
|
-
* @param {(name: string) => Promise<{security: object, recoveryCodes?: string[]}>} props.actions.addPasskey crea la llave
|
|
7
|
-
* (createPasskey) y la guarda en el servidor
|
|
8
|
-
* @param {(passkey: {id: string, name: string}, password: string) => Promise<{security: object}>} props.actions.removePasskey
|
|
9
|
-
* @param {() => Promise<{secret: string, qrImageUrl: string, extra?: import('react').ReactNode}>} props.actions.startTotp
|
|
10
|
-
* la clave y su QR; extra va abajo del campo (p. ej. un atajo de los ejemplos)
|
|
11
|
-
* @param {(code: string) => Promise<{security: object, recoveryCodes?: string[]}>} props.actions.confirmTotp
|
|
12
|
-
* @param {(password: string) => Promise<{security: object}>} props.actions.disableTotp
|
|
13
|
-
* @param {(password: string) => Promise<{security: object, recoveryCodes: string[]}>} props.actions.regenerateRecoveryCodes
|
|
14
|
-
* @param {boolean} [props.canUsePasskeys] passkeysSupported() de /passkeys; sin él no se ofrece agregar llaves
|
|
15
|
-
* @param {string} [props.account] la cuenta (el correo), para el archivo de los códigos
|
|
16
|
-
* @param {import('react').ReactNode} [props.passkeyNotice] un aviso en el diálogo de crear la llave, antes de que el
|
|
17
|
-
* navegador la guarde (p. ej. el de la demostración: la llave queda de verdad en el llavero de la persona)
|
|
18
|
-
* @param {object} [props.texts] los textos que cambian, con la forma de `security` en los textos del paquete
|
|
19
|
-
*/
|
|
20
|
-
export default function TwoStepVerificationCard(props: {
|
|
1
|
+
declare const TwoStepVerificationCard: (props: {
|
|
21
2
|
security: {
|
|
22
3
|
isEnabled: boolean;
|
|
23
4
|
enabledAt?: string | null;
|
|
@@ -80,4 +61,8 @@ export default function TwoStepVerificationCard(props: {
|
|
|
80
61
|
account?: string;
|
|
81
62
|
passkeyNotice?: import('react').ReactNode;
|
|
82
63
|
texts?: object;
|
|
83
|
-
}
|
|
64
|
+
} & {
|
|
65
|
+
slots?: Record<string, import('react').ElementType>;
|
|
66
|
+
slotProps?: Record<string, object | ((partProps: object) => object)>;
|
|
67
|
+
}) => import("react").JSX.Element;
|
|
68
|
+
export default TwoStepVerificationCard;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {object} [options]
|
|
3
|
+
* @param {string} [options.name] el name del campo: para su texto propio (validation:fields.<campo>.<regla>)
|
|
4
|
+
* @param {string} [options.label] el nombre del campo, para los textos que lo dicen ({{label}})
|
|
5
|
+
* @param {Record<string, string|object>} [options.messages] los textos de la pantalla para este campo, por regla
|
|
6
|
+
* @returns {(error: unknown) => string|undefined}
|
|
7
|
+
*/
|
|
8
|
+
export declare function useValidationText({ name, label, messages }?: {
|
|
9
|
+
name?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
messages?: Record<string, string | object>;
|
|
12
|
+
}): (error: unknown) => string | undefined;
|
|
@@ -1,245 +1,188 @@
|
|
|
1
1
|
import * as Yup from 'yup';
|
|
2
|
-
/** El locale de yup: cada mensaje por defecto es una llave del namespace validation. */
|
|
2
|
+
/** El locale de yup: cada mensaje por defecto es una llave del namespace validation, con su regla y su campo. */
|
|
3
3
|
export declare const YUP_LOCALE: Readonly<{
|
|
4
4
|
mixed: {
|
|
5
|
-
default: {
|
|
5
|
+
default: (params?: object) => {
|
|
6
6
|
key: string;
|
|
7
|
-
values
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
values: any;
|
|
7
|
+
values: object;
|
|
8
|
+
rule: string;
|
|
9
|
+
path?: string;
|
|
11
10
|
};
|
|
12
|
-
required: {
|
|
13
|
-
key: string;
|
|
14
|
-
values?: undefined;
|
|
15
|
-
} | {
|
|
11
|
+
required: (params?: object) => {
|
|
16
12
|
key: string;
|
|
17
|
-
values:
|
|
13
|
+
values: object;
|
|
14
|
+
rule: string;
|
|
15
|
+
path?: string;
|
|
18
16
|
};
|
|
19
|
-
defined: {
|
|
17
|
+
defined: (params?: object) => {
|
|
20
18
|
key: string;
|
|
21
|
-
values
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
values: any;
|
|
19
|
+
values: object;
|
|
20
|
+
rule: string;
|
|
21
|
+
path?: string;
|
|
25
22
|
};
|
|
26
|
-
notNull: {
|
|
27
|
-
key: string;
|
|
28
|
-
values?: undefined;
|
|
29
|
-
} | {
|
|
23
|
+
notNull: (params?: object) => {
|
|
30
24
|
key: string;
|
|
31
|
-
values:
|
|
25
|
+
values: object;
|
|
26
|
+
rule: string;
|
|
27
|
+
path?: string;
|
|
32
28
|
};
|
|
33
|
-
notType: {
|
|
29
|
+
notType: (params?: object) => {
|
|
34
30
|
key: string;
|
|
35
|
-
values
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
values: any;
|
|
31
|
+
values: object;
|
|
32
|
+
rule: string;
|
|
33
|
+
path?: string;
|
|
39
34
|
};
|
|
40
|
-
oneOf: (
|
|
41
|
-
values: any;
|
|
42
|
-
}) => {
|
|
43
|
-
key: string;
|
|
44
|
-
values?: undefined;
|
|
45
|
-
} | {
|
|
35
|
+
oneOf: (params?: object) => {
|
|
46
36
|
key: string;
|
|
47
|
-
values:
|
|
37
|
+
values: object;
|
|
38
|
+
rule: string;
|
|
39
|
+
path?: string;
|
|
48
40
|
};
|
|
49
|
-
notOneOf: (
|
|
50
|
-
values: any;
|
|
51
|
-
}) => {
|
|
41
|
+
notOneOf: (params?: object) => {
|
|
52
42
|
key: string;
|
|
53
|
-
values
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
values: any;
|
|
43
|
+
values: object;
|
|
44
|
+
rule: string;
|
|
45
|
+
path?: string;
|
|
57
46
|
};
|
|
58
47
|
};
|
|
59
48
|
string: {
|
|
60
|
-
length: (
|
|
61
|
-
length: any;
|
|
62
|
-
}) => {
|
|
63
|
-
key: string;
|
|
64
|
-
values?: undefined;
|
|
65
|
-
} | {
|
|
49
|
+
length: (params?: object) => {
|
|
66
50
|
key: string;
|
|
67
|
-
values:
|
|
51
|
+
values: object;
|
|
52
|
+
rule: string;
|
|
53
|
+
path?: string;
|
|
68
54
|
};
|
|
69
|
-
min: (
|
|
70
|
-
min: any;
|
|
71
|
-
}) => {
|
|
55
|
+
min: (params?: object) => {
|
|
72
56
|
key: string;
|
|
73
|
-
values
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
values: any;
|
|
57
|
+
values: object;
|
|
58
|
+
rule: string;
|
|
59
|
+
path?: string;
|
|
77
60
|
};
|
|
78
|
-
max: (
|
|
79
|
-
max: any;
|
|
80
|
-
}) => {
|
|
81
|
-
key: string;
|
|
82
|
-
values?: undefined;
|
|
83
|
-
} | {
|
|
61
|
+
max: (params?: object) => {
|
|
84
62
|
key: string;
|
|
85
|
-
values:
|
|
63
|
+
values: object;
|
|
64
|
+
rule: string;
|
|
65
|
+
path?: string;
|
|
86
66
|
};
|
|
87
|
-
matches: {
|
|
67
|
+
matches: (params?: object) => {
|
|
88
68
|
key: string;
|
|
89
|
-
values
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
values: any;
|
|
69
|
+
values: object;
|
|
70
|
+
rule: string;
|
|
71
|
+
path?: string;
|
|
93
72
|
};
|
|
94
|
-
email: {
|
|
95
|
-
key: string;
|
|
96
|
-
values?: undefined;
|
|
97
|
-
} | {
|
|
73
|
+
email: (params?: object) => {
|
|
98
74
|
key: string;
|
|
99
|
-
values:
|
|
75
|
+
values: object;
|
|
76
|
+
rule: string;
|
|
77
|
+
path?: string;
|
|
100
78
|
};
|
|
101
|
-
url: {
|
|
79
|
+
url: (params?: object) => {
|
|
102
80
|
key: string;
|
|
103
|
-
values
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
values: any;
|
|
81
|
+
values: object;
|
|
82
|
+
rule: string;
|
|
83
|
+
path?: string;
|
|
107
84
|
};
|
|
108
|
-
uuid: {
|
|
109
|
-
key: string;
|
|
110
|
-
values?: undefined;
|
|
111
|
-
} | {
|
|
85
|
+
uuid: (params?: object) => {
|
|
112
86
|
key: string;
|
|
113
|
-
values:
|
|
87
|
+
values: object;
|
|
88
|
+
rule: string;
|
|
89
|
+
path?: string;
|
|
114
90
|
};
|
|
115
|
-
trim: {
|
|
116
|
-
key: string;
|
|
117
|
-
values?: undefined;
|
|
118
|
-
} | {
|
|
91
|
+
trim: (params?: object) => {
|
|
119
92
|
key: string;
|
|
120
|
-
values:
|
|
93
|
+
values: object;
|
|
94
|
+
rule: string;
|
|
95
|
+
path?: string;
|
|
121
96
|
};
|
|
122
|
-
lowercase: {
|
|
97
|
+
lowercase: (params?: object) => {
|
|
123
98
|
key: string;
|
|
124
|
-
values
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
values: any;
|
|
99
|
+
values: object;
|
|
100
|
+
rule: string;
|
|
101
|
+
path?: string;
|
|
128
102
|
};
|
|
129
|
-
uppercase: {
|
|
130
|
-
key: string;
|
|
131
|
-
values?: undefined;
|
|
132
|
-
} | {
|
|
103
|
+
uppercase: (params?: object) => {
|
|
133
104
|
key: string;
|
|
134
|
-
values:
|
|
105
|
+
values: object;
|
|
106
|
+
rule: string;
|
|
107
|
+
path?: string;
|
|
135
108
|
};
|
|
136
109
|
};
|
|
137
110
|
number: {
|
|
138
|
-
min: (
|
|
139
|
-
min: any;
|
|
140
|
-
}) => {
|
|
111
|
+
min: (params?: object) => {
|
|
141
112
|
key: string;
|
|
142
|
-
values
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
values: any;
|
|
113
|
+
values: object;
|
|
114
|
+
rule: string;
|
|
115
|
+
path?: string;
|
|
146
116
|
};
|
|
147
|
-
max: (
|
|
148
|
-
max: any;
|
|
149
|
-
}) => {
|
|
150
|
-
key: string;
|
|
151
|
-
values?: undefined;
|
|
152
|
-
} | {
|
|
117
|
+
max: (params?: object) => {
|
|
153
118
|
key: string;
|
|
154
|
-
values:
|
|
119
|
+
values: object;
|
|
120
|
+
rule: string;
|
|
121
|
+
path?: string;
|
|
155
122
|
};
|
|
156
|
-
lessThan: (
|
|
157
|
-
less: any;
|
|
158
|
-
}) => {
|
|
123
|
+
lessThan: (params?: object) => {
|
|
159
124
|
key: string;
|
|
160
|
-
values
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
values: any;
|
|
125
|
+
values: object;
|
|
126
|
+
rule: string;
|
|
127
|
+
path?: string;
|
|
164
128
|
};
|
|
165
|
-
moreThan: (
|
|
166
|
-
more: any;
|
|
167
|
-
}) => {
|
|
168
|
-
key: string;
|
|
169
|
-
values?: undefined;
|
|
170
|
-
} | {
|
|
129
|
+
moreThan: (params?: object) => {
|
|
171
130
|
key: string;
|
|
172
|
-
values:
|
|
131
|
+
values: object;
|
|
132
|
+
rule: string;
|
|
133
|
+
path?: string;
|
|
173
134
|
};
|
|
174
|
-
positive: {
|
|
175
|
-
key: string;
|
|
176
|
-
values?: undefined;
|
|
177
|
-
} | {
|
|
135
|
+
positive: (params?: object) => {
|
|
178
136
|
key: string;
|
|
179
|
-
values:
|
|
137
|
+
values: object;
|
|
138
|
+
rule: string;
|
|
139
|
+
path?: string;
|
|
180
140
|
};
|
|
181
|
-
negative: {
|
|
141
|
+
negative: (params?: object) => {
|
|
182
142
|
key: string;
|
|
183
|
-
values
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
values: any;
|
|
143
|
+
values: object;
|
|
144
|
+
rule: string;
|
|
145
|
+
path?: string;
|
|
187
146
|
};
|
|
188
|
-
integer: {
|
|
189
|
-
key: string;
|
|
190
|
-
values?: undefined;
|
|
191
|
-
} | {
|
|
147
|
+
integer: (params?: object) => {
|
|
192
148
|
key: string;
|
|
193
|
-
values:
|
|
149
|
+
values: object;
|
|
150
|
+
rule: string;
|
|
151
|
+
path?: string;
|
|
194
152
|
};
|
|
195
153
|
};
|
|
196
154
|
date: {
|
|
197
|
-
min: (
|
|
198
|
-
min: any;
|
|
199
|
-
}) => {
|
|
155
|
+
min: (params?: object) => {
|
|
200
156
|
key: string;
|
|
201
|
-
values
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
values: any;
|
|
157
|
+
values: object;
|
|
158
|
+
rule: string;
|
|
159
|
+
path?: string;
|
|
205
160
|
};
|
|
206
|
-
max: (
|
|
207
|
-
max: any;
|
|
208
|
-
}) => {
|
|
209
|
-
key: string;
|
|
210
|
-
values?: undefined;
|
|
211
|
-
} | {
|
|
161
|
+
max: (params?: object) => {
|
|
212
162
|
key: string;
|
|
213
|
-
values:
|
|
163
|
+
values: object;
|
|
164
|
+
rule: string;
|
|
165
|
+
path?: string;
|
|
214
166
|
};
|
|
215
167
|
};
|
|
216
168
|
array: {
|
|
217
|
-
min: (
|
|
218
|
-
min: any;
|
|
219
|
-
}) => {
|
|
169
|
+
min: (params?: object) => {
|
|
220
170
|
key: string;
|
|
221
|
-
values
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
values: any;
|
|
171
|
+
values: object;
|
|
172
|
+
rule: string;
|
|
173
|
+
path?: string;
|
|
225
174
|
};
|
|
226
|
-
max: (
|
|
227
|
-
max: any;
|
|
228
|
-
}) => {
|
|
229
|
-
key: string;
|
|
230
|
-
values?: undefined;
|
|
231
|
-
} | {
|
|
175
|
+
max: (params?: object) => {
|
|
232
176
|
key: string;
|
|
233
|
-
values:
|
|
177
|
+
values: object;
|
|
178
|
+
rule: string;
|
|
179
|
+
path?: string;
|
|
234
180
|
};
|
|
235
|
-
length: (
|
|
236
|
-
length: any;
|
|
237
|
-
}) => {
|
|
238
|
-
key: string;
|
|
239
|
-
values?: undefined;
|
|
240
|
-
} | {
|
|
181
|
+
length: (params?: object) => {
|
|
241
182
|
key: string;
|
|
242
|
-
values:
|
|
183
|
+
values: object;
|
|
184
|
+
rule: string;
|
|
185
|
+
path?: string;
|
|
243
186
|
};
|
|
244
187
|
};
|
|
245
188
|
}>;
|
|
@@ -1,12 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* El campo sin índices de lista, para buscar su texto propio: 'contacts[2].email' y 'contacts.2.email' son 'contacts.email'.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} path
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
export declare function fieldKeyOf(path: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Un mensaje en la forma de Calcita, venga como venga.
|
|
10
|
+
*
|
|
11
|
+
* @param {unknown} error
|
|
12
|
+
* @returns {{text: string}|{key: string, values: object, rule?: string, path?: string}|null} null: no se entendió
|
|
13
|
+
*/
|
|
14
|
+
export declare function normalizedValidationMessage(error: unknown): {
|
|
15
|
+
text: string;
|
|
16
|
+
} | {
|
|
17
|
+
key: string;
|
|
18
|
+
values: object;
|
|
19
|
+
rule?: string;
|
|
20
|
+
path?: string;
|
|
21
|
+
} | null;
|
|
1
22
|
/**
|
|
2
23
|
* Texto de un error de validación en el idioma activo.
|
|
3
|
-
* Acepta las dos formas que llegan: {key, values} de yup (buildYupLocale), o un texto ya traducido (los del backend).
|
|
4
24
|
*
|
|
5
|
-
* @param {(key: string, values?: object) => string} translate el t de useToolkitTranslation
|
|
6
|
-
*
|
|
25
|
+
* @param {(key: string, values?: object) => string} translate el t de useToolkitTranslation (respeta `defaultValue`, como el
|
|
26
|
+
* de i18next: con él busca los textos opcionales sin avisar que faltan)
|
|
27
|
+
* @param {unknown} error lo que dejó la validación en el campo
|
|
28
|
+
* @param {object} [options]
|
|
29
|
+
* @param {string} [options.label] el nombre del campo, para los textos que lo dicen ({{label}}: «Escriba {{label}}»)
|
|
30
|
+
* @param {Record<string, string|object>} [options.messages] los textos de la pantalla para este campo, por regla
|
|
31
|
+
* ({required: 'Escriba el RFC', matches: 'El RFC lleva 12 o 13 caracteres'}); ya traducidos o como {key, values}
|
|
32
|
+
* @param {((error: unknown) => unknown)|null} [options.readMessage] cómo leer el mensaje de un sistema que ya existe
|
|
33
|
+
* (readValidationMessage de ToolkitProvider): regresa un texto, {key, values} o undefined para la lectura de siempre
|
|
34
|
+
* @param {string} [options.fieldName] el name del campo que pinta el error: para el texto propio de ese campo cuando el
|
|
35
|
+
* mensaje no trae su campo (las reglas propias, los de un sistema que ya existe)
|
|
7
36
|
* @returns {string|undefined}
|
|
8
37
|
*/
|
|
9
|
-
export declare function translateValidationMessage(translate: (key: string, values?: object) => string, error:
|
|
38
|
+
export declare function translateValidationMessage(translate: (key: string, values?: object) => string, error: unknown, { label, messages, readMessage, fieldName }?: {
|
|
39
|
+
label?: string;
|
|
40
|
+
messages?: Record<string, string | object>;
|
|
41
|
+
readMessage?: ((error: unknown) => unknown) | null;
|
|
42
|
+
fieldName?: string;
|
|
43
|
+
}): string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* El mensaje de una regla propia (.test) como lo dejan las de Calcita: su llave, sus valores y el nombre de la regla, para
|
|
46
|
+
* que la pantalla (messages del campo) o los textos del proyecto (validation:fields.<campo>.<regla>) pongan el suyo sin
|
|
47
|
+
* tocar el esquema. Es un objeto fijo: quien lo lea (rule.message.key) lo encuentra como siempre.
|
|
48
|
+
*
|
|
49
|
+
* {name: 'percent', message: ruleMessageOf('validation:percent', 'percent', {min: 0, max: 100}), test: …}
|
|
50
|
+
*
|
|
51
|
+
* @param {string} key la llave del texto ('validation:percent')
|
|
52
|
+
* @param {string} rule el nombre de la regla
|
|
53
|
+
* @param {object} [values] los valores del texto
|
|
54
|
+
* @returns {{key: string, values: object, rule: string}}
|
|
55
|
+
*/
|
|
56
|
+
export declare function ruleMessageOf(key: string, rule: string, values?: object): {
|
|
10
57
|
key: string;
|
|
11
|
-
values
|
|
12
|
-
|
|
58
|
+
values: object;
|
|
59
|
+
rule: string;
|
|
60
|
+
};
|
package/dist/types/forms.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { FieldArray, Form, Formik, useField, useFormikContext } from 'formik';
|
|
2
|
-
export { ChangePasswordForm, ForgotPasswordForm, FormAttachmentsField, FormCatalogField, FormCheckboxGroupField, FormColorField, FormFileField, FormFileUploadField, FormImageField, FormMaskedField, FormNumberField, FormProblemAlert, FormRepeatingFields, FormSelectField, FormServerProblem, FormTransferListField, FormTextField, FormWizard, RECOVERY_CODE_PATTERN, SECOND_STEP_METHOD, SecondStepForm, SignInForm, SubmitButton, TOTP_CODE_PATTERN, TwoStepVerificationCard, Yup, applyServerProblem, buildYupLocale, formLevelMessageOf, normalizeRecoveryCode, normalizeTotpCode, listTotalAtMostRule, listTotalOf, orderedInListRule, splitRowFieldErrors, splitServerFieldErrors, translateValidationMessage, uniqueInListRule, useFormikField, } from './forms/index.js';
|
|
2
|
+
export { ChangePasswordForm, ForgotPasswordForm, FormAttachmentsField, FormCatalogField, FormCheckboxGroupField, FormColorField, FormFileField, FormFileUploadField, FormImageField, FormMaskedField, FormNumberField, FormProblemAlert, FormRepeatingFields, FormSelectField, FormServerProblem, FormTransferListField, FormTextField, FormWizard, RECOVERY_CODE_PATTERN, SECOND_STEP_METHOD, SecondStepForm, SignInForm, SubmitButton, TOTP_CODE_PATTERN, TwoStepVerificationCard, Yup, applyServerProblem, buildYupLocale, formLevelMessageOf, normalizeRecoveryCode, normalizeTotpCode, listTotalAtMostRule, listTotalOf, orderedInListRule, percentRule, sameAsFieldRule, splitRowFieldErrors, splitServerFieldErrors, translateValidationMessage, uniqueInListRule, useFormikField, } from './forms/index.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
* @param {{control?: object, sx?: object}} props control: el de useForm, si la pantalla no usa FormProvider
|
|
3
|
-
*/
|
|
4
|
-
export default function FormProblemAlert({ control, sx, ...unknownProps }: {
|
|
1
|
+
declare const FormProblemAlert: (props: {
|
|
5
2
|
control?: object;
|
|
6
3
|
sx?: object;
|
|
7
|
-
}
|
|
4
|
+
} & {
|
|
5
|
+
slots?: Record<string, import('react').ElementType>;
|
|
6
|
+
slotProps?: Record<string, object | ((partProps: object) => object)>;
|
|
7
|
+
}) => import("react").JSX.Element | null;
|
|
8
|
+
export default FormProblemAlert;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @param {object} props
|
|
3
|
-
* @param {import('react').ReactNode} props.children
|
|
4
|
-
* @param {boolean} [props.disabled]
|
|
5
|
-
* @param {boolean} [props.isPending] cuando el envío lo lleva una máquina de estados y no el handleSubmit
|
|
6
|
-
* @param {object} [props.control] el de useForm, si la pantalla no usa FormProvider
|
|
7
|
-
* @param {object} [props.sx] (y lo demás del Button de MUI: size, fullWidth, startIcon…)
|
|
8
|
-
* @param {'small'|'medium'|'large'} [props.size]
|
|
9
|
-
* @param {boolean} [props.fullWidth]
|
|
10
|
-
* @param {import('react').ReactNode} [props.startIcon]
|
|
11
|
-
*/
|
|
12
|
-
export default function SubmitButton({ children, disabled, isPending, control, ...buttonProps }: {
|
|
1
|
+
declare const SubmitButton: (props: {
|
|
13
2
|
children: import('react').ReactNode;
|
|
14
3
|
disabled?: boolean;
|
|
15
4
|
isPending?: boolean;
|
|
@@ -18,4 +7,8 @@ export default function SubmitButton({ children, disabled, isPending, control, .
|
|
|
18
7
|
size?: 'small' | 'medium' | 'large';
|
|
19
8
|
fullWidth?: boolean;
|
|
20
9
|
startIcon?: import('react').ReactNode;
|
|
21
|
-
}
|
|
10
|
+
} & {
|
|
11
|
+
slots?: Record<string, import('react').ElementType>;
|
|
12
|
+
slotProps?: Record<string, object | ((partProps: object) => object)>;
|
|
13
|
+
}) => import("react").JSX.Element;
|
|
14
|
+
export default SubmitButton;
|