@stackcraftmx/calcita 0.23.0 → 0.25.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 +111 -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 +35 -5
- package/dist/api/createApiClient.js.map +1 -1
- package/dist/appShell/AppLayout.js +27 -7
- 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/MobileTabBar.js +3 -1
- package/dist/appShell/MobileTabBar.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 +157 -133
- 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/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/MuiDialog.js +13 -0
- package/dist/theme/components/MuiDialog.js.map +1 -0
- package/dist/theme/createToolkitTheme.js.map +1 -1
- 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 +29 -1
- package/dist/types/appShell/AppLayout.d.ts +11 -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/MobileTabBar.d.ts +4 -1
- 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 +12 -5
- 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/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/MuiDialog.d.ts +9 -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 +14 -6
|
@@ -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;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/** Los colores de las series, en orden, cuando la pantalla no dice el suyo: los del tema. */
|
|
2
|
+
export declare const CHART_SERIES_TONES: readonly string[];
|
|
3
|
+
/** El trazo de cada serie de líneas, en orden (continuo, rayado, punteado): así no se distinguen solo por el color. */
|
|
4
|
+
export declare const CHART_LINE_DASHES: readonly string[];
|
|
5
|
+
/**
|
|
6
|
+
* Los colores de las gráficas, leídos del tema: con variables CSS salen como var(--su-prefijo-palette-…) y sirven en claro y
|
|
7
|
+
* en oscuro sin volver a pintar; sin ellas, el color de la paleta.
|
|
8
|
+
*
|
|
9
|
+
* @returns {{palette: object, axis: string, axisText: {fill: string, fontSize: number}, grid: string, text: string, muted: string, hover: string}}
|
|
10
|
+
*/
|
|
11
|
+
export declare function useChartColors(): {
|
|
12
|
+
palette: object;
|
|
13
|
+
axis: string;
|
|
14
|
+
axisText: {
|
|
15
|
+
fill: string;
|
|
16
|
+
fontSize: number;
|
|
17
|
+
};
|
|
18
|
+
grid: string;
|
|
19
|
+
text: string;
|
|
20
|
+
muted: string;
|
|
21
|
+
hover: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Ancho del eje de valores para que quepa su número más largo.
|
|
25
|
+
*
|
|
26
|
+
* @param {number} highestValue el valor más alto que se dibuja
|
|
27
|
+
* @param {(value: number) => string} formatValue cómo se escribe un valor
|
|
28
|
+
* @returns {number} pixeles
|
|
29
|
+
*/
|
|
30
|
+
export declare function valueAxisWidthOf(highestValue: number, formatValue: (value: number) => string): number;
|
|
31
|
+
/**
|
|
32
|
+
* Las series con su color y su trazo resueltos (lo que la pantalla no dijo, por su lugar en la lista).
|
|
33
|
+
*
|
|
34
|
+
* @param {Array<{key: string, label: string, tone?: string, dash?: string}>} series
|
|
35
|
+
* @param {object} palette la del tema (useChartColors().palette)
|
|
36
|
+
* @returns {Array<{key: string, label: string, tone: string, color: string, dash: string}>}
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolvedSeriesOf(series: Array<{
|
|
39
|
+
key: string;
|
|
40
|
+
label: string;
|
|
41
|
+
tone?: string;
|
|
42
|
+
dash?: string;
|
|
43
|
+
}>, palette: object): Array<{
|
|
44
|
+
key: string;
|
|
45
|
+
label: string;
|
|
46
|
+
tone: string;
|
|
47
|
+
color: string;
|
|
48
|
+
dash: string;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* El valor más alto de todas las series (y de la línea de referencia), para el ancho del eje.
|
|
52
|
+
*
|
|
53
|
+
* @param {Array<Record<string, any>>} data
|
|
54
|
+
* @param {Array<{key: string}>} series
|
|
55
|
+
* @param {{value: number}|undefined} referenceLine
|
|
56
|
+
* @returns {number}
|
|
57
|
+
*/
|
|
58
|
+
export declare function highestValueOf(data: Array<Record<string, any>>, series: Array<{
|
|
59
|
+
key: string;
|
|
60
|
+
}>, referenceLine: {
|
|
61
|
+
value: number;
|
|
62
|
+
} | undefined): number;
|
|
63
|
+
/**
|
|
64
|
+
* La vista de tabla: un renglón por periodo y una columna por serie.
|
|
65
|
+
*
|
|
66
|
+
* @param {object} props
|
|
67
|
+
* @param {Array<Record<string, any>>} props.data
|
|
68
|
+
* @param {Array<{key: string, label: string}>} props.series
|
|
69
|
+
* @param {string} props.periodLabel
|
|
70
|
+
* @param {(value: number) => string} props.formatValue
|
|
71
|
+
* @param {number} props.height
|
|
72
|
+
*/
|
|
73
|
+
export declare function ChartTable({ data, series, periodLabel, formatValue, height }: {
|
|
74
|
+
data: Array<Record<string, any>>;
|
|
75
|
+
series: Array<{
|
|
76
|
+
key: string;
|
|
77
|
+
label: string;
|
|
78
|
+
}>;
|
|
79
|
+
periodLabel: string;
|
|
80
|
+
formatValue: (value: number) => string;
|
|
81
|
+
height: number;
|
|
82
|
+
}): import("react").JSX.Element;
|
|
83
|
+
/**
|
|
84
|
+
* La leyenda: solo con dos series o más. Cada una con su muestra (su color y, en líneas, su trazo).
|
|
85
|
+
*
|
|
86
|
+
* @param {object} props
|
|
87
|
+
* @param {Array<{key: string, label: string, color: string, dash: string}>} props.series ya resueltas
|
|
88
|
+
* @param {boolean} [props.showsDash] la muestra con el trazo de su línea (LineChart); sin él, un cuadro de color
|
|
89
|
+
* @param {string} props.ariaLabel
|
|
90
|
+
*/
|
|
91
|
+
export declare function ChartLegend({ series, showsDash, ariaLabel }: {
|
|
92
|
+
series: Array<{
|
|
93
|
+
key: string;
|
|
94
|
+
label: string;
|
|
95
|
+
color: string;
|
|
96
|
+
dash: string;
|
|
97
|
+
}>;
|
|
98
|
+
showsDash?: boolean;
|
|
99
|
+
ariaLabel: string;
|
|
100
|
+
}): import("react").JSX.Element | null;
|
|
101
|
+
/**
|
|
102
|
+
* El rótulo de la línea de referencia (la meta), debajo de la gráfica: sobre la línea se encimaba con la última columna, y
|
|
103
|
+
* así también lo lee quien ve la tabla.
|
|
104
|
+
*
|
|
105
|
+
* @param {{referenceLine?: {value: number, label: string}}} props
|
|
106
|
+
*/
|
|
107
|
+
export declare function ReferenceCaption({ referenceLine }: {
|
|
108
|
+
referenceLine?: {
|
|
109
|
+
value: number;
|
|
110
|
+
label: string;
|
|
111
|
+
};
|
|
112
|
+
}): import("react").JSX.Element | null;
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
* @param {string} props.fallbackTo ruta de la lista sin filtros (último respaldo)
|
|
4
4
|
* @param {string} [props.listKey] la misma llave que usa useRememberListUrl en la lista
|
|
5
5
|
* @param {string} [props.label] ya traducido; se usa cuando la página anterior no anotó su nombre o no hay historial
|
|
6
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common` en los textos del paquete
|
|
6
7
|
*/
|
|
7
|
-
export default function BackButton({ fallbackTo, listKey, label, ...buttonProps }: {
|
|
8
|
+
export default function BackButton({ fallbackTo, listKey, label, texts, ...buttonProps }: {
|
|
8
9
|
fallbackTo: string;
|
|
9
10
|
listKey?: string;
|
|
10
11
|
label?: string;
|
|
12
|
+
texts?: object;
|
|
11
13
|
}): import("react").JSX.Element;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @param {
|
|
2
|
+
* @param {object} [props]
|
|
3
|
+
* @param {'small'|'medium'} [props.size]
|
|
4
|
+
* @param {boolean} [props.inverted] ícono blanco para fondos oscuros
|
|
5
|
+
* @param {(mode: 'light'|'dark'|'system') => void} [props.onChange] la persona cambió el modo (para guardarlo en su servidor)
|
|
6
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common` en los textos del paquete
|
|
3
7
|
*/
|
|
4
|
-
export default function ColorSchemeToggle({ size, inverted }
|
|
8
|
+
export default function ColorSchemeToggle({ size, inverted, onChange, texts }?: {
|
|
5
9
|
size?: 'small' | 'medium';
|
|
6
10
|
inverted?: boolean;
|
|
11
|
+
onChange?: (mode: 'light' | 'dark' | 'system') => void;
|
|
12
|
+
texts?: object;
|
|
7
13
|
}): import("react").JSX.Element;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @param {
|
|
2
|
+
* @param {object} [props]
|
|
3
|
+
* @param {'small'|'medium'} [props.size]
|
|
4
|
+
* @param {(level: string) => void} [props.onChange] la persona eligió otro tamaño (FONT_SIZE_LEVELS; para guardarlo en su servidor)
|
|
5
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `layout` en los textos del paquete
|
|
3
6
|
*/
|
|
4
|
-
export default function FontSizeToggle({ size }
|
|
7
|
+
export default function FontSizeToggle({ size, onChange, texts }?: {
|
|
5
8
|
size?: 'small' | 'medium';
|
|
9
|
+
onChange?: (level: string) => void;
|
|
10
|
+
texts?: object;
|
|
6
11
|
}): import("react").JSX.Element;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/** Los idiomas que traen los textos del paquete. */
|
|
2
|
-
export declare const LANGUAGES: readonly
|
|
2
|
+
export declare const LANGUAGES: readonly ("en" | "es")[];
|
|
3
3
|
/**
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {object} [props]
|
|
5
|
+
* @param {boolean} [props.inverted] texto blanco para fondos oscuros
|
|
6
|
+
* @param {(language: string) => void} [props.onChange] además de avisar a ToolkitProvider, cada que se elige un idioma
|
|
7
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common`: {language: {switchToNamed, choose}}
|
|
5
8
|
*/
|
|
6
|
-
export default function LanguageToggle({ inverted }
|
|
9
|
+
export default function LanguageToggle({ inverted, onChange, texts }?: {
|
|
7
10
|
inverted?: boolean;
|
|
11
|
+
onChange?: (language: string) => void;
|
|
12
|
+
texts?: object;
|
|
8
13
|
}): import("react").JSX.Element;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @param {
|
|
2
|
+
* @param {object} props
|
|
3
|
+
* @param {Array<{label: string, to?: string}>} props.items textos ya traducidos
|
|
4
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `layout` en los textos del paquete
|
|
3
5
|
*/
|
|
4
|
-
export default function PageBreadcrumbs({ items }: {
|
|
6
|
+
export default function PageBreadcrumbs({ items, texts }: {
|
|
5
7
|
items: Array<{
|
|
6
8
|
label: string;
|
|
7
9
|
to?: string;
|
|
8
10
|
}>;
|
|
11
|
+
texts?: object;
|
|
9
12
|
}): import("react").JSX.Element | null;
|