@multiplatform.one/frappe-ui 7.23.2 → 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/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 +392 -38
- package/dist/cjs/FrappeListView.native.js +454 -41
- package/dist/cjs/FrappeListView.native.js.map +1 -1
- 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/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/Heading/index.cjs +18 -11
- package/dist/cjs/fields/Heading/index.native.js +21 -12
- package/dist/cjs/fields/Heading/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/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/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 +396 -42
- package/dist/esm/FrappeListView.mjs.map +1 -1
- package/dist/esm/FrappeListView.native.js +458 -45
- package/dist/esm/FrappeListView.native.js.map +1 -1
- 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/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/Heading/index.mjs +19 -12
- package/dist/esm/fields/Heading/index.mjs.map +1 -1
- package/dist/esm/fields/Heading/index.native.js +22 -13
- package/dist/esm/fields/Heading/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/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/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 +396 -42
- package/dist/jsx/FrappeListView.mjs.map +1 -1
- package/dist/jsx/FrappeListView.native.js +454 -41
- package/dist/jsx/FrappeListView.native.js.map +1 -1
- 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/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/Heading/index.mjs +19 -12
- package/dist/jsx/fields/Heading/index.mjs.map +1 -1
- package/dist/jsx/fields/Heading/index.native.js +21 -12
- package/dist/jsx/fields/Heading/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/package.json +16 -16
- package/src/FrappeCalendar.tsx +2 -2
- package/src/FrappeDashboard.tsx +2 -2
- package/src/FrappeImageView.tsx +2 -1
- package/src/FrappeInsights.spec.tsx +171 -0
- package/src/FrappeInsights.tsx +422 -0
- 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.tsx +575 -44
- package/src/FrappeRecordView.spec.tsx +276 -0
- package/src/FrappeRecordView.tsx +231 -0
- package/src/FrappeReportBuilder.tsx +4 -5
- package/src/FrappeTreeView.tsx +1 -1
- package/src/desk/awesomebar.auth.spec.tsx +77 -0
- package/src/desk/awesomebar.tsx +1 -1
- package/src/fields/Heading/index.tsx +33 -15
- package/src/frappeNavigation.loader.spec.tsx +45 -0
- package/src/frappeNavigation.tsx +32 -1
- 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/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 +82 -2
- package/types/FrappeListView.d.ts.map +1 -1
- 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/Heading/index.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
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var ShufflePanel_exports = {};
|
|
24
|
+
__export(ShufflePanel_exports, {
|
|
25
|
+
ShufflePanel: () => ShufflePanel
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(ShufflePanel_exports);
|
|
28
|
+
var import_components = require("@multiplatform.one/components");
|
|
29
|
+
var import_theme = require("@multiplatform.one/theme");
|
|
30
|
+
var import_react = require("@phosphor-icons/react");
|
|
31
|
+
var import_react2 = require("react");
|
|
32
|
+
var import_react_i18next = require("react-i18next");
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
+
const pickWidth = "$12";
|
|
35
|
+
function randomOtherIndex(current, length) {
|
|
36
|
+
if (length < 2) return Math.max(0, current);
|
|
37
|
+
const offset = 1 + Math.floor(Math.random() * (length - 1));
|
|
38
|
+
return (Math.max(0, current) + offset) % length;
|
|
39
|
+
}
|
|
40
|
+
function ShufflePanel({
|
|
41
|
+
id,
|
|
42
|
+
label,
|
|
43
|
+
rows,
|
|
44
|
+
itemLabel,
|
|
45
|
+
renderPick,
|
|
46
|
+
onGo,
|
|
47
|
+
testID
|
|
48
|
+
}) {
|
|
49
|
+
const {
|
|
50
|
+
t
|
|
51
|
+
} = (0, import_react_i18next.useTranslation)();
|
|
52
|
+
const {
|
|
53
|
+
knobProps
|
|
54
|
+
} = (0, import_theme.useResolvedKnobs)();
|
|
55
|
+
const named = (0, import_react2.useMemo)(() => rows.filter(row => row.name), [rows]);
|
|
56
|
+
const items = (0, import_react2.useMemo)(() => named.map(row => ({
|
|
57
|
+
value: row.name,
|
|
58
|
+
label: itemLabel(row)
|
|
59
|
+
})), [named, itemLabel]);
|
|
60
|
+
const [selected, setSelected] = (0, import_react2.useState)(() => named[randomOtherIndex(0, named.length)]?.name ?? "");
|
|
61
|
+
const pick = named.find(row => row.name === selected) ?? named[0];
|
|
62
|
+
if (!pick) return null;
|
|
63
|
+
const spin = () => {
|
|
64
|
+
const current = named.findIndex(row => row.name === pick.name);
|
|
65
|
+
setSelected(named[randomOtherIndex(current, named.length)]?.name ?? "");
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_components.XStack, {
|
|
68
|
+
id,
|
|
69
|
+
role: "region",
|
|
70
|
+
"aria-label": label,
|
|
71
|
+
...knobProps.surface,
|
|
72
|
+
...knobProps.borderRadius,
|
|
73
|
+
...knobProps.panelPadding,
|
|
74
|
+
...knobProps.gap,
|
|
75
|
+
alignItems: "center",
|
|
76
|
+
flexWrap: "wrap",
|
|
77
|
+
testID,
|
|
78
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Wheel, {
|
|
79
|
+
items,
|
|
80
|
+
value: pick.name,
|
|
81
|
+
onChange: next => setSelected(String(next)),
|
|
82
|
+
visibleItems: 3,
|
|
83
|
+
loop: true,
|
|
84
|
+
"aria-label": label
|
|
85
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.YStack, {
|
|
86
|
+
width: pickWidth,
|
|
87
|
+
flexShrink: 0,
|
|
88
|
+
children: renderPick(pick)
|
|
89
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_components.XStack, {
|
|
90
|
+
...knobProps.gap,
|
|
91
|
+
alignItems: "center",
|
|
92
|
+
flexShrink: 0,
|
|
93
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Button, {
|
|
94
|
+
outlined: true,
|
|
95
|
+
onPress: spin,
|
|
96
|
+
icon: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.ArrowCounterClockwiseIcon, {
|
|
97
|
+
size: 16
|
|
98
|
+
}),
|
|
99
|
+
testID: testID ? `${testID}-spin` : void 0,
|
|
100
|
+
children: t("Spin")
|
|
101
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Button, {
|
|
102
|
+
theme: "accent",
|
|
103
|
+
onPress: () => onGo(pick),
|
|
104
|
+
iconAfter: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.ArrowRightIcon, {
|
|
105
|
+
size: 16
|
|
106
|
+
}),
|
|
107
|
+
testID: testID ? `${testID}-go` : void 0,
|
|
108
|
+
children: t("Go")
|
|
109
|
+
})]
|
|
110
|
+
})]
|
|
111
|
+
});
|
|
112
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var ShufflePanel_exports = {};
|
|
26
|
+
__export(ShufflePanel_exports, {
|
|
27
|
+
ShufflePanel: () => ShufflePanel
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(ShufflePanel_exports);
|
|
30
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
+
var import_components = require("@multiplatform.one/components");
|
|
32
|
+
var import_theme = require("@multiplatform.one/theme");
|
|
33
|
+
var import_react = require("@phosphor-icons/react");
|
|
34
|
+
var import_react2 = require("react");
|
|
35
|
+
var import_react_i18next = require("react-i18next");
|
|
36
|
+
var pickWidth = "$12";
|
|
37
|
+
function randomOtherIndex(current, length) {
|
|
38
|
+
if (length < 2) return Math.max(0, current);
|
|
39
|
+
var offset = 1 + Math.floor(Math.random() * (length - 1));
|
|
40
|
+
return (Math.max(0, current) + offset) % length;
|
|
41
|
+
}
|
|
42
|
+
function ShufflePanel(param) {
|
|
43
|
+
var {
|
|
44
|
+
id,
|
|
45
|
+
label,
|
|
46
|
+
rows,
|
|
47
|
+
itemLabel,
|
|
48
|
+
renderPick,
|
|
49
|
+
onGo,
|
|
50
|
+
testID
|
|
51
|
+
} = param;
|
|
52
|
+
var _named_find;
|
|
53
|
+
var {
|
|
54
|
+
t
|
|
55
|
+
} = (0, import_react_i18next.useTranslation)();
|
|
56
|
+
var {
|
|
57
|
+
knobProps
|
|
58
|
+
} = (0, import_theme.useResolvedKnobs)();
|
|
59
|
+
var named = (0, import_react2.useMemo)(function () {
|
|
60
|
+
return rows.filter(function (row) {
|
|
61
|
+
return row.name;
|
|
62
|
+
});
|
|
63
|
+
}, [rows]);
|
|
64
|
+
var items = (0, import_react2.useMemo)(function () {
|
|
65
|
+
return named.map(function (row) {
|
|
66
|
+
return {
|
|
67
|
+
value: row.name,
|
|
68
|
+
label: itemLabel(row)
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
}, [named, itemLabel]);
|
|
72
|
+
var [selected, setSelected] = (0, import_react2.useState)(function () {
|
|
73
|
+
var _ref;
|
|
74
|
+
var _named_randomOtherIndex;
|
|
75
|
+
return (_ref = (_named_randomOtherIndex = named[randomOtherIndex(0, named.length)]) === null || _named_randomOtherIndex === void 0 ? void 0 : _named_randomOtherIndex.name) !== null && _ref !== void 0 ? _ref : "";
|
|
76
|
+
});
|
|
77
|
+
var pick = (_named_find = named.find(function (row) {
|
|
78
|
+
return row.name === selected;
|
|
79
|
+
})) !== null && _named_find !== void 0 ? _named_find : named[0];
|
|
80
|
+
if (!pick) return null;
|
|
81
|
+
var spin = function spin2() {
|
|
82
|
+
var _ref;
|
|
83
|
+
var _named_randomOtherIndex;
|
|
84
|
+
var current = named.findIndex(function (row) {
|
|
85
|
+
return row.name === pick.name;
|
|
86
|
+
});
|
|
87
|
+
setSelected((_ref = (_named_randomOtherIndex = named[randomOtherIndex(current, named.length)]) === null || _named_randomOtherIndex === void 0 ? void 0 : _named_randomOtherIndex.name) !== null && _ref !== void 0 ? _ref : "");
|
|
88
|
+
};
|
|
89
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_components.XStack, {
|
|
90
|
+
id,
|
|
91
|
+
role: "region",
|
|
92
|
+
"aria-label": label,
|
|
93
|
+
...knobProps.surface,
|
|
94
|
+
...knobProps.borderRadius,
|
|
95
|
+
...knobProps.panelPadding,
|
|
96
|
+
...knobProps.gap,
|
|
97
|
+
alignItems: "center",
|
|
98
|
+
flexWrap: "wrap",
|
|
99
|
+
testID,
|
|
100
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Wheel, {
|
|
101
|
+
items,
|
|
102
|
+
value: pick.name,
|
|
103
|
+
onChange: function onChange(next) {
|
|
104
|
+
return setSelected(String(next));
|
|
105
|
+
},
|
|
106
|
+
visibleItems: 3,
|
|
107
|
+
loop: true,
|
|
108
|
+
"aria-label": label
|
|
109
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.YStack, {
|
|
110
|
+
width: pickWidth,
|
|
111
|
+
flexShrink: 0,
|
|
112
|
+
children: renderPick(pick)
|
|
113
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_components.XStack, {
|
|
114
|
+
...knobProps.gap,
|
|
115
|
+
alignItems: "center",
|
|
116
|
+
flexShrink: 0,
|
|
117
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Button, {
|
|
118
|
+
outlined: true,
|
|
119
|
+
onPress: spin,
|
|
120
|
+
icon: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.ArrowCounterClockwiseIcon, {
|
|
121
|
+
size: 16
|
|
122
|
+
}),
|
|
123
|
+
testID: testID ? `${testID}-spin` : void 0,
|
|
124
|
+
children: t("Spin")
|
|
125
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Button, {
|
|
126
|
+
theme: "accent",
|
|
127
|
+
onPress: function onPress() {
|
|
128
|
+
return onGo(pick);
|
|
129
|
+
},
|
|
130
|
+
iconAfter: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.ArrowRightIcon, {
|
|
131
|
+
size: 16
|
|
132
|
+
}),
|
|
133
|
+
testID: testID ? `${testID}-go` : void 0,
|
|
134
|
+
children: t("Go")
|
|
135
|
+
})]
|
|
136
|
+
})]
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=ShufflePanel.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","ShufflePanel_exports","__export","ShufflePanel","module","exports","import_jsx_runtime","require","import_components","import_theme","import_react","import_react2","import_react_i18next","pickWidth","randomOtherIndex","current","length","Math","max","offset","floor","random","param","id","label","rows","itemLabel","renderPick","onGo","testID","_named_find","t","useTranslation","knobProps","useResolvedKnobs","named","useMemo","filter","row","name","items","map","selected","setSelected","useState","_ref","_named_randomOtherIndex","pick","find","spin","spin2","findIndex","jsxs","XStack","role","surface","borderRadius","panelPadding","gap","alignItems","flexWrap","children","jsx","Wheel","onChange","next","String","visibleItems","loop","YStack","width","flexShrink","Button","outlined","onPress","icon","ArrowCounterClockwiseIcon"],"sources":["../../../src/list/ShufflePanel.tsx"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var facetReading_exports = {};
|
|
24
|
+
__export(facetReading_exports, {
|
|
25
|
+
facetRead: () => facetRead,
|
|
26
|
+
readFacet: () => readFacet
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(facetReading_exports);
|
|
29
|
+
function facetRead(facet, doctype, connections, limit) {
|
|
30
|
+
const link = facet.doctype ? connections?.find(candidate => candidate.doctype === facet.doctype) : void 0;
|
|
31
|
+
const linkField = facet.doctype ? link?.fieldname ?? "" : "name";
|
|
32
|
+
const fields = /* @__PURE__ */new Set(["name", linkField, facet.field]);
|
|
33
|
+
if (facet.orderBy) fields.add(facet.orderBy);
|
|
34
|
+
for (const field of link?.fields ?? []) fields.add(field);
|
|
35
|
+
fields.delete("");
|
|
36
|
+
return {
|
|
37
|
+
doctype: facet.doctype ?? doctype,
|
|
38
|
+
linkField,
|
|
39
|
+
options: {
|
|
40
|
+
fields: [...fields],
|
|
41
|
+
limit: facet.doctype ? link?.limit ?? 0 : limit ?? 0
|
|
42
|
+
},
|
|
43
|
+
ready: !facet.doctype || Boolean(link)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function readFacet(facet, linkField, rows) {
|
|
47
|
+
const byRecord = /* @__PURE__ */new Map();
|
|
48
|
+
for (const row of rows) {
|
|
49
|
+
const record = row[linkField];
|
|
50
|
+
const value = row[facet.field];
|
|
51
|
+
if (typeof record !== "string" || !record || value === null || value === void 0) continue;
|
|
52
|
+
if (value === "") continue;
|
|
53
|
+
const entry = byRecord.get(record) ?? [];
|
|
54
|
+
entry.push({
|
|
55
|
+
value: String(value),
|
|
56
|
+
order: Number(facet.orderBy ? row[facet.orderBy] : 0) || 0
|
|
57
|
+
});
|
|
58
|
+
byRecord.set(record, entry);
|
|
59
|
+
}
|
|
60
|
+
const values = /* @__PURE__ */new Map();
|
|
61
|
+
const counts = {};
|
|
62
|
+
for (const [record, entries] of byRecord) {
|
|
63
|
+
const ordered = [...new Set(entries.sort((a, b) => a.order - b.order).map(e => e.value))];
|
|
64
|
+
values.set(record, ordered);
|
|
65
|
+
for (const value of ordered) counts[value] = (counts[value] ?? 0) + 1;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
values,
|
|
69
|
+
counts
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var facetReading_exports = {};
|
|
26
|
+
__export(facetReading_exports, {
|
|
27
|
+
facetRead: () => facetRead,
|
|
28
|
+
readFacet: () => readFacet
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(facetReading_exports);
|
|
31
|
+
function facetRead(facet, doctype, connections, limit) {
|
|
32
|
+
var _ref, _ref1, _facet_doctype, _ref2;
|
|
33
|
+
var link = facet.doctype ? connections === null || connections === void 0 ? void 0 : connections.find(function (candidate) {
|
|
34
|
+
return candidate.doctype === facet.doctype;
|
|
35
|
+
}) : void 0;
|
|
36
|
+
var linkField = facet.doctype ? (_ref = link === null || link === void 0 ? void 0 : link.fieldname) !== null && _ref !== void 0 ? _ref : "" : "name";
|
|
37
|
+
var fields = /* @__PURE__ */new Set(["name", linkField, facet.field]);
|
|
38
|
+
if (facet.orderBy) fields.add(facet.orderBy);
|
|
39
|
+
var _iteratorNormalCompletion = true,
|
|
40
|
+
_didIteratorError = false,
|
|
41
|
+
_iteratorError = void 0;
|
|
42
|
+
try {
|
|
43
|
+
for (var _iterator = ((_ref1 = link === null || link === void 0 ? void 0 : link.fields) !== null && _ref1 !== void 0 ? _ref1 : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
44
|
+
var field = _step.value;
|
|
45
|
+
fields.add(field);
|
|
46
|
+
}
|
|
47
|
+
} catch (err) {
|
|
48
|
+
_didIteratorError = true;
|
|
49
|
+
_iteratorError = err;
|
|
50
|
+
} finally {
|
|
51
|
+
try {
|
|
52
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
53
|
+
_iterator.return();
|
|
54
|
+
}
|
|
55
|
+
} finally {
|
|
56
|
+
if (_didIteratorError) {
|
|
57
|
+
throw _iteratorError;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
fields.delete("");
|
|
62
|
+
return {
|
|
63
|
+
doctype: (_facet_doctype = facet.doctype) !== null && _facet_doctype !== void 0 ? _facet_doctype : doctype,
|
|
64
|
+
linkField,
|
|
65
|
+
options: {
|
|
66
|
+
fields: [...fields],
|
|
67
|
+
limit: facet.doctype ? (_ref2 = link === null || link === void 0 ? void 0 : link.limit) !== null && _ref2 !== void 0 ? _ref2 : 0 : limit !== null && limit !== void 0 ? limit : 0
|
|
68
|
+
},
|
|
69
|
+
ready: !facet.doctype || Boolean(link)
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function readFacet(facet, linkField, rows) {
|
|
73
|
+
var byRecord = /* @__PURE__ */new Map();
|
|
74
|
+
var _iteratorNormalCompletion = true,
|
|
75
|
+
_didIteratorError = false,
|
|
76
|
+
_iteratorError = void 0;
|
|
77
|
+
try {
|
|
78
|
+
for (var _iterator = rows[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
79
|
+
var row = _step.value;
|
|
80
|
+
var _byRecord_get;
|
|
81
|
+
var record = row[linkField];
|
|
82
|
+
var value = row[facet.field];
|
|
83
|
+
if (typeof record !== "string" || !record || value === null || value === void 0) continue;
|
|
84
|
+
if (value === "") continue;
|
|
85
|
+
var entry = (_byRecord_get = byRecord.get(record)) !== null && _byRecord_get !== void 0 ? _byRecord_get : [];
|
|
86
|
+
entry.push({
|
|
87
|
+
value: String(value),
|
|
88
|
+
order: Number(facet.orderBy ? row[facet.orderBy] : 0) || 0
|
|
89
|
+
});
|
|
90
|
+
byRecord.set(record, entry);
|
|
91
|
+
}
|
|
92
|
+
} catch (err) {
|
|
93
|
+
_didIteratorError = true;
|
|
94
|
+
_iteratorError = err;
|
|
95
|
+
} finally {
|
|
96
|
+
try {
|
|
97
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
98
|
+
_iterator.return();
|
|
99
|
+
}
|
|
100
|
+
} finally {
|
|
101
|
+
if (_didIteratorError) {
|
|
102
|
+
throw _iteratorError;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
var values = /* @__PURE__ */new Map();
|
|
107
|
+
var counts = {};
|
|
108
|
+
var _iteratorNormalCompletion1 = true,
|
|
109
|
+
_didIteratorError1 = false,
|
|
110
|
+
_iteratorError1 = void 0;
|
|
111
|
+
try {
|
|
112
|
+
for (var _iterator1 = byRecord[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
113
|
+
var [record1, entries] = _step1.value;
|
|
114
|
+
var _counts_value;
|
|
115
|
+
var ordered = [...new Set(entries.sort(function (a, b) {
|
|
116
|
+
return a.order - b.order;
|
|
117
|
+
}).map(function (e) {
|
|
118
|
+
return e.value;
|
|
119
|
+
}))];
|
|
120
|
+
values.set(record1, ordered);
|
|
121
|
+
var _iteratorNormalCompletion2 = true,
|
|
122
|
+
_didIteratorError2 = false,
|
|
123
|
+
_iteratorError2 = void 0;
|
|
124
|
+
try {
|
|
125
|
+
for (var _iterator2 = ordered[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
126
|
+
var value1 = _step2.value;
|
|
127
|
+
counts[value1] = ((_counts_value = counts[value1]) !== null && _counts_value !== void 0 ? _counts_value : 0) + 1;
|
|
128
|
+
}
|
|
129
|
+
} catch (err) {
|
|
130
|
+
_didIteratorError2 = true;
|
|
131
|
+
_iteratorError2 = err;
|
|
132
|
+
} finally {
|
|
133
|
+
try {
|
|
134
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
135
|
+
_iterator2.return();
|
|
136
|
+
}
|
|
137
|
+
} finally {
|
|
138
|
+
if (_didIteratorError2) {
|
|
139
|
+
throw _iteratorError2;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
} catch (err) {
|
|
145
|
+
_didIteratorError1 = true;
|
|
146
|
+
_iteratorError1 = err;
|
|
147
|
+
} finally {
|
|
148
|
+
try {
|
|
149
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
150
|
+
_iterator1.return();
|
|
151
|
+
}
|
|
152
|
+
} finally {
|
|
153
|
+
if (_didIteratorError1) {
|
|
154
|
+
throw _iteratorError1;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
values,
|
|
160
|
+
counts
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=facetReading.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","facetReading_exports","__export","facetRead","readFacet","module","exports","facet","doctype","connections","limit","_ref","_ref1","_facet_doctype","_ref2","link","find","candidate","linkField","fieldname","fields","Set","field","orderBy","add","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","err","return","delete"],"sources":["../../../src/list/facetReading.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,SAAA,EAAAA,CAAA,KAAAA,SAAA;EAAAC,SAAA,EAAAA,CAAA,KAAAA;AAAA;AA8BOC,MAAA,CAAAC,OAAS,GAAAV,YAEd,CAAAK,oBAEA;AAEA,SAAME,SAAOA,CAAAI,KAAM,EAAAC,OACf,EAAAC,WAAa,EAAAC,KAAM;EAEvB,IAAAC,IAAM,EAAAC,KAAA,EAAAC,cAAkB,EAAAC,KAAW;EACnC,IAAAC,IAAM,GAAAR,KAAS,CAAAC,OAAA,GAAAC,WAAI,KAAa,QAAQA,WAAW,KAAM,KAAM,aAAAA,WAAA,CAAAO,IAAA,WAAAC,SAAA;IAC/D,OAAIA,SAAe,CAAAT,OAAO,KAAID,KAAM,CAAAC,OAAO;EAC3C,WAAW;EACX,IAAAU,SAAO,GAASX,KAAA,CAAAC,OAAA,IAAAG,IAAA,GAAAI,IAAA,aAAAA,IAAA,uBAAAA,IAAA,CAAAI,SAAA,cAAAR,IAAA,cAAAA,IAAA;EAChB,IAAAS,MAAO,sBAAAC,GAAA,EACL,QACAH,SAAA,EACAX,KAAA,CAAAe,KAAW,CAA8E,CACzF;EACF,IAAAf,KAAA,CAAAgB,OAAA,EAAAH,MAAA,CAAAI,GAAA,CAAAjB,KAAA,CAAAgB,OAAA;EACF,IAAAE,yBAAA;IAAAC,iBAAA;IAAAC,cAAA;EAEO;IAKL,KAAM,IAAAC,SAAW,KAAAhB,KAAA,GAAAG,IAAI,KAAqD,QAAAA,IAAA,uBAAAA,IAAA,CAAAK,MAAA,cAAAR,KAAA,cAAAA,KAAA,OAAAiB,MAAA,CAAAC,QAAA,KAAAC,KAAA,IAAAN,yBAAA,IAAAM,KAAA,GAAAH,SAAA,CAAAI,IAAA,IAAAC,IAAA,GAAAR,yBAAA;MAC1E,IAAAH,KAAW,GAAAS,KAAO,CAAA/B,KAAM;MACtBoB,MAAM,CAAAI,GAAA,CAAAF,KAAS,CAAI;IACnB;EACA,SAAIY,GAAA,EAAO;IACXR,iBAAkB;IAClBC,cAAc,GAAAO,GAAA;EACd,UAAM;IAAK,IACT;MACA,KAAAT,yBAA8B,IAAIG,SAAM,CAAAO,MAAO,IAAK,IAAK;QAC1DP,SAAA,CAAAO,MAAA;MACD;IACF;MACA,IAAMT,iBAAS;QACT,MAAAC,cAAkC;MACxC;IACE;EACA;EACAP,MAAA,CAAAgB,MAAW;EACb;IACA5B,OAAS,GAAAK,cAAe,GAAAN,KAAA,CAAAC,OAAA,cAAAK,cAAA,cAAAA,cAAA,GAAAL,OAAA;IAC1BU,SAAA","ignoreList":[]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var favorites_exports = {};
|
|
24
|
+
__export(favorites_exports, {
|
|
25
|
+
createFavoritesStore: () => createFavoritesStore,
|
|
26
|
+
favoritesKey: () => favoritesKey,
|
|
27
|
+
favoritesStore: () => favoritesStore,
|
|
28
|
+
toggleFavoriteIn: () => toggleFavoriteIn,
|
|
29
|
+
useFavorites: () => useFavorites
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(favorites_exports);
|
|
32
|
+
var import_store = require("@multiplatform.one/store");
|
|
33
|
+
var import_react = require("react");
|
|
34
|
+
function createFavoritesStore(key, storageImpl = import_store.storage) {
|
|
35
|
+
return (0, import_store.createPersistStore)({
|
|
36
|
+
names: []
|
|
37
|
+
}, {
|
|
38
|
+
key,
|
|
39
|
+
storage: storageImpl
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const stores = /* @__PURE__ */new Map();
|
|
43
|
+
function favoritesStore(key) {
|
|
44
|
+
let store = stores.get(key);
|
|
45
|
+
if (!store) {
|
|
46
|
+
store = createFavoritesStore(key);
|
|
47
|
+
stores.set(key, store);
|
|
48
|
+
}
|
|
49
|
+
return store;
|
|
50
|
+
}
|
|
51
|
+
function favoritesKey(doctype) {
|
|
52
|
+
return `frappe-favorites-${doctype}`;
|
|
53
|
+
}
|
|
54
|
+
function toggleFavoriteIn(store, name) {
|
|
55
|
+
store.setState(prev => prev.names.includes(name) ? {
|
|
56
|
+
names: prev.names.filter(n => n !== name)
|
|
57
|
+
} : {
|
|
58
|
+
names: [...prev.names, name]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const noFavorites = new import_store.Store({
|
|
62
|
+
names: []
|
|
63
|
+
});
|
|
64
|
+
function useFavorites(key) {
|
|
65
|
+
const store = key ? favoritesStore(key) : noFavorites;
|
|
66
|
+
const names = (0, import_store.useStore)(store, state => state.names);
|
|
67
|
+
return (0, import_react.useMemo)(() => {
|
|
68
|
+
const favoriteSet = new Set(names);
|
|
69
|
+
return {
|
|
70
|
+
favorites: names,
|
|
71
|
+
favoriteSet,
|
|
72
|
+
isFavorite: name => favoriteSet.has(name),
|
|
73
|
+
toggle: name => {
|
|
74
|
+
if (store !== noFavorites) toggleFavoriteIn(store, name);
|
|
75
|
+
},
|
|
76
|
+
count: names.length
|
|
77
|
+
};
|
|
78
|
+
}, [names, store]);
|
|
79
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var favorites_exports = {};
|
|
26
|
+
__export(favorites_exports, {
|
|
27
|
+
createFavoritesStore: () => createFavoritesStore,
|
|
28
|
+
favoritesKey: () => favoritesKey,
|
|
29
|
+
favoritesStore: () => favoritesStore,
|
|
30
|
+
toggleFavoriteIn: () => toggleFavoriteIn,
|
|
31
|
+
useFavorites: () => useFavorites
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(favorites_exports);
|
|
34
|
+
var import_store = require("@multiplatform.one/store");
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
function createFavoritesStore(key) {
|
|
37
|
+
var storageImpl = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : import_store.storage;
|
|
38
|
+
return (0, import_store.createPersistStore)({
|
|
39
|
+
names: []
|
|
40
|
+
}, {
|
|
41
|
+
key,
|
|
42
|
+
storage: storageImpl
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
var stores = /* @__PURE__ */new Map();
|
|
46
|
+
function favoritesStore(key) {
|
|
47
|
+
var store = stores.get(key);
|
|
48
|
+
if (!store) {
|
|
49
|
+
store = createFavoritesStore(key);
|
|
50
|
+
stores.set(key, store);
|
|
51
|
+
}
|
|
52
|
+
return store;
|
|
53
|
+
}
|
|
54
|
+
function favoritesKey(doctype) {
|
|
55
|
+
return `frappe-favorites-${doctype}`;
|
|
56
|
+
}
|
|
57
|
+
function toggleFavoriteIn(store, name) {
|
|
58
|
+
store.setState(function (prev) {
|
|
59
|
+
return prev.names.includes(name) ? {
|
|
60
|
+
names: prev.names.filter(function (n) {
|
|
61
|
+
return n !== name;
|
|
62
|
+
})
|
|
63
|
+
} : {
|
|
64
|
+
names: [...prev.names, name]
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
var noFavorites = new import_store.Store({
|
|
69
|
+
names: []
|
|
70
|
+
});
|
|
71
|
+
function useFavorites(key) {
|
|
72
|
+
var store = key ? favoritesStore(key) : noFavorites;
|
|
73
|
+
var names = (0, import_store.useStore)(store, function (state) {
|
|
74
|
+
return state.names;
|
|
75
|
+
});
|
|
76
|
+
return (0, import_react.useMemo)(function () {
|
|
77
|
+
var favoriteSet = new Set(names);
|
|
78
|
+
return {
|
|
79
|
+
favorites: names,
|
|
80
|
+
favoriteSet,
|
|
81
|
+
isFavorite: function isFavorite(name) {
|
|
82
|
+
return favoriteSet.has(name);
|
|
83
|
+
},
|
|
84
|
+
toggle: function toggle(name) {
|
|
85
|
+
if (store !== noFavorites) toggleFavoriteIn(store, name);
|
|
86
|
+
},
|
|
87
|
+
count: names.length
|
|
88
|
+
};
|
|
89
|
+
}, [names, store]);
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=favorites.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","favorites_exports","__export","createFavoritesStore","favoritesKey","favoritesStore","toggleFavoriteIn","useFavorites","module","exports","import_store","require","import_react","key","storageImpl","arguments","length","storage","createPersistStore","names","stores","Map","store","get","set","doctype","name","setState","prev","includes","filter","n","noFavorites","Store"],"sources":["../../../src/list/favorites.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,iBAAA;AAAAC,QAAA,CAAAD,iBAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA,oBAAA;EAAAC,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA,cAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,YAAA,EAAAA,CAAA,KAAAA;AAAA;AAKAC,MAAA,CAAAC,OAAA,GAAAb,YAOO,CAAAK,iBAAA;AACP,IAAAS,YAAA,GAAwBC,OAAA;AAOjB,IAAAC,YAAS,GAAAD,OAAA,QACd,CACA;AAEA,SAAAR,oBAAOA,CAAAU,GAAA;EACT,IAAAC,WAAA,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA,MAAAL,YAAA,CAAAO,OAAA;EAEA,OAAM,IAAAP,YAAS,CAAAQ,kBAA8C;IAGtDC,KAAS;EACd;IACAN,GAAK;IACHI,OAAA,EAAQH;EACR;AAAqB;AAEvB,IAAAM,MAAO,sBAAAC,GAAA;AACT,SAAAhB,eAAAQ,GAAA;EAGO,IAAAS,KAAS,GAAAF,MAAA,CAAAG,GAAa,CAAAV,GAAA;EAC3B,KAAAS,KAAO;IACTA,KAAA,GAAAnB,oBAAA,CAAAU,GAAA;IAEOO,MAAS,CAAAI,GAAA,CAAAX,GAAA,EAAAS,KAAA,CAAiB;EAC/B;EAAM,OAAUA,KACd;AAEmC;AAEvC,SAAAlB,aAAAqB,OAAA;EAUA,OAAM,oBAAkBA,OAAA;AAGjB;AACL,SAAMnB,gBAAcA,CAAAgB,KAAA,EAAAI,IAAe;EACnCJ,KAAA,CAAMK,QAAA,WAAQC,IAAA;IACd,OAAAA,IAAO,CAAAT,KAAA,CAAAU,QAAA,CAAAH,IAAQ;MACbP,KAAM,EAAAS,IAAA,CAAAT,KAAA,CAAcW,MAAI,WAASC,CAAA;QACjC,OAAOA,CAAA,KAAAL,IAAA;MACL;IAAW,IACX;MACAP,KAAA,GACA,GAAAS,IAAS,CAAAT,KAAA,EACPO,IAAI;IACN;EACa,EACf;AAAA;AAEJ,IAAAM,WAAA,OAAAtB,YAAA,CAAAuB,KAAA","ignoreList":[]}
|