@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,114 @@
|
|
|
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 insightsData_exports = {};
|
|
24
|
+
__export(insightsData_exports, {
|
|
25
|
+
average: () => average,
|
|
26
|
+
bucketWidth: () => bucketWidth,
|
|
27
|
+
facetDistribution: () => facetDistribution,
|
|
28
|
+
foldDistribution: () => foldDistribution,
|
|
29
|
+
histogram: () => histogram,
|
|
30
|
+
multiValued: () => multiValued,
|
|
31
|
+
orderRows: () => orderRows,
|
|
32
|
+
topBy: () => topBy
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(insightsData_exports);
|
|
35
|
+
function numberOf(row, field) {
|
|
36
|
+
const value = Number(row[field]);
|
|
37
|
+
return Number.isFinite(value) ? value : 0;
|
|
38
|
+
}
|
|
39
|
+
function facetDistribution(values, rows) {
|
|
40
|
+
const counts = /* @__PURE__ */new Map();
|
|
41
|
+
for (const row of rows) {
|
|
42
|
+
for (const value of values.get(row.name ?? "") ?? []) {
|
|
43
|
+
counts.set(value, (counts.get(value) ?? 0) + 1);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return [...counts].map(([value, count]) => ({
|
|
47
|
+
value,
|
|
48
|
+
count
|
|
49
|
+
})).sort((a, b) => b.count - a.count || a.value.localeCompare(b.value));
|
|
50
|
+
}
|
|
51
|
+
function foldDistribution(entries, max) {
|
|
52
|
+
if (entries.length <= max) return [...entries];
|
|
53
|
+
const kept = entries.slice(0, Math.max(0, max - 1));
|
|
54
|
+
const tail = entries.slice(kept.length).reduce((sum, entry) => sum + entry.count, 0);
|
|
55
|
+
return [...kept, {
|
|
56
|
+
value: "",
|
|
57
|
+
count: tail,
|
|
58
|
+
other: true
|
|
59
|
+
}];
|
|
60
|
+
}
|
|
61
|
+
function multiValued(values, rows) {
|
|
62
|
+
return rows.filter(row => (values.get(row.name ?? "") ?? []).length > 1).length;
|
|
63
|
+
}
|
|
64
|
+
function average(rows, field) {
|
|
65
|
+
if (rows.length === 0) return 0;
|
|
66
|
+
return rows.reduce((sum, row) => sum + numberOf(row, field), 0) / rows.length;
|
|
67
|
+
}
|
|
68
|
+
function compareValues(a, b) {
|
|
69
|
+
if (a === b) return 0;
|
|
70
|
+
if (a === null || a === void 0) return -1;
|
|
71
|
+
if (b === null || b === void 0) return 1;
|
|
72
|
+
if (typeof a === "number" && typeof b === "number") return a - b;
|
|
73
|
+
return String(a).localeCompare(String(b));
|
|
74
|
+
}
|
|
75
|
+
function orderRows(rows, orderBy) {
|
|
76
|
+
if (!orderBy?.length) return [...rows];
|
|
77
|
+
return [...rows].sort((a, b) => {
|
|
78
|
+
for (const {
|
|
79
|
+
field,
|
|
80
|
+
order
|
|
81
|
+
} of orderBy) {
|
|
82
|
+
const compared = compareValues(a[field], b[field]);
|
|
83
|
+
if (compared !== 0) return order === "desc" ? -compared : compared;
|
|
84
|
+
}
|
|
85
|
+
return 0;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function topBy(rows, field, n) {
|
|
89
|
+
return [...rows].sort((a, b) => numberOf(b, field) - numberOf(a, field)).slice(0, Math.max(0, n));
|
|
90
|
+
}
|
|
91
|
+
function bucketWidth(max) {
|
|
92
|
+
const raw = max / 6;
|
|
93
|
+
if (!(raw > 1)) return 1;
|
|
94
|
+
const magnitude = 10 ** Math.floor(Math.log10(raw));
|
|
95
|
+
return [1, 2, 5, 10].map(step => step * magnitude).find(width => width >= raw) ?? raw;
|
|
96
|
+
}
|
|
97
|
+
function histogram(rows, field, width) {
|
|
98
|
+
if (rows.length === 0) return [];
|
|
99
|
+
const values = rows.map(row => Math.max(0, numberOf(row, field)));
|
|
100
|
+
const size = width && width > 0 ? width : bucketWidth(Math.max(...values));
|
|
101
|
+
const counts = /* @__PURE__ */new Map();
|
|
102
|
+
let last = 0;
|
|
103
|
+
for (const value of values) {
|
|
104
|
+
const bucket = Math.floor(value / size);
|
|
105
|
+
counts.set(bucket, (counts.get(bucket) ?? 0) + 1);
|
|
106
|
+
last = Math.max(last, bucket);
|
|
107
|
+
}
|
|
108
|
+
return Array.from({
|
|
109
|
+
length: last + 1
|
|
110
|
+
}, (_, bucket) => ({
|
|
111
|
+
label: `${bucket * size}\u2013${(bucket + 1) * size - 1}`,
|
|
112
|
+
value: counts.get(bucket) ?? 0
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
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 insightsData_exports = {};
|
|
26
|
+
__export(insightsData_exports, {
|
|
27
|
+
average: () => average,
|
|
28
|
+
bucketWidth: () => bucketWidth,
|
|
29
|
+
facetDistribution: () => facetDistribution,
|
|
30
|
+
foldDistribution: () => foldDistribution,
|
|
31
|
+
histogram: () => histogram,
|
|
32
|
+
multiValued: () => multiValued,
|
|
33
|
+
orderRows: () => orderRows,
|
|
34
|
+
topBy: () => topBy
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(insightsData_exports);
|
|
37
|
+
function numberOf(row, field) {
|
|
38
|
+
var value = Number(row[field]);
|
|
39
|
+
return Number.isFinite(value) ? value : 0;
|
|
40
|
+
}
|
|
41
|
+
function facetDistribution(values, rows) {
|
|
42
|
+
var counts = /* @__PURE__ */new Map();
|
|
43
|
+
var _iteratorNormalCompletion = true,
|
|
44
|
+
_didIteratorError = false,
|
|
45
|
+
_iteratorError = void 0;
|
|
46
|
+
try {
|
|
47
|
+
for (var _iterator = rows[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
48
|
+
var row = _step.value;
|
|
49
|
+
var _values_get, _row_name;
|
|
50
|
+
var _iteratorNormalCompletion1 = true,
|
|
51
|
+
_didIteratorError1 = false,
|
|
52
|
+
_iteratorError1 = void 0;
|
|
53
|
+
try {
|
|
54
|
+
for (var _iterator1 = ((_values_get = values.get((_row_name = row.name) !== null && _row_name !== void 0 ? _row_name : "")) !== null && _values_get !== void 0 ? _values_get : [])[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
55
|
+
var value = _step1.value;
|
|
56
|
+
var _counts_get;
|
|
57
|
+
counts.set(value, ((_counts_get = counts.get(value)) !== null && _counts_get !== void 0 ? _counts_get : 0) + 1);
|
|
58
|
+
}
|
|
59
|
+
} catch (err) {
|
|
60
|
+
_didIteratorError1 = true;
|
|
61
|
+
_iteratorError1 = err;
|
|
62
|
+
} finally {
|
|
63
|
+
try {
|
|
64
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
65
|
+
_iterator1.return();
|
|
66
|
+
}
|
|
67
|
+
} finally {
|
|
68
|
+
if (_didIteratorError1) {
|
|
69
|
+
throw _iteratorError1;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
} catch (err) {
|
|
75
|
+
_didIteratorError = true;
|
|
76
|
+
_iteratorError = err;
|
|
77
|
+
} finally {
|
|
78
|
+
try {
|
|
79
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
80
|
+
_iterator.return();
|
|
81
|
+
}
|
|
82
|
+
} finally {
|
|
83
|
+
if (_didIteratorError) {
|
|
84
|
+
throw _iteratorError;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return [...counts].map(function (param) {
|
|
89
|
+
var [value2, count] = param;
|
|
90
|
+
return {
|
|
91
|
+
value: value2,
|
|
92
|
+
count
|
|
93
|
+
};
|
|
94
|
+
}).sort(function (a, b) {
|
|
95
|
+
return b.count - a.count || a.value.localeCompare(b.value);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function foldDistribution(entries, max) {
|
|
99
|
+
if (entries.length <= max) return [...entries];
|
|
100
|
+
var kept = entries.slice(0, Math.max(0, max - 1));
|
|
101
|
+
var tail = entries.slice(kept.length).reduce(function (sum, entry) {
|
|
102
|
+
return sum + entry.count;
|
|
103
|
+
}, 0);
|
|
104
|
+
return [...kept, {
|
|
105
|
+
value: "",
|
|
106
|
+
count: tail,
|
|
107
|
+
other: true
|
|
108
|
+
}];
|
|
109
|
+
}
|
|
110
|
+
function multiValued(values, rows) {
|
|
111
|
+
return rows.filter(function (row) {
|
|
112
|
+
var _values_get, _row_name;
|
|
113
|
+
return ((_values_get = values.get((_row_name = row.name) !== null && _row_name !== void 0 ? _row_name : "")) !== null && _values_get !== void 0 ? _values_get : []).length > 1;
|
|
114
|
+
}).length;
|
|
115
|
+
}
|
|
116
|
+
function average(rows, field) {
|
|
117
|
+
if (rows.length === 0) return 0;
|
|
118
|
+
return rows.reduce(function (sum, row) {
|
|
119
|
+
return sum + numberOf(row, field);
|
|
120
|
+
}, 0) / rows.length;
|
|
121
|
+
}
|
|
122
|
+
function compareValues(a, b) {
|
|
123
|
+
if (a === b) return 0;
|
|
124
|
+
if (a === null || a === void 0) return -1;
|
|
125
|
+
if (b === null || b === void 0) return 1;
|
|
126
|
+
if (typeof a === "number" && typeof b === "number") return a - b;
|
|
127
|
+
return String(a).localeCompare(String(b));
|
|
128
|
+
}
|
|
129
|
+
function orderRows(rows, orderBy) {
|
|
130
|
+
if (!(orderBy === null || orderBy === void 0 ? void 0 : orderBy.length)) return [...rows];
|
|
131
|
+
return [...rows].sort(function (a, b) {
|
|
132
|
+
var _iteratorNormalCompletion = true,
|
|
133
|
+
_didIteratorError = false,
|
|
134
|
+
_iteratorError = void 0;
|
|
135
|
+
try {
|
|
136
|
+
for (var _iterator = orderBy[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
137
|
+
var {
|
|
138
|
+
field,
|
|
139
|
+
order
|
|
140
|
+
} = _step.value;
|
|
141
|
+
var compared = compareValues(a[field], b[field]);
|
|
142
|
+
if (compared !== 0) return order === "desc" ? -compared : compared;
|
|
143
|
+
}
|
|
144
|
+
} catch (err) {
|
|
145
|
+
_didIteratorError = true;
|
|
146
|
+
_iteratorError = err;
|
|
147
|
+
} finally {
|
|
148
|
+
try {
|
|
149
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
150
|
+
_iterator.return();
|
|
151
|
+
}
|
|
152
|
+
} finally {
|
|
153
|
+
if (_didIteratorError) {
|
|
154
|
+
throw _iteratorError;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return 0;
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function topBy(rows, field, n) {
|
|
162
|
+
return [...rows].sort(function (a, b) {
|
|
163
|
+
return numberOf(b, field) - numberOf(a, field);
|
|
164
|
+
}).slice(0, Math.max(0, n));
|
|
165
|
+
}
|
|
166
|
+
function bucketWidth(max) {
|
|
167
|
+
var _map_find;
|
|
168
|
+
var raw = max / 6;
|
|
169
|
+
if (!(raw > 1)) return 1;
|
|
170
|
+
var magnitude = Math.pow(10, Math.floor(Math.log10(raw)));
|
|
171
|
+
return (_map_find = [1, 2, 5, 10].map(function (step) {
|
|
172
|
+
return step * magnitude;
|
|
173
|
+
}).find(function (width) {
|
|
174
|
+
return width >= raw;
|
|
175
|
+
})) !== null && _map_find !== void 0 ? _map_find : raw;
|
|
176
|
+
}
|
|
177
|
+
function histogram(rows, field, width) {
|
|
178
|
+
if (rows.length === 0) return [];
|
|
179
|
+
var values = rows.map(function (row) {
|
|
180
|
+
return Math.max(0, numberOf(row, field));
|
|
181
|
+
});
|
|
182
|
+
var size = width && width > 0 ? width : bucketWidth(Math.max(...values));
|
|
183
|
+
var counts = /* @__PURE__ */new Map();
|
|
184
|
+
var last = 0;
|
|
185
|
+
var _iteratorNormalCompletion = true,
|
|
186
|
+
_didIteratorError = false,
|
|
187
|
+
_iteratorError = void 0;
|
|
188
|
+
try {
|
|
189
|
+
for (var _iterator = values[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
190
|
+
var value = _step.value;
|
|
191
|
+
var _counts_get;
|
|
192
|
+
var bucket = Math.floor(value / size);
|
|
193
|
+
counts.set(bucket, ((_counts_get = counts.get(bucket)) !== null && _counts_get !== void 0 ? _counts_get : 0) + 1);
|
|
194
|
+
last = Math.max(last, bucket);
|
|
195
|
+
}
|
|
196
|
+
} catch (err) {
|
|
197
|
+
_didIteratorError = true;
|
|
198
|
+
_iteratorError = err;
|
|
199
|
+
} finally {
|
|
200
|
+
try {
|
|
201
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
202
|
+
_iterator.return();
|
|
203
|
+
}
|
|
204
|
+
} finally {
|
|
205
|
+
if (_didIteratorError) {
|
|
206
|
+
throw _iteratorError;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return Array.from({
|
|
211
|
+
length: last + 1
|
|
212
|
+
}, function (_, bucket2) {
|
|
213
|
+
var _counts_get2;
|
|
214
|
+
return {
|
|
215
|
+
label: `${bucket2 * size}\u2013${(bucket2 + 1) * size - 1}`,
|
|
216
|
+
value: (_counts_get2 = counts.get(bucket2)) !== null && _counts_get2 !== void 0 ? _counts_get2 : 0
|
|
217
|
+
};
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=insightsData.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","insightsData_exports","__export","average","bucketWidth","facetDistribution","foldDistribution","histogram","multiValued","orderRows","topBy","module","exports","numberOf","row","field","Number","isFinite","values","rows","counts","Map","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","_values_get","_row_name","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_iterator1","get","name","_step1","_counts_get","set","err","return","map","param","value2","count","sort","a","b","localeCompare","entries","max","length","kept","slice","Math","tail","reduce","sum","entry"],"sources":["../../../src/insights/insightsData.ts"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 insightsRecord_exports = {};
|
|
24
|
+
__export(insightsRecord_exports, {
|
|
25
|
+
formatMetric: () => formatMetric,
|
|
26
|
+
metricValue: () => metricValue
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(insightsRecord_exports);
|
|
29
|
+
function metricValue(doc, field) {
|
|
30
|
+
const value = Number(doc[field]);
|
|
31
|
+
return Number.isFinite(value) ? value : 0;
|
|
32
|
+
}
|
|
33
|
+
function formatMetric(metric, value) {
|
|
34
|
+
return metric.format ? metric.format(value) : String(value);
|
|
35
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 insightsRecord_exports = {};
|
|
26
|
+
__export(insightsRecord_exports, {
|
|
27
|
+
formatMetric: () => formatMetric,
|
|
28
|
+
metricValue: () => metricValue
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(insightsRecord_exports);
|
|
31
|
+
function metricValue(doc, field) {
|
|
32
|
+
var value = Number(doc[field]);
|
|
33
|
+
return Number.isFinite(value) ? value : 0;
|
|
34
|
+
}
|
|
35
|
+
function formatMetric(metric, value) {
|
|
36
|
+
return metric.format ? metric.format(value) : String(value);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=insightsRecord.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","insightsRecord_exports","__export","formatMetric","metricValue","module","exports","doc","field","Number","isFinite","metric","format","String"],"sources":["../../../src/insights/insightsRecord.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,sBAAA;AAAAC,QAAA,CAAAD,sBAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA;AAAA;AA4BOC,MAAA,CAAAC,OAAS,GAAAV,YAA0B,CAAAK,sBAAuB;AAC/D,SAAMG,WAAQA,CAAAG,GAAQ,EAAAC,KAAgC,EAAM;EAC5D,IAAAR,KAAO,GAAAS,MAAO,CAAAF,GAAA,CAASC,KAAK;EAC9B,OAAAC,MAAA,CAAAC,QAAA,CAAAV,KAAA,IAAAA,KAAA;AAEO;AACL,SAAOG,YAAOA,CAAAQ,MAAS,EAAAX,KAAO;EAChC,OAAAW,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAZ,KAAA,IAAAa,MAAA,CAAAb,KAAA","ignoreList":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 FacetBadge_exports = {};
|
|
24
|
+
__export(FacetBadge_exports, {
|
|
25
|
+
FacetBadge: () => FacetBadge
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(FacetBadge_exports);
|
|
28
|
+
var import_components = require("@multiplatform.one/components");
|
|
29
|
+
var import_theme = require("@multiplatform.one/theme");
|
|
30
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
+
function FacetBadge({
|
|
32
|
+
label,
|
|
33
|
+
tint = "gray",
|
|
34
|
+
compact = false
|
|
35
|
+
}) {
|
|
36
|
+
const {
|
|
37
|
+
knobProps
|
|
38
|
+
} = (0, import_theme.useResolvedKnobs)({
|
|
39
|
+
compact: true
|
|
40
|
+
});
|
|
41
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.XStack, {
|
|
42
|
+
...knobProps.borderRadius,
|
|
43
|
+
paddingHorizontal: compact ? "$1.5" : "$2",
|
|
44
|
+
paddingVertical: compact ? "$0.5" : "$1",
|
|
45
|
+
backgroundColor: `$${tint}4`,
|
|
46
|
+
borderColor: `$${tint}7`,
|
|
47
|
+
borderWidth: import_theme.hairlineWidth,
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Text, {
|
|
50
|
+
...knobProps.label,
|
|
51
|
+
...knobProps.body,
|
|
52
|
+
textTransform: "capitalize",
|
|
53
|
+
fontWeight: "700",
|
|
54
|
+
color: `$${tint}12`,
|
|
55
|
+
...(compact ? {
|
|
56
|
+
fontSize: "$1"
|
|
57
|
+
} : null),
|
|
58
|
+
letterSpacing: 0.3,
|
|
59
|
+
children: label
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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 FacetBadge_exports = {};
|
|
26
|
+
__export(FacetBadge_exports, {
|
|
27
|
+
FacetBadge: () => FacetBadge
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(FacetBadge_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
|
+
function FacetBadge(param) {
|
|
34
|
+
var {
|
|
35
|
+
label,
|
|
36
|
+
tint = "gray",
|
|
37
|
+
compact = false
|
|
38
|
+
} = param;
|
|
39
|
+
var {
|
|
40
|
+
knobProps
|
|
41
|
+
} = (0, import_theme.useResolvedKnobs)({
|
|
42
|
+
compact: true
|
|
43
|
+
});
|
|
44
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.XStack, {
|
|
45
|
+
...knobProps.borderRadius,
|
|
46
|
+
paddingHorizontal: compact ? "$1.5" : "$2",
|
|
47
|
+
paddingVertical: compact ? "$0.5" : "$1",
|
|
48
|
+
backgroundColor: `$${tint}4`,
|
|
49
|
+
borderColor: `$${tint}7`,
|
|
50
|
+
borderWidth: import_theme.hairlineWidth,
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.Text, {
|
|
53
|
+
...knobProps.label,
|
|
54
|
+
...knobProps.body,
|
|
55
|
+
textTransform: "capitalize",
|
|
56
|
+
fontWeight: "700",
|
|
57
|
+
color: `$${tint}12`,
|
|
58
|
+
...(compact ? {
|
|
59
|
+
fontSize: "$1"
|
|
60
|
+
} : null),
|
|
61
|
+
letterSpacing: 0.3,
|
|
62
|
+
children: label
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=FacetBadge.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","FacetBadge_exports","__export","FacetBadge","module","exports","import_jsx_runtime","require","import_components","import_theme","param","label","tint","compact","knobProps","useResolvedKnobs","jsx","XStack","borderRadius","paddingHorizontal","paddingVertical","backgroundColor","borderColor","borderWidth","hairlineWidth","alignItems","children","Text","body","textTransform","fontWeight","color","fontSize","letterSpacing"],"sources":["../../../src/list/FacetBadge.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,kBAAA;AAAAC,QAAA,CAAAD,kBAAA;EAAAE,UAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA6B,CAAAK,kBAAA;AAC7B,IAAAK,kBAAgD,GAAAC,OAAA;AA0B1C,IAAAC,iBAAA,GAAAD,OAAA;AAZC,IAAAE,YAAS,GAAAF,OAAa,2BAAsB,CAAU;AAC3D,SAAMJ,UAAEA,CAAUO,KAAA;EAClB;IAAAC,KACE;IAAAC,IAAA;IAAAC,OAAA;EAAA,IAAAH,KAAA;EAAA,IAAC;IAAAI;EAAA,QAAAL,YAAA,CAAAM,gBAAA;IAAAF,OAAA;EAAA;EACe,OACd,eAAmB,IAAAP,kBAAmB,CAAAU,GAAA,EAAAR,iBAAA,CAAAS,MAAA;IAAA,GACtCH,SAAA,CAAAI,YAAiB;IAAmBC,iBACpC,EAAiBN,OAAI,GAAI;IAAAO,eACZ,EAAAP,OAAQ;IAAAQ,eACR,MAAAT,IAAA;IAAAU,WACb,MAAWV,IAAA;IAAAW,WAEX,EAAAd,YAAA,CAAAe,aAAA;IAAAC,UAAC;IAAAC,QAAA,qBAAApB,kBAAA,CAAAU,GAAA,EAAAR,iBAAA,CAAAmB,IAAA;MAAA,GAAAb,SACK,CAAAH,KAAU;MAAA,GAAAG,SACV,CAAAc,IAAU;MAAAC,aACd,cAAc;MAAAC,UACd,OAAW;MAAAC,KACX,MAAOnB,IAAI,IAAI;MAAA,IAAAC,OACV;QAAwCmB,QAC7C;MAAe,IAEd;MAAAC,aAAA;MACHP,QAAA,EAAAf;IAAA;EACF;AAEJ","ignoreList":[]}
|