@multiplatform.one/backoffice 6.6.0 → 7.0.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/BackofficeAwesomebar.cjs +1 -0
- package/dist/cjs/chrome/BackofficeAwesomebar.native.js +1 -0
- package/dist/cjs/chrome/BackofficeAwesomebar.native.js.map +1 -1
- package/dist/cjs/chrome/CommandPalette.cjs +95 -18
- package/dist/cjs/chrome/CommandPalette.native.js +114 -31
- package/dist/cjs/chrome/CommandPalette.native.js.map +1 -1
- package/dist/cjs/chrome/HelpMenu.cjs +40 -55
- package/dist/cjs/chrome/HelpMenu.native.js +50 -66
- package/dist/cjs/chrome/HelpMenu.native.js.map +1 -1
- package/dist/cjs/chrome/awesomebar-data.cjs +51 -8
- package/dist/cjs/chrome/awesomebar-data.native.js +58 -10
- package/dist/cjs/chrome/awesomebar-data.native.js.map +1 -1
- package/dist/cjs/chrome/command-palette-model.cjs +1 -2
- package/dist/cjs/chrome/command-palette-model.native.js +1 -2
- package/dist/cjs/chrome/command-palette-model.native.js.map +1 -1
- package/dist/cjs/chrome/notifications-data.cjs +2 -0
- package/dist/cjs/chrome/notifications-data.native.js +2 -0
- package/dist/cjs/chrome/notifications-data.native.js.map +1 -1
- package/dist/cjs/chrome/notifications-panel.cjs +14 -4
- package/dist/cjs/chrome/notifications-panel.native.js +16 -4
- package/dist/cjs/chrome/notifications-panel.native.js.map +1 -1
- package/dist/cjs/chrome/shortcuts.native.js.map +1 -1
- package/dist/cjs/config/BackofficeProvider.cjs +2 -0
- package/dist/cjs/config/BackofficeProvider.native.js +2 -0
- package/dist/cjs/config/BackofficeProvider.native.js.map +1 -1
- package/dist/cjs/form/DocFormScreen.cjs +123 -14
- package/dist/cjs/form/DocFormScreen.native.js +147 -14
- package/dist/cjs/form/DocFormScreen.native.js.map +1 -1
- package/dist/cjs/form/FormConnections.cjs +37 -5
- package/dist/cjs/form/FormConnections.native.js +36 -5
- package/dist/cjs/form/FormConnections.native.js.map +1 -1
- package/dist/cjs/form/FormDialogs.cjs +104 -0
- package/dist/cjs/form/FormDialogs.native.js +110 -0
- package/dist/cjs/form/FormDialogs.native.js.map +1 -1
- package/dist/cjs/form/FormErrorBoundary.cjs +26 -5
- package/dist/cjs/form/FormErrorBoundary.native.js +25 -5
- package/dist/cjs/form/FormErrorBoundary.native.js.map +1 -1
- package/dist/cjs/form/FormSidebarPanel.cjs +71 -22
- package/dist/cjs/form/FormSidebarPanel.native.js +70 -22
- package/dist/cjs/form/FormSidebarPanel.native.js.map +1 -1
- package/dist/cjs/form/FormTimeline.cjs +133 -22
- package/dist/cjs/form/FormTimeline.native.js +171 -24
- package/dist/cjs/form/FormTimeline.native.js.map +1 -1
- package/dist/cjs/form/FormToolbar.cjs +50 -4
- package/dist/cjs/form/FormToolbar.native.js +50 -4
- package/dist/cjs/form/FormToolbar.native.js.map +1 -1
- package/dist/cjs/form/formActions.native.js.map +1 -1
- package/dist/cjs/form/formLayout.cjs +3 -13
- package/dist/cjs/form/formLayout.native.js +7 -13
- package/dist/cjs/form/formLayout.native.js.map +1 -1
- package/dist/cjs/form/platformHooks.cjs +48 -0
- package/dist/cjs/form/platformHooks.native.js +52 -0
- package/dist/cjs/form/platformHooks.native.js.map +1 -1
- package/dist/cjs/form/timeline-entries.cjs +56 -13
- package/dist/cjs/form/timeline-entries.native.js +58 -16
- package/dist/cjs/form/timeline-entries.native.js.map +1 -1
- package/dist/cjs/i18n/en.cjs +31 -9
- package/dist/cjs/i18n/en.native.js +31 -9
- package/dist/cjs/i18n/en.native.js.map +1 -1
- package/dist/cjs/index.cjs +13 -1
- package/dist/cjs/index.native.js +13 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/list/AddTagsDialog.cjs +12 -7
- package/dist/cjs/list/AddTagsDialog.native.js +12 -7
- package/dist/cjs/list/AddTagsDialog.native.js.map +1 -1
- package/dist/cjs/list/AssignToDialog.cjs +7 -4
- package/dist/cjs/list/AssignToDialog.native.js +7 -4
- package/dist/cjs/list/AssignToDialog.native.js.map +1 -1
- package/dist/cjs/list/DoctypeListScreen.cjs +124 -153
- package/dist/cjs/list/DoctypeListScreen.native.js +152 -198
- package/dist/cjs/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/cjs/list/ListFilterBar.cjs +60 -41
- package/dist/cjs/list/ListFilterBar.native.js +62 -41
- package/dist/cjs/list/ListFilterBar.native.js.map +1 -1
- package/dist/cjs/list/ListSidebar.cjs +15 -13
- package/dist/cjs/list/ListSidebar.native.js +17 -17
- package/dist/cjs/list/ListSidebar.native.js.map +1 -1
- package/dist/cjs/list/bulk-edit-dialog.cjs +12 -7
- package/dist/cjs/list/bulk-edit-dialog.native.js +12 -7
- package/dist/cjs/list/bulk-edit-dialog.native.js.map +1 -1
- package/dist/cjs/list/filter-fields.cjs +23 -1
- package/dist/cjs/list/filter-fields.native.js +28 -1
- package/dist/cjs/list/filter-fields.native.js.map +1 -1
- package/dist/cjs/list/filter-saved.cjs +4 -4
- package/dist/cjs/list/filter-saved.native.js +4 -7
- package/dist/cjs/list/filter-saved.native.js.map +1 -1
- package/dist/cjs/list/filter-sort.cjs +2 -1
- package/dist/cjs/list/filter-sort.native.js +2 -1
- package/dist/cjs/list/filter-sort.native.js.map +1 -1
- package/dist/cjs/list/filter-standard.cjs +1 -1
- package/dist/cjs/list/filter-standard.native.js +1 -1
- package/dist/cjs/list/listColumns.cjs +258 -109
- package/dist/cjs/list/listColumns.native.js +263 -118
- package/dist/cjs/list/listColumns.native.js.map +1 -1
- package/dist/cjs/list/listFields.cjs +6 -1
- package/dist/cjs/list/listFields.native.js +8 -1
- package/dist/cjs/list/listFields.native.js.map +1 -1
- package/dist/cjs/list/sidebar-section.cjs +57 -19
- package/dist/cjs/list/sidebar-section.native.js +60 -19
- package/dist/cjs/list/sidebar-section.native.js.map +1 -1
- package/dist/cjs/oneAdapter/index.cjs +5 -1
- package/dist/cjs/oneAdapter/index.native.js +8 -1
- package/dist/cjs/oneAdapter/index.native.js.map +1 -1
- package/dist/cjs/quickEntry/quickEntryPlan.cjs +2 -6
- package/dist/cjs/quickEntry/quickEntryPlan.native.js +4 -6
- package/dist/cjs/quickEntry/quickEntryPlan.native.js.map +1 -1
- package/dist/cjs/report/QueryReportScreen.cjs +103 -94
- package/dist/cjs/report/QueryReportScreen.native.js +125 -143
- package/dist/cjs/report/QueryReportScreen.native.js.map +1 -1
- package/dist/cjs/report/queryReportColumns.cjs +10 -1
- package/dist/cjs/report/queryReportColumns.native.js +16 -1
- package/dist/cjs/report/queryReportColumns.native.js.map +1 -1
- package/dist/cjs/report/queryReportFilterBar.cjs +274 -0
- package/dist/cjs/report/queryReportFilterBar.native.js +339 -0
- package/dist/cjs/report/queryReportFilterBar.native.js.map +1 -0
- package/dist/cjs/report/queryReportUrlState.cjs +55 -0
- package/dist/cjs/report/queryReportUrlState.native.js +108 -0
- package/dist/cjs/report/queryReportUrlState.native.js.map +1 -0
- package/dist/cjs/report/report-grid.cjs +155 -50
- package/dist/cjs/report/report-grid.native.js +174 -54
- package/dist/cjs/report/report-grid.native.js.map +1 -1
- package/dist/cjs/report/report-toolbar.cjs +1 -6
- package/dist/cjs/report/report-toolbar.native.js +6 -6
- package/dist/cjs/report/report-toolbar.native.js.map +1 -1
- package/dist/cjs/report/reportShapes.cjs +269 -11
- package/dist/cjs/report/reportShapes.native.js +333 -11
- package/dist/cjs/report/reportShapes.native.js.map +1 -1
- package/dist/cjs/report/reportViewModel.cjs +13 -5
- package/dist/cjs/report/reportViewModel.native.js +38 -5
- package/dist/cjs/report/reportViewModel.native.js.map +1 -1
- package/dist/cjs/report/useQueryReport.cjs +48 -17
- package/dist/cjs/report/useQueryReport.native.js +56 -37
- package/dist/cjs/report/useQueryReport.native.js.map +1 -1
- package/dist/cjs/shared/deskLinks.cjs +39 -0
- package/dist/cjs/shared/deskLinks.native.js +43 -0
- package/dist/cjs/shared/deskLinks.native.js.map +1 -0
- package/dist/cjs/shared/listNavContext.cjs +102 -0
- package/dist/cjs/shared/listNavContext.native.js +130 -0
- package/dist/cjs/shared/listNavContext.native.js.map +1 -0
- package/dist/cjs/shared/useDocinfo.cjs +42 -2
- package/dist/cjs/shared/useDocinfo.native.js +82 -2
- package/dist/cjs/shared/useDocinfo.native.js.map +1 -1
- package/dist/cjs/shared/useDoctypeMeta.native.js.map +1 -1
- package/dist/cjs/shared/useFrappeApp.cjs +10 -5
- package/dist/cjs/shared/useFrappeApp.native.js +10 -5
- package/dist/cjs/shared/useFrappeApp.native.js.map +1 -1
- package/dist/cjs/shell/BackofficeShell.cjs +83 -20
- package/dist/cjs/shell/BackofficeShell.native.js +89 -24
- package/dist/cjs/shell/BackofficeShell.native.js.map +1 -1
- package/dist/cjs/shell/WorkspaceSidebar.cjs +113 -4
- package/dist/cjs/shell/WorkspaceSidebar.native.js +120 -4
- package/dist/cjs/shell/WorkspaceSidebar.native.js.map +1 -1
- package/dist/cjs/shell/useWorkspaces.cjs +2 -0
- package/dist/cjs/shell/useWorkspaces.native.js +2 -0
- package/dist/cjs/shell/useWorkspaces.native.js.map +1 -1
- package/dist/cjs/shell/workspaceIcons.cjs +12 -2
- package/dist/cjs/shell/workspaceIcons.native.js +35 -2
- package/dist/cjs/shell/workspaceIcons.native.js.map +1 -1
- package/dist/cjs/views/CalendarView.cjs +1 -4
- package/dist/cjs/views/CalendarView.native.js +1 -6
- package/dist/cjs/views/CalendarView.native.js.map +1 -1
- package/dist/cjs/views/DoctypeViewScreen.cjs +7 -3
- package/dist/cjs/views/DoctypeViewScreen.native.js +7 -3
- package/dist/cjs/views/DoctypeViewScreen.native.js.map +1 -1
- package/dist/cjs/views/KanbanView.cjs +2 -0
- package/dist/cjs/views/KanbanView.native.js +2 -0
- package/dist/cjs/views/KanbanView.native.js.map +1 -1
- package/dist/cjs/views/ViewHeader.cjs +45 -74
- package/dist/cjs/views/ViewHeader.native.js +51 -78
- package/dist/cjs/views/ViewHeader.native.js.map +1 -1
- package/dist/cjs/views/ViewSwitcherMenu.cjs +95 -0
- package/dist/cjs/views/ViewSwitcherMenu.native.js +99 -0
- package/dist/cjs/views/ViewSwitcherMenu.native.js.map +1 -0
- package/dist/cjs/views/connection.cjs +5 -1
- package/dist/cjs/views/connection.native.js +5 -1
- package/dist/cjs/views/connection.native.js.map +1 -1
- package/dist/cjs/views/dashboard-data.cjs +1 -2
- package/dist/cjs/views/dashboard-data.native.js +1 -4
- package/dist/cjs/views/dashboard-data.native.js.map +1 -1
- package/dist/cjs/views/kanban-board-controls.cjs +4 -9
- package/dist/cjs/views/kanban-board-controls.native.js +9 -10
- package/dist/cjs/views/kanban-board-controls.native.js.map +1 -1
- package/dist/cjs/views/viewAvailability.cjs +59 -0
- package/dist/cjs/views/viewAvailability.native.js +63 -0
- package/dist/cjs/views/viewAvailability.native.js.map +1 -0
- package/dist/cjs/workspace/WorkspaceLinkCard.cjs +120 -25
- package/dist/cjs/workspace/WorkspaceLinkCard.native.js +126 -28
- package/dist/cjs/workspace/WorkspaceLinkCard.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceLinkDirectory.cjs +27 -21
- package/dist/cjs/workspace/WorkspaceLinkDirectory.native.js +32 -23
- package/dist/cjs/workspace/WorkspaceLinkDirectory.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceNumberCard.cjs +1 -1
- package/dist/cjs/workspace/WorkspaceNumberCard.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceNumberCard.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceQuickList.cjs +61 -29
- package/dist/cjs/workspace/WorkspaceQuickList.native.js +65 -32
- package/dist/cjs/workspace/WorkspaceQuickList.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceRecents.cjs +8 -0
- package/dist/cjs/workspace/WorkspaceRecents.native.js +8 -0
- package/dist/cjs/workspace/WorkspaceRecents.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceShortcut.cjs +10 -0
- package/dist/cjs/workspace/WorkspaceShortcut.native.js +10 -0
- package/dist/cjs/workspace/WorkspaceShortcut.native.js.map +1 -1
- package/dist/cjs/workspace/parseContent.cjs +22 -0
- package/dist/cjs/workspace/parseContent.native.js +24 -0
- package/dist/cjs/workspace/parseContent.native.js.map +1 -1
- package/dist/esm/chrome/BackofficeAwesomebar.mjs +1 -0
- package/dist/esm/chrome/BackofficeAwesomebar.mjs.map +1 -1
- package/dist/esm/chrome/BackofficeAwesomebar.native.js +1 -0
- package/dist/esm/chrome/BackofficeAwesomebar.native.js.map +1 -1
- package/dist/esm/chrome/CommandPalette.mjs +96 -19
- package/dist/esm/chrome/CommandPalette.mjs.map +1 -1
- package/dist/esm/chrome/CommandPalette.native.js +115 -32
- package/dist/esm/chrome/CommandPalette.native.js.map +1 -1
- package/dist/esm/chrome/HelpMenu.mjs +41 -56
- package/dist/esm/chrome/HelpMenu.mjs.map +1 -1
- package/dist/esm/chrome/HelpMenu.native.js +51 -67
- package/dist/esm/chrome/HelpMenu.native.js.map +1 -1
- package/dist/esm/chrome/awesomebar-data.mjs +51 -9
- package/dist/esm/chrome/awesomebar-data.mjs.map +1 -1
- package/dist/esm/chrome/awesomebar-data.native.js +58 -11
- package/dist/esm/chrome/awesomebar-data.native.js.map +1 -1
- package/dist/esm/chrome/command-palette-model.mjs +2 -3
- package/dist/esm/chrome/command-palette-model.mjs.map +1 -1
- package/dist/esm/chrome/command-palette-model.native.js +2 -3
- package/dist/esm/chrome/command-palette-model.native.js.map +1 -1
- package/dist/esm/chrome/notifications-data.mjs +2 -0
- package/dist/esm/chrome/notifications-data.mjs.map +1 -1
- package/dist/esm/chrome/notifications-data.native.js +2 -0
- package/dist/esm/chrome/notifications-data.native.js.map +1 -1
- package/dist/esm/chrome/notifications-panel.mjs +15 -5
- package/dist/esm/chrome/notifications-panel.mjs.map +1 -1
- package/dist/esm/chrome/notifications-panel.native.js +17 -5
- package/dist/esm/chrome/notifications-panel.native.js.map +1 -1
- package/dist/esm/chrome/shortcuts.mjs.map +1 -1
- package/dist/esm/chrome/shortcuts.native.js.map +1 -1
- package/dist/esm/config/BackofficeProvider.mjs +2 -0
- package/dist/esm/config/BackofficeProvider.mjs.map +1 -1
- package/dist/esm/config/BackofficeProvider.native.js +2 -0
- package/dist/esm/config/BackofficeProvider.native.js.map +1 -1
- package/dist/esm/form/DocFormScreen.mjs +126 -17
- package/dist/esm/form/DocFormScreen.mjs.map +1 -1
- package/dist/esm/form/DocFormScreen.native.js +150 -17
- package/dist/esm/form/DocFormScreen.native.js.map +1 -1
- package/dist/esm/form/FormConnections.mjs +38 -6
- package/dist/esm/form/FormConnections.mjs.map +1 -1
- package/dist/esm/form/FormConnections.native.js +37 -6
- package/dist/esm/form/FormConnections.native.js.map +1 -1
- package/dist/esm/form/FormDialogs.mjs +107 -4
- package/dist/esm/form/FormDialogs.mjs.map +1 -1
- package/dist/esm/form/FormDialogs.native.js +113 -4
- package/dist/esm/form/FormDialogs.native.js.map +1 -1
- package/dist/esm/form/FormErrorBoundary.mjs +28 -7
- package/dist/esm/form/FormErrorBoundary.mjs.map +1 -1
- package/dist/esm/form/FormErrorBoundary.native.js +27 -7
- package/dist/esm/form/FormErrorBoundary.native.js.map +1 -1
- package/dist/esm/form/FormSidebarPanel.mjs +71 -23
- package/dist/esm/form/FormSidebarPanel.mjs.map +1 -1
- package/dist/esm/form/FormSidebarPanel.native.js +70 -23
- package/dist/esm/form/FormSidebarPanel.native.js.map +1 -1
- package/dist/esm/form/FormTimeline.mjs +136 -25
- package/dist/esm/form/FormTimeline.mjs.map +1 -1
- package/dist/esm/form/FormTimeline.native.js +174 -27
- package/dist/esm/form/FormTimeline.native.js.map +1 -1
- package/dist/esm/form/FormToolbar.mjs +51 -5
- package/dist/esm/form/FormToolbar.mjs.map +1 -1
- package/dist/esm/form/FormToolbar.native.js +51 -5
- package/dist/esm/form/FormToolbar.native.js.map +1 -1
- package/dist/esm/form/formActions.mjs.map +1 -1
- package/dist/esm/form/formActions.native.js.map +1 -1
- package/dist/esm/form/formLayout.mjs +3 -13
- package/dist/esm/form/formLayout.mjs.map +1 -1
- package/dist/esm/form/formLayout.native.js +7 -13
- package/dist/esm/form/formLayout.native.js.map +1 -1
- package/dist/esm/form/platformHooks.mjs +47 -1
- package/dist/esm/form/platformHooks.mjs.map +1 -1
- package/dist/esm/form/platformHooks.native.js +51 -1
- package/dist/esm/form/platformHooks.native.js.map +1 -1
- package/dist/esm/form/timeline-entries.mjs +56 -13
- package/dist/esm/form/timeline-entries.mjs.map +1 -1
- package/dist/esm/form/timeline-entries.native.js +58 -16
- package/dist/esm/form/timeline-entries.native.js.map +1 -1
- package/dist/esm/i18n/en.mjs +31 -9
- package/dist/esm/i18n/en.mjs.map +1 -1
- package/dist/esm/i18n/en.native.js +31 -9
- package/dist/esm/i18n/en.native.js.map +1 -1
- package/dist/esm/index.mjs +6 -3
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +6 -3
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/list/AddTagsDialog.mjs +12 -7
- package/dist/esm/list/AddTagsDialog.mjs.map +1 -1
- package/dist/esm/list/AddTagsDialog.native.js +12 -7
- package/dist/esm/list/AddTagsDialog.native.js.map +1 -1
- package/dist/esm/list/AssignToDialog.mjs +7 -4
- package/dist/esm/list/AssignToDialog.mjs.map +1 -1
- package/dist/esm/list/AssignToDialog.native.js +7 -4
- package/dist/esm/list/AssignToDialog.native.js.map +1 -1
- package/dist/esm/list/DoctypeListScreen.mjs +127 -156
- package/dist/esm/list/DoctypeListScreen.mjs.map +1 -1
- package/dist/esm/list/DoctypeListScreen.native.js +155 -201
- package/dist/esm/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/esm/list/ListFilterBar.mjs +60 -41
- package/dist/esm/list/ListFilterBar.mjs.map +1 -1
- package/dist/esm/list/ListFilterBar.native.js +62 -41
- package/dist/esm/list/ListFilterBar.native.js.map +1 -1
- package/dist/esm/list/ListSidebar.mjs +16 -14
- package/dist/esm/list/ListSidebar.mjs.map +1 -1
- package/dist/esm/list/ListSidebar.native.js +18 -18
- package/dist/esm/list/ListSidebar.native.js.map +1 -1
- package/dist/esm/list/bulk-edit-dialog.mjs +12 -7
- package/dist/esm/list/bulk-edit-dialog.mjs.map +1 -1
- package/dist/esm/list/bulk-edit-dialog.native.js +12 -7
- package/dist/esm/list/bulk-edit-dialog.native.js.map +1 -1
- package/dist/esm/list/filter-fields.mjs +23 -1
- package/dist/esm/list/filter-fields.mjs.map +1 -1
- package/dist/esm/list/filter-fields.native.js +28 -1
- package/dist/esm/list/filter-fields.native.js.map +1 -1
- package/dist/esm/list/filter-saved.mjs +4 -4
- package/dist/esm/list/filter-saved.mjs.map +1 -1
- package/dist/esm/list/filter-saved.native.js +4 -7
- package/dist/esm/list/filter-saved.native.js.map +1 -1
- package/dist/esm/list/filter-sort.mjs +2 -1
- package/dist/esm/list/filter-sort.mjs.map +1 -1
- package/dist/esm/list/filter-sort.native.js +2 -1
- package/dist/esm/list/filter-sort.native.js.map +1 -1
- package/dist/esm/list/filter-standard.mjs +1 -1
- package/dist/esm/list/filter-standard.mjs.map +1 -1
- package/dist/esm/list/filter-standard.native.js +1 -1
- package/dist/esm/list/filter-standard.native.js.map +1 -1
- package/dist/esm/list/listColumns.mjs +261 -112
- package/dist/esm/list/listColumns.mjs.map +1 -1
- package/dist/esm/list/listColumns.native.js +266 -121
- package/dist/esm/list/listColumns.native.js.map +1 -1
- package/dist/esm/list/listFields.mjs +6 -2
- package/dist/esm/list/listFields.mjs.map +1 -1
- package/dist/esm/list/listFields.native.js +8 -2
- package/dist/esm/list/listFields.native.js.map +1 -1
- package/dist/esm/list/sidebar-section.mjs +58 -21
- package/dist/esm/list/sidebar-section.mjs.map +1 -1
- package/dist/esm/list/sidebar-section.native.js +61 -21
- package/dist/esm/list/sidebar-section.native.js.map +1 -1
- package/dist/esm/oneAdapter/index.mjs +5 -1
- package/dist/esm/oneAdapter/index.mjs.map +1 -1
- package/dist/esm/oneAdapter/index.native.js +8 -1
- package/dist/esm/oneAdapter/index.native.js.map +1 -1
- package/dist/esm/quickEntry/quickEntryPlan.mjs +2 -6
- package/dist/esm/quickEntry/quickEntryPlan.mjs.map +1 -1
- package/dist/esm/quickEntry/quickEntryPlan.native.js +4 -6
- package/dist/esm/quickEntry/quickEntryPlan.native.js.map +1 -1
- package/dist/esm/report/QueryReportScreen.mjs +103 -94
- package/dist/esm/report/QueryReportScreen.mjs.map +1 -1
- package/dist/esm/report/QueryReportScreen.native.js +125 -143
- package/dist/esm/report/QueryReportScreen.native.js.map +1 -1
- package/dist/esm/report/queryReportColumns.mjs +9 -1
- package/dist/esm/report/queryReportColumns.mjs.map +1 -1
- package/dist/esm/report/queryReportColumns.native.js +15 -1
- package/dist/esm/report/queryReportColumns.native.js.map +1 -1
- package/dist/esm/report/queryReportFilterBar.mjs +246 -0
- package/dist/esm/report/queryReportFilterBar.mjs.map +1 -0
- package/dist/esm/report/queryReportFilterBar.native.js +308 -0
- package/dist/esm/report/queryReportFilterBar.native.js.map +1 -0
- package/dist/esm/report/queryReportUrlState.mjs +29 -0
- package/dist/esm/report/queryReportUrlState.mjs.map +1 -0
- package/dist/esm/report/queryReportUrlState.native.js +79 -0
- package/dist/esm/report/queryReportUrlState.native.js.map +1 -0
- package/dist/esm/report/report-grid.mjs +158 -53
- package/dist/esm/report/report-grid.mjs.map +1 -1
- package/dist/esm/report/report-grid.native.js +177 -57
- package/dist/esm/report/report-grid.native.js.map +1 -1
- package/dist/esm/report/report-toolbar.mjs +2 -7
- package/dist/esm/report/report-toolbar.mjs.map +1 -1
- package/dist/esm/report/report-toolbar.native.js +7 -7
- package/dist/esm/report/report-toolbar.native.js.map +1 -1
- package/dist/esm/report/reportShapes.mjs +266 -12
- package/dist/esm/report/reportShapes.mjs.map +1 -1
- package/dist/esm/report/reportShapes.native.js +330 -12
- package/dist/esm/report/reportShapes.native.js.map +1 -1
- package/dist/esm/report/reportViewModel.mjs +13 -5
- package/dist/esm/report/reportViewModel.mjs.map +1 -1
- package/dist/esm/report/reportViewModel.native.js +38 -5
- package/dist/esm/report/reportViewModel.native.js.map +1 -1
- package/dist/esm/report/useQueryReport.mjs +46 -20
- package/dist/esm/report/useQueryReport.mjs.map +1 -1
- package/dist/esm/report/useQueryReport.native.js +54 -40
- package/dist/esm/report/useQueryReport.native.js.map +1 -1
- package/dist/esm/shared/deskLinks.mjs +13 -0
- package/dist/esm/shared/deskLinks.mjs.map +1 -0
- package/dist/esm/shared/deskLinks.native.js +14 -0
- package/dist/esm/shared/deskLinks.native.js.map +1 -0
- package/dist/esm/shared/listNavContext.mjs +74 -0
- package/dist/esm/shared/listNavContext.mjs.map +1 -0
- package/dist/esm/shared/listNavContext.native.js +99 -0
- package/dist/esm/shared/listNavContext.native.js.map +1 -0
- package/dist/esm/shared/useDocinfo.mjs +40 -3
- package/dist/esm/shared/useDocinfo.mjs.map +1 -1
- package/dist/esm/shared/useDocinfo.native.js +80 -3
- package/dist/esm/shared/useDocinfo.native.js.map +1 -1
- package/dist/esm/shared/useDoctypeMeta.mjs.map +1 -1
- package/dist/esm/shared/useDoctypeMeta.native.js.map +1 -1
- package/dist/esm/shared/useFrappeApp.mjs +10 -5
- package/dist/esm/shared/useFrappeApp.mjs.map +1 -1
- package/dist/esm/shared/useFrappeApp.native.js +10 -5
- package/dist/esm/shared/useFrappeApp.native.js.map +1 -1
- package/dist/esm/shell/BackofficeShell.mjs +75 -23
- package/dist/esm/shell/BackofficeShell.mjs.map +1 -1
- package/dist/esm/shell/BackofficeShell.native.js +81 -27
- package/dist/esm/shell/BackofficeShell.native.js.map +1 -1
- package/dist/esm/shell/WorkspaceSidebar.mjs +115 -6
- package/dist/esm/shell/WorkspaceSidebar.mjs.map +1 -1
- package/dist/esm/shell/WorkspaceSidebar.native.js +122 -6
- package/dist/esm/shell/WorkspaceSidebar.native.js.map +1 -1
- package/dist/esm/shell/useWorkspaces.mjs +2 -0
- package/dist/esm/shell/useWorkspaces.mjs.map +1 -1
- package/dist/esm/shell/useWorkspaces.native.js +2 -0
- package/dist/esm/shell/useWorkspaces.native.js.map +1 -1
- package/dist/esm/shell/workspaceIcons.mjs +13 -3
- package/dist/esm/shell/workspaceIcons.mjs.map +1 -1
- package/dist/esm/shell/workspaceIcons.native.js +36 -3
- package/dist/esm/shell/workspaceIcons.native.js.map +1 -1
- package/dist/esm/views/CalendarView.mjs +2 -5
- package/dist/esm/views/CalendarView.mjs.map +1 -1
- package/dist/esm/views/CalendarView.native.js +2 -7
- package/dist/esm/views/CalendarView.native.js.map +1 -1
- package/dist/esm/views/DoctypeViewScreen.mjs +7 -3
- package/dist/esm/views/DoctypeViewScreen.mjs.map +1 -1
- package/dist/esm/views/DoctypeViewScreen.native.js +7 -3
- package/dist/esm/views/DoctypeViewScreen.native.js.map +1 -1
- package/dist/esm/views/KanbanView.mjs +2 -0
- package/dist/esm/views/KanbanView.mjs.map +1 -1
- package/dist/esm/views/KanbanView.native.js +2 -0
- package/dist/esm/views/KanbanView.native.js.map +1 -1
- package/dist/esm/views/ViewHeader.mjs +49 -78
- package/dist/esm/views/ViewHeader.mjs.map +1 -1
- package/dist/esm/views/ViewHeader.native.js +55 -82
- package/dist/esm/views/ViewHeader.native.js.map +1 -1
- package/dist/esm/views/ViewSwitcherMenu.mjs +69 -0
- package/dist/esm/views/ViewSwitcherMenu.mjs.map +1 -0
- package/dist/esm/views/ViewSwitcherMenu.native.js +70 -0
- package/dist/esm/views/ViewSwitcherMenu.native.js.map +1 -0
- package/dist/esm/views/connection.mjs +5 -1
- package/dist/esm/views/connection.mjs.map +1 -1
- package/dist/esm/views/connection.native.js +5 -1
- package/dist/esm/views/connection.native.js.map +1 -1
- package/dist/esm/views/dashboard-data.mjs +2 -3
- package/dist/esm/views/dashboard-data.mjs.map +1 -1
- package/dist/esm/views/dashboard-data.native.js +2 -5
- package/dist/esm/views/dashboard-data.native.js.map +1 -1
- package/dist/esm/views/kanban-board-controls.mjs +4 -9
- package/dist/esm/views/kanban-board-controls.mjs.map +1 -1
- package/dist/esm/views/kanban-board-controls.native.js +9 -10
- package/dist/esm/views/kanban-board-controls.native.js.map +1 -1
- package/dist/esm/views/viewAvailability.mjs +33 -0
- package/dist/esm/views/viewAvailability.mjs.map +1 -0
- package/dist/esm/views/viewAvailability.native.js +34 -0
- package/dist/esm/views/viewAvailability.native.js.map +1 -0
- package/dist/esm/workspace/WorkspaceLinkCard.mjs +121 -26
- package/dist/esm/workspace/WorkspaceLinkCard.mjs.map +1 -1
- package/dist/esm/workspace/WorkspaceLinkCard.native.js +127 -29
- package/dist/esm/workspace/WorkspaceLinkCard.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceLinkDirectory.mjs +27 -21
- package/dist/esm/workspace/WorkspaceLinkDirectory.mjs.map +1 -1
- package/dist/esm/workspace/WorkspaceLinkDirectory.native.js +32 -23
- package/dist/esm/workspace/WorkspaceLinkDirectory.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceNumberCard.mjs +1 -1
- package/dist/esm/workspace/WorkspaceNumberCard.mjs.map +1 -1
- package/dist/esm/workspace/WorkspaceNumberCard.native.js +1 -1
- package/dist/esm/workspace/WorkspaceNumberCard.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceQuickList.mjs +62 -30
- package/dist/esm/workspace/WorkspaceQuickList.mjs.map +1 -1
- package/dist/esm/workspace/WorkspaceQuickList.native.js +66 -33
- package/dist/esm/workspace/WorkspaceQuickList.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceRecents.mjs +9 -1
- package/dist/esm/workspace/WorkspaceRecents.mjs.map +1 -1
- package/dist/esm/workspace/WorkspaceRecents.native.js +9 -1
- package/dist/esm/workspace/WorkspaceRecents.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceShortcut.mjs +11 -1
- package/dist/esm/workspace/WorkspaceShortcut.mjs.map +1 -1
- package/dist/esm/workspace/WorkspaceShortcut.native.js +11 -1
- package/dist/esm/workspace/WorkspaceShortcut.native.js.map +1 -1
- package/dist/esm/workspace/parseContent.mjs +21 -1
- package/dist/esm/workspace/parseContent.mjs.map +1 -1
- package/dist/esm/workspace/parseContent.native.js +23 -1
- package/dist/esm/workspace/parseContent.native.js.map +1 -1
- package/dist/jsx/chrome/BackofficeAwesomebar.mjs +1 -0
- package/dist/jsx/chrome/BackofficeAwesomebar.mjs.map +1 -1
- package/dist/jsx/chrome/BackofficeAwesomebar.native.js +1 -0
- package/dist/jsx/chrome/BackofficeAwesomebar.native.js.map +1 -1
- package/dist/jsx/chrome/CommandPalette.mjs +96 -19
- package/dist/jsx/chrome/CommandPalette.mjs.map +1 -1
- package/dist/jsx/chrome/CommandPalette.native.js +114 -31
- package/dist/jsx/chrome/CommandPalette.native.js.map +1 -1
- package/dist/jsx/chrome/HelpMenu.mjs +41 -56
- package/dist/jsx/chrome/HelpMenu.mjs.map +1 -1
- package/dist/jsx/chrome/HelpMenu.native.js +50 -66
- package/dist/jsx/chrome/HelpMenu.native.js.map +1 -1
- package/dist/jsx/chrome/awesomebar-data.mjs +51 -9
- package/dist/jsx/chrome/awesomebar-data.mjs.map +1 -1
- package/dist/jsx/chrome/awesomebar-data.native.js +58 -10
- package/dist/jsx/chrome/awesomebar-data.native.js.map +1 -1
- package/dist/jsx/chrome/command-palette-model.mjs +2 -3
- package/dist/jsx/chrome/command-palette-model.mjs.map +1 -1
- package/dist/jsx/chrome/command-palette-model.native.js +1 -2
- package/dist/jsx/chrome/command-palette-model.native.js.map +1 -1
- package/dist/jsx/chrome/notifications-data.mjs +2 -0
- package/dist/jsx/chrome/notifications-data.mjs.map +1 -1
- package/dist/jsx/chrome/notifications-data.native.js +2 -0
- package/dist/jsx/chrome/notifications-data.native.js.map +1 -1
- package/dist/jsx/chrome/notifications-panel.mjs +15 -5
- package/dist/jsx/chrome/notifications-panel.mjs.map +1 -1
- package/dist/jsx/chrome/notifications-panel.native.js +16 -4
- package/dist/jsx/chrome/notifications-panel.native.js.map +1 -1
- package/dist/jsx/chrome/shortcuts.mjs.map +1 -1
- package/dist/jsx/chrome/shortcuts.native.js.map +1 -1
- package/dist/jsx/config/BackofficeProvider.mjs +2 -0
- package/dist/jsx/config/BackofficeProvider.mjs.map +1 -1
- package/dist/jsx/config/BackofficeProvider.native.js +2 -0
- package/dist/jsx/config/BackofficeProvider.native.js.map +1 -1
- package/dist/jsx/form/DocFormScreen.mjs +126 -17
- package/dist/jsx/form/DocFormScreen.mjs.map +1 -1
- package/dist/jsx/form/DocFormScreen.native.js +147 -14
- package/dist/jsx/form/DocFormScreen.native.js.map +1 -1
- package/dist/jsx/form/FormConnections.mjs +38 -6
- package/dist/jsx/form/FormConnections.mjs.map +1 -1
- package/dist/jsx/form/FormConnections.native.js +36 -5
- package/dist/jsx/form/FormConnections.native.js.map +1 -1
- package/dist/jsx/form/FormDialogs.mjs +107 -4
- package/dist/jsx/form/FormDialogs.mjs.map +1 -1
- package/dist/jsx/form/FormDialogs.native.js +110 -0
- package/dist/jsx/form/FormDialogs.native.js.map +1 -1
- package/dist/jsx/form/FormErrorBoundary.mjs +28 -7
- package/dist/jsx/form/FormErrorBoundary.mjs.map +1 -1
- package/dist/jsx/form/FormErrorBoundary.native.js +25 -5
- package/dist/jsx/form/FormErrorBoundary.native.js.map +1 -1
- package/dist/jsx/form/FormSidebarPanel.mjs +71 -23
- package/dist/jsx/form/FormSidebarPanel.mjs.map +1 -1
- package/dist/jsx/form/FormSidebarPanel.native.js +70 -22
- package/dist/jsx/form/FormSidebarPanel.native.js.map +1 -1
- package/dist/jsx/form/FormTimeline.mjs +136 -25
- package/dist/jsx/form/FormTimeline.mjs.map +1 -1
- package/dist/jsx/form/FormTimeline.native.js +171 -24
- package/dist/jsx/form/FormTimeline.native.js.map +1 -1
- package/dist/jsx/form/FormToolbar.mjs +51 -5
- package/dist/jsx/form/FormToolbar.mjs.map +1 -1
- package/dist/jsx/form/FormToolbar.native.js +50 -4
- package/dist/jsx/form/FormToolbar.native.js.map +1 -1
- package/dist/jsx/form/formActions.mjs.map +1 -1
- package/dist/jsx/form/formActions.native.js.map +1 -1
- package/dist/jsx/form/formLayout.mjs +3 -13
- package/dist/jsx/form/formLayout.mjs.map +1 -1
- package/dist/jsx/form/formLayout.native.js +7 -13
- package/dist/jsx/form/formLayout.native.js.map +1 -1
- package/dist/jsx/form/platformHooks.mjs +47 -1
- package/dist/jsx/form/platformHooks.mjs.map +1 -1
- package/dist/jsx/form/platformHooks.native.js +52 -0
- package/dist/jsx/form/platformHooks.native.js.map +1 -1
- package/dist/jsx/form/timeline-entries.mjs +56 -13
- package/dist/jsx/form/timeline-entries.mjs.map +1 -1
- package/dist/jsx/form/timeline-entries.native.js +58 -16
- package/dist/jsx/form/timeline-entries.native.js.map +1 -1
- package/dist/jsx/i18n/en.mjs +31 -9
- package/dist/jsx/i18n/en.mjs.map +1 -1
- package/dist/jsx/i18n/en.native.js +31 -9
- package/dist/jsx/i18n/en.native.js.map +1 -1
- package/dist/jsx/index.js +6 -3
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +6 -3
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +13 -1
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/list/AddTagsDialog.mjs +12 -7
- package/dist/jsx/list/AddTagsDialog.mjs.map +1 -1
- package/dist/jsx/list/AddTagsDialog.native.js +12 -7
- package/dist/jsx/list/AddTagsDialog.native.js.map +1 -1
- package/dist/jsx/list/AssignToDialog.mjs +7 -4
- package/dist/jsx/list/AssignToDialog.mjs.map +1 -1
- package/dist/jsx/list/AssignToDialog.native.js +7 -4
- package/dist/jsx/list/AssignToDialog.native.js.map +1 -1
- package/dist/jsx/list/DoctypeListScreen.mjs +127 -156
- package/dist/jsx/list/DoctypeListScreen.mjs.map +1 -1
- package/dist/jsx/list/DoctypeListScreen.native.js +152 -198
- package/dist/jsx/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/jsx/list/ListFilterBar.mjs +60 -41
- package/dist/jsx/list/ListFilterBar.mjs.map +1 -1
- package/dist/jsx/list/ListFilterBar.native.js +62 -41
- package/dist/jsx/list/ListFilterBar.native.js.map +1 -1
- package/dist/jsx/list/ListSidebar.mjs +16 -14
- package/dist/jsx/list/ListSidebar.mjs.map +1 -1
- package/dist/jsx/list/ListSidebar.native.js +17 -17
- package/dist/jsx/list/ListSidebar.native.js.map +1 -1
- package/dist/jsx/list/bulk-edit-dialog.mjs +12 -7
- package/dist/jsx/list/bulk-edit-dialog.mjs.map +1 -1
- package/dist/jsx/list/bulk-edit-dialog.native.js +12 -7
- package/dist/jsx/list/bulk-edit-dialog.native.js.map +1 -1
- package/dist/jsx/list/filter-fields.mjs +23 -1
- package/dist/jsx/list/filter-fields.mjs.map +1 -1
- package/dist/jsx/list/filter-fields.native.js +28 -1
- package/dist/jsx/list/filter-fields.native.js.map +1 -1
- package/dist/jsx/list/filter-saved.mjs +4 -4
- package/dist/jsx/list/filter-saved.mjs.map +1 -1
- package/dist/jsx/list/filter-saved.native.js +4 -7
- package/dist/jsx/list/filter-saved.native.js.map +1 -1
- package/dist/jsx/list/filter-sort.mjs +2 -1
- package/dist/jsx/list/filter-sort.mjs.map +1 -1
- package/dist/jsx/list/filter-sort.native.js +2 -1
- package/dist/jsx/list/filter-sort.native.js.map +1 -1
- package/dist/jsx/list/filter-standard.mjs +1 -1
- package/dist/jsx/list/filter-standard.mjs.map +1 -1
- package/dist/jsx/list/filter-standard.native.js +1 -1
- package/dist/jsx/list/filter-standard.native.js.map +1 -1
- package/dist/jsx/list/listColumns.mjs +261 -112
- package/dist/jsx/list/listColumns.mjs.map +1 -1
- package/dist/jsx/list/listColumns.native.js +263 -118
- package/dist/jsx/list/listColumns.native.js.map +1 -1
- package/dist/jsx/list/listFields.mjs +6 -2
- package/dist/jsx/list/listFields.mjs.map +1 -1
- package/dist/jsx/list/listFields.native.js +8 -1
- package/dist/jsx/list/listFields.native.js.map +1 -1
- package/dist/jsx/list/sidebar-section.mjs +58 -21
- package/dist/jsx/list/sidebar-section.mjs.map +1 -1
- package/dist/jsx/list/sidebar-section.native.js +60 -19
- package/dist/jsx/list/sidebar-section.native.js.map +1 -1
- package/dist/jsx/oneAdapter/index.mjs +5 -1
- package/dist/jsx/oneAdapter/index.mjs.map +1 -1
- package/dist/jsx/oneAdapter/index.native.js +8 -1
- package/dist/jsx/oneAdapter/index.native.js.map +1 -1
- package/dist/jsx/quickEntry/quickEntryPlan.mjs +2 -6
- package/dist/jsx/quickEntry/quickEntryPlan.mjs.map +1 -1
- package/dist/jsx/quickEntry/quickEntryPlan.native.js +4 -6
- package/dist/jsx/quickEntry/quickEntryPlan.native.js.map +1 -1
- package/dist/jsx/report/QueryReportScreen.mjs +103 -94
- package/dist/jsx/report/QueryReportScreen.mjs.map +1 -1
- package/dist/jsx/report/QueryReportScreen.native.js +125 -143
- package/dist/jsx/report/QueryReportScreen.native.js.map +1 -1
- package/dist/jsx/report/queryReportColumns.mjs +9 -1
- package/dist/jsx/report/queryReportColumns.mjs.map +1 -1
- package/dist/jsx/report/queryReportColumns.native.js +16 -1
- package/dist/jsx/report/queryReportColumns.native.js.map +1 -1
- package/dist/jsx/report/queryReportFilterBar.mjs +246 -0
- package/dist/jsx/report/queryReportFilterBar.mjs.map +1 -0
- package/dist/jsx/report/queryReportFilterBar.native.js +339 -0
- package/dist/jsx/report/queryReportFilterBar.native.js.map +1 -0
- package/dist/jsx/report/queryReportUrlState.mjs +29 -0
- package/dist/jsx/report/queryReportUrlState.mjs.map +1 -0
- package/dist/jsx/report/queryReportUrlState.native.js +108 -0
- package/dist/jsx/report/queryReportUrlState.native.js.map +1 -0
- package/dist/jsx/report/report-grid.mjs +158 -53
- package/dist/jsx/report/report-grid.mjs.map +1 -1
- package/dist/jsx/report/report-grid.native.js +174 -54
- package/dist/jsx/report/report-grid.native.js.map +1 -1
- package/dist/jsx/report/report-toolbar.mjs +2 -7
- package/dist/jsx/report/report-toolbar.mjs.map +1 -1
- package/dist/jsx/report/report-toolbar.native.js +6 -6
- package/dist/jsx/report/report-toolbar.native.js.map +1 -1
- package/dist/jsx/report/reportShapes.mjs +266 -12
- package/dist/jsx/report/reportShapes.mjs.map +1 -1
- package/dist/jsx/report/reportShapes.native.js +333 -11
- package/dist/jsx/report/reportShapes.native.js.map +1 -1
- package/dist/jsx/report/reportViewModel.mjs +13 -5
- package/dist/jsx/report/reportViewModel.mjs.map +1 -1
- package/dist/jsx/report/reportViewModel.native.js +38 -5
- package/dist/jsx/report/reportViewModel.native.js.map +1 -1
- package/dist/jsx/report/useQueryReport.mjs +46 -20
- package/dist/jsx/report/useQueryReport.mjs.map +1 -1
- package/dist/jsx/report/useQueryReport.native.js +56 -37
- package/dist/jsx/report/useQueryReport.native.js.map +1 -1
- package/dist/jsx/shared/deskLinks.mjs +13 -0
- package/dist/jsx/shared/deskLinks.mjs.map +1 -0
- package/dist/jsx/shared/deskLinks.native.js +43 -0
- package/dist/jsx/shared/deskLinks.native.js.map +1 -0
- package/dist/jsx/shared/listNavContext.mjs +74 -0
- package/dist/jsx/shared/listNavContext.mjs.map +1 -0
- package/dist/jsx/shared/listNavContext.native.js +130 -0
- package/dist/jsx/shared/listNavContext.native.js.map +1 -0
- package/dist/jsx/shared/useDocinfo.mjs +40 -3
- package/dist/jsx/shared/useDocinfo.mjs.map +1 -1
- package/dist/jsx/shared/useDocinfo.native.js +82 -2
- package/dist/jsx/shared/useDocinfo.native.js.map +1 -1
- package/dist/jsx/shared/useDoctypeMeta.mjs.map +1 -1
- package/dist/jsx/shared/useDoctypeMeta.native.js.map +1 -1
- package/dist/jsx/shared/useFrappeApp.mjs +10 -5
- package/dist/jsx/shared/useFrappeApp.mjs.map +1 -1
- package/dist/jsx/shared/useFrappeApp.native.js +10 -5
- package/dist/jsx/shared/useFrappeApp.native.js.map +1 -1
- package/dist/jsx/shell/BackofficeShell.mjs +75 -23
- package/dist/jsx/shell/BackofficeShell.mjs.map +1 -1
- package/dist/jsx/shell/BackofficeShell.native.js +89 -24
- package/dist/jsx/shell/BackofficeShell.native.js.map +1 -1
- package/dist/jsx/shell/WorkspaceSidebar.mjs +115 -6
- package/dist/jsx/shell/WorkspaceSidebar.mjs.map +1 -1
- package/dist/jsx/shell/WorkspaceSidebar.native.js +120 -4
- package/dist/jsx/shell/WorkspaceSidebar.native.js.map +1 -1
- package/dist/jsx/shell/useWorkspaces.mjs +2 -0
- package/dist/jsx/shell/useWorkspaces.mjs.map +1 -1
- package/dist/jsx/shell/useWorkspaces.native.js +2 -0
- package/dist/jsx/shell/useWorkspaces.native.js.map +1 -1
- package/dist/jsx/shell/workspaceIcons.mjs +13 -3
- package/dist/jsx/shell/workspaceIcons.mjs.map +1 -1
- package/dist/jsx/shell/workspaceIcons.native.js +35 -2
- package/dist/jsx/shell/workspaceIcons.native.js.map +1 -1
- package/dist/jsx/views/CalendarView.mjs +2 -5
- package/dist/jsx/views/CalendarView.mjs.map +1 -1
- package/dist/jsx/views/CalendarView.native.js +1 -6
- package/dist/jsx/views/CalendarView.native.js.map +1 -1
- package/dist/jsx/views/DoctypeViewScreen.mjs +7 -3
- package/dist/jsx/views/DoctypeViewScreen.mjs.map +1 -1
- package/dist/jsx/views/DoctypeViewScreen.native.js +7 -3
- package/dist/jsx/views/DoctypeViewScreen.native.js.map +1 -1
- package/dist/jsx/views/KanbanView.mjs +2 -0
- package/dist/jsx/views/KanbanView.mjs.map +1 -1
- package/dist/jsx/views/KanbanView.native.js +2 -0
- package/dist/jsx/views/KanbanView.native.js.map +1 -1
- package/dist/jsx/views/ViewHeader.mjs +49 -78
- package/dist/jsx/views/ViewHeader.mjs.map +1 -1
- package/dist/jsx/views/ViewHeader.native.js +51 -78
- package/dist/jsx/views/ViewHeader.native.js.map +1 -1
- package/dist/jsx/views/ViewSwitcherMenu.mjs +69 -0
- package/dist/jsx/views/ViewSwitcherMenu.mjs.map +1 -0
- package/dist/jsx/views/ViewSwitcherMenu.native.js +99 -0
- package/dist/jsx/views/ViewSwitcherMenu.native.js.map +1 -0
- package/dist/jsx/views/connection.mjs +5 -1
- package/dist/jsx/views/connection.mjs.map +1 -1
- package/dist/jsx/views/connection.native.js +5 -1
- package/dist/jsx/views/connection.native.js.map +1 -1
- package/dist/jsx/views/dashboard-data.mjs +2 -3
- package/dist/jsx/views/dashboard-data.mjs.map +1 -1
- package/dist/jsx/views/dashboard-data.native.js +1 -4
- package/dist/jsx/views/dashboard-data.native.js.map +1 -1
- package/dist/jsx/views/kanban-board-controls.mjs +4 -9
- package/dist/jsx/views/kanban-board-controls.mjs.map +1 -1
- package/dist/jsx/views/kanban-board-controls.native.js +9 -10
- package/dist/jsx/views/kanban-board-controls.native.js.map +1 -1
- package/dist/jsx/views/viewAvailability.mjs +33 -0
- package/dist/jsx/views/viewAvailability.mjs.map +1 -0
- package/dist/jsx/views/viewAvailability.native.js +63 -0
- package/dist/jsx/views/viewAvailability.native.js.map +1 -0
- package/dist/jsx/workspace/WorkspaceLinkCard.mjs +121 -26
- package/dist/jsx/workspace/WorkspaceLinkCard.mjs.map +1 -1
- package/dist/jsx/workspace/WorkspaceLinkCard.native.js +126 -28
- package/dist/jsx/workspace/WorkspaceLinkCard.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceLinkDirectory.mjs +27 -21
- package/dist/jsx/workspace/WorkspaceLinkDirectory.mjs.map +1 -1
- package/dist/jsx/workspace/WorkspaceLinkDirectory.native.js +32 -23
- package/dist/jsx/workspace/WorkspaceLinkDirectory.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceNumberCard.mjs +1 -1
- package/dist/jsx/workspace/WorkspaceNumberCard.mjs.map +1 -1
- package/dist/jsx/workspace/WorkspaceNumberCard.native.js +1 -1
- package/dist/jsx/workspace/WorkspaceNumberCard.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceQuickList.mjs +62 -30
- package/dist/jsx/workspace/WorkspaceQuickList.mjs.map +1 -1
- package/dist/jsx/workspace/WorkspaceQuickList.native.js +65 -32
- package/dist/jsx/workspace/WorkspaceQuickList.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceRecents.mjs +9 -1
- package/dist/jsx/workspace/WorkspaceRecents.mjs.map +1 -1
- package/dist/jsx/workspace/WorkspaceRecents.native.js +8 -0
- package/dist/jsx/workspace/WorkspaceRecents.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceShortcut.mjs +11 -1
- package/dist/jsx/workspace/WorkspaceShortcut.mjs.map +1 -1
- package/dist/jsx/workspace/WorkspaceShortcut.native.js +10 -0
- package/dist/jsx/workspace/WorkspaceShortcut.native.js.map +1 -1
- package/dist/jsx/workspace/parseContent.mjs +21 -1
- package/dist/jsx/workspace/parseContent.mjs.map +1 -1
- package/dist/jsx/workspace/parseContent.native.js +24 -0
- package/dist/jsx/workspace/parseContent.native.js.map +1 -1
- package/package.json +15 -15
- package/src/chrome/BackofficeAwesomebar.tsx +1 -0
- package/src/chrome/CommandPalette.spec.tsx +66 -12
- package/src/chrome/CommandPalette.tsx +139 -37
- package/src/chrome/HelpMenu.tsx +48 -67
- package/src/chrome/awesomebar-data.spec.ts +46 -0
- package/src/chrome/awesomebar-data.tsx +62 -12
- package/src/chrome/command-palette-model.ts +2 -2
- package/src/chrome/notifications-data.tsx +2 -0
- package/src/chrome/notifications-panel.tsx +21 -5
- package/src/chrome/shortcuts.ts +2 -0
- package/src/config/BackofficeProvider.tsx +15 -0
- package/src/form/DocFormScreen.tsx +169 -15
- package/src/form/FormConnections.tsx +34 -5
- package/src/form/FormDialogs.tsx +117 -3
- package/src/form/FormErrorBoundary.spec.tsx +1 -0
- package/src/form/FormErrorBoundary.tsx +32 -9
- package/src/form/FormSidebarPanel.spec.tsx +57 -0
- package/src/form/FormSidebarPanel.tsx +69 -14
- package/src/form/FormTimeline.optimistic.spec.tsx +187 -0
- package/src/form/FormTimeline.tsx +246 -28
- package/src/form/FormToolbar.tsx +73 -2
- package/src/form/formActions.ts +4 -0
- package/src/form/formLayout.ts +3 -14
- package/src/form/platformHooks.ts +57 -0
- package/src/form/timeline-entries.spec.ts +180 -0
- package/src/form/timeline-entries.tsx +84 -15
- package/src/i18n/en.ts +32 -9
- package/src/index.ts +14 -1
- package/src/list/AddTagsDialog.tsx +10 -5
- package/src/list/AssignToDialog.tsx +5 -2
- package/src/list/DoctypeListScreen.tsx +208 -209
- package/src/list/ListFilterBar.tsx +61 -26
- package/src/list/ListSidebar.tsx +24 -24
- package/src/list/bulk-edit-dialog.tsx +10 -5
- package/src/list/filter-fields.spec.ts +29 -0
- package/src/list/filter-fields.tsx +22 -2
- package/src/list/filter-saved.tsx +16 -16
- package/src/list/filter-sort.tsx +5 -2
- package/src/list/filter-standard.tsx +1 -1
- package/src/list/listColumns.tsx +307 -114
- package/src/list/listFields.spec.ts +16 -2
- package/src/list/listFields.ts +11 -0
- package/src/list/listUrlState.spec.ts +10 -0
- package/src/list/sidebar-section.spec.tsx +28 -0
- package/src/list/sidebar-section.tsx +57 -14
- package/src/oneAdapter/index.tsx +13 -1
- package/src/quickEntry/quickEntryPlan.ts +2 -6
- package/src/report/DoctypeReportView.tsx +3 -3
- package/src/report/QueryReportScreen.spec.tsx +74 -0
- package/src/report/QueryReportScreen.tsx +159 -121
- package/src/report/queryReportColumns.tsx +17 -0
- package/src/report/queryReportFilterBar.spec.tsx +139 -0
- package/src/report/queryReportFilterBar.tsx +315 -0
- package/src/report/queryReportUrlState.spec.ts +61 -0
- package/src/report/queryReportUrlState.ts +68 -0
- package/src/report/report-grid.spec.tsx +175 -0
- package/src/report/report-grid.tsx +211 -48
- package/src/report/report-toolbar.spec.tsx +90 -0
- package/src/report/report-toolbar.tsx +13 -10
- package/src/report/reportShapes.spec.ts +291 -1
- package/src/report/reportShapes.ts +398 -18
- package/src/report/reportViewModel.spec.ts +55 -0
- package/src/report/reportViewModel.ts +27 -8
- package/src/report/useQueryReport.ts +99 -37
- package/src/shared/deskLinks.spec.ts +38 -0
- package/src/shared/deskLinks.ts +31 -0
- package/src/shared/listNavContext.spec.ts +83 -0
- package/src/shared/listNavContext.ts +115 -0
- package/src/shared/useDocinfo.ts +79 -2
- package/src/shared/useDoctypeMeta.ts +4 -0
- package/src/shared/useFrappeApp.ts +12 -3
- package/src/shell/BackofficeShell.spec.tsx +43 -0
- package/src/shell/BackofficeShell.tsx +93 -24
- package/src/shell/WorkspaceSidebar.spec.tsx +82 -0
- package/src/shell/WorkspaceSidebar.tsx +130 -3
- package/src/shell/useWorkspaces.ts +2 -0
- package/src/shell/workspaceIcons.ts +17 -2
- package/src/views/CalendarView.tsx +2 -5
- package/src/views/DoctypeViewScreen.tsx +3 -1
- package/src/views/KanbanView.tsx +7 -1
- package/src/views/ViewHeader.tsx +63 -99
- package/src/views/ViewSwitcherMenu.spec.tsx +44 -0
- package/src/views/ViewSwitcherMenu.tsx +92 -0
- package/src/views/connection.ts +8 -2
- package/src/views/dashboard-data.tsx +2 -3
- package/src/views/kanban-board-controls.tsx +9 -11
- package/src/views/viewAvailability.spec.ts +199 -0
- package/src/views/viewAvailability.ts +85 -0
- package/src/workspace/WorkspaceLinkCard.tsx +118 -22
- package/src/workspace/WorkspaceLinkDirectory.tsx +32 -27
- package/src/workspace/WorkspaceNumberCard.tsx +1 -1
- package/src/workspace/WorkspaceQuickList.tsx +54 -37
- package/src/workspace/WorkspaceRecents.tsx +5 -1
- package/src/workspace/WorkspaceShortcut.tsx +7 -1
- package/src/workspace/parseContent.spec.ts +89 -0
- package/src/workspace/parseContent.ts +32 -0
- package/types/chrome/BackofficeAwesomebar.d.ts.map +1 -1
- package/types/chrome/CommandPalette.d.ts.map +1 -1
- package/types/chrome/HelpMenu.d.ts.map +1 -1
- package/types/chrome/awesomebar-data.d.ts +9 -2
- package/types/chrome/awesomebar-data.d.ts.map +1 -1
- package/types/chrome/command-palette-model.d.ts.map +1 -1
- package/types/chrome/notifications-data.d.ts.map +1 -1
- package/types/chrome/notifications-panel.d.ts.map +1 -1
- package/types/chrome/shortcuts.d.ts.map +1 -1
- package/types/config/BackofficeProvider.d.ts +13 -0
- package/types/config/BackofficeProvider.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 +14 -0
- package/types/form/FormDialogs.d.ts.map +1 -1
- package/types/form/FormErrorBoundary.d.ts +0 -5
- package/types/form/FormErrorBoundary.d.ts.map +1 -1
- package/types/form/FormSidebarPanel.d.ts +22 -0
- package/types/form/FormSidebarPanel.d.ts.map +1 -1
- package/types/form/FormTimeline.d.ts.map +1 -1
- package/types/form/FormToolbar.d.ts +19 -2
- package/types/form/FormToolbar.d.ts.map +1 -1
- package/types/form/formActions.d.ts +4 -0
- package/types/form/formActions.d.ts.map +1 -1
- package/types/form/formLayout.d.ts.map +1 -1
- package/types/form/platformHooks.d.ts +11 -0
- package/types/form/platformHooks.d.ts.map +1 -1
- package/types/form/timeline-entries.d.ts +19 -3
- package/types/form/timeline-entries.d.ts.map +1 -1
- package/types/i18n/en.d.ts +30 -9
- package/types/i18n/en.d.ts.map +1 -1
- package/types/index.d.ts +8 -3
- package/types/index.d.ts.map +1 -1
- package/types/list/AddTagsDialog.d.ts.map +1 -1
- package/types/list/AssignToDialog.d.ts.map +1 -1
- package/types/list/DoctypeListScreen.d.ts +1 -1
- package/types/list/DoctypeListScreen.d.ts.map +1 -1
- package/types/list/ListFilterBar.d.ts +12 -1
- package/types/list/ListFilterBar.d.ts.map +1 -1
- package/types/list/bulk-edit-dialog.d.ts.map +1 -1
- package/types/list/filter-fields.d.ts +4 -1
- package/types/list/filter-fields.d.ts.map +1 -1
- package/types/list/filter-saved.d.ts +1 -1
- package/types/list/filter-saved.d.ts.map +1 -1
- package/types/list/filter-sort.d.ts.map +1 -1
- package/types/list/listColumns.d.ts +8 -1
- package/types/list/listColumns.d.ts.map +1 -1
- package/types/list/listFields.d.ts +2 -0
- package/types/list/listFields.d.ts.map +1 -1
- package/types/list/sidebar-section.d.ts +4 -1
- package/types/list/sidebar-section.d.ts.map +1 -1
- package/types/oneAdapter/index.d.ts.map +1 -1
- package/types/quickEntry/quickEntryPlan.d.ts.map +1 -1
- package/types/report/QueryReportScreen.d.ts +1 -1
- package/types/report/QueryReportScreen.d.ts.map +1 -1
- package/types/report/queryReportColumns.d.ts +2 -0
- package/types/report/queryReportColumns.d.ts.map +1 -1
- package/types/report/queryReportFilterBar.d.ts +22 -0
- package/types/report/queryReportFilterBar.d.ts.map +1 -0
- package/types/report/queryReportUrlState.d.ts +29 -0
- package/types/report/queryReportUrlState.d.ts.map +1 -0
- package/types/report/report-grid.d.ts.map +1 -1
- package/types/report/report-toolbar.d.ts.map +1 -1
- package/types/report/reportShapes.d.ts +49 -2
- package/types/report/reportShapes.d.ts.map +1 -1
- package/types/report/reportViewModel.d.ts +7 -3
- package/types/report/reportViewModel.d.ts.map +1 -1
- package/types/report/useQueryReport.d.ts +10 -5
- package/types/report/useQueryReport.d.ts.map +1 -1
- package/types/shared/deskLinks.d.ts +16 -0
- package/types/shared/deskLinks.d.ts.map +1 -0
- package/types/shared/listNavContext.d.ts +33 -0
- package/types/shared/listNavContext.d.ts.map +1 -0
- package/types/shared/useDocinfo.d.ts +14 -0
- package/types/shared/useDocinfo.d.ts.map +1 -1
- package/types/shared/useDoctypeMeta.d.ts +4 -0
- package/types/shared/useDoctypeMeta.d.ts.map +1 -1
- package/types/shared/useFrappeApp.d.ts.map +1 -1
- package/types/shell/BackofficeShell.d.ts.map +1 -1
- package/types/shell/WorkspaceSidebar.d.ts.map +1 -1
- package/types/shell/useWorkspaces.d.ts.map +1 -1
- package/types/shell/workspaceIcons.d.ts +1 -1
- package/types/shell/workspaceIcons.d.ts.map +1 -1
- package/types/views/CalendarView.d.ts.map +1 -1
- package/types/views/DoctypeViewScreen.d.ts.map +1 -1
- package/types/views/KanbanView.d.ts.map +1 -1
- package/types/views/ViewHeader.d.ts +6 -6
- package/types/views/ViewHeader.d.ts.map +1 -1
- package/types/views/ViewSwitcherMenu.d.ts +14 -0
- package/types/views/ViewSwitcherMenu.d.ts.map +1 -0
- package/types/views/connection.d.ts +4 -0
- package/types/views/connection.d.ts.map +1 -1
- package/types/views/dashboard-data.d.ts.map +1 -1
- package/types/views/kanban-board-controls.d.ts +3 -2
- package/types/views/kanban-board-controls.d.ts.map +1 -1
- package/types/views/viewAvailability.d.ts +27 -0
- package/types/views/viewAvailability.d.ts.map +1 -0
- package/types/workspace/WorkspaceLinkCard.d.ts +7 -1
- package/types/workspace/WorkspaceLinkCard.d.ts.map +1 -1
- package/types/workspace/WorkspaceLinkDirectory.d.ts +1 -6
- package/types/workspace/WorkspaceLinkDirectory.d.ts.map +1 -1
- package/types/workspace/WorkspaceQuickList.d.ts.map +1 -1
- package/types/workspace/WorkspaceRecents.d.ts.map +1 -1
- package/types/workspace/WorkspaceShortcut.d.ts.map +1 -1
- package/types/workspace/parseContent.d.ts +18 -0
- package/types/workspace/parseContent.d.ts.map +1 -1
|
@@ -47,7 +47,12 @@ import {
|
|
|
47
47
|
parseLikedBy,
|
|
48
48
|
useFrappeConfig,
|
|
49
49
|
} from "@multiplatform.one/frappe-ui";
|
|
50
|
-
import {
|
|
50
|
+
import {
|
|
51
|
+
ensureFocusVisibleRing,
|
|
52
|
+
getGroupPosition,
|
|
53
|
+
stackEdgeRadius,
|
|
54
|
+
useResolvedKnobs,
|
|
55
|
+
} from "@multiplatform.one/theme";
|
|
51
56
|
import {
|
|
52
57
|
ClockIcon,
|
|
53
58
|
HeartIcon,
|
|
@@ -125,6 +130,58 @@ interface SidebarAccordionSection {
|
|
|
125
130
|
content: ReactNode;
|
|
126
131
|
}
|
|
127
132
|
|
|
133
|
+
/**
|
|
134
|
+
* Accordion.Trigger chrome for one rail section. LC-72: hover/press/ring
|
|
135
|
+
* inherit stacked-group corners (Assigned To first, Liked By last; an OPEN
|
|
136
|
+
* trigger squares its bottom even at last). Accordion.Item stays a direct
|
|
137
|
+
* Accordion child so the root can count positions — a custom Item wrapper
|
|
138
|
+
* is opaque and would collapse every row to "only".
|
|
139
|
+
*/
|
|
140
|
+
export function SidebarAccordionTrigger({
|
|
141
|
+
section,
|
|
142
|
+
index,
|
|
143
|
+
count,
|
|
144
|
+
open,
|
|
145
|
+
}: {
|
|
146
|
+
section: SidebarAccordionSection;
|
|
147
|
+
index: number;
|
|
148
|
+
count: number;
|
|
149
|
+
open: boolean;
|
|
150
|
+
}) {
|
|
151
|
+
const { knobProps } = useResolvedKnobs();
|
|
152
|
+
const position = getGroupPosition(index, count);
|
|
153
|
+
const corners = stackEdgeRadius(knobProps.borderRadius.borderRadius, {
|
|
154
|
+
start: position === "first" || position === "only",
|
|
155
|
+
end: (position === "last" || position === "only") && !open,
|
|
156
|
+
});
|
|
157
|
+
return (
|
|
158
|
+
<Accordion.Trigger
|
|
159
|
+
icon={section.icon}
|
|
160
|
+
testID={`form-sidebar-section-${section.key}`}
|
|
161
|
+
minHeight={36}
|
|
162
|
+
paddingVertical="$2"
|
|
163
|
+
paddingHorizontal="$2"
|
|
164
|
+
overflow="hidden"
|
|
165
|
+
outlineWidth={0}
|
|
166
|
+
{...corners}
|
|
167
|
+
{...{ "data-group-position": position }}
|
|
168
|
+
hoverStyle={{ backgroundColor: "$color3", ...corners }}
|
|
169
|
+
pressStyle={{ backgroundColor: "$color5", ...corners }}
|
|
170
|
+
focusStyle={{ outlineWidth: 0 }}
|
|
171
|
+
focusVisibleStyle={ensureFocusVisibleRing({ outlineOffset: -2 })}
|
|
172
|
+
>
|
|
173
|
+
<XStack flex={1} alignItems="center" gap="$2">
|
|
174
|
+
<Text fontSize="$3" fontWeight="600" color="$color12" numberOfLines={1}>
|
|
175
|
+
{section.title}
|
|
176
|
+
</Text>
|
|
177
|
+
<Chip size="$2" variant="subtle" color="gray">
|
|
178
|
+
{String(section.count)}
|
|
179
|
+
</Chip>
|
|
180
|
+
</XStack>
|
|
181
|
+
</Accordion.Trigger>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
128
185
|
export function FormSidebarPanel({
|
|
129
186
|
doctype,
|
|
130
187
|
name,
|
|
@@ -506,19 +563,17 @@ export function FormSidebarPanel({
|
|
|
506
563
|
value={openSections}
|
|
507
564
|
onValueChange={setOpenSections}
|
|
508
565
|
>
|
|
509
|
-
{sections.map((section) => (
|
|
510
|
-
<Accordion.Item key={section.key} value={section.key}>
|
|
511
|
-
<
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
</Accordion.Trigger>
|
|
521
|
-
<Accordion.Content>{section.content}</Accordion.Content>
|
|
566
|
+
{sections.map((section, index) => (
|
|
567
|
+
<Accordion.Item key={section.key} value={section.key} borderBottomWidth={0}>
|
|
568
|
+
<SidebarAccordionTrigger
|
|
569
|
+
section={section}
|
|
570
|
+
index={index}
|
|
571
|
+
count={sections.length}
|
|
572
|
+
open={openSections.includes(section.key)}
|
|
573
|
+
/>
|
|
574
|
+
<Accordion.Content paddingTop={0} paddingHorizontal="$2" paddingBottom="$2">
|
|
575
|
+
{section.content}
|
|
576
|
+
</Accordion.Content>
|
|
522
577
|
</Accordion.Item>
|
|
523
578
|
))}
|
|
524
579
|
</Accordion>
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The comment reproducer of the ONE optimistic pattern (owner items 1+4):
|
|
3
|
+
* adding a comment must render IMMEDIATELY from the local docinfo overlay
|
|
4
|
+
* (apply-locally), visibly pending ("Sending…", Axiom 6 HONEST STATE),
|
|
5
|
+
* reconcile to the server identity on ack (no duplicate row), and roll
|
|
6
|
+
* back with a visible error on failure. The pre-fix behavior was
|
|
7
|
+
* post → wait for ack → refetch docinfo → first reveal ~1.7s after the
|
|
8
|
+
* press (measured against the live bench).
|
|
9
|
+
*
|
|
10
|
+
* The add_comment RPC and the docinfo load are stubbed at the fetch layer
|
|
11
|
+
* with a gate on the POST, so the specs can assert what renders DURING the
|
|
12
|
+
* server round-trip.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import React from "react";
|
|
16
|
+
import { FrappeProvider } from "@multiplatform.one/frappe-ui";
|
|
17
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
18
|
+
import { cleanup, fireEvent, screen, waitFor } from "@testing-library/react";
|
|
19
|
+
import i18next from "i18next";
|
|
20
|
+
import { initReactI18next } from "react-i18next";
|
|
21
|
+
import { afterEach, beforeAll, describe, expect, it, vi } from "vitest";
|
|
22
|
+
import { invalidateDocinfo } from "../shared/useDocinfo";
|
|
23
|
+
import { FormTimeline } from "./FormTimeline";
|
|
24
|
+
|
|
25
|
+
const BASE_URL = "https://formtimeline-optimistic.spec.test";
|
|
26
|
+
const USER = "clay@example.com";
|
|
27
|
+
|
|
28
|
+
beforeAll(async () => {
|
|
29
|
+
if (!i18next.isInitialized) {
|
|
30
|
+
await i18next.use(initReactI18next).init({
|
|
31
|
+
lng: "en",
|
|
32
|
+
interpolation: { escapeValue: false },
|
|
33
|
+
resources: { en: { translation: {} } },
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
afterEach(() => {
|
|
39
|
+
cleanup();
|
|
40
|
+
vi.unstubAllGlobals();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
interface StubOptions {
|
|
44
|
+
docname: string;
|
|
45
|
+
/**
|
|
46
|
+
* Gate the add_comment POST. Resolve with `{ status, payload }` — a 4xx
|
|
47
|
+
* status models a server rejection (no fetch-level rejection, so the
|
|
48
|
+
* HTTP client's transient-error retry never kicks in).
|
|
49
|
+
*/
|
|
50
|
+
onAddComment: () => Promise<{ status: number; payload: Record<string, unknown> }>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Fetch stub covering exactly what this screen calls: get_docinfo (GET),
|
|
55
|
+
* the CSRF bootstrap, and the add_comment POST (delegated to the gate).
|
|
56
|
+
*/
|
|
57
|
+
function stubFetch({ docname, onAddComment }: StubOptions) {
|
|
58
|
+
const jsonResponse = (payload: unknown, status = 200) =>
|
|
59
|
+
new Response(JSON.stringify(payload), {
|
|
60
|
+
status,
|
|
61
|
+
headers: { "Content-Type": "application/json" },
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
vi.stubGlobal(
|
|
65
|
+
"fetch",
|
|
66
|
+
vi.fn(async (input: RequestInfo | URL, _init?: RequestInit) => {
|
|
67
|
+
const url = String(input instanceof Request ? input.url : input);
|
|
68
|
+
if (url.includes("get_csrf_token")) {
|
|
69
|
+
return jsonResponse({ message: "test-csrf-token" });
|
|
70
|
+
}
|
|
71
|
+
if (url.includes("frappe.desk.form.load.get_docinfo")) {
|
|
72
|
+
return jsonResponse({
|
|
73
|
+
docinfo: {
|
|
74
|
+
doctype: "ToDo",
|
|
75
|
+
name: docname,
|
|
76
|
+
user_info: { [USER]: { fullname: "Clay Risser", name: USER } },
|
|
77
|
+
comments: [
|
|
78
|
+
{
|
|
79
|
+
name: "SEED-COMMENT-1",
|
|
80
|
+
comment_type: "Comment",
|
|
81
|
+
content: "<div>seed comment</div>",
|
|
82
|
+
owner: USER,
|
|
83
|
+
creation: "2026-08-10 09:00:00",
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
versions: [],
|
|
87
|
+
communications: [],
|
|
88
|
+
automated_messages: [],
|
|
89
|
+
assignment_logs: [],
|
|
90
|
+
attachment_logs: [],
|
|
91
|
+
like_logs: [],
|
|
92
|
+
info_logs: [],
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
if (url.includes("frappe.desk.form.utils.add_comment")) {
|
|
97
|
+
const { status, payload } = await onAddComment();
|
|
98
|
+
return jsonResponse(payload, status);
|
|
99
|
+
}
|
|
100
|
+
throw new Error(`Unexpected fetch in FormTimeline optimistic spec: ${url}`);
|
|
101
|
+
}),
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function renderTimeline(docname: string) {
|
|
106
|
+
return renderWithProviders(
|
|
107
|
+
<FrappeProvider baseURL={BASE_URL}>
|
|
108
|
+
<FormTimeline doctype="ToDo" name={docname} currentUser={USER} />
|
|
109
|
+
</FrappeProvider>,
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
async function submitComment(text: string) {
|
|
114
|
+
const composer = await screen.findByPlaceholderText("Add a comment…");
|
|
115
|
+
fireEvent.change(composer, { target: { value: text } });
|
|
116
|
+
const submit = await screen.findByText("Comment");
|
|
117
|
+
fireEvent.click(submit);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
describe("FormTimeline optimistic comment (apply-locally-then-reconcile)", () => {
|
|
121
|
+
it("renders the comment immediately as pending, then reconciles to the server identity on ack", async () => {
|
|
122
|
+
const docname = `OPT-ACK-${Date.now()}`;
|
|
123
|
+
invalidateDocinfo("ToDo", docname);
|
|
124
|
+
let releaseAck: (payload: Record<string, unknown>) => void = () => {};
|
|
125
|
+
const ackGate = new Promise<{ status: number; payload: Record<string, unknown> }>((resolve) => {
|
|
126
|
+
releaseAck = (payload) => resolve({ status: 200, payload });
|
|
127
|
+
});
|
|
128
|
+
stubFetch({ docname, onAddComment: () => ackGate });
|
|
129
|
+
|
|
130
|
+
renderTimeline(docname);
|
|
131
|
+
await screen.findByText("seed comment");
|
|
132
|
+
await submitComment("optimistic hello");
|
|
133
|
+
|
|
134
|
+
// DURING the round-trip: the comment is already on screen, visibly
|
|
135
|
+
// pending — realtime/refetch is NOT the first reveal.
|
|
136
|
+
await screen.findByText("optimistic hello");
|
|
137
|
+
expect(screen.getByText("Sending…")).toBeTruthy();
|
|
138
|
+
|
|
139
|
+
// Ack lands with the authoritative Comment doc (server name).
|
|
140
|
+
releaseAck({
|
|
141
|
+
message: {
|
|
142
|
+
name: "SRV-COMMENT-9",
|
|
143
|
+
doctype: "Comment",
|
|
144
|
+
comment_type: "Comment",
|
|
145
|
+
content: "<div>optimistic hello</div>",
|
|
146
|
+
owner: USER,
|
|
147
|
+
comment_email: USER,
|
|
148
|
+
comment_by: "Clay Risser",
|
|
149
|
+
creation: "2026-08-13 12:00:00",
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
// Reconcile: pending marker gone, EXACTLY ONE row remains (temp-id
|
|
154
|
+
// overlay converged into the server record — no duplicates).
|
|
155
|
+
await waitFor(() => expect(screen.queryByText("Sending…")).toBeNull());
|
|
156
|
+
expect(screen.getAllByText("optimistic hello")).toHaveLength(1);
|
|
157
|
+
expect(screen.getByText("seed comment")).toBeTruthy();
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it("rolls back the pending comment and shows a visible error when the RPC fails", async () => {
|
|
161
|
+
const docname = `OPT-FAIL-${Date.now()}`;
|
|
162
|
+
invalidateDocinfo("ToDo", docname);
|
|
163
|
+
let rejectAck: () => void = () => {};
|
|
164
|
+
const ackGate = new Promise<{ status: number; payload: Record<string, unknown> }>((resolve) => {
|
|
165
|
+
rejectAck = () => resolve({ status: 417, payload: { message: "server exploded" } });
|
|
166
|
+
});
|
|
167
|
+
stubFetch({ docname, onAddComment: () => ackGate });
|
|
168
|
+
|
|
169
|
+
renderTimeline(docname);
|
|
170
|
+
await screen.findByText("seed comment");
|
|
171
|
+
await submitComment("doomed comment");
|
|
172
|
+
|
|
173
|
+
// Applied locally first.
|
|
174
|
+
await screen.findByText("doomed comment");
|
|
175
|
+
expect(screen.getByText("Sending…")).toBeTruthy();
|
|
176
|
+
|
|
177
|
+
rejectAck();
|
|
178
|
+
|
|
179
|
+
// Rollback: the pending row is gone; a visible error remains (the
|
|
180
|
+
// server's own message, surfaced through the inline error slot); the
|
|
181
|
+
// rest of the feed is untouched.
|
|
182
|
+
await waitFor(() => expect(screen.queryByText("doomed comment")).toBeNull());
|
|
183
|
+
expect(screen.queryByText("Sending…")).toBeNull();
|
|
184
|
+
await screen.findByText("server exploded");
|
|
185
|
+
expect(screen.getByText("seed comment")).toBeTruthy();
|
|
186
|
+
});
|
|
187
|
+
});
|
|
@@ -7,11 +7,20 @@
|
|
|
7
7
|
// supplies the composer + feed shell; every entry renders through a
|
|
8
8
|
// renderEntry override for desk parity (own-comment edit/delete, version
|
|
9
9
|
// "changed value of…" gray rows, communication blocks, one-line logs).
|
|
10
|
-
//
|
|
10
|
+
//
|
|
11
|
+
// Comments are OPTIMISTIC: they render from a live Comment collection (the
|
|
12
|
+
// sync engine's in-memory store) and write through engine mutations that
|
|
13
|
+
// keep the probed desk RPCs as transport (see frappe-ui's
|
|
14
|
+
// useFrappeCommentActions for the parity ruling):
|
|
11
15
|
// frappe.desk.form.utils.add_comment { reference_doctype,
|
|
12
16
|
// reference_name, content, comment_email, comment_by } (all required)
|
|
13
17
|
// frappe.desk.form.utils.update_comment { name, content }
|
|
14
18
|
// frappe.client.delete { doctype: "Comment", name }
|
|
19
|
+
// A new comment paints immediately under a local: identity, remaps to the
|
|
20
|
+
// server name on ack, and rolls back with a SyncErrorNotice on rejection.
|
|
21
|
+
// Non-comment feed kinds (versions, communications, logs) still come from
|
|
22
|
+
// docinfo. Without a FrappeProvider config (plain docInfo-prop stories)
|
|
23
|
+
// the legacy blocking RPC path is kept.
|
|
15
24
|
import {
|
|
16
25
|
Avatar,
|
|
17
26
|
Button,
|
|
@@ -22,11 +31,23 @@ import {
|
|
|
22
31
|
Timeline,
|
|
23
32
|
XStack,
|
|
24
33
|
YStack,
|
|
34
|
+
notify,
|
|
25
35
|
type TabsItem,
|
|
26
36
|
type TimelineEntry,
|
|
27
37
|
} from "@multiplatform.one/components";
|
|
28
38
|
import { TextArea } from "@multiplatform.one/forms";
|
|
29
|
-
import {
|
|
39
|
+
import {
|
|
40
|
+
runOptimisticRpc,
|
|
41
|
+
useFrappeCollection,
|
|
42
|
+
useFrappePendingMutations,
|
|
43
|
+
useLiveQuery,
|
|
44
|
+
} from "@multiplatform.one/frappe";
|
|
45
|
+
import {
|
|
46
|
+
SyncErrorNotice,
|
|
47
|
+
useFrappeCommentActions,
|
|
48
|
+
useFrappeConfig,
|
|
49
|
+
type FrappeComment,
|
|
50
|
+
} from "@multiplatform.one/frappe-ui";
|
|
30
51
|
import { formatAbsoluteDateTime, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
31
52
|
import {
|
|
32
53
|
EnvelopeSimpleIcon,
|
|
@@ -41,7 +62,15 @@ import {
|
|
|
41
62
|
import { useCallback, useEffect, useMemo, useState, type ReactNode } from "react";
|
|
42
63
|
import { useTranslation } from "react-i18next";
|
|
43
64
|
import { BACKOFFICE_I18N_NAMESPACE } from "../i18n";
|
|
44
|
-
import {
|
|
65
|
+
import {
|
|
66
|
+
addDocinfoOverlay,
|
|
67
|
+
invalidateDocinfo,
|
|
68
|
+
patchDocinfoBase,
|
|
69
|
+
removeDocinfoOverlay,
|
|
70
|
+
useDocinfo,
|
|
71
|
+
type DocInfo,
|
|
72
|
+
type DocInfoComment,
|
|
73
|
+
} from "../shared/useDocinfo";
|
|
45
74
|
import { useFrappeApp } from "../shared/useFrappeApp";
|
|
46
75
|
import {
|
|
47
76
|
buildTimelineFeed,
|
|
@@ -140,10 +169,87 @@ export function FormTimeline({
|
|
|
140
169
|
setActionError(readable ? truncateText(readable, 200) : fallback);
|
|
141
170
|
}, []);
|
|
142
171
|
|
|
172
|
+
// ── live comment collection (optimistic read path) ───────────────────────
|
|
173
|
+
|
|
174
|
+
// Forward the full connection config (see frappe-ui Timeline: the shared
|
|
175
|
+
// SyncModule is keyed by baseURL and the first consumer's options win).
|
|
176
|
+
const connectionConfig = useMemo(
|
|
177
|
+
() =>
|
|
178
|
+
config
|
|
179
|
+
? {
|
|
180
|
+
baseURL: config.baseURL,
|
|
181
|
+
socketPort: config.socketPort,
|
|
182
|
+
siteName: config.siteName,
|
|
183
|
+
socketBaseURL: config.socketBaseURL,
|
|
184
|
+
auth: config.auth,
|
|
185
|
+
syncOptions: config.syncOptions,
|
|
186
|
+
socketOptions: config.socketOptions,
|
|
187
|
+
fixtures: config.fixtures,
|
|
188
|
+
}
|
|
189
|
+
: undefined,
|
|
190
|
+
[config],
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
const commentFilters = useMemo<Array<[string, string, unknown]>>(
|
|
194
|
+
() => [
|
|
195
|
+
["reference_doctype", "=", doctype],
|
|
196
|
+
["reference_name", "=", name],
|
|
197
|
+
],
|
|
198
|
+
[doctype, name],
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
const commentCollection = useFrappeCollection<FrappeComment>(connectionConfig, "Comment", {
|
|
202
|
+
filters: commentFilters,
|
|
203
|
+
fields: [
|
|
204
|
+
"name",
|
|
205
|
+
"comment_type",
|
|
206
|
+
"content",
|
|
207
|
+
"comment_by",
|
|
208
|
+
"comment_email",
|
|
209
|
+
"reference_doctype",
|
|
210
|
+
"reference_name",
|
|
211
|
+
"creation",
|
|
212
|
+
"modified",
|
|
213
|
+
"owner",
|
|
214
|
+
],
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
const { data: liveCommentsData } = useLiveQuery(
|
|
218
|
+
(q) => (commentCollection ? q.from({ _list: commentCollection }) : null),
|
|
219
|
+
[commentCollection],
|
|
220
|
+
);
|
|
221
|
+
|
|
222
|
+
const commentActions = useFrappeCommentActions(connectionConfig, doctype, name);
|
|
223
|
+
// Rejected engine writes surface here (rollback already ran) — rendered
|
|
224
|
+
// as SyncErrorNotice rows with retry/dismiss.
|
|
225
|
+
const commentLedger = useFrappePendingMutations(connectionConfig, "Comment");
|
|
226
|
+
|
|
227
|
+
// Comments render from the live collection once it is ready (stale
|
|
228
|
+
// docinfo comments otherwise — never blank while the first sync runs).
|
|
229
|
+
// Other feed kinds (versions, communications, logs) still come from
|
|
230
|
+
// docinfo: the Comment doctype also stores those log rows under other
|
|
231
|
+
// comment_types, so only comment_type === "Comment" rows are replaced.
|
|
232
|
+
const effectiveDocinfo = useMemo<TimelineDocinfoLike | undefined>(() => {
|
|
233
|
+
if (!docinfo || !commentCollection) return docinfo;
|
|
234
|
+
if ((commentCollection as { status?: string }).status !== "ready") return docinfo;
|
|
235
|
+
const rows = ((liveCommentsData as FrappeComment[] | undefined) ?? [])
|
|
236
|
+
.filter((row) => (row.comment_type ?? "Comment") === "Comment")
|
|
237
|
+
.map((row) => ({
|
|
238
|
+
name: row.name,
|
|
239
|
+
creation: row.creation,
|
|
240
|
+
content: row.content,
|
|
241
|
+
owner: row.owner,
|
|
242
|
+
comment_type: row.comment_type ?? "Comment",
|
|
243
|
+
comment_email: row.comment_email,
|
|
244
|
+
comment_by: row.comment_by,
|
|
245
|
+
}));
|
|
246
|
+
return { ...docinfo, comments: rows };
|
|
247
|
+
}, [docinfo, commentCollection, liveCommentsData]);
|
|
248
|
+
|
|
143
249
|
const baseURL = connection?.baseURL ?? config?.baseURL;
|
|
144
250
|
const entries = useMemo(
|
|
145
|
-
() => buildTimelineFeed(
|
|
146
|
-
[docinfo, baseURL],
|
|
251
|
+
() => buildTimelineFeed(effectiveDocinfo, { userInfo: docinfo?.user_info, baseURL }),
|
|
252
|
+
[effectiveDocinfo, docinfo, baseURL],
|
|
147
253
|
);
|
|
148
254
|
const filtered = useMemo(() => filterTimelineFeed(entries, filter), [entries, filter]);
|
|
149
255
|
const visible = useMemo(() => filtered.slice(0, visibleCount), [filtered, visibleCount]);
|
|
@@ -159,41 +265,124 @@ export function FormTimeline({
|
|
|
159
265
|
// Composed/fixture mode keeps the composer visible; without an app the
|
|
160
266
|
// handlers no-op (stories demo the UI, mutations need a bench).
|
|
161
267
|
const canComment = Boolean(sessionUser && (app || composed));
|
|
268
|
+
// Engine mode: writes go through sync-engine mutations (optimistic paint,
|
|
269
|
+
// rollback + ledger on rejection). Falls back to the legacy blocking RPCs
|
|
270
|
+
// only when there is no FrappeProvider config (docInfo-prop stories).
|
|
271
|
+
const engineMode = Boolean(connectionConfig && commentCollection);
|
|
162
272
|
|
|
163
273
|
const handleAddComment = useCallback(
|
|
164
274
|
(content: string) => {
|
|
165
275
|
const text = content.trim();
|
|
166
|
-
if (!
|
|
276
|
+
if (!sessionUser || !text || !(engineMode || app)) return;
|
|
167
277
|
const rawFullname = docinfo?.user_info?.[sessionUser]?.fullname;
|
|
168
278
|
const fullname = typeof rawFullname === "string" && rawFullname ? rawFullname : sessionUser;
|
|
169
279
|
setActionError(undefined);
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
content: textToCommentHtml(text),
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
280
|
+
if (engineMode) {
|
|
281
|
+
// Optimistic: the row is already painted from the store; the ack
|
|
282
|
+
// (or rollback + SyncErrorNotice) happens in the background. The
|
|
283
|
+
// docinfo refresh keeps sibling panels honest without gating paint.
|
|
284
|
+
commentActions
|
|
285
|
+
.addComment({ content: textToCommentHtml(text), email: sessionUser, fullname })
|
|
286
|
+
.then(() => refresh())
|
|
287
|
+
.catch(() => {});
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
if (!app) return;
|
|
291
|
+
const html = textToCommentHtml(text);
|
|
292
|
+
// Fallback (no live collection): the ONE pattern docinfo arm —
|
|
293
|
+
// local overlay apply → pending render → reconcile the ack into
|
|
294
|
+
// the base → rollback + visible error on failure.
|
|
295
|
+
const creation = new Date().toISOString().slice(0, 19).replace("T", " ");
|
|
296
|
+
let overlayId: string | undefined;
|
|
297
|
+
runOptimisticRpc<{ payload?: { message?: DocInfoComment } }>({
|
|
298
|
+
apply: (ctx) => {
|
|
299
|
+
overlayId = addDocinfoOverlay(doctype, name, (info: DocInfo) => ({
|
|
300
|
+
...info,
|
|
301
|
+
comments: [
|
|
302
|
+
...(info.comments ?? []),
|
|
303
|
+
{
|
|
304
|
+
name: ctx.tempId,
|
|
305
|
+
comment_type: "Comment",
|
|
306
|
+
content: html,
|
|
307
|
+
owner: sessionUser,
|
|
308
|
+
comment_email: sessionUser,
|
|
309
|
+
comment_by: fullname,
|
|
310
|
+
creation,
|
|
311
|
+
__optimistic: true,
|
|
312
|
+
},
|
|
313
|
+
],
|
|
314
|
+
}));
|
|
315
|
+
return () => {
|
|
316
|
+
if (overlayId) removeDocinfoOverlay(overlayId);
|
|
317
|
+
};
|
|
318
|
+
},
|
|
319
|
+
send: () =>
|
|
320
|
+
app.call().post<{ message?: DocInfoComment }>("frappe.desk.form.utils.add_comment", {
|
|
321
|
+
reference_doctype: doctype,
|
|
322
|
+
reference_name: name,
|
|
323
|
+
content: html,
|
|
324
|
+
comment_email: sessionUser,
|
|
325
|
+
comment_by: fullname,
|
|
326
|
+
}),
|
|
327
|
+
reconcile: (ack) => {
|
|
328
|
+
const acked = ack?.payload?.message;
|
|
329
|
+
if (acked && typeof acked.name === "string" && acked.name) {
|
|
330
|
+
patchDocinfoBase(doctype, name, (info: DocInfo) => ({
|
|
331
|
+
...info,
|
|
332
|
+
comments: [
|
|
333
|
+
...(info.comments ?? []).filter((comment) => comment.name !== acked.name),
|
|
334
|
+
acked,
|
|
335
|
+
],
|
|
336
|
+
}));
|
|
337
|
+
} else {
|
|
338
|
+
refresh();
|
|
339
|
+
}
|
|
340
|
+
if (overlayId) removeDocinfoOverlay(overlayId);
|
|
341
|
+
},
|
|
342
|
+
onError: (err) => {
|
|
343
|
+
const body = t("timeline.addFailed", "Could not add comment");
|
|
344
|
+
reportActionError(err, body);
|
|
345
|
+
notify({ severity: "error", scope: "page", body });
|
|
346
|
+
},
|
|
347
|
+
}).catch(() => {
|
|
348
|
+
// Rollback + error surfaces already ran in onError.
|
|
349
|
+
});
|
|
183
350
|
},
|
|
184
|
-
[
|
|
351
|
+
[
|
|
352
|
+
app,
|
|
353
|
+
engineMode,
|
|
354
|
+
commentActions,
|
|
355
|
+
sessionUser,
|
|
356
|
+
docinfo,
|
|
357
|
+
doctype,
|
|
358
|
+
name,
|
|
359
|
+
refresh,
|
|
360
|
+
reportActionError,
|
|
361
|
+
t,
|
|
362
|
+
],
|
|
185
363
|
);
|
|
186
364
|
|
|
187
365
|
const handleSaveEdit = useCallback(() => {
|
|
188
366
|
if (!editing) return;
|
|
189
367
|
const text = editing.text.trim();
|
|
190
|
-
if (!
|
|
368
|
+
if (!text || !(engineMode || app)) {
|
|
191
369
|
setEditing(null);
|
|
192
370
|
return;
|
|
193
371
|
}
|
|
194
372
|
const target = editing.docname;
|
|
195
|
-
setBusyDocname(target);
|
|
196
373
|
setActionError(undefined);
|
|
374
|
+
if (engineMode) {
|
|
375
|
+
// Optimistic: close the editor immediately — the store already shows
|
|
376
|
+
// the new content; rejection rolls back and lands in the ledger.
|
|
377
|
+
setEditing(null);
|
|
378
|
+
commentActions
|
|
379
|
+
.updateComment(target, textToCommentHtml(text))
|
|
380
|
+
.then(() => refresh())
|
|
381
|
+
.catch(() => {});
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
if (!app) return;
|
|
385
|
+
setBusyDocname(target);
|
|
197
386
|
app
|
|
198
387
|
.call()
|
|
199
388
|
.post("frappe.desk.form.utils.update_comment", {
|
|
@@ -208,16 +397,26 @@ export function FormTimeline({
|
|
|
208
397
|
reportActionError(err, t("timeline.updateFailed", "Could not update comment"));
|
|
209
398
|
})
|
|
210
399
|
.finally(() => setBusyDocname(null));
|
|
211
|
-
}, [app, editing, refresh, reportActionError, t]);
|
|
400
|
+
}, [app, engineMode, commentActions, editing, refresh, reportActionError, t]);
|
|
212
401
|
|
|
213
402
|
const handleDeleteComment = useCallback(
|
|
214
403
|
(docname: string) => {
|
|
215
|
-
if (!app) {
|
|
404
|
+
if (!(engineMode || app)) {
|
|
216
405
|
setConfirmingDelete(null);
|
|
217
406
|
return;
|
|
218
407
|
}
|
|
219
|
-
setBusyDocname(docname);
|
|
220
408
|
setActionError(undefined);
|
|
409
|
+
if (engineMode) {
|
|
410
|
+
// Optimistic: the row is evicted from the store immediately.
|
|
411
|
+
setConfirmingDelete(null);
|
|
412
|
+
commentActions
|
|
413
|
+
.deleteComment(docname)
|
|
414
|
+
.then(() => refresh())
|
|
415
|
+
.catch(() => {});
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
if (!app) return;
|
|
419
|
+
setBusyDocname(docname);
|
|
221
420
|
app
|
|
222
421
|
.call()
|
|
223
422
|
.post("frappe.client.delete", { doctype: "Comment", name: docname })
|
|
@@ -230,7 +429,7 @@ export function FormTimeline({
|
|
|
230
429
|
setConfirmingDelete(null);
|
|
231
430
|
});
|
|
232
431
|
},
|
|
233
|
-
[app, refresh, reportActionError, t],
|
|
432
|
+
[app, engineMode, commentActions, refresh, reportActionError, t],
|
|
234
433
|
);
|
|
235
434
|
|
|
236
435
|
// ── entry renderers (desk parity) ────────────────────────────────────────
|
|
@@ -253,14 +452,25 @@ export function FormTimeline({
|
|
|
253
452
|
|
|
254
453
|
const renderCommentRow = (entry: TimelineFeedEntry) => {
|
|
255
454
|
const displayName = displayNameOf(entry);
|
|
256
|
-
|
|
455
|
+
// Pending rows (optimistic, awaiting ack) render visible but distinct
|
|
456
|
+
// (Axiom 6 HONEST STATE): dimmed, "Sending…" in the timestamp slot, and
|
|
457
|
+
// edit/delete withheld until the identity is the server's. Two marks:
|
|
458
|
+
// `__optimistic` overlay rows (`entry.pending`) and engine `local:` ids.
|
|
459
|
+
const pending = entry.pending === true || entry.docname.startsWith("local:");
|
|
460
|
+
const own = Boolean(sessionUser && entry.ownerId === sessionUser) && !pending;
|
|
257
461
|
const isEditing = editing?.docname === entry.docname;
|
|
258
462
|
const isConfirming = confirmingDelete === entry.docname;
|
|
259
463
|
const isBusy = busyDocname === entry.docname;
|
|
260
464
|
return (
|
|
261
465
|
<XStack
|
|
262
466
|
role="article"
|
|
263
|
-
aria-label={
|
|
467
|
+
aria-label={
|
|
468
|
+
pending
|
|
469
|
+
? `${displayName}, ${t("timeline.sending", "Sending…")}`
|
|
470
|
+
: `${displayName}, ${formatRelativeTime(entry.timestamp)}`
|
|
471
|
+
}
|
|
472
|
+
aria-busy={pending || undefined}
|
|
473
|
+
opacity={pending ? 0.6 : 1}
|
|
264
474
|
gap="$3"
|
|
265
475
|
alignItems="flex-start"
|
|
266
476
|
>
|
|
@@ -543,6 +753,14 @@ export function FormTimeline({
|
|
|
543
753
|
{actionError}
|
|
544
754
|
</Text>
|
|
545
755
|
) : null}
|
|
756
|
+
{commentLedger.failed.map((entry) => (
|
|
757
|
+
<SyncErrorNotice
|
|
758
|
+
key={entry.id}
|
|
759
|
+
message={entry.error ?? t("timeline.writeFailed", "Could not save comment")}
|
|
760
|
+
onRetry={() => void commentLedger.retry()}
|
|
761
|
+
onDismiss={() => commentLedger.dismiss(entry.id)}
|
|
762
|
+
/>
|
|
763
|
+
))}
|
|
546
764
|
<Timeline
|
|
547
765
|
entries={visible}
|
|
548
766
|
enableAddComment={canComment}
|