@databiosphere/findable-ui 50.6.0 → 50.7.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/README.md +32 -19
- package/lib/components/DataDictionary/components/Table/columns/columnDef.d.ts +6 -0
- package/lib/components/DataDictionary/components/Table/columns/columnDef.js +33 -0
- package/lib/components/DataDictionary/components/Table/columns/columnIdentifier.d.ts +5 -0
- package/lib/components/DataDictionary/components/Table/columns/columnIdentifier.js +5 -0
- package/lib/components/DataDictionary/components/Table/columns/types.d.ts +2 -0
- package/lib/components/DataDictionary/components/Table/columns/types.js +1 -0
- package/lib/components/DataDictionary/components/Table/components/BasicCell/types.d.ts +4 -0
- package/lib/components/DataDictionary/components/Table/components/BasicCell/types.js +1 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.d.ts +4 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.js +23 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionary/types.d.ts +8 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionary/types.js +1 -0
- package/lib/components/DataDictionary/hooks/UseLayoutSpacing/hook.d.ts +2 -0
- package/lib/components/DataDictionary/hooks/UseLayoutSpacing/hook.js +10 -0
- package/lib/components/DataDictionary/hooks/UseLayoutSpacing/types.d.ts +7 -0
- package/lib/components/DataDictionary/hooks/UseLayoutSpacing/types.js +1 -0
- 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/ExportMethod/exportMethod.stories.d.ts +22 -0
- package/lib/components/Export/components/ExportMethod/exportMethod.stories.js +20 -0
- package/lib/components/Filter/components/Filter/filter.stories.d.ts +25 -0
- package/lib/components/Filter/components/Filter/filter.stories.js +42 -0
- package/lib/components/Filter/components/FilterTag/filterTag.stories.d.ts +16 -0
- package/lib/components/Filter/components/FilterTag/filterTag.stories.js +17 -0
- package/lib/components/Filter/components/Filters/components/CategoryLabel/categoryLabel.d.ts +9 -0
- package/lib/components/Filter/components/Filters/components/CategoryLabel/categoryLabel.js +15 -0
- package/lib/components/Filter/components/Filters/components/Controls/controls.d.ts +12 -0
- package/lib/components/Filter/components/Filters/components/Controls/controls.js +20 -0
- package/lib/components/Filter/components/Filters/components/Controls/controls.styles.d.ts +5 -0
- package/lib/components/Filter/components/Filters/components/Controls/controls.styles.js +7 -0
- package/lib/components/Filter/components/Filters/components/Controls/types.d.ts +6 -0
- package/lib/components/Filter/components/Filters/components/Controls/types.js +1 -0
- package/lib/components/Filter/components/Filters/filters.stories.d.ts +6 -0
- package/lib/components/Filter/components/Filters/filters.stories.js +91 -0
- package/lib/components/Filter/components/SearchAllFilters/components/AutocompletePopper/autocompletePopper.styles.d.ts +3 -0
- package/lib/components/Filter/components/SearchAllFilters/components/AutocompletePopper/autocompletePopper.styles.js +15 -0
- package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.stories.d.ts +6 -0
- package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.stories.js +82 -0
- package/lib/components/Filter/components/SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton.d.ts +1 -0
- package/lib/components/Filter/components/SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton.js +14 -0
- package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.d.ts +2 -0
- package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.js +12 -0
- package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.styles.d.ts +5 -0
- package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.styles.js +34 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/constants.d.ts +5 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/constants.js +5 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/endAdornment.d.ts +2 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/endAdornment.js +19 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/endAdornment.styles.d.ts +12 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/endAdornment.styles.js +22 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/types.d.ts +4 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/types.js +1 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/utils.d.ts +8 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/utils.js +14 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/components/Title/title.d.ts +2 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/components/Title/title.js +15 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/components/Title/types.d.ts +7 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/components/Title/types.js +1 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/constants.d.ts +2 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/constants.js +27 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/hook.d.ts +9 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/hook.js +16 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/tooltip.d.ts +2 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/tooltip.js +11 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/types.d.ts +5 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/types.js +1 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/resultSummary.d.ts +2 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/resultSummary.js +17 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/resultSummary.styles.d.ts +5 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/resultSummary.styles.js +10 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/types.d.ts +8 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/types.js +1 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/utils.d.ts +7 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/utils.js +19 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/constants.d.ts +2 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/constants.js +10 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/facetAssistant.d.ts +6 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/facetAssistant.js +70 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/facetAssistant.styles.d.ts +8 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/facetAssistant.styles.js +14 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/stories/aiFacetAssistant.stories.d.ts +6 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/stories/aiFacetAssistant.stories.js +12 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/types.d.ts +13 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/types.js +1 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/utils.d.ts +15 -0
- package/lib/components/Filter/components/ai/components/FacetAssistant/utils.js +91 -0
- package/lib/components/Filter/components/controls/Controls/components/AiSwitch/aiSwitch.d.ts +9 -0
- package/lib/components/Filter/components/controls/Controls/components/AiSwitch/aiSwitch.js +16 -0
- package/lib/components/Filter/components/controls/Controls/components/AiSwitch/aiSwitch.styles.d.ts +3 -0
- package/lib/components/Filter/components/controls/Controls/components/AiSwitch/aiSwitch.styles.js +9 -0
- package/lib/components/Filter/components/controls/Controls/components/AiSwitch/stories/aiSwitch.stories.d.ts +6 -0
- package/lib/components/Filter/components/controls/Controls/components/AiSwitch/stories/aiSwitch.stories.js +8 -0
- package/lib/components/Filter/components/controls/Controls/components/AiSwitch/types.d.ts +4 -0
- package/lib/components/Filter/components/controls/Controls/components/AiSwitch/types.js +1 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/Button/button.d.ts +10 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/Button/button.js +16 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/Button/button.styles.d.ts +6 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/Button/button.styles.js +18 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/Button/types.d.ts +2 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/Button/types.js +1 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/constants.d.ts +2 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/constants.js +4 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/iconButton.d.ts +10 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/iconButton.js +18 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/iconButton.styles.d.ts +6 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/iconButton.styles.js +13 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/types.d.ts +2 -0
- package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/types.js +1 -0
- package/lib/components/Filter/components/surfaces/drawer/components/Button/types.d.ts +4 -0
- package/lib/components/Filter/components/surfaces/drawer/components/Button/types.js +1 -0
- package/lib/components/Index/components/Cell/cell.d.ts +7 -0
- package/lib/components/Index/components/Cell/cell.js +10 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.js +20 -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 +10 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.js +10 -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 +91 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.d.ts +132 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.js +230 -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 +18 -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 +97 -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 +15 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/types.d.ts +8 -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 +23 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/entityList.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/entityList.js +14 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/types.d.ts +6 -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 +15 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.styles.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.styles.js +20 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.js +14 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/types.d.ts +13 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/types.js +5 -0
- package/lib/components/Index/components/EntitiesView/stories/entitiesView.stories.d.ts +8 -0
- package/lib/components/Index/components/EntitiesView/stories/entitiesView.stories.js +50 -0
- package/lib/components/Index/components/EntitiesView/types.d.ts +8 -0
- package/lib/components/Index/components/EntitiesView/types.js +1 -0
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.d.ts +1 -0
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.js +13 -0
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.styles.d.ts +3 -0
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.styles.js +13 -0
- package/lib/components/Index/components/Hero/components/Summaries/stories/summaries.stories.d.ts +6 -0
- package/lib/components/Index/components/Hero/components/Summaries/stories/summaries.stories.js +14 -0
- package/lib/components/Index/components/Hero/components/Summaries/summaries.d.ts +9 -0
- package/lib/components/Index/components/Hero/components/Summaries/summaries.js +12 -0
- package/lib/components/Index/components/Hero/components/Summaries/summaries.stories.d.ts +13 -0
- package/lib/components/Index/components/Hero/components/Summaries/summaries.stories.js +18 -0
- package/lib/components/Index/components/Hero/components/Summaries/summaries.styles.d.ts +7 -0
- package/lib/components/Index/components/Hero/components/Summaries/summaries.styles.js +26 -0
- package/lib/components/Index/components/Hero/hero.d.ts +11 -0
- package/lib/components/Index/components/Hero/hero.js +12 -0
- package/lib/components/Index/components/Hero/hero.stories.d.ts +23 -0
- package/lib/components/Index/components/Hero/hero.stories.js +22 -0
- package/lib/components/Index/components/Hero/hero.styles.d.ts +16 -0
- package/lib/components/Index/components/Hero/hero.styles.js +44 -0
- package/lib/components/Index/components/Hero/stories/hero.stories.d.ts +6 -0
- package/lib/components/Index/components/Hero/stories/hero.stories.js +16 -0
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.d.ts +8 -0
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.js +57 -0
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.styles.d.ts +4 -0
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.styles.js +10 -0
- package/lib/components/Index/components/NTag/nTag.d.ts +10 -0
- package/lib/components/Index/components/NTag/nTag.js +8 -0
- package/lib/components/Index/components/NTagCell/nTagCell.d.ts +11 -0
- package/lib/components/Index/components/NTagCell/nTagCell.js +29 -0
- package/lib/components/Index/components/NTagCell/nTagCell.stories.d.ts +5 -0
- package/lib/components/Index/components/NTagCell/nTagCell.stories.js +16 -0
- package/lib/components/Index/components/Tabs/common/utils.d.ts +8 -0
- package/lib/components/Index/components/Tabs/common/utils.js +19 -0
- package/lib/components/Index/components/Tabs/tabs.d.ts +1 -0
- package/lib/components/Index/components/Tabs/tabs.js +20 -0
- 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.stories.d.ts +6 -0
- package/lib/components/Index/index.stories.js +26 -0
- package/lib/components/Index/stories/index.stories.d.ts +6 -0
- package/lib/components/Index/stories/index.stories.js +17 -0
- package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.d.ts +6 -0
- package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.js +10 -0
- package/lib/components/Layout/components/Footer/footer.stories.d.ts +27 -0
- package/lib/components/Layout/components/Footer/footer.stories.js +64 -0
- 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/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/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/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/Login/login.stories.d.ts +6 -0
- package/lib/components/Login/login.stories.js +31 -0
- 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/DownloadEntityResults/downloadEntityResults.d.ts +6 -0
- package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.js +17 -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.d.ts +9 -0
- package/lib/components/Table/components/Pagination/pagination.js +19 -0
- package/lib/components/Table/components/Pagination/pagination.stories.d.ts +28 -0
- package/lib/components/Table/components/Pagination/pagination.stories.js +24 -0
- package/lib/components/Table/components/Pagination/pagination.styles.d.ts +4 -0
- package/lib/components/Table/components/Pagination/pagination.styles.js +15 -0
- package/lib/components/Table/components/TableBody/hooks/virtualizer/constants.d.ts +3 -0
- package/lib/components/Table/components/TableBody/hooks/virtualizer/constants.js +3 -0
- package/lib/components/Table/components/TableBody/hooks/virtualizer/hook.d.ts +8 -0
- package/lib/components/Table/components/TableBody/hooks/virtualizer/hook.js +18 -0
- package/lib/components/Table/components/TableBody/hooks/virtualizer/types.d.ts +4 -0
- package/lib/components/Table/components/TableBody/hooks/virtualizer/types.js +1 -0
- package/lib/components/Table/components/TableBody/utils.d.ts +12 -0
- package/lib/components/Table/components/TableBody/utils.js +17 -0
- package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/types.d.ts +3 -0
- package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/types.js +1 -0
- package/lib/components/Table/components/TableCell/components/MarkdownCell/types.d.ts +3 -0
- package/lib/components/Table/components/TableCell/components/MarkdownCell/types.js +1 -0
- 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.styles.d.ts +4 -0
- package/lib/components/TableCreator/tableCreator.styles.js +4 -0
- 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/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/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/CustomIcon/components/AiIcon/aiIcon.d.ts +2 -0
- package/lib/components/common/CustomIcon/components/AiIcon/aiIcon.js +6 -0
- 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/Switch/provider/context.d.ts +2 -0
- package/lib/components/common/Switch/provider/context.js +6 -0
- package/lib/components/common/Switch/provider/hook.d.ts +6 -0
- package/lib/components/common/Switch/provider/hook.js +9 -0
- package/lib/components/common/Switch/provider/provider.d.ts +9 -0
- package/lib/components/common/Switch/provider/provider.js +16 -0
- package/lib/components/common/Switch/provider/types.d.ts +6 -0
- package/lib/components/common/Switch/provider/types.js +1 -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/useEntityListRelatedView.d.ts +15 -0
- package/lib/hooks/useEntityListRelatedView.js +62 -0
- package/lib/hooks/useExploreMode.d.ts +14 -0
- package/lib/hooks/useExploreMode.js +20 -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/useScroll.d.ts +10 -0
- package/lib/hooks/useScroll.js +12 -0
- package/lib/hooks/useSessionTimeout.d.ts +11 -0
- package/lib/hooks/useSessionTimeout.js +28 -0
- package/lib/mocks/@storybook/addon-actions.d.ts +9 -0
- package/lib/mocks/@storybook/addon-actions.js +9 -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/styles/common/mixins/colors.d.ts +25 -0
- package/lib/styles/common/mixins/colors.js +32 -0
- package/lib/styles/common/mixins/fonts.d.ts +16 -0
- package/lib/styles/common/mixins/fonts.js +30 -0
- package/lib/styles/common/mixins/shadows.d.ts +3 -0
- package/lib/styles/common/mixins/shadows.js +4 -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/switch.d.ts +7 -0
- package/lib/styles/common/mui/switch.js +13 -0
- package/lib/theme/common/entities.d.ts +6 -0
- package/lib/theme/common/entities.js +1 -0
- package/lib/theme/components/muiSwitch.d.ts +2 -0
- package/lib/theme/components/muiSwitch.js +52 -0
- package/lib/utils/form.d.ts +8 -0
- package/lib/utils/form.js +17 -0
- package/lib/views/ExploreView/components/filters/Search/search.d.ts +12 -0
- package/lib/views/ExploreView/components/filters/Search/search.js +19 -0
- package/package.json +6 -1
- package/.eslintignore +0 -5
- package/.eslintrc.json +0 -79
- package/.github/copilot-instructions.md +0 -176
- package/.github/workflows/release-please.yml +0 -49
- package/.github/workflows/run-checks.yml +0 -57
- package/.husky/commit-msg +0 -18
- package/.husky/pre-commit +0 -43
- package/.prettierignore +0 -19
- package/.prettierrc.json +0 -1
- package/.release-please-manifest.json +0 -3
- package/.storybook/main.ts +0 -10
- package/.storybook/preview-head.html +0 -4
- package/.storybook/preview.js +0 -6
- package/CHANGELOG.md +0 -1117
- package/CLAUDE.md +0 -214
- package/backend/README.md +0 -64
- package/backend/__init__.py +0 -0
- package/backend/controllers/__init__.py +0 -0
- package/backend/controllers/facets_controller.py +0 -16
- package/backend/controllers/models.py +0 -11
- package/backend/main.py +0 -8
- package/backend/requirements.txt +0 -4
- package/backend/services/__init__.py +0 -0
- package/backend/services/facets_service.py +0 -68
- package/backend/services/models.py +0 -43
- package/commitlint.config.js +0 -1
- package/docs/TRUSTED_PUBLISHING.md +0 -132
- package/jest.config.js +0 -6
- package/release-please-config.json +0 -23
- package/tests/azulFileDownload.test.tsx +0 -96
- package/tests/buildCategoryViews.test.ts +0 -282
- package/tests/buildRequestFilters.test.ts +0 -60
- package/tests/buildRequestManifest.test.ts +0 -103
- package/tests/chart.test.tsx +0 -274
- package/tests/chartSortUtils.test.ts +0 -119
- package/tests/chartView.test.tsx +0 -48
- package/tests/dataDictionaryColumnFilters.test.tsx +0 -101
- package/tests/dataDictionary_utils.test.ts +0 -153
- package/tests/fetchApi.test.ts +0 -93
- package/tests/filter.test.tsx +0 -100
- package/tests/filterMenu.test.ts +0 -100
- package/tests/filterRange.test.tsx +0 -372
- package/tests/filterSortUtils.test.ts +0 -180
- package/tests/filters.test.tsx +0 -61
- package/tests/getFacetedMinMaxValues.test.ts +0 -166
- package/tests/getFilterSortType.test.ts +0 -45
- package/tests/getProfileStatus.test.ts +0 -290
- package/tests/linkCell.test.tsx +0 -89
- package/tests/markdownCell.test.tsx +0 -52
- package/tests/provider.test.tsx +0 -189
- package/tests/research.chatState.test.ts +0 -463
- package/tests/research.fetchResponse.test.ts +0 -164
- package/tests/research.queryProvider.test.ts +0 -321
- package/tests/research.useKeyShortCuts.test.ts +0 -256
- package/tests/rowSelectionValidation.test.ts +0 -282
- package/tests/setup.ts +0 -19
- package/tests/stepIcon.test.tsx +0 -42
- package/tests/tableFilter.test.tsx +0 -90
- package/tests/terraProfileProvider.test.tsx +0 -117
- package/tests/theme.test.ts +0 -465
- package/tests/toggleButtonGroupProvider.test.tsx +0 -125
- package/tests/transformRoute.test.ts +0 -21
- package/tests/tsconfig.json +0 -8
- package/tests/useFileLocation.test.ts +0 -36
- package/tests/useRequestManifest.test.ts +0 -201
- package/tests/useRouteHistory.test.ts +0 -97
- package/tests/useSessionActive.test.ts +0 -106
- package/tests/useWindowResize.test.ts +0 -130
- package/tests/viewModelBuilders_utils.test.ts +0 -58
- package/tests/viewToggle.test.tsx +0 -54
- package/tsconfig.json +0 -25
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
LoginStatus,
|
|
3
|
-
REQUEST_STATUS,
|
|
4
|
-
} from "../src/providers/authentication/terra/hooks/common/entities";
|
|
5
|
-
import { TerraNIHResponse } from "../src/providers/authentication/terra/hooks/useFetchTerraNIHProfile";
|
|
6
|
-
import { TerraResponse } from "../src/providers/authentication/terra/hooks/useFetchTerraProfile";
|
|
7
|
-
import { TerraTermsOfServiceResponse } from "../src/providers/authentication/terra/hooks/useFetchTerraTermsOfService";
|
|
8
|
-
import { TERRA_PROFILE_STATUS } from "../src/providers/authentication/terra/types";
|
|
9
|
-
import { getProfileStatus } from "../src/providers/authentication/terra/utils";
|
|
10
|
-
|
|
11
|
-
const LOGIN_STATUS_NIH_COMPLETED: LoginStatus<TerraNIHResponse> = {
|
|
12
|
-
isSuccess: true,
|
|
13
|
-
isSupported: true,
|
|
14
|
-
requestStatus: REQUEST_STATUS.COMPLETED,
|
|
15
|
-
response: undefined,
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const LOGIN_STATUS_TERRA_COMPLETED: LoginStatus<TerraResponse> = {
|
|
19
|
-
isSuccess: true,
|
|
20
|
-
isSupported: true,
|
|
21
|
-
requestStatus: REQUEST_STATUS.COMPLETED,
|
|
22
|
-
response: undefined,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const LOGIN_STATUS_TOS_COMPLETED: LoginStatus<TerraTermsOfServiceResponse> = {
|
|
26
|
-
isSuccess: true,
|
|
27
|
-
isSupported: true,
|
|
28
|
-
requestStatus: REQUEST_STATUS.COMPLETED,
|
|
29
|
-
response: undefined,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const LOGIN_STATUS_TOS_COMPLETED_UNSUCCESSFUL: LoginStatus<TerraTermsOfServiceResponse> =
|
|
33
|
-
{
|
|
34
|
-
isSuccess: false,
|
|
35
|
-
isSupported: true,
|
|
36
|
-
requestStatus: REQUEST_STATUS.COMPLETED,
|
|
37
|
-
response: undefined,
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const LOGIN_STATUS_NIH_NOT_STARTED: LoginStatus<TerraNIHResponse> = {
|
|
41
|
-
isSuccess: false,
|
|
42
|
-
isSupported: true,
|
|
43
|
-
requestStatus: REQUEST_STATUS.NOT_STARTED,
|
|
44
|
-
response: undefined,
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const LOGIN_STATUS_TERRA_NOT_STARTED: LoginStatus<TerraResponse> = {
|
|
48
|
-
isSuccess: false,
|
|
49
|
-
isSupported: true,
|
|
50
|
-
requestStatus: REQUEST_STATUS.NOT_STARTED,
|
|
51
|
-
response: undefined,
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const LOGIN_STATUS_TOS_NOT_STARTED: LoginStatus<TerraTermsOfServiceResponse> = {
|
|
55
|
-
isSuccess: false,
|
|
56
|
-
isSupported: true,
|
|
57
|
-
requestStatus: REQUEST_STATUS.NOT_STARTED,
|
|
58
|
-
response: undefined,
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const LOGIN_STATUS_NIH_PENDING: LoginStatus<TerraNIHResponse> = {
|
|
62
|
-
isSuccess: false,
|
|
63
|
-
isSupported: true,
|
|
64
|
-
requestStatus: REQUEST_STATUS.PENDING,
|
|
65
|
-
response: undefined,
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const LOGIN_STATUS_TERRA_PENDING: LoginStatus<TerraResponse> = {
|
|
69
|
-
isSuccess: false,
|
|
70
|
-
isSupported: true,
|
|
71
|
-
requestStatus: REQUEST_STATUS.PENDING,
|
|
72
|
-
response: undefined,
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const LOGIN_STATUS_TOS_PENDING: LoginStatus<TerraTermsOfServiceResponse> = {
|
|
76
|
-
isSuccess: false,
|
|
77
|
-
isSupported: true,
|
|
78
|
-
requestStatus: REQUEST_STATUS.PENDING,
|
|
79
|
-
response: undefined,
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
const LOGIN_STATUS_NIH_UNSUPPORTED: LoginStatus<TerraNIHResponse> = {
|
|
83
|
-
isSuccess: false,
|
|
84
|
-
isSupported: false,
|
|
85
|
-
requestStatus: REQUEST_STATUS.NOT_STARTED,
|
|
86
|
-
response: undefined,
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
const LOGIN_STATUS_TERRA_UNSUPPORTED: LoginStatus<TerraResponse> = {
|
|
90
|
-
isSuccess: false,
|
|
91
|
-
isSupported: false,
|
|
92
|
-
requestStatus: REQUEST_STATUS.NOT_STARTED,
|
|
93
|
-
response: undefined,
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
const LOGIN_STATUS_TOS_UNSUPPORTED: LoginStatus<TerraTermsOfServiceResponse> = {
|
|
97
|
-
isSuccess: false,
|
|
98
|
-
isSupported: false,
|
|
99
|
-
requestStatus: REQUEST_STATUS.NOT_STARTED,
|
|
100
|
-
response: undefined,
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
describe("getProfileStatus", () => {
|
|
104
|
-
test("not authenticated, services not started", () => {
|
|
105
|
-
expect(
|
|
106
|
-
getProfileStatus(
|
|
107
|
-
false,
|
|
108
|
-
LOGIN_STATUS_NIH_NOT_STARTED,
|
|
109
|
-
LOGIN_STATUS_TERRA_NOT_STARTED,
|
|
110
|
-
LOGIN_STATUS_TOS_NOT_STARTED,
|
|
111
|
-
),
|
|
112
|
-
).toBe(TERRA_PROFILE_STATUS.PENDING);
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
test("not authenticated, services unsupported", () => {
|
|
116
|
-
expect(
|
|
117
|
-
getProfileStatus(
|
|
118
|
-
false,
|
|
119
|
-
LOGIN_STATUS_NIH_UNSUPPORTED,
|
|
120
|
-
LOGIN_STATUS_TERRA_UNSUPPORTED,
|
|
121
|
-
LOGIN_STATUS_TOS_UNSUPPORTED,
|
|
122
|
-
),
|
|
123
|
-
).toBe(TERRA_PROFILE_STATUS.PENDING);
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
test("not authenticated, services completed", () => {
|
|
127
|
-
expect(
|
|
128
|
-
getProfileStatus(
|
|
129
|
-
false,
|
|
130
|
-
LOGIN_STATUS_NIH_COMPLETED,
|
|
131
|
-
LOGIN_STATUS_TERRA_COMPLETED,
|
|
132
|
-
LOGIN_STATUS_TOS_COMPLETED,
|
|
133
|
-
),
|
|
134
|
-
).toBe(TERRA_PROFILE_STATUS.PENDING);
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
test("authenticated, services not started", () => {
|
|
138
|
-
expect(
|
|
139
|
-
getProfileStatus(
|
|
140
|
-
true,
|
|
141
|
-
LOGIN_STATUS_NIH_NOT_STARTED,
|
|
142
|
-
LOGIN_STATUS_TERRA_NOT_STARTED,
|
|
143
|
-
LOGIN_STATUS_TOS_NOT_STARTED,
|
|
144
|
-
),
|
|
145
|
-
).toBe(TERRA_PROFILE_STATUS.PENDING);
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
test("authenticated, services pending", () => {
|
|
149
|
-
expect(
|
|
150
|
-
getProfileStatus(
|
|
151
|
-
true,
|
|
152
|
-
LOGIN_STATUS_NIH_PENDING,
|
|
153
|
-
LOGIN_STATUS_TERRA_PENDING,
|
|
154
|
-
LOGIN_STATUS_TOS_PENDING,
|
|
155
|
-
),
|
|
156
|
-
).toBe(TERRA_PROFILE_STATUS.PENDING);
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
test("authenticated, nih pending, other services completed", () => {
|
|
160
|
-
expect(
|
|
161
|
-
getProfileStatus(
|
|
162
|
-
true,
|
|
163
|
-
LOGIN_STATUS_NIH_PENDING,
|
|
164
|
-
LOGIN_STATUS_TERRA_COMPLETED,
|
|
165
|
-
LOGIN_STATUS_TOS_COMPLETED,
|
|
166
|
-
),
|
|
167
|
-
).toBe(TERRA_PROFILE_STATUS.PENDING);
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
test("authenticated, terra pending, other services completed", () => {
|
|
171
|
-
expect(
|
|
172
|
-
getProfileStatus(
|
|
173
|
-
true,
|
|
174
|
-
LOGIN_STATUS_NIH_COMPLETED,
|
|
175
|
-
LOGIN_STATUS_TERRA_PENDING,
|
|
176
|
-
LOGIN_STATUS_TOS_COMPLETED,
|
|
177
|
-
),
|
|
178
|
-
).toBe(TERRA_PROFILE_STATUS.PENDING);
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
test("authenticated, tos pending, other services completed", () => {
|
|
182
|
-
expect(
|
|
183
|
-
getProfileStatus(
|
|
184
|
-
true,
|
|
185
|
-
LOGIN_STATUS_NIH_COMPLETED,
|
|
186
|
-
LOGIN_STATUS_TERRA_COMPLETED,
|
|
187
|
-
LOGIN_STATUS_TOS_PENDING,
|
|
188
|
-
),
|
|
189
|
-
).toBe(TERRA_PROFILE_STATUS.PENDING);
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
test("authenticated, nih completed, terra pending, tos not started", () => {
|
|
193
|
-
expect(
|
|
194
|
-
getProfileStatus(
|
|
195
|
-
true,
|
|
196
|
-
LOGIN_STATUS_NIH_COMPLETED,
|
|
197
|
-
LOGIN_STATUS_TERRA_PENDING,
|
|
198
|
-
LOGIN_STATUS_TOS_NOT_STARTED,
|
|
199
|
-
),
|
|
200
|
-
).toBe(TERRA_PROFILE_STATUS.PENDING);
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
test("authenticated, nih not started, terra completed, tos pending", () => {
|
|
204
|
-
expect(
|
|
205
|
-
getProfileStatus(
|
|
206
|
-
true,
|
|
207
|
-
LOGIN_STATUS_NIH_NOT_STARTED,
|
|
208
|
-
LOGIN_STATUS_TERRA_COMPLETED,
|
|
209
|
-
LOGIN_STATUS_TOS_PENDING,
|
|
210
|
-
),
|
|
211
|
-
).toBe(TERRA_PROFILE_STATUS.PENDING);
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
test("authenticated, nih pending, terra not started, tos completed", () => {
|
|
215
|
-
expect(
|
|
216
|
-
getProfileStatus(
|
|
217
|
-
true,
|
|
218
|
-
LOGIN_STATUS_NIH_PENDING,
|
|
219
|
-
LOGIN_STATUS_TERRA_NOT_STARTED,
|
|
220
|
-
LOGIN_STATUS_TOS_COMPLETED,
|
|
221
|
-
),
|
|
222
|
-
).toBe(TERRA_PROFILE_STATUS.PENDING);
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
test("authenticated, services unsupported", () => {
|
|
226
|
-
expect(
|
|
227
|
-
getProfileStatus(
|
|
228
|
-
true,
|
|
229
|
-
LOGIN_STATUS_NIH_UNSUPPORTED,
|
|
230
|
-
LOGIN_STATUS_TERRA_UNSUPPORTED,
|
|
231
|
-
LOGIN_STATUS_TOS_UNSUPPORTED,
|
|
232
|
-
),
|
|
233
|
-
).toBe(TERRA_PROFILE_STATUS.AUTHENTICATED);
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
test("authenticated, services completed, tos unsuccessful", () => {
|
|
237
|
-
expect(
|
|
238
|
-
getProfileStatus(
|
|
239
|
-
true,
|
|
240
|
-
LOGIN_STATUS_NIH_COMPLETED,
|
|
241
|
-
LOGIN_STATUS_TERRA_COMPLETED,
|
|
242
|
-
LOGIN_STATUS_TOS_COMPLETED_UNSUCCESSFUL,
|
|
243
|
-
),
|
|
244
|
-
).toBe(TERRA_PROFILE_STATUS.UNAUTHENTICATED);
|
|
245
|
-
});
|
|
246
|
-
|
|
247
|
-
test("authenticated, nih unsupported, terra completed, tos completed unsuccessfully", () => {
|
|
248
|
-
expect(
|
|
249
|
-
getProfileStatus(
|
|
250
|
-
true,
|
|
251
|
-
LOGIN_STATUS_NIH_UNSUPPORTED,
|
|
252
|
-
LOGIN_STATUS_TERRA_COMPLETED,
|
|
253
|
-
LOGIN_STATUS_TOS_COMPLETED_UNSUCCESSFUL,
|
|
254
|
-
),
|
|
255
|
-
).toBe(TERRA_PROFILE_STATUS.UNAUTHENTICATED);
|
|
256
|
-
});
|
|
257
|
-
|
|
258
|
-
test("authenticated, nih unsupported, other services completed", () => {
|
|
259
|
-
expect(
|
|
260
|
-
getProfileStatus(
|
|
261
|
-
true,
|
|
262
|
-
LOGIN_STATUS_NIH_UNSUPPORTED,
|
|
263
|
-
LOGIN_STATUS_TERRA_COMPLETED,
|
|
264
|
-
LOGIN_STATUS_TOS_COMPLETED,
|
|
265
|
-
),
|
|
266
|
-
).toBe(TERRA_PROFILE_STATUS.AUTHENTICATED);
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
test("authenticated, terra completed, other services unsupported", () => {
|
|
270
|
-
expect(
|
|
271
|
-
getProfileStatus(
|
|
272
|
-
true,
|
|
273
|
-
LOGIN_STATUS_NIH_UNSUPPORTED,
|
|
274
|
-
LOGIN_STATUS_TERRA_COMPLETED,
|
|
275
|
-
LOGIN_STATUS_TOS_UNSUPPORTED,
|
|
276
|
-
),
|
|
277
|
-
).toBe(TERRA_PROFILE_STATUS.UNAUTHENTICATED);
|
|
278
|
-
});
|
|
279
|
-
|
|
280
|
-
test("authenticated, services completed", () => {
|
|
281
|
-
expect(
|
|
282
|
-
getProfileStatus(
|
|
283
|
-
true,
|
|
284
|
-
LOGIN_STATUS_NIH_COMPLETED,
|
|
285
|
-
LOGIN_STATUS_TERRA_COMPLETED,
|
|
286
|
-
LOGIN_STATUS_TOS_COMPLETED,
|
|
287
|
-
),
|
|
288
|
-
).toBe(TERRA_PROFILE_STATUS.AUTHENTICATED);
|
|
289
|
-
});
|
|
290
|
-
});
|
package/tests/linkCell.test.tsx
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { matchers } from "@emotion/jest";
|
|
2
|
-
import { composeStories } from "@storybook/react";
|
|
3
|
-
import "@testing-library/jest-dom";
|
|
4
|
-
import { render, screen } from "@testing-library/react";
|
|
5
|
-
import React from "react";
|
|
6
|
-
import {
|
|
7
|
-
ANCHOR_TARGET,
|
|
8
|
-
REL_ATTRIBUTE,
|
|
9
|
-
} from "../src/components/Links/common/entities";
|
|
10
|
-
import * as stories from "../src/components/Table/components/TableCell/components/LinkCell/stories/linkCell.stories";
|
|
11
|
-
|
|
12
|
-
expect.extend(matchers);
|
|
13
|
-
|
|
14
|
-
const { ClientSide, External, Invalid, WithCustomStyle } =
|
|
15
|
-
composeStories(stories);
|
|
16
|
-
|
|
17
|
-
const STYLE_RULE_PROPERTIES = {
|
|
18
|
-
TEXT_DECORATION: "text-decoration",
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const STYLE_RULE_VALUES = {
|
|
22
|
-
NONE: "none",
|
|
23
|
-
UNDERLINE: "underline",
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
describe("TableCell, LinkCell", () => {
|
|
27
|
-
it("renders client-side link", async () => {
|
|
28
|
-
render(<ClientSide />);
|
|
29
|
-
const anchorEl = screen.getByText("Explore");
|
|
30
|
-
expect(anchorEl).toBeDefined();
|
|
31
|
-
expect(anchorEl?.getAttribute("href")).toBe("/");
|
|
32
|
-
expect(anchorEl?.getAttribute("rel")).toBe(REL_ATTRIBUTE.NO_OPENER);
|
|
33
|
-
expect(anchorEl?.getAttribute("target")).toBe(ANCHOR_TARGET.SELF);
|
|
34
|
-
// Expect MuiLink-underlineAlways class and underline style.
|
|
35
|
-
expect(anchorEl).toHaveClass("MuiLink-underlineAlways");
|
|
36
|
-
expect(anchorEl).toHaveStyleRule(
|
|
37
|
-
STYLE_RULE_PROPERTIES.TEXT_DECORATION,
|
|
38
|
-
STYLE_RULE_VALUES.UNDERLINE,
|
|
39
|
-
);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it("renders external link", async () => {
|
|
43
|
-
render(<External />);
|
|
44
|
-
const anchorEl = screen.getByText("Explore");
|
|
45
|
-
expect(anchorEl).toBeDefined();
|
|
46
|
-
expect(anchorEl?.getAttribute("href")).toBe("https://www.example.com");
|
|
47
|
-
expect(anchorEl?.getAttribute("rel")).toBe(
|
|
48
|
-
REL_ATTRIBUTE.NO_OPENER_NO_REFERRER,
|
|
49
|
-
);
|
|
50
|
-
expect(anchorEl?.getAttribute("target")).toBe(ANCHOR_TARGET.BLANK);
|
|
51
|
-
// Expect MuiLink-underlineAlways class and underline style.
|
|
52
|
-
expect(anchorEl).toHaveClass("MuiLink-underlineAlways");
|
|
53
|
-
expect(anchorEl).toHaveStyleRule(
|
|
54
|
-
STYLE_RULE_PROPERTIES.TEXT_DECORATION,
|
|
55
|
-
STYLE_RULE_VALUES.UNDERLINE,
|
|
56
|
-
);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
it("renders plain text for invalid link", () => {
|
|
60
|
-
render(<Invalid />);
|
|
61
|
-
const spanEl = screen.getByText("Explore");
|
|
62
|
-
expect(spanEl.tagName).toBe("SPAN");
|
|
63
|
-
expect(spanEl.getAttribute("href")).toBeNull();
|
|
64
|
-
expect(spanEl.getAttribute("rel")).toBeNull();
|
|
65
|
-
expect(spanEl.getAttribute("target")).toBeNull();
|
|
66
|
-
// Expect no MuiLink-root class and no underline style.
|
|
67
|
-
expect(spanEl).not.toHaveClass("MuiLink-root");
|
|
68
|
-
expect(spanEl).not.toHaveStyleRule(
|
|
69
|
-
STYLE_RULE_PROPERTIES.TEXT_DECORATION,
|
|
70
|
-
STYLE_RULE_VALUES.UNDERLINE,
|
|
71
|
-
);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it("renders link with custom link props", async () => {
|
|
75
|
-
render(<WithCustomStyle />);
|
|
76
|
-
const anchorEl = screen.getByText("Explore");
|
|
77
|
-
// Expect MuiLink-underlineNone class and no underline style.
|
|
78
|
-
expect(anchorEl).toHaveClass("MuiLink-underlineNone");
|
|
79
|
-
expect(anchorEl).toHaveStyleRule(
|
|
80
|
-
STYLE_RULE_PROPERTIES.TEXT_DECORATION,
|
|
81
|
-
STYLE_RULE_VALUES.NONE,
|
|
82
|
-
);
|
|
83
|
-
expect(anchorEl).toHaveStyleRule(
|
|
84
|
-
STYLE_RULE_PROPERTIES.TEXT_DECORATION,
|
|
85
|
-
STYLE_RULE_VALUES.NONE,
|
|
86
|
-
{ target: ":hover" },
|
|
87
|
-
);
|
|
88
|
-
});
|
|
89
|
-
});
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { matchers } from "@emotion/jest";
|
|
2
|
-
import { composeStories } from "@storybook/react";
|
|
3
|
-
import { Column } from "@tanstack/react-table";
|
|
4
|
-
import "@testing-library/jest-dom";
|
|
5
|
-
import { render, screen } from "@testing-library/react";
|
|
6
|
-
import React from "react";
|
|
7
|
-
import {
|
|
8
|
-
ANCHOR_TARGET,
|
|
9
|
-
REL_ATTRIBUTE,
|
|
10
|
-
} from "../src/components/Links/common/entities";
|
|
11
|
-
import { STYLED_ANCHOR } from "../src/components/Table/components/TableCell/components/MarkdownCell/stories/constants";
|
|
12
|
-
import * as stories from "../src/components/Table/components/TableCell/components/MarkdownCell/stories/markdownCell.stories";
|
|
13
|
-
|
|
14
|
-
expect.extend(matchers);
|
|
15
|
-
|
|
16
|
-
const { Default, WithHtml } = composeStories(stories);
|
|
17
|
-
|
|
18
|
-
describe("MarkdownCell", () => {
|
|
19
|
-
it("renders the markdown content", async () => {
|
|
20
|
-
render(<Default />);
|
|
21
|
-
expect(await screen.findByText("UBERON:0000955")).toBeInTheDocument();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("renders HTML and anchor elements", async () => {
|
|
25
|
-
render(<WithHtml />);
|
|
26
|
-
const anchorEl = await screen.findByText("example link");
|
|
27
|
-
expect(anchorEl).toBeInTheDocument();
|
|
28
|
-
expect(anchorEl.getAttribute("href")).toBe("https://www.example.com");
|
|
29
|
-
expect(anchorEl.getAttribute("target")).toBe(ANCHOR_TARGET.BLANK);
|
|
30
|
-
expect(anchorEl.getAttribute("rel")).toBe(
|
|
31
|
-
REL_ATTRIBUTE.NO_OPENER_NO_REFERRER,
|
|
32
|
-
);
|
|
33
|
-
expect(anchorEl).toHaveClass("MuiLink-root");
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it("applies the correct className and component", async () => {
|
|
37
|
-
render(
|
|
38
|
-
<WithHtml
|
|
39
|
-
className="css-pygqsj"
|
|
40
|
-
column={
|
|
41
|
-
{
|
|
42
|
-
columnDef: { meta: { components: { a: STYLED_ANCHOR } } },
|
|
43
|
-
} as unknown as Column<unknown, string>
|
|
44
|
-
}
|
|
45
|
-
/>,
|
|
46
|
-
);
|
|
47
|
-
const anchorEl = await screen.findByText("example link");
|
|
48
|
-
expect(anchorEl).toHaveStyleRule("background-color", "green");
|
|
49
|
-
expect(anchorEl).toHaveStyleRule("color", "white");
|
|
50
|
-
expect(anchorEl.closest(".css-pygqsj")).toBeInTheDocument();
|
|
51
|
-
});
|
|
52
|
-
});
|
package/tests/provider.test.tsx
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { jest } from "@jest/globals";
|
|
2
|
-
import { act, render, screen } from "@testing-library/react";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { LoginGuardContext } from "../src/providers/loginGuard/context";
|
|
5
|
-
|
|
6
|
-
jest.unstable_mockModule("../src/hooks/useConfig", () => ({
|
|
7
|
-
useConfig: jest.fn(),
|
|
8
|
-
}));
|
|
9
|
-
|
|
10
|
-
jest.unstable_mockModule("../src/providers/authentication/auth/hook", () => ({
|
|
11
|
-
useAuth: jest.fn(),
|
|
12
|
-
}));
|
|
13
|
-
|
|
14
|
-
jest.unstable_mockModule(
|
|
15
|
-
"../src/hooks/authentication/config/useAuthenticationConfig",
|
|
16
|
-
() => ({
|
|
17
|
-
useAuthenticationConfig: jest.fn(),
|
|
18
|
-
}),
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
const TEST_ID_LOGIN_DIALOG = "login-dialog";
|
|
22
|
-
const TEXT_DIALOG_CLOSED = "closed";
|
|
23
|
-
const TEXT_DIALOG_OPEN = "open";
|
|
24
|
-
jest.unstable_mockModule(
|
|
25
|
-
"../src/components/common/LoginDialog/loginDialog",
|
|
26
|
-
() => ({
|
|
27
|
-
LoginDialog: ({ open }: { open: boolean }): JSX.Element => (
|
|
28
|
-
<div data-testid={TEST_ID_LOGIN_DIALOG}>
|
|
29
|
-
{open ? TEXT_DIALOG_OPEN : TEXT_DIALOG_CLOSED}
|
|
30
|
-
</div>
|
|
31
|
-
),
|
|
32
|
-
}),
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
const { useConfig } = await import("../src/hooks/useConfig");
|
|
36
|
-
const { useAuth } = await import("../src/providers/authentication/auth/hook");
|
|
37
|
-
const { useAuthenticationConfig } =
|
|
38
|
-
await import("../src/hooks/authentication/config/useAuthenticationConfig");
|
|
39
|
-
|
|
40
|
-
const { LoginGuardProvider } =
|
|
41
|
-
await import("../src/providers/loginGuard/provider");
|
|
42
|
-
|
|
43
|
-
const TEXT_BUTTON_EXPORT = "export";
|
|
44
|
-
|
|
45
|
-
describe("LoginGuardProvider", () => {
|
|
46
|
-
beforeEach(() => {
|
|
47
|
-
// Mock hooks used by login guard.
|
|
48
|
-
(useConfig as jest.Mock).mockReturnValue({
|
|
49
|
-
config: {
|
|
50
|
-
exportsRequireAuth: true,
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
(useAuth as jest.Mock).mockReturnValue({
|
|
54
|
-
authState: {
|
|
55
|
-
isAuthenticated: false,
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
(useAuthenticationConfig as jest.Mock).mockReturnValue({});
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
it("should render children and login dialog closed", () => {
|
|
62
|
-
render(
|
|
63
|
-
<LoginGuardProvider>
|
|
64
|
-
<div data-testid="child">child component</div>
|
|
65
|
-
</LoginGuardProvider>,
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
expect(screen.getByTestId("child")).toBeTruthy();
|
|
69
|
-
expect(screen.getByTestId(TEST_ID_LOGIN_DIALOG).textContent).toBe(
|
|
70
|
-
TEXT_DIALOG_CLOSED,
|
|
71
|
-
);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it("calls callback immediately if user is authenticated", () => {
|
|
75
|
-
const callback = jest.fn();
|
|
76
|
-
|
|
77
|
-
// Simulate user authentication.
|
|
78
|
-
(useAuth as jest.Mock).mockReturnValue({
|
|
79
|
-
authState: { isAuthenticated: true },
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
render(
|
|
83
|
-
<LoginGuardProvider>
|
|
84
|
-
<LoginGuardContext.Consumer>
|
|
85
|
-
{({ requireLogin }) => (
|
|
86
|
-
<button onClick={() => requireLogin(callback)}>
|
|
87
|
-
{TEXT_BUTTON_EXPORT}
|
|
88
|
-
</button>
|
|
89
|
-
)}
|
|
90
|
-
</LoginGuardContext.Consumer>
|
|
91
|
-
</LoginGuardProvider>,
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
// Click button requiring login.
|
|
95
|
-
act(() => {
|
|
96
|
-
screen.getByText(TEXT_BUTTON_EXPORT).click();
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
// User is authenticated; callback should be fired immediately.
|
|
100
|
-
expect(callback).toHaveBeenCalled();
|
|
101
|
-
|
|
102
|
-
// Login dialog should not be open.
|
|
103
|
-
expect(screen.getByTestId(TEST_ID_LOGIN_DIALOG).textContent).toBe(
|
|
104
|
-
TEXT_DIALOG_CLOSED,
|
|
105
|
-
);
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
it("calls callback immediately if exportsRequireAuth is false", () => {
|
|
109
|
-
const callback = jest.fn();
|
|
110
|
-
|
|
111
|
-
// Simulate exportsRequireAuth being false.
|
|
112
|
-
(useConfig as jest.Mock).mockReturnValue({
|
|
113
|
-
config: {
|
|
114
|
-
exportsRequireAuth: false,
|
|
115
|
-
},
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
render(
|
|
119
|
-
<LoginGuardProvider>
|
|
120
|
-
<LoginGuardContext.Consumer>
|
|
121
|
-
{({ requireLogin }) => (
|
|
122
|
-
<button onClick={() => requireLogin(callback)}>
|
|
123
|
-
{TEXT_BUTTON_EXPORT}
|
|
124
|
-
</button>
|
|
125
|
-
)}
|
|
126
|
-
</LoginGuardContext.Consumer>
|
|
127
|
-
</LoginGuardProvider>,
|
|
128
|
-
);
|
|
129
|
-
|
|
130
|
-
// Click button requiring login.
|
|
131
|
-
act(() => {
|
|
132
|
-
screen.getByText(TEXT_BUTTON_EXPORT).click();
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
// exportsRequireAuth is false; callback should be fired immediately.
|
|
136
|
-
expect(callback).toHaveBeenCalled();
|
|
137
|
-
|
|
138
|
-
// Login dialog should not be open.
|
|
139
|
-
expect(screen.getByTestId(TEST_ID_LOGIN_DIALOG).textContent).toBe(
|
|
140
|
-
TEXT_DIALOG_CLOSED,
|
|
141
|
-
);
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
it("should call callback after user authenticates", async () => {
|
|
145
|
-
const callback = jest.fn();
|
|
146
|
-
|
|
147
|
-
const { rerender } = render(
|
|
148
|
-
<LoginGuardProvider>
|
|
149
|
-
<LoginGuardContext.Consumer>
|
|
150
|
-
{({ requireLogin }) => (
|
|
151
|
-
<button onClick={() => requireLogin(callback)}>
|
|
152
|
-
{TEXT_BUTTON_EXPORT}
|
|
153
|
-
</button>
|
|
154
|
-
)}
|
|
155
|
-
</LoginGuardContext.Consumer>
|
|
156
|
-
</LoginGuardProvider>,
|
|
157
|
-
);
|
|
158
|
-
|
|
159
|
-
// Click button requiring login.
|
|
160
|
-
act(() => {
|
|
161
|
-
screen.getByText(TEXT_BUTTON_EXPORT).click();
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
// User is not authenticated; callback should not have been called.
|
|
165
|
-
expect(callback).not.toHaveBeenCalled();
|
|
166
|
-
|
|
167
|
-
// User is not authenticated; login dialog should be open.
|
|
168
|
-
expect(screen.getByTestId(TEST_ID_LOGIN_DIALOG).textContent).toBe(
|
|
169
|
-
TEXT_DIALOG_OPEN,
|
|
170
|
-
);
|
|
171
|
-
|
|
172
|
-
// Simulate user authentication.
|
|
173
|
-
await act(async () => {
|
|
174
|
-
(useAuth as jest.Mock).mockReturnValue({
|
|
175
|
-
authState: { isAuthenticated: true },
|
|
176
|
-
});
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
// Rerender to trigger useEffect.
|
|
180
|
-
rerender(
|
|
181
|
-
<LoginGuardProvider>
|
|
182
|
-
<div />
|
|
183
|
-
</LoginGuardProvider>,
|
|
184
|
-
);
|
|
185
|
-
|
|
186
|
-
// Callback should be called (in useEffect called on re-render).
|
|
187
|
-
expect(callback).toHaveBeenCalled();
|
|
188
|
-
});
|
|
189
|
-
});
|