@multiplatform.one/backoffice 6.3.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/LICENSE +201 -0
- package/README.md +310 -0
- package/dist/cjs/chrome/BackofficeAwesomebar.cjs +95 -0
- package/dist/cjs/chrome/BackofficeAwesomebar.native.js +106 -0
- package/dist/cjs/chrome/BackofficeAwesomebar.native.js.map +1 -0
- package/dist/cjs/chrome/CommandPalette.cjs +453 -0
- package/dist/cjs/chrome/CommandPalette.native.js +505 -0
- package/dist/cjs/chrome/CommandPalette.native.js.map +1 -0
- package/dist/cjs/chrome/HelpMenu.cjs +131 -0
- package/dist/cjs/chrome/HelpMenu.native.js +145 -0
- package/dist/cjs/chrome/HelpMenu.native.js.map +1 -0
- package/dist/cjs/chrome/NotificationsButton.cjs +112 -0
- package/dist/cjs/chrome/NotificationsButton.native.js +115 -0
- package/dist/cjs/chrome/NotificationsButton.native.js.map +1 -0
- package/dist/cjs/chrome/UserMenu.cjs +158 -0
- package/dist/cjs/chrome/UserMenu.native.js +186 -0
- package/dist/cjs/chrome/UserMenu.native.js.map +1 -0
- package/dist/cjs/chrome/awesomebar-data.cjs +173 -0
- package/dist/cjs/chrome/awesomebar-data.native.js +233 -0
- package/dist/cjs/chrome/awesomebar-data.native.js.map +1 -0
- package/dist/cjs/chrome/command-palette-model.cjs +208 -0
- package/dist/cjs/chrome/command-palette-model.native.js +301 -0
- package/dist/cjs/chrome/command-palette-model.native.js.map +1 -0
- package/dist/cjs/chrome/help-about-dialog.cjs +136 -0
- package/dist/cjs/chrome/help-about-dialog.native.js +146 -0
- package/dist/cjs/chrome/help-about-dialog.native.js.map +1 -0
- package/dist/cjs/chrome/help-shortcuts-dialog.cjs +155 -0
- package/dist/cjs/chrome/help-shortcuts-dialog.native.js +168 -0
- package/dist/cjs/chrome/help-shortcuts-dialog.native.js.map +1 -0
- package/dist/cjs/chrome/notifications-data.cjs +190 -0
- package/dist/cjs/chrome/notifications-data.native.js +271 -0
- package/dist/cjs/chrome/notifications-data.native.js.map +1 -0
- package/dist/cjs/chrome/notifications-panel.cjs +171 -0
- package/dist/cjs/chrome/notifications-panel.native.js +189 -0
- package/dist/cjs/chrome/notifications-panel.native.js.map +1 -0
- package/dist/cjs/chrome/notifications-utils.cjs +43 -0
- package/dist/cjs/chrome/notifications-utils.native.js +46 -0
- package/dist/cjs/chrome/notifications-utils.native.js.map +1 -0
- package/dist/cjs/chrome/shortcuts.cjs +58 -0
- package/dist/cjs/chrome/shortcuts.native.js +72 -0
- package/dist/cjs/chrome/shortcuts.native.js.map +1 -0
- package/dist/cjs/chrome/user-session.cjs +100 -0
- package/dist/cjs/chrome/user-session.native.js +120 -0
- package/dist/cjs/chrome/user-session.native.js.map +1 -0
- package/dist/cjs/config/BackofficeProvider.cjs +164 -0
- package/dist/cjs/config/BackofficeProvider.native.js +217 -0
- package/dist/cjs/config/BackofficeProvider.native.js.map +1 -0
- package/dist/cjs/config/capabilities.cjs +123 -0
- package/dist/cjs/config/capabilities.native.js +155 -0
- package/dist/cjs/config/capabilities.native.js.map +1 -0
- package/dist/cjs/config/events.cjs +18 -0
- package/dist/cjs/config/events.native.js +21 -0
- package/dist/cjs/config/events.native.js.map +1 -0
- package/dist/cjs/config/slots.cjs +18 -0
- package/dist/cjs/config/slots.native.js +21 -0
- package/dist/cjs/config/slots.native.js.map +1 -0
- package/dist/cjs/i18n/en.cjs +101 -0
- package/dist/cjs/i18n/en.native.js +104 -0
- package/dist/cjs/i18n/en.native.js.map +1 -0
- package/dist/cjs/i18n/index.cjs +77 -0
- package/dist/cjs/i18n/index.native.js +102 -0
- package/dist/cjs/i18n/index.native.js.map +1 -0
- package/dist/cjs/index.cjs +109 -0
- package/dist/cjs/index.native.js +112 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/navigation/navigator.cjs +144 -0
- package/dist/cjs/navigation/navigator.native.js +307 -0
- package/dist/cjs/navigation/navigator.native.js.map +1 -0
- package/dist/cjs/navigation/paths.cjs +103 -0
- package/dist/cjs/navigation/paths.native.js +143 -0
- package/dist/cjs/navigation/paths.native.js.map +1 -0
- package/dist/cjs/oneAdapter/index.cjs +53 -0
- package/dist/cjs/oneAdapter/index.native.js +64 -0
- package/dist/cjs/oneAdapter/index.native.js.map +1 -0
- package/dist/cjs/shared/useFrappeApp.cjs +56 -0
- package/dist/cjs/shared/useFrappeApp.native.js +60 -0
- package/dist/cjs/shared/useFrappeApp.native.js.map +1 -0
- package/dist/cjs/shell/BackofficeShell.cjs +194 -0
- package/dist/cjs/shell/BackofficeShell.native.js +223 -0
- package/dist/cjs/shell/BackofficeShell.native.js.map +1 -0
- package/dist/cjs/shell/WorkspaceSidebar.cjs +115 -0
- package/dist/cjs/shell/WorkspaceSidebar.native.js +143 -0
- package/dist/cjs/shell/WorkspaceSidebar.native.js.map +1 -0
- package/dist/cjs/shell/useWorkspaces.cjs +131 -0
- package/dist/cjs/shell/useWorkspaces.native.js +173 -0
- package/dist/cjs/shell/useWorkspaces.native.js.map +1 -0
- package/dist/cjs/shell/workspaceIcons.cjs +64 -0
- package/dist/cjs/shell/workspaceIcons.native.js +67 -0
- package/dist/cjs/shell/workspaceIcons.native.js.map +1 -0
- package/dist/esm/chrome/BackofficeAwesomebar.mjs +70 -0
- package/dist/esm/chrome/BackofficeAwesomebar.mjs.map +1 -0
- package/dist/esm/chrome/BackofficeAwesomebar.native.js +78 -0
- package/dist/esm/chrome/BackofficeAwesomebar.native.js.map +1 -0
- package/dist/esm/chrome/CommandPalette.mjs +428 -0
- package/dist/esm/chrome/CommandPalette.mjs.map +1 -0
- package/dist/esm/chrome/CommandPalette.native.js +477 -0
- package/dist/esm/chrome/CommandPalette.native.js.map +1 -0
- package/dist/esm/chrome/HelpMenu.mjs +106 -0
- package/dist/esm/chrome/HelpMenu.mjs.map +1 -0
- package/dist/esm/chrome/HelpMenu.native.js +117 -0
- package/dist/esm/chrome/HelpMenu.native.js.map +1 -0
- package/dist/esm/chrome/NotificationsButton.mjs +87 -0
- package/dist/esm/chrome/NotificationsButton.mjs.map +1 -0
- package/dist/esm/chrome/NotificationsButton.native.js +87 -0
- package/dist/esm/chrome/NotificationsButton.native.js.map +1 -0
- package/dist/esm/chrome/UserMenu.mjs +133 -0
- package/dist/esm/chrome/UserMenu.mjs.map +1 -0
- package/dist/esm/chrome/UserMenu.native.js +147 -0
- package/dist/esm/chrome/UserMenu.native.js.map +1 -0
- package/dist/esm/chrome/awesomebar-data.mjs +144 -0
- package/dist/esm/chrome/awesomebar-data.mjs.map +1 -0
- package/dist/esm/chrome/awesomebar-data.native.js +190 -0
- package/dist/esm/chrome/awesomebar-data.native.js.map +1 -0
- package/dist/esm/chrome/command-palette-model.mjs +183 -0
- package/dist/esm/chrome/command-palette-model.mjs.map +1 -0
- package/dist/esm/chrome/command-palette-model.native.js +273 -0
- package/dist/esm/chrome/command-palette-model.native.js.map +1 -0
- package/dist/esm/chrome/help-about-dialog.mjs +111 -0
- package/dist/esm/chrome/help-about-dialog.mjs.map +1 -0
- package/dist/esm/chrome/help-about-dialog.native.js +118 -0
- package/dist/esm/chrome/help-about-dialog.native.js.map +1 -0
- package/dist/esm/chrome/help-shortcuts-dialog.mjs +130 -0
- package/dist/esm/chrome/help-shortcuts-dialog.mjs.map +1 -0
- package/dist/esm/chrome/help-shortcuts-dialog.native.js +140 -0
- package/dist/esm/chrome/help-shortcuts-dialog.native.js.map +1 -0
- package/dist/esm/chrome/notifications-data.mjs +165 -0
- package/dist/esm/chrome/notifications-data.mjs.map +1 -0
- package/dist/esm/chrome/notifications-data.native.js +232 -0
- package/dist/esm/chrome/notifications-data.native.js.map +1 -0
- package/dist/esm/chrome/notifications-panel.mjs +146 -0
- package/dist/esm/chrome/notifications-panel.mjs.map +1 -0
- package/dist/esm/chrome/notifications-panel.native.js +161 -0
- package/dist/esm/chrome/notifications-panel.native.js.map +1 -0
- package/dist/esm/chrome/notifications-utils.mjs +17 -0
- package/dist/esm/chrome/notifications-utils.mjs.map +1 -0
- package/dist/esm/chrome/notifications-utils.native.js +17 -0
- package/dist/esm/chrome/notifications-utils.native.js.map +1 -0
- package/dist/esm/chrome/shortcuts.mjs +33 -0
- package/dist/esm/chrome/shortcuts.mjs.map +1 -0
- package/dist/esm/chrome/shortcuts.native.js +44 -0
- package/dist/esm/chrome/shortcuts.native.js.map +1 -0
- package/dist/esm/chrome/user-session.mjs +73 -0
- package/dist/esm/chrome/user-session.mjs.map +1 -0
- package/dist/esm/chrome/user-session.native.js +79 -0
- package/dist/esm/chrome/user-session.native.js.map +1 -0
- package/dist/esm/config/BackofficeProvider.mjs +132 -0
- package/dist/esm/config/BackofficeProvider.mjs.map +1 -0
- package/dist/esm/config/BackofficeProvider.native.js +171 -0
- package/dist/esm/config/BackofficeProvider.native.js.map +1 -0
- package/dist/esm/config/capabilities.mjs +97 -0
- package/dist/esm/config/capabilities.mjs.map +1 -0
- package/dist/esm/config/capabilities.native.js +126 -0
- package/dist/esm/config/capabilities.native.js.map +1 -0
- package/dist/esm/config/events.mjs +2 -0
- package/dist/esm/config/events.mjs.map +1 -0
- package/dist/esm/config/events.native.js +2 -0
- package/dist/esm/config/events.native.js.map +1 -0
- package/dist/esm/config/slots.mjs +2 -0
- package/dist/esm/config/slots.mjs.map +1 -0
- package/dist/esm/config/slots.native.js +2 -0
- package/dist/esm/config/slots.native.js.map +1 -0
- package/dist/esm/i18n/en.mjs +76 -0
- package/dist/esm/i18n/en.mjs.map +1 -0
- package/dist/esm/i18n/en.native.js +76 -0
- package/dist/esm/i18n/en.native.js.map +1 -0
- package/dist/esm/i18n/index.mjs +40 -0
- package/dist/esm/i18n/index.mjs.map +1 -0
- package/dist/esm/i18n/index.native.js +62 -0
- package/dist/esm/i18n/index.native.js.map +1 -0
- package/dist/esm/index.mjs +26 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +26 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/navigation/navigator.mjs +115 -0
- package/dist/esm/navigation/navigator.mjs.map +1 -0
- package/dist/esm/navigation/navigator.native.js +275 -0
- package/dist/esm/navigation/navigator.native.js.map +1 -0
- package/dist/esm/navigation/paths.mjs +66 -0
- package/dist/esm/navigation/paths.mjs.map +1 -0
- package/dist/esm/navigation/paths.native.js +103 -0
- package/dist/esm/navigation/paths.native.js.map +1 -0
- package/dist/esm/oneAdapter/index.mjs +28 -0
- package/dist/esm/oneAdapter/index.mjs.map +1 -0
- package/dist/esm/oneAdapter/index.native.js +36 -0
- package/dist/esm/oneAdapter/index.native.js.map +1 -0
- package/dist/esm/shared/useFrappeApp.mjs +31 -0
- package/dist/esm/shared/useFrappeApp.mjs.map +1 -0
- package/dist/esm/shared/useFrappeApp.native.js +32 -0
- package/dist/esm/shared/useFrappeApp.native.js.map +1 -0
- package/dist/esm/shell/BackofficeShell.mjs +169 -0
- package/dist/esm/shell/BackofficeShell.mjs.map +1 -0
- package/dist/esm/shell/BackofficeShell.native.js +195 -0
- package/dist/esm/shell/BackofficeShell.native.js.map +1 -0
- package/dist/esm/shell/WorkspaceSidebar.mjs +89 -0
- package/dist/esm/shell/WorkspaceSidebar.mjs.map +1 -0
- package/dist/esm/shell/WorkspaceSidebar.native.js +114 -0
- package/dist/esm/shell/WorkspaceSidebar.native.js.map +1 -0
- package/dist/esm/shell/useWorkspaces.mjs +104 -0
- package/dist/esm/shell/useWorkspaces.mjs.map +1 -0
- package/dist/esm/shell/useWorkspaces.native.js +143 -0
- package/dist/esm/shell/useWorkspaces.native.js.map +1 -0
- package/dist/esm/shell/workspaceIcons.mjs +39 -0
- package/dist/esm/shell/workspaceIcons.mjs.map +1 -0
- package/dist/esm/shell/workspaceIcons.native.js +39 -0
- package/dist/esm/shell/workspaceIcons.native.js.map +1 -0
- package/dist/jsx/chrome/BackofficeAwesomebar.mjs +70 -0
- package/dist/jsx/chrome/BackofficeAwesomebar.mjs.map +1 -0
- package/dist/jsx/chrome/BackofficeAwesomebar.native.js +106 -0
- package/dist/jsx/chrome/BackofficeAwesomebar.native.js.map +1 -0
- package/dist/jsx/chrome/CommandPalette.mjs +428 -0
- package/dist/jsx/chrome/CommandPalette.mjs.map +1 -0
- package/dist/jsx/chrome/CommandPalette.native.js +505 -0
- package/dist/jsx/chrome/CommandPalette.native.js.map +1 -0
- package/dist/jsx/chrome/HelpMenu.mjs +106 -0
- package/dist/jsx/chrome/HelpMenu.mjs.map +1 -0
- package/dist/jsx/chrome/HelpMenu.native.js +145 -0
- package/dist/jsx/chrome/HelpMenu.native.js.map +1 -0
- package/dist/jsx/chrome/NotificationsButton.mjs +87 -0
- package/dist/jsx/chrome/NotificationsButton.mjs.map +1 -0
- package/dist/jsx/chrome/NotificationsButton.native.js +115 -0
- package/dist/jsx/chrome/NotificationsButton.native.js.map +1 -0
- package/dist/jsx/chrome/UserMenu.mjs +133 -0
- package/dist/jsx/chrome/UserMenu.mjs.map +1 -0
- package/dist/jsx/chrome/UserMenu.native.js +186 -0
- package/dist/jsx/chrome/UserMenu.native.js.map +1 -0
- package/dist/jsx/chrome/awesomebar-data.mjs +144 -0
- package/dist/jsx/chrome/awesomebar-data.mjs.map +1 -0
- package/dist/jsx/chrome/awesomebar-data.native.js +233 -0
- package/dist/jsx/chrome/awesomebar-data.native.js.map +1 -0
- package/dist/jsx/chrome/command-palette-model.mjs +183 -0
- package/dist/jsx/chrome/command-palette-model.mjs.map +1 -0
- package/dist/jsx/chrome/command-palette-model.native.js +301 -0
- package/dist/jsx/chrome/command-palette-model.native.js.map +1 -0
- package/dist/jsx/chrome/help-about-dialog.mjs +111 -0
- package/dist/jsx/chrome/help-about-dialog.mjs.map +1 -0
- package/dist/jsx/chrome/help-about-dialog.native.js +146 -0
- package/dist/jsx/chrome/help-about-dialog.native.js.map +1 -0
- package/dist/jsx/chrome/help-shortcuts-dialog.mjs +130 -0
- package/dist/jsx/chrome/help-shortcuts-dialog.mjs.map +1 -0
- package/dist/jsx/chrome/help-shortcuts-dialog.native.js +168 -0
- package/dist/jsx/chrome/help-shortcuts-dialog.native.js.map +1 -0
- package/dist/jsx/chrome/notifications-data.mjs +165 -0
- package/dist/jsx/chrome/notifications-data.mjs.map +1 -0
- package/dist/jsx/chrome/notifications-data.native.js +271 -0
- package/dist/jsx/chrome/notifications-data.native.js.map +1 -0
- package/dist/jsx/chrome/notifications-panel.mjs +146 -0
- package/dist/jsx/chrome/notifications-panel.mjs.map +1 -0
- package/dist/jsx/chrome/notifications-panel.native.js +189 -0
- package/dist/jsx/chrome/notifications-panel.native.js.map +1 -0
- package/dist/jsx/chrome/notifications-utils.mjs +17 -0
- package/dist/jsx/chrome/notifications-utils.mjs.map +1 -0
- package/dist/jsx/chrome/notifications-utils.native.js +46 -0
- package/dist/jsx/chrome/notifications-utils.native.js.map +1 -0
- package/dist/jsx/chrome/shortcuts.mjs +33 -0
- package/dist/jsx/chrome/shortcuts.mjs.map +1 -0
- package/dist/jsx/chrome/shortcuts.native.js +72 -0
- package/dist/jsx/chrome/shortcuts.native.js.map +1 -0
- package/dist/jsx/chrome/user-session.mjs +73 -0
- package/dist/jsx/chrome/user-session.mjs.map +1 -0
- package/dist/jsx/chrome/user-session.native.js +120 -0
- package/dist/jsx/chrome/user-session.native.js.map +1 -0
- package/dist/jsx/config/BackofficeProvider.mjs +132 -0
- package/dist/jsx/config/BackofficeProvider.mjs.map +1 -0
- package/dist/jsx/config/BackofficeProvider.native.js +217 -0
- package/dist/jsx/config/BackofficeProvider.native.js.map +1 -0
- package/dist/jsx/config/capabilities.mjs +97 -0
- package/dist/jsx/config/capabilities.mjs.map +1 -0
- package/dist/jsx/config/capabilities.native.js +155 -0
- package/dist/jsx/config/capabilities.native.js.map +1 -0
- package/dist/jsx/config/events.mjs +2 -0
- package/dist/jsx/config/events.mjs.map +1 -0
- package/dist/jsx/config/events.native.js +21 -0
- package/dist/jsx/config/events.native.js.map +1 -0
- package/dist/jsx/config/slots.mjs +2 -0
- package/dist/jsx/config/slots.mjs.map +1 -0
- package/dist/jsx/config/slots.native.js +21 -0
- package/dist/jsx/config/slots.native.js.map +1 -0
- package/dist/jsx/i18n/en.mjs +76 -0
- package/dist/jsx/i18n/en.mjs.map +1 -0
- package/dist/jsx/i18n/en.native.js +104 -0
- package/dist/jsx/i18n/en.native.js.map +1 -0
- package/dist/jsx/i18n/index.mjs +40 -0
- package/dist/jsx/i18n/index.mjs.map +1 -0
- package/dist/jsx/i18n/index.native.js +102 -0
- package/dist/jsx/i18n/index.native.js.map +1 -0
- package/dist/jsx/index.js +26 -0
- package/dist/jsx/index.js.map +1 -0
- package/dist/jsx/index.mjs +26 -0
- package/dist/jsx/index.mjs.map +1 -0
- package/dist/jsx/index.native.js +112 -0
- package/dist/jsx/index.native.js.map +1 -0
- package/dist/jsx/navigation/navigator.mjs +115 -0
- package/dist/jsx/navigation/navigator.mjs.map +1 -0
- package/dist/jsx/navigation/navigator.native.js +307 -0
- package/dist/jsx/navigation/navigator.native.js.map +1 -0
- package/dist/jsx/navigation/paths.mjs +66 -0
- package/dist/jsx/navigation/paths.mjs.map +1 -0
- package/dist/jsx/navigation/paths.native.js +143 -0
- package/dist/jsx/navigation/paths.native.js.map +1 -0
- package/dist/jsx/oneAdapter/index.mjs +28 -0
- package/dist/jsx/oneAdapter/index.mjs.map +1 -0
- package/dist/jsx/oneAdapter/index.native.js +64 -0
- package/dist/jsx/oneAdapter/index.native.js.map +1 -0
- package/dist/jsx/shared/useFrappeApp.mjs +31 -0
- package/dist/jsx/shared/useFrappeApp.mjs.map +1 -0
- package/dist/jsx/shared/useFrappeApp.native.js +60 -0
- package/dist/jsx/shared/useFrappeApp.native.js.map +1 -0
- package/dist/jsx/shell/BackofficeShell.mjs +169 -0
- package/dist/jsx/shell/BackofficeShell.mjs.map +1 -0
- package/dist/jsx/shell/BackofficeShell.native.js +223 -0
- package/dist/jsx/shell/BackofficeShell.native.js.map +1 -0
- package/dist/jsx/shell/WorkspaceSidebar.mjs +89 -0
- package/dist/jsx/shell/WorkspaceSidebar.mjs.map +1 -0
- package/dist/jsx/shell/WorkspaceSidebar.native.js +143 -0
- package/dist/jsx/shell/WorkspaceSidebar.native.js.map +1 -0
- package/dist/jsx/shell/useWorkspaces.mjs +104 -0
- package/dist/jsx/shell/useWorkspaces.mjs.map +1 -0
- package/dist/jsx/shell/useWorkspaces.native.js +173 -0
- package/dist/jsx/shell/useWorkspaces.native.js.map +1 -0
- package/dist/jsx/shell/workspaceIcons.mjs +39 -0
- package/dist/jsx/shell/workspaceIcons.mjs.map +1 -0
- package/dist/jsx/shell/workspaceIcons.native.js +67 -0
- package/dist/jsx/shell/workspaceIcons.native.js.map +1 -0
- package/package.json +123 -0
- package/src/chrome/BackofficeAwesomebar.tsx +89 -0
- package/src/chrome/CommandPalette.spec.tsx +252 -0
- package/src/chrome/CommandPalette.tsx +520 -0
- package/src/chrome/HelpMenu.tsx +119 -0
- package/src/chrome/NotificationsButton.tsx +87 -0
- package/src/chrome/UserMenu.tsx +173 -0
- package/src/chrome/awesomebar-data.tsx +252 -0
- package/src/chrome/command-palette-model.ts +291 -0
- package/src/chrome/help-about-dialog.tsx +130 -0
- package/src/chrome/help-shortcuts-dialog.tsx +144 -0
- package/src/chrome/notifications-data.tsx +287 -0
- package/src/chrome/notifications-panel.tsx +175 -0
- package/src/chrome/notifications-utils.tsx +44 -0
- package/src/chrome/shortcuts.ts +53 -0
- package/src/chrome/user-session.tsx +116 -0
- package/src/config/BackofficeProvider.spec.tsx +126 -0
- package/src/config/BackofficeProvider.tsx +315 -0
- package/src/config/capabilities.ts +172 -0
- package/src/config/events.ts +19 -0
- package/src/config/slots.ts +28 -0
- package/src/i18n/en.ts +83 -0
- package/src/i18n/index.ts +69 -0
- package/src/index.ts +150 -0
- package/src/navigation/navigator.spec.ts +106 -0
- package/src/navigation/navigator.ts +209 -0
- package/src/navigation/paths.ts +146 -0
- package/src/oneAdapter/index.tsx +61 -0
- package/src/shared/useFrappeApp.ts +39 -0
- package/src/shell/BackofficeShell.tsx +222 -0
- package/src/shell/WorkspaceSidebar.tsx +119 -0
- package/src/shell/useWorkspaces.ts +202 -0
- package/src/shell/workspaceIcons.ts +76 -0
- package/types/chrome/BackofficeAwesomebar.d.ts +12 -0
- package/types/chrome/BackofficeAwesomebar.d.ts.map +1 -0
- package/types/chrome/CommandPalette.d.ts +6 -0
- package/types/chrome/CommandPalette.d.ts.map +1 -0
- package/types/chrome/HelpMenu.d.ts +2 -0
- package/types/chrome/HelpMenu.d.ts.map +1 -0
- package/types/chrome/NotificationsButton.d.ts +2 -0
- package/types/chrome/NotificationsButton.d.ts.map +1 -0
- package/types/chrome/UserMenu.d.ts +6 -0
- package/types/chrome/UserMenu.d.ts.map +1 -0
- package/types/chrome/awesomebar-data.d.ts +52 -0
- package/types/chrome/awesomebar-data.d.ts.map +1 -0
- package/types/chrome/command-palette-model.d.ts +47 -0
- package/types/chrome/command-palette-model.d.ts.map +1 -0
- package/types/chrome/help-about-dialog.d.ts +12 -0
- package/types/chrome/help-about-dialog.d.ts.map +1 -0
- package/types/chrome/help-shortcuts-dialog.d.ts +6 -0
- package/types/chrome/help-shortcuts-dialog.d.ts.map +1 -0
- package/types/chrome/notifications-data.d.ts +34 -0
- package/types/chrome/notifications-data.d.ts.map +1 -0
- package/types/chrome/notifications-panel.d.ts +11 -0
- package/types/chrome/notifications-panel.d.ts.map +1 -0
- package/types/chrome/notifications-utils.d.ts +21 -0
- package/types/chrome/notifications-utils.d.ts.map +1 -0
- package/types/chrome/shortcuts.d.ts +6 -0
- package/types/chrome/shortcuts.d.ts.map +1 -0
- package/types/chrome/user-session.d.ts +19 -0
- package/types/chrome/user-session.d.ts.map +1 -0
- package/types/config/BackofficeProvider.d.ts +128 -0
- package/types/config/BackofficeProvider.d.ts.map +1 -0
- package/types/config/capabilities.d.ts +109 -0
- package/types/config/capabilities.d.ts.map +1 -0
- package/types/config/events.d.ts +39 -0
- package/types/config/events.d.ts.map +1 -0
- package/types/config/slots.d.ts +32 -0
- package/types/config/slots.d.ts.map +1 -0
- package/types/i18n/en.d.ts +83 -0
- package/types/i18n/en.d.ts.map +1 -0
- package/types/i18n/index.d.ts +27 -0
- package/types/i18n/index.d.ts.map +1 -0
- package/types/index.d.ts +55 -0
- package/types/index.d.ts.map +1 -0
- package/types/navigation/navigator.d.ts +98 -0
- package/types/navigation/navigator.d.ts.map +1 -0
- package/types/navigation/paths.d.ts +60 -0
- package/types/navigation/paths.d.ts.map +1 -0
- package/types/oneAdapter/index.d.ts +8 -0
- package/types/oneAdapter/index.d.ts.map +1 -0
- package/types/shared/useFrappeApp.d.ts +10 -0
- package/types/shared/useFrappeApp.d.ts.map +1 -0
- package/types/shell/BackofficeShell.d.ts +10 -0
- package/types/shell/BackofficeShell.d.ts.map +1 -0
- package/types/shell/WorkspaceSidebar.d.ts +9 -0
- package/types/shell/WorkspaceSidebar.d.ts.map +1 -0
- package/types/shell/useWorkspaces.d.ts +43 -0
- package/types/shell/useWorkspaces.d.ts.map +1 -0
- package/types/shell/workspaceIcons.d.ts +9 -0
- package/types/shell/workspaceIcons.d.ts.map +1 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var command_palette_model_exports = {};
|
|
24
|
+
__export(command_palette_model_exports, {
|
|
25
|
+
useCommandPaletteModel: () => useCommandPaletteModel
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(command_palette_model_exports);
|
|
28
|
+
var import_react = require("@phosphor-icons/react");
|
|
29
|
+
var import_react2 = require("react");
|
|
30
|
+
var import_react_i18next = require("react-i18next");
|
|
31
|
+
var import_BackofficeProvider = require("../config/BackofficeProvider.cjs");
|
|
32
|
+
var import_i18n = require("../i18n/index.cjs");
|
|
33
|
+
var import_awesomebar_data = require("./awesomebar-data.cjs");
|
|
34
|
+
const maxRecentsEmptyQuery = 8;
|
|
35
|
+
const maxRecentsWithQuery = 4;
|
|
36
|
+
const maxNavWorkspaces = 4;
|
|
37
|
+
const maxNavDoctypes = 4;
|
|
38
|
+
const actionViews = ["list", "report", "kanban"];
|
|
39
|
+
const actionViewIcons = {
|
|
40
|
+
list: import_react.ListIcon,
|
|
41
|
+
report: import_react.TableIcon,
|
|
42
|
+
kanban: import_react.KanbanIcon
|
|
43
|
+
};
|
|
44
|
+
const actionViewLabelKeys = {
|
|
45
|
+
list: {
|
|
46
|
+
key: "awesomebar.listCommand",
|
|
47
|
+
defaultValue: "{{doctype}} List"
|
|
48
|
+
},
|
|
49
|
+
report: {
|
|
50
|
+
key: "awesomebar.reportCommand",
|
|
51
|
+
defaultValue: "{{doctype}} Report"
|
|
52
|
+
},
|
|
53
|
+
kanban: {
|
|
54
|
+
key: "awesomebar.kanbanCommand",
|
|
55
|
+
defaultValue: "{{doctype}} Kanban"
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
function useCommandPaletteModel({
|
|
59
|
+
query,
|
|
60
|
+
debouncedQuery,
|
|
61
|
+
open
|
|
62
|
+
}) {
|
|
63
|
+
const {
|
|
64
|
+
t
|
|
65
|
+
} = (0, import_react_i18next.useTranslation)(import_i18n.BACKOFFICE_I18N_NAMESPACE);
|
|
66
|
+
const paths = (0, import_BackofficeProvider.useBackofficePaths)();
|
|
67
|
+
const capabilities = (0, import_BackofficeProvider.useBackofficeCapabilities)();
|
|
68
|
+
const isDoctypeAllowed = (0, import_BackofficeProvider.useIsDoctypeAllowed)();
|
|
69
|
+
const {
|
|
70
|
+
catalog
|
|
71
|
+
} = (0, import_awesomebar_data.useAwesomebarCatalog)();
|
|
72
|
+
const {
|
|
73
|
+
hits,
|
|
74
|
+
searching
|
|
75
|
+
} = (0, import_awesomebar_data.useGlobalSearch)(debouncedQuery);
|
|
76
|
+
const [recents, setRecents] = (0, import_react2.useState)([]);
|
|
77
|
+
(0, import_react2.useEffect)(() => {
|
|
78
|
+
if (!open) return;
|
|
79
|
+
let cancelled = false;
|
|
80
|
+
void (0, import_awesomebar_data.readRecentItems)().then(stored => {
|
|
81
|
+
if (!cancelled) setRecents(stored);
|
|
82
|
+
});
|
|
83
|
+
return () => {
|
|
84
|
+
cancelled = true;
|
|
85
|
+
};
|
|
86
|
+
}, [open]);
|
|
87
|
+
const trimmed = query.trim();
|
|
88
|
+
const sections = (0, import_react2.useMemo)(() => {
|
|
89
|
+
const next = [];
|
|
90
|
+
const lowerQuery = trimmed.toLowerCase();
|
|
91
|
+
const matchingRecents = trimmed ? recents.filter(recent => recent.label.toLowerCase().includes(lowerQuery)).slice(0, maxRecentsWithQuery) : recents.slice(0, maxRecentsEmptyQuery);
|
|
92
|
+
if (matchingRecents.length > 0) {
|
|
93
|
+
next.push({
|
|
94
|
+
id: "recents",
|
|
95
|
+
label: t("awesomebar.recents", "Recents"),
|
|
96
|
+
items: matchingRecents.map(recent => ({
|
|
97
|
+
id: `recent:${recent.path}`,
|
|
98
|
+
label: recent.label,
|
|
99
|
+
path: recent.path,
|
|
100
|
+
icon: import_react.ClockIcon
|
|
101
|
+
}))
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
if (trimmed) {
|
|
105
|
+
const scopedDoctypes = (catalog?.doctypes ?? []).filter(isDoctypeAllowed);
|
|
106
|
+
const rankedDoctypes = (0, import_awesomebar_data.rankNameMatches)(trimmed, scopedDoctypes, maxNavDoctypes + 1);
|
|
107
|
+
const topDoctype = rankedDoctypes[0];
|
|
108
|
+
const actionItems = [];
|
|
109
|
+
if (topDoctype) {
|
|
110
|
+
if (capabilities.newDoc.enabled) {
|
|
111
|
+
actionItems.push({
|
|
112
|
+
id: `new:${topDoctype}`,
|
|
113
|
+
label: t("awesomebar.newCommand", {
|
|
114
|
+
defaultValue: "New {{doctype}}",
|
|
115
|
+
doctype: topDoctype
|
|
116
|
+
}),
|
|
117
|
+
path: paths.newDoc(topDoctype),
|
|
118
|
+
icon: import_react.PlusIcon
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
if (capabilities.views.enabled) {
|
|
122
|
+
for (const view of actionViews) {
|
|
123
|
+
if (!capabilities.views.allow.includes(view)) continue;
|
|
124
|
+
const {
|
|
125
|
+
key,
|
|
126
|
+
defaultValue
|
|
127
|
+
} = actionViewLabelKeys[view];
|
|
128
|
+
actionItems.push({
|
|
129
|
+
id: `${view}:${topDoctype}`,
|
|
130
|
+
label: t(key, {
|
|
131
|
+
defaultValue,
|
|
132
|
+
doctype: topDoctype
|
|
133
|
+
}),
|
|
134
|
+
path: paths.view(topDoctype, view),
|
|
135
|
+
icon: actionViewIcons[view]
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (actionItems.length > 0) {
|
|
141
|
+
next.push({
|
|
142
|
+
id: "actions",
|
|
143
|
+
label: t("awesomebar.actions", "Actions"),
|
|
144
|
+
items: actionItems
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
const navigationItems = [];
|
|
148
|
+
const workspaces = catalog?.workspaces ?? [];
|
|
149
|
+
const byTitle = new Map(workspaces.map(workspace => [workspace.title, workspace]));
|
|
150
|
+
for (const title of (0, import_awesomebar_data.rankNameMatches)(trimmed, workspaces.map(workspace => workspace.title), maxNavWorkspaces)) {
|
|
151
|
+
const workspace = byTitle.get(title);
|
|
152
|
+
if (!workspace) continue;
|
|
153
|
+
navigationItems.push({
|
|
154
|
+
id: `workspace:${workspace.name}`,
|
|
155
|
+
label: workspace.title,
|
|
156
|
+
badge: t("awesomebar.workspaceBadge", "Workspace"),
|
|
157
|
+
path: paths.workspace(workspace.name),
|
|
158
|
+
icon: import_react.GlobeIcon
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
for (const doctype of rankedDoctypes.slice(topDoctype ? 1 : 0, maxNavDoctypes + 1)) {
|
|
162
|
+
navigationItems.push({
|
|
163
|
+
id: `doctype:${doctype}`,
|
|
164
|
+
label: doctype,
|
|
165
|
+
badge: t("awesomebar.doctypeBadge", "DocType"),
|
|
166
|
+
path: paths.list(doctype),
|
|
167
|
+
icon: import_react.ListIcon
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
if (navigationItems.length > 0) {
|
|
171
|
+
next.push({
|
|
172
|
+
id: "navigation",
|
|
173
|
+
label: t("awesomebar.navigation", "Navigation"),
|
|
174
|
+
items: navigationItems
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
const documentItems = [];
|
|
178
|
+
for (const hit of hits) {
|
|
179
|
+
if (!isDoctypeAllowed(hit.doctype)) continue;
|
|
180
|
+
documentItems.push({
|
|
181
|
+
id: `doc:${hit.doctype}:${hit.name}`,
|
|
182
|
+
label: hit.name,
|
|
183
|
+
badge: hit.doctype,
|
|
184
|
+
description: (0, import_awesomebar_data.toContentSnippet)(hit.content),
|
|
185
|
+
path: paths.form(hit.doctype, hit.name),
|
|
186
|
+
icon: import_react.FileTextIcon
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
if (documentItems.length > 0) {
|
|
190
|
+
next.push({
|
|
191
|
+
id: "documents",
|
|
192
|
+
label: t("awesomebar.documents", "Documents"),
|
|
193
|
+
items: documentItems
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return next;
|
|
198
|
+
}, [trimmed, recents, catalog, hits, capabilities, paths, isDoctypeAllowed, t]);
|
|
199
|
+
const items = (0, import_react2.useMemo)(() => sections.flatMap(section => section.items), [sections]);
|
|
200
|
+
return {
|
|
201
|
+
sections,
|
|
202
|
+
items,
|
|
203
|
+
searching,
|
|
204
|
+
query: trimmed,
|
|
205
|
+
hasQuery: Boolean(trimmed),
|
|
206
|
+
noResults: Boolean(trimmed) && !searching && items.length === 0
|
|
207
|
+
};
|
|
208
|
+
}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var command_palette_model_exports = {};
|
|
26
|
+
__export(command_palette_model_exports, {
|
|
27
|
+
useCommandPaletteModel: () => useCommandPaletteModel
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(command_palette_model_exports);
|
|
30
|
+
var import_react = require("@phosphor-icons/react");
|
|
31
|
+
var import_react2 = require("react");
|
|
32
|
+
var import_react_i18next = require("react-i18next");
|
|
33
|
+
var import_BackofficeProvider = require("../config/BackofficeProvider.native.js");
|
|
34
|
+
var import_i18n = require("../i18n/index.native.js");
|
|
35
|
+
var import_awesomebar_data = require("./awesomebar-data.native.js");
|
|
36
|
+
var maxRecentsEmptyQuery = 8;
|
|
37
|
+
var maxRecentsWithQuery = 4;
|
|
38
|
+
var maxNavWorkspaces = 4;
|
|
39
|
+
var maxNavDoctypes = 4;
|
|
40
|
+
var actionViews = ["list", "report", "kanban"];
|
|
41
|
+
var actionViewIcons = {
|
|
42
|
+
list: import_react.ListIcon,
|
|
43
|
+
report: import_react.TableIcon,
|
|
44
|
+
kanban: import_react.KanbanIcon
|
|
45
|
+
};
|
|
46
|
+
var actionViewLabelKeys = {
|
|
47
|
+
list: {
|
|
48
|
+
key: "awesomebar.listCommand",
|
|
49
|
+
defaultValue: "{{doctype}} List"
|
|
50
|
+
},
|
|
51
|
+
report: {
|
|
52
|
+
key: "awesomebar.reportCommand",
|
|
53
|
+
defaultValue: "{{doctype}} Report"
|
|
54
|
+
},
|
|
55
|
+
kanban: {
|
|
56
|
+
key: "awesomebar.kanbanCommand",
|
|
57
|
+
defaultValue: "{{doctype}} Kanban"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
function useCommandPaletteModel(param) {
|
|
61
|
+
var {
|
|
62
|
+
query,
|
|
63
|
+
debouncedQuery,
|
|
64
|
+
open
|
|
65
|
+
} = param;
|
|
66
|
+
var {
|
|
67
|
+
t
|
|
68
|
+
} = (0, import_react_i18next.useTranslation)(import_i18n.BACKOFFICE_I18N_NAMESPACE);
|
|
69
|
+
var paths = (0, import_BackofficeProvider.useBackofficePaths)();
|
|
70
|
+
var capabilities = (0, import_BackofficeProvider.useBackofficeCapabilities)();
|
|
71
|
+
var isDoctypeAllowed = (0, import_BackofficeProvider.useIsDoctypeAllowed)();
|
|
72
|
+
var {
|
|
73
|
+
catalog
|
|
74
|
+
} = (0, import_awesomebar_data.useAwesomebarCatalog)();
|
|
75
|
+
var {
|
|
76
|
+
hits,
|
|
77
|
+
searching
|
|
78
|
+
} = (0, import_awesomebar_data.useGlobalSearch)(debouncedQuery);
|
|
79
|
+
var [recents, setRecents] = (0, import_react2.useState)([]);
|
|
80
|
+
(0, import_react2.useEffect)(function () {
|
|
81
|
+
if (!open) return;
|
|
82
|
+
var cancelled = false;
|
|
83
|
+
void (0, import_awesomebar_data.readRecentItems)().then(function (stored) {
|
|
84
|
+
if (!cancelled) setRecents(stored);
|
|
85
|
+
});
|
|
86
|
+
return function () {
|
|
87
|
+
cancelled = true;
|
|
88
|
+
};
|
|
89
|
+
}, [open]);
|
|
90
|
+
var trimmed = query.trim();
|
|
91
|
+
var sections = (0, import_react2.useMemo)(function () {
|
|
92
|
+
var next = [];
|
|
93
|
+
var lowerQuery = trimmed.toLowerCase();
|
|
94
|
+
var matchingRecents = trimmed ? recents.filter(function (recent) {
|
|
95
|
+
return recent.label.toLowerCase().includes(lowerQuery);
|
|
96
|
+
}).slice(0, maxRecentsWithQuery) : recents.slice(0, maxRecentsEmptyQuery);
|
|
97
|
+
if (matchingRecents.length > 0) {
|
|
98
|
+
next.push({
|
|
99
|
+
id: "recents",
|
|
100
|
+
label: t("awesomebar.recents", "Recents"),
|
|
101
|
+
items: matchingRecents.map(function (recent) {
|
|
102
|
+
return {
|
|
103
|
+
id: `recent:${recent.path}`,
|
|
104
|
+
label: recent.label,
|
|
105
|
+
path: recent.path,
|
|
106
|
+
icon: import_react.ClockIcon
|
|
107
|
+
};
|
|
108
|
+
})
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
if (trimmed) {
|
|
112
|
+
var _ref, _ref1;
|
|
113
|
+
var scopedDoctypes = ((_ref = catalog === null || catalog === void 0 ? void 0 : catalog.doctypes) !== null && _ref !== void 0 ? _ref : []).filter(isDoctypeAllowed);
|
|
114
|
+
var rankedDoctypes = (0, import_awesomebar_data.rankNameMatches)(trimmed, scopedDoctypes, maxNavDoctypes + 1);
|
|
115
|
+
var topDoctype = rankedDoctypes[0];
|
|
116
|
+
var actionItems = [];
|
|
117
|
+
if (topDoctype) {
|
|
118
|
+
if (capabilities.newDoc.enabled) {
|
|
119
|
+
actionItems.push({
|
|
120
|
+
id: `new:${topDoctype}`,
|
|
121
|
+
label: t("awesomebar.newCommand", {
|
|
122
|
+
defaultValue: "New {{doctype}}",
|
|
123
|
+
doctype: topDoctype
|
|
124
|
+
}),
|
|
125
|
+
path: paths.newDoc(topDoctype),
|
|
126
|
+
icon: import_react.PlusIcon
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
if (capabilities.views.enabled) {
|
|
130
|
+
var _iteratorNormalCompletion = true,
|
|
131
|
+
_didIteratorError = false,
|
|
132
|
+
_iteratorError = void 0;
|
|
133
|
+
try {
|
|
134
|
+
for (var _iterator = actionViews[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
135
|
+
var view = _step.value;
|
|
136
|
+
if (!capabilities.views.allow.includes(view)) continue;
|
|
137
|
+
var {
|
|
138
|
+
key,
|
|
139
|
+
defaultValue
|
|
140
|
+
} = actionViewLabelKeys[view];
|
|
141
|
+
actionItems.push({
|
|
142
|
+
id: `${view}:${topDoctype}`,
|
|
143
|
+
label: t(key, {
|
|
144
|
+
defaultValue,
|
|
145
|
+
doctype: topDoctype
|
|
146
|
+
}),
|
|
147
|
+
path: paths.view(topDoctype, view),
|
|
148
|
+
icon: actionViewIcons[view]
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
} catch (err) {
|
|
152
|
+
_didIteratorError = true;
|
|
153
|
+
_iteratorError = err;
|
|
154
|
+
} finally {
|
|
155
|
+
try {
|
|
156
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
157
|
+
_iterator.return();
|
|
158
|
+
}
|
|
159
|
+
} finally {
|
|
160
|
+
if (_didIteratorError) {
|
|
161
|
+
throw _iteratorError;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (actionItems.length > 0) {
|
|
168
|
+
next.push({
|
|
169
|
+
id: "actions",
|
|
170
|
+
label: t("awesomebar.actions", "Actions"),
|
|
171
|
+
items: actionItems
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
var navigationItems = [];
|
|
175
|
+
var workspaces = (_ref1 = catalog === null || catalog === void 0 ? void 0 : catalog.workspaces) !== null && _ref1 !== void 0 ? _ref1 : [];
|
|
176
|
+
var byTitle = new Map(workspaces.map(function (workspace2) {
|
|
177
|
+
return [workspace2.title, workspace2];
|
|
178
|
+
}));
|
|
179
|
+
var _iteratorNormalCompletion1 = true,
|
|
180
|
+
_didIteratorError1 = false,
|
|
181
|
+
_iteratorError1 = void 0;
|
|
182
|
+
try {
|
|
183
|
+
for (var _iterator1 = (0, import_awesomebar_data.rankNameMatches)(trimmed, workspaces.map(function (workspace2) {
|
|
184
|
+
return workspace2.title;
|
|
185
|
+
}), maxNavWorkspaces)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
186
|
+
var title = _step1.value;
|
|
187
|
+
var workspace = byTitle.get(title);
|
|
188
|
+
if (!workspace) continue;
|
|
189
|
+
navigationItems.push({
|
|
190
|
+
id: `workspace:${workspace.name}`,
|
|
191
|
+
label: workspace.title,
|
|
192
|
+
badge: t("awesomebar.workspaceBadge", "Workspace"),
|
|
193
|
+
path: paths.workspace(workspace.name),
|
|
194
|
+
icon: import_react.GlobeIcon
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
} catch (err) {
|
|
198
|
+
_didIteratorError1 = true;
|
|
199
|
+
_iteratorError1 = err;
|
|
200
|
+
} finally {
|
|
201
|
+
try {
|
|
202
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
203
|
+
_iterator1.return();
|
|
204
|
+
}
|
|
205
|
+
} finally {
|
|
206
|
+
if (_didIteratorError1) {
|
|
207
|
+
throw _iteratorError1;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
var _iteratorNormalCompletion2 = true,
|
|
212
|
+
_didIteratorError2 = false,
|
|
213
|
+
_iteratorError2 = void 0;
|
|
214
|
+
try {
|
|
215
|
+
for (var _iterator2 = rankedDoctypes.slice(topDoctype ? 1 : 0, maxNavDoctypes + 1)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
216
|
+
var doctype = _step2.value;
|
|
217
|
+
navigationItems.push({
|
|
218
|
+
id: `doctype:${doctype}`,
|
|
219
|
+
label: doctype,
|
|
220
|
+
badge: t("awesomebar.doctypeBadge", "DocType"),
|
|
221
|
+
path: paths.list(doctype),
|
|
222
|
+
icon: import_react.ListIcon
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
} catch (err) {
|
|
226
|
+
_didIteratorError2 = true;
|
|
227
|
+
_iteratorError2 = err;
|
|
228
|
+
} finally {
|
|
229
|
+
try {
|
|
230
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
231
|
+
_iterator2.return();
|
|
232
|
+
}
|
|
233
|
+
} finally {
|
|
234
|
+
if (_didIteratorError2) {
|
|
235
|
+
throw _iteratorError2;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (navigationItems.length > 0) {
|
|
240
|
+
next.push({
|
|
241
|
+
id: "navigation",
|
|
242
|
+
label: t("awesomebar.navigation", "Navigation"),
|
|
243
|
+
items: navigationItems
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
var documentItems = [];
|
|
247
|
+
var _iteratorNormalCompletion3 = true,
|
|
248
|
+
_didIteratorError3 = false,
|
|
249
|
+
_iteratorError3 = void 0;
|
|
250
|
+
try {
|
|
251
|
+
for (var _iterator3 = hits[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
|
252
|
+
var hit = _step3.value;
|
|
253
|
+
if (!isDoctypeAllowed(hit.doctype)) continue;
|
|
254
|
+
documentItems.push({
|
|
255
|
+
id: `doc:${hit.doctype}:${hit.name}`,
|
|
256
|
+
label: hit.name,
|
|
257
|
+
badge: hit.doctype,
|
|
258
|
+
description: (0, import_awesomebar_data.toContentSnippet)(hit.content),
|
|
259
|
+
path: paths.form(hit.doctype, hit.name),
|
|
260
|
+
icon: import_react.FileTextIcon
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
} catch (err) {
|
|
264
|
+
_didIteratorError3 = true;
|
|
265
|
+
_iteratorError3 = err;
|
|
266
|
+
} finally {
|
|
267
|
+
try {
|
|
268
|
+
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
|
269
|
+
_iterator3.return();
|
|
270
|
+
}
|
|
271
|
+
} finally {
|
|
272
|
+
if (_didIteratorError3) {
|
|
273
|
+
throw _iteratorError3;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
if (documentItems.length > 0) {
|
|
278
|
+
next.push({
|
|
279
|
+
id: "documents",
|
|
280
|
+
label: t("awesomebar.documents", "Documents"),
|
|
281
|
+
items: documentItems
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return next;
|
|
286
|
+
}, [trimmed, recents, catalog, hits, capabilities, paths, isDoctypeAllowed, t]);
|
|
287
|
+
var items = (0, import_react2.useMemo)(function () {
|
|
288
|
+
return sections.flatMap(function (section) {
|
|
289
|
+
return section.items;
|
|
290
|
+
});
|
|
291
|
+
}, [sections]);
|
|
292
|
+
return {
|
|
293
|
+
sections,
|
|
294
|
+
items,
|
|
295
|
+
searching,
|
|
296
|
+
query: trimmed,
|
|
297
|
+
hasQuery: Boolean(trimmed),
|
|
298
|
+
noResults: Boolean(trimmed) && !searching && items.length === 0
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
//# sourceMappingURL=command-palette-model.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","command_palette_model_exports","__export","useCommandPaletteModel","module","exports","import_react","require","import_react2","import_react_i18next","import_BackofficeProvider","import_i18n","import_awesomebar_data","maxRecentsEmptyQuery","maxRecentsWithQuery","maxNavWorkspaces","maxNavDoctypes","actionViews","actionViewIcons","list","ListIcon","report","TableIcon","kanban","KanbanIcon","actionViewLabelKeys","key","defaultValue","param","query","debouncedQuery","open","t","useTranslation","BACKOFFICE_I18N_NAMESPACE","paths","useBackofficePaths","capabilities","useBackofficeCapabilities","isDoctypeAllowed","useIsDoctypeAllowed","catalog","useAwesomebarCatalog","hits","searching","useGlobalSearch","recents","setRecents","useState","useEffect","cancelled","readRecentItems","then","stored","trimmed","trim","sections","useMemo","next","lowerQuery","toLowerCase","matchingRecents","filter","recent","label","includes","slice","length","push","id","items","map","path","icon","ClockIcon","_ref","_ref1","scopedDoctypes","doctypes","rankedDoctypes","rankNameMatches","topDoctype","actionItems","newDoc","enabled","doctype","PlusIcon","views","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","done","view","allow","err","return","navigationItems","workspaces","byTitle","Map","workspace2","title","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_iterator1","_step1","workspace","get","name","badge","GlobeIcon"],"sources":["../../../src/chrome/command-palette-model.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,6BAAA;AAAAC,QAAA,CAAAD,6BAAA;EAAAE,sBAAA,EAAAA,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AAO,CAAAhC,IAAA;YACLC,EAAA,EAAS,aAAS0C,SAAS,CAAME,IAAA;YAE/BjD,KAAA,EAAA+C,SAAQ,CAAAN,KAAA;YAEPS,KAAA,EAAAlF,CAAA;YACLwC,IAAA,EAAArC,KAAA,CAAA4E,SAAA,CAAAA,SAAA,CAAAE,IAAA;YACAxC,IAAA,EAAAnE,YAAA,CAAA6G;UACA;QACA;MACA,SAAUjB,GAAA;QACVS,kBAAmB,OAAO;QAC5BC,eAAA,GAAAV,GAAA;MACF","ignoreList":[]}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var help_about_dialog_exports = {};
|
|
24
|
+
__export(help_about_dialog_exports, {
|
|
25
|
+
HelpAboutDialog: () => HelpAboutDialog
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(help_about_dialog_exports);
|
|
28
|
+
var import_components = require("@multiplatform.one/components");
|
|
29
|
+
var import_react = require("react");
|
|
30
|
+
var import_react_i18next = require("react-i18next");
|
|
31
|
+
var import_i18n = require("../i18n/index.cjs");
|
|
32
|
+
var import_useFrappeApp = require("../shared/useFrappeApp.cjs");
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
+
function HelpAboutDialog({
|
|
35
|
+
open,
|
|
36
|
+
onOpenChange
|
|
37
|
+
}) {
|
|
38
|
+
const {
|
|
39
|
+
t
|
|
40
|
+
} = (0, import_react_i18next.useTranslation)(import_i18n.BACKOFFICE_I18N_NAMESPACE);
|
|
41
|
+
const app = (0, import_useFrappeApp.useFrappeApp)();
|
|
42
|
+
const [versions, setVersions] = (0, import_react.useState)(void 0);
|
|
43
|
+
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
44
|
+
const [failed, setFailed] = (0, import_react.useState)(false);
|
|
45
|
+
(0, import_react.useEffect)(() => {
|
|
46
|
+
if (!open || !app || versions) return;
|
|
47
|
+
let cancelled = false;
|
|
48
|
+
setLoading(true);
|
|
49
|
+
setFailed(false);
|
|
50
|
+
app.call().get("frappe.utils.change_log.get_versions").then(response => {
|
|
51
|
+
if (cancelled) return;
|
|
52
|
+
setVersions(response.payload?.message ?? {});
|
|
53
|
+
}).catch(() => {
|
|
54
|
+
if (cancelled) return;
|
|
55
|
+
setFailed(true);
|
|
56
|
+
}).finally(() => {
|
|
57
|
+
if (!cancelled) setLoading(false);
|
|
58
|
+
});
|
|
59
|
+
return () => {
|
|
60
|
+
cancelled = true;
|
|
61
|
+
};
|
|
62
|
+
}, [open, app, versions]);
|
|
63
|
+
const entries = versions ? Object.entries(versions) : [];
|
|
64
|
+
const unavailable = !app || failed || versions !== void 0 && entries.length === 0;
|
|
65
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Dialog, {
|
|
66
|
+
modal: true,
|
|
67
|
+
open,
|
|
68
|
+
onOpenChange,
|
|
69
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_components.Dialog.Portal, {
|
|
70
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Dialog.Overlay, {
|
|
71
|
+
backgroundColor: "$shadow6"
|
|
72
|
+
}, "overlay"), /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_components.DialogContent, {
|
|
73
|
+
width: 420,
|
|
74
|
+
maxWidth: "90%",
|
|
75
|
+
"data-testid": "backoffice-help-about-dialog",
|
|
76
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Dialog.Title, {
|
|
77
|
+
size: "$6",
|
|
78
|
+
children: t("help.aboutTitle", "About")
|
|
79
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Dialog.Description, {
|
|
80
|
+
asChild: true,
|
|
81
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Paragraph, {
|
|
82
|
+
size: "$3",
|
|
83
|
+
color: "$color11",
|
|
84
|
+
children: t("help.aboutTagline", "Backoffice is the multiplatform.one recreation of the Frappe Desk \u2014 one codebase across web, mobile, and desktop.")
|
|
85
|
+
})
|
|
86
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_components.YStack, {
|
|
87
|
+
gap: "$2",
|
|
88
|
+
marginTop: "$2",
|
|
89
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.SizableText, {
|
|
90
|
+
size: "$2",
|
|
91
|
+
fontWeight: "700",
|
|
92
|
+
color: "$color10",
|
|
93
|
+
textTransform: "uppercase",
|
|
94
|
+
children: t("help.installedApps", "Installed Apps")
|
|
95
|
+
}), loading && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.XStack, {
|
|
96
|
+
padding: "$3",
|
|
97
|
+
justifyContent: "center",
|
|
98
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Spinner, {
|
|
99
|
+
size: "small"
|
|
100
|
+
})
|
|
101
|
+
}), !loading && unavailable && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Paragraph, {
|
|
102
|
+
size: "$3",
|
|
103
|
+
color: "$color10",
|
|
104
|
+
children: t("help.versionsUnavailable", "Version information is unavailable.")
|
|
105
|
+
}), !loading && entries.map(([key, info]) => /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_components.XStack, {
|
|
106
|
+
gap: "$3",
|
|
107
|
+
alignItems: "baseline",
|
|
108
|
+
justifyContent: "space-between",
|
|
109
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.SizableText, {
|
|
110
|
+
size: "$3",
|
|
111
|
+
fontWeight: "600",
|
|
112
|
+
flex: 1,
|
|
113
|
+
numberOfLines: 1,
|
|
114
|
+
children: info.title || key
|
|
115
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.SizableText, {
|
|
116
|
+
size: "$3",
|
|
117
|
+
color: "$color11",
|
|
118
|
+
flexShrink: 0,
|
|
119
|
+
children: info.version ? `v${info.version}${info.branch ? ` (${info.branch})` : ""}` : info.branch ?? "\u2014"
|
|
120
|
+
})]
|
|
121
|
+
}, key))]
|
|
122
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.XStack, {
|
|
123
|
+
justifyContent: "flex-end",
|
|
124
|
+
marginTop: "$4",
|
|
125
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Dialog.Close, {
|
|
126
|
+
asChild: true,
|
|
127
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Button, {
|
|
128
|
+
size: "$3",
|
|
129
|
+
children: t("help.close", "Close")
|
|
130
|
+
})
|
|
131
|
+
})
|
|
132
|
+
})]
|
|
133
|
+
}, "content")]
|
|
134
|
+
})
|
|
135
|
+
});
|
|
136
|
+
}
|