@multiplatform.one/frappe-ui 7.4.0 → 7.5.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/AttachLibrary.cjs +111 -0
- package/dist/cjs/FileBrowser/AttachLibrary.native.js +115 -0
- package/dist/cjs/FileBrowser/AttachLibrary.native.js.map +1 -0
- package/dist/cjs/FileBrowser/folderTree.cjs +84 -0
- package/dist/cjs/FileBrowser/folderTree.native.js +94 -0
- package/dist/cjs/FileBrowser/folderTree.native.js.map +1 -0
- package/dist/cjs/FileBrowser/index.cjs +661 -0
- package/dist/cjs/FileBrowser/index.native.js +735 -0
- package/dist/cjs/FileBrowser/index.native.js.map +1 -0
- package/dist/cjs/FileBrowser/types.cjs +18 -0
- package/dist/cjs/FileBrowser/types.native.js +21 -0
- package/dist/cjs/FileBrowser/types.native.js.map +1 -0
- package/dist/cjs/FileBrowser/viewPersistence.cjs +55 -0
- package/dist/cjs/FileBrowser/viewPersistence.native.js +60 -0
- package/dist/cjs/FileBrowser/viewPersistence.native.js.map +1 -0
- package/dist/cjs/FormSidebar.cjs +47 -47
- package/dist/cjs/FormSidebar.native.js +48 -50
- package/dist/cjs/FormSidebar.native.js.map +1 -1
- package/dist/cjs/FrappeAssignment.cjs +18 -13
- package/dist/cjs/FrappeAssignment.native.js +19 -13
- package/dist/cjs/FrappeAssignment.native.js.map +1 -1
- package/dist/cjs/FrappeCalendar.cjs +11 -10
- package/dist/cjs/FrappeCalendar.native.js +11 -10
- package/dist/cjs/FrappeCalendar.native.js.map +1 -1
- package/dist/cjs/FrappeChartCard.cjs +6 -15
- package/dist/cjs/FrappeChartCard.native.js +6 -15
- package/dist/cjs/FrappeChartCard.native.js.map +1 -1
- package/dist/cjs/FrappeDashboard.cjs +12 -9
- package/dist/cjs/FrappeDashboard.native.js +12 -9
- package/dist/cjs/FrappeDashboard.native.js.map +1 -1
- package/dist/cjs/FrappeForm.cjs +36 -25
- package/dist/cjs/FrappeForm.native.js +36 -25
- package/dist/cjs/FrappeForm.native.js.map +1 -1
- package/dist/cjs/FrappeGantt.cjs +7 -5
- package/dist/cjs/FrappeGantt.native.js +7 -5
- package/dist/cjs/FrappeGantt.native.js.map +1 -1
- package/dist/cjs/FrappeImageView.cjs +22 -22
- package/dist/cjs/FrappeImageView.native.js +24 -22
- package/dist/cjs/FrappeImageView.native.js.map +1 -1
- package/dist/cjs/FrappeKPICard.cjs +7 -29
- package/dist/cjs/FrappeKPICard.native.js +7 -29
- package/dist/cjs/FrappeKPICard.native.js.map +1 -1
- package/dist/cjs/FrappeKanban.cjs +11 -13
- package/dist/cjs/FrappeKanban.native.js +11 -13
- package/dist/cjs/FrappeKanban.native.js.map +1 -1
- package/dist/cjs/FrappeLikedBy.cjs +5 -5
- package/dist/cjs/FrappeLikedBy.native.js +6 -6
- package/dist/cjs/FrappeLikedBy.native.js.map +1 -1
- package/dist/cjs/FrappeListView.cjs +32 -33
- package/dist/cjs/FrappeListView.native.js +37 -39
- package/dist/cjs/FrappeListView.native.js.map +1 -1
- package/dist/cjs/FrappeReportBuilder.cjs +30 -46
- package/dist/cjs/FrappeReportBuilder.native.js +30 -42
- package/dist/cjs/FrappeReportBuilder.native.js.map +1 -1
- package/dist/cjs/FrappeReportView.cjs +5 -5
- package/dist/cjs/FrappeReportView.native.js +5 -5
- package/dist/cjs/FrappeReportView.native.js.map +1 -1
- package/dist/cjs/FrappeTreeView.cjs +9 -6
- package/dist/cjs/FrappeTreeView.native.js +10 -6
- package/dist/cjs/FrappeTreeView.native.js.map +1 -1
- package/dist/cjs/desk/DeskFormPage.cjs +3 -3
- package/dist/cjs/desk/DeskFormPage.native.js +3 -3
- package/dist/cjs/desk/DeskFormPage.native.js.map +1 -1
- package/dist/cjs/desk/DeskListPage.cjs +2 -2
- package/dist/cjs/desk/DeskListPage.native.js +2 -2
- package/dist/cjs/desk/DeskListPage.native.js.map +1 -1
- package/dist/cjs/desk/DeskShell.cjs +58 -38
- package/dist/cjs/desk/DeskShell.native.js +63 -44
- package/dist/cjs/desk/DeskShell.native.js.map +1 -1
- package/dist/cjs/desk/awesomebar.cjs +28 -16
- package/dist/cjs/desk/awesomebar.native.js +28 -16
- package/dist/cjs/desk/awesomebar.native.js.map +1 -1
- package/dist/cjs/fieldRegistry.cjs +15 -3
- package/dist/cjs/fieldRegistry.native.js +15 -3
- package/dist/cjs/fieldRegistry.native.js.map +1 -1
- package/dist/cjs/fields/Check/index.cjs +1 -1
- package/dist/cjs/fields/Check/index.native.js +1 -1
- package/dist/cjs/fields/Check/index.native.js.map +1 -1
- package/dist/cjs/fields/Color/index.cjs +1 -1
- package/dist/cjs/fields/Color/index.native.js +1 -1
- package/dist/cjs/fields/Color/index.native.js.map +1 -1
- package/dist/cjs/fields/Data/index.native.js.map +1 -1
- package/dist/cjs/fields/Date/index.native.js +47 -34
- package/dist/cjs/fields/Date/index.native.js.map +1 -1
- package/dist/cjs/fields/Date/sheetKeyboard.cjs +54 -0
- package/dist/cjs/fields/Date/sheetKeyboard.native.js +57 -0
- package/dist/cjs/fields/Date/sheetKeyboard.native.js.map +1 -0
- package/dist/cjs/fields/DynamicLink.cjs +37 -128
- package/dist/cjs/fields/DynamicLink.native.js +40 -138
- package/dist/cjs/fields/DynamicLink.native.js.map +1 -1
- package/dist/cjs/fields/FileUpload.cjs +233 -50
- package/dist/cjs/fields/FileUpload.native.js +242 -51
- package/dist/cjs/fields/FileUpload.native.js.map +1 -1
- package/dist/cjs/fields/FileUploadField/index.cjs +53 -20
- package/dist/cjs/fields/FileUploadField/index.native.js +56 -20
- package/dist/cjs/fields/FileUploadField/index.native.js.map +1 -1
- package/dist/cjs/fields/HTML/index.cjs +30 -51
- package/dist/cjs/fields/HTML/index.native.js +30 -51
- package/dist/cjs/fields/HTML/index.native.js.map +1 -1
- package/dist/cjs/fields/Icon/index.cjs +73 -0
- package/dist/cjs/fields/Icon/index.native.js +76 -0
- package/dist/cjs/fields/Icon/index.native.js.map +1 -0
- package/dist/cjs/fields/Link.cjs +34 -8
- package/dist/cjs/fields/Link.native.js +35 -9
- package/dist/cjs/fields/Link.native.js.map +1 -1
- package/dist/cjs/fields/LinkTree.cjs +114 -0
- package/dist/cjs/fields/LinkTree.native.js +125 -0
- package/dist/cjs/fields/LinkTree.native.js.map +1 -0
- package/dist/cjs/fields/LongText/index.cjs +6 -4
- package/dist/cjs/fields/LongText/index.native.js +6 -4
- package/dist/cjs/fields/LongText/index.native.js.map +1 -1
- package/dist/cjs/fields/Numeric/index.native.js.map +1 -1
- package/dist/cjs/fields/Password/index.cjs +178 -16
- package/dist/cjs/fields/Password/index.native.js +197 -16
- package/dist/cjs/fields/Password/index.native.js.map +1 -1
- package/dist/cjs/fields/Phone/index.native.js.map +1 -1
- package/dist/cjs/fields/ReadOnly/index.cjs +34 -48
- package/dist/cjs/fields/ReadOnly/index.native.js +34 -46
- package/dist/cjs/fields/ReadOnly/index.native.js.map +1 -1
- package/dist/cjs/fields/Select/index.cjs +1 -1
- package/dist/cjs/fields/Select/index.native.js +1 -1
- package/dist/cjs/fields/Select/index.native.js.map +1 -1
- package/dist/cjs/fields/SmallText/index.cjs +4 -3
- package/dist/cjs/fields/SmallText/index.native.js +4 -3
- package/dist/cjs/fields/SmallText/index.native.js.map +1 -1
- package/dist/cjs/fields/TableMultiSelect.cjs +39 -150
- package/dist/cjs/fields/TableMultiSelect.native.js +44 -171
- package/dist/cjs/fields/TableMultiSelect.native.js.map +1 -1
- package/dist/cjs/fields/TextEditor/index.cjs +26 -293
- package/dist/cjs/index.cjs +9 -0
- package/dist/cjs/index.native.js +9 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/schemaForm/SchemaWizard.cjs +182 -0
- package/dist/cjs/schemaForm/SchemaWizard.native.js +232 -0
- package/dist/cjs/schemaForm/SchemaWizard.native.js.map +1 -0
- package/dist/cjs/schemaForm/index.cjs +1 -1
- package/dist/cjs/schemaForm/index.native.js +1 -1
- package/dist/cjs/schemaForm/index.native.js.map +1 -1
- package/dist/cjs/shared/useKeyboardInset.cjs +48 -0
- package/dist/cjs/shared/useKeyboardInset.native.js +53 -0
- package/dist/cjs/shared/useKeyboardInset.native.js.map +1 -0
- package/dist/esm/FileBrowser/AttachLibrary.mjs +86 -0
- package/dist/esm/FileBrowser/AttachLibrary.mjs.map +1 -0
- package/dist/esm/FileBrowser/AttachLibrary.native.js +87 -0
- package/dist/esm/FileBrowser/AttachLibrary.native.js.map +1 -0
- package/dist/esm/FileBrowser/folderTree.mjs +52 -0
- package/dist/esm/FileBrowser/folderTree.mjs.map +1 -0
- package/dist/esm/FileBrowser/folderTree.native.js +59 -0
- package/dist/esm/FileBrowser/folderTree.native.js.map +1 -0
- package/dist/esm/FileBrowser/index.mjs +636 -0
- package/dist/esm/FileBrowser/index.mjs.map +1 -0
- package/dist/esm/FileBrowser/index.native.js +707 -0
- package/dist/esm/FileBrowser/index.native.js.map +1 -0
- package/dist/esm/FileBrowser/types.mjs +2 -0
- package/dist/esm/FileBrowser/types.mjs.map +1 -0
- package/dist/esm/FileBrowser/types.native.js +2 -0
- package/dist/esm/FileBrowser/types.native.js.map +1 -0
- package/dist/esm/FileBrowser/viewPersistence.mjs +29 -0
- package/dist/esm/FileBrowser/viewPersistence.mjs.map +1 -0
- package/dist/esm/FileBrowser/viewPersistence.native.js +31 -0
- package/dist/esm/FileBrowser/viewPersistence.native.js.map +1 -0
- package/dist/esm/FormSidebar.mjs +46 -46
- package/dist/esm/FormSidebar.mjs.map +1 -1
- package/dist/esm/FormSidebar.native.js +47 -49
- package/dist/esm/FormSidebar.native.js.map +1 -1
- package/dist/esm/FrappeAssignment.mjs +19 -14
- package/dist/esm/FrappeAssignment.mjs.map +1 -1
- package/dist/esm/FrappeAssignment.native.js +20 -14
- package/dist/esm/FrappeAssignment.native.js.map +1 -1
- package/dist/esm/FrappeCalendar.mjs +12 -11
- package/dist/esm/FrappeCalendar.mjs.map +1 -1
- package/dist/esm/FrappeCalendar.native.js +12 -11
- package/dist/esm/FrappeCalendar.native.js.map +1 -1
- package/dist/esm/FrappeChartCard.mjs +7 -16
- package/dist/esm/FrappeChartCard.mjs.map +1 -1
- package/dist/esm/FrappeChartCard.native.js +7 -16
- package/dist/esm/FrappeChartCard.native.js.map +1 -1
- package/dist/esm/FrappeDashboard.mjs +12 -9
- package/dist/esm/FrappeDashboard.mjs.map +1 -1
- package/dist/esm/FrappeDashboard.native.js +12 -9
- package/dist/esm/FrappeDashboard.native.js.map +1 -1
- package/dist/esm/FrappeForm.mjs +35 -24
- package/dist/esm/FrappeForm.mjs.map +1 -1
- package/dist/esm/FrappeForm.native.js +35 -24
- package/dist/esm/FrappeForm.native.js.map +1 -1
- package/dist/esm/FrappeGantt.mjs +7 -5
- package/dist/esm/FrappeGantt.mjs.map +1 -1
- package/dist/esm/FrappeGantt.native.js +7 -5
- package/dist/esm/FrappeGantt.native.js.map +1 -1
- package/dist/esm/FrappeImageView.mjs +23 -23
- package/dist/esm/FrappeImageView.mjs.map +1 -1
- package/dist/esm/FrappeImageView.native.js +25 -23
- package/dist/esm/FrappeImageView.native.js.map +1 -1
- package/dist/esm/FrappeKPICard.mjs +7 -29
- package/dist/esm/FrappeKPICard.mjs.map +1 -1
- package/dist/esm/FrappeKPICard.native.js +7 -29
- package/dist/esm/FrappeKPICard.native.js.map +1 -1
- package/dist/esm/FrappeKanban.mjs +13 -15
- package/dist/esm/FrappeKanban.mjs.map +1 -1
- package/dist/esm/FrappeKanban.native.js +13 -15
- package/dist/esm/FrappeKanban.native.js.map +1 -1
- package/dist/esm/FrappeLikedBy.mjs +6 -6
- package/dist/esm/FrappeLikedBy.mjs.map +1 -1
- package/dist/esm/FrappeLikedBy.native.js +7 -7
- package/dist/esm/FrappeLikedBy.native.js.map +1 -1
- package/dist/esm/FrappeListView.mjs +33 -34
- package/dist/esm/FrappeListView.mjs.map +1 -1
- package/dist/esm/FrappeListView.native.js +38 -40
- package/dist/esm/FrappeListView.native.js.map +1 -1
- package/dist/esm/FrappeReportBuilder.mjs +27 -43
- package/dist/esm/FrappeReportBuilder.mjs.map +1 -1
- package/dist/esm/FrappeReportBuilder.native.js +27 -39
- package/dist/esm/FrappeReportBuilder.native.js.map +1 -1
- package/dist/esm/FrappeReportView.mjs +6 -6
- package/dist/esm/FrappeReportView.mjs.map +1 -1
- package/dist/esm/FrappeReportView.native.js +6 -6
- package/dist/esm/FrappeReportView.native.js.map +1 -1
- package/dist/esm/FrappeTreeView.mjs +9 -6
- package/dist/esm/FrappeTreeView.mjs.map +1 -1
- package/dist/esm/FrappeTreeView.native.js +10 -6
- package/dist/esm/FrappeTreeView.native.js.map +1 -1
- package/dist/esm/desk/DeskFormPage.mjs +3 -3
- package/dist/esm/desk/DeskFormPage.mjs.map +1 -1
- package/dist/esm/desk/DeskFormPage.native.js +3 -3
- package/dist/esm/desk/DeskFormPage.native.js.map +1 -1
- package/dist/esm/desk/DeskListPage.mjs +2 -2
- package/dist/esm/desk/DeskListPage.mjs.map +1 -1
- package/dist/esm/desk/DeskListPage.native.js +2 -2
- package/dist/esm/desk/DeskListPage.native.js.map +1 -1
- package/dist/esm/desk/DeskShell.mjs +48 -28
- package/dist/esm/desk/DeskShell.mjs.map +1 -1
- package/dist/esm/desk/DeskShell.native.js +52 -33
- package/dist/esm/desk/DeskShell.native.js.map +1 -1
- package/dist/esm/desk/awesomebar.mjs +29 -17
- package/dist/esm/desk/awesomebar.mjs.map +1 -1
- package/dist/esm/desk/awesomebar.native.js +29 -17
- package/dist/esm/desk/awesomebar.native.js.map +1 -1
- package/dist/esm/fieldRegistry.mjs +16 -4
- package/dist/esm/fieldRegistry.mjs.map +1 -1
- package/dist/esm/fieldRegistry.native.js +16 -4
- package/dist/esm/fieldRegistry.native.js.map +1 -1
- package/dist/esm/fields/Check/index.mjs +1 -1
- package/dist/esm/fields/Check/index.mjs.map +1 -1
- package/dist/esm/fields/Check/index.native.js +1 -1
- package/dist/esm/fields/Check/index.native.js.map +1 -1
- package/dist/esm/fields/Color/index.mjs +1 -1
- package/dist/esm/fields/Color/index.mjs.map +1 -1
- package/dist/esm/fields/Color/index.native.js +1 -1
- package/dist/esm/fields/Color/index.native.js.map +1 -1
- package/dist/esm/fields/Data/index.mjs.map +1 -1
- package/dist/esm/fields/Data/index.native.js.map +1 -1
- package/dist/esm/fields/Date/index.native.js +46 -33
- package/dist/esm/fields/Date/index.native.js.map +1 -1
- package/dist/esm/fields/Date/sheetKeyboard.mjs +21 -0
- package/dist/esm/fields/Date/sheetKeyboard.mjs.map +1 -0
- package/dist/esm/fields/Date/sheetKeyboard.native.js +21 -0
- package/dist/esm/fields/Date/sheetKeyboard.native.js.map +1 -0
- package/dist/esm/fields/DynamicLink.mjs +37 -128
- package/dist/esm/fields/DynamicLink.mjs.map +1 -1
- package/dist/esm/fields/DynamicLink.native.js +40 -138
- package/dist/esm/fields/DynamicLink.native.js.map +1 -1
- package/dist/esm/fields/FileUpload.mjs +234 -51
- package/dist/esm/fields/FileUpload.mjs.map +1 -1
- package/dist/esm/fields/FileUpload.native.js +243 -52
- package/dist/esm/fields/FileUpload.native.js.map +1 -1
- package/dist/esm/fields/FileUploadField/index.mjs +55 -22
- package/dist/esm/fields/FileUploadField/index.mjs.map +1 -1
- package/dist/esm/fields/FileUploadField/index.native.js +58 -22
- package/dist/esm/fields/FileUploadField/index.native.js.map +1 -1
- package/dist/esm/fields/HTML/index.mjs +33 -54
- package/dist/esm/fields/HTML/index.mjs.map +1 -1
- package/dist/esm/fields/HTML/index.native.js +33 -54
- package/dist/esm/fields/HTML/index.native.js.map +1 -1
- package/dist/esm/fields/Icon/index.mjs +48 -0
- package/dist/esm/fields/Icon/index.mjs.map +1 -0
- package/dist/esm/fields/Icon/index.native.js +48 -0
- package/dist/esm/fields/Icon/index.native.js.map +1 -0
- package/dist/esm/fields/Link.mjs +35 -9
- package/dist/esm/fields/Link.mjs.map +1 -1
- package/dist/esm/fields/Link.native.js +36 -10
- package/dist/esm/fields/Link.native.js.map +1 -1
- package/dist/esm/fields/LinkTree.mjs +89 -0
- package/dist/esm/fields/LinkTree.mjs.map +1 -0
- package/dist/esm/fields/LinkTree.native.js +97 -0
- package/dist/esm/fields/LinkTree.native.js.map +1 -0
- package/dist/esm/fields/LongText/index.mjs +7 -5
- package/dist/esm/fields/LongText/index.mjs.map +1 -1
- package/dist/esm/fields/LongText/index.native.js +7 -5
- package/dist/esm/fields/LongText/index.native.js.map +1 -1
- package/dist/esm/fields/Numeric/index.mjs.map +1 -1
- package/dist/esm/fields/Numeric/index.native.js.map +1 -1
- package/dist/esm/fields/Password/index.mjs +180 -18
- package/dist/esm/fields/Password/index.mjs.map +1 -1
- package/dist/esm/fields/Password/index.native.js +199 -18
- package/dist/esm/fields/Password/index.native.js.map +1 -1
- package/dist/esm/fields/Phone/index.mjs.map +1 -1
- package/dist/esm/fields/Phone/index.native.js.map +1 -1
- package/dist/esm/fields/ReadOnly/index.mjs +36 -50
- package/dist/esm/fields/ReadOnly/index.mjs.map +1 -1
- package/dist/esm/fields/ReadOnly/index.native.js +36 -48
- package/dist/esm/fields/ReadOnly/index.native.js.map +1 -1
- package/dist/esm/fields/Select/index.mjs +1 -1
- package/dist/esm/fields/Select/index.mjs.map +1 -1
- package/dist/esm/fields/Select/index.native.js +1 -1
- package/dist/esm/fields/Select/index.native.js.map +1 -1
- package/dist/esm/fields/SmallText/index.mjs +5 -4
- package/dist/esm/fields/SmallText/index.mjs.map +1 -1
- package/dist/esm/fields/SmallText/index.native.js +5 -4
- package/dist/esm/fields/SmallText/index.native.js.map +1 -1
- package/dist/esm/fields/TableMultiSelect.mjs +41 -152
- package/dist/esm/fields/TableMultiSelect.mjs.map +1 -1
- package/dist/esm/fields/TableMultiSelect.native.js +46 -173
- package/dist/esm/fields/TableMultiSelect.native.js.map +1 -1
- package/dist/esm/fields/TextEditor/index.mjs +28 -284
- package/dist/esm/fields/TextEditor/index.mjs.map +1 -1
- package/dist/esm/index.mjs +5 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +5 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/schemaForm/SchemaWizard.mjs +156 -0
- package/dist/esm/schemaForm/SchemaWizard.mjs.map +1 -0
- package/dist/esm/schemaForm/SchemaWizard.native.js +203 -0
- package/dist/esm/schemaForm/SchemaWizard.native.js.map +1 -0
- package/dist/esm/schemaForm/index.mjs +1 -1
- package/dist/esm/schemaForm/index.mjs.map +1 -1
- package/dist/esm/schemaForm/index.native.js +1 -1
- package/dist/esm/schemaForm/index.native.js.map +1 -1
- package/dist/esm/shared/useKeyboardInset.mjs +23 -0
- package/dist/esm/shared/useKeyboardInset.mjs.map +1 -0
- package/dist/esm/shared/useKeyboardInset.native.js +25 -0
- package/dist/esm/shared/useKeyboardInset.native.js.map +1 -0
- package/dist/jsx/FileBrowser/AttachLibrary.mjs +86 -0
- package/dist/jsx/FileBrowser/AttachLibrary.mjs.map +1 -0
- package/dist/jsx/FileBrowser/AttachLibrary.native.js +115 -0
- package/dist/jsx/FileBrowser/AttachLibrary.native.js.map +1 -0
- package/dist/jsx/FileBrowser/folderTree.mjs +52 -0
- package/dist/jsx/FileBrowser/folderTree.mjs.map +1 -0
- package/dist/jsx/FileBrowser/folderTree.native.js +94 -0
- package/dist/jsx/FileBrowser/folderTree.native.js.map +1 -0
- package/dist/jsx/FileBrowser/index.mjs +636 -0
- package/dist/jsx/FileBrowser/index.mjs.map +1 -0
- package/dist/jsx/FileBrowser/index.native.js +735 -0
- package/dist/jsx/FileBrowser/index.native.js.map +1 -0
- package/dist/jsx/FileBrowser/types.mjs +2 -0
- package/dist/jsx/FileBrowser/types.mjs.map +1 -0
- package/dist/jsx/FileBrowser/types.native.js +21 -0
- package/dist/jsx/FileBrowser/types.native.js.map +1 -0
- package/dist/jsx/FileBrowser/viewPersistence.mjs +29 -0
- package/dist/jsx/FileBrowser/viewPersistence.mjs.map +1 -0
- package/dist/jsx/FileBrowser/viewPersistence.native.js +60 -0
- package/dist/jsx/FileBrowser/viewPersistence.native.js.map +1 -0
- package/dist/jsx/FormSidebar.mjs +46 -46
- package/dist/jsx/FormSidebar.mjs.map +1 -1
- package/dist/jsx/FormSidebar.native.js +48 -50
- package/dist/jsx/FormSidebar.native.js.map +1 -1
- package/dist/jsx/FrappeAssignment.mjs +19 -14
- package/dist/jsx/FrappeAssignment.mjs.map +1 -1
- package/dist/jsx/FrappeAssignment.native.js +19 -13
- package/dist/jsx/FrappeAssignment.native.js.map +1 -1
- package/dist/jsx/FrappeCalendar.mjs +12 -11
- package/dist/jsx/FrappeCalendar.mjs.map +1 -1
- package/dist/jsx/FrappeCalendar.native.js +11 -10
- package/dist/jsx/FrappeCalendar.native.js.map +1 -1
- package/dist/jsx/FrappeChartCard.mjs +7 -16
- package/dist/jsx/FrappeChartCard.mjs.map +1 -1
- package/dist/jsx/FrappeChartCard.native.js +6 -15
- package/dist/jsx/FrappeChartCard.native.js.map +1 -1
- package/dist/jsx/FrappeDashboard.mjs +12 -9
- package/dist/jsx/FrappeDashboard.mjs.map +1 -1
- package/dist/jsx/FrappeDashboard.native.js +12 -9
- package/dist/jsx/FrappeDashboard.native.js.map +1 -1
- package/dist/jsx/FrappeForm.mjs +35 -24
- package/dist/jsx/FrappeForm.mjs.map +1 -1
- package/dist/jsx/FrappeForm.native.js +36 -25
- package/dist/jsx/FrappeForm.native.js.map +1 -1
- package/dist/jsx/FrappeGantt.mjs +7 -5
- package/dist/jsx/FrappeGantt.mjs.map +1 -1
- package/dist/jsx/FrappeGantt.native.js +7 -5
- package/dist/jsx/FrappeGantt.native.js.map +1 -1
- package/dist/jsx/FrappeImageView.mjs +23 -23
- package/dist/jsx/FrappeImageView.mjs.map +1 -1
- package/dist/jsx/FrappeImageView.native.js +24 -22
- package/dist/jsx/FrappeImageView.native.js.map +1 -1
- package/dist/jsx/FrappeKPICard.mjs +7 -29
- package/dist/jsx/FrappeKPICard.mjs.map +1 -1
- package/dist/jsx/FrappeKPICard.native.js +7 -29
- package/dist/jsx/FrappeKPICard.native.js.map +1 -1
- package/dist/jsx/FrappeKanban.mjs +13 -15
- package/dist/jsx/FrappeKanban.mjs.map +1 -1
- package/dist/jsx/FrappeKanban.native.js +11 -13
- package/dist/jsx/FrappeKanban.native.js.map +1 -1
- package/dist/jsx/FrappeLikedBy.mjs +6 -6
- package/dist/jsx/FrappeLikedBy.mjs.map +1 -1
- package/dist/jsx/FrappeLikedBy.native.js +6 -6
- package/dist/jsx/FrappeLikedBy.native.js.map +1 -1
- package/dist/jsx/FrappeListView.mjs +33 -34
- package/dist/jsx/FrappeListView.mjs.map +1 -1
- package/dist/jsx/FrappeListView.native.js +37 -39
- package/dist/jsx/FrappeListView.native.js.map +1 -1
- package/dist/jsx/FrappeReportBuilder.mjs +27 -43
- package/dist/jsx/FrappeReportBuilder.mjs.map +1 -1
- package/dist/jsx/FrappeReportBuilder.native.js +30 -42
- package/dist/jsx/FrappeReportBuilder.native.js.map +1 -1
- package/dist/jsx/FrappeReportView.mjs +6 -6
- package/dist/jsx/FrappeReportView.mjs.map +1 -1
- package/dist/jsx/FrappeReportView.native.js +5 -5
- package/dist/jsx/FrappeReportView.native.js.map +1 -1
- package/dist/jsx/FrappeTreeView.mjs +9 -6
- package/dist/jsx/FrappeTreeView.mjs.map +1 -1
- package/dist/jsx/FrappeTreeView.native.js +10 -6
- package/dist/jsx/FrappeTreeView.native.js.map +1 -1
- package/dist/jsx/desk/DeskFormPage.mjs +3 -3
- package/dist/jsx/desk/DeskFormPage.mjs.map +1 -1
- package/dist/jsx/desk/DeskFormPage.native.js +3 -3
- package/dist/jsx/desk/DeskFormPage.native.js.map +1 -1
- package/dist/jsx/desk/DeskListPage.mjs +2 -2
- package/dist/jsx/desk/DeskListPage.mjs.map +1 -1
- package/dist/jsx/desk/DeskListPage.native.js +2 -2
- package/dist/jsx/desk/DeskListPage.native.js.map +1 -1
- package/dist/jsx/desk/DeskShell.mjs +48 -28
- package/dist/jsx/desk/DeskShell.mjs.map +1 -1
- package/dist/jsx/desk/DeskShell.native.js +63 -44
- package/dist/jsx/desk/DeskShell.native.js.map +1 -1
- package/dist/jsx/desk/awesomebar.mjs +29 -17
- package/dist/jsx/desk/awesomebar.mjs.map +1 -1
- package/dist/jsx/desk/awesomebar.native.js +28 -16
- package/dist/jsx/desk/awesomebar.native.js.map +1 -1
- package/dist/jsx/fieldRegistry.mjs +16 -4
- package/dist/jsx/fieldRegistry.mjs.map +1 -1
- package/dist/jsx/fieldRegistry.native.js +15 -3
- package/dist/jsx/fieldRegistry.native.js.map +1 -1
- package/dist/jsx/fields/Check/index.mjs +1 -1
- package/dist/jsx/fields/Check/index.mjs.map +1 -1
- package/dist/jsx/fields/Check/index.native.js +1 -1
- package/dist/jsx/fields/Check/index.native.js.map +1 -1
- package/dist/jsx/fields/Color/index.mjs +1 -1
- package/dist/jsx/fields/Color/index.mjs.map +1 -1
- package/dist/jsx/fields/Color/index.native.js +1 -1
- package/dist/jsx/fields/Color/index.native.js.map +1 -1
- package/dist/jsx/fields/Data/index.mjs.map +1 -1
- package/dist/jsx/fields/Data/index.native.js.map +1 -1
- package/dist/jsx/fields/Date/index.native.js +47 -34
- package/dist/jsx/fields/Date/index.native.js.map +1 -1
- package/dist/jsx/fields/Date/sheetKeyboard.mjs +21 -0
- package/dist/jsx/fields/Date/sheetKeyboard.mjs.map +1 -0
- package/dist/jsx/fields/Date/sheetKeyboard.native.js +57 -0
- package/dist/jsx/fields/Date/sheetKeyboard.native.js.map +1 -0
- package/dist/jsx/fields/DynamicLink.mjs +37 -128
- package/dist/jsx/fields/DynamicLink.mjs.map +1 -1
- package/dist/jsx/fields/DynamicLink.native.js +40 -138
- package/dist/jsx/fields/DynamicLink.native.js.map +1 -1
- package/dist/jsx/fields/FileUpload.mjs +234 -51
- package/dist/jsx/fields/FileUpload.mjs.map +1 -1
- package/dist/jsx/fields/FileUpload.native.js +242 -51
- package/dist/jsx/fields/FileUpload.native.js.map +1 -1
- package/dist/jsx/fields/FileUploadField/index.mjs +55 -22
- package/dist/jsx/fields/FileUploadField/index.mjs.map +1 -1
- package/dist/jsx/fields/FileUploadField/index.native.js +56 -20
- package/dist/jsx/fields/FileUploadField/index.native.js.map +1 -1
- package/dist/jsx/fields/HTML/index.mjs +33 -54
- package/dist/jsx/fields/HTML/index.mjs.map +1 -1
- package/dist/jsx/fields/HTML/index.native.js +30 -51
- package/dist/jsx/fields/HTML/index.native.js.map +1 -1
- package/dist/jsx/fields/Icon/index.mjs +48 -0
- package/dist/jsx/fields/Icon/index.mjs.map +1 -0
- package/dist/jsx/fields/Icon/index.native.js +76 -0
- package/dist/jsx/fields/Icon/index.native.js.map +1 -0
- package/dist/jsx/fields/Link.mjs +35 -9
- package/dist/jsx/fields/Link.mjs.map +1 -1
- package/dist/jsx/fields/Link.native.js +35 -9
- package/dist/jsx/fields/Link.native.js.map +1 -1
- package/dist/jsx/fields/LinkTree.mjs +89 -0
- package/dist/jsx/fields/LinkTree.mjs.map +1 -0
- package/dist/jsx/fields/LinkTree.native.js +125 -0
- package/dist/jsx/fields/LinkTree.native.js.map +1 -0
- package/dist/jsx/fields/LongText/index.mjs +7 -5
- package/dist/jsx/fields/LongText/index.mjs.map +1 -1
- package/dist/jsx/fields/LongText/index.native.js +6 -4
- package/dist/jsx/fields/LongText/index.native.js.map +1 -1
- package/dist/jsx/fields/Numeric/index.mjs.map +1 -1
- package/dist/jsx/fields/Numeric/index.native.js.map +1 -1
- package/dist/jsx/fields/Password/index.mjs +180 -18
- package/dist/jsx/fields/Password/index.mjs.map +1 -1
- package/dist/jsx/fields/Password/index.native.js +197 -16
- package/dist/jsx/fields/Password/index.native.js.map +1 -1
- package/dist/jsx/fields/Phone/index.mjs.map +1 -1
- package/dist/jsx/fields/Phone/index.native.js.map +1 -1
- package/dist/jsx/fields/ReadOnly/index.mjs +36 -50
- package/dist/jsx/fields/ReadOnly/index.mjs.map +1 -1
- package/dist/jsx/fields/ReadOnly/index.native.js +34 -46
- package/dist/jsx/fields/ReadOnly/index.native.js.map +1 -1
- package/dist/jsx/fields/Select/index.mjs +1 -1
- package/dist/jsx/fields/Select/index.mjs.map +1 -1
- package/dist/jsx/fields/Select/index.native.js +1 -1
- package/dist/jsx/fields/Select/index.native.js.map +1 -1
- package/dist/jsx/fields/SmallText/index.mjs +5 -4
- package/dist/jsx/fields/SmallText/index.mjs.map +1 -1
- package/dist/jsx/fields/SmallText/index.native.js +4 -3
- package/dist/jsx/fields/SmallText/index.native.js.map +1 -1
- package/dist/jsx/fields/TableMultiSelect.mjs +41 -152
- package/dist/jsx/fields/TableMultiSelect.mjs.map +1 -1
- package/dist/jsx/fields/TableMultiSelect.native.js +44 -171
- package/dist/jsx/fields/TableMultiSelect.native.js.map +1 -1
- package/dist/jsx/fields/TextEditor/index.mjs +28 -284
- package/dist/jsx/fields/TextEditor/index.mjs.map +1 -1
- package/dist/jsx/index.js +5 -1
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +5 -1
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +9 -0
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/schemaForm/SchemaWizard.mjs +156 -0
- package/dist/jsx/schemaForm/SchemaWizard.mjs.map +1 -0
- package/dist/jsx/schemaForm/SchemaWizard.native.js +232 -0
- package/dist/jsx/schemaForm/SchemaWizard.native.js.map +1 -0
- package/dist/jsx/schemaForm/index.mjs +1 -1
- package/dist/jsx/schemaForm/index.mjs.map +1 -1
- package/dist/jsx/schemaForm/index.native.js +1 -1
- package/dist/jsx/schemaForm/index.native.js.map +1 -1
- package/dist/jsx/shared/useKeyboardInset.mjs +23 -0
- package/dist/jsx/shared/useKeyboardInset.mjs.map +1 -0
- package/dist/jsx/shared/useKeyboardInset.native.js +53 -0
- package/dist/jsx/shared/useKeyboardInset.native.js.map +1 -0
- package/package.json +16 -16
- package/src/FileBrowser/AttachLibrary.tsx +90 -0
- package/src/FileBrowser/FileBrowser.spec.tsx +268 -0
- package/src/FileBrowser/FileBrowser.stories.tsx +93 -0
- package/src/FileBrowser/folderTree.ts +62 -0
- package/src/FileBrowser/index.tsx +724 -0
- package/src/FileBrowser/types.ts +61 -0
- package/src/FileBrowser/viewPersistence.ts +37 -0
- package/src/FormSidebar.stories.tsx +82 -25
- package/src/FormSidebar.tsx +51 -37
- package/src/FrappeAssignment.stories.tsx +158 -12
- package/src/FrappeAssignment.tsx +11 -9
- package/src/FrappeCalendar.stories.tsx +85 -9
- package/src/FrappeCalendar.tsx +9 -9
- package/src/FrappeChartCard.stories.tsx +107 -14
- package/src/FrappeChartCard.tsx +5 -12
- package/src/FrappeDashboard.stories.tsx +79 -9
- package/src/FrappeDashboard.tsx +8 -8
- package/src/FrappeForm.tsx +36 -24
- package/src/FrappeGantt.stories.tsx +73 -4
- package/src/FrappeGantt.tsx +7 -4
- package/src/FrappeImageView.tsx +23 -22
- package/src/FrappeKPICard.stories.tsx +110 -10
- package/src/FrappeKPICard.tsx +6 -22
- package/src/FrappeKanban.stories.tsx +115 -9
- package/src/FrappeKanban.tsx +10 -9
- package/src/FrappeLikedBy.stories.tsx +82 -10
- package/src/FrappeLikedBy.tsx +6 -6
- package/src/FrappeList.stories.tsx +85 -8
- package/src/FrappeListView.spec.tsx +59 -0
- package/src/FrappeListView.tsx +27 -30
- package/src/FrappeProvider.stories.tsx +53 -2
- package/src/FrappeReportBuilder.tsx +21 -34
- package/src/FrappeReportView.tsx +4 -4
- package/src/FrappeTreeView.tsx +8 -4
- package/src/components/attachments.stories.tsx +79 -7
- package/src/components/tags.stories.tsx +131 -6
- package/src/components/timeline.stories.tsx +128 -7
- package/src/desk/Awesomebar.stories.tsx +3 -2
- package/src/desk/DeskFormPage.tsx +3 -2
- package/src/desk/DeskListPage.tsx +2 -1
- package/src/desk/DeskShell.stories.tsx +21 -2
- package/src/desk/DeskShell.tsx +56 -39
- package/src/desk/awesomebar.tsx +33 -22
- package/src/fieldRegistry.spec.tsx +17 -1
- package/src/fieldRegistry.ts +14 -4
- package/src/fields/Barcode/Barcode.stories.tsx +32 -0
- package/src/fields/Check/Check.spec.tsx +27 -0
- package/src/fields/Check/Check.stories.tsx +58 -0
- package/src/fields/Check/index.tsx +7 -1
- package/src/fields/CodeEditor/CodeEditor.stories.tsx +32 -0
- package/src/fields/Color/Color.spec.tsx +21 -0
- package/src/fields/Color/Color.stories.tsx +33 -0
- package/src/fields/Color/index.tsx +7 -1
- package/src/fields/Data/Data.spec.tsx +26 -0
- package/src/fields/Data/Data.stories.tsx +58 -0
- package/src/fields/Data/index.tsx +6 -0
- package/src/fields/Date/Date.stories.tsx +32 -0
- package/src/fields/Date/Datetime.stories.tsx +32 -0
- package/src/fields/Date/index.native.tsx +45 -33
- package/src/fields/Date/nativePresentation.spec.tsx +20 -0
- package/src/fields/Date/sheetKeyboard.spec.ts +51 -0
- package/src/fields/Date/sheetKeyboard.ts +37 -0
- package/src/fields/DateRange/DateRange.stories.tsx +41 -0
- package/src/fields/Duration/Duration.stories.tsx +32 -0
- package/src/fields/DynamicLink.stories.tsx +115 -14
- package/src/fields/DynamicLink.tsx +43 -125
- package/src/fields/FileUpload.tsx +273 -54
- package/src/fields/FileUploadField/FileUploadField.stories.tsx +87 -0
- package/src/fields/FileUploadField/index.tsx +73 -25
- package/src/fields/FrappeFileUpload.stories.tsx +32 -0
- package/src/fields/Geolocation/Geolocation.stories.tsx +33 -0
- package/src/fields/HTML/Html.stories.tsx +59 -0
- package/src/fields/HTML/index.tsx +25 -34
- package/src/fields/Heading/Heading.stories.tsx +63 -2
- package/src/fields/Icon/index.tsx +90 -0
- package/src/fields/Link.spec.tsx +10 -0
- package/src/fields/Link.stories.tsx +161 -2
- package/src/fields/Link.tree.spec.tsx +111 -0
- package/src/fields/Link.tsx +36 -19
- package/src/fields/LinkTree.tsx +102 -0
- package/src/fields/LongText/LongText.stories.tsx +66 -0
- package/src/fields/LongText/index.tsx +13 -5
- package/src/fields/MarkdownEditor/MarkdownEditor.stories.tsx +36 -0
- package/src/fields/MentionInput/MentionInput.stories.tsx +44 -0
- package/src/fields/Numeric/Numeric.spec.tsx +7 -0
- package/src/fields/Numeric/Numeric.stories.tsx +32 -0
- package/src/fields/Numeric/index.tsx +7 -0
- package/src/fields/OTPInput/OTPInput.stories.tsx +33 -0
- package/src/fields/Password/Password.spec.tsx +119 -0
- package/src/fields/Password/Password.stories.tsx +58 -0
- package/src/fields/Password/index.tsx +243 -23
- package/src/fields/Phone/Phone.stories.tsx +33 -0
- package/src/fields/Phone/index.tsx +4 -0
- package/src/fields/Progress/Progress.stories.tsx +32 -0
- package/src/fields/RadioGroup/RadioGroup.stories.tsx +37 -0
- package/src/fields/Rating/Rating.stories.tsx +33 -0
- package/src/fields/ReadOnly/ReadOnly.stories.tsx +54 -0
- package/src/fields/ReadOnly/index.tsx +41 -55
- package/src/fields/Select/Select.stories.tsx +43 -0
- package/src/fields/Select/index.tsx +5 -1
- package/src/fields/Signature/Signature.stories.tsx +32 -0
- package/src/fields/Slider/Slider.stories.tsx +32 -0
- package/src/fields/SmallText/SmallText.stories.tsx +58 -0
- package/src/fields/SmallText/index.tsx +9 -4
- package/src/fields/Switch/Switch.stories.tsx +33 -0
- package/src/fields/TableMultiSelect.spec.tsx +26 -5
- package/src/fields/TableMultiSelect.stories.tsx +90 -14
- package/src/fields/TableMultiSelect.tsx +55 -177
- package/src/fields/TextEditor/TextEditor.spec.tsx +5 -3
- package/src/fields/TextEditor/TextEditor.stories.tsx +66 -0
- package/src/fields/TextEditor/index.tsx +32 -299
- package/src/fields/TimePicker/TimePicker.stories.tsx +32 -0
- package/src/fields/ToggleGroup/ToggleGroup.stories.tsx +35 -0
- package/src/frappeRemainder.designLaw.spec.ts +176 -0
- package/src/frappeViews.designLaw.spec.ts +94 -0
- package/src/index.ts +18 -1
- package/src/schemaForm/SchemaForm.spec.tsx +154 -0
- package/src/schemaForm/SchemaForm.stories.tsx +27 -0
- package/src/schemaForm/SchemaWizard.spec.tsx +134 -0
- package/src/schemaForm/SchemaWizard.stories.tsx +94 -0
- package/src/schemaForm/SchemaWizard.tsx +192 -0
- package/src/schemaForm/index.tsx +3 -4
- package/src/shared/useKeyboardInset.ts +45 -0
- package/types/FileBrowser/AttachLibrary.d.ts +13 -0
- package/types/FileBrowser/AttachLibrary.d.ts.map +1 -0
- package/types/FileBrowser/folderTree.d.ts +15 -0
- package/types/FileBrowser/folderTree.d.ts.map +1 -0
- package/types/FileBrowser/index.d.ts +4 -0
- package/types/FileBrowser/index.d.ts.map +1 -0
- package/types/FileBrowser/types.d.ts +59 -0
- package/types/FileBrowser/types.d.ts.map +1 -0
- package/types/FileBrowser/viewPersistence.d.ts +4 -0
- package/types/FileBrowser/viewPersistence.d.ts.map +1 -0
- package/types/FormSidebar.d.ts.map +1 -1
- package/types/FrappeAssignment.d.ts.map +1 -1
- package/types/FrappeChartCard.d.ts.map +1 -1
- package/types/FrappeDashboard.d.ts.map +1 -1
- package/types/FrappeForm.d.ts.map +1 -1
- package/types/FrappeGantt.d.ts.map +1 -1
- package/types/FrappeImageView.d.ts.map +1 -1
- package/types/FrappeKPICard.d.ts.map +1 -1
- package/types/FrappeKanban.d.ts.map +1 -1
- package/types/FrappeListView.d.ts.map +1 -1
- package/types/FrappeReportBuilder.d.ts.map +1 -1
- package/types/FrappeReportView.d.ts.map +1 -1
- package/types/FrappeTreeView.d.ts.map +1 -1
- package/types/desk/DeskFormPage.d.ts.map +1 -1
- package/types/desk/DeskListPage.d.ts.map +1 -1
- package/types/desk/DeskShell.d.ts +4 -2
- package/types/desk/DeskShell.d.ts.map +1 -1
- package/types/desk/awesomebar.d.ts.map +1 -1
- package/types/fieldRegistry.d.ts.map +1 -1
- package/types/fields/Check/index.d.ts +6 -0
- package/types/fields/Check/index.d.ts.map +1 -1
- package/types/fields/Color/index.d.ts +6 -0
- package/types/fields/Color/index.d.ts.map +1 -1
- package/types/fields/Data/index.d.ts +6 -0
- package/types/fields/Data/index.d.ts.map +1 -1
- package/types/fields/Date/index.native.d.ts +5 -0
- package/types/fields/Date/index.native.d.ts.map +1 -1
- package/types/fields/Date/sheetKeyboard.d.ts +19 -0
- package/types/fields/Date/sheetKeyboard.d.ts.map +1 -0
- package/types/fields/DynamicLink.d.ts.map +1 -1
- package/types/fields/FileUpload.d.ts +11 -1
- package/types/fields/FileUpload.d.ts.map +1 -1
- package/types/fields/FileUploadField/index.d.ts +8 -1
- package/types/fields/FileUploadField/index.d.ts.map +1 -1
- package/types/fields/HTML/index.d.ts.map +1 -1
- package/types/fields/Icon/index.d.ts +15 -0
- package/types/fields/Icon/index.d.ts.map +1 -0
- package/types/fields/Link.d.ts +6 -1
- package/types/fields/Link.d.ts.map +1 -1
- package/types/fields/LinkTree.d.ts +3 -0
- package/types/fields/LinkTree.d.ts.map +1 -0
- package/types/fields/LongText/index.d.ts +4 -0
- package/types/fields/LongText/index.d.ts.map +1 -1
- package/types/fields/Numeric/index.d.ts +7 -0
- package/types/fields/Numeric/index.d.ts.map +1 -1
- package/types/fields/Password/index.d.ts +1 -0
- package/types/fields/Password/index.d.ts.map +1 -1
- package/types/fields/Phone/index.d.ts +4 -0
- package/types/fields/Phone/index.d.ts.map +1 -1
- package/types/fields/ReadOnly/index.d.ts.map +1 -1
- package/types/fields/Select/index.d.ts +4 -0
- package/types/fields/Select/index.d.ts.map +1 -1
- package/types/fields/SmallText/index.d.ts +4 -0
- package/types/fields/SmallText/index.d.ts.map +1 -1
- package/types/fields/TableMultiSelect.d.ts +2 -1
- package/types/fields/TableMultiSelect.d.ts.map +1 -1
- package/types/fields/TextEditor/index.d.ts +2 -3
- package/types/fields/TextEditor/index.d.ts.map +1 -1
- package/types/index.d.ts +7 -1
- package/types/index.d.ts.map +1 -1
- package/types/schemaForm/SchemaWizard.d.ts +20 -0
- package/types/schemaForm/SchemaWizard.d.ts.map +1 -0
- package/types/schemaForm/index.d.ts.map +1 -1
- package/types/shared/useKeyboardInset.d.ts +18 -0
- package/types/shared/useKeyboardInset.d.ts.map +1 -0
|
@@ -14,12 +14,83 @@ export default {
|
|
|
14
14
|
docs: {
|
|
15
15
|
description: {
|
|
16
16
|
component:
|
|
17
|
-
"Heart / like toggle for one document: count + avatar cluster from the `_liked_by` JSON field, optimistic toggle via the whitelisted `frappe.desk.like.toggle_like` method (fixtures emulate it with an optimistic collection update), live doc subscription so out-of-band likes update in place.",
|
|
17
|
+
"Heart / like toggle for one document: count + avatar cluster from the `_liked_by` JSON field, optimistic toggle via the whitelisted `frappe.desk.like.toggle_like` method (fixtures emulate it with an optimistic collection update), live doc subscription so out-of-band likes update in place. Fixture stories are network-hermetic (G-15/D-05): documents come from InMemoryFixtureProvider and DocType meta from an in-story fetch mock, so nothing leaves the machine. The separately-named Live story is the live-bench arm.",
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
// Hermetic story host (G-15 story honesty / D-05, closes UX-P18).
|
|
25
|
+
//
|
|
26
|
+
// Fixture-backed stories previously pointed at https://demo.frappe.cloud. The
|
|
27
|
+
// fixture provider serves the *collection*, but DocType meta still resolves
|
|
28
|
+
// over HTTP — so those stories fired a real cross-origin request the browser
|
|
29
|
+
// rejected with CORS, poisoning the console for every automated probe.
|
|
30
|
+
// MOCK_HOST keeps the same code path (real fetch, real meta shape) without
|
|
31
|
+
// leaving the machine; ERR_HOST is the deliberate failure host for LoadError.
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
const MOCK_HOST = "https://frappelikedby.mock.test";
|
|
35
|
+
const ERR_HOST = "https://forbidden.frappelikedby.mock.test";
|
|
36
|
+
|
|
37
|
+
function likedByMetaRaw(name: string) {
|
|
38
|
+
return {
|
|
39
|
+
name,
|
|
40
|
+
module: name === "User" ? "Core" : name === "ToDo" ? "Desk" : "Projects",
|
|
41
|
+
title_field: name === "User" ? "full_name" : "subject",
|
|
42
|
+
fields: [
|
|
43
|
+
{ fieldname: "subject", fieldtype: "Data", label: "Subject", in_list_view: 1 },
|
|
44
|
+
{ fieldname: "_liked_by", fieldtype: "Text", label: "Liked By", hidden: 1 },
|
|
45
|
+
{ fieldname: "full_name", fieldtype: "Data", label: "Full Name" },
|
|
46
|
+
{ fieldname: "user_image", fieldtype: "Attach Image", label: "User Image", hidden: 1 },
|
|
47
|
+
],
|
|
48
|
+
permissions: [{ role: "All", read: 1, write: 1, create: 1 }],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function jsonResponse(body: unknown, status = 200): Response {
|
|
53
|
+
return new Response(JSON.stringify(body), {
|
|
54
|
+
status,
|
|
55
|
+
headers: { "Content-Type": "application/json" },
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
(() => {
|
|
60
|
+
if (typeof window === "undefined") return;
|
|
61
|
+
const w = window as unknown as Record<string, unknown>;
|
|
62
|
+
if (w.__frappeLikedByMockFetch) return;
|
|
63
|
+
w.__frappeLikedByMockFetch = true;
|
|
64
|
+
const realFetch = window.fetch.bind(window);
|
|
65
|
+
window.fetch = async (input: RequestInfo | URL, init?: RequestInit): Promise<Response> => {
|
|
66
|
+
const urlStr =
|
|
67
|
+
typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
|
|
68
|
+
if (urlStr.startsWith(ERR_HOST)) return jsonResponse({ message: "Not permitted" }, 403);
|
|
69
|
+
if (urlStr.startsWith(MOCK_HOST)) {
|
|
70
|
+
const url = new URL(urlStr);
|
|
71
|
+
if (url.pathname === "/api/method/frappe.desk.form.load.getdoctype") {
|
|
72
|
+
const doctype = url.searchParams.get("doctype") || "Task";
|
|
73
|
+
return jsonResponse({ docs: [likedByMetaRaw(decodeURIComponent(doctype))] });
|
|
74
|
+
}
|
|
75
|
+
const metaMatch = url.pathname.match(/^\/api\/resource\/DocType\/(.+)$/);
|
|
76
|
+
if (metaMatch)
|
|
77
|
+
return jsonResponse({ data: likedByMetaRaw(decodeURIComponent(metaMatch[1])) });
|
|
78
|
+
if (url.pathname === "/api/resource/DocType") {
|
|
79
|
+
return jsonResponse({
|
|
80
|
+
data: [
|
|
81
|
+
{ name: "Task", module: "Projects" },
|
|
82
|
+
{ name: "ToDo", module: "Desk" },
|
|
83
|
+
{ name: "User", module: "Core" },
|
|
84
|
+
],
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
// Everything else (guest field-peek, counts, likes RPC): empty, never the network.
|
|
88
|
+
return jsonResponse({ data: [] });
|
|
89
|
+
}
|
|
90
|
+
return realFetch(input as RequestInfo, init);
|
|
91
|
+
};
|
|
92
|
+
})();
|
|
93
|
+
|
|
23
94
|
const userFixtures: FrappeUserDoc[] = [
|
|
24
95
|
{ name: "Administrator", doctype: "User", full_name: "Administrator" },
|
|
25
96
|
{ name: "jane@example.com", doctype: "User", full_name: "Jane Doe" },
|
|
@@ -68,7 +139,7 @@ const makeFixtures = () =>
|
|
|
68
139
|
|
|
69
140
|
/** Liked by the current user: filled heart, count 2, two avatars. Toggling flips optimistically. */
|
|
70
141
|
export const Main = () => (
|
|
71
|
-
<FrappeProvider baseURL=
|
|
142
|
+
<FrappeProvider baseURL={MOCK_HOST} fixtures={makeFixtures()}>
|
|
72
143
|
<FrappeLikedBy
|
|
73
144
|
doctype="Task"
|
|
74
145
|
name="TASK-001"
|
|
@@ -81,7 +152,7 @@ Main.storyName = "Main";
|
|
|
81
152
|
|
|
82
153
|
/** Current user has not liked the doc: outline heart, existing likes still render. */
|
|
83
154
|
export const NotLiked = () => (
|
|
84
|
-
<FrappeProvider baseURL=
|
|
155
|
+
<FrappeProvider baseURL={MOCK_HOST} fixtures={makeFixtures()}>
|
|
85
156
|
<FrappeLikedBy
|
|
86
157
|
doctype="Task"
|
|
87
158
|
name="TASK-001"
|
|
@@ -93,28 +164,28 @@ export const NotLiked = () => (
|
|
|
93
164
|
|
|
94
165
|
/** Zero likes: outline heart only — no count, no avatars. */
|
|
95
166
|
export const NoLikes = () => (
|
|
96
|
-
<FrappeProvider baseURL=
|
|
167
|
+
<FrappeProvider baseURL={MOCK_HOST} fixtures={makeFixtures()}>
|
|
97
168
|
<FrappeLikedBy doctype="Task" name="TASK-002" currentUser="Administrator" />
|
|
98
169
|
</FrappeProvider>
|
|
99
170
|
);
|
|
100
171
|
|
|
101
172
|
/** Six likers with maxAvatars=3: three avatars + a "+3" overflow bubble. */
|
|
102
173
|
export const ManyLikes = () => (
|
|
103
|
-
<FrappeProvider baseURL=
|
|
174
|
+
<FrappeProvider baseURL={MOCK_HOST} fixtures={makeFixtures()}>
|
|
104
175
|
<FrappeLikedBy doctype="Task" name="TASK-003" currentUser="Administrator" maxAvatars={3} />
|
|
105
176
|
</FrappeProvider>
|
|
106
177
|
);
|
|
107
178
|
|
|
108
179
|
/** Avatar cluster suppressed — heart + count only. */
|
|
109
180
|
export const WithoutAvatars = () => (
|
|
110
|
-
<FrappeProvider baseURL=
|
|
181
|
+
<FrappeProvider baseURL={MOCK_HOST} fixtures={makeFixtures()}>
|
|
111
182
|
<FrappeLikedBy doctype="Task" name="TASK-001" currentUser="Administrator" showAvatars={false} />
|
|
112
183
|
</FrappeProvider>
|
|
113
184
|
);
|
|
114
185
|
|
|
115
186
|
/** disabled: list renders, the heart does not toggle. */
|
|
116
187
|
export const Disabled = () => (
|
|
117
|
-
<FrappeProvider baseURL=
|
|
188
|
+
<FrappeProvider baseURL={MOCK_HOST} fixtures={makeFixtures()}>
|
|
118
189
|
<FrappeLikedBy doctype="Task" name="TASK-001" currentUser="Administrator" disabled />
|
|
119
190
|
</FrappeProvider>
|
|
120
191
|
);
|
|
@@ -137,7 +208,7 @@ class PendingFixtureProvider extends InMemoryFixtureProvider {
|
|
|
137
208
|
|
|
138
209
|
/** Doc subscription still syncing — skeleton chrome, never "zero likes" (LC-20 / DG-ST-02). */
|
|
139
210
|
export const Loading = () => (
|
|
140
|
-
<FrappeProvider baseURL=
|
|
211
|
+
<FrappeProvider baseURL={MOCK_HOST} fixtures={new PendingFixtureProvider()}>
|
|
141
212
|
<FrappeLikedBy doctype="Task" name="TASK-001" currentUser="Administrator" />
|
|
142
213
|
</FrappeProvider>
|
|
143
214
|
);
|
|
@@ -145,10 +216,11 @@ export const Loading = () => (
|
|
|
145
216
|
/**
|
|
146
217
|
* Live doc subscription against an unreachable host with no fixtures: the
|
|
147
218
|
* failed initial sync surfaces as error chrome with Retry instead of
|
|
148
|
-
* masquerading as "no likes" (DG-ST-01 / Axiom 6).
|
|
219
|
+
* masquerading as "no likes" (DG-ST-01 / Axiom 6). The failure is served
|
|
220
|
+
* hermetically — the in-story mock answers ERR_HOST with 403.
|
|
149
221
|
*/
|
|
150
222
|
export const LoadError = () => (
|
|
151
|
-
<FrappeProvider baseURL=
|
|
223
|
+
<FrappeProvider baseURL={ERR_HOST}>
|
|
152
224
|
<FrappeLikedBy doctype="Task" name="TASK-001" />
|
|
153
225
|
</FrappeProvider>
|
|
154
226
|
);
|
package/src/FrappeLikedBy.tsx
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { AsyncBoundary, Avatar } from "@multiplatform.one/components";
|
|
15
15
|
import { HttpClient, useFrappeCollection, useLiveQuery } from "@multiplatform.one/frappe";
|
|
16
|
-
import { Button } from "@multiplatform.one/forms";
|
|
16
|
+
import { Button, formCommonColors } from "@multiplatform.one/forms";
|
|
17
17
|
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
18
18
|
import { HeartIcon } from "@phosphor-icons/react";
|
|
19
19
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -291,8 +291,8 @@ function FrappeLikedByBody({
|
|
|
291
291
|
color={
|
|
292
292
|
liked
|
|
293
293
|
? isWeb
|
|
294
|
-
?
|
|
295
|
-
: theme.
|
|
294
|
+
? formCommonColors.error
|
|
295
|
+
: theme.red11?.val
|
|
296
296
|
: isWeb
|
|
297
297
|
? "currentColor"
|
|
298
298
|
: theme.color?.val
|
|
@@ -302,8 +302,8 @@ function FrappeLikedByBody({
|
|
|
302
302
|
/>
|
|
303
303
|
{likedBy.length > 0 ? (
|
|
304
304
|
<Text
|
|
305
|
-
|
|
306
|
-
color=
|
|
305
|
+
{...knobProps.label}
|
|
306
|
+
color={formCommonColors.muted}
|
|
307
307
|
aria-label={t("Liked by {{count}} users", { count: likedBy.length })}
|
|
308
308
|
testID="frappe-liked-by-count"
|
|
309
309
|
>
|
|
@@ -334,7 +334,7 @@ function FrappeLikedByBody({
|
|
|
334
334
|
</XStack>
|
|
335
335
|
</AsyncBoundary>
|
|
336
336
|
{actionError ? (
|
|
337
|
-
<Text role="alert"
|
|
337
|
+
<Text role="alert" {...knobProps.label} color={formCommonColors.error}>
|
|
338
338
|
{actionError}
|
|
339
339
|
</Text>
|
|
340
340
|
) : null}
|
|
@@ -14,12 +14,89 @@ export default {
|
|
|
14
14
|
docs: {
|
|
15
15
|
description: {
|
|
16
16
|
component:
|
|
17
|
-
"List over useFrappePagination → useFrappeCollection / useLiveQuery.
|
|
17
|
+
"List over useFrappePagination → useFrappeCollection / useLiveQuery. Fixture stories are network-hermetic (G-15/D-05): documents come from InMemoryFixtureProvider and DocType meta from an in-story fetch mock, so nothing leaves the machine. The separately-named Live story is the live-bench arm — it targets STORYBOOK_FRAPPE_URL when reachable and falls back to fixtures otherwise.",
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
// Hermetic story host (G-15 story honesty / D-05, closes UX-P18).
|
|
25
|
+
//
|
|
26
|
+
// Fixture-backed stories previously pointed at https://demo.frappe.cloud. The
|
|
27
|
+
// fixture provider serves the *collection*, but FrappeList still resolves
|
|
28
|
+
// DocType meta over HTTP — so every one of those stories fired a real
|
|
29
|
+
// cross-origin request that the browser rejected with a CORS error, poisoning
|
|
30
|
+
// the console for every automated probe. MOCK_HOST keeps the same code path
|
|
31
|
+
// (real fetch, real meta shape) without leaving the machine.
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
const MOCK_HOST = "https://frappelist.mock.test";
|
|
35
|
+
|
|
36
|
+
function todoMetaRaw(name: string) {
|
|
37
|
+
return {
|
|
38
|
+
name,
|
|
39
|
+
module: "Desk",
|
|
40
|
+
title_field: "description",
|
|
41
|
+
fields: [
|
|
42
|
+
{ fieldname: "description", fieldtype: "Data", label: "Description", in_list_view: 1 },
|
|
43
|
+
{
|
|
44
|
+
fieldname: "status",
|
|
45
|
+
fieldtype: "Select",
|
|
46
|
+
label: "Status",
|
|
47
|
+
options: "Open\nWorking\nCompleted",
|
|
48
|
+
in_list_view: 1,
|
|
49
|
+
in_standard_filter: 1,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
fieldname: "priority",
|
|
53
|
+
fieldtype: "Select",
|
|
54
|
+
label: "Priority",
|
|
55
|
+
options: "Low\nMedium\nHigh",
|
|
56
|
+
in_list_view: 1,
|
|
57
|
+
in_standard_filter: 1,
|
|
58
|
+
},
|
|
59
|
+
{ fieldname: "date", fieldtype: "Date", label: "Due Date" },
|
|
60
|
+
],
|
|
61
|
+
permissions: [{ role: "All", read: 1, write: 1, create: 1 }],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function jsonResponse(body: unknown, status = 200): Response {
|
|
66
|
+
return new Response(JSON.stringify(body), {
|
|
67
|
+
status,
|
|
68
|
+
headers: { "Content-Type": "application/json" },
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
(() => {
|
|
73
|
+
if (typeof window === "undefined") return;
|
|
74
|
+
const w = window as unknown as Record<string, unknown>;
|
|
75
|
+
if (w.__frappeListMockFetch) return;
|
|
76
|
+
w.__frappeListMockFetch = true;
|
|
77
|
+
const realFetch = window.fetch.bind(window);
|
|
78
|
+
window.fetch = async (input: RequestInfo | URL, init?: RequestInit): Promise<Response> => {
|
|
79
|
+
const urlStr =
|
|
80
|
+
typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
|
|
81
|
+
if (urlStr.startsWith(MOCK_HOST)) {
|
|
82
|
+
const url = new URL(urlStr);
|
|
83
|
+
if (url.pathname === "/api/method/frappe.desk.form.load.getdoctype") {
|
|
84
|
+
const doctype = url.searchParams.get("doctype") || "ToDo";
|
|
85
|
+
return jsonResponse({ docs: [todoMetaRaw(doctype)] });
|
|
86
|
+
}
|
|
87
|
+
const metaMatch = url.pathname.match(/^\/api\/resource\/DocType\/(.+)$/);
|
|
88
|
+
if (metaMatch)
|
|
89
|
+
return jsonResponse({ data: todoMetaRaw(decodeURIComponent(metaMatch[1])) });
|
|
90
|
+
if (url.pathname === "/api/resource/DocType") {
|
|
91
|
+
return jsonResponse({ data: [{ name: "ToDo", module: "Desk" }] });
|
|
92
|
+
}
|
|
93
|
+
// Everything else (guest field-peek, counts): empty, never the network.
|
|
94
|
+
return jsonResponse({ data: [] });
|
|
95
|
+
}
|
|
96
|
+
return realFetch(input as RequestInfo, init);
|
|
97
|
+
};
|
|
98
|
+
})();
|
|
99
|
+
|
|
23
100
|
interface ToDo {
|
|
24
101
|
name: string;
|
|
25
102
|
doctype: string;
|
|
@@ -40,7 +117,7 @@ const todoFixtures: ToDo[] = Array.from({ length: 100 }, (_, i) => ({
|
|
|
40
117
|
|
|
41
118
|
export const Default = () => (
|
|
42
119
|
<FrappeProvider
|
|
43
|
-
baseURL=
|
|
120
|
+
baseURL={MOCK_HOST}
|
|
44
121
|
fixtures={new InMemoryFixtureProvider({ ToDo: todoFixtures.slice(0, 10) })}
|
|
45
122
|
>
|
|
46
123
|
<FrappeList<ToDo>
|
|
@@ -76,7 +153,7 @@ Default.parameters = {
|
|
|
76
153
|
Default.storyName = "Main";
|
|
77
154
|
export const WithCustomFieldRenderer = () => (
|
|
78
155
|
<FrappeProvider
|
|
79
|
-
baseURL=
|
|
156
|
+
baseURL={MOCK_HOST}
|
|
80
157
|
fixtures={new InMemoryFixtureProvider({ ToDo: todoFixtures.slice(0, 10) })}
|
|
81
158
|
>
|
|
82
159
|
<FrappeList<ToDo>
|
|
@@ -186,7 +263,7 @@ const renderTodo = (doc: Partial<ToDo>) => (
|
|
|
186
263
|
|
|
187
264
|
/** Collection stuck syncing: the underlying List renders its list skeleton (LC-20 / DG-ST-02). */
|
|
188
265
|
export const Loading = () => (
|
|
189
|
-
<FrappeProvider baseURL=
|
|
266
|
+
<FrappeProvider baseURL={MOCK_HOST} fixtures={new PendingFixtureProvider()}>
|
|
190
267
|
<FrappeList<ToDo> doctype="ToDo" renderItem={renderTodo} height={400} />
|
|
191
268
|
</FrappeProvider>
|
|
192
269
|
);
|
|
@@ -194,7 +271,7 @@ export const Loading = () => (
|
|
|
194
271
|
/** Zero documents, no failure — "No ToDo records found" (empty ≠ error). */
|
|
195
272
|
export const Empty = () => (
|
|
196
273
|
<FrappeProvider
|
|
197
|
-
baseURL=
|
|
274
|
+
baseURL={MOCK_HOST}
|
|
198
275
|
fixtures={new InMemoryFixtureProvider({ ToDo: [] })}
|
|
199
276
|
>
|
|
200
277
|
<FrappeList<ToDo> doctype="ToDo" renderItem={renderTodo} height={400} />
|
|
@@ -210,7 +287,7 @@ export const Empty = () => (
|
|
|
210
287
|
*/
|
|
211
288
|
export const LoadError = () => (
|
|
212
289
|
<FrappeProvider
|
|
213
|
-
baseURL=
|
|
290
|
+
baseURL={MOCK_HOST}
|
|
214
291
|
fixtures={new InMemoryFixtureProvider({ ToDo: [] })}
|
|
215
292
|
>
|
|
216
293
|
<FrappeList<ToDo>
|
|
@@ -231,7 +308,7 @@ export const LoadError = () => (
|
|
|
231
308
|
*/
|
|
232
309
|
export const NoResults = () => (
|
|
233
310
|
<FrappeProvider
|
|
234
|
-
baseURL=
|
|
311
|
+
baseURL={MOCK_HOST}
|
|
235
312
|
fixtures={new InMemoryFixtureProvider({ ToDo: todoFixtures.slice(0, 10) })}
|
|
236
313
|
>
|
|
237
314
|
<FrappeList<ToDo>
|
|
@@ -246,7 +323,7 @@ export const NoResults = () => (
|
|
|
246
323
|
|
|
247
324
|
export const VirtualScrolling = () => (
|
|
248
325
|
<FrappeProvider
|
|
249
|
-
baseURL=
|
|
326
|
+
baseURL={MOCK_HOST}
|
|
250
327
|
fixtures={new InMemoryFixtureProvider({ ToDo: todoFixtures })}
|
|
251
328
|
>
|
|
252
329
|
<FrappeList<ToDo>
|
|
@@ -25,6 +25,7 @@ const metaRaw = {
|
|
|
25
25
|
name: "QaTodo",
|
|
26
26
|
module: "QA",
|
|
27
27
|
title_field: "description",
|
|
28
|
+
image_field: "avatar",
|
|
28
29
|
fields: [
|
|
29
30
|
{
|
|
30
31
|
fieldname: "description",
|
|
@@ -41,6 +42,12 @@ const metaRaw = {
|
|
|
41
42
|
in_list_view: 1,
|
|
42
43
|
in_standard_filter: 1,
|
|
43
44
|
},
|
|
45
|
+
{
|
|
46
|
+
fieldname: "avatar",
|
|
47
|
+
fieldtype: "Attach Image",
|
|
48
|
+
label: "Avatar",
|
|
49
|
+
hidden: 1,
|
|
50
|
+
},
|
|
44
51
|
],
|
|
45
52
|
permissions: [{ role: "All", read: 1, write: 1, create: 1 }],
|
|
46
53
|
};
|
|
@@ -85,6 +92,11 @@ const fixtures = new InMemoryFixtureProvider({
|
|
|
85
92
|
doctype: "QaTodo",
|
|
86
93
|
description: "Review document",
|
|
87
94
|
status: "Open",
|
|
95
|
+
avatar:
|
|
96
|
+
"data:image/svg+xml;utf8," +
|
|
97
|
+
encodeURIComponent(
|
|
98
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><rect width="8" height="8" fill="#4a90d9"/></svg>',
|
|
99
|
+
),
|
|
88
100
|
},
|
|
89
101
|
],
|
|
90
102
|
});
|
|
@@ -142,3 +154,50 @@ describe("FrappeListView refresh press floor (LC-54 amendment)", () => {
|
|
|
142
154
|
expect(onAdd).toHaveBeenCalledTimes(1);
|
|
143
155
|
});
|
|
144
156
|
});
|
|
157
|
+
|
|
158
|
+
// Design-law 100% (theme-propagation-spec FrappeListView): avatar geometry
|
|
159
|
+
// rides nestedControl (R-PILL / size recipe), not a 40px literal; title and
|
|
160
|
+
// filter labels take body/label recipes (400/700), not 500/600 literals.
|
|
161
|
+
const midWeightAtom = /(?:^|\s)(?:_fw-|_fow-|_fontWeight-)(?:500|600)(?:\s|$)/;
|
|
162
|
+
|
|
163
|
+
describe("FrappeListView design-law (avatar + type)", () => {
|
|
164
|
+
it("list-row avatars are nested and follow nestedControl, not a 40px literal", async () => {
|
|
165
|
+
const { container } = renderListView();
|
|
166
|
+
const avatar = await waitFor(() => {
|
|
167
|
+
const node = container.querySelector("[data-avatar-px]");
|
|
168
|
+
expect(node).not.toBeNull();
|
|
169
|
+
return node as HTMLElement;
|
|
170
|
+
});
|
|
171
|
+
expect(avatar.getAttribute("data-avatar-nested")).toBe("true");
|
|
172
|
+
expect(Number(avatar.getAttribute("data-avatar-px"))).toBe(32);
|
|
173
|
+
expect(Number(avatar.getAttribute("data-avatar-px"))).not.toBe(40);
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
it("row title uses the body recipe weight, not 500", async () => {
|
|
177
|
+
const { container } = renderListView();
|
|
178
|
+
const title = await waitFor(() => {
|
|
179
|
+
const node =
|
|
180
|
+
(container.querySelector('[data-list-slot="title"]') as HTMLElement | null) ??
|
|
181
|
+
(Array.from(container.querySelectorAll("*")).find(
|
|
182
|
+
(el) => el.textContent === "Review document" && el.children.length === 0,
|
|
183
|
+
) as HTMLElement | undefined) ??
|
|
184
|
+
null;
|
|
185
|
+
expect(node).not.toBeNull();
|
|
186
|
+
return node as HTMLElement;
|
|
187
|
+
});
|
|
188
|
+
expect(title.textContent).toContain("Review document");
|
|
189
|
+
expect(title.className).not.toMatch(midWeightAtom);
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
it("filter sidebar labels use the label recipe, not weight 600", async () => {
|
|
193
|
+
const { container } = renderListView({ showFilterSidebar: true });
|
|
194
|
+
const heading = await waitFor(() => {
|
|
195
|
+
const node = Array.from(container.querySelectorAll("*")).find(
|
|
196
|
+
(el) => el.textContent === "Filters" && el.children.length === 0,
|
|
197
|
+
);
|
|
198
|
+
expect(node).not.toBeNull();
|
|
199
|
+
return node as HTMLElement;
|
|
200
|
+
});
|
|
201
|
+
expect(heading.className).not.toMatch(midWeightAtom);
|
|
202
|
+
});
|
|
203
|
+
});
|
package/src/FrappeListView.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import { useTranslation } from "react-i18next";
|
|
|
6
6
|
import { Button, SearchInput, Spinner } from "@multiplatform.one/forms";
|
|
7
7
|
import { Text, View, XStack, YStack, isWeb, useTheme, type YStackProps } from "tamagui";
|
|
8
8
|
import { SavedFilterDropdown, useSavedFilters, type ParsedFilter } from "@multiplatform.one/table";
|
|
9
|
-
import { Avatar, ViewSwitcher } from "@multiplatform.one/components";
|
|
9
|
+
import { Avatar, ViewSwitcher, componentColors } from "@multiplatform.one/components";
|
|
10
10
|
import { pressTargetStyle, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
11
11
|
import { storage } from "@multiplatform.one/store";
|
|
12
12
|
import { useFrappeConfig } from "./FrappeProvider";
|
|
@@ -281,23 +281,23 @@ export function FrappeListView<TDoc extends { name: string; doctype: string }>({
|
|
|
281
281
|
.filter((part) => part !== null);
|
|
282
282
|
const imageUrl = imageFieldName ? resolveImageUrl(row[imageFieldName], finalBaseURL) : "";
|
|
283
283
|
|
|
284
|
+
const titleName = typeof title === "string" ? title : undefined;
|
|
284
285
|
return (
|
|
285
|
-
<XStack alignItems="center"
|
|
286
|
+
<XStack alignItems="center" flex={1} minWidth={0} width="100%" {...knobProps.gap}>
|
|
286
287
|
{imageUrl ? (
|
|
287
|
-
<Avatar circular
|
|
288
|
-
<Avatar.Image
|
|
289
|
-
src={imageUrl}
|
|
290
|
-
alt={typeof title === "string" ? title : ""}
|
|
291
|
-
objectFit="cover"
|
|
292
|
-
/>
|
|
293
|
-
</Avatar>
|
|
288
|
+
<Avatar nested circular src={imageUrl} name={titleName} alt={titleName ?? ""} />
|
|
294
289
|
) : null}
|
|
295
|
-
<YStack flex={1}
|
|
296
|
-
<Text
|
|
290
|
+
<YStack flex={1} minWidth={0}>
|
|
291
|
+
<Text
|
|
292
|
+
{...knobProps.body}
|
|
293
|
+
color={componentColors.text.primary}
|
|
294
|
+
numberOfLines={1}
|
|
295
|
+
{...({ "data-list-slot": "title" } as Record<string, unknown>)}
|
|
296
|
+
>
|
|
297
297
|
{title}
|
|
298
298
|
</Text>
|
|
299
299
|
{subtitleParts.length > 0 && (
|
|
300
|
-
<Text color=
|
|
300
|
+
<Text {...knobProps.body} color={componentColors.text.muted} numberOfLines={1}>
|
|
301
301
|
{subtitleParts.map((part, index) => (
|
|
302
302
|
<React.Fragment key={index}>
|
|
303
303
|
{index > 0 ? " · " : null}
|
|
@@ -310,7 +310,7 @@ export function FrappeListView<TDoc extends { name: string; doctype: string }>({
|
|
|
310
310
|
</XStack>
|
|
311
311
|
);
|
|
312
312
|
},
|
|
313
|
-
[effectiveDisplayFields, imageFieldName, finalBaseURL],
|
|
313
|
+
[effectiveDisplayFields, imageFieldName, finalBaseURL, knobProps],
|
|
314
314
|
);
|
|
315
315
|
|
|
316
316
|
const effectiveColumns = useMemo((): DataTableColumn<Partial<TDoc>>[] => {
|
|
@@ -431,7 +431,7 @@ export function FrappeListView<TDoc extends { name: string; doctype: string }>({
|
|
|
431
431
|
{...stackProps}
|
|
432
432
|
>
|
|
433
433
|
<Spinner size="large" />
|
|
434
|
-
<Text color=
|
|
434
|
+
<Text {...knobProps.body} color={componentColors.text.muted} marginTop="$2">
|
|
435
435
|
{t("Loading {{doctype}} schema...", { doctype })}
|
|
436
436
|
</Text>
|
|
437
437
|
</YStack>
|
|
@@ -444,11 +444,10 @@ export function FrappeListView<TDoc extends { name: string; doctype: string }>({
|
|
|
444
444
|
return (
|
|
445
445
|
<XStack
|
|
446
446
|
{...knobProps.panelPadding}
|
|
447
|
-
{...knobProps.surface}
|
|
448
447
|
alignItems="center"
|
|
449
448
|
justifyContent="space-between"
|
|
450
|
-
//
|
|
451
|
-
// hairline so
|
|
449
|
+
// Frame owns SF-CARD; this band is flattened (zero box border, one
|
|
450
|
+
// bottom hairline) so it does not paint a second surface.
|
|
452
451
|
borderWidth={0}
|
|
453
452
|
borderBottomWidth={1}
|
|
454
453
|
borderBottomColor="$borderColor"
|
|
@@ -500,11 +499,9 @@ export function FrappeListView<TDoc extends { name: string; doctype: string }>({
|
|
|
500
499
|
return (
|
|
501
500
|
<YStack
|
|
502
501
|
width={220}
|
|
503
|
-
|
|
504
|
-
//
|
|
505
|
-
//
|
|
506
|
-
// inline style so the CSS logical props deterministically beat the
|
|
507
|
-
// physical border-right-width:0 from the borderWidth expansion
|
|
502
|
+
// Frame owns SF-CARD; sidebar is a flattened band (inline-end
|
|
503
|
+
// hairline only). Web uses inline style so the CSS logical props
|
|
504
|
+
// beat physical border-right-width:0 from the borderWidth expansion
|
|
508
505
|
// (tamagui borderEndWidth does not compile to working CSS, SB-M-1215).
|
|
509
506
|
borderWidth={0}
|
|
510
507
|
{...(isWeb
|
|
@@ -519,17 +516,17 @@ export function FrappeListView<TDoc extends { name: string; doctype: string }>({
|
|
|
519
516
|
{...knobProps.panelPadding}
|
|
520
517
|
{...knobProps.gap}
|
|
521
518
|
>
|
|
522
|
-
<Text
|
|
519
|
+
<Text {...knobProps.label} color={componentColors.text.muted}>
|
|
523
520
|
{t("Filters")}
|
|
524
521
|
</Text>
|
|
525
522
|
{standardFilterFields.length > 0 && (
|
|
526
523
|
<YStack {...knobProps.gap}>
|
|
527
524
|
{standardFilterFields.map((field) => (
|
|
528
|
-
<YStack key={field.fieldname} gap
|
|
529
|
-
<Text
|
|
525
|
+
<YStack key={field.fieldname} {...knobProps.gap}>
|
|
526
|
+
<Text {...knobProps.label} color={componentColors.text.muted}>
|
|
530
527
|
{field.label || field.fieldname}
|
|
531
528
|
</Text>
|
|
532
|
-
<Text
|
|
529
|
+
<Text {...knobProps.body} color={componentColors.text.muted}>
|
|
533
530
|
{field.fieldtype === "Select" ? field.options || "—" : "—"}
|
|
534
531
|
</Text>
|
|
535
532
|
</YStack>
|
|
@@ -538,7 +535,7 @@ export function FrappeListView<TDoc extends { name: string; doctype: string }>({
|
|
|
538
535
|
)}
|
|
539
536
|
{savedFiltersHook.filters.length > 0 && (
|
|
540
537
|
<YStack {...knobProps.gap}>
|
|
541
|
-
<Text
|
|
538
|
+
<Text {...knobProps.label} color={componentColors.text.muted}>
|
|
542
539
|
{t("Saved Filters")}
|
|
543
540
|
</Text>
|
|
544
541
|
<SavedFilterDropdown
|
|
@@ -558,9 +555,7 @@ export function FrappeListView<TDoc extends { name: string; doctype: string }>({
|
|
|
558
555
|
const renderListSearch = () => (
|
|
559
556
|
<XStack
|
|
560
557
|
alignItems="center"
|
|
561
|
-
|
|
562
|
-
paddingVertical="$2"
|
|
563
|
-
backgroundColor="$color3"
|
|
558
|
+
{...knobProps.panelPadding}
|
|
564
559
|
borderBottomWidth={1}
|
|
565
560
|
borderBottomColor="$borderColor"
|
|
566
561
|
>
|
|
@@ -629,7 +624,9 @@ export function FrappeListView<TDoc extends { name: string; doctype: string }>({
|
|
|
629
624
|
return (
|
|
630
625
|
<YStack
|
|
631
626
|
flex={1}
|
|
627
|
+
{...knobProps.surface}
|
|
632
628
|
{...knobProps.containerRadius}
|
|
629
|
+
overflow="hidden"
|
|
633
630
|
testID={`${doctype.toLowerCase()}-list`}
|
|
634
631
|
{...stackProps}
|
|
635
632
|
>
|
|
@@ -11,12 +11,63 @@ export default {
|
|
|
11
11
|
docs: {
|
|
12
12
|
description: {
|
|
13
13
|
component:
|
|
14
|
-
"Non-visual context provider for Frappe connection configuration. Stories render a probe consumer that prints what the provider supplies.",
|
|
14
|
+
"Non-visual context provider for Frappe connection configuration. Stories render a probe consumer that prints what the provider supplies. The Main story is network-hermetic (G-15/D-05): baseURL is MOCK_HOST and an in-story fetch mock swallows any REST to that origin so nothing leaves the machine.",
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
// Hermetic story host (G-15 story honesty / D-05).
|
|
22
|
+
//
|
|
23
|
+
// Fixture-backed stories previously pointed at https://demo.frappe.cloud. The
|
|
24
|
+
// provider itself does not fetch, but any consumer that resolves DocType meta
|
|
25
|
+
// from baseURL would. MOCK_HOST keeps the same code path without leaving the
|
|
26
|
+
// machine.
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
|
|
29
|
+
const MOCK_HOST = "https://frappeprovider.mock.test";
|
|
30
|
+
|
|
31
|
+
function jsonResponse(body: unknown, status = 200): Response {
|
|
32
|
+
return new Response(JSON.stringify(body), {
|
|
33
|
+
status,
|
|
34
|
+
headers: { "Content-Type": "application/json" },
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
(() => {
|
|
39
|
+
if (typeof window === "undefined") return;
|
|
40
|
+
const w = window as unknown as Record<string, unknown>;
|
|
41
|
+
if (w.__frappeProviderMockFetch) return;
|
|
42
|
+
w.__frappeProviderMockFetch = true;
|
|
43
|
+
const realFetch = window.fetch.bind(window);
|
|
44
|
+
window.fetch = async (input: RequestInfo | URL, init?: RequestInit): Promise<Response> => {
|
|
45
|
+
const urlStr =
|
|
46
|
+
typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
|
|
47
|
+
if (urlStr.startsWith(MOCK_HOST)) {
|
|
48
|
+
const url = new URL(urlStr);
|
|
49
|
+
const metaMatch = url.pathname.match(/^\/api\/resource\/DocType\/(.+)$/);
|
|
50
|
+
if (metaMatch)
|
|
51
|
+
return jsonResponse({
|
|
52
|
+
data: {
|
|
53
|
+
name: decodeURIComponent(metaMatch[1]),
|
|
54
|
+
module: "Custom",
|
|
55
|
+
fields: [],
|
|
56
|
+
permissions: [{ role: "All", read: 1 }],
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
if (url.pathname === "/api/resource/DocType") {
|
|
60
|
+
return jsonResponse({ data: [] });
|
|
61
|
+
}
|
|
62
|
+
if (url.pathname === "/api/method/frappe.desk.form.load.getdoctype") {
|
|
63
|
+
return jsonResponse({ docs: [] });
|
|
64
|
+
}
|
|
65
|
+
return jsonResponse({ data: [] });
|
|
66
|
+
}
|
|
67
|
+
return realFetch(input as RequestInfo, init);
|
|
68
|
+
};
|
|
69
|
+
})();
|
|
70
|
+
|
|
20
71
|
function ConfigProbe({ probeId = "config-probe" }: { probeId?: string }) {
|
|
21
72
|
const config = useFrappeConfig();
|
|
22
73
|
return (
|
|
@@ -40,7 +91,7 @@ function ConfigProbe({ probeId = "config-probe" }: { probeId?: string }) {
|
|
|
40
91
|
|
|
41
92
|
export const Main = () => (
|
|
42
93
|
<FrappeProvider
|
|
43
|
-
baseURL=
|
|
94
|
+
baseURL={MOCK_HOST}
|
|
44
95
|
socketPort={9000}
|
|
45
96
|
auth={{ useToken: true, token: "story-token", type: "token" }}
|
|
46
97
|
fixtures={new InMemoryFixtureProvider({})}
|