@multiplatform.one/frappe-ui 7.23.1 → 7.24.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/FrappeCalendar.cjs +1 -1
- package/dist/cjs/FrappeCalendar.native.js +1 -1
- package/dist/cjs/FrappeCalendar.native.js.map +1 -1
- package/dist/cjs/FrappeDashboard.cjs +1 -1
- package/dist/cjs/FrappeDashboard.native.js +1 -1
- package/dist/cjs/FrappeDashboard.native.js.map +1 -1
- package/dist/cjs/FrappeForm.cjs +8 -0
- package/dist/cjs/FrappeForm.native.js +9 -0
- package/dist/cjs/FrappeForm.native.js.map +1 -1
- package/dist/cjs/FrappeImageView.cjs +1 -1
- package/dist/cjs/FrappeImageView.native.js +1 -1
- package/dist/cjs/FrappeImageView.native.js.map +1 -1
- package/dist/cjs/FrappeInsights.cjs +380 -0
- package/dist/cjs/FrappeInsights.native.js +447 -0
- package/dist/cjs/FrappeInsights.native.js.map +1 -0
- package/dist/cjs/FrappeLikedBy.cjs +5 -2
- package/dist/cjs/FrappeLikedBy.native.js +5 -2
- package/dist/cjs/FrappeLikedBy.native.js.map +1 -1
- package/dist/cjs/FrappeListView.cjs +406 -39
- package/dist/cjs/FrappeListView.native.js +469 -42
- package/dist/cjs/FrappeListView.native.js.map +1 -1
- package/dist/cjs/FrappeNotConfigured.cjs +54 -0
- package/dist/cjs/FrappeNotConfigured.native.js +58 -0
- package/dist/cjs/FrappeNotConfigured.native.js.map +1 -0
- package/dist/cjs/FrappeRecordView.cjs +199 -0
- package/dist/cjs/FrappeRecordView.native.js +218 -0
- package/dist/cjs/FrappeRecordView.native.js.map +1 -0
- package/dist/cjs/FrappeReportBuilder.cjs +2 -2
- package/dist/cjs/FrappeReportBuilder.native.js +2 -2
- package/dist/cjs/FrappeReportBuilder.native.js.map +1 -1
- package/dist/cjs/FrappeReportView.cjs +1 -1
- package/dist/cjs/FrappeReportView.native.js +2 -2
- package/dist/cjs/FrappeReportView.native.js.map +1 -1
- package/dist/cjs/FrappeTreeView.cjs +1 -1
- package/dist/cjs/FrappeTreeView.native.js +1 -1
- package/dist/cjs/desk/awesomebar.cjs +1 -1
- package/dist/cjs/desk/awesomebar.native.js +3 -3
- package/dist/cjs/desk/awesomebar.native.js.map +1 -1
- package/dist/cjs/fields/CodeEditor/index.cjs +1 -1
- package/dist/cjs/fields/CodeEditor/index.native.js +1 -1
- package/dist/cjs/fields/CodeEditor/index.native.js.map +1 -1
- package/dist/cjs/fields/Color/index.cjs +1 -0
- package/dist/cjs/fields/Color/index.native.js +1 -0
- package/dist/cjs/fields/Color/index.native.js.map +1 -1
- package/dist/cjs/fields/FileUpload.cjs +1 -1
- package/dist/cjs/fields/FileUpload.native.js +1 -1
- package/dist/cjs/fields/FileUpload.native.js.map +1 -1
- package/dist/cjs/fields/Heading/index.cjs +19 -12
- package/dist/cjs/fields/Heading/index.native.js +22 -13
- package/dist/cjs/fields/Heading/index.native.js.map +1 -1
- package/dist/cjs/fields/MarkdownEditor/index.cjs +2 -1
- package/dist/cjs/fields/MarkdownEditor/index.native.js +1 -1
- package/dist/cjs/fields/MarkdownEditor/index.native.js.map +1 -1
- package/dist/cjs/frappeNavigation.cjs +12 -2
- package/dist/cjs/frappeNavigation.native.js +13 -2
- package/dist/cjs/frappeNavigation.native.js.map +1 -1
- package/dist/cjs/index.cjs +34 -0
- package/dist/cjs/index.native.js +34 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/insights/InsightsFacetTags.cjs +147 -0
- package/dist/cjs/insights/InsightsFacetTags.native.js +165 -0
- package/dist/cjs/insights/InsightsFacetTags.native.js.map +1 -0
- package/dist/cjs/insights/InsightsKpiBand.cjs +124 -0
- package/dist/cjs/insights/InsightsKpiBand.native.js +133 -0
- package/dist/cjs/insights/InsightsKpiBand.native.js.map +1 -0
- package/dist/cjs/insights/InsightsLeaders.cjs +150 -0
- package/dist/cjs/insights/InsightsLeaders.native.js +178 -0
- package/dist/cjs/insights/InsightsLeaders.native.js.map +1 -0
- package/dist/cjs/insights/InsightsRecords.cjs +105 -0
- package/dist/cjs/insights/InsightsRecords.native.js +109 -0
- package/dist/cjs/insights/InsightsRecords.native.js.map +1 -0
- package/dist/cjs/insights/InsightsTable.cjs +157 -0
- package/dist/cjs/insights/InsightsTable.native.js +194 -0
- package/dist/cjs/insights/InsightsTable.native.js.map +1 -0
- package/dist/cjs/insights/insightsData.cjs +114 -0
- package/dist/cjs/insights/insightsData.native.js +220 -0
- package/dist/cjs/insights/insightsData.native.js.map +1 -0
- package/dist/cjs/insights/insightsRecord.cjs +35 -0
- package/dist/cjs/insights/insightsRecord.native.js +38 -0
- package/dist/cjs/insights/insightsRecord.native.js.map +1 -0
- package/dist/cjs/list/FacetBadge.cjs +62 -0
- package/dist/cjs/list/FacetBadge.native.js +66 -0
- package/dist/cjs/list/FacetBadge.native.js.map +1 -0
- package/dist/cjs/list/FacetRail.cjs +199 -0
- package/dist/cjs/list/FacetRail.native.js +223 -0
- package/dist/cjs/list/FacetRail.native.js.map +1 -0
- package/dist/cjs/list/ImageWell.cjs +111 -0
- package/dist/cjs/list/ImageWell.native.js +126 -0
- package/dist/cjs/list/ImageWell.native.js.map +1 -0
- package/dist/cjs/list/ListControls.cjs +226 -0
- package/dist/cjs/list/ListControls.native.js +252 -0
- package/dist/cjs/list/ListControls.native.js.map +1 -0
- package/dist/cjs/list/ListToastHost.cjs +54 -0
- package/dist/cjs/list/ListToastHost.native.js +59 -0
- package/dist/cjs/list/ListToastHost.native.js.map +1 -0
- package/dist/cjs/list/RangeFilter.cjs +122 -0
- package/dist/cjs/list/RangeFilter.native.js +135 -0
- package/dist/cjs/list/RangeFilter.native.js.map +1 -0
- package/dist/cjs/list/RecordCard.cjs +233 -0
- package/dist/cjs/list/RecordCard.native.js +173 -0
- package/dist/cjs/list/RecordCard.native.js.map +1 -0
- package/dist/cjs/list/ShufflePanel.cjs +112 -0
- package/dist/cjs/list/ShufflePanel.native.js +139 -0
- package/dist/cjs/list/ShufflePanel.native.js.map +1 -0
- package/dist/cjs/list/facetReading.cjs +71 -0
- package/dist/cjs/list/facetReading.native.js +163 -0
- package/dist/cjs/list/facetReading.native.js.map +1 -0
- package/dist/cjs/list/favorites.cjs +79 -0
- package/dist/cjs/list/favorites.native.js +91 -0
- package/dist/cjs/list/favorites.native.js.map +1 -0
- package/dist/cjs/list/listState.cjs +100 -0
- package/dist/cjs/list/listState.native.js +234 -0
- package/dist/cjs/list/listState.native.js.map +1 -0
- package/dist/cjs/list/recordLook.cjs +35 -0
- package/dist/cjs/list/recordLook.native.js +39 -0
- package/dist/cjs/list/recordLook.native.js.map +1 -0
- package/dist/cjs/list/useListControls.cjs +189 -0
- package/dist/cjs/list/useListControls.native.js +272 -0
- package/dist/cjs/list/useListControls.native.js.map +1 -0
- package/dist/cjs/record/RecordBars.cjs +200 -0
- package/dist/cjs/record/RecordBars.native.js +225 -0
- package/dist/cjs/record/RecordBars.native.js.map +1 -0
- package/dist/cjs/record/RecordGallery.cjs +67 -0
- package/dist/cjs/record/RecordGallery.native.js +75 -0
- package/dist/cjs/record/RecordGallery.native.js.map +1 -0
- package/dist/cjs/record/RecordHero.cjs +239 -0
- package/dist/cjs/record/RecordHero.native.js +250 -0
- package/dist/cjs/record/RecordHero.native.js.map +1 -0
- package/dist/cjs/record/RecordPage.cjs +330 -0
- package/dist/cjs/record/RecordPage.native.js +364 -0
- package/dist/cjs/record/RecordPage.native.js.map +1 -0
- package/dist/cjs/record/RecordPager.cjs +125 -0
- package/dist/cjs/record/RecordPager.native.js +130 -0
- package/dist/cjs/record/RecordPager.native.js.map +1 -0
- package/dist/cjs/record/RecordRows.cjs +126 -0
- package/dist/cjs/record/RecordRows.native.js +140 -0
- package/dist/cjs/record/RecordRows.native.js.map +1 -0
- package/dist/cjs/record/recordData.cjs +122 -0
- package/dist/cjs/record/recordData.native.js +189 -0
- package/dist/cjs/record/recordData.native.js.map +1 -0
- package/dist/cjs/record/recordSections.cjs +30 -0
- package/dist/cjs/record/recordSections.native.js +33 -0
- package/dist/cjs/record/recordSections.native.js.map +1 -0
- package/dist/cjs/useFrappeFacets.cjs +1 -1
- package/dist/cjs/useFrappeFacets.native.js +1 -1
- package/dist/cjs/useFrappeFacets.native.js.map +1 -1
- package/dist/esm/FrappeCalendar.mjs +1 -1
- package/dist/esm/FrappeCalendar.mjs.map +1 -1
- package/dist/esm/FrappeCalendar.native.js +1 -1
- package/dist/esm/FrappeCalendar.native.js.map +1 -1
- package/dist/esm/FrappeDashboard.mjs +1 -1
- package/dist/esm/FrappeDashboard.mjs.map +1 -1
- package/dist/esm/FrappeDashboard.native.js +1 -1
- package/dist/esm/FrappeDashboard.native.js.map +1 -1
- package/dist/esm/FrappeForm.mjs +8 -0
- package/dist/esm/FrappeForm.mjs.map +1 -1
- package/dist/esm/FrappeForm.native.js +9 -0
- package/dist/esm/FrappeForm.native.js.map +1 -1
- package/dist/esm/FrappeImageView.mjs +1 -1
- package/dist/esm/FrappeImageView.mjs.map +1 -1
- package/dist/esm/FrappeImageView.native.js +1 -1
- package/dist/esm/FrappeImageView.native.js.map +1 -1
- package/dist/esm/FrappeInsights.mjs +355 -0
- package/dist/esm/FrappeInsights.mjs.map +1 -0
- package/dist/esm/FrappeInsights.native.js +419 -0
- package/dist/esm/FrappeInsights.native.js.map +1 -0
- package/dist/esm/FrappeLikedBy.mjs +6 -3
- package/dist/esm/FrappeLikedBy.mjs.map +1 -1
- package/dist/esm/FrappeLikedBy.native.js +6 -3
- package/dist/esm/FrappeLikedBy.native.js.map +1 -1
- package/dist/esm/FrappeListView.mjs +410 -43
- package/dist/esm/FrappeListView.mjs.map +1 -1
- package/dist/esm/FrappeListView.native.js +473 -46
- package/dist/esm/FrappeListView.native.js.map +1 -1
- package/dist/esm/FrappeNotConfigured.mjs +29 -0
- package/dist/esm/FrappeNotConfigured.mjs.map +1 -0
- package/dist/esm/FrappeNotConfigured.native.js +30 -0
- package/dist/esm/FrappeNotConfigured.native.js.map +1 -0
- package/dist/esm/FrappeRecordView.mjs +174 -0
- package/dist/esm/FrappeRecordView.mjs.map +1 -0
- package/dist/esm/FrappeRecordView.native.js +190 -0
- package/dist/esm/FrappeRecordView.native.js.map +1 -0
- package/dist/esm/FrappeReportBuilder.mjs +2 -2
- package/dist/esm/FrappeReportBuilder.mjs.map +1 -1
- package/dist/esm/FrappeReportBuilder.native.js +2 -2
- package/dist/esm/FrappeReportBuilder.native.js.map +1 -1
- package/dist/esm/FrappeReportView.mjs +1 -1
- package/dist/esm/FrappeReportView.mjs.map +1 -1
- package/dist/esm/FrappeReportView.native.js +2 -2
- package/dist/esm/FrappeReportView.native.js.map +1 -1
- package/dist/esm/FrappeTreeView.mjs +1 -1
- package/dist/esm/FrappeTreeView.mjs.map +1 -1
- package/dist/esm/FrappeTreeView.native.js +1 -1
- package/dist/esm/desk/awesomebar.mjs +1 -1
- package/dist/esm/desk/awesomebar.mjs.map +1 -1
- package/dist/esm/desk/awesomebar.native.js +3 -3
- package/dist/esm/desk/awesomebar.native.js.map +1 -1
- package/dist/esm/fields/CodeEditor/index.mjs +2 -2
- package/dist/esm/fields/CodeEditor/index.mjs.map +1 -1
- package/dist/esm/fields/CodeEditor/index.native.js +2 -2
- package/dist/esm/fields/CodeEditor/index.native.js.map +1 -1
- package/dist/esm/fields/Color/index.mjs +1 -0
- package/dist/esm/fields/Color/index.mjs.map +1 -1
- package/dist/esm/fields/Color/index.native.js +1 -0
- package/dist/esm/fields/Color/index.native.js.map +1 -1
- package/dist/esm/fields/FileUpload.mjs +2 -2
- package/dist/esm/fields/FileUpload.mjs.map +1 -1
- package/dist/esm/fields/FileUpload.native.js +2 -2
- package/dist/esm/fields/FileUpload.native.js.map +1 -1
- package/dist/esm/fields/Heading/index.mjs +21 -14
- package/dist/esm/fields/Heading/index.mjs.map +1 -1
- package/dist/esm/fields/Heading/index.native.js +24 -15
- package/dist/esm/fields/Heading/index.native.js.map +1 -1
- package/dist/esm/fields/MarkdownEditor/index.mjs +2 -1
- package/dist/esm/fields/MarkdownEditor/index.mjs.map +1 -1
- package/dist/esm/fields/MarkdownEditor/index.native.js +2 -2
- package/dist/esm/fields/MarkdownEditor/index.native.js.map +1 -1
- package/dist/esm/frappeNavigation.mjs +11 -2
- package/dist/esm/frappeNavigation.mjs.map +1 -1
- package/dist/esm/frappeNavigation.native.js +12 -2
- package/dist/esm/frappeNavigation.native.js.map +1 -1
- package/dist/esm/index.mjs +14 -2
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +14 -2
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/insights/InsightsFacetTags.mjs +122 -0
- package/dist/esm/insights/InsightsFacetTags.mjs.map +1 -0
- package/dist/esm/insights/InsightsFacetTags.native.js +137 -0
- package/dist/esm/insights/InsightsFacetTags.native.js.map +1 -0
- package/dist/esm/insights/InsightsKpiBand.mjs +99 -0
- package/dist/esm/insights/InsightsKpiBand.mjs.map +1 -0
- package/dist/esm/insights/InsightsKpiBand.native.js +105 -0
- package/dist/esm/insights/InsightsKpiBand.native.js.map +1 -0
- package/dist/esm/insights/InsightsLeaders.mjs +125 -0
- package/dist/esm/insights/InsightsLeaders.mjs.map +1 -0
- package/dist/esm/insights/InsightsLeaders.native.js +150 -0
- package/dist/esm/insights/InsightsLeaders.native.js.map +1 -0
- package/dist/esm/insights/InsightsRecords.mjs +80 -0
- package/dist/esm/insights/InsightsRecords.mjs.map +1 -0
- package/dist/esm/insights/InsightsRecords.native.js +81 -0
- package/dist/esm/insights/InsightsRecords.native.js.map +1 -0
- package/dist/esm/insights/InsightsTable.mjs +132 -0
- package/dist/esm/insights/InsightsTable.mjs.map +1 -0
- package/dist/esm/insights/InsightsTable.native.js +166 -0
- package/dist/esm/insights/InsightsTable.native.js.map +1 -0
- package/dist/esm/insights/insightsData.mjs +82 -0
- package/dist/esm/insights/insightsData.mjs.map +1 -0
- package/dist/esm/insights/insightsData.native.js +185 -0
- package/dist/esm/insights/insightsData.native.js.map +1 -0
- package/dist/esm/insights/insightsRecord.mjs +9 -0
- package/dist/esm/insights/insightsRecord.mjs.map +1 -0
- package/dist/esm/insights/insightsRecord.native.js +9 -0
- package/dist/esm/insights/insightsRecord.native.js.map +1 -0
- package/dist/esm/list/FacetBadge.mjs +37 -0
- package/dist/esm/list/FacetBadge.mjs.map +1 -0
- package/dist/esm/list/FacetBadge.native.js +38 -0
- package/dist/esm/list/FacetBadge.native.js.map +1 -0
- package/dist/esm/list/FacetRail.mjs +174 -0
- package/dist/esm/list/FacetRail.mjs.map +1 -0
- package/dist/esm/list/FacetRail.native.js +195 -0
- package/dist/esm/list/FacetRail.native.js.map +1 -0
- package/dist/esm/list/ImageWell.mjs +86 -0
- package/dist/esm/list/ImageWell.mjs.map +1 -0
- package/dist/esm/list/ImageWell.native.js +98 -0
- package/dist/esm/list/ImageWell.native.js.map +1 -0
- package/dist/esm/list/ListControls.mjs +201 -0
- package/dist/esm/list/ListControls.mjs.map +1 -0
- package/dist/esm/list/ListControls.native.js +224 -0
- package/dist/esm/list/ListControls.native.js.map +1 -0
- package/dist/esm/list/ListToastHost.mjs +18 -0
- package/dist/esm/list/ListToastHost.mjs.map +1 -0
- package/dist/esm/list/ListToastHost.native.js +20 -0
- package/dist/esm/list/ListToastHost.native.js.map +1 -0
- package/dist/esm/list/RangeFilter.mjs +85 -0
- package/dist/esm/list/RangeFilter.mjs.map +1 -0
- package/dist/esm/list/RangeFilter.native.js +95 -0
- package/dist/esm/list/RangeFilter.native.js.map +1 -0
- package/dist/esm/list/RecordCard.mjs +208 -0
- package/dist/esm/list/RecordCard.mjs.map +1 -0
- package/dist/esm/list/RecordCard.native.js +145 -0
- package/dist/esm/list/RecordCard.native.js.map +1 -0
- package/dist/esm/list/ShufflePanel.mjs +87 -0
- package/dist/esm/list/ShufflePanel.mjs.map +1 -0
- package/dist/esm/list/ShufflePanel.native.js +111 -0
- package/dist/esm/list/ShufflePanel.native.js.map +1 -0
- package/dist/esm/list/facetReading.mjs +45 -0
- package/dist/esm/list/facetReading.mjs.map +1 -0
- package/dist/esm/list/facetReading.native.js +134 -0
- package/dist/esm/list/facetReading.native.js.map +1 -0
- package/dist/esm/list/favorites.mjs +50 -0
- package/dist/esm/list/favorites.mjs.map +1 -0
- package/dist/esm/list/favorites.native.js +59 -0
- package/dist/esm/list/favorites.native.js.map +1 -0
- package/dist/esm/list/listState.mjs +71 -0
- package/dist/esm/list/listState.mjs.map +1 -0
- package/dist/esm/list/listState.native.js +202 -0
- package/dist/esm/list/listState.native.js.map +1 -0
- package/dist/esm/list/recordLook.mjs +10 -0
- package/dist/esm/list/recordLook.mjs.map +1 -0
- package/dist/esm/list/recordLook.native.js +11 -0
- package/dist/esm/list/recordLook.native.js.map +1 -0
- package/dist/esm/list/useListControls.mjs +164 -0
- package/dist/esm/list/useListControls.mjs.map +1 -0
- package/dist/esm/list/useListControls.native.js +244 -0
- package/dist/esm/list/useListControls.native.js.map +1 -0
- package/dist/esm/record/RecordBars.mjs +175 -0
- package/dist/esm/record/RecordBars.mjs.map +1 -0
- package/dist/esm/record/RecordBars.native.js +197 -0
- package/dist/esm/record/RecordBars.native.js.map +1 -0
- package/dist/esm/record/RecordGallery.mjs +42 -0
- package/dist/esm/record/RecordGallery.mjs.map +1 -0
- package/dist/esm/record/RecordGallery.native.js +47 -0
- package/dist/esm/record/RecordGallery.native.js.map +1 -0
- package/dist/esm/record/RecordHero.mjs +205 -0
- package/dist/esm/record/RecordHero.mjs.map +1 -0
- package/dist/esm/record/RecordHero.native.js +213 -0
- package/dist/esm/record/RecordHero.native.js.map +1 -0
- package/dist/esm/record/RecordPage.mjs +305 -0
- package/dist/esm/record/RecordPage.mjs.map +1 -0
- package/dist/esm/record/RecordPage.native.js +336 -0
- package/dist/esm/record/RecordPage.native.js.map +1 -0
- package/dist/esm/record/RecordPager.mjs +100 -0
- package/dist/esm/record/RecordPager.mjs.map +1 -0
- package/dist/esm/record/RecordPager.native.js +102 -0
- package/dist/esm/record/RecordPager.native.js.map +1 -0
- package/dist/esm/record/RecordRows.mjs +101 -0
- package/dist/esm/record/RecordRows.mjs.map +1 -0
- package/dist/esm/record/RecordRows.native.js +112 -0
- package/dist/esm/record/RecordRows.native.js.map +1 -0
- package/dist/esm/record/recordData.mjs +92 -0
- package/dist/esm/record/recordData.mjs.map +1 -0
- package/dist/esm/record/recordData.native.js +156 -0
- package/dist/esm/record/recordData.native.js.map +1 -0
- package/dist/esm/record/recordSections.mjs +5 -0
- package/dist/esm/record/recordSections.mjs.map +1 -0
- package/dist/esm/record/recordSections.native.js +5 -0
- package/dist/esm/record/recordSections.native.js.map +1 -0
- package/dist/esm/useFrappeFacets.mjs +1 -1
- package/dist/esm/useFrappeFacets.mjs.map +1 -1
- package/dist/esm/useFrappeFacets.native.js +1 -1
- package/dist/esm/useFrappeFacets.native.js.map +1 -1
- package/dist/jsx/FrappeCalendar.mjs +1 -1
- package/dist/jsx/FrappeCalendar.mjs.map +1 -1
- package/dist/jsx/FrappeCalendar.native.js +1 -1
- package/dist/jsx/FrappeCalendar.native.js.map +1 -1
- package/dist/jsx/FrappeDashboard.mjs +1 -1
- package/dist/jsx/FrappeDashboard.mjs.map +1 -1
- package/dist/jsx/FrappeDashboard.native.js +1 -1
- package/dist/jsx/FrappeDashboard.native.js.map +1 -1
- package/dist/jsx/FrappeForm.mjs +8 -0
- package/dist/jsx/FrappeForm.mjs.map +1 -1
- package/dist/jsx/FrappeForm.native.js +9 -0
- package/dist/jsx/FrappeForm.native.js.map +1 -1
- package/dist/jsx/FrappeImageView.mjs +1 -1
- package/dist/jsx/FrappeImageView.mjs.map +1 -1
- package/dist/jsx/FrappeImageView.native.js +1 -1
- package/dist/jsx/FrappeImageView.native.js.map +1 -1
- package/dist/jsx/FrappeInsights.mjs +355 -0
- package/dist/jsx/FrappeInsights.mjs.map +1 -0
- package/dist/jsx/FrappeInsights.native.js +447 -0
- package/dist/jsx/FrappeInsights.native.js.map +1 -0
- package/dist/jsx/FrappeLikedBy.mjs +6 -3
- package/dist/jsx/FrappeLikedBy.mjs.map +1 -1
- package/dist/jsx/FrappeLikedBy.native.js +5 -2
- package/dist/jsx/FrappeLikedBy.native.js.map +1 -1
- package/dist/jsx/FrappeListView.mjs +410 -43
- package/dist/jsx/FrappeListView.mjs.map +1 -1
- package/dist/jsx/FrappeListView.native.js +469 -42
- package/dist/jsx/FrappeListView.native.js.map +1 -1
- package/dist/jsx/FrappeNotConfigured.mjs +29 -0
- package/dist/jsx/FrappeNotConfigured.mjs.map +1 -0
- package/dist/jsx/FrappeNotConfigured.native.js +58 -0
- package/dist/jsx/FrappeNotConfigured.native.js.map +1 -0
- package/dist/jsx/FrappeRecordView.mjs +174 -0
- package/dist/jsx/FrappeRecordView.mjs.map +1 -0
- package/dist/jsx/FrappeRecordView.native.js +218 -0
- package/dist/jsx/FrappeRecordView.native.js.map +1 -0
- package/dist/jsx/FrappeReportBuilder.mjs +2 -2
- package/dist/jsx/FrappeReportBuilder.mjs.map +1 -1
- package/dist/jsx/FrappeReportBuilder.native.js +2 -2
- package/dist/jsx/FrappeReportBuilder.native.js.map +1 -1
- package/dist/jsx/FrappeReportView.mjs +1 -1
- package/dist/jsx/FrappeReportView.mjs.map +1 -1
- package/dist/jsx/FrappeReportView.native.js +2 -2
- package/dist/jsx/FrappeReportView.native.js.map +1 -1
- package/dist/jsx/FrappeTreeView.mjs +1 -1
- package/dist/jsx/FrappeTreeView.mjs.map +1 -1
- package/dist/jsx/FrappeTreeView.native.js +1 -1
- package/dist/jsx/desk/awesomebar.mjs +1 -1
- package/dist/jsx/desk/awesomebar.mjs.map +1 -1
- package/dist/jsx/desk/awesomebar.native.js +3 -3
- package/dist/jsx/desk/awesomebar.native.js.map +1 -1
- package/dist/jsx/fields/CodeEditor/index.mjs +2 -2
- package/dist/jsx/fields/CodeEditor/index.mjs.map +1 -1
- package/dist/jsx/fields/CodeEditor/index.native.js +1 -1
- package/dist/jsx/fields/CodeEditor/index.native.js.map +1 -1
- package/dist/jsx/fields/Color/index.mjs +1 -0
- package/dist/jsx/fields/Color/index.mjs.map +1 -1
- package/dist/jsx/fields/Color/index.native.js +1 -0
- package/dist/jsx/fields/Color/index.native.js.map +1 -1
- package/dist/jsx/fields/FileUpload.mjs +2 -2
- package/dist/jsx/fields/FileUpload.mjs.map +1 -1
- package/dist/jsx/fields/FileUpload.native.js +1 -1
- package/dist/jsx/fields/FileUpload.native.js.map +1 -1
- package/dist/jsx/fields/Heading/index.mjs +21 -14
- package/dist/jsx/fields/Heading/index.mjs.map +1 -1
- package/dist/jsx/fields/Heading/index.native.js +22 -13
- package/dist/jsx/fields/Heading/index.native.js.map +1 -1
- package/dist/jsx/fields/MarkdownEditor/index.mjs +2 -1
- package/dist/jsx/fields/MarkdownEditor/index.mjs.map +1 -1
- package/dist/jsx/fields/MarkdownEditor/index.native.js +1 -1
- package/dist/jsx/fields/MarkdownEditor/index.native.js.map +1 -1
- package/dist/jsx/frappeNavigation.mjs +11 -2
- package/dist/jsx/frappeNavigation.mjs.map +1 -1
- package/dist/jsx/frappeNavigation.native.js +13 -2
- package/dist/jsx/frappeNavigation.native.js.map +1 -1
- package/dist/jsx/index.js +14 -2
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +14 -2
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +34 -0
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/insights/InsightsFacetTags.mjs +122 -0
- package/dist/jsx/insights/InsightsFacetTags.mjs.map +1 -0
- package/dist/jsx/insights/InsightsFacetTags.native.js +165 -0
- package/dist/jsx/insights/InsightsFacetTags.native.js.map +1 -0
- package/dist/jsx/insights/InsightsKpiBand.mjs +99 -0
- package/dist/jsx/insights/InsightsKpiBand.mjs.map +1 -0
- package/dist/jsx/insights/InsightsKpiBand.native.js +133 -0
- package/dist/jsx/insights/InsightsKpiBand.native.js.map +1 -0
- package/dist/jsx/insights/InsightsLeaders.mjs +125 -0
- package/dist/jsx/insights/InsightsLeaders.mjs.map +1 -0
- package/dist/jsx/insights/InsightsLeaders.native.js +178 -0
- package/dist/jsx/insights/InsightsLeaders.native.js.map +1 -0
- package/dist/jsx/insights/InsightsRecords.mjs +80 -0
- package/dist/jsx/insights/InsightsRecords.mjs.map +1 -0
- package/dist/jsx/insights/InsightsRecords.native.js +109 -0
- package/dist/jsx/insights/InsightsRecords.native.js.map +1 -0
- package/dist/jsx/insights/InsightsTable.mjs +132 -0
- package/dist/jsx/insights/InsightsTable.mjs.map +1 -0
- package/dist/jsx/insights/InsightsTable.native.js +194 -0
- package/dist/jsx/insights/InsightsTable.native.js.map +1 -0
- package/dist/jsx/insights/insightsData.mjs +82 -0
- package/dist/jsx/insights/insightsData.mjs.map +1 -0
- package/dist/jsx/insights/insightsData.native.js +220 -0
- package/dist/jsx/insights/insightsData.native.js.map +1 -0
- package/dist/jsx/insights/insightsRecord.mjs +9 -0
- package/dist/jsx/insights/insightsRecord.mjs.map +1 -0
- package/dist/jsx/insights/insightsRecord.native.js +38 -0
- package/dist/jsx/insights/insightsRecord.native.js.map +1 -0
- package/dist/jsx/list/FacetBadge.mjs +37 -0
- package/dist/jsx/list/FacetBadge.mjs.map +1 -0
- package/dist/jsx/list/FacetBadge.native.js +66 -0
- package/dist/jsx/list/FacetBadge.native.js.map +1 -0
- package/dist/jsx/list/FacetRail.mjs +174 -0
- package/dist/jsx/list/FacetRail.mjs.map +1 -0
- package/dist/jsx/list/FacetRail.native.js +223 -0
- package/dist/jsx/list/FacetRail.native.js.map +1 -0
- package/dist/jsx/list/ImageWell.mjs +86 -0
- package/dist/jsx/list/ImageWell.mjs.map +1 -0
- package/dist/jsx/list/ImageWell.native.js +126 -0
- package/dist/jsx/list/ImageWell.native.js.map +1 -0
- package/dist/jsx/list/ListControls.mjs +201 -0
- package/dist/jsx/list/ListControls.mjs.map +1 -0
- package/dist/jsx/list/ListControls.native.js +252 -0
- package/dist/jsx/list/ListControls.native.js.map +1 -0
- package/dist/jsx/list/ListToastHost.mjs +18 -0
- package/dist/jsx/list/ListToastHost.mjs.map +1 -0
- package/dist/jsx/list/ListToastHost.native.js +59 -0
- package/dist/jsx/list/ListToastHost.native.js.map +1 -0
- package/dist/jsx/list/RangeFilter.mjs +85 -0
- package/dist/jsx/list/RangeFilter.mjs.map +1 -0
- package/dist/jsx/list/RangeFilter.native.js +135 -0
- package/dist/jsx/list/RangeFilter.native.js.map +1 -0
- package/dist/jsx/list/RecordCard.mjs +208 -0
- package/dist/jsx/list/RecordCard.mjs.map +1 -0
- package/dist/jsx/list/RecordCard.native.js +173 -0
- package/dist/jsx/list/RecordCard.native.js.map +1 -0
- package/dist/jsx/list/ShufflePanel.mjs +87 -0
- package/dist/jsx/list/ShufflePanel.mjs.map +1 -0
- package/dist/jsx/list/ShufflePanel.native.js +139 -0
- package/dist/jsx/list/ShufflePanel.native.js.map +1 -0
- package/dist/jsx/list/facetReading.mjs +45 -0
- package/dist/jsx/list/facetReading.mjs.map +1 -0
- package/dist/jsx/list/facetReading.native.js +163 -0
- package/dist/jsx/list/facetReading.native.js.map +1 -0
- package/dist/jsx/list/favorites.mjs +50 -0
- package/dist/jsx/list/favorites.mjs.map +1 -0
- package/dist/jsx/list/favorites.native.js +91 -0
- package/dist/jsx/list/favorites.native.js.map +1 -0
- package/dist/jsx/list/listState.mjs +71 -0
- package/dist/jsx/list/listState.mjs.map +1 -0
- package/dist/jsx/list/listState.native.js +234 -0
- package/dist/jsx/list/listState.native.js.map +1 -0
- package/dist/jsx/list/recordLook.mjs +10 -0
- package/dist/jsx/list/recordLook.mjs.map +1 -0
- package/dist/jsx/list/recordLook.native.js +39 -0
- package/dist/jsx/list/recordLook.native.js.map +1 -0
- package/dist/jsx/list/useListControls.mjs +164 -0
- package/dist/jsx/list/useListControls.mjs.map +1 -0
- package/dist/jsx/list/useListControls.native.js +272 -0
- package/dist/jsx/list/useListControls.native.js.map +1 -0
- package/dist/jsx/record/RecordBars.mjs +175 -0
- package/dist/jsx/record/RecordBars.mjs.map +1 -0
- package/dist/jsx/record/RecordBars.native.js +225 -0
- package/dist/jsx/record/RecordBars.native.js.map +1 -0
- package/dist/jsx/record/RecordGallery.mjs +42 -0
- package/dist/jsx/record/RecordGallery.mjs.map +1 -0
- package/dist/jsx/record/RecordGallery.native.js +75 -0
- package/dist/jsx/record/RecordGallery.native.js.map +1 -0
- package/dist/jsx/record/RecordHero.mjs +205 -0
- package/dist/jsx/record/RecordHero.mjs.map +1 -0
- package/dist/jsx/record/RecordHero.native.js +250 -0
- package/dist/jsx/record/RecordHero.native.js.map +1 -0
- package/dist/jsx/record/RecordPage.mjs +305 -0
- package/dist/jsx/record/RecordPage.mjs.map +1 -0
- package/dist/jsx/record/RecordPage.native.js +364 -0
- package/dist/jsx/record/RecordPage.native.js.map +1 -0
- package/dist/jsx/record/RecordPager.mjs +100 -0
- package/dist/jsx/record/RecordPager.mjs.map +1 -0
- package/dist/jsx/record/RecordPager.native.js +130 -0
- package/dist/jsx/record/RecordPager.native.js.map +1 -0
- package/dist/jsx/record/RecordRows.mjs +101 -0
- package/dist/jsx/record/RecordRows.mjs.map +1 -0
- package/dist/jsx/record/RecordRows.native.js +140 -0
- package/dist/jsx/record/RecordRows.native.js.map +1 -0
- package/dist/jsx/record/recordData.mjs +92 -0
- package/dist/jsx/record/recordData.mjs.map +1 -0
- package/dist/jsx/record/recordData.native.js +189 -0
- package/dist/jsx/record/recordData.native.js.map +1 -0
- package/dist/jsx/record/recordSections.mjs +5 -0
- package/dist/jsx/record/recordSections.mjs.map +1 -0
- package/dist/jsx/record/recordSections.native.js +33 -0
- package/dist/jsx/record/recordSections.native.js.map +1 -0
- package/dist/jsx/useFrappeFacets.mjs +1 -1
- package/dist/jsx/useFrappeFacets.mjs.map +1 -1
- package/dist/jsx/useFrappeFacets.native.js +1 -1
- package/dist/jsx/useFrappeFacets.native.js.map +1 -1
- package/package.json +16 -16
- package/src/FormSidebar.stories.tsx +2 -0
- package/src/FrappeCalendar.stories.tsx +2 -0
- package/src/FrappeCalendar.tsx +2 -2
- package/src/FrappeChartCard.stories.tsx +2 -0
- package/src/FrappeDashboard.stories.tsx +2 -0
- package/src/FrappeDashboard.tsx +2 -2
- package/src/FrappeForm.tsx +7 -1
- package/src/FrappeImageView.stories.tsx +2 -0
- package/src/FrappeImageView.tsx +2 -1
- package/src/FrappeInsights.spec.tsx +171 -0
- package/src/FrappeInsights.tsx +422 -0
- package/src/FrappeKPICard.stories.tsx +3 -3
- package/src/FrappeKanban.stories.tsx +4 -8
- package/src/FrappeLikedBy.tsx +7 -5
- package/src/FrappeListView.card.spec.tsx +157 -0
- package/src/FrappeListView.controls.spec.tsx +225 -0
- package/src/FrappeListView.seed.spec.tsx +30 -0
- package/src/FrappeListView.stories.tsx +2 -0
- package/src/FrappeListView.tsx +589 -45
- package/src/FrappeNotConfigured.tsx +29 -0
- package/src/FrappeRecordView.spec.tsx +276 -0
- package/src/FrappeRecordView.tsx +231 -0
- package/src/FrappeReportBuilder.tsx +4 -5
- package/src/FrappeReportView.tsx +1 -1
- package/src/FrappeTreeView.tsx +1 -1
- package/src/clientCache.auth.spec.tsx +94 -0
- package/src/desk/DeskFormSidebar.stories.tsx +2 -0
- package/src/desk/DeskShell.stories.tsx +12 -6
- package/src/desk/awesomebar.auth.spec.tsx +77 -0
- package/src/desk/awesomebar.tsx +1 -1
- package/src/fields/CodeEditor/index.tsx +8 -2
- package/src/fields/Color/Color.stories.tsx +2 -0
- package/src/fields/Color/index.tsx +1 -0
- package/src/fields/FileUpload.tsx +8 -2
- package/src/fields/Heading/index.tsx +41 -17
- package/src/fields/MarkdownEditor/index.native.tsx +8 -2
- package/src/fields/MarkdownEditor/index.tsx +8 -1
- package/src/fields/ReadOnly/ReadOnly.stories.tsx +2 -0
- package/src/frappeNavigation.loader.spec.tsx +45 -0
- package/src/frappeNavigation.tsx +32 -1
- package/src/frappeRoutes.notConfigured.spec.tsx +77 -0
- package/src/index.ts +53 -1
- package/src/insights/InsightsFacetTags.tsx +131 -0
- package/src/insights/InsightsKpiBand.tsx +114 -0
- package/src/insights/InsightsLeaders.tsx +146 -0
- package/src/insights/InsightsRecords.tsx +71 -0
- package/src/insights/InsightsTable.tsx +169 -0
- package/src/insights/insightsData.spec.ts +143 -0
- package/src/insights/insightsData.ts +122 -0
- package/src/insights/insightsRecord.ts +36 -0
- package/src/list/FacetBadge.tsx +41 -0
- package/src/list/FacetRail.tsx +235 -0
- package/src/list/ImageWell.tsx +110 -0
- package/src/list/ListControls.tsx +208 -0
- package/src/list/ListToastHost.tsx +27 -0
- package/src/list/RangeFilter.tsx +83 -0
- package/src/list/RecordCard.native.tsx +126 -0
- package/src/list/RecordCard.tsx +260 -0
- package/src/list/ShufflePanel.tsx +107 -0
- package/src/list/facetReading.ts +79 -0
- package/src/list/favorites.spec.ts +80 -0
- package/src/list/favorites.ts +79 -0
- package/src/list/listState.spec.ts +156 -0
- package/src/list/listState.ts +184 -0
- package/src/list/recordLook.ts +37 -0
- package/src/list/useListControls.tsx +223 -0
- package/src/record/RecordBars.tsx +187 -0
- package/src/record/RecordGallery.tsx +47 -0
- package/src/record/RecordHero.tsx +186 -0
- package/src/record/RecordPage.tsx +358 -0
- package/src/record/RecordPager.tsx +97 -0
- package/src/record/RecordRows.tsx +90 -0
- package/src/record/recordData.spec.ts +148 -0
- package/src/record/recordData.ts +124 -0
- package/src/record/recordSections.ts +62 -0
- package/src/schemaForm/SchemaForm.stories.tsx +2 -2
- package/src/useFrappeFacets.ts +14 -7
- package/types/FrappeForm.d.ts +2 -1
- package/types/FrappeForm.d.ts.map +1 -1
- package/types/FrappeImageView.d.ts.map +1 -1
- package/types/FrappeInsights.d.ts +55 -0
- package/types/FrappeInsights.d.ts.map +1 -0
- package/types/FrappeLikedBy.d.ts.map +1 -1
- package/types/FrappeListView.d.ts +85 -3
- package/types/FrappeListView.d.ts.map +1 -1
- package/types/FrappeNotConfigured.d.ts +11 -0
- package/types/FrappeNotConfigured.d.ts.map +1 -0
- package/types/FrappeRecordView.d.ts +69 -0
- package/types/FrappeRecordView.d.ts.map +1 -0
- package/types/FrappeReportBuilder.d.ts.map +1 -1
- package/types/fields/CodeEditor/index.d.ts.map +1 -1
- package/types/fields/Color/index.d.ts.map +1 -1
- package/types/fields/FileUpload.d.ts.map +1 -1
- package/types/fields/Heading/index.d.ts.map +1 -1
- package/types/fields/MarkdownEditor/index.d.ts.map +1 -1
- package/types/fields/MarkdownEditor/index.native.d.ts.map +1 -1
- package/types/frappeNavigation.d.ts +21 -0
- package/types/frappeNavigation.d.ts.map +1 -1
- package/types/index.d.ts +14 -2
- package/types/index.d.ts.map +1 -1
- package/types/insights/InsightsFacetTags.d.ts +11 -0
- package/types/insights/InsightsFacetTags.d.ts.map +1 -0
- package/types/insights/InsightsKpiBand.d.ts +22 -0
- package/types/insights/InsightsKpiBand.d.ts.map +1 -0
- package/types/insights/InsightsLeaders.d.ts +16 -0
- package/types/insights/InsightsLeaders.d.ts.map +1 -0
- package/types/insights/InsightsRecords.d.ts +19 -0
- package/types/insights/InsightsRecords.d.ts.map +1 -0
- package/types/insights/InsightsTable.d.ts +17 -0
- package/types/insights/InsightsTable.d.ts.map +1 -0
- package/types/insights/insightsData.d.ts +45 -0
- package/types/insights/insightsData.d.ts.map +1 -0
- package/types/insights/insightsRecord.d.ts +29 -0
- package/types/insights/insightsRecord.d.ts.map +1 -0
- package/types/list/FacetBadge.d.ts +13 -0
- package/types/list/FacetBadge.d.ts.map +1 -0
- package/types/list/FacetRail.d.ts +26 -0
- package/types/list/FacetRail.d.ts.map +1 -0
- package/types/list/ImageWell.d.ts +24 -0
- package/types/list/ImageWell.d.ts.map +1 -0
- package/types/list/ListControls.d.ts +30 -0
- package/types/list/ListControls.d.ts.map +1 -0
- package/types/list/ListToastHost.d.ts +7 -0
- package/types/list/ListToastHost.d.ts.map +1 -0
- package/types/list/RangeFilter.d.ts +14 -0
- package/types/list/RangeFilter.d.ts.map +1 -0
- package/types/list/RecordCard.d.ts +38 -0
- package/types/list/RecordCard.d.ts.map +1 -0
- package/types/list/RecordCard.native.d.ts +9 -0
- package/types/list/RecordCard.native.d.ts.map +1 -0
- package/types/list/ShufflePanel.d.ts +24 -0
- package/types/list/ShufflePanel.d.ts.map +1 -0
- package/types/list/facetReading.d.ts +33 -0
- package/types/list/facetReading.d.ts.map +1 -0
- package/types/list/favorites.d.ts +26 -0
- package/types/list/favorites.d.ts.map +1 -0
- package/types/list/listState.d.ts +94 -0
- package/types/list/listState.d.ts.map +1 -0
- package/types/list/recordLook.d.ts +25 -0
- package/types/list/recordLook.d.ts.map +1 -0
- package/types/list/useListControls.d.ts +48 -0
- package/types/list/useListControls.d.ts.map +1 -0
- package/types/record/RecordBars.d.ts +11 -0
- package/types/record/RecordBars.d.ts.map +1 -0
- package/types/record/RecordGallery.d.ts +17 -0
- package/types/record/RecordGallery.d.ts.map +1 -0
- package/types/record/RecordHero.d.ts +42 -0
- package/types/record/RecordHero.d.ts.map +1 -0
- package/types/record/RecordPage.d.ts +54 -0
- package/types/record/RecordPage.d.ts.map +1 -0
- package/types/record/RecordPager.d.ts +13 -0
- package/types/record/RecordPager.d.ts.map +1 -0
- package/types/record/RecordRows.d.ts +13 -0
- package/types/record/RecordRows.d.ts.map +1 -0
- package/types/record/recordData.d.ts +46 -0
- package/types/record/recordData.d.ts.map +1 -0
- package/types/record/recordSections.d.ts +67 -0
- package/types/record/recordSections.d.ts.map +1 -0
- package/types/useFrappeFacets.d.ts.map +1 -1
|
@@ -51,13 +51,24 @@ var import_theme = require("@multiplatform.one/theme");
|
|
|
51
51
|
var import_store = require("@multiplatform.one/store");
|
|
52
52
|
var import_FrappeProvider = require("./FrappeProvider.native.js");
|
|
53
53
|
var import_FrappeList = require("./FrappeList.native.js");
|
|
54
|
+
var import_FrappeNotConfigured = require("./FrappeNotConfigured.native.js");
|
|
55
|
+
var import_FrappeRowsReader = require("./FrappeRowsReader.native.js");
|
|
54
56
|
var import_FrappeTable = require("./FrappeTable.native.js");
|
|
55
57
|
var import_useDocRights = require("./formEngine/useDocRights.native.js");
|
|
56
58
|
var import_frappeNavigation = require("./frappeNavigation.native.js");
|
|
57
59
|
var import_frappeConnections = require("./frappeConnections.native.js");
|
|
58
60
|
var import_liveErrors = require("./liveErrors.native.js");
|
|
61
|
+
var import_favorites = require("./list/favorites.native.js");
|
|
62
|
+
var import_RecordCard = require("./list/RecordCard.native.js");
|
|
63
|
+
var import_recordLook = require("./list/recordLook.native.js");
|
|
64
|
+
var import_ListControls = require("./list/ListControls.native.js");
|
|
65
|
+
var import_listState = require("./list/listState.native.js");
|
|
66
|
+
var import_ListToastHost = require("./list/ListToastHost.native.js");
|
|
67
|
+
var import_ShufflePanel = require("./list/ShufflePanel.native.js");
|
|
68
|
+
var import_useListControls = require("./list/useListControls.native.js");
|
|
59
69
|
var import_useConnectionFilters = require("./useConnectionFilters.native.js");
|
|
60
70
|
var storageKeyPrefix = "frappe-listview-";
|
|
71
|
+
var eagerCards = 6;
|
|
61
72
|
var internalDocKeys = /* @__PURE__ */new Set(["name", "owner", "creation", "modified", "modified_by", "docstatus", "idx", "doctype", "_user_tags", "_comments", "_assign", "_liked_by", "_seen"]);
|
|
62
73
|
var layoutFieldtypes = /* @__PURE__ */new Set(["Column Break", "Section Break", "Tab Break", "HTML", "Heading", "Fold", "Button"]);
|
|
63
74
|
function fieldKeyLabel(key) {
|
|
@@ -83,7 +94,20 @@ async function setStoredViewMode(doctype, mode) {
|
|
|
83
94
|
await Promise.resolve(import_store.storage.setItem(`${storageKeyPrefix}${doctype}`, mode));
|
|
84
95
|
} catch (unused) {}
|
|
85
96
|
}
|
|
86
|
-
function FrappeListView(
|
|
97
|
+
function FrappeListView(props) {
|
|
98
|
+
var _props_baseURL;
|
|
99
|
+
var config = (0, import_FrappeProvider.useFrappeConfig)();
|
|
100
|
+
if (!((_props_baseURL = props.baseURL) !== null && _props_baseURL !== void 0 ? _props_baseURL : config === null || config === void 0 ? void 0 : config.baseURL) && !(config === null || config === void 0 ? void 0 : config.fixtures)) {
|
|
101
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_FrappeNotConfigured.FrappeNotConfigured, {
|
|
102
|
+
doctype: props.doctype,
|
|
103
|
+
page: props.route !== void 0
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(FrappeListViewBody, {
|
|
107
|
+
...props
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function FrappeListViewBody(param) {
|
|
87
111
|
var {
|
|
88
112
|
doctype,
|
|
89
113
|
fields,
|
|
@@ -97,10 +121,12 @@ function FrappeListView(param) {
|
|
|
97
121
|
route,
|
|
98
122
|
orderBy,
|
|
99
123
|
limit,
|
|
100
|
-
initialRows,
|
|
124
|
+
initialRows: initialRowsProp,
|
|
125
|
+
loader,
|
|
101
126
|
columns,
|
|
102
127
|
displayFields,
|
|
103
128
|
renderCard,
|
|
129
|
+
look,
|
|
104
130
|
gridProps,
|
|
105
131
|
emptyState,
|
|
106
132
|
onRetry,
|
|
@@ -111,14 +137,29 @@ function FrappeListView(param) {
|
|
|
111
137
|
showFilterSidebar = false,
|
|
112
138
|
// deprecated: switcher always renders; destructured so it stays out of stackProps
|
|
113
139
|
enableViewSwitcher: _enableViewSwitcher,
|
|
140
|
+
title,
|
|
141
|
+
subtitle,
|
|
142
|
+
actions,
|
|
143
|
+
headerAccessory,
|
|
144
|
+
titleField,
|
|
145
|
+
sorts,
|
|
146
|
+
searchFilter,
|
|
147
|
+
searchPlaceholder,
|
|
148
|
+
facets,
|
|
149
|
+
ranges,
|
|
150
|
+
favorites,
|
|
151
|
+
shuffle,
|
|
152
|
+
urlState = false,
|
|
114
153
|
baseURL,
|
|
115
154
|
auth,
|
|
116
155
|
syncOptions,
|
|
117
156
|
...stackProps
|
|
118
157
|
} = param;
|
|
119
|
-
var
|
|
158
|
+
var _ref, _ref1, _ref2;
|
|
159
|
+
var _sorts_;
|
|
120
160
|
var config = (0, import_FrappeProvider.useFrappeConfig)();
|
|
121
|
-
var
|
|
161
|
+
var router = (0, import_frappeNavigation.useFrappeRouter)();
|
|
162
|
+
var navigate = router === null || router === void 0 ? void 0 : router.navigate;
|
|
122
163
|
var {
|
|
123
164
|
knobProps
|
|
124
165
|
} = (0, import_theme.useResolvedKnobs)();
|
|
@@ -143,8 +184,6 @@ function FrappeListView(param) {
|
|
|
143
184
|
fixtures: config === null || config === void 0 ? void 0 : config.fixtures
|
|
144
185
|
};
|
|
145
186
|
var [storedViewMode, setViewModeState] = (0, import_react2.useState)(defaultViewMode);
|
|
146
|
-
var requestedViewMode = controlledViewMode !== null && controlledViewMode !== void 0 ? controlledViewMode : storedViewMode;
|
|
147
|
-
var viewMode = requestedViewMode === "grid" && !renderCard ? "list" : requestedViewMode;
|
|
148
187
|
(0, import_react2.useEffect)(function () {
|
|
149
188
|
var cancelled = false;
|
|
150
189
|
setViewModeState(defaultViewMode);
|
|
@@ -158,12 +197,6 @@ function FrappeListView(param) {
|
|
|
158
197
|
cancelled = true;
|
|
159
198
|
};
|
|
160
199
|
}, [doctype, defaultViewMode]);
|
|
161
|
-
var setViewMode = (0, import_react2.useCallback)(function (mode) {
|
|
162
|
-
onViewModeChange === null || onViewModeChange === void 0 ? void 0 : onViewModeChange(mode);
|
|
163
|
-
if (controlledViewMode !== void 0) return;
|
|
164
|
-
setViewModeState(mode);
|
|
165
|
-
void setStoredViewMode(doctype, mode);
|
|
166
|
-
}, [doctype, controlledViewMode, onViewModeChange]);
|
|
167
200
|
var {
|
|
168
201
|
meta,
|
|
169
202
|
isLoading: isMetaLoading,
|
|
@@ -183,16 +216,6 @@ function FrappeListView(param) {
|
|
|
183
216
|
mode: "create"
|
|
184
217
|
}));
|
|
185
218
|
} : void 0;
|
|
186
|
-
var asPage = function asPage2(view) {
|
|
187
|
-
return route === void 0 ? view : /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.ListPageLayout, {
|
|
188
|
-
scroll: false,
|
|
189
|
-
header: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.PageHeader, {
|
|
190
|
-
title: doctype,
|
|
191
|
-
divider: false
|
|
192
|
-
}),
|
|
193
|
-
children: view
|
|
194
|
-
});
|
|
195
|
-
};
|
|
196
219
|
var [peekedFields, setPeekedFields] = (0, import_react2.useState)(null);
|
|
197
220
|
(0, import_react2.useEffect)(function () {
|
|
198
221
|
if (meta || isMetaLoading || !metaError || !finalBaseURL) return;
|
|
@@ -281,9 +304,9 @@ function FrappeListView(param) {
|
|
|
281
304
|
var textFields = effectiveDisplayFields.filter(function (field) {
|
|
282
305
|
return field.key !== imageFieldName;
|
|
283
306
|
});
|
|
284
|
-
var [
|
|
285
|
-
var titleValue =
|
|
286
|
-
var
|
|
307
|
+
var [titleField2, ...subtitleFields] = textFields;
|
|
308
|
+
var titleValue = titleField2 ? row[titleField2.key] : void 0;
|
|
309
|
+
var title2 = (titleField2 === null || titleField2 === void 0 ? void 0 : titleField2.render) ? titleField2.render(titleValue, doc) : titleValue !== null && titleValue !== void 0 ? titleValue : doc.name;
|
|
287
310
|
var subtitleParts = subtitleFields.map(function (field) {
|
|
288
311
|
var value = row[field.key];
|
|
289
312
|
var rendered = field.render ? field.render(value, doc) : value;
|
|
@@ -292,7 +315,7 @@ function FrappeListView(param) {
|
|
|
292
315
|
return part !== null;
|
|
293
316
|
});
|
|
294
317
|
var imageUrl = imageFieldName ? resolveImageUrl(row[imageFieldName], finalBaseURL) : "";
|
|
295
|
-
var titleName = typeof
|
|
318
|
+
var titleName = typeof title2 === "string" ? title2 : void 0;
|
|
296
319
|
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {
|
|
297
320
|
alignItems: "center",
|
|
298
321
|
flex: 1,
|
|
@@ -315,7 +338,7 @@ function FrappeListView(param) {
|
|
|
315
338
|
...{
|
|
316
339
|
"data-list-slot": "title"
|
|
317
340
|
},
|
|
318
|
-
children:
|
|
341
|
+
children: title2
|
|
319
342
|
}), subtitleParts.length > 0 && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
320
343
|
...knobProps.body,
|
|
321
344
|
color: knobProps.textAccentColor,
|
|
@@ -368,26 +391,92 @@ function FrappeListView(param) {
|
|
|
368
391
|
var effectiveConnections = (0, import_react2.useMemo)(function () {
|
|
369
392
|
return connections !== null && connections !== void 0 ? connections : isMetaLoading ? void 0 : (0, import_frappeConnections.connectionsFromMeta)(meta);
|
|
370
393
|
}, [connections, isMetaLoading, meta]);
|
|
371
|
-
var linkFilters = (0, import_useConnectionFilters.useConnectionFilters)(connectionConfig, doctype, activeFilters, effectiveConnections);
|
|
372
|
-
var resolvedFilters = linkFilters.filters;
|
|
373
|
-
var [searchText, setSearchText] = (0, import_react2.useState)("");
|
|
374
|
-
var [debouncedSearch, setDebouncedSearch] = (0, import_react2.useState)("");
|
|
375
394
|
var searchField = (0, import_react2.useMemo)(function () {
|
|
376
395
|
if (meta === null || meta === void 0 ? void 0 : meta.title_field) return meta.title_field;
|
|
377
396
|
if (metaListFields.length > 0) return metaListFields[0].fieldname;
|
|
378
397
|
if (peekedFields && peekedFields.length > 0) return peekedFields[0];
|
|
379
398
|
return "name";
|
|
380
399
|
}, [meta, metaListFields, peekedFields]);
|
|
400
|
+
var hasCards = Boolean(renderCard || (look === null || look === void 0 ? void 0 : look.images));
|
|
401
|
+
var listControls = {
|
|
402
|
+
sorts,
|
|
403
|
+
facets,
|
|
404
|
+
ranges,
|
|
405
|
+
views: hasCards ? ["grid", "list", "table"] : ["list", "table"],
|
|
406
|
+
defaultView: defaultViewMode
|
|
407
|
+
};
|
|
408
|
+
var hasControls = Boolean((sorts === null || sorts === void 0 ? void 0 : sorts.length) || (facets === null || facets === void 0 ? void 0 : facets.length) || (ranges === null || ranges === void 0 ? void 0 : ranges.length) || favorites || shuffle);
|
|
409
|
+
var favoritesStorageKey = favorites ? typeof favorites === "string" ? favorites : (0, import_favorites.favoritesKey)(doctype) : void 0;
|
|
410
|
+
var list = (0, import_useListControls.useListControls)({
|
|
411
|
+
doctype,
|
|
412
|
+
controls: listControls,
|
|
413
|
+
connections: effectiveConnections,
|
|
414
|
+
connection: connectionConfig,
|
|
415
|
+
limit,
|
|
416
|
+
favoritesKey: favoritesStorageKey,
|
|
417
|
+
router: urlState ? router : void 0,
|
|
418
|
+
readBase: Boolean(subtitle || (facets === null || facets === void 0 ? void 0 : facets.length) || (ranges === null || ranges === void 0 ? void 0 : ranges.length))
|
|
419
|
+
});
|
|
420
|
+
var updateList = list.update;
|
|
421
|
+
var requestedViewMode = (_ref = controlledViewMode !== null && controlledViewMode !== void 0 ? controlledViewMode : urlState ? list.state.view : void 0) !== null && _ref !== void 0 ? _ref : storedViewMode;
|
|
422
|
+
var viewMode = requestedViewMode === "grid" && !hasCards ? "list" : requestedViewMode;
|
|
423
|
+
var setViewMode = (0, import_react2.useCallback)(function (mode) {
|
|
424
|
+
onViewModeChange === null || onViewModeChange === void 0 ? void 0 : onViewModeChange(mode);
|
|
425
|
+
if (controlledViewMode !== void 0) return;
|
|
426
|
+
if (urlState) {
|
|
427
|
+
updateList({
|
|
428
|
+
view: mode
|
|
429
|
+
});
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
setViewModeState(mode);
|
|
433
|
+
void setStoredViewMode(doctype, mode);
|
|
434
|
+
}, [doctype, controlledViewMode, onViewModeChange, urlState, updateList]);
|
|
435
|
+
var controlsKey = JSON.stringify({
|
|
436
|
+
facets: facets === null || facets === void 0 ? void 0 : facets.map(function (facet) {
|
|
437
|
+
return [facet.param, facet.field, facet.doctype];
|
|
438
|
+
}),
|
|
439
|
+
ranges: ranges === null || ranges === void 0 ? void 0 : ranges.map(function (range) {
|
|
440
|
+
return [range.param, range.field];
|
|
441
|
+
}),
|
|
442
|
+
sorts: sorts === null || sorts === void 0 ? void 0 : sorts.map(function (sort) {
|
|
443
|
+
return [sort.value, sort.orderBy];
|
|
444
|
+
})
|
|
445
|
+
});
|
|
446
|
+
var controlFilters = (0, import_react2.useMemo)(function () {
|
|
447
|
+
if (!hasControls) return activeFilters;
|
|
448
|
+
var base = !activeFilters ? [] : Array.isArray(activeFilters) ? activeFilters : Object.entries(activeFilters).map(function (param2) {
|
|
449
|
+
var [field, value] = param2;
|
|
450
|
+
return [field, "=", value];
|
|
451
|
+
});
|
|
452
|
+
return (0, import_listState.listStateFilters)(list.state, listControls, {
|
|
453
|
+
base,
|
|
454
|
+
search: searchFilter !== null && searchFilter !== void 0 ? searchFilter : function (query) {
|
|
455
|
+
return [[searchField, "like", `%${query}%`]];
|
|
456
|
+
},
|
|
457
|
+
favorites: list.favorites.favoriteSet
|
|
458
|
+
});
|
|
459
|
+
},
|
|
460
|
+
// controlsKey stands for the facet and range definitions listControls carries.
|
|
461
|
+
[hasControls, activeFilters, list.state, list.favorites.favoriteSet, searchFilter, searchField, controlsKey]);
|
|
462
|
+
var effectiveOrderBy = hasControls ? (0, import_listState.listStateOrderBy)(list.state, listControls, orderBy) : orderBy;
|
|
463
|
+
var loaded = (0, import_frappeNavigation.useRouteLoaderData)(loader);
|
|
464
|
+
var initialRows = initialRowsProp !== null && initialRowsProp !== void 0 ? initialRowsProp : loaded === null || loaded === void 0 ? void 0 : loaded.rows;
|
|
465
|
+
var seedRows = !hasControls || !(0, import_listState.isListNarrowed)(list.state) && (!(sorts === null || sorts === void 0 ? void 0 : sorts.length) || list.state.sort === sorts[0].value) ? initialRows : void 0;
|
|
466
|
+
var linkFilters = (0, import_useConnectionFilters.useConnectionFilters)(connectionConfig, doctype, controlFilters, effectiveConnections);
|
|
467
|
+
var resolvedFilters = linkFilters.filters;
|
|
468
|
+
var [searchText, setSearchText] = (0, import_react2.useState)("");
|
|
469
|
+
var [debouncedSearch, setDebouncedSearch] = (0, import_react2.useState)("");
|
|
381
470
|
var listFilters = (0, import_react2.useMemo)(function () {
|
|
382
471
|
var query = debouncedSearch.trim();
|
|
383
472
|
if (!query) return resolvedFilters;
|
|
384
|
-
var
|
|
385
|
-
if (!resolvedFilters) return [
|
|
386
|
-
if (Array.isArray(resolvedFilters)) return [...resolvedFilters,
|
|
473
|
+
var searchFilter2 = [searchField, "like", `%${query}%`];
|
|
474
|
+
if (!resolvedFilters) return [searchFilter2];
|
|
475
|
+
if (Array.isArray(resolvedFilters)) return [...resolvedFilters, searchFilter2];
|
|
387
476
|
return [...Object.entries(resolvedFilters).map(function (param2) {
|
|
388
477
|
var [key, value] = param2;
|
|
389
478
|
return [key, "=", value];
|
|
390
|
-
}),
|
|
479
|
+
}), searchFilter2];
|
|
391
480
|
}, [resolvedFilters, debouncedSearch, searchField]);
|
|
392
481
|
var hasProvidedFilters = (0, import_react2.useMemo)(function () {
|
|
393
482
|
if (!activeFilters) return false;
|
|
@@ -416,18 +505,352 @@ function FrappeListView(param) {
|
|
|
416
505
|
var handleDeleteFilter = (0, import_react2.useCallback)(async function (name) {
|
|
417
506
|
await savedFiltersHook.deleteFilter(name);
|
|
418
507
|
}, [savedFiltersHook]);
|
|
508
|
+
var slug = doctype.toLowerCase().replace(/\s+/g, "-");
|
|
509
|
+
var searchId = `${slug}-list-search`;
|
|
510
|
+
var resultsId = `${slug}-results`;
|
|
511
|
+
var nameField = titleField !== null && titleField !== void 0 ? titleField : meta === null || meta === void 0 ? void 0 : meta.title_field;
|
|
512
|
+
var [shuffleOpen, setShuffleOpen] = (0, import_react2.useState)(false);
|
|
513
|
+
var [shuffleRows, setShuffleRows] = (0, import_react2.useState)([]);
|
|
514
|
+
var handleShuffleRows = (0, import_react2.useCallback)(function (snapshot) {
|
|
515
|
+
return setShuffleRows(snapshot.rows);
|
|
516
|
+
}, []);
|
|
517
|
+
var shuffleOrderKey = JSON.stringify((_ref1 = (_ref2 = sorts === null || sorts === void 0 ? void 0 : (_sorts_ = sorts[0]) === null || _sorts_ === void 0 ? void 0 : _sorts_.orderBy) !== null && _ref2 !== void 0 ? _ref2 : orderBy) !== null && _ref1 !== void 0 ? _ref1 : null);
|
|
518
|
+
var shuffleFiltersKey = JSON.stringify(resolvedFilters !== null && resolvedFilters !== void 0 ? resolvedFilters : null);
|
|
519
|
+
var shuffleFieldsKey = JSON.stringify(effectiveFields);
|
|
520
|
+
var shuffleOptions = (0, import_react2.useMemo)(function () {
|
|
521
|
+
var _JSON_parse, _JSON_parse1;
|
|
522
|
+
return {
|
|
523
|
+
fields: JSON.parse(shuffleFieldsKey),
|
|
524
|
+
filters: (_JSON_parse = JSON.parse(shuffleFiltersKey)) !== null && _JSON_parse !== void 0 ? _JSON_parse : void 0,
|
|
525
|
+
orderBy: (_JSON_parse1 = JSON.parse(shuffleOrderKey)) !== null && _JSON_parse1 !== void 0 ? _JSON_parse1 : void 0,
|
|
526
|
+
limit: limit !== null && limit !== void 0 ? limit : 0
|
|
527
|
+
};
|
|
528
|
+
}, [shuffleFieldsKey, shuffleFiltersKey, shuffleOrderKey, limit]);
|
|
529
|
+
var {
|
|
530
|
+
isFavorite,
|
|
531
|
+
toggle: toggleStar
|
|
532
|
+
} = list.favorites;
|
|
533
|
+
var toggleFavorite = (0, import_react2.useCallback)(function (doc) {
|
|
534
|
+
var name = doc.name;
|
|
535
|
+
if (!name) return;
|
|
536
|
+
var starred = isFavorite(name);
|
|
537
|
+
toggleStar(name);
|
|
538
|
+
var titleValue = nameField ? doc[nameField] : void 0;
|
|
539
|
+
var label = typeof titleValue === "string" && titleValue ? titleValue : name;
|
|
540
|
+
(0, import_components.showToast)(starred ? {
|
|
541
|
+
id: `${slug}-favorite-${name}`,
|
|
542
|
+
title: t("{{name}} removed from favorites", {
|
|
543
|
+
name: label
|
|
544
|
+
}),
|
|
545
|
+
intent: "accent",
|
|
546
|
+
action: {
|
|
547
|
+
label: t("Undo"),
|
|
548
|
+
onPress: function onPress() {
|
|
549
|
+
return toggleStar(name);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
} : {
|
|
553
|
+
id: `${slug}-favorite-${name}`,
|
|
554
|
+
title: t("{{name}} added to favorites", {
|
|
555
|
+
name: label
|
|
556
|
+
}),
|
|
557
|
+
intent: "success"
|
|
558
|
+
});
|
|
559
|
+
}, [isFavorite, toggleStar, nameField, slug, t]);
|
|
560
|
+
var cardFor = function cardFor2(doc) {
|
|
561
|
+
var _doc_name;
|
|
562
|
+
var name = (_doc_name = doc.name) !== null && _doc_name !== void 0 ? _doc_name : "";
|
|
563
|
+
var row = doc;
|
|
564
|
+
return {
|
|
565
|
+
href: route !== void 0 && name ? (0, import_frappeNavigation.frappeRouteHref)(route, {
|
|
566
|
+
mode: "view",
|
|
567
|
+
name
|
|
568
|
+
}) : void 0,
|
|
569
|
+
open: function open() {
|
|
570
|
+
return onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(doc);
|
|
571
|
+
},
|
|
572
|
+
facets: Object.fromEntries((facets !== null && facets !== void 0 ? facets : []).map(function (facet) {
|
|
573
|
+
var _ref3;
|
|
574
|
+
var _list_facets_facet_param;
|
|
575
|
+
return [facet.param, facet.doctype ? (_ref3 = (_list_facets_facet_param = list.facets[facet.param]) === null || _list_facets_facet_param === void 0 ? void 0 : _list_facets_facet_param.values.get(name)) !== null && _ref3 !== void 0 ? _ref3 : [] : row[facet.field] === void 0 || row[facet.field] === null ? [] : [String(row[facet.field])]];
|
|
576
|
+
})),
|
|
577
|
+
favorite: favoritesStorageKey && name ? {
|
|
578
|
+
active: isFavorite(name),
|
|
579
|
+
toggle: function toggle() {
|
|
580
|
+
return toggleFavorite(doc);
|
|
581
|
+
}
|
|
582
|
+
} : void 0
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
var tintFacet = facets === null || facets === void 0 ? void 0 : facets.find(function (facet) {
|
|
586
|
+
return facet.tint;
|
|
587
|
+
});
|
|
588
|
+
var drawRecordCard = function drawRecordCard2(doc, index) {
|
|
589
|
+
var _doc_name, _card_facets_tintFacet_param, _ref3;
|
|
590
|
+
var _look_subtitle, _look_code, _look_images;
|
|
591
|
+
var card = cardFor(doc);
|
|
592
|
+
var name = (_doc_name = doc.name) !== null && _doc_name !== void 0 ? _doc_name : "";
|
|
593
|
+
var values = tintFacet ? (_card_facets_tintFacet_param = card.facets[tintFacet.param]) !== null && _card_facets_tintFacet_param !== void 0 ? _card_facets_tintFacet_param : [] : [];
|
|
594
|
+
var title2 = (0, import_recordLook.recordTitle)(doc, look, nameField);
|
|
595
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_RecordCard.RecordCard, {
|
|
596
|
+
title: title2,
|
|
597
|
+
subtitle: look === null || look === void 0 ? void 0 : (_look_subtitle = look.subtitle) === null || _look_subtitle === void 0 ? void 0 : _look_subtitle.call(look, doc),
|
|
598
|
+
code: look === null || look === void 0 ? void 0 : (_look_code = look.code) === null || _look_code === void 0 ? void 0 : _look_code.call(look, doc),
|
|
599
|
+
images: (_ref3 = look === null || look === void 0 ? void 0 : (_look_images = look.images) === null || _look_images === void 0 ? void 0 : _look_images.call(look, doc, finalBaseURL)) !== null && _ref3 !== void 0 ? _ref3 : [],
|
|
600
|
+
tints: values.slice(0, 2).map(function (value) {
|
|
601
|
+
var _tintFacet_tint;
|
|
602
|
+
return tintFacet === null || tintFacet === void 0 ? void 0 : (_tintFacet_tint = tintFacet.tint) === null || _tintFacet_tint === void 0 ? void 0 : _tintFacet_tint.call(tintFacet, value);
|
|
603
|
+
}),
|
|
604
|
+
badges: values.map(function (value) {
|
|
605
|
+
var _ref4;
|
|
606
|
+
var _tintFacet_optionLabel, _tintFacet_tint;
|
|
607
|
+
return {
|
|
608
|
+
value,
|
|
609
|
+
label: (_ref4 = tintFacet === null || tintFacet === void 0 ? void 0 : (_tintFacet_optionLabel = tintFacet.optionLabel) === null || _tintFacet_optionLabel === void 0 ? void 0 : _tintFacet_optionLabel.call(tintFacet, value)) !== null && _ref4 !== void 0 ? _ref4 : value,
|
|
610
|
+
tint: tintFacet === null || tintFacet === void 0 ? void 0 : (_tintFacet_tint = tintFacet.tint) === null || _tintFacet_tint === void 0 ? void 0 : _tintFacet_tint.call(tintFacet, value)
|
|
611
|
+
};
|
|
612
|
+
}),
|
|
613
|
+
href: card.href,
|
|
614
|
+
onPress: card.open,
|
|
615
|
+
favorite: card.favorite,
|
|
616
|
+
lazy: index >= eagerCards,
|
|
617
|
+
testID: `${slug}-card-${name}`,
|
|
618
|
+
favoriteTestID: `${slug}-favorite-${name}`
|
|
619
|
+
});
|
|
620
|
+
};
|
|
621
|
+
var drawCard = renderCard ? function (doc, index) {
|
|
622
|
+
return renderCard(doc, index, cardFor(doc));
|
|
623
|
+
} : (look === null || look === void 0 ? void 0 : look.images) ? drawRecordCard : void 0;
|
|
624
|
+
(0, import_react2.useEffect)(function () {
|
|
625
|
+
if (!import_tamagui.isWeb || typeof document === "undefined" || !showSearch) return;
|
|
626
|
+
var handleKeyDown = function handleKeyDown2(event) {
|
|
627
|
+
var _document_getElementById, _input_select;
|
|
628
|
+
if (event.key !== "/" || event.metaKey || event.ctrlKey || event.altKey) return;
|
|
629
|
+
if (event.defaultPrevented) return;
|
|
630
|
+
var target = event.target;
|
|
631
|
+
if (target) {
|
|
632
|
+
var _target_closest;
|
|
633
|
+
var tag = target.tagName;
|
|
634
|
+
if (tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT") return;
|
|
635
|
+
if (target.isContentEditable) return;
|
|
636
|
+
if ((_target_closest = target.closest) === null || _target_closest === void 0 ? void 0 : _target_closest.call(target, '[role="dialog"], [role="menu"], [role="listbox"]')) return;
|
|
637
|
+
}
|
|
638
|
+
var input = (_document_getElementById = document.getElementById(searchId)) === null || _document_getElementById === void 0 ? void 0 : _document_getElementById.querySelector("input");
|
|
639
|
+
if (!input) return;
|
|
640
|
+
event.preventDefault();
|
|
641
|
+
input.focus();
|
|
642
|
+
(_input_select = input.select) === null || _input_select === void 0 ? void 0 : _input_select.call(input);
|
|
643
|
+
};
|
|
644
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
645
|
+
return function () {
|
|
646
|
+
return document.removeEventListener("keydown", handleKeyDown);
|
|
647
|
+
};
|
|
648
|
+
}, [searchId, showSearch]);
|
|
649
|
+
var headerOwnsTools = route !== void 0 && !showToolbar;
|
|
650
|
+
var pressFor = function pressFor2(action) {
|
|
651
|
+
var _action_onPress;
|
|
652
|
+
return (_action_onPress = action.onPress) !== null && _action_onPress !== void 0 ? _action_onPress : action.href && navigate ? function () {
|
|
653
|
+
return navigate(action.href);
|
|
654
|
+
} : void 0;
|
|
655
|
+
};
|
|
656
|
+
var headerActions = headerOwnsTools || headerAccessory || (actions === null || actions === void 0 ? void 0 : actions.length) ? /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {
|
|
657
|
+
...knobProps.gap,
|
|
658
|
+
alignItems: "center",
|
|
659
|
+
flexWrap: "wrap",
|
|
660
|
+
flexShrink: 1,
|
|
661
|
+
minWidth: 0,
|
|
662
|
+
children: [headerOwnsTools ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Tooltip, {
|
|
663
|
+
content: t("Switch views"),
|
|
664
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.XStack, {
|
|
665
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.ViewSwitcher, {
|
|
666
|
+
views: [...(hasCards ? [{
|
|
667
|
+
type: "grid",
|
|
668
|
+
label: t("Cards"),
|
|
669
|
+
icon: import_react.ImageIcon
|
|
670
|
+
}] : []), {
|
|
671
|
+
type: "list",
|
|
672
|
+
label: t("List"),
|
|
673
|
+
icon: import_react.ListIcon
|
|
674
|
+
}, {
|
|
675
|
+
type: "table",
|
|
676
|
+
label: t("Table"),
|
|
677
|
+
icon: import_react.TableIcon
|
|
678
|
+
}],
|
|
679
|
+
currentView: viewMode,
|
|
680
|
+
onViewChange: function onViewChange(v) {
|
|
681
|
+
return setViewMode(v);
|
|
682
|
+
}
|
|
683
|
+
})
|
|
684
|
+
})
|
|
685
|
+
}) : null, headerAccessory, actions === null || actions === void 0 ? void 0 : actions.map(function (action) {
|
|
686
|
+
var _action_hint;
|
|
687
|
+
var Icon = action.icon;
|
|
688
|
+
var onPress = pressFor(action);
|
|
689
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_react2.default.Fragment, {
|
|
690
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Tooltip, {
|
|
691
|
+
content: (_action_hint = action.hint) !== null && _action_hint !== void 0 ? _action_hint : action.label,
|
|
692
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_forms.Button, {
|
|
693
|
+
outlined: true,
|
|
694
|
+
onPress,
|
|
695
|
+
icon: Icon ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(Icon, {
|
|
696
|
+
size: 16
|
|
697
|
+
}) : void 0,
|
|
698
|
+
"$max-sm": {
|
|
699
|
+
display: "none"
|
|
700
|
+
},
|
|
701
|
+
testID: action.testID,
|
|
702
|
+
children: action.label
|
|
703
|
+
})
|
|
704
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_forms.Button, {
|
|
705
|
+
outlined: true,
|
|
706
|
+
circular: true,
|
|
707
|
+
onPress,
|
|
708
|
+
icon: Icon ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(Icon, {
|
|
709
|
+
size: 16
|
|
710
|
+
}) : void 0,
|
|
711
|
+
display: "none",
|
|
712
|
+
"aria-label": action.label,
|
|
713
|
+
"$max-sm": {
|
|
714
|
+
display: "flex"
|
|
715
|
+
}
|
|
716
|
+
})]
|
|
717
|
+
}, action.label);
|
|
718
|
+
}), headerOwnsTools && onAdd ? /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
719
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_forms.Button, {
|
|
720
|
+
theme: "accent",
|
|
721
|
+
onPress: onAdd,
|
|
722
|
+
icon: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.PlusIcon, {
|
|
723
|
+
size: 16
|
|
724
|
+
}),
|
|
725
|
+
"$max-sm": {
|
|
726
|
+
display: "none"
|
|
727
|
+
},
|
|
728
|
+
children: t("Add {{doctype}}", {
|
|
729
|
+
doctype
|
|
730
|
+
})
|
|
731
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_forms.Button, {
|
|
732
|
+
theme: "accent",
|
|
733
|
+
onPress: onAdd,
|
|
734
|
+
icon: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.PlusIcon, {
|
|
735
|
+
size: 16
|
|
736
|
+
}),
|
|
737
|
+
display: "none",
|
|
738
|
+
"$max-sm": {
|
|
739
|
+
display: "flex"
|
|
740
|
+
},
|
|
741
|
+
children: t("Add")
|
|
742
|
+
})]
|
|
743
|
+
}) : null]
|
|
744
|
+
}) : void 0;
|
|
745
|
+
var controlsBand = hasControls ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_ListControls.ListControls, {
|
|
746
|
+
controls: listControls,
|
|
747
|
+
list,
|
|
748
|
+
searchId,
|
|
749
|
+
searchPlaceholder,
|
|
750
|
+
showSearch,
|
|
751
|
+
showFavorites: Boolean(favoritesStorageKey),
|
|
752
|
+
shuffle: shuffle ? {
|
|
753
|
+
open: shuffleOpen,
|
|
754
|
+
toggle: function toggle() {
|
|
755
|
+
return setShuffleOpen(function (open) {
|
|
756
|
+
return !open;
|
|
757
|
+
});
|
|
758
|
+
},
|
|
759
|
+
panelId: `${slug}-shuffle-panel`
|
|
760
|
+
} : void 0,
|
|
761
|
+
shufflePanel: shuffle && shuffleOpen && shuffleRows.length > 0 && drawCard ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_ShufflePanel.ShufflePanel, {
|
|
762
|
+
id: `${slug}-shuffle-panel`,
|
|
763
|
+
label: t("Surprise me"),
|
|
764
|
+
rows: shuffleRows,
|
|
765
|
+
itemLabel: shuffle.label,
|
|
766
|
+
renderPick: function renderPick(doc) {
|
|
767
|
+
return drawCard(doc, 0);
|
|
768
|
+
},
|
|
769
|
+
onGo: function onGo(doc) {
|
|
770
|
+
setShuffleOpen(false);
|
|
771
|
+
onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(doc);
|
|
772
|
+
},
|
|
773
|
+
testID: `${slug}-shuffle-panel`
|
|
774
|
+
}) : null,
|
|
775
|
+
separator: !surface,
|
|
776
|
+
testID: slug
|
|
777
|
+
}) : null;
|
|
778
|
+
var asPage = function asPage2(view) {
|
|
779
|
+
var extras = /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
780
|
+
children: [list.readers, shuffle && shuffleOpen && !linkFilters.pending ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_FrappeRowsReader.FrappeRowsReader, {
|
|
781
|
+
connection: connectionConfig,
|
|
782
|
+
doctype,
|
|
783
|
+
options: shuffleOptions,
|
|
784
|
+
onChange: handleShuffleRows
|
|
785
|
+
}) : null, favoritesStorageKey ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_ListToastHost.ListToastHost, {}) : null]
|
|
786
|
+
});
|
|
787
|
+
if (route === void 0) {
|
|
788
|
+
return controlsBand ? /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
789
|
+
...knobProps.gap,
|
|
790
|
+
flex: viewMode === "grid" ? void 0 : 1,
|
|
791
|
+
children: [controlsBand, view, extras]
|
|
792
|
+
}) : /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
793
|
+
children: [view, extras]
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_components.ListPageLayout, {
|
|
797
|
+
scroll: !surface,
|
|
798
|
+
header: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
799
|
+
children: [controlsBand ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.SkipLink, {
|
|
800
|
+
targetId: resultsId,
|
|
801
|
+
children: t("Skip to results")
|
|
802
|
+
}) : null, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.PageHeader, {
|
|
803
|
+
title: title !== null && title !== void 0 ? title : doctype,
|
|
804
|
+
subtitle: subtitle && list.total !== void 0 ? subtitle(list.total) : void 0,
|
|
805
|
+
actions: headerActions,
|
|
806
|
+
divider: !surface
|
|
807
|
+
})]
|
|
808
|
+
}),
|
|
809
|
+
toolbar: controlsBand !== null && controlsBand !== void 0 ? controlsBand : void 0,
|
|
810
|
+
children: [view, extras]
|
|
811
|
+
});
|
|
812
|
+
};
|
|
813
|
+
var controlsEmptyState = hasControls ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.EmptyState, {
|
|
814
|
+
"aria-live": "polite",
|
|
815
|
+
icon: list.state.favoritesOnly ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.HeartIcon, {
|
|
816
|
+
size: 28
|
|
817
|
+
}) : (0, import_listState.isListNarrowed)(list.state) ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.MagnifyingGlassIcon, {
|
|
818
|
+
size: 28
|
|
819
|
+
}) : /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.SparkleIcon, {
|
|
820
|
+
size: 28
|
|
821
|
+
}),
|
|
822
|
+
title: list.state.favoritesOnly ? t("No favorites yet") : list.state.search.trim() ? t('No match for "{{query}}"', {
|
|
823
|
+
query: list.state.search.trim()
|
|
824
|
+
}) : (0, import_listState.isListNarrowed)(list.state) ? t("No {{doctype}} match the active filters", {
|
|
825
|
+
doctype
|
|
826
|
+
}) : t("No {{doctype}} yet", {
|
|
827
|
+
doctype
|
|
828
|
+
}),
|
|
829
|
+
description: list.state.favoritesOnly ? t("Tap the heart on a record to favorite it.") : (0, import_listState.isListNarrowed)(list.state) ? t("Try a different search or filter.") : void 0,
|
|
830
|
+
action: (0, import_listState.isListNarrowed)(list.state) ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_forms.Button, {
|
|
831
|
+
outlined: true,
|
|
832
|
+
onPress: list.clear,
|
|
833
|
+
children: t("Clear filters")
|
|
834
|
+
}) : onAdd ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_forms.Button, {
|
|
835
|
+
theme: "accent",
|
|
836
|
+
onPress: onAdd,
|
|
837
|
+
children: t("Add your first {{doctype}}", {
|
|
838
|
+
doctype
|
|
839
|
+
})
|
|
840
|
+
}) : void 0
|
|
841
|
+
}) : void 0;
|
|
419
842
|
if (isMetaLoading && !fields) {
|
|
420
843
|
return asPage(/* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
421
844
|
...knobProps.panelPadding,
|
|
422
845
|
alignItems: "center",
|
|
423
846
|
justifyContent: "center",
|
|
847
|
+
gap: "$2",
|
|
424
848
|
...stackProps,
|
|
425
849
|
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_forms.Spinner, {
|
|
426
850
|
size: "large"
|
|
427
851
|
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
428
852
|
...knobProps.body,
|
|
429
853
|
color: knobProps.textAccentColor,
|
|
430
|
-
marginTop: "$2",
|
|
431
854
|
children: t("Loading {{doctype}} schema...", {
|
|
432
855
|
doctype
|
|
433
856
|
})
|
|
@@ -449,7 +872,7 @@ function FrappeListView(param) {
|
|
|
449
872
|
alignItems: "center",
|
|
450
873
|
...knobProps.gap,
|
|
451
874
|
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.ViewSwitcher, {
|
|
452
|
-
views: [...(
|
|
875
|
+
views: [...(hasCards ? [{
|
|
453
876
|
type: "grid",
|
|
454
877
|
label: t("Cards")
|
|
455
878
|
}] : []), {
|
|
@@ -559,6 +982,7 @@ function FrappeListView(param) {
|
|
|
559
982
|
borderBottomColor: "$borderColor",
|
|
560
983
|
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
561
984
|
flex: 1,
|
|
985
|
+
id: searchId,
|
|
562
986
|
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_forms.SearchInput, {
|
|
563
987
|
value: searchText,
|
|
564
988
|
onChange: setSearchText,
|
|
@@ -579,23 +1003,23 @@ function FrappeListView(param) {
|
|
|
579
1003
|
var isGrid = viewMode === "grid";
|
|
580
1004
|
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
581
1005
|
flex: isGrid ? void 0 : 1,
|
|
582
|
-
children: [showSearch ? renderListSearch() : null, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_FrappeList.FrappeList, {
|
|
1006
|
+
children: [showSearch && !hasControls ? renderListSearch() : null, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_FrappeList.FrappeList, {
|
|
583
1007
|
layout: isGrid ? "grid" : "list",
|
|
584
1008
|
gridProps,
|
|
585
|
-
emptyState,
|
|
1009
|
+
emptyState: emptyState !== null && emptyState !== void 0 ? emptyState : controlsEmptyState,
|
|
586
1010
|
pageSize,
|
|
587
1011
|
onRetry: onRetry !== null && onRetry !== void 0 ? onRetry : handleRefresh,
|
|
588
1012
|
doctype,
|
|
589
1013
|
fields: effectiveFields,
|
|
590
1014
|
filters: listFilters,
|
|
591
|
-
renderItem: isGrid &&
|
|
1015
|
+
renderItem: isGrid && drawCard ? drawCard : renderListItem,
|
|
592
1016
|
onItemClick,
|
|
593
1017
|
baseURL: finalBaseURL,
|
|
594
1018
|
auth: finalAuth,
|
|
595
1019
|
syncOptions: finalSyncOptions,
|
|
596
|
-
orderBy,
|
|
1020
|
+
orderBy: effectiveOrderBy,
|
|
597
1021
|
limit,
|
|
598
|
-
initialRows,
|
|
1022
|
+
initialRows: seedRows,
|
|
599
1023
|
// Only override when narrowing is active: FrappeList's own
|
|
600
1024
|
// "No {doctype} records found" stays the true-empty message.
|
|
601
1025
|
...(noResultsMessage ? {
|
|
@@ -640,6 +1064,9 @@ function FrappeListView(param) {
|
|
|
640
1064
|
...(surface ? knobProps.containerRadius : {}),
|
|
641
1065
|
overflow: surface ? "hidden" : void 0,
|
|
642
1066
|
testID: `${doctype.toLowerCase()}-list`,
|
|
1067
|
+
...(hasControls ? {
|
|
1068
|
+
id: resultsId
|
|
1069
|
+
} : {}),
|
|
643
1070
|
...stackProps,
|
|
644
1071
|
children: [renderToolbar(), linkFilters.readers, showFilterSidebar ? /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {
|
|
645
1072
|
flex: 1,
|