@stackcraftmx/calcita 0.23.0 → 0.26.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 +127 -22
- package/cli/projectFiles.js +5 -3
- package/cli/templates/project/README.md.tpl +28 -0
- package/cli/templates/project/public/manifest.webmanifest.tpl +6 -6
- package/cli/templates/project/src/app/AppProviders.jsx.tpl +9 -4
- package/cli/templates/project/src/app/appRouter.jsx.tpl +4 -2
- package/cli/templates/project/src/app/appSettings.js.tpl +14 -0
- package/cli/templates/project/src/core/AppLogo.jsx.tpl +3 -1
- package/cli/templates/project/src/core/index.js.tpl +1 -0
- package/cli/templates/project/src/core/publicPaths.js.tpl +24 -0
- package/cli/templates/project/vite.config.js.tpl +27 -1
- package/dist/DataTable/AuditTrailTable.js +5 -3
- package/dist/DataTable/AuditTrailTable.js.map +1 -1
- package/dist/DataTable/ColumnFilters/MultiSelectColumnFilter.js +2 -1
- package/dist/DataTable/ColumnFilters/MultiSelectColumnFilter.js.map +1 -1
- package/dist/DataTable/EmptyState.js +2 -2
- package/dist/DataTable/EmptyState.js.map +1 -1
- package/dist/DataTable/FilterChips.js +2 -2
- package/dist/DataTable/FilterChips.js.map +1 -1
- package/dist/DataTable/GoToPage.js +4 -3
- package/dist/DataTable/GoToPage.js.map +1 -1
- package/dist/DataTable/ServerTable.js +153 -83
- package/dist/DataTable/ServerTable.js.map +1 -1
- package/dist/DataTable/rowSelection.js +61 -0
- package/dist/DataTable/rowSelection.js.map +1 -0
- package/dist/access/PermissionMatrix.js +3 -2
- package/dist/access/PermissionMatrix.js.map +1 -1
- package/dist/account/AccountSecuritySection.js +2 -2
- package/dist/account/AccountSecuritySection.js.map +1 -1
- package/dist/account/ForgotPasswordScreen.js +5 -4
- package/dist/account/ForgotPasswordScreen.js.map +1 -1
- package/dist/account/ProfileScreen.js +39 -13
- package/dist/account/ProfileScreen.js.map +1 -1
- package/dist/account/ResetPasswordScreen.js +3 -2
- package/dist/account/ResetPasswordScreen.js.map +1 -1
- package/dist/account/SignInScreen.js +7 -6
- package/dist/account/SignInScreen.js.map +1 -1
- package/dist/account/accountConnector.js.map +1 -1
- package/dist/account/restAccountConnector.js +2 -1
- package/dist/account/restAccountConnector.js.map +1 -1
- package/dist/adapters/reactRouterRoutes.js +7 -6
- package/dist/adapters/reactRouterRoutes.js.map +1 -1
- package/dist/api/createApiClient.js +40 -5
- package/dist/api/createApiClient.js.map +1 -1
- package/dist/appShell/AccountMenu.js +15 -23
- package/dist/appShell/AccountMenu.js.map +1 -1
- package/dist/appShell/AppLayout.js +42 -15
- package/dist/appShell/AppLayout.js.map +1 -1
- package/dist/appShell/AppearanceSettings.js +29 -6
- package/dist/appShell/AppearanceSettings.js.map +1 -1
- package/dist/appShell/AuthLayout.js +2 -0
- package/dist/appShell/AuthLayout.js.map +1 -1
- package/dist/appShell/BarActionButton.js +3 -3
- package/dist/appShell/BarActionButton.js.map +1 -1
- package/dist/appShell/BarActions.js +19 -8
- package/dist/appShell/BarActions.js.map +1 -1
- package/dist/appShell/BarCapsule.js +19 -4
- package/dist/appShell/BarCapsule.js.map +1 -1
- package/dist/appShell/BarSearch.js +92 -0
- package/dist/appShell/BarSearch.js.map +1 -0
- package/dist/appShell/HeaderTools.js +4 -2
- package/dist/appShell/HeaderTools.js.map +1 -1
- package/dist/appShell/MenuLinks.js +36 -0
- package/dist/appShell/MenuLinks.js.map +1 -0
- package/dist/appShell/MobileTabBar.js +6 -4
- package/dist/appShell/MobileTabBar.js.map +1 -1
- package/dist/appShell/SettingsMenu.js +10 -5
- package/dist/appShell/SettingsMenu.js.map +1 -1
- package/dist/appShell/SideMenu.js +5 -3
- package/dist/appShell/SideMenu.js.map +1 -1
- package/dist/appShell/SideMenuEntry.js +3 -3
- package/dist/appShell/SideMenuEntry.js.map +1 -1
- package/dist/appShell/SubmenuActionsMenu.js +3 -4
- package/dist/appShell/SubmenuActionsMenu.js.map +1 -1
- package/dist/appShell/TopMenu.js +5 -6
- package/dist/appShell/TopMenu.js.map +1 -1
- package/dist/appShell/Wordmark.js +11 -0
- package/dist/appShell/Wordmark.js.map +1 -0
- package/dist/appShell/menuItemText.js +4 -0
- package/dist/appShell/menuItemText.js.map +1 -1
- package/dist/appShell/shellSizes.js +2 -0
- package/dist/appShell/shellSizes.js.map +1 -1
- package/dist/auth/PasswordChecklist.js +2 -2
- package/dist/auth/PasswordChecklist.js.map +1 -1
- package/dist/calendar/EventCalendar.js +16 -5
- package/dist/calendar/EventCalendar.js.map +1 -1
- package/dist/calendar/EventDetails.js +74 -0
- package/dist/calendar/EventDetails.js.map +1 -0
- package/dist/calendar/calendarEvents.js +31 -0
- package/dist/calendar/calendarEvents.js.map +1 -0
- package/dist/calendar.js +8 -1
- package/dist/calendar.js.map +1 -1
- package/dist/charts.js +10 -1
- package/dist/charts.js.map +1 -1
- package/dist/datePickers/DateInput.js +3 -2
- package/dist/datePickers/DateInput.js.map +1 -1
- package/dist/downloads/DownloadManager.js +14 -20
- package/dist/downloads/DownloadManager.js.map +1 -1
- package/dist/downloads/downloadQueue.js +4 -2
- package/dist/downloads/downloadQueue.js.map +1 -1
- package/dist/downloads/downloadsMachine.js +4 -1
- package/dist/downloads/downloadsMachine.js.map +1 -1
- package/dist/downloads/fileTypes.js +22 -0
- package/dist/downloads/fileTypes.js.map +1 -0
- package/dist/feedback/ConfirmDialog.js +3 -2
- package/dist/feedback/ConfirmDialog.js.map +1 -1
- package/dist/feedback/ModalWaiting.js +2 -2
- package/dist/feedback/ModalWaiting.js.map +1 -1
- package/dist/feedback/NewBuildNotice.js +2 -2
- package/dist/feedback/NewBuildNotice.js.map +1 -1
- package/dist/filepond/FileDropzone.js +5 -3
- package/dist/filepond/FileDropzone.js.map +1 -1
- package/dist/formatting.js +171 -143
- package/dist/formatting.js.map +1 -1
- package/dist/forms/FormWizard.js +18 -45
- package/dist/forms/FormWizard.js.map +1 -1
- package/dist/forms/auth/ChangePasswordForm.js +5 -4
- package/dist/forms/auth/ChangePasswordForm.js.map +1 -1
- package/dist/forms/auth/ForgotPasswordForm.js +2 -2
- package/dist/forms/auth/ForgotPasswordForm.js.map +1 -1
- package/dist/forms/auth/SignInForm.js +2 -2
- package/dist/forms/auth/SignInForm.js.map +1 -1
- package/dist/forms/security/SecondStepForm.js +2 -2
- package/dist/forms/security/SecondStepForm.js.map +1 -1
- package/dist/forms/security/TwoStepVerificationCard.js +8 -6
- package/dist/forms/security/TwoStepVerificationCard.js.map +1 -1
- package/dist/hookForm/FormWizard.js +59 -0
- package/dist/hookForm/FormWizard.js.map +1 -0
- package/dist/inbox/InboxLayout.js +44 -8
- package/dist/inbox/InboxLayout.js.map +1 -1
- package/dist/inbox/MessageList.js +71 -21
- package/dist/inbox/MessageList.js.map +1 -1
- package/dist/inbox/MessageView.js +80 -29
- package/dist/inbox/MessageView.js.map +1 -1
- package/dist/inbox/inboxDates.js +4 -3
- package/dist/inbox/inboxDates.js.map +1 -1
- package/dist/index.js +163 -136
- package/dist/index.js.map +1 -1
- package/dist/inputs/CatalogInput.js +8 -4
- package/dist/inputs/CatalogInput.js.map +1 -1
- package/dist/inputs/ColorInput.js +3 -2
- package/dist/inputs/ColorInput.js.map +1 -1
- package/dist/inputs/FormSection.js +3 -3
- package/dist/inputs/FormSection.js.map +1 -1
- package/dist/inputs/NumberInput.js +3 -2
- package/dist/inputs/NumberInput.js.map +1 -1
- package/dist/inputs/SelectInput.js +29 -11
- package/dist/inputs/SelectInput.js.map +1 -1
- package/dist/inputs/TextInput.js +6 -2
- package/dist/inputs/TextInput.js.map +1 -1
- package/dist/inputs/WizardLayout.js +54 -0
- package/dist/inputs/WizardLayout.js.map +1 -0
- package/dist/kanban/KanbanBoard.js +239 -14
- package/dist/kanban/KanbanBoard.js.map +1 -1
- package/dist/kanban/kanbanCards.js +19 -0
- package/dist/kanban/kanbanCards.js.map +1 -0
- package/dist/kanban.js +7 -1
- package/dist/kanban.js.map +1 -1
- package/dist/locales/en.js +74 -1
- package/dist/locales/en.js.map +1 -1
- package/dist/locales/es.js +74 -1
- package/dist/locales/es.js.map +1 -1
- package/dist/maps/MapView.js +28 -8
- package/dist/maps/MapView.js.map +1 -1
- package/dist/navigation/appMenu.js +13 -1
- package/dist/navigation/appMenu.js.map +1 -1
- package/dist/observability/logger.js +18 -0
- package/dist/observability/logger.js.map +1 -1
- package/dist/observability/usePublishedBuildWatch.js +4 -3
- package/dist/observability/usePublishedBuildWatch.js.map +1 -1
- package/dist/pwa/InstallAppSetting.js +6 -5
- package/dist/pwa/InstallAppSetting.js.map +1 -1
- package/dist/pwa/InstallInstructionsDialog.js +2 -2
- package/dist/pwa/InstallInstructionsDialog.js.map +1 -1
- package/dist/pwa/InstallPromptBanner.js +15 -9
- package/dist/pwa/InstallPromptBanner.js.map +1 -1
- package/dist/pwa/useInstallPrompt.js +2 -1
- package/dist/pwa/useInstallPrompt.js.map +1 -1
- package/dist/react-hook-form.js +6 -4
- package/dist/react-hook-form.js.map +1 -1
- package/dist/security/ActivityLog.js +4 -3
- package/dist/security/ActivityLog.js.map +1 -1
- package/dist/security/RecoveryCodesDialog.js +4 -3
- package/dist/security/RecoveryCodesDialog.js.map +1 -1
- package/dist/security/SessionsCard.js +8 -6
- package/dist/security/SessionsCard.js.map +1 -1
- package/dist/table.js +2 -0
- package/dist/table.js.map +1 -1
- package/dist/theme/components/MuiAppBar.js +6 -5
- package/dist/theme/components/MuiAppBar.js.map +1 -1
- package/dist/theme/components/MuiDialog.js +13 -0
- package/dist/theme/components/MuiDialog.js.map +1 -0
- package/dist/theme/components/glassComponents.js +32 -31
- package/dist/theme/components/glassComponents.js.map +1 -1
- package/dist/theme/components/minimalComponents.js +8 -4
- package/dist/theme/components/minimalComponents.js.map +1 -1
- package/dist/theme/createToolkitTheme.js.map +1 -1
- package/dist/theme/glassSurface.js +36 -38
- package/dist/theme/glassSurface.js.map +1 -1
- package/dist/theme/lightDarkStyles.js +48 -0
- package/dist/theme/lightDarkStyles.js.map +1 -0
- package/dist/theme/toolkitComponents.js +2 -0
- package/dist/theme/toolkitComponents.js.map +1 -1
- package/dist/toolkit/ComponentTexts.js +13 -0
- package/dist/toolkit/ComponentTexts.js.map +1 -0
- package/dist/toolkit/ToolkitProvider.js +36 -28
- package/dist/toolkit/ToolkitProvider.js.map +1 -1
- package/dist/toolkit/browserNavigation.js +19 -20
- package/dist/toolkit/browserNavigation.js.map +1 -1
- package/dist/toolkit/componentTextsContext.js +15 -0
- package/dist/toolkit/componentTextsContext.js.map +1 -0
- package/dist/toolkit/hashNavigation.js +40 -0
- package/dist/toolkit/hashNavigation.js.map +1 -0
- package/dist/toolkit/navigationPaths.js +49 -0
- package/dist/toolkit/navigationPaths.js.map +1 -0
- package/dist/toolkit/toolkitSettings.js +24 -4
- package/dist/toolkit/toolkitSettings.js.map +1 -1
- package/dist/toolkit/useFormatters.js +12 -0
- package/dist/toolkit/useFormatters.js.map +1 -0
- package/dist/toolkit/useToolkitTranslation.js +11 -7
- package/dist/toolkit/useToolkitTranslation.js.map +1 -1
- package/dist/types/DataTable/AuditTrailTable.d.ts +3 -1
- package/dist/types/DataTable/EmptyState.d.ts +7 -2
- package/dist/types/DataTable/FilterChips.d.ts +3 -1
- package/dist/types/DataTable/GoToPage.d.ts +7 -2
- package/dist/types/DataTable/SelectionBar.d.ts +32 -0
- package/dist/types/DataTable/ServerTable.d.ts +64 -3
- package/dist/types/DataTable/index.d.ts +1 -1
- package/dist/types/DataTable/rowSelection.d.ts +113 -0
- package/dist/types/access/PermissionMatrix.d.ts +3 -1
- package/dist/types/account/AccountSecuritySection.d.ts +3 -1
- package/dist/types/account/ForgotPasswordScreen.d.ts +3 -1
- package/dist/types/account/ProfileScreen.d.ts +31 -1
- package/dist/types/account/ResetPasswordScreen.d.ts +3 -1
- package/dist/types/account/SignInScreen.d.ts +3 -1
- package/dist/types/account/accountConnector.d.ts +7 -2
- package/dist/types/adapters/reactRouterRoutes.d.ts +14 -2
- package/dist/types/api/createApiClient.d.ts +46 -1
- package/dist/types/appShell/AppLayout.d.ts +15 -1
- package/dist/types/appShell/AppearanceSettings.d.ts +8 -1
- package/dist/types/appShell/BarActionButton.d.ts +2 -2
- package/dist/types/appShell/BarActions.d.ts +6 -1
- package/dist/types/appShell/BarCapsule.d.ts +8 -0
- package/dist/types/appShell/BarSearch.d.ts +24 -0
- package/dist/types/appShell/MenuLinks.d.ts +17 -0
- package/dist/types/appShell/MobileTabBar.d.ts +4 -1
- package/dist/types/appShell/SettingsMenu.d.ts +3 -1
- package/dist/types/appShell/SideMenu.d.ts +3 -1
- package/dist/types/appShell/Wordmark.d.ts +6 -0
- package/dist/types/appShell/menuItemText.d.ts +16 -0
- package/dist/types/appShell/shellSizes.d.ts +1 -0
- package/dist/types/auth/PasswordChecklist.d.ts +3 -1
- package/dist/types/calendar/EventCalendar.d.ts +18 -1
- package/dist/types/calendar/EventDetails.d.ts +36 -0
- package/dist/types/calendar/calendarEvents.d.ts +27 -0
- package/dist/types/calendar.d.ts +2 -0
- package/dist/types/charts.d.ts +4 -0
- package/dist/types/datePickers/DateInput.d.ts +3 -1
- package/dist/types/downloads/DownloadManager.d.ts +7 -1
- package/dist/types/downloads/downloadQueue.d.ts +8 -3
- package/dist/types/downloads/fileTypes.d.ts +39 -0
- package/dist/types/downloads/index.d.ts +1 -0
- package/dist/types/feedback/ConfirmDialog.d.ts +3 -1
- package/dist/types/feedback/ModalWaiting.d.ts +7 -2
- package/dist/types/feedback/NewBuildNotice.d.ts +3 -1
- package/dist/types/filepond/FileDropzone.d.ts +3 -1
- package/dist/types/formatting.d.ts +45 -90
- package/dist/types/forms/FormWizard.d.ts +3 -1
- package/dist/types/forms/auth/ChangePasswordForm.d.ts +3 -1
- package/dist/types/forms/auth/ForgotPasswordForm.d.ts +3 -1
- package/dist/types/forms/auth/SignInForm.d.ts +3 -1
- package/dist/types/forms/security/SecondStepForm.d.ts +3 -1
- package/dist/types/forms/security/TwoStepVerificationCard.d.ts +3 -1
- package/dist/types/hookForm/FormWizard.d.ts +22 -0
- package/dist/types/inbox/InboxLayout.d.ts +14 -2
- package/dist/types/inbox/MessageList.d.ts +30 -5
- package/dist/types/inbox/MessageView.d.ts +35 -3
- package/dist/types/inbox/inboxDates.d.ts +6 -1
- package/dist/types/index.d.ts +15 -8
- package/dist/types/inputs/CatalogInput.d.ts +9 -5
- package/dist/types/inputs/ColorInput.d.ts +3 -1
- package/dist/types/inputs/FormSection.d.ts +2 -2
- package/dist/types/inputs/NumberInput.d.ts +3 -1
- package/dist/types/inputs/SelectInput.d.ts +9 -5
- package/dist/types/inputs/TextInput.d.ts +3 -1
- package/dist/types/inputs/WizardLayout.d.ts +34 -0
- package/dist/types/kanban/KanbanBoard.d.ts +61 -6
- package/dist/types/kanban/kanbanCards.d.ts +22 -0
- package/dist/types/kanban.d.ts +1 -0
- package/dist/types/locales/en.d.ts +77 -0
- package/dist/types/locales/es.d.ts +77 -0
- package/dist/types/maps/MapView.d.ts +12 -3
- package/dist/types/navigation/appMenu.d.ts +8 -0
- package/dist/types/observability/logger.d.ts +13 -0
- package/dist/types/observability/usePublishedBuildWatch.d.ts +3 -1
- package/dist/types/pwa/InstallAppSetting.d.ts +7 -1
- package/dist/types/pwa/InstallInstructionsDialog.d.ts +3 -1
- package/dist/types/pwa/InstallPromptBanner.d.ts +10 -1
- package/dist/types/pwa/useInstallPrompt.d.ts +3 -2
- package/dist/types/react-hook-form.d.ts +1 -0
- package/dist/types/security/ActivityLog.d.ts +3 -1
- package/dist/types/security/RecoveryCodesDialog.d.ts +6 -1
- package/dist/types/security/SessionsCard.d.ts +3 -1
- package/dist/types/table.d.ts +3 -1
- package/dist/types/theme/components/MuiAppBar.d.ts +3 -1
- package/dist/types/theme/components/MuiDialog.d.ts +9 -0
- package/dist/types/theme/components/glassComponents.d.ts +5 -0
- package/dist/types/theme/lightDarkStyles.d.ts +8 -0
- package/dist/types/toolkit/ComponentTexts.d.ts +11 -0
- package/dist/types/toolkit/ToolkitProvider.d.ts +18 -2
- package/dist/types/toolkit/browserNavigation.d.ts +23 -28
- package/dist/types/toolkit/componentTextsContext.d.ts +20 -0
- package/dist/types/toolkit/hashNavigation.d.ts +12 -0
- package/dist/types/toolkit/navigationPaths.d.ts +43 -0
- package/dist/types/toolkit/toolkitSettings.d.ts +49 -4
- package/dist/types/toolkit/useFormatters.d.ts +6 -0
- package/dist/types/toolkit/useToolkitTranslation.d.ts +2 -1
- package/dist/types/ui/actions/ActionsMenu.d.ts +20 -0
- package/dist/types/ui/actions/CopyButton.d.ts +3 -1
- package/dist/types/ui/actions/DownloadMenu.d.ts +8 -3
- package/dist/types/ui/actions/SecretField.d.ts +5 -1
- package/dist/types/ui/actions/SelectionActions.d.ts +39 -0
- package/dist/types/ui/filters/DateRangeFilter.d.ts +3 -1
- package/dist/types/ui/filters/QuickFilters.d.ts +3 -1
- package/dist/types/ui/index.d.ts +1 -1
- package/dist/types/ui/labels/tagOf.d.ts +13 -0
- package/dist/types/ui/layout/CollapsibleSection.d.ts +4 -1
- package/dist/types/ui/layout/ContentDialog.d.ts +3 -1
- package/dist/types/ui/layout/ErrorPage.d.ts +14 -1
- package/dist/types/ui/layout/FullPageLoader.d.ts +7 -1
- package/dist/types/ui/layout/PageHeading.d.ts +3 -1
- package/dist/types/ui/metrics/BarList.d.ts +7 -1
- package/dist/types/ui/metrics/CalendarHeatmap.d.ts +7 -1
- package/dist/types/ui/metrics/ChartTooltip.d.ts +9 -3
- package/dist/types/ui/metrics/ColumnChart.d.ts +23 -11
- package/dist/types/ui/metrics/LineChart.d.ts +41 -0
- package/dist/types/ui/metrics/MetricCard.d.ts +9 -1
- package/dist/types/ui/metrics/TableToggle.d.ts +9 -2
- package/dist/types/ui/metrics/chartParts.d.ts +112 -0
- package/dist/types/ui/navigation/BackButton.d.ts +3 -1
- package/dist/types/ui/navigation/ColorSchemeToggle.d.ts +8 -2
- package/dist/types/ui/navigation/FontSizeToggle.d.ts +7 -2
- package/dist/types/ui/navigation/LanguageToggle.d.ts +8 -3
- package/dist/types/ui/navigation/PageBreadcrumbs.d.ts +5 -2
- package/dist/types/ui/timeline/GroupedTimeline.d.ts +4 -1
- package/dist/types/upload/FileDropzone.d.ts +3 -1
- package/dist/ui/actions/ActionsMenu.js +51 -0
- package/dist/ui/actions/ActionsMenu.js.map +1 -0
- package/dist/ui/actions/CopyButton.js +2 -2
- package/dist/ui/actions/CopyButton.js.map +1 -1
- package/dist/ui/actions/DownloadMenu.js +11 -12
- package/dist/ui/actions/DownloadMenu.js.map +1 -1
- package/dist/ui/actions/SecretField.js +8 -4
- package/dist/ui/actions/SecretField.js.map +1 -1
- package/dist/ui/actions/SelectionActions.js +142 -0
- package/dist/ui/actions/SelectionActions.js.map +1 -0
- package/dist/ui/filters/DateRangeFilter.js +4 -3
- package/dist/ui/filters/DateRangeFilter.js.map +1 -1
- package/dist/ui/filters/QuickFilters.js +2 -2
- package/dist/ui/filters/QuickFilters.js.map +1 -1
- package/dist/ui/labels/tagOf.js +7 -0
- package/dist/ui/labels/tagOf.js.map +1 -0
- package/dist/ui/layout/CollapsibleSection.js +6 -2
- package/dist/ui/layout/CollapsibleSection.js.map +1 -1
- package/dist/ui/layout/ContentDialog.js +2 -2
- package/dist/ui/layout/ContentDialog.js.map +1 -1
- package/dist/ui/layout/ErrorPage.js +21 -7
- package/dist/ui/layout/ErrorPage.js.map +1 -1
- package/dist/ui/layout/FullPageLoader.js +2 -2
- package/dist/ui/layout/FullPageLoader.js.map +1 -1
- package/dist/ui/layout/PageHeading.js +2 -2
- package/dist/ui/layout/PageHeading.js.map +1 -1
- package/dist/ui/metrics/BarList.js +18 -13
- package/dist/ui/metrics/BarList.js.map +1 -1
- package/dist/ui/metrics/CalendarHeatmap.js +11 -6
- package/dist/ui/metrics/CalendarHeatmap.js.map +1 -1
- package/dist/ui/metrics/ChartTooltip.js +1 -1
- package/dist/ui/metrics/ChartTooltip.js.map +1 -1
- package/dist/ui/metrics/ColumnChart.js +59 -63
- package/dist/ui/metrics/ColumnChart.js.map +1 -1
- package/dist/ui/metrics/LineChart.js +117 -0
- package/dist/ui/metrics/LineChart.js.map +1 -0
- package/dist/ui/metrics/MetricCard.js +41 -8
- package/dist/ui/metrics/MetricCard.js.map +1 -1
- package/dist/ui/metrics/TableToggle.js +4 -2
- package/dist/ui/metrics/TableToggle.js.map +1 -1
- package/dist/ui/metrics/chartParts.js +93 -0
- package/dist/ui/metrics/chartParts.js.map +1 -0
- package/dist/ui/navigation/BackButton.js +2 -2
- package/dist/ui/navigation/BackButton.js.map +1 -1
- package/dist/ui/navigation/ColorSchemeToggle.js +6 -3
- 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 +40 -19
- package/dist/ui/navigation/LanguageToggle.js.map +1 -1
- package/dist/ui/navigation/PageBreadcrumbs.js +2 -2
- package/dist/ui/navigation/PageBreadcrumbs.js.map +1 -1
- package/dist/ui/timeline/GroupedTimeline.js +10 -8
- package/dist/ui/timeline/GroupedTimeline.js.map +1 -1
- package/dist/upload/FileDropzone.js +5 -3
- package/dist/upload/FileDropzone.js.map +1 -1
- package/package.json +16 -7
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* El prefijo limpio: '' sin prefijo; si no, empieza con / y no termina con / ('portal/' → '/portal').
|
|
3
|
+
*
|
|
4
|
+
* @param {string|null|undefined} basePath
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
export declare function normalizedBasePath(basePath: string | null | undefined): string;
|
|
8
|
+
/**
|
|
9
|
+
* La dirección real de una ruta de la app con el prefijo puesto: '/pedidos' → '/portal/pedidos'. Lo que no es ruta de la
|
|
10
|
+
* app se queda como viene.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} basePath
|
|
13
|
+
* @param {string} destination
|
|
14
|
+
* @returns {string}
|
|
15
|
+
*/
|
|
16
|
+
export declare function pathWithBase(basePath: string, destination: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* La ruta de la app de una dirección real, sin el prefijo: '/portal/pedidos' → '/pedidos'; el prefijo solo → '/'. Una
|
|
19
|
+
* dirección de fuera del prefijo se queda como viene.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} basePath
|
|
22
|
+
* @param {string} pathname
|
|
23
|
+
* @returns {string}
|
|
24
|
+
*/
|
|
25
|
+
export declare function pathWithoutBase(basePath: string, pathname: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* La página de la app que va después del # ('#/pedidos?estado=pendiente' → {pathname: '/pedidos', search: '?estado=pendiente'}).
|
|
28
|
+
* Sin nada después del #, el inicio.
|
|
29
|
+
*
|
|
30
|
+
* @param {string} hash el de la dirección (location.hash), con o sin #
|
|
31
|
+
* @returns {{pathname: string, search: string}}
|
|
32
|
+
*/
|
|
33
|
+
export declare function hashLocationOf(hash: string): {
|
|
34
|
+
pathname: string;
|
|
35
|
+
search: string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* El enlace de una ruta de la app con # ('/pedidos' → '#/pedidos'). Lo que no es ruta de la app se queda como viene.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} destination
|
|
41
|
+
* @returns {string}
|
|
42
|
+
*/
|
|
43
|
+
export declare function hashHrefOf(destination: string): string;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
export declare const DEFAULT_LANGUAGE = "es";
|
|
2
2
|
export declare const DEFAULT_CURRENCY = "MXN";
|
|
3
|
+
/**
|
|
4
|
+
* Los idiomas que ofrece la app cuando el proyecto no dice otros: su código, su nombre en su propio idioma (así lo busca quien
|
|
5
|
+
* lo habla) y cómo se escriben sus números y fechas (Intl). El proyecto agrega los suyos en ToolkitProvider `languages` y pone
|
|
6
|
+
* sus traducciones en `texts` (lo que no traduzca sale en español); los textos del paquete solo vienen en español e inglés.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DEFAULT_LANGUAGES: readonly (Readonly<{
|
|
9
|
+
code: "es";
|
|
10
|
+
label: "Español";
|
|
11
|
+
locale: "es-MX";
|
|
12
|
+
}> | Readonly<{
|
|
13
|
+
code: "en";
|
|
14
|
+
label: "English";
|
|
15
|
+
locale: "en-US";
|
|
16
|
+
}>)[];
|
|
3
17
|
/**
|
|
4
18
|
* La zona horaria del navegador; si el navegador no la sabe, la de la Ciudad de México.
|
|
5
19
|
*
|
|
@@ -10,7 +24,7 @@ export declare function browserTimeZone(): string;
|
|
|
10
24
|
* Cambia la configuración que leen las funciones del paquete. La llama ToolkitProvider; un proyecto sin React (o una
|
|
11
25
|
* prueba) la puede llamar directo.
|
|
12
26
|
*
|
|
13
|
-
* @param {{language?: string, texts?: object, translate?: Function|null, timeZone?: string, currency?: string, appName?: string, buildId?: string}} settings
|
|
27
|
+
* @param {{language?: string, texts?: object, translate?: Function|null, timeZone?: string, currency?: string, appName?: string, buildId?: string, languages?: Array<{code: string, label: string, locale?: string}>}} settings
|
|
14
28
|
* @returns {void}
|
|
15
29
|
*/
|
|
16
30
|
export declare function configureToolkit(settings: {
|
|
@@ -21,11 +35,16 @@ export declare function configureToolkit(settings: {
|
|
|
21
35
|
currency?: string;
|
|
22
36
|
appName?: string;
|
|
23
37
|
buildId?: string;
|
|
38
|
+
languages?: Array<{
|
|
39
|
+
code: string;
|
|
40
|
+
label: string;
|
|
41
|
+
locale?: string;
|
|
42
|
+
}>;
|
|
24
43
|
}): void;
|
|
25
44
|
/**
|
|
26
45
|
* La configuración vigente.
|
|
27
46
|
*
|
|
28
|
-
* @returns {{language: string, texts: object, translate: Function|null, timeZone: string, currency: string, appName: string, buildId: string}}
|
|
47
|
+
* @returns {{language: string, texts: object, translate: Function|null, timeZone: string, currency: string, appName: string, buildId: string, languages: Array<{code: string, label: string, locale?: string}>}}
|
|
29
48
|
*/
|
|
30
49
|
export declare function toolkitSettings(): {
|
|
31
50
|
language: string;
|
|
@@ -35,14 +54,40 @@ export declare function toolkitSettings(): {
|
|
|
35
54
|
currency: string;
|
|
36
55
|
appName: string;
|
|
37
56
|
buildId: string;
|
|
57
|
+
languages: Array<{
|
|
58
|
+
code: string;
|
|
59
|
+
label: string;
|
|
60
|
+
locale?: string;
|
|
61
|
+
}>;
|
|
38
62
|
};
|
|
39
63
|
/**
|
|
40
|
-
* El locale de Intl del idioma (es → es-MX,
|
|
64
|
+
* El locale de Intl del idioma: el que dice su lista de idiomas (es → es-MX, pt → pt-BR) o, si no dice, el código mismo
|
|
65
|
+
* (Intl entiende «pt»). OJO: antes un idioma que no fuera es ni en salía con los números y las fechas de México.
|
|
41
66
|
*
|
|
42
67
|
* @param {string} language
|
|
68
|
+
* @param {Array<{code: string, locale?: string}>} [languages] por omisión los de la configuración vigente
|
|
43
69
|
* @returns {string}
|
|
44
70
|
*/
|
|
45
|
-
export declare function intlLocaleOf(language: string
|
|
71
|
+
export declare function intlLocaleOf(language: string, languages?: Array<{
|
|
72
|
+
code: string;
|
|
73
|
+
locale?: string;
|
|
74
|
+
}>): string;
|
|
75
|
+
/**
|
|
76
|
+
* El texto de una llave en los textos propios de los componentes (la prop `texts` de un componente y los de ComponentTexts
|
|
77
|
+
* de afuera), si alguno la trae. Cada capa es {namespace, texts} con la misma forma que ese namespace en los textos del
|
|
78
|
+
* paquete (es.js): plurales con _one/_other y {{variables}}. La primera capa que trae la llave gana.
|
|
79
|
+
*
|
|
80
|
+
* @param {Array<{namespace: string, texts: object|undefined}>} layers de la más cercana a la más lejana
|
|
81
|
+
* @param {string} namespace el de la llave
|
|
82
|
+
* @param {string} key la llave sin namespace
|
|
83
|
+
* @param {object|undefined} values
|
|
84
|
+
* @param {string} language para elegir el plural
|
|
85
|
+
* @returns {string|undefined} el texto ya con sus variables, o undefined si ninguna capa lo trae
|
|
86
|
+
*/
|
|
87
|
+
export declare function componentTextOf(layers: Array<{
|
|
88
|
+
namespace: string;
|
|
89
|
+
texts: object | undefined;
|
|
90
|
+
}>, namespace: string, key: string, values: object | undefined, language: string): string | undefined;
|
|
46
91
|
/**
|
|
47
92
|
* El texto de una llave con una configuración dada (la del proveedor o la vigente).
|
|
48
93
|
*
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { formattersOf } from '../formatting.js';
|
|
2
|
+
/**
|
|
3
|
+
* @returns {ReturnType<typeof formattersOf>} formatNumber, formatList, formatCurrency, formatFileSize, formatPercent,
|
|
4
|
+
* formatDateTime, formatDate, formatTime, formatMonthName, formatMonthShortName y formatWeekdayShortName
|
|
5
|
+
*/
|
|
6
|
+
export declare function useFormatters(): ReturnType<typeof formattersOf>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {string|string[]} [namespace] el namespace de las llaves sin prefijo; con una lista, el primero. Sin él, cada
|
|
3
3
|
* llave lleva el suyo ('orders:list.title')
|
|
4
|
+
* @param {object} [ownTexts] los textos propios del componente (su prop `texts`), con la forma de ese namespace
|
|
4
5
|
* @returns {{t: (key: string, values?: object) => string, language: string, changeLanguage: (language: string) => void}}
|
|
5
6
|
*/
|
|
6
|
-
export declare function useToolkitTranslation(namespace?: string | string[]): {
|
|
7
|
+
export declare function useToolkitTranslation(namespace?: string | string[], ownTexts?: object): {
|
|
7
8
|
t: (key: string, values?: object) => string;
|
|
8
9
|
language: string;
|
|
9
10
|
changeLanguage: (language: string) => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {object} props
|
|
3
|
+
* @param {string} props.label el nombre del botón (lector de pantalla y su tooltip), ya traducido
|
|
4
|
+
* @param {Array<{key: string, label: string, icon?: import('react').ReactNode, color?: string, disabled?: boolean, onClick: () => void}>} [props.actions]
|
|
5
|
+
* @param {import('react').ReactNode} [props.icon] otro ícono para el botón (por omisión «⋯»)
|
|
6
|
+
* @param {'small'|'medium'} [props.size]
|
|
7
|
+
*/
|
|
8
|
+
export default function ActionsMenu({ label, actions, icon, size }: {
|
|
9
|
+
label: string;
|
|
10
|
+
actions?: Array<{
|
|
11
|
+
key: string;
|
|
12
|
+
label: string;
|
|
13
|
+
icon?: import('react').ReactNode;
|
|
14
|
+
color?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
onClick: () => void;
|
|
17
|
+
}>;
|
|
18
|
+
icon?: import('react').ReactNode;
|
|
19
|
+
size?: 'small' | 'medium';
|
|
20
|
+
}): import("react").JSX.Element | null;
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
* @param {string} [props.label] ya traducido; por omisión «Copiar»
|
|
5
5
|
* @param {'small'|'medium'} [props.size]
|
|
6
6
|
* @param {() => void} [props.onCopied]
|
|
7
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common` en los textos del paquete
|
|
7
8
|
*/
|
|
8
|
-
export default function CopyButton({ value, label, size, onCopied }: {
|
|
9
|
+
export default function CopyButton({ value, label, size, onCopied, texts }: {
|
|
9
10
|
value: string;
|
|
10
11
|
label?: string;
|
|
11
12
|
size?: 'small' | 'medium';
|
|
12
13
|
onCopied?: () => void;
|
|
14
|
+
texts?: object;
|
|
13
15
|
}): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {object} props
|
|
3
|
-
* @param {
|
|
3
|
+
* @param {string[]} props.formats los tipos de archivo, en orden: los de la casa (xlsx, csv, pdf) y los que el proyecto declare
|
|
4
|
+
* en ToolkitProvider fileTypes (zip, xml…)
|
|
4
5
|
* @param {(format: string, transferOptions: {signal: AbortSignal, onDownloadProgress: (progress: {loaded: number, total?: number|null}) => void}) => Promise<{blob: Blob, fileName: string}>} props.download
|
|
5
6
|
* @param {string} [props.label] ya traducido; por defecto "Descargar"
|
|
6
7
|
* @param {string} [props.downloadLabel] ya traducido; lo que se ve en el panel de descargas antes de saber el nombre
|
|
@@ -9,6 +10,8 @@
|
|
|
9
10
|
* @param {(format: string) => {title: string, description: import('react').ReactNode, confirmLabel?: string}} [props.confirmation]
|
|
10
11
|
* @param {(format: string) => void} [props.onDownloaded] p. ej. volver a pedir la tabla (si la descarga cambia algo en
|
|
11
12
|
* el servidor)
|
|
13
|
+
* @param {(format: string, error: unknown) => void} [props.onFailed] cuando la descarga no se pudo (el panel ya lo dice)
|
|
14
|
+
* @param {(format: string) => void} [props.onCanceled] cuando la persona la canceló desde el panel
|
|
12
15
|
* @param {'button'|'icon'} [props.variant] icon = solo el icono (columna de acciones de una tabla)
|
|
13
16
|
* @param {string} [props.ariaLabel] ya traducido; obligatorio en la variante icon
|
|
14
17
|
* @param {(format: string) => void} [props.onChooseFormat] quien llama se encarga de confirmar y descargar
|
|
@@ -22,8 +25,8 @@
|
|
|
22
25
|
* virtualiza y vuelve a pintar sus celdas; el diálogo se perdía al elegir el formato). Ahí el menú solo avisa qué formato
|
|
23
26
|
* se eligió y la pantalla abre SU confirmación (useConfirmAction) fuera de la tabla.
|
|
24
27
|
*/
|
|
25
|
-
export default function DownloadMenu({ formats, download, label, downloadLabel, disabled, confirmation, onDownloaded, variant, ariaLabel, onChooseFormat, icon: ButtonIcon, }: {
|
|
26
|
-
formats:
|
|
28
|
+
export default function DownloadMenu({ formats, download, label, downloadLabel, disabled, confirmation, onDownloaded, onFailed, onCanceled, variant, ariaLabel, onChooseFormat, icon: ButtonIcon, }: {
|
|
29
|
+
formats: string[];
|
|
27
30
|
download: (format: string, transferOptions: {
|
|
28
31
|
signal: AbortSignal;
|
|
29
32
|
onDownloadProgress: (progress: {
|
|
@@ -43,6 +46,8 @@ export default function DownloadMenu({ formats, download, label, downloadLabel,
|
|
|
43
46
|
confirmLabel?: string;
|
|
44
47
|
};
|
|
45
48
|
onDownloaded?: (format: string) => void;
|
|
49
|
+
onFailed?: (format: string, error: unknown) => void;
|
|
50
|
+
onCanceled?: (format: string) => void;
|
|
46
51
|
variant?: 'button' | 'icon';
|
|
47
52
|
ariaLabel?: string;
|
|
48
53
|
onChooseFormat?: (format: string) => void;
|
|
@@ -4,10 +4,14 @@
|
|
|
4
4
|
* @param {string} props.label ya traducido
|
|
5
5
|
* @param {string} [props.helperText] p. ej. «Guárdela: no se vuelve a enseñar»
|
|
6
6
|
* @param {() => void} [props.onCopied]
|
|
7
|
+
* @param {(isRevealed: boolean) => void} [props.onRevealChange] se destapó o se tapó (para registrar quién vio el secreto)
|
|
8
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common` en los textos del paquete
|
|
7
9
|
*/
|
|
8
|
-
export default function SecretField({ value, label, helperText, onCopied }: {
|
|
10
|
+
export default function SecretField({ value, label, helperText, onCopied, onRevealChange, texts }: {
|
|
9
11
|
value: string;
|
|
10
12
|
label: string;
|
|
11
13
|
helperText?: string;
|
|
12
14
|
onCopied?: () => void;
|
|
15
|
+
onRevealChange?: (isRevealed: boolean) => void;
|
|
16
|
+
texts?: object;
|
|
13
17
|
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Dónde van las acciones de lo elegido en el teléfono con barra de pestañas abajo: todo arriba o divididas (iOS). */
|
|
2
|
+
export declare const SELECTION_PHONE_LAYOUT: Readonly<{
|
|
3
|
+
top: "top";
|
|
4
|
+
split: "split";
|
|
5
|
+
}>;
|
|
6
|
+
/**
|
|
7
|
+
* ¿En el teléfono lo elegido sale de su renglón (arriba o abajo)? La misma regla que la barra de pestañas de abajo: con ella,
|
|
8
|
+
* el renglón de la pantalla se queda con lo suyo (el conteo de la tabla) y las acciones flotan.
|
|
9
|
+
*
|
|
10
|
+
* @param {object} theme
|
|
11
|
+
* @returns {boolean}
|
|
12
|
+
*/
|
|
13
|
+
export declare function selectionFloatsOnPhone(theme: object): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @param {object} props
|
|
16
|
+
* @param {string} props.countText «5 pedidos elegidos», ya traducido. La pieza se pinta mientras la pantalla la ponga: con
|
|
17
|
+
* nada elegido, no la ponga
|
|
18
|
+
* @param {Array<{key: string, label: string, icon?: import('react').ReactNode, color?: 'inherit'|'primary'|'secondary'|'error'|'info'|'success'|'warning', disabled?: boolean, onClick: () => unknown}>} [props.actions]
|
|
19
|
+
* label ya traducido; en el teléfono se ve el ícono (sin él, el texto). onClick puede regresar una promesa
|
|
20
|
+
* @param {() => void} props.onClear quitar la selección
|
|
21
|
+
* @param {'top'|'split'} [props.phoneLayout] SELECTION_PHONE_LAYOUT; por omisión todo arriba
|
|
22
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common`: {selection: {clear, actionsLabel, summaryLabel}}
|
|
23
|
+
* @param {object} [props.sx] estilos del renglón
|
|
24
|
+
*/
|
|
25
|
+
export default function SelectionActions({ countText, actions, onClear, phoneLayout, texts, sx }: {
|
|
26
|
+
countText: string;
|
|
27
|
+
actions?: Array<{
|
|
28
|
+
key: string;
|
|
29
|
+
label: string;
|
|
30
|
+
icon?: import('react').ReactNode;
|
|
31
|
+
color?: 'inherit' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
onClick: () => unknown;
|
|
34
|
+
}>;
|
|
35
|
+
onClear: () => void;
|
|
36
|
+
phoneLayout?: 'top' | 'split';
|
|
37
|
+
texts?: object;
|
|
38
|
+
sx?: object;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* @param {string} [props.to] AAAA-MM-DD o '' si no hay
|
|
5
5
|
* @param {(range: {from: string, to: string}) => void} props.onChange '' para quitar
|
|
6
6
|
* @param {string} [props.label] ya traducido; por defecto "Personalizado"
|
|
7
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `table` en los textos del paquete
|
|
7
8
|
*/
|
|
8
|
-
export default function DateRangeFilter({ from, to, onChange, label }: {
|
|
9
|
+
export default function DateRangeFilter({ from, to, onChange, label, texts }: {
|
|
9
10
|
from?: string;
|
|
10
11
|
to?: string;
|
|
11
12
|
onChange: (range: {
|
|
@@ -13,4 +14,5 @@ export default function DateRangeFilter({ from, to, onChange, label }: {
|
|
|
13
14
|
to: string;
|
|
14
15
|
}) => void;
|
|
15
16
|
label?: string;
|
|
17
|
+
texts?: object;
|
|
16
18
|
}): import("react").JSX.Element;
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* @param {import('react').ReactNode} [props.caption]
|
|
7
7
|
* @param {string} [props.ariaLabel]
|
|
8
8
|
* @param {import('react').ReactNode} [props.extra] al final de la tira (p. ej. un rango de fechas)
|
|
9
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `table` en los textos del paquete
|
|
9
10
|
*/
|
|
10
|
-
export default function QuickFilters({ value, onChange, options, caption, ariaLabel, extra }: {
|
|
11
|
+
export default function QuickFilters({ value, onChange, options, caption, ariaLabel, extra, texts }: {
|
|
11
12
|
value: string;
|
|
12
13
|
onChange: (value: string) => void;
|
|
13
14
|
options?: Array<{
|
|
@@ -18,4 +19,5 @@ export default function QuickFilters({ value, onChange, options, caption, ariaLa
|
|
|
18
19
|
caption?: import('react').ReactNode;
|
|
19
20
|
ariaLabel?: string;
|
|
20
21
|
extra?: import('react').ReactNode;
|
|
22
|
+
texts?: object;
|
|
21
23
|
}): import("react").JSX.Element | null;
|
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -30,4 +30,4 @@ export { default as DownloadMenu } from './actions/DownloadMenu.js';
|
|
|
30
30
|
export { default as SecretField } from './actions/SecretField.js';
|
|
31
31
|
export { default as CalendarHeatmap } from './metrics/CalendarHeatmap.js';
|
|
32
32
|
export { TREND_DIRECTION, default as MetricCard } from './metrics/MetricCard.js';
|
|
33
|
-
export { default as TableToggle } from './metrics/TableToggle.js';
|
|
33
|
+
export { CHART_VIEW, default as TableToggle } from './metrics/TableToggle.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Una etiqueta como la pintan la tarjeta y el mensaje: un texto suelto o {label, color} (un color del tema: error, warning, info…).
|
|
3
|
+
*
|
|
4
|
+
* @param {string|{label: string, color?: string}} tag
|
|
5
|
+
* @returns {{label: string, color: string}}
|
|
6
|
+
*/
|
|
7
|
+
export declare function tagOf(tag: string | {
|
|
8
|
+
label: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
}): {
|
|
11
|
+
label: string;
|
|
12
|
+
color: string;
|
|
13
|
+
};
|
|
@@ -4,12 +4,15 @@
|
|
|
4
4
|
* @param {string} props.expandedTitle lo que dice abierta («Ocultar el detalle de la validación»)
|
|
5
5
|
* @param {string} [props.hint] plegada, qué hay adentro («Incluye resumen, motivos de rechazo y descargas.»)
|
|
6
6
|
* @param {boolean} [props.defaultExpanded] si empieza abierta; por omisión empieza plegada
|
|
7
|
+
* @param {(isExpanded: boolean) => void} [props.onExpandedChange] la persona la abrió o la plegó (por ejemplo, para pedir lo de
|
|
8
|
+
* adentro hasta que se abre)
|
|
7
9
|
* @param {import('react').ReactNode} props.children
|
|
8
10
|
*/
|
|
9
|
-
export default function CollapsibleSection({ collapsedTitle, expandedTitle, hint, defaultExpanded, children }: {
|
|
11
|
+
export default function CollapsibleSection({ collapsedTitle, expandedTitle, hint, defaultExpanded, onExpandedChange, children }: {
|
|
10
12
|
collapsedTitle: string;
|
|
11
13
|
expandedTitle: string;
|
|
12
14
|
hint?: string;
|
|
13
15
|
defaultExpanded?: boolean;
|
|
16
|
+
onExpandedChange?: (isExpanded: boolean) => void;
|
|
14
17
|
children: import('react').ReactNode;
|
|
15
18
|
}): import("react").JSX.Element;
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
* @param {() => void} props.onClose
|
|
5
5
|
* @param {string} props.title texto ya traducido
|
|
6
6
|
* @param {import('react').ReactNode} props.children
|
|
7
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common` en los textos del paquete
|
|
7
8
|
*/
|
|
8
|
-
export default function ContentDialog({ open, onClose, title, children }: {
|
|
9
|
+
export default function ContentDialog({ open, onClose, title, children, texts }: {
|
|
9
10
|
open: boolean;
|
|
10
11
|
onClose: () => void;
|
|
11
12
|
title: string;
|
|
12
13
|
children: import('react').ReactNode;
|
|
14
|
+
texts?: object;
|
|
13
15
|
}): import("react").JSX.Element;
|
|
@@ -12,11 +12,24 @@ export declare const ERROR_PAGE_KIND: Readonly<{
|
|
|
12
12
|
* @param {import('react').ReactNode} [props.text] ya traducido; por omisión el del paquete
|
|
13
13
|
* @param {string} [props.homePath] a dónde lleva «Ir al inicio» (por omisión '/')
|
|
14
14
|
* @param {() => void} [props.onRetry] con él sale «Intentar de nuevo»
|
|
15
|
+
* @param {() => void} [props.onGoHome] al picar «Ir al inicio», antes de ir (para avisar o limpiar algo)
|
|
16
|
+
* @param {import('react').ReactNode} [props.extraActions] botones suyos junto a los de la casa
|
|
17
|
+
* @param {import('react').ReactNode} [props.actions] botones suyos EN LUGAR de los de la casa
|
|
18
|
+
* @param {import('react').ReactNode} [props.icon] otro ícono; por omisión el de cada error
|
|
19
|
+
* @param {import('react').ReactNode} [props.children] algo debajo del texto (el teléfono de soporte, un folio)
|
|
20
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `errorPage` en los textos del paquete:
|
|
21
|
+
* {goHome: 'Volver al tablero', notFound: {title: '…'}}
|
|
15
22
|
*/
|
|
16
|
-
export default function ErrorPage({ kind, title, text, homePath, onRetry }: {
|
|
23
|
+
export default function ErrorPage({ kind, title, text, homePath, onRetry, onGoHome, extraActions, actions, icon, children, texts, }: {
|
|
17
24
|
kind: string;
|
|
18
25
|
title?: string;
|
|
19
26
|
text?: import('react').ReactNode;
|
|
20
27
|
homePath?: string;
|
|
21
28
|
onRetry?: () => void;
|
|
29
|
+
onGoHome?: () => void;
|
|
30
|
+
extraActions?: import('react').ReactNode;
|
|
31
|
+
actions?: import('react').ReactNode;
|
|
32
|
+
icon?: import('react').ReactNode;
|
|
33
|
+
children?: import('react').ReactNode;
|
|
34
|
+
texts?: object;
|
|
22
35
|
}): import("react").JSX.Element;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @param {object} [props]
|
|
3
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common` en los textos del paquete
|
|
4
|
+
*/
|
|
5
|
+
export default function FullPageLoader({ texts }?: {
|
|
6
|
+
texts?: object;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* @param {Array<{label: string, to?: string}>|false} [props.breadcrumbs] por omisión, las del menú
|
|
6
6
|
* @param {import('react').ReactNode} [props.actions] botones a la derecha (en el teléfono, abajo y a lo ancho)
|
|
7
7
|
* @param {string} [props.documentTitle] título de la pestaña si difiere del visible
|
|
8
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `layout` en los textos del paquete
|
|
8
9
|
*/
|
|
9
|
-
export default function PageHeading({ title, description, breadcrumbs, actions, documentTitle }: {
|
|
10
|
+
export default function PageHeading({ title, description, breadcrumbs, actions, documentTitle, texts }: {
|
|
10
11
|
title: string;
|
|
11
12
|
description?: import('react').ReactNode;
|
|
12
13
|
breadcrumbs?: Array<{
|
|
@@ -15,4 +16,5 @@ export default function PageHeading({ title, description, breadcrumbs, actions,
|
|
|
15
16
|
}> | false;
|
|
16
17
|
actions?: import('react').ReactNode;
|
|
17
18
|
documentTitle?: string;
|
|
19
|
+
texts?: object;
|
|
18
20
|
}): import("react").JSX.Element;
|
|
@@ -4,8 +4,11 @@
|
|
|
4
4
|
* @param {(item: any) => void} [props.onSelect] recibe el renglón de items que se picó
|
|
5
5
|
* @param {string} props.emptyLabel ya traducido
|
|
6
6
|
* @param {'primary'|'success'|'warning'|'error'|'info'} [props.tone]
|
|
7
|
+
* @param {'chart'|'table'} [props.defaultView] cómo se ve al abrir (CHART_VIEW); por omisión dibujada
|
|
8
|
+
* @param {(view: 'chart'|'table') => void} [props.onViewChange] la persona cambió a la tabla o a la gráfica
|
|
9
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common` en los textos del paquete
|
|
7
10
|
*/
|
|
8
|
-
export default function BarList({ items, onSelect, emptyLabel, tone }: {
|
|
11
|
+
export default function BarList({ items, onSelect, emptyLabel, tone, texts, defaultView, onViewChange }: {
|
|
9
12
|
items: Array<{
|
|
10
13
|
key: string;
|
|
11
14
|
label: string;
|
|
@@ -16,4 +19,7 @@ export default function BarList({ items, onSelect, emptyLabel, tone }: {
|
|
|
16
19
|
onSelect?: (item: any) => void;
|
|
17
20
|
emptyLabel: string;
|
|
18
21
|
tone?: 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
22
|
+
defaultView?: 'chart' | 'table';
|
|
23
|
+
onViewChange?: (view: 'chart' | 'table') => void;
|
|
24
|
+
texts?: object;
|
|
19
25
|
}): import("react").JSX.Element;
|
|
@@ -10,8 +10,11 @@
|
|
|
10
10
|
* @param {import('react').ReactNode} [props.summary] renglón de resumen arriba del calendario
|
|
11
11
|
* @param {string} [props.emptyLabel] qué decir si ningún día tiene actividad
|
|
12
12
|
* @param {'primary'|'info'|'success'|'warning'|'error'} [props.tone]
|
|
13
|
+
* @param {'chart'|'table'} [props.defaultView] cómo se ve al abrir (CHART_VIEW); por omisión dibujada
|
|
14
|
+
* @param {(view: 'chart'|'table') => void} [props.onViewChange] la persona cambió a la tabla o a la gráfica
|
|
15
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common` en los textos del paquete
|
|
13
16
|
*/
|
|
14
|
-
export default function CalendarHeatmap({ startsOn, endsOn, days, ariaLabel, valueLabel, describeValue, summary, emptyLabel, tone }: {
|
|
17
|
+
export default function CalendarHeatmap({ startsOn, endsOn, days, ariaLabel, valueLabel, describeValue, summary, emptyLabel, tone, texts, defaultView, onViewChange }: {
|
|
15
18
|
startsOn: string;
|
|
16
19
|
endsOn: string;
|
|
17
20
|
days: Array<{
|
|
@@ -25,4 +28,7 @@ export default function CalendarHeatmap({ startsOn, endsOn, days, ariaLabel, val
|
|
|
25
28
|
summary?: import('react').ReactNode;
|
|
26
29
|
emptyLabel?: string;
|
|
27
30
|
tone?: 'primary' | 'info' | 'success' | 'warning' | 'error';
|
|
31
|
+
defaultView?: 'chart' | 'table';
|
|
32
|
+
onViewChange?: (view: 'chart' | 'table') => void;
|
|
33
|
+
texts?: object;
|
|
28
34
|
}): import("react").JSX.Element;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {{active?: boolean, payload?: Array<{payload: any}>, render: (item: any) => import('react').ReactNode}} props
|
|
3
|
+
* active y payload los pone recharts; render recibe el renglón de data del punto o la columna
|
|
4
|
+
*/
|
|
1
5
|
export default function ChartTooltip({ active, payload, render }: {
|
|
2
|
-
active
|
|
3
|
-
payload
|
|
4
|
-
|
|
6
|
+
active?: boolean;
|
|
7
|
+
payload?: Array<{
|
|
8
|
+
payload: any;
|
|
9
|
+
}>;
|
|
10
|
+
render: (item: any) => import('react').ReactNode;
|
|
5
11
|
}): import("react").JSX.Element | null;
|
|
@@ -1,35 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {object} props
|
|
3
|
-
* @param {Array<
|
|
3
|
+
* @param {Array<Record<string, any>>} props.data un renglón por periodo: {key, label, value, tooltip?} con una serie, o
|
|
4
|
+
* {key, label, [llave de cada serie]: número} con varias
|
|
4
5
|
* @param {string} props.periodLabel encabezado de la primera columna de la tabla («Mes»), ya traducido
|
|
5
|
-
* @param {string} props.valueLabel cómo se llama lo que se cuenta, ya traducido
|
|
6
|
+
* @param {string} [props.valueLabel] cómo se llama lo que se cuenta, ya traducido (una serie)
|
|
7
|
+
* @param {Array<{key: string, label: string, tone?: 'primary'|'secondary'|'success'|'warning'|'error'|'info'}>} [props.series]
|
|
8
|
+
* varias series agrupadas: la llave de cada una en data, su nombre ya traducido y su color (por omisión, en orden)
|
|
6
9
|
* @param {string} props.ariaLabel
|
|
7
10
|
* @param {string} props.emptyLabel
|
|
8
11
|
* @param {number} [props.height]
|
|
9
|
-
* @param {'primary'|'success'|'warning'|'error'|'info'} [props.tone]
|
|
10
|
-
* @param {(item: any) => void} [props.onSelect] recibe el renglón de data que se picó
|
|
12
|
+
* @param {'primary'|'success'|'warning'|'error'|'info'} [props.tone] el color de una sola serie
|
|
13
|
+
* @param {(item: any, seriesKey: string) => void} [props.onSelect] recibe el renglón de data que se picó y la serie
|
|
11
14
|
* @param {(value: number) => string} [props.formatValue] cómo se escribe un valor (en el eje, en la tabla y en el
|
|
12
15
|
* tooltip)
|
|
13
16
|
* @param {{value: number, label: string}} [props.referenceLine] línea de referencia con su rótulo ya traducido («Meta:
|
|
14
17
|
* 10 %»)
|
|
18
|
+
* @param {(row: any) => import('react').ReactNode} [props.renderTooltip] lo que dice el globo de un periodo; por omisión su
|
|
19
|
+
* nombre y el valor de cada serie
|
|
20
|
+
* @param {'chart'|'table'} [props.defaultView] cómo se ve al abrir (CHART_VIEW); por omisión dibujada
|
|
21
|
+
* @param {(view: 'chart'|'table') => void} [props.onViewChange] la persona cambió a la tabla o a la gráfica
|
|
22
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common`: {charts: {viewAsTable, viewAsChart, legend}}
|
|
15
23
|
*/
|
|
16
|
-
export default function ColumnChart({ data, periodLabel, valueLabel, ariaLabel, emptyLabel, height, tone, onSelect, formatValue, referenceLine, }: {
|
|
17
|
-
data: Array<
|
|
24
|
+
export default function ColumnChart({ data, periodLabel, valueLabel, series, ariaLabel, emptyLabel, height, tone, onSelect, formatValue: formatValueProp, referenceLine, renderTooltip, texts, defaultView, onViewChange, }: {
|
|
25
|
+
data: Array<Record<string, any>>;
|
|
26
|
+
periodLabel: string;
|
|
27
|
+
valueLabel?: string;
|
|
28
|
+
series?: Array<{
|
|
18
29
|
key: string;
|
|
19
|
-
value: number;
|
|
20
30
|
label: string;
|
|
21
|
-
|
|
31
|
+
tone?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
|
|
22
32
|
}>;
|
|
23
|
-
periodLabel: string;
|
|
24
|
-
valueLabel: string;
|
|
25
33
|
ariaLabel: string;
|
|
26
34
|
emptyLabel: string;
|
|
27
35
|
height?: number;
|
|
28
36
|
tone?: 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
29
|
-
onSelect?: (item: any) => void;
|
|
37
|
+
onSelect?: (item: any, seriesKey: string) => void;
|
|
30
38
|
formatValue?: (value: number) => string;
|
|
31
39
|
referenceLine?: {
|
|
32
40
|
value: number;
|
|
33
41
|
label: string;
|
|
34
42
|
};
|
|
43
|
+
renderTooltip?: (row: any) => import('react').ReactNode;
|
|
44
|
+
defaultView?: 'chart' | 'table';
|
|
45
|
+
onViewChange?: (view: 'chart' | 'table') => void;
|
|
46
|
+
texts?: object;
|
|
35
47
|
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {object} props
|
|
3
|
+
* @param {Array<Record<string, any>>} props.data un renglón por periodo: {key, label, [llave de cada serie]: número}
|
|
4
|
+
* @param {Array<{key: string, label: string, tone?: 'primary'|'secondary'|'success'|'warning'|'error'|'info', dash?: string}>} props.series
|
|
5
|
+
* la llave de cada serie en data, su nombre ya traducido, su color y su trazo (por omisión, en orden)
|
|
6
|
+
* @param {string} props.periodLabel encabezado de la primera columna de la tabla («Mes»), ya traducido
|
|
7
|
+
* @param {string} props.ariaLabel
|
|
8
|
+
* @param {string} props.emptyLabel
|
|
9
|
+
* @param {number} [props.height]
|
|
10
|
+
* @param {(value: number) => string} [props.formatValue] cómo se escribe un valor (en el eje, en la tabla y en el globo)
|
|
11
|
+
* @param {{value: number, label: string}} [props.referenceLine] línea de referencia (la meta) con su rótulo ya traducido
|
|
12
|
+
* @param {(row: any) => void} [props.onSelect] recibe el renglón de data del periodo que se picó
|
|
13
|
+
* @param {(row: any) => import('react').ReactNode} [props.renderTooltip] lo que dice el globo de un periodo; por omisión su
|
|
14
|
+
* nombre y el valor de cada serie
|
|
15
|
+
* @param {'chart'|'table'} [props.defaultView] cómo se ve al abrir (CHART_VIEW); por omisión dibujada
|
|
16
|
+
* @param {(view: 'chart'|'table') => void} [props.onViewChange] la persona cambió a la tabla o a la gráfica
|
|
17
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common`: {charts: {viewAsTable, viewAsChart, legend}}
|
|
18
|
+
*/
|
|
19
|
+
export default function LineChart({ data, series, periodLabel, ariaLabel, emptyLabel, height, formatValue: formatValueProp, referenceLine, onSelect, renderTooltip, texts, defaultView, onViewChange, }: {
|
|
20
|
+
data: Array<Record<string, any>>;
|
|
21
|
+
series: Array<{
|
|
22
|
+
key: string;
|
|
23
|
+
label: string;
|
|
24
|
+
tone?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
|
|
25
|
+
dash?: string;
|
|
26
|
+
}>;
|
|
27
|
+
periodLabel: string;
|
|
28
|
+
ariaLabel: string;
|
|
29
|
+
emptyLabel: string;
|
|
30
|
+
height?: number;
|
|
31
|
+
formatValue?: (value: number) => string;
|
|
32
|
+
referenceLine?: {
|
|
33
|
+
value: number;
|
|
34
|
+
label: string;
|
|
35
|
+
};
|
|
36
|
+
onSelect?: (row: any) => void;
|
|
37
|
+
renderTooltip?: (row: any) => import('react').ReactNode;
|
|
38
|
+
defaultView?: 'chart' | 'table';
|
|
39
|
+
onViewChange?: (view: 'chart' | 'table') => void;
|
|
40
|
+
texts?: object;
|
|
41
|
+
}): import("react").JSX.Element;
|
|
@@ -14,8 +14,12 @@ export declare const TREND_DIRECTION: Readonly<{
|
|
|
14
14
|
* @param {boolean} [props.isLoading]
|
|
15
15
|
* @param {string} [props.to] ruta interna a la que lleva la tarjeta
|
|
16
16
|
* @param {{label: string, direction: 'up'|'down'|'flat', isGood?: boolean}} [props.trend] cuánto cambió (TREND_DIRECTION)
|
|
17
|
+
* @param {import('react').ReactNode} [props.icon] junto al título, del color del tono (<ShoppingBagOutlinedIcon />)
|
|
18
|
+
* @param {import('react').ReactNode} [props.children] contenido propio debajo de la nota (una barra de avance, un desglose)
|
|
19
|
+
* @param {() => void} [props.onClick] la tarjeta entera como botón, cuando no lleva a otra pantalla (to)
|
|
20
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `metricCard`: {trend: {up: 'subió'}}
|
|
17
21
|
*/
|
|
18
|
-
export default function MetricCard({ label, value, caption, tone, valueColor, isLoading, to, trend }: {
|
|
22
|
+
export default function MetricCard({ label, value, caption, tone, valueColor, isLoading, to, trend, icon, children, onClick, texts, }: {
|
|
19
23
|
label: string;
|
|
20
24
|
value: import('react').ReactNode;
|
|
21
25
|
caption?: import('react').ReactNode;
|
|
@@ -28,4 +32,8 @@ export default function MetricCard({ label, value, caption, tone, valueColor, is
|
|
|
28
32
|
direction: 'up' | 'down' | 'flat';
|
|
29
33
|
isGood?: boolean;
|
|
30
34
|
};
|
|
35
|
+
icon?: import('react').ReactNode;
|
|
36
|
+
children?: import('react').ReactNode;
|
|
37
|
+
onClick?: () => void;
|
|
38
|
+
texts?: object;
|
|
31
39
|
}): import("react").JSX.Element;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
/** Cómo se ve una gráfica: dibujada o en su tabla (defaultView y onViewChange de BarList, ColumnChart, LineChart y CalendarHeatmap). */
|
|
2
|
+
export declare const CHART_VIEW: Readonly<{
|
|
3
|
+
chart: "chart";
|
|
4
|
+
table: "table";
|
|
5
|
+
}>;
|
|
1
6
|
/**
|
|
2
|
-
* @param {{asTable: boolean, onToggle: () => void}} props
|
|
7
|
+
* @param {{asTable: boolean, onToggle: () => void, texts?: object}} props texts: los textos que cambian, con la forma de
|
|
8
|
+
* `common` ({charts: {viewAsTable, viewAsChart}})
|
|
3
9
|
*/
|
|
4
|
-
export default function TableToggle({ asTable, onToggle }: {
|
|
10
|
+
export default function TableToggle({ asTable, onToggle, texts }: {
|
|
5
11
|
asTable: boolean;
|
|
6
12
|
onToggle: () => void;
|
|
13
|
+
texts?: object;
|
|
7
14
|
}): import("react").JSX.Element;
|