@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,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { useExploreState } from "../../../../hooks/useExploreState";
|
|
3
3
|
import { ExploreActionKind } from "../../../../providers/exploreState";
|
|
4
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
4
5
|
import { ButtonTextPrimary } from "../../../common/Button/components/ButtonTextPrimary/buttonTextPrimary";
|
|
5
6
|
export const ClearAllFilters = () => {
|
|
6
7
|
const { exploreDispatch } = useExploreState();
|
|
@@ -10,5 +11,5 @@ export const ClearAllFilters = () => {
|
|
|
10
11
|
type: ExploreActionKind.ClearFilters,
|
|
11
12
|
});
|
|
12
13
|
};
|
|
13
|
-
return (React.createElement(ButtonTextPrimary, { onClick: onClearFilters }, "Clear All"));
|
|
14
|
+
return (React.createElement(ButtonTextPrimary, { "data-testid": TEST_IDS.CLEAR_ALL_FILTERS, onClick: onClearFilters }, "Clear All"));
|
|
14
15
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CloseRounded } from "@mui/icons-material";
|
|
2
2
|
import { Grow } from "@mui/material";
|
|
3
3
|
import React, { useState } from "react";
|
|
4
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
4
5
|
import { FilterLabel } from "../FilterLabel/filterLabel";
|
|
5
6
|
import { FilterMenu } from "../FilterMenu/filterMenu";
|
|
6
7
|
import { DrawerTransition } from "./components/DrawerTransition/drawerTransition";
|
|
@@ -49,7 +50,7 @@ export const Filter = ({ categorySection, categoryView, closeAncestor, isFilterD
|
|
|
49
50
|
};
|
|
50
51
|
return (React.createElement(React.Fragment, null,
|
|
51
52
|
React.createElement(FilterLabel, { annotation: categoryView.annotation, count: categoryView.values.length, disabled: categoryView.isDisabled, isOpen: isOpen, label: categoryView.label, onClick: onOpenFilter }),
|
|
52
|
-
React.createElement(FilterPopover, { anchorPosition: anchorPosition, anchorReference: "anchorPosition", marginThreshold: 0, onClose: onCloseFilters, open: isOpen, slotProps: slotProps, TransitionComponent: TransitionComponent, transitionDuration: TransitionDuration },
|
|
53
|
+
React.createElement(FilterPopover, { anchorPosition: anchorPosition, anchorReference: "anchorPosition", "data-testid": TEST_IDS.FILTER_POPOVER, marginThreshold: 0, onClose: onCloseFilters, open: isOpen, slotProps: slotProps, TransitionComponent: TransitionComponent, transitionDuration: TransitionDuration },
|
|
53
54
|
isOpen && isFilterDrawer && (React.createElement(IconButton, { Icon: CloseRounded, onClick: onCloseFilters, size: "medium" })),
|
|
54
55
|
React.createElement(FilterMenu, { categorySection: categorySection, categoryKey: categoryView.key, categoryLabel: categoryView.label, isFilterDrawer: isFilterDrawer, onFilter: onFilter, onCloseFilter: onCloseFilter, values: categoryView.values })),
|
|
55
56
|
tags));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ButtonProps, DividerProps, InputLabelProps, OutlinedInputProps, ToggleButtonGroupProps } from "@mui/material";
|
|
2
|
+
import { RANGE_OPERATOR } from "./types";
|
|
3
|
+
export declare const BUTTON_PROPS: ButtonProps;
|
|
4
|
+
export declare const DIVIDER_PROPS: DividerProps;
|
|
5
|
+
export declare const INPUT_PROPS: OutlinedInputProps;
|
|
6
|
+
export declare const INPUT_LABEL_PROPS: InputLabelProps;
|
|
7
|
+
export declare const RANGE_OPERATOR_DISPLAY: Record<RANGE_OPERATOR, string>;
|
|
8
|
+
export declare const TOGGLE_BUTTON_GROUP_PROPS: ToggleButtonGroupProps;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BUTTON_PROPS as DX_BUTTON_PROPS } from "../../../common/Button/constants";
|
|
2
|
+
export const BUTTON_PROPS = {
|
|
3
|
+
...DX_BUTTON_PROPS.PRIMARY_MEDIUM_CONTAINED,
|
|
4
|
+
fullWidth: true,
|
|
5
|
+
type: "submit",
|
|
6
|
+
};
|
|
7
|
+
export const DIVIDER_PROPS = {
|
|
8
|
+
flexItem: true,
|
|
9
|
+
orientation: "vertical",
|
|
10
|
+
};
|
|
11
|
+
export const INPUT_PROPS = {
|
|
12
|
+
autoFocus: false,
|
|
13
|
+
size: "small",
|
|
14
|
+
};
|
|
15
|
+
export const INPUT_LABEL_PROPS = {
|
|
16
|
+
disableAnimation: true,
|
|
17
|
+
shrink: true,
|
|
18
|
+
};
|
|
19
|
+
export const RANGE_OPERATOR_DISPLAY = {
|
|
20
|
+
between: "From",
|
|
21
|
+
greaterThan: "Greater Than",
|
|
22
|
+
lessThan: "Less Than",
|
|
23
|
+
};
|
|
24
|
+
export const TOGGLE_BUTTON_GROUP_PROPS = {
|
|
25
|
+
exclusive: true,
|
|
26
|
+
fullWidth: true,
|
|
27
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Button, Divider, FormControl, Grid, InputLabel, OutlinedInput, ToggleButton, ToggleButtonGroup, } from "@mui/material";
|
|
2
|
+
import React, { Fragment } from "react";
|
|
3
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
4
|
+
import { BUTTON_PROPS, DIVIDER_PROPS, INPUT_LABEL_PROPS, INPUT_PROPS, RANGE_OPERATOR_DISPLAY, TOGGLE_BUTTON_GROUP_PROPS, } from "./constants";
|
|
5
|
+
import { StyledForm } from "./filterRange.styles";
|
|
6
|
+
import { useFilterRange } from "./hooks/UseFilterRange/hook";
|
|
7
|
+
import { RANGE_OPERATOR } from "./types";
|
|
8
|
+
export const FilterRange = ({ className }) => {
|
|
9
|
+
const { onChange, onSubmit, value } = useFilterRange();
|
|
10
|
+
return (React.createElement(StyledForm, { className: className, "data-testid": TEST_IDS.FILTER_RANGE, onSubmit: onSubmit },
|
|
11
|
+
React.createElement(ToggleButtonGroup, { ...TOGGLE_BUTTON_GROUP_PROPS, onChange: onChange, value: value },
|
|
12
|
+
React.createElement(ToggleButton, { value: RANGE_OPERATOR.BETWEEN }, "Between"),
|
|
13
|
+
React.createElement(ToggleButton, { value: RANGE_OPERATOR.LESS_THAN }, "Less Than"),
|
|
14
|
+
React.createElement(Divider, { ...DIVIDER_PROPS }),
|
|
15
|
+
React.createElement(ToggleButton, { value: RANGE_OPERATOR.GREATER_THAN }, "Greater Than")),
|
|
16
|
+
React.createElement(Grid, null,
|
|
17
|
+
React.createElement(FormControl, null,
|
|
18
|
+
React.createElement(InputLabel, { ...INPUT_LABEL_PROPS, htmlFor: value }, RANGE_OPERATOR_DISPLAY[value]),
|
|
19
|
+
React.createElement(OutlinedInput, { ...INPUT_PROPS, name: value, placeholder: "eg. 1" })),
|
|
20
|
+
value === RANGE_OPERATOR.BETWEEN && (React.createElement(Fragment, null,
|
|
21
|
+
React.createElement(Divider, null),
|
|
22
|
+
React.createElement(FormControl, null,
|
|
23
|
+
React.createElement(InputLabel, { ...INPUT_LABEL_PROPS, htmlFor: "between-to" }, "To"),
|
|
24
|
+
React.createElement(OutlinedInput, { ...INPUT_PROPS, name: "between-to", placeholder: "eg. 2" }))))),
|
|
25
|
+
React.createElement(Button, { ...BUTTON_PROPS }, "Filter")));
|
|
26
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { inkLight, inkMain, smokeDark, } from "../../../../styles/common/mixins/colors";
|
|
3
|
+
import { textBody400 } from "../../../../styles/common/mixins/fonts";
|
|
4
|
+
export const StyledForm = styled("form") `
|
|
5
|
+
padding: 16px;
|
|
6
|
+
width: 396px;
|
|
7
|
+
|
|
8
|
+
.MuiToggleButtonGroup-root {
|
|
9
|
+
grid-auto-columns: 1fr 1fr auto 1fr; // buttons + divider
|
|
10
|
+
width: 100%;
|
|
11
|
+
|
|
12
|
+
.MuiToggleButton-root {
|
|
13
|
+
color: ${inkLight};
|
|
14
|
+
text-transform: capitalize;
|
|
15
|
+
|
|
16
|
+
&.Mui-selected {
|
|
17
|
+
color: ${inkMain};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.MuiDivider-root {
|
|
22
|
+
border-color: ${smokeDark};
|
|
23
|
+
border-radius: 4px;
|
|
24
|
+
margin: 6px 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.MuiGrid-root {
|
|
29
|
+
display: grid;
|
|
30
|
+
gap: 4px 0;
|
|
31
|
+
grid-auto-flow: column;
|
|
32
|
+
grid-template-rows: auto auto;
|
|
33
|
+
margin: 12px 0 16px 0;
|
|
34
|
+
|
|
35
|
+
.MuiFormControl-root {
|
|
36
|
+
display: grid;
|
|
37
|
+
gap: inherit;
|
|
38
|
+
grid-row: 1 / -1;
|
|
39
|
+
grid-template-rows: subgrid;
|
|
40
|
+
|
|
41
|
+
.MuiInputLabel-root {
|
|
42
|
+
${textBody400};
|
|
43
|
+
color: ${inkMain};
|
|
44
|
+
max-width: unset;
|
|
45
|
+
position: relative;
|
|
46
|
+
transform: unset;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.MuiOutlinedInput-input {
|
|
50
|
+
padding-right: 10px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.MuiDivider-root {
|
|
55
|
+
align-self: center;
|
|
56
|
+
border-color: ${inkLight};
|
|
57
|
+
grid-row: 2;
|
|
58
|
+
margin: 0 4px;
|
|
59
|
+
width: 8px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.MuiButton-root {
|
|
64
|
+
grid-column: 1 / -1;
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { useToggleButtonGroup } from "../../../../../common/ToggleButtonGroup/hooks/UseToggleButtonGroup/hook";
|
|
3
|
+
import { RANGE_OPERATOR } from "../../types";
|
|
4
|
+
export const useFilterRange = () => {
|
|
5
|
+
const { onChange, value } = useToggleButtonGroup(RANGE_OPERATOR.BETWEEN);
|
|
6
|
+
const onSubmit = useCallback((e) => {
|
|
7
|
+
e.preventDefault();
|
|
8
|
+
}, []);
|
|
9
|
+
return {
|
|
10
|
+
onChange,
|
|
11
|
+
onSubmit,
|
|
12
|
+
value,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ToggleButtonGroupProps } from "@mui/material";
|
|
2
|
+
import { FormEvent } from "react";
|
|
3
|
+
import { RANGE_OPERATOR } from "../../types";
|
|
4
|
+
export interface UseFilterRange {
|
|
5
|
+
onChange: ToggleButtonGroupProps["onChange"];
|
|
6
|
+
onSubmit: (e: FormEvent) => void;
|
|
7
|
+
value: RANGE_OPERATOR;
|
|
8
|
+
}
|
|
@@ -2,6 +2,7 @@ import { Divider } from "@mui/material";
|
|
|
2
2
|
import React, { Fragment, useEffect, useRef, useState } from "react";
|
|
3
3
|
import { BREAKPOINT_FN_NAME, useBreakpointHelper, } from "../../../../hooks/useBreakpointHelper";
|
|
4
4
|
import { useWindowResize } from "../../../../hooks/useWindowResize";
|
|
5
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
5
6
|
import { DESKTOP_SM } from "../../../../theme/common/breakpoints";
|
|
6
7
|
import { Filter } from "../Filter/filter";
|
|
7
8
|
import { FilterTags } from "../FilterTags/filterTags";
|
|
@@ -42,7 +43,7 @@ export const Filters = ({ categoryFilters, closeAncestor, disabled = false, onFi
|
|
|
42
43
|
useEffect(() => {
|
|
43
44
|
setHeight(calculateListHeight(windowHeight, filterListRef.current));
|
|
44
45
|
}, [windowHeight]);
|
|
45
|
-
return (React.createElement(FilterList, { disabled: disabled, height: height, ref: filterListRef }, categoryFilters.map(({ categoryViews, label }, i) => (React.createElement(Fragment, { key: i },
|
|
46
|
+
return (React.createElement(FilterList, { "data-testid": TEST_IDS.FILTERS, disabled: disabled, height: height, ref: filterListRef }, categoryFilters.map(({ categoryViews, label }, i) => (React.createElement(Fragment, { key: i },
|
|
46
47
|
i !== 0 && React.createElement(Divider, null),
|
|
47
48
|
label && React.createElement(CategoryViewsLabel, null, label),
|
|
48
49
|
categoryViews.map((categoryView) => (React.createElement(Filter, { key: categoryView.key, categorySection: label, categoryView: categoryView, closeAncestor: closeAncestor, isFilterDrawer: isFilterDrawer, onFilter: onFilter, trackFilterOpened: trackFilterOpened, tags: renderFilterTags(categoryView, onFilter) }))))))));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { TestIdProps } from "../../../types";
|
|
1
2
|
import { FilterMenuSearchMatchRange } from "../../common/entities";
|
|
2
|
-
interface HighlightedLabelProps {
|
|
3
|
+
interface HighlightedLabelProps extends TestIdProps {
|
|
3
4
|
label: string;
|
|
4
5
|
ranges?: FilterMenuSearchMatchRange[];
|
|
5
6
|
}
|
|
6
|
-
export declare const HighlightedLabel: ({ label, ranges, }: HighlightedLabelProps) => JSX.Element;
|
|
7
|
+
export declare const HighlightedLabel: ({ label, ranges, testId, }: HighlightedLabelProps) => JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MatchHighlight } from "./highlightedLabel.styles";
|
|
3
|
-
export const HighlightedLabel = ({ label, ranges, }) => {
|
|
3
|
+
export const HighlightedLabel = ({ label, ranges, testId, }) => {
|
|
4
4
|
const items = [];
|
|
5
5
|
if (ranges) {
|
|
6
6
|
ranges = ranges.slice().sort(({ start: a }, { start: b }) => a - b);
|
|
@@ -29,5 +29,5 @@ export const HighlightedLabel = ({ label, ranges, }) => {
|
|
|
29
29
|
else {
|
|
30
30
|
items.push(label);
|
|
31
31
|
}
|
|
32
|
-
return React.createElement("span",
|
|
32
|
+
return React.createElement("span", { "data-testid": testId }, items);
|
|
33
33
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Checkbox, ListItemButton, ListItemText, ListSubheader, Typography, } from "@mui/material";
|
|
2
2
|
import React, { useEffect, useRef } from "react";
|
|
3
|
+
import { TEST_IDS } from "../../../../../../tests/testIds";
|
|
3
4
|
import { TEXT_BODY_SMALL_400 } from "../../../../../../theme/common/typography";
|
|
4
5
|
import { CheckedIcon } from "../../../../../common/CustomIcon/components/CheckedIcon/checkedIcon";
|
|
5
6
|
import { UncheckedIcon } from "../../../../../common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
|
|
@@ -18,9 +19,9 @@ export default function VariableSizeListItem({ item, onFilter, onUpdateItemSizeB
|
|
|
18
19
|
}, [key, onUpdateItemSizeByItemKey]);
|
|
19
20
|
if (item.type === ITEM_TYPE.VALUE) {
|
|
20
21
|
const { categoryKey, matchRanges, value: { count, key: valueKey, label, selected }, } = item;
|
|
21
|
-
return (React.createElement(ListItemButton, { ref: setRef, key: key, onClick: () => onFilter(categoryKey, valueKey, !selected, undefined, searchTerm), selected: selected, style: style },
|
|
22
|
+
return (React.createElement(ListItemButton, { "data-testid": TEST_IDS.FILTER_ITEM, ref: setRef, key: key, onClick: () => onFilter(categoryKey, valueKey, !selected, undefined, searchTerm), selected: selected, style: style },
|
|
22
23
|
React.createElement(Checkbox, { checked: selected, checkedIcon: React.createElement(CheckedIcon, null), icon: React.createElement(UncheckedIcon, null) }),
|
|
23
|
-
React.createElement(ListItemText, { disableTypography: true, primary: React.createElement(HighlightedLabel, { label: label, ranges: matchRanges }), secondary: React.createElement(Typography, { color: "ink.light", variant: TEXT_BODY_SMALL_400 }, count) })));
|
|
24
|
+
React.createElement(ListItemText, { disableTypography: true, primary: React.createElement(HighlightedLabel, { label: label, ranges: matchRanges, testId: TEST_IDS.FILTER_TERM }), secondary: React.createElement(Typography, { color: "ink.light", "data-testid": TEST_IDS.FILTER_COUNT, variant: TEXT_BODY_SMALL_400 }, count) })));
|
|
24
25
|
}
|
|
25
26
|
else if (item.type === ITEM_TYPE.CATEGORY) {
|
|
26
27
|
return (React.createElement(ListSubheader, { key: key, ref: setRef, style: style }, item.categoryLabel));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { createContext, useContext, useEffect, useRef, useState, } from "react";
|
|
2
2
|
import { SELECTOR } from "../../../../common/selectors";
|
|
3
3
|
import { BREAKPOINT_FN_NAME, useBreakpointHelper, } from "../../../../hooks/useBreakpointHelper";
|
|
4
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
4
5
|
import { DESKTOP_SM } from "../../../../theme/common/breakpoints";
|
|
5
6
|
import { SearchCloseButton } from "../SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton";
|
|
6
7
|
import { SearchAllFiltersSearch } from "../SearchAllFiltersSearch/searchAllFiltersSearch";
|
|
@@ -85,7 +86,7 @@ export const SearchAllFilters = ({ categoryViews, drawerOpen = false, onFilter,
|
|
|
85
86
|
open,
|
|
86
87
|
searchTerm,
|
|
87
88
|
} },
|
|
88
|
-
React.createElement(Autocomplete, { clearOnBlur: desktopSmUp, filterOptions: (options) => options, freeSolo: true, ListboxComponent: Listbox, onBlur: desktopSmUp ? onCloseSearch : undefined, onClose: desktopSmUp ? onCloseSearch : undefined, onFocus: onOpenSearch, onOpen: onOpen, open: open, options: [""], PopperComponent: AutocompletePopper, ref: autocompleteRef, renderInput: (props) => renderInput({
|
|
89
|
+
React.createElement(Autocomplete, { clearOnBlur: desktopSmUp, "data-testid": TEST_IDS.SEARCH_ALL_FILTERS, filterOptions: (options) => options, freeSolo: true, ListboxComponent: Listbox, onBlur: desktopSmUp ? onCloseSearch : undefined, onClose: desktopSmUp ? onCloseSearch : undefined, onFocus: onOpenSearch, onOpen: onOpen, open: open, options: [""], PopperComponent: AutocompletePopper, ref: autocompleteRef, renderInput: (props) => renderInput({
|
|
89
90
|
...props,
|
|
90
91
|
InputProps: {
|
|
91
92
|
...props.InputProps,
|
package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.styles.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import { TextField } from "@mui/material";
|
|
3
|
-
import { inkMain } from "../../../../styles/common/mixins/colors";
|
|
4
|
-
import { inkLight } from "../../../../theme/common/palette";
|
|
3
|
+
import { inkLight, inkMain } from "../../../../styles/common/mixins/colors";
|
|
5
4
|
export const InputField = styled(TextField) `
|
|
6
5
|
&& {
|
|
7
6
|
display: flex;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Checkbox, ListItemButton, ListItemText, Typography, } from "@mui/material";
|
|
2
2
|
import React, { useEffect, useRef } from "react";
|
|
3
3
|
import { SELECT_CATEGORY_KEY } from "../../../../providers/exploreState/constants";
|
|
4
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
4
5
|
import { TEXT_BODY_SMALL_400 } from "../../../../theme/common/typography";
|
|
5
6
|
import { CheckedIcon } from "../../../common/CustomIcon/components/CheckedIcon/checkedIcon";
|
|
6
7
|
import { UncheckedIcon } from "../../../common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
|
|
@@ -16,7 +17,7 @@ export default function VariableSizeListItem({ categoryKey, categorySection, mat
|
|
|
16
17
|
const handleItemClicked = () => {
|
|
17
18
|
onFilter(categoryKey, key, !selected, categorySection);
|
|
18
19
|
};
|
|
19
|
-
return (React.createElement(ListItemButton, { ref: listItemRef, onClick: handleItemClicked, selected: selected, style: style },
|
|
20
|
+
return (React.createElement(ListItemButton, { "data-testid": TEST_IDS.FILTER_ITEM, ref: listItemRef, onClick: handleItemClicked, selected: selected, style: style },
|
|
20
21
|
React.createElement(Checkbox, { checked: selected, checkedIcon: React.createElement(CheckedIcon, null), icon: React.createElement(UncheckedIcon, null) }),
|
|
21
|
-
React.createElement(ListItemText, { disableTypography: true, primary: React.createElement(HighlightedLabel, { label: label, ranges: labelRanges }), secondary: categoryKey !== SELECT_CATEGORY_KEY.SAVED_FILTERS && (React.createElement(Typography, { color: "ink.light", variant: TEXT_BODY_SMALL_400 }, count)) })));
|
|
22
|
+
React.createElement(ListItemText, { disableTypography: true, primary: React.createElement(HighlightedLabel, { label: label, ranges: labelRanges, testId: TEST_IDS.FILTER_TERM }), secondary: categoryKey !== SELECT_CATEGORY_KEY.SAVED_FILTERS && (React.createElement(Typography, { color: "ink.light", "data-testid": TEST_IDS.FILTER_COUNT, variant: TEXT_BODY_SMALL_400 }, count)) })));
|
|
22
23
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ChartViewProps } from "./types";
|
|
2
|
-
export declare const ChartView: ({ categoryFilters, loading, testId, }: ChartViewProps) => JSX.Element | null;
|
|
2
|
+
export declare const ChartView: ({ categoryFilters, entityName, loading, testId, }: ChartViewProps) => JSX.Element | null;
|
|
@@ -5,13 +5,16 @@ import { Loading, LOADING_PANEL_STYLE } from "../../../../../Loading/loading";
|
|
|
5
5
|
import { StyledGrid, StyledGridPaperSection } from "./chartView.styles";
|
|
6
6
|
import { Chart } from "./components/Chart/chart";
|
|
7
7
|
import { useChartView } from "./hooks/UseChartView/useChartView";
|
|
8
|
-
export const ChartView = ({ categoryFilters, loading, testId, }) => {
|
|
8
|
+
export const ChartView = ({ categoryFilters, entityName, loading, testId, }) => {
|
|
9
9
|
const { chartViewRef, selectCategoryViews, width } = useChartView(categoryFilters);
|
|
10
10
|
if (selectCategoryViews.length === 0)
|
|
11
11
|
return null;
|
|
12
12
|
return (React.createElement(Fragment, null,
|
|
13
13
|
React.createElement(Loading, { appear: false, autoPosition: false, loading: loading, panelStyle: LOADING_PANEL_STYLE.INHERIT }),
|
|
14
14
|
React.createElement(StyledGrid, { "data-testid": testId, ref: chartViewRef }, selectCategoryViews.map(({ key, label, values }) => (React.createElement(StyledGridPaperSection, { key: key },
|
|
15
|
-
React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_HEADING_SMALL },
|
|
15
|
+
React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_HEADING_SMALL },
|
|
16
|
+
entityName,
|
|
17
|
+
" per ",
|
|
18
|
+
label),
|
|
16
19
|
React.createElement(Chart, { selectCategoryValueViews: values, width: width })))))));
|
|
17
20
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export declare const BAR_GAP =
|
|
1
|
+
export declare const BAR_GAP = 8;
|
|
2
2
|
export declare const BAR_HEIGHT = 24;
|
|
3
3
|
export declare const DATA_FIELD: {
|
|
4
4
|
readonly COUNT: "count";
|
|
5
5
|
readonly LABEL: "label";
|
|
6
6
|
readonly SELECTED: "selected";
|
|
7
7
|
};
|
|
8
|
+
export declare const MARGIN_LEFT = 136;
|
|
8
9
|
export declare const TEXT_PADDING = 8;
|
|
9
10
|
export declare const TICKS = 6;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export const BAR_GAP =
|
|
1
|
+
export const BAR_GAP = 8;
|
|
2
2
|
export const BAR_HEIGHT = 24;
|
|
3
3
|
export const DATA_FIELD = {
|
|
4
4
|
COUNT: "count",
|
|
5
5
|
LABEL: "label",
|
|
6
6
|
SELECTED: "selected",
|
|
7
7
|
};
|
|
8
|
+
export const MARGIN_LEFT = 136;
|
|
8
9
|
export const TEXT_PADDING = 8;
|
|
9
10
|
export const TICKS = 6;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Plot from "@observablehq/plot";
|
|
2
|
-
import { PALETTE } from "../../../../../../../../../styles/common/
|
|
2
|
+
import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
|
|
3
3
|
import { formatCountSize } from "../../../../../../../../../utils/formatCountSize";
|
|
4
|
-
import { DATA_FIELD, TEXT_PADDING } from "./constants";
|
|
4
|
+
import { DATA_FIELD, MARGIN_LEFT, TEXT_PADDING } from "./constants";
|
|
5
5
|
import { getCategoryValueText, getCategoryValueTextFill, getColorRangeValue, getCountTextFill, getPlotHeight, getTicks, getXDomain, getYPaddingInner, getYPaddingOuter, isAnyValueSelected, renderText, } from "./utils";
|
|
6
6
|
export function getPlotOptions(selectCategoryValueViews, width) {
|
|
7
7
|
const isCategorySelected = isAnyValueSelected(selectCategoryValueViews);
|
|
@@ -14,6 +14,7 @@ export function getPlotOptions(selectCategoryValueViews, width) {
|
|
|
14
14
|
height: getPlotHeight(selectCategoryValueViews.length),
|
|
15
15
|
margin: 0,
|
|
16
16
|
marginBottom: 32,
|
|
17
|
+
marginLeft: MARGIN_LEFT,
|
|
17
18
|
marks: [
|
|
18
19
|
Plot.axisX({
|
|
19
20
|
className: "x-axis",
|
|
@@ -32,19 +33,21 @@ export function getPlotOptions(selectCategoryValueViews, width) {
|
|
|
32
33
|
fill: DATA_FIELD.SELECTED,
|
|
33
34
|
rx1: 0,
|
|
34
35
|
rx2: 4,
|
|
35
|
-
sort: { y:
|
|
36
|
+
sort: { order: "descending", y: "x" }, // Sort by count (x-axis), descending.
|
|
36
37
|
x: DATA_FIELD.COUNT,
|
|
37
38
|
y: DATA_FIELD.LABEL,
|
|
38
39
|
}),
|
|
39
40
|
Plot.text(selectCategoryValueViews, {
|
|
40
41
|
className: "text-category-label",
|
|
41
|
-
dx:
|
|
42
|
-
dy: -
|
|
42
|
+
dx: -TEXT_PADDING,
|
|
43
|
+
dy: -2,
|
|
43
44
|
fill: (d) => getCategoryValueTextFill(d, isCategorySelected),
|
|
44
|
-
|
|
45
|
+
lineHeight: 0.8125,
|
|
46
|
+
lineWidth: (MARGIN_LEFT - TEXT_PADDING) / 13, // "em" unit; font-size is 13px.
|
|
45
47
|
text: getCategoryValueText,
|
|
46
|
-
textAnchor: "
|
|
48
|
+
textAnchor: "end",
|
|
47
49
|
textOverflow: "ellipsis",
|
|
50
|
+
title: getCategoryValueText,
|
|
48
51
|
x: 0,
|
|
49
52
|
y: DATA_FIELD.LABEL,
|
|
50
53
|
}),
|
|
@@ -90,6 +90,12 @@ export declare function getYPaddingOuter(): number;
|
|
|
90
90
|
* @returns True if any value is selected, false otherwise.
|
|
91
91
|
*/
|
|
92
92
|
export declare function isAnyValueSelected(data: SelectCategoryValueView[]): boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Parses a transform `translate` string and returns the x and y coordinates.
|
|
95
|
+
* @param translate - The transform `translate` string.
|
|
96
|
+
* @returns A tuple of the x and y coordinates.
|
|
97
|
+
*/
|
|
98
|
+
export declare function parseTranslate(translate: string | null): [number, number];
|
|
93
99
|
/**
|
|
94
100
|
* Renders text elements for count values, positioning them either inside or outside bars
|
|
95
101
|
* based on available space. If text doesn't fit inside a bar, it's repositioned outside
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PALETTE } from "../../../../../../../../../styles/common/
|
|
2
|
-
import { BAR_GAP, BAR_HEIGHT, TEXT_PADDING, TICKS } from "./constants";
|
|
1
|
+
import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
|
|
2
|
+
import { BAR_GAP, BAR_HEIGHT, MARGIN_LEFT, TEXT_PADDING, TICKS, } from "./constants";
|
|
3
3
|
/**
|
|
4
4
|
* Returns the text for the category value point.
|
|
5
5
|
* @param d - Data point.
|
|
@@ -146,7 +146,7 @@ export function isAnyValueSelected(data) {
|
|
|
146
146
|
* @param translate - The transform `translate` string.
|
|
147
147
|
* @returns A tuple of the x and y coordinates.
|
|
148
148
|
*/
|
|
149
|
-
function parseTranslate(translate) {
|
|
149
|
+
export function parseTranslate(translate) {
|
|
150
150
|
const match = translate?.match(/translate\(\s*([-\d.]+)[,\s]+([-\d.]+)\s*\)/);
|
|
151
151
|
let tx = 0;
|
|
152
152
|
let ty = 0;
|
|
@@ -180,7 +180,7 @@ export function renderText(index, scales, values, dimensions, context, next) {
|
|
|
180
180
|
if (!ctm || !bBox)
|
|
181
181
|
continue;
|
|
182
182
|
// If the text doesn't fit inside the bar, reposition it outside.
|
|
183
|
-
if (ctm.e - bBox.width - TEXT_PADDING <
|
|
183
|
+
if (ctm.e - bBox.width - TEXT_PADDING < MARGIN_LEFT) {
|
|
184
184
|
const [tx, ty] = parseTranslate(textEl.getAttribute("transform"));
|
|
185
185
|
// Translate by the width of the bar plus padding on each side.
|
|
186
186
|
textEl.setAttribute("transform", `translate(${tx + bBox.width + TEXT_PADDING * 2}, ${ty})`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Box } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { PALETTE } from "../../../../../../../../../styles/common/
|
|
3
|
+
import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
|
|
4
4
|
import { Chart } from "../chart";
|
|
5
5
|
import { CHART_ARGS, SELECT_CHART_ARGS } from "./args";
|
|
6
6
|
const meta = {
|
|
@@ -10,7 +10,6 @@ const meta = {
|
|
|
10
10
|
(Story, context) => (React.createElement(Box, { sx: { backgroundColor: PALETTE.COMMON_WHITE, padding: 5 } },
|
|
11
11
|
React.createElement(Story, { ...context }))),
|
|
12
12
|
],
|
|
13
|
-
title: "Components/Entities/EntitiesView/ChartView/Chart",
|
|
14
13
|
};
|
|
15
14
|
export default meta;
|
|
16
15
|
export const Default = {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { EntityConfig } from "../../../../../../config/entities";
|
|
1
2
|
import { CategoryFilter } from "../../../../../Filter/components/Filters/filters";
|
|
2
3
|
import { TestIdProps } from "../../../../../types";
|
|
3
4
|
export interface ChartViewProps extends TestIdProps {
|
|
4
5
|
categoryFilters: CategoryFilter[];
|
|
6
|
+
entityName: EntityConfig["label"];
|
|
5
7
|
loading: boolean;
|
|
6
8
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { EntitiesViewProps } from "./types";
|
|
2
|
-
export declare const EntitiesView: ({ children, onChange,
|
|
2
|
+
export declare const EntitiesView: ({ children, onChange, viewMode, viewStatus, }: EntitiesViewProps) => JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
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";
|
|
6
|
-
export const EntitiesView = ({ children, onChange,
|
|
7
|
-
return (React.createElement(StyledFluidPaper, { testId:
|
|
7
|
+
export const EntitiesView = ({ children, onChange, viewMode, viewStatus, }) => {
|
|
8
|
+
return (React.createElement(StyledFluidPaper, { testId: TEST_IDS.ENTITIES_VIEW },
|
|
8
9
|
React.createElement(GridPaper, null,
|
|
9
10
|
viewStatus.disabled ? null : (React.createElement(Toolbar, null,
|
|
10
11
|
React.createElement(ToggleButtonGroup, { exclusive: true, value: viewMode, onChange: onChange },
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
export interface EntitiesViewProps extends ChildrenProps
|
|
4
|
+
export interface EntitiesViewProps extends ChildrenProps {
|
|
5
5
|
onChange: ToggleButtonGroupProps["onChange"];
|
|
6
6
|
viewMode: VIEW_MODE;
|
|
7
7
|
viewStatus: ViewStatus;
|
|
@@ -2,11 +2,12 @@ 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
|
export const ExportButton = () => {
|
|
7
8
|
const { disabled, isLoading, message } = useDownloadStatus();
|
|
8
9
|
return (React.createElement(Tooltip, { arrow: true, title: message },
|
|
9
10
|
React.createElement("span", null,
|
|
10
11
|
React.createElement(Link, { href: "/export", legacyBehavior: true, passHref: true },
|
|
11
|
-
React.createElement(Button, { disabled: disabled || isLoading, href: "passHref", id: "button-cohort-export" }, "Export")))));
|
|
12
|
+
React.createElement(Button, { "data-testid": TEST_IDS.EXPORT_BUTTON, disabled: disabled || isLoading, href: "passHref", id: "button-cohort-export" }, "Export")))));
|
|
12
13
|
};
|
|
@@ -4,6 +4,6 @@ export declare const Slogan: import("@emotion/styled").StyledComponent<{
|
|
|
4
4
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
5
|
export declare const Divider: import("@emotion/styled").StyledComponent<import("@mui/material").DividerOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & {
|
|
6
6
|
ref?: ((instance: HTMLHRElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLHRElement> | null | undefined;
|
|
7
|
-
}, "style" | "className" | "classes" | "children" | "textAlign" | "sx" | "variant" | "orientation" | "
|
|
7
|
+
}, "style" | "className" | "classes" | "children" | "textAlign" | "sx" | "variant" | "orientation" | "absolute" | "light" | "flexItem"> & {
|
|
8
8
|
theme?: import("@emotion/react").Theme;
|
|
9
9
|
}, {}, {}>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { css } from "@emotion/react";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { Tab as MTab, Tabs as MTabs } from "@mui/material";
|
|
4
|
-
import { smokeMain } from "../../../../styles/common/mixins/colors";
|
|
4
|
+
import { inkMain, smokeMain } from "../../../../styles/common/mixins/colors";
|
|
5
5
|
import { textBody500, textBodySmall400, } from "../../../../styles/common/mixins/fonts";
|
|
6
|
-
import { inkMain } from "../../../../theme/common/palette";
|
|
7
6
|
export const tab = css `
|
|
8
7
|
align-items: flex-start;
|
|
9
8
|
margin: 0;
|