@multiplatform.one/backoffice 7.6.3 → 7.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/chrome/BackofficeAwesomebar.native.js +1 -1
- package/dist/cjs/chrome/BackofficeAwesomebar.native.js.map +1 -1
- package/dist/cjs/chrome/CommandPalette.native.js +1 -1
- package/dist/cjs/chrome/CommandPalette.native.js.map +1 -1
- package/dist/cjs/chrome/HelpMenu.native.js +1 -1
- package/dist/cjs/chrome/HelpMenu.native.js.map +1 -1
- package/dist/cjs/chrome/NotificationsButton.native.js +1 -1
- package/dist/cjs/chrome/NotificationsButton.native.js.map +1 -1
- package/dist/cjs/chrome/UserMenu.native.js +1 -1
- package/dist/cjs/chrome/UserMenu.native.js.map +1 -1
- package/dist/cjs/chrome/awesomebar-data.native.js.map +1 -1
- package/dist/cjs/chrome/command-palette-model.native.js +1 -1
- package/dist/cjs/chrome/command-palette-model.native.js.map +1 -1
- package/dist/cjs/chrome/help-about-dialog.native.js +1 -1
- package/dist/cjs/chrome/help-about-dialog.native.js.map +1 -1
- package/dist/cjs/chrome/help-shortcuts-dialog.native.js +1 -1
- package/dist/cjs/chrome/help-shortcuts-dialog.native.js.map +1 -1
- package/dist/cjs/chrome/notifications-data.native.js.map +1 -1
- package/dist/cjs/chrome/notifications-panel.native.js +1 -1
- package/dist/cjs/chrome/notifications-panel.native.js.map +1 -1
- package/dist/cjs/chrome/notifications-utils.native.js.map +1 -1
- package/dist/cjs/chrome/shortcuts.native.js.map +1 -1
- package/dist/cjs/chrome/user-session.native.js.map +1 -1
- package/dist/cjs/config/BackofficeProvider.native.js +1 -1
- package/dist/cjs/config/BackofficeProvider.native.js.map +1 -1
- package/dist/cjs/config/capabilities.native.js.map +1 -1
- package/dist/cjs/config/events.native.js.map +1 -1
- package/dist/cjs/config/slots.native.js.map +1 -1
- package/dist/cjs/desk/Desk.native.js.map +1 -1
- package/dist/cjs/desk/DeskSurface.native.js.map +1 -1
- package/dist/cjs/desk/resolveDeskPath.native.js.map +1 -1
- package/dist/cjs/desk/scope.native.js.map +1 -1
- package/dist/cjs/desk/target.native.js.map +1 -1
- package/dist/cjs/form/DocFormScreen.native.js +1 -1
- package/dist/cjs/form/DocFormScreen.native.js.map +1 -1
- package/dist/cjs/form/FormConnections.native.js +1 -1
- package/dist/cjs/form/FormConnections.native.js.map +1 -1
- package/dist/cjs/form/FormDialogs.native.js +1 -1
- package/dist/cjs/form/FormDialogs.native.js.map +1 -1
- package/dist/cjs/form/FormErrorBoundary.native.js +1 -1
- package/dist/cjs/form/FormErrorBoundary.native.js.map +1 -1
- package/dist/cjs/form/FormHeaderCluster.native.js +1 -1
- package/dist/cjs/form/FormHeaderCluster.native.js.map +1 -1
- package/dist/cjs/form/FormSidebarPanel.native.js +1 -1
- package/dist/cjs/form/FormSidebarPanel.native.js.map +1 -1
- package/dist/cjs/form/FormTimeline.native.js +1 -1
- package/dist/cjs/form/FormTimeline.native.js.map +1 -1
- package/dist/cjs/form/FormToolbar.native.js +1 -1
- package/dist/cjs/form/FormToolbar.native.js.map +1 -1
- package/dist/cjs/form/connections-data.native.js.map +1 -1
- package/dist/cjs/form/createPrefill.cjs +3 -11
- package/dist/cjs/form/createPrefill.native.js +3 -11
- package/dist/cjs/form/createPrefill.native.js.map +1 -1
- package/dist/cjs/form/dependsOn.native.js.map +1 -1
- package/dist/cjs/form/dirtyTracking.cjs +4 -29
- package/dist/cjs/form/dirtyTracking.native.js +4 -48
- package/dist/cjs/form/dirtyTracking.native.js.map +1 -1
- package/dist/cjs/form/docinfo.native.js.map +1 -1
- package/dist/cjs/form/fetchFrom.cjs +4 -41
- package/dist/cjs/form/fetchFrom.native.js +4 -81
- package/dist/cjs/form/fetchFrom.native.js.map +1 -1
- package/dist/cjs/form/fieldPermissions.cjs +4 -29
- package/dist/cjs/form/fieldPermissions.native.js +4 -51
- package/dist/cjs/form/fieldPermissions.native.js.map +1 -1
- package/dist/cjs/form/formActions.cjs +2 -171
- package/dist/cjs/form/formActions.native.js +2 -178
- package/dist/cjs/form/formActions.native.js.map +1 -1
- package/dist/cjs/form/formLayout.cjs +5 -219
- package/dist/cjs/form/formLayout.native.js +5 -359
- package/dist/cjs/form/formLayout.native.js.map +1 -1
- package/dist/cjs/form/platformHooks.native.js.map +1 -1
- package/dist/cjs/form/sidebar-attachments.native.js +1 -1
- package/dist/cjs/form/sidebar-attachments.native.js.map +1 -1
- package/dist/cjs/form/sidebar-dialogs.native.js +1 -1
- package/dist/cjs/form/sidebar-dialogs.native.js.map +1 -1
- package/dist/cjs/form/sidebar-people.native.js +1 -1
- package/dist/cjs/form/sidebar-people.native.js.map +1 -1
- package/dist/cjs/form/sidebar-rpc.native.js.map +1 -1
- package/dist/cjs/form/sidebar-utils.native.js.map +1 -1
- package/dist/cjs/form/timeline-entries.native.js.map +1 -1
- package/dist/cjs/form/timeline-utils.native.js.map +1 -1
- package/dist/cjs/form/useFormEngine.cjs +2 -361
- package/dist/cjs/form/useFormEngine.native.js +2 -447
- package/dist/cjs/form/useFormEngine.native.js.map +1 -1
- package/dist/cjs/i18n/en.native.js.map +1 -1
- package/dist/cjs/i18n/index.native.js.map +1 -1
- package/dist/cjs/index.native.js +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/list/AddTagsDialog.native.js +1 -1
- package/dist/cjs/list/AddTagsDialog.native.js.map +1 -1
- package/dist/cjs/list/AssignToDialog.native.js +1 -1
- package/dist/cjs/list/AssignToDialog.native.js.map +1 -1
- package/dist/cjs/list/DoctypeListScreen.native.js +1 -1
- package/dist/cjs/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/cjs/list/ListBulkActionsBar.native.js +1 -1
- package/dist/cjs/list/ListBulkActionsBar.native.js.map +1 -1
- package/dist/cjs/list/ListFilterBar.native.js +1 -1
- package/dist/cjs/list/ListFilterBar.native.js.map +1 -1
- package/dist/cjs/list/ListSidebar.native.js +1 -1
- package/dist/cjs/list/ListSidebar.native.js.map +1 -1
- package/dist/cjs/list/bulk-edit-dialog.native.js +1 -1
- package/dist/cjs/list/bulk-edit-dialog.native.js.map +1 -1
- package/dist/cjs/list/bulk-export.native.js.map +1 -1
- package/dist/cjs/list/bulk-submit-cancel.native.js.map +1 -1
- package/dist/cjs/list/bulkActions.native.js.map +1 -1
- package/dist/cjs/list/filter-chips.native.js +1 -1
- package/dist/cjs/list/filter-chips.native.js.map +1 -1
- package/dist/cjs/list/filter-editor.native.js +1 -1
- package/dist/cjs/list/filter-editor.native.js.map +1 -1
- package/dist/cjs/list/filter-fields.native.js.map +1 -1
- package/dist/cjs/list/filter-saved.native.js +1 -1
- package/dist/cjs/list/filter-saved.native.js.map +1 -1
- package/dist/cjs/list/filter-sort.native.js +1 -1
- package/dist/cjs/list/filter-sort.native.js.map +1 -1
- package/dist/cjs/list/filter-standard.native.js.map +1 -1
- package/dist/cjs/list/filterConversion.native.js.map +1 -1
- package/dist/cjs/list/list-tools-sheet.native.js +1 -1
- package/dist/cjs/list/list-tools-sheet.native.js.map +1 -1
- package/dist/cjs/list/listColumns.native.js.map +1 -1
- package/dist/cjs/list/listFields.native.js.map +1 -1
- package/dist/cjs/list/listFormat.native.js.map +1 -1
- package/dist/cjs/list/listUrlState.native.js.map +1 -1
- package/dist/cjs/list/sidebar-section.native.js +1 -1
- package/dist/cjs/list/sidebar-section.native.js.map +1 -1
- package/dist/cjs/list/sidebar-stats.native.js.map +1 -1
- package/dist/cjs/list/statusColors.native.js.map +1 -1
- package/dist/cjs/navigation/navigator.native.js.map +1 -1
- package/dist/cjs/navigation/paths.native.js.map +1 -1
- package/dist/cjs/oneAdapter/index.native.js.map +1 -1
- package/dist/cjs/quickEntry/QuickEntryDialog.native.js +1 -1
- package/dist/cjs/quickEntry/QuickEntryDialog.native.js.map +1 -1
- package/dist/cjs/quickEntry/quickEntryPlan.native.js.map +1 -1
- package/dist/cjs/report/DoctypeReportView.native.js +1 -1
- package/dist/cjs/report/DoctypeReportView.native.js.map +1 -1
- package/dist/cjs/report/QueryReportScreen.native.js +1 -1
- package/dist/cjs/report/QueryReportScreen.native.js.map +1 -1
- package/dist/cjs/report/queryReportColumns.native.js.map +1 -1
- package/dist/cjs/report/queryReportFilterBar.native.js +1 -1
- package/dist/cjs/report/queryReportFilterBar.native.js.map +1 -1
- package/dist/cjs/report/queryReportUrlState.native.js.map +1 -1
- package/dist/cjs/report/report-grid.native.js +1 -1
- package/dist/cjs/report/report-grid.native.js.map +1 -1
- package/dist/cjs/report/report-toolbar.native.js +1 -1
- package/dist/cjs/report/report-toolbar.native.js.map +1 -1
- package/dist/cjs/report/reportShapes.native.js.map +1 -1
- package/dist/cjs/report/reportViewModel.native.js.map +1 -1
- package/dist/cjs/report/savedReports.native.js.map +1 -1
- package/dist/cjs/report/useQueryReport.native.js.map +1 -1
- package/dist/cjs/shared/deskLinks.native.js.map +1 -1
- package/dist/cjs/shared/listNavContext.native.js.map +1 -1
- package/dist/cjs/shared/types.native.js.map +1 -1
- package/dist/cjs/shared/useDocinfo.native.js.map +1 -1
- package/dist/cjs/shared/useDoctypeMeta.native.js.map +1 -1
- package/dist/cjs/shared/useFrappeApp.native.js.map +1 -1
- package/dist/cjs/shared/useRecentVisit.native.js.map +1 -1
- package/dist/cjs/shared/useSessionUserId.native.js.map +1 -1
- package/dist/cjs/shared/useSlugTarget.native.js.map +1 -1
- package/dist/cjs/shared/useUserRoles.native.js.map +1 -1
- package/dist/cjs/shell/BackofficeShell.native.js +1 -1
- package/dist/cjs/shell/BackofficeShell.native.js.map +1 -1
- package/dist/cjs/shell/HomeRedirect.native.js +1 -1
- package/dist/cjs/shell/HomeRedirect.native.js.map +1 -1
- package/dist/cjs/shell/NotFoundScreen.native.js +1 -1
- package/dist/cjs/shell/NotFoundScreen.native.js.map +1 -1
- package/dist/cjs/shell/SlugScreen.native.js +1 -1
- package/dist/cjs/shell/SlugScreen.native.js.map +1 -1
- package/dist/cjs/shell/WorkspaceSidebar.native.js +1 -1
- package/dist/cjs/shell/WorkspaceSidebar.native.js.map +1 -1
- package/dist/cjs/shell/useWorkspaces.native.js.map +1 -1
- package/dist/cjs/shell/workspaceIcons.native.js.map +1 -1
- package/dist/cjs/views/CalendarView.native.js +1 -1
- package/dist/cjs/views/CalendarView.native.js.map +1 -1
- package/dist/cjs/views/DashboardView.native.js +1 -1
- package/dist/cjs/views/DashboardView.native.js.map +1 -1
- package/dist/cjs/views/DoctypeViewScreen.native.js.map +1 -1
- package/dist/cjs/views/ImageView.native.js +1 -1
- package/dist/cjs/views/ImageView.native.js.map +1 -1
- package/dist/cjs/views/KanbanView.native.js +1 -1
- package/dist/cjs/views/KanbanView.native.js.map +1 -1
- package/dist/cjs/views/ReportView.native.js +1 -1
- package/dist/cjs/views/ReportView.native.js.map +1 -1
- package/dist/cjs/views/TreeView.native.js +1 -1
- package/dist/cjs/views/TreeView.native.js.map +1 -1
- package/dist/cjs/views/ViewHeader.native.js +1 -1
- package/dist/cjs/views/ViewHeader.native.js.map +1 -1
- package/dist/cjs/views/ViewStates.native.js +1 -1
- package/dist/cjs/views/ViewStates.native.js.map +1 -1
- package/dist/cjs/views/ViewSwitcherMenu.native.js +1 -1
- package/dist/cjs/views/ViewSwitcherMenu.native.js.map +1 -1
- package/dist/cjs/views/calendar-field-selector.native.js +1 -1
- package/dist/cjs/views/calendar-field-selector.native.js.map +1 -1
- package/dist/cjs/views/connection.native.js.map +1 -1
- package/dist/cjs/views/dashboard-data.native.js.map +1 -1
- package/dist/cjs/views/deskViewConfigs.native.js.map +1 -1
- package/dist/cjs/views/kanban-board-controls.native.js +1 -1
- package/dist/cjs/views/kanban-board-controls.native.js.map +1 -1
- package/dist/cjs/views/kanban-field-picker.native.js +1 -1
- package/dist/cjs/views/kanban-field-picker.native.js.map +1 -1
- package/dist/cjs/views/kanbanBoardOps.native.js.map +1 -1
- package/dist/cjs/views/report-controls.native.js +1 -1
- package/dist/cjs/views/report-controls.native.js.map +1 -1
- package/dist/cjs/views/viewAvailability.native.js.map +1 -1
- package/dist/cjs/views/viewMeta.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceChartBlock.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceChartBlock.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceGrid.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceLinkCard.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceLinkCard.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceLinkDirectory.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceLinkDirectory.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceNumberCard.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceNumberCard.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceQuickList.cjs +1 -1
- package/dist/cjs/workspace/WorkspaceQuickList.native.js +4 -2
- package/dist/cjs/workspace/WorkspaceQuickList.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceRecents.cjs +1 -3
- package/dist/cjs/workspace/WorkspaceRecents.native.js +4 -4
- package/dist/cjs/workspace/WorkspaceRecents.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceScreen.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceScreen.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceShortcut.cjs +1 -3
- package/dist/cjs/workspace/WorkspaceShortcut.native.js +5 -4
- package/dist/cjs/workspace/WorkspaceShortcut.native.js.map +1 -1
- package/dist/cjs/workspace/parseContent.native.js.map +1 -1
- package/dist/cjs/workspace/types.native.js.map +1 -1
- package/dist/cjs/workspace/useDashboardChart.native.js.map +1 -1
- package/dist/cjs/workspace/useWorkspaceDoc.native.js.map +1 -1
- package/dist/esm/chrome/BackofficeAwesomebar.native.js.map +1 -1
- package/dist/esm/chrome/CommandPalette.native.js.map +1 -1
- package/dist/esm/chrome/HelpMenu.native.js.map +1 -1
- package/dist/esm/chrome/NotificationsButton.native.js.map +1 -1
- package/dist/esm/chrome/UserMenu.native.js.map +1 -1
- package/dist/esm/chrome/awesomebar-data.native.js.map +1 -1
- package/dist/esm/chrome/command-palette-model.native.js.map +1 -1
- package/dist/esm/chrome/help-about-dialog.native.js.map +1 -1
- package/dist/esm/chrome/help-shortcuts-dialog.native.js.map +1 -1
- package/dist/esm/chrome/notifications-data.native.js.map +1 -1
- package/dist/esm/chrome/notifications-panel.native.js.map +1 -1
- package/dist/esm/chrome/notifications-utils.native.js.map +1 -1
- package/dist/esm/chrome/shortcuts.native.js.map +1 -1
- package/dist/esm/chrome/user-session.native.js.map +1 -1
- package/dist/esm/config/BackofficeProvider.native.js.map +1 -1
- package/dist/esm/config/capabilities.native.js.map +1 -1
- package/dist/esm/config/events.native.js.map +1 -1
- package/dist/esm/config/slots.native.js.map +1 -1
- package/dist/esm/desk/Desk.native.js.map +1 -1
- package/dist/esm/desk/DeskSurface.mjs.map +1 -1
- package/dist/esm/desk/DeskSurface.native.js.map +1 -1
- package/dist/esm/desk/resolveDeskPath.native.js.map +1 -1
- package/dist/esm/desk/scope.native.js.map +1 -1
- package/dist/esm/desk/target.native.js.map +1 -1
- package/dist/esm/form/DocFormScreen.native.js.map +1 -1
- package/dist/esm/form/FormConnections.native.js.map +1 -1
- package/dist/esm/form/FormDialogs.native.js.map +1 -1
- package/dist/esm/form/FormErrorBoundary.native.js.map +1 -1
- package/dist/esm/form/FormHeaderCluster.native.js.map +1 -1
- package/dist/esm/form/FormSidebarPanel.native.js.map +1 -1
- package/dist/esm/form/FormTimeline.native.js.map +1 -1
- package/dist/esm/form/FormToolbar.native.js.map +1 -1
- package/dist/esm/form/connections-data.native.js.map +1 -1
- package/dist/esm/form/createPrefill.mjs +1 -9
- package/dist/esm/form/createPrefill.mjs.map +1 -1
- package/dist/esm/form/createPrefill.native.js +1 -9
- package/dist/esm/form/createPrefill.native.js.map +1 -1
- package/dist/esm/form/dependsOn.native.js.map +1 -1
- package/dist/esm/form/dirtyTracking.mjs +1 -26
- package/dist/esm/form/dirtyTracking.mjs.map +1 -1
- package/dist/esm/form/dirtyTracking.native.js +1 -45
- package/dist/esm/form/dirtyTracking.native.js.map +1 -1
- package/dist/esm/form/docinfo.native.js.map +1 -1
- package/dist/esm/form/fetchFrom.mjs +1 -38
- package/dist/esm/form/fetchFrom.mjs.map +1 -1
- package/dist/esm/form/fetchFrom.native.js +1 -78
- package/dist/esm/form/fetchFrom.native.js.map +1 -1
- package/dist/esm/form/fieldPermissions.mjs +1 -26
- package/dist/esm/form/fieldPermissions.mjs.map +1 -1
- package/dist/esm/form/fieldPermissions.native.js +1 -48
- package/dist/esm/form/fieldPermissions.native.js.map +1 -1
- package/dist/esm/form/formActions.mjs +1 -145
- package/dist/esm/form/formActions.mjs.map +1 -1
- package/dist/esm/form/formActions.native.js +1 -152
- package/dist/esm/form/formActions.native.js.map +1 -1
- package/dist/esm/form/formLayout.mjs +1 -215
- package/dist/esm/form/formLayout.mjs.map +1 -1
- package/dist/esm/form/formLayout.native.js +1 -355
- package/dist/esm/form/formLayout.native.js.map +1 -1
- package/dist/esm/form/platformHooks.native.js.map +1 -1
- package/dist/esm/form/sidebar-attachments.native.js.map +1 -1
- package/dist/esm/form/sidebar-dialogs.native.js.map +1 -1
- package/dist/esm/form/sidebar-people.native.js.map +1 -1
- package/dist/esm/form/sidebar-rpc.native.js.map +1 -1
- package/dist/esm/form/sidebar-utils.native.js.map +1 -1
- package/dist/esm/form/timeline-entries.native.js.map +1 -1
- package/dist/esm/form/timeline-utils.native.js.map +1 -1
- package/dist/esm/form/useFormEngine.mjs +1 -360
- package/dist/esm/form/useFormEngine.mjs.map +1 -1
- package/dist/esm/form/useFormEngine.native.js +1 -446
- package/dist/esm/form/useFormEngine.native.js.map +1 -1
- package/dist/esm/i18n/en.native.js.map +1 -1
- package/dist/esm/i18n/index.native.js.map +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/list/AddTagsDialog.native.js.map +1 -1
- package/dist/esm/list/AssignToDialog.native.js.map +1 -1
- package/dist/esm/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/esm/list/ListBulkActionsBar.native.js.map +1 -1
- package/dist/esm/list/ListFilterBar.native.js.map +1 -1
- package/dist/esm/list/ListSidebar.native.js.map +1 -1
- package/dist/esm/list/bulk-edit-dialog.native.js.map +1 -1
- package/dist/esm/list/bulk-export.native.js.map +1 -1
- package/dist/esm/list/bulk-submit-cancel.native.js.map +1 -1
- package/dist/esm/list/bulkActions.native.js.map +1 -1
- package/dist/esm/list/filter-chips.native.js.map +1 -1
- package/dist/esm/list/filter-editor.native.js.map +1 -1
- package/dist/esm/list/filter-fields.native.js.map +1 -1
- package/dist/esm/list/filter-saved.native.js.map +1 -1
- package/dist/esm/list/filter-sort.native.js.map +1 -1
- package/dist/esm/list/filter-standard.native.js.map +1 -1
- package/dist/esm/list/filterConversion.native.js.map +1 -1
- package/dist/esm/list/list-tools-sheet.native.js.map +1 -1
- package/dist/esm/list/listColumns.native.js.map +1 -1
- package/dist/esm/list/listFields.native.js.map +1 -1
- package/dist/esm/list/listFormat.native.js.map +1 -1
- package/dist/esm/list/listUrlState.native.js.map +1 -1
- package/dist/esm/list/sidebar-section.native.js.map +1 -1
- package/dist/esm/list/sidebar-stats.native.js.map +1 -1
- package/dist/esm/list/statusColors.native.js.map +1 -1
- package/dist/esm/navigation/navigator.native.js.map +1 -1
- package/dist/esm/navigation/paths.native.js.map +1 -1
- package/dist/esm/oneAdapter/index.native.js.map +1 -1
- package/dist/esm/quickEntry/QuickEntryDialog.native.js.map +1 -1
- package/dist/esm/quickEntry/quickEntryPlan.native.js.map +1 -1
- package/dist/esm/report/DoctypeReportView.native.js.map +1 -1
- package/dist/esm/report/QueryReportScreen.native.js.map +1 -1
- package/dist/esm/report/queryReportColumns.native.js.map +1 -1
- package/dist/esm/report/queryReportFilterBar.native.js.map +1 -1
- package/dist/esm/report/queryReportUrlState.native.js.map +1 -1
- package/dist/esm/report/report-grid.native.js.map +1 -1
- package/dist/esm/report/report-toolbar.native.js.map +1 -1
- package/dist/esm/report/reportShapes.native.js.map +1 -1
- package/dist/esm/report/reportViewModel.native.js.map +1 -1
- package/dist/esm/report/savedReports.native.js.map +1 -1
- package/dist/esm/report/useQueryReport.native.js.map +1 -1
- package/dist/esm/shared/deskLinks.native.js.map +1 -1
- package/dist/esm/shared/listNavContext.native.js.map +1 -1
- package/dist/esm/shared/types.native.js.map +1 -1
- package/dist/esm/shared/useDocinfo.native.js.map +1 -1
- package/dist/esm/shared/useDoctypeMeta.mjs.map +1 -1
- package/dist/esm/shared/useDoctypeMeta.native.js.map +1 -1
- package/dist/esm/shared/useFrappeApp.native.js.map +1 -1
- package/dist/esm/shared/useRecentVisit.native.js.map +1 -1
- package/dist/esm/shared/useSessionUserId.native.js.map +1 -1
- package/dist/esm/shared/useSlugTarget.native.js.map +1 -1
- package/dist/esm/shared/useUserRoles.native.js.map +1 -1
- package/dist/esm/shell/BackofficeShell.native.js.map +1 -1
- package/dist/esm/shell/HomeRedirect.native.js.map +1 -1
- package/dist/esm/shell/NotFoundScreen.native.js.map +1 -1
- package/dist/esm/shell/SlugScreen.native.js.map +1 -1
- package/dist/esm/shell/WorkspaceSidebar.native.js.map +1 -1
- package/dist/esm/shell/useWorkspaces.native.js.map +1 -1
- package/dist/esm/shell/workspaceIcons.native.js.map +1 -1
- package/dist/esm/views/CalendarView.native.js.map +1 -1
- package/dist/esm/views/DashboardView.native.js.map +1 -1
- package/dist/esm/views/DoctypeViewScreen.native.js.map +1 -1
- package/dist/esm/views/ImageView.native.js.map +1 -1
- package/dist/esm/views/KanbanView.native.js.map +1 -1
- package/dist/esm/views/ReportView.native.js.map +1 -1
- package/dist/esm/views/TreeView.native.js.map +1 -1
- package/dist/esm/views/ViewHeader.native.js.map +1 -1
- package/dist/esm/views/ViewStates.native.js.map +1 -1
- package/dist/esm/views/ViewSwitcherMenu.native.js.map +1 -1
- package/dist/esm/views/calendar-field-selector.native.js.map +1 -1
- package/dist/esm/views/connection.native.js.map +1 -1
- package/dist/esm/views/dashboard-data.native.js.map +1 -1
- package/dist/esm/views/deskViewConfigs.native.js.map +1 -1
- package/dist/esm/views/kanban-board-controls.native.js.map +1 -1
- package/dist/esm/views/kanban-field-picker.native.js.map +1 -1
- package/dist/esm/views/kanbanBoardOps.native.js.map +1 -1
- package/dist/esm/views/report-controls.native.js.map +1 -1
- package/dist/esm/views/viewAvailability.native.js.map +1 -1
- package/dist/esm/views/viewMeta.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceChartBlock.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceGrid.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceLinkCard.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceLinkDirectory.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceNumberCard.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceQuickList.mjs +2 -2
- package/dist/esm/workspace/WorkspaceQuickList.mjs.map +1 -1
- package/dist/esm/workspace/WorkspaceQuickList.native.js +4 -2
- package/dist/esm/workspace/WorkspaceQuickList.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceRecents.mjs +1 -3
- package/dist/esm/workspace/WorkspaceRecents.mjs.map +1 -1
- package/dist/esm/workspace/WorkspaceRecents.native.js +3 -3
- package/dist/esm/workspace/WorkspaceRecents.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceScreen.native.js.map +1 -1
- package/dist/esm/workspace/WorkspaceShortcut.mjs +1 -3
- package/dist/esm/workspace/WorkspaceShortcut.mjs.map +1 -1
- package/dist/esm/workspace/WorkspaceShortcut.native.js +4 -3
- package/dist/esm/workspace/WorkspaceShortcut.native.js.map +1 -1
- package/dist/esm/workspace/parseContent.native.js.map +1 -1
- package/dist/esm/workspace/types.native.js.map +1 -1
- package/dist/esm/workspace/useDashboardChart.native.js.map +1 -1
- package/dist/esm/workspace/useWorkspaceDoc.native.js.map +1 -1
- package/dist/jsx/desk/DeskSurface.mjs.map +1 -1
- package/dist/jsx/desk/DeskSurface.native.js.map +1 -1
- package/dist/jsx/form/createPrefill.mjs +1 -9
- package/dist/jsx/form/createPrefill.mjs.map +1 -1
- package/dist/jsx/form/createPrefill.native.js +3 -11
- package/dist/jsx/form/createPrefill.native.js.map +1 -1
- package/dist/jsx/form/dirtyTracking.mjs +1 -26
- package/dist/jsx/form/dirtyTracking.mjs.map +1 -1
- package/dist/jsx/form/dirtyTracking.native.js +4 -48
- package/dist/jsx/form/dirtyTracking.native.js.map +1 -1
- package/dist/jsx/form/fetchFrom.mjs +1 -38
- package/dist/jsx/form/fetchFrom.mjs.map +1 -1
- package/dist/jsx/form/fetchFrom.native.js +4 -81
- package/dist/jsx/form/fetchFrom.native.js.map +1 -1
- package/dist/jsx/form/fieldPermissions.mjs +1 -26
- package/dist/jsx/form/fieldPermissions.mjs.map +1 -1
- package/dist/jsx/form/fieldPermissions.native.js +4 -51
- package/dist/jsx/form/fieldPermissions.native.js.map +1 -1
- package/dist/jsx/form/formActions.mjs +1 -145
- package/dist/jsx/form/formActions.mjs.map +1 -1
- package/dist/jsx/form/formActions.native.js +2 -178
- package/dist/jsx/form/formActions.native.js.map +1 -1
- package/dist/jsx/form/formLayout.mjs +1 -215
- package/dist/jsx/form/formLayout.mjs.map +1 -1
- package/dist/jsx/form/formLayout.native.js +5 -359
- package/dist/jsx/form/formLayout.native.js.map +1 -1
- package/dist/jsx/form/useFormEngine.mjs +1 -360
- package/dist/jsx/form/useFormEngine.mjs.map +1 -1
- package/dist/jsx/form/useFormEngine.native.js +2 -447
- package/dist/jsx/form/useFormEngine.native.js.map +1 -1
- package/dist/jsx/index.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/workspace/WorkspaceQuickList.mjs +2 -2
- package/dist/jsx/workspace/WorkspaceQuickList.mjs.map +1 -1
- package/dist/jsx/workspace/WorkspaceQuickList.native.js +3 -1
- package/dist/jsx/workspace/WorkspaceQuickList.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceRecents.mjs +1 -3
- package/dist/jsx/workspace/WorkspaceRecents.mjs.map +1 -1
- package/dist/jsx/workspace/WorkspaceRecents.native.js +3 -3
- package/dist/jsx/workspace/WorkspaceRecents.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceShortcut.mjs +1 -3
- package/dist/jsx/workspace/WorkspaceShortcut.mjs.map +1 -1
- package/dist/jsx/workspace/WorkspaceShortcut.native.js +4 -3
- package/dist/jsx/workspace/WorkspaceShortcut.native.js.map +1 -1
- package/package.json +14 -14
- package/src/chrome/CommandPalette.spec.tsx +54 -0
- package/src/chrome/CommandPalette.stories.tsx +207 -0
- package/src/desk/Desk.spec.tsx +44 -0
- package/src/desk/Desk.stories.tsx +299 -0
- package/src/desk/DeskSurface.spec.tsx +160 -0
- package/src/desk/DeskSurface.stories.tsx +297 -0
- package/src/desk/DeskSurface.tsx +8 -4
- package/src/form/createPrefill.ts +5 -25
- package/src/form/dirtyTracking.ts +4 -61
- package/src/form/fetchFrom.ts +5 -108
- package/src/form/fieldPermissions.ts +7 -65
- package/src/form/formActions.ts +10 -281
- package/src/form/formEngineShim.spec.ts +122 -0
- package/src/form/formLayout.ts +15 -387
- package/src/form/useFormEngine.ts +5 -493
- package/src/shared/useDoctypeMeta.ts +12 -100
- package/src/shell/NotFoundScreen.spec.tsx +51 -0
- package/src/shell/NotFoundScreen.stories.tsx +79 -0
- package/src/views/DoctypeViewScreen.spec.tsx +110 -0
- package/src/views/DoctypeViewScreen.stories.tsx +279 -0
- package/src/workspace/WorkspaceQuickList.tsx +10 -2
- package/src/workspace/WorkspaceRecents.tsx +3 -1
- package/src/workspace/WorkspaceShortcut.tsx +4 -1
- package/types/desk/DeskSurface.d.ts.map +1 -1
- package/types/form/createPrefill.d.ts +5 -16
- package/types/form/createPrefill.d.ts.map +1 -1
- package/types/form/dirtyTracking.d.ts +4 -33
- package/types/form/dirtyTracking.d.ts.map +1 -1
- package/types/form/fetchFrom.d.ts +5 -40
- package/types/form/fetchFrom.d.ts.map +1 -1
- package/types/form/fieldPermissions.d.ts +7 -35
- package/types/form/fieldPermissions.d.ts.map +1 -1
- package/types/form/formActions.d.ts +6 -91
- package/types/form/formActions.d.ts.map +1 -1
- package/types/form/formLayout.d.ts +12 -89
- package/types/form/formLayout.d.ts.map +1 -1
- package/types/form/useFormEngine.d.ts +5 -58
- package/types/form/useFormEngine.d.ts.map +1 -1
- package/types/shared/useDoctypeMeta.d.ts +2 -100
- package/types/shared/useDoctypeMeta.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/src/form/dirtyTracking.spec.ts +0 -91
- package/src/form/fetchFrom.spec.ts +0 -92
- package/src/form/fieldPermissions.spec.ts +0 -61
- package/src/form/formLayout.spec.ts +0 -373
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// OWNER: backoffice screens workstream (MPO-189).
|
|
2
|
+
// NotFoundScreen stories: the unmatched-path surface. Nothing here touches
|
|
3
|
+
// the network — the screen reads only the provider's location (the failed
|
|
4
|
+
// path becomes the description line) plus its navigator and paths (the "Go
|
|
5
|
+
// to workspaces" action), so an empty InMemoryFixtureProvider and a
|
|
6
|
+
// MemoryNavigator seeded at the dead path are the whole harness.
|
|
7
|
+
import { YStack } from "@multiplatform.one/components";
|
|
8
|
+
import { InMemoryFixtureProvider } from "@multiplatform.one/frappe";
|
|
9
|
+
import type { ReactNode } from "react";
|
|
10
|
+
import { BackofficeProvider } from "../config/BackofficeProvider";
|
|
11
|
+
import { createMemoryNavigator } from "../navigation/navigator";
|
|
12
|
+
import { NotFoundScreen } from "./NotFoundScreen";
|
|
13
|
+
|
|
14
|
+
const meta = {
|
|
15
|
+
title: "Screens/Backoffice/NotFoundScreen",
|
|
16
|
+
component: NotFoundScreen,
|
|
17
|
+
tags: ["!test"],
|
|
18
|
+
parameters: {
|
|
19
|
+
status: { type: "stable" },
|
|
20
|
+
layout: "fullscreen",
|
|
21
|
+
docs: {
|
|
22
|
+
description: {
|
|
23
|
+
component:
|
|
24
|
+
"Any backoffice path that matches no route pattern lands here (deep or malformed links, and the DeskSurface `not-found` target). Same EmptyState presentation as the SlugScreen unknown-slug state: the failed path is the description, and one button replaces history with the default workspace so Back does not bounce off the dead address again.",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
|
|
31
|
+
const MOCK_HOST = "https://backoffice-not-found.mock.test";
|
|
32
|
+
|
|
33
|
+
const deepLink = createMemoryNavigator("/backoffice/sales-invoice/SI-0001/edit");
|
|
34
|
+
const bareSlug = createMemoryNavigator("/backoffice/no-such-thing");
|
|
35
|
+
const rootPath = createMemoryNavigator("/backoffice");
|
|
36
|
+
|
|
37
|
+
function Host({
|
|
38
|
+
navigation,
|
|
39
|
+
children,
|
|
40
|
+
}: {
|
|
41
|
+
navigation: ReturnType<typeof createMemoryNavigator>;
|
|
42
|
+
children: ReactNode;
|
|
43
|
+
}) {
|
|
44
|
+
return (
|
|
45
|
+
<BackofficeProvider
|
|
46
|
+
frappe={{ baseURL: MOCK_HOST, fixtures: new InMemoryFixtureProvider({}) }}
|
|
47
|
+
navigation={navigation}
|
|
48
|
+
>
|
|
49
|
+
<YStack flex={1} height={420} justifyContent="center">
|
|
50
|
+
{children}
|
|
51
|
+
</YStack>
|
|
52
|
+
</BackofficeProvider>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** A malformed deep link: the whole path is echoed back as the description. */
|
|
57
|
+
export const Main = () => (
|
|
58
|
+
<Host navigation={deepLink}>
|
|
59
|
+
<NotFoundScreen />
|
|
60
|
+
</Host>
|
|
61
|
+
);
|
|
62
|
+
Main.storyName = "Main";
|
|
63
|
+
|
|
64
|
+
/** An unknown slug — what the slug index reports when it resolves to nothing. */
|
|
65
|
+
export const UnknownSlug = () => (
|
|
66
|
+
<Host navigation={bareSlug}>
|
|
67
|
+
<NotFoundScreen />
|
|
68
|
+
</Host>
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Mounted at the base path itself: `location.path` is the base, so the
|
|
73
|
+
* description shows it rather than collapsing to an empty line.
|
|
74
|
+
*/
|
|
75
|
+
export const AtBasePath = () => (
|
|
76
|
+
<Host navigation={rootPath}>
|
|
77
|
+
<NotFoundScreen />
|
|
78
|
+
</Host>
|
|
79
|
+
);
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DoctypeViewScreen specs (MPO-189) — the alternate-view dispatcher, over
|
|
3
|
+
* the same fixture shape its stories use.
|
|
4
|
+
*
|
|
5
|
+
* What is pinned here is DISPATCH, not any individual view's chrome: the
|
|
6
|
+
* shared header rides above every view, view="list" bounces to the list
|
|
7
|
+
* route by REPLACE, and the search-param overrides are read here rather
|
|
8
|
+
* than in the leaf views.
|
|
9
|
+
*/
|
|
10
|
+
import React from "react";
|
|
11
|
+
import { InMemoryFixtureProvider } from "@multiplatform.one/frappe";
|
|
12
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
13
|
+
import { screen, waitFor } from "@testing-library/react";
|
|
14
|
+
import { describe, expect, it } from "vitest";
|
|
15
|
+
import { BackofficeProvider } from "../config/BackofficeProvider";
|
|
16
|
+
import { createMemoryNavigator, type MemoryNavigator } from "../navigation/navigator";
|
|
17
|
+
import type { BackofficeView } from "../navigation/paths";
|
|
18
|
+
import { DoctypeViewScreen } from "./DoctypeViewScreen";
|
|
19
|
+
|
|
20
|
+
const MOCK_HOST = "https://backoffice-doctype-view-spec.mock.test";
|
|
21
|
+
const TASK_DOCTYPE = "QaViewTask";
|
|
22
|
+
|
|
23
|
+
const taskMeta = {
|
|
24
|
+
name: TASK_DOCTYPE,
|
|
25
|
+
doctype: "DocType",
|
|
26
|
+
module: "QA",
|
|
27
|
+
title_field: "subject",
|
|
28
|
+
fields: [
|
|
29
|
+
{ fieldname: "subject", fieldtype: "Data", label: "Subject", in_list_view: 1 },
|
|
30
|
+
{
|
|
31
|
+
fieldname: "status",
|
|
32
|
+
fieldtype: "Select",
|
|
33
|
+
label: "Status",
|
|
34
|
+
options: "Open\nWorking\nDone",
|
|
35
|
+
in_list_view: 1,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
permissions: [{ role: "All", read: 1 }],
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const makeFixtures = () =>
|
|
42
|
+
new InMemoryFixtureProvider({
|
|
43
|
+
DocType: [taskMeta],
|
|
44
|
+
"Notification Log": [],
|
|
45
|
+
[TASK_DOCTYPE]: [{ name: "QVT-0001", doctype: TASK_DOCTYPE, subject: "First", status: "Open" }],
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
function renderView(view: BackofficeView, path = "/backoffice") {
|
|
49
|
+
const navigation: MemoryNavigator = createMemoryNavigator(path);
|
|
50
|
+
renderWithProviders(
|
|
51
|
+
<BackofficeProvider
|
|
52
|
+
frappe={{ baseURL: MOCK_HOST, fixtures: makeFixtures() }}
|
|
53
|
+
navigation={navigation}
|
|
54
|
+
>
|
|
55
|
+
<DoctypeViewScreen doctype={TASK_DOCTYPE} view={view} />
|
|
56
|
+
</BackofficeProvider>,
|
|
57
|
+
);
|
|
58
|
+
return navigation;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
describe("<DoctypeViewScreen />", () => {
|
|
62
|
+
it("renders the shared header above every dispatched view", async () => {
|
|
63
|
+
for (const view of ["report", "kanban", "dashboard"] as const) {
|
|
64
|
+
const { unmount } = renderWithProviders(
|
|
65
|
+
<BackofficeProvider
|
|
66
|
+
frappe={{ baseURL: MOCK_HOST, fixtures: makeFixtures() }}
|
|
67
|
+
navigation={createMemoryNavigator("/backoffice")}
|
|
68
|
+
>
|
|
69
|
+
<DoctypeViewScreen doctype={TASK_DOCTYPE} view={view} />
|
|
70
|
+
</BackofficeProvider>,
|
|
71
|
+
);
|
|
72
|
+
// The doctype name is the page title on every view — that is the
|
|
73
|
+
// header, and it is what makes the switcher reachable from each one.
|
|
74
|
+
await waitFor(() => {
|
|
75
|
+
expect(screen.getAllByText(TASK_DOCTYPE).length).toBeGreaterThan(0);
|
|
76
|
+
});
|
|
77
|
+
unmount();
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it('view="list" REPLACES the location with the list route, keeping Back working', async () => {
|
|
82
|
+
const navigation = renderView("list");
|
|
83
|
+
await waitFor(() => {
|
|
84
|
+
expect(navigation.getLocation().path).toBe("/backoffice/qaviewtask");
|
|
85
|
+
});
|
|
86
|
+
// replace, not push: the /view/list address never enters history.
|
|
87
|
+
navigation.back();
|
|
88
|
+
expect(navigation.getLocation().path).toBe("/backoffice/qaviewtask");
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it("reads ?board= from the location so the leaf view stays param-free", async () => {
|
|
92
|
+
const navigation = renderView(
|
|
93
|
+
"kanban",
|
|
94
|
+
"/backoffice/qaviewtask/view/kanban?board=QA%20View%20Board",
|
|
95
|
+
);
|
|
96
|
+
expect(navigation.getLocation().params.board).toBe("QA View Board");
|
|
97
|
+
await waitFor(() => {
|
|
98
|
+
expect(screen.getAllByText(TASK_DOCTYPE).length).toBeGreaterThan(0);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it("renders a view the doctype's meta does not support rather than blanking", async () => {
|
|
103
|
+
// Tree on a flat doctype: the body owns the unsupported state, and the
|
|
104
|
+
// screen still paints its header instead of rendering nothing.
|
|
105
|
+
renderView("tree");
|
|
106
|
+
await waitFor(() => {
|
|
107
|
+
expect(screen.getAllByText(TASK_DOCTYPE).length).toBeGreaterThan(0);
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
});
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
// OWNER: backoffice screens workstream (MPO-189).
|
|
2
|
+
// DoctypeViewScreen stories: the alternate-view dispatcher. One arm per
|
|
3
|
+
// view, each showing the SHARED ViewHeader (doctype title, the switcher
|
|
4
|
+
// across the views that doctype's meta supports, New button) above the view
|
|
5
|
+
// body — the composition the individual view stories cannot show, because
|
|
6
|
+
// they mount their view without the header.
|
|
7
|
+
//
|
|
8
|
+
// Everything rides fixtures: getdoctype-shaped meta docs live in the fixture
|
|
9
|
+
// provider's "DocType" collection (shared/useDoctypeMeta's fixture branch),
|
|
10
|
+
// rows and Kanban Board docs in the same InMemoryFixtureProvider. Search-param
|
|
11
|
+
// overrides (?board=, ?field=, ?f=) are read from the navigator's location,
|
|
12
|
+
// so an arm sets them by seeding the MemoryNavigator path.
|
|
13
|
+
import { YStack } from "@multiplatform.one/components";
|
|
14
|
+
import { InMemoryFixtureProvider } from "@multiplatform.one/frappe";
|
|
15
|
+
import { BackofficeProvider } from "../config/BackofficeProvider";
|
|
16
|
+
import { createMemoryNavigator } from "../navigation/navigator";
|
|
17
|
+
import type { BackofficeView } from "../navigation/paths";
|
|
18
|
+
import { DoctypeViewScreen } from "./DoctypeViewScreen";
|
|
19
|
+
|
|
20
|
+
const meta = {
|
|
21
|
+
title: "Screens/Backoffice/DoctypeViewScreen",
|
|
22
|
+
component: DoctypeViewScreen,
|
|
23
|
+
tags: ["!test"],
|
|
24
|
+
parameters: {
|
|
25
|
+
status: { type: "stable" },
|
|
26
|
+
layout: "fullscreen",
|
|
27
|
+
docs: {
|
|
28
|
+
description: {
|
|
29
|
+
component:
|
|
30
|
+
"Dispatches a doctype's alternate views — report, kanban, calendar, tree, image, dashboard — under one shared ViewHeader, and bounces a deep link to /view/list back to the list route. The switcher only offers views the doctype's meta actually supports (viewAvailability.ts), so a flat doctype never grows a Tree tab. Search-param overrides (?board=, ?field=, ?f=) are read here, never in the leaf views, so each view still mounts standalone.",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
export default meta;
|
|
36
|
+
|
|
37
|
+
const MOCK_HOST = "https://backoffice-doctype-view.mock.test";
|
|
38
|
+
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
// Fixture metas — one doctype per supported view, mirroring the shapes the
|
|
41
|
+
// individual view stories use.
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
|
|
44
|
+
const TASK_DOCTYPE = "QaViewTask";
|
|
45
|
+
const EVENT_DOCTYPE = "QaViewEvent";
|
|
46
|
+
const NODE_DOCTYPE = "QaViewNode";
|
|
47
|
+
const PHOTO_DOCTYPE = "QaViewPhoto";
|
|
48
|
+
|
|
49
|
+
/** Select fields → kanban is supported; report and dashboard always are. */
|
|
50
|
+
const taskMeta = {
|
|
51
|
+
name: TASK_DOCTYPE,
|
|
52
|
+
doctype: "DocType",
|
|
53
|
+
module: "QA",
|
|
54
|
+
title_field: "subject",
|
|
55
|
+
fields: [
|
|
56
|
+
{ fieldname: "subject", fieldtype: "Data", label: "Subject", in_list_view: 1 },
|
|
57
|
+
{
|
|
58
|
+
fieldname: "status",
|
|
59
|
+
fieldtype: "Select",
|
|
60
|
+
label: "Status",
|
|
61
|
+
options: "Open\nWorking\nDone",
|
|
62
|
+
in_list_view: 1,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
fieldname: "priority",
|
|
66
|
+
fieldtype: "Select",
|
|
67
|
+
label: "Priority",
|
|
68
|
+
options: "High\nMedium\nLow",
|
|
69
|
+
in_list_view: 1,
|
|
70
|
+
},
|
|
71
|
+
{ fieldname: "owner_name", fieldtype: "Data", label: "Owner", in_list_view: 1 },
|
|
72
|
+
],
|
|
73
|
+
permissions: [{ role: "All", read: 1 }],
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/** Date axes → the calendar picks one; the toolbar selector switches them. */
|
|
77
|
+
const eventMeta = {
|
|
78
|
+
name: EVENT_DOCTYPE,
|
|
79
|
+
doctype: "DocType",
|
|
80
|
+
module: "QA",
|
|
81
|
+
title_field: "title",
|
|
82
|
+
fields: [
|
|
83
|
+
{ fieldname: "title", fieldtype: "Data", label: "Title", in_list_view: 1 },
|
|
84
|
+
{ fieldname: "starts_on", fieldtype: "Datetime", label: "Starts On" },
|
|
85
|
+
{ fieldname: "ends_on", fieldtype: "Datetime", label: "Ends On" },
|
|
86
|
+
],
|
|
87
|
+
permissions: [{ role: "All", read: 1 }],
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/** is_tree + the nested-set parent link → the Tree tab appears. */
|
|
91
|
+
const nodeMeta = {
|
|
92
|
+
name: NODE_DOCTYPE,
|
|
93
|
+
doctype: "DocType",
|
|
94
|
+
module: "QA",
|
|
95
|
+
is_tree: 1,
|
|
96
|
+
title_field: "title",
|
|
97
|
+
fields: [
|
|
98
|
+
{ fieldname: "title", fieldtype: "Data", label: "Title", in_list_view: 1 },
|
|
99
|
+
{
|
|
100
|
+
fieldname: "parent_qa_view_node",
|
|
101
|
+
fieldtype: "Link",
|
|
102
|
+
label: "Parent Node",
|
|
103
|
+
options: NODE_DOCTYPE,
|
|
104
|
+
hidden: 1,
|
|
105
|
+
},
|
|
106
|
+
{ fieldname: "is_group", fieldtype: "Check", label: "Is Group" },
|
|
107
|
+
],
|
|
108
|
+
permissions: [{ role: "All", read: 1 }],
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/** image_field → the Image tab appears (a stray Attach Image alone does not). */
|
|
112
|
+
const photoMeta = {
|
|
113
|
+
name: PHOTO_DOCTYPE,
|
|
114
|
+
doctype: "DocType",
|
|
115
|
+
module: "QA",
|
|
116
|
+
title_field: "caption",
|
|
117
|
+
image_field: "shot",
|
|
118
|
+
fields: [
|
|
119
|
+
{ fieldname: "caption", fieldtype: "Data", label: "Caption", in_list_view: 1 },
|
|
120
|
+
{ fieldname: "taken_on", fieldtype: "Date", label: "Taken On", in_list_view: 1 },
|
|
121
|
+
{ fieldname: "shot", fieldtype: "Attach Image", label: "Shot" },
|
|
122
|
+
],
|
|
123
|
+
permissions: [{ role: "All", read: 1 }],
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const statuses = ["Open", "Working", "Done"];
|
|
127
|
+
const priorities = ["High", "Medium", "Low"];
|
|
128
|
+
const owners = ["ana", "bo", "cyrus", "dee"];
|
|
129
|
+
|
|
130
|
+
const taskDocs = Array.from({ length: 9 }, (_, i) => ({
|
|
131
|
+
name: `QVT-${String(i + 1).padStart(4, "0")}`,
|
|
132
|
+
doctype: TASK_DOCTYPE,
|
|
133
|
+
subject: `Task ${i + 1}: ${["triage inbox", "ship release", "write docs", "fix flaky test"][i % 4]}`,
|
|
134
|
+
status: statuses[i % statuses.length],
|
|
135
|
+
priority: priorities[i % priorities.length],
|
|
136
|
+
owner_name: owners[i % owners.length],
|
|
137
|
+
}));
|
|
138
|
+
|
|
139
|
+
const eventDocs = Array.from({ length: 6 }, (_, i) => ({
|
|
140
|
+
name: `QVE-${String(i + 1).padStart(4, "0")}`,
|
|
141
|
+
doctype: EVENT_DOCTYPE,
|
|
142
|
+
title: `Event ${i + 1}`,
|
|
143
|
+
starts_on: `2026-09-${String((i % 27) + 1).padStart(2, "0")} 10:00:00`,
|
|
144
|
+
ends_on: `2026-09-${String((i % 27) + 1).padStart(2, "0")} 11:00:00`,
|
|
145
|
+
}));
|
|
146
|
+
|
|
147
|
+
const nodeDocs = [
|
|
148
|
+
{ name: "Root A", doctype: NODE_DOCTYPE, title: "Root A", parent_qa_view_node: "", is_group: 1 },
|
|
149
|
+
{ name: "Root B", doctype: NODE_DOCTYPE, title: "Root B", parent_qa_view_node: "", is_group: 1 },
|
|
150
|
+
{
|
|
151
|
+
name: "A-1",
|
|
152
|
+
doctype: NODE_DOCTYPE,
|
|
153
|
+
title: "A-1",
|
|
154
|
+
parent_qa_view_node: "Root A",
|
|
155
|
+
is_group: 0,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: "A-2",
|
|
159
|
+
doctype: NODE_DOCTYPE,
|
|
160
|
+
title: "A-2",
|
|
161
|
+
parent_qa_view_node: "Root A",
|
|
162
|
+
is_group: 0,
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: "B-1",
|
|
166
|
+
doctype: NODE_DOCTYPE,
|
|
167
|
+
title: "B-1",
|
|
168
|
+
parent_qa_view_node: "Root B",
|
|
169
|
+
is_group: 0,
|
|
170
|
+
},
|
|
171
|
+
];
|
|
172
|
+
|
|
173
|
+
const photoDocs = Array.from({ length: 8 }, (_, i) => ({
|
|
174
|
+
name: `QVP-${String(i + 1).padStart(4, "0")}`,
|
|
175
|
+
doctype: PHOTO_DOCTYPE,
|
|
176
|
+
caption: `Frame ${i + 1}`,
|
|
177
|
+
taken_on: `2026-0${(i % 9) + 1}-14`,
|
|
178
|
+
shot: "",
|
|
179
|
+
}));
|
|
180
|
+
|
|
181
|
+
const taskBoard = {
|
|
182
|
+
name: "QA View Board",
|
|
183
|
+
doctype: "Kanban Board",
|
|
184
|
+
kanban_board_name: "QA View Board",
|
|
185
|
+
reference_doctype: TASK_DOCTYPE,
|
|
186
|
+
field_name: "status",
|
|
187
|
+
columns: [
|
|
188
|
+
{ column_name: "Open", status: "Active", indicator: "Blue" },
|
|
189
|
+
{ column_name: "Working", status: "Active", indicator: "Orange" },
|
|
190
|
+
{ column_name: "Done", status: "Active", indicator: "Green" },
|
|
191
|
+
],
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const makeFixtures = () =>
|
|
195
|
+
new InMemoryFixtureProvider({
|
|
196
|
+
DocType: [taskMeta, eventMeta, nodeMeta, photoMeta],
|
|
197
|
+
"Kanban Board": [taskBoard],
|
|
198
|
+
"Notification Log": [],
|
|
199
|
+
[TASK_DOCTYPE]: taskDocs,
|
|
200
|
+
[EVENT_DOCTYPE]: eventDocs,
|
|
201
|
+
[NODE_DOCTYPE]: nodeDocs,
|
|
202
|
+
[PHOTO_DOCTYPE]: photoDocs,
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
// ---------------------------------------------------------------------------
|
|
206
|
+
// Harness
|
|
207
|
+
// ---------------------------------------------------------------------------
|
|
208
|
+
|
|
209
|
+
function View({ doctype, view, path }: { doctype: string; view: BackofficeView; path?: string }) {
|
|
210
|
+
return (
|
|
211
|
+
<BackofficeProvider
|
|
212
|
+
frappe={{ baseURL: MOCK_HOST, fixtures: makeFixtures() }}
|
|
213
|
+
navigation={createMemoryNavigator(path ?? "/backoffice")}
|
|
214
|
+
>
|
|
215
|
+
<YStack flex={1} height={600} minHeight={0}>
|
|
216
|
+
<DoctypeViewScreen doctype={doctype} view={view} />
|
|
217
|
+
</YStack>
|
|
218
|
+
</BackofficeProvider>
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// ---------------------------------------------------------------------------
|
|
223
|
+
// One arm per view
|
|
224
|
+
// ---------------------------------------------------------------------------
|
|
225
|
+
|
|
226
|
+
/** view="report" — the desk-parity report surface under the shared header. */
|
|
227
|
+
export const Report = () => <View doctype={TASK_DOCTYPE} view="report" />;
|
|
228
|
+
Report.storyName = "Main";
|
|
229
|
+
|
|
230
|
+
/** view="kanban" — the Kanban Board doc drives the columns. */
|
|
231
|
+
export const Kanban = () => <View doctype={TASK_DOCTYPE} view="kanban" />;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* `?board=` picks a saved board. The dispatcher reads it from the location
|
|
235
|
+
* and hands it down, so KanbanView itself stays param-free.
|
|
236
|
+
*/
|
|
237
|
+
export const KanbanBoardParam = () => (
|
|
238
|
+
<View
|
|
239
|
+
doctype={TASK_DOCTYPE}
|
|
240
|
+
view="kanban"
|
|
241
|
+
path={`/backoffice/qaviewtask/view/kanban?board=${encodeURIComponent(taskBoard.name)}`}
|
|
242
|
+
/>
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
/** view="calendar" — date axes detected from meta; `?field=` overrides. */
|
|
246
|
+
export const Calendar = () => <View doctype={EVENT_DOCTYPE} view="calendar" />;
|
|
247
|
+
|
|
248
|
+
/** `?field=` pins the calendar's date axis to ends_on instead of starts_on. */
|
|
249
|
+
export const CalendarFieldParam = () => (
|
|
250
|
+
<View
|
|
251
|
+
doctype={EVENT_DOCTYPE}
|
|
252
|
+
view="calendar"
|
|
253
|
+
path="/backoffice/qaviewevent/view/calendar?field=ends_on"
|
|
254
|
+
/>
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
/** view="tree" — only meta.is_tree doctypes render a forest. */
|
|
258
|
+
export const Tree = () => <View doctype={NODE_DOCTYPE} view="tree" />;
|
|
259
|
+
|
|
260
|
+
/** view="image" — the card grid over meta.image_field. */
|
|
261
|
+
export const Image = () => <View doctype={PHOTO_DOCTYPE} view="image" />;
|
|
262
|
+
|
|
263
|
+
/** view="dashboard" — unconditional, offered for every doctype. */
|
|
264
|
+
export const Dashboard = () => <View doctype={TASK_DOCTYPE} view="dashboard" />;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* A doctype whose meta does NOT support the requested view still renders:
|
|
268
|
+
* the header keeps the current view in the switcher (so the user can see
|
|
269
|
+
* where they are) and the body shows its own unsupported state with a way
|
|
270
|
+
* back to the list. Here: tree on a flat doctype.
|
|
271
|
+
*/
|
|
272
|
+
export const UnsupportedForDoctype = () => <View doctype={TASK_DOCTYPE} view="tree" />;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* view="list" is owned by the list route: the dispatcher REPLACES the
|
|
276
|
+
* location with the list path (Back keeps working) and paints the loading
|
|
277
|
+
* state while it happens.
|
|
278
|
+
*/
|
|
279
|
+
export const ListRedirect = () => <View doctype={TASK_DOCTYPE} view="list" />;
|
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Card, Separator, Text, XStack, YStack } from "@multiplatform.one/components";
|
|
9
9
|
import { FrappeList } from "@multiplatform.one/frappe-ui";
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
ensureFocusVisibleRing,
|
|
12
|
+
FOCUS_RING_HALO_OFFSET,
|
|
13
|
+
useResolvedKnobs,
|
|
14
|
+
} from "@multiplatform.one/theme";
|
|
11
15
|
import { useMemo } from "react";
|
|
12
16
|
import { useTranslation } from "react-i18next";
|
|
13
17
|
import { useBackofficeNavigator, useBackofficePaths } from "../config/BackofficeProvider";
|
|
@@ -62,7 +66,11 @@ export function WorkspaceQuickList({ row }: WorkspaceQuickListProps) {
|
|
|
62
66
|
tabIndex={0}
|
|
63
67
|
outlineWidth={0}
|
|
64
68
|
focusStyle={{ outlineWidth: 0 }}
|
|
65
|
-
|
|
69
|
+
// LC-71 §4 halo: inline text link ("View All" sits on the header
|
|
70
|
+
// row beside the section title, not on its own ground).
|
|
71
|
+
focusVisibleStyle={ensureFocusVisibleRing({
|
|
72
|
+
outlineOffset: FOCUS_RING_HALO_OFFSET,
|
|
73
|
+
})}
|
|
66
74
|
hoverStyle={{ color: "$color12" }}
|
|
67
75
|
onPress={() => navigator.navigate(paths.list(row.document_type))}
|
|
68
76
|
>
|
|
@@ -86,7 +86,9 @@ export function WorkspaceRecents() {
|
|
|
86
86
|
tabIndex={0}
|
|
87
87
|
outlineWidth={0}
|
|
88
88
|
focusStyle={{ outlineWidth: 0 }}
|
|
89
|
-
|
|
89
|
+
// Default ring (offset 0): a recents card is a standalone
|
|
90
|
+
// rectangle on the page ground, so no LC-71 §4 carve-out (MPO-92).
|
|
91
|
+
focusVisibleStyle={ensureFocusVisibleRing()}
|
|
90
92
|
>
|
|
91
93
|
<XStack paddingHorizontal="$3" minHeight={44} alignItems="center" {...knobProps.gap}>
|
|
92
94
|
<ClockCounterClockwiseIcon size={iconSize} color={iconColor} aria-hidden />
|
|
@@ -210,7 +210,10 @@ export function WorkspaceShortcut({ row, onPress }: WorkspaceShortcutProps) {
|
|
|
210
210
|
tabIndex={target.disabled && !onPress ? undefined : 0}
|
|
211
211
|
outlineWidth={0}
|
|
212
212
|
focusStyle={{ outlineWidth: 0 }}
|
|
213
|
-
|
|
213
|
+
// Default ring (offset 0): a shortcut tile is a standalone rectangle on
|
|
214
|
+
// the page ground, not a thumb or an inline link, so it takes no LC-71 §4
|
|
215
|
+
// carve-out (MPO-92).
|
|
216
|
+
focusVisibleStyle={ensureFocusVisibleRing()}
|
|
214
217
|
>
|
|
215
218
|
{/* Compact chip anatomy: icon + label + count, ≥44px press target
|
|
216
219
|
(DG-LAY-04), self-sized so the band wraps instead of stretching. */}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeskSurface.d.ts","sourceRoot":"","sources":["../../src/desk/DeskSurface.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAW,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAIpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAEjD,kFAAkF;AAClF,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,4DAA4D;AAC5D,MAAM,MAAM,mBAAmB,GAC3B,aAAa,CAAC,gBAAgB,CAAC,GAC/B,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAEpD,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC;AAoCzF,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,gEAAgE;IAChE,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,6DAA6D;IAC7D,KAAK,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;CACnC;AAED,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,SAAS,EACT,QAAQ,EACR,cAAc,EACd,KAAK,GACN,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"DeskSurface.d.ts","sourceRoot":"","sources":["../../src/desk/DeskSurface.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAW,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAIpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAEjD,kFAAkF;AAClF,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,4DAA4D;AAC5D,MAAM,MAAM,mBAAmB,GAC3B,aAAa,CAAC,gBAAgB,CAAC,GAC/B,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAEpD,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC;AAoCzF,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,gEAAgE;IAChE,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,6DAA6D;IAC7D,KAAK,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;CACnC;AAED,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,SAAS,EACT,QAAQ,EACR,cAAc,EACd,KAAK,GACN,EAAE,oBAAoB,2CAwCtB;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,4CAMjC"}
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
* copied values here (in-memory only — a refresh honestly falls back to
|
|
7
|
-
* a blank form; no URL-size limits for large docs).
|
|
8
|
-
* - NewDocRouteScreen stashes parsed `?d=` URL defaults (kanban column "+",
|
|
9
|
-
* calendar day click, connections "+") before rendering the form — those
|
|
10
|
-
* survive refresh because the URL re-stashes them.
|
|
11
|
-
*
|
|
12
|
-
* The create-mode form (useFormEngine seeding) consumes and clears the
|
|
13
|
-
* stash on mount, merging it over meta defaults. Last stash per doctype
|
|
14
|
-
* wins, so a `?d=` navigation cannot double-apply with a stale
|
|
15
|
-
* Duplicate/Amend hand-off.
|
|
2
|
+
* Create-mode prefill handoff — moved to
|
|
3
|
+
* `@multiplatform.one/frappe-ui/src/formEngine/createPrefill` (MPO-15).
|
|
4
|
+
* Re-exported here so existing imports keep resolving (the GNOME shim
|
|
5
|
+
* deep-imports this path).
|
|
16
6
|
*/
|
|
17
|
-
export
|
|
18
|
-
export declare function takeCreatePrefill(doctype: string): Record<string, unknown> | undefined;
|
|
7
|
+
export { setCreatePrefill, takeCreatePrefill } from "@multiplatform.one/frappe-ui";
|
|
19
8
|
//# sourceMappingURL=createPrefill.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPrefill.d.ts","sourceRoot":"","sources":["../../src/form/createPrefill.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"createPrefill.d.ts","sourceRoot":"","sources":["../../src/form/createPrefill.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,36 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Dirty
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* A strict `!==` diff falsely armed Save on untouched documents whenever a
|
|
6
|
-
* field's *representation* of a value differed from the wire format (mount
|
|
7
|
-
* emitters have been fixed at the field level — forms contract: initialization
|
|
8
|
-
* must not emit change events — but the engine stays defensive).
|
|
2
|
+
* Dirty-field diffing — moved to
|
|
3
|
+
* `@multiplatform.one/frappe-ui/src/formEngine/dirtyTracking` (MPO-15).
|
|
4
|
+
* Re-exported here so existing imports keep resolving.
|
|
9
5
|
*/
|
|
10
|
-
export
|
|
11
|
-
/**
|
|
12
|
-
* Init-aware value equality. Two representation classes are folded:
|
|
13
|
-
*
|
|
14
|
-
* - empty: null / undefined / "" / [] are one empty state (a field
|
|
15
|
-
* normalizing null → "" is not an edit)
|
|
16
|
-
* - boolean: Check wires 0/1 but a control may emit true/false
|
|
17
|
-
*
|
|
18
|
-
* Everything else stays strict equality — deliberately shallow and honest
|
|
19
|
-
* (no deep equality): desk parity means an edit reverted to a value that is
|
|
20
|
-
* merely *equivalent* (not identical) may still read dirty, while reverting
|
|
21
|
-
* to the exact original value reads clean.
|
|
22
|
-
*/
|
|
23
|
-
export declare function isSameValue(a: unknown, b: unknown): boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Names of fields whose local value differs from the baseline.
|
|
26
|
-
*
|
|
27
|
-
* - Edit mode (baseline defined): normalization-insensitive diff via
|
|
28
|
-
* `isSameValue` — an untouched doc reads pristine even if a field
|
|
29
|
-
* re-represented its value during initialization.
|
|
30
|
-
* - Create mode (no baseline): any non-empty value counts, defaults included —
|
|
31
|
-
* desk parity, a new doc shows "Not Saved".
|
|
32
|
-
*
|
|
33
|
-
* `doctype` / `name` are bookkeeping, never dirty.
|
|
34
|
-
*/
|
|
35
|
-
export declare function computeDirtyFields(localDoc: Record<string, unknown>, baseline: Record<string, unknown> | undefined): string[];
|
|
6
|
+
export { computeDirtyFields, isEmptyValue, isSameValue } from "@multiplatform.one/frappe-ui";
|
|
36
7
|
//# sourceMappingURL=dirtyTracking.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dirtyTracking.d.ts","sourceRoot":"","sources":["../../src/form/dirtyTracking.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dirtyTracking.d.ts","sourceRoot":"","sources":["../../src/form/dirtyTracking.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,43 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* fetch_from
|
|
3
|
-
* frappe/
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* - A field participates when `fetch_from` is "<link_field>.<source_field>"
|
|
7
|
-
* AND (its fieldtype is in the scalar set desk registers, or it is
|
|
8
|
-
* read_only / is_virtual).
|
|
9
|
-
* - When the link field changes to a value, desk calls
|
|
10
|
-
* `frappe.client.validate_link` with the source columns and writes the
|
|
11
|
-
* returned values onto the targets; clearing the link clears the targets.
|
|
12
|
-
* - `fetch_if_empty` targets keep a non-empty existing value (server
|
|
13
|
-
* semantics; desk leaves such fields editable — see
|
|
14
|
-
* `read_only_because_of_fetch_from`, base_input.js:56-66).
|
|
15
|
-
*
|
|
16
|
-
* The server remains authoritative: this is a preview so the user sees the
|
|
17
|
-
* fetched values before save.
|
|
2
|
+
* `fetch_from` map + lock helpers — moved to
|
|
3
|
+
* `@multiplatform.one/frappe-ui/src/formEngine/fetchFrom` (MPO-15).
|
|
4
|
+
* Re-exported here so existing imports keep resolving.
|
|
18
5
|
*/
|
|
19
|
-
|
|
20
|
-
export
|
|
21
|
-
/** Field to populate. */
|
|
22
|
-
target: string;
|
|
23
|
-
/** Column on the linked doc to read. */
|
|
24
|
-
source: string;
|
|
25
|
-
/** Only fill when the target is currently empty; never lock the field. */
|
|
26
|
-
fetchIfEmpty: boolean;
|
|
27
|
-
}
|
|
28
|
-
/** Map of link fieldname → fetch rules hanging off that link. */
|
|
29
|
-
export type FetchMap = Map<string, FetchRule[]>;
|
|
30
|
-
export declare function buildFetchMap(fields: DocFieldMeta[]): FetchMap;
|
|
31
|
-
/**
|
|
32
|
-
* Values to patch onto the doc after the linked doc's columns arrive.
|
|
33
|
-
* `fetched` is empty when the link was cleared — desk then blanks the
|
|
34
|
-
* targets; `fetch_if_empty` targets holding a value are left alone in both
|
|
35
|
-
* directions (they belong to the user until the server reconciles).
|
|
36
|
-
*/
|
|
37
|
-
export declare function applyFetchedValues(rules: FetchRule[], fetched: Record<string, unknown>, currentDoc: Record<string, unknown>): Record<string, unknown>;
|
|
38
|
-
/**
|
|
39
|
-
* Desk's `read_only_because_of_fetch_from`: a fetch target without
|
|
40
|
-
* `fetch_if_empty` renders read-only while its source link holds a value.
|
|
41
|
-
*/
|
|
42
|
-
export declare function isFetchLocked(field: DocFieldMeta, doc: Record<string, unknown>): boolean;
|
|
6
|
+
export { applyFetchedValues, buildFetchMap, isFetchLocked } from "@multiplatform.one/frappe-ui";
|
|
7
|
+
export type { FetchMap, FetchRule } from "@multiplatform.one/frappe-ui";
|
|
43
8
|
//# sourceMappingURL=fetchFrom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchFrom.d.ts","sourceRoot":"","sources":["../../src/form/fetchFrom.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fetchFrom.d.ts","sourceRoot":"","sources":["../../src/form/fetchFrom.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAChG,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC"}
|