@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,12 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {object} props
|
|
3
|
-
* @param {Array<{id: string, from: {name: string, email: string}, subject: string, preview: string, receivedAt: string, isUnread?: boolean, isStarred?: boolean, hasAttachments?: boolean}>} props.messages
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* @param {Array<{id: string, from: {name: string, email: string}, subject: string, preview: string, receivedAt: string, isUnread?: boolean, isStarred?: boolean, hasAttachments?: boolean, threadCount?: number, labels?: Array<string|{label: string, color?: string}>} & Record<string, any>>} props.messages
|
|
4
|
+
* cada mensaje puede traer sus campos propios (llegan a renderMessage y a messageActions tal cual). threadCount: cuántos
|
|
5
|
+
* mensajes trae la conversación (con 2 o más se pinta «(3)»); labels: texto o {label, color} del tema
|
|
6
|
+
* @param {string|null} [props.selectedId] el mensaje abierto
|
|
7
|
+
* @param {(messageId: string) => void} props.onSelect abrir un mensaje
|
|
6
8
|
* @param {(messageId: string) => void} [props.onToggleStar]
|
|
9
|
+
* @param {string[]} [props.selectedIds] los elegidos para una acción en grupo
|
|
10
|
+
* @param {(messageIds: string[]) => void} [props.onSelectionChange] con él, cada mensaje se puede elegir picando su monograma
|
|
11
|
+
* @param {(message: any) => Array<{key: string, label: string, icon?: import('react').ReactNode, color?: string, disabled?: boolean, onClick: () => void}>} [props.messageActions]
|
|
12
|
+
* las acciones del «⋯» de cada mensaje (archivar, posponer, mover…); sin ellas no hay «⋯»
|
|
13
|
+
* @param {(message: any) => import('react').ReactNode} [props.renderMessage] lo de adentro de cada renglón, a su manera
|
|
7
14
|
* @param {string} [props.emptyText] ya traducido; por omisión el del paquete
|
|
15
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `inbox` en los textos del paquete
|
|
8
16
|
*/
|
|
9
|
-
export default function MessageList({ messages, selectedId, onSelect, onToggleStar, emptyText }: {
|
|
17
|
+
export default function MessageList({ messages, selectedId, onSelect, onToggleStar, selectedIds, onSelectionChange, messageActions, renderMessage, emptyText, texts, }: {
|
|
10
18
|
messages: Array<{
|
|
11
19
|
id: string;
|
|
12
20
|
from: {
|
|
@@ -19,9 +27,26 @@ export default function MessageList({ messages, selectedId, onSelect, onToggleSt
|
|
|
19
27
|
isUnread?: boolean;
|
|
20
28
|
isStarred?: boolean;
|
|
21
29
|
hasAttachments?: boolean;
|
|
22
|
-
|
|
30
|
+
threadCount?: number;
|
|
31
|
+
labels?: Array<string | {
|
|
32
|
+
label: string;
|
|
33
|
+
color?: string;
|
|
34
|
+
}>;
|
|
35
|
+
} & Record<string, any>>;
|
|
23
36
|
selectedId?: string | null;
|
|
24
37
|
onSelect: (messageId: string) => void;
|
|
25
38
|
onToggleStar?: (messageId: string) => void;
|
|
39
|
+
selectedIds?: string[];
|
|
40
|
+
onSelectionChange?: (messageIds: string[]) => void;
|
|
41
|
+
messageActions?: (message: any) => Array<{
|
|
42
|
+
key: string;
|
|
43
|
+
label: string;
|
|
44
|
+
icon?: import('react').ReactNode;
|
|
45
|
+
color?: string;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
onClick: () => void;
|
|
48
|
+
}>;
|
|
49
|
+
renderMessage?: (message: any) => import('react').ReactNode;
|
|
26
50
|
emptyText?: string;
|
|
51
|
+
texts?: object;
|
|
27
52
|
}): import("react").JSX.Element;
|
|
@@ -1,23 +1,55 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {object} props
|
|
3
|
-
* @param {{subject: string, from: {name: string, email: string}, to?: string[], receivedAt: string, body: string, attachments?: Array<{name: string, size?: string}>}|null} props.message
|
|
4
|
-
*
|
|
3
|
+
* @param {{id?: string, subject: string, from: {name: string, email: string}, to?: string[], cc?: string[], receivedAt: string, body: string, attachments?: Array<{name: string, size?: string} & Record<string, any>>, labels?: Array<string|{label: string, color?: string}>, thread?: Array<{id: string, from: {name: string, email: string}, to?: string[], cc?: string[], receivedAt: string, body: string, attachments?: Array<{name: string, size?: string}>}>}|null} props.message
|
|
4
|
+
* el mensaje más nuevo de la conversación; thread: los anteriores, del más viejo al más nuevo (encogidos). null: todavía
|
|
5
|
+
* no se elige ninguno
|
|
5
6
|
* @param {import('react').ReactNode} [props.actions] los botones de arriba
|
|
7
|
+
* @param {import('react').ReactNode} [props.footer] lo de abajo (una respuesta rápida, firmas…)
|
|
8
|
+
* @param {(attachment: any, message: any) => void} [props.onAttachmentClick] al picar un archivo; sin él los archivos solo se ven
|
|
9
|
+
* @param {(threadMessageId: string) => void} [props.onExpand] al abrir un mensaje anterior de la conversación
|
|
10
|
+
* @param {(message: any) => import('react').ReactNode} [props.renderBody] el texto a su manera (HTML ya limpio por el proyecto)
|
|
11
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `inbox` en los textos del paquete
|
|
6
12
|
*/
|
|
7
|
-
export default function MessageView({ message, actions }: {
|
|
13
|
+
export default function MessageView({ message, actions, footer, onAttachmentClick, onExpand, renderBody, texts }: {
|
|
8
14
|
message: {
|
|
15
|
+
id?: string;
|
|
9
16
|
subject: string;
|
|
10
17
|
from: {
|
|
11
18
|
name: string;
|
|
12
19
|
email: string;
|
|
13
20
|
};
|
|
14
21
|
to?: string[];
|
|
22
|
+
cc?: string[];
|
|
15
23
|
receivedAt: string;
|
|
16
24
|
body: string;
|
|
17
25
|
attachments?: Array<{
|
|
18
26
|
name: string;
|
|
19
27
|
size?: string;
|
|
28
|
+
} & Record<string, any>>;
|
|
29
|
+
labels?: Array<string | {
|
|
30
|
+
label: string;
|
|
31
|
+
color?: string;
|
|
32
|
+
}>;
|
|
33
|
+
thread?: Array<{
|
|
34
|
+
id: string;
|
|
35
|
+
from: {
|
|
36
|
+
name: string;
|
|
37
|
+
email: string;
|
|
38
|
+
};
|
|
39
|
+
to?: string[];
|
|
40
|
+
cc?: string[];
|
|
41
|
+
receivedAt: string;
|
|
42
|
+
body: string;
|
|
43
|
+
attachments?: Array<{
|
|
44
|
+
name: string;
|
|
45
|
+
size?: string;
|
|
46
|
+
}>;
|
|
20
47
|
}>;
|
|
21
48
|
} | null;
|
|
22
49
|
actions?: import('react').ReactNode;
|
|
50
|
+
footer?: import('react').ReactNode;
|
|
51
|
+
onAttachmentClick?: (attachment: any, message: any) => void;
|
|
52
|
+
onExpand?: (threadMessageId: string) => void;
|
|
53
|
+
renderBody?: (message: any) => import('react').ReactNode;
|
|
54
|
+
texts?: object;
|
|
23
55
|
}): import("react").JSX.Element;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {string} receivedAt el instante ISO
|
|
3
3
|
* @param {Date} [now] para las pruebas; por omisión, ahora
|
|
4
|
+
* @param {{formatDate: Function, formatTime: Function}} [formatters] los de useFormatters (el proveedor más cercano); por
|
|
5
|
+
* omisión los sueltos (el de la raíz)
|
|
4
6
|
* @returns {string}
|
|
5
7
|
*/
|
|
6
|
-
export declare function inboxDateOf(receivedAt: string, now?: Date
|
|
8
|
+
export declare function inboxDateOf(receivedAt: string, now?: Date, formatters?: {
|
|
9
|
+
formatDate: Function;
|
|
10
|
+
formatTime: Function;
|
|
11
|
+
}): string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export { ToolkitProvider } from './toolkit/ToolkitProvider.js';
|
|
2
2
|
export { useToolkitNavigation, useToolkitSettings } from './toolkit/toolkitContext.js';
|
|
3
3
|
export { useToolkitTranslation } from './toolkit/useToolkitTranslation.js';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
4
|
+
export { default as ComponentTexts } from './toolkit/ComponentTexts.js';
|
|
5
|
+
export { DEFAULT_CURRENCY, DEFAULT_LANGUAGE, DEFAULT_LANGUAGES, configureToolkit, toolkitSettings, translateToolkit } from './toolkit/toolkitSettings.js';
|
|
6
|
+
export { browserNavigation, createBrowserNavigation } from './toolkit/browserNavigation.js';
|
|
7
|
+
export { createHashNavigation } from './toolkit/hashNavigation.js';
|
|
6
8
|
export { default as toolkitTextsEs } from './locales/es.js';
|
|
7
9
|
export { default as toolkitTextsEn } from './locales/en.js';
|
|
8
10
|
export { ConfirmDialog, ModalWaiting, NEW_BUILD_NOTICE_VARIANT, NewBuildNotice, StaleBuildBoundary, TOAST_DEFAULT_OPTIONS, Toaster, confirmActionMachine, dismissToast, errorsObjectToMessage, toastDefault, toastError, toastInfo, toastLoading, toastProblem, toastPromise, toastSuccess, toastWarn, useConfirmAction, } from './feedback/index.js';
|
|
9
|
-
export { DOWNLOAD_STATUS, DownloadManager, cancelDownload, clearFinishedDownloads, downloadsMachine, startDownload } from './downloads/index.js';
|
|
11
|
+
export { DEFAULT_FILE_TYPES, DOWNLOAD_STATUS, DownloadManager, UNKNOWN_FILE_TYPE, cancelDownload, clearFinishedDownloads, downloadsMachine, startDownload, useFileTypes, } from './downloads/index.js';
|
|
10
12
|
export { THEME_LOOK, TOP_BAR, createToolkitTheme } from './theme/createToolkitTheme.js';
|
|
11
13
|
export { isAndroidDevice } from './theme/androidDevice.js';
|
|
12
14
|
export { MINIMAL_BACKGROUND } from './theme/components/minimalComponents.js';
|
|
@@ -18,6 +20,9 @@ export { AppLayout, MENU_POSITION } from './appShell/AppLayout.js';
|
|
|
18
20
|
export { AuthLayout } from './appShell/AuthLayout.js';
|
|
19
21
|
export { default as BarActions } from './appShell/BarActions.js';
|
|
20
22
|
export { default as BarActionButton } from './appShell/BarActionButton.js';
|
|
23
|
+
export { default as BarSearch } from './appShell/BarSearch.js';
|
|
24
|
+
export { default as ActionsMenu } from './ui/actions/ActionsMenu.js';
|
|
25
|
+
export { SELECTION_PHONE_LAYOUT, default as SelectionActions, selectionFloatsOnPhone } from './ui/actions/SelectionActions.js';
|
|
21
26
|
export { BAR_ACTIONS_PLACEMENT, useBarActionsPlacement, useCloseBarActionsMenu } from './appShell/barActionsSlot.js';
|
|
22
27
|
export { BAR_CAPSULE_HEIGHT_PIXELS, default as BarCapsule } from './appShell/BarCapsule.js';
|
|
23
28
|
export { usesMobileTabBar } from './appShell/tabBarRule.js';
|
|
@@ -42,19 +47,21 @@ export { default as FileDropzone } from './upload/FileDropzone.js';
|
|
|
42
47
|
export { FILE_ACCEPT_PRESETS, FILE_REJECTION, matchesAccept, parseFileSize, resolveAccept } from './upload/fileRules.js';
|
|
43
48
|
export { buildUploadActors, uploadMachine } from './upload/uploadMachine.js';
|
|
44
49
|
export { uploadWithProgress } from './upload/uploadWithProgress.js';
|
|
45
|
-
export { APP_BAR_HEIGHT_CSS_VARIABLE, BackButton, CalendarHeatmap, CollapsibleSection, ColorSchemeToggle, ContentDialog, CopyButton, DateRangeFilter, DefinitionList, DetailHeader, DictionaryText, DocumentTitle, DownloadMenu, FONT_SIZE_LEVELS, FontSizeToggle, FullPageLoader, GlassLensFilter, GlassPanel, LANGUAGES, LanguageToggle, MetricCard, PageBreadcrumbs, PageHeader, PageHeading, ProfileHeader, TREND_DIRECTION, PeriodRangeSelector, QuickFilters, SCROLL_MARGIN_BELOW_APP_BAR, SEGMENTED_CONTROL_SX, ScrollableRow, SecretField, SectionCard, SegmentedControl, StatusChip, TableToggle, Tag, scrollableRow, useAppBarHeightPublisher, } from './ui/index.js';
|
|
50
|
+
export { APP_BAR_HEIGHT_CSS_VARIABLE, BackButton, CHART_VIEW, CalendarHeatmap, CollapsibleSection, ColorSchemeToggle, ContentDialog, CopyButton, DateRangeFilter, DefinitionList, DetailHeader, DictionaryText, DocumentTitle, DownloadMenu, FONT_SIZE_LEVELS, FontSizeToggle, FullPageLoader, GlassLensFilter, GlassPanel, LANGUAGES, LanguageToggle, MetricCard, PageBreadcrumbs, PageHeader, PageHeading, ProfileHeader, TREND_DIRECTION, PeriodRangeSelector, QuickFilters, SCROLL_MARGIN_BELOW_APP_BAR, SEGMENTED_CONTROL_SX, ScrollableRow, SecretField, SectionCard, SegmentedControl, StatusChip, TableToggle, Tag, scrollableRow, useAppBarHeightPublisher, } from './ui/index.js';
|
|
46
51
|
export { default as CatalogInput } from './inputs/CatalogInput.js';
|
|
47
52
|
export { default as ColorInput } from './inputs/ColorInput.js';
|
|
48
53
|
export { default as FieldFrame } from './inputs/FieldFrame.js';
|
|
49
54
|
export { FORM_ROW_CLASS, FormRow, default as FormSection } from './inputs/FormSection.js';
|
|
50
55
|
export { default as NumberInput } from './inputs/NumberInput.js';
|
|
51
56
|
export { default as SelectInput } from './inputs/SelectInput.js';
|
|
57
|
+
export { default as WizardLayout } from './inputs/WizardLayout.js';
|
|
52
58
|
export { default as TextInput } from './inputs/TextInput.js';
|
|
53
59
|
export { HEX_COLOR, MIN_CONTRAST, contrastOnWhite, readableVariantOf } from './inputs/colorContrast.js';
|
|
54
60
|
export { cleanNumberText, completeDecimals, groupThousands } from './inputs/numberText.js';
|
|
55
61
|
export { translateValidationMessage } from './forms/validationMessages.js';
|
|
56
62
|
export { dictionaryEntryOf, labelOf, lookup, shortLabelOf } from './dictionaries/dictionaries.js';
|
|
57
|
-
export { dayOfPlainDate, formatCurrency, formatDate, formatDateTime, formatFileSize, formatList, formatMonthName, formatMonthShortName, formatNumber, formatPercent, formatTime, formatWeekdayShortName, } from './formatting.js';
|
|
63
|
+
export { dayOfPlainDate, formatCurrency, formatDate, formatDateTime, formatFileSize, formatList, formatMonthName, formatMonthShortName, formatNumber, formatPercent, formatTime, formatWeekdayShortName, formattersOf, } from './formatting.js';
|
|
64
|
+
export { useFormatters } from './toolkit/useFormatters.js';
|
|
58
65
|
export { parseInstant, parsePlainDate } from './dates.js';
|
|
59
66
|
export { fieldErrorsOf, problemMessage, problemTitle } from './problems.js';
|
|
60
67
|
export { newIdentifier } from './identifiers.js';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @param {object} props
|
|
3
3
|
* @param {string} [props.name]
|
|
4
4
|
* @param {string} props.label ya traducido
|
|
5
|
-
* @param {string|null|undefined} props.value la clave elegida ('' = ninguna)
|
|
6
|
-
* @param {(code:
|
|
5
|
+
* @param {string|string[]|null|undefined} props.value la clave elegida ('' = ninguna); con multiple, la lista ([] = ninguna)
|
|
6
|
+
* @param {(code: any) => void} props.onChange recibe la clave ('' al borrar); con multiple, la lista de claves
|
|
7
7
|
* @param {() => void} [props.onBlur]
|
|
8
8
|
* @param {Array<{code: string, label: string}>} props.options
|
|
9
9
|
* @param {(option: {code: string, label: string}) => string} [props.formatLabel] por omisión «Nombre (clave)»
|
|
@@ -14,12 +14,14 @@
|
|
|
14
14
|
* formulario agrupado el campo vacío solo enseña su botón y no se entiende qué es
|
|
15
15
|
* @param {boolean} [props.disabled]
|
|
16
16
|
* @param {import('react').Ref<HTMLInputElement>} [props.inputRef]
|
|
17
|
+
* @param {boolean} [props.multiple] elegir varias claves
|
|
18
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common` en los textos del paquete
|
|
17
19
|
*/
|
|
18
|
-
export default function CatalogInput({ name, label, value, onChange, onBlur, options, formatLabel, error, helperText, loading, disabled, inputRef, placeholder, }: {
|
|
20
|
+
export default function CatalogInput({ name, label, value, onChange, onBlur, options, formatLabel, error, helperText, loading, disabled, inputRef, placeholder, multiple, texts, }: {
|
|
19
21
|
name?: string;
|
|
20
22
|
label: string;
|
|
21
|
-
value: string | null | undefined;
|
|
22
|
-
onChange: (code:
|
|
23
|
+
value: string | string[] | null | undefined;
|
|
24
|
+
onChange: (code: any) => void;
|
|
23
25
|
onBlur?: () => void;
|
|
24
26
|
options: Array<{
|
|
25
27
|
code: string;
|
|
@@ -38,4 +40,6 @@ export default function CatalogInput({ name, label, value, onChange, onBlur, opt
|
|
|
38
40
|
placeholder?: string;
|
|
39
41
|
disabled?: boolean;
|
|
40
42
|
inputRef?: import('react').Ref<HTMLInputElement>;
|
|
43
|
+
multiple?: boolean;
|
|
44
|
+
texts?: object;
|
|
41
45
|
}): import("react").JSX.Element;
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* @param {boolean} [props.checkContrast] avisa si casi no se lee sobre blanco (por omisión sí)
|
|
11
11
|
* @param {boolean} [props.disabled]
|
|
12
12
|
* @param {import('react').Ref<HTMLInputElement>} [props.inputRef]
|
|
13
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common` en los textos del paquete
|
|
13
14
|
*/
|
|
14
|
-
export default function ColorInput({ name, label, value, onChange, onBlur, error, helperText, checkContrast, disabled, inputRef, }: {
|
|
15
|
+
export default function ColorInput({ name, label, value, onChange, onBlur, error, helperText, checkContrast, disabled, inputRef, texts, }: {
|
|
15
16
|
name?: string;
|
|
16
17
|
label: string;
|
|
17
18
|
value: string | null | undefined;
|
|
@@ -25,4 +26,5 @@ export default function ColorInput({ name, label, value, onChange, onBlur, error
|
|
|
25
26
|
checkContrast?: boolean;
|
|
26
27
|
disabled?: boolean;
|
|
27
28
|
inputRef?: import('react').Ref<HTMLInputElement>;
|
|
29
|
+
texts?: object;
|
|
28
30
|
}): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** La clase de cada renglón: la sección dibuja
|
|
1
|
+
/** La clase de cada renglón: la sección le dibuja su línea de arriba, esté donde esté adentro de la tarjeta. */
|
|
2
2
|
export declare const FORM_ROW_CLASS = "calcita-form-row";
|
|
3
3
|
/**
|
|
4
4
|
* Un renglón del formulario agrupado: la etiqueta a la izquierda y lo que sea a la derecha (un campo, un interruptor, un
|
|
@@ -20,7 +20,7 @@ export declare function FormRow({ label, htmlFor, labelId, children }: {
|
|
|
20
20
|
* @param {object} props
|
|
21
21
|
* @param {string} [props.title] ya traducido; va arriba de la tarjeta
|
|
22
22
|
* @param {import('react').ReactNode} [props.footer] la explicación, abajo de la tarjeta
|
|
23
|
-
* @param {import('react').ReactNode} props.children los campos, directo
|
|
23
|
+
* @param {import('react').ReactNode} props.children los campos, directo o dentro de un Grid, un Stack o un componente propio
|
|
24
24
|
*/
|
|
25
25
|
export default function FormSection({ title, footer, children }: {
|
|
26
26
|
title?: string;
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
* @param {number} [props.maxDigits] tope de dígitos (por omisión 17)
|
|
15
15
|
* @param {boolean} [props.disabled]
|
|
16
16
|
* @param {import('react').Ref<HTMLInputElement>} [props.inputRef]
|
|
17
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common` en los textos del paquete
|
|
17
18
|
*/
|
|
18
|
-
export default function NumberInput({ name, label, value, onChange, onBlur, error, helperText, decimals, allowNegative, prefix, suffix, maxDigits, disabled, inputRef, }: {
|
|
19
|
+
export default function NumberInput({ name, label, value, onChange, onBlur, error, helperText, decimals, allowNegative, prefix, suffix, maxDigits, disabled, inputRef, texts, }: {
|
|
19
20
|
name?: string;
|
|
20
21
|
label: string;
|
|
21
22
|
value: string | number | null | undefined;
|
|
@@ -33,4 +34,5 @@ export default function NumberInput({ name, label, value, onChange, onBlur, erro
|
|
|
33
34
|
maxDigits?: number;
|
|
34
35
|
disabled?: boolean;
|
|
35
36
|
inputRef?: import('react').Ref<HTMLInputElement>;
|
|
37
|
+
texts?: object;
|
|
36
38
|
}): import("react").JSX.Element;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @param {object} props
|
|
3
3
|
* @param {string} [props.name]
|
|
4
4
|
* @param {string} props.label ya traducido
|
|
5
|
-
* @param {string|number|null|undefined} props.value '' = sin elegir
|
|
6
|
-
* @param {(value:
|
|
5
|
+
* @param {string|number|Array<string|number>|null|undefined} props.value '' = sin elegir; con multiple, la lista ([] = ninguna)
|
|
6
|
+
* @param {(value: any) => void} props.onChange recibe el valor elegido (con multiple, la lista), no el evento
|
|
7
7
|
* @param {() => void} [props.onBlur]
|
|
8
8
|
* @param {Array<{value: string|number, label: string, description?: string}>} props.options
|
|
9
9
|
* @param {string|{key: string, values?: object}} [props.error]
|
|
@@ -11,12 +11,14 @@
|
|
|
11
11
|
* @param {string} [props.placeholder] texto de la opción vacía
|
|
12
12
|
* @param {boolean} [props.disabled]
|
|
13
13
|
* @param {import('react').Ref<HTMLInputElement>} [props.inputRef]
|
|
14
|
+
* @param {boolean} [props.multiple] elegir varias opciones
|
|
15
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common` en los textos del paquete
|
|
14
16
|
*/
|
|
15
|
-
export default function SelectInput({ name, label, value, onChange, onBlur, options, error, helperText, placeholder, disabled, inputRef, }: {
|
|
17
|
+
export default function SelectInput({ name, label, value, onChange, onBlur, options, error, helperText, placeholder, disabled, inputRef, multiple, texts, }: {
|
|
16
18
|
name?: string;
|
|
17
19
|
label: string;
|
|
18
|
-
value: string | number | null | undefined;
|
|
19
|
-
onChange: (value:
|
|
20
|
+
value: string | number | Array<string | number> | null | undefined;
|
|
21
|
+
onChange: (value: any) => void;
|
|
20
22
|
onBlur?: () => void;
|
|
21
23
|
options: Array<{
|
|
22
24
|
value: string | number;
|
|
@@ -31,4 +33,6 @@ export default function SelectInput({ name, label, value, onChange, onBlur, opti
|
|
|
31
33
|
placeholder?: string;
|
|
32
34
|
disabled?: boolean;
|
|
33
35
|
inputRef?: import('react').Ref<HTMLInputElement>;
|
|
36
|
+
multiple?: boolean;
|
|
37
|
+
texts?: object;
|
|
34
38
|
}): import("react").JSX.Element;
|
|
@@ -26,8 +26,9 @@
|
|
|
26
26
|
* @param {string} [props.id]
|
|
27
27
|
* @param {object} [props.slotProps]
|
|
28
28
|
* @param {object} [props.sx]
|
|
29
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common` en los textos del paquete
|
|
29
30
|
*/
|
|
30
|
-
export default function TextInput({ name, label, value, onChange, onBlur, error, type, helperText, startAdornment, endAdornment: customEndAdornment, uppercase, normalizeOnBlur, inputRef, clearable, ...textFieldProps }: {
|
|
31
|
+
export default function TextInput({ name, label, value, onChange, onBlur, error, type, helperText, startAdornment, endAdornment: customEndAdornment, uppercase, normalizeOnBlur, inputRef, clearable, texts, ...textFieldProps }: {
|
|
31
32
|
name?: string;
|
|
32
33
|
label: string;
|
|
33
34
|
value: string | null | undefined;
|
|
@@ -57,4 +58,5 @@ export default function TextInput({ name, label, value, onChange, onBlur, error,
|
|
|
57
58
|
id?: string;
|
|
58
59
|
slotProps?: object;
|
|
59
60
|
sx?: object;
|
|
61
|
+
texts?: object;
|
|
60
62
|
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {object} props
|
|
3
|
+
* @param {Object[]} props.steps en orden
|
|
4
|
+
* @param {string} props.steps[].key
|
|
5
|
+
* @param {string} props.steps[].label ya traducido
|
|
6
|
+
* @param {boolean} [props.steps[].optional] se puede omitir
|
|
7
|
+
* @param {import('react').ReactNode} props.steps[].content los campos del paso
|
|
8
|
+
* @param {number} props.activeIndex el paso que se ve
|
|
9
|
+
* @param {Set<string>} props.skippedKeys los pasos omitidos
|
|
10
|
+
* @param {boolean} [props.isSubmitting] mientras se envía, «Anterior» se apaga
|
|
11
|
+
* @param {() => void} props.onBack
|
|
12
|
+
* @param {() => void} props.onNext
|
|
13
|
+
* @param {() => void} props.onSkip
|
|
14
|
+
* @param {import('react').ReactNode} props.submitButton el botón de enviar del último paso
|
|
15
|
+
* @param {import('react').ReactNode} [props.problemAlert] el aviso de errores del servidor, arriba de los botones del último paso
|
|
16
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `common`: {wizard: {next, back, skip, optional, skipped, stepOf}}
|
|
17
|
+
*/
|
|
18
|
+
export default function WizardLayout({ steps, activeIndex, skippedKeys, isSubmitting, onBack, onNext, onSkip, submitButton, problemAlert, texts, }: {
|
|
19
|
+
steps: {
|
|
20
|
+
key: string;
|
|
21
|
+
label: string;
|
|
22
|
+
optional?: boolean;
|
|
23
|
+
content: import('react').ReactNode;
|
|
24
|
+
}[];
|
|
25
|
+
activeIndex: number;
|
|
26
|
+
skippedKeys: Set<string>;
|
|
27
|
+
isSubmitting?: boolean;
|
|
28
|
+
onBack: () => void;
|
|
29
|
+
onNext: () => void;
|
|
30
|
+
onSkip: () => void;
|
|
31
|
+
submitButton: import('react').ReactNode;
|
|
32
|
+
problemAlert?: import('react').ReactNode;
|
|
33
|
+
texts?: object;
|
|
34
|
+
}): import("react").JSX.Element;
|
|
@@ -1,26 +1,58 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {object} props
|
|
3
|
-
* @param {Array<{id: string, title: string, limit?: number}>} props.columns
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* @param {Array<{id: string, title: string, limit?: number, count?: number, collapsible?: boolean, defaultCollapsed?: boolean}>} props.columns
|
|
4
|
+
* en su orden. count: cuántas tarjetas tiene de verdad cuando la pantalla le pasa solo las filtradas (el tope se cuenta
|
|
5
|
+
* contra todas). collapsible: lleva su botón para encogerse (el congelador); defaultCollapsed: empieza encogida
|
|
6
|
+
* @param {Array<{id: string, columnId: string, title: string, completed?: boolean, description?: string, tags?: Array<string|{label: string, color?: string}>, assignees?: Array<{id: string, name: string, avatarUrl?: string}>, dueDate?: string, checklist?: {done: number, total: number}, comments?: number, attachments?: number} & Record<string, any>>} props.cards
|
|
7
|
+
* el orden de cada columna es el orden en este arreglo; cada tarjeta puede traer sus campos propios (llegan a renderCard,
|
|
8
|
+
* a cardActions y a onCardClick tal cual). dueDate: AAAA-MM-DD
|
|
6
9
|
* @param {(move: {cardId: string, fromColumnId: string, toColumnId: string, toIndex: number}) => void} props.onMove
|
|
7
10
|
* @param {(card: any) => import('react').ReactNode} [props.renderCard] lo de adentro de cada tarjeta (recibe la tarjeta de cards)
|
|
8
11
|
* @param {(cardId: string) => void} [props.onCardClick]
|
|
12
|
+
* @param {(newCard: {columnId: string, title: string}) => void} [props.onAddCard] con él cada columna lleva su «+» para agregar
|
|
13
|
+
* escribiendo el título
|
|
14
|
+
* @param {(card: any) => Array<{key: string, label: string, icon?: import('react').ReactNode, color?: string, disabled?: boolean, onClick: () => void}>} [props.cardActions]
|
|
15
|
+
* las acciones del «⋯» de cada tarjeta (editar, asignarme, borrar…); sin ellas no hay «⋯»
|
|
16
|
+
* @param {(column: any) => Array<{key: string, label: string, icon?: import('react').ReactNode, color?: string, disabled?: boolean, onClick: () => void}>} [props.columnActions]
|
|
17
|
+
* las acciones del «⋯» de cada columna (renombrar, limpiar…)
|
|
18
|
+
* @param {(card: any, completed: boolean) => void} [props.onCardComplete] con él cada tarjeta lleva su círculo para terminarla
|
|
19
|
+
* (completed true) o reabrirla (false); la pantalla decide qué más pasa (moverla a «Listo», guardar la fecha)
|
|
20
|
+
* @param {(columnId: string, collapsed: boolean) => void} [props.onColumnCollapse] cada que una columna se encoge o se abre
|
|
9
21
|
* @param {string} props.ariaLabel ya traducido
|
|
22
|
+
* @param {object} [props.texts] los textos que cambian, con la forma de `kanban` en los textos del paquete
|
|
10
23
|
*/
|
|
11
|
-
export default function KanbanBoard({ columns, cards, onMove, renderCard, onCardClick, ariaLabel }: {
|
|
24
|
+
export default function KanbanBoard({ columns, cards, onMove, renderCard, onCardClick, onAddCard, cardActions, columnActions, onCardComplete, onColumnCollapse, ariaLabel, texts, }: {
|
|
12
25
|
columns: Array<{
|
|
13
26
|
id: string;
|
|
14
27
|
title: string;
|
|
15
28
|
limit?: number;
|
|
29
|
+
count?: number;
|
|
30
|
+
collapsible?: boolean;
|
|
31
|
+
defaultCollapsed?: boolean;
|
|
16
32
|
}>;
|
|
17
33
|
cards: Array<{
|
|
18
34
|
id: string;
|
|
19
35
|
columnId: string;
|
|
20
36
|
title: string;
|
|
37
|
+
completed?: boolean;
|
|
21
38
|
description?: string;
|
|
22
|
-
tags?: string
|
|
23
|
-
|
|
39
|
+
tags?: Array<string | {
|
|
40
|
+
label: string;
|
|
41
|
+
color?: string;
|
|
42
|
+
}>;
|
|
43
|
+
assignees?: Array<{
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
avatarUrl?: string;
|
|
47
|
+
}>;
|
|
48
|
+
dueDate?: string;
|
|
49
|
+
checklist?: {
|
|
50
|
+
done: number;
|
|
51
|
+
total: number;
|
|
52
|
+
};
|
|
53
|
+
comments?: number;
|
|
54
|
+
attachments?: number;
|
|
55
|
+
} & Record<string, any>>;
|
|
24
56
|
onMove: (move: {
|
|
25
57
|
cardId: string;
|
|
26
58
|
fromColumnId: string;
|
|
@@ -29,5 +61,28 @@ export default function KanbanBoard({ columns, cards, onMove, renderCard, onCard
|
|
|
29
61
|
}) => void;
|
|
30
62
|
renderCard?: (card: any) => import('react').ReactNode;
|
|
31
63
|
onCardClick?: (cardId: string) => void;
|
|
64
|
+
onAddCard?: (newCard: {
|
|
65
|
+
columnId: string;
|
|
66
|
+
title: string;
|
|
67
|
+
}) => void;
|
|
68
|
+
cardActions?: (card: any) => Array<{
|
|
69
|
+
key: string;
|
|
70
|
+
label: string;
|
|
71
|
+
icon?: import('react').ReactNode;
|
|
72
|
+
color?: string;
|
|
73
|
+
disabled?: boolean;
|
|
74
|
+
onClick: () => void;
|
|
75
|
+
}>;
|
|
76
|
+
columnActions?: (column: any) => Array<{
|
|
77
|
+
key: string;
|
|
78
|
+
label: string;
|
|
79
|
+
icon?: import('react').ReactNode;
|
|
80
|
+
color?: string;
|
|
81
|
+
disabled?: boolean;
|
|
82
|
+
onClick: () => void;
|
|
83
|
+
}>;
|
|
84
|
+
onCardComplete?: (card: any, completed: boolean) => void;
|
|
85
|
+
onColumnCollapse?: (columnId: string, collapsed: boolean) => void;
|
|
32
86
|
ariaLabel: string;
|
|
87
|
+
texts?: object;
|
|
33
88
|
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Cómo va la fecha límite de una tarjeta. */
|
|
2
|
+
export declare const DUE_STATUS: Readonly<{
|
|
3
|
+
overdue: "overdue";
|
|
4
|
+
today: "today";
|
|
5
|
+
upcoming: "upcoming";
|
|
6
|
+
}>;
|
|
7
|
+
/**
|
|
8
|
+
* El día de hoy como AAAA-MM-DD en la zona de este navegador (la fecha límite es un día, no un instante).
|
|
9
|
+
*
|
|
10
|
+
* @param {Date} [now]
|
|
11
|
+
* @returns {string}
|
|
12
|
+
*/
|
|
13
|
+
export declare function todayIsoDateOf(now?: Date): string;
|
|
14
|
+
/**
|
|
15
|
+
* Cómo va una fecha límite contra hoy. AAAA-MM-DD se compara bien como texto.
|
|
16
|
+
*
|
|
17
|
+
* @param {string|null|undefined} dueDate AAAA-MM-DD
|
|
18
|
+
* @param {string} today AAAA-MM-DD
|
|
19
|
+
* @returns {'overdue'|'today'|'upcoming'|null} null sin fecha
|
|
20
|
+
*/
|
|
21
|
+
export declare function dueStatusOf(dueDate: string | null | undefined, today: string): 'overdue' | 'today' | 'upcoming' | null;
|
|
22
|
+
export { tagOf } from '../ui/labels/tagOf.js';
|
package/dist/types/kanban.d.ts
CHANGED
|
@@ -38,6 +38,20 @@ declare const _default: Readonly<{
|
|
|
38
38
|
descending: string;
|
|
39
39
|
clear: string;
|
|
40
40
|
};
|
|
41
|
+
selection: {
|
|
42
|
+
count_one: string;
|
|
43
|
+
count_other: string;
|
|
44
|
+
allMatching: string;
|
|
45
|
+
allMatchingCapped: string;
|
|
46
|
+
pageSelected_one: string;
|
|
47
|
+
pageSelected_other: string;
|
|
48
|
+
selectAllMatching: string;
|
|
49
|
+
selectAllMatchingCapped: string;
|
|
50
|
+
onlyThisPage: string;
|
|
51
|
+
clear: string;
|
|
52
|
+
summaryLabel: string;
|
|
53
|
+
actionsLabel: string;
|
|
54
|
+
};
|
|
41
55
|
goToPage: {
|
|
42
56
|
page: string;
|
|
43
57
|
of_one: string;
|
|
@@ -110,6 +124,11 @@ declare const _default: Readonly<{
|
|
|
110
124
|
colorLowContrast: string;
|
|
111
125
|
colorUseSuggestion: string;
|
|
112
126
|
};
|
|
127
|
+
selection: {
|
|
128
|
+
clear: string;
|
|
129
|
+
actionsLabel: string;
|
|
130
|
+
summaryLabel: string;
|
|
131
|
+
};
|
|
113
132
|
wizard: {
|
|
114
133
|
next: string;
|
|
115
134
|
back: string;
|
|
@@ -123,6 +142,8 @@ declare const _default: Readonly<{
|
|
|
123
142
|
es: string;
|
|
124
143
|
en: string;
|
|
125
144
|
};
|
|
145
|
+
switchToNamed: string;
|
|
146
|
+
choose: string;
|
|
126
147
|
};
|
|
127
148
|
colorScheme: {
|
|
128
149
|
label: string;
|
|
@@ -259,6 +280,7 @@ declare const _default: Readonly<{
|
|
|
259
280
|
};
|
|
260
281
|
charts: {
|
|
261
282
|
viewAsTable: string;
|
|
283
|
+
legend: string;
|
|
262
284
|
viewAsChart: string;
|
|
263
285
|
less: string;
|
|
264
286
|
more: string;
|
|
@@ -612,6 +634,33 @@ declare const _default: Readonly<{
|
|
|
612
634
|
};
|
|
613
635
|
};
|
|
614
636
|
calendar: {
|
|
637
|
+
details: {
|
|
638
|
+
when: string;
|
|
639
|
+
timeRange: string;
|
|
640
|
+
allDay: string;
|
|
641
|
+
location: string;
|
|
642
|
+
meeting: string;
|
|
643
|
+
join: string;
|
|
644
|
+
attendees: string;
|
|
645
|
+
attendeesCount_one: string;
|
|
646
|
+
attendeesCount_other: string;
|
|
647
|
+
response: {
|
|
648
|
+
accepted: string;
|
|
649
|
+
declined: string;
|
|
650
|
+
pending: string;
|
|
651
|
+
};
|
|
652
|
+
reminder: string;
|
|
653
|
+
reminderUnit: {
|
|
654
|
+
atStart: string;
|
|
655
|
+
minutes_one: string;
|
|
656
|
+
minutes_other: string;
|
|
657
|
+
hours_one: string;
|
|
658
|
+
hours_other: string;
|
|
659
|
+
days_one: string;
|
|
660
|
+
days_other: string;
|
|
661
|
+
};
|
|
662
|
+
notes: string;
|
|
663
|
+
};
|
|
615
664
|
previous: string;
|
|
616
665
|
next: string;
|
|
617
666
|
today: string;
|
|
@@ -624,15 +673,43 @@ declare const _default: Readonly<{
|
|
|
624
673
|
};
|
|
625
674
|
};
|
|
626
675
|
kanban: {
|
|
676
|
+
dueCompleted: string;
|
|
677
|
+
complete: string;
|
|
678
|
+
reopen: string;
|
|
679
|
+
completed: string;
|
|
680
|
+
collapseColumn: string;
|
|
681
|
+
expandColumn: string;
|
|
682
|
+
addCard: string;
|
|
683
|
+
addCardPlaceholder: string;
|
|
684
|
+
cardActions: string;
|
|
685
|
+
columnActions: string;
|
|
686
|
+
dueOverdue: string;
|
|
687
|
+
dueToday: string;
|
|
688
|
+
dueOn: string;
|
|
689
|
+
checklist: string;
|
|
690
|
+
comments_one: string;
|
|
691
|
+
comments_other: string;
|
|
692
|
+
attachments_one: string;
|
|
693
|
+
attachments_other: string;
|
|
694
|
+
assignees: string;
|
|
627
695
|
instructions: string;
|
|
628
696
|
lifted: string;
|
|
629
697
|
moving: string;
|
|
630
698
|
dropped: string;
|
|
631
699
|
cancelled: string;
|
|
632
700
|
overLimit: string;
|
|
701
|
+
emptyFiltered: string;
|
|
633
702
|
empty: string;
|
|
634
703
|
};
|
|
635
704
|
inbox: {
|
|
705
|
+
labels: string;
|
|
706
|
+
select: string;
|
|
707
|
+
messageActions: string;
|
|
708
|
+
threadCount_one: string;
|
|
709
|
+
threadCount_other: string;
|
|
710
|
+
cc: string;
|
|
711
|
+
openAttachment: string;
|
|
712
|
+
expandMessage: string;
|
|
636
713
|
listLabel: string;
|
|
637
714
|
folders: string;
|
|
638
715
|
empty: string;
|