@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [26.0.0](https://github.com/DataBiosphere/findable-ui/compare/v25.1.0...v26.0.0) (2025-04-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* bump nextjs version to latest in the 14 branch at least to 14.2.15 ([#431](https://github.com/DataBiosphere/findable-ui/issues/431)) (#436)
|
|
9
|
+
* fix duplication of component type basecomponentprops ([#420](https://github.com/DataBiosphere/findable-ui/issues/420)) (#421)
|
|
10
|
+
* add css shadow variables to theme ([#417](https://github.com/DataBiosphere/findable-ui/issues/417)) (#419)
|
|
11
|
+
* add update catalog mode filters to support a range filter ([#398](https://github.com/DataBiosphere/findable-ui/issues/398)) (#418)
|
|
12
|
+
* separate type exports from useexploremode hook to avoid test import issues ([#414](https://github.com/DataBiosphere/findable-ui/issues/414)) (#415)
|
|
13
|
+
* refactor palette.ts - limit public surface area ([#394](https://github.com/DataBiosphere/findable-ui/issues/394)) (#416)
|
|
14
|
+
* externalized data dictionary config #366 ([#404](https://github.com/DataBiosphere/findable-ui/issues/404))
|
|
15
|
+
* refactor button constants ([#405](https://github.com/DataBiosphere/findable-ui/issues/405)) (#406)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* add update catalog mode filters to support a range filter ([#398](https://github.com/DataBiosphere/findable-ui/issues/398)) ([#418](https://github.com/DataBiosphere/findable-ui/issues/418)) ([4794b91](https://github.com/DataBiosphere/findable-ui/commit/4794b91d265b679393ba19d794cfd342a4d915ec))
|
|
20
|
+
* chart view - sort bars by size - largest first ([#409](https://github.com/DataBiosphere/findable-ui/issues/409)) ([#411](https://github.com/DataBiosphere/findable-ui/issues/411)) ([768d068](https://github.com/DataBiosphere/findable-ui/commit/768d068924df7a120cd79f82cbb3138f64c028cb))
|
|
21
|
+
* chart view - update titles to show the entity type ([#412](https://github.com/DataBiosphere/findable-ui/issues/412)) ([#413](https://github.com/DataBiosphere/findable-ui/issues/413)) ([e0d9038](https://github.com/DataBiosphere/findable-ui/commit/e0d9038160ef109ce87f417fb729a6c16d0de537))
|
|
22
|
+
* externalized data dictionary config [#366](https://github.com/DataBiosphere/findable-ui/issues/366) ([2b986bb](https://github.com/DataBiosphere/findable-ui/commit/2b986bb0a647019f19653cb0ba758b4778f74267))
|
|
23
|
+
* externalized data dictionary config [#366](https://github.com/DataBiosphere/findable-ui/issues/366) ([#404](https://github.com/DataBiosphere/findable-ui/issues/404)) ([2b986bb](https://github.com/DataBiosphere/findable-ui/commit/2b986bb0a647019f19653cb0ba758b4778f74267))
|
|
24
|
+
* range filter component ([#397](https://github.com/DataBiosphere/findable-ui/issues/397)) ([#408](https://github.com/DataBiosphere/findable-ui/issues/408)) ([56fbc75](https://github.com/DataBiosphere/findable-ui/commit/56fbc756e4175a6c1ccdac325ecfd0603e71b0b6))
|
|
25
|
+
* update chart ui to make charts more compact ([#429](https://github.com/DataBiosphere/findable-ui/issues/429)) ([#430](https://github.com/DataBiosphere/findable-ui/issues/430)) ([916f004](https://github.com/DataBiosphere/findable-ui/commit/916f004fa0e78be356ac0e12edb6f4e256f51092))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* make gridtracksize import relative ([#434](https://github.com/DataBiosphere/findable-ui/issues/434)) ([#435](https://github.com/DataBiosphere/findable-ui/issues/435)) ([8da5c47](https://github.com/DataBiosphere/findable-ui/commit/8da5c4729ea2fa4986dacf0ce07d07bdbbbc69fc))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Chores
|
|
34
|
+
|
|
35
|
+
* bump nextjs version to latest in the 14 branch at least to 14.2.15 ([#431](https://github.com/DataBiosphere/findable-ui/issues/431)) ([#436](https://github.com/DataBiosphere/findable-ui/issues/436)) ([c60b3e8](https://github.com/DataBiosphere/findable-ui/commit/c60b3e82dc2cea513cfda6bff3de44310125fc27))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Code Refactoring
|
|
39
|
+
|
|
40
|
+
* add css shadow variables to theme ([#417](https://github.com/DataBiosphere/findable-ui/issues/417)) ([#419](https://github.com/DataBiosphere/findable-ui/issues/419)) ([55fcfb4](https://github.com/DataBiosphere/findable-ui/commit/55fcfb4d2f7ecdcbbc9328da585a3026d42ee0b6))
|
|
41
|
+
* chart test ([#432](https://github.com/DataBiosphere/findable-ui/issues/432)) ([#433](https://github.com/DataBiosphere/findable-ui/issues/433)) ([8cabd60](https://github.com/DataBiosphere/findable-ui/commit/8cabd60a9fcfa679b10018d17404270b589eb091))
|
|
42
|
+
* fix duplication of component type basecomponentprops ([#420](https://github.com/DataBiosphere/findable-ui/issues/420)) ([#421](https://github.com/DataBiosphere/findable-ui/issues/421)) ([1096940](https://github.com/DataBiosphere/findable-ui/commit/1096940bdfbabfa0c71bc69cb22f3e1c8883844a))
|
|
43
|
+
* refactor button constants ([#405](https://github.com/DataBiosphere/findable-ui/issues/405)) ([#406](https://github.com/DataBiosphere/findable-ui/issues/406)) ([65681b5](https://github.com/DataBiosphere/findable-ui/commit/65681b5220bf7b9f9d9d29cbc0fd4e5447f98a70))
|
|
44
|
+
* refactor palette.ts - limit public surface area ([#394](https://github.com/DataBiosphere/findable-ui/issues/394)) ([#416](https://github.com/DataBiosphere/findable-ui/issues/416)) ([f2762f5](https://github.com/DataBiosphere/findable-ui/commit/f2762f58c188bbf21c17a73c00f2a7e1ed235fbd))
|
|
45
|
+
* separate type exports from useexploremode hook to avoid test import issues ([#414](https://github.com/DataBiosphere/findable-ui/issues/414)) ([#415](https://github.com/DataBiosphere/findable-ui/issues/415)) ([9981962](https://github.com/DataBiosphere/findable-ui/commit/9981962c614f9e064156d892903c6e2d131215d4))
|
|
46
|
+
|
|
47
|
+
## [25.1.0](https://github.com/DataBiosphere/findable-ui/compare/v25.0.0...v25.1.0) (2025-04-14)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Features
|
|
51
|
+
|
|
52
|
+
* add test ids to key testable components ([#401](https://github.com/DataBiosphere/findable-ui/issues/401)) ([#403](https://github.com/DataBiosphere/findable-ui/issues/403)) ([99a41f8](https://github.com/DataBiosphere/findable-ui/commit/99a41f8661d0794d20b4e610a24c9fe1b8fbc4f1))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Bug Fixes
|
|
56
|
+
|
|
57
|
+
* fix theme with deepmerge ([#399](https://github.com/DataBiosphere/findable-ui/issues/399)) ([#400](https://github.com/DataBiosphere/findable-ui/issues/400)) ([981d8f9](https://github.com/DataBiosphere/findable-ui/commit/981d8f9fb2a1acce20707d558c9880dc63af7485))
|
|
58
|
+
|
|
3
59
|
## [25.0.0](https://github.com/DataBiosphere/findable-ui/compare/v24.0.0...v25.0.0) (2025-04-11)
|
|
4
60
|
|
|
5
61
|
|
package/lib/common/entities.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ColumnDef } from "@tanstack/react-table";
|
|
2
|
+
import { GridTrackSize } from "../config/entities";
|
|
1
3
|
/**
|
|
2
4
|
* Model of a value of a metadata class.
|
|
3
5
|
*/
|
|
@@ -6,6 +8,10 @@ export interface Attribute {
|
|
|
6
8
|
key: string;
|
|
7
9
|
label: string;
|
|
8
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Model of attribute keys; used mostly when building data dictionary column definitions.
|
|
13
|
+
*/
|
|
14
|
+
export type AttributeValue = Attribute[keyof Attribute];
|
|
9
15
|
/**
|
|
10
16
|
* Filterable metadata keys.
|
|
11
17
|
*/
|
|
@@ -38,6 +44,25 @@ export type CategoryValueKey = unknown;
|
|
|
38
44
|
export interface DataDictionary {
|
|
39
45
|
classes: Class[];
|
|
40
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Display model of a data dictionary column.
|
|
49
|
+
*/
|
|
50
|
+
export interface DataDictionaryColumnDef {
|
|
51
|
+
attributeDisplayName: string;
|
|
52
|
+
attributeSlotName: string;
|
|
53
|
+
width: {
|
|
54
|
+
max: GridTrackSize;
|
|
55
|
+
min: GridTrackSize;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Configuration of data dictionary; contains schema definition (that is, the actual data
|
|
60
|
+
* dictionary) as well as column def for displaying the data dictionary.
|
|
61
|
+
*/
|
|
62
|
+
export interface DataDictionaryConfig {
|
|
63
|
+
columnDefs: ColumnDef<Attribute, Attribute[keyof Attribute]>[];
|
|
64
|
+
dataDictionary: DataDictionary;
|
|
65
|
+
}
|
|
41
66
|
/**
|
|
42
67
|
* Label and description values from a data dictionary that are added to a site
|
|
43
68
|
* config value.
|
|
@@ -29,16 +29,18 @@ export function annotateColumnConfig(siteConfig, annotationsByKey) {
|
|
|
29
29
|
*/
|
|
30
30
|
export function annotateSiteConfig(siteConfig) {
|
|
31
31
|
// Build and map data dictionary annotations by key.
|
|
32
|
-
const {
|
|
33
|
-
if (!
|
|
32
|
+
const { dataDictionaries: dataDictionaryConfigs } = siteConfig;
|
|
33
|
+
if (!dataDictionaryConfigs || !dataDictionaryConfigs.length) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
for (const dataDictionaryConfig of dataDictionaryConfigs) {
|
|
37
|
+
const annotationsByKey = keyAnnotationsByKey(dataDictionaryConfig.dataDictionary);
|
|
38
|
+
// Annotate elements of site config.
|
|
39
|
+
annotateEntityConfig(siteConfig, annotationsByKey);
|
|
40
|
+
annotateDefaultCategoryConfig(siteConfig, annotationsByKey);
|
|
41
|
+
annotateEntityCategoryConfig(siteConfig, annotationsByKey);
|
|
42
|
+
annotateColumnConfig(siteConfig, annotationsByKey);
|
|
43
|
+
}
|
|
42
44
|
}
|
|
43
45
|
/**
|
|
44
46
|
* Annotate entity configuration with data dictionary values. Specifically, look
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ClassesProps } from "./types";
|
|
2
|
-
export declare const Entities: ({ classes, spacing }: ClassesProps) => JSX.Element;
|
|
2
|
+
export declare const Entities: ({ classes, columnDefs, spacing, }: ClassesProps) => JSX.Element;
|
|
@@ -2,6 +2,6 @@ import { Grid } from "@mui/material";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Entity } from "../Entity/entity";
|
|
4
4
|
import { GRID_PROPS } from "./constants";
|
|
5
|
-
export const Entities = ({ classes, spacing }) => {
|
|
6
|
-
return (React.createElement(Grid, { ...GRID_PROPS }, classes.map((classData) => (React.createElement(Entity, { key: classData.key, class: classData, spacing: spacing })))));
|
|
5
|
+
export const Entities = ({ classes, columnDefs, spacing, }) => {
|
|
6
|
+
return (React.createElement(Grid, { ...GRID_PROPS }, classes.map((classData) => (React.createElement(Entity, { key: classData.key, class: classData, columnDefs: columnDefs, spacing: spacing })))));
|
|
7
7
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColumnDef } from "@tanstack/react-table";
|
|
2
|
+
import { Attribute, AttributeValue, Class } from "../../../../common/entities";
|
|
2
3
|
import { LayoutSpacing } from "../../hooks/UseLayoutSpacing/types";
|
|
3
4
|
export interface ClassesProps {
|
|
4
5
|
classes: Class[];
|
|
6
|
+
columnDefs: ColumnDef<Attribute, AttributeValue>[];
|
|
5
7
|
spacing?: LayoutSpacing;
|
|
6
8
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { EntityProps } from "./types";
|
|
2
|
-
export declare const Entity: ({ class: classData, spacing, }: EntityProps) => JSX.Element;
|
|
2
|
+
export declare const Entity: ({ class: classData, columnDefs, spacing, }: EntityProps) => JSX.Element;
|
|
@@ -6,8 +6,8 @@ import { useTable } from "../Table/hook";
|
|
|
6
6
|
import { Table } from "../Table/table";
|
|
7
7
|
import { GRID_PROPS } from "./constants";
|
|
8
8
|
import { StyledTypography } from "./entity.styles";
|
|
9
|
-
export const Entity = ({ class: classData, spacing, }) => {
|
|
10
|
-
const table = useTable(classData.attributes);
|
|
9
|
+
export const Entity = ({ class: classData, columnDefs, spacing, }) => {
|
|
10
|
+
const table = useTable(classData.attributes, columnDefs);
|
|
11
11
|
return (React.createElement(Grid, { ...GRID_PROPS, rowGap: 4 },
|
|
12
12
|
React.createElement(Grid, { ...GRID_PROPS, rowGap: 1 },
|
|
13
13
|
React.createElement(StyledTypography, { component: "h3", id: classData.key, variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_HEADING_SMALL, ...spacing },
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColumnDef } from "@tanstack/react-table";
|
|
2
|
+
import { Attribute, AttributeValue, Class } from "../../../../common/entities";
|
|
2
3
|
import { LayoutSpacing } from "../../hooks/UseLayoutSpacing/types";
|
|
3
4
|
export interface EntityProps {
|
|
4
5
|
class: Class;
|
|
6
|
+
columnDefs: ColumnDef<Attribute, AttributeValue>[];
|
|
5
7
|
spacing?: LayoutSpacing;
|
|
6
8
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { CellContext } from "@tanstack/react-table";
|
|
2
|
-
import { Attribute } from "../../../../../../common/entities";
|
|
3
|
-
import { AttributeValue } from "../../columns/types";
|
|
2
|
+
import { Attribute, AttributeValue } from "../../../../../../common/entities";
|
|
4
3
|
export type BasicCellProps = CellContext<Attribute, AttributeValue>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Table } from "@tanstack/react-table";
|
|
1
|
+
import { ColumnDef, Table } from "@tanstack/react-table";
|
|
2
2
|
import { Attribute } from "../../../../common/entities";
|
|
3
|
-
export declare const useTable: (data: Attribute[]) => Table<Attribute>;
|
|
3
|
+
export declare const useTable: (data: Attribute[], columnDefs: ColumnDef<Attribute, Attribute[keyof Attribute]>[]) => Table<Attribute>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useReactTable } from "@tanstack/react-table";
|
|
2
|
-
import { COLUMN_DEFS } from "./columns/columnDef";
|
|
3
2
|
import { useTableOptions } from "./options/hook";
|
|
4
|
-
export const useTable = (data) => {
|
|
3
|
+
export const useTable = (data, columnDefs) => {
|
|
5
4
|
const tableOptions = useTableOptions();
|
|
6
5
|
return useReactTable({
|
|
7
6
|
...tableOptions,
|
|
8
|
-
columns:
|
|
7
|
+
columns: columnDefs,
|
|
9
8
|
data,
|
|
10
9
|
});
|
|
11
10
|
};
|
|
@@ -10,7 +10,7 @@ import { View } from "./dataDictionary.styles";
|
|
|
10
10
|
import { useDataDictionary } from "./hooks/UseDataDictionary/hook";
|
|
11
11
|
import { useLayoutSpacing } from "./hooks/UseLayoutSpacing/hook";
|
|
12
12
|
export const DataDictionary = ({ className, EntitiesLayout = DefaultEntitiesLayout, Outline = DefaultOutline, OutlineLayout = DefaultOutlineLayout, Title = DefaultTitle, TitleLayout = DefaultTitleLayout, }) => {
|
|
13
|
-
const { classes } = useDataDictionary();
|
|
13
|
+
const { classes, columnDefs } = useDataDictionary();
|
|
14
14
|
const { spacing } = useLayoutSpacing();
|
|
15
15
|
const outline = useMemo(() => buildClassesOutline(classes), [classes]);
|
|
16
16
|
return (React.createElement(View, { className: className },
|
|
@@ -19,5 +19,5 @@ export const DataDictionary = ({ className, EntitiesLayout = DefaultEntitiesLayo
|
|
|
19
19
|
React.createElement(OutlineLayout, { ...spacing },
|
|
20
20
|
React.createElement(Outline, { outline: outline })),
|
|
21
21
|
React.createElement(EntitiesLayout, { ...spacing },
|
|
22
|
-
React.createElement(Entities, { classes: classes, spacing: spacing }))));
|
|
22
|
+
React.createElement(Entities, { classes: classes, columnDefs: columnDefs, spacing: spacing }))));
|
|
23
23
|
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { useConfig } from "../../../../hooks/useConfig";
|
|
3
3
|
export const useDataDictionary = () => {
|
|
4
|
-
const { config: {
|
|
5
|
-
|
|
4
|
+
const { config: { dataDictionaries: dataDictionaryConfigs }, } = useConfig();
|
|
5
|
+
const dataDictionaryConfig = dataDictionaryConfigs?.[0]; // TODO: Handle multiple data dictionaries
|
|
6
|
+
return useMemo(() => {
|
|
7
|
+
const classes = dataDictionaryConfig?.dataDictionary?.classes || [];
|
|
8
|
+
const columnDefs = dataDictionaryConfig?.columnDefs || [];
|
|
9
|
+
return { classes, columnDefs };
|
|
10
|
+
}, [dataDictionaryConfig]);
|
|
6
11
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColumnDef } from "@tanstack/react-table";
|
|
2
|
+
import { Attribute, AttributeValue, Class } from "../../../../common/entities";
|
|
2
3
|
export interface UseDataDictionary {
|
|
3
4
|
classes: Class[];
|
|
5
|
+
columnDefs: ColumnDef<Attribute, AttributeValue>[];
|
|
4
6
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Table } from "../table";
|
|
3
|
+
export declare const DEFAULT_DATA: {
|
|
4
|
+
DATA_TYPES: {
|
|
5
|
+
EXOME: string;
|
|
6
|
+
METHYLATION_ARRAY: string;
|
|
7
|
+
RNASEQ: string;
|
|
8
|
+
WHOLE_GENOME: string;
|
|
9
|
+
};
|
|
10
|
+
DISEASES: {
|
|
11
|
+
ATHEROSCLEROSIS: string;
|
|
12
|
+
CONTROL: string;
|
|
13
|
+
EPIGENETIC_VARIATION: string;
|
|
14
|
+
MYOCARDIAL_INFARCTION: string;
|
|
15
|
+
NONE: string;
|
|
16
|
+
};
|
|
17
|
+
STUDY_NAME: {
|
|
18
|
+
CARDIOVASCULAR_DISEASE_STUDY: string;
|
|
19
|
+
CORONARY_ARTERY_DISEASE_STUDY: string;
|
|
20
|
+
EPIGENETIC_STUDY: string;
|
|
21
|
+
EPILEPSY_STUDY: string;
|
|
22
|
+
GENOMIC_STUDY: string;
|
|
23
|
+
MYOCARDIAL_INFARCTION_STUDY: string;
|
|
24
|
+
MYOCARDIAL_INFARCTION_STUDY_X: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const DEFAULT_TABLE_ARGS: ComponentProps<typeof Table>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export const DEFAULT_DATA = {
|
|
2
|
+
DATA_TYPES: {
|
|
3
|
+
EXOME: "Exome",
|
|
4
|
+
METHYLATION_ARRAY: "Methylation Array",
|
|
5
|
+
RNASEQ: "RNAseq",
|
|
6
|
+
WHOLE_GENOME: "Whole Genome",
|
|
7
|
+
},
|
|
8
|
+
DISEASES: {
|
|
9
|
+
ATHEROSCLEROSIS: "Atherosclerosis",
|
|
10
|
+
CONTROL: "Control",
|
|
11
|
+
EPIGENETIC_VARIATION: "Epigenetic Variation",
|
|
12
|
+
MYOCARDIAL_INFARCTION: "Myocardial Infarction",
|
|
13
|
+
NONE: "None",
|
|
14
|
+
},
|
|
15
|
+
STUDY_NAME: {
|
|
16
|
+
CARDIOVASCULAR_DISEASE_STUDY: "Cardiovascular Disease Study",
|
|
17
|
+
CORONARY_ARTERY_DISEASE_STUDY: "Coronary Artery Disease Study",
|
|
18
|
+
EPIGENETIC_STUDY: "Epigenetic Study",
|
|
19
|
+
EPILEPSY_STUDY: "Epilepsy Study",
|
|
20
|
+
GENOMIC_STUDY: "Genomic Study",
|
|
21
|
+
MYOCARDIAL_INFARCTION_STUDY: "Myocardial Infarction Study",
|
|
22
|
+
MYOCARDIAL_INFARCTION_STUDY_X: "Myocardial Infarction Study X",
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
export const DEFAULT_TABLE_ARGS = {
|
|
26
|
+
columns: [
|
|
27
|
+
{
|
|
28
|
+
accessorKey: "studyName",
|
|
29
|
+
filterFn: "arrIncludesSome",
|
|
30
|
+
header: "Study Name",
|
|
31
|
+
id: "studyName",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
accessorKey: "dataType",
|
|
35
|
+
filterFn: "arrIncludesSome",
|
|
36
|
+
header: "Data Type",
|
|
37
|
+
id: "dataType",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
accessorKey: "disease",
|
|
41
|
+
filterFn: "arrIncludesSome",
|
|
42
|
+
header: "Disease",
|
|
43
|
+
id: "disease",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
accessorKey: "participantCount",
|
|
47
|
+
filterFn: "inNumberRange",
|
|
48
|
+
header: "Participation Count",
|
|
49
|
+
id: "participantCount",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
gridTemplateColumns: "auto repeat(3, 1fr) auto",
|
|
53
|
+
items: [
|
|
54
|
+
{
|
|
55
|
+
dataType: [
|
|
56
|
+
DEFAULT_DATA.DATA_TYPES.WHOLE_GENOME,
|
|
57
|
+
DEFAULT_DATA.DATA_TYPES.EXOME,
|
|
58
|
+
],
|
|
59
|
+
disease: DEFAULT_DATA.DISEASES.ATHEROSCLEROSIS,
|
|
60
|
+
participantCount: 265,
|
|
61
|
+
studyName: DEFAULT_DATA.STUDY_NAME.CORONARY_ARTERY_DISEASE_STUDY,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
dataType: [DEFAULT_DATA.DATA_TYPES.EXOME],
|
|
65
|
+
disease: DEFAULT_DATA.DISEASES.CONTROL,
|
|
66
|
+
participantCount: 102,
|
|
67
|
+
studyName: DEFAULT_DATA.STUDY_NAME.EPILEPSY_STUDY,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
dataType: [DEFAULT_DATA.DATA_TYPES.WHOLE_GENOME],
|
|
71
|
+
disease: DEFAULT_DATA.DISEASES.MYOCARDIAL_INFARCTION,
|
|
72
|
+
participantCount: 103,
|
|
73
|
+
studyName: DEFAULT_DATA.STUDY_NAME.MYOCARDIAL_INFARCTION_STUDY,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
dataType: [DEFAULT_DATA.DATA_TYPES.EXOME],
|
|
77
|
+
disease: DEFAULT_DATA.DISEASES.MYOCARDIAL_INFARCTION,
|
|
78
|
+
participantCount: 10,
|
|
79
|
+
studyName: DEFAULT_DATA.STUDY_NAME.CARDIOVASCULAR_DISEASE_STUDY,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
dataType: [DEFAULT_DATA.DATA_TYPES.RNASEQ],
|
|
83
|
+
disease: DEFAULT_DATA.DISEASES.NONE,
|
|
84
|
+
participantCount: 23,
|
|
85
|
+
studyName: DEFAULT_DATA.STUDY_NAME.GENOMIC_STUDY,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
dataType: [DEFAULT_DATA.DATA_TYPES.METHYLATION_ARRAY],
|
|
89
|
+
disease: DEFAULT_DATA.DISEASES.EPIGENETIC_VARIATION,
|
|
90
|
+
participantCount: 1,
|
|
91
|
+
studyName: DEFAULT_DATA.STUDY_NAME.EPIGENETIC_STUDY,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
dataType: [DEFAULT_DATA.DATA_TYPES.WHOLE_GENOME],
|
|
95
|
+
disease: DEFAULT_DATA.DISEASES.MYOCARDIAL_INFARCTION,
|
|
96
|
+
participantCount: 1000,
|
|
97
|
+
studyName: DEFAULT_DATA.STUDY_NAME.MYOCARDIAL_INFARCTION_STUDY_X,
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ColumnFiltersState } from "@tanstack/react-table";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import { Table } from "../../table";
|
|
4
|
+
export declare const COLUMN_FILTERS_STATE: Record<string, ColumnFiltersState>;
|
|
5
|
+
export declare const FILTER_TABLE_ARGS: ComponentProps<typeof Table>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { getFilteredRowModel } from "@tanstack/react-table";
|
|
2
|
+
import { COLUMN_IDENTIFIER } from "../../../../../Table/common/columnIdentifier";
|
|
3
|
+
import { DEFAULT_DATA, DEFAULT_TABLE_ARGS } from "../args";
|
|
4
|
+
export const COLUMN_FILTERS_STATE = {
|
|
5
|
+
ARRAY: [
|
|
6
|
+
{
|
|
7
|
+
id: "dataType",
|
|
8
|
+
value: [DEFAULT_DATA.DATA_TYPES.EXOME, DEFAULT_DATA.DATA_TYPES.RNASEQ],
|
|
9
|
+
},
|
|
10
|
+
],
|
|
11
|
+
RANGE_BETWEEN: [
|
|
12
|
+
{
|
|
13
|
+
id: "participantCount",
|
|
14
|
+
value: [10, 100],
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
RANGE_GREATER_THAN: [
|
|
18
|
+
{
|
|
19
|
+
id: "participantCount",
|
|
20
|
+
value: [100, null],
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
RANGE_LESS_THAN: [
|
|
24
|
+
{
|
|
25
|
+
id: "participantCount",
|
|
26
|
+
value: [null, 100],
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
STRING: [
|
|
30
|
+
{
|
|
31
|
+
id: "studyName",
|
|
32
|
+
value: [
|
|
33
|
+
DEFAULT_DATA.STUDY_NAME.CORONARY_ARTERY_DISEASE_STUDY,
|
|
34
|
+
DEFAULT_DATA.STUDY_NAME.MYOCARDIAL_INFARCTION_STUDY,
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
STRING_NO_MATCH: [{ id: "studyName", value: ["Invalid"] }],
|
|
39
|
+
};
|
|
40
|
+
export const FILTER_TABLE_ARGS = {
|
|
41
|
+
...DEFAULT_TABLE_ARGS,
|
|
42
|
+
tableOptions: {
|
|
43
|
+
enableFilters: true,
|
|
44
|
+
enableRowPosition: false,
|
|
45
|
+
getFilteredRowModel: getFilteredRowModel(),
|
|
46
|
+
initialState: {
|
|
47
|
+
columnVisibility: { [COLUMN_IDENTIFIER.ROW_POSITION]: false },
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Table } from "../../table";
|
|
3
|
+
declare const meta: Meta<typeof Table>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Table>;
|
|
6
|
+
export declare const FilterByStringValue: Story;
|
|
7
|
+
export declare const FilterByArrayValue: Story;
|
|
8
|
+
export declare const FilterByRangeBetweenValue: Story;
|
|
9
|
+
export declare const FilterByRangeGreaterThanValue: Story;
|
|
10
|
+
export declare const FilterByRangeLessThanValue: Story;
|
|
11
|
+
export declare const FilterByStringValueWithNoMatch: Story;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import tableMeta from "../table.stories";
|
|
2
|
+
import { COLUMN_FILTERS_STATE, FILTER_TABLE_ARGS } from "./args";
|
|
3
|
+
const meta = {
|
|
4
|
+
...tableMeta,
|
|
5
|
+
};
|
|
6
|
+
export default meta;
|
|
7
|
+
export const FilterByStringValue = {
|
|
8
|
+
args: {
|
|
9
|
+
...FILTER_TABLE_ARGS,
|
|
10
|
+
tableOptions: {
|
|
11
|
+
...FILTER_TABLE_ARGS.tableOptions,
|
|
12
|
+
initialState: {
|
|
13
|
+
...FILTER_TABLE_ARGS.tableOptions?.initialState,
|
|
14
|
+
columnFilters: COLUMN_FILTERS_STATE.STRING,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export const FilterByArrayValue = {
|
|
20
|
+
args: {
|
|
21
|
+
...FILTER_TABLE_ARGS,
|
|
22
|
+
tableOptions: {
|
|
23
|
+
...FILTER_TABLE_ARGS.tableOptions,
|
|
24
|
+
initialState: {
|
|
25
|
+
...FILTER_TABLE_ARGS.tableOptions?.initialState,
|
|
26
|
+
columnFilters: COLUMN_FILTERS_STATE.ARRAY,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
export const FilterByRangeBetweenValue = {
|
|
32
|
+
args: {
|
|
33
|
+
...FILTER_TABLE_ARGS,
|
|
34
|
+
tableOptions: {
|
|
35
|
+
...FILTER_TABLE_ARGS.tableOptions,
|
|
36
|
+
initialState: {
|
|
37
|
+
...FILTER_TABLE_ARGS.tableOptions?.initialState,
|
|
38
|
+
columnFilters: COLUMN_FILTERS_STATE.RANGE_BETWEEN,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
export const FilterByRangeGreaterThanValue = {
|
|
44
|
+
args: {
|
|
45
|
+
...FILTER_TABLE_ARGS,
|
|
46
|
+
tableOptions: {
|
|
47
|
+
...FILTER_TABLE_ARGS.tableOptions,
|
|
48
|
+
initialState: {
|
|
49
|
+
...FILTER_TABLE_ARGS.tableOptions?.initialState,
|
|
50
|
+
columnFilters: COLUMN_FILTERS_STATE.RANGE_GREATER_THAN,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
export const FilterByRangeLessThanValue = {
|
|
56
|
+
args: {
|
|
57
|
+
...FILTER_TABLE_ARGS,
|
|
58
|
+
tableOptions: {
|
|
59
|
+
...FILTER_TABLE_ARGS.tableOptions,
|
|
60
|
+
initialState: {
|
|
61
|
+
...FILTER_TABLE_ARGS.tableOptions?.initialState,
|
|
62
|
+
columnFilters: COLUMN_FILTERS_STATE.RANGE_LESS_THAN,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
export const FilterByStringValueWithNoMatch = {
|
|
68
|
+
args: {
|
|
69
|
+
...FILTER_TABLE_ARGS,
|
|
70
|
+
tableOptions: {
|
|
71
|
+
...FILTER_TABLE_ARGS.tableOptions,
|
|
72
|
+
initialState: {
|
|
73
|
+
...FILTER_TABLE_ARGS.tableOptions?.initialState,
|
|
74
|
+
columnFilters: COLUMN_FILTERS_STATE.STRING_NO_MATCH,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CONTROL_TYPE } from "../../../../../storybook/controls/types";
|
|
2
|
+
import { configureControls } from "../../../../../storybook/controls/utils";
|
|
3
|
+
import { Table } from "../table";
|
|
4
|
+
import { DEFAULT_TABLE_ARGS } from "./args";
|
|
5
|
+
import { BOOLEAN_CONTROLS, DISABLED_CONTROLS } from "./constants";
|
|
6
|
+
const meta = {
|
|
7
|
+
argTypes: {
|
|
8
|
+
...configureControls(DISABLED_CONTROLS, CONTROL_TYPE.DISABLED),
|
|
9
|
+
...configureControls(BOOLEAN_CONTROLS, CONTROL_TYPE.BOOLEAN),
|
|
10
|
+
},
|
|
11
|
+
component: Table,
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: "fullscreen",
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
export const Default = {
|
|
18
|
+
args: DEFAULT_TABLE_ARGS,
|
|
19
|
+
};
|
|
@@ -3,6 +3,7 @@ import { getCoreRowModel, useReactTable, } from "@tanstack/react-table";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { BREAKPOINT_FN_NAME, useBreakpointHelper, } from "../../../../hooks/useBreakpointHelper";
|
|
5
5
|
import { TABLET } from "../../../../theme/common/breakpoints";
|
|
6
|
+
import { arrIncludesSome } from "../../../Table/columnDef/columnFilters/filterFn";
|
|
6
7
|
import { COLUMN_DEF } from "../../../Table/common/columnDef";
|
|
7
8
|
import { ROW_DIRECTION } from "../../../Table/common/entities";
|
|
8
9
|
import { TableHead } from "../../../Table/components/TableHead/tableHead";
|
|
@@ -25,6 +26,7 @@ export const Table = ({ className, collapsable = true, columns, gridTemplateColu
|
|
|
25
26
|
]),
|
|
26
27
|
data: items,
|
|
27
28
|
enableSorting: false,
|
|
29
|
+
filterFns: { arrIncludesSome },
|
|
28
30
|
getCoreRowModel: getCoreRowModel(),
|
|
29
31
|
...tableOptions,
|
|
30
32
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
import { TrackingProps } from "../../../types";
|
|
3
|
+
export interface ExportMethodProps extends TrackingProps {
|
|
3
4
|
buttonLabel: string;
|
|
4
5
|
description: ReactNode;
|
|
5
6
|
footnote?: ReactNode;
|
|
6
7
|
isAccessible?: boolean;
|
|
7
8
|
route: string;
|
|
8
9
|
title: string;
|
|
9
|
-
trackingId?: string;
|
|
10
10
|
}
|
|
11
11
|
export declare const ExportMethod: ({ buttonLabel, description, footnote, isAccessible, route, title, trackingId, }: ExportMethodProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
|
+
import { inkLight } from "../../../../styles/common/mixins/colors";
|
|
2
3
|
import { textBodySmall4002Lines } from "../../../../styles/common/mixins/fonts";
|
|
3
|
-
import { inkLight } from "../../../../theme/common/palette";
|
|
4
4
|
import { ButtonPrimary } from "../../../common/Button/components/ButtonPrimary/buttonPrimary";
|
|
5
5
|
export const ExportButton = styled(ButtonPrimary) `
|
|
6
6
|
text-transform: none; // overrides MuiButton theme text-transform "capitalize".
|