@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
|
@@ -10,9 +10,10 @@ import { HttpClient, type AuthConfig, type FixtureProvider } from "@multiplatfor
|
|
|
10
10
|
import { useFrappeConfig, type FrappeConfig } from "@multiplatform.one/frappe-ui";
|
|
11
11
|
import { storage } from "@multiplatform.one/store";
|
|
12
12
|
import { useEffect, useMemo, useState } from "react";
|
|
13
|
+
import { sessionUserKey, useSessionRevision } from "../shared/sessionUser";
|
|
13
14
|
|
|
14
15
|
// ---------------------------------------------------------------------------
|
|
15
|
-
// Catalog (DocType names + Workspaces), fetched once per session
|
|
16
|
+
// Catalog (DocType names + modules, Workspaces), fetched once per session
|
|
16
17
|
// ---------------------------------------------------------------------------
|
|
17
18
|
|
|
18
19
|
export interface AwesomebarWorkspace {
|
|
@@ -20,8 +21,19 @@ export interface AwesomebarWorkspace {
|
|
|
20
21
|
title: string;
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
/** One DocType the session can open, with the module that owns it. */
|
|
25
|
+
export interface AwesomebarDoctype {
|
|
26
|
+
name: string;
|
|
27
|
+
module?: string;
|
|
28
|
+
/** A child table: no list of its own (desk leaves these out of can_read). */
|
|
29
|
+
istable?: boolean;
|
|
30
|
+
issingle?: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
23
33
|
export interface AwesomebarCatalog {
|
|
24
34
|
doctypes: string[];
|
|
35
|
+
/** The same DocTypes with their module, for grouped surfaces. */
|
|
36
|
+
doctypeInfo: AwesomebarDoctype[];
|
|
25
37
|
workspaces: AwesomebarWorkspace[];
|
|
26
38
|
}
|
|
27
39
|
|
|
@@ -31,44 +43,103 @@ interface CatalogSource {
|
|
|
31
43
|
fixtures?: FixtureProvider;
|
|
32
44
|
}
|
|
33
45
|
|
|
34
|
-
|
|
46
|
+
interface DoctypeRow {
|
|
47
|
+
name?: string;
|
|
48
|
+
module?: string;
|
|
49
|
+
istable?: 0 | 1;
|
|
50
|
+
issingle?: 0 | 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const doctypeFields = ["name", "module", "istable", "issingle"];
|
|
54
|
+
|
|
55
|
+
/** Module-level cache: one fetch per (baseURL, fixture-mode, session) per session. */
|
|
35
56
|
const catalogCache = new Map<string, Promise<AwesomebarCatalog>>();
|
|
36
57
|
|
|
58
|
+
function toDoctypeInfo(rows: readonly DoctypeRow[]): AwesomebarDoctype[] {
|
|
59
|
+
return rows.flatMap((row) =>
|
|
60
|
+
row.name
|
|
61
|
+
? [
|
|
62
|
+
{
|
|
63
|
+
name: row.name,
|
|
64
|
+
...(row.module ? { module: row.module } : {}),
|
|
65
|
+
...(row.istable ? { istable: true } : {}),
|
|
66
|
+
...(row.issingle ? { issingle: true } : {}),
|
|
67
|
+
},
|
|
68
|
+
]
|
|
69
|
+
: [],
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function toCatalog(
|
|
74
|
+
doctypeInfo: AwesomebarDoctype[],
|
|
75
|
+
workspaces: readonly { name?: string; title?: string }[],
|
|
76
|
+
): AwesomebarCatalog {
|
|
77
|
+
return {
|
|
78
|
+
doctypes: doctypeInfo.map((row) => row.name),
|
|
79
|
+
doctypeInfo,
|
|
80
|
+
workspaces: workspaces.flatMap((row) =>
|
|
81
|
+
row.name ? [{ name: row.name, title: row.title || row.name }] : [],
|
|
82
|
+
),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Frappe grants the DocType list to System Managers only. Anyone else gets
|
|
88
|
+
* the DocTypes they can read, grouped by module, from the desk's
|
|
89
|
+
* notification info (`can_read`, child tables already left out).
|
|
90
|
+
*/
|
|
91
|
+
async function fetchReadableDoctypes(client: HttpClient): Promise<AwesomebarDoctype[]> {
|
|
92
|
+
const response = await client.get<{
|
|
93
|
+
message?: { module_doctypes?: Record<string, string[]> };
|
|
94
|
+
}>("/api/method/frappe.desk.notifications.get_notification_info");
|
|
95
|
+
const byModule = response.payload?.message?.module_doctypes;
|
|
96
|
+
if (!byModule || typeof byModule !== "object") throw new Error("No readable DocTypes");
|
|
97
|
+
return Object.entries(byModule).flatMap(([module, names]) =>
|
|
98
|
+
(Array.isArray(names) ? names : []).map((name) => ({ name, module })),
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
async function fetchDoctypes(client: HttpClient): Promise<AwesomebarDoctype[]> {
|
|
103
|
+
try {
|
|
104
|
+
const response = await client.get<{ message?: DoctypeRow[] }>(
|
|
105
|
+
"/api/method/frappe.client.get_list",
|
|
106
|
+
{
|
|
107
|
+
doctype: "DocType",
|
|
108
|
+
fields: JSON.stringify(doctypeFields),
|
|
109
|
+
limit_page_length: "0",
|
|
110
|
+
},
|
|
111
|
+
);
|
|
112
|
+
return toDoctypeInfo(response.payload?.message ?? []);
|
|
113
|
+
} catch (error) {
|
|
114
|
+
return fetchReadableDoctypes(client).catch(() => {
|
|
115
|
+
throw error;
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
37
120
|
async function fetchCatalog(source: CatalogSource): Promise<AwesomebarCatalog> {
|
|
38
121
|
if (source.fixtures) {
|
|
39
122
|
const [doctypes, workspaces] = await Promise.all([
|
|
40
|
-
source.fixtures.getList("DocType", { fields:
|
|
123
|
+
source.fixtures.getList("DocType", { fields: doctypeFields }),
|
|
41
124
|
source.fixtures.getList("Workspace", { fields: ["name", "title"] }),
|
|
42
125
|
]);
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
workspaces
|
|
46
|
-
|
|
47
|
-
),
|
|
48
|
-
};
|
|
126
|
+
return toCatalog(
|
|
127
|
+
toDoctypeInfo(doctypes as DoctypeRow[]),
|
|
128
|
+
workspaces as { name?: string; title?: string }[],
|
|
129
|
+
);
|
|
49
130
|
}
|
|
50
131
|
const client = new HttpClient(source.baseURL, source.auth as AuthConfig | undefined);
|
|
51
|
-
const [
|
|
52
|
-
|
|
53
|
-
doctype: "DocType",
|
|
54
|
-
fields: '["name"]',
|
|
55
|
-
limit_page_length: "0",
|
|
56
|
-
}),
|
|
132
|
+
const [doctypeInfo, workspacesRes] = await Promise.all([
|
|
133
|
+
fetchDoctypes(client),
|
|
57
134
|
client.get<{ data?: { name: string; title?: string }[] }>("/api/resource/Workspace", {
|
|
58
135
|
fields: '["name","title"]',
|
|
59
136
|
limit_page_length: "0",
|
|
60
137
|
}),
|
|
61
138
|
]);
|
|
62
|
-
return
|
|
63
|
-
doctypes: (doctypesRes.payload?.message ?? []).flatMap((row) => (row.name ? [row.name] : [])),
|
|
64
|
-
workspaces: (workspacesRes.payload?.data ?? []).flatMap((row) =>
|
|
65
|
-
row.name ? [{ name: row.name, title: row.title || row.name }] : [],
|
|
66
|
-
),
|
|
67
|
-
};
|
|
139
|
+
return toCatalog(doctypeInfo, workspacesRes.payload?.data ?? []);
|
|
68
140
|
}
|
|
69
141
|
|
|
70
|
-
function getCatalog(source: CatalogSource): Promise<AwesomebarCatalog> {
|
|
71
|
-
const key = `${source.baseURL}:${source.fixtures ? "fixtures" : "live"}`;
|
|
142
|
+
function getCatalog(source: CatalogSource, key: string): Promise<AwesomebarCatalog> {
|
|
72
143
|
let promise = catalogCache.get(key);
|
|
73
144
|
if (!promise) {
|
|
74
145
|
promise = fetchCatalog(source);
|
|
@@ -88,39 +159,45 @@ export interface AwesomebarCatalogState {
|
|
|
88
159
|
}
|
|
89
160
|
|
|
90
161
|
/**
|
|
91
|
-
* DocType + Workspace
|
|
92
|
-
* honored in stories/tests), fetched once per session
|
|
93
|
-
* runs in an effect. Without a
|
|
162
|
+
* DocType + Workspace catalog from the ambient FrappeProvider (fixtures
|
|
163
|
+
* honored in stories/tests), fetched once per session and again after a
|
|
164
|
+
* sign-in or sign-out. SSR-safe: the fetch runs in an effect. Without a
|
|
165
|
+
* provider the catalog stays empty.
|
|
94
166
|
*/
|
|
95
167
|
export function useAwesomebarCatalog(enabled = true): AwesomebarCatalogState {
|
|
96
168
|
const config = useFrappeConfig();
|
|
169
|
+
const revision = useSessionRevision();
|
|
97
170
|
const baseURL = config?.baseURL;
|
|
98
171
|
const fixtures = config?.fixtures;
|
|
99
172
|
const auth = config?.auth;
|
|
173
|
+
const key = baseURL
|
|
174
|
+
? fixtures
|
|
175
|
+
? `${baseURL}:fixtures`
|
|
176
|
+
: `${sessionUserKey({ baseURL, auth })}:${revision}`
|
|
177
|
+
: undefined;
|
|
100
178
|
|
|
101
|
-
const [
|
|
102
|
-
|
|
179
|
+
const [state, setState] = useState<{ key?: string; catalog?: AwesomebarCatalog; error: boolean }>(
|
|
180
|
+
{ error: false },
|
|
181
|
+
);
|
|
103
182
|
|
|
104
183
|
useEffect(() => {
|
|
105
|
-
if (!baseURL || !enabled) return;
|
|
184
|
+
if (!baseURL || !key || !enabled) return;
|
|
106
185
|
let cancelled = false;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (!cancelled) setCatalog(result);
|
|
186
|
+
getCatalog({ baseURL, auth, fixtures }, key)
|
|
187
|
+
.then((catalog) => {
|
|
188
|
+
if (!cancelled) setState({ key, catalog, error: false });
|
|
111
189
|
})
|
|
112
190
|
.catch(() => {
|
|
113
|
-
if (!cancelled)
|
|
191
|
+
if (!cancelled) setState({ key, error: true });
|
|
114
192
|
});
|
|
115
193
|
return () => {
|
|
116
194
|
cancelled = true;
|
|
117
195
|
};
|
|
118
|
-
// `auth`
|
|
119
|
-
// baseURL/fixtures and provider auth is stable for the session.
|
|
196
|
+
// `auth` rides in `key` by value: a host may rebuild the object every render.
|
|
120
197
|
// oxlint-disable-next-line exhaustive-deps
|
|
121
|
-
}, [baseURL, fixtures, enabled]);
|
|
198
|
+
}, [baseURL, fixtures, key, enabled]);
|
|
122
199
|
|
|
123
|
-
return { catalog, error };
|
|
200
|
+
return state.key === key ? { catalog: state.catalog, error: state.error } : { error: false };
|
|
124
201
|
}
|
|
125
202
|
|
|
126
203
|
// ---------------------------------------------------------------------------
|
|
@@ -5,27 +5,26 @@
|
|
|
5
5
|
* the popover/sheet shell live in NotificationsButton.
|
|
6
6
|
*/
|
|
7
7
|
import {
|
|
8
|
-
componentColors,
|
|
9
8
|
Avatar,
|
|
9
|
+
Badge,
|
|
10
10
|
Button,
|
|
11
11
|
EmptyState,
|
|
12
|
+
ListGroup,
|
|
13
|
+
ListGroupItem,
|
|
14
|
+
ListRow,
|
|
12
15
|
Separator,
|
|
13
16
|
SizableText,
|
|
14
17
|
Skeleton,
|
|
15
18
|
SkeletonCircle,
|
|
16
|
-
Text,
|
|
17
|
-
View,
|
|
18
19
|
XStack,
|
|
19
20
|
YStack,
|
|
20
21
|
} from "@multiplatform.one/components";
|
|
21
22
|
import {
|
|
22
|
-
ensureFocusVisibleRing,
|
|
23
23
|
formatRelativeTimestamp,
|
|
24
|
-
menuRowFrame,
|
|
25
24
|
sizeRecipeEscape,
|
|
26
25
|
useResolvedKnobs,
|
|
27
26
|
} from "@multiplatform.one/theme";
|
|
28
|
-
import { GearSixIcon } from "@phosphor-icons/react";
|
|
27
|
+
import { ChecksIcon, GearSixIcon } from "@phosphor-icons/react";
|
|
29
28
|
import { useTranslation } from "react-i18next";
|
|
30
29
|
import { BACKOFFICE_I18N_NAMESPACE } from "../i18n";
|
|
31
30
|
import type { NotificationItem } from "./notifications-data";
|
|
@@ -41,62 +40,22 @@ export interface NotificationsPanelProps {
|
|
|
41
40
|
|
|
42
41
|
function NotificationRow({ item, onPress }: { item: NotificationItem; onPress: () => void }) {
|
|
43
42
|
const { t } = useTranslation(BACKOFFICE_I18N_NAMESPACE);
|
|
44
|
-
const { knobProps } = useResolvedKnobs();
|
|
45
43
|
const subject = item.subjectText || t("notifications.untitled", "Notification");
|
|
46
44
|
const relative = formatRelativeTimestamp(item.timestampMs ?? item.creation);
|
|
47
45
|
return (
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
aria-label={subject}
|
|
62
|
-
data-testid="backoffice-notification-row"
|
|
63
|
-
onPress={onPress}
|
|
64
|
-
onKeyDown={
|
|
65
|
-
((event: KeyboardEvent) => {
|
|
66
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
67
|
-
event.preventDefault();
|
|
68
|
-
onPress();
|
|
69
|
-
}
|
|
70
|
-
}) as unknown as () => void
|
|
71
|
-
}
|
|
72
|
-
>
|
|
73
|
-
<Avatar name={item.from_user || "?"} size="$2.5" />
|
|
74
|
-
<YStack flex={1} minWidth={0} gap="$1">
|
|
75
|
-
<Text
|
|
76
|
-
{...knobProps.label}
|
|
77
|
-
fontWeight="400"
|
|
78
|
-
color={item.unread ? "$color12" : "$color11"}
|
|
79
|
-
numberOfLines={2}
|
|
80
|
-
>
|
|
81
|
-
{subject}
|
|
82
|
-
</Text>
|
|
83
|
-
{relative ? (
|
|
84
|
-
<Text {...knobProps.label} color="$color9">
|
|
85
|
-
{relative}
|
|
86
|
-
</Text>
|
|
87
|
-
) : null}
|
|
88
|
-
</YStack>
|
|
89
|
-
{item.unread && (
|
|
90
|
-
<View paddingTop="$1.5" flexShrink={0} aria-hidden>
|
|
91
|
-
<View
|
|
92
|
-
width="$0.75"
|
|
93
|
-
height="$0.75"
|
|
94
|
-
borderRadius={1000}
|
|
95
|
-
backgroundColor={componentColors.indicator.mark}
|
|
96
|
-
/>
|
|
97
|
-
</View>
|
|
98
|
-
)}
|
|
99
|
-
</XStack>
|
|
46
|
+
<ListGroupItem onPress={onPress} aria-label={subject} testID="backoffice-notification-row">
|
|
47
|
+
<ListRow
|
|
48
|
+
media={<Avatar name={item.from_user || "?"} size="$2.5" />}
|
|
49
|
+
title={subject}
|
|
50
|
+
titleLines={2}
|
|
51
|
+
subtitle={relative || undefined}
|
|
52
|
+
meta={
|
|
53
|
+
item.unread ? (
|
|
54
|
+
<Badge dot color="blue" accessibilityLabel={t("notifications.unread", "Unread")} />
|
|
55
|
+
) : undefined
|
|
56
|
+
}
|
|
57
|
+
/>
|
|
58
|
+
</ListGroupItem>
|
|
100
59
|
);
|
|
101
60
|
}
|
|
102
61
|
|
|
@@ -154,13 +113,13 @@ export function NotificationsPanel({
|
|
|
154
113
|
<Button
|
|
155
114
|
chromeless
|
|
156
115
|
size="$2"
|
|
116
|
+
icon={ChecksIcon}
|
|
157
117
|
disabled={!hasUnread}
|
|
158
118
|
opacity={hasUnread ? 1 : 0.5}
|
|
159
119
|
onPress={onMarkAllRead}
|
|
120
|
+
aria-label={t("notifications.markAllRead", "Mark all as read")}
|
|
160
121
|
data-testid="backoffice-notifications-mark-all"
|
|
161
|
-
|
|
162
|
-
{t("notifications.markAllRead", "Mark all as read")}
|
|
163
|
-
</Button>
|
|
122
|
+
/>
|
|
164
123
|
{/* Desk links to /app/notification-settings; the backoffice has no
|
|
165
124
|
settings surface yet — disabled placeholder documents the gap. */}
|
|
166
125
|
<Button
|
|
@@ -185,11 +144,11 @@ export function NotificationsPanel({
|
|
|
185
144
|
title={t("notifications.emptyTitle", "No new notifications")}
|
|
186
145
|
/>
|
|
187
146
|
) : (
|
|
188
|
-
<
|
|
147
|
+
<ListGroup variant="plain">
|
|
189
148
|
{items.map((item) => (
|
|
190
149
|
<NotificationRow key={item.name} item={item} onPress={() => onItemPress(item)} />
|
|
191
150
|
))}
|
|
192
|
-
</
|
|
151
|
+
</ListGroup>
|
|
193
152
|
)}
|
|
194
153
|
</YStack>
|
|
195
154
|
);
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
isDoctypeAllowed,
|
|
34
34
|
resolveCapabilities,
|
|
35
35
|
type BackofficeCapabilities,
|
|
36
|
-
type
|
|
36
|
+
type BackofficeDoctypes,
|
|
37
37
|
type ResolvedBackofficeCapabilities,
|
|
38
38
|
} from "./capabilities";
|
|
39
39
|
import type { BackofficeEvent, BackofficeEventHandler } from "./events";
|
|
@@ -158,8 +158,13 @@ export interface BackofficeProviderProps {
|
|
|
158
158
|
basePath?: string;
|
|
159
159
|
/** Feature visibility/behavior flags. Everything defaults ON. */
|
|
160
160
|
capabilities?: BackofficeCapabilities;
|
|
161
|
-
/**
|
|
162
|
-
|
|
161
|
+
/**
|
|
162
|
+
* Which DocTypes the backoffice offers: a list (`["Pokemon", "Trainer"]`)
|
|
163
|
+
* limits the All DocTypes page, the command palette, lists and workspace
|
|
164
|
+
* links to those; `{ allow, deny }` scopes finer. Omitted, every DocType
|
|
165
|
+
* the session can read.
|
|
166
|
+
*/
|
|
167
|
+
doctypes?: BackofficeDoctypes;
|
|
163
168
|
/**
|
|
164
169
|
* Field-renderer overrides (fieldtype → component), e.g.
|
|
165
170
|
* `{ Rating: MyRating }` — context-scoped to this provider, so two
|
|
@@ -191,7 +196,7 @@ export interface BackofficeConfig {
|
|
|
191
196
|
basePath: string;
|
|
192
197
|
paths: BackofficePaths;
|
|
193
198
|
capabilities: ResolvedBackofficeCapabilities;
|
|
194
|
-
doctypes?:
|
|
199
|
+
doctypes?: BackofficeDoctypes;
|
|
195
200
|
actions: BackofficeActions;
|
|
196
201
|
slots: BackofficeSlots;
|
|
197
202
|
appearance?: BackofficeAppearance;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { resolveCapabilities } from "./capabilities";
|
|
2
|
+
import { isDoctypeAllowed, resolveCapabilities } from "./capabilities";
|
|
3
3
|
|
|
4
4
|
describe("form builder capability", () => {
|
|
5
5
|
it("defaults on and accepts boolean or configured opt-outs", () => {
|
|
@@ -11,3 +11,21 @@ describe("form builder capability", () => {
|
|
|
11
11
|
expect(resolveCapabilities({ formBuilder: {} }).formBuilder.enabled).toBe(true);
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
|
+
|
|
15
|
+
describe("doctype scope", () => {
|
|
16
|
+
it("omitted offers every DocType", () => {
|
|
17
|
+
expect(isDoctypeAllowed(undefined, "Pokemon")).toBe(true);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it("a list offers only the DocTypes it names", () => {
|
|
21
|
+
expect(isDoctypeAllowed(["Pokemon", "Trainer"], "Trainer")).toBe(true);
|
|
22
|
+
expect(isDoctypeAllowed(["Pokemon", "Trainer"], "User")).toBe(false);
|
|
23
|
+
expect(isDoctypeAllowed([], "Pokemon")).toBe(false);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it("allow and deny still scope as before", () => {
|
|
27
|
+
expect(isDoctypeAllowed({ allow: ["Pokemon"] }, "User")).toBe(false);
|
|
28
|
+
expect(isDoctypeAllowed({ deny: ["User"] }, "User")).toBe(false);
|
|
29
|
+
expect(isDoctypeAllowed({ deny: ["User"] }, "Pokemon")).toBe(true);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -165,11 +165,20 @@ export interface BackofficeDoctypeScope {
|
|
|
165
165
|
deny?: readonly string[];
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
/**
|
|
169
|
+
* Which DocTypes the backoffice offers: an explicit list (shorthand for
|
|
170
|
+
* `{ allow: list }`) or an allow/deny scope. Omitted, every DocType the
|
|
171
|
+
* session can read.
|
|
172
|
+
*/
|
|
173
|
+
export type BackofficeDoctypes = readonly string[] | BackofficeDoctypeScope;
|
|
174
|
+
|
|
175
|
+
function isDoctypeList(scope: BackofficeDoctypes): scope is readonly string[] {
|
|
176
|
+
return Array.isArray(scope);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function isDoctypeAllowed(scope: BackofficeDoctypes | undefined, doctype: string): boolean {
|
|
172
180
|
if (!scope) return true;
|
|
181
|
+
if (isDoctypeList(scope)) return scope.includes(doctype);
|
|
173
182
|
if (scope.deny?.includes(doctype)) return false;
|
|
174
183
|
if (scope.allow && !scope.allow.includes(doctype)) return false;
|
|
175
184
|
return true;
|
package/src/desk/Desk.tsx
CHANGED
|
@@ -14,6 +14,7 @@ import { YStack } from "@multiplatform.one/components";
|
|
|
14
14
|
import { useFrappeConfig, type FieldRenderProps } from "@multiplatform.one/frappe-ui";
|
|
15
15
|
import type { ComponentType } from "react";
|
|
16
16
|
import { useEffect, useMemo, useRef } from "react";
|
|
17
|
+
import { useTranslation } from "react-i18next";
|
|
17
18
|
import {
|
|
18
19
|
BackofficeProvider,
|
|
19
20
|
type BackofficeActions,
|
|
@@ -23,8 +24,9 @@ import {
|
|
|
23
24
|
type BackofficeIntegrations,
|
|
24
25
|
} from "../config/BackofficeProvider";
|
|
25
26
|
import type { BackofficeEventHandler } from "../config/events";
|
|
26
|
-
import type { BackofficeCapabilities,
|
|
27
|
+
import type { BackofficeCapabilities, BackofficeDoctypes } from "../config/capabilities";
|
|
27
28
|
import type { BackofficeSlots } from "../config/slots";
|
|
29
|
+
import { BACKOFFICE_I18N_NAMESPACE } from "../i18n";
|
|
28
30
|
import { createMemoryNavigator, type BackofficeNavigator } from "../navigation/navigator";
|
|
29
31
|
import { BACKOFFICE_BASE, createBackofficePaths, type BackofficeView } from "../navigation/paths";
|
|
30
32
|
import type { FrappeFilters } from "../shared/types";
|
|
@@ -77,8 +79,13 @@ export interface DeskProps {
|
|
|
77
79
|
* chrome, not removable — the tenant seam (DeskScopeProvider).
|
|
78
80
|
*/
|
|
79
81
|
scope?: FrappeFilters;
|
|
80
|
-
/**
|
|
81
|
-
|
|
82
|
+
/**
|
|
83
|
+
* Which DocTypes the desk offers: a list limits the All DocTypes page, the
|
|
84
|
+
* palette, lists and links to those; `{ allow, deny }` scopes finer.
|
|
85
|
+
* Omitted, every DocType the session can read. A `doctype` pin defaults
|
|
86
|
+
* this to that doctype.
|
|
87
|
+
*/
|
|
88
|
+
doctypes?: BackofficeDoctypes;
|
|
82
89
|
|
|
83
90
|
// ─── which surfaces are enabled ────────────────────────────────────────
|
|
84
91
|
/** Feature flags, everything defaults on (config/capabilities.ts). */
|
|
@@ -274,6 +281,7 @@ function DeskBody({
|
|
|
274
281
|
views,
|
|
275
282
|
onTargetChange,
|
|
276
283
|
}: DeskBodyProps) {
|
|
284
|
+
const { t } = useTranslation(BACKOFFICE_I18N_NAMESPACE);
|
|
277
285
|
const target = useDeskTarget(pins);
|
|
278
286
|
|
|
279
287
|
const onTargetChangeRef = useRef(onTargetChange);
|
|
@@ -304,7 +312,15 @@ function DeskBody({
|
|
|
304
312
|
);
|
|
305
313
|
}
|
|
306
314
|
return (
|
|
307
|
-
<BackofficeShell
|
|
315
|
+
<BackofficeShell
|
|
316
|
+
title={
|
|
317
|
+
target?.kind === "all-doctypes"
|
|
318
|
+
? t("allDoctypes.title", "All DocTypes")
|
|
319
|
+
: target
|
|
320
|
+
? deskTargetTitle(target)
|
|
321
|
+
: undefined
|
|
322
|
+
}
|
|
323
|
+
>
|
|
308
324
|
{surface}
|
|
309
325
|
</BackofficeShell>
|
|
310
326
|
);
|
package/src/desk/DeskSurface.tsx
CHANGED
|
@@ -17,6 +17,7 @@ import { DoctypeListScreen } from "../list/DoctypeListScreen";
|
|
|
17
17
|
import type { BackofficeView } from "../navigation/paths";
|
|
18
18
|
import { QueryReportScreen } from "../report/QueryReportScreen";
|
|
19
19
|
import type { FrappeFilters } from "../shared/types";
|
|
20
|
+
import { AllDoctypesScreen } from "../shell/AllDoctypesScreen";
|
|
20
21
|
import { HomeRedirect } from "../shell/HomeRedirect";
|
|
21
22
|
import { NotFoundScreen } from "../shell/NotFoundScreen";
|
|
22
23
|
import { DoctypeViewScreen } from "../views/DoctypeViewScreen";
|
|
@@ -97,6 +98,8 @@ export function DeskSurface({
|
|
|
97
98
|
switch (target.kind) {
|
|
98
99
|
case "home":
|
|
99
100
|
return <HomeRedirect />;
|
|
101
|
+
case "all-doctypes":
|
|
102
|
+
return <AllDoctypesScreen />;
|
|
100
103
|
case "workspace":
|
|
101
104
|
return <WorkspaceScreen workspace={target.workspace} />;
|
|
102
105
|
case "list":
|
|
@@ -24,6 +24,10 @@ describe.each(BASE_PATHS)("resolveDeskPath round-trips createBackofficePaths at
|
|
|
24
24
|
expect(resolve(paths.home(), basePath)).toEqual({ kind: "home" });
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
+
it("allDoctypes() → all-doctypes, never a slug", () => {
|
|
28
|
+
expect(resolve(paths.allDoctypes(), basePath)).toEqual({ kind: "all-doctypes" });
|
|
29
|
+
});
|
|
30
|
+
|
|
27
31
|
it("workspace() → slug (ambiguity is data, resolved downstream)", () => {
|
|
28
32
|
expect(resolve(paths.workspace("Accounting"), basePath)).toEqual({
|
|
29
33
|
kind: "slug",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { BackofficeParams } from "../navigation/navigator";
|
|
12
12
|
import {
|
|
13
|
+
ALL_DOCTYPES_SEGMENT,
|
|
13
14
|
BACKOFFICE_BASE,
|
|
14
15
|
isBackofficeView,
|
|
15
16
|
parseDocDefaults,
|
|
@@ -32,6 +33,7 @@ export interface DeskViewParams {
|
|
|
32
33
|
*/
|
|
33
34
|
export type DeskAddress =
|
|
34
35
|
| { kind: "home" }
|
|
36
|
+
| { kind: "all-doctypes" }
|
|
35
37
|
| { kind: "form-builder"; doctype?: string }
|
|
36
38
|
| { kind: "slug"; slug: string; filtersParam?: string; sortParam?: string }
|
|
37
39
|
| {
|
|
@@ -59,7 +61,7 @@ function decode(segment: string): string {
|
|
|
59
61
|
|
|
60
62
|
/**
|
|
61
63
|
* Resolve `path` (no query string; query lives in `params`, One-router
|
|
62
|
-
* semantics) against the
|
|
64
|
+
* semantics) against the eight route shapes `createBackofficePaths` writes.
|
|
63
65
|
* Paths outside `basePath` resolve to `not-found`.
|
|
64
66
|
*/
|
|
65
67
|
export function resolveDeskPath(
|
|
@@ -78,6 +80,10 @@ export function resolveDeskPath(
|
|
|
78
80
|
const segments = rest.split("/").filter(Boolean).map(decode);
|
|
79
81
|
if (segments.length === 0) return { kind: "home" };
|
|
80
82
|
|
|
83
|
+
if (segments.length === 1 && segments[0] === ALL_DOCTYPES_SEGMENT) {
|
|
84
|
+
return { kind: "all-doctypes" };
|
|
85
|
+
}
|
|
86
|
+
|
|
81
87
|
if (segments.length === 1 && segments[0] === "customize-form") {
|
|
82
88
|
return { kind: "form-builder", doctype: first(params.doc_type) };
|
|
83
89
|
}
|
package/src/desk/target.ts
CHANGED
|
@@ -20,6 +20,7 @@ import { resolveDeskPath, type DeskAddress, type DeskViewParams } from "./resolv
|
|
|
20
20
|
|
|
21
21
|
export type DeskTarget =
|
|
22
22
|
| { kind: "home" }
|
|
23
|
+
| { kind: "all-doctypes" }
|
|
23
24
|
| { kind: "form-builder"; doctype?: string }
|
|
24
25
|
| { kind: "workspace"; workspace: string }
|
|
25
26
|
| { kind: "list"; doctype: string; filtersParam?: string; sortParam?: string }
|
|
@@ -73,6 +74,8 @@ function addressToTarget(
|
|
|
73
74
|
switch (address.kind) {
|
|
74
75
|
case "home":
|
|
75
76
|
return { kind: "home" };
|
|
77
|
+
case "all-doctypes":
|
|
78
|
+
return { kind: "all-doctypes" };
|
|
76
79
|
case "form-builder":
|
|
77
80
|
return { kind: "form-builder", doctype: address.doctype };
|
|
78
81
|
case "report":
|
|
@@ -18,6 +18,7 @@ import React from "react";
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import {
|
|
21
|
+
ActionButton,
|
|
21
22
|
AsyncBoundary,
|
|
22
23
|
AsyncSkeleton,
|
|
23
24
|
Button,
|
|
@@ -41,7 +42,6 @@ import {
|
|
|
41
42
|
type FormTab,
|
|
42
43
|
} from "@multiplatform.one/frappe-ui";
|
|
43
44
|
import { useLayoutSizeClass, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
44
|
-
import { ListBulletsIcon } from "@phosphor-icons/react";
|
|
45
45
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
46
46
|
import { useTranslation } from "react-i18next";
|
|
47
47
|
import {
|
|
@@ -638,9 +638,12 @@ export function DocFormScreen({
|
|
|
638
638
|
title={t("docNotPermitted", "You can't open {{doctype}} {{name}}", { doctype, name })}
|
|
639
639
|
description={refusalReason(form.docError)}
|
|
640
640
|
action={
|
|
641
|
-
<
|
|
642
|
-
|
|
643
|
-
|
|
641
|
+
<ActionButton
|
|
642
|
+
kind="back"
|
|
643
|
+
primary
|
|
644
|
+
label={t("backToList", "Back to {{doctype}} list", { doctype })}
|
|
645
|
+
onPress={() => navigator.navigate(paths.list(doctype))}
|
|
646
|
+
/>
|
|
644
647
|
}
|
|
645
648
|
/>
|
|
646
649
|
</YStack>
|
|
@@ -655,9 +658,12 @@ export function DocFormScreen({
|
|
|
655
658
|
title={t("docLoadError", "Could not load {{doctype}} {{name}}", { doctype, name })}
|
|
656
659
|
description={form.docError.message}
|
|
657
660
|
action={
|
|
658
|
-
<
|
|
659
|
-
|
|
660
|
-
|
|
661
|
+
<ActionButton
|
|
662
|
+
kind="back"
|
|
663
|
+
primary
|
|
664
|
+
label={t("backToList", "Back to {{doctype}} list", { doctype })}
|
|
665
|
+
onPress={() => navigator.navigate(paths.list(doctype))}
|
|
666
|
+
/>
|
|
661
667
|
}
|
|
662
668
|
/>
|
|
663
669
|
</YStack>
|
|
@@ -677,9 +683,12 @@ export function DocFormScreen({
|
|
|
677
683
|
"The document does not exist or you do not have permission to read it.",
|
|
678
684
|
)}
|
|
679
685
|
action={
|
|
680
|
-
<
|
|
681
|
-
|
|
682
|
-
|
|
686
|
+
<ActionButton
|
|
687
|
+
kind="back"
|
|
688
|
+
primary
|
|
689
|
+
label={t("backToList", "Back to {{doctype}} list", { doctype })}
|
|
690
|
+
onPress={() => navigator.navigate(paths.list(doctype))}
|
|
691
|
+
/>
|
|
683
692
|
}
|
|
684
693
|
/>
|
|
685
694
|
</YStack>
|