@multiplatform.one/frappe-ui 7.66.0 → 7.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/FileBrowser/index.cjs +15 -25
- package/dist/cjs/FileBrowser/index.native.js +15 -25
- package/dist/cjs/FileBrowser/index.native.js.map +1 -1
- package/dist/cjs/FormSidebar.cjs +107 -194
- package/dist/cjs/FormSidebar.native.js +120 -216
- package/dist/cjs/FormSidebar.native.js.map +1 -1
- package/dist/cjs/FrappeAssignment.cjs +0 -3
- package/dist/cjs/FrappeAssignment.native.js +0 -3
- package/dist/cjs/FrappeAssignment.native.js.map +1 -1
- package/dist/cjs/FrappeConnectionIndicator.cjs +5 -24
- package/dist/cjs/FrappeConnectionIndicator.native.js +5 -24
- package/dist/cjs/FrappeConnectionIndicator.native.js.map +1 -1
- package/dist/cjs/FrappeDashboard.cjs +0 -2
- package/dist/cjs/FrappeDashboard.native.js +0 -2
- package/dist/cjs/FrappeDashboard.native.js.map +1 -1
- package/dist/cjs/FrappeForm.cjs +6 -5
- package/dist/cjs/FrappeForm.native.js +6 -5
- package/dist/cjs/FrappeForm.native.js.map +1 -1
- package/dist/cjs/FrappeFormActions.cjs +20 -30
- package/dist/cjs/FrappeFormActions.native.js +23 -31
- package/dist/cjs/FrappeFormActions.native.js.map +1 -1
- package/dist/cjs/FrappeImageView.cjs +46 -65
- package/dist/cjs/FrappeImageView.native.js +46 -68
- package/dist/cjs/FrappeImageView.native.js.map +1 -1
- package/dist/cjs/FrappeKanban.cjs +0 -1
- package/dist/cjs/FrappeKanban.native.js +0 -1
- package/dist/cjs/FrappeKanban.native.js.map +1 -1
- package/dist/cjs/FrappeLikedBy.cjs +1 -1
- package/dist/cjs/FrappeLikedBy.native.js +1 -1
- package/dist/cjs/FrappeLikedBy.native.js.map +1 -1
- package/dist/cjs/FrappeListView.cjs +24 -68
- package/dist/cjs/FrappeListView.native.js +25 -72
- package/dist/cjs/FrappeListView.native.js.map +1 -1
- package/dist/cjs/FrappeRecordView.cjs +4 -0
- package/dist/cjs/FrappeRecordView.native.js +4 -0
- package/dist/cjs/FrappeRecordView.native.js.map +1 -1
- package/dist/cjs/FrappeReportBuilder.cjs +21 -18
- package/dist/cjs/FrappeReportBuilder.native.js +21 -18
- package/dist/cjs/FrappeReportBuilder.native.js.map +1 -1
- package/dist/cjs/FrappeReportView.cjs +2 -4
- package/dist/cjs/FrappeReportView.native.js +2 -4
- package/dist/cjs/FrappeReportView.native.js.map +1 -1
- package/dist/cjs/SyncErrorNotice.cjs +8 -36
- package/dist/cjs/SyncErrorNotice.native.js +8 -36
- package/dist/cjs/SyncErrorNotice.native.js.map +1 -1
- package/dist/cjs/desk/DeskFormSidebar.cjs +1 -6
- package/dist/cjs/desk/DeskFormSidebar.native.js +1 -6
- package/dist/cjs/desk/DeskFormSidebar.native.js.map +1 -1
- package/dist/cjs/desk/DeskShell.cjs +0 -1
- package/dist/cjs/desk/DeskShell.native.js +0 -1
- package/dist/cjs/desk/DeskShell.native.js.map +1 -1
- package/dist/cjs/fields/Date/catalog.native.js +0 -1
- package/dist/cjs/fields/Date/catalog.native.js.map +1 -1
- package/dist/cjs/fields/Date/index.native.js +4 -363
- package/dist/cjs/fields/Date/index.native.js.map +1 -1
- package/dist/cjs/fields/FileUpload.cjs +50 -58
- package/dist/cjs/fields/FileUpload.native.js +50 -56
- package/dist/cjs/fields/FileUpload.native.js.map +1 -1
- package/dist/cjs/insights/InsightsFacetTags.cjs +16 -92
- package/dist/cjs/insights/InsightsFacetTags.native.js +15 -97
- package/dist/cjs/insights/InsightsFacetTags.native.js.map +1 -1
- package/dist/cjs/list/FacetBadge.cjs +4 -28
- package/dist/cjs/list/FacetBadge.native.js +4 -28
- package/dist/cjs/list/FacetBadge.native.js.map +1 -1
- package/dist/cjs/list/FacetRail.cjs +37 -128
- package/dist/cjs/list/FacetRail.native.js +32 -130
- package/dist/cjs/list/FacetRail.native.js.map +1 -1
- package/dist/cjs/list/ListControls.cjs +1 -3
- package/dist/cjs/list/ListControls.native.js +1 -3
- package/dist/cjs/list/ListControls.native.js.map +1 -1
- package/dist/cjs/list/ListControlsSheet.cjs +5 -15
- package/dist/cjs/list/ListControlsSheet.native.js +7 -17
- package/dist/cjs/list/ListControlsSheet.native.js.map +1 -1
- package/dist/cjs/list/ListSidebarToolbar.cjs +5 -20
- package/dist/cjs/list/ListSidebarToolbar.native.js +7 -22
- package/dist/cjs/list/ListSidebarToolbar.native.js.map +1 -1
- package/dist/cjs/list/RecordCard.cjs +95 -127
- package/dist/cjs/list/RecordCard.native.js +78 -96
- package/dist/cjs/list/RecordCard.native.js.map +1 -1
- package/dist/cjs/list/ShufflePanel.cjs +55 -36
- package/dist/cjs/list/ShufflePanel.native.js +62 -39
- package/dist/cjs/list/ShufflePanel.native.js.map +1 -1
- package/dist/cjs/list/listColumns.cjs +1 -1
- package/dist/cjs/list/listColumns.native.js +1 -1
- package/dist/cjs/list/listColumns.native.js.map +1 -1
- package/dist/cjs/record/RecordHero.cjs +7 -85
- package/dist/cjs/record/RecordHero.native.js +7 -85
- package/dist/cjs/record/RecordHero.native.js.map +1 -1
- package/dist/cjs/record/RecordPage.cjs +5 -10
- package/dist/cjs/record/RecordPage.native.js +5 -10
- package/dist/cjs/record/RecordPage.native.js.map +1 -1
- package/dist/cjs/report/ReportViewToolbar.cjs +76 -47
- package/dist/cjs/report/ReportViewToolbar.native.js +79 -48
- package/dist/cjs/report/ReportViewToolbar.native.js.map +1 -1
- package/dist/esm/FileBrowser/index.mjs +16 -26
- package/dist/esm/FileBrowser/index.mjs.map +1 -1
- package/dist/esm/FileBrowser/index.native.js +16 -26
- package/dist/esm/FileBrowser/index.native.js.map +1 -1
- package/dist/esm/FormSidebar.mjs +110 -197
- package/dist/esm/FormSidebar.mjs.map +1 -1
- package/dist/esm/FormSidebar.native.js +123 -219
- package/dist/esm/FormSidebar.native.js.map +1 -1
- package/dist/esm/FrappeAssignment.mjs +0 -3
- package/dist/esm/FrappeAssignment.mjs.map +1 -1
- package/dist/esm/FrappeAssignment.native.js +0 -3
- package/dist/esm/FrappeAssignment.native.js.map +1 -1
- package/dist/esm/FrappeConnectionIndicator.mjs +7 -26
- package/dist/esm/FrappeConnectionIndicator.mjs.map +1 -1
- package/dist/esm/FrappeConnectionIndicator.native.js +7 -26
- package/dist/esm/FrappeConnectionIndicator.native.js.map +1 -1
- package/dist/esm/FrappeDashboard.mjs +0 -2
- package/dist/esm/FrappeDashboard.mjs.map +1 -1
- package/dist/esm/FrappeDashboard.native.js +0 -2
- package/dist/esm/FrappeDashboard.native.js.map +1 -1
- package/dist/esm/FrappeForm.mjs +7 -6
- package/dist/esm/FrappeForm.mjs.map +1 -1
- package/dist/esm/FrappeForm.native.js +7 -6
- package/dist/esm/FrappeForm.native.js.map +1 -1
- package/dist/esm/FrappeFormActions.mjs +22 -32
- package/dist/esm/FrappeFormActions.mjs.map +1 -1
- package/dist/esm/FrappeFormActions.native.js +25 -33
- package/dist/esm/FrappeFormActions.native.js.map +1 -1
- package/dist/esm/FrappeImageView.mjs +48 -67
- package/dist/esm/FrappeImageView.mjs.map +1 -1
- package/dist/esm/FrappeImageView.native.js +48 -70
- package/dist/esm/FrappeImageView.native.js.map +1 -1
- package/dist/esm/FrappeKanban.mjs +0 -1
- package/dist/esm/FrappeKanban.mjs.map +1 -1
- package/dist/esm/FrappeKanban.native.js +0 -1
- package/dist/esm/FrappeKanban.native.js.map +1 -1
- package/dist/esm/FrappeLikedBy.mjs +1 -1
- package/dist/esm/FrappeLikedBy.mjs.map +1 -1
- package/dist/esm/FrappeLikedBy.native.js +1 -1
- package/dist/esm/FrappeLikedBy.native.js.map +1 -1
- package/dist/esm/FrappeListView.mjs +25 -69
- package/dist/esm/FrappeListView.mjs.map +1 -1
- package/dist/esm/FrappeListView.native.js +26 -73
- package/dist/esm/FrappeListView.native.js.map +1 -1
- package/dist/esm/FrappeRecordView.mjs +4 -0
- package/dist/esm/FrappeRecordView.mjs.map +1 -1
- package/dist/esm/FrappeRecordView.native.js +4 -0
- package/dist/esm/FrappeRecordView.native.js.map +1 -1
- package/dist/esm/FrappeReportBuilder.mjs +21 -18
- package/dist/esm/FrappeReportBuilder.mjs.map +1 -1
- package/dist/esm/FrappeReportBuilder.native.js +21 -18
- package/dist/esm/FrappeReportBuilder.native.js.map +1 -1
- package/dist/esm/FrappeReportView.mjs +3 -5
- package/dist/esm/FrappeReportView.mjs.map +1 -1
- package/dist/esm/FrappeReportView.native.js +3 -5
- package/dist/esm/FrappeReportView.native.js.map +1 -1
- package/dist/esm/SyncErrorNotice.mjs +10 -38
- package/dist/esm/SyncErrorNotice.mjs.map +1 -1
- package/dist/esm/SyncErrorNotice.native.js +10 -38
- package/dist/esm/SyncErrorNotice.native.js.map +1 -1
- package/dist/esm/desk/DeskFormSidebar.mjs +1 -6
- package/dist/esm/desk/DeskFormSidebar.mjs.map +1 -1
- package/dist/esm/desk/DeskFormSidebar.native.js +1 -6
- package/dist/esm/desk/DeskFormSidebar.native.js.map +1 -1
- package/dist/esm/desk/DeskShell.mjs +0 -1
- package/dist/esm/desk/DeskShell.mjs.map +1 -1
- package/dist/esm/desk/DeskShell.native.js +0 -1
- package/dist/esm/desk/DeskShell.native.js.map +1 -1
- package/dist/esm/fields/Date/catalog.mjs.map +1 -1
- package/dist/esm/fields/Date/catalog.native.js +0 -1
- package/dist/esm/fields/Date/catalog.native.js.map +1 -1
- package/dist/esm/fields/Date/index.native.js +2 -361
- package/dist/esm/fields/Date/index.native.js.map +1 -1
- package/dist/esm/fields/FileUpload.mjs +53 -61
- package/dist/esm/fields/FileUpload.mjs.map +1 -1
- package/dist/esm/fields/FileUpload.native.js +53 -59
- package/dist/esm/fields/FileUpload.native.js.map +1 -1
- package/dist/esm/insights/InsightsFacetTags.mjs +18 -94
- package/dist/esm/insights/InsightsFacetTags.mjs.map +1 -1
- package/dist/esm/insights/InsightsFacetTags.native.js +17 -99
- package/dist/esm/insights/InsightsFacetTags.native.js.map +1 -1
- package/dist/esm/list/FacetBadge.mjs +5 -29
- package/dist/esm/list/FacetBadge.mjs.map +1 -1
- package/dist/esm/list/FacetBadge.native.js +5 -29
- package/dist/esm/list/FacetBadge.native.js.map +1 -1
- package/dist/esm/list/FacetRail.mjs +40 -131
- package/dist/esm/list/FacetRail.mjs.map +1 -1
- package/dist/esm/list/FacetRail.native.js +35 -133
- package/dist/esm/list/FacetRail.native.js.map +1 -1
- package/dist/esm/list/ListControls.mjs +1 -3
- package/dist/esm/list/ListControls.mjs.map +1 -1
- package/dist/esm/list/ListControls.native.js +1 -3
- package/dist/esm/list/ListControls.native.js.map +1 -1
- package/dist/esm/list/ListControlsSheet.mjs +6 -16
- package/dist/esm/list/ListControlsSheet.mjs.map +1 -1
- package/dist/esm/list/ListControlsSheet.native.js +8 -18
- package/dist/esm/list/ListControlsSheet.native.js.map +1 -1
- package/dist/esm/list/ListSidebarToolbar.mjs +6 -21
- package/dist/esm/list/ListSidebarToolbar.mjs.map +1 -1
- package/dist/esm/list/ListSidebarToolbar.native.js +8 -23
- package/dist/esm/list/ListSidebarToolbar.native.js.map +1 -1
- package/dist/esm/list/RecordCard.mjs +95 -127
- package/dist/esm/list/RecordCard.mjs.map +1 -1
- package/dist/esm/list/RecordCard.native.js +78 -96
- package/dist/esm/list/RecordCard.native.js.map +1 -1
- package/dist/esm/list/ShufflePanel.mjs +57 -38
- package/dist/esm/list/ShufflePanel.mjs.map +1 -1
- package/dist/esm/list/ShufflePanel.native.js +64 -41
- package/dist/esm/list/ShufflePanel.native.js.map +1 -1
- package/dist/esm/list/listColumns.mjs +1 -1
- package/dist/esm/list/listColumns.mjs.map +1 -1
- package/dist/esm/list/listColumns.native.js +1 -1
- package/dist/esm/list/listColumns.native.js.map +1 -1
- package/dist/esm/record/RecordHero.mjs +8 -86
- package/dist/esm/record/RecordHero.mjs.map +1 -1
- package/dist/esm/record/RecordHero.native.js +8 -86
- package/dist/esm/record/RecordHero.native.js.map +1 -1
- package/dist/esm/record/RecordPage.mjs +6 -11
- package/dist/esm/record/RecordPage.mjs.map +1 -1
- package/dist/esm/record/RecordPage.native.js +6 -11
- package/dist/esm/record/RecordPage.native.js.map +1 -1
- package/dist/esm/report/ReportViewToolbar.mjs +78 -49
- package/dist/esm/report/ReportViewToolbar.mjs.map +1 -1
- package/dist/esm/report/ReportViewToolbar.native.js +81 -50
- package/dist/esm/report/ReportViewToolbar.native.js.map +1 -1
- package/dist/jsx/FileBrowser/index.mjs +16 -26
- package/dist/jsx/FileBrowser/index.mjs.map +1 -1
- package/dist/jsx/FileBrowser/index.native.js +15 -25
- package/dist/jsx/FileBrowser/index.native.js.map +1 -1
- package/dist/jsx/FormSidebar.mjs +110 -197
- package/dist/jsx/FormSidebar.mjs.map +1 -1
- package/dist/jsx/FormSidebar.native.js +120 -216
- package/dist/jsx/FormSidebar.native.js.map +1 -1
- package/dist/jsx/FrappeAssignment.mjs +0 -3
- package/dist/jsx/FrappeAssignment.mjs.map +1 -1
- package/dist/jsx/FrappeAssignment.native.js +0 -3
- package/dist/jsx/FrappeAssignment.native.js.map +1 -1
- package/dist/jsx/FrappeConnectionIndicator.mjs +7 -26
- package/dist/jsx/FrappeConnectionIndicator.mjs.map +1 -1
- package/dist/jsx/FrappeConnectionIndicator.native.js +5 -24
- package/dist/jsx/FrappeConnectionIndicator.native.js.map +1 -1
- package/dist/jsx/FrappeDashboard.mjs +0 -2
- package/dist/jsx/FrappeDashboard.mjs.map +1 -1
- package/dist/jsx/FrappeDashboard.native.js +0 -2
- package/dist/jsx/FrappeDashboard.native.js.map +1 -1
- package/dist/jsx/FrappeForm.mjs +7 -6
- package/dist/jsx/FrappeForm.mjs.map +1 -1
- package/dist/jsx/FrappeForm.native.js +6 -5
- package/dist/jsx/FrappeForm.native.js.map +1 -1
- package/dist/jsx/FrappeFormActions.mjs +22 -32
- package/dist/jsx/FrappeFormActions.mjs.map +1 -1
- package/dist/jsx/FrappeFormActions.native.js +23 -31
- package/dist/jsx/FrappeFormActions.native.js.map +1 -1
- package/dist/jsx/FrappeImageView.mjs +48 -67
- package/dist/jsx/FrappeImageView.mjs.map +1 -1
- package/dist/jsx/FrappeImageView.native.js +46 -68
- package/dist/jsx/FrappeImageView.native.js.map +1 -1
- package/dist/jsx/FrappeKanban.mjs +0 -1
- package/dist/jsx/FrappeKanban.mjs.map +1 -1
- package/dist/jsx/FrappeKanban.native.js +0 -1
- package/dist/jsx/FrappeKanban.native.js.map +1 -1
- package/dist/jsx/FrappeLikedBy.mjs +1 -1
- package/dist/jsx/FrappeLikedBy.mjs.map +1 -1
- package/dist/jsx/FrappeLikedBy.native.js +1 -1
- package/dist/jsx/FrappeLikedBy.native.js.map +1 -1
- package/dist/jsx/FrappeListView.mjs +25 -69
- package/dist/jsx/FrappeListView.mjs.map +1 -1
- package/dist/jsx/FrappeListView.native.js +25 -72
- package/dist/jsx/FrappeListView.native.js.map +1 -1
- package/dist/jsx/FrappeRecordView.mjs +4 -0
- package/dist/jsx/FrappeRecordView.mjs.map +1 -1
- package/dist/jsx/FrappeRecordView.native.js +4 -0
- package/dist/jsx/FrappeRecordView.native.js.map +1 -1
- package/dist/jsx/FrappeReportBuilder.mjs +21 -18
- package/dist/jsx/FrappeReportBuilder.mjs.map +1 -1
- package/dist/jsx/FrappeReportBuilder.native.js +21 -18
- package/dist/jsx/FrappeReportBuilder.native.js.map +1 -1
- package/dist/jsx/FrappeReportView.mjs +3 -5
- package/dist/jsx/FrappeReportView.mjs.map +1 -1
- package/dist/jsx/FrappeReportView.native.js +2 -4
- package/dist/jsx/FrappeReportView.native.js.map +1 -1
- package/dist/jsx/SyncErrorNotice.mjs +10 -38
- package/dist/jsx/SyncErrorNotice.mjs.map +1 -1
- package/dist/jsx/SyncErrorNotice.native.js +8 -36
- package/dist/jsx/SyncErrorNotice.native.js.map +1 -1
- package/dist/jsx/desk/DeskFormSidebar.mjs +1 -6
- package/dist/jsx/desk/DeskFormSidebar.mjs.map +1 -1
- package/dist/jsx/desk/DeskFormSidebar.native.js +1 -6
- package/dist/jsx/desk/DeskFormSidebar.native.js.map +1 -1
- package/dist/jsx/desk/DeskShell.mjs +0 -1
- package/dist/jsx/desk/DeskShell.mjs.map +1 -1
- package/dist/jsx/desk/DeskShell.native.js +0 -1
- package/dist/jsx/desk/DeskShell.native.js.map +1 -1
- package/dist/jsx/fields/Date/catalog.mjs.map +1 -1
- package/dist/jsx/fields/Date/catalog.native.js +0 -1
- package/dist/jsx/fields/Date/catalog.native.js.map +1 -1
- package/dist/jsx/fields/Date/index.native.js +4 -363
- package/dist/jsx/fields/Date/index.native.js.map +1 -1
- package/dist/jsx/fields/FileUpload.mjs +53 -61
- package/dist/jsx/fields/FileUpload.mjs.map +1 -1
- package/dist/jsx/fields/FileUpload.native.js +50 -56
- package/dist/jsx/fields/FileUpload.native.js.map +1 -1
- package/dist/jsx/insights/InsightsFacetTags.mjs +18 -94
- package/dist/jsx/insights/InsightsFacetTags.mjs.map +1 -1
- package/dist/jsx/insights/InsightsFacetTags.native.js +15 -97
- package/dist/jsx/insights/InsightsFacetTags.native.js.map +1 -1
- package/dist/jsx/list/FacetBadge.mjs +5 -29
- package/dist/jsx/list/FacetBadge.mjs.map +1 -1
- package/dist/jsx/list/FacetBadge.native.js +4 -28
- package/dist/jsx/list/FacetBadge.native.js.map +1 -1
- package/dist/jsx/list/FacetRail.mjs +40 -131
- package/dist/jsx/list/FacetRail.mjs.map +1 -1
- package/dist/jsx/list/FacetRail.native.js +32 -130
- package/dist/jsx/list/FacetRail.native.js.map +1 -1
- package/dist/jsx/list/ListControls.mjs +1 -3
- package/dist/jsx/list/ListControls.mjs.map +1 -1
- package/dist/jsx/list/ListControls.native.js +1 -3
- package/dist/jsx/list/ListControls.native.js.map +1 -1
- package/dist/jsx/list/ListControlsSheet.mjs +6 -16
- package/dist/jsx/list/ListControlsSheet.mjs.map +1 -1
- package/dist/jsx/list/ListControlsSheet.native.js +7 -17
- package/dist/jsx/list/ListControlsSheet.native.js.map +1 -1
- package/dist/jsx/list/ListSidebarToolbar.mjs +6 -21
- package/dist/jsx/list/ListSidebarToolbar.mjs.map +1 -1
- package/dist/jsx/list/ListSidebarToolbar.native.js +7 -22
- package/dist/jsx/list/ListSidebarToolbar.native.js.map +1 -1
- package/dist/jsx/list/RecordCard.mjs +95 -127
- package/dist/jsx/list/RecordCard.mjs.map +1 -1
- package/dist/jsx/list/RecordCard.native.js +78 -96
- package/dist/jsx/list/RecordCard.native.js.map +1 -1
- package/dist/jsx/list/ShufflePanel.mjs +57 -38
- package/dist/jsx/list/ShufflePanel.mjs.map +1 -1
- package/dist/jsx/list/ShufflePanel.native.js +62 -39
- package/dist/jsx/list/ShufflePanel.native.js.map +1 -1
- package/dist/jsx/list/listColumns.mjs +1 -1
- package/dist/jsx/list/listColumns.mjs.map +1 -1
- package/dist/jsx/list/listColumns.native.js +1 -1
- package/dist/jsx/list/listColumns.native.js.map +1 -1
- package/dist/jsx/record/RecordHero.mjs +8 -86
- package/dist/jsx/record/RecordHero.mjs.map +1 -1
- package/dist/jsx/record/RecordHero.native.js +7 -85
- package/dist/jsx/record/RecordHero.native.js.map +1 -1
- package/dist/jsx/record/RecordPage.mjs +6 -11
- package/dist/jsx/record/RecordPage.mjs.map +1 -1
- package/dist/jsx/record/RecordPage.native.js +5 -10
- package/dist/jsx/record/RecordPage.native.js.map +1 -1
- package/dist/jsx/report/ReportViewToolbar.mjs +78 -49
- package/dist/jsx/report/ReportViewToolbar.mjs.map +1 -1
- package/dist/jsx/report/ReportViewToolbar.native.js +79 -48
- package/dist/jsx/report/ReportViewToolbar.native.js.map +1 -1
- package/package.json +16 -16
- package/src/FileBrowser/index.tsx +11 -15
- package/src/FormSidebar.stories.tsx +1 -1
- package/src/FormSidebar.tsx +146 -251
- package/src/FrappeAssignment.tsx +0 -3
- package/src/FrappeConnectionIndicator.tsx +6 -28
- package/src/FrappeDashboard.spec.tsx +7 -3
- package/src/FrappeDashboard.tsx +0 -2
- package/src/FrappeForm.connections.spec.tsx +2 -2
- package/src/FrappeForm.deskSemantics.spec.tsx +2 -2
- package/src/FrappeForm.lifecycle.spec.tsx +27 -27
- package/src/FrappeForm.tsx +11 -7
- package/src/FrappeFormActions.tsx +24 -38
- package/src/FrappeImageView.stories.tsx +1 -6
- package/src/FrappeImageView.tsx +52 -66
- package/src/FrappeKanban.tsx +0 -1
- package/src/FrappeLikedBy.tsx +1 -1
- package/src/FrappeListView.controls.spec.tsx +3 -2
- package/src/FrappeListView.spec.tsx +7 -3
- package/src/FrappeListView.tsx +23 -56
- package/src/FrappeRecordView.tsx +16 -3
- package/src/FrappeReportBuilder.tsx +21 -19
- package/src/FrappeReportView.tsx +3 -6
- package/src/SyncErrorNotice.spec.tsx +7 -12
- package/src/SyncErrorNotice.stories.tsx +2 -4
- package/src/SyncErrorNotice.tsx +13 -41
- package/src/desk/DeskFormSidebar.tsx +1 -2
- package/src/desk/DeskShell.tsx +1 -1
- package/src/desk/deskDocumentRoutes.spec.tsx +7 -4
- package/src/fields/Date/catalog.tsx +6 -7
- package/src/fields/Date/nativeIsCatalog.spec.tsx +26 -0
- package/src/fields/Date/typeParity.spec.tsx +26 -102
- package/src/fields/FileUpload.spec.tsx +18 -3
- package/src/fields/FileUpload.tsx +64 -68
- package/src/frappeRemainder.designLaw.spec.ts +8 -7
- package/src/insights/InsightsFacetTags.tsx +21 -102
- package/src/list/FacetBadge.tsx +7 -29
- package/src/list/FacetRail.spec.tsx +11 -10
- package/src/list/FacetRail.tsx +49 -161
- package/src/list/ListControls.tsx +1 -3
- package/src/list/ListControlsSheet.tsx +10 -12
- package/src/list/ListSidebarToolbar.tsx +7 -18
- package/src/list/RecordCard.native.tsx +65 -71
- package/src/list/RecordCard.spec.tsx +8 -5
- package/src/list/RecordCard.tsx +110 -129
- package/src/list/ShufflePanel.tsx +63 -38
- package/src/list/listColumns.tsx +1 -1
- package/src/record/RecordHero.tsx +11 -51
- package/src/record/RecordPage.tsx +8 -11
- package/src/report/ReportViewToolbar.spec.tsx +45 -3
- package/src/report/ReportViewToolbar.tsx +113 -62
- package/src/useFrappeForm.spec.tsx +1 -1
- package/types/FileBrowser/index.d.ts.map +1 -1
- package/types/FormSidebar.d.ts +13 -3
- package/types/FormSidebar.d.ts.map +1 -1
- package/types/FrappeAssignment.d.ts.map +1 -1
- package/types/FrappeConnectionIndicator.d.ts +2 -1
- package/types/FrappeConnectionIndicator.d.ts.map +1 -1
- package/types/FrappeDashboard.d.ts.map +1 -1
- package/types/FrappeFormActions.d.ts.map +1 -1
- package/types/FrappeImageView.d.ts.map +1 -1
- package/types/FrappeKanban.d.ts.map +1 -1
- package/types/FrappeListView.d.ts.map +1 -1
- package/types/FrappeRecordView.d.ts.map +1 -1
- package/types/FrappeReportBuilder.d.ts.map +1 -1
- package/types/FrappeReportView.d.ts.map +1 -1
- package/types/SyncErrorNotice.d.ts +4 -6
- package/types/SyncErrorNotice.d.ts.map +1 -1
- package/types/desk/DeskFormSidebar.d.ts.map +1 -1
- package/types/desk/DeskShell.d.ts.map +1 -1
- package/types/fields/Date/catalog.d.ts +5 -4
- package/types/fields/Date/catalog.d.ts.map +1 -1
- package/types/fields/FileUpload.d.ts.map +1 -1
- package/types/insights/InsightsFacetTags.d.ts +4 -1
- package/types/insights/InsightsFacetTags.d.ts.map +1 -1
- package/types/list/FacetBadge.d.ts +3 -3
- package/types/list/FacetBadge.d.ts.map +1 -1
- package/types/list/FacetRail.d.ts +7 -5
- package/types/list/FacetRail.d.ts.map +1 -1
- package/types/list/ListControls.d.ts.map +1 -1
- package/types/list/ListControlsSheet.d.ts.map +1 -1
- package/types/list/ListSidebarToolbar.d.ts.map +1 -1
- package/types/list/RecordCard.d.ts +6 -6
- package/types/list/RecordCard.d.ts.map +1 -1
- package/types/list/RecordCard.native.d.ts +4 -3
- package/types/list/RecordCard.native.d.ts.map +1 -1
- package/types/list/ShufflePanel.d.ts +8 -3
- package/types/list/ShufflePanel.d.ts.map +1 -1
- package/types/record/RecordHero.d.ts +5 -1
- package/types/record/RecordHero.d.ts.map +1 -1
- package/types/record/RecordPage.d.ts.map +1 -1
- package/types/report/ReportViewToolbar.d.ts.map +1 -1
- package/dist/cjs/fields/Date/dateTimePickerLoader.cjs +0 -38
- package/dist/cjs/fields/Date/dateTimePickerLoader.native.js +0 -42
- package/dist/cjs/fields/Date/dateTimePickerLoader.native.js.map +0 -1
- package/dist/cjs/fields/Date/sheetKeyboard.cjs +0 -54
- package/dist/cjs/fields/Date/sheetKeyboard.native.js +0 -57
- package/dist/cjs/fields/Date/sheetKeyboard.native.js.map +0 -1
- package/dist/esm/fields/Date/dateTimePickerLoader.mjs +0 -13
- package/dist/esm/fields/Date/dateTimePickerLoader.mjs.map +0 -1
- package/dist/esm/fields/Date/dateTimePickerLoader.native.js +0 -14
- package/dist/esm/fields/Date/dateTimePickerLoader.native.js.map +0 -1
- package/dist/esm/fields/Date/sheetKeyboard.mjs +0 -21
- package/dist/esm/fields/Date/sheetKeyboard.mjs.map +0 -1
- package/dist/esm/fields/Date/sheetKeyboard.native.js +0 -21
- package/dist/esm/fields/Date/sheetKeyboard.native.js.map +0 -1
- package/dist/jsx/fields/Date/dateTimePickerLoader.mjs +0 -13
- package/dist/jsx/fields/Date/dateTimePickerLoader.mjs.map +0 -1
- package/dist/jsx/fields/Date/dateTimePickerLoader.native.js +0 -42
- package/dist/jsx/fields/Date/dateTimePickerLoader.native.js.map +0 -1
- package/dist/jsx/fields/Date/sheetKeyboard.mjs +0 -21
- package/dist/jsx/fields/Date/sheetKeyboard.mjs.map +0 -1
- package/dist/jsx/fields/Date/sheetKeyboard.native.js +0 -57
- package/dist/jsx/fields/Date/sheetKeyboard.native.js.map +0 -1
- package/src/fields/Date/dateTimePickerLoader.ts +0 -25
- package/src/fields/Date/index.native.tsx +0 -445
- package/src/fields/Date/nativeFallback.spec.tsx +0 -21
- package/src/fields/Date/nativePresentation.spec.tsx +0 -278
- package/src/fields/Date/sheetKeyboard.spec.ts +0 -60
- package/src/fields/Date/sheetKeyboard.ts +0 -45
- package/types/fields/Date/dateTimePickerLoader.d.ts +0 -11
- package/types/fields/Date/dateTimePickerLoader.d.ts.map +0 -1
- package/types/fields/Date/index.native.d.ts +0 -14
- package/types/fields/Date/index.native.d.ts.map +0 -1
- package/types/fields/Date/sheetKeyboard.d.ts +0 -20
- package/types/fields/Date/sheetKeyboard.d.ts.map +0 -1
package/src/FrappeDashboard.tsx
CHANGED
|
@@ -206,7 +206,6 @@ function LiveDashboardContent<TDoc extends { name: string; doctype: string }>({
|
|
|
206
206
|
`loading` (not bare `disabled`) is the derived busy state. */}
|
|
207
207
|
<Button
|
|
208
208
|
size="$2"
|
|
209
|
-
circular
|
|
210
209
|
icon={ArrowsClockwiseIcon}
|
|
211
210
|
onPress={onRefresh}
|
|
212
211
|
loading={isRefreshing || isLiveLoading}
|
|
@@ -328,7 +327,6 @@ export function FrappeDashboard<TDoc extends { name: string; doctype: string }>(
|
|
|
328
327
|
{/* LC-54: house Button, own-box floor (see the live-path refresh). */}
|
|
329
328
|
<Button
|
|
330
329
|
size="$2"
|
|
331
|
-
circular
|
|
332
330
|
icon={ArrowsClockwiseIcon}
|
|
333
331
|
onPress={bumpRefresh}
|
|
334
332
|
loading={isRefreshing}
|
|
@@ -128,13 +128,13 @@ describe("FrappeForm connections, schema mode", () => {
|
|
|
128
128
|
|
|
129
129
|
it("a new record has no connections yet", async () => {
|
|
130
130
|
renderForm({});
|
|
131
|
-
await waitFor(() => expect(screen.
|
|
131
|
+
await waitFor(() => expect(screen.getByLabelText("Save")).toBeTruthy());
|
|
132
132
|
expect(screen.queryByText("Connections")).toBeNull();
|
|
133
133
|
});
|
|
134
134
|
|
|
135
135
|
it("showConnections={false} leaves the tab out", async () => {
|
|
136
136
|
renderForm({ name: "bulbasaur", showConnections: false });
|
|
137
|
-
await waitFor(() => expect(screen.
|
|
137
|
+
await waitFor(() => expect(screen.getByLabelText("Save")).toBeTruthy());
|
|
138
138
|
expect(screen.queryByText("Connections")).toBeNull();
|
|
139
139
|
});
|
|
140
140
|
});
|
|
@@ -192,7 +192,7 @@ describe("FrappeForm resolves a doctype through the desk form engine", () => {
|
|
|
192
192
|
it("save refuses an empty field that mandatory_depends_on made required", async () => {
|
|
193
193
|
renderForm({ name: "LOAN-APPROVED", roles: ["Loan Officer"] });
|
|
194
194
|
await expectProbe("status", "val=Approved");
|
|
195
|
-
fireEvent.click(screen.
|
|
195
|
+
fireEvent.click(screen.getByLabelText("Save"));
|
|
196
196
|
await expectProbe("reason", "err=Reason is required");
|
|
197
197
|
});
|
|
198
198
|
|
|
@@ -276,7 +276,7 @@ describe("FrappeForm resolves a doctype through the desk form engine", () => {
|
|
|
276
276
|
renderForm();
|
|
277
277
|
await screen.findByTestId("probe-status");
|
|
278
278
|
expect(screen.getByText("Name")).toBeTruthy();
|
|
279
|
-
fireEvent.click(screen.
|
|
279
|
+
fireEvent.click(screen.getByLabelText("Save"));
|
|
280
280
|
await waitFor(() => {
|
|
281
281
|
expect(screen.getByText("Name is required")).toBeTruthy();
|
|
282
282
|
});
|
|
@@ -132,7 +132,7 @@ describe("FrappeForm runs the desk docstatus lifecycle", () => {
|
|
|
132
132
|
renderForm(fixtures, { name: "LOAN-DRAFT" });
|
|
133
133
|
await expectProbe("employee_name", "val=Ada Lovelace");
|
|
134
134
|
await expectStatus("draft");
|
|
135
|
-
expect(screen.
|
|
135
|
+
expect(screen.queryByLabelText("Save")).toBeNull();
|
|
136
136
|
|
|
137
137
|
fireEvent.click(screen.getByText("Submit"));
|
|
138
138
|
await waitFor(() => expect(confirm).toHaveBeenCalledWith("Permanently Submit LOAN-DRAFT?"));
|
|
@@ -172,7 +172,7 @@ describe("FrappeForm runs the desk docstatus lifecycle", () => {
|
|
|
172
172
|
|
|
173
173
|
fireEvent.click(screen.getByTestId("set-remarks"));
|
|
174
174
|
await expectStatus("notSaved");
|
|
175
|
-
expect(screen.
|
|
175
|
+
expect(screen.getByLabelText("Save")).toBeTruthy();
|
|
176
176
|
expect(screen.queryByText("Submit")).toBeNull();
|
|
177
177
|
});
|
|
178
178
|
|
|
@@ -185,8 +185,8 @@ describe("FrappeForm runs the desk docstatus lifecycle", () => {
|
|
|
185
185
|
onAmend: vi.fn(),
|
|
186
186
|
});
|
|
187
187
|
await expectStatus("submitted");
|
|
188
|
-
expect(screen.
|
|
189
|
-
expect(screen.
|
|
188
|
+
expect(screen.queryByLabelText("Delete")).toBeNull();
|
|
189
|
+
expect(screen.getByLabelText("Close")).toBeTruthy();
|
|
190
190
|
expect(screen.getByTestId("frappe-form-cancel-document").textContent).toContain(
|
|
191
191
|
"Cancel Document",
|
|
192
192
|
);
|
|
@@ -196,7 +196,7 @@ describe("FrappeForm runs the desk docstatus lifecycle", () => {
|
|
|
196
196
|
await expectStatus("cancelled");
|
|
197
197
|
await waitFor(async () => expect(await docstatusOf(fixtures, "LOAN-SUBMITTED")).toBe(2));
|
|
198
198
|
expect(screen.getByText("Amend")).toBeTruthy();
|
|
199
|
-
expect(screen.
|
|
199
|
+
expect(screen.getByLabelText("Delete")).toBeTruthy();
|
|
200
200
|
});
|
|
201
201
|
|
|
202
202
|
it("an allow_on_submit edit turns Cancel into Update, which keeps the document submitted", async () => {
|
|
@@ -205,10 +205,10 @@ describe("FrappeForm runs the desk docstatus lifecycle", () => {
|
|
|
205
205
|
await expectStatus("submitted");
|
|
206
206
|
|
|
207
207
|
fireEvent.click(screen.getByTestId("set-remarks"));
|
|
208
|
-
await waitFor(() => expect(screen.
|
|
208
|
+
await waitFor(() => expect(screen.getByLabelText("Update")).toBeTruthy());
|
|
209
209
|
expect(screen.queryByTestId("frappe-form-cancel-document")).toBeNull();
|
|
210
210
|
|
|
211
|
-
fireEvent.click(screen.
|
|
211
|
+
fireEvent.click(screen.getByLabelText("Update"));
|
|
212
212
|
await waitFor(async () =>
|
|
213
213
|
expect((await fixtures.getDoc("Asset Loan", "LOAN-SUBMITTED"))?.remarks).toBe("edited"),
|
|
214
214
|
);
|
|
@@ -255,7 +255,7 @@ describe("FrappeForm runs the desk docstatus lifecycle", () => {
|
|
|
255
255
|
await expectStatus("notSaved");
|
|
256
256
|
await expectProbe("employee_name", "val=Katherine Johnson");
|
|
257
257
|
await expectProbe("serial_no", "ro=false");
|
|
258
|
-
fireEvent.click(screen.
|
|
258
|
+
fireEvent.click(screen.getByLabelText("Save"));
|
|
259
259
|
await waitFor(async () => {
|
|
260
260
|
const amendments = await fixtures.getList("Asset Loan", {
|
|
261
261
|
filters: { amended_from: "LOAN-CANCELLED" },
|
|
@@ -279,7 +279,7 @@ describe("FrappeForm runs the desk docstatus lifecycle", () => {
|
|
|
279
279
|
renderForm(corpus(), { name: "LOAN-SUBMITTED", roles: ["Loan Officer"], onCancel: vi.fn() });
|
|
280
280
|
await expectStatus("submitted");
|
|
281
281
|
expect(screen.queryByTestId("frappe-form-cancel-document")).toBeNull();
|
|
282
|
-
expect(screen.
|
|
282
|
+
expect(screen.getByLabelText("Cancel")).toBeTruthy();
|
|
283
283
|
cleanup();
|
|
284
284
|
|
|
285
285
|
renderForm(corpus(), { name: "LOAN-CANCELLED", roles: ["Loan Officer"], onAmend: vi.fn() });
|
|
@@ -289,7 +289,7 @@ describe("FrappeForm runs the desk docstatus lifecycle", () => {
|
|
|
289
289
|
|
|
290
290
|
renderForm(corpus(), { name: "LOAN-DRAFT", roles: ["Loan Clerk"] });
|
|
291
291
|
await expectStatus("draft");
|
|
292
|
-
expect(screen.
|
|
292
|
+
expect(screen.getByLabelText("Save")).toBeTruthy();
|
|
293
293
|
expect(screen.queryByText("Submit")).toBeNull();
|
|
294
294
|
});
|
|
295
295
|
|
|
@@ -305,7 +305,7 @@ describe("FrappeForm runs the desk docstatus lifecycle", () => {
|
|
|
305
305
|
renderForm(corpus(), { name: "LOAN-SUBMITTED", roles: ["Auditor"], onCancel: vi.fn() });
|
|
306
306
|
await expectStatus("submitted");
|
|
307
307
|
expect(screen.queryByTestId("frappe-form-cancel-document")).toBeNull();
|
|
308
|
-
expect(screen.
|
|
308
|
+
expect(screen.getByLabelText("Cancel")).toBeTruthy();
|
|
309
309
|
cleanup();
|
|
310
310
|
|
|
311
311
|
renderForm(corpus(), { name: "LOAN-CANCELLED", roles: ["Auditor"], onAmend: vi.fn() });
|
|
@@ -326,11 +326,11 @@ describe("a read-only record view keeps desk's lifecycle beside Edit", () => {
|
|
|
326
326
|
const onEdit = vi.fn();
|
|
327
327
|
renderForm(fixtures, { name: "LOAN-DRAFT", onEdit, onCancel: vi.fn(), onDelete: vi.fn() });
|
|
328
328
|
await expectStatus("draft");
|
|
329
|
-
expect(screen.
|
|
330
|
-
expect(screen.
|
|
331
|
-
expect(screen.
|
|
329
|
+
expect(screen.queryByLabelText("Save")).toBeNull();
|
|
330
|
+
expect(screen.queryByLabelText("Cancel")).toBeNull();
|
|
331
|
+
expect(screen.getByLabelText("Delete")).toBeTruthy();
|
|
332
332
|
|
|
333
|
-
fireEvent.click(screen.
|
|
333
|
+
fireEvent.click(screen.getByLabelText("Edit"));
|
|
334
334
|
expect(onEdit).toHaveBeenCalledTimes(1);
|
|
335
335
|
|
|
336
336
|
fireEvent.click(screen.getByText("Submit"));
|
|
@@ -338,30 +338,30 @@ describe("a read-only record view keeps desk's lifecycle beside Edit", () => {
|
|
|
338
338
|
await waitFor(async () => expect(await docstatusOf(fixtures, "LOAN-DRAFT")).toBe(1));
|
|
339
339
|
await expectStatus("submitted");
|
|
340
340
|
expect(screen.getByText("Cancel Document")).toBeTruthy();
|
|
341
|
-
expect(screen.
|
|
342
|
-
expect(screen.
|
|
341
|
+
expect(screen.getByLabelText("Edit")).toBeTruthy();
|
|
342
|
+
expect(screen.queryByLabelText("Delete")).toBeNull();
|
|
343
343
|
});
|
|
344
344
|
|
|
345
345
|
it("a submitted document offers Cancel Document, and its allow_on_submit field keeps Edit", async () => {
|
|
346
346
|
const fixtures = corpus();
|
|
347
347
|
renderForm(fixtures, { name: "LOAN-SUBMITTED", onEdit: vi.fn(), onCancel: vi.fn() });
|
|
348
348
|
await expectStatus("submitted");
|
|
349
|
-
expect(screen.
|
|
350
|
-
expect(screen.
|
|
351
|
-
expect(screen.
|
|
349
|
+
expect(screen.getByLabelText("Edit")).toBeTruthy();
|
|
350
|
+
expect(screen.queryByLabelText("Cancel")).toBeNull();
|
|
351
|
+
expect(screen.queryByLabelText("Close")).toBeNull();
|
|
352
352
|
|
|
353
353
|
fireEvent.click(screen.getByText("Cancel Document"));
|
|
354
354
|
await waitFor(() => expect(confirm).toHaveBeenCalledWith("Permanently Cancel LOAN-SUBMITTED?"));
|
|
355
355
|
await waitFor(async () => expect(await docstatusOf(fixtures, "LOAN-SUBMITTED")).toBe(2));
|
|
356
356
|
await expectStatus("cancelled");
|
|
357
|
-
expect(screen.
|
|
357
|
+
expect(screen.queryByLabelText("Edit")).toBeNull();
|
|
358
358
|
});
|
|
359
359
|
|
|
360
360
|
it("a cancelled document offers Amend and no Edit", async () => {
|
|
361
361
|
const onAmend = vi.fn();
|
|
362
362
|
renderForm(corpus(), { name: "LOAN-CANCELLED", onEdit: vi.fn(), onAmend });
|
|
363
363
|
await expectStatus("cancelled");
|
|
364
|
-
expect(screen.
|
|
364
|
+
expect(screen.queryByLabelText("Edit")).toBeNull();
|
|
365
365
|
|
|
366
366
|
fireEvent.click(screen.getByText("Amend"));
|
|
367
367
|
await waitFor(() => expect(onAmend).toHaveBeenCalled());
|
|
@@ -374,7 +374,7 @@ describe("a submittable doctype's routed pages", () => {
|
|
|
374
374
|
const pushed = renderPage(corpus(), "/loans/LOAN-DRAFT");
|
|
375
375
|
await expectStatus("draft");
|
|
376
376
|
expect(screen.getByText("Submit")).toBeTruthy();
|
|
377
|
-
expect(screen.
|
|
377
|
+
expect(screen.queryByLabelText("Save")).toBeNull();
|
|
378
378
|
|
|
379
379
|
// LC-145: Submit is the bar's one action, so Edit rides the "…" menu.
|
|
380
380
|
fireEvent.click(screen.getByTestId("frappe-form-menu"));
|
|
@@ -386,14 +386,14 @@ describe("a submittable doctype's routed pages", () => {
|
|
|
386
386
|
const pushed = renderPage(corpus(), "/loans/LOAN-DRAFT/edit");
|
|
387
387
|
await expectStatus("draft");
|
|
388
388
|
expect(screen.getByText("Submit")).toBeTruthy();
|
|
389
|
-
expect(screen.
|
|
389
|
+
expect(screen.queryByLabelText("Edit")).toBeNull();
|
|
390
390
|
|
|
391
391
|
fireEvent.click(screen.getByTestId("set-remarks"));
|
|
392
392
|
await expectStatus("notSaved");
|
|
393
|
-
expect(screen.
|
|
393
|
+
expect(screen.getByLabelText("Save")).toBeTruthy();
|
|
394
394
|
expect(screen.queryByText("Submit")).toBeNull();
|
|
395
395
|
|
|
396
|
-
fireEvent.click(screen.
|
|
396
|
+
fireEvent.click(screen.getAllByLabelText(/^(Cancel|Back to .+ list)$/)[0]!);
|
|
397
397
|
expect(pushed).toEqual(["/loans/LOAN-DRAFT"]);
|
|
398
398
|
});
|
|
399
399
|
|
|
@@ -449,7 +449,7 @@ describe("the leave button stays live while a write is in flight (LC-30)", () =>
|
|
|
449
449
|
const onCancel = vi.fn();
|
|
450
450
|
renderForm(fixtures, { name: "LOAN-SUBMITTED", onCancel });
|
|
451
451
|
await expectStatus("submitted");
|
|
452
|
-
expect(screen.getByTestId("frappe-form-close").
|
|
452
|
+
expect(screen.getByTestId("frappe-form-close").getAttribute("aria-label")).toBe("Close");
|
|
453
453
|
|
|
454
454
|
fireEvent.click(screen.getByTestId("frappe-form-cancel-document"));
|
|
455
455
|
await waitFor(() =>
|
package/src/FrappeForm.tsx
CHANGED
|
@@ -23,7 +23,7 @@ import type React from "react";
|
|
|
23
23
|
import { useEffect, useMemo, useState } from "react";
|
|
24
24
|
import type { TFunction } from "i18next";
|
|
25
25
|
import { useTranslation } from "react-i18next";
|
|
26
|
-
import {
|
|
26
|
+
import { IconButton, Input, formCommonColors, standardActions } from "@multiplatform.one/forms";
|
|
27
27
|
import { Text as TamaguiText, XStack, YStack } from "tamagui";
|
|
28
28
|
import { hairlineWidth, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
29
29
|
import { useFrappeConfig } from "./FrappeProvider";
|
|
@@ -677,13 +677,17 @@ function FrappeFormView<TDoc extends { name: string; doctype: string }>({
|
|
|
677
677
|
<YStack flex={1} backgroundColor="$background" testID="frappe-form-route-editor">
|
|
678
678
|
<XStack alignItems="center" gap="$2" paddingHorizontal="$2" paddingVertical="$1">
|
|
679
679
|
<XStack flex={1} flexBasis={0} justifyContent="flex-start">
|
|
680
|
-
<
|
|
681
|
-
|
|
680
|
+
<IconButton
|
|
681
|
+
icon={standardActions.cancel.icon}
|
|
682
|
+
edge="start"
|
|
683
|
+
data-mp-action="cancel"
|
|
682
684
|
onPress={onCancel ? handleCancel : routePage.onBack}
|
|
683
|
-
aria-label={
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
685
|
+
aria-label={
|
|
686
|
+
onCancel
|
|
687
|
+
? t(standardActions.cancel.label)
|
|
688
|
+
: t("Back to {{doctype}} list", { doctype })
|
|
689
|
+
}
|
|
690
|
+
/>
|
|
687
691
|
</XStack>
|
|
688
692
|
<Text
|
|
689
693
|
flexShrink={1}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ActionButton,
|
|
2
3
|
Chip,
|
|
3
4
|
DropdownMenu,
|
|
4
5
|
PageMenuButton,
|
|
@@ -10,7 +11,6 @@ import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
|
10
11
|
import {
|
|
11
12
|
ArrowCounterClockwiseIcon,
|
|
12
13
|
CheckCircleIcon,
|
|
13
|
-
FloppyDiskIcon,
|
|
14
14
|
PencilSimpleIcon,
|
|
15
15
|
ProhibitIcon,
|
|
16
16
|
TrashIcon,
|
|
@@ -122,33 +122,27 @@ export function FrappeFormActions({
|
|
|
122
122
|
)}
|
|
123
123
|
|
|
124
124
|
{onDelete && (
|
|
125
|
-
<
|
|
126
|
-
|
|
125
|
+
<ActionButton
|
|
126
|
+
kind="delete"
|
|
127
127
|
error
|
|
128
|
-
icon={TrashIcon}
|
|
129
128
|
loading={busy}
|
|
130
129
|
disabled={disabled}
|
|
131
130
|
disabledReason={disabled ? readOnlyReason : undefined}
|
|
132
131
|
disabledReasonPlacement="inline"
|
|
133
132
|
onPress={onDelete}
|
|
134
|
-
|
|
135
|
-
{t("Delete")}
|
|
136
|
-
</Button>
|
|
133
|
+
/>
|
|
137
134
|
)}
|
|
138
135
|
|
|
139
136
|
{onClose && (
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
137
|
+
<ActionButton
|
|
138
|
+
// A submitted document's own Cancel sits beside this button.
|
|
139
|
+
kind={action === "cancel" ? "close" : "cancel"}
|
|
143
140
|
disabled={closeDisabled}
|
|
144
141
|
disabledReason={closeDisabled ? readOnlyReason : undefined}
|
|
145
142
|
disabledReasonPlacement="inline"
|
|
146
143
|
onPress={onClose}
|
|
147
144
|
testID="frappe-form-close"
|
|
148
|
-
|
|
149
|
-
{/* A submitted document's own Cancel sits beside this button. */}
|
|
150
|
-
{action === "cancel" ? t("Close") : t("Cancel")}
|
|
151
|
-
</Button>
|
|
145
|
+
/>
|
|
152
146
|
)}
|
|
153
147
|
|
|
154
148
|
{action === "cancel" && (
|
|
@@ -169,18 +163,14 @@ export function FrappeFormActions({
|
|
|
169
163
|
)}
|
|
170
164
|
|
|
171
165
|
{onEdit && (
|
|
172
|
-
<
|
|
173
|
-
|
|
174
|
-
outlined={action === "submit"}
|
|
175
|
-
icon={PencilSimpleIcon}
|
|
166
|
+
<ActionButton
|
|
167
|
+
kind="edit"
|
|
176
168
|
disabled={disabled}
|
|
177
169
|
disabledReason={disabled ? readOnlyReason : undefined}
|
|
178
170
|
disabledReasonPlacement="inline"
|
|
179
171
|
onPress={onEdit}
|
|
180
172
|
testID="frappe-form-edit"
|
|
181
|
-
|
|
182
|
-
{t("Edit")}
|
|
183
|
-
</Button>
|
|
173
|
+
/>
|
|
184
174
|
)}
|
|
185
175
|
|
|
186
176
|
{action === "amend" && onAmend && (
|
|
@@ -208,6 +198,7 @@ export function FrappeFormActions({
|
|
|
208
198
|
|
|
209
199
|
{action === "submit" && (
|
|
210
200
|
<Button
|
|
201
|
+
// action-word-escape: Frappe's docstatus Submit, a lifecycle step a check would hide
|
|
211
202
|
accent
|
|
212
203
|
icon={CheckCircleIcon}
|
|
213
204
|
flex={footer ? 1 : undefined}
|
|
@@ -223,19 +214,16 @@ export function FrappeFormActions({
|
|
|
223
214
|
)}
|
|
224
215
|
|
|
225
216
|
{(action === "save" || action === "update") && (
|
|
226
|
-
<
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
flex={footer ? 1 : undefined}
|
|
217
|
+
<ActionButton
|
|
218
|
+
kind="save"
|
|
219
|
+
label={action === "update" ? t("Update") : undefined}
|
|
230
220
|
loading={busy}
|
|
231
221
|
disabled={disabled}
|
|
232
222
|
disabledReason={disabled ? readOnlyReason : undefined}
|
|
233
223
|
disabledReasonPlacement="inline"
|
|
234
224
|
onPress={onSave}
|
|
235
225
|
testID="frappe-form-save"
|
|
236
|
-
|
|
237
|
-
{busy ? t("Saving...") : action === "update" ? t("Update") : t("Save")}
|
|
238
|
-
</Button>
|
|
226
|
+
/>
|
|
239
227
|
)}
|
|
240
228
|
</XStack>
|
|
241
229
|
);
|
|
@@ -269,19 +257,19 @@ export function FrappeFormHeaderActions({
|
|
|
269
257
|
|
|
270
258
|
const primary =
|
|
271
259
|
action === "save" || action === "update" ? (
|
|
272
|
-
<
|
|
273
|
-
|
|
260
|
+
<ActionButton
|
|
261
|
+
kind="save"
|
|
262
|
+
label={action === "update" ? t("Update") : undefined}
|
|
274
263
|
loading={busy}
|
|
275
264
|
disabled={disabled}
|
|
276
265
|
disabledReason={disabled ? readOnlyReason : undefined}
|
|
277
266
|
disabledReasonPlacement="inline"
|
|
278
267
|
onPress={onSave}
|
|
279
268
|
testID="frappe-form-save"
|
|
280
|
-
|
|
281
|
-
{busy ? t("Saving...") : action === "update" ? t("Update") : t("Save")}
|
|
282
|
-
</Button>
|
|
269
|
+
/>
|
|
283
270
|
) : action === "submit" ? (
|
|
284
271
|
<Button
|
|
272
|
+
// action-word-escape: Frappe's docstatus Submit, a lifecycle step a check would hide
|
|
285
273
|
accent
|
|
286
274
|
loading={busy}
|
|
287
275
|
disabled={disabled}
|
|
@@ -312,16 +300,14 @@ export function FrappeFormHeaderActions({
|
|
|
312
300
|
{t("Amend")}
|
|
313
301
|
</Button>
|
|
314
302
|
) : onEdit ? (
|
|
315
|
-
<
|
|
316
|
-
|
|
303
|
+
<ActionButton
|
|
304
|
+
kind="edit"
|
|
317
305
|
disabled={disabled}
|
|
318
306
|
disabledReason={disabled ? readOnlyReason : undefined}
|
|
319
307
|
disabledReasonPlacement="inline"
|
|
320
308
|
onPress={onEdit}
|
|
321
309
|
testID="frappe-form-edit"
|
|
322
|
-
|
|
323
|
-
{t("Edit")}
|
|
324
|
-
</Button>
|
|
310
|
+
/>
|
|
325
311
|
) : null;
|
|
326
312
|
|
|
327
313
|
const lifecyclePrimary =
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
argTypes: {
|
|
23
|
-
columns: { control: { type: "number", min: 1, max:
|
|
23
|
+
columns: { control: { type: "number", min: 1, max: 8 } },
|
|
24
24
|
searchText: { control: "text" },
|
|
25
25
|
},
|
|
26
26
|
};
|
|
@@ -104,7 +104,6 @@ export const Main = (args: Record<string, unknown>) => (
|
|
|
104
104
|
/>
|
|
105
105
|
</FrappeProvider>
|
|
106
106
|
);
|
|
107
|
-
Main.args = { columns: 3 };
|
|
108
107
|
Main.storyName = "Main";
|
|
109
108
|
|
|
110
109
|
/** Zero documents: the grid's empty message must show. */
|
|
@@ -139,7 +138,6 @@ export const BrokenImages = () => (
|
|
|
139
138
|
doctype="QaGalleryBroken"
|
|
140
139
|
imageField="picture"
|
|
141
140
|
titleField="title"
|
|
142
|
-
columns={3}
|
|
143
141
|
onItemClick={action("onItemClick")}
|
|
144
142
|
/>
|
|
145
143
|
</FrappeProvider>
|
|
@@ -177,7 +175,6 @@ export const LongMetadata = () => (
|
|
|
177
175
|
imageField="picture"
|
|
178
176
|
titleField="title"
|
|
179
177
|
subtitleField="subtitle"
|
|
180
|
-
columns={3}
|
|
181
178
|
/>
|
|
182
179
|
</FrappeProvider>
|
|
183
180
|
);
|
|
@@ -199,7 +196,6 @@ export const Live = (args: { doctype?: string; imageField?: string; titleField?:
|
|
|
199
196
|
doctype={args.doctype || "Contact"}
|
|
200
197
|
imageField={args.imageField || "image"}
|
|
201
198
|
titleField={args.titleField || "first_name"}
|
|
202
|
-
columns={3}
|
|
203
199
|
onItemClick={action("onItemClick")}
|
|
204
200
|
/>
|
|
205
201
|
</FrappeStoryProvider>
|
|
@@ -232,7 +228,6 @@ export const Filtered = () => (
|
|
|
232
228
|
imageField="picture"
|
|
233
229
|
titleField="title"
|
|
234
230
|
searchText="Item 1"
|
|
235
|
-
columns={3}
|
|
236
231
|
/>
|
|
237
232
|
</FrappeProvider>
|
|
238
233
|
);
|
package/src/FrappeImageView.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useDocTypeMeta } from "@multiplatform.one/frappe";
|
|
2
|
-
import { AsyncSkeleton,
|
|
2
|
+
import { AsyncSkeleton, Image, ImageGrid } from "@multiplatform.one/components";
|
|
3
3
|
import { ImageSquareIcon } from "@phosphor-icons/react";
|
|
4
4
|
import React, { useMemo } from "react";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
import { Spinner, formCommonColors } from "@multiplatform.one/forms";
|
|
7
|
-
import {
|
|
7
|
+
import { Text, YStack, useTheme, type YStackProps } from "tamagui";
|
|
8
8
|
import { isServer } from "@multiplatform.one/platform";
|
|
9
9
|
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
10
10
|
import { useFrappeConfig } from "./FrappeProvider";
|
|
@@ -105,6 +105,7 @@ export function FrappeImageView<TDoc extends { name: string; doctype: string }>(
|
|
|
105
105
|
if (ssrItems && ssrItems.length > 0 && imageField && baseURL) {
|
|
106
106
|
return (
|
|
107
107
|
<ImageGrid
|
|
108
|
+
variant="photos"
|
|
108
109
|
items={ssrItems}
|
|
109
110
|
columns={columns}
|
|
110
111
|
onItemClick={onItemClick}
|
|
@@ -112,14 +113,13 @@ export function FrappeImageView<TDoc extends { name: string; doctype: string }>(
|
|
|
112
113
|
testID={`${doctype.toLowerCase()}-list`}
|
|
113
114
|
{...(stackProps as any)}
|
|
114
115
|
renderItem={(doc) => (
|
|
115
|
-
<
|
|
116
|
+
<FrappePhoto
|
|
116
117
|
doc={doc as Record<string, unknown>}
|
|
117
118
|
doctype={doctype}
|
|
118
119
|
imageField={imageField}
|
|
119
120
|
titleField={titleField}
|
|
120
121
|
subtitleField={subtitleField}
|
|
121
122
|
baseURL={baseURL}
|
|
122
|
-
onItemClick={onItemClick as ((doc: Partial<unknown>) => void) | undefined}
|
|
123
123
|
knobProps={knobProps}
|
|
124
124
|
/>
|
|
125
125
|
)}
|
|
@@ -283,6 +283,7 @@ function FrappeImageViewClient<TDoc extends { name: string; doctype: string }>({
|
|
|
283
283
|
<>
|
|
284
284
|
<FrappeReconnectIndicator config={appConfig} />
|
|
285
285
|
<ImageGrid
|
|
286
|
+
variant="photos"
|
|
286
287
|
items={items}
|
|
287
288
|
columns={columns}
|
|
288
289
|
onItemClick={onItemClick}
|
|
@@ -290,14 +291,13 @@ function FrappeImageViewClient<TDoc extends { name: string; doctype: string }>({
|
|
|
290
291
|
testID={`${doctype.toLowerCase()}-list`}
|
|
291
292
|
{...(stackProps as any)}
|
|
292
293
|
renderItem={(doc) => (
|
|
293
|
-
<
|
|
294
|
+
<FrappePhoto
|
|
294
295
|
doc={doc as Record<string, unknown>}
|
|
295
296
|
doctype={doctype}
|
|
296
297
|
imageField={effectiveImageField}
|
|
297
298
|
titleField={effectiveTitleField}
|
|
298
299
|
subtitleField={subtitleField}
|
|
299
300
|
baseURL={finalBaseURL}
|
|
300
|
-
onItemClick={onItemClick as ((doc: Partial<unknown>) => void) | undefined}
|
|
301
301
|
knobProps={knobProps}
|
|
302
302
|
/>
|
|
303
303
|
)}
|
|
@@ -307,18 +307,18 @@ function FrappeImageViewClient<TDoc extends { name: string; doctype: string }>({
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
/**
|
|
310
|
-
*
|
|
311
|
-
* matching markup
|
|
312
|
-
*
|
|
310
|
+
* One photo in the Photos grid (LC-264), shared between SSR and client paths so they
|
|
311
|
+
* produce matching markup: the image fills a square edge to edge with no card
|
|
312
|
+
* chrome. The title is its accessible name; it shows as a caption only when
|
|
313
|
+
* there is no picture to look at (no URL, or the image failed to load).
|
|
313
314
|
*/
|
|
314
|
-
function
|
|
315
|
+
function FrappePhoto({
|
|
315
316
|
doc,
|
|
316
317
|
doctype,
|
|
317
318
|
imageField,
|
|
318
319
|
titleField,
|
|
319
320
|
subtitleField,
|
|
320
321
|
baseURL,
|
|
321
|
-
onItemClick,
|
|
322
322
|
knobProps,
|
|
323
323
|
}: {
|
|
324
324
|
doc: Record<string, unknown>;
|
|
@@ -327,74 +327,60 @@ function FrappeImageCard({
|
|
|
327
327
|
titleField: string;
|
|
328
328
|
subtitleField?: string;
|
|
329
329
|
baseURL: string;
|
|
330
|
-
onItemClick?: (doc: Partial<unknown>) => void;
|
|
331
330
|
knobProps: ReturnType<typeof useResolvedKnobs>["knobProps"];
|
|
332
331
|
}) {
|
|
333
|
-
const theme = useTheme();
|
|
334
332
|
const imageUrl = getImageUrl(doc[imageField], baseURL);
|
|
335
|
-
const title = doc[titleField] || doc.name;
|
|
333
|
+
const title = String(doc[titleField] || doc.name);
|
|
336
334
|
const subtitle = subtitleField ? doc[subtitleField] : undefined;
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
onPress={(e) => {
|
|
348
|
-
// Bind click directly to `doc` so the correct item is used even
|
|
349
|
-
// if the ImageGrid wrapper's closure captured a stale/recycled item.
|
|
350
|
-
(e as unknown as { stopPropagation?: () => void })?.stopPropagation?.();
|
|
351
|
-
onItemClick?.(doc as Partial<unknown>);
|
|
352
|
-
}}
|
|
335
|
+
const slug = doctype.toLowerCase();
|
|
336
|
+
const caption = (
|
|
337
|
+
<YStack
|
|
338
|
+
width="100%"
|
|
339
|
+
aspectRatio={1}
|
|
340
|
+
alignItems="center"
|
|
341
|
+
justifyContent="center"
|
|
342
|
+
backgroundColor="$color3"
|
|
343
|
+
padding="$2"
|
|
344
|
+
gap="$1"
|
|
353
345
|
>
|
|
346
|
+
<Text
|
|
347
|
+
testID={`${slug}-name-${doc.name}`}
|
|
348
|
+
{...knobProps.label}
|
|
349
|
+
color={knobProps.textAccentColor}
|
|
350
|
+
textAlign="center"
|
|
351
|
+
numberOfLines={2}
|
|
352
|
+
>
|
|
353
|
+
{title}
|
|
354
|
+
</Text>
|
|
355
|
+
{subtitle != null ? (
|
|
356
|
+
<Text
|
|
357
|
+
testID={`${slug}-subtitle-${doc.name}`}
|
|
358
|
+
{...knobProps.label}
|
|
359
|
+
color={formCommonColors.muted}
|
|
360
|
+
textAlign="center"
|
|
361
|
+
numberOfLines={1}
|
|
362
|
+
>
|
|
363
|
+
{String(subtitle)}
|
|
364
|
+
</Text>
|
|
365
|
+
) : null}
|
|
366
|
+
</YStack>
|
|
367
|
+
);
|
|
368
|
+
return (
|
|
369
|
+
<YStack testID={`${slug}-card-${doc.name}`} aria-label={title} width="100%">
|
|
354
370
|
{imageUrl ? (
|
|
355
371
|
<Image
|
|
356
372
|
src={imageUrl}
|
|
357
|
-
alt={
|
|
373
|
+
alt={title}
|
|
358
374
|
width="100%"
|
|
359
375
|
aspectRatio={1}
|
|
360
376
|
objectFit="cover"
|
|
361
|
-
|
|
362
|
-
|
|
377
|
+
borderRadius={0}
|
|
378
|
+
backgroundColor="$color3"
|
|
379
|
+
fallback={caption}
|
|
363
380
|
/>
|
|
364
381
|
) : (
|
|
365
|
-
|
|
366
|
-
width="100%"
|
|
367
|
-
aspectRatio={1}
|
|
368
|
-
backgroundColor="$color2"
|
|
369
|
-
{...knobProps.borderRadius}
|
|
370
|
-
alignItems="center"
|
|
371
|
-
justifyContent="center"
|
|
372
|
-
>
|
|
373
|
-
<ImageSquareIcon size={iconSize * 2} color={theme.color11?.val ?? "currentColor"} />
|
|
374
|
-
</YStack>
|
|
382
|
+
caption
|
|
375
383
|
)}
|
|
376
|
-
|
|
377
|
-
<YStack {...knobProps.gap}>
|
|
378
|
-
<Text
|
|
379
|
-
testID={`${doctype.toLowerCase()}-name-${doc.name}`}
|
|
380
|
-
{...knobProps.heading}
|
|
381
|
-
fontWeight="400"
|
|
382
|
-
numberOfLines={1}
|
|
383
|
-
>
|
|
384
|
-
{String(title)}
|
|
385
|
-
</Text>
|
|
386
|
-
{subtitle != null ? (
|
|
387
|
-
<Text
|
|
388
|
-
testID={`${doctype.toLowerCase()}-subtitle-${doc.name}`}
|
|
389
|
-
color={formCommonColors.muted}
|
|
390
|
-
{...knobProps.label}
|
|
391
|
-
numberOfLines={1}
|
|
392
|
-
>
|
|
393
|
-
{String(subtitle)}
|
|
394
|
-
</Text>
|
|
395
|
-
) : null}
|
|
396
|
-
</YStack>
|
|
397
|
-
</Card.Footer>
|
|
398
|
-
</Card>
|
|
384
|
+
</YStack>
|
|
399
385
|
);
|
|
400
386
|
}
|
package/src/FrappeKanban.tsx
CHANGED
|
@@ -266,7 +266,6 @@ export function FrappeKanban<TDoc extends { name: string; doctype: string }>({
|
|
|
266
266
|
{canQuickAdd && column.id !== "__unassigned__" && (
|
|
267
267
|
<Button
|
|
268
268
|
size="$2"
|
|
269
|
-
circular
|
|
270
269
|
chromeless
|
|
271
270
|
icon={PlusIcon}
|
|
272
271
|
aria-label={t("Add card to {{column}}", { column: column.title })}
|