@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CloseRounded } from "@mui/icons-material";
|
|
2
2
|
import { IconButton, Toolbar as MToolbar } from "@mui/material";
|
|
3
3
|
import React, { Fragment, ReactNode } from "react";
|
|
4
4
|
import { ComponentsConfig } from "../../../../../../../../../../../../config/entities";
|
|
@@ -57,7 +57,7 @@ export const Toolbar = ({
|
|
|
57
57
|
{actions}
|
|
58
58
|
{/* Close menu */}
|
|
59
59
|
<IconButton color="ink" onClick={onClose}>
|
|
60
|
-
<
|
|
60
|
+
<CloseRounded />
|
|
61
61
|
</IconButton>
|
|
62
62
|
</Actions>
|
|
63
63
|
</Right>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { MenuRounded } from "@mui/icons-material";
|
|
2
2
|
import { Fade, IconButton, Dialog as MDialog } from "@mui/material";
|
|
3
3
|
import React, { CSSProperties, forwardRef, Fragment, useEffect } from "react";
|
|
4
4
|
import { getMenuNavigationLinks } from "../../../../../../common/utils";
|
|
@@ -47,7 +47,7 @@ export const Menu = forwardRef<HTMLButtonElement, MenuProps>(
|
|
|
47
47
|
return (
|
|
48
48
|
<Fragment>
|
|
49
49
|
<IconButton color="ink" onClick={openMenu} ref={ref} style={style}>
|
|
50
|
-
<
|
|
50
|
+
<MenuRounded />
|
|
51
51
|
</IconButton>
|
|
52
52
|
<MDialog
|
|
53
53
|
{...DIALOG_PROPS}
|
|
@@ -5,14 +5,19 @@ import {
|
|
|
5
5
|
smokeMain,
|
|
6
6
|
} from "../../../../../../../../../../../../styles/common/mixins/colors";
|
|
7
7
|
import { IconButton } from "../../../../../../../../../../../common/IconButton/iconButton";
|
|
8
|
-
import { HEADER_HEIGHT } from "../../../../../../../../common/constants";
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
interface Props {
|
|
10
|
+
yOffset: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const SearchBar = styled(Dialog, {
|
|
14
|
+
shouldForwardProp: (prop) => prop !== "yOffset",
|
|
15
|
+
})<Props>`
|
|
11
16
|
.MuiDialog-container {
|
|
12
17
|
width: 100%;
|
|
13
18
|
|
|
14
19
|
.MuiDialog-paper {
|
|
15
|
-
margin-top: ${
|
|
20
|
+
margin-top: ${(props) => props.yOffset}px;
|
|
16
21
|
}
|
|
17
22
|
}
|
|
18
23
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CloseRounded } from "@mui/icons-material";
|
|
2
2
|
import { useSearchParams } from "next/navigation";
|
|
3
3
|
import Router from "next/router";
|
|
4
4
|
import React, {
|
|
@@ -9,6 +9,7 @@ import React, {
|
|
|
9
9
|
useState,
|
|
10
10
|
} from "react";
|
|
11
11
|
import { isValidUrl } from "../../../../../../../../../../../../common/utils";
|
|
12
|
+
import { useLayoutDimensions } from "../../../../../../../../../../../../providers/layoutDimensions/hook";
|
|
12
13
|
import { ButtonPrimary } from "../../../../../../../../../../../common/Button/components/ButtonPrimary/buttonPrimary";
|
|
13
14
|
import { SearchIcon } from "../../../../../../../../../../../common/CustomIcon/components/SearchIcon/searchIcon";
|
|
14
15
|
import { isClientSideNavigation } from "../../../../../../../../../../../Links/common/utils";
|
|
@@ -33,6 +34,7 @@ export default function SearchBar({
|
|
|
33
34
|
searchOpen,
|
|
34
35
|
searchURL,
|
|
35
36
|
}: Props): JSX.Element {
|
|
37
|
+
const { dimensions } = useLayoutDimensions();
|
|
36
38
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
37
39
|
const searchParams = useSearchParams();
|
|
38
40
|
const [searchTerm, setSearchTerm] = useState<string>("");
|
|
@@ -108,6 +110,7 @@ export default function SearchBar({
|
|
|
108
110
|
open={searchOpen}
|
|
109
111
|
PaperProps={{ variant: "searchbar" }}
|
|
110
112
|
TransitionProps={{ onExited: handleExited }}
|
|
113
|
+
yOffset={dimensions.header.height - 1} // 1px border.
|
|
111
114
|
>
|
|
112
115
|
<SearchForm
|
|
113
116
|
onSubmit={(e: FormEvent<HTMLFormElement>): void =>
|
|
@@ -122,7 +125,7 @@ export default function SearchBar({
|
|
|
122
125
|
searchTerm ? (
|
|
123
126
|
<ClearButton
|
|
124
127
|
edge="end"
|
|
125
|
-
Icon={
|
|
128
|
+
Icon={CloseRounded}
|
|
126
129
|
onClick={handleClear}
|
|
127
130
|
size="small"
|
|
128
131
|
/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ArrowDropDownRounded } from "@mui/icons-material";
|
|
2
2
|
import React, { ReactNode, useCallback } from "react";
|
|
3
3
|
import { Button } from "../../../../../../../../../common/Button/button";
|
|
4
4
|
import { BackArrowIcon } from "../../../../../../../../../common/CustomIcon/components/BackArrowIcon/backArrowIcon";
|
|
@@ -43,7 +43,7 @@ export const NavigationDrawer = ({
|
|
|
43
43
|
return (
|
|
44
44
|
<>
|
|
45
45
|
<Button
|
|
46
|
-
EndIcon={
|
|
46
|
+
EndIcon={ArrowDropDownRounded}
|
|
47
47
|
onClick={onOpen}
|
|
48
48
|
variant={isSelected ? "activeNav" : "nav"}
|
|
49
49
|
>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ArrowDropDownRounded } from "@mui/icons-material";
|
|
2
2
|
import {
|
|
3
3
|
Grow,
|
|
4
4
|
ClickAwayListener as MClickAwayListener,
|
|
@@ -55,7 +55,7 @@ export const NavigationMenu = ({
|
|
|
55
55
|
return (
|
|
56
56
|
<MenuItem>
|
|
57
57
|
<Button
|
|
58
|
-
EndIcon={
|
|
58
|
+
EndIcon={ArrowDropDownRounded}
|
|
59
59
|
isActive={open}
|
|
60
60
|
onClick={onOpen}
|
|
61
61
|
variant={isSelected ? "activeNav" : "nav"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FilterListRounded } from "@mui/icons-material";
|
|
2
2
|
import React, { ReactNode } from "react";
|
|
3
3
|
import { Badge, SidebarButton as Button } from "./sidebarButton.styles";
|
|
4
4
|
|
|
@@ -18,7 +18,7 @@ export const SidebarButton = ({
|
|
|
18
18
|
}: SidebarButtonProps): JSX.Element => {
|
|
19
19
|
return (
|
|
20
20
|
<Button className={className} onClick={onClick} {...props}>
|
|
21
|
-
<
|
|
21
|
+
<FilterListRounded fontSize="small" />
|
|
22
22
|
{label}
|
|
23
23
|
{count > 0 && <Badge>{count}</Badge>}
|
|
24
24
|
</Button>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CloseRounded } from "@mui/icons-material";
|
|
2
2
|
import { PopoverPosition, PopoverProps } from "@mui/material";
|
|
3
3
|
import React, { ReactNode } from "react";
|
|
4
|
+
import { TEST_IDS } from "../../../../../../tests/testIds";
|
|
4
5
|
import { DrawerTransition } from "../../../../../Filter/components/Filter/components/DrawerTransition/drawerTransition";
|
|
5
6
|
import { IconButton, TemporarySidebar } from "./sidebarDrawer.styles";
|
|
6
7
|
|
|
@@ -25,6 +26,7 @@ export const SidebarDrawer = ({
|
|
|
25
26
|
<TemporarySidebar
|
|
26
27
|
anchorPosition={DEFAULT_POSITION}
|
|
27
28
|
anchorReference="anchorPosition"
|
|
29
|
+
data-testid={TEST_IDS.SIDEBAR_DRAWER}
|
|
28
30
|
hideBackdrop={false}
|
|
29
31
|
marginThreshold={0}
|
|
30
32
|
onClose={onDrawerClose}
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
BREAKPOINT_FN_NAME,
|
|
4
4
|
useBreakpointHelper,
|
|
5
5
|
} from "../../../../hooks/useBreakpointHelper";
|
|
6
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
6
7
|
import { DESKTOP_SM } from "../../../../theme/common/breakpoints";
|
|
7
8
|
import { SidebarDrawer } from "./components/SidebarDrawer/sidebarDrawer";
|
|
8
9
|
import { SidebarPositioner } from "./components/SidebarPositioner/sidebarPositioner";
|
|
@@ -26,7 +27,9 @@ export const Sidebar = ({
|
|
|
26
27
|
const controlledSidebar = typeof drawerOpen === "boolean";
|
|
27
28
|
const drawerSidebar = controlledSidebar && desktopSmDown; // Sidebar is "temporary" drawer when drawerOpen is defined and breakpoint is smaller than the breakpoint.
|
|
28
29
|
const Bar = drawerSidebar ? SidebarDrawer : PermanentSidebar;
|
|
29
|
-
const barProps = drawerSidebar
|
|
30
|
+
const barProps = drawerSidebar
|
|
31
|
+
? { drawerOpen, onDrawerClose }
|
|
32
|
+
: { "data-testid": TEST_IDS.SIDEBAR };
|
|
30
33
|
|
|
31
34
|
// Closes an open, controlled drawer sidebar with a change of breakpoint.
|
|
32
35
|
useEffect(() => {
|
|
@@ -21,7 +21,14 @@ export enum LOADING_PANEL_STYLE {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface LoadingProps {
|
|
24
|
-
appear
|
|
24
|
+
/* `appear`, if false, the component will not transition on the initial render and onEnter callbacks will not be called.
|
|
25
|
+
* In this instance, ensure the parent container is styled correctly with position relative.
|
|
26
|
+
*/
|
|
27
|
+
appear?: boolean;
|
|
28
|
+
/* `autoPosition`, if true, the loading component will automatically apply `position: relative` to its parent on enter and remove it on exit.
|
|
29
|
+
* False will disable this behavior, and the parent will need to be styled with `position: relative` manually.
|
|
30
|
+
*/
|
|
31
|
+
autoPosition?: boolean;
|
|
25
32
|
iconSize?: SvgIconProps["fontSize"];
|
|
26
33
|
loading: boolean;
|
|
27
34
|
panelStyle?: LoadingPanelStyle; // Enables loading to mirror parent container styles.
|
|
@@ -30,6 +37,7 @@ export interface LoadingProps {
|
|
|
30
37
|
|
|
31
38
|
export const Loading = ({
|
|
32
39
|
appear = true,
|
|
40
|
+
autoPosition = true,
|
|
33
41
|
iconSize = "large",
|
|
34
42
|
loading,
|
|
35
43
|
panelStyle = PAPER_PANEL_STYLE.ROUNDED,
|
|
@@ -40,8 +48,8 @@ export const Loading = ({
|
|
|
40
48
|
appear={appear}
|
|
41
49
|
in={loading}
|
|
42
50
|
mountOnEnter
|
|
43
|
-
onEnter={
|
|
44
|
-
onExited={
|
|
51
|
+
onEnter={autoPosition ? onFadeEnter : undefined}
|
|
52
|
+
onExited={autoPosition ? onFadeExited : undefined}
|
|
45
53
|
timeout={300}
|
|
46
54
|
unmountOnExit
|
|
47
55
|
>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const StyledGrid = styled(Grid)`
|
|
5
5
|
align-items: center;
|
|
6
6
|
align-self: flex-start;
|
|
7
7
|
display: flex;
|
|
@@ -5,7 +5,7 @@ import { CheckedIcon } from "../../../../../common/CustomIcon/components/Checked
|
|
|
5
5
|
import { UncheckedErrorIcon } from "../../../../../common/CustomIcon/components/UncheckedErrorIcon/uncheckedErrorIcon";
|
|
6
6
|
import { UncheckedIcon } from "../../../../../common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
|
|
7
7
|
import { BaseComponentProps } from "../../../../../types";
|
|
8
|
-
import {
|
|
8
|
+
import { StyledGrid } from "./consent.styles";
|
|
9
9
|
import { ConsentProps } from "./types";
|
|
10
10
|
|
|
11
11
|
export const Consent = ({
|
|
@@ -14,17 +14,17 @@ export const Consent = ({
|
|
|
14
14
|
handleConsent,
|
|
15
15
|
isDisabled,
|
|
16
16
|
isError,
|
|
17
|
-
...props /* Mui
|
|
17
|
+
...props /* Mui GridProps */
|
|
18
18
|
}: BaseComponentProps & ConsentProps): JSX.Element | null => {
|
|
19
19
|
if (isDisabled) return null;
|
|
20
20
|
return (
|
|
21
|
-
<
|
|
21
|
+
<StyledGrid className={className} {...props}>
|
|
22
22
|
<Checkbox
|
|
23
23
|
checkedIcon={<CheckedIcon />}
|
|
24
24
|
icon={isError ? <UncheckedErrorIcon /> : <UncheckedIcon />}
|
|
25
25
|
onChange={handleConsent}
|
|
26
26
|
/>
|
|
27
27
|
<Typography variant={TEXT_BODY_400}>{children}</Typography>
|
|
28
|
-
</
|
|
28
|
+
</StyledGrid>
|
|
29
29
|
);
|
|
30
30
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GridProps } from "@mui/material";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { UseUserConsent } from "../../../../hooks/useUserConsent/types";
|
|
4
4
|
|
|
5
5
|
export interface ConsentProps
|
|
6
|
-
extends
|
|
6
|
+
extends GridProps,
|
|
7
7
|
Pick<UseUserConsent, "handleConsent">,
|
|
8
8
|
Pick<UseUserConsent["state"], "isDisabled" | "isError"> {
|
|
9
9
|
children: ReactNode;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
|
+
import { white } from "../../styles/common/mixins/colors";
|
|
2
3
|
import { Section, SectionContent } from "../common/Section/section.styles";
|
|
3
4
|
|
|
4
|
-
export const
|
|
5
|
+
export const StyledSection = styled(Section)`
|
|
5
6
|
align-items: center;
|
|
7
|
+
background-color: ${white};
|
|
6
8
|
padding: 40px !important; /* Overrides section padding. */
|
|
7
9
|
`;
|
|
8
10
|
|
|
9
|
-
export const
|
|
11
|
+
export const StyledSectionContent = styled(SectionContent)`
|
|
10
12
|
max-width: 456px;
|
|
11
13
|
text-align: center;
|
|
12
14
|
`;
|
|
@@ -1,43 +1,37 @@
|
|
|
1
1
|
import { Typography } from "@mui/material";
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { Fragment } from "react";
|
|
3
|
+
import { TYPOGRAPHY_PROPS } from "../../styles/common/mui/typography";
|
|
3
4
|
import { SearchOffIcon } from "../common/CustomIcon/components/SearchOffIcon/searchOffIcon";
|
|
4
|
-
import {
|
|
5
|
-
FlatPaper,
|
|
6
|
-
FluidPaper,
|
|
7
|
-
RoundedPaper,
|
|
8
|
-
} from "../common/Paper/paper.styles";
|
|
9
5
|
import { SectionTitle } from "../common/Section/components/SectionTitle/sectionTitle";
|
|
10
6
|
import { SectionActions } from "../common/Section/section.styles";
|
|
11
7
|
import { PRIORITY, StatusIcon } from "../common/StatusIcon/statusIcon";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
export interface NoResultsProps {
|
|
15
|
-
actions?: ReactNode;
|
|
16
|
-
description?: string;
|
|
17
|
-
Paper?: typeof FlatPaper | typeof FluidPaper | typeof RoundedPaper;
|
|
18
|
-
title: string;
|
|
19
|
-
}
|
|
8
|
+
import { StyledSection, StyledSectionContent } from "./noResults.styles";
|
|
9
|
+
import { NoResultsProps } from "./types";
|
|
20
10
|
|
|
21
11
|
export const NoResults = ({
|
|
22
12
|
actions,
|
|
23
13
|
description,
|
|
24
|
-
Paper
|
|
14
|
+
Paper,
|
|
25
15
|
title,
|
|
26
16
|
}: NoResultsProps): JSX.Element => {
|
|
17
|
+
const StyledPaper = Paper ?? Fragment;
|
|
27
18
|
return (
|
|
28
|
-
<
|
|
29
|
-
<
|
|
19
|
+
<StyledPaper>
|
|
20
|
+
<StyledSection>
|
|
30
21
|
<StatusIcon priority={PRIORITY.LOW} StatusIcon={SearchOffIcon} />
|
|
31
|
-
<
|
|
22
|
+
<StyledSectionContent>
|
|
32
23
|
<SectionTitle title={title} />
|
|
33
24
|
{description && (
|
|
34
|
-
<Typography
|
|
25
|
+
<Typography
|
|
26
|
+
color={TYPOGRAPHY_PROPS.COLOR.INK_LIGHT}
|
|
27
|
+
variant={TYPOGRAPHY_PROPS.VARIANT.TEXT_BODY_400_2_LINES}
|
|
28
|
+
>
|
|
35
29
|
{description}
|
|
36
30
|
</Typography>
|
|
37
31
|
)}
|
|
38
|
-
</
|
|
32
|
+
</StyledSectionContent>
|
|
39
33
|
{actions && <SectionActions>{actions}</SectionActions>}
|
|
40
|
-
</
|
|
41
|
-
</
|
|
34
|
+
</StyledSection>
|
|
35
|
+
</StyledPaper>
|
|
42
36
|
);
|
|
43
37
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import {
|
|
3
|
+
FlatPaper,
|
|
4
|
+
FluidPaper,
|
|
5
|
+
RoundedPaper,
|
|
6
|
+
} from "../common/Paper/paper.styles";
|
|
7
|
+
|
|
8
|
+
export interface NoResultsProps {
|
|
9
|
+
actions?: ReactNode;
|
|
10
|
+
description?: string;
|
|
11
|
+
Paper: typeof FlatPaper | typeof FluidPaper | typeof RoundedPaper | null;
|
|
12
|
+
title: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as Plot from "@observablehq/plot";
|
|
2
|
+
import React, { useEffect, useRef } from "react";
|
|
3
|
+
import { BarXProps } from "./types";
|
|
4
|
+
|
|
5
|
+
export const BarX = ({
|
|
6
|
+
className,
|
|
7
|
+
options,
|
|
8
|
+
testId,
|
|
9
|
+
}: BarXProps): JSX.Element => {
|
|
10
|
+
const chartRef = useRef<HTMLDivElement>(null);
|
|
11
|
+
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (chartRef.current) chartRef.current.innerHTML = "";
|
|
14
|
+
const chart = Plot.plot(options);
|
|
15
|
+
chartRef.current?.appendChild(chart);
|
|
16
|
+
return (): void => chart.remove();
|
|
17
|
+
}, [options]);
|
|
18
|
+
|
|
19
|
+
return <div className={className} data-testid={testId} ref={chartRef} />;
|
|
20
|
+
};
|
|
@@ -6,7 +6,7 @@ import { sectionPadding } from "../../../../../common/Section/section.styles";
|
|
|
6
6
|
export const StyledStepContent = styled(StepContent)`
|
|
7
7
|
&.MuiStepContent-root {
|
|
8
8
|
.MuiCollapse-wrapperInner.MuiCollapse-vertical {
|
|
9
|
-
> .
|
|
9
|
+
> .MuiGrid-root {
|
|
10
10
|
${sectionPadding};
|
|
11
11
|
border-top: 1px solid ${smokeMain};
|
|
12
12
|
display: grid;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Grid, StepContentProps } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { BaseComponentProps } from "../../../../../types";
|
|
4
4
|
import { StyledStepContent } from "./stepContent.styles";
|
|
@@ -10,7 +10,7 @@ export const StepContent = ({
|
|
|
10
10
|
}: BaseComponentProps & StepContentProps): JSX.Element => {
|
|
11
11
|
return (
|
|
12
12
|
<StyledStepContent className={className} {...props}>
|
|
13
|
-
<
|
|
13
|
+
<Grid>{children}</Grid>
|
|
14
14
|
</StyledStepContent>
|
|
15
15
|
);
|
|
16
16
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CloseRounded } from "@mui/icons-material";
|
|
2
2
|
import React, {
|
|
3
3
|
Dispatch,
|
|
4
4
|
MouseEvent,
|
|
@@ -32,7 +32,7 @@ export const FormDialog = ({
|
|
|
32
32
|
return (
|
|
33
33
|
<>
|
|
34
34
|
<Fab color="primary" onClick={toggleOpen} open={open} size="medium">
|
|
35
|
-
{open ? <
|
|
35
|
+
{open ? <CloseRounded /> : <FeedbackIcon fontSize="medium" />}
|
|
36
36
|
</Fab>
|
|
37
37
|
<Popover
|
|
38
38
|
anchorEl={anchorEl}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import WestRoundedIcon from "@mui/icons-material/WestRounded";
|
|
1
|
+
import { EastRounded, WestRounded } from "@mui/icons-material";
|
|
3
2
|
import { Typography } from "@mui/material";
|
|
4
3
|
import React from "react";
|
|
4
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
5
5
|
import { IconButton } from "../../../common/IconButton/iconButton";
|
|
6
6
|
import { Stack } from "../../../common/Stack/stack";
|
|
7
7
|
import { Pagination as TablePagination } from "./pagination.styles";
|
|
@@ -24,8 +24,8 @@ export const Pagination = ({
|
|
|
24
24
|
totalPage,
|
|
25
25
|
}: PaginationProps): JSX.Element => {
|
|
26
26
|
return (
|
|
27
|
-
<TablePagination>
|
|
28
|
-
<div>
|
|
27
|
+
<TablePagination data-testid={TEST_IDS.TABLE_PAGINATION}>
|
|
28
|
+
<div data-testid={TEST_IDS.TABLE_PAGINATION_PAGE}>
|
|
29
29
|
<Typography variant="text-body-400">Page </Typography>
|
|
30
30
|
<Typography variant="text-body-500">
|
|
31
31
|
{currentPage} of {totalPage}
|
|
@@ -35,13 +35,13 @@ export const Pagination = ({
|
|
|
35
35
|
<IconButton
|
|
36
36
|
color="secondary"
|
|
37
37
|
disabled={!canPreviousPage}
|
|
38
|
-
Icon={
|
|
38
|
+
Icon={WestRounded}
|
|
39
39
|
onClick={onPreviousPage}
|
|
40
40
|
/>
|
|
41
41
|
<IconButton
|
|
42
42
|
color="secondary"
|
|
43
43
|
disabled={!canNextPage}
|
|
44
|
-
Icon={
|
|
44
|
+
Icon={EastRounded}
|
|
45
45
|
onClick={onNextPage}
|
|
46
46
|
/>
|
|
47
47
|
</Stack>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Fade, Typography } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
3
4
|
|
|
4
5
|
export interface PaginationSummaryProps {
|
|
5
6
|
firstResult: number;
|
|
@@ -14,7 +15,7 @@ export const PaginationSummary = ({
|
|
|
14
15
|
}: PaginationSummaryProps): JSX.Element => {
|
|
15
16
|
return (
|
|
16
17
|
<Fade in={totalResult > 0}>
|
|
17
|
-
<div>
|
|
18
|
+
<div data-testid={TEST_IDS.TABLE_PAGINATION_RESULTS}>
|
|
18
19
|
<Typography variant="text-body-400">Results </Typography>
|
|
19
20
|
<Typography variant="text-body-small-500">
|
|
20
21
|
{firstResult} - {lastResult}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SouthRounded } from "@mui/icons-material";
|
|
2
2
|
import {
|
|
3
3
|
TableHead as MTableHead,
|
|
4
4
|
TableRow as MTableRow,
|
|
@@ -42,7 +42,7 @@ export const TableHead = <T extends RowData>({
|
|
|
42
42
|
>
|
|
43
43
|
{shouldSortColumn(tableInstance, column) ? (
|
|
44
44
|
<TableSortLabel
|
|
45
|
-
IconComponent={
|
|
45
|
+
IconComponent={SouthRounded}
|
|
46
46
|
active={Boolean(getIsSorted())}
|
|
47
47
|
direction={getIsSorted() || undefined}
|
|
48
48
|
disabled={isSortDisabled(tableInstance)}
|
|
@@ -2,6 +2,7 @@ import { TableCell } from "@mui/material";
|
|
|
2
2
|
import { flexRender, Row, RowData } from "@tanstack/react-table";
|
|
3
3
|
import { Virtualizer } from "@tanstack/react-virtual";
|
|
4
4
|
import React, { Fragment } from "react";
|
|
5
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
5
6
|
import {
|
|
6
7
|
getTableCellAlign,
|
|
7
8
|
getTableCellPadding,
|
|
@@ -21,21 +22,27 @@ export const TableRows = <T extends RowData>({
|
|
|
21
22
|
return (
|
|
22
23
|
<Fragment>
|
|
23
24
|
{virtualItems.map((virtualRow) => {
|
|
24
|
-
const
|
|
25
|
+
const rowIndex = virtualRow.index;
|
|
26
|
+
const row = rows[rowIndex] as Row<T>;
|
|
25
27
|
const { getIsGrouped, getIsPreview } = row;
|
|
26
28
|
return (
|
|
27
29
|
<TableRow
|
|
28
30
|
key={row.id}
|
|
29
|
-
data-index={
|
|
31
|
+
data-index={rowIndex}
|
|
30
32
|
isGrouped={getIsGrouped()}
|
|
31
33
|
isPreview={getIsPreview()}
|
|
32
34
|
ref={virtualizer.measureElement}
|
|
33
35
|
>
|
|
34
|
-
{row.getVisibleCells().map((cell) => {
|
|
36
|
+
{row.getVisibleCells().map((cell, i) => {
|
|
35
37
|
if (cell.getIsAggregated()) return null; // Display of aggregated cells is currently not supported.
|
|
36
38
|
if (cell.getIsPlaceholder()) return null; // Display of placeholder cells is currently not supported.
|
|
37
39
|
return (
|
|
38
40
|
<TableCell
|
|
41
|
+
data-testid={
|
|
42
|
+
rowIndex === 0 && i === 0
|
|
43
|
+
? TEST_IDS.TABLE_FIRST_CELL
|
|
44
|
+
: undefined
|
|
45
|
+
}
|
|
39
46
|
key={cell.id}
|
|
40
47
|
align={getTableCellAlign(cell.column)}
|
|
41
48
|
padding={getTableCellPadding(cell.column.id)}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
Updater,
|
|
15
15
|
useReactTable,
|
|
16
16
|
} from "@tanstack/react-table";
|
|
17
|
-
import React, { useCallback, useEffect, useMemo } from "react";
|
|
17
|
+
import React, { Fragment, useCallback, useEffect, useMemo } from "react";
|
|
18
18
|
import { track } from "../../common/analytics/analytics";
|
|
19
19
|
import {
|
|
20
20
|
EVENT_NAME,
|
|
@@ -33,7 +33,7 @@ import { useScroll } from "../../hooks/useScroll";
|
|
|
33
33
|
import { ExploreActionKind } from "../../providers/exploreState";
|
|
34
34
|
import { DEFAULT_PAGINATION_STATE } from "../../providers/exploreState/initializer/constants";
|
|
35
35
|
import { TABLET } from "../../theme/common/breakpoints";
|
|
36
|
-
import {
|
|
36
|
+
import { Loading, LOADING_PANEL_STYLE } from "../Loading/loading";
|
|
37
37
|
import { NoResults } from "../NoResults/noResults";
|
|
38
38
|
import { getColumnTrackSizing } from "../TableCreator/options/columnTrackSizing/utils";
|
|
39
39
|
import { ROW_DIRECTION } from "./common/entities";
|
|
@@ -88,7 +88,7 @@ TableProps<T>): JSX.Element => {
|
|
|
88
88
|
entityPageState,
|
|
89
89
|
filterState,
|
|
90
90
|
listItems,
|
|
91
|
-
loading,
|
|
91
|
+
loading = false,
|
|
92
92
|
paginationState,
|
|
93
93
|
rowPreview,
|
|
94
94
|
tabValue,
|
|
@@ -285,43 +285,47 @@ TableProps<T>): JSX.Element => {
|
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
return noResults ? (
|
|
288
|
-
<NoResults Paper={
|
|
288
|
+
<NoResults Paper={null} title="No Results found" />
|
|
289
289
|
) : (
|
|
290
|
-
<
|
|
291
|
-
<
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
canNextPage={canNextPage()}
|
|
316
|
-
canPreviousPage={canPreviousPage()}
|
|
317
|
-
currentPage={currentPage}
|
|
318
|
-
onNextPage={handleTableNextPage}
|
|
319
|
-
onPreviousPage={handleTablePreviousPage}
|
|
320
|
-
totalPage={pages ?? 0}
|
|
290
|
+
<Fragment>
|
|
291
|
+
<TableToolbar
|
|
292
|
+
listView={listView}
|
|
293
|
+
rowDirection={rowDirection}
|
|
294
|
+
tableInstance={tableInstance}
|
|
295
|
+
/>
|
|
296
|
+
<Loading
|
|
297
|
+
appear={false}
|
|
298
|
+
autoPosition={false}
|
|
299
|
+
loading={loading}
|
|
300
|
+
panelStyle={LOADING_PANEL_STYLE.INHERIT}
|
|
301
|
+
/>
|
|
302
|
+
<TableContainer>
|
|
303
|
+
<GridTable
|
|
304
|
+
collapsable={true}
|
|
305
|
+
gridTemplateColumns={getColumnTrackSizing(getVisibleFlatColumns())}
|
|
306
|
+
>
|
|
307
|
+
<TableHead
|
|
308
|
+
rowDirection={rowDirection}
|
|
309
|
+
tableInstance={tableInstance}
|
|
310
|
+
/>
|
|
311
|
+
<TableBody
|
|
312
|
+
rows={rows}
|
|
313
|
+
rowDirection={rowDirection}
|
|
314
|
+
tableInstance={tableInstance}
|
|
321
315
|
/>
|
|
322
|
-
|
|
323
|
-
</
|
|
324
|
-
|
|
316
|
+
</GridTable>
|
|
317
|
+
</TableContainer>
|
|
318
|
+
{!disablePagination && (
|
|
319
|
+
<DXPagination
|
|
320
|
+
canNextPage={canNextPage()}
|
|
321
|
+
canPreviousPage={canPreviousPage()}
|
|
322
|
+
currentPage={currentPage}
|
|
323
|
+
onNextPage={handleTableNextPage}
|
|
324
|
+
onPreviousPage={handleTablePreviousPage}
|
|
325
|
+
totalPage={pages ?? 0}
|
|
326
|
+
/>
|
|
327
|
+
)}
|
|
328
|
+
</Fragment>
|
|
325
329
|
);
|
|
326
330
|
};
|
|
327
331
|
|