@databiosphere/findable-ui 37.0.0 → 38.0.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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +18 -0
- package/lib/components/DataDictionary/components/Entities/types.d.ts +1 -1
- package/lib/components/DataDictionary/components/Entity/types.d.ts +1 -1
- package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.styles.d.ts +1 -1
- package/lib/components/DataDictionary/components/Filters/components/ColumnFilters/columnFilters.d.ts +1 -1
- package/lib/components/DataDictionary/components/Filters/components/ColumnFilters/columnFilters.js +3 -0
- package/lib/components/DataDictionary/components/Filters/filters.styles.d.ts +1 -1
- package/lib/components/DataDictionary/components/Filters/stories/filters.stories.js +1 -0
- package/lib/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.styles.d.ts +1 -1
- package/lib/components/DataDictionary/components/Layout/components/EntitiesLayout/types.d.ts +1 -1
- package/lib/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.styles.d.ts +1 -1
- package/lib/components/DataDictionary/components/Layout/components/FiltersLayout/types.d.ts +1 -1
- package/lib/components/DataDictionary/components/Layout/components/OutlineLayout/outlineLayout.styles.d.ts +1 -1
- package/lib/components/DataDictionary/components/Layout/components/OutlineLayout/types.d.ts +1 -1
- package/lib/components/DataDictionary/components/Layout/components/TitleLayout/titleLayout.styles.d.ts +1 -1
- package/lib/components/DataDictionary/components/Layout/components/TitleLayout/types.d.ts +1 -1
- package/lib/components/DataDictionary/components/Table/table.js +3 -3
- package/lib/components/DataDictionary/components/Title/title.d.ts +2 -2
- package/lib/components/DataDictionary/components/Title/title.js +1 -1
- package/lib/components/DataDictionary/components/Title/title.styles.d.ts +5 -1
- package/lib/components/DataDictionary/dataDictionary.js +2 -2
- package/lib/components/Detail/components/DetailViewTable/detailViewTable.js +3 -3
- package/lib/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +2 -2
- package/lib/components/Detail/components/Table/components/TableRows/tableRows.js +2 -2
- package/lib/components/Detail/components/Table/table.js +1 -1
- package/lib/components/Export/components/ExportForm/exportForm.styles.d.ts +2 -2
- package/lib/components/Filter/components/ClearAllFilters/clearAllFilters.js +3 -2
- package/lib/components/Filter/components/ClearAllFilters/clearAllFilters.styles.d.ts +5 -0
- package/lib/components/Filter/components/ClearAllFilters/clearAllFilters.styles.js +5 -0
- package/lib/components/Filter/components/FilterCountChip/filterCountChip.js +1 -1
- package/lib/components/Filter/components/FilterCountChip/filterCountChip.styles.d.ts +2 -2
- package/lib/components/Filter/components/FilterLabel/filterLabel.styles.d.ts +1 -1
- package/lib/components/Filter/components/FilterMenu/filterMenu.styles.d.ts +1 -1
- package/lib/components/Filter/components/FilterTag/filterTag.styles.d.ts +2 -2
- package/lib/components/Filter/components/Filters/filters.d.ts +1 -2
- package/lib/components/Filter/components/Filters/filters.js +4 -2
- package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.d.ts +1 -2
- package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.js +5 -3
- package/lib/components/Index/components/EntityView/components/controls/ActionButton/actionButton.d.ts +1 -0
- package/lib/components/Index/components/EntityView/components/controls/ActionButton/actionButton.js +10 -0
- package/lib/components/Index/components/EntityView/components/controls/ExportButton/exportButton.d.ts +2 -0
- package/lib/components/Index/components/EntityView/components/controls/ExportButton/exportButton.js +20 -0
- package/lib/components/Index/components/EntityView/components/controls/ExportButton/exportButton.styles.d.ts +5 -0
- package/lib/components/Index/components/EntityView/components/controls/ExportButton/exportButton.styles.js +8 -0
- package/lib/components/Index/components/EntityView/components/controls/FilterButton/filterButton.d.ts +3 -0
- package/lib/components/Index/components/EntityView/components/controls/FilterButton/filterButton.js +18 -0
- package/lib/components/Index/components/EntityView/components/controls/FilterButton/filterButton.styles.d.ts +5 -0
- package/lib/components/Index/components/EntityView/components/controls/FilterButton/filterButton.styles.js +8 -0
- package/lib/components/Index/components/EntityView/components/controls/ViewToggle/hooks/UseViewToggle/hook.d.ts +2 -0
- package/lib/components/Index/components/{EntitiesView/hooks/UseEntitiesView → EntityView/components/controls/ViewToggle/hooks/UseViewToggle}/hook.js +3 -3
- package/lib/components/Index/components/{EntitiesView/hooks/UseEntitiesView → EntityView/components/controls/ViewToggle/hooks/UseViewToggle}/types.d.ts +1 -1
- package/lib/components/Index/{stories/index.stories.d.ts → components/EntityView/components/controls/ViewToggle/stories/viewToggle.stories.d.ts} +2 -2
- package/lib/components/Index/components/EntityView/components/controls/ViewToggle/stories/viewToggle.stories.js +6 -0
- package/lib/components/Index/components/EntityView/components/controls/ViewToggle/viewToggle.d.ts +2 -0
- package/lib/components/Index/components/EntityView/components/controls/ViewToggle/viewToggle.js +13 -0
- package/lib/components/Index/components/EntityView/components/controls/ViewToggle/viewToggle.styles.d.ts +3 -0
- package/lib/components/Index/components/EntityView/components/controls/ViewToggle/viewToggle.styles.js +8 -0
- package/lib/components/Index/components/EntityView/components/layout/Summary/constants.d.ts +2 -0
- package/lib/components/Index/components/EntityView/components/layout/Summary/constants.js +5 -0
- package/lib/components/Index/components/EntityView/components/layout/Summary/summary.d.ts +2 -0
- package/lib/components/Index/components/EntityView/components/layout/Summary/summary.js +15 -0
- package/lib/components/Index/components/EntityView/components/layout/Summary/summary.styles.d.ts +10 -0
- package/lib/components/Index/components/EntityView/components/layout/Summary/summary.styles.js +17 -0
- package/lib/components/Index/components/EntityView/components/layout/Title/title.d.ts +2 -0
- package/lib/components/Index/components/EntityView/components/layout/Title/title.js +11 -0
- package/lib/components/Index/components/{Tabs → EntityView/components/navigation/Tabs}/common/utils.d.ts +2 -2
- package/lib/components/Index/components/EntityView/components/navigation/Tabs/common/utils.js +14 -0
- package/lib/components/Index/components/EntityView/components/navigation/Tabs/tabs.js +23 -0
- package/lib/components/Index/components/EntityView/components/navigation/Tabs/tabs.styles.d.ts +3 -0
- package/lib/components/Index/components/EntityView/components/navigation/Tabs/tabs.styles.js +19 -0
- package/lib/components/Index/components/EntityView/components/slots/EntityListSlot/entityListSlot.d.ts +1 -0
- package/lib/components/Index/components/EntityView/components/slots/EntityListSlot/entityListSlot.js +12 -0
- package/lib/components/Index/components/EntityView/components/slots/EntityViewSlot/entityViewSlot.d.ts +1 -0
- package/lib/components/Index/components/EntityView/components/slots/EntityViewSlot/entityViewSlot.js +14 -0
- package/lib/components/Index/components/EntityView/components/slots/EntityViewSlot/entityViewSlot.styles.d.ts +7 -0
- package/lib/components/Index/components/EntityView/components/slots/EntityViewSlot/entityViewSlot.styles.js +16 -0
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/chartView.js +6 -2
- package/lib/components/Index/components/EntityView/components/views/ChartView/chartView.styles.d.ts +13 -0
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/chartView.styles.js +2 -1
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/barX/plot.d.ts +1 -1
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/barX/plot.js +2 -2
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/barX/utils.d.ts +1 -1
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/barX/utils.js +1 -1
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/chart.styles.d.ts +1 -1
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/chart.styles.js +3 -3
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/stories/chart.stories.js +1 -1
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/types.d.ts +2 -2
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/hooks/UseChartView/types.d.ts +1 -1
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/hooks/UseChartView/useChartView.d.ts +1 -1
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/hooks/UseChartView/useChartView.js +1 -1
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/stories/chartView.stories.js +1 -1
- package/lib/components/Index/components/EntityView/components/views/ChartView/types.d.ts +8 -0
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/utils.d.ts +2 -2
- package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/utils.js +1 -1
- package/lib/components/Index/components/EntityView/components/views/TableView/tableView.d.ts +3 -0
- package/lib/components/Index/components/{EntitiesView/components/EntityList/entityList.js → EntityView/components/views/TableView/tableView.js} +4 -4
- package/lib/components/Index/components/EntityView/context/context.d.ts +2 -0
- package/lib/components/Index/components/EntityView/context/context.js +7 -0
- package/lib/components/Index/components/EntityView/context/hook.d.ts +6 -0
- package/lib/components/Index/components/EntityView/context/hook.js +9 -0
- package/lib/components/Index/components/EntityView/context/types.d.ts +7 -0
- package/lib/components/Index/index.d.ts +1 -1
- package/lib/components/Index/index.js +34 -17
- package/lib/components/Index/index.styles.d.ts +29 -8
- package/lib/components/Index/index.styles.js +55 -7
- package/lib/components/Index/types.d.ts +0 -7
- package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.js +1 -1
- package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.d.ts +2 -2
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.styles.d.ts +4 -4
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/Button/button.styles.d.ts +1 -1
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/Button/button.styles.d.ts +1 -1
- package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenu/navigationMenu.styles.d.ts +1 -1
- package/lib/components/Layout/components/Header/components/Content/components/Slogan/slogan.styles.d.ts +1 -1
- package/lib/components/Layout/components/Outline/components/ContentsTab/contentsTab.styles.d.ts +1 -1
- package/lib/components/Layout/components/Outline/outline.styles.d.ts +2 -2
- package/lib/components/Layout/components/Sidebar/components/SidebarDrawer/sidebarDrawer.d.ts +3 -3
- package/lib/components/Layout/components/Sidebar/components/SidebarDrawer/sidebarDrawer.js +3 -3
- package/lib/components/Layout/components/Sidebar/sidebar.d.ts +2 -7
- package/lib/components/Layout/components/Sidebar/sidebar.js +8 -7
- package/lib/components/Layout/components/Sidebar/sidebar.stories.js +0 -4
- package/lib/components/Login/components/Button/button.styles.d.ts +1 -1
- package/lib/components/Login/components/Section/components/Consent/consent.styles.d.ts +1 -1
- package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.styles.d.ts +1 -1
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/label.styles.d.ts +1 -1
- package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.styles.d.ts +1 -1
- package/lib/components/Table/common/gridTable.styles.d.ts +1 -1
- package/lib/components/Table/common/gridTable.styles.js +10 -0
- package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.js +3 -2
- package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.styles.d.ts +5 -0
- package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.styles.js +8 -0
- package/lib/components/Table/components/PaginationSummary/paginationSummary.js +1 -1
- package/lib/components/Table/components/TableBody/tableBody.d.ts +3 -1
- package/lib/components/Table/components/TableBody/tableBody.js +9 -3
- package/lib/components/Table/components/TableCell/components/CodeCell/codeCell.styles.d.ts +2 -2
- package/lib/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.d.ts +1 -3
- package/lib/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.js +2 -2
- package/lib/components/Table/components/TableFeatures/ColumnFilter/columnFilter.styles.d.ts +1 -1
- package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.styles.d.ts +2 -2
- package/lib/components/Table/components/TableFeatures/GlobalFilter/globalFilter.d.ts +1 -1
- package/lib/components/Table/components/TableFeatures/GlobalFilter/globalFilter.js +4 -1
- package/lib/components/Table/components/TableHead/tableHead.d.ts +1 -1
- package/lib/components/Table/components/TableHead/tableHead.js +8 -10
- package/lib/components/Table/components/TableHead/types.d.ts +0 -2
- package/lib/components/Table/components/TablePagination/stories/args.d.ts +3 -0
- package/lib/components/Table/components/TablePagination/stories/args.js +9 -0
- package/lib/components/{Index/components/Hero/components/Summaries/stories/summaries.stories.d.ts → Table/components/TablePagination/stories/tablePagination.stories.d.ts} +2 -2
- package/lib/components/Table/components/TablePagination/stories/tablePagination.stories.js +9 -0
- package/lib/components/Table/components/TablePagination/tablePagination.d.ts +2 -0
- package/lib/components/Table/components/TablePagination/tablePagination.js +20 -0
- package/lib/components/Table/components/TablePagination/tablePagination.styles.d.ts +7 -0
- package/lib/components/Table/components/TablePagination/tablePagination.styles.js +10 -0
- package/lib/components/Table/components/TablePagination/types.d.ts +8 -0
- package/lib/components/Table/components/TableRow/tableRow.styles.d.ts +3 -4
- package/lib/components/Table/components/TableRow/tableRow.styles.js +1 -1
- package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.d.ts +1 -1
- package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +6 -6
- package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.styles.d.ts +5 -0
- package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.styles.js +5 -0
- package/lib/components/Table/components/TableRows/components/VirtualizedRow/virtualizedRow.d.ts +1 -1
- package/lib/components/Table/components/TableRows/tableRows.d.ts +1 -1
- package/lib/components/Table/components/TableRows/tableRows.js +2 -2
- package/lib/components/Table/components/TableToolbar/constants.d.ts +2 -0
- package/lib/components/Table/components/TableToolbar/constants.js +6 -0
- package/lib/components/Table/components/TableToolbar/tableToolbar.d.ts +1 -3
- package/lib/components/Table/components/TableToolbar/tableToolbar.js +12 -11
- package/lib/components/Table/components/TableToolbar/tableToolbar.styles.d.ts +3 -3
- package/lib/components/Table/components/TableToolbar/tableToolbar.styles.js +14 -13
- package/lib/components/Table/table.d.ts +1 -2
- package/lib/components/Table/table.js +10 -11
- package/lib/components/Table/table.styles.d.ts +14 -1
- package/lib/components/Table/table.styles.js +34 -1
- package/lib/components/common/Button/components/DropdownButton/dropdownButton.d.ts +2 -5
- package/lib/components/common/Button/components/DropdownButton/dropdownButton.js +4 -3
- package/lib/components/common/Button/components/DropdownButton/dropdownButton.styles.d.ts +6 -3
- package/lib/components/common/Button/components/DropdownButton/dropdownButton.styles.js +8 -8
- package/lib/components/common/Button/components/DropdownButton/types.d.ts +4 -0
- package/lib/components/common/Button/constants.d.ts +2 -2
- package/lib/components/common/Button/constants.js +10 -0
- package/lib/components/common/Card/components/CardSecondaryTitle/cardSecondaryTitle.styles.d.ts +1 -1
- package/lib/components/common/Dot/dot.d.ts +2 -4
- package/lib/components/common/Drawer/provider/context.d.ts +2 -0
- package/lib/components/common/Drawer/provider/context.js +6 -0
- package/lib/components/common/Drawer/provider/hook.d.ts +6 -0
- package/lib/components/common/Drawer/provider/hook.js +9 -0
- package/lib/components/common/Drawer/provider/provider.d.ts +4 -0
- package/lib/components/common/Drawer/provider/provider.js +8 -0
- package/lib/components/common/Drawer/provider/types.d.ts +6 -0
- package/lib/components/common/Drawer/provider/types.js +1 -0
- package/lib/components/common/Form/components/Input/input.styles.d.ts +1 -1
- package/lib/components/common/Form/components/Select/select.styles.d.ts +1 -1
- package/lib/components/common/Form/components/UploadFile/uploadFile.styles.d.ts +1 -1
- package/lib/components/common/IconButton/iconButton.styles.d.ts +1 -1
- package/lib/components/common/Input/input.styles.d.ts +1 -1
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment.styles.d.ts +1 -1
- package/lib/components/common/OutlinedInput/components/InputAdornment/inputAdornment.styles.d.ts +1 -1
- package/lib/components/common/Paper/components/FlatPaper/flatPaper.d.ts +3 -0
- package/lib/components/common/Paper/components/FlatPaper/flatPaper.js +5 -0
- package/lib/components/common/Paper/components/FlatPaper/flatPaper.styles.d.ts +5 -0
- package/lib/components/common/Paper/components/FlatPaper/flatPaper.styles.js +8 -0
- package/lib/components/common/Paper/components/FluidPaper/fluidPaper.d.ts +3 -0
- package/lib/components/common/Paper/components/FluidPaper/fluidPaper.js +5 -0
- package/lib/components/common/Paper/components/FluidPaper/fluidPaper.styles.d.ts +7 -0
- package/lib/components/common/Paper/components/FluidPaper/fluidPaper.styles.js +10 -0
- package/lib/components/common/Paper/components/RoundedPaper/roundedPaper.d.ts +3 -0
- package/lib/components/common/Paper/components/RoundedPaper/roundedPaper.js +5 -0
- package/lib/components/common/Paper/components/RoundedPaper/roundedPaper.styles.d.ts +5 -0
- package/lib/components/common/Paper/components/RoundedPaper/roundedPaper.styles.js +9 -0
- package/lib/components/common/Section/components/CollapsableSection/collapsableSection.styles.d.ts +1 -1
- package/lib/components/common/Tabs/tabs.js +1 -1
- package/lib/components/common/Tabs/tabs.styles.d.ts +1 -1
- package/lib/components/common/Title/title.d.ts +2 -7
- package/lib/components/common/Title/title.js +9 -5
- package/lib/components/common/Title/title.styles.d.ts +1 -1
- package/lib/components/common/Title/title.styles.js +3 -1
- package/lib/config/entities.d.ts +14 -7
- package/lib/config/utils.js +0 -1
- package/lib/{components/DataDictionary/hooks → hooks}/UseLayoutSpacing/hook.js +1 -1
- package/lib/hooks/UseLayoutSpacing/types.js +1 -0
- package/lib/hooks/useSummary.d.ts +2 -8
- package/lib/hooks/useSummary.js +19 -20
- package/lib/routes/constants.d.ts +1 -0
- package/lib/routes/constants.js +1 -0
- package/lib/styles/common/constants/colorMixes.d.ts +2 -0
- package/lib/styles/common/constants/colorMixes.js +2 -0
- package/lib/styles/common/mui/paper.js +0 -1
- package/lib/styles/common/mui/toggleButton.d.ts +9 -0
- package/lib/styles/common/mui/toggleButton.js +18 -0
- package/lib/styles/common/mui/typography.js +1 -0
- package/lib/tests/testIds.d.ts +1 -1
- package/lib/tests/testIds.js +1 -1
- package/lib/theme/common/components.js +64 -59
- package/lib/views/ExploreView/exploreView.js +10 -59
- package/package.json +2 -2
- package/src/components/DataDictionary/components/Entities/types.ts +1 -1
- package/src/components/DataDictionary/components/Entity/entity.styles.ts +1 -1
- package/src/components/DataDictionary/components/Entity/types.ts +1 -1
- package/src/components/DataDictionary/components/Filters/components/ColumnFilters/columnFilters.tsx +5 -1
- package/src/components/DataDictionary/components/Filters/stories/filters.stories.tsx +1 -0
- package/src/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.styles.ts +1 -1
- package/src/components/DataDictionary/components/Layout/components/EntitiesLayout/types.ts +1 -1
- package/src/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.styles.ts +1 -1
- package/src/components/DataDictionary/components/Layout/components/FiltersLayout/types.ts +1 -1
- package/src/components/DataDictionary/components/Layout/components/OutlineLayout/outlineLayout.styles.ts +1 -1
- package/src/components/DataDictionary/components/Layout/components/OutlineLayout/types.ts +1 -1
- package/src/components/DataDictionary/components/Layout/components/TitleLayout/titleLayout.styles.ts +1 -1
- package/src/components/DataDictionary/components/Layout/components/TitleLayout/types.ts +1 -1
- package/src/components/DataDictionary/components/Table/table.tsx +4 -7
- package/src/components/DataDictionary/components/Title/title.tsx +5 -3
- package/src/components/DataDictionary/dataDictionary.tsx +2 -2
- package/src/components/Detail/components/DetailViewTable/detailViewTable.tsx +3 -3
- package/src/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +3 -3
- package/src/components/Detail/components/Table/components/TableRows/tableRows.tsx +3 -3
- package/src/components/Detail/components/Table/table.tsx +1 -1
- package/src/components/Filter/components/ClearAllFilters/clearAllFilters.styles.ts +6 -0
- package/src/components/Filter/components/ClearAllFilters/clearAllFilters.tsx +6 -3
- package/src/components/Filter/components/FilterCountChip/filterCountChip.tsx +1 -0
- package/src/components/Filter/components/Filters/filters.tsx +3 -3
- package/src/components/Filter/components/SearchAllFilters/searchAllFilters.tsx +4 -4
- package/src/components/Index/components/EntityView/components/controls/ActionButton/actionButton.tsx +12 -0
- package/src/components/Index/components/EntityView/components/controls/ExportButton/exportButton.styles.ts +9 -0
- package/src/components/Index/components/EntityView/components/controls/ExportButton/exportButton.tsx +39 -0
- package/src/components/Index/components/EntityView/components/controls/FilterButton/filterButton.styles.ts +9 -0
- package/src/components/Index/components/EntityView/components/controls/FilterButton/filterButton.tsx +39 -0
- package/src/components/Index/components/EntityView/components/controls/ViewToggle/hooks/UseViewToggle/hook.ts +15 -0
- package/src/components/Index/components/{EntitiesView/hooks/UseEntitiesView → EntityView/components/controls/ViewToggle/hooks/UseViewToggle}/types.ts +1 -1
- package/src/components/Index/components/EntityView/components/controls/ViewToggle/stories/viewToggle.stories.tsx +12 -0
- package/src/components/Index/components/EntityView/components/controls/ViewToggle/viewToggle.styles.ts +9 -0
- package/src/components/Index/components/EntityView/components/controls/ViewToggle/viewToggle.tsx +24 -0
- package/src/components/Index/components/EntityView/components/layout/Summary/constants.ts +7 -0
- package/src/components/Index/components/EntityView/components/layout/Summary/summary.styles.ts +19 -0
- package/src/components/Index/components/EntityView/components/layout/Summary/summary.tsx +34 -0
- package/src/components/Index/components/EntityView/components/layout/Title/title.tsx +16 -0
- package/src/components/Index/components/EntityView/components/navigation/Tabs/common/utils.ts +25 -0
- package/src/components/Index/components/EntityView/components/navigation/Tabs/tabs.styles.ts +20 -0
- package/src/components/Index/components/EntityView/components/navigation/Tabs/tabs.tsx +28 -0
- package/src/components/Index/components/EntityView/components/slots/EntityListSlot/entityListSlot.tsx +14 -0
- package/src/components/Index/components/EntityView/components/slots/EntityViewSlot/entityViewSlot.styles.ts +17 -0
- package/src/components/Index/components/EntityView/components/slots/EntityViewSlot/entityViewSlot.tsx +19 -0
- package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/chartView.styles.ts +2 -1
- package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/chartView.tsx +10 -2
- package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/barX/plot.ts +3 -3
- package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/barX/utils.ts +2 -2
- package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/chart.styles.ts +3 -3
- package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/stories/chart.stories.tsx +1 -1
- package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/types.ts +2 -2
- package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/hooks/UseChartView/types.ts +1 -1
- package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/hooks/UseChartView/useChartView.ts +2 -2
- package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/stories/chartView.stories.tsx +1 -1
- package/src/components/Index/components/EntityView/components/views/ChartView/types.ts +9 -0
- package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/utils.ts +3 -3
- package/src/components/Index/components/{EntitiesView/components/EntityList/entityList.tsx → EntityView/components/views/TableView/tableView.tsx} +4 -4
- package/src/components/Index/components/EntityView/context/context.ts +9 -0
- package/src/components/Index/components/EntityView/context/hook.ts +11 -0
- package/src/components/Index/components/EntityView/context/types.ts +11 -0
- package/src/components/Index/index.styles.ts +59 -11
- package/src/components/Index/index.tsx +63 -41
- package/src/components/Index/types.ts +0 -7
- package/src/components/Layout/components/BackPage/components/BackPageHero/backPageHero.tsx +1 -1
- package/src/components/Layout/components/Sidebar/components/SidebarDrawer/sidebarDrawer.tsx +8 -8
- package/src/components/Layout/components/Sidebar/sidebar.stories.tsx +0 -4
- package/src/components/Layout/components/Sidebar/sidebar.tsx +10 -18
- package/src/components/Table/common/gridTable.styles.ts +10 -0
- package/src/components/Table/components/DownloadEntityResults/downloadEntityResults.styles.ts +9 -0
- package/src/components/Table/components/DownloadEntityResults/downloadEntityResults.tsx +6 -4
- package/src/components/Table/components/PaginationSummary/paginationSummary.tsx +1 -1
- package/src/components/Table/components/TableBody/tableBody.tsx +11 -3
- package/src/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.tsx +1 -10
- package/src/components/Table/components/TableFeatures/GlobalFilter/globalFilter.tsx +6 -2
- package/src/components/Table/components/TableHead/tableHead.tsx +37 -44
- package/src/components/Table/components/TableHead/types.ts +0 -2
- package/src/components/Table/components/TablePagination/stories/args.ts +12 -0
- package/src/components/Table/components/TablePagination/stories/tablePagination.stories.tsx +15 -0
- package/src/components/Table/components/TablePagination/tablePagination.styles.ts +11 -0
- package/src/components/Table/components/TablePagination/tablePagination.tsx +47 -0
- package/src/components/Table/components/TablePagination/types.ts +8 -0
- package/src/components/Table/components/TableRow/tableRow.styles.ts +3 -3
- package/src/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.styles.ts +6 -0
- package/src/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +9 -10
- package/src/components/Table/components/TableRows/components/VirtualizedRow/virtualizedRow.tsx +1 -1
- package/src/components/Table/components/TableRows/tableRows.tsx +4 -4
- package/src/components/Table/components/TableToolbar/constants.ts +8 -0
- package/src/components/Table/components/TableToolbar/tableToolbar.styles.ts +14 -14
- package/src/components/Table/components/TableToolbar/tableToolbar.tsx +21 -27
- package/src/components/Table/table.styles.ts +35 -1
- package/src/components/Table/table.tsx +10 -14
- package/src/components/common/Button/components/DropdownButton/dropdownButton.styles.ts +10 -10
- package/src/components/common/Button/components/DropdownButton/dropdownButton.tsx +8 -12
- package/src/components/common/Button/components/DropdownButton/types.ts +5 -0
- package/src/components/common/Button/constants.ts +12 -2
- package/src/components/common/Dot/dot.tsx +2 -5
- package/src/components/common/Drawer/provider/context.ts +8 -0
- package/src/components/common/Drawer/provider/hook.ts +11 -0
- package/src/components/common/Drawer/provider/provider.tsx +20 -0
- package/src/components/common/Drawer/provider/types.ts +10 -0
- package/src/components/common/Paper/components/FlatPaper/flatPaper.styles.ts +9 -0
- package/src/components/common/Paper/components/FlatPaper/flatPaper.tsx +10 -0
- package/src/components/common/Paper/components/FluidPaper/fluidPaper.styles.ts +11 -0
- package/src/components/common/Paper/components/FluidPaper/fluidPaper.tsx +10 -0
- package/src/components/common/Paper/components/RoundedPaper/roundedPaper.styles.ts +10 -0
- package/src/components/common/Paper/components/RoundedPaper/roundedPaper.tsx +10 -0
- package/src/components/common/Tabs/tabs.tsx +1 -1
- package/src/components/common/Title/title.styles.ts +3 -1
- package/src/components/common/Title/title.tsx +20 -28
- package/src/config/entities.ts +15 -7
- package/src/config/utils.ts +0 -1
- package/src/{components/DataDictionary/hooks → hooks}/UseLayoutSpacing/hook.ts +1 -1
- package/src/hooks/useSummary.ts +20 -27
- package/src/routes/constants.ts +1 -0
- package/src/styles/common/constants/colorMixes.ts +2 -0
- package/src/styles/common/mui/paper.ts +0 -1
- package/src/styles/common/mui/toggleButton.ts +27 -0
- package/src/styles/common/mui/typography.ts +1 -0
- package/src/tests/testIds.ts +1 -1
- package/src/theme/common/components.ts +64 -59
- package/src/views/ExploreView/exploreView.tsx +10 -100
- package/tests/chart.test.tsx +3 -3
- package/tests/chartView.test.tsx +2 -2
- package/tests/viewToggle.test.tsx +56 -0
- package/types/data-explorer-ui.d.ts +0 -7
- package/lib/components/DataDictionary/components/Table/table.styles.d.ts +0 -3
- package/lib/components/DataDictionary/components/Table/table.styles.js +0 -5
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.styles.d.ts +0 -13
- package/lib/components/Index/components/EntitiesView/components/ChartView/types.d.ts +0 -8
- package/lib/components/Index/components/EntitiesView/components/EntityList/entityList.d.ts +0 -3
- package/lib/components/Index/components/EntitiesView/entitiesView.d.ts +0 -2
- package/lib/components/Index/components/EntitiesView/entitiesView.js +0 -15
- package/lib/components/Index/components/EntitiesView/entitiesView.styles.d.ts +0 -3
- package/lib/components/Index/components/EntitiesView/entitiesView.styles.js +0 -20
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.d.ts +0 -2
- package/lib/components/Index/components/EntitiesView/stories/entitiesView.stories.d.ts +0 -8
- package/lib/components/Index/components/EntitiesView/stories/entitiesView.stories.js +0 -50
- package/lib/components/Index/components/EntitiesView/types.d.ts +0 -8
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.d.ts +0 -1
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.js +0 -13
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.styles.d.ts +0 -3
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.styles.js +0 -13
- package/lib/components/Index/components/Hero/components/Summaries/stories/summaries.stories.js +0 -14
- package/lib/components/Index/components/Hero/components/Summaries/summaries.d.ts +0 -9
- package/lib/components/Index/components/Hero/components/Summaries/summaries.js +0 -12
- package/lib/components/Index/components/Hero/components/Summaries/summaries.styles.d.ts +0 -7
- package/lib/components/Index/components/Hero/components/Summaries/summaries.styles.js +0 -26
- package/lib/components/Index/components/Hero/hero.d.ts +0 -11
- package/lib/components/Index/components/Hero/hero.js +0 -12
- package/lib/components/Index/components/Hero/hero.styles.d.ts +0 -16
- package/lib/components/Index/components/Hero/hero.styles.js +0 -44
- package/lib/components/Index/components/Hero/stories/hero.stories.d.ts +0 -6
- package/lib/components/Index/components/Hero/stories/hero.stories.js +0 -16
- package/lib/components/Index/components/Tabs/common/utils.js +0 -19
- package/lib/components/Index/components/Tabs/tabs.js +0 -20
- package/lib/components/Index/stories/index.stories.js +0 -17
- package/lib/components/Table/components/Pagination/pagination.d.ts +0 -9
- package/lib/components/Table/components/Pagination/pagination.js +0 -19
- package/lib/components/Table/components/Pagination/pagination.stories.d.ts +0 -28
- package/lib/components/Table/components/Pagination/pagination.stories.js +0 -24
- package/lib/components/Table/components/Pagination/pagination.styles.d.ts +0 -4
- package/lib/components/Table/components/Pagination/pagination.styles.js +0 -15
- package/lib/components/Table/components/TableBody/hooks/virtualizer/constants.d.ts +0 -3
- package/lib/components/Table/components/TableBody/hooks/virtualizer/constants.js +0 -3
- package/lib/components/Table/components/TableBody/hooks/virtualizer/hook.d.ts +0 -8
- package/lib/components/Table/components/TableBody/hooks/virtualizer/hook.js +0 -18
- package/lib/components/Table/components/TableBody/hooks/virtualizer/types.d.ts +0 -4
- package/src/components/DataDictionary/components/Table/table.styles.ts +0 -6
- package/src/components/Index/components/EntitiesView/components/ChartView/types.ts +0 -9
- package/src/components/Index/components/EntitiesView/entitiesView.styles.ts +0 -21
- package/src/components/Index/components/EntitiesView/entitiesView.tsx +0 -30
- package/src/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.ts +0 -15
- package/src/components/Index/components/EntitiesView/stories/entitiesView.stories.tsx +0 -76
- package/src/components/Index/components/EntitiesView/types.ts +0 -9
- package/src/components/Index/components/Hero/components/ExportButton/exportButton.styles.ts +0 -14
- package/src/components/Index/components/Hero/components/ExportButton/exportButton.tsx +0 -26
- package/src/components/Index/components/Hero/components/Summaries/stories/summaries.stories.tsx +0 -20
- package/src/components/Index/components/Hero/components/Summaries/summaries.styles.ts +0 -31
- package/src/components/Index/components/Hero/components/Summaries/summaries.tsx +0 -35
- package/src/components/Index/components/Hero/hero.styles.ts +0 -55
- package/src/components/Index/components/Hero/hero.tsx +0 -40
- package/src/components/Index/components/Hero/stories/hero.stories.tsx +0 -22
- package/src/components/Index/components/Tabs/common/utils.ts +0 -35
- package/src/components/Index/components/Tabs/tabs.tsx +0 -23
- package/src/components/Index/stories/index.stories.tsx +0 -23
- package/src/components/Table/components/Pagination/pagination.stories.tsx +0 -30
- package/src/components/Table/components/Pagination/pagination.styles.ts +0 -16
- package/src/components/Table/components/Pagination/pagination.tsx +0 -50
- package/src/components/Table/components/TableBody/hooks/virtualizer/constants.ts +0 -3
- package/src/components/Table/components/TableBody/hooks/virtualizer/hook.ts +0 -23
- package/src/components/Table/components/TableBody/hooks/virtualizer/types.ts +0 -5
- package/tests/entitiesView.test.tsx +0 -32
- /package/lib/components/Index/components/{EntitiesView/hooks/UseEntitiesView → EntityView/components/controls/ViewToggle/hooks/UseViewToggle}/types.js +0 -0
- /package/lib/components/Index/components/{Tabs → EntityView/components/navigation/Tabs}/tabs.d.ts +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/chartView.d.ts +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/barX/constants.d.ts +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/barX/constants.js +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/chart.d.ts +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/chart.js +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/constants.d.ts +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/constants.js +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/stories/args.d.ts +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/stories/args.js +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/stories/chart.stories.d.ts +0 -0
- /package/lib/components/{DataDictionary/hooks/UseLayoutSpacing → Index/components/EntityView/components/views/ChartView/components/Chart}/types.js +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/constants.d.ts +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/constants.js +0 -0
- /package/lib/components/Index/components/{EntitiesView/components/ChartView/components/Chart → EntityView/components/views/ChartView/hooks/UseChartView}/types.js +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/stories/args.d.ts +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/stories/args.js +0 -0
- /package/lib/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/stories/chartView.stories.d.ts +0 -0
- /package/lib/components/Index/components/{EntitiesView/components/ChartView/hooks/UseChartView → EntityView/components/views/ChartView}/types.js +0 -0
- /package/lib/components/Index/components/{EntitiesView/components/EntityList → EntityView/components/views/TableView}/types.d.ts +0 -0
- /package/lib/components/Index/components/{EntitiesView/components/ChartView → EntityView/components/views/TableView}/types.js +0 -0
- /package/lib/components/Index/components/{EntitiesView/components/EntityList → EntityView/context}/types.js +0 -0
- /package/lib/components/{Index/components/EntitiesView → Table/components/TablePagination}/types.js +0 -0
- /package/lib/components/{Table/components/TableBody/hooks/virtualizer → common/Button/components/DropdownButton}/types.js +0 -0
- /package/lib/{components/DataDictionary/hooks → hooks}/UseLayoutSpacing/hook.d.ts +0 -0
- /package/lib/{components/DataDictionary/hooks → hooks}/UseLayoutSpacing/types.d.ts +0 -0
- /package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/barX/constants.ts +0 -0
- /package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/chart.tsx +0 -0
- /package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/constants.ts +0 -0
- /package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/components/Chart/stories/args.ts +0 -0
- /package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/constants.ts +0 -0
- /package/src/components/Index/components/{EntitiesView/components → EntityView/components/views}/ChartView/stories/args.ts +0 -0
- /package/src/components/Index/components/{EntitiesView/components/EntityList → EntityView/components/views/TableView}/types.ts +0 -0
- /package/src/{components/DataDictionary/hooks → hooks}/UseLayoutSpacing/types.ts +0 -0
package/lib/config/entities.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TabProps as MTabProps, Theme, ThemeOptions } from "@mui/material";
|
|
2
2
|
import { CellContext, ColumnDef, ColumnMeta, ColumnSort, GroupingState, RowData, Table, TableOptions } from "@tanstack/react-table";
|
|
3
3
|
import { JSXElementConstructor, ReactNode } from "react";
|
|
4
|
+
import { AzulSummaryResponse } from "../apis/azul/common/entities";
|
|
4
5
|
import { CategoryConfig } from "../common/categories/config/types";
|
|
5
6
|
import { DataDictionaryAnnotation, DataDictionaryConfig, SelectedFilter } from "../common/entities";
|
|
6
|
-
import { HeroTitle } from "../components/common/Title/title";
|
|
7
7
|
import { FooterProps } from "../components/Layout/components/Footer/footer";
|
|
8
8
|
import { HeaderProps } from "../components/Layout/components/Header/header";
|
|
9
9
|
import { ExploreMode } from "../hooks/useExploreMode/types";
|
|
@@ -126,7 +126,6 @@ export interface EntityConfig<T = any, I = any> extends TabConfig {
|
|
|
126
126
|
detail: BackPageConfig;
|
|
127
127
|
entityMapper?: EntityMapper<T, I>;
|
|
128
128
|
exploreMode: ExploreMode;
|
|
129
|
-
explorerTitle?: SiteConfig["explorerTitle"];
|
|
130
129
|
export?: ExportConfig;
|
|
131
130
|
getId?: GetIdFunction<T>;
|
|
132
131
|
getTitle?: GetTitleFunction<T>;
|
|
@@ -137,11 +136,23 @@ export interface EntityConfig<T = any, I = any> extends TabConfig {
|
|
|
137
136
|
options?: Options;
|
|
138
137
|
overrides?: Override[];
|
|
139
138
|
staticLoadFile?: string;
|
|
139
|
+
ui?: EntityUIConfig;
|
|
140
140
|
}
|
|
141
141
|
/**
|
|
142
142
|
* Entity mapper function.
|
|
143
143
|
*/
|
|
144
144
|
export type EntityMapper<T, I> = (input: I) => T;
|
|
145
|
+
export interface EntityUIConfig {
|
|
146
|
+
actionButton?: ReactNode;
|
|
147
|
+
enableExportButton?: boolean;
|
|
148
|
+
enableSummary?: boolean;
|
|
149
|
+
enableTabs?: boolean;
|
|
150
|
+
slots?: {
|
|
151
|
+
entityListSlot?: ComponentsConfig;
|
|
152
|
+
entityViewSlot?: ComponentsConfig;
|
|
153
|
+
};
|
|
154
|
+
title?: ReactNode;
|
|
155
|
+
}
|
|
145
156
|
/**
|
|
146
157
|
* Interface to define the export configuration for a given site.
|
|
147
158
|
*/
|
|
@@ -204,11 +215,8 @@ export interface ListConfig<T extends RowData> {
|
|
|
204
215
|
export interface ListViewConfig {
|
|
205
216
|
disablePagination?: boolean;
|
|
206
217
|
enableDownload?: boolean;
|
|
207
|
-
enableTab?: boolean;
|
|
208
|
-
listHero?: ComponentsConfig;
|
|
209
218
|
rowPreviewView?: ComponentsConfig;
|
|
210
219
|
rowSelectionView?: ComponentsConfig;
|
|
211
|
-
subTitleHero?: ComponentsConfig;
|
|
212
220
|
}
|
|
213
221
|
export interface OAuthProvider<P = any> {
|
|
214
222
|
authorization: {
|
|
@@ -294,7 +302,6 @@ export interface SiteConfig {
|
|
|
294
302
|
dataSource: DataSourceConfig;
|
|
295
303
|
enableEntitiesView?: boolean;
|
|
296
304
|
entities: EntityConfig[];
|
|
297
|
-
explorerTitle: HeroTitle;
|
|
298
305
|
export?: ExportConfig;
|
|
299
306
|
exportsRequireAuth?: boolean;
|
|
300
307
|
exportToTerraUrl?: string;
|
|
@@ -322,7 +329,7 @@ export declare const SORT_DIRECTION: {
|
|
|
322
329
|
*/
|
|
323
330
|
export interface SummaryConfig {
|
|
324
331
|
apiPath: string;
|
|
325
|
-
|
|
332
|
+
mapResponse: (response: AzulSummaryResponse) => [string, string][];
|
|
326
333
|
}
|
|
327
334
|
/**
|
|
328
335
|
* System status bind response function.
|
package/lib/config/utils.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import { AzulSummaryResponse } from "../apis/azul/common/entities";
|
|
2
1
|
interface UseSummaryResponse {
|
|
3
|
-
|
|
4
|
-
response?: AzulSummaryResponse;
|
|
2
|
+
summaries: [string, string][];
|
|
5
3
|
}
|
|
6
|
-
|
|
7
|
-
* Hook responsible for handling the load of the summary values displayed on an entity index page.
|
|
8
|
-
* @returns an object with the loaded data and a flag indicating is the data is loading
|
|
9
|
-
*/
|
|
10
|
-
export declare const useSummary: () => UseSummaryResponse;
|
|
4
|
+
export declare const useSummary: () => UseSummaryResponse | undefined;
|
|
11
5
|
export {};
|
package/lib/hooks/useSummary.js
CHANGED
|
@@ -4,30 +4,29 @@ import { useAsync } from "./useAsync";
|
|
|
4
4
|
import { useConfig } from "./useConfig";
|
|
5
5
|
import { useEntityService } from "./useEntityService";
|
|
6
6
|
import { useExploreState } from "./useExploreState";
|
|
7
|
-
/**
|
|
8
|
-
* Hook responsible for handling the load of the summary values displayed on an entity index page.
|
|
9
|
-
* @returns an object with the loaded data and a flag indicating is the data is loading
|
|
10
|
-
*/
|
|
11
7
|
export const useSummary = () => {
|
|
12
8
|
const { token } = useToken();
|
|
13
|
-
const { config } = useConfig();
|
|
9
|
+
const { config, entityConfig } = useConfig();
|
|
14
10
|
const { exploreState } = useExploreState();
|
|
15
11
|
const { filterState } = exploreState;
|
|
16
12
|
const { summaryConfig } = config;
|
|
17
|
-
const {
|
|
18
|
-
const {
|
|
13
|
+
const { ui } = entityConfig;
|
|
14
|
+
const { enableSummary } = ui || {};
|
|
15
|
+
const { data: response, run } = useAsync();
|
|
16
|
+
const { catalog, fetchSummary } = useEntityService();
|
|
17
|
+
// Summary is enabled and summary config is defined.
|
|
18
|
+
const shouldFetch = !!(enableSummary && summaryConfig);
|
|
19
19
|
useEffect(() => {
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, [catalog, fetchSummary, filterState, run,
|
|
24
|
-
//
|
|
25
|
-
if (!summaryConfig)
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
20
|
+
if (!shouldFetch)
|
|
21
|
+
return;
|
|
22
|
+
run(fetchSummary(filterState, catalog, token));
|
|
23
|
+
}, [catalog, fetchSummary, filterState, run, shouldFetch, token]);
|
|
24
|
+
// Summary is disabled or summary config is not defined.
|
|
25
|
+
if (!enableSummary || !summaryConfig)
|
|
26
|
+
return;
|
|
27
|
+
// Summary response is not defined.
|
|
28
|
+
if (!response)
|
|
29
|
+
return;
|
|
30
|
+
// Map response to summaries.
|
|
31
|
+
return { summaries: summaryConfig.mapResponse(response) };
|
|
33
32
|
};
|
package/lib/routes/constants.js
CHANGED
|
@@ -3,7 +3,9 @@ export declare const COLOR_MIXES: {
|
|
|
3
3
|
ALERT_MAIN_32: string;
|
|
4
4
|
ALERT_MAIN_64: string;
|
|
5
5
|
COMMON_BLACK_04: string;
|
|
6
|
+
COMMON_BLACK_05: string;
|
|
6
7
|
COMMON_BLACK_08: string;
|
|
8
|
+
COMMON_BLACK_20: string;
|
|
7
9
|
COMMON_WHITE_32: string;
|
|
8
10
|
COMMON_WHITE_64: string;
|
|
9
11
|
COMMON_WHITE_80: string;
|
|
@@ -4,7 +4,9 @@ export const COLOR_MIXES = {
|
|
|
4
4
|
ALERT_MAIN_32: `color-mix(in srgb, ${PALETTE.ALERT_MAIN} 32%, transparent)`,
|
|
5
5
|
ALERT_MAIN_64: `color-mix(in srgb, ${PALETTE.ALERT_MAIN} 64%, transparent)`,
|
|
6
6
|
COMMON_BLACK_04: `color-mix(in srgb, ${PALETTE.COMMON_BLACK} 4%, transparent)`,
|
|
7
|
+
COMMON_BLACK_05: `color-mix(in srgb, ${PALETTE.COMMON_BLACK} 5%, transparent)`,
|
|
7
8
|
COMMON_BLACK_08: `color-mix(in srgb, ${PALETTE.COMMON_BLACK} 8%, transparent)`,
|
|
9
|
+
COMMON_BLACK_20: `color-mix(in srgb, ${PALETTE.COMMON_BLACK} 20%, transparent)`,
|
|
8
10
|
COMMON_WHITE_32: `color-mix(in srgb, ${PALETTE.COMMON_WHITE} 32%, transparent)`,
|
|
9
11
|
COMMON_WHITE_64: `color-mix(in srgb, ${PALETTE.COMMON_WHITE} 64%, transparent)`,
|
|
10
12
|
COMMON_WHITE_80: `color-mix(in srgb, ${PALETTE.COMMON_WHITE} 80%, transparent)`,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ToggleButtonProps } from "@mui/material";
|
|
2
|
+
type ToggleButtonPropsOptions = {
|
|
3
|
+
COLOR: typeof COLOR;
|
|
4
|
+
SIZE: typeof SIZE;
|
|
5
|
+
};
|
|
6
|
+
declare const COLOR: Record<string, ToggleButtonProps["color"]>;
|
|
7
|
+
declare const SIZE: Record<string, ToggleButtonProps["size"]>;
|
|
8
|
+
export declare const TOGGLE_BUTTON_PROPS: ToggleButtonPropsOptions;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const COLOR = {
|
|
2
|
+
ERROR: "error",
|
|
3
|
+
INFO: "info",
|
|
4
|
+
PRIMARY: "primary",
|
|
5
|
+
SECONDARY: "secondary",
|
|
6
|
+
STANDARD: "standard",
|
|
7
|
+
SUCCESS: "success",
|
|
8
|
+
WARNING: "warning",
|
|
9
|
+
};
|
|
10
|
+
const SIZE = {
|
|
11
|
+
LARGE: "large",
|
|
12
|
+
MEDIUM: "medium",
|
|
13
|
+
SMALL: "small",
|
|
14
|
+
};
|
|
15
|
+
export const TOGGLE_BUTTON_PROPS = {
|
|
16
|
+
COLOR,
|
|
17
|
+
SIZE,
|
|
18
|
+
};
|
|
@@ -11,6 +11,7 @@ const VARIANT = {
|
|
|
11
11
|
TEXT_BODY_400_2_LINES: "text-body-400-2lines",
|
|
12
12
|
TEXT_BODY_500: "text-body-500",
|
|
13
13
|
TEXT_BODY_SMALL_400: "text-body-small-400",
|
|
14
|
+
TEXT_BODY_SMALL_500: "text-body-small-500",
|
|
14
15
|
TEXT_HEADING_LARGE: "text-heading-large",
|
|
15
16
|
TEXT_HEADING_SMALL: "text-heading-small",
|
|
16
17
|
TEXT_HEADING_XSMALL: "text-heading-xsmall",
|
package/lib/tests/testIds.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare const TEST_IDS: {
|
|
2
2
|
CLEAR_ALL_FILTERS: string;
|
|
3
|
-
ENTITIES_VIEW: string;
|
|
4
3
|
EXPORT_BUTTON: string;
|
|
5
4
|
FILTERS: string;
|
|
6
5
|
FILTER_CONTROLS: string;
|
|
@@ -16,4 +15,5 @@ export declare const TEST_IDS: {
|
|
|
16
15
|
TABLE_PAGINATION: string;
|
|
17
16
|
TABLE_PAGINATION_PAGE: string;
|
|
18
17
|
TABLE_PAGINATION_RESULTS: string;
|
|
18
|
+
VIEW_TOGGLE: string;
|
|
19
19
|
};
|
package/lib/tests/testIds.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export const TEST_IDS = {
|
|
2
2
|
CLEAR_ALL_FILTERS: "clear-all-filters",
|
|
3
|
-
ENTITIES_VIEW: "entities-view",
|
|
4
3
|
EXPORT_BUTTON: "export-button",
|
|
5
4
|
FILTERS: "filters",
|
|
6
5
|
FILTER_CONTROLS: "filter-controls",
|
|
@@ -16,4 +15,5 @@ export const TEST_IDS = {
|
|
|
16
15
|
TABLE_PAGINATION: "table-pagination",
|
|
17
16
|
TABLE_PAGINATION_PAGE: "table-pagination-page",
|
|
18
17
|
TABLE_PAGINATION_RESULTS: "table-pagination-results",
|
|
18
|
+
VIEW_TOGGLE: "view-toggle",
|
|
19
19
|
};
|
|
@@ -5,6 +5,7 @@ import { SHADOWS } from "../../styles/common/constants/shadows";
|
|
|
5
5
|
import { BUTTON_PROPS } from "../../styles/common/mui/button";
|
|
6
6
|
import { CHIP_PROPS } from "../../styles/common/mui/chip";
|
|
7
7
|
import { OUTLINED_INPUT_PROPS } from "../../styles/common/mui/outlinedInput";
|
|
8
|
+
import { TOGGLE_BUTTON_PROPS } from "../../styles/common/mui/toggleButton";
|
|
8
9
|
import { desktopUp, mobileUp, tabletUp } from "./breakpoints";
|
|
9
10
|
import { TEXT_BODY_400, TEXT_BODY_400_2_LINES, TEXT_BODY_500, TEXT_BODY_SMALL_400, TEXT_BODY_SMALL_500, TEXT_HEADING, TEXT_HEADING_SMALL, } from "./typography";
|
|
10
11
|
// Constants
|
|
@@ -136,50 +137,50 @@ export const MuiButton = (theme) => {
|
|
|
136
137
|
},
|
|
137
138
|
styleOverrides: {
|
|
138
139
|
containedPrimary: {
|
|
139
|
-
backgroundColor:
|
|
140
|
-
boxShadow: `0 1px 0 0 ${
|
|
141
|
-
color:
|
|
140
|
+
backgroundColor: PALETTE.PRIMARY_MAIN,
|
|
141
|
+
boxShadow: `0 1px 0 0 ${COLOR_MIXES.COMMON_BLACK_08}, inset 0 -1px 0 0 ${COLOR_MIXES.COMMON_BLACK_20}`,
|
|
142
|
+
color: PALETTE.COMMON_WHITE,
|
|
142
143
|
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
143
144
|
"&:hover": {
|
|
144
|
-
backgroundColor:
|
|
145
|
-
boxShadow: `0 1px 0 0 ${
|
|
145
|
+
backgroundColor: PALETTE.PRIMARY_DARK,
|
|
146
|
+
boxShadow: `0 1px 0 0 ${COLOR_MIXES.COMMON_BLACK_08}, inset 0 -1px 0 0 ${COLOR_MIXES.COMMON_BLACK_20}`,
|
|
146
147
|
},
|
|
147
148
|
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
148
149
|
"&:active": {
|
|
149
|
-
backgroundColor:
|
|
150
|
-
boxShadow:
|
|
150
|
+
backgroundColor: PALETTE.PRIMARY_DARK,
|
|
151
|
+
boxShadow: `0 1px 0 0 ${COLOR_MIXES.COMMON_BLACK_08}, inset 0 -1px 0 0 ${COLOR_MIXES.COMMON_BLACK_20}`,
|
|
151
152
|
},
|
|
152
153
|
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
153
154
|
"&.Mui-disabled": {
|
|
154
|
-
backgroundColor:
|
|
155
|
-
boxShadow:
|
|
156
|
-
color:
|
|
155
|
+
backgroundColor: PALETTE.PRIMARY_MAIN,
|
|
156
|
+
boxShadow: "none",
|
|
157
|
+
color: PALETTE.COMMON_WHITE,
|
|
157
158
|
opacity: 0.5,
|
|
158
159
|
},
|
|
159
160
|
},
|
|
160
161
|
containedSecondary: {
|
|
161
|
-
backgroundColor:
|
|
162
|
-
boxShadow: `inset 0 0 0 1px ${
|
|
163
|
-
color:
|
|
162
|
+
backgroundColor: PALETTE.COMMON_WHITE,
|
|
163
|
+
boxShadow: `inset 0 0 0 1px ${PALETTE.SMOKE_DARK}, 0 1px 0 0 ${COLOR_MIXES.COMMON_BLACK_05}`,
|
|
164
|
+
color: PALETTE.INK_MAIN,
|
|
164
165
|
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
165
166
|
"&.Mui-focusVisible": {
|
|
166
|
-
backgroundColor:
|
|
167
|
-
boxShadow: `inset 0 0 0 1px ${
|
|
167
|
+
backgroundColor: PALETTE.COMMON_WHITE,
|
|
168
|
+
boxShadow: `inset 0 0 0 1px ${PALETTE.SMOKE_DARK}, 0 1px 0 0 ${COLOR_MIXES.COMMON_BLACK_05}`,
|
|
168
169
|
},
|
|
169
170
|
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
170
171
|
"&:hover": {
|
|
171
|
-
backgroundColor:
|
|
172
|
-
boxShadow: `inset 0 0 0 1px ${
|
|
172
|
+
backgroundColor: PALETTE.SMOKE_LIGHTEST,
|
|
173
|
+
boxShadow: `inset 0 0 0 1px ${PALETTE.SMOKE_DARK}, 0 1px 0 0 ${COLOR_MIXES.COMMON_BLACK_05}`,
|
|
173
174
|
},
|
|
174
175
|
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
175
176
|
"&:active": {
|
|
176
|
-
backgroundColor:
|
|
177
|
-
boxShadow: `inset 0 0 0 1px ${
|
|
177
|
+
backgroundColor: PALETTE.SMOKE_LIGHTEST,
|
|
178
|
+
boxShadow: `inset 0 0 0 1px ${PALETTE.SMOKE_DARK}, 0 1px 0 0 ${COLOR_MIXES.COMMON_BLACK_05}`,
|
|
178
179
|
},
|
|
179
180
|
"&:disabled": {
|
|
180
|
-
backgroundColor:
|
|
181
|
-
boxShadow: `inset 0 0 0 1px ${
|
|
182
|
-
color:
|
|
181
|
+
backgroundColor: PALETTE.COMMON_WHITE,
|
|
182
|
+
boxShadow: `inset 0 0 0 1px ${PALETTE.SMOKE_DARK}`,
|
|
183
|
+
color: PALETTE.INK_MAIN,
|
|
183
184
|
opacity: 0.5,
|
|
184
185
|
},
|
|
185
186
|
},
|
|
@@ -187,18 +188,12 @@ export const MuiButton = (theme) => {
|
|
|
187
188
|
margin: 0,
|
|
188
189
|
variants: [
|
|
189
190
|
{
|
|
190
|
-
props: { size: BUTTON_PROPS.SIZE.
|
|
191
|
-
style: {
|
|
192
|
-
marginLeft: -6,
|
|
193
|
-
marginRight: -6,
|
|
194
|
-
},
|
|
191
|
+
props: { size: BUTTON_PROPS.SIZE.LARGE },
|
|
192
|
+
style: { marginRight: -4 },
|
|
195
193
|
},
|
|
196
194
|
{
|
|
197
|
-
props: { size: BUTTON_PROPS.SIZE.
|
|
198
|
-
style: {
|
|
199
|
-
marginLeft: -6,
|
|
200
|
-
marginRight: -6,
|
|
201
|
-
},
|
|
195
|
+
props: { size: BUTTON_PROPS.SIZE.MEDIUM },
|
|
196
|
+
style: { marginRight: -4 },
|
|
202
197
|
},
|
|
203
198
|
],
|
|
204
199
|
},
|
|
@@ -229,26 +224,39 @@ export const MuiButton = (theme) => {
|
|
|
229
224
|
padding: "10px 16px",
|
|
230
225
|
textTransform: "capitalize",
|
|
231
226
|
},
|
|
232
|
-
sizeSmall: {
|
|
233
|
-
padding: "6px 12px",
|
|
234
|
-
},
|
|
235
227
|
startIcon: {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
228
|
+
margin: 0,
|
|
229
|
+
variants: [
|
|
230
|
+
{
|
|
231
|
+
props: { size: BUTTON_PROPS.SIZE.LARGE },
|
|
232
|
+
style: { marginLeft: -4 },
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
props: { size: BUTTON_PROPS.SIZE.MEDIUM },
|
|
236
|
+
style: { marginLeft: -4 },
|
|
237
|
+
},
|
|
238
|
+
],
|
|
242
239
|
},
|
|
243
240
|
},
|
|
244
241
|
variants: [
|
|
242
|
+
{
|
|
243
|
+
props: { size: BUTTON_PROPS.SIZE.LARGE },
|
|
244
|
+
style: { padding: "10px 16px" },
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
props: { size: BUTTON_PROPS.SIZE.MEDIUM },
|
|
248
|
+
style: { padding: "8px 16px" },
|
|
249
|
+
},
|
|
245
250
|
{
|
|
246
251
|
props: {
|
|
247
252
|
color: BUTTON_PROPS.COLOR.PRIMARY,
|
|
248
253
|
variant: BUTTON_PROPS.VARIANT.TEXT,
|
|
249
254
|
},
|
|
250
255
|
style: {
|
|
256
|
+
alignSelf: "center",
|
|
251
257
|
color: PALETTE.PRIMARY_MAIN,
|
|
258
|
+
minWidth: 0,
|
|
259
|
+
padding: 0,
|
|
252
260
|
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
253
261
|
"&:hover": {
|
|
254
262
|
backgroundColor: "transparent",
|
|
@@ -740,22 +748,23 @@ export const MuiIconButton = (theme) => {
|
|
|
740
748
|
},
|
|
741
749
|
},
|
|
742
750
|
colorSecondary: {
|
|
743
|
-
backgroundColor:
|
|
744
|
-
boxShadow: `inset 0 0 0 1px ${
|
|
745
|
-
color:
|
|
751
|
+
backgroundColor: PALETTE.COMMON_WHITE,
|
|
752
|
+
boxShadow: `inset 0 0 0 1px ${PALETTE.SMOKE_DARK}, 0 1px 0 0 ${COLOR_MIXES.COMMON_BLACK_05}`,
|
|
753
|
+
color: PALETTE.INK_MAIN,
|
|
746
754
|
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
747
755
|
"&.Mui-disabled": {
|
|
748
|
-
|
|
756
|
+
boxShadow: `inset 0 0 0 1px ${PALETTE.SMOKE_DARK}`,
|
|
757
|
+
color: PALETTE.INK_LIGHT,
|
|
749
758
|
opacity: 0.5,
|
|
750
759
|
},
|
|
751
760
|
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
752
761
|
"&:hover": {
|
|
753
|
-
backgroundColor:
|
|
762
|
+
backgroundColor: PALETTE.SMOKE_LIGHTEST,
|
|
754
763
|
},
|
|
755
764
|
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
756
765
|
"&:active": {
|
|
757
|
-
backgroundColor:
|
|
758
|
-
boxShadow: `inset 0 0 0 1px ${
|
|
766
|
+
backgroundColor: PALETTE.SMOKE_LIGHTEST,
|
|
767
|
+
boxShadow: `inset 0 0 0 1px ${PALETTE.SMOKE_DARK}`,
|
|
759
768
|
},
|
|
760
769
|
},
|
|
761
770
|
root: {
|
|
@@ -765,7 +774,7 @@ export const MuiIconButton = (theme) => {
|
|
|
765
774
|
padding: 10,
|
|
766
775
|
},
|
|
767
776
|
sizeMedium: {
|
|
768
|
-
padding:
|
|
777
|
+
padding: 8,
|
|
769
778
|
},
|
|
770
779
|
sizeSmall: {
|
|
771
780
|
padding: 6,
|
|
@@ -1170,15 +1179,6 @@ export const MuiPaper = (theme) => {
|
|
|
1170
1179
|
},
|
|
1171
1180
|
},
|
|
1172
1181
|
},
|
|
1173
|
-
{
|
|
1174
|
-
props: { variant: "table" }, // Copy of "panel" variant.
|
|
1175
|
-
style: {
|
|
1176
|
-
borderColor: theme.palette.smoke.main,
|
|
1177
|
-
borderStyle: "solid",
|
|
1178
|
-
borderWidth: 1,
|
|
1179
|
-
boxShadow: SHADOWS["01"],
|
|
1180
|
-
},
|
|
1181
|
-
},
|
|
1182
1182
|
],
|
|
1183
1183
|
};
|
|
1184
1184
|
};
|
|
@@ -1450,7 +1450,6 @@ export const MuiToggleButton = (theme) => {
|
|
|
1450
1450
|
borderRadius: 4,
|
|
1451
1451
|
color: theme.palette.ink.main,
|
|
1452
1452
|
flex: 1,
|
|
1453
|
-
padding: "8px 12px",
|
|
1454
1453
|
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
1455
1454
|
"&:hover": {
|
|
1456
1455
|
backgroundColor: theme.palette.smoke.lightest,
|
|
@@ -1463,6 +1462,12 @@ export const MuiToggleButton = (theme) => {
|
|
|
1463
1462
|
backgroundColor: PALETTE.COMMON_WHITE,
|
|
1464
1463
|
},
|
|
1465
1464
|
},
|
|
1465
|
+
variants: [
|
|
1466
|
+
{
|
|
1467
|
+
props: { size: TOGGLE_BUTTON_PROPS.SIZE.MEDIUM },
|
|
1468
|
+
style: { padding: "8px 16px" },
|
|
1469
|
+
},
|
|
1470
|
+
],
|
|
1466
1471
|
},
|
|
1467
1472
|
},
|
|
1468
1473
|
};
|
|
@@ -1,40 +1,31 @@
|
|
|
1
|
-
import React, { useEffect, useMemo
|
|
1
|
+
import React, { useEffect, useMemo } from "react";
|
|
2
2
|
import { track } from "../../common/analytics/analytics";
|
|
3
3
|
import { EVENT_NAME, EVENT_PARAM } from "../../common/analytics/entities";
|
|
4
|
-
import {
|
|
4
|
+
import { DrawerProvider } from "../../components/common/Drawer/provider/provider";
|
|
5
5
|
import { ClearAllFilters } from "../../components/Filter/components/ClearAllFilters/clearAllFilters";
|
|
6
6
|
import { Filters, } from "../../components/Filter/components/Filters/filters";
|
|
7
7
|
import { SearchAllFilters } from "../../components/Filter/components/SearchAllFilters/searchAllFilters";
|
|
8
|
-
import { Tabs } from "../../components/Index/components/Tabs/tabs";
|
|
9
8
|
import { Index as IndexView } from "../../components/Index/index";
|
|
10
|
-
import { SidebarButton } from "../../components/Layout/components/Sidebar/components/SidebarButton/sidebarButton";
|
|
11
9
|
import { SidebarLabel } from "../../components/Layout/components/Sidebar/components/SidebarLabel/sidebarLabel";
|
|
12
10
|
import { SidebarTools } from "../../components/Layout/components/Sidebar/components/SidebarTools/sidebarTools.styles";
|
|
13
11
|
import { Sidebar } from "../../components/Layout/components/Sidebar/sidebar";
|
|
14
12
|
import { useStateSyncManager } from "../../hooks/stateSyncManager/hook";
|
|
15
|
-
import { BREAKPOINT_FN_NAME, useBreakpointHelper, } from "../../hooks/useBreakpointHelper";
|
|
16
13
|
import { useConfig } from "../../hooks/useConfig";
|
|
17
14
|
import { useEntityList } from "../../hooks/useEntityList";
|
|
18
15
|
import { useExploreState } from "../../hooks/useExploreState";
|
|
19
|
-
import { useSummary } from "../../hooks/useSummary";
|
|
20
16
|
import { ExploreActionKind } from "../../providers/exploreState";
|
|
21
17
|
import { clearMeta } from "../../providers/exploreState/actions/clearMeta/dispatch";
|
|
22
18
|
import { stateToUrl } from "../../providers/exploreState/actions/stateToUrl/dispatch";
|
|
23
19
|
import { urlToState } from "../../providers/exploreState/actions/urlToState/dispatch";
|
|
24
20
|
import { SELECT_CATEGORY_KEY } from "../../providers/exploreState/constants";
|
|
25
21
|
import { TEST_IDS } from "../../tests/testIds";
|
|
26
|
-
import { DESKTOP_SM } from "../../theme/common/breakpoints";
|
|
27
22
|
import { buildStateSyncManagerContext } from "./utils";
|
|
28
23
|
export const ExploreView = (props) => {
|
|
29
|
-
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
|
|
30
|
-
const tabletDown = useBreakpointHelper(BREAKPOINT_FN_NAME.DOWN, DESKTOP_SM);
|
|
31
24
|
const { config, entityConfig } = useConfig(); // Get app level config.
|
|
32
25
|
const { exploreDispatch, exploreState } = useExploreState(); // Get the useReducer state and dispatch for "Explore".
|
|
33
|
-
const {
|
|
34
|
-
const { label
|
|
35
|
-
const {
|
|
36
|
-
const { categoryGroups, categoryViews, filterCount, loading } = exploreState;
|
|
37
|
-
const { response: summaryResponse } = useSummary(); // Fetch summary.
|
|
26
|
+
const { trackingConfig } = config;
|
|
27
|
+
const { label } = entityConfig;
|
|
28
|
+
const { categoryGroups, categoryViews, loading } = exploreState;
|
|
38
29
|
useEntityList(props); // Fetch entities.
|
|
39
30
|
const { entityListType } = props;
|
|
40
31
|
const categoryFilters = useMemo(() => buildCategoryFilters(categoryViews, categoryGroups), [categoryGroups, categoryViews]);
|
|
@@ -47,12 +38,6 @@ export const ExploreView = (props) => {
|
|
|
47
38
|
dispatch: exploreDispatch,
|
|
48
39
|
state: buildStateSyncManagerContext(exploreState, props),
|
|
49
40
|
});
|
|
50
|
-
/**
|
|
51
|
-
* Closes filter drawer.
|
|
52
|
-
*/
|
|
53
|
-
const onCloseDrawer = () => {
|
|
54
|
-
setIsDrawerOpen(false);
|
|
55
|
-
};
|
|
56
41
|
/**
|
|
57
42
|
* Callback fired when selected state of a category value is toggled.
|
|
58
43
|
* @param fromSearchAll - Indication if the filter was originated from the search all field.
|
|
@@ -92,12 +77,6 @@ export const ExploreView = (props) => {
|
|
|
92
77
|
});
|
|
93
78
|
}
|
|
94
79
|
};
|
|
95
|
-
/**
|
|
96
|
-
* Opens filter drawer.
|
|
97
|
-
*/
|
|
98
|
-
const onOpenDrawer = () => {
|
|
99
|
-
setIsDrawerOpen(true);
|
|
100
|
-
};
|
|
101
80
|
/**
|
|
102
81
|
* Dispatch a SelectedEntityType action when entityListType changes.
|
|
103
82
|
*/
|
|
@@ -112,14 +91,14 @@ export const ExploreView = (props) => {
|
|
|
112
91
|
});
|
|
113
92
|
}
|
|
114
93
|
}, [entityListType, exploreDispatch]);
|
|
115
|
-
return (React.createElement(
|
|
116
|
-
categoryViews && !!categoryViews.length && (React.createElement(Sidebar,
|
|
94
|
+
return (React.createElement(DrawerProvider, null,
|
|
95
|
+
categoryViews && !!categoryViews.length && (React.createElement(Sidebar, null,
|
|
117
96
|
React.createElement(SidebarTools, { "data-testid": TEST_IDS.FILTER_CONTROLS },
|
|
118
97
|
React.createElement(SidebarLabel, { label: "Filters" }),
|
|
119
98
|
React.createElement(ClearAllFilters, null),
|
|
120
|
-
React.createElement(SearchAllFilters, { categoryViews: categoryViews,
|
|
121
|
-
React.createElement(Filters, { categoryFilters: categoryFilters,
|
|
122
|
-
React.createElement(IndexView, { className: props.className, categoryFilters: categoryFilters, entityListType: entityListType, entityName: label, loading: loading
|
|
99
|
+
React.createElement(SearchAllFilters, { categoryViews: categoryViews, onFilter: onFilterChange.bind(null, true) })),
|
|
100
|
+
React.createElement(Filters, { categoryFilters: categoryFilters, onFilter: onFilterChange.bind(null, false), trackFilterOpened: trackingConfig?.trackFilterOpened }))),
|
|
101
|
+
React.createElement(IndexView, { className: props.className, categoryFilters: categoryFilters, entityListType: entityListType, entityName: label, loading: loading })));
|
|
123
102
|
};
|
|
124
103
|
/**
|
|
125
104
|
* Builds the category views into category views grouped by the given category group configuration.
|
|
@@ -146,31 +125,3 @@ function buildCategoryFilters(categoryViews, categoryGroups) {
|
|
|
146
125
|
return accGroups;
|
|
147
126
|
}, []);
|
|
148
127
|
}
|
|
149
|
-
/**
|
|
150
|
-
* Optionally renders component config.
|
|
151
|
-
* @param componentsConfig - SubHero config.
|
|
152
|
-
* @param response - Response data.
|
|
153
|
-
* @returns components.
|
|
154
|
-
*/
|
|
155
|
-
function renderComponent(componentsConfig, response) {
|
|
156
|
-
if (!componentsConfig) {
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
return React.createElement(ComponentCreator, { components: componentsConfig, response: response });
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Renders Summaries component when all the following requirements are fulfilled:
|
|
163
|
-
* - defined summary config,
|
|
164
|
-
* - valid summary response, and
|
|
165
|
-
* - defined summaries transformed from the given summary response.
|
|
166
|
-
* @param summaryConfig - Summary config.
|
|
167
|
-
* @param summaryResponse - Response model return from summary API.
|
|
168
|
-
* @returns rendered Summaries component.
|
|
169
|
-
*/
|
|
170
|
-
function renderSummary(summaryConfig, summaryResponse) {
|
|
171
|
-
if (!summaryConfig || !summaryResponse) {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
/* Render the Summaries component. */
|
|
175
|
-
return (React.createElement(ComponentCreator, { components: summaryConfig.components, response: summaryResponse }));
|
|
176
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databiosphere/findable-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "38.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@observablehq/plot": "^0.6.17",
|
|
75
75
|
"@tanstack/match-sorter-utils": "^8.19.4",
|
|
76
76
|
"@tanstack/react-table": "^8.19.2",
|
|
77
|
-
"@tanstack/react-virtual": "^3.
|
|
77
|
+
"@tanstack/react-virtual": "^3.13.12",
|
|
78
78
|
"copy-to-clipboard": "3.3.1",
|
|
79
79
|
"isomorphic-dompurify": "^2.22.0",
|
|
80
80
|
"ky": "^1.7.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RowData, Table } from "@tanstack/react-table";
|
|
2
2
|
import { Attribute } from "../../../../common/entities";
|
|
3
|
-
import { LayoutSpacing } from "
|
|
3
|
+
import { LayoutSpacing } from "../../../../hooks/UseLayoutSpacing/types";
|
|
4
4
|
|
|
5
5
|
export interface ClassesProps<T extends RowData = Attribute> {
|
|
6
6
|
spacing?: LayoutSpacing;
|