@multiplatform.one/backoffice 7.22.0 → 7.23.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/list/DoctypeListScreen.cjs +4 -42
- package/dist/cjs/list/DoctypeListScreen.native.js +5 -43
- package/dist/cjs/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/cjs/list/filter-chips.cjs +3 -3
- package/dist/cjs/list/filter-chips.native.js +3 -3
- package/dist/cjs/list/filter-chips.native.js.map +1 -1
- package/dist/cjs/list/filter-editor.cjs +10 -11
- package/dist/cjs/list/filter-editor.native.js +10 -11
- package/dist/cjs/list/filter-editor.native.js.map +1 -1
- package/dist/cjs/list/filter-fields.cjs +15 -267
- package/dist/cjs/list/filter-fields.native.js +15 -337
- package/dist/cjs/list/filter-fields.native.js.map +1 -1
- package/dist/cjs/list/filter-standard.cjs +5 -6
- package/dist/cjs/list/filter-standard.native.js +5 -6
- package/dist/cjs/list/filter-standard.native.js.map +1 -1
- package/dist/cjs/list/list-tools-sheet.cjs +2 -2
- package/dist/cjs/list/list-tools-sheet.native.js +2 -2
- package/dist/cjs/list/list-tools-sheet.native.js.map +1 -1
- package/dist/cjs/list/listColumns.cjs +2 -371
- package/dist/cjs/list/listColumns.native.js +2 -418
- package/dist/cjs/list/listColumns.native.js.map +1 -1
- package/dist/cjs/list/listFields.cjs +4 -24
- package/dist/cjs/list/listFields.native.js +4 -50
- package/dist/cjs/list/listFields.native.js.map +1 -1
- package/dist/cjs/list/listFormat.cjs +7 -42
- package/dist/cjs/list/listFormat.native.js +7 -45
- package/dist/cjs/list/listFormat.native.js.map +1 -1
- package/dist/cjs/list/statusColors.cjs +2 -76
- package/dist/cjs/list/statusColors.native.js +2 -80
- package/dist/cjs/list/statusColors.native.js.map +1 -1
- package/dist/cjs/report/queryReportColumns.cjs +2 -2
- package/dist/cjs/report/queryReportColumns.native.js +2 -2
- package/dist/cjs/report/queryReportColumns.native.js.map +1 -1
- package/dist/cjs/report/queryReportFilterBar.cjs +5 -6
- package/dist/cjs/report/queryReportFilterBar.native.js +5 -6
- package/dist/cjs/report/queryReportFilterBar.native.js.map +1 -1
- package/dist/cjs/report/report-grid.cjs +2 -2
- package/dist/cjs/report/report-grid.native.js +2 -2
- package/dist/cjs/report/report-grid.native.js.map +1 -1
- package/dist/cjs/report/report-toolbar.cjs +2 -2
- package/dist/cjs/report/report-toolbar.native.js +2 -2
- package/dist/cjs/report/report-toolbar.native.js.map +1 -1
- package/dist/cjs/report/reportViewModel.cjs +3 -3
- package/dist/cjs/report/reportViewModel.native.js +3 -3
- package/dist/cjs/report/reportViewModel.native.js.map +1 -1
- package/dist/esm/list/DoctypeListScreen.mjs +3 -41
- package/dist/esm/list/DoctypeListScreen.mjs.map +1 -1
- package/dist/esm/list/DoctypeListScreen.native.js +4 -42
- package/dist/esm/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/esm/list/filter-chips.mjs +1 -1
- package/dist/esm/list/filter-chips.native.js +1 -1
- package/dist/esm/list/filter-chips.native.js.map +1 -1
- package/dist/esm/list/filter-editor.mjs +1 -2
- package/dist/esm/list/filter-editor.mjs.map +1 -1
- package/dist/esm/list/filter-editor.native.js +1 -2
- package/dist/esm/list/filter-editor.native.js.map +1 -1
- package/dist/esm/list/filter-fields.mjs +1 -253
- package/dist/esm/list/filter-fields.mjs.map +1 -1
- package/dist/esm/list/filter-fields.native.js +1 -323
- package/dist/esm/list/filter-fields.native.js.map +1 -1
- package/dist/esm/list/filter-standard.mjs +1 -2
- package/dist/esm/list/filter-standard.mjs.map +1 -1
- package/dist/esm/list/filter-standard.native.js +1 -2
- package/dist/esm/list/filter-standard.native.js.map +1 -1
- package/dist/esm/list/list-tools-sheet.mjs +1 -1
- package/dist/esm/list/list-tools-sheet.native.js +1 -1
- package/dist/esm/list/list-tools-sheet.native.js.map +1 -1
- package/dist/esm/list/listColumns.mjs +1 -370
- package/dist/esm/list/listColumns.mjs.map +1 -1
- package/dist/esm/list/listColumns.native.js +1 -417
- package/dist/esm/list/listColumns.native.js.map +1 -1
- package/dist/esm/list/listFields.mjs +1 -21
- package/dist/esm/list/listFields.mjs.map +1 -1
- package/dist/esm/list/listFields.native.js +1 -47
- package/dist/esm/list/listFields.native.js.map +1 -1
- package/dist/esm/list/listFormat.mjs +1 -36
- package/dist/esm/list/listFormat.mjs.map +1 -1
- package/dist/esm/list/listFormat.native.js +1 -39
- package/dist/esm/list/listFormat.native.js.map +1 -1
- package/dist/esm/list/statusColors.mjs +1 -75
- package/dist/esm/list/statusColors.mjs.map +1 -1
- package/dist/esm/list/statusColors.native.js +1 -79
- package/dist/esm/list/statusColors.native.js.map +1 -1
- package/dist/esm/report/queryReportColumns.mjs +1 -1
- package/dist/esm/report/queryReportColumns.native.js +1 -1
- package/dist/esm/report/queryReportColumns.native.js.map +1 -1
- package/dist/esm/report/queryReportFilterBar.mjs +1 -2
- package/dist/esm/report/queryReportFilterBar.mjs.map +1 -1
- package/dist/esm/report/queryReportFilterBar.native.js +1 -2
- package/dist/esm/report/queryReportFilterBar.native.js.map +1 -1
- package/dist/esm/report/report-grid.mjs +1 -1
- package/dist/esm/report/report-grid.native.js +1 -1
- package/dist/esm/report/report-grid.native.js.map +1 -1
- package/dist/esm/report/report-toolbar.mjs +1 -1
- package/dist/esm/report/report-toolbar.native.js +1 -1
- package/dist/esm/report/report-toolbar.native.js.map +1 -1
- package/dist/esm/report/reportViewModel.mjs +1 -1
- package/dist/esm/report/reportViewModel.mjs.map +1 -1
- package/dist/esm/report/reportViewModel.native.js +1 -1
- package/dist/esm/report/reportViewModel.native.js.map +1 -1
- package/dist/jsx/chrome/BackofficeAwesomebar.native.js +1 -1
- package/dist/jsx/chrome/BackofficeAwesomebar.native.js.map +1 -1
- package/dist/jsx/chrome/CommandPalette.native.js +1 -1
- package/dist/jsx/chrome/CommandPalette.native.js.map +1 -1
- package/dist/jsx/chrome/HelpMenu.native.js +1 -1
- package/dist/jsx/chrome/HelpMenu.native.js.map +1 -1
- package/dist/jsx/chrome/NotificationsButton.native.js +1 -1
- package/dist/jsx/chrome/NotificationsButton.native.js.map +1 -1
- package/dist/jsx/chrome/UserMenu.native.js +1 -1
- package/dist/jsx/chrome/UserMenu.native.js.map +1 -1
- package/dist/jsx/chrome/awesomebar-data.native.js.map +1 -1
- package/dist/jsx/chrome/command-palette-model.native.js +1 -1
- package/dist/jsx/chrome/command-palette-model.native.js.map +1 -1
- package/dist/jsx/chrome/help-about-dialog.native.js +1 -1
- package/dist/jsx/chrome/help-about-dialog.native.js.map +1 -1
- package/dist/jsx/chrome/help-shortcuts-dialog.native.js +1 -1
- package/dist/jsx/chrome/help-shortcuts-dialog.native.js.map +1 -1
- package/dist/jsx/chrome/notifications-data.native.js.map +1 -1
- package/dist/jsx/chrome/notifications-panel.native.js +1 -1
- package/dist/jsx/chrome/notifications-panel.native.js.map +1 -1
- package/dist/jsx/chrome/notifications-utils.native.js.map +1 -1
- package/dist/jsx/chrome/shortcuts.native.js.map +1 -1
- package/dist/jsx/chrome/user-session.native.js.map +1 -1
- package/dist/jsx/config/BackofficeProvider.native.js +1 -1
- package/dist/jsx/config/BackofficeProvider.native.js.map +1 -1
- package/dist/jsx/config/capabilities.native.js.map +1 -1
- package/dist/jsx/config/events.native.js.map +1 -1
- package/dist/jsx/config/slots.native.js.map +1 -1
- package/dist/jsx/desk/Desk.native.js.map +1 -1
- package/dist/jsx/desk/DeskSurface.native.js.map +1 -1
- package/dist/jsx/desk/resolveDeskPath.native.js.map +1 -1
- package/dist/jsx/desk/scope.native.js.map +1 -1
- package/dist/jsx/desk/target.native.js.map +1 -1
- package/dist/jsx/form/DocFormScreen.native.js +1 -1
- package/dist/jsx/form/DocFormScreen.native.js.map +1 -1
- package/dist/jsx/form/FormConnections.native.js +1 -1
- package/dist/jsx/form/FormConnections.native.js.map +1 -1
- package/dist/jsx/form/FormDialogs.native.js +1 -1
- package/dist/jsx/form/FormDialogs.native.js.map +1 -1
- package/dist/jsx/form/FormErrorBoundary.native.js +1 -1
- package/dist/jsx/form/FormErrorBoundary.native.js.map +1 -1
- package/dist/jsx/form/FormHeaderCluster.native.js +1 -1
- package/dist/jsx/form/FormHeaderCluster.native.js.map +1 -1
- package/dist/jsx/form/FormSidebarPanel.native.js +1 -1
- package/dist/jsx/form/FormSidebarPanel.native.js.map +1 -1
- package/dist/jsx/form/FormTimeline.native.js +1 -1
- package/dist/jsx/form/FormTimeline.native.js.map +1 -1
- package/dist/jsx/form/FormToolbar.native.js +1 -1
- package/dist/jsx/form/FormToolbar.native.js.map +1 -1
- package/dist/jsx/form/connections-data.native.js.map +1 -1
- package/dist/jsx/form/createPrefill.native.js.map +1 -1
- package/dist/jsx/form/dependsOn.native.js.map +1 -1
- package/dist/jsx/form/dirtyTracking.native.js.map +1 -1
- package/dist/jsx/form/docinfo.native.js.map +1 -1
- package/dist/jsx/form/fetchFrom.native.js.map +1 -1
- package/dist/jsx/form/fieldPermissions.native.js.map +1 -1
- package/dist/jsx/form/formActions.native.js.map +1 -1
- package/dist/jsx/form/formLayout.native.js.map +1 -1
- package/dist/jsx/form/platformHooks.native.js.map +1 -1
- package/dist/jsx/form/sidebar-attachments.native.js +1 -1
- package/dist/jsx/form/sidebar-attachments.native.js.map +1 -1
- package/dist/jsx/form/sidebar-dialogs.native.js +1 -1
- package/dist/jsx/form/sidebar-dialogs.native.js.map +1 -1
- package/dist/jsx/form/sidebar-people.native.js +1 -1
- package/dist/jsx/form/sidebar-people.native.js.map +1 -1
- package/dist/jsx/form/sidebar-rpc.native.js.map +1 -1
- package/dist/jsx/form/sidebar-utils.native.js.map +1 -1
- package/dist/jsx/form/timeline-entries.native.js.map +1 -1
- package/dist/jsx/form/timeline-utils.native.js.map +1 -1
- package/dist/jsx/form/useFormEngine.native.js.map +1 -1
- package/dist/jsx/i18n/en.native.js.map +1 -1
- package/dist/jsx/i18n/index.native.js.map +1 -1
- package/dist/jsx/index.native.js +1 -1
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/list/AddTagsDialog.native.js +1 -1
- package/dist/jsx/list/AddTagsDialog.native.js.map +1 -1
- package/dist/jsx/list/AssignToDialog.native.js +1 -1
- package/dist/jsx/list/AssignToDialog.native.js.map +1 -1
- package/dist/jsx/list/DoctypeListScreen.mjs +3 -41
- package/dist/jsx/list/DoctypeListScreen.mjs.map +1 -1
- package/dist/jsx/list/DoctypeListScreen.native.js +6 -44
- package/dist/jsx/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/jsx/list/ListBulkActionsBar.native.js +1 -1
- package/dist/jsx/list/ListBulkActionsBar.native.js.map +1 -1
- package/dist/jsx/list/ListFilterBar.native.js +1 -1
- package/dist/jsx/list/ListFilterBar.native.js.map +1 -1
- package/dist/jsx/list/ListSidebar.native.js +1 -1
- package/dist/jsx/list/ListSidebar.native.js.map +1 -1
- package/dist/jsx/list/bulk-edit-dialog.native.js +1 -1
- package/dist/jsx/list/bulk-edit-dialog.native.js.map +1 -1
- package/dist/jsx/list/bulk-export.native.js.map +1 -1
- package/dist/jsx/list/bulk-submit-cancel.native.js.map +1 -1
- package/dist/jsx/list/bulkActions.native.js.map +1 -1
- package/dist/jsx/list/filter-chips.mjs +1 -1
- package/dist/jsx/list/filter-chips.native.js +4 -4
- package/dist/jsx/list/filter-chips.native.js.map +1 -1
- package/dist/jsx/list/filter-editor.mjs +1 -2
- package/dist/jsx/list/filter-editor.mjs.map +1 -1
- package/dist/jsx/list/filter-editor.native.js +11 -12
- package/dist/jsx/list/filter-editor.native.js.map +1 -1
- package/dist/jsx/list/filter-fields.mjs +1 -253
- package/dist/jsx/list/filter-fields.mjs.map +1 -1
- package/dist/jsx/list/filter-fields.native.js +15 -337
- package/dist/jsx/list/filter-fields.native.js.map +1 -1
- package/dist/jsx/list/filter-saved.native.js +1 -1
- package/dist/jsx/list/filter-saved.native.js.map +1 -1
- package/dist/jsx/list/filter-sort.native.js +1 -1
- package/dist/jsx/list/filter-sort.native.js.map +1 -1
- package/dist/jsx/list/filter-standard.mjs +1 -2
- package/dist/jsx/list/filter-standard.mjs.map +1 -1
- package/dist/jsx/list/filter-standard.native.js +5 -6
- package/dist/jsx/list/filter-standard.native.js.map +1 -1
- package/dist/jsx/list/filterConversion.native.js.map +1 -1
- package/dist/jsx/list/list-tools-sheet.mjs +1 -1
- package/dist/jsx/list/list-tools-sheet.native.js +3 -3
- package/dist/jsx/list/list-tools-sheet.native.js.map +1 -1
- package/dist/jsx/list/listColumns.mjs +1 -370
- package/dist/jsx/list/listColumns.mjs.map +1 -1
- package/dist/jsx/list/listColumns.native.js +2 -418
- package/dist/jsx/list/listColumns.native.js.map +1 -1
- package/dist/jsx/list/listFields.mjs +1 -21
- package/dist/jsx/list/listFields.mjs.map +1 -1
- package/dist/jsx/list/listFields.native.js +4 -50
- package/dist/jsx/list/listFields.native.js.map +1 -1
- package/dist/jsx/list/listFormat.mjs +1 -36
- package/dist/jsx/list/listFormat.mjs.map +1 -1
- package/dist/jsx/list/listFormat.native.js +7 -45
- package/dist/jsx/list/listFormat.native.js.map +1 -1
- package/dist/jsx/list/listUrlState.native.js.map +1 -1
- package/dist/jsx/list/sidebar-section.native.js +1 -1
- package/dist/jsx/list/sidebar-section.native.js.map +1 -1
- package/dist/jsx/list/sidebar-stats.native.js.map +1 -1
- package/dist/jsx/list/statusColors.mjs +1 -75
- package/dist/jsx/list/statusColors.mjs.map +1 -1
- package/dist/jsx/list/statusColors.native.js +2 -80
- package/dist/jsx/list/statusColors.native.js.map +1 -1
- package/dist/jsx/navigation/navigator.native.js.map +1 -1
- package/dist/jsx/navigation/paths.native.js.map +1 -1
- package/dist/jsx/oneAdapter/index.native.js.map +1 -1
- package/dist/jsx/quickEntry/QuickEntryDialog.native.js +1 -1
- package/dist/jsx/quickEntry/QuickEntryDialog.native.js.map +1 -1
- package/dist/jsx/quickEntry/quickEntryPlan.native.js.map +1 -1
- package/dist/jsx/report/DoctypeReportView.native.js +1 -1
- package/dist/jsx/report/DoctypeReportView.native.js.map +1 -1
- package/dist/jsx/report/QueryReportScreen.native.js +1 -1
- package/dist/jsx/report/QueryReportScreen.native.js.map +1 -1
- package/dist/jsx/report/queryReportColumns.mjs +1 -1
- package/dist/jsx/report/queryReportColumns.native.js +2 -2
- package/dist/jsx/report/queryReportColumns.native.js.map +1 -1
- package/dist/jsx/report/queryReportFilterBar.mjs +1 -2
- package/dist/jsx/report/queryReportFilterBar.mjs.map +1 -1
- package/dist/jsx/report/queryReportFilterBar.native.js +6 -7
- package/dist/jsx/report/queryReportFilterBar.native.js.map +1 -1
- package/dist/jsx/report/queryReportUrlState.native.js.map +1 -1
- package/dist/jsx/report/report-grid.mjs +1 -1
- package/dist/jsx/report/report-grid.native.js +3 -3
- package/dist/jsx/report/report-grid.native.js.map +1 -1
- package/dist/jsx/report/report-toolbar.mjs +1 -1
- package/dist/jsx/report/report-toolbar.native.js +3 -3
- package/dist/jsx/report/report-toolbar.native.js.map +1 -1
- package/dist/jsx/report/reportShapes.native.js.map +1 -1
- package/dist/jsx/report/reportViewModel.mjs +1 -1
- package/dist/jsx/report/reportViewModel.mjs.map +1 -1
- package/dist/jsx/report/reportViewModel.native.js +3 -3
- package/dist/jsx/report/reportViewModel.native.js.map +1 -1
- package/dist/jsx/report/savedReports.native.js.map +1 -1
- package/dist/jsx/report/useQueryReport.native.js.map +1 -1
- package/dist/jsx/shared/deskLinks.native.js.map +1 -1
- package/dist/jsx/shared/listNavContext.native.js.map +1 -1
- package/dist/jsx/shared/types.native.js.map +1 -1
- package/dist/jsx/shared/useDocinfo.native.js.map +1 -1
- package/dist/jsx/shared/useDoctypeMeta.native.js.map +1 -1
- package/dist/jsx/shared/useFrappeApp.native.js.map +1 -1
- package/dist/jsx/shared/useRecentVisit.native.js.map +1 -1
- package/dist/jsx/shared/useSessionUserId.native.js.map +1 -1
- package/dist/jsx/shared/useSlugTarget.native.js.map +1 -1
- package/dist/jsx/shared/useUserRoles.native.js.map +1 -1
- package/dist/jsx/shell/BackofficeShell.native.js +1 -1
- package/dist/jsx/shell/BackofficeShell.native.js.map +1 -1
- package/dist/jsx/shell/HomeRedirect.native.js +1 -1
- package/dist/jsx/shell/HomeRedirect.native.js.map +1 -1
- package/dist/jsx/shell/NotFoundScreen.native.js +1 -1
- package/dist/jsx/shell/NotFoundScreen.native.js.map +1 -1
- package/dist/jsx/shell/SlugScreen.native.js +1 -1
- package/dist/jsx/shell/SlugScreen.native.js.map +1 -1
- package/dist/jsx/shell/WorkspaceSidebar.native.js +1 -1
- package/dist/jsx/shell/WorkspaceSidebar.native.js.map +1 -1
- package/dist/jsx/shell/useWorkspaces.native.js.map +1 -1
- package/dist/jsx/shell/workspaceIcons.native.js.map +1 -1
- package/dist/jsx/views/CalendarView.native.js +1 -1
- package/dist/jsx/views/CalendarView.native.js.map +1 -1
- package/dist/jsx/views/DashboardView.native.js +1 -1
- package/dist/jsx/views/DashboardView.native.js.map +1 -1
- package/dist/jsx/views/DoctypeViewScreen.native.js.map +1 -1
- package/dist/jsx/views/ImageView.native.js +1 -1
- package/dist/jsx/views/ImageView.native.js.map +1 -1
- package/dist/jsx/views/KanbanView.native.js +1 -1
- package/dist/jsx/views/KanbanView.native.js.map +1 -1
- package/dist/jsx/views/ReportView.native.js +1 -1
- package/dist/jsx/views/ReportView.native.js.map +1 -1
- package/dist/jsx/views/TreeView.native.js +1 -1
- package/dist/jsx/views/TreeView.native.js.map +1 -1
- package/dist/jsx/views/ViewHeader.native.js +1 -1
- package/dist/jsx/views/ViewHeader.native.js.map +1 -1
- package/dist/jsx/views/ViewStates.native.js +1 -1
- package/dist/jsx/views/ViewStates.native.js.map +1 -1
- package/dist/jsx/views/ViewSwitcherMenu.native.js +1 -1
- package/dist/jsx/views/ViewSwitcherMenu.native.js.map +1 -1
- package/dist/jsx/views/calendar-field-selector.native.js +1 -1
- package/dist/jsx/views/calendar-field-selector.native.js.map +1 -1
- package/dist/jsx/views/connection.native.js.map +1 -1
- package/dist/jsx/views/dashboard-data.native.js.map +1 -1
- package/dist/jsx/views/deskViewConfigs.native.js.map +1 -1
- package/dist/jsx/views/kanban-board-controls.native.js +1 -1
- package/dist/jsx/views/kanban-board-controls.native.js.map +1 -1
- package/dist/jsx/views/kanban-field-picker.native.js +1 -1
- package/dist/jsx/views/kanban-field-picker.native.js.map +1 -1
- package/dist/jsx/views/kanbanBoardOps.native.js.map +1 -1
- package/dist/jsx/views/report-controls.native.js +1 -1
- package/dist/jsx/views/report-controls.native.js.map +1 -1
- package/dist/jsx/views/viewAvailability.native.js.map +1 -1
- package/dist/jsx/views/viewMeta.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceChartBlock.native.js +1 -1
- package/dist/jsx/workspace/WorkspaceChartBlock.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceGrid.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceLinkCard.native.js +1 -1
- package/dist/jsx/workspace/WorkspaceLinkCard.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceLinkDirectory.native.js +1 -1
- package/dist/jsx/workspace/WorkspaceLinkDirectory.native.js.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.native.js +1 -1
- package/dist/jsx/workspace/WorkspaceQuickList.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceRecents.native.js +1 -1
- package/dist/jsx/workspace/WorkspaceRecents.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceScreen.native.js +1 -1
- package/dist/jsx/workspace/WorkspaceScreen.native.js.map +1 -1
- package/dist/jsx/workspace/WorkspaceShortcut.native.js +1 -1
- package/dist/jsx/workspace/WorkspaceShortcut.native.js.map +1 -1
- package/dist/jsx/workspace/parseContent.native.js.map +1 -1
- package/dist/jsx/workspace/types.native.js.map +1 -1
- package/dist/jsx/workspace/useDashboardChart.native.js.map +1 -1
- package/dist/jsx/workspace/useWorkspaceDoc.native.js.map +1 -1
- package/package.json +12 -12
- package/src/backofficeScreens.designLaw.spec.ts +1 -3
- package/src/list/DoctypeListScreen.auth.spec.tsx +84 -0
- package/src/list/DoctypeListScreen.tsx +18 -51
- package/src/list/filter-chips.tsx +1 -1
- package/src/list/filter-editor.tsx +2 -2
- package/src/list/filter-fields.tsx +29 -356
- package/src/list/filter-standard.tsx +2 -2
- package/src/list/list-tools-sheet.tsx +1 -1
- package/src/list/listColumns.tsx +11 -488
- package/src/list/listFields.ts +9 -66
- package/src/list/listFormat.ts +12 -77
- package/src/list/listShim.spec.ts +101 -0
- package/src/list/statusColors.ts +7 -92
- package/src/report/queryReportColumns.tsx +1 -1
- package/src/report/queryReportFilterBar.tsx +7 -2
- package/src/report/report-grid.tsx +1 -1
- package/src/report/report-toolbar.tsx +1 -1
- package/src/report/reportViewModel.ts +5 -1
- package/types/list/DoctypeListScreen.d.ts +1 -1
- package/types/list/DoctypeListScreen.d.ts.map +1 -1
- package/types/list/filter-editor.d.ts.map +1 -1
- package/types/list/filter-fields.d.ts +10 -78
- package/types/list/filter-fields.d.ts.map +1 -1
- package/types/list/filter-standard.d.ts.map +1 -1
- package/types/list/listColumns.d.ts +10 -40
- package/types/list/listColumns.d.ts.map +1 -1
- package/types/list/listFields.d.ts +5 -13
- package/types/list/listFields.d.ts.map +1 -1
- package/types/list/listFormat.d.ts +5 -27
- package/types/list/listFormat.d.ts.map +1 -1
- package/types/list/statusColors.d.ts +6 -11
- package/types/list/statusColors.d.ts.map +1 -1
- package/types/report/queryReportFilterBar.d.ts.map +1 -1
- package/types/report/reportViewModel.d.ts +1 -1
- package/types/report/reportViewModel.d.ts.map +1 -1
- package/src/list/filter-fields.spec.ts +0 -29
- package/src/list/listFields.spec.ts +0 -148
- package/src/list/listFormat.spec.ts +0 -151
- package/src/list/statusColors.spec.ts +0 -100
|
@@ -22,272 +22,20 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
|
22
22
|
}), mod);
|
|
23
23
|
var filter_fields_exports = {};
|
|
24
24
|
__export(filter_fields_exports, {
|
|
25
|
-
DESK_OPERATOR_LABELS: () => DESK_OPERATOR_LABELS,
|
|
26
|
-
defaultOperatorForKind: () => defaultOperatorForKind,
|
|
27
|
-
draftToTuple: () => draftToTuple,
|
|
28
|
-
fieldKind: () => fieldKind,
|
|
29
|
-
fieldLabelFor: () => fieldLabelFor,
|
|
30
|
-
filterTupleLabel: () => filterTupleLabel,
|
|
31
|
-
filterableFieldsFromMeta: () => filterableFieldsFromMeta,
|
|
32
|
-
operatorsForKind: () => operatorsForKind,
|
|
33
|
-
quickFilterValue: () => quickFilterValue,
|
|
34
|
-
selectOptionsFromField: () => selectOptionsFromField,
|
|
35
|
-
setFieldFilter: () => setFieldFilter,
|
|
36
|
-
standardDocFilterFields: () => standardDocFilterFields,
|
|
37
|
-
standardFiltersFromMeta: () => standardFiltersFromMeta,
|
|
38
|
-
tupleToDraft: () => tupleToDraft
|
|
25
|
+
DESK_OPERATOR_LABELS: () => import_frappe_ui.DESK_OPERATOR_LABELS,
|
|
26
|
+
defaultOperatorForKind: () => import_frappe_ui.defaultOperatorForKind,
|
|
27
|
+
draftToTuple: () => import_frappe_ui.draftToTuple,
|
|
28
|
+
fieldKind: () => import_frappe_ui.fieldKind,
|
|
29
|
+
fieldLabelFor: () => import_frappe_ui.fieldLabelFor,
|
|
30
|
+
filterTupleLabel: () => import_frappe_ui.filterTupleLabel,
|
|
31
|
+
filterableFieldsFromMeta: () => import_frappe_ui.filterableFieldsFromMeta,
|
|
32
|
+
operatorsForKind: () => import_frappe_ui.operatorsForKind,
|
|
33
|
+
quickFilterValue: () => import_frappe_ui.quickFilterValue,
|
|
34
|
+
selectOptionsFromField: () => import_frappe_ui.selectOptionsFromField,
|
|
35
|
+
setFieldFilter: () => import_frappe_ui.setFieldFilter,
|
|
36
|
+
standardDocFilterFields: () => import_frappe_ui.standardDocFilterFields,
|
|
37
|
+
standardFiltersFromMeta: () => import_frappe_ui.standardFiltersFromMeta,
|
|
38
|
+
tupleToDraft: () => import_frappe_ui.tupleToDraft
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(filter_fields_exports);
|
|
41
|
-
|
|
42
|
-
const NUMBER_FIELDTYPES = /* @__PURE__ */new Set(["Int", "Float", "Currency", "Percent", "Duration", "Rating"]);
|
|
43
|
-
const DATE_FIELDTYPES = /* @__PURE__ */new Set(["Date", "Datetime", "Time"]);
|
|
44
|
-
function fieldKind(fieldtype) {
|
|
45
|
-
if (fieldtype === "Select") return "select";
|
|
46
|
-
if (fieldtype === "Link") return "link";
|
|
47
|
-
if (fieldtype === "Check") return "check";
|
|
48
|
-
if (DATE_FIELDTYPES.has(fieldtype)) return "date";
|
|
49
|
-
if (NUMBER_FIELDTYPES.has(fieldtype)) return "number";
|
|
50
|
-
return "text";
|
|
51
|
-
}
|
|
52
|
-
function toDescriptor(field) {
|
|
53
|
-
return {
|
|
54
|
-
fieldname: field.fieldname,
|
|
55
|
-
label: field.label || field.fieldname,
|
|
56
|
-
fieldtype: field.fieldtype,
|
|
57
|
-
kind: fieldKind(field.fieldtype),
|
|
58
|
-
options: field.options
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function standardDocFilterFields() {
|
|
62
|
-
return [{
|
|
63
|
-
fieldname: "name",
|
|
64
|
-
label: "ID",
|
|
65
|
-
fieldtype: "Data",
|
|
66
|
-
kind: "text"
|
|
67
|
-
}, {
|
|
68
|
-
fieldname: "owner",
|
|
69
|
-
label: "Created By",
|
|
70
|
-
fieldtype: "Link",
|
|
71
|
-
kind: "link",
|
|
72
|
-
options: "User"
|
|
73
|
-
}, {
|
|
74
|
-
fieldname: "creation",
|
|
75
|
-
label: "Created On",
|
|
76
|
-
fieldtype: "Datetime",
|
|
77
|
-
kind: "date"
|
|
78
|
-
}, {
|
|
79
|
-
fieldname: "modified",
|
|
80
|
-
label: "Last Updated On",
|
|
81
|
-
fieldtype: "Datetime",
|
|
82
|
-
kind: "date"
|
|
83
|
-
}, {
|
|
84
|
-
fieldname: "modified_by",
|
|
85
|
-
label: "Last Updated By",
|
|
86
|
-
fieldtype: "Link",
|
|
87
|
-
kind: "link",
|
|
88
|
-
options: "User"
|
|
89
|
-
},
|
|
90
|
-
// Desk `_` facet columns — the sidebar facets and heart column write
|
|
91
|
-
// tuples on these, so chips and the editor must label them (desk offers
|
|
92
|
-
// them in its filter field picker too). Never surface the raw
|
|
93
|
-
// underscore fieldname (no-raw-fieldname rule candidate).
|
|
94
|
-
{
|
|
95
|
-
fieldname: "_assign",
|
|
96
|
-
label: "Assigned To",
|
|
97
|
-
fieldtype: "Data",
|
|
98
|
-
kind: "text"
|
|
99
|
-
}, {
|
|
100
|
-
fieldname: "_user_tags",
|
|
101
|
-
label: "Tags",
|
|
102
|
-
fieldtype: "Data",
|
|
103
|
-
kind: "text"
|
|
104
|
-
}, {
|
|
105
|
-
fieldname: "_liked_by",
|
|
106
|
-
label: "Liked By",
|
|
107
|
-
fieldtype: "Data",
|
|
108
|
-
kind: "text"
|
|
109
|
-
}, {
|
|
110
|
-
fieldname: "_comments",
|
|
111
|
-
label: "Comments",
|
|
112
|
-
fieldtype: "Data",
|
|
113
|
-
kind: "text"
|
|
114
|
-
}];
|
|
115
|
-
}
|
|
116
|
-
function filterableFieldsFromMeta(meta) {
|
|
117
|
-
const out = [];
|
|
118
|
-
const seen = /* @__PURE__ */new Set();
|
|
119
|
-
for (const field of meta?.fields ?? []) {
|
|
120
|
-
if (!field.fieldname || seen.has(field.fieldname)) continue;
|
|
121
|
-
const fieldtype = String(field.fieldtype);
|
|
122
|
-
if (NON_FILTERABLE_FIELDTYPES.has(fieldtype) || fieldtype.startsWith("Table")) continue;
|
|
123
|
-
seen.add(field.fieldname);
|
|
124
|
-
out.push(toDescriptor(field));
|
|
125
|
-
}
|
|
126
|
-
for (const standard of standardDocFilterFields()) {
|
|
127
|
-
if (!seen.has(standard.fieldname)) out.push(standard);
|
|
128
|
-
}
|
|
129
|
-
return out;
|
|
130
|
-
}
|
|
131
|
-
function standardFiltersFromMeta(meta) {
|
|
132
|
-
const fromMeta = (meta?.fields ?? []).filter(field => field.in_standard_filter === 1 && field.hidden !== 1 && field.fieldname).map(toDescriptor);
|
|
133
|
-
const seen = new Set(fromMeta.map(field => field.fieldname));
|
|
134
|
-
const extras = [];
|
|
135
|
-
if (!seen.has("name")) {
|
|
136
|
-
extras.push({
|
|
137
|
-
fieldname: "name",
|
|
138
|
-
label: "ID",
|
|
139
|
-
fieldtype: "Data",
|
|
140
|
-
kind: "text"
|
|
141
|
-
});
|
|
142
|
-
seen.add("name");
|
|
143
|
-
}
|
|
144
|
-
const titleField = meta?.title_field;
|
|
145
|
-
if (titleField && !seen.has(titleField)) {
|
|
146
|
-
const titleMeta = meta?.fields?.find(field => field.fieldname === titleField);
|
|
147
|
-
extras.push({
|
|
148
|
-
fieldname: titleField,
|
|
149
|
-
label: titleMeta?.label || "Title",
|
|
150
|
-
fieldtype: titleMeta?.fieldtype || "Data",
|
|
151
|
-
kind: fieldKind(titleMeta?.fieldtype || "Data")
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
return extras.length > 0 ? [...extras, ...fromMeta] : fromMeta;
|
|
155
|
-
}
|
|
156
|
-
function selectOptionsFromField(options) {
|
|
157
|
-
return (options ?? "").split("\n").map(line => line.trim()).filter(Boolean).map(line => ({
|
|
158
|
-
label: line,
|
|
159
|
-
value: line
|
|
160
|
-
}));
|
|
161
|
-
}
|
|
162
|
-
function fieldLabelFor(fields, fieldname) {
|
|
163
|
-
const known = fields.find(field => field.fieldname === fieldname)?.label;
|
|
164
|
-
if (known) return known;
|
|
165
|
-
const pretty = fieldname.replace(/^_+/, "").split("_").filter(Boolean).map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
166
|
-
return pretty || fieldname;
|
|
167
|
-
}
|
|
168
|
-
const DESK_OPERATOR_LABELS = {
|
|
169
|
-
"=": "Equals",
|
|
170
|
-
"!=": "Not Equals",
|
|
171
|
-
like: "Like",
|
|
172
|
-
"not like": "Not Like",
|
|
173
|
-
in: "In",
|
|
174
|
-
"not in": "Not In",
|
|
175
|
-
">": "Greater Than",
|
|
176
|
-
"<": "Less Than",
|
|
177
|
-
">=": "Greater Than or Equal",
|
|
178
|
-
"<=": "Less Than or Equal",
|
|
179
|
-
between: "Between",
|
|
180
|
-
"is set": "Is Set",
|
|
181
|
-
"is not set": "Is Not Set"
|
|
182
|
-
};
|
|
183
|
-
const BASE_OPERATORS = ["=", "!=", "like", "not like", "in", "not in", "is set", "is not set"];
|
|
184
|
-
function operatorsForKind(kind) {
|
|
185
|
-
switch (kind) {
|
|
186
|
-
case "check":
|
|
187
|
-
return ["=", "!="];
|
|
188
|
-
case "number":
|
|
189
|
-
case "date":
|
|
190
|
-
return ["=", "!=", ">", "<", ">=", "<=", "between", "in", "not in", "is set", "is not set"];
|
|
191
|
-
default:
|
|
192
|
-
return BASE_OPERATORS;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
function defaultOperatorForKind(kind) {
|
|
196
|
-
return kind === "text" ? "like" : "=";
|
|
197
|
-
}
|
|
198
|
-
function draftToTuple(draft, kind) {
|
|
199
|
-
const {
|
|
200
|
-
fieldname,
|
|
201
|
-
operator
|
|
202
|
-
} = draft;
|
|
203
|
-
if (!fieldname) return null;
|
|
204
|
-
switch (operator) {
|
|
205
|
-
case "is set":
|
|
206
|
-
return [fieldname, "is", "set"];
|
|
207
|
-
case "is not set":
|
|
208
|
-
return [fieldname, "is", "not set"];
|
|
209
|
-
case "in":
|
|
210
|
-
case "not in":
|
|
211
|
-
{
|
|
212
|
-
const values = kind === "select" ? draft.values.map(value => value.trim()).filter(Boolean) : draft.value.split(",").map(value => value.trim()).filter(Boolean);
|
|
213
|
-
return values.length ? [fieldname, operator, values] : null;
|
|
214
|
-
}
|
|
215
|
-
case "between":
|
|
216
|
-
{
|
|
217
|
-
const from = (draft.values[0] ?? "").trim();
|
|
218
|
-
const to = (draft.values[1] ?? "").trim();
|
|
219
|
-
return from && to ? [fieldname, "between", [from, to]] : null;
|
|
220
|
-
}
|
|
221
|
-
case "like":
|
|
222
|
-
case "not like":
|
|
223
|
-
{
|
|
224
|
-
const text = draft.value.trim();
|
|
225
|
-
if (!text) return null;
|
|
226
|
-
return [fieldname, operator, text.includes("%") ? text : `%${text}%`];
|
|
227
|
-
}
|
|
228
|
-
default:
|
|
229
|
-
{
|
|
230
|
-
const text = draft.value.trim();
|
|
231
|
-
return text ? [fieldname, operator, text] : null;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
const SCALAR_OPERATORS = ["=", "!=", "like", "not like", ">", "<", ">=", "<="];
|
|
236
|
-
function tupleToDraft(tuple) {
|
|
237
|
-
const [fieldname, operator, raw] = tuple;
|
|
238
|
-
if (operator === "is") {
|
|
239
|
-
return {
|
|
240
|
-
fieldname,
|
|
241
|
-
operator: raw === "set" ? "is set" : "is not set",
|
|
242
|
-
value: "",
|
|
243
|
-
values: []
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
if (operator === "in" || operator === "not in") {
|
|
247
|
-
const values = Array.isArray(raw) ? raw.map(String) : String(raw ?? "").split(",").map(value => value.trim()).filter(Boolean);
|
|
248
|
-
return {
|
|
249
|
-
fieldname,
|
|
250
|
-
operator,
|
|
251
|
-
value: values.join(", "),
|
|
252
|
-
values
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
if (operator === "between") {
|
|
256
|
-
const values = Array.isArray(raw) ? raw.map(String) : [];
|
|
257
|
-
return {
|
|
258
|
-
fieldname,
|
|
259
|
-
operator: "between",
|
|
260
|
-
value: "",
|
|
261
|
-
values: [values[0] ?? "", values[1] ?? ""]
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
const known = SCALAR_OPERATORS.includes(operator) ? operator : "=";
|
|
265
|
-
return {
|
|
266
|
-
fieldname,
|
|
267
|
-
operator: known,
|
|
268
|
-
value: raw === null || raw === void 0 ? "" : String(raw),
|
|
269
|
-
values: []
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
function setFieldFilter(filters, fieldname, tuple) {
|
|
273
|
-
const rest = filters.filter(([name]) => name !== fieldname);
|
|
274
|
-
return tuple ? [...rest, tuple] : rest;
|
|
275
|
-
}
|
|
276
|
-
function quickFilterValue(filters, fieldname) {
|
|
277
|
-
const tuple = filters.find(([name]) => name === fieldname);
|
|
278
|
-
if (!tuple) return "";
|
|
279
|
-
const [, operator, raw] = tuple;
|
|
280
|
-
if (operator === "like") {
|
|
281
|
-
const text = String(raw ?? "");
|
|
282
|
-
return text.startsWith("%") && text.endsWith("%") && text.length >= 2 ? text.slice(1, -1) : text;
|
|
283
|
-
}
|
|
284
|
-
if (operator === "=") return raw === null || raw === void 0 ? "" : String(raw);
|
|
285
|
-
return "";
|
|
286
|
-
}
|
|
287
|
-
function filterTupleLabel(fields, tuple) {
|
|
288
|
-
const [fieldname, operator, raw] = tuple;
|
|
289
|
-
const label = fieldLabelFor(fields, fieldname);
|
|
290
|
-
if (operator === "is") return `${label} ${raw === "set" ? "is set" : "is not set"}`;
|
|
291
|
-
const value = Array.isArray(raw) ? raw.map(String).join(", ") : String(raw ?? "");
|
|
292
|
-
return `${label} ${operator} ${value}`;
|
|
293
|
-
}
|
|
41
|
+
var import_frappe_ui = require("@multiplatform.one/frappe-ui");
|
|
@@ -24,343 +24,21 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
|
24
24
|
}), mod);
|
|
25
25
|
var filter_fields_exports = {};
|
|
26
26
|
__export(filter_fields_exports, {
|
|
27
|
-
DESK_OPERATOR_LABELS: () => DESK_OPERATOR_LABELS,
|
|
28
|
-
defaultOperatorForKind: () => defaultOperatorForKind,
|
|
29
|
-
draftToTuple: () => draftToTuple,
|
|
30
|
-
fieldKind: () => fieldKind,
|
|
31
|
-
fieldLabelFor: () => fieldLabelFor,
|
|
32
|
-
filterTupleLabel: () => filterTupleLabel,
|
|
33
|
-
filterableFieldsFromMeta: () => filterableFieldsFromMeta,
|
|
34
|
-
operatorsForKind: () => operatorsForKind,
|
|
35
|
-
quickFilterValue: () => quickFilterValue,
|
|
36
|
-
selectOptionsFromField: () => selectOptionsFromField,
|
|
37
|
-
setFieldFilter: () => setFieldFilter,
|
|
38
|
-
standardDocFilterFields: () => standardDocFilterFields,
|
|
39
|
-
standardFiltersFromMeta: () => standardFiltersFromMeta,
|
|
40
|
-
tupleToDraft: () => tupleToDraft
|
|
27
|
+
DESK_OPERATOR_LABELS: () => import_frappe_ui.DESK_OPERATOR_LABELS,
|
|
28
|
+
defaultOperatorForKind: () => import_frappe_ui.defaultOperatorForKind,
|
|
29
|
+
draftToTuple: () => import_frappe_ui.draftToTuple,
|
|
30
|
+
fieldKind: () => import_frappe_ui.fieldKind,
|
|
31
|
+
fieldLabelFor: () => import_frappe_ui.fieldLabelFor,
|
|
32
|
+
filterTupleLabel: () => import_frappe_ui.filterTupleLabel,
|
|
33
|
+
filterableFieldsFromMeta: () => import_frappe_ui.filterableFieldsFromMeta,
|
|
34
|
+
operatorsForKind: () => import_frappe_ui.operatorsForKind,
|
|
35
|
+
quickFilterValue: () => import_frappe_ui.quickFilterValue,
|
|
36
|
+
selectOptionsFromField: () => import_frappe_ui.selectOptionsFromField,
|
|
37
|
+
setFieldFilter: () => import_frappe_ui.setFieldFilter,
|
|
38
|
+
standardDocFilterFields: () => import_frappe_ui.standardDocFilterFields,
|
|
39
|
+
standardFiltersFromMeta: () => import_frappe_ui.standardFiltersFromMeta,
|
|
40
|
+
tupleToDraft: () => import_frappe_ui.tupleToDraft
|
|
41
41
|
});
|
|
42
42
|
module.exports = __toCommonJS(filter_fields_exports);
|
|
43
|
-
var
|
|
44
|
-
var NUMBER_FIELDTYPES = /* @__PURE__ */new Set(["Int", "Float", "Currency", "Percent", "Duration", "Rating"]);
|
|
45
|
-
var DATE_FIELDTYPES = /* @__PURE__ */new Set(["Date", "Datetime", "Time"]);
|
|
46
|
-
function fieldKind(fieldtype) {
|
|
47
|
-
if (fieldtype === "Select") return "select";
|
|
48
|
-
if (fieldtype === "Link") return "link";
|
|
49
|
-
if (fieldtype === "Check") return "check";
|
|
50
|
-
if (DATE_FIELDTYPES.has(fieldtype)) return "date";
|
|
51
|
-
if (NUMBER_FIELDTYPES.has(fieldtype)) return "number";
|
|
52
|
-
return "text";
|
|
53
|
-
}
|
|
54
|
-
function toDescriptor(field) {
|
|
55
|
-
return {
|
|
56
|
-
fieldname: field.fieldname,
|
|
57
|
-
label: field.label || field.fieldname,
|
|
58
|
-
fieldtype: field.fieldtype,
|
|
59
|
-
kind: fieldKind(field.fieldtype),
|
|
60
|
-
options: field.options
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
function standardDocFilterFields() {
|
|
64
|
-
return [{
|
|
65
|
-
fieldname: "name",
|
|
66
|
-
label: "ID",
|
|
67
|
-
fieldtype: "Data",
|
|
68
|
-
kind: "text"
|
|
69
|
-
}, {
|
|
70
|
-
fieldname: "owner",
|
|
71
|
-
label: "Created By",
|
|
72
|
-
fieldtype: "Link",
|
|
73
|
-
kind: "link",
|
|
74
|
-
options: "User"
|
|
75
|
-
}, {
|
|
76
|
-
fieldname: "creation",
|
|
77
|
-
label: "Created On",
|
|
78
|
-
fieldtype: "Datetime",
|
|
79
|
-
kind: "date"
|
|
80
|
-
}, {
|
|
81
|
-
fieldname: "modified",
|
|
82
|
-
label: "Last Updated On",
|
|
83
|
-
fieldtype: "Datetime",
|
|
84
|
-
kind: "date"
|
|
85
|
-
}, {
|
|
86
|
-
fieldname: "modified_by",
|
|
87
|
-
label: "Last Updated By",
|
|
88
|
-
fieldtype: "Link",
|
|
89
|
-
kind: "link",
|
|
90
|
-
options: "User"
|
|
91
|
-
},
|
|
92
|
-
// Desk `_` facet columns — the sidebar facets and heart column write
|
|
93
|
-
// tuples on these, so chips and the editor must label them (desk offers
|
|
94
|
-
// them in its filter field picker too). Never surface the raw
|
|
95
|
-
// underscore fieldname (no-raw-fieldname rule candidate).
|
|
96
|
-
{
|
|
97
|
-
fieldname: "_assign",
|
|
98
|
-
label: "Assigned To",
|
|
99
|
-
fieldtype: "Data",
|
|
100
|
-
kind: "text"
|
|
101
|
-
}, {
|
|
102
|
-
fieldname: "_user_tags",
|
|
103
|
-
label: "Tags",
|
|
104
|
-
fieldtype: "Data",
|
|
105
|
-
kind: "text"
|
|
106
|
-
}, {
|
|
107
|
-
fieldname: "_liked_by",
|
|
108
|
-
label: "Liked By",
|
|
109
|
-
fieldtype: "Data",
|
|
110
|
-
kind: "text"
|
|
111
|
-
}, {
|
|
112
|
-
fieldname: "_comments",
|
|
113
|
-
label: "Comments",
|
|
114
|
-
fieldtype: "Data",
|
|
115
|
-
kind: "text"
|
|
116
|
-
}];
|
|
117
|
-
}
|
|
118
|
-
function filterableFieldsFromMeta(meta) {
|
|
119
|
-
var _ref;
|
|
120
|
-
var out = [];
|
|
121
|
-
var seen = /* @__PURE__ */new Set();
|
|
122
|
-
var _iteratorNormalCompletion = true,
|
|
123
|
-
_didIteratorError = false,
|
|
124
|
-
_iteratorError = void 0;
|
|
125
|
-
try {
|
|
126
|
-
for (var _iterator = ((_ref = meta === null || meta === void 0 ? void 0 : meta.fields) !== null && _ref !== void 0 ? _ref : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
127
|
-
var field = _step.value;
|
|
128
|
-
if (!field.fieldname || seen.has(field.fieldname)) continue;
|
|
129
|
-
var fieldtype = String(field.fieldtype);
|
|
130
|
-
if (NON_FILTERABLE_FIELDTYPES.has(fieldtype) || fieldtype.startsWith("Table")) continue;
|
|
131
|
-
seen.add(field.fieldname);
|
|
132
|
-
out.push(toDescriptor(field));
|
|
133
|
-
}
|
|
134
|
-
} catch (err) {
|
|
135
|
-
_didIteratorError = true;
|
|
136
|
-
_iteratorError = err;
|
|
137
|
-
} finally {
|
|
138
|
-
try {
|
|
139
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
140
|
-
_iterator.return();
|
|
141
|
-
}
|
|
142
|
-
} finally {
|
|
143
|
-
if (_didIteratorError) {
|
|
144
|
-
throw _iteratorError;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
var _iteratorNormalCompletion1 = true,
|
|
149
|
-
_didIteratorError1 = false,
|
|
150
|
-
_iteratorError1 = void 0;
|
|
151
|
-
try {
|
|
152
|
-
for (var _iterator1 = standardDocFilterFields()[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
153
|
-
var standard = _step1.value;
|
|
154
|
-
if (!seen.has(standard.fieldname)) out.push(standard);
|
|
155
|
-
}
|
|
156
|
-
} catch (err) {
|
|
157
|
-
_didIteratorError1 = true;
|
|
158
|
-
_iteratorError1 = err;
|
|
159
|
-
} finally {
|
|
160
|
-
try {
|
|
161
|
-
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
162
|
-
_iterator1.return();
|
|
163
|
-
}
|
|
164
|
-
} finally {
|
|
165
|
-
if (_didIteratorError1) {
|
|
166
|
-
throw _iteratorError1;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return out;
|
|
171
|
-
}
|
|
172
|
-
function standardFiltersFromMeta(meta) {
|
|
173
|
-
var _ref;
|
|
174
|
-
var fromMeta = ((_ref = meta === null || meta === void 0 ? void 0 : meta.fields) !== null && _ref !== void 0 ? _ref : []).filter(function (field) {
|
|
175
|
-
return field.in_standard_filter === 1 && field.hidden !== 1 && field.fieldname;
|
|
176
|
-
}).map(toDescriptor);
|
|
177
|
-
var seen = new Set(fromMeta.map(function (field) {
|
|
178
|
-
return field.fieldname;
|
|
179
|
-
}));
|
|
180
|
-
var extras = [];
|
|
181
|
-
if (!seen.has("name")) {
|
|
182
|
-
extras.push({
|
|
183
|
-
fieldname: "name",
|
|
184
|
-
label: "ID",
|
|
185
|
-
fieldtype: "Data",
|
|
186
|
-
kind: "text"
|
|
187
|
-
});
|
|
188
|
-
seen.add("name");
|
|
189
|
-
}
|
|
190
|
-
var titleField = meta === null || meta === void 0 ? void 0 : meta.title_field;
|
|
191
|
-
if (titleField && !seen.has(titleField)) {
|
|
192
|
-
var _meta_fields;
|
|
193
|
-
var titleMeta = meta === null || meta === void 0 ? void 0 : (_meta_fields = meta.fields) === null || _meta_fields === void 0 ? void 0 : _meta_fields.find(function (field) {
|
|
194
|
-
return field.fieldname === titleField;
|
|
195
|
-
});
|
|
196
|
-
extras.push({
|
|
197
|
-
fieldname: titleField,
|
|
198
|
-
label: (titleMeta === null || titleMeta === void 0 ? void 0 : titleMeta.label) || "Title",
|
|
199
|
-
fieldtype: (titleMeta === null || titleMeta === void 0 ? void 0 : titleMeta.fieldtype) || "Data",
|
|
200
|
-
kind: fieldKind((titleMeta === null || titleMeta === void 0 ? void 0 : titleMeta.fieldtype) || "Data")
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
return extras.length > 0 ? [...extras, ...fromMeta] : fromMeta;
|
|
204
|
-
}
|
|
205
|
-
function selectOptionsFromField(options) {
|
|
206
|
-
return (options !== null && options !== void 0 ? options : "").split("\n").map(function (line) {
|
|
207
|
-
return line.trim();
|
|
208
|
-
}).filter(Boolean).map(function (line) {
|
|
209
|
-
return {
|
|
210
|
-
label: line,
|
|
211
|
-
value: line
|
|
212
|
-
};
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
function fieldLabelFor(fields, fieldname) {
|
|
216
|
-
var _fields_find;
|
|
217
|
-
var known = (_fields_find = fields.find(function (field) {
|
|
218
|
-
return field.fieldname === fieldname;
|
|
219
|
-
})) === null || _fields_find === void 0 ? void 0 : _fields_find.label;
|
|
220
|
-
if (known) return known;
|
|
221
|
-
var pretty = fieldname.replace(/^_+/, "").split("_").filter(Boolean).map(function (word) {
|
|
222
|
-
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
223
|
-
}).join(" ");
|
|
224
|
-
return pretty || fieldname;
|
|
225
|
-
}
|
|
226
|
-
var DESK_OPERATOR_LABELS = {
|
|
227
|
-
"=": "Equals",
|
|
228
|
-
"!=": "Not Equals",
|
|
229
|
-
like: "Like",
|
|
230
|
-
"not like": "Not Like",
|
|
231
|
-
in: "In",
|
|
232
|
-
"not in": "Not In",
|
|
233
|
-
">": "Greater Than",
|
|
234
|
-
"<": "Less Than",
|
|
235
|
-
">=": "Greater Than or Equal",
|
|
236
|
-
"<=": "Less Than or Equal",
|
|
237
|
-
between: "Between",
|
|
238
|
-
"is set": "Is Set",
|
|
239
|
-
"is not set": "Is Not Set"
|
|
240
|
-
};
|
|
241
|
-
var BASE_OPERATORS = ["=", "!=", "like", "not like", "in", "not in", "is set", "is not set"];
|
|
242
|
-
function operatorsForKind(kind) {
|
|
243
|
-
switch (kind) {
|
|
244
|
-
case "check":
|
|
245
|
-
return ["=", "!="];
|
|
246
|
-
case "number":
|
|
247
|
-
case "date":
|
|
248
|
-
return ["=", "!=", ">", "<", ">=", "<=", "between", "in", "not in", "is set", "is not set"];
|
|
249
|
-
default:
|
|
250
|
-
return BASE_OPERATORS;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
function defaultOperatorForKind(kind) {
|
|
254
|
-
return kind === "text" ? "like" : "=";
|
|
255
|
-
}
|
|
256
|
-
function draftToTuple(draft, kind) {
|
|
257
|
-
var {
|
|
258
|
-
fieldname,
|
|
259
|
-
operator
|
|
260
|
-
} = draft;
|
|
261
|
-
if (!fieldname) return null;
|
|
262
|
-
switch (operator) {
|
|
263
|
-
case "is set":
|
|
264
|
-
return [fieldname, "is", "set"];
|
|
265
|
-
case "is not set":
|
|
266
|
-
return [fieldname, "is", "not set"];
|
|
267
|
-
case "in":
|
|
268
|
-
case "not in":
|
|
269
|
-
{
|
|
270
|
-
var values = kind === "select" ? draft.values.map(function (value) {
|
|
271
|
-
return value.trim();
|
|
272
|
-
}).filter(Boolean) : draft.value.split(",").map(function (value) {
|
|
273
|
-
return value.trim();
|
|
274
|
-
}).filter(Boolean);
|
|
275
|
-
return values.length ? [fieldname, operator, values] : null;
|
|
276
|
-
}
|
|
277
|
-
case "between":
|
|
278
|
-
{
|
|
279
|
-
var _draft_values_, _draft_values_1;
|
|
280
|
-
var from = ((_draft_values_ = draft.values[0]) !== null && _draft_values_ !== void 0 ? _draft_values_ : "").trim();
|
|
281
|
-
var to = ((_draft_values_1 = draft.values[1]) !== null && _draft_values_1 !== void 0 ? _draft_values_1 : "").trim();
|
|
282
|
-
return from && to ? [fieldname, "between", [from, to]] : null;
|
|
283
|
-
}
|
|
284
|
-
case "like":
|
|
285
|
-
case "not like":
|
|
286
|
-
{
|
|
287
|
-
var text = draft.value.trim();
|
|
288
|
-
if (!text) return null;
|
|
289
|
-
return [fieldname, operator, text.includes("%") ? text : `%${text}%`];
|
|
290
|
-
}
|
|
291
|
-
default:
|
|
292
|
-
{
|
|
293
|
-
var text1 = draft.value.trim();
|
|
294
|
-
return text1 ? [fieldname, operator, text1] : null;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
var SCALAR_OPERATORS = ["=", "!=", "like", "not like", ">", "<", ">=", "<="];
|
|
299
|
-
function tupleToDraft(tuple) {
|
|
300
|
-
var [fieldname, operator, raw] = tuple;
|
|
301
|
-
if (operator === "is") {
|
|
302
|
-
return {
|
|
303
|
-
fieldname,
|
|
304
|
-
operator: raw === "set" ? "is set" : "is not set",
|
|
305
|
-
value: "",
|
|
306
|
-
values: []
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
if (operator === "in" || operator === "not in") {
|
|
310
|
-
var values = Array.isArray(raw) ? raw.map(String) : String(raw !== null && raw !== void 0 ? raw : "").split(",").map(function (value) {
|
|
311
|
-
return value.trim();
|
|
312
|
-
}).filter(Boolean);
|
|
313
|
-
return {
|
|
314
|
-
fieldname,
|
|
315
|
-
operator,
|
|
316
|
-
value: values.join(", "),
|
|
317
|
-
values
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
if (operator === "between") {
|
|
321
|
-
var _values_, _values_1;
|
|
322
|
-
var values1 = Array.isArray(raw) ? raw.map(String) : [];
|
|
323
|
-
return {
|
|
324
|
-
fieldname,
|
|
325
|
-
operator: "between",
|
|
326
|
-
value: "",
|
|
327
|
-
values: [(_values_ = values1[0]) !== null && _values_ !== void 0 ? _values_ : "", (_values_1 = values1[1]) !== null && _values_1 !== void 0 ? _values_1 : ""]
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
var known = SCALAR_OPERATORS.includes(operator) ? operator : "=";
|
|
331
|
-
return {
|
|
332
|
-
fieldname,
|
|
333
|
-
operator: known,
|
|
334
|
-
value: raw === null || raw === void 0 ? "" : String(raw),
|
|
335
|
-
values: []
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
function setFieldFilter(filters, fieldname, tuple) {
|
|
339
|
-
var rest = filters.filter(function (param) {
|
|
340
|
-
var [name] = param;
|
|
341
|
-
return name !== fieldname;
|
|
342
|
-
});
|
|
343
|
-
return tuple ? [...rest, tuple] : rest;
|
|
344
|
-
}
|
|
345
|
-
function quickFilterValue(filters, fieldname) {
|
|
346
|
-
var tuple = filters.find(function (param) {
|
|
347
|
-
var [name] = param;
|
|
348
|
-
return name === fieldname;
|
|
349
|
-
});
|
|
350
|
-
if (!tuple) return "";
|
|
351
|
-
var [, operator, raw] = tuple;
|
|
352
|
-
if (operator === "like") {
|
|
353
|
-
var text = String(raw !== null && raw !== void 0 ? raw : "");
|
|
354
|
-
return text.startsWith("%") && text.endsWith("%") && text.length >= 2 ? text.slice(1, -1) : text;
|
|
355
|
-
}
|
|
356
|
-
if (operator === "=") return raw === null || raw === void 0 ? "" : String(raw);
|
|
357
|
-
return "";
|
|
358
|
-
}
|
|
359
|
-
function filterTupleLabel(fields, tuple) {
|
|
360
|
-
var [fieldname, operator, raw] = tuple;
|
|
361
|
-
var label = fieldLabelFor(fields, fieldname);
|
|
362
|
-
if (operator === "is") return `${label} ${raw === "set" ? "is set" : "is not set"}`;
|
|
363
|
-
var value = Array.isArray(raw) ? raw.map(String).join(", ") : String(raw !== null && raw !== void 0 ? raw : "");
|
|
364
|
-
return `${label} ${operator} ${value}`;
|
|
365
|
-
}
|
|
43
|
+
var import_frappe_ui = require("@multiplatform.one/frappe-ui");
|
|
366
44
|
//# sourceMappingURL=filter-fields.native.js.map
|