@databiosphere/findable-ui 24.0.0 → 25.1.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 +51 -0
- package/lib/common/entities.d.ts +1 -0
- package/lib/components/DataDictionary/components/Entities/constants.d.ts +2 -2
- package/lib/components/DataDictionary/components/Entities/constants.js +1 -1
- package/lib/components/DataDictionary/components/Entities/entities.js +3 -3
- package/lib/components/DataDictionary/components/Entity/constants.d.ts +2 -2
- package/lib/components/DataDictionary/components/Entity/constants.js +1 -1
- package/lib/components/DataDictionary/components/Entity/entity.js +4 -4
- package/lib/components/Export/components/ExportForm/exportForm.styles.d.ts +2 -2
- package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/NIHAccountExpiryWarning/nihAccountExpiryWarning.js +1 -1
- package/lib/components/Filter/components/ClearAllFilters/clearAllFilters.js +2 -1
- package/lib/components/Filter/components/Filter/filter.js +2 -1
- package/lib/components/Filter/components/FilterLabel/filterLabel.js +2 -2
- package/lib/components/Filter/components/FilterLabel/filterLabel.styles.d.ts +1 -1
- package/lib/components/Filter/components/Filters/filters.js +2 -1
- package/lib/components/Filter/components/HighlightedLabel/highlightedLabel.d.ts +3 -2
- package/lib/components/Filter/components/HighlightedLabel/highlightedLabel.js +2 -2
- package/lib/components/Filter/components/SearchAllFilters/components/VariableSizeListItem/variableSizeListItem.js +3 -2
- package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.js +2 -1
- package/lib/components/Filter/components/SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton.js +2 -2
- package/lib/components/Filter/components/VariableSizeListItem/variableSizeListItem.js +3 -2
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.js +17 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.styles.d.ts +13 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.styles.js +12 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.d.ts +9 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.js +9 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.js +86 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.d.ts +105 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.js +196 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.js +7 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.styles.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.styles.js +29 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/constants.d.ts +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/constants.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/args.d.ts +4 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/args.js +70 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.d.ts +7 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.js +19 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/types.d.ts +6 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/types.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/constants.d.ts +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/constants.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/types.d.ts +7 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/types.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/useChartView.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/useChartView.js +11 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/args.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/args.js +96 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.d.ts +6 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.js +16 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/types.d.ts +6 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/types.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/utils.d.ts +14 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/utils.js +21 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/entityList.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/entityList.js +16 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/types.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/types.js +1 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.js +15 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.styles.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.styles.js +20 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.js +14 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/types.d.ts +13 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/types.js +5 -0
- package/lib/components/Index/components/EntitiesView/stories/entitiesView.stories.d.ts +8 -0
- package/lib/components/Index/components/EntitiesView/stories/entitiesView.stories.js +50 -0
- package/lib/components/Index/components/EntitiesView/types.d.ts +8 -0
- package/lib/components/Index/components/EntitiesView/types.js +1 -0
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.js +2 -1
- package/lib/components/Index/index.d.ts +2 -13
- package/lib/components/Index/index.js +6 -2
- package/lib/components/Index/index.stories.js +3 -2
- package/lib/components/Index/types.d.ts +12 -0
- package/lib/components/Index/types.js +1 -0
- package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.d.ts +1 -1
- package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.js +5 -4
- package/lib/components/Layout/components/BackPage/components/BackPageHero/stories/backPageHero.stories.d.ts +6 -0
- package/lib/components/Layout/components/BackPage/components/BackPageHero/stories/backPageHero.stories.js +18 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/authentication.js +3 -3
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.styles.d.ts +1 -1
- 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/Menu/components/Toolbar/toolbar.js +2 -2
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Menu/menu.js +2 -2
- 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/Actions/components/Search/components/SearchBar/searchBar.js +5 -3
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchBar/searchBar.styles.d.ts +5 -1
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchBar/searchBar.styles.js +4 -3
- package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationDrawer/navigationDrawer.js +2 -2
- package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenu/navigationMenu.js +2 -2
- package/lib/components/Layout/components/Sidebar/components/SidebarButton/sidebarButton.js +2 -2
- package/lib/components/Layout/components/Sidebar/components/SidebarDrawer/sidebarDrawer.js +2 -1
- package/lib/components/Layout/components/Sidebar/sidebar.js +4 -1
- package/lib/components/Loading/loading.d.ts +2 -1
- package/lib/components/Loading/loading.js +2 -2
- package/lib/components/Login/components/Button/button.styles.d.ts +1 -1
- package/lib/components/Login/components/Section/components/Consent/consent.js +3 -3
- package/lib/components/Login/components/Section/components/Consent/consent.styles.d.ts +1 -1
- package/lib/components/Login/components/Section/components/Consent/consent.styles.js +2 -2
- package/lib/components/Login/components/Section/components/Consent/types.d.ts +2 -2
- package/lib/components/NoResults/noResults.d.ts +1 -8
- package/lib/components/NoResults/noResults.js +9 -8
- package/lib/components/NoResults/noResults.styles.d.ts +2 -2
- package/lib/components/NoResults/noResults.styles.js +4 -2
- package/lib/components/NoResults/types.d.ts +8 -0
- package/lib/components/NoResults/types.js +1 -0
- package/lib/components/Plot/components/BarX/barX.d.ts +2 -0
- package/lib/components/Plot/components/BarX/barX.js +13 -0
- package/lib/components/Plot/components/BarX/types.d.ts +5 -0
- package/lib/components/Plot/components/BarX/types.js +1 -0
- package/lib/components/Stepper/components/Step/components/StepContent/stepContent.js +2 -2
- package/lib/components/Stepper/components/Step/components/StepContent/stepContent.styles.js +1 -1
- package/lib/components/Stepper/components/Step/step.styles.d.ts +1 -1
- package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.js +2 -2
- package/lib/components/Table/components/Pagination/pagination.js +6 -6
- package/lib/components/Table/components/PaginationSummary/paginationSummary.js +2 -1
- package/lib/components/Table/components/TableHead/tableHead.js +2 -2
- package/lib/components/Table/components/TableRows/tableRows.js +7 -3
- package/lib/components/Table/table.js +11 -11
- package/lib/components/TableCreator/tableCreator.js +1 -6
- package/lib/components/common/AnchorLink/anchorLink.js +2 -2
- package/lib/components/common/Breadcrumbs/breadcrumbs.js +2 -2
- package/lib/components/common/Breadcrumbs/typeGuard.d.ts +13 -0
- package/lib/components/common/Breadcrumbs/typeGuard.js +23 -0
- package/lib/components/common/Button/components/DropdownButton/dropdownButton.js +2 -2
- package/lib/components/common/Button/components/NavigationButton/navigationButton.js +2 -2
- package/lib/components/common/CopyToClipboard/copyToClipboard.js +2 -2
- package/lib/components/common/Dialog/components/DialogTitle/dialogTitle.js +2 -2
- package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.js +2 -2
- package/lib/components/common/Form/components/Input/input.styles.d.ts +1 -1
- package/lib/components/common/Form/components/Select/components/DropDownIcon/dropDownIcon.d.ts +2 -3
- package/lib/components/common/Form/components/Select/components/DropDownIcon/dropDownIcon.js +3 -3
- package/lib/components/common/Form/components/Select/select.js +1 -2
- package/lib/components/common/Form/components/Select/select.styles.d.ts +1 -1
- package/lib/components/common/Form/components/UploadFile/uploadFile.js +2 -2
- 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/LoginDialog/loginDialog.styles.js +1 -1
- package/lib/components/common/Paper/paper.d.ts +2 -1
- package/lib/components/common/Paper/paper.js +2 -2
- package/lib/components/common/Section/components/CollapsableSection/collapsableSection.js +2 -3
- package/lib/components/common/ToggleButtonGroup/hooks/UseToggleButtonGroup/hook.d.ts +2 -0
- package/lib/components/common/ToggleButtonGroup/hooks/UseToggleButtonGroup/hook.js +10 -0
- package/lib/components/types.d.ts +3 -0
- package/lib/config/entities.d.ts +2 -0
- package/lib/hooks/useCategoryFilter.js +1 -0
- package/lib/hooks/useResizeObserver.d.ts +2 -1
- package/lib/hooks/useResizeObserver.js +5 -2
- package/lib/styles/common/mui/palette.d.ts +47 -0
- package/lib/styles/common/mui/palette.js +47 -0
- package/lib/tests/testIds.d.ts +18 -0
- package/lib/tests/testIds.js +18 -0
- package/lib/theme/common/components.js +4 -0
- package/lib/theme/common/typography.d.ts +1 -1
- package/lib/theme/theme.js +5 -3
- package/lib/views/ExploreView/exploreView.js +6 -25
- package/package.json +6 -4
- package/src/common/entities.ts +1 -0
- package/src/components/DataDictionary/components/Entities/constants.ts +2 -2
- package/src/components/DataDictionary/components/Entities/entities.tsx +4 -4
- package/src/components/DataDictionary/components/Entity/constants.ts +2 -2
- package/src/components/DataDictionary/components/Entity/entity.tsx +6 -6
- package/src/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/NIHAccountExpiryWarning/nihAccountExpiryWarning.tsx +1 -1
- package/src/components/Filter/components/ClearAllFilters/clearAllFilters.tsx +7 -1
- package/src/components/Filter/components/Filter/filter.tsx +2 -0
- package/src/components/Filter/components/FilterLabel/filterLabel.tsx +2 -2
- package/src/components/Filter/components/Filters/filters.tsx +7 -1
- package/src/components/Filter/components/HighlightedLabel/highlightedLabel.tsx +4 -2
- package/src/components/Filter/components/SearchAllFilters/components/VariableSizeListItem/variableSizeListItem.tsx +14 -2
- package/src/components/Filter/components/SearchAllFilters/searchAllFilters.tsx +2 -0
- package/src/components/Filter/components/SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton.tsx +2 -2
- package/src/components/Filter/components/VariableSizeListItem/variableSizeListItem.tsx +14 -2
- package/src/components/Index/components/EntitiesView/components/ChartView/chartView.styles.ts +14 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/chartView.tsx +38 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.ts +13 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.ts +104 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.ts +229 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.styles.ts +30 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.tsx +16 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/constants.ts +1 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/args.ts +74 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.tsx +29 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/types.ts +9 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/constants.ts +1 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/types.ts +8 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/useChartView.ts +29 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/stories/args.ts +99 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.tsx +25 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/types.ts +7 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/utils.ts +26 -0
- package/src/components/Index/components/EntitiesView/components/EntityList/entityList.tsx +29 -0
- package/src/components/Index/components/EntitiesView/components/EntityList/types.ts +3 -0
- package/src/components/Index/components/EntitiesView/entitiesView.styles.ts +21 -0
- package/src/components/Index/components/EntitiesView/entitiesView.tsx +30 -0
- package/src/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.ts +15 -0
- package/src/components/Index/components/EntitiesView/hooks/UseEntitiesView/types.ts +16 -0
- package/src/components/Index/components/EntitiesView/stories/entitiesView.stories.tsx +76 -0
- package/src/components/Index/components/EntitiesView/types.ts +9 -0
- package/src/components/Index/components/Hero/components/ExportButton/exportButton.tsx +2 -0
- package/src/components/Index/index.stories.tsx +3 -2
- package/src/components/Index/index.tsx +15 -15
- package/src/components/Index/types.ts +13 -0
- package/src/components/Layout/components/BackPage/components/BackPageHero/backPageHero.tsx +19 -14
- package/src/components/Layout/components/BackPage/components/BackPageHero/stories/backPageHero.stories.tsx +24 -0
- package/src/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/authentication.tsx +3 -3
- package/src/components/Layout/components/Header/components/Content/components/Actions/components/Menu/components/Toolbar/toolbar.tsx +2 -2
- package/src/components/Layout/components/Header/components/Content/components/Actions/components/Menu/menu.tsx +2 -2
- package/src/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchBar/searchBar.styles.ts +8 -3
- package/src/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchBar/searchBar.tsx +5 -2
- package/src/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationDrawer/navigationDrawer.tsx +2 -2
- package/src/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenu/navigationMenu.tsx +2 -2
- package/src/components/Layout/components/Sidebar/components/SidebarButton/sidebarButton.tsx +2 -2
- package/src/components/Layout/components/Sidebar/components/SidebarDrawer/sidebarDrawer.tsx +2 -0
- package/src/components/Layout/components/Sidebar/sidebar.tsx +4 -1
- package/src/components/Loading/loading.tsx +11 -3
- package/src/components/Login/components/Section/components/Consent/consent.styles.ts +2 -2
- package/src/components/Login/components/Section/components/Consent/consent.tsx +4 -4
- package/src/components/Login/components/Section/components/Consent/types.ts +2 -2
- package/src/components/NoResults/noResults.styles.ts +4 -2
- package/src/components/NoResults/noResults.tsx +16 -22
- package/src/components/NoResults/types.ts +13 -0
- package/src/components/Plot/components/BarX/barX.tsx +20 -0
- package/src/components/Plot/components/BarX/types.ts +6 -0
- package/src/components/Stepper/components/Step/components/StepContent/stepContent.styles.ts +1 -1
- package/src/components/Stepper/components/Step/components/StepContent/stepContent.tsx +2 -2
- package/src/components/Support/components/SupportRequest/components/Dialog/dialog.tsx +2 -2
- package/src/components/Table/components/Pagination/pagination.tsx +6 -6
- package/src/components/Table/components/PaginationSummary/paginationSummary.tsx +2 -1
- package/src/components/Table/components/TableHead/tableHead.tsx +2 -2
- package/src/components/Table/components/TableRows/tableRows.tsx +10 -3
- package/src/components/Table/table.tsx +42 -38
- package/src/components/TableCreator/tableCreator.tsx +8 -18
- package/src/components/common/AnchorLink/anchorLink.tsx +2 -2
- package/src/components/common/Breadcrumbs/breadcrumbs.tsx +2 -2
- package/src/components/common/Breadcrumbs/typeGuard.ts +24 -0
- package/src/components/common/Button/components/DropdownButton/dropdownButton.tsx +2 -2
- package/src/components/common/Button/components/NavigationButton/navigationButton.tsx +2 -2
- package/src/components/common/CopyToClipboard/copyToClipboard.tsx +2 -2
- package/src/components/common/Dialog/components/DialogTitle/dialogTitle.tsx +2 -2
- package/src/components/common/Drawer/components/DrawerTitle/drawerTitle.tsx +2 -2
- package/src/components/common/Form/components/Select/components/DropDownIcon/dropDownIcon.tsx +5 -6
- package/src/components/common/Form/components/Select/select.tsx +1 -8
- package/src/components/common/Form/components/UploadFile/uploadFile.tsx +2 -2
- package/src/components/common/LoginDialog/loginDialog.styles.ts +1 -1
- package/src/components/common/Paper/paper.tsx +9 -3
- package/src/components/common/Section/components/CollapsableSection/collapsableSection.tsx +2 -3
- package/src/components/common/ToggleButtonGroup/hooks/UseToggleButtonGroup/hook.ts +17 -0
- package/src/components/types.ts +4 -0
- package/src/config/entities.ts +2 -0
- package/src/hooks/useCategoryFilter.ts +1 -0
- package/src/hooks/useResizeObserver.ts +5 -2
- package/src/styles/common/mui/palette.ts +47 -0
- package/src/tests/testIds.ts +18 -0
- package/src/theme/common/components.ts +4 -0
- package/src/theme/common/typography.ts +1 -1
- package/src/theme/theme.ts +46 -42
- package/src/views/ExploreView/exploreView.tsx +10 -43
- package/tests/chart.test.tsx +170 -0
- package/tests/chartView.test.tsx +36 -0
- package/tests/entitiesView.test.tsx +32 -0
- package/tests/setup.ts +13 -0
- package/types/data-explorer-ui.d.ts +36 -80
- package/lib/components/Index/components/Cell/cell.d.ts +0 -7
- package/lib/components/Index/components/Cell/cell.js +0 -10
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.d.ts +0 -8
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.js +0 -57
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.styles.d.ts +0 -4
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.styles.js +0 -10
- package/lib/components/Index/components/NTag/nTag.d.ts +0 -10
- package/lib/components/Index/components/NTag/nTag.js +0 -8
- package/lib/components/Index/components/NTagCell/nTagCell.d.ts +0 -11
- package/lib/components/Index/components/NTagCell/nTagCell.js +0 -29
- package/lib/components/Index/components/NTagCell/nTagCell.stories.d.ts +0 -16
- package/lib/components/Index/components/NTagCell/nTagCell.stories.js +0 -16
- package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.d.ts +0 -6
- package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.js +0 -10
- package/lib/components/TableCreator/tableCreator.styles.d.ts +0 -4
- package/lib/components/TableCreator/tableCreator.styles.js +0 -4
- package/src/components/Index/components/Cell/cell.tsx +0 -22
- package/src/components/Index/components/NTag/components/Tooltip/tooltip.styles.ts +0 -11
- package/src/components/Index/components/NTag/components/Tooltip/tooltip.tsx +0 -90
- package/src/components/Index/components/NTag/nTag.tsx +0 -25
- package/src/components/Index/components/NTagCell/nTagCell.stories.tsx +0 -22
- package/src/components/Index/components/NTagCell/nTagCell.tsx +0 -74
- package/src/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.tsx +0 -16
- package/src/components/TableCreator/tableCreator.styles.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [25.1.0](https://github.com/DataBiosphere/findable-ui/compare/v25.0.0...v25.1.0) (2025-04-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add test ids to key testable components ([#401](https://github.com/DataBiosphere/findable-ui/issues/401)) ([#403](https://github.com/DataBiosphere/findable-ui/issues/403)) ([99a41f8](https://github.com/DataBiosphere/findable-ui/commit/99a41f8661d0794d20b4e610a24c9fe1b8fbc4f1))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* fix theme with deepmerge ([#399](https://github.com/DataBiosphere/findable-ui/issues/399)) ([#400](https://github.com/DataBiosphere/findable-ui/issues/400)) ([981d8f9](https://github.com/DataBiosphere/findable-ui/commit/981d8f9fb2a1acce20707d558c9880dc63af7485))
|
|
14
|
+
|
|
15
|
+
## [25.0.0](https://github.com/DataBiosphere/findable-ui/compare/v24.0.0...v25.0.0) (2025-04-11)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### ⚠ BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
* refactor filtersummary to chartview ([#395](https://github.com/DataBiosphere/findable-ui/issues/395)) (#396)
|
|
21
|
+
* implement filter summary view charts ([#390](https://github.com/DataBiosphere/findable-ui/issues/390)) (#391)
|
|
22
|
+
* add css variables to theme ([#392](https://github.com/DataBiosphere/findable-ui/issues/392)) (#393)
|
|
23
|
+
* implement filter summary view toggle ([#377](https://github.com/DataBiosphere/findable-ui/issues/377)) (#389)
|
|
24
|
+
* update mui to latest version v7 ([#373](https://github.com/DataBiosphere/findable-ui/issues/373)) (#375)
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* add css variables to theme ([#392](https://github.com/DataBiosphere/findable-ui/issues/392)) ([#393](https://github.com/DataBiosphere/findable-ui/issues/393)) ([9a04974](https://github.com/DataBiosphere/findable-ui/commit/9a049749c3ecc122dc86395eca5fa544a59f885b))
|
|
29
|
+
* implement filter summary view charts ([#390](https://github.com/DataBiosphere/findable-ui/issues/390)) ([#391](https://github.com/DataBiosphere/findable-ui/issues/391)) ([f679a0b](https://github.com/DataBiosphere/findable-ui/commit/f679a0b3a4910ebbd270f250dbc5c6cbe75a8257))
|
|
30
|
+
* implement filter summary view toggle ([#377](https://github.com/DataBiosphere/findable-ui/issues/377)) ([#389](https://github.com/DataBiosphere/findable-ui/issues/389)) ([87882f2](https://github.com/DataBiosphere/findable-ui/commit/87882f2d719d6d12748a795dce97f80e89e8a2ef))
|
|
31
|
+
* update backpagehero props to take breadcrumbs as reactnode ([#371](https://github.com/DataBiosphere/findable-ui/issues/371)) ([#372](https://github.com/DataBiosphere/findable-ui/issues/372)) ([d53947a](https://github.com/DataBiosphere/findable-ui/commit/d53947a70d7957f19e9770d3174630bc5b402ce8))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* add dropdownicon to muiselect default props ([#356](https://github.com/DataBiosphere/findable-ui/issues/356)) ([#384](https://github.com/DataBiosphere/findable-ui/issues/384)) ([de68df4](https://github.com/DataBiosphere/findable-ui/commit/de68df4804f58deaf4d3c8caebafbdc5f88b2884))
|
|
37
|
+
* fix ci test failure 'textencoder is not defined' ([#381](https://github.com/DataBiosphere/findable-ui/issues/381)) ([#382](https://github.com/DataBiosphere/findable-ui/issues/382)) ([0f301b7](https://github.com/DataBiosphere/findable-ui/commit/0f301b7176f65219d9c7484a7cb735ff8b12fdb5))
|
|
38
|
+
* fix Jest ESM Transformation Issue for @mui/icons-material ([#352](https://github.com/DataBiosphere/findable-ui/issues/352)) ([#353](https://github.com/DataBiosphere/findable-ui/issues/353)) ([b812371](https://github.com/DataBiosphere/findable-ui/commit/b812371ed47ecddf32b1eeec18e8e846eee52ae4))
|
|
39
|
+
* fix search bar position when a banner is displayed ([#369](https://github.com/DataBiosphere/findable-ui/issues/369)) ([#370](https://github.com/DataBiosphere/findable-ui/issues/370)) ([c7d476c](https://github.com/DataBiosphere/findable-ui/commit/c7d476cd4db90ecdcd77ad5da774c669b2c04e6b))
|
|
40
|
+
* update 'renew your account' link ([#385](https://github.com/DataBiosphere/findable-ui/issues/385)) ([#386](https://github.com/DataBiosphere/findable-ui/issues/386)) ([ecf0ce3](https://github.com/DataBiosphere/findable-ui/commit/ecf0ce346811ac3a00a64863e9397ff0bf5691c4))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Chores
|
|
44
|
+
|
|
45
|
+
* update mui to latest version v7 ([#373](https://github.com/DataBiosphere/findable-ui/issues/373)) ([#375](https://github.com/DataBiosphere/findable-ui/issues/375)) ([b395861](https://github.com/DataBiosphere/findable-ui/commit/b395861d631fa1f744ba8d6e008baa5507e249bd))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Code Refactoring
|
|
49
|
+
|
|
50
|
+
* refactor filtersummary to chartview ([#395](https://github.com/DataBiosphere/findable-ui/issues/395)) ([#396](https://github.com/DataBiosphere/findable-ui/issues/396)) ([458ad99](https://github.com/DataBiosphere/findable-ui/commit/458ad9915fe6e9231a3ecb2f00bde688a3305873))
|
|
51
|
+
* refactor list to a jsx element instead of an evaluated function ([#378](https://github.com/DataBiosphere/findable-ui/issues/378)) ([#379](https://github.com/DataBiosphere/findable-ui/issues/379)) ([4a13192](https://github.com/DataBiosphere/findable-ui/commit/4a131926d312a685eab828e125d375656ce56c52))
|
|
52
|
+
* remove deprecated components from index component tree ([#387](https://github.com/DataBiosphere/findable-ui/issues/387)) ([#388](https://github.com/DataBiosphere/findable-ui/issues/388)) ([9725293](https://github.com/DataBiosphere/findable-ui/commit/9725293f0320964d92141c0fe8030dffece5ae03))
|
|
53
|
+
|
|
3
54
|
## [24.0.0](https://github.com/DataBiosphere/findable-ui/compare/v23.0.0...v24.0.0) (2025-03-28)
|
|
4
55
|
|
|
5
56
|
|
package/lib/common/entities.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GridProps } from "@mui/material";
|
|
2
2
|
export declare const ENTITIES_ROW_GAP = 8;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const GRID_PROPS: GridProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Grid } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Entity } from "../Entity/entity";
|
|
4
|
-
import {
|
|
4
|
+
import { GRID_PROPS } from "./constants";
|
|
5
5
|
export const Entities = ({ classes, spacing }) => {
|
|
6
|
-
return (React.createElement(
|
|
6
|
+
return (React.createElement(Grid, { ...GRID_PROPS }, classes.map((classData) => (React.createElement(Entity, { key: classData.key, class: classData, spacing: spacing })))));
|
|
7
7
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
1
|
+
import { GridProps } from "@mui/material";
|
|
2
|
+
export declare const GRID_PROPS: GridProps;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Grid, Typography } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { TYPOGRAPHY_PROPS } from "../../../../styles/common/mui/typography";
|
|
4
4
|
import { AnchorLink } from "../../../common/AnchorLink/anchorLink";
|
|
5
5
|
import { useTable } from "../Table/hook";
|
|
6
6
|
import { Table } from "../Table/table";
|
|
7
|
-
import {
|
|
7
|
+
import { GRID_PROPS } from "./constants";
|
|
8
8
|
import { StyledTypography } from "./entity.styles";
|
|
9
9
|
export const Entity = ({ class: classData, spacing, }) => {
|
|
10
10
|
const table = useTable(classData.attributes);
|
|
11
|
-
return (React.createElement(
|
|
12
|
-
React.createElement(
|
|
11
|
+
return (React.createElement(Grid, { ...GRID_PROPS, rowGap: 4 },
|
|
12
|
+
React.createElement(Grid, { ...GRID_PROPS, rowGap: 1 },
|
|
13
13
|
React.createElement(StyledTypography, { component: "h3", id: classData.key, variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_HEADING_SMALL, ...spacing },
|
|
14
14
|
classData.label,
|
|
15
15
|
" ",
|
|
@@ -2,12 +2,12 @@ import { ThemeProps } from "../../../../theme/theme";
|
|
|
2
2
|
export declare const margin: ({ theme }: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const FormControl: import("@emotion/styled").StyledComponent<import("@mui/material").FormControlOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
4
|
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
-
}, "style" | "className" | "classes" | "color" | "children" | "margin" | "sx" | "variant" | "error" | "disabled" | "required" | "size" | "
|
|
5
|
+
}, "style" | "className" | "classes" | "color" | "children" | "margin" | "sx" | "variant" | "error" | "disabled" | "required" | "size" | "fullWidth" | "hiddenLabel" | "focused"> & {
|
|
6
6
|
theme?: import("@emotion/react").Theme;
|
|
7
7
|
}, {}, {}>;
|
|
8
8
|
export declare const TableFormControl: import("@emotion/styled").StyledComponent<import("@mui/material").FormControlOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
9
|
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
-
}, "style" | "className" | "classes" | "color" | "children" | "margin" | "sx" | "variant" | "error" | "disabled" | "required" | "size" | "
|
|
10
|
+
}, "style" | "className" | "classes" | "color" | "children" | "margin" | "sx" | "variant" | "error" | "disabled" | "required" | "size" | "fullWidth" | "hiddenLabel" | "focused"> & {
|
|
11
11
|
theme?: import("@emotion/react").Theme;
|
|
12
12
|
}, {}, {}>;
|
|
13
13
|
export declare const GridPaper: import("@emotion/styled").StyledComponent<{
|
|
@@ -16,7 +16,7 @@ export const NIHAccountExpiryWarning = () => {
|
|
|
16
16
|
React.createElement("span", null,
|
|
17
17
|
"Please",
|
|
18
18
|
" ",
|
|
19
|
-
React.createElement(Link, { label: "renew your account", url: "https://support.terra.bio/hc/en-us/articles/
|
|
19
|
+
React.createElement(Link, { label: "renew your account", url: "https://support.terra.bio/hc/en-us/articles/19124069598235" }),
|
|
20
20
|
" ",
|
|
21
21
|
"link.")))) : null;
|
|
22
22
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { useExploreState } from "../../../../hooks/useExploreState";
|
|
3
3
|
import { ExploreActionKind } from "../../../../providers/exploreState";
|
|
4
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
4
5
|
import { ButtonTextPrimary } from "../../../common/Button/components/ButtonTextPrimary/buttonTextPrimary";
|
|
5
6
|
export const ClearAllFilters = () => {
|
|
6
7
|
const { exploreDispatch } = useExploreState();
|
|
@@ -10,5 +11,5 @@ export const ClearAllFilters = () => {
|
|
|
10
11
|
type: ExploreActionKind.ClearFilters,
|
|
11
12
|
});
|
|
12
13
|
};
|
|
13
|
-
return (React.createElement(ButtonTextPrimary, { onClick: onClearFilters }, "Clear All"));
|
|
14
|
+
return (React.createElement(ButtonTextPrimary, { "data-testid": TEST_IDS.CLEAR_ALL_FILTERS, onClick: onClearFilters }, "Clear All"));
|
|
14
15
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CloseRounded } from "@mui/icons-material";
|
|
2
2
|
import { Grow } from "@mui/material";
|
|
3
3
|
import React, { useState } from "react";
|
|
4
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
4
5
|
import { FilterLabel } from "../FilterLabel/filterLabel";
|
|
5
6
|
import { FilterMenu } from "../FilterMenu/filterMenu";
|
|
6
7
|
import { DrawerTransition } from "./components/DrawerTransition/drawerTransition";
|
|
@@ -49,7 +50,7 @@ export const Filter = ({ categorySection, categoryView, closeAncestor, isFilterD
|
|
|
49
50
|
};
|
|
50
51
|
return (React.createElement(React.Fragment, null,
|
|
51
52
|
React.createElement(FilterLabel, { annotation: categoryView.annotation, count: categoryView.values.length, disabled: categoryView.isDisabled, isOpen: isOpen, label: categoryView.label, onClick: onOpenFilter }),
|
|
52
|
-
React.createElement(FilterPopover, { anchorPosition: anchorPosition, anchorReference: "anchorPosition", marginThreshold: 0, onClose: onCloseFilters, open: isOpen, slotProps: slotProps, TransitionComponent: TransitionComponent, transitionDuration: TransitionDuration },
|
|
53
|
+
React.createElement(FilterPopover, { anchorPosition: anchorPosition, anchorReference: "anchorPosition", "data-testid": TEST_IDS.FILTER_POPOVER, marginThreshold: 0, onClose: onCloseFilters, open: isOpen, slotProps: slotProps, TransitionComponent: TransitionComponent, transitionDuration: TransitionDuration },
|
|
53
54
|
isOpen && isFilterDrawer && (React.createElement(IconButton, { Icon: CloseRounded, onClick: onCloseFilters, size: "medium" })),
|
|
54
55
|
React.createElement(FilterMenu, { categorySection: categorySection, categoryKey: categoryView.key, categoryLabel: categoryView.label, isFilterDrawer: isFilterDrawer, onFilter: onFilter, onCloseFilter: onCloseFilter, values: categoryView.values })),
|
|
55
56
|
tags));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ArrowDropDownRounded } from "@mui/icons-material";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Tooltip } from "../../../DataDictionary/components/Tooltip/tooltip";
|
|
4
4
|
import { FilterLabel as Label } from "./filterLabel.styles";
|
|
5
5
|
export const FilterLabel = ({ annotation, count, disabled = false, isOpen, label, onClick, }) => {
|
|
6
6
|
const filterLabel = count ? `${label}\xa0(${count})` : label; // When the count is present, a non-breaking space is used to prevent it from being on its own line
|
|
7
7
|
return (React.createElement(Tooltip, { description: annotation?.description, title: annotation?.label },
|
|
8
|
-
React.createElement(Label, { color: "inherit", disabled: disabled, endIcon: React.createElement(
|
|
8
|
+
React.createElement(Label, { color: "inherit", disabled: disabled, endIcon: React.createElement(ArrowDropDownRounded, { fontSize: "small" }), fullWidth: true, isOpen: isOpen, onClick: onClick }, filterLabel)));
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ interface Props {
|
|
|
3
3
|
}
|
|
4
4
|
export declare const FilterLabel: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
5
5
|
ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
6
|
-
}, "style" | "className" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "href" | "action" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "
|
|
6
|
+
}, "style" | "className" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "href" | "action" | "loading" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "fullWidth" | "disableElevation" | "disableFocusRipple" | "endIcon" | "loadingIndicator" | "loadingPosition" | "startIcon"> & {
|
|
7
7
|
theme?: import("@emotion/react").Theme;
|
|
8
8
|
} & Props, {}, {}>;
|
|
9
9
|
export {};
|
|
@@ -2,6 +2,7 @@ import { Divider } from "@mui/material";
|
|
|
2
2
|
import React, { Fragment, useEffect, useRef, useState } from "react";
|
|
3
3
|
import { BREAKPOINT_FN_NAME, useBreakpointHelper, } from "../../../../hooks/useBreakpointHelper";
|
|
4
4
|
import { useWindowResize } from "../../../../hooks/useWindowResize";
|
|
5
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
5
6
|
import { DESKTOP_SM } from "../../../../theme/common/breakpoints";
|
|
6
7
|
import { Filter } from "../Filter/filter";
|
|
7
8
|
import { FilterTags } from "../FilterTags/filterTags";
|
|
@@ -42,7 +43,7 @@ export const Filters = ({ categoryFilters, closeAncestor, disabled = false, onFi
|
|
|
42
43
|
useEffect(() => {
|
|
43
44
|
setHeight(calculateListHeight(windowHeight, filterListRef.current));
|
|
44
45
|
}, [windowHeight]);
|
|
45
|
-
return (React.createElement(FilterList, { disabled: disabled, height: height, ref: filterListRef }, categoryFilters.map(({ categoryViews, label }, i) => (React.createElement(Fragment, { key: i },
|
|
46
|
+
return (React.createElement(FilterList, { "data-testid": TEST_IDS.FILTERS, disabled: disabled, height: height, ref: filterListRef }, categoryFilters.map(({ categoryViews, label }, i) => (React.createElement(Fragment, { key: i },
|
|
46
47
|
i !== 0 && React.createElement(Divider, null),
|
|
47
48
|
label && React.createElement(CategoryViewsLabel, null, label),
|
|
48
49
|
categoryViews.map((categoryView) => (React.createElement(Filter, { key: categoryView.key, categorySection: label, categoryView: categoryView, closeAncestor: closeAncestor, isFilterDrawer: isFilterDrawer, onFilter: onFilter, trackFilterOpened: trackFilterOpened, tags: renderFilterTags(categoryView, onFilter) }))))))));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { TestIdProps } from "../../../types";
|
|
1
2
|
import { FilterMenuSearchMatchRange } from "../../common/entities";
|
|
2
|
-
interface HighlightedLabelProps {
|
|
3
|
+
interface HighlightedLabelProps extends TestIdProps {
|
|
3
4
|
label: string;
|
|
4
5
|
ranges?: FilterMenuSearchMatchRange[];
|
|
5
6
|
}
|
|
6
|
-
export declare const HighlightedLabel: ({ label, ranges, }: HighlightedLabelProps) => JSX.Element;
|
|
7
|
+
export declare const HighlightedLabel: ({ label, ranges, testId, }: HighlightedLabelProps) => JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MatchHighlight } from "./highlightedLabel.styles";
|
|
3
|
-
export const HighlightedLabel = ({ label, ranges, }) => {
|
|
3
|
+
export const HighlightedLabel = ({ label, ranges, testId, }) => {
|
|
4
4
|
const items = [];
|
|
5
5
|
if (ranges) {
|
|
6
6
|
ranges = ranges.slice().sort(({ start: a }, { start: b }) => a - b);
|
|
@@ -29,5 +29,5 @@ export const HighlightedLabel = ({ label, ranges, }) => {
|
|
|
29
29
|
else {
|
|
30
30
|
items.push(label);
|
|
31
31
|
}
|
|
32
|
-
return React.createElement("span",
|
|
32
|
+
return React.createElement("span", { "data-testid": testId }, items);
|
|
33
33
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Checkbox, ListItemButton, ListItemText, ListSubheader, Typography, } from "@mui/material";
|
|
2
2
|
import React, { useEffect, useRef } from "react";
|
|
3
|
+
import { TEST_IDS } from "../../../../../../tests/testIds";
|
|
3
4
|
import { TEXT_BODY_SMALL_400 } from "../../../../../../theme/common/typography";
|
|
4
5
|
import { CheckedIcon } from "../../../../../common/CustomIcon/components/CheckedIcon/checkedIcon";
|
|
5
6
|
import { UncheckedIcon } from "../../../../../common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
|
|
@@ -18,9 +19,9 @@ export default function VariableSizeListItem({ item, onFilter, onUpdateItemSizeB
|
|
|
18
19
|
}, [key, onUpdateItemSizeByItemKey]);
|
|
19
20
|
if (item.type === ITEM_TYPE.VALUE) {
|
|
20
21
|
const { categoryKey, matchRanges, value: { count, key: valueKey, label, selected }, } = item;
|
|
21
|
-
return (React.createElement(ListItemButton, { ref: setRef, key: key, onClick: () => onFilter(categoryKey, valueKey, !selected, undefined, searchTerm), selected: selected, style: style },
|
|
22
|
+
return (React.createElement(ListItemButton, { "data-testid": TEST_IDS.FILTER_ITEM, ref: setRef, key: key, onClick: () => onFilter(categoryKey, valueKey, !selected, undefined, searchTerm), selected: selected, style: style },
|
|
22
23
|
React.createElement(Checkbox, { checked: selected, checkedIcon: React.createElement(CheckedIcon, null), icon: React.createElement(UncheckedIcon, null) }),
|
|
23
|
-
React.createElement(ListItemText, { disableTypography: true, primary: React.createElement(HighlightedLabel, { label: label, ranges: matchRanges }), secondary: React.createElement(Typography, { color: "ink.light", variant: TEXT_BODY_SMALL_400 }, count) })));
|
|
24
|
+
React.createElement(ListItemText, { disableTypography: true, primary: React.createElement(HighlightedLabel, { label: label, ranges: matchRanges, testId: TEST_IDS.FILTER_TERM }), secondary: React.createElement(Typography, { color: "ink.light", "data-testid": TEST_IDS.FILTER_COUNT, variant: TEXT_BODY_SMALL_400 }, count) })));
|
|
24
25
|
}
|
|
25
26
|
else if (item.type === ITEM_TYPE.CATEGORY) {
|
|
26
27
|
return (React.createElement(ListSubheader, { key: key, ref: setRef, style: style }, item.categoryLabel));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { createContext, useContext, useEffect, useRef, useState, } from "react";
|
|
2
2
|
import { SELECTOR } from "../../../../common/selectors";
|
|
3
3
|
import { BREAKPOINT_FN_NAME, useBreakpointHelper, } from "../../../../hooks/useBreakpointHelper";
|
|
4
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
4
5
|
import { DESKTOP_SM } from "../../../../theme/common/breakpoints";
|
|
5
6
|
import { SearchCloseButton } from "../SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton";
|
|
6
7
|
import { SearchAllFiltersSearch } from "../SearchAllFiltersSearch/searchAllFiltersSearch";
|
|
@@ -85,7 +86,7 @@ export const SearchAllFilters = ({ categoryViews, drawerOpen = false, onFilter,
|
|
|
85
86
|
open,
|
|
86
87
|
searchTerm,
|
|
87
88
|
} },
|
|
88
|
-
React.createElement(Autocomplete, { clearOnBlur: desktopSmUp, filterOptions: (options) => options, freeSolo: true, ListboxComponent: Listbox, onBlur: desktopSmUp ? onCloseSearch : undefined, onClose: desktopSmUp ? onCloseSearch : undefined, onFocus: onOpenSearch, onOpen: onOpen, open: open, options: [""], PopperComponent: AutocompletePopper, ref: autocompleteRef, renderInput: (props) => renderInput({
|
|
89
|
+
React.createElement(Autocomplete, { clearOnBlur: desktopSmUp, "data-testid": TEST_IDS.SEARCH_ALL_FILTERS, filterOptions: (options) => options, freeSolo: true, ListboxComponent: Listbox, onBlur: desktopSmUp ? onCloseSearch : undefined, onClose: desktopSmUp ? onCloseSearch : undefined, onFocus: onOpenSearch, onOpen: onOpen, open: open, options: [""], PopperComponent: AutocompletePopper, ref: autocompleteRef, renderInput: (props) => renderInput({
|
|
89
90
|
...props,
|
|
90
91
|
InputProps: {
|
|
91
92
|
...props.InputProps,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CloseRounded } from "@mui/icons-material";
|
|
2
2
|
import { IconButton } from "@mui/material";
|
|
3
3
|
import React, { Fragment, useContext } from "react";
|
|
4
4
|
import { BREAKPOINT_FN_NAME, useBreakpointHelper, } from "../../../../../../hooks/useBreakpointHelper";
|
|
@@ -10,5 +10,5 @@ export const SearchCloseButton = () => {
|
|
|
10
10
|
const showButton = open && (desktopSmDown || searchTerm);
|
|
11
11
|
const onClickFn = desktopSmDown ? onCloseSearch : onClearSearch;
|
|
12
12
|
return (React.createElement(Fragment, null, showButton && (React.createElement(IconButton, { onClick: onClickFn, size: "large" },
|
|
13
|
-
React.createElement(
|
|
13
|
+
React.createElement(CloseRounded, { fontSize: "small" })))));
|
|
14
14
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Checkbox, ListItemButton, ListItemText, Typography, } from "@mui/material";
|
|
2
2
|
import React, { useEffect, useRef } from "react";
|
|
3
3
|
import { SELECT_CATEGORY_KEY } from "../../../../providers/exploreState/constants";
|
|
4
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
4
5
|
import { TEXT_BODY_SMALL_400 } from "../../../../theme/common/typography";
|
|
5
6
|
import { CheckedIcon } from "../../../common/CustomIcon/components/CheckedIcon/checkedIcon";
|
|
6
7
|
import { UncheckedIcon } from "../../../common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
|
|
@@ -16,7 +17,7 @@ export default function VariableSizeListItem({ categoryKey, categorySection, mat
|
|
|
16
17
|
const handleItemClicked = () => {
|
|
17
18
|
onFilter(categoryKey, key, !selected, categorySection);
|
|
18
19
|
};
|
|
19
|
-
return (React.createElement(ListItemButton, { ref: listItemRef, onClick: handleItemClicked, selected: selected, style: style },
|
|
20
|
+
return (React.createElement(ListItemButton, { "data-testid": TEST_IDS.FILTER_ITEM, ref: listItemRef, onClick: handleItemClicked, selected: selected, style: style },
|
|
20
21
|
React.createElement(Checkbox, { checked: selected, checkedIcon: React.createElement(CheckedIcon, null), icon: React.createElement(UncheckedIcon, null) }),
|
|
21
|
-
React.createElement(ListItemText, { disableTypography: true, primary: React.createElement(HighlightedLabel, { label: label, ranges: labelRanges }), secondary: categoryKey !== SELECT_CATEGORY_KEY.SAVED_FILTERS && (React.createElement(Typography, { color: "ink.light", variant: TEXT_BODY_SMALL_400 }, count)) })));
|
|
22
|
+
React.createElement(ListItemText, { disableTypography: true, primary: React.createElement(HighlightedLabel, { label: label, ranges: labelRanges, testId: TEST_IDS.FILTER_TERM }), secondary: categoryKey !== SELECT_CATEGORY_KEY.SAVED_FILTERS && (React.createElement(Typography, { color: "ink.light", "data-testid": TEST_IDS.FILTER_COUNT, variant: TEXT_BODY_SMALL_400 }, count)) })));
|
|
22
23
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Typography } from "@mui/material";
|
|
2
|
+
import React, { Fragment } from "react";
|
|
3
|
+
import { TYPOGRAPHY_PROPS } from "../../../../../../styles/common/mui/typography";
|
|
4
|
+
import { Loading, LOADING_PANEL_STYLE } from "../../../../../Loading/loading";
|
|
5
|
+
import { StyledGrid, StyledGridPaperSection } from "./chartView.styles";
|
|
6
|
+
import { Chart } from "./components/Chart/chart";
|
|
7
|
+
import { useChartView } from "./hooks/UseChartView/useChartView";
|
|
8
|
+
export const ChartView = ({ categoryFilters, loading, testId, }) => {
|
|
9
|
+
const { chartViewRef, selectCategoryViews, width } = useChartView(categoryFilters);
|
|
10
|
+
if (selectCategoryViews.length === 0)
|
|
11
|
+
return null;
|
|
12
|
+
return (React.createElement(Fragment, null,
|
|
13
|
+
React.createElement(Loading, { appear: false, autoPosition: false, loading: loading, panelStyle: LOADING_PANEL_STYLE.INHERIT }),
|
|
14
|
+
React.createElement(StyledGrid, { "data-testid": testId, ref: chartViewRef }, selectCategoryViews.map(({ key, label, values }) => (React.createElement(StyledGridPaperSection, { key: key },
|
|
15
|
+
React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_HEADING_SMALL }, label),
|
|
16
|
+
React.createElement(Chart, { selectCategoryValueViews: values, width: width })))))));
|
|
17
|
+
};
|
package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.styles.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const StyledGrid: import("@emotion/styled").StyledComponent<import("@mui/material").GridBaseProps & {
|
|
2
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme>;
|
|
3
|
+
} & import("@mui/system").SystemProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
+
}, ("fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textTransform" | "p" | "color" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontStyle" | "textAlign") | "sx" | keyof import("@mui/material").GridBaseProps> & {
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
7
|
+
}, {}, {}>;
|
|
8
|
+
export declare const StyledGridPaperSection: import("@emotion/styled").StyledComponent<{
|
|
9
|
+
theme?: import("@emotion/react").Theme;
|
|
10
|
+
as?: React.ElementType;
|
|
11
|
+
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
12
|
+
theme?: import("@emotion/react").Theme;
|
|
13
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
|
+
import { GridPaperSection } from "../../../../../common/Section/section.styles";
|
|
4
|
+
export const StyledGrid = styled(Grid) `
|
|
5
|
+
display: grid;
|
|
6
|
+
gap: inherit;
|
|
7
|
+
`;
|
|
8
|
+
export const StyledGridPaperSection = styled(GridPaperSection) `
|
|
9
|
+
&:last-of-type {
|
|
10
|
+
border-radius: inherit;
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const BAR_GAP = 40;
|
|
2
|
+
export declare const BAR_HEIGHT = 24;
|
|
3
|
+
export declare const DATA_FIELD: {
|
|
4
|
+
readonly COUNT: "count";
|
|
5
|
+
readonly LABEL: "label";
|
|
6
|
+
readonly SELECTED: "selected";
|
|
7
|
+
};
|
|
8
|
+
export declare const TEXT_PADDING = 8;
|
|
9
|
+
export declare const TICKS = 6;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as Plot from "@observablehq/plot";
|
|
2
|
+
import { PALETTE } from "../../../../../../../../../styles/common/mui/palette";
|
|
3
|
+
import { formatCountSize } from "../../../../../../../../../utils/formatCountSize";
|
|
4
|
+
import { DATA_FIELD, TEXT_PADDING } from "./constants";
|
|
5
|
+
import { getCategoryValueText, getCategoryValueTextFill, getColorRangeValue, getCountTextFill, getPlotHeight, getTicks, getXDomain, getYPaddingInner, getYPaddingOuter, isAnyValueSelected, renderText, } from "./utils";
|
|
6
|
+
export function getPlotOptions(selectCategoryValueViews, width) {
|
|
7
|
+
const isCategorySelected = isAnyValueSelected(selectCategoryValueViews);
|
|
8
|
+
return {
|
|
9
|
+
color: {
|
|
10
|
+
domain: [false, true], // false = unselected, true = selected.
|
|
11
|
+
legend: false,
|
|
12
|
+
range: [getColorRangeValue(isCategorySelected), PALETTE.PRIMARY_MAIN],
|
|
13
|
+
},
|
|
14
|
+
height: getPlotHeight(selectCategoryValueViews.length),
|
|
15
|
+
margin: 0,
|
|
16
|
+
marginBottom: 32,
|
|
17
|
+
marks: [
|
|
18
|
+
Plot.axisX({
|
|
19
|
+
className: "x-axis",
|
|
20
|
+
tickFormat: formatCountSize,
|
|
21
|
+
tickPadding: 8,
|
|
22
|
+
tickSize: 0,
|
|
23
|
+
ticks: getTicks(selectCategoryValueViews),
|
|
24
|
+
}),
|
|
25
|
+
Plot.gridX({
|
|
26
|
+
stroke: PALETTE.SMOKE_MAIN,
|
|
27
|
+
strokeOpacity: 1,
|
|
28
|
+
ticks: getTicks(selectCategoryValueViews),
|
|
29
|
+
}),
|
|
30
|
+
Plot.barX(selectCategoryValueViews, {
|
|
31
|
+
className: "x-bar",
|
|
32
|
+
fill: DATA_FIELD.SELECTED,
|
|
33
|
+
rx1: 0,
|
|
34
|
+
rx2: 4,
|
|
35
|
+
sort: { y: null },
|
|
36
|
+
x: DATA_FIELD.COUNT,
|
|
37
|
+
y: DATA_FIELD.LABEL,
|
|
38
|
+
}),
|
|
39
|
+
Plot.text(selectCategoryValueViews, {
|
|
40
|
+
className: "text-category-label",
|
|
41
|
+
dx: 16,
|
|
42
|
+
dy: -28,
|
|
43
|
+
fill: (d) => getCategoryValueTextFill(d, isCategorySelected),
|
|
44
|
+
lineWidth: width / 13, // "em" unit; font-size is 13px.
|
|
45
|
+
text: getCategoryValueText,
|
|
46
|
+
textAnchor: "start",
|
|
47
|
+
textOverflow: "ellipsis",
|
|
48
|
+
x: 0,
|
|
49
|
+
y: DATA_FIELD.LABEL,
|
|
50
|
+
}),
|
|
51
|
+
Plot.text(selectCategoryValueViews, {
|
|
52
|
+
className: "text-count",
|
|
53
|
+
dx: -TEXT_PADDING,
|
|
54
|
+
dy: -2,
|
|
55
|
+
fill: (d) => getCountTextFill(d, isCategorySelected),
|
|
56
|
+
fontWeight: 500,
|
|
57
|
+
lineHeight: 0.8125,
|
|
58
|
+
render: renderText,
|
|
59
|
+
text: DATA_FIELD.COUNT,
|
|
60
|
+
textAnchor: "end",
|
|
61
|
+
x: DATA_FIELD.COUNT,
|
|
62
|
+
y: DATA_FIELD.LABEL,
|
|
63
|
+
}),
|
|
64
|
+
],
|
|
65
|
+
style: {
|
|
66
|
+
dominantBaseline: "middle",
|
|
67
|
+
font: "inherit",
|
|
68
|
+
overflow: "visible",
|
|
69
|
+
},
|
|
70
|
+
width,
|
|
71
|
+
x: {
|
|
72
|
+
domain: getXDomain(selectCategoryValueViews),
|
|
73
|
+
grid: false,
|
|
74
|
+
label: null,
|
|
75
|
+
line: false,
|
|
76
|
+
},
|
|
77
|
+
y: {
|
|
78
|
+
label: null,
|
|
79
|
+
line: false,
|
|
80
|
+
paddingInner: getYPaddingInner(),
|
|
81
|
+
paddingOuter: getYPaddingOuter(),
|
|
82
|
+
tickFormat: () => "",
|
|
83
|
+
tickSize: 0,
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|