@databiosphere/findable-ui 23.0.0 → 25.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/.storybook/preview.js +4 -37
- package/CHANGELOG.md +64 -0
- package/jest.config.js +1 -0
- package/lib/common/entities.d.ts +1 -0
- package/lib/components/DataDictionary/components/Entities/constants.d.ts +2 -2
- package/lib/components/DataDictionary/components/Entities/constants.js +1 -1
- package/lib/components/DataDictionary/components/Entities/entities.js +3 -3
- package/lib/components/DataDictionary/components/Entity/constants.d.ts +2 -2
- package/lib/components/DataDictionary/components/Entity/constants.js +1 -1
- package/lib/components/DataDictionary/components/Entity/entity.js +4 -4
- package/lib/components/Detail/components/Table/components/TableHead/tableHead.d.ts +8 -0
- package/lib/components/Detail/components/Table/components/TableHead/tableHead.js +36 -0
- package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/NIHAccountExpiryWarning/nihAccountExpiryWarning.js +1 -1
- package/lib/components/Filter/components/FilterLabel/filterLabel.js +2 -2
- package/lib/components/Filter/components/FilterLabel/filterLabel.styles.d.ts +1 -1
- package/lib/components/Filter/components/SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton.js +2 -2
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.js +17 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.styles.d.ts +13 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.styles.js +12 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.d.ts +9 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.js +9 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.js +86 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.d.ts +105 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.js +196 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.js +7 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.styles.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.styles.js +29 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/constants.d.ts +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/constants.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/args.d.ts +4 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/args.js +70 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.d.ts +7 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.js +19 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/types.d.ts +6 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/types.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/constants.d.ts +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/constants.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/types.d.ts +7 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/types.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/useChartView.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/useChartView.js +11 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/args.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/args.js +96 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.d.ts +6 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.js +16 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/types.d.ts +6 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/types.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/utils.d.ts +14 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/utils.js +21 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/entityList.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/entityList.js +16 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/types.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/types.js +1 -0
- package/lib/components/Index/components/EntitiesView/constants.d.ts +1 -0
- package/lib/components/Index/components/EntitiesView/constants.js +1 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.js +14 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.styles.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.styles.js +20 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.js +14 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/types.d.ts +13 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/types.js +5 -0
- package/lib/components/Index/components/EntitiesView/stories/entitiesView.stories.d.ts +8 -0
- package/lib/components/Index/components/EntitiesView/stories/entitiesView.stories.js +50 -0
- package/lib/components/Index/components/EntitiesView/types.d.ts +8 -0
- package/lib/components/Index/components/EntitiesView/types.js +1 -0
- package/lib/components/Index/components/NTagCell/nTagCell.stories.d.ts +5 -16
- package/lib/components/Index/components/NTagCell/nTagCell.stories.js +8 -8
- package/lib/components/Index/components/TitleCell/titleCell.d.ts +6 -0
- package/lib/components/Index/components/TitleCell/titleCell.js +10 -0
- package/lib/components/Index/components/TitleCell/titleCell.styles.d.ts +3 -0
- package/lib/components/Index/components/TitleCell/titleCell.styles.js +6 -0
- package/lib/components/Index/index.d.ts +2 -13
- package/lib/components/Index/index.js +6 -2
- package/lib/components/Index/index.stories.js +3 -2
- package/lib/components/Index/types.d.ts +12 -0
- package/lib/components/Index/types.js +1 -0
- package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.d.ts +1 -1
- package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.js +5 -4
- package/lib/components/Layout/components/BackPage/components/BackPageHero/stories/backPageHero.stories.d.ts +6 -0
- package/lib/components/Layout/components/BackPage/components/BackPageHero/stories/backPageHero.stories.js +18 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/authentication.js +3 -3
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.stories.d.ts +5 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.stories.js +29 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.styles.d.ts +2 -2
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/Button/button.styles.d.ts +1 -1
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.d.ts +6 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.js +13 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.styles.d.ts +36 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.styles.js +9 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Menu/components/Toolbar/toolbar.js +2 -2
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Menu/menu.js +2 -2
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/Button/button.styles.d.ts +1 -1
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchBar/searchBar.js +5 -3
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchBar/searchBar.styles.d.ts +5 -1
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchBar/searchBar.styles.js +4 -3
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.d.ts +5 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.js +10 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.styles.d.ts +36 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.styles.js +9 -0
- package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationDrawer/navigationDrawer.js +2 -2
- package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenu/navigationMenu.js +2 -2
- package/lib/components/Layout/components/Header/hooks/useMeasureHeader.d.ts +5 -0
- package/lib/components/Layout/components/Header/hooks/useMeasureHeader.js +19 -0
- package/lib/components/Layout/components/Outline/common/constants.d.ts +2 -0
- package/lib/components/Layout/components/Outline/common/constants.js +1 -0
- package/lib/components/Layout/components/Outline/outline.styles.d.ts +1 -1
- package/lib/components/Layout/components/Sidebar/components/SidebarButton/sidebarButton.js +2 -2
- package/lib/components/Loading/loading.d.ts +2 -1
- package/lib/components/Loading/loading.js +2 -2
- package/lib/components/Loading/loading.stories.d.ts +3 -31
- package/lib/components/Login/components/Button/button.styles.d.ts +1 -1
- package/lib/components/Login/components/Section/components/Consent/consent.js +3 -3
- package/lib/components/Login/components/Section/components/Consent/consent.styles.d.ts +1 -1
- package/lib/components/Login/components/Section/components/Consent/consent.styles.js +2 -2
- package/lib/components/Login/components/Section/components/Consent/types.d.ts +2 -2
- package/lib/components/Login/login.stories.d.ts +6 -0
- package/lib/components/Login/login.stories.js +31 -0
- package/lib/components/NoResults/noResults.d.ts +1 -8
- package/lib/components/NoResults/noResults.js +9 -8
- package/lib/components/NoResults/noResults.styles.d.ts +2 -2
- package/lib/components/NoResults/noResults.styles.js +4 -2
- package/lib/components/NoResults/types.d.ts +8 -0
- package/lib/components/NoResults/types.js +1 -0
- package/lib/components/Plot/components/BarX/barX.d.ts +2 -0
- package/lib/components/Plot/components/BarX/barX.js +13 -0
- package/lib/components/Plot/components/BarX/types.d.ts +5 -0
- package/lib/components/Plot/components/BarX/types.js +1 -0
- package/lib/components/Stepper/components/Step/components/StepContent/stepContent.d.ts +3 -0
- package/lib/components/Stepper/components/Step/components/StepContent/stepContent.js +7 -0
- package/lib/components/Stepper/components/Step/components/StepContent/stepContent.styles.d.ts +3 -0
- package/lib/components/Stepper/components/Step/components/StepContent/stepContent.styles.js +17 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.d.ts +2 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.js +8 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.styles.d.ts +5 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.styles.js +15 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/contants.d.ts +2 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/contants.js +4 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/constants.d.ts +1 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/constants.js +1 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/stepIcon.d.ts +3 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/stepIcon.js +6 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/stepIcon.styles.d.ts +3 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/stepIcon.styles.js +27 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/stories/stepIcon.stories.d.ts +9 -0
- package/lib/components/Stepper/components/Step/components/StepIcon/stories/stepIcon.stories.js +38 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/constants.d.ts +3 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/constants.js +11 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/icon.d.ts +2 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/icon.js +9 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/stories/contants.d.ts +3 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/stories/contants.js +3 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/stories/icon.stories.d.ts +6 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/stories/icon.stories.js +20 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/types.d.ts +7 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/types.js +1 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/constants.d.ts +2 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/constants.js +6 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/label.d.ts +2 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/label.js +6 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/label.styles.d.ts +5 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/label.styles.js +7 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/stories/label.stories.d.ts +7 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/stories/label.stories.js +21 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Optional/constants.d.ts +2 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Optional/constants.js +5 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Optional/optional.d.ts +2 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/components/Optional/optional.js +6 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/constants.d.ts +2 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/constants.js +8 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/stepLabel.d.ts +2 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/stepLabel.js +6 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/stepLabel.styles.d.ts +3 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/stepLabel.styles.js +12 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/stories/contants.d.ts +4 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/stories/contants.js +15 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/stories/stepLabel.stories.d.ts +8 -0
- package/lib/components/Stepper/components/Step/components/StepLabel/stories/stepLabel.stories.js +37 -0
- package/lib/components/Stepper/components/Step/constants.d.ts +2 -0
- package/lib/components/Stepper/components/Step/constants.js +4 -0
- package/lib/components/Stepper/components/Step/step.d.ts +3 -0
- package/lib/components/Stepper/components/Step/step.js +6 -0
- package/lib/components/Stepper/components/Step/step.styles.d.ts +5 -0
- package/lib/components/Stepper/components/Step/step.styles.js +31 -0
- package/lib/components/Stepper/components/Step/stories/contants.d.ts +4 -0
- package/lib/components/Stepper/components/Step/stories/contants.js +14 -0
- package/lib/components/Stepper/components/Step/stories/step.stories.d.ts +8 -0
- package/lib/components/Stepper/components/Step/stories/step.stories.js +62 -0
- package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.js +2 -2
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.d.ts +16 -0
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.js +28 -0
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.stories.d.ts +5 -0
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.stories.js +46 -0
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.styles.d.ts +3 -0
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.styles.js +21 -0
- package/lib/components/Table/components/EntityViewToggle/entityViewToggle.d.ts +2 -0
- package/lib/components/Table/components/EntityViewToggle/entityViewToggle.js +37 -0
- package/lib/components/Table/components/Pagination/pagination.js +3 -4
- package/lib/components/Table/components/TableHead/tableHead.js +2 -2
- package/lib/components/Table/table.js +11 -11
- package/lib/components/TableCreator/common/constants.d.ts +6 -0
- package/lib/components/TableCreator/common/constants.js +19 -0
- package/lib/components/TableCreator/common/entities.d.ts +5 -0
- package/lib/components/TableCreator/common/entities.js +1 -0
- package/lib/components/TableCreator/tableCreator.js +1 -6
- package/lib/components/common/Alert/alert.stories.d.ts +6 -0
- package/lib/components/common/Alert/alert.stories.js +36 -0
- package/lib/components/common/Alert/components/AlertText/alertText.styles.d.ts +4 -0
- package/lib/components/common/Alert/components/AlertText/alertText.styles.js +19 -0
- package/lib/components/common/AnchorLink/anchorLink.js +2 -2
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.d.ts +7 -0
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.js +5 -0
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.d.ts +3 -0
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.js +19 -0
- package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.d.ts +10 -0
- package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.js +16 -0
- package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.d.ts +3 -0
- package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.js +21 -0
- package/lib/components/common/Breadcrumbs/breadcrumbs.js +2 -2
- package/lib/components/common/Breadcrumbs/typeGuard.d.ts +13 -0
- package/lib/components/common/Breadcrumbs/typeGuard.js +23 -0
- package/lib/components/common/Button/components/DropdownButton/dropdownButton.js +2 -2
- package/lib/components/common/Button/components/LoginButton/loginButton.d.ts +3 -0
- package/lib/components/common/Button/components/LoginButton/loginButton.js +6 -0
- package/lib/components/common/Button/components/LoginButton/loginButton.styles.d.ts +7 -0
- package/lib/components/common/Button/components/LoginButton/loginButton.styles.js +11 -0
- package/lib/components/common/Button/components/NavigationButton/navigationButton.js +2 -2
- package/lib/components/common/CopyToClipboard/copyToClipboard.js +2 -2
- package/lib/components/common/Dialog/components/DialogTitle/dialogTitle.js +2 -2
- package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.js +2 -2
- package/lib/components/common/Form/components/Select/components/DropDownIcon/dropDownIcon.d.ts +2 -3
- package/lib/components/common/Form/components/Select/components/DropDownIcon/dropDownIcon.js +3 -3
- package/lib/components/common/Form/components/UploadFile/uploadFile.js +2 -2
- package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.d.ts +5 -0
- package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.js +10 -0
- package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.stories.d.ts +3 -0
- package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.stories.js +9 -0
- package/lib/components/common/IconButton/iconButton.styles.d.ts +1 -1
- package/lib/components/common/KeyValuePairs/components/KeyElType/keyElType.d.ts +2 -5
- package/lib/components/common/KeyValuePairs/components/KeyElType/keyElType.js +6 -2
- package/lib/components/common/KeyValuePairs/components/ValueElType/valueElType.d.ts +2 -5
- package/lib/components/common/KeyValuePairs/components/ValueElType/valueElType.js +6 -2
- package/lib/components/common/LoginDialog/loginDialog.styles.js +1 -1
- package/lib/components/common/Paper/paper.d.ts +2 -1
- package/lib/components/common/Paper/paper.js +2 -2
- package/lib/components/common/Section/components/CollapsableSection/collapsableSection.js +2 -3
- package/lib/components/common/ToggleButtonGroup/hooks/UseToggleButtonGroup/hook.d.ts +2 -0
- package/lib/components/common/ToggleButtonGroup/hooks/UseToggleButtonGroup/hook.js +10 -0
- package/lib/components/types.d.ts +3 -0
- package/lib/config/entities.d.ts +2 -0
- package/lib/hooks/useAuthentication/common/constants.d.ts +4 -0
- package/lib/hooks/useAuthentication/common/constants.js +19 -0
- package/lib/hooks/useAuthentication/common/entities.d.ts +25 -0
- package/lib/hooks/useAuthentication/common/entities.js +11 -0
- package/lib/hooks/useAuthentication/common/utils.d.ts +15 -0
- package/lib/hooks/useAuthentication/common/utils.js +25 -0
- package/lib/hooks/useAuthentication/useAuthentication.d.ts +6 -0
- package/lib/hooks/useAuthentication/useAuthentication.js +9 -0
- package/lib/hooks/useAuthentication/useAuthenticationComplete.d.ts +6 -0
- package/lib/hooks/useAuthentication/useAuthenticationComplete.js +55 -0
- package/lib/hooks/useAuthentication/useAuthenticationForm.d.ts +20 -0
- package/lib/hooks/useAuthentication/useAuthenticationForm.js +88 -0
- package/lib/hooks/useAuthentication/useAuthenticationNIHExpiry.d.ts +18 -0
- package/lib/hooks/useAuthentication/useAuthenticationNIHExpiry.js +50 -0
- package/lib/hooks/useAuthentication/useAuthenticationStatus.d.ts +20 -0
- package/lib/hooks/useAuthentication/useAuthenticationStatus.js +32 -0
- package/lib/hooks/useAuthentication/useFetchGoogleProfile.d.ts +21 -0
- package/lib/hooks/useAuthentication/useFetchGoogleProfile.js +41 -0
- package/lib/hooks/useAuthentication/useFetchTerraNIHProfile.d.ts +18 -0
- package/lib/hooks/useAuthentication/useFetchTerraNIHProfile.js +62 -0
- package/lib/hooks/useAuthentication/useFetchTerraProfile.d.ts +24 -0
- package/lib/hooks/useAuthentication/useFetchTerraProfile.js +62 -0
- package/lib/hooks/useAuthentication/useFetchTerraTermsOfService.d.ts +15 -0
- package/lib/hooks/useAuthentication/useFetchTerraTermsOfService.js +62 -0
- package/lib/hooks/useAuthentication/useTokenClient.d.ts +11 -0
- package/lib/hooks/useAuthentication/useTokenClient.js +29 -0
- package/lib/hooks/useAuthenticationConfig.d.ts +6 -0
- package/lib/hooks/useAuthenticationConfig.js +14 -0
- package/lib/hooks/useCategoryConfigs.d.ts +6 -0
- package/lib/hooks/useCategoryConfigs.js +17 -0
- package/lib/hooks/useCategoryFilter.js +1 -0
- package/lib/hooks/useEntityListRelatedView.d.ts +15 -0
- package/lib/hooks/useEntityListRelatedView.js +62 -0
- package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.d.ts +15 -0
- package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.js +27 -0
- package/lib/hooks/useFileManifest/useFileManifestURL.d.ts +5 -0
- package/lib/hooks/useFileManifest/useFileManifestURL.js +11 -0
- package/lib/hooks/useFileManifest/useRequestFileManifest.d.ts +9 -0
- package/lib/hooks/useFileManifest/useRequestFileManifest.js +37 -0
- package/lib/hooks/useLayoutState.d.ts +6 -0
- package/lib/hooks/useLayoutState.js +9 -0
- package/lib/hooks/useMenu.d.ts +10 -0
- package/lib/hooks/useMenu.js +17 -0
- package/lib/hooks/useMenuWithPosition.d.ts +14 -0
- package/lib/hooks/useMenuWithPosition.js +33 -0
- package/lib/hooks/useResizeObserver.d.ts +2 -1
- package/lib/hooks/useResizeObserver.js +5 -2
- package/lib/hooks/useSessionTimeout.d.ts +11 -0
- package/lib/hooks/useSessionTimeout.js +28 -0
- package/lib/providers/authentication.d.ts +51 -0
- package/lib/providers/authentication.js +110 -0
- package/lib/providers/layoutState.d.ts +40 -0
- package/lib/providers/layoutState.js +47 -0
- package/lib/storybook/controls/constants.d.ts +4 -0
- package/lib/storybook/controls/constants.js +6 -0
- package/lib/storybook/controls/types.d.ts +4 -0
- package/lib/storybook/controls/types.js +5 -0
- package/lib/storybook/controls/utils.d.ts +9 -0
- package/lib/storybook/controls/utils.js +10 -0
- package/lib/storybook/decorators.d.ts +2 -0
- package/lib/storybook/decorators.js +11 -0
- package/lib/storybook/loremIpsum.d.ts +4 -0
- package/lib/storybook/loremIpsum.js +4 -0
- package/lib/storybook/parameters.d.ts +2 -0
- package/lib/storybook/parameters.js +12 -0
- package/lib/styles/common/mui/palette.d.ts +47 -0
- package/lib/styles/common/mui/palette.js +47 -0
- package/lib/styles/common/mui/stepper.d.ts +7 -0
- package/lib/styles/common/mui/stepper.js +7 -0
- package/lib/styles/common/mui/svgIcon.d.ts +9 -0
- package/lib/styles/common/mui/svgIcon.js +26 -0
- package/lib/styles/common/mui/typography.js +1 -0
- package/lib/tests/mui/constants.d.ts +4 -0
- package/lib/tests/mui/constants.js +4 -0
- package/lib/theme/common/typography.d.ts +6 -2
- package/lib/theme/common/typography.js +10 -1
- package/lib/theme/theme.js +2 -0
- package/lib/utils/tests.d.ts +12 -0
- package/lib/utils/tests.js +20 -0
- package/lib/views/ExploreView/exploreView.js +4 -24
- package/package.json +6 -4
- package/src/common/entities.ts +1 -0
- package/src/components/DataDictionary/components/Entities/constants.ts +2 -2
- package/src/components/DataDictionary/components/Entities/entities.tsx +4 -4
- package/src/components/DataDictionary/components/Entity/constants.ts +2 -2
- package/src/components/DataDictionary/components/Entity/entity.tsx +6 -6
- package/src/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/NIHAccountExpiryWarning/nihAccountExpiryWarning.tsx +1 -1
- package/src/components/Filter/components/FilterLabel/filterLabel.tsx +2 -2
- package/src/components/Filter/components/SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton.tsx +2 -2
- package/src/components/Index/components/EntitiesView/components/ChartView/chartView.styles.ts +14 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/chartView.tsx +38 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.ts +13 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.ts +104 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.ts +229 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.styles.ts +30 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.tsx +16 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/constants.ts +1 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/args.ts +74 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.tsx +29 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/types.ts +9 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/constants.ts +1 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/types.ts +8 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/useChartView.ts +29 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/stories/args.ts +99 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.tsx +25 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/types.ts +7 -0
- package/src/components/Index/components/EntitiesView/components/ChartView/utils.ts +26 -0
- package/src/components/Index/components/EntitiesView/components/EntityList/entityList.tsx +29 -0
- package/src/components/Index/components/EntitiesView/components/EntityList/types.ts +3 -0
- package/src/components/Index/components/EntitiesView/constants.ts +1 -0
- package/src/components/Index/components/EntitiesView/entitiesView.styles.ts +21 -0
- package/src/components/Index/components/EntitiesView/entitiesView.tsx +30 -0
- package/src/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.ts +15 -0
- package/src/components/Index/components/EntitiesView/hooks/UseEntitiesView/types.ts +16 -0
- package/src/components/Index/components/EntitiesView/stories/entitiesView.stories.tsx +76 -0
- package/src/components/Index/components/EntitiesView/types.ts +9 -0
- package/src/components/Index/index.stories.tsx +3 -2
- package/src/components/Index/index.tsx +15 -15
- package/src/components/Index/types.ts +13 -0
- package/src/components/Layout/components/BackPage/components/BackPageHero/backPageHero.tsx +19 -14
- package/src/components/Layout/components/BackPage/components/BackPageHero/stories/backPageHero.stories.tsx +24 -0
- package/src/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/authentication.tsx +3 -3
- package/src/components/Layout/components/Header/components/Content/components/Actions/components/Menu/components/Toolbar/toolbar.tsx +2 -2
- package/src/components/Layout/components/Header/components/Content/components/Actions/components/Menu/menu.tsx +2 -2
- package/src/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchBar/searchBar.styles.ts +8 -3
- package/src/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchBar/searchBar.tsx +5 -2
- package/src/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationDrawer/navigationDrawer.tsx +2 -2
- package/src/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenu/navigationMenu.tsx +2 -2
- package/src/components/Layout/components/Sidebar/components/SidebarButton/sidebarButton.tsx +2 -2
- package/src/components/Loading/loading.stories.tsx +2 -2
- package/src/components/Loading/loading.tsx +11 -3
- package/src/components/Login/components/Section/components/Consent/consent.styles.ts +2 -2
- package/src/components/Login/components/Section/components/Consent/consent.tsx +4 -4
- package/src/components/Login/components/Section/components/Consent/types.ts +2 -2
- package/src/components/NoResults/noResults.styles.ts +4 -2
- package/src/components/NoResults/noResults.tsx +16 -22
- package/src/components/NoResults/types.ts +13 -0
- package/src/components/Plot/components/BarX/barX.tsx +20 -0
- package/src/components/Plot/components/BarX/types.ts +6 -0
- package/src/components/Stepper/components/Step/components/StepContent/stepContent.styles.ts +18 -0
- package/src/components/Stepper/components/Step/components/StepContent/stepContent.tsx +16 -0
- package/src/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.styles.ts +19 -0
- package/src/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.tsx +20 -0
- package/src/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/contants.ts +6 -0
- package/src/components/Stepper/components/Step/components/StepIcon/constants.ts +1 -0
- package/src/components/Stepper/components/Step/components/StepIcon/stepIcon.styles.ts +32 -0
- package/src/components/Stepper/components/Step/components/StepIcon/stepIcon.tsx +21 -0
- package/src/components/Stepper/components/Step/components/StepIcon/stories/stepIcon.stories.tsx +52 -0
- package/src/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/constants.ts +14 -0
- package/src/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/icon.tsx +13 -0
- package/src/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/stories/contants.ts +6 -0
- package/src/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/stories/icon.stories.tsx +30 -0
- package/src/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/types.ts +8 -0
- package/src/components/Stepper/components/Step/components/StepLabel/components/Label/constants.ts +8 -0
- package/src/components/Stepper/components/Step/components/StepLabel/components/Label/label.styles.ts +8 -0
- package/src/components/Stepper/components/Step/components/StepLabel/components/Label/label.tsx +10 -0
- package/src/components/Stepper/components/Step/components/StepLabel/components/Label/stories/label.stories.tsx +31 -0
- package/src/components/Stepper/components/Step/components/StepLabel/components/Optional/constants.ts +7 -0
- package/src/components/Stepper/components/Step/components/StepLabel/components/Optional/optional.tsx +9 -0
- package/src/components/Stepper/components/Step/components/StepLabel/constants.ts +10 -0
- package/src/components/Stepper/components/Step/components/StepLabel/stepLabel.styles.ts +13 -0
- package/src/components/Stepper/components/Step/components/StepLabel/stepLabel.tsx +10 -0
- package/src/components/Stepper/components/Step/components/StepLabel/stories/contants.ts +19 -0
- package/src/components/Stepper/components/Step/components/StepLabel/stories/stepLabel.stories.tsx +48 -0
- package/src/components/Stepper/components/Step/constants.ts +6 -0
- package/src/components/Stepper/components/Step/step.styles.ts +33 -0
- package/src/components/Stepper/components/Step/step.tsx +12 -0
- package/src/components/Stepper/components/Step/stories/contants.ts +18 -0
- package/src/components/Stepper/components/Step/stories/step.stories.tsx +87 -0
- package/src/components/Support/components/SupportRequest/components/Dialog/dialog.tsx +2 -2
- package/src/components/Table/components/Pagination/pagination.tsx +3 -4
- package/src/components/Table/components/TableHead/tableHead.tsx +2 -2
- package/src/components/Table/table.tsx +42 -38
- package/src/components/TableCreator/tableCreator.tsx +8 -18
- package/src/components/common/AnchorLink/anchorLink.tsx +2 -2
- package/src/components/common/Breadcrumbs/breadcrumbs.tsx +2 -2
- package/src/components/common/Breadcrumbs/typeGuard.ts +24 -0
- package/src/components/common/Button/components/DropdownButton/dropdownButton.tsx +2 -2
- package/src/components/common/Button/components/NavigationButton/navigationButton.tsx +2 -2
- package/src/components/common/CopyToClipboard/copyToClipboard.tsx +2 -2
- package/src/components/common/Dialog/components/DialogTitle/dialogTitle.tsx +2 -2
- package/src/components/common/Drawer/components/DrawerTitle/drawerTitle.tsx +2 -2
- package/src/components/common/Form/components/Select/components/DropDownIcon/dropDownIcon.tsx +5 -6
- package/src/components/common/Form/components/UploadFile/uploadFile.tsx +2 -2
- package/src/components/common/KeyValuePairs/components/KeyElType/keyElType.tsx +14 -9
- package/src/components/common/KeyValuePairs/components/ValueElType/valueElType.tsx +8 -9
- package/src/components/common/LoginDialog/loginDialog.styles.ts +1 -1
- package/src/components/common/Paper/paper.tsx +9 -3
- package/src/components/common/Section/components/CollapsableSection/collapsableSection.tsx +2 -3
- package/src/components/common/ToggleButtonGroup/hooks/UseToggleButtonGroup/hook.ts +17 -0
- package/src/components/types.ts +4 -0
- package/src/config/entities.ts +2 -0
- package/src/hooks/useCategoryFilter.ts +1 -0
- package/src/hooks/useResizeObserver.ts +5 -2
- package/src/storybook/controls/constants.ts +12 -0
- package/src/storybook/controls/types.ts +4 -0
- package/src/storybook/controls/utils.ts +18 -0
- package/src/storybook/decorators.tsx +17 -0
- package/src/storybook/loremIpsum.ts +5 -0
- package/src/storybook/parameters.ts +14 -0
- package/src/styles/common/mui/palette.ts +47 -0
- package/src/styles/common/mui/stepper.ts +14 -0
- package/src/styles/common/mui/svgIcon.ts +35 -0
- package/src/styles/common/mui/typography.ts +1 -0
- package/src/tests/mui/constants.ts +4 -0
- package/src/theme/common/typography.ts +12 -1
- package/src/theme/theme.ts +2 -0
- package/src/utils/tests.ts +20 -0
- package/src/views/ExploreView/exploreView.tsx +8 -42
- package/tests/chart.test.tsx +170 -0
- package/tests/chartView.test.tsx +36 -0
- package/tests/entitiesView.test.tsx +36 -0
- package/tests/setup.ts +19 -0
- package/tests/stepIcon.test.tsx +42 -0
- package/types/data-explorer-ui.d.ts +39 -80
- package/src/components/Index/components/Cell/cell.tsx +0 -22
- package/src/components/Index/components/NTag/components/Tooltip/tooltip.styles.ts +0 -11
- package/src/components/Index/components/NTag/components/Tooltip/tooltip.tsx +0 -90
- package/src/components/Index/components/NTag/nTag.tsx +0 -25
- package/src/components/Index/components/NTagCell/nTagCell.stories.tsx +0 -22
- package/src/components/Index/components/NTagCell/nTagCell.tsx +0 -74
- package/src/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.tsx +0 -16
- package/src/components/TableCreator/tableCreator.styles.ts +0 -5
package/lib/theme/theme.js
CHANGED
|
@@ -21,6 +21,7 @@ export function createAppTheme(customOptions) {
|
|
|
21
21
|
xs: B.mobile,
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
|
+
cssVariables: true,
|
|
24
25
|
palette: {
|
|
25
26
|
alert: P.alert,
|
|
26
27
|
background: P.background,
|
|
@@ -49,6 +50,7 @@ export function createAppTheme(customOptions) {
|
|
|
49
50
|
[T.TEXT_HEADING_LARGE]: T.textHeadingLarge,
|
|
50
51
|
[T.TEXT_HEADING_SMALL]: T.textHeadingSmall,
|
|
51
52
|
[T.TEXT_HEADING_XLARGE]: T.textHeadingXLarge,
|
|
53
|
+
[T.TEXT_HEADING_XSMALL]: T.textHeadingXSmall,
|
|
52
54
|
[T.TEXT_UPPERCASE_500]: T.textUppercase500,
|
|
53
55
|
fontFamily: T.fontFamily,
|
|
54
56
|
},
|
package/lib/utils/tests.d.ts
CHANGED
|
@@ -10,3 +10,15 @@ export declare function getAnchorEl(id: string): HTMLAnchorElement;
|
|
|
10
10
|
* @returns HTML button element.
|
|
11
11
|
*/
|
|
12
12
|
export declare function getButtonById(id: string): HTMLButtonElement;
|
|
13
|
+
/**
|
|
14
|
+
* Returns class names of the given element.
|
|
15
|
+
* @param element - Element.
|
|
16
|
+
* @returns element class names.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getClassNames(element?: Element | null): string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Returns tag name of the given element.
|
|
21
|
+
* @param element - Element.
|
|
22
|
+
* @returns element tag name.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getTagName(element?: Element | null): string | null;
|
package/lib/utils/tests.js
CHANGED
|
@@ -15,3 +15,23 @@ export function getAnchorEl(id) {
|
|
|
15
15
|
export function getButtonById(id) {
|
|
16
16
|
return screen.getByTestId(id);
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Returns class names of the given element.
|
|
20
|
+
* @param element - Element.
|
|
21
|
+
* @returns element class names.
|
|
22
|
+
*/
|
|
23
|
+
export function getClassNames(element) {
|
|
24
|
+
if (!element)
|
|
25
|
+
return null;
|
|
26
|
+
return element.getAttribute("class");
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Returns tag name of the given element.
|
|
30
|
+
* @param element - Element.
|
|
31
|
+
* @returns element tag name.
|
|
32
|
+
*/
|
|
33
|
+
export function getTagName(element) {
|
|
34
|
+
if (!element)
|
|
35
|
+
return null;
|
|
36
|
+
return element.tagName.toLowerCase();
|
|
37
|
+
}
|
|
@@ -5,13 +5,14 @@ import { ComponentCreator } from "../../components/ComponentCreator/ComponentCre
|
|
|
5
5
|
import { ClearAllFilters } from "../../components/Filter/components/ClearAllFilters/clearAllFilters";
|
|
6
6
|
import { Filters, } from "../../components/Filter/components/Filters/filters";
|
|
7
7
|
import { SearchAllFilters } from "../../components/Filter/components/SearchAllFilters/searchAllFilters";
|
|
8
|
+
import { ChartView } from "../../components/Index/components/EntitiesView/components/ChartView/chartView";
|
|
9
|
+
import { EntityList } from "../../components/Index/components/EntitiesView/components/EntityList/entityList";
|
|
8
10
|
import { Tabs } from "../../components/Index/components/Tabs/tabs";
|
|
9
11
|
import { Index as IndexView } from "../../components/Index/index";
|
|
10
12
|
import { SidebarButton } from "../../components/Layout/components/Sidebar/components/SidebarButton/sidebarButton";
|
|
11
13
|
import { SidebarLabel } from "../../components/Layout/components/Sidebar/components/SidebarLabel/sidebarLabel";
|
|
12
14
|
import { SidebarTools } from "../../components/Layout/components/Sidebar/components/SidebarTools/sidebarTools.styles";
|
|
13
15
|
import { Sidebar } from "../../components/Layout/components/Sidebar/sidebar";
|
|
14
|
-
import { TableCreator } from "../../components/TableCreator/tableCreator";
|
|
15
16
|
import { BREAKPOINT_FN_NAME, useBreakpointHelper, } from "../../hooks/useBreakpointHelper";
|
|
16
17
|
import { useConfig } from "../../hooks/useConfig";
|
|
17
18
|
import { useEntityList } from "../../hooks/useEntityList";
|
|
@@ -28,7 +29,7 @@ export const ExploreView = (props) => {
|
|
|
28
29
|
const { explorerTitle, summaryConfig, trackingConfig } = config;
|
|
29
30
|
const { listView } = entityConfig;
|
|
30
31
|
const { listHero, subTitleHero } = listView || {};
|
|
31
|
-
const { categoryGroups, categoryViews, filterCount } = exploreState;
|
|
32
|
+
const { categoryGroups, categoryViews, filterCount, loading } = exploreState;
|
|
32
33
|
const { response: summaryResponse } = useSummary(); // Fetch summary.
|
|
33
34
|
useEntityList(props); // Fetch entities.
|
|
34
35
|
const { entityListType } = props;
|
|
@@ -103,7 +104,7 @@ export const ExploreView = (props) => {
|
|
|
103
104
|
React.createElement(ClearAllFilters, null),
|
|
104
105
|
React.createElement(SearchAllFilters, { categoryViews: categoryViews, drawerOpen: isDrawerOpen, onFilter: onFilterChange.bind(null, true) })),
|
|
105
106
|
React.createElement(Filters, { categoryFilters: categoryFilters, closeAncestor: onCloseDrawer, onFilter: onFilterChange.bind(null, false), trackFilterOpened: trackingConfig?.trackFilterOpened }))),
|
|
106
|
-
React.createElement(IndexView, { className: props.className,
|
|
107
|
+
React.createElement(IndexView, { className: props.className, chart: React.createElement(ChartView, { categoryFilters: categoryFilters, loading: loading }), list: React.createElement(EntityList, { entityListType: entityListType }), ListHero: renderComponent(listHero), SideBarButton: tabletDown ? (React.createElement(SidebarButton, { count: filterCount, label: "Filter", onClick: onOpenDrawer })) : undefined, SubTitleHero: renderComponent(subTitleHero), Summaries: renderSummary(summaryConfig, summaryResponse), Tabs: React.createElement(Tabs, null), title: entityConfig.explorerTitle || explorerTitle })));
|
|
107
108
|
};
|
|
108
109
|
/**
|
|
109
110
|
* Builds the category views into category views grouped by the given category group configuration.
|
|
@@ -142,27 +143,6 @@ function renderComponent(componentsConfig, response) {
|
|
|
142
143
|
}
|
|
143
144
|
return React.createElement(ComponentCreator, { components: componentsConfig, response: response });
|
|
144
145
|
}
|
|
145
|
-
/**
|
|
146
|
-
* Render either a loading view, empty result set notification or the table itself.
|
|
147
|
-
* @param exploreState - ExploreView responses from Azul, such as projects (index/projects), samples (index/samples) and files (index/files).
|
|
148
|
-
* @param entityConfig - Entity configuration.
|
|
149
|
-
* @param entityListType - Entity list type.
|
|
150
|
-
* @returns rendered Table component.
|
|
151
|
-
*/
|
|
152
|
-
function renderList(exploreState, entityConfig, entityListType) {
|
|
153
|
-
const { listItems, loading, tabValue } = exploreState;
|
|
154
|
-
const { getId: getRowId, list, listView } = entityConfig;
|
|
155
|
-
const { columns: columnsConfig } = list;
|
|
156
|
-
if (!exploreState || !tabValue) {
|
|
157
|
-
return React.createElement(React.Fragment, null); //TODO: return the loading UI component
|
|
158
|
-
}
|
|
159
|
-
if (entityListType !== tabValue) {
|
|
160
|
-
// required currently for client-side fetching as the pre-rendered page
|
|
161
|
-
// loads with the previous tabs data on the first render after switching tabs. (or similar)
|
|
162
|
-
return React.createElement(React.Fragment, null);
|
|
163
|
-
}
|
|
164
|
-
return (React.createElement(TableCreator, { columns: columnsConfig, getRowId: getRowId, items: listItems ?? [], listView: listView, loading: loading }));
|
|
165
|
-
}
|
|
166
146
|
/**
|
|
167
147
|
* Renders Summaries component when all the following requirements are fulfilled:
|
|
168
148
|
* - defined summary config,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databiosphere/findable-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@commitlint/cli": "^17.4.2",
|
|
26
26
|
"@commitlint/config-conventional": "^17.4.2",
|
|
27
|
-
"@mui/types": "^7.
|
|
27
|
+
"@mui/types": "^7.4.0",
|
|
28
28
|
"@next/eslint-plugin-next": "^14.1.0",
|
|
29
29
|
"@storybook/addon-actions": "^8.6.4",
|
|
30
30
|
"@storybook/addon-essentials": "^8.6.4",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"@storybook/test": "^8.6.4",
|
|
37
37
|
"@storybook/types": "^8.6.4",
|
|
38
38
|
"@testing-library/react": "^16.0.1",
|
|
39
|
+
"@types/d3": "^7.4.3",
|
|
39
40
|
"@types/jest": "^29.4.0",
|
|
40
41
|
"@types/react": "^18.3.5",
|
|
41
42
|
"@types/react-dom": "^18.3.0",
|
|
@@ -67,8 +68,9 @@
|
|
|
67
68
|
"peerDependencies": {
|
|
68
69
|
"@emotion/react": "^11.13.3",
|
|
69
70
|
"@emotion/styled": "^11.13.0",
|
|
70
|
-
"@mui/icons-material": "^
|
|
71
|
-
"@mui/material": "^
|
|
71
|
+
"@mui/icons-material": "^7.0.1",
|
|
72
|
+
"@mui/material": "^7.0.1",
|
|
73
|
+
"@observablehq/plot": "^0.6.17",
|
|
72
74
|
"@tanstack/react-table": "^8.19.2",
|
|
73
75
|
"@tanstack/react-virtual": "^3.0.0-beta.59",
|
|
74
76
|
"copy-to-clipboard": "3.3.1",
|
package/src/common/entities.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GridProps } from "@mui/material";
|
|
2
2
|
|
|
3
3
|
export const ENTITIES_ROW_GAP = 8;
|
|
4
4
|
|
|
5
|
-
export const
|
|
5
|
+
export const GRID_PROPS: GridProps = {
|
|
6
6
|
container: true,
|
|
7
7
|
direction: "column",
|
|
8
8
|
flexWrap: "nowrap",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Grid } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Entity } from "../Entity/entity";
|
|
4
|
-
import {
|
|
4
|
+
import { GRID_PROPS } from "./constants";
|
|
5
5
|
import { ClassesProps } from "./types";
|
|
6
6
|
|
|
7
7
|
export const Entities = ({ classes, spacing }: ClassesProps): JSX.Element => {
|
|
8
8
|
return (
|
|
9
|
-
<
|
|
9
|
+
<Grid {...GRID_PROPS}>
|
|
10
10
|
{classes.map((classData) => (
|
|
11
11
|
<Entity key={classData.key} class={classData} spacing={spacing} />
|
|
12
12
|
))}
|
|
13
|
-
</
|
|
13
|
+
</Grid>
|
|
14
14
|
);
|
|
15
15
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Grid, Typography } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { TYPOGRAPHY_PROPS } from "../../../../styles/common/mui/typography";
|
|
4
4
|
import { AnchorLink } from "../../../common/AnchorLink/anchorLink";
|
|
5
5
|
import { useTable } from "../Table/hook";
|
|
6
6
|
import { Table } from "../Table/table";
|
|
7
|
-
import {
|
|
7
|
+
import { GRID_PROPS } from "./constants";
|
|
8
8
|
import { StyledTypography } from "./entity.styles";
|
|
9
9
|
import { EntityProps } from "./types";
|
|
10
10
|
|
|
@@ -14,8 +14,8 @@ export const Entity = ({
|
|
|
14
14
|
}: EntityProps): JSX.Element => {
|
|
15
15
|
const table = useTable(classData.attributes);
|
|
16
16
|
return (
|
|
17
|
-
<
|
|
18
|
-
<
|
|
17
|
+
<Grid {...GRID_PROPS} rowGap={4}>
|
|
18
|
+
<Grid {...GRID_PROPS} rowGap={1}>
|
|
19
19
|
<StyledTypography
|
|
20
20
|
component="h3"
|
|
21
21
|
id={classData.key}
|
|
@@ -31,8 +31,8 @@ export const Entity = ({
|
|
|
31
31
|
>
|
|
32
32
|
{classData.description}
|
|
33
33
|
</Typography>
|
|
34
|
-
</
|
|
34
|
+
</Grid>
|
|
35
35
|
<Table table={table} />
|
|
36
|
-
</
|
|
36
|
+
</Grid>
|
|
37
37
|
);
|
|
38
38
|
};
|
|
@@ -23,7 +23,7 @@ export const NIHAccountExpiryWarning = (): JSX.Element | null => {
|
|
|
23
23
|
Please{" "}
|
|
24
24
|
<Link
|
|
25
25
|
label="renew your account"
|
|
26
|
-
url="https://support.terra.bio/hc/en-us/articles/
|
|
26
|
+
url="https://support.terra.bio/hc/en-us/articles/19124069598235"
|
|
27
27
|
/>{" "}
|
|
28
28
|
link.
|
|
29
29
|
</span>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ArrowDropDownRounded } from "@mui/icons-material";
|
|
2
2
|
import React, { MouseEvent } from "react";
|
|
3
3
|
import { DataDictionaryAnnotation } from "../../../../common/entities";
|
|
4
4
|
import { Tooltip } from "../../../DataDictionary/components/Tooltip/tooltip";
|
|
@@ -27,7 +27,7 @@ export const FilterLabel = ({
|
|
|
27
27
|
<Label
|
|
28
28
|
color="inherit"
|
|
29
29
|
disabled={disabled}
|
|
30
|
-
endIcon={<
|
|
30
|
+
endIcon={<ArrowDropDownRounded fontSize="small" />}
|
|
31
31
|
fullWidth
|
|
32
32
|
isOpen={isOpen}
|
|
33
33
|
onClick={onClick}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CloseRounded } from "@mui/icons-material";
|
|
2
2
|
import { IconButton } from "@mui/material";
|
|
3
3
|
import React, { Fragment, useContext } from "react";
|
|
4
4
|
import {
|
|
@@ -21,7 +21,7 @@ export const SearchCloseButton = (): JSX.Element => {
|
|
|
21
21
|
<Fragment>
|
|
22
22
|
{showButton && (
|
|
23
23
|
<IconButton onClick={onClickFn} size="large">
|
|
24
|
-
<
|
|
24
|
+
<CloseRounded fontSize="small" />
|
|
25
25
|
</IconButton>
|
|
26
26
|
)}
|
|
27
27
|
</Fragment>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
|
+
import { GridPaperSection } from "../../../../../common/Section/section.styles";
|
|
4
|
+
|
|
5
|
+
export const StyledGrid = styled(Grid)`
|
|
6
|
+
display: grid;
|
|
7
|
+
gap: inherit;
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
export const StyledGridPaperSection = styled(GridPaperSection)`
|
|
11
|
+
&:last-of-type {
|
|
12
|
+
border-radius: inherit;
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Typography } from "@mui/material";
|
|
2
|
+
import React, { Fragment } from "react";
|
|
3
|
+
import { TYPOGRAPHY_PROPS } from "../../../../../../styles/common/mui/typography";
|
|
4
|
+
import { Loading, LOADING_PANEL_STYLE } from "../../../../../Loading/loading";
|
|
5
|
+
import { StyledGrid, StyledGridPaperSection } from "./chartView.styles";
|
|
6
|
+
import { Chart } from "./components/Chart/chart";
|
|
7
|
+
import { useChartView } from "./hooks/UseChartView/useChartView";
|
|
8
|
+
import { ChartViewProps } from "./types";
|
|
9
|
+
|
|
10
|
+
export const ChartView = ({
|
|
11
|
+
categoryFilters,
|
|
12
|
+
loading,
|
|
13
|
+
testId,
|
|
14
|
+
}: ChartViewProps): JSX.Element | null => {
|
|
15
|
+
const { chartViewRef, selectCategoryViews, width } =
|
|
16
|
+
useChartView(categoryFilters);
|
|
17
|
+
if (selectCategoryViews.length === 0) return null;
|
|
18
|
+
return (
|
|
19
|
+
<Fragment>
|
|
20
|
+
<Loading
|
|
21
|
+
appear={false}
|
|
22
|
+
autoPosition={false}
|
|
23
|
+
loading={loading}
|
|
24
|
+
panelStyle={LOADING_PANEL_STYLE.INHERIT}
|
|
25
|
+
/>
|
|
26
|
+
<StyledGrid data-testid={testId} ref={chartViewRef}>
|
|
27
|
+
{selectCategoryViews.map(({ key, label, values }) => (
|
|
28
|
+
<StyledGridPaperSection key={key}>
|
|
29
|
+
<Typography variant={TYPOGRAPHY_PROPS.VARIANT.TEXT_HEADING_SMALL}>
|
|
30
|
+
{label}
|
|
31
|
+
</Typography>
|
|
32
|
+
<Chart selectCategoryValueViews={values} width={width} />
|
|
33
|
+
</StyledGridPaperSection>
|
|
34
|
+
))}
|
|
35
|
+
</StyledGrid>
|
|
36
|
+
</Fragment>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as Plot from "@observablehq/plot";
|
|
2
|
+
import { PlotOptions } from "@observablehq/plot";
|
|
3
|
+
import { SelectCategoryValueView } from "../../../../../../../../../common/entities";
|
|
4
|
+
import { PALETTE } from "../../../../../../../../../styles/common/mui/palette";
|
|
5
|
+
import { formatCountSize } from "../../../../../../../../../utils/formatCountSize";
|
|
6
|
+
import { DATA_FIELD, TEXT_PADDING } from "./constants";
|
|
7
|
+
import {
|
|
8
|
+
getCategoryValueText,
|
|
9
|
+
getCategoryValueTextFill,
|
|
10
|
+
getColorRangeValue,
|
|
11
|
+
getCountTextFill,
|
|
12
|
+
getPlotHeight,
|
|
13
|
+
getTicks,
|
|
14
|
+
getXDomain,
|
|
15
|
+
getYPaddingInner,
|
|
16
|
+
getYPaddingOuter,
|
|
17
|
+
isAnyValueSelected,
|
|
18
|
+
renderText,
|
|
19
|
+
} from "./utils";
|
|
20
|
+
|
|
21
|
+
export function getPlotOptions(
|
|
22
|
+
selectCategoryValueViews: SelectCategoryValueView[],
|
|
23
|
+
width: number
|
|
24
|
+
): PlotOptions {
|
|
25
|
+
const isCategorySelected = isAnyValueSelected(selectCategoryValueViews);
|
|
26
|
+
return {
|
|
27
|
+
color: {
|
|
28
|
+
domain: [false, true], // false = unselected, true = selected.
|
|
29
|
+
legend: false,
|
|
30
|
+
range: [getColorRangeValue(isCategorySelected), PALETTE.PRIMARY_MAIN],
|
|
31
|
+
},
|
|
32
|
+
height: getPlotHeight(selectCategoryValueViews.length),
|
|
33
|
+
margin: 0,
|
|
34
|
+
marginBottom: 32,
|
|
35
|
+
marks: [
|
|
36
|
+
Plot.axisX({
|
|
37
|
+
className: "x-axis",
|
|
38
|
+
tickFormat: formatCountSize,
|
|
39
|
+
tickPadding: 8,
|
|
40
|
+
tickSize: 0,
|
|
41
|
+
ticks: getTicks(selectCategoryValueViews),
|
|
42
|
+
}),
|
|
43
|
+
Plot.gridX({
|
|
44
|
+
stroke: PALETTE.SMOKE_MAIN,
|
|
45
|
+
strokeOpacity: 1,
|
|
46
|
+
ticks: getTicks(selectCategoryValueViews),
|
|
47
|
+
}),
|
|
48
|
+
Plot.barX(selectCategoryValueViews, {
|
|
49
|
+
className: "x-bar",
|
|
50
|
+
fill: DATA_FIELD.SELECTED,
|
|
51
|
+
rx1: 0,
|
|
52
|
+
rx2: 4,
|
|
53
|
+
sort: { y: null },
|
|
54
|
+
x: DATA_FIELD.COUNT,
|
|
55
|
+
y: DATA_FIELD.LABEL,
|
|
56
|
+
}),
|
|
57
|
+
Plot.text(selectCategoryValueViews, {
|
|
58
|
+
className: "text-category-label",
|
|
59
|
+
dx: 16,
|
|
60
|
+
dy: -28,
|
|
61
|
+
fill: (d) => getCategoryValueTextFill(d, isCategorySelected),
|
|
62
|
+
lineWidth: width / 13, // "em" unit; font-size is 13px.
|
|
63
|
+
text: getCategoryValueText,
|
|
64
|
+
textAnchor: "start",
|
|
65
|
+
textOverflow: "ellipsis",
|
|
66
|
+
x: 0,
|
|
67
|
+
y: DATA_FIELD.LABEL,
|
|
68
|
+
}),
|
|
69
|
+
Plot.text(selectCategoryValueViews, {
|
|
70
|
+
className: "text-count",
|
|
71
|
+
dx: -TEXT_PADDING,
|
|
72
|
+
dy: -2,
|
|
73
|
+
fill: (d) => getCountTextFill(d, isCategorySelected),
|
|
74
|
+
fontWeight: 500,
|
|
75
|
+
lineHeight: 0.8125,
|
|
76
|
+
render: renderText,
|
|
77
|
+
text: DATA_FIELD.COUNT,
|
|
78
|
+
textAnchor: "end",
|
|
79
|
+
x: DATA_FIELD.COUNT,
|
|
80
|
+
y: DATA_FIELD.LABEL,
|
|
81
|
+
}),
|
|
82
|
+
],
|
|
83
|
+
style: {
|
|
84
|
+
dominantBaseline: "middle",
|
|
85
|
+
font: "inherit",
|
|
86
|
+
overflow: "visible",
|
|
87
|
+
},
|
|
88
|
+
width,
|
|
89
|
+
x: {
|
|
90
|
+
domain: getXDomain(selectCategoryValueViews),
|
|
91
|
+
grid: false,
|
|
92
|
+
label: null,
|
|
93
|
+
line: false,
|
|
94
|
+
},
|
|
95
|
+
y: {
|
|
96
|
+
label: null,
|
|
97
|
+
line: false,
|
|
98
|
+
paddingInner: getYPaddingInner(),
|
|
99
|
+
paddingOuter: getYPaddingOuter(),
|
|
100
|
+
tickFormat: () => "",
|
|
101
|
+
tickSize: 0,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}
|