@multiplatform.one/backoffice 7.7.0 → 7.7.2
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/dist/cjs/chrome/BackofficeAwesomebar.native.js +1 -1
- package/dist/cjs/chrome/BackofficeAwesomebar.native.js.map +1 -1
- package/dist/cjs/chrome/CommandPalette.native.js +1 -1
- package/dist/cjs/chrome/CommandPalette.native.js.map +1 -1
- package/dist/cjs/chrome/HelpMenu.native.js +1 -1
- package/dist/cjs/chrome/HelpMenu.native.js.map +1 -1
- package/dist/cjs/chrome/NotificationsButton.native.js +1 -1
- package/dist/cjs/chrome/NotificationsButton.native.js.map +1 -1
- package/dist/cjs/chrome/UserMenu.native.js +1 -1
- package/dist/cjs/chrome/UserMenu.native.js.map +1 -1
- package/dist/cjs/chrome/awesomebar-data.native.js.map +1 -1
- package/dist/cjs/chrome/command-palette-model.native.js +1 -1
- package/dist/cjs/chrome/command-palette-model.native.js.map +1 -1
- package/dist/cjs/chrome/help-about-dialog.native.js +1 -1
- package/dist/cjs/chrome/help-about-dialog.native.js.map +1 -1
- package/dist/cjs/chrome/help-shortcuts-dialog.native.js +1 -1
- package/dist/cjs/chrome/help-shortcuts-dialog.native.js.map +1 -1
- package/dist/cjs/chrome/notifications-data.native.js.map +1 -1
- package/dist/cjs/chrome/notifications-panel.native.js +1 -1
- package/dist/cjs/chrome/notifications-panel.native.js.map +1 -1
- package/dist/cjs/chrome/notifications-utils.native.js.map +1 -1
- package/dist/cjs/chrome/shortcuts.native.js.map +1 -1
- package/dist/cjs/chrome/user-session.native.js.map +1 -1
- package/dist/cjs/config/BackofficeProvider.native.js +1 -1
- package/dist/cjs/config/BackofficeProvider.native.js.map +1 -1
- package/dist/cjs/config/capabilities.native.js.map +1 -1
- package/dist/cjs/config/events.native.js.map +1 -1
- package/dist/cjs/config/slots.native.js.map +1 -1
- package/dist/cjs/desk/Desk.native.js.map +1 -1
- package/dist/cjs/desk/DeskSurface.native.js.map +1 -1
- package/dist/cjs/desk/resolveDeskPath.native.js.map +1 -1
- package/dist/cjs/desk/scope.native.js.map +1 -1
- package/dist/cjs/desk/target.native.js.map +1 -1
- package/dist/cjs/form/DocFormScreen.native.js +1 -1
- package/dist/cjs/form/DocFormScreen.native.js.map +1 -1
- package/dist/cjs/form/FormConnections.native.js +1 -1
- package/dist/cjs/form/FormConnections.native.js.map +1 -1
- package/dist/cjs/form/FormDialogs.native.js +1 -1
- package/dist/cjs/form/FormDialogs.native.js.map +1 -1
- package/dist/cjs/form/FormErrorBoundary.native.js +1 -1
- package/dist/cjs/form/FormErrorBoundary.native.js.map +1 -1
- package/dist/cjs/form/FormHeaderCluster.native.js +1 -1
- package/dist/cjs/form/FormHeaderCluster.native.js.map +1 -1
- package/dist/cjs/form/FormSidebarPanel.native.js +1 -1
- package/dist/cjs/form/FormSidebarPanel.native.js.map +1 -1
- package/dist/cjs/form/FormTimeline.native.js +1 -1
- package/dist/cjs/form/FormTimeline.native.js.map +1 -1
- package/dist/cjs/form/FormToolbar.native.js +1 -1
- package/dist/cjs/form/FormToolbar.native.js.map +1 -1
- package/dist/cjs/form/connections-data.native.js.map +1 -1
- package/dist/cjs/form/createPrefill.native.js.map +1 -1
- package/dist/cjs/form/dependsOn.native.js.map +1 -1
- package/dist/cjs/form/dirtyTracking.native.js.map +1 -1
- package/dist/cjs/form/docinfo.native.js.map +1 -1
- package/dist/cjs/form/fetchFrom.native.js.map +1 -1
- package/dist/cjs/form/fieldPermissions.native.js.map +1 -1
- package/dist/cjs/form/formActions.native.js.map +1 -1
- package/dist/cjs/form/formLayout.native.js.map +1 -1
- package/dist/cjs/form/platformHooks.native.js.map +1 -1
- package/dist/cjs/form/sidebar-attachments.native.js +1 -1
- package/dist/cjs/form/sidebar-attachments.native.js.map +1 -1
- package/dist/cjs/form/sidebar-dialogs.native.js +1 -1
- package/dist/cjs/form/sidebar-dialogs.native.js.map +1 -1
- package/dist/cjs/form/sidebar-people.native.js +1 -1
- package/dist/cjs/form/sidebar-people.native.js.map +1 -1
- package/dist/cjs/form/sidebar-rpc.native.js.map +1 -1
- package/dist/cjs/form/sidebar-utils.native.js.map +1 -1
- package/dist/cjs/form/timeline-entries.native.js.map +1 -1
- package/dist/cjs/form/timeline-utils.native.js.map +1 -1
- package/dist/cjs/form/useFormEngine.native.js.map +1 -1
- package/dist/cjs/i18n/en.native.js.map +1 -1
- package/dist/cjs/i18n/index.native.js.map +1 -1
- package/dist/cjs/index.native.js +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/list/AddTagsDialog.native.js +1 -1
- package/dist/cjs/list/AddTagsDialog.native.js.map +1 -1
- package/dist/cjs/list/AssignToDialog.native.js +1 -1
- package/dist/cjs/list/AssignToDialog.native.js.map +1 -1
- package/dist/cjs/list/DoctypeListScreen.native.js +1 -1
- package/dist/cjs/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/cjs/list/ListBulkActionsBar.native.js +1 -1
- package/dist/cjs/list/ListBulkActionsBar.native.js.map +1 -1
- package/dist/cjs/list/ListFilterBar.native.js +1 -1
- package/dist/cjs/list/ListFilterBar.native.js.map +1 -1
- package/dist/cjs/list/ListSidebar.native.js +1 -1
- package/dist/cjs/list/ListSidebar.native.js.map +1 -1
- package/dist/cjs/list/bulk-edit-dialog.native.js +1 -1
- package/dist/cjs/list/bulk-edit-dialog.native.js.map +1 -1
- package/dist/cjs/list/bulk-export.native.js.map +1 -1
- package/dist/cjs/list/bulk-submit-cancel.native.js.map +1 -1
- package/dist/cjs/list/bulkActions.native.js.map +1 -1
- package/dist/cjs/list/filter-chips.native.js +1 -1
- package/dist/cjs/list/filter-chips.native.js.map +1 -1
- package/dist/cjs/list/filter-editor.native.js +1 -1
- package/dist/cjs/list/filter-editor.native.js.map +1 -1
- package/dist/cjs/list/filter-fields.native.js.map +1 -1
- package/dist/cjs/list/filter-saved.native.js +1 -1
- package/dist/cjs/list/filter-saved.native.js.map +1 -1
- package/dist/cjs/list/filter-sort.native.js +1 -1
- package/dist/cjs/list/filter-sort.native.js.map +1 -1
- package/dist/cjs/list/filter-standard.native.js.map +1 -1
- package/dist/cjs/list/filterConversion.native.js.map +1 -1
- package/dist/cjs/list/list-tools-sheet.native.js +1 -1
- package/dist/cjs/list/list-tools-sheet.native.js.map +1 -1
- package/dist/cjs/list/listColumns.native.js.map +1 -1
- package/dist/cjs/list/listFields.native.js.map +1 -1
- package/dist/cjs/list/listFormat.native.js.map +1 -1
- package/dist/cjs/list/listUrlState.native.js.map +1 -1
- package/dist/cjs/list/sidebar-section.native.js +1 -1
- package/dist/cjs/list/sidebar-section.native.js.map +1 -1
- package/dist/cjs/list/sidebar-stats.native.js.map +1 -1
- package/dist/cjs/list/statusColors.native.js.map +1 -1
- package/dist/cjs/navigation/navigator.native.js.map +1 -1
- package/dist/cjs/navigation/paths.native.js.map +1 -1
- package/dist/cjs/oneAdapter/index.native.js.map +1 -1
- package/dist/cjs/quickEntry/QuickEntryDialog.native.js +1 -1
- package/dist/cjs/quickEntry/QuickEntryDialog.native.js.map +1 -1
- package/dist/cjs/quickEntry/quickEntryPlan.native.js.map +1 -1
- package/dist/cjs/report/DoctypeReportView.native.js +1 -1
- package/dist/cjs/report/DoctypeReportView.native.js.map +1 -1
- package/dist/cjs/report/QueryReportScreen.native.js +1 -1
- package/dist/cjs/report/QueryReportScreen.native.js.map +1 -1
- package/dist/cjs/report/queryReportColumns.native.js.map +1 -1
- package/dist/cjs/report/queryReportFilterBar.native.js +1 -1
- package/dist/cjs/report/queryReportFilterBar.native.js.map +1 -1
- package/dist/cjs/report/queryReportUrlState.native.js.map +1 -1
- package/dist/cjs/report/report-grid.native.js +1 -1
- package/dist/cjs/report/report-grid.native.js.map +1 -1
- package/dist/cjs/report/report-toolbar.native.js +1 -1
- package/dist/cjs/report/report-toolbar.native.js.map +1 -1
- package/dist/cjs/report/reportShapes.native.js.map +1 -1
- package/dist/cjs/report/reportViewModel.native.js.map +1 -1
- package/dist/cjs/report/savedReports.native.js.map +1 -1
- package/dist/cjs/report/useQueryReport.native.js.map +1 -1
- package/dist/cjs/shared/deskLinks.native.js.map +1 -1
- package/dist/cjs/shared/listNavContext.native.js.map +1 -1
- package/dist/cjs/shared/types.native.js.map +1 -1
- package/dist/cjs/shared/useDocinfo.native.js.map +1 -1
- package/dist/cjs/shared/useDoctypeMeta.native.js.map +1 -1
- package/dist/cjs/shared/useFrappeApp.native.js.map +1 -1
- package/dist/cjs/shared/useRecentVisit.native.js.map +1 -1
- package/dist/cjs/shared/useSessionUserId.native.js.map +1 -1
- package/dist/cjs/shared/useSlugTarget.native.js.map +1 -1
- package/dist/cjs/shared/useUserRoles.native.js.map +1 -1
- package/dist/cjs/shell/BackofficeShell.native.js +1 -1
- package/dist/cjs/shell/BackofficeShell.native.js.map +1 -1
- package/dist/cjs/shell/HomeRedirect.native.js +1 -1
- package/dist/cjs/shell/HomeRedirect.native.js.map +1 -1
- package/dist/cjs/shell/NotFoundScreen.native.js +1 -1
- package/dist/cjs/shell/NotFoundScreen.native.js.map +1 -1
- package/dist/cjs/shell/SlugScreen.native.js +1 -1
- package/dist/cjs/shell/SlugScreen.native.js.map +1 -1
- package/dist/cjs/shell/WorkspaceSidebar.native.js +1 -1
- package/dist/cjs/shell/WorkspaceSidebar.native.js.map +1 -1
- package/dist/cjs/shell/useWorkspaces.native.js.map +1 -1
- package/dist/cjs/shell/workspaceIcons.native.js.map +1 -1
- package/dist/cjs/views/CalendarView.native.js +1 -1
- package/dist/cjs/views/CalendarView.native.js.map +1 -1
- package/dist/cjs/views/DashboardView.native.js +1 -1
- package/dist/cjs/views/DashboardView.native.js.map +1 -1
- package/dist/cjs/views/DoctypeViewScreen.native.js.map +1 -1
- package/dist/cjs/views/ImageView.native.js +1 -1
- package/dist/cjs/views/ImageView.native.js.map +1 -1
- package/dist/cjs/views/KanbanView.native.js +1 -1
- package/dist/cjs/views/KanbanView.native.js.map +1 -1
- package/dist/cjs/views/ReportView.native.js +1 -1
- package/dist/cjs/views/ReportView.native.js.map +1 -1
- package/dist/cjs/views/TreeView.native.js +1 -1
- package/dist/cjs/views/TreeView.native.js.map +1 -1
- package/dist/cjs/views/ViewHeader.native.js +1 -1
- package/dist/cjs/views/ViewHeader.native.js.map +1 -1
- package/dist/cjs/views/ViewStates.native.js +1 -1
- package/dist/cjs/views/ViewStates.native.js.map +1 -1
- package/dist/cjs/views/ViewSwitcherMenu.native.js +1 -1
- package/dist/cjs/views/ViewSwitcherMenu.native.js.map +1 -1
- package/dist/cjs/views/calendar-field-selector.native.js +1 -1
- package/dist/cjs/views/calendar-field-selector.native.js.map +1 -1
- package/dist/cjs/views/connection.native.js.map +1 -1
- package/dist/cjs/views/dashboard-data.native.js.map +1 -1
- package/dist/cjs/views/deskViewConfigs.native.js.map +1 -1
- package/dist/cjs/views/kanban-board-controls.native.js +1 -1
- package/dist/cjs/views/kanban-board-controls.native.js.map +1 -1
- package/dist/cjs/views/kanban-field-picker.native.js +1 -1
- package/dist/cjs/views/kanban-field-picker.native.js.map +1 -1
- package/dist/cjs/views/kanbanBoardOps.native.js.map +1 -1
- package/dist/cjs/views/report-controls.native.js +1 -1
- package/dist/cjs/views/report-controls.native.js.map +1 -1
- package/dist/cjs/views/viewAvailability.native.js.map +1 -1
- package/dist/cjs/views/viewMeta.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceChartBlock.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceChartBlock.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceGrid.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceLinkCard.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceLinkCard.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceLinkDirectory.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceLinkDirectory.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceNumberCard.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceNumberCard.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceQuickList.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceQuickList.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceRecents.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceRecents.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceScreen.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceScreen.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceShortcut.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceShortcut.native.js.map +1 -1
- package/dist/cjs/workspace/parseContent.native.js.map +1 -1
- package/dist/cjs/workspace/types.native.js.map +1 -1
- package/dist/cjs/workspace/useDashboardChart.native.js.map +1 -1
- package/dist/cjs/workspace/useWorkspaceDoc.native.js.map +1 -1
- package/dist/esm/chrome/BackofficeAwesomebar.native.js.map +1 -1
- package/dist/esm/chrome/CommandPalette.native.js.map +1 -1
- package/dist/esm/chrome/HelpMenu.native.js.map +1 -1
- package/dist/esm/chrome/NotificationsButton.native.js.map +1 -1
- package/dist/esm/chrome/UserMenu.native.js.map +1 -1
- package/dist/esm/chrome/awesomebar-data.native.js.map +1 -1
- package/dist/esm/chrome/command-palette-model.native.js.map +1 -1
- package/dist/esm/chrome/help-about-dialog.native.js.map +1 -1
- package/dist/esm/chrome/help-shortcuts-dialog.native.js.map +1 -1
- package/dist/esm/chrome/notifications-data.native.js.map +1 -1
- package/dist/esm/chrome/notifications-panel.native.js.map +1 -1
- package/dist/esm/chrome/notifications-utils.native.js.map +1 -1
- package/dist/esm/chrome/shortcuts.native.js.map +1 -1
- package/dist/esm/chrome/user-session.native.js.map +1 -1
- package/dist/esm/config/BackofficeProvider.native.js.map +1 -1
- package/dist/esm/config/capabilities.native.js.map +1 -1
- package/dist/esm/config/events.native.js.map +1 -1
- package/dist/esm/config/slots.native.js.map +1 -1
- package/dist/esm/desk/Desk.native.js.map +1 -1
- package/dist/esm/desk/DeskSurface.native.js.map +1 -1
- package/dist/esm/desk/resolveDeskPath.native.js.map +1 -1
- package/dist/esm/desk/scope.native.js.map +1 -1
- package/dist/esm/desk/target.native.js.map +1 -1
- package/dist/esm/form/DocFormScreen.native.js.map +1 -1
- package/dist/esm/form/FormConnections.native.js.map +1 -1
- package/dist/esm/form/FormDialogs.native.js.map +1 -1
- package/dist/esm/form/FormErrorBoundary.native.js.map +1 -1
- package/dist/esm/form/FormHeaderCluster.native.js.map +1 -1
- package/dist/esm/form/FormSidebarPanel.native.js.map +1 -1
- package/dist/esm/form/FormTimeline.native.js.map +1 -1
- package/dist/esm/form/FormToolbar.native.js.map +1 -1
- package/dist/esm/form/connections-data.native.js.map +1 -1
- package/dist/esm/form/createPrefill.native.js.map +1 -1
- package/dist/esm/form/dependsOn.native.js.map +1 -1
- package/dist/esm/form/dirtyTracking.native.js.map +1 -1
- package/dist/esm/form/docinfo.native.js.map +1 -1
- package/dist/esm/form/fetchFrom.native.js.map +1 -1
- package/dist/esm/form/fieldPermissions.native.js.map +1 -1
- package/dist/esm/form/formActions.native.js.map +1 -1
- package/dist/esm/form/formLayout.native.js.map +1 -1
- package/dist/esm/form/platformHooks.native.js.map +1 -1
- package/dist/esm/form/sidebar-attachments.native.js.map +1 -1
- package/dist/esm/form/sidebar-dialogs.native.js.map +1 -1
- package/dist/esm/form/sidebar-people.native.js.map +1 -1
- package/dist/esm/form/sidebar-rpc.native.js.map +1 -1
- package/dist/esm/form/sidebar-utils.native.js.map +1 -1
- package/dist/esm/form/timeline-entries.native.js.map +1 -1
- package/dist/esm/form/timeline-utils.native.js.map +1 -1
- package/dist/esm/form/useFormEngine.native.js.map +1 -1
- package/dist/esm/i18n/en.native.js.map +1 -1
- package/dist/esm/i18n/index.native.js.map +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/list/AddTagsDialog.native.js.map +1 -1
- package/dist/esm/list/AssignToDialog.native.js.map +1 -1
- package/dist/esm/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/esm/list/ListBulkActionsBar.native.js.map +1 -1
- package/dist/esm/list/ListFilterBar.native.js.map +1 -1
- package/dist/esm/list/ListSidebar.native.js.map +1 -1
- package/dist/esm/list/bulk-edit-dialog.native.js.map +1 -1
- package/dist/esm/list/bulk-export.native.js.map +1 -1
- package/dist/esm/list/bulk-submit-cancel.native.js.map +1 -1
- package/dist/esm/list/bulkActions.native.js.map +1 -1
- package/dist/esm/list/filter-chips.native.js.map +1 -1
- package/dist/esm/list/filter-editor.native.js.map +1 -1
- package/dist/esm/list/filter-fields.native.js.map +1 -1
- package/dist/esm/list/filter-saved.native.js.map +1 -1
- package/dist/esm/list/filter-sort.native.js.map +1 -1
- package/dist/esm/list/filter-standard.native.js.map +1 -1
- package/dist/esm/list/filterConversion.native.js.map +1 -1
- package/dist/esm/list/list-tools-sheet.native.js.map +1 -1
- package/dist/esm/list/listColumns.native.js.map +1 -1
- package/dist/esm/list/listFields.native.js.map +1 -1
- package/dist/esm/list/listFormat.native.js.map +1 -1
- package/dist/esm/list/listUrlState.native.js.map +1 -1
- package/dist/esm/list/sidebar-section.native.js.map +1 -1
- package/dist/esm/list/sidebar-stats.native.js.map +1 -1
- package/dist/esm/list/statusColors.native.js.map +1 -1
- package/dist/esm/navigation/navigator.native.js.map +1 -1
- package/dist/esm/navigation/paths.native.js.map +1 -1
- package/dist/esm/oneAdapter/index.native.js.map +1 -1
- package/dist/esm/quickEntry/QuickEntryDialog.native.js.map +1 -1
- package/dist/esm/quickEntry/quickEntryPlan.native.js.map +1 -1
- package/dist/esm/report/DoctypeReportView.native.js.map +1 -1
- package/dist/esm/report/QueryReportScreen.native.js.map +1 -1
- package/dist/esm/report/queryReportColumns.native.js.map +1 -1
- package/dist/esm/report/queryReportFilterBar.native.js.map +1 -1
- package/dist/esm/report/queryReportUrlState.native.js.map +1 -1
- package/dist/esm/report/report-grid.native.js.map +1 -1
- package/dist/esm/report/report-toolbar.native.js.map +1 -1
- package/dist/esm/report/reportShapes.native.js.map +1 -1
- package/dist/esm/report/reportViewModel.native.js.map +1 -1
- package/dist/esm/report/savedReports.native.js.map +1 -1
- package/dist/esm/report/useQueryReport.native.js.map +1 -1
- package/dist/esm/shared/deskLinks.native.js.map +1 -1
- package/dist/esm/shared/listNavContext.native.js.map +1 -1
- package/dist/esm/shared/types.native.js.map +1 -1
- package/dist/esm/shared/useDocinfo.native.js.map +1 -1
- package/dist/esm/shared/useDoctypeMeta.native.js.map +1 -1
- package/dist/esm/shared/useFrappeApp.native.js.map +1 -1
- package/dist/esm/shared/useRecentVisit.native.js.map +1 -1
- package/dist/esm/shared/useSessionUserId.native.js.map +1 -1
- package/dist/esm/shared/useSlugTarget.native.js.map +1 -1
- package/dist/esm/shared/useUserRoles.native.js.map +1 -1
- package/dist/esm/shell/BackofficeShell.native.js.map +1 -1
- package/dist/esm/shell/HomeRedirect.native.js.map +1 -1
- package/dist/esm/shell/NotFoundScreen.native.js.map +1 -1
- package/dist/esm/shell/SlugScreen.native.js.map +1 -1
- package/dist/esm/shell/WorkspaceSidebar.native.js.map +1 -1
- package/dist/esm/shell/useWorkspaces.native.js.map +1 -1
- package/dist/esm/shell/workspaceIcons.native.js.map +1 -1
- package/dist/esm/views/CalendarView.native.js.map +1 -1
- package/dist/esm/views/DashboardView.native.js.map +1 -1
- package/dist/esm/views/DoctypeViewScreen.native.js.map +1 -1
- package/dist/esm/views/ImageView.native.js.map +1 -1
- package/dist/esm/views/KanbanView.native.js.map +1 -1
- package/dist/esm/views/ReportView.native.js.map +1 -1
- package/dist/esm/views/TreeView.native.js.map +1 -1
- package/dist/esm/views/ViewHeader.native.js.map +1 -1
- package/dist/esm/views/ViewStates.native.js.map +1 -1
- package/dist/esm/views/ViewSwitcherMenu.native.js.map +1 -1
- package/dist/esm/views/calendar-field-selector.native.js.map +1 -1
- package/dist/esm/views/connection.native.js.map +1 -1
- package/dist/esm/views/dashboard-data.native.js.map +1 -1
- package/dist/esm/views/deskViewConfigs.native.js.map +1 -1
- package/dist/esm/views/kanban-board-controls.native.js.map +1 -1
- package/dist/esm/views/kanban-field-picker.native.js.map +1 -1
- package/dist/esm/views/kanbanBoardOps.native.js.map +1 -1
- package/dist/esm/views/report-controls.native.js.map +1 -1
- package/dist/esm/views/viewAvailability.native.js.map +1 -1
- package/dist/esm/views/viewMeta.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceChartBlock.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceGrid.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceLinkCard.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceLinkDirectory.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceNumberCard.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceQuickList.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceRecents.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceScreen.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceShortcut.native.js.map +1 -1
- package/dist/esm/workspace/parseContent.native.js.map +1 -1
- package/dist/esm/workspace/types.native.js.map +1 -1
- package/dist/esm/workspace/useDashboardChart.native.js.map +1 -1
- package/dist/esm/workspace/useWorkspaceDoc.native.js.map +1 -1
- package/package.json +14 -13
- package/src/chrome/CommandPalette.spec.tsx +54 -0
- package/src/chrome/CommandPalette.stories.tsx +207 -0
- package/src/desk/Desk.spec.tsx +44 -0
- package/src/desk/Desk.stories.tsx +299 -0
- package/src/desk/DeskSurface.spec.tsx +160 -0
- package/src/desk/DeskSurface.stories.tsx +297 -0
- package/src/shell/NotFoundScreen.spec.tsx +51 -0
- package/src/shell/NotFoundScreen.stories.tsx +79 -0
- package/src/views/DoctypeViewScreen.spec.tsx +110 -0
- package/src/views/DoctypeViewScreen.stories.tsx +279 -0
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
// OWNER: backoffice screens workstream (MPO-189).
|
|
2
|
+
// DeskSurface stories: the target→surface switch. One arm per DeskTarget
|
|
3
|
+
// kind, so the whole dispatch table is visible in one place, plus the
|
|
4
|
+
// override registry (per-kind and per-doctype).
|
|
5
|
+
//
|
|
6
|
+
// Everything rides fixtures: doctype meta through the fixture provider's
|
|
7
|
+
// "DocType" collection (shared/useDoctypeMeta's fixture branch), rows and
|
|
8
|
+
// Workspace docs through the same InMemoryFixtureProvider. Query reports
|
|
9
|
+
// are the one surface with no fixture branch — they run three desk RPCs —
|
|
10
|
+
// so a fetch mock scoped to this story's mock host answers those and keeps
|
|
11
|
+
// every arm off the network.
|
|
12
|
+
import { Text, YStack } from "@multiplatform.one/components";
|
|
13
|
+
import { InMemoryFixtureProvider } from "@multiplatform.one/frappe";
|
|
14
|
+
import type { ReactNode } from "react";
|
|
15
|
+
import { BackofficeProvider } from "../config/BackofficeProvider";
|
|
16
|
+
import { createMemoryNavigator } from "../navigation/navigator";
|
|
17
|
+
import { DeskSurface, DeskSurfaceLoading, type DeskSurfaceProps } from "./DeskSurface";
|
|
18
|
+
import type { DeskTarget } from "./target";
|
|
19
|
+
|
|
20
|
+
const meta = {
|
|
21
|
+
title: "Screens/Backoffice/DeskSurface",
|
|
22
|
+
component: DeskSurface,
|
|
23
|
+
tags: ["!test"],
|
|
24
|
+
parameters: {
|
|
25
|
+
status: { type: "stable" },
|
|
26
|
+
layout: "fullscreen",
|
|
27
|
+
docs: {
|
|
28
|
+
description: {
|
|
29
|
+
component:
|
|
30
|
+
"The desk's target→surface switch: a resolved DeskTarget in, one wired screen out (home redirect, workspace page, list, alternate view, create form, document form, query report, not-found). It is pure dispatch — no fetch, no filter construction, no visual values — and the override registry lets a host replace a whole surface per kind, or per doctype under a kind.",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
export default meta;
|
|
36
|
+
|
|
37
|
+
const MOCK_HOST = "https://backoffice-desk-surface.mock.test";
|
|
38
|
+
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
// Fixtures
|
|
41
|
+
// ---------------------------------------------------------------------------
|
|
42
|
+
|
|
43
|
+
const TASK_DOCTYPE = "QaDeskTask";
|
|
44
|
+
|
|
45
|
+
/** Getdoctype-shaped meta doc for the fixture "DocType" collection. */
|
|
46
|
+
const taskMeta = {
|
|
47
|
+
name: TASK_DOCTYPE,
|
|
48
|
+
doctype: "DocType",
|
|
49
|
+
module: "QA",
|
|
50
|
+
title_field: "subject",
|
|
51
|
+
fields: [
|
|
52
|
+
{ fieldname: "subject", fieldtype: "Data", label: "Subject", in_list_view: 1, reqd: 1 },
|
|
53
|
+
{
|
|
54
|
+
fieldname: "status",
|
|
55
|
+
fieldtype: "Select",
|
|
56
|
+
label: "Status",
|
|
57
|
+
options: "Open\nWorking\nDone",
|
|
58
|
+
in_list_view: 1,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
fieldname: "priority",
|
|
62
|
+
fieldtype: "Select",
|
|
63
|
+
label: "Priority",
|
|
64
|
+
options: "High\nMedium\nLow",
|
|
65
|
+
in_list_view: 1,
|
|
66
|
+
},
|
|
67
|
+
{ fieldname: "owner_name", fieldtype: "Data", label: "Owner", in_list_view: 1 },
|
|
68
|
+
],
|
|
69
|
+
permissions: [{ role: "All", read: 1, write: 1, create: 1 }],
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const statuses = ["Open", "Working", "Done"];
|
|
73
|
+
const priorities = ["High", "Medium", "Low"];
|
|
74
|
+
const owners = ["ana", "bo", "cyrus", "dee"];
|
|
75
|
+
|
|
76
|
+
const firstTaskName = "QDT-0001";
|
|
77
|
+
|
|
78
|
+
const taskDocs = Array.from({ length: 12 }, (_, i) => ({
|
|
79
|
+
name: `QDT-${String(i + 1).padStart(4, "0")}`,
|
|
80
|
+
doctype: TASK_DOCTYPE,
|
|
81
|
+
subject: `Task ${i + 1}: ${["triage inbox", "ship release", "write docs", "fix flaky test"][i % 4]}`,
|
|
82
|
+
status: statuses[i % statuses.length],
|
|
83
|
+
priority: priorities[i % priorities.length],
|
|
84
|
+
owner_name: owners[i % owners.length],
|
|
85
|
+
}));
|
|
86
|
+
|
|
87
|
+
const workspaceDocs = [
|
|
88
|
+
{
|
|
89
|
+
name: "Tools",
|
|
90
|
+
doctype: "Workspace",
|
|
91
|
+
label: "Tools",
|
|
92
|
+
title: "Tools",
|
|
93
|
+
icon: "tool",
|
|
94
|
+
module: "Automation",
|
|
95
|
+
parent_page: "",
|
|
96
|
+
public: 1,
|
|
97
|
+
for_user: "",
|
|
98
|
+
sequence_id: 1,
|
|
99
|
+
is_hidden: 0,
|
|
100
|
+
content: JSON.stringify([
|
|
101
|
+
{
|
|
102
|
+
id: "h1",
|
|
103
|
+
type: "header",
|
|
104
|
+
data: { text: '<span class="h4"><b>Your Shortcuts</b></span>', col: 12 },
|
|
105
|
+
},
|
|
106
|
+
{ id: "s1", type: "shortcut", data: { shortcut_name: "Tasks", col: 3 } },
|
|
107
|
+
{
|
|
108
|
+
id: "p1",
|
|
109
|
+
type: "paragraph",
|
|
110
|
+
data: { text: "Everything on this page comes from fixtures.<br>", col: 12 },
|
|
111
|
+
},
|
|
112
|
+
]),
|
|
113
|
+
shortcuts: [{ name: "sc1", type: "DocType", link_to: TASK_DOCTYPE, label: "Tasks" }],
|
|
114
|
+
links: [],
|
|
115
|
+
charts: [],
|
|
116
|
+
number_cards: [],
|
|
117
|
+
quick_lists: [],
|
|
118
|
+
},
|
|
119
|
+
];
|
|
120
|
+
|
|
121
|
+
const makeFixtures = () =>
|
|
122
|
+
new InMemoryFixtureProvider({
|
|
123
|
+
DocType: [taskMeta],
|
|
124
|
+
Workspace: workspaceDocs,
|
|
125
|
+
"Notification Log": [],
|
|
126
|
+
[TASK_DOCTYPE]: taskDocs,
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
// ---------------------------------------------------------------------------
|
|
130
|
+
// Query-report RPCs. useQueryReport has no fixture branch (it calls
|
|
131
|
+
// frappe.client.get, query_report.get_script and query_report.run), so the
|
|
132
|
+
// `report` arm needs these three answered. Scoped to MOCK_HOST, installed
|
|
133
|
+
// once; stories only run on web. Same precedent as DeskShell.stories.
|
|
134
|
+
// ---------------------------------------------------------------------------
|
|
135
|
+
|
|
136
|
+
const reportColumns = [
|
|
137
|
+
{ label: "Task", fieldname: "task", fieldtype: "Data", width: "140" },
|
|
138
|
+
{ label: "Status", fieldname: "status", fieldtype: "Data", width: "110" },
|
|
139
|
+
{ label: "Owner", fieldname: "owner_name", fieldtype: "Data", width: "120" },
|
|
140
|
+
{ label: "Age (days)", fieldname: "age", fieldtype: "Int", width: "100" },
|
|
141
|
+
];
|
|
142
|
+
|
|
143
|
+
const reportRows = taskDocs.map((doc, i) => ({
|
|
144
|
+
task: doc.name,
|
|
145
|
+
status: doc.status,
|
|
146
|
+
owner_name: doc.owner_name,
|
|
147
|
+
age: (i * 3) % 41,
|
|
148
|
+
}));
|
|
149
|
+
|
|
150
|
+
function jsonResponse(body: unknown): Response {
|
|
151
|
+
return new Response(JSON.stringify(body), {
|
|
152
|
+
status: 200,
|
|
153
|
+
headers: { "Content-Type": "application/json" },
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
(() => {
|
|
158
|
+
if (typeof window === "undefined") return;
|
|
159
|
+
const w = window as unknown as Record<string, unknown>;
|
|
160
|
+
if (w.__deskSurfaceMockFetch) return;
|
|
161
|
+
w.__deskSurfaceMockFetch = true;
|
|
162
|
+
const realFetch = window.fetch.bind(window);
|
|
163
|
+
window.fetch = async (input: RequestInfo | URL, init?: RequestInit): Promise<Response> => {
|
|
164
|
+
const urlStr =
|
|
165
|
+
typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
|
|
166
|
+
if (!urlStr.startsWith(MOCK_HOST)) return realFetch(input as RequestInfo, init);
|
|
167
|
+
const { pathname } = new URL(urlStr);
|
|
168
|
+
if (pathname.endsWith("frappe.desk.query_report.run")) {
|
|
169
|
+
return jsonResponse({ message: { columns: reportColumns, result: reportRows } });
|
|
170
|
+
}
|
|
171
|
+
if (pathname.endsWith("frappe.desk.query_report.get_script")) {
|
|
172
|
+
return jsonResponse({ message: { script: null } });
|
|
173
|
+
}
|
|
174
|
+
if (pathname.endsWith("frappe.client.get")) {
|
|
175
|
+
return jsonResponse({
|
|
176
|
+
message: { name: "Open Tasks", report_name: "Open Tasks", ref_doctype: TASK_DOCTYPE },
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
// No session against the inert mock host: get_logged_user must answer
|
|
180
|
+
// null, not a truthy docname (BackofficeShell.stories precedent).
|
|
181
|
+
if (pathname.endsWith("frappe.auth.get_logged_user")) return jsonResponse({ message: null });
|
|
182
|
+
return jsonResponse({ data: [], message: [] });
|
|
183
|
+
};
|
|
184
|
+
})();
|
|
185
|
+
|
|
186
|
+
// ---------------------------------------------------------------------------
|
|
187
|
+
// Harness
|
|
188
|
+
// ---------------------------------------------------------------------------
|
|
189
|
+
|
|
190
|
+
function Surface({ target, children }: { target?: DeskTarget; children?: ReactNode }) {
|
|
191
|
+
return (
|
|
192
|
+
<BackofficeProvider
|
|
193
|
+
frappe={{ baseURL: MOCK_HOST, fixtures: makeFixtures() }}
|
|
194
|
+
navigation={createMemoryNavigator("/backoffice")}
|
|
195
|
+
>
|
|
196
|
+
<YStack flex={1} height={560} minHeight={0}>
|
|
197
|
+
{children ?? (target ? <DeskSurface target={target} /> : null)}
|
|
198
|
+
</YStack>
|
|
199
|
+
</BackofficeProvider>
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// ---------------------------------------------------------------------------
|
|
204
|
+
// One arm per DeskTarget kind
|
|
205
|
+
// ---------------------------------------------------------------------------
|
|
206
|
+
|
|
207
|
+
/** kind "list" — the doctype list surface, the desk's most-visited screen. */
|
|
208
|
+
export const List = () => <Surface target={{ kind: "list", doctype: TASK_DOCTYPE }} />;
|
|
209
|
+
List.storyName = "Main";
|
|
210
|
+
|
|
211
|
+
/** kind "home" — the home redirect, resolving the default workspace. */
|
|
212
|
+
export const Home = () => <Surface target={{ kind: "home" }} />;
|
|
213
|
+
|
|
214
|
+
/** kind "workspace" — a workspace page rendered from its fixture doc. */
|
|
215
|
+
export const Workspace = () => <Surface target={{ kind: "workspace", workspace: "Tools" }} />;
|
|
216
|
+
|
|
217
|
+
/** kind "view" — an alternate view; the switch hands off to DoctypeViewScreen. */
|
|
218
|
+
export const AlternateView = () => (
|
|
219
|
+
<Surface target={{ kind: "view", doctype: TASK_DOCTYPE, view: "kanban" }} />
|
|
220
|
+
);
|
|
221
|
+
|
|
222
|
+
/** kind "new" — create mode; `defaults` route through the ONE prefill stash. */
|
|
223
|
+
export const NewDocument = () => (
|
|
224
|
+
<Surface
|
|
225
|
+
target={{
|
|
226
|
+
kind: "new",
|
|
227
|
+
doctype: TASK_DOCTYPE,
|
|
228
|
+
defaults: { status: "Working", priority: "High" },
|
|
229
|
+
}}
|
|
230
|
+
/>
|
|
231
|
+
);
|
|
232
|
+
|
|
233
|
+
/** kind "form" — an existing document. */
|
|
234
|
+
export const Form = () => (
|
|
235
|
+
<Surface target={{ kind: "form", doctype: TASK_DOCTYPE, name: firstTaskName }} />
|
|
236
|
+
);
|
|
237
|
+
|
|
238
|
+
/** kind "report" — a Query/Script Report, served by the scoped RPC mock. */
|
|
239
|
+
export const Report = () => <Surface target={{ kind: "report", reportName: "Open Tasks" }} />;
|
|
240
|
+
|
|
241
|
+
/** kind "not-found" — a dead address. */
|
|
242
|
+
export const NotFound = () => <Surface target={{ kind: "not-found", slug: "no-such-doctype" }} />;
|
|
243
|
+
|
|
244
|
+
/** The resolving state: an ambiguous slug still in flight against the index. */
|
|
245
|
+
export const Loading = () => (
|
|
246
|
+
<Surface>
|
|
247
|
+
<DeskSurfaceLoading />
|
|
248
|
+
</Surface>
|
|
249
|
+
);
|
|
250
|
+
|
|
251
|
+
// ---------------------------------------------------------------------------
|
|
252
|
+
// Override registry
|
|
253
|
+
// ---------------------------------------------------------------------------
|
|
254
|
+
|
|
255
|
+
function TargetCard({ target }: DeskSurfaceProps) {
|
|
256
|
+
return (
|
|
257
|
+
<YStack
|
|
258
|
+
flex={1}
|
|
259
|
+
padding="$4"
|
|
260
|
+
gap="$2"
|
|
261
|
+
borderWidth={1}
|
|
262
|
+
borderColor="$borderColor"
|
|
263
|
+
borderRadius="$3"
|
|
264
|
+
backgroundColor="$color2"
|
|
265
|
+
>
|
|
266
|
+
<Text>{`host surface for kind "${target.kind}"`}</Text>
|
|
267
|
+
<Text>{JSON.stringify(target)}</Text>
|
|
268
|
+
</YStack>
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Per-kind override: the host replaces the whole list surface. The override
|
|
274
|
+
* receives the target and the readOnly flag — thin enough to wrap the
|
|
275
|
+
* built-in rather than reimplement it.
|
|
276
|
+
*/
|
|
277
|
+
export const OverrideByKind = () => (
|
|
278
|
+
<Surface>
|
|
279
|
+
<DeskSurface
|
|
280
|
+
target={{ kind: "list", doctype: TASK_DOCTYPE }}
|
|
281
|
+
overrides={{ list: TargetCard }}
|
|
282
|
+
/>
|
|
283
|
+
</Surface>
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Per-doctype override beats per-kind, and a miss falls through to the
|
|
288
|
+
* built-in: the same registry keyed by doctype under one kind.
|
|
289
|
+
*/
|
|
290
|
+
export const OverrideByDoctype = () => (
|
|
291
|
+
<Surface>
|
|
292
|
+
<DeskSurface
|
|
293
|
+
target={{ kind: "list", doctype: TASK_DOCTYPE }}
|
|
294
|
+
overrides={{ list: { [TASK_DOCTYPE]: TargetCard } }}
|
|
295
|
+
/>
|
|
296
|
+
</Surface>
|
|
297
|
+
);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NotFoundScreen specs (MPO-189) — the unmatched-path surface, mounted over
|
|
3
|
+
* the same fixture shape its stories use.
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { InMemoryFixtureProvider } from "@multiplatform.one/frappe";
|
|
7
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
8
|
+
import { fireEvent, screen } from "@testing-library/react";
|
|
9
|
+
import { describe, expect, it } from "vitest";
|
|
10
|
+
import { BackofficeProvider } from "../config/BackofficeProvider";
|
|
11
|
+
import { createMemoryNavigator, type MemoryNavigator } from "../navigation/navigator";
|
|
12
|
+
import { NotFoundScreen } from "./NotFoundScreen";
|
|
13
|
+
|
|
14
|
+
const MOCK_HOST = "https://backoffice-not-found-spec.mock.test";
|
|
15
|
+
|
|
16
|
+
function renderAt(path: string, basePath?: string) {
|
|
17
|
+
const navigation: MemoryNavigator = createMemoryNavigator(path);
|
|
18
|
+
renderWithProviders(
|
|
19
|
+
<BackofficeProvider
|
|
20
|
+
frappe={{ baseURL: MOCK_HOST, fixtures: new InMemoryFixtureProvider({}) }}
|
|
21
|
+
navigation={navigation}
|
|
22
|
+
basePath={basePath}
|
|
23
|
+
>
|
|
24
|
+
<NotFoundScreen />
|
|
25
|
+
</BackofficeProvider>,
|
|
26
|
+
);
|
|
27
|
+
return navigation;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
describe("<NotFoundScreen />", () => {
|
|
31
|
+
it("names the failed path so a dead deep link is diagnosable", () => {
|
|
32
|
+
renderAt("/backoffice/sales-invoice/SI-0001/edit");
|
|
33
|
+
expect(screen.getByText("Not found")).toBeTruthy();
|
|
34
|
+
expect(screen.getByText("/backoffice/sales-invoice/SI-0001/edit")).toBeTruthy();
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("REPLACES history with the default workspace, so Back does not bounce", () => {
|
|
38
|
+
const navigation = renderAt("/backoffice/no-such-thing");
|
|
39
|
+
fireEvent.click(screen.getByRole("button", { name: "Go to workspaces" }));
|
|
40
|
+
expect(navigation.getLocation().path).toBe("/backoffice");
|
|
41
|
+
// replace, not push: going back must not land on the dead address again.
|
|
42
|
+
navigation.back();
|
|
43
|
+
expect(navigation.getLocation().path).toBe("/backoffice");
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("honors a rebound basePath (mounted at /admin)", () => {
|
|
47
|
+
const navigation = renderAt("/admin/nope", "/admin");
|
|
48
|
+
fireEvent.click(screen.getByRole("button", { name: "Go to workspaces" }));
|
|
49
|
+
expect(navigation.getLocation().path).toBe("/admin");
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// OWNER: backoffice screens workstream (MPO-189).
|
|
2
|
+
// NotFoundScreen stories: the unmatched-path surface. Nothing here touches
|
|
3
|
+
// the network — the screen reads only the provider's location (the failed
|
|
4
|
+
// path becomes the description line) plus its navigator and paths (the "Go
|
|
5
|
+
// to workspaces" action), so an empty InMemoryFixtureProvider and a
|
|
6
|
+
// MemoryNavigator seeded at the dead path are the whole harness.
|
|
7
|
+
import { YStack } from "@multiplatform.one/components";
|
|
8
|
+
import { InMemoryFixtureProvider } from "@multiplatform.one/frappe";
|
|
9
|
+
import type { ReactNode } from "react";
|
|
10
|
+
import { BackofficeProvider } from "../config/BackofficeProvider";
|
|
11
|
+
import { createMemoryNavigator } from "../navigation/navigator";
|
|
12
|
+
import { NotFoundScreen } from "./NotFoundScreen";
|
|
13
|
+
|
|
14
|
+
const meta = {
|
|
15
|
+
title: "Screens/Backoffice/NotFoundScreen",
|
|
16
|
+
component: NotFoundScreen,
|
|
17
|
+
tags: ["!test"],
|
|
18
|
+
parameters: {
|
|
19
|
+
status: { type: "stable" },
|
|
20
|
+
layout: "fullscreen",
|
|
21
|
+
docs: {
|
|
22
|
+
description: {
|
|
23
|
+
component:
|
|
24
|
+
"Any backoffice path that matches no route pattern lands here (deep or malformed links, and the DeskSurface `not-found` target). Same EmptyState presentation as the SlugScreen unknown-slug state: the failed path is the description, and one button replaces history with the default workspace so Back does not bounce off the dead address again.",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
|
|
31
|
+
const MOCK_HOST = "https://backoffice-not-found.mock.test";
|
|
32
|
+
|
|
33
|
+
const deepLink = createMemoryNavigator("/backoffice/sales-invoice/SI-0001/edit");
|
|
34
|
+
const bareSlug = createMemoryNavigator("/backoffice/no-such-thing");
|
|
35
|
+
const rootPath = createMemoryNavigator("/backoffice");
|
|
36
|
+
|
|
37
|
+
function Host({
|
|
38
|
+
navigation,
|
|
39
|
+
children,
|
|
40
|
+
}: {
|
|
41
|
+
navigation: ReturnType<typeof createMemoryNavigator>;
|
|
42
|
+
children: ReactNode;
|
|
43
|
+
}) {
|
|
44
|
+
return (
|
|
45
|
+
<BackofficeProvider
|
|
46
|
+
frappe={{ baseURL: MOCK_HOST, fixtures: new InMemoryFixtureProvider({}) }}
|
|
47
|
+
navigation={navigation}
|
|
48
|
+
>
|
|
49
|
+
<YStack flex={1} height={420} justifyContent="center">
|
|
50
|
+
{children}
|
|
51
|
+
</YStack>
|
|
52
|
+
</BackofficeProvider>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** A malformed deep link: the whole path is echoed back as the description. */
|
|
57
|
+
export const Main = () => (
|
|
58
|
+
<Host navigation={deepLink}>
|
|
59
|
+
<NotFoundScreen />
|
|
60
|
+
</Host>
|
|
61
|
+
);
|
|
62
|
+
Main.storyName = "Main";
|
|
63
|
+
|
|
64
|
+
/** An unknown slug — what the slug index reports when it resolves to nothing. */
|
|
65
|
+
export const UnknownSlug = () => (
|
|
66
|
+
<Host navigation={bareSlug}>
|
|
67
|
+
<NotFoundScreen />
|
|
68
|
+
</Host>
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Mounted at the base path itself: `location.path` is the base, so the
|
|
73
|
+
* description shows it rather than collapsing to an empty line.
|
|
74
|
+
*/
|
|
75
|
+
export const AtBasePath = () => (
|
|
76
|
+
<Host navigation={rootPath}>
|
|
77
|
+
<NotFoundScreen />
|
|
78
|
+
</Host>
|
|
79
|
+
);
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DoctypeViewScreen specs (MPO-189) — the alternate-view dispatcher, over
|
|
3
|
+
* the same fixture shape its stories use.
|
|
4
|
+
*
|
|
5
|
+
* What is pinned here is DISPATCH, not any individual view's chrome: the
|
|
6
|
+
* shared header rides above every view, view="list" bounces to the list
|
|
7
|
+
* route by REPLACE, and the search-param overrides are read here rather
|
|
8
|
+
* than in the leaf views.
|
|
9
|
+
*/
|
|
10
|
+
import React from "react";
|
|
11
|
+
import { InMemoryFixtureProvider } from "@multiplatform.one/frappe";
|
|
12
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
13
|
+
import { screen, waitFor } from "@testing-library/react";
|
|
14
|
+
import { describe, expect, it } from "vitest";
|
|
15
|
+
import { BackofficeProvider } from "../config/BackofficeProvider";
|
|
16
|
+
import { createMemoryNavigator, type MemoryNavigator } from "../navigation/navigator";
|
|
17
|
+
import type { BackofficeView } from "../navigation/paths";
|
|
18
|
+
import { DoctypeViewScreen } from "./DoctypeViewScreen";
|
|
19
|
+
|
|
20
|
+
const MOCK_HOST = "https://backoffice-doctype-view-spec.mock.test";
|
|
21
|
+
const TASK_DOCTYPE = "QaViewTask";
|
|
22
|
+
|
|
23
|
+
const taskMeta = {
|
|
24
|
+
name: TASK_DOCTYPE,
|
|
25
|
+
doctype: "DocType",
|
|
26
|
+
module: "QA",
|
|
27
|
+
title_field: "subject",
|
|
28
|
+
fields: [
|
|
29
|
+
{ fieldname: "subject", fieldtype: "Data", label: "Subject", in_list_view: 1 },
|
|
30
|
+
{
|
|
31
|
+
fieldname: "status",
|
|
32
|
+
fieldtype: "Select",
|
|
33
|
+
label: "Status",
|
|
34
|
+
options: "Open\nWorking\nDone",
|
|
35
|
+
in_list_view: 1,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
permissions: [{ role: "All", read: 1 }],
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const makeFixtures = () =>
|
|
42
|
+
new InMemoryFixtureProvider({
|
|
43
|
+
DocType: [taskMeta],
|
|
44
|
+
"Notification Log": [],
|
|
45
|
+
[TASK_DOCTYPE]: [{ name: "QVT-0001", doctype: TASK_DOCTYPE, subject: "First", status: "Open" }],
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
function renderView(view: BackofficeView, path = "/backoffice") {
|
|
49
|
+
const navigation: MemoryNavigator = createMemoryNavigator(path);
|
|
50
|
+
renderWithProviders(
|
|
51
|
+
<BackofficeProvider
|
|
52
|
+
frappe={{ baseURL: MOCK_HOST, fixtures: makeFixtures() }}
|
|
53
|
+
navigation={navigation}
|
|
54
|
+
>
|
|
55
|
+
<DoctypeViewScreen doctype={TASK_DOCTYPE} view={view} />
|
|
56
|
+
</BackofficeProvider>,
|
|
57
|
+
);
|
|
58
|
+
return navigation;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
describe("<DoctypeViewScreen />", () => {
|
|
62
|
+
it("renders the shared header above every dispatched view", async () => {
|
|
63
|
+
for (const view of ["report", "kanban", "dashboard"] as const) {
|
|
64
|
+
const { unmount } = renderWithProviders(
|
|
65
|
+
<BackofficeProvider
|
|
66
|
+
frappe={{ baseURL: MOCK_HOST, fixtures: makeFixtures() }}
|
|
67
|
+
navigation={createMemoryNavigator("/backoffice")}
|
|
68
|
+
>
|
|
69
|
+
<DoctypeViewScreen doctype={TASK_DOCTYPE} view={view} />
|
|
70
|
+
</BackofficeProvider>,
|
|
71
|
+
);
|
|
72
|
+
// The doctype name is the page title on every view — that is the
|
|
73
|
+
// header, and it is what makes the switcher reachable from each one.
|
|
74
|
+
await waitFor(() => {
|
|
75
|
+
expect(screen.getAllByText(TASK_DOCTYPE).length).toBeGreaterThan(0);
|
|
76
|
+
});
|
|
77
|
+
unmount();
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it('view="list" REPLACES the location with the list route, keeping Back working', async () => {
|
|
82
|
+
const navigation = renderView("list");
|
|
83
|
+
await waitFor(() => {
|
|
84
|
+
expect(navigation.getLocation().path).toBe("/backoffice/qaviewtask");
|
|
85
|
+
});
|
|
86
|
+
// replace, not push: the /view/list address never enters history.
|
|
87
|
+
navigation.back();
|
|
88
|
+
expect(navigation.getLocation().path).toBe("/backoffice/qaviewtask");
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it("reads ?board= from the location so the leaf view stays param-free", async () => {
|
|
92
|
+
const navigation = renderView(
|
|
93
|
+
"kanban",
|
|
94
|
+
"/backoffice/qaviewtask/view/kanban?board=QA%20View%20Board",
|
|
95
|
+
);
|
|
96
|
+
expect(navigation.getLocation().params.board).toBe("QA View Board");
|
|
97
|
+
await waitFor(() => {
|
|
98
|
+
expect(screen.getAllByText(TASK_DOCTYPE).length).toBeGreaterThan(0);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it("renders a view the doctype's meta does not support rather than blanking", async () => {
|
|
103
|
+
// Tree on a flat doctype: the body owns the unsupported state, and the
|
|
104
|
+
// screen still paints its header instead of rendering nothing.
|
|
105
|
+
renderView("tree");
|
|
106
|
+
await waitFor(() => {
|
|
107
|
+
expect(screen.getAllByText(TASK_DOCTYPE).length).toBeGreaterThan(0);
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
});
|