@multiplatform.one/backoffice 7.75.0 → 7.77.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/dist/cjs/chrome/UserMenu.cjs +43 -28
- package/dist/cjs/chrome/UserMenu.native.js +44 -28
- package/dist/cjs/chrome/UserMenu.native.js.map +1 -1
- package/dist/cjs/chrome/awesomebar-data.cjs +79 -33
- package/dist/cjs/chrome/awesomebar-data.native.js +101 -45
- package/dist/cjs/chrome/awesomebar-data.native.js.map +1 -1
- package/dist/cjs/chrome/notifications-panel.cjs +22 -61
- package/dist/cjs/chrome/notifications-panel.native.js +22 -62
- package/dist/cjs/chrome/notifications-panel.native.js.map +1 -1
- package/dist/cjs/config/BackofficeProvider.native.js.map +1 -1
- package/dist/cjs/config/capabilities.cjs +4 -0
- package/dist/cjs/config/capabilities.native.js +4 -0
- package/dist/cjs/config/capabilities.native.js.map +1 -1
- package/dist/cjs/desk/Desk.cjs +6 -1
- package/dist/cjs/desk/Desk.native.js +6 -1
- package/dist/cjs/desk/Desk.native.js.map +1 -1
- package/dist/cjs/desk/DeskSurface.cjs +3 -0
- package/dist/cjs/desk/DeskSurface.native.js +3 -0
- package/dist/cjs/desk/DeskSurface.native.js.map +1 -1
- package/dist/cjs/desk/resolveDeskPath.cjs +5 -0
- package/dist/cjs/desk/resolveDeskPath.native.js +5 -0
- package/dist/cjs/desk/resolveDeskPath.native.js.map +1 -1
- package/dist/cjs/desk/target.cjs +4 -0
- package/dist/cjs/desk/target.native.js +4 -0
- package/dist/cjs/desk/target.native.js.map +1 -1
- package/dist/cjs/form/DocFormScreen.cjs +46 -44
- package/dist/cjs/form/DocFormScreen.native.js +49 -47
- package/dist/cjs/form/DocFormScreen.native.js.map +1 -1
- package/dist/cjs/form/FormConnections.cjs +54 -125
- package/dist/cjs/form/FormConnections.native.js +59 -127
- package/dist/cjs/form/FormConnections.native.js.map +1 -1
- package/dist/cjs/form/FormDialogs.cjs +9 -52
- package/dist/cjs/form/FormDialogs.native.js +7 -49
- package/dist/cjs/form/FormDialogs.native.js.map +1 -1
- package/dist/cjs/form/FormTimeline.cjs +17 -17
- package/dist/cjs/form/FormTimeline.native.js +17 -17
- package/dist/cjs/form/FormTimeline.native.js.map +1 -1
- package/dist/cjs/form/FormToolbar.cjs +76 -82
- package/dist/cjs/form/FormToolbar.native.js +76 -82
- package/dist/cjs/form/FormToolbar.native.js.map +1 -1
- package/dist/cjs/formBuilder/FormBuilderCanvas.cjs +16 -24
- package/dist/cjs/formBuilder/FormBuilderCanvas.native.js +16 -24
- package/dist/cjs/formBuilder/FormBuilderCanvas.native.js.map +1 -1
- package/dist/cjs/i18n/en.cjs +2 -3
- package/dist/cjs/i18n/en.native.js +2 -3
- package/dist/cjs/i18n/en.native.js.map +1 -1
- package/dist/cjs/index.cjs +6 -0
- package/dist/cjs/index.native.js +6 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/list/DoctypeListScreen.cjs +11 -17
- package/dist/cjs/list/DoctypeListScreen.native.js +15 -21
- package/dist/cjs/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/cjs/list/ListBulkActionsBar.cjs +10 -8
- package/dist/cjs/list/ListBulkActionsBar.native.js +10 -8
- package/dist/cjs/list/ListBulkActionsBar.native.js.map +1 -1
- package/dist/cjs/list/filter-editor.cjs +4 -6
- package/dist/cjs/list/filter-editor.native.js +4 -6
- package/dist/cjs/list/filter-editor.native.js.map +1 -1
- package/dist/cjs/list/filter-saved.cjs +4 -4
- package/dist/cjs/list/filter-saved.native.js +4 -4
- package/dist/cjs/list/filter-saved.native.js.map +1 -1
- package/dist/cjs/list/sidebar-section.cjs +11 -67
- package/dist/cjs/list/sidebar-section.native.js +11 -69
- package/dist/cjs/list/sidebar-section.native.js.map +1 -1
- package/dist/cjs/navigation/paths.cjs +8 -1
- package/dist/cjs/navigation/paths.native.js +9 -0
- package/dist/cjs/navigation/paths.native.js.map +1 -1
- package/dist/cjs/quickEntry/QuickEntryDialog.cjs +27 -26
- package/dist/cjs/quickEntry/QuickEntryDialog.native.js +27 -26
- package/dist/cjs/quickEntry/QuickEntryDialog.native.js.map +1 -1
- package/dist/cjs/report/QueryReportScreen.cjs +4 -6
- package/dist/cjs/report/QueryReportScreen.native.js +4 -6
- package/dist/cjs/report/QueryReportScreen.native.js.map +1 -1
- package/dist/cjs/shell/AllDoctypesScreen.cjs +331 -0
- package/dist/cjs/shell/AllDoctypesScreen.native.js +460 -0
- package/dist/cjs/shell/AllDoctypesScreen.native.js.map +1 -0
- package/dist/cjs/shell/BackofficeShell.cjs +22 -62
- package/dist/cjs/shell/BackofficeShell.native.js +22 -63
- package/dist/cjs/shell/BackofficeShell.native.js.map +1 -1
- package/dist/cjs/shell/WorkspaceSidebar.cjs +48 -149
- package/dist/cjs/shell/WorkspaceSidebar.native.js +51 -157
- package/dist/cjs/shell/WorkspaceSidebar.native.js.map +1 -1
- package/dist/cjs/shell/workspaceIcons.cjs +32 -0
- package/dist/cjs/shell/workspaceIcons.native.js +32 -0
- package/dist/cjs/shell/workspaceIcons.native.js.map +1 -1
- package/dist/cjs/views/ViewHeader.cjs +5 -10
- package/dist/cjs/views/ViewHeader.native.js +7 -12
- package/dist/cjs/views/ViewHeader.native.js.map +1 -1
- package/dist/cjs/views/ViewStates.cjs +5 -7
- package/dist/cjs/views/ViewStates.native.js +5 -7
- package/dist/cjs/views/ViewStates.native.js.map +1 -1
- package/dist/cjs/views/kanban-board-controls.cjs +4 -5
- package/dist/cjs/views/kanban-board-controls.native.js +4 -5
- package/dist/cjs/views/kanban-board-controls.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceLinkCard.cjs +22 -123
- package/dist/cjs/workspace/WorkspaceLinkCard.native.js +23 -128
- package/dist/cjs/workspace/WorkspaceLinkCard.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceLinkDirectory.cjs +0 -6
- package/dist/cjs/workspace/WorkspaceLinkDirectory.native.js +0 -12
- package/dist/cjs/workspace/WorkspaceLinkDirectory.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceNumberCard.cjs +23 -41
- package/dist/cjs/workspace/WorkspaceNumberCard.native.js +23 -41
- package/dist/cjs/workspace/WorkspaceNumberCard.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceQuickList.cjs +25 -21
- package/dist/cjs/workspace/WorkspaceQuickList.native.js +28 -25
- package/dist/cjs/workspace/WorkspaceQuickList.native.js.map +1 -1
- package/dist/esm/chrome/UserMenu.mjs +33 -18
- package/dist/esm/chrome/UserMenu.mjs.map +1 -1
- package/dist/esm/chrome/UserMenu.native.js +34 -18
- package/dist/esm/chrome/UserMenu.native.js.map +1 -1
- package/dist/esm/chrome/awesomebar-data.mjs +79 -33
- package/dist/esm/chrome/awesomebar-data.mjs.map +1 -1
- package/dist/esm/chrome/awesomebar-data.native.js +101 -45
- package/dist/esm/chrome/awesomebar-data.native.js.map +1 -1
- package/dist/esm/chrome/notifications-panel.mjs +25 -64
- package/dist/esm/chrome/notifications-panel.mjs.map +1 -1
- package/dist/esm/chrome/notifications-panel.native.js +25 -65
- package/dist/esm/chrome/notifications-panel.native.js.map +1 -1
- package/dist/esm/config/BackofficeProvider.mjs.map +1 -1
- package/dist/esm/config/BackofficeProvider.native.js.map +1 -1
- package/dist/esm/config/capabilities.mjs +4 -0
- package/dist/esm/config/capabilities.mjs.map +1 -1
- package/dist/esm/config/capabilities.native.js +4 -0
- package/dist/esm/config/capabilities.native.js.map +1 -1
- package/dist/esm/desk/Desk.mjs +6 -1
- package/dist/esm/desk/Desk.mjs.map +1 -1
- package/dist/esm/desk/Desk.native.js +6 -1
- package/dist/esm/desk/Desk.native.js.map +1 -1
- package/dist/esm/desk/DeskSurface.mjs +3 -0
- package/dist/esm/desk/DeskSurface.mjs.map +1 -1
- package/dist/esm/desk/DeskSurface.native.js +3 -0
- package/dist/esm/desk/DeskSurface.native.js.map +1 -1
- package/dist/esm/desk/resolveDeskPath.mjs +6 -1
- package/dist/esm/desk/resolveDeskPath.mjs.map +1 -1
- package/dist/esm/desk/resolveDeskPath.native.js +6 -1
- package/dist/esm/desk/resolveDeskPath.native.js.map +1 -1
- package/dist/esm/desk/target.mjs +4 -0
- package/dist/esm/desk/target.mjs.map +1 -1
- package/dist/esm/desk/target.native.js +4 -0
- package/dist/esm/desk/target.native.js.map +1 -1
- package/dist/esm/form/DocFormScreen.mjs +19 -17
- package/dist/esm/form/DocFormScreen.mjs.map +1 -1
- package/dist/esm/form/DocFormScreen.native.js +22 -20
- package/dist/esm/form/DocFormScreen.native.js.map +1 -1
- package/dist/esm/form/FormConnections.mjs +56 -127
- package/dist/esm/form/FormConnections.mjs.map +1 -1
- package/dist/esm/form/FormConnections.native.js +61 -129
- package/dist/esm/form/FormConnections.native.js.map +1 -1
- package/dist/esm/form/FormDialogs.mjs +11 -54
- package/dist/esm/form/FormDialogs.mjs.map +1 -1
- package/dist/esm/form/FormDialogs.native.js +9 -51
- package/dist/esm/form/FormDialogs.native.js.map +1 -1
- package/dist/esm/form/FormTimeline.mjs +17 -17
- package/dist/esm/form/FormTimeline.mjs.map +1 -1
- package/dist/esm/form/FormTimeline.native.js +17 -17
- package/dist/esm/form/FormTimeline.native.js.map +1 -1
- package/dist/esm/form/FormToolbar.mjs +77 -83
- package/dist/esm/form/FormToolbar.mjs.map +1 -1
- package/dist/esm/form/FormToolbar.native.js +77 -83
- package/dist/esm/form/FormToolbar.native.js.map +1 -1
- package/dist/esm/formBuilder/FormBuilderCanvas.mjs +19 -27
- package/dist/esm/formBuilder/FormBuilderCanvas.mjs.map +1 -1
- package/dist/esm/formBuilder/FormBuilderCanvas.native.js +19 -27
- package/dist/esm/formBuilder/FormBuilderCanvas.native.js.map +1 -1
- package/dist/esm/i18n/en.mjs +2 -3
- package/dist/esm/i18n/en.mjs.map +1 -1
- package/dist/esm/i18n/en.native.js +2 -3
- package/dist/esm/i18n/en.native.js.map +1 -1
- package/dist/esm/index.mjs +4 -3
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +4 -3
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/list/DoctypeListScreen.mjs +12 -18
- package/dist/esm/list/DoctypeListScreen.mjs.map +1 -1
- package/dist/esm/list/DoctypeListScreen.native.js +16 -22
- package/dist/esm/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/esm/list/ListBulkActionsBar.mjs +11 -9
- package/dist/esm/list/ListBulkActionsBar.mjs.map +1 -1
- package/dist/esm/list/ListBulkActionsBar.native.js +11 -9
- package/dist/esm/list/ListBulkActionsBar.native.js.map +1 -1
- package/dist/esm/list/filter-editor.mjs +5 -7
- package/dist/esm/list/filter-editor.mjs.map +1 -1
- package/dist/esm/list/filter-editor.native.js +5 -7
- package/dist/esm/list/filter-editor.native.js.map +1 -1
- package/dist/esm/list/filter-saved.mjs +6 -6
- package/dist/esm/list/filter-saved.mjs.map +1 -1
- package/dist/esm/list/filter-saved.native.js +6 -6
- package/dist/esm/list/filter-saved.native.js.map +1 -1
- package/dist/esm/list/sidebar-section.mjs +15 -71
- package/dist/esm/list/sidebar-section.mjs.map +1 -1
- package/dist/esm/list/sidebar-section.native.js +13 -71
- package/dist/esm/list/sidebar-section.native.js.map +1 -1
- package/dist/esm/navigation/paths.mjs +7 -2
- package/dist/esm/navigation/paths.mjs.map +1 -1
- package/dist/esm/navigation/paths.native.js +8 -1
- package/dist/esm/navigation/paths.native.js.map +1 -1
- package/dist/esm/quickEntry/QuickEntryDialog.mjs +10 -9
- package/dist/esm/quickEntry/QuickEntryDialog.mjs.map +1 -1
- package/dist/esm/quickEntry/QuickEntryDialog.native.js +10 -9
- package/dist/esm/quickEntry/QuickEntryDialog.native.js.map +1 -1
- package/dist/esm/report/QueryReportScreen.mjs +5 -7
- package/dist/esm/report/QueryReportScreen.mjs.map +1 -1
- package/dist/esm/report/QueryReportScreen.native.js +5 -7
- package/dist/esm/report/QueryReportScreen.native.js.map +1 -1
- package/dist/esm/shell/AllDoctypesScreen.mjs +304 -0
- package/dist/esm/shell/AllDoctypesScreen.mjs.map +1 -0
- package/dist/esm/shell/AllDoctypesScreen.native.js +430 -0
- package/dist/esm/shell/AllDoctypesScreen.native.js.map +1 -0
- package/dist/esm/shell/BackofficeShell.mjs +25 -65
- package/dist/esm/shell/BackofficeShell.mjs.map +1 -1
- package/dist/esm/shell/BackofficeShell.native.js +25 -66
- package/dist/esm/shell/BackofficeShell.native.js.map +1 -1
- package/dist/esm/shell/WorkspaceSidebar.mjs +50 -151
- package/dist/esm/shell/WorkspaceSidebar.mjs.map +1 -1
- package/dist/esm/shell/WorkspaceSidebar.native.js +53 -159
- package/dist/esm/shell/WorkspaceSidebar.native.js.map +1 -1
- package/dist/esm/shell/workspaceIcons.mjs +33 -2
- package/dist/esm/shell/workspaceIcons.mjs.map +1 -1
- package/dist/esm/shell/workspaceIcons.native.js +33 -2
- package/dist/esm/shell/workspaceIcons.native.js.map +1 -1
- package/dist/esm/views/ViewHeader.mjs +7 -12
- package/dist/esm/views/ViewHeader.mjs.map +1 -1
- package/dist/esm/views/ViewHeader.native.js +9 -14
- package/dist/esm/views/ViewHeader.native.js.map +1 -1
- package/dist/esm/views/ViewStates.mjs +6 -8
- package/dist/esm/views/ViewStates.mjs.map +1 -1
- package/dist/esm/views/ViewStates.native.js +6 -8
- package/dist/esm/views/ViewStates.native.js.map +1 -1
- package/dist/esm/views/kanban-board-controls.mjs +6 -7
- package/dist/esm/views/kanban-board-controls.mjs.map +1 -1
- package/dist/esm/views/kanban-board-controls.native.js +6 -7
- package/dist/esm/views/kanban-board-controls.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceLinkCard.mjs +24 -125
- package/dist/esm/workspace/WorkspaceLinkCard.mjs.map +1 -1
- package/dist/esm/workspace/WorkspaceLinkCard.native.js +25 -130
- package/dist/esm/workspace/WorkspaceLinkCard.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceLinkDirectory.mjs +0 -6
- package/dist/esm/workspace/WorkspaceLinkDirectory.mjs.map +1 -1
- package/dist/esm/workspace/WorkspaceLinkDirectory.native.js +0 -12
- package/dist/esm/workspace/WorkspaceLinkDirectory.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceNumberCard.mjs +24 -42
- package/dist/esm/workspace/WorkspaceNumberCard.mjs.map +1 -1
- package/dist/esm/workspace/WorkspaceNumberCard.native.js +24 -42
- package/dist/esm/workspace/WorkspaceNumberCard.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceQuickList.mjs +24 -20
- package/dist/esm/workspace/WorkspaceQuickList.mjs.map +1 -1
- package/dist/esm/workspace/WorkspaceQuickList.native.js +27 -24
- package/dist/esm/workspace/WorkspaceQuickList.native.js.map +1 -1
- package/dist/jsx/chrome/UserMenu.mjs +33 -18
- package/dist/jsx/chrome/UserMenu.mjs.map +1 -1
- package/dist/jsx/chrome/UserMenu.native.js +44 -28
- package/dist/jsx/chrome/UserMenu.native.js.map +1 -1
- package/dist/jsx/chrome/awesomebar-data.mjs +79 -33
- package/dist/jsx/chrome/awesomebar-data.mjs.map +1 -1
- package/dist/jsx/chrome/awesomebar-data.native.js +101 -45
- package/dist/jsx/chrome/awesomebar-data.native.js.map +1 -1
- package/dist/jsx/chrome/notifications-panel.mjs +25 -64
- package/dist/jsx/chrome/notifications-panel.mjs.map +1 -1
- package/dist/jsx/chrome/notifications-panel.native.js +22 -62
- package/dist/jsx/chrome/notifications-panel.native.js.map +1 -1
- package/dist/jsx/config/BackofficeProvider.mjs.map +1 -1
- package/dist/jsx/config/BackofficeProvider.native.js.map +1 -1
- package/dist/jsx/config/capabilities.mjs +4 -0
- package/dist/jsx/config/capabilities.mjs.map +1 -1
- package/dist/jsx/config/capabilities.native.js +4 -0
- package/dist/jsx/config/capabilities.native.js.map +1 -1
- package/dist/jsx/desk/Desk.mjs +6 -1
- package/dist/jsx/desk/Desk.mjs.map +1 -1
- package/dist/jsx/desk/Desk.native.js +6 -1
- package/dist/jsx/desk/Desk.native.js.map +1 -1
- package/dist/jsx/desk/DeskSurface.mjs +3 -0
- package/dist/jsx/desk/DeskSurface.mjs.map +1 -1
- package/dist/jsx/desk/DeskSurface.native.js +3 -0
- package/dist/jsx/desk/DeskSurface.native.js.map +1 -1
- package/dist/jsx/desk/resolveDeskPath.mjs +6 -1
- package/dist/jsx/desk/resolveDeskPath.mjs.map +1 -1
- package/dist/jsx/desk/resolveDeskPath.native.js +5 -0
- package/dist/jsx/desk/resolveDeskPath.native.js.map +1 -1
- package/dist/jsx/desk/target.mjs +4 -0
- package/dist/jsx/desk/target.mjs.map +1 -1
- package/dist/jsx/desk/target.native.js +4 -0
- package/dist/jsx/desk/target.native.js.map +1 -1
- package/dist/jsx/form/DocFormScreen.mjs +19 -17
- package/dist/jsx/form/DocFormScreen.mjs.map +1 -1
- package/dist/jsx/form/DocFormScreen.native.js +49 -47
- package/dist/jsx/form/DocFormScreen.native.js.map +1 -1
- package/dist/jsx/form/FormConnections.mjs +56 -127
- package/dist/jsx/form/FormConnections.mjs.map +1 -1
- package/dist/jsx/form/FormConnections.native.js +59 -127
- package/dist/jsx/form/FormConnections.native.js.map +1 -1
- package/dist/jsx/form/FormDialogs.mjs +11 -54
- package/dist/jsx/form/FormDialogs.mjs.map +1 -1
- package/dist/jsx/form/FormDialogs.native.js +7 -49
- package/dist/jsx/form/FormDialogs.native.js.map +1 -1
- package/dist/jsx/form/FormTimeline.mjs +17 -17
- package/dist/jsx/form/FormTimeline.mjs.map +1 -1
- package/dist/jsx/form/FormTimeline.native.js +17 -17
- package/dist/jsx/form/FormTimeline.native.js.map +1 -1
- package/dist/jsx/form/FormToolbar.mjs +77 -83
- package/dist/jsx/form/FormToolbar.mjs.map +1 -1
- package/dist/jsx/form/FormToolbar.native.js +76 -82
- package/dist/jsx/form/FormToolbar.native.js.map +1 -1
- package/dist/jsx/formBuilder/FormBuilderCanvas.mjs +19 -27
- package/dist/jsx/formBuilder/FormBuilderCanvas.mjs.map +1 -1
- package/dist/jsx/formBuilder/FormBuilderCanvas.native.js +16 -24
- package/dist/jsx/formBuilder/FormBuilderCanvas.native.js.map +1 -1
- package/dist/jsx/i18n/en.mjs +2 -3
- package/dist/jsx/i18n/en.mjs.map +1 -1
- package/dist/jsx/i18n/en.native.js +2 -3
- package/dist/jsx/i18n/en.native.js.map +1 -1
- package/dist/jsx/index.js +4 -3
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +4 -3
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +6 -0
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/list/DoctypeListScreen.mjs +12 -18
- package/dist/jsx/list/DoctypeListScreen.mjs.map +1 -1
- package/dist/jsx/list/DoctypeListScreen.native.js +15 -21
- package/dist/jsx/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/jsx/list/ListBulkActionsBar.mjs +11 -9
- package/dist/jsx/list/ListBulkActionsBar.mjs.map +1 -1
- package/dist/jsx/list/ListBulkActionsBar.native.js +10 -8
- package/dist/jsx/list/ListBulkActionsBar.native.js.map +1 -1
- package/dist/jsx/list/filter-editor.mjs +5 -7
- package/dist/jsx/list/filter-editor.mjs.map +1 -1
- package/dist/jsx/list/filter-editor.native.js +4 -6
- package/dist/jsx/list/filter-editor.native.js.map +1 -1
- package/dist/jsx/list/filter-saved.mjs +6 -6
- package/dist/jsx/list/filter-saved.mjs.map +1 -1
- package/dist/jsx/list/filter-saved.native.js +4 -4
- package/dist/jsx/list/filter-saved.native.js.map +1 -1
- package/dist/jsx/list/sidebar-section.mjs +15 -71
- package/dist/jsx/list/sidebar-section.mjs.map +1 -1
- package/dist/jsx/list/sidebar-section.native.js +11 -69
- package/dist/jsx/list/sidebar-section.native.js.map +1 -1
- package/dist/jsx/navigation/paths.mjs +7 -2
- package/dist/jsx/navigation/paths.mjs.map +1 -1
- package/dist/jsx/navigation/paths.native.js +9 -0
- package/dist/jsx/navigation/paths.native.js.map +1 -1
- package/dist/jsx/quickEntry/QuickEntryDialog.mjs +10 -9
- package/dist/jsx/quickEntry/QuickEntryDialog.mjs.map +1 -1
- package/dist/jsx/quickEntry/QuickEntryDialog.native.js +27 -26
- package/dist/jsx/quickEntry/QuickEntryDialog.native.js.map +1 -1
- package/dist/jsx/report/QueryReportScreen.mjs +5 -7
- package/dist/jsx/report/QueryReportScreen.mjs.map +1 -1
- package/dist/jsx/report/QueryReportScreen.native.js +4 -6
- package/dist/jsx/report/QueryReportScreen.native.js.map +1 -1
- package/dist/jsx/shell/AllDoctypesScreen.mjs +304 -0
- package/dist/jsx/shell/AllDoctypesScreen.mjs.map +1 -0
- package/dist/jsx/shell/AllDoctypesScreen.native.js +460 -0
- package/dist/jsx/shell/AllDoctypesScreen.native.js.map +1 -0
- package/dist/jsx/shell/BackofficeShell.mjs +25 -65
- package/dist/jsx/shell/BackofficeShell.mjs.map +1 -1
- package/dist/jsx/shell/BackofficeShell.native.js +22 -63
- package/dist/jsx/shell/BackofficeShell.native.js.map +1 -1
- package/dist/jsx/shell/WorkspaceSidebar.mjs +50 -151
- package/dist/jsx/shell/WorkspaceSidebar.mjs.map +1 -1
- package/dist/jsx/shell/WorkspaceSidebar.native.js +51 -157
- package/dist/jsx/shell/WorkspaceSidebar.native.js.map +1 -1
- package/dist/jsx/shell/workspaceIcons.mjs +33 -2
- package/dist/jsx/shell/workspaceIcons.mjs.map +1 -1
- package/dist/jsx/shell/workspaceIcons.native.js +32 -0
- package/dist/jsx/shell/workspaceIcons.native.js.map +1 -1
- package/dist/jsx/views/ViewHeader.mjs +7 -12
- package/dist/jsx/views/ViewHeader.mjs.map +1 -1
- package/dist/jsx/views/ViewHeader.native.js +7 -12
- package/dist/jsx/views/ViewHeader.native.js.map +1 -1
- package/dist/jsx/views/ViewStates.mjs +6 -8
- package/dist/jsx/views/ViewStates.mjs.map +1 -1
- package/dist/jsx/views/ViewStates.native.js +5 -7
- package/dist/jsx/views/ViewStates.native.js.map +1 -1
- package/dist/jsx/views/kanban-board-controls.mjs +6 -7
- package/dist/jsx/views/kanban-board-controls.mjs.map +1 -1
- package/dist/jsx/views/kanban-board-controls.native.js +4 -5
- package/dist/jsx/views/kanban-board-controls.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceLinkCard.mjs +24 -125
- package/dist/jsx/workspace/WorkspaceLinkCard.mjs.map +1 -1
- package/dist/jsx/workspace/WorkspaceLinkCard.native.js +23 -128
- package/dist/jsx/workspace/WorkspaceLinkCard.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceLinkDirectory.mjs +0 -6
- package/dist/jsx/workspace/WorkspaceLinkDirectory.mjs.map +1 -1
- package/dist/jsx/workspace/WorkspaceLinkDirectory.native.js +0 -12
- package/dist/jsx/workspace/WorkspaceLinkDirectory.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceNumberCard.mjs +24 -42
- package/dist/jsx/workspace/WorkspaceNumberCard.mjs.map +1 -1
- package/dist/jsx/workspace/WorkspaceNumberCard.native.js +23 -41
- package/dist/jsx/workspace/WorkspaceNumberCard.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceQuickList.mjs +24 -20
- package/dist/jsx/workspace/WorkspaceQuickList.mjs.map +1 -1
- package/dist/jsx/workspace/WorkspaceQuickList.native.js +28 -25
- package/dist/jsx/workspace/WorkspaceQuickList.native.js.map +1 -1
- package/package.json +12 -12
- package/src/backofficeScreens.designLaw.spec.ts +2 -2
- package/src/chrome/CommandPalette.spec.tsx +12 -0
- package/src/chrome/NotificationsButton.screen.spec.tsx +2 -0
- package/src/chrome/UserMenu.screen.spec.tsx +8 -0
- package/src/chrome/UserMenu.tsx +27 -17
- package/src/chrome/awesomebar-data.tsx +115 -38
- package/src/chrome/notifications-panel.tsx +23 -64
- package/src/config/BackofficeProvider.tsx +9 -4
- package/src/config/capabilities.spec.ts +19 -1
- package/src/config/capabilities.ts +13 -4
- package/src/desk/Desk.tsx +20 -4
- package/src/desk/DeskSurface.tsx +3 -0
- package/src/desk/resolveDeskPath.spec.ts +4 -0
- package/src/desk/resolveDeskPath.ts +7 -1
- package/src/desk/target.ts +3 -0
- package/src/form/DocFormScreen.tsx +19 -10
- package/src/form/FormConnections.tsx +86 -153
- package/src/form/FormDialogs.tsx +21 -50
- package/src/form/FormTimeline.tsx +10 -11
- package/src/form/FormToolbar.screen.spec.tsx +15 -0
- package/src/form/FormToolbar.tsx +74 -86
- package/src/form/JumpToFieldDialog.stories.tsx +37 -0
- package/src/formBuilder/FormBuilderCanvas.tsx +27 -23
- package/src/i18n/en.ts +2 -3
- package/src/index.ts +7 -1
- package/src/list/DoctypeListScreen.compactHead.screen.spec.tsx +1 -1
- package/src/list/DoctypeListScreen.tsx +12 -16
- package/src/list/ListBulkActionsBar.tsx +12 -9
- package/src/list/filter-editor.tsx +6 -4
- package/src/list/filter-saved.tsx +6 -7
- package/src/list/sidebar-section.spec.tsx +15 -1
- package/src/list/sidebar-section.tsx +12 -70
- package/src/navigation/paths.ts +11 -0
- package/src/quickEntry/QuickEntryDialog.tsx +13 -7
- package/src/report/QueryReportScreen.spec.tsx +0 -1
- package/src/report/QueryReportScreen.tsx +5 -8
- package/src/shell/AllDoctypes.stories.tsx +164 -0
- package/src/shell/AllDoctypesScreen.screen.spec.tsx +290 -0
- package/src/shell/AllDoctypesScreen.tsx +389 -0
- package/src/shell/BackofficeShell.spec.tsx +11 -5
- package/src/shell/BackofficeShell.tsx +33 -64
- package/src/shell/WorkspaceSidebar.spec.tsx +40 -24
- package/src/shell/WorkspaceSidebar.tsx +75 -171
- package/src/shell/workspaceIcons.ts +45 -0
- package/src/views/CalendarView.screen.spec.tsx +1 -1
- package/src/views/ImageView.screen.spec.tsx +1 -1
- package/src/views/KanbanView.screen.spec.tsx +1 -1
- package/src/views/ViewHeader.tsx +7 -13
- package/src/views/ViewStates.tsx +6 -9
- package/src/views/kanban-board-controls.tsx +12 -4
- package/src/workspace/WorkspaceLinkCard.tsx +37 -113
- package/src/workspace/WorkspaceLinkDirectory.tsx +1 -16
- package/src/workspace/WorkspaceNumberCard.tsx +11 -21
- package/src/workspace/WorkspaceQuickList.tsx +27 -23
- package/types/chrome/UserMenu.d.ts.map +1 -1
- package/types/chrome/awesomebar-data.d.ts +14 -3
- package/types/chrome/awesomebar-data.d.ts.map +1 -1
- package/types/chrome/notifications-panel.d.ts.map +1 -1
- package/types/config/BackofficeProvider.d.ts +9 -4
- package/types/config/BackofficeProvider.d.ts.map +1 -1
- package/types/config/capabilities.d.ts +7 -1
- package/types/config/capabilities.d.ts.map +1 -1
- package/types/desk/Desk.d.ts +8 -3
- package/types/desk/Desk.d.ts.map +1 -1
- package/types/desk/DeskSurface.d.ts.map +1 -1
- package/types/desk/resolveDeskPath.d.ts +3 -1
- package/types/desk/resolveDeskPath.d.ts.map +1 -1
- package/types/desk/target.d.ts +2 -0
- package/types/desk/target.d.ts.map +1 -1
- package/types/form/DocFormScreen.d.ts.map +1 -1
- package/types/form/FormConnections.d.ts.map +1 -1
- package/types/form/FormDialogs.d.ts.map +1 -1
- package/types/form/FormTimeline.d.ts.map +1 -1
- package/types/form/FormToolbar.d.ts.map +1 -1
- package/types/formBuilder/FormBuilderCanvas.d.ts.map +1 -1
- package/types/i18n/en.d.ts +2 -3
- package/types/i18n/en.d.ts.map +1 -1
- package/types/index.d.ts +6 -4
- package/types/index.d.ts.map +1 -1
- package/types/list/DoctypeListScreen.d.ts.map +1 -1
- package/types/list/ListBulkActionsBar.d.ts.map +1 -1
- package/types/list/filter-editor.d.ts.map +1 -1
- package/types/list/filter-saved.d.ts.map +1 -1
- package/types/list/sidebar-section.d.ts +1 -1
- package/types/list/sidebar-section.d.ts.map +1 -1
- package/types/navigation/paths.d.ts +6 -0
- package/types/navigation/paths.d.ts.map +1 -1
- package/types/quickEntry/QuickEntryDialog.d.ts.map +1 -1
- package/types/report/QueryReportScreen.d.ts.map +1 -1
- package/types/shell/AllDoctypesScreen.d.ts +18 -0
- package/types/shell/AllDoctypesScreen.d.ts.map +1 -0
- package/types/shell/BackofficeShell.d.ts.map +1 -1
- package/types/shell/WorkspaceSidebar.d.ts +8 -1
- package/types/shell/WorkspaceSidebar.d.ts.map +1 -1
- package/types/shell/workspaceIcons.d.ts +2 -0
- package/types/shell/workspaceIcons.d.ts.map +1 -1
- package/types/views/ViewHeader.d.ts.map +1 -1
- package/types/views/ViewStates.d.ts.map +1 -1
- package/types/views/kanban-board-controls.d.ts.map +1 -1
- package/types/workspace/WorkspaceLinkCard.d.ts.map +1 -1
- package/types/workspace/WorkspaceLinkDirectory.d.ts.map +1 -1
- package/types/workspace/WorkspaceNumberCard.d.ts.map +1 -1
- package/types/workspace/WorkspaceQuickList.d.ts.map +1 -1
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The All DocTypes page: the session's DocTypes narrowed by the `doctypes`
|
|
3
|
+
* prop, grouped by module. Child tables have no list, so they never show.
|
|
4
|
+
* The DocTypes behind the newest visits lead in a Recent group. Each group
|
|
5
|
+
* is an inset grouped list under its module glyph, name and count, dealt
|
|
6
|
+
* into as many ~320pt columns as the width holds (one on a phone).
|
|
7
|
+
*/
|
|
8
|
+
import {
|
|
9
|
+
AsyncBoundary,
|
|
10
|
+
Button,
|
|
11
|
+
EmptyState,
|
|
12
|
+
H2,
|
|
13
|
+
ListGroup,
|
|
14
|
+
ListGroupItem,
|
|
15
|
+
ListRow,
|
|
16
|
+
ListRowMeta,
|
|
17
|
+
PageHeader,
|
|
18
|
+
Screen,
|
|
19
|
+
View,
|
|
20
|
+
XStack,
|
|
21
|
+
YStack,
|
|
22
|
+
sectionHeading,
|
|
23
|
+
} from "@multiplatform.one/components";
|
|
24
|
+
import { SearchInput } from "@multiplatform.one/forms";
|
|
25
|
+
import { useFrappeConfig } from "@multiplatform.one/frappe-ui";
|
|
26
|
+
import { openUrl } from "@multiplatform.one/platform";
|
|
27
|
+
import {
|
|
28
|
+
IconSlot,
|
|
29
|
+
getLayoutSizeClass,
|
|
30
|
+
useLayoutSizeClass,
|
|
31
|
+
useResolvedKnobs,
|
|
32
|
+
} from "@multiplatform.one/theme";
|
|
33
|
+
import {
|
|
34
|
+
CaretRightIcon,
|
|
35
|
+
ClockCounterClockwiseIcon,
|
|
36
|
+
SignInIcon,
|
|
37
|
+
type Icon as IconProp,
|
|
38
|
+
} from "@phosphor-icons/react";
|
|
39
|
+
import { useCallback, useEffect, useMemo, useState, type ReactNode } from "react";
|
|
40
|
+
import { useTranslation } from "react-i18next";
|
|
41
|
+
import {
|
|
42
|
+
readRecentItems,
|
|
43
|
+
useAwesomebarCatalog,
|
|
44
|
+
type AwesomebarDoctype,
|
|
45
|
+
type RecentItem,
|
|
46
|
+
} from "../chrome/awesomebar-data";
|
|
47
|
+
import {
|
|
48
|
+
useBackofficeConfig,
|
|
49
|
+
useBackofficeNavigator,
|
|
50
|
+
useBackofficePaths,
|
|
51
|
+
useIsDoctypeAllowed,
|
|
52
|
+
} from "../config/BackofficeProvider";
|
|
53
|
+
import { BACKOFFICE_I18N_NAMESPACE } from "../i18n";
|
|
54
|
+
import { useSessionIdentity } from "../shared/sessionUser";
|
|
55
|
+
import { moduleIcon } from "./workspaceIcons";
|
|
56
|
+
|
|
57
|
+
export interface DoctypeModuleGroup {
|
|
58
|
+
/** The module name, or "" for DocTypes the catalog gave no module. */
|
|
59
|
+
module: string;
|
|
60
|
+
doctypes: AwesomebarDoctype[];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Group DocTypes by module, both sorted by name. Child tables drop out, and
|
|
65
|
+
* a query keeps the DocTypes whose name, or whose module's name, contains it.
|
|
66
|
+
*/
|
|
67
|
+
export function groupDoctypesByModule(
|
|
68
|
+
doctypes: readonly AwesomebarDoctype[],
|
|
69
|
+
query = "",
|
|
70
|
+
): DoctypeModuleGroup[] {
|
|
71
|
+
const needle = query.trim().toLowerCase();
|
|
72
|
+
const byModule = new Map<string, AwesomebarDoctype[]>();
|
|
73
|
+
for (const doctype of doctypes) {
|
|
74
|
+
if (doctype.istable) continue;
|
|
75
|
+
const module = doctype.module ?? "";
|
|
76
|
+
if (
|
|
77
|
+
needle &&
|
|
78
|
+
!doctype.name.toLowerCase().includes(needle) &&
|
|
79
|
+
!module.toLowerCase().includes(needle)
|
|
80
|
+
) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
const group = byModule.get(module);
|
|
84
|
+
if (group) group.push(doctype);
|
|
85
|
+
else byModule.set(module, [doctype]);
|
|
86
|
+
}
|
|
87
|
+
return [...byModule.entries()]
|
|
88
|
+
.sort(([a], [b]) => (a === "" ? 1 : b === "" ? -1 : a.localeCompare(b)))
|
|
89
|
+
.map(([module, rows]) => ({
|
|
90
|
+
module,
|
|
91
|
+
doctypes: rows.sort((a, b) => a.name.localeCompare(b.name)),
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** At most this many recent DocTypes lead the page. */
|
|
96
|
+
const MAX_RECENT = 5;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The DocTypes behind the newest visits, newest first: a list visit is
|
|
100
|
+
* labelled with the bare DocType and a document visit "{doctype}: {name}".
|
|
101
|
+
*/
|
|
102
|
+
export function recentDoctypes(
|
|
103
|
+
visits: readonly RecentItem[],
|
|
104
|
+
offered: readonly AwesomebarDoctype[],
|
|
105
|
+
limit = MAX_RECENT,
|
|
106
|
+
): AwesomebarDoctype[] {
|
|
107
|
+
const byName = new Map(offered.filter((d) => !d.istable).map((d) => [d.name, d]));
|
|
108
|
+
const seen = new Set<string>();
|
|
109
|
+
const result: AwesomebarDoctype[] = [];
|
|
110
|
+
for (const visit of visits) {
|
|
111
|
+
const name = visit.label.split(": ")[0]?.trim() ?? "";
|
|
112
|
+
const doctype = byName.get(name);
|
|
113
|
+
if (!doctype || seen.has(name)) continue;
|
|
114
|
+
seen.add(name);
|
|
115
|
+
result.push(doctype);
|
|
116
|
+
if (result.length >= limit) break;
|
|
117
|
+
}
|
|
118
|
+
return result;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function useRecentVisits(): RecentItem[] {
|
|
122
|
+
const paths = useBackofficePaths();
|
|
123
|
+
const [visits, setVisits] = useState<RecentItem[]>([]);
|
|
124
|
+
useEffect(() => {
|
|
125
|
+
let live = true;
|
|
126
|
+
void readRecentItems().then((items) => {
|
|
127
|
+
if (live) setVisits(items.filter((item) => item.path.startsWith(paths.base)));
|
|
128
|
+
});
|
|
129
|
+
return () => {
|
|
130
|
+
live = false;
|
|
131
|
+
};
|
|
132
|
+
}, [paths.base]);
|
|
133
|
+
return visits;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Columns for the module groups from the width they get: one on a phone,
|
|
138
|
+
* then a readable ~320pt column each, at most four.
|
|
139
|
+
*/
|
|
140
|
+
function columnsFor(width: number): number {
|
|
141
|
+
if (width <= 0 || getLayoutSizeClass(width) === "compact") return 1;
|
|
142
|
+
return Math.max(1, Math.min(4, Math.floor(width / 320)));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** Deal groups into columns, each to the shortest so far, keeping reading order per column. */
|
|
146
|
+
function balance<T extends { size: number }>(groups: readonly T[], columns: number): T[][] {
|
|
147
|
+
const out: T[][] = Array.from({ length: columns }, () => []);
|
|
148
|
+
const heights = Array.from({ length: columns }, () => 0);
|
|
149
|
+
for (const group of groups) {
|
|
150
|
+
const shortest = heights.indexOf(Math.min(...heights));
|
|
151
|
+
out[shortest].push(group);
|
|
152
|
+
heights[shortest] += group.size + 2;
|
|
153
|
+
}
|
|
154
|
+
return out;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function GroupHeading({ icon, label, count }: { icon: IconProp; label: string; count: number }) {
|
|
158
|
+
const { knobProps } = useResolvedKnobs();
|
|
159
|
+
const ink = knobProps.textAccentColor;
|
|
160
|
+
return (
|
|
161
|
+
<XStack
|
|
162
|
+
alignItems="center"
|
|
163
|
+
{...knobProps.gapSm}
|
|
164
|
+
paddingHorizontal={knobProps.panelPadding.padding}
|
|
165
|
+
>
|
|
166
|
+
<View {...({ color: ink } as Record<string, unknown>)}>
|
|
167
|
+
<IconSlot icon={icon} size={Number(knobProps.controlIcon?.width) || 20} color={ink} />
|
|
168
|
+
</View>
|
|
169
|
+
<H2 margin={0} {...sectionHeading} {...knobProps.heading} numberOfLines={1} flexShrink={1}>
|
|
170
|
+
{label}
|
|
171
|
+
</H2>
|
|
172
|
+
<XStack flex={1} />
|
|
173
|
+
<ListRowMeta>{count}</ListRowMeta>
|
|
174
|
+
</XStack>
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function DoctypeGroup({
|
|
179
|
+
testID,
|
|
180
|
+
icon,
|
|
181
|
+
label,
|
|
182
|
+
doctypes,
|
|
183
|
+
onOpen,
|
|
184
|
+
}: {
|
|
185
|
+
testID: string;
|
|
186
|
+
icon: IconProp;
|
|
187
|
+
label: string;
|
|
188
|
+
doctypes: readonly AwesomebarDoctype[];
|
|
189
|
+
onOpen: (doctype: AwesomebarDoctype) => void;
|
|
190
|
+
}) {
|
|
191
|
+
const { knobProps } = useResolvedKnobs();
|
|
192
|
+
// iOS marks a row that drills in with a chevron; a pointer layout doesn't.
|
|
193
|
+
const disclosure =
|
|
194
|
+
useLayoutSizeClass() === "compact" ? (
|
|
195
|
+
<IconSlot
|
|
196
|
+
icon={CaretRightIcon}
|
|
197
|
+
size={Number(knobProps.controlIcon?.width) || 20}
|
|
198
|
+
color={knobProps.textAccentColor}
|
|
199
|
+
/>
|
|
200
|
+
) : undefined;
|
|
201
|
+
return (
|
|
202
|
+
<YStack data-testid={testID} {...knobProps.gapSm} role="group" aria-label={label}>
|
|
203
|
+
<GroupHeading icon={icon} label={label} count={doctypes.length} />
|
|
204
|
+
<ListGroup>
|
|
205
|
+
{doctypes.map((doctype) => (
|
|
206
|
+
<ListGroupItem
|
|
207
|
+
key={doctype.name}
|
|
208
|
+
role="link"
|
|
209
|
+
aria-label={doctype.name}
|
|
210
|
+
onPress={() => onOpen(doctype)}
|
|
211
|
+
testID="all-doctypes-row"
|
|
212
|
+
>
|
|
213
|
+
<ListRow title={doctype.name} meta={disclosure} />
|
|
214
|
+
</ListGroupItem>
|
|
215
|
+
))}
|
|
216
|
+
</ListGroup>
|
|
217
|
+
</YStack>
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function DoctypeColumns({
|
|
222
|
+
children,
|
|
223
|
+
}: {
|
|
224
|
+
children: { key: string; size: number; node: ReactNode }[];
|
|
225
|
+
}) {
|
|
226
|
+
const { knobProps } = useResolvedKnobs();
|
|
227
|
+
const [width, setWidth] = useState(0);
|
|
228
|
+
const columns = balance(children, columnsFor(width));
|
|
229
|
+
return (
|
|
230
|
+
<XStack
|
|
231
|
+
width="100%"
|
|
232
|
+
alignItems="flex-start"
|
|
233
|
+
{...knobProps.gapLg}
|
|
234
|
+
onLayout={(event) => setWidth(event.nativeEvent.layout.width)}
|
|
235
|
+
>
|
|
236
|
+
{columns.map((column, index) => (
|
|
237
|
+
<YStack key={index} flex={1} flexBasis={0} minWidth={0} {...knobProps.gapLg}>
|
|
238
|
+
{column.map((group) => (
|
|
239
|
+
<YStack key={group.key}>{group.node}</YStack>
|
|
240
|
+
))}
|
|
241
|
+
</YStack>
|
|
242
|
+
))}
|
|
243
|
+
</XStack>
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export function AllDoctypesScreen() {
|
|
248
|
+
const { t } = useTranslation(BACKOFFICE_I18N_NAMESPACE);
|
|
249
|
+
const navigator = useBackofficeNavigator();
|
|
250
|
+
const paths = useBackofficePaths();
|
|
251
|
+
const { auth } = useBackofficeConfig();
|
|
252
|
+
const frappeConfig = useFrappeConfig();
|
|
253
|
+
const isDoctypeAllowed = useIsDoctypeAllowed();
|
|
254
|
+
const compact = useLayoutSizeClass() === "compact";
|
|
255
|
+
const identity = useSessionIdentity();
|
|
256
|
+
const fixtureMode = Boolean(frappeConfig?.fixtures);
|
|
257
|
+
const signedOut = !fixtureMode && identity.resolved && !identity.user;
|
|
258
|
+
const { catalog, error } = useAwesomebarCatalog((fixtureMode || identity.resolved) && !signedOut);
|
|
259
|
+
const [query, setQuery] = useState("");
|
|
260
|
+
|
|
261
|
+
const offered = useMemo(
|
|
262
|
+
() => (catalog?.doctypeInfo ?? []).filter((doctype) => isDoctypeAllowed(doctype.name)),
|
|
263
|
+
[catalog, isDoctypeAllowed],
|
|
264
|
+
);
|
|
265
|
+
const groups = useMemo(() => groupDoctypesByModule(offered, query), [offered, query]);
|
|
266
|
+
const visits = useRecentVisits();
|
|
267
|
+
const recent = useMemo(
|
|
268
|
+
() => (query.trim() ? [] : recentDoctypes(visits, offered)),
|
|
269
|
+
[visits, offered, query],
|
|
270
|
+
);
|
|
271
|
+
|
|
272
|
+
const open = useCallback(
|
|
273
|
+
(doctype: AwesomebarDoctype) =>
|
|
274
|
+
navigator.navigate(
|
|
275
|
+
doctype.issingle ? paths.form(doctype.name, doctype.name) : paths.list(doctype.name),
|
|
276
|
+
),
|
|
277
|
+
[navigator, paths],
|
|
278
|
+
);
|
|
279
|
+
|
|
280
|
+
const signIn = useCallback(() => {
|
|
281
|
+
if (auth) return void auth.login();
|
|
282
|
+
if (frappeConfig?.baseURL) openUrl(`${frappeConfig.baseURL.replace(/\/+$/, "")}/login`);
|
|
283
|
+
}, [auth, frappeConfig?.baseURL]);
|
|
284
|
+
|
|
285
|
+
const title = t("allDoctypes.title", "All DocTypes");
|
|
286
|
+
const searchLabel = t("allDoctypes.search", "Search DocTypes");
|
|
287
|
+
const searchField = (
|
|
288
|
+
<SearchInput
|
|
289
|
+
defaultValue=""
|
|
290
|
+
onSearch={setQuery}
|
|
291
|
+
clearable
|
|
292
|
+
placeholder={searchLabel}
|
|
293
|
+
aria-label={searchLabel}
|
|
294
|
+
/>
|
|
295
|
+
);
|
|
296
|
+
const search = (
|
|
297
|
+
<YStack flex={1} minWidth={0}>
|
|
298
|
+
{searchField}
|
|
299
|
+
</YStack>
|
|
300
|
+
);
|
|
301
|
+
|
|
302
|
+
let body: ReactNode;
|
|
303
|
+
if (signedOut) {
|
|
304
|
+
body = (
|
|
305
|
+
<EmptyState
|
|
306
|
+
testID="all-doctypes-signed-out"
|
|
307
|
+
icon={<SignInIcon />}
|
|
308
|
+
title={t("allDoctypes.signedOutTitle", "You're signed out")}
|
|
309
|
+
description={t("allDoctypes.signedOutDescription", "DocTypes show here once you sign in")}
|
|
310
|
+
action={
|
|
311
|
+
<Button icon={SignInIcon} onPress={signIn}>
|
|
312
|
+
{t("allDoctypes.signIn", "Sign in")}
|
|
313
|
+
</Button>
|
|
314
|
+
}
|
|
315
|
+
/>
|
|
316
|
+
);
|
|
317
|
+
} else if (!catalog) {
|
|
318
|
+
body = (
|
|
319
|
+
<AsyncBoundary
|
|
320
|
+
flex={1}
|
|
321
|
+
layout="list"
|
|
322
|
+
loading={!error}
|
|
323
|
+
error={error}
|
|
324
|
+
errorTitle={t("allDoctypes.unavailable", "DocTypes unavailable")}
|
|
325
|
+
/>
|
|
326
|
+
);
|
|
327
|
+
} else if (offered.length === 0) {
|
|
328
|
+
body = <EmptyState title={t("allDoctypes.empty", "No DocTypes")} />;
|
|
329
|
+
} else if (groups.length === 0) {
|
|
330
|
+
body = (
|
|
331
|
+
<EmptyState
|
|
332
|
+
testID="all-doctypes-no-match"
|
|
333
|
+
title={t("allDoctypes.noMatch", {
|
|
334
|
+
defaultValue: "No DocTypes match “{{query}}”",
|
|
335
|
+
query: query.trim(),
|
|
336
|
+
})}
|
|
337
|
+
/>
|
|
338
|
+
);
|
|
339
|
+
} else {
|
|
340
|
+
const blocks: { key: string; size: number; node: ReactNode }[] = [];
|
|
341
|
+
if (recent.length > 0) {
|
|
342
|
+
blocks.push({
|
|
343
|
+
key: "__recent",
|
|
344
|
+
size: recent.length,
|
|
345
|
+
node: (
|
|
346
|
+
<DoctypeGroup
|
|
347
|
+
testID="all-doctypes-recent"
|
|
348
|
+
icon={ClockCounterClockwiseIcon}
|
|
349
|
+
label={t("allDoctypes.recent", "Recent")}
|
|
350
|
+
doctypes={recent}
|
|
351
|
+
onOpen={open}
|
|
352
|
+
/>
|
|
353
|
+
),
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
for (const group of groups) {
|
|
357
|
+
const label = group.module || t("allDoctypes.otherModule", "Other");
|
|
358
|
+
blocks.push({
|
|
359
|
+
key: group.module || "-",
|
|
360
|
+
size: group.doctypes.length,
|
|
361
|
+
node: (
|
|
362
|
+
<DoctypeGroup
|
|
363
|
+
testID="all-doctypes-module"
|
|
364
|
+
icon={moduleIcon(group.module || undefined)}
|
|
365
|
+
label={label}
|
|
366
|
+
doctypes={group.doctypes}
|
|
367
|
+
onOpen={open}
|
|
368
|
+
/>
|
|
369
|
+
),
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
body = <DoctypeColumns>{blocks}</DoctypeColumns>;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
return (
|
|
376
|
+
<Screen data-testid="all-doctypes-screen">
|
|
377
|
+
{signedOut ? (
|
|
378
|
+
compact ? null : (
|
|
379
|
+
<PageHeader title={title} titleScale="moderate" divider={false} />
|
|
380
|
+
)
|
|
381
|
+
) : compact ? (
|
|
382
|
+
<YStack width="100%">{searchField}</YStack>
|
|
383
|
+
) : (
|
|
384
|
+
<PageHeader title={title} titleScale="moderate" divider={false} actions={search} />
|
|
385
|
+
)}
|
|
386
|
+
{body}
|
|
387
|
+
</Screen>
|
|
388
|
+
);
|
|
389
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { InMemoryFixtureProvider } from "@multiplatform.one/frappe";
|
|
3
3
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
4
|
-
import { cleanup, fireEvent, screen } from "@testing-library/react";
|
|
4
|
+
import { cleanup, fireEvent, screen, waitFor } from "@testing-library/react";
|
|
5
5
|
import { defaultKnobs, resolveKnobs, type LayoutSizeClass } from "@multiplatform.one/theme";
|
|
6
6
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
7
7
|
import { BackofficeProvider } from "../config/BackofficeProvider";
|
|
@@ -83,14 +83,20 @@ describe("BackofficeShell pane hairlines", () => {
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
-
it("
|
|
86
|
+
it("rules the banner and hands the rail, its hairline and the footer to MPO's Sidebar", async () => {
|
|
87
87
|
renderShell();
|
|
88
88
|
|
|
89
89
|
expect(screen.getByTestId("backoffice-shell-banner-rule")).toBeTruthy();
|
|
90
90
|
fireEvent.click(screen.getByRole("button", { name: "Toggle sidebar" }));
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
const rail = screen.getByTestId("backoffice-sidebar-rail");
|
|
92
|
+
const nav = await waitFor(() => {
|
|
93
|
+
const found = rail.querySelector("[data-testid='backoffice-workspace-nav']");
|
|
94
|
+
expect(found).not.toBeNull();
|
|
95
|
+
return found as HTMLElement;
|
|
96
|
+
});
|
|
97
|
+
expect(nav.className).toContain("mp-hairline-ie");
|
|
98
|
+
const footer = nav.querySelector("[data-sidebar-footer]");
|
|
99
|
+
expect(footer?.contains(screen.getByTestId("host-sidebar-footer"))).toBe(true);
|
|
94
100
|
expect(screen.getByRole("main").id).toBe("backoffice-main");
|
|
95
101
|
});
|
|
96
102
|
});
|
|
@@ -19,13 +19,14 @@
|
|
|
19
19
|
* a collapsible group — never a second column beside the rail.
|
|
20
20
|
*
|
|
21
21
|
* Shell geometry follows Frappe Desk's inverted-L (full-width banner + left
|
|
22
|
-
* rail) with Linear's pane rules:
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* fill (
|
|
22
|
+
* rail) with Linear's pane rules: the banner rule spans the full width and
|
|
23
|
+
* the rail is MPO's Sidebar, whose end hairline spans its full height with
|
|
24
|
+
* the page panel and host footer inside it (LC-175). Selected workspace is
|
|
25
|
+
* fill (LC-71); the shell paints no rail chrome of its own.
|
|
26
26
|
*/
|
|
27
27
|
import {
|
|
28
28
|
ScrollView,
|
|
29
|
+
Separator,
|
|
29
30
|
SheetModal,
|
|
30
31
|
SizableText,
|
|
31
32
|
SkipLink,
|
|
@@ -37,7 +38,6 @@ import {
|
|
|
37
38
|
import { Button } from "@multiplatform.one/forms";
|
|
38
39
|
import * as componentsBarrel from "@multiplatform.one/components";
|
|
39
40
|
import {
|
|
40
|
-
hairline,
|
|
41
41
|
sizeRecipeEscape,
|
|
42
42
|
Surface,
|
|
43
43
|
useLayoutSizeClass,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
type ShellSidebarPanel,
|
|
70
70
|
} from "./shellSidebarSlot";
|
|
71
71
|
import { ShellTopBarSlotProvider, useShellTopBarSlotState } from "./shellTopBarSlot";
|
|
72
|
-
import {
|
|
72
|
+
import { WorkspaceSidebar } from "./WorkspaceSidebar";
|
|
73
73
|
|
|
74
74
|
// Capability-check the barrel instead of a named import: GNOME's curated
|
|
75
75
|
// components shim deliberately omits ToastViewport (the @tamagui/toast portal
|
|
@@ -101,19 +101,6 @@ function useIsNarrow(): boolean {
|
|
|
101
101
|
return useLayoutSizeClass() === "compact";
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
/** Standalone pane rule — full width (banner) or full height (rail). */
|
|
105
|
-
function ShellHairline({ axis, testId }: { axis: "horizontal" | "vertical"; testId: string }) {
|
|
106
|
-
return (
|
|
107
|
-
<YStack
|
|
108
|
-
{...(axis === "horizontal" ? hairline.line : hairline.vline)}
|
|
109
|
-
alignSelf="stretch"
|
|
110
|
-
{...(axis === "horizontal" ? { width: "100%" } : { height: "100%" })}
|
|
111
|
-
flexShrink={0}
|
|
112
|
-
data-testid={testId}
|
|
113
|
-
/>
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
104
|
/**
|
|
118
105
|
* The page panel stacked under the nav (LC-101): a disclosure header and
|
|
119
106
|
* the panel body, sharing the rail's column and width. Collapsing it hands
|
|
@@ -123,14 +110,7 @@ function StackedSidebarPanel({ panel }: { panel: ShellSidebarPanel }) {
|
|
|
123
110
|
const { knobProps } = useResolvedKnobs();
|
|
124
111
|
const [open, setOpen] = useState(true);
|
|
125
112
|
return (
|
|
126
|
-
<YStack
|
|
127
|
-
flex={open ? 1 : undefined}
|
|
128
|
-
flexShrink={open ? 1 : 0}
|
|
129
|
-
minHeight={0}
|
|
130
|
-
width="100%"
|
|
131
|
-
data-testid="backoffice-shell-page-panel"
|
|
132
|
-
>
|
|
133
|
-
<ShellHairline axis="horizontal" testId="backoffice-shell-panel-rule" />
|
|
113
|
+
<YStack flexShrink={1} minHeight={0} width="100%" data-testid="backoffice-shell-page-panel">
|
|
134
114
|
<Button
|
|
135
115
|
chromeless
|
|
136
116
|
size={knobProps.sizeToken}
|
|
@@ -143,7 +123,7 @@ function StackedSidebarPanel({ panel }: { panel: ShellSidebarPanel }) {
|
|
|
143
123
|
{panel.title}
|
|
144
124
|
</Button>
|
|
145
125
|
{open ? (
|
|
146
|
-
<ScrollView
|
|
126
|
+
<ScrollView flexShrink={1} minHeight={0} paddingHorizontal="$2">
|
|
147
127
|
{panel.content}
|
|
148
128
|
</ScrollView>
|
|
149
129
|
) : null}
|
|
@@ -151,6 +131,7 @@ function StackedSidebarPanel({ panel }: { panel: ShellSidebarPanel }) {
|
|
|
151
131
|
);
|
|
152
132
|
}
|
|
153
133
|
|
|
134
|
+
// mpo-role-escape: FZ-7996 the banner moves onto MPO's AppShell nav bar when it lands.
|
|
154
135
|
export function BackofficeShell({ children, activePath, onNavigate, title }: BackofficeShellProps) {
|
|
155
136
|
const { t } = useTranslation(BACKOFFICE_I18N_NAMESPACE);
|
|
156
137
|
const { knobProps } = useResolvedKnobs();
|
|
@@ -192,20 +173,14 @@ export function BackofficeShell({ children, activePath, onNavigate, title }: Bac
|
|
|
192
173
|
const deskTitle = t("shell.title", "Backoffice");
|
|
193
174
|
const bannerTitle = isNarrow && title ? title : deskTitle;
|
|
194
175
|
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
<
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
<ShellHairline axis="horizontal" testId="backoffice-shell-footer-rule" />
|
|
204
|
-
{slots.renderSidebarFooter()}
|
|
205
|
-
</YStack>
|
|
206
|
-
) : null}
|
|
207
|
-
</YStack>
|
|
208
|
-
);
|
|
176
|
+
const sidebarFooter =
|
|
177
|
+
(pagePanel && !isNarrow) || slots.renderSidebarFooter ? (
|
|
178
|
+
<>
|
|
179
|
+
{pagePanel && !isNarrow ? <StackedSidebarPanel panel={pagePanel} /> : null}
|
|
180
|
+
{pagePanel && !isNarrow && slots.renderSidebarFooter ? <Separator /> : null}
|
|
181
|
+
{slots.renderSidebarFooter ? slots.renderSidebarFooter() : null}
|
|
182
|
+
</>
|
|
183
|
+
) : undefined;
|
|
209
184
|
|
|
210
185
|
const headerContent = (
|
|
211
186
|
<>
|
|
@@ -319,19 +294,13 @@ export function BackofficeShell({ children, activePath, onNavigate, title }: Bac
|
|
|
319
294
|
);
|
|
320
295
|
|
|
321
296
|
const rail = (
|
|
322
|
-
<
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
>
|
|
330
|
-
<YStack width={WORKSPACE_SIDEBAR_WIDTH} height="100%" minHeight={0}>
|
|
331
|
-
{sidebarContent}
|
|
332
|
-
</YStack>
|
|
333
|
-
<ShellHairline axis="vertical" testId="backoffice-shell-column-rule" />
|
|
334
|
-
</XStack>
|
|
297
|
+
<YStack flexShrink={0} height="100%" minHeight={0} data-testid="backoffice-sidebar-rail">
|
|
298
|
+
<WorkspaceSidebar
|
|
299
|
+
activePath={resolvedActivePath}
|
|
300
|
+
onNavigate={handleNavigate}
|
|
301
|
+
footer={sidebarFooter}
|
|
302
|
+
/>
|
|
303
|
+
</YStack>
|
|
335
304
|
);
|
|
336
305
|
|
|
337
306
|
return (
|
|
@@ -367,7 +336,7 @@ export function BackofficeShell({ children, activePath, onNavigate, title }: Bac
|
|
|
367
336
|
: headerContent}
|
|
368
337
|
</Surface>
|
|
369
338
|
</XStack>
|
|
370
|
-
<
|
|
339
|
+
<Separator data-testid="backoffice-shell-banner-rule" />
|
|
371
340
|
|
|
372
341
|
<XStack flex={1} minWidth={0} position="relative" overflow="hidden">
|
|
373
342
|
{sidebarEnabled && !isNarrow && sidebarOpen && rail}
|
|
@@ -388,14 +357,14 @@ export function BackofficeShell({ children, activePath, onNavigate, title }: Bac
|
|
|
388
357
|
</SizableText>
|
|
389
358
|
}
|
|
390
359
|
>
|
|
391
|
-
<YStack
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
360
|
+
<YStack flex={1} minHeight={0} width="100%" data-testid="backoffice-sidebar-drawer">
|
|
361
|
+
<WorkspaceSidebar
|
|
362
|
+
activePath={resolvedActivePath}
|
|
363
|
+
onNavigate={handleNavigate}
|
|
364
|
+
width="100%"
|
|
365
|
+
divider={false}
|
|
366
|
+
footer={sidebarFooter}
|
|
367
|
+
/>
|
|
399
368
|
</YStack>
|
|
400
369
|
</SheetModal>
|
|
401
370
|
)}
|