@databiosphere/findable-ui 25.0.0 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +56 -0
- package/lib/common/entities.d.ts +25 -0
- package/lib/components/DataDictionary/common/utils.js +10 -8
- package/lib/components/DataDictionary/components/Entities/entities.d.ts +1 -1
- package/lib/components/DataDictionary/components/Entities/entities.js +2 -2
- package/lib/components/DataDictionary/components/Entities/types.d.ts +3 -1
- package/lib/components/DataDictionary/components/Entity/entity.d.ts +1 -1
- package/lib/components/DataDictionary/components/Entity/entity.js +2 -2
- package/lib/components/DataDictionary/components/Entity/types.d.ts +3 -1
- package/lib/components/DataDictionary/components/Table/components/BasicCell/types.d.ts +1 -2
- package/lib/components/DataDictionary/components/Table/hook.d.ts +2 -2
- package/lib/components/DataDictionary/components/Table/hook.js +2 -3
- package/lib/components/DataDictionary/dataDictionary.js +2 -2
- package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.js +7 -2
- package/lib/components/DataDictionary/hooks/UseDataDictionary/types.d.ts +3 -1
- package/lib/components/Detail/components/Table/stories/args.d.ts +27 -0
- package/lib/components/Detail/components/Table/stories/args.js +100 -0
- package/lib/components/Detail/components/Table/stories/constants.d.ts +4 -0
- package/lib/components/Detail/components/Table/stories/constants.js +11 -0
- package/lib/components/Detail/components/Table/stories/filter/args.d.ts +5 -0
- package/lib/components/Detail/components/Table/stories/filter/args.js +50 -0
- package/lib/components/Detail/components/Table/stories/filter/filter.stories.d.ts +11 -0
- package/lib/components/Detail/components/Table/stories/filter/filter.stories.js +78 -0
- package/lib/components/Detail/components/Table/stories/table.stories.d.ts +6 -0
- package/lib/components/Detail/components/Table/stories/table.stories.js +19 -0
- package/lib/components/Detail/components/Table/table.js +2 -0
- package/lib/components/Export/components/ExportMethod/exportMethod.d.ts +2 -2
- package/lib/components/Export/components/ExportMethod/exportMethod.styles.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/FilterRange/constants.d.ts +8 -0
- package/lib/components/Filter/components/FilterRange/constants.js +27 -0
- package/lib/components/Filter/components/FilterRange/filterRange.d.ts +2 -0
- package/lib/components/Filter/components/FilterRange/filterRange.js +26 -0
- package/lib/components/Filter/components/FilterRange/filterRange.styles.d.ts +4 -0
- package/lib/components/Filter/components/FilterRange/filterRange.styles.js +66 -0
- package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/hook.d.ts +2 -0
- package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/hook.js +14 -0
- package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/types.d.ts +8 -0
- package/lib/components/Filter/components/FilterRange/stories/filterRange.stories.d.ts +6 -0
- package/lib/components/Filter/components/FilterRange/stories/filterRange.stories.js +9 -0
- package/lib/components/Filter/components/FilterRange/types.d.ts +8 -0
- package/lib/components/Filter/components/FilterRange/types.js +6 -0
- 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/searchAllFiltersSearch.styles.js +1 -2
- package/lib/components/Filter/components/VariableSizeListItem/variableSizeListItem.js +3 -2
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.d.ts +1 -1
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.js +5 -2
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.d.ts +2 -1
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.js +2 -1
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.js +10 -7
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.d.ts +6 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.js +4 -4
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.js +1 -2
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/args.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.js +0 -1
- package/lib/components/Index/components/EntitiesView/components/ChartView/types.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.d.ts +1 -1
- package/lib/components/Index/components/EntitiesView/entitiesView.js +3 -2
- package/lib/components/Index/components/EntitiesView/types.d.ts +2 -2
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.js +2 -1
- package/lib/components/Layout/components/Header/components/Content/components/Slogan/slogan.styles.d.ts +1 -1
- package/lib/components/Layout/components/Outline/outline.styles.js +1 -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.styles.js +2 -1
- package/lib/components/Login/components/Button/constants.js +2 -3
- package/lib/components/Login/components/Button/types.d.ts +1 -1
- package/lib/components/Login/components/Buttons/types.d.ts +1 -1
- package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.styles.js +4 -4
- package/lib/components/Support/components/ViewSupport/viewSupport.styles.js +2 -2
- package/lib/components/Table/columnDef/columnFilters/filterFn.d.ts +13 -0
- package/lib/components/Table/columnDef/columnFilters/filterFn.js +22 -0
- package/lib/components/Table/common/columnDef.js +2 -0
- package/lib/components/Table/common/utils.d.ts +1 -13
- package/lib/components/Table/common/utils.js +1 -23
- package/lib/components/Table/components/Pagination/pagination.js +3 -2
- package/lib/components/Table/components/PaginationSummary/paginationSummary.js +2 -1
- package/lib/components/Table/components/TableRows/tableRows.js +7 -3
- package/lib/components/Table/table.js +3 -1
- package/lib/components/TableCreator/tableCreator.js +12 -3
- package/lib/components/common/Button/components/ButtonOutline/buttonOutline.styles.js +7 -7
- package/lib/components/common/Button/constants.d.ts +2 -0
- package/lib/components/common/Button/constants.js +21 -0
- package/lib/components/common/LoginDialog/loginDialog.styles.js +2 -3
- package/lib/components/types.d.ts +3 -0
- package/lib/config/entities.d.ts +3 -3
- package/lib/config/utils.js +1 -1
- package/lib/hooks/useEntityList.js +2 -1
- package/lib/hooks/useEntityService.js +1 -1
- package/lib/hooks/useExploreMode/types.d.ts +6 -0
- package/lib/hooks/useExploreMode/types.js +6 -0
- package/lib/hooks/{useExploreMode.d.ts → useExploreMode/useExploreMode.d.ts} +1 -6
- package/lib/hooks/{useExploreMode.js → useExploreMode/useExploreMode.js} +1 -7
- package/lib/hooks/useFetchEntity.js +2 -1
- package/lib/styles/common/constants/colorMixes.d.ts +18 -0
- package/lib/styles/common/constants/colorMixes.js +19 -0
- package/lib/styles/common/constants/shadows.d.ts +5 -0
- package/lib/styles/common/constants/shadows.js +5 -0
- package/lib/styles/common/mui/button.d.ts +10 -2
- package/lib/styles/common/mui/button.js +12 -2
- package/lib/tests/mui/constants.d.ts +1 -0
- package/lib/tests/mui/constants.js +1 -0
- package/lib/tests/testIds.d.ts +19 -0
- package/lib/tests/testIds.js +19 -0
- package/lib/theme/common/components.d.ts +2 -3
- package/lib/theme/common/components.js +47 -51
- package/lib/theme/common/palette.d.ts +0 -44
- package/lib/theme/common/palette.js +27 -82
- package/lib/theme/common/shadows.d.ts +2 -28
- package/lib/theme/common/shadows.js +27 -32
- package/lib/theme/components/muiAlert.js +5 -5
- package/lib/theme/theme.js +7 -7
- package/lib/views/ExploreView/exploreView.js +4 -3
- package/package.json +4 -4
- package/src/common/entities.ts +30 -0
- package/src/components/DataDictionary/common/utils.ts +12 -8
- package/src/components/DataDictionary/components/Entities/entities.tsx +11 -2
- package/src/components/DataDictionary/components/Entities/types.ts +3 -1
- package/src/components/DataDictionary/components/Entity/entity.tsx +2 -1
- package/src/components/DataDictionary/components/Entity/types.ts +3 -1
- package/src/components/DataDictionary/components/Table/components/BasicCell/types.ts +1 -2
- package/src/components/DataDictionary/components/Table/hook.ts +6 -4
- package/src/components/DataDictionary/dataDictionary.tsx +2 -2
- package/src/components/DataDictionary/hooks/UseDataDictionary/hook.ts +8 -2
- package/src/components/DataDictionary/hooks/UseDataDictionary/types.ts +3 -1
- package/src/components/Detail/components/Table/stories/args.ts +104 -0
- package/src/components/Detail/components/Table/stories/constants.ts +15 -0
- package/src/components/Detail/components/Table/stories/filter/args.ts +54 -0
- package/src/components/Detail/components/Table/stories/filter/filter.stories.tsx +90 -0
- package/src/components/Detail/components/Table/stories/table.stories.tsx +32 -0
- package/src/components/Detail/components/Table/table.tsx +2 -0
- package/src/components/Export/components/ExportMethod/exportMethod.styles.ts +1 -1
- package/src/components/Export/components/ExportMethod/exportMethod.tsx +3 -2
- 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/FilterRange/constants.ts +41 -0
- package/src/components/Filter/components/FilterRange/filterRange.styles.ts +71 -0
- package/src/components/Filter/components/FilterRange/filterRange.tsx +71 -0
- package/src/components/Filter/components/FilterRange/hooks/UseFilterRange/hook.ts +20 -0
- package/src/components/Filter/components/FilterRange/hooks/UseFilterRange/types.ts +9 -0
- package/src/components/Filter/components/FilterRange/stories/filterRange.stories.tsx +15 -0
- package/src/components/Filter/components/FilterRange/types.ts +9 -0
- 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/searchAllFiltersSearch.styles.ts +1 -2
- package/src/components/Filter/components/VariableSizeListItem/variableSizeListItem.tsx +14 -2
- package/src/components/Index/components/EntitiesView/components/ChartView/chartView.tsx +2 -1
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.ts +3 -1
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.ts +10 -7
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.ts +10 -4
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.tsx +1 -2
- package/src/components/Index/components/EntitiesView/components/ChartView/stories/args.ts +1 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.tsx +0 -1
- package/src/components/Index/components/EntitiesView/components/ChartView/types.ts +2 -0
- package/src/components/Index/components/EntitiesView/entitiesView.tsx +2 -2
- package/src/components/Index/components/EntitiesView/types.ts +2 -2
- package/src/components/Index/components/Hero/components/ExportButton/exportButton.tsx +2 -0
- package/src/components/Layout/components/Outline/outline.styles.ts +1 -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.styles.ts +2 -1
- package/src/components/Login/components/Button/constants.ts +2 -3
- package/src/components/Login/components/Button/types.ts +1 -1
- package/src/components/Login/components/Buttons/types.ts +1 -1
- package/src/components/Support/components/SupportRequest/components/Dialog/dialog.styles.ts +4 -4
- package/src/components/Support/components/ViewSupport/viewSupport.styles.ts +2 -2
- package/src/components/Table/columnDef/columnFilters/filterFn.ts +27 -0
- package/src/components/Table/common/columnDef.ts +2 -0
- package/src/components/Table/common/utils.ts +1 -27
- package/src/components/Table/components/Pagination/pagination.tsx +3 -2
- package/src/components/Table/components/PaginationSummary/paginationSummary.tsx +2 -1
- package/src/components/Table/components/TableRows/tableRows.tsx +10 -3
- package/src/components/Table/table.tsx +3 -1
- package/src/components/TableCreator/tableCreator.tsx +17 -3
- package/src/components/common/Button/components/ButtonOutline/buttonOutline.styles.ts +7 -7
- package/src/components/common/Button/constants.ts +23 -0
- package/src/components/common/LoginDialog/loginDialog.styles.ts +2 -3
- package/src/components/types.ts +4 -0
- package/src/config/entities.ts +3 -3
- package/src/config/utils.ts +1 -1
- package/src/hooks/useEntityList.ts +2 -1
- package/src/hooks/useEntityService.ts +1 -1
- package/src/hooks/useExploreMode/types.ts +7 -0
- package/src/hooks/{useExploreMode.ts → useExploreMode/useExploreMode.ts} +2 -9
- package/src/hooks/useFetchEntity.tsx +2 -1
- package/src/styles/common/constants/colorMixes.ts +20 -0
- package/src/styles/common/constants/shadows.ts +5 -0
- package/src/styles/common/mui/button.ts +20 -2
- package/src/tests/mui/constants.ts +1 -0
- package/src/tests/testIds.ts +19 -0
- package/src/theme/common/components.ts +47 -59
- package/src/theme/common/palette.ts +27 -86
- package/src/theme/common/shadows.ts +28 -33
- package/src/theme/components/muiAlert.ts +5 -5
- package/src/theme/theme.ts +50 -51
- package/src/views/ExploreView/exploreView.tsx +8 -3
- package/tests/chart.test.tsx +113 -22
- package/tests/chartView.test.tsx +12 -0
- package/tests/entitiesView.test.tsx +7 -11
- package/tests/filterRange.test.tsx +87 -0
- package/tests/filterRangeMock.test.tsx +38 -0
- package/tests/tableFilter.test.tsx +90 -0
- package/lib/components/DataDictionary/components/Table/columns/columnDef.d.ts +0 -6
- package/lib/components/DataDictionary/components/Table/columns/columnDef.js +0 -33
- package/lib/components/DataDictionary/components/Table/columns/columnIdentifier.d.ts +0 -5
- package/lib/components/DataDictionary/components/Table/columns/columnIdentifier.js +0 -5
- package/lib/components/DataDictionary/components/Table/columns/types.d.ts +0 -2
- package/lib/components/Detail/components/Table/components/TableHead/tableHead.d.ts +0 -8
- package/lib/components/Detail/components/Table/components/TableHead/tableHead.js +0 -36
- 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/EntitiesView/constants.d.ts +0 -1
- package/lib/components/Index/components/EntitiesView/constants.js +0 -1
- 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 -5
- package/lib/components/Index/components/NTagCell/nTagCell.stories.js +0 -16
- package/lib/components/Index/components/TitleCell/titleCell.d.ts +0 -6
- package/lib/components/Index/components/TitleCell/titleCell.js +0 -10
- package/lib/components/Index/components/TitleCell/titleCell.styles.d.ts +0 -3
- package/lib/components/Index/components/TitleCell/titleCell.styles.js +0 -6
- 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/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.stories.d.ts +0 -5
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.stories.js +0 -29
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.d.ts +0 -6
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.js +0 -13
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.styles.d.ts +0 -36
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.styles.js +0 -9
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.d.ts +0 -5
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.js +0 -10
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.styles.d.ts +0 -36
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.styles.js +0 -9
- package/lib/components/Layout/components/Header/hooks/useMeasureHeader.d.ts +0 -5
- package/lib/components/Layout/components/Header/hooks/useMeasureHeader.js +0 -19
- package/lib/components/Layout/components/Outline/common/constants.d.ts +0 -2
- package/lib/components/Layout/components/Outline/common/constants.js +0 -1
- package/lib/components/Login/login.stories.d.ts +0 -6
- package/lib/components/Login/login.stories.js +0 -31
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.d.ts +0 -16
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.js +0 -28
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.stories.d.ts +0 -5
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.stories.js +0 -46
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.styles.d.ts +0 -3
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.styles.js +0 -21
- package/lib/components/Table/components/EntityViewToggle/entityViewToggle.d.ts +0 -2
- package/lib/components/Table/components/EntityViewToggle/entityViewToggle.js +0 -37
- package/lib/components/TableCreator/common/constants.d.ts +0 -6
- package/lib/components/TableCreator/common/constants.js +0 -19
- package/lib/components/TableCreator/common/entities.d.ts +0 -5
- package/lib/components/TableCreator/common/entities.js +0 -1
- package/lib/components/TableCreator/tableCreator.styles.d.ts +0 -4
- package/lib/components/TableCreator/tableCreator.styles.js +0 -4
- package/lib/components/common/Alert/alert.stories.d.ts +0 -6
- package/lib/components/common/Alert/alert.stories.js +0 -36
- package/lib/components/common/Alert/components/AlertText/alertText.styles.d.ts +0 -4
- package/lib/components/common/Alert/components/AlertText/alertText.styles.js +0 -19
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.d.ts +0 -7
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.js +0 -5
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.d.ts +0 -3
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.js +0 -19
- package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.d.ts +0 -10
- package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.js +0 -16
- package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.d.ts +0 -3
- package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.js +0 -21
- package/lib/components/common/Button/components/LoginButton/loginButton.d.ts +0 -3
- package/lib/components/common/Button/components/LoginButton/loginButton.js +0 -6
- package/lib/components/common/Button/components/LoginButton/loginButton.styles.d.ts +0 -7
- package/lib/components/common/Button/components/LoginButton/loginButton.styles.js +0 -11
- package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.d.ts +0 -5
- package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.js +0 -10
- package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.stories.d.ts +0 -3
- package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.stories.js +0 -9
- package/lib/hooks/useAuthentication/common/constants.d.ts +0 -4
- package/lib/hooks/useAuthentication/common/constants.js +0 -19
- package/lib/hooks/useAuthentication/common/entities.d.ts +0 -25
- package/lib/hooks/useAuthentication/common/entities.js +0 -11
- package/lib/hooks/useAuthentication/common/utils.d.ts +0 -15
- package/lib/hooks/useAuthentication/common/utils.js +0 -25
- package/lib/hooks/useAuthentication/useAuthentication.d.ts +0 -6
- package/lib/hooks/useAuthentication/useAuthentication.js +0 -9
- package/lib/hooks/useAuthentication/useAuthenticationComplete.d.ts +0 -6
- package/lib/hooks/useAuthentication/useAuthenticationComplete.js +0 -55
- package/lib/hooks/useAuthentication/useAuthenticationForm.d.ts +0 -20
- package/lib/hooks/useAuthentication/useAuthenticationForm.js +0 -88
- package/lib/hooks/useAuthentication/useAuthenticationNIHExpiry.d.ts +0 -18
- package/lib/hooks/useAuthentication/useAuthenticationNIHExpiry.js +0 -50
- package/lib/hooks/useAuthentication/useAuthenticationStatus.d.ts +0 -20
- package/lib/hooks/useAuthentication/useAuthenticationStatus.js +0 -32
- package/lib/hooks/useAuthentication/useFetchGoogleProfile.d.ts +0 -21
- package/lib/hooks/useAuthentication/useFetchGoogleProfile.js +0 -41
- package/lib/hooks/useAuthentication/useFetchTerraNIHProfile.d.ts +0 -18
- package/lib/hooks/useAuthentication/useFetchTerraNIHProfile.js +0 -62
- package/lib/hooks/useAuthentication/useFetchTerraProfile.d.ts +0 -24
- package/lib/hooks/useAuthentication/useFetchTerraProfile.js +0 -62
- package/lib/hooks/useAuthentication/useFetchTerraTermsOfService.d.ts +0 -15
- package/lib/hooks/useAuthentication/useFetchTerraTermsOfService.js +0 -62
- package/lib/hooks/useAuthentication/useTokenClient.d.ts +0 -11
- package/lib/hooks/useAuthentication/useTokenClient.js +0 -29
- package/lib/hooks/useAuthenticationConfig.d.ts +0 -6
- package/lib/hooks/useAuthenticationConfig.js +0 -14
- package/lib/hooks/useCategoryConfigs.d.ts +0 -6
- package/lib/hooks/useCategoryConfigs.js +0 -17
- package/lib/hooks/useEntityListRelatedView.d.ts +0 -15
- package/lib/hooks/useEntityListRelatedView.js +0 -62
- package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.d.ts +0 -15
- package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.js +0 -27
- package/lib/hooks/useFileManifest/useFileManifestURL.d.ts +0 -5
- package/lib/hooks/useFileManifest/useFileManifestURL.js +0 -11
- package/lib/hooks/useFileManifest/useRequestFileManifest.d.ts +0 -9
- package/lib/hooks/useFileManifest/useRequestFileManifest.js +0 -37
- package/lib/hooks/useLayoutState.d.ts +0 -6
- package/lib/hooks/useLayoutState.js +0 -9
- package/lib/hooks/useMenu.d.ts +0 -10
- package/lib/hooks/useMenu.js +0 -17
- package/lib/hooks/useMenuWithPosition.d.ts +0 -14
- package/lib/hooks/useMenuWithPosition.js +0 -33
- package/lib/hooks/useSessionTimeout.d.ts +0 -11
- package/lib/hooks/useSessionTimeout.js +0 -28
- package/lib/providers/authentication.d.ts +0 -51
- package/lib/providers/authentication.js +0 -110
- package/lib/providers/layoutState.d.ts +0 -40
- package/lib/providers/layoutState.js +0 -47
- package/lib/styles/common/mixins/shadows.d.ts +0 -3
- package/lib/styles/common/mixins/shadows.js +0 -4
- package/lib/theme/common/entities.d.ts +0 -6
- package/lib/theme/common/entities.js +0 -1
- package/src/components/DataDictionary/components/Table/columns/columnDef.ts +0 -47
- package/src/components/DataDictionary/components/Table/columns/columnIdentifier.ts +0 -5
- package/src/components/DataDictionary/components/Table/columns/types.ts +0 -3
- package/src/components/Index/components/EntitiesView/constants.ts +0 -1
- package/src/styles/common/mixins/shadows.ts +0 -7
- package/src/theme/common/entities.ts +0 -7
- /package/lib/components/{DataDictionary/components/Table/columns → Filter/components/FilterRange/hooks/UseFilterRange}/types.js +0 -0
- /package/lib/styles/common/{mui → constants}/palette.d.ts +0 -0
- /package/lib/styles/common/{mui → constants}/palette.js +0 -0
- /package/src/styles/common/{mui → constants}/palette.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as Plot from "@observablehq/plot";
|
|
2
2
|
import { PlotOptions } from "@observablehq/plot";
|
|
3
3
|
import { SelectCategoryValueView } from "../../../../../../../../../common/entities";
|
|
4
|
-
import { PALETTE } from "../../../../../../../../../styles/common/
|
|
4
|
+
import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
|
|
5
5
|
import { formatCountSize } from "../../../../../../../../../utils/formatCountSize";
|
|
6
|
-
import { DATA_FIELD, TEXT_PADDING } from "./constants";
|
|
6
|
+
import { DATA_FIELD, MARGIN_LEFT, TEXT_PADDING } from "./constants";
|
|
7
7
|
import {
|
|
8
8
|
getCategoryValueText,
|
|
9
9
|
getCategoryValueTextFill,
|
|
@@ -32,6 +32,7 @@ export function getPlotOptions(
|
|
|
32
32
|
height: getPlotHeight(selectCategoryValueViews.length),
|
|
33
33
|
margin: 0,
|
|
34
34
|
marginBottom: 32,
|
|
35
|
+
marginLeft: MARGIN_LEFT,
|
|
35
36
|
marks: [
|
|
36
37
|
Plot.axisX({
|
|
37
38
|
className: "x-axis",
|
|
@@ -50,19 +51,21 @@ export function getPlotOptions(
|
|
|
50
51
|
fill: DATA_FIELD.SELECTED,
|
|
51
52
|
rx1: 0,
|
|
52
53
|
rx2: 4,
|
|
53
|
-
sort: { y:
|
|
54
|
+
sort: { order: "descending", y: "x" }, // Sort by count (x-axis), descending.
|
|
54
55
|
x: DATA_FIELD.COUNT,
|
|
55
56
|
y: DATA_FIELD.LABEL,
|
|
56
57
|
}),
|
|
57
58
|
Plot.text(selectCategoryValueViews, {
|
|
58
59
|
className: "text-category-label",
|
|
59
|
-
dx:
|
|
60
|
-
dy: -
|
|
60
|
+
dx: -TEXT_PADDING,
|
|
61
|
+
dy: -2,
|
|
61
62
|
fill: (d) => getCategoryValueTextFill(d, isCategorySelected),
|
|
62
|
-
|
|
63
|
+
lineHeight: 0.8125,
|
|
64
|
+
lineWidth: (MARGIN_LEFT - TEXT_PADDING) / 13, // "em" unit; font-size is 13px.
|
|
63
65
|
text: getCategoryValueText,
|
|
64
|
-
textAnchor: "
|
|
66
|
+
textAnchor: "end",
|
|
65
67
|
textOverflow: "ellipsis",
|
|
68
|
+
title: getCategoryValueText,
|
|
66
69
|
x: 0,
|
|
67
70
|
y: DATA_FIELD.LABEL,
|
|
68
71
|
}),
|
|
@@ -6,8 +6,14 @@ import {
|
|
|
6
6
|
ScaleFunctions,
|
|
7
7
|
} from "@observablehq/plot";
|
|
8
8
|
import { SelectCategoryValueView } from "../../../../../../../../../common/entities";
|
|
9
|
-
import { PALETTE } from "../../../../../../../../../styles/common/
|
|
10
|
-
import {
|
|
9
|
+
import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
|
|
10
|
+
import {
|
|
11
|
+
BAR_GAP,
|
|
12
|
+
BAR_HEIGHT,
|
|
13
|
+
MARGIN_LEFT,
|
|
14
|
+
TEXT_PADDING,
|
|
15
|
+
TICKS,
|
|
16
|
+
} from "./constants";
|
|
11
17
|
|
|
12
18
|
/**
|
|
13
19
|
* Returns the text for the category value point.
|
|
@@ -170,7 +176,7 @@ export function isAnyValueSelected(data: SelectCategoryValueView[]): boolean {
|
|
|
170
176
|
* @param translate - The transform `translate` string.
|
|
171
177
|
* @returns A tuple of the x and y coordinates.
|
|
172
178
|
*/
|
|
173
|
-
function parseTranslate(translate: string | null): [number, number] {
|
|
179
|
+
export function parseTranslate(translate: string | null): [number, number] {
|
|
174
180
|
const match = translate?.match(/translate\(\s*([-\d.]+)[,\s]+([-\d.]+)\s*\)/);
|
|
175
181
|
let tx = 0;
|
|
176
182
|
let ty = 0;
|
|
@@ -210,7 +216,7 @@ export function renderText(
|
|
|
210
216
|
const bBox = textEl.getBBox();
|
|
211
217
|
if (!ctm || !bBox) continue;
|
|
212
218
|
// If the text doesn't fit inside the bar, reposition it outside.
|
|
213
|
-
if (ctm.e - bBox.width - TEXT_PADDING <
|
|
219
|
+
if (ctm.e - bBox.width - TEXT_PADDING < MARGIN_LEFT) {
|
|
214
220
|
const [tx, ty] = parseTranslate(textEl.getAttribute("transform"));
|
|
215
221
|
// Translate by the width of the bar plus padding on each side.
|
|
216
222
|
textEl.setAttribute(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Box } from "@mui/material";
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { PALETTE } from "../../../../../../../../../styles/common/
|
|
4
|
+
import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
|
|
5
5
|
import { Chart } from "../chart";
|
|
6
6
|
import { CHART_ARGS, SELECT_CHART_ARGS } from "./args";
|
|
7
7
|
|
|
@@ -15,7 +15,6 @@ const meta: Meta<typeof Chart> = {
|
|
|
15
15
|
</Box>
|
|
16
16
|
),
|
|
17
17
|
],
|
|
18
|
-
title: "Components/Entities/EntitiesView/ChartView/Chart",
|
|
19
18
|
};
|
|
20
19
|
|
|
21
20
|
export default meta;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { EntityConfig } from "../../../../../../config/entities";
|
|
1
2
|
import { CategoryFilter } from "../../../../../Filter/components/Filters/filters";
|
|
2
3
|
import { TestIdProps } from "../../../../../types";
|
|
3
4
|
|
|
4
5
|
export interface ChartViewProps extends TestIdProps {
|
|
5
6
|
categoryFilters: CategoryFilter[];
|
|
7
|
+
entityName: EntityConfig["label"];
|
|
6
8
|
loading: boolean;
|
|
7
9
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ToggleButton, ToggleButtonGroup, Toolbar } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
3
4
|
import { GridPaper } from "../../../common/Paper/paper.styles";
|
|
4
5
|
import { StyledFluidPaper } from "./entitiesView.styles";
|
|
5
6
|
import { VIEW_MODE } from "./hooks/UseEntitiesView/types";
|
|
@@ -8,12 +9,11 @@ import { EntitiesViewProps } from "./types";
|
|
|
8
9
|
export const EntitiesView = ({
|
|
9
10
|
children,
|
|
10
11
|
onChange,
|
|
11
|
-
testId,
|
|
12
12
|
viewMode,
|
|
13
13
|
viewStatus,
|
|
14
14
|
}: EntitiesViewProps): JSX.Element => {
|
|
15
15
|
return (
|
|
16
|
-
<StyledFluidPaper testId={
|
|
16
|
+
<StyledFluidPaper testId={TEST_IDS.ENTITIES_VIEW}>
|
|
17
17
|
<GridPaper>
|
|
18
18
|
{viewStatus.disabled ? null : (
|
|
19
19
|
<Toolbar>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ToggleButtonGroupProps } from "@mui/material";
|
|
2
|
-
import { ChildrenProps
|
|
2
|
+
import { ChildrenProps } from "../../../types";
|
|
3
3
|
import { VIEW_MODE, ViewStatus } from "./hooks/UseEntitiesView/types";
|
|
4
4
|
|
|
5
|
-
export interface EntitiesViewProps extends ChildrenProps
|
|
5
|
+
export interface EntitiesViewProps extends ChildrenProps {
|
|
6
6
|
onChange: ToggleButtonGroupProps["onChange"];
|
|
7
7
|
viewMode: VIEW_MODE;
|
|
8
8
|
viewStatus: ViewStatus;
|
|
@@ -2,6 +2,7 @@ import { Tooltip } from "@mui/material";
|
|
|
2
2
|
import Link from "next/link";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { useDownloadStatus } from "../../../../../../hooks/useDownloadStatus";
|
|
5
|
+
import { TEST_IDS } from "../../../../../../tests/testIds";
|
|
5
6
|
import { Button } from "./exportButton.styles";
|
|
6
7
|
|
|
7
8
|
export const ExportButton = (): JSX.Element => {
|
|
@@ -11,6 +12,7 @@ export const ExportButton = (): JSX.Element => {
|
|
|
11
12
|
<span>
|
|
12
13
|
<Link href="/export" legacyBehavior passHref>
|
|
13
14
|
<Button
|
|
15
|
+
data-testid={TEST_IDS.EXPORT_BUTTON}
|
|
14
16
|
disabled={disabled || isLoading}
|
|
15
17
|
href="passHref"
|
|
16
18
|
id="button-cohort-export"
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { css } from "@emotion/react";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { Tab as MTab, Tabs as MTabs, TabProps } from "@mui/material";
|
|
4
|
-
import { smokeMain } from "../../../../styles/common/mixins/colors";
|
|
4
|
+
import { inkMain, smokeMain } from "../../../../styles/common/mixins/colors";
|
|
5
5
|
import {
|
|
6
6
|
textBody500,
|
|
7
7
|
textBodySmall400,
|
|
8
8
|
} from "../../../../styles/common/mixins/fonts";
|
|
9
|
-
import { inkMain } from "../../../../theme/common/palette";
|
|
10
9
|
|
|
11
10
|
interface Props extends TabProps {
|
|
12
11
|
depth: number;
|
|
@@ -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(() => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { css } from "@emotion/react";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
|
+
import { COLOR_MIXES } from "../../styles/common/constants/colorMixes";
|
|
3
4
|
import { TABLET } from "../../theme/common/breakpoints";
|
|
4
5
|
import { Paper, PAPER_PANEL_STYLE } from "../common/Paper/paper";
|
|
5
6
|
import { LOADING_PANEL_STYLE, LoadingPanelStyle } from "./loading";
|
|
@@ -26,7 +27,7 @@ export const LoadingPositioner = styled.div<Props>`
|
|
|
26
27
|
`;
|
|
27
28
|
|
|
28
29
|
export const LoadingPaper = styled(Paper)<Props>`
|
|
29
|
-
background-color:
|
|
30
|
+
background-color: ${COLOR_MIXES.COMMON_WHITE_80};
|
|
30
31
|
display: grid;
|
|
31
32
|
gap: 16px;
|
|
32
33
|
justify-items: center;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ButtonProps } from "@mui/material";
|
|
2
|
-
import {
|
|
2
|
+
import { BUTTON_PROPS as DX_BUTTON_PROPS } from "../../../common/Button/constants";
|
|
3
3
|
|
|
4
4
|
export const BUTTON_PROPS: Partial<ButtonProps> = {
|
|
5
|
-
|
|
5
|
+
...DX_BUTTON_PROPS.SECONDARY_CONTAINED,
|
|
6
6
|
fullWidth: true,
|
|
7
|
-
variant: VARIANT.CONTAINED,
|
|
8
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonProps } from "@mui/material";
|
|
2
2
|
import { ClientSafeProvider } from "next-auth/react";
|
|
3
3
|
import { OAuthProvider } from "../../../../config/entities";
|
|
4
|
-
import { BaseComponentProps } from "
|
|
4
|
+
import { BaseComponentProps } from "../../../types";
|
|
5
5
|
|
|
6
6
|
export interface Props<P> extends BaseComponentProps, ButtonProps {
|
|
7
7
|
handleLogin: (providerId: string) => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import { Fab as MFab, Popover as MPopover } from "@mui/material";
|
|
3
|
+
import { COLOR_MIXES } from "../../../../../../styles/common/constants/colorMixes";
|
|
4
|
+
import { SHADOWS } from "../../../../../../styles/common/constants/shadows";
|
|
3
5
|
import { mediaTabletUp } from "../../../../../../styles/common/mixins/breakpoints";
|
|
4
6
|
import { smokeMain } from "../../../../../../styles/common/mixins/colors";
|
|
5
|
-
import { shadows02 } from "../../../../../../styles/common/mixins/shadows";
|
|
6
7
|
import { tabletUp } from "../../../../../../theme/common/breakpoints";
|
|
7
|
-
import { alpha80, inkMain } from "../../../../../../theme/common/palette";
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
10
10
|
open: boolean;
|
|
@@ -12,7 +12,7 @@ interface Props {
|
|
|
12
12
|
|
|
13
13
|
export const Fab = styled(MFab)<Props>`
|
|
14
14
|
bottom: 16px;
|
|
15
|
-
box-shadow: ${
|
|
15
|
+
box-shadow: ${SHADOWS["02"]};
|
|
16
16
|
position: fixed;
|
|
17
17
|
right: 16px;
|
|
18
18
|
z-index: ${({ open }) => (open ? 1350 : 1050)}; // Above backdrop component.
|
|
@@ -24,7 +24,7 @@ export const Fab = styled(MFab)<Props>`
|
|
|
24
24
|
|
|
25
25
|
export const Popover = styled(MPopover)`
|
|
26
26
|
&.MuiPopover-root {
|
|
27
|
-
background-color: ${
|
|
27
|
+
background-color: ${COLOR_MIXES.INK_MAIN_80};
|
|
28
28
|
|
|
29
29
|
> .MuiPaper-root {
|
|
30
30
|
border: 1px solid ${smokeMain};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
|
+
import { SHADOWS } from "../../../../styles/common/constants/shadows";
|
|
2
3
|
import { mediaTabletUp } from "../../../../styles/common/mixins/breakpoints";
|
|
3
4
|
import {
|
|
4
5
|
primaryDark,
|
|
5
6
|
primaryMain,
|
|
6
7
|
white,
|
|
7
8
|
} from "../../../../styles/common/mixins/colors";
|
|
8
|
-
import { shadows02 } from "../../../../styles/common/mixins/shadows";
|
|
9
9
|
|
|
10
10
|
export const Fab = styled("a")`
|
|
11
11
|
align-items: center;
|
|
@@ -13,7 +13,7 @@ export const Fab = styled("a")`
|
|
|
13
13
|
border: none;
|
|
14
14
|
border-radius: 50%;
|
|
15
15
|
bottom: 16px;
|
|
16
|
-
box-shadow: ${
|
|
16
|
+
box-shadow: ${SHADOWS["02"]};
|
|
17
17
|
color: ${white};
|
|
18
18
|
cursor: pointer;
|
|
19
19
|
display: flex;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Row, RowData } from "@tanstack/react-table";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns true if the row should be included in the filtered rows.
|
|
5
|
+
* The row will be included if:
|
|
6
|
+
* - the column value (string) equals a value in the filter values array, or
|
|
7
|
+
* - one of the column values is included in the filter values array.
|
|
8
|
+
* See https://github.com/TanStack/table/blob/c895bda085d0886a7eba00a08019f377efbac54c/packages/table-core/src/filterFns.ts.
|
|
9
|
+
* @param row - Row to filter.
|
|
10
|
+
* @param columnId - Column identifier to retrieve the row's value.
|
|
11
|
+
* @param filterValue - Filter value or values.
|
|
12
|
+
* @returns True if the row should be included in the filtered rows.
|
|
13
|
+
*/
|
|
14
|
+
export function arrIncludesSome<T extends RowData>(
|
|
15
|
+
row: Row<T>,
|
|
16
|
+
columnId: string,
|
|
17
|
+
filterValue: unknown[]
|
|
18
|
+
): boolean {
|
|
19
|
+
return filterValue.some((val) => {
|
|
20
|
+
const columnValue = row.getValue<unknown[]>(columnId);
|
|
21
|
+
if (Array.isArray(columnValue)) {
|
|
22
|
+
return columnValue?.includes(val);
|
|
23
|
+
} else {
|
|
24
|
+
return columnValue === val;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
@@ -8,6 +8,7 @@ import { COLUMN_IDENTIFIER } from "./columnIdentifier";
|
|
|
8
8
|
export const COLUMN_DEF: Record<string, ColumnDef<RowData>> = {
|
|
9
9
|
ROW_POSITION: {
|
|
10
10
|
cell: RowPositionCell,
|
|
11
|
+
enableColumnFilter: false,
|
|
11
12
|
enableGrouping: false,
|
|
12
13
|
enableHiding: false,
|
|
13
14
|
enableSorting: false,
|
|
@@ -22,6 +23,7 @@ export const COLUMN_DEF: Record<string, ColumnDef<RowData>> = {
|
|
|
22
23
|
},
|
|
23
24
|
ROW_SELECTION: {
|
|
24
25
|
cell: RowSelectionCell,
|
|
26
|
+
enableColumnFilter: false,
|
|
25
27
|
enableGrouping: false,
|
|
26
28
|
enableHiding: false,
|
|
27
29
|
enableSorting: false,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
Table,
|
|
11
11
|
} from "@tanstack/react-table";
|
|
12
12
|
import { SelectCategory } from "../../../common/entities";
|
|
13
|
-
import { EXPLORE_MODE, ExploreMode } from "../../../hooks/useExploreMode";
|
|
13
|
+
import { EXPLORE_MODE, ExploreMode } from "../../../hooks/useExploreMode/types";
|
|
14
14
|
import { COLUMN_IDENTIFIER } from "./columnIdentifier";
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -29,32 +29,6 @@ type PinnedCell<T extends RowData> = [Cell<T, unknown>, number];
|
|
|
29
29
|
*/
|
|
30
30
|
type TableData = number | string | string[];
|
|
31
31
|
|
|
32
|
-
/**
|
|
33
|
-
* Returns true if the row should be included in the filtered rows.
|
|
34
|
-
* The row will be included if:
|
|
35
|
-
* - the column value equals a value in the filter values array, or
|
|
36
|
-
* - one of the column values is included in the filter values array.
|
|
37
|
-
* See https://github.com/TanStack/table/blob/c895bda085d0886a7eba00a08019f377efbac54c/packages/table-core/src/filterFns.ts.
|
|
38
|
-
* @param row - Row to filter.
|
|
39
|
-
* @param columnId - Column identifier to retrieve the row's value.
|
|
40
|
-
* @param filterValue - Filter value or values.
|
|
41
|
-
* @returns True if the row should be included in the filtered rows.
|
|
42
|
-
*/
|
|
43
|
-
export function arrIncludesSome<T extends RowData>(
|
|
44
|
-
row: Row<T>,
|
|
45
|
-
columnId: string,
|
|
46
|
-
filterValue: unknown[]
|
|
47
|
-
): boolean {
|
|
48
|
-
return filterValue.some((val) => {
|
|
49
|
-
const columnValue = row.getValue<unknown[]>(columnId);
|
|
50
|
-
if (Array.isArray(columnValue)) {
|
|
51
|
-
return columnValue?.includes(val);
|
|
52
|
-
} else {
|
|
53
|
-
return columnValue === val;
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
32
|
/**
|
|
59
33
|
* Build view-specific models from react table faceted values function.
|
|
60
34
|
* @param columns - Table columns.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EastRounded, WestRounded } from "@mui/icons-material";
|
|
2
2
|
import { Typography } from "@mui/material";
|
|
3
3
|
import React from "react";
|
|
4
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
4
5
|
import { IconButton } from "../../../common/IconButton/iconButton";
|
|
5
6
|
import { Stack } from "../../../common/Stack/stack";
|
|
6
7
|
import { Pagination as TablePagination } from "./pagination.styles";
|
|
@@ -23,8 +24,8 @@ export const Pagination = ({
|
|
|
23
24
|
totalPage,
|
|
24
25
|
}: PaginationProps): JSX.Element => {
|
|
25
26
|
return (
|
|
26
|
-
<TablePagination>
|
|
27
|
-
<div>
|
|
27
|
+
<TablePagination data-testid={TEST_IDS.TABLE_PAGINATION}>
|
|
28
|
+
<div data-testid={TEST_IDS.TABLE_PAGINATION_PAGE}>
|
|
28
29
|
<Typography variant="text-body-400">Page </Typography>
|
|
29
30
|
<Typography variant="text-body-500">
|
|
30
31
|
{currentPage} of {totalPage}
|
|
@@ -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}
|
|
@@ -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)}
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
BREAKPOINT_FN_NAME,
|
|
28
28
|
useBreakpointHelper,
|
|
29
29
|
} from "../../hooks/useBreakpointHelper";
|
|
30
|
-
import { useExploreMode } from "../../hooks/useExploreMode";
|
|
30
|
+
import { useExploreMode } from "../../hooks/useExploreMode/useExploreMode";
|
|
31
31
|
import { useExploreState } from "../../hooks/useExploreState";
|
|
32
32
|
import { useScroll } from "../../hooks/useScroll";
|
|
33
33
|
import { ExploreActionKind } from "../../providers/exploreState";
|
|
@@ -36,6 +36,7 @@ import { TABLET } from "../../theme/common/breakpoints";
|
|
|
36
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
|
+
import { arrIncludesSome } from "./columnDef/columnFilters/filterFn";
|
|
39
40
|
import { ROW_DIRECTION } from "./common/entities";
|
|
40
41
|
import {
|
|
41
42
|
buildCategoryViews,
|
|
@@ -168,6 +169,7 @@ TableProps<T>): JSX.Element => {
|
|
|
168
169
|
enableColumnFilters: true, // client-side filtering.
|
|
169
170
|
enableFilters: true, // client-side filtering.
|
|
170
171
|
enableMultiSort: clientFiltering, // TODO(cc) move to sorting options; default to false and let the table options in config flag this value.
|
|
172
|
+
filterFns: { arrIncludesSome },
|
|
171
173
|
getCoreRowModel: getCoreRowModel(),
|
|
172
174
|
getFacetedRowModel: clientFiltering ? getFacetedRowModel() : undefined,
|
|
173
175
|
getFacetedUniqueValues: clientFiltering
|
|
@@ -8,7 +8,7 @@ import React, { useMemo } from "react";
|
|
|
8
8
|
import { ColumnConfig, ListViewConfig } from "../../config/entities";
|
|
9
9
|
import { ComponentCreator } from "../ComponentCreator/ComponentCreator";
|
|
10
10
|
import { COLUMN_DEF } from "../Table/common/columnDef";
|
|
11
|
-
import {
|
|
11
|
+
import { sortingFn } from "../Table/common/utils";
|
|
12
12
|
import { Table } from "../Table/table";
|
|
13
13
|
import { buildBaseColumnDef } from "./common/utils";
|
|
14
14
|
import { useTableOptions } from "./options/hook";
|
|
@@ -45,11 +45,25 @@ export const TableCreator = <T extends RowData>({
|
|
|
45
45
|
const columnDefs: ColumnDef<T>[] = useMemo(
|
|
46
46
|
() =>
|
|
47
47
|
columns.reduce(
|
|
48
|
-
(
|
|
48
|
+
(
|
|
49
|
+
acc,
|
|
50
|
+
{
|
|
51
|
+
/**
|
|
52
|
+
* Applies the custom `arrIncludesSome` filter function as the default for multi-value filtering.
|
|
53
|
+
* Although `ColumnFilter["value"]` is typed as `unknown`, in practice it's consistently an array (`unknown[]`) in entity lists.
|
|
54
|
+
* This custom filter function supports multi-select filtering, even when individual cell values are single strings.
|
|
55
|
+
* This override of TanStack's default `arrIncludesSome` resolves a limitation where the base implementation
|
|
56
|
+
* does not support matching an array of filter values against a single string cell value.
|
|
57
|
+
* For range filtering, specify TanStack's `inNumberRange` filter function on the column definition.
|
|
58
|
+
*/
|
|
59
|
+
filterFn = "arrIncludesSome",
|
|
60
|
+
...columnConfig
|
|
61
|
+
}
|
|
62
|
+
) => {
|
|
49
63
|
acc.push({
|
|
50
64
|
...buildBaseColumnDef(columnConfig),
|
|
51
65
|
cell: createCell(columnConfig),
|
|
52
|
-
filterFn
|
|
66
|
+
filterFn,
|
|
53
67
|
sortingFn: sortingFn,
|
|
54
68
|
});
|
|
55
69
|
return acc;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { COLOR_MIXES } from "../../../../../styles/common/constants/colorMixes";
|
|
3
|
+
import { PALETTE } from "../../../../../styles/common/constants/palette";
|
|
4
4
|
import { Button } from "../../button";
|
|
5
5
|
|
|
6
6
|
export const ButtonOutline = styled(Button)`
|
|
7
|
-
box-shadow: inset 0 0 0 1px ${
|
|
8
|
-
color: ${
|
|
7
|
+
box-shadow: inset 0 0 0 1px ${COLOR_MIXES.COMMON_WHITE_32};
|
|
8
|
+
color: ${PALETTE.COMMON_WHITE};
|
|
9
9
|
|
|
10
10
|
&:hover {
|
|
11
|
-
box-shadow: inset 0 0 0 1px ${
|
|
11
|
+
box-shadow: inset 0 0 0 1px ${COLOR_MIXES.COMMON_WHITE_64};
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
&:disabled {
|
|
15
|
-
box-shadow: inset 0 0 0 1px ${
|
|
16
|
-
color: ${
|
|
15
|
+
box-shadow: inset 0 0 0 1px ${COLOR_MIXES.COMMON_WHITE_32};
|
|
16
|
+
color: ${PALETTE.COMMON_WHITE};
|
|
17
17
|
}
|
|
18
18
|
`;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ButtonProps } from "@mui/material";
|
|
2
|
+
import { BUTTON_PROPS as MUI_BUTTON_PROPS } from "../../../styles/common/mui/button";
|
|
3
|
+
|
|
4
|
+
export const BUTTON_PROPS: Record<string, Partial<ButtonProps>> = {
|
|
5
|
+
PRIMARY_CONTAINED: {
|
|
6
|
+
color: MUI_BUTTON_PROPS.COLOR.PRIMARY,
|
|
7
|
+
variant: MUI_BUTTON_PROPS.VARIANT.CONTAINED,
|
|
8
|
+
},
|
|
9
|
+
PRIMARY_MEDIUM_CONTAINED: {
|
|
10
|
+
color: MUI_BUTTON_PROPS.COLOR.PRIMARY,
|
|
11
|
+
size: MUI_BUTTON_PROPS.SIZE.MEDIUM,
|
|
12
|
+
variant: MUI_BUTTON_PROPS.VARIANT.CONTAINED,
|
|
13
|
+
},
|
|
14
|
+
SECONDARY_CONTAINED: {
|
|
15
|
+
color: MUI_BUTTON_PROPS.COLOR.SECONDARY,
|
|
16
|
+
variant: MUI_BUTTON_PROPS.VARIANT.CONTAINED,
|
|
17
|
+
},
|
|
18
|
+
SECONDARY_MEDIUM_CONTAINED: {
|
|
19
|
+
color: MUI_BUTTON_PROPS.COLOR.SECONDARY,
|
|
20
|
+
size: MUI_BUTTON_PROPS.SIZE.MEDIUM,
|
|
21
|
+
variant: MUI_BUTTON_PROPS.VARIANT.CONTAINED,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import { Dialog } from "@mui/material";
|
|
3
|
-
import {
|
|
4
|
-
import { alpha80 } from "../../../theme/common/palette";
|
|
3
|
+
import { COLOR_MIXES } from "../../../styles/common/constants/colorMixes";
|
|
5
4
|
|
|
6
5
|
export const StyledDialog = styled(Dialog)`
|
|
7
6
|
&.MuiDialog-root {
|
|
8
7
|
.MuiBackdrop-root {
|
|
9
|
-
background-color: ${
|
|
8
|
+
background-color: ${COLOR_MIXES.INK_MAIN_80};
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
.MuiDialog-paper {
|