@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
package/tests/theme.test.ts
DELETED
|
@@ -1,465 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createTheme,
|
|
3
|
-
CssVarsTheme,
|
|
4
|
-
Palette,
|
|
5
|
-
PaletteColor,
|
|
6
|
-
Theme,
|
|
7
|
-
ThemeOptions,
|
|
8
|
-
ThemeVars,
|
|
9
|
-
TypographyStyle,
|
|
10
|
-
} from "@mui/material";
|
|
11
|
-
import { components as componentsValues } from "../src/theme/common/components";
|
|
12
|
-
import { palette as paletteValues } from "../src/theme/common/palette";
|
|
13
|
-
import { typography as typographyValues } from "../src/theme/common/typography";
|
|
14
|
-
import { createAppTheme } from "../src/theme/theme";
|
|
15
|
-
|
|
16
|
-
type GenericRecord<T = unknown> = Record<string, T>;
|
|
17
|
-
|
|
18
|
-
const CUSTOM_BODY_400: TypographyStyle = {
|
|
19
|
-
fontSize: "80px",
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const CUSTOM_BREAKPOINTS = {
|
|
23
|
-
values: {
|
|
24
|
-
lg: 1280,
|
|
25
|
-
md: 1024,
|
|
26
|
-
sm: 600,
|
|
27
|
-
xl: 1600,
|
|
28
|
-
xs: 0,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const CUSTOM_PALETTE_PRIMARY = {
|
|
33
|
-
main: "#00ffb6",
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const DEFAULT_BODY_400: TypographyStyle = {
|
|
37
|
-
fontFamily: "Inter",
|
|
38
|
-
fontSize: "14px",
|
|
39
|
-
fontWeight: 400,
|
|
40
|
-
lineHeight: "20px",
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const DEFAULT_BREAKPOINTS = {
|
|
44
|
-
values: {
|
|
45
|
-
lg: 1440,
|
|
46
|
-
md: 1280,
|
|
47
|
-
sm: 768,
|
|
48
|
-
xs: 0,
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const DEFAULT_PALETTE_ALERT = {
|
|
53
|
-
light: "#FED3D1",
|
|
54
|
-
lightest: "#FFF4F4",
|
|
55
|
-
main: "#B42318",
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const DEFAULT_PALETTE_BACKGROUND = {
|
|
59
|
-
default: "#F6F6F7",
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const DEFAULT_PALETTE_INFO = {
|
|
63
|
-
contrastText: "#00729C",
|
|
64
|
-
light: "#97D6EA",
|
|
65
|
-
lightest: "#F2FAFC",
|
|
66
|
-
main: "#00729C",
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const DEFAULT_PALETTE_INK = {
|
|
70
|
-
light: "#637381",
|
|
71
|
-
main: "#212B36",
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const DEFAULT_PALETTE_PRIMARY = {
|
|
75
|
-
dark: "#005EA9",
|
|
76
|
-
lightest: "#E6EFF6",
|
|
77
|
-
main: "#1C7CC7",
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
const DEFAULT_PALETTE_SMOKE = {
|
|
81
|
-
dark: "#C4CDD5",
|
|
82
|
-
light: "#F6F6F7",
|
|
83
|
-
lightest: "#FAFBFB",
|
|
84
|
-
main: "#E1E3E5",
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
const DEFAULT_PALETTE_SUCCESS = {
|
|
88
|
-
light: "#AEE9D1",
|
|
89
|
-
lightest: "#F1F8F5",
|
|
90
|
-
main: "#287555",
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
const DEFAULT_PALETTE_TEXT = {
|
|
94
|
-
primary: "#212B36",
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
const DEFAULT_PALETTE_WARNING = {
|
|
98
|
-
contrastText: "#B54708",
|
|
99
|
-
light: "#FFD79D",
|
|
100
|
-
lightest: "#FFFAEB",
|
|
101
|
-
main: "#B54708",
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
const DEFAULT_SHADOWS = [
|
|
105
|
-
"none",
|
|
106
|
-
"0 1px 4px 0 #00000012",
|
|
107
|
-
"0 8px 8px -4px #10182808, 0 20px 24px -4px #10182814",
|
|
108
|
-
];
|
|
109
|
-
|
|
110
|
-
const CUSTOM_OPTIONS: ThemeOptions = {
|
|
111
|
-
breakpoints: CUSTOM_BREAKPOINTS,
|
|
112
|
-
palette: { primary: CUSTOM_PALETTE_PRIMARY },
|
|
113
|
-
typography: {
|
|
114
|
-
"body-400": CUSTOM_BODY_400,
|
|
115
|
-
fontFamily: "Roboto",
|
|
116
|
-
},
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
describe("Theme Configuration", () => {
|
|
120
|
-
let baseTheme: Theme;
|
|
121
|
-
let theme: Theme;
|
|
122
|
-
let customTheme: Theme;
|
|
123
|
-
|
|
124
|
-
beforeEach(() => {
|
|
125
|
-
baseTheme = createTheme();
|
|
126
|
-
theme = createAppTheme();
|
|
127
|
-
customTheme = createAppTheme(CUSTOM_OPTIONS);
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
describe("CSS Variables", () => {
|
|
131
|
-
it("should have css variables enabled", () => {
|
|
132
|
-
expect("vars" in theme).toBe(true);
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
describe("CSS Variables Configuration", () => {
|
|
137
|
-
let vars: CssVarsTheme["vars"];
|
|
138
|
-
|
|
139
|
-
beforeEach(() => {
|
|
140
|
-
vars = theme.vars;
|
|
141
|
-
expect(vars).toBeDefined();
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
it("should have custom 'app' var exposed as CSS variables", () => {
|
|
145
|
-
const appValue = vars.app?.fontFamily;
|
|
146
|
-
expect(appValue).toBeDefined();
|
|
147
|
-
expect(appValue).toContain(theme.typography.fontFamily);
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
it("should have fonts exposed as CSS variables", () => {
|
|
151
|
-
expect(vars.font).toBeDefined();
|
|
152
|
-
|
|
153
|
-
Object.keys(typographyValues(baseTheme))
|
|
154
|
-
.filter(filterTypographyVariants)
|
|
155
|
-
.forEach((variant) => {
|
|
156
|
-
// Test the variant exists in both theme and vars.
|
|
157
|
-
expect(variant in theme.typography).toBe(true);
|
|
158
|
-
expect(variant in vars.font).toBe(true);
|
|
159
|
-
|
|
160
|
-
const typography = theme.typography as unknown as GenericRecord;
|
|
161
|
-
const font = vars.font as unknown as GenericRecord;
|
|
162
|
-
|
|
163
|
-
// Get the font and typography variable value.
|
|
164
|
-
const fontValue = font[variant];
|
|
165
|
-
const typographyValue = typography[variant] as TypographyStyle;
|
|
166
|
-
|
|
167
|
-
// Ensure the font family is defined.
|
|
168
|
-
expect(typographyValue.fontFamily).toBeDefined();
|
|
169
|
-
|
|
170
|
-
// Check variable pattern.
|
|
171
|
-
expect(fontValue).toMatch(new RegExp(`^var\\(--font-${variant}`));
|
|
172
|
-
|
|
173
|
-
// Check font size and line height format.
|
|
174
|
-
expect(fontValue).toMatch(/\d+px\/\d+px/);
|
|
175
|
-
|
|
176
|
-
// Check ends with font-family.
|
|
177
|
-
expect(fontValue).toMatch(
|
|
178
|
-
new RegExp(`${typographyValue.fontFamily}\\)$`),
|
|
179
|
-
);
|
|
180
|
-
|
|
181
|
-
// Full pattern test.
|
|
182
|
-
expect(fontValue).toMatch(
|
|
183
|
-
new RegExp(
|
|
184
|
-
`^var\\(--font-${variant},\\s+\\d+\\s+\\d+px\\/\\d+px\\s+${typographyValue.fontFamily}\\)$`,
|
|
185
|
-
),
|
|
186
|
-
);
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
it("should have palette colors exposed as CSS variables", () => {
|
|
191
|
-
expect(vars.palette).toBeDefined();
|
|
192
|
-
|
|
193
|
-
Object.keys(paletteValues).forEach((color) => {
|
|
194
|
-
// Test the color exists in both theme and vars.
|
|
195
|
-
expect(color in theme.palette).toBe(true);
|
|
196
|
-
expect(color in vars.palette).toBe(true);
|
|
197
|
-
|
|
198
|
-
const palette = theme.palette;
|
|
199
|
-
const paletteColor = palette[color as keyof Palette];
|
|
200
|
-
const varsPalette = vars.palette;
|
|
201
|
-
const varsColor = varsPalette[color as keyof ThemeVars["palette"]];
|
|
202
|
-
|
|
203
|
-
// We only expect the return varsColor to be an object.
|
|
204
|
-
expect(varsColor).toBeInstanceOf(Object);
|
|
205
|
-
|
|
206
|
-
Object.entries(paletteColor).forEach(([shade, value]) => {
|
|
207
|
-
// Test the shade exists in the vars.
|
|
208
|
-
expect(shade in (varsColor as object)).toBe(true);
|
|
209
|
-
|
|
210
|
-
// Full pattern test.
|
|
211
|
-
expect((vars.palette as any)[color][shade]).toEqual(
|
|
212
|
-
`var(--palette-${color}-${shade}, ${value})`,
|
|
213
|
-
);
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
|
|
218
|
-
it("should have shadow values exposed as CSS variables", () => {
|
|
219
|
-
expect(vars.shadows).toBeDefined();
|
|
220
|
-
vars.shadows.forEach((shadow, i) => {
|
|
221
|
-
// Full pattern test.
|
|
222
|
-
expect(shadow).toEqual(`var(--shadows-${i}, ${theme.shadows[i]})`);
|
|
223
|
-
});
|
|
224
|
-
});
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
describe("Breakpoint Configuration", () => {
|
|
228
|
-
it("should use default breakpoint values when no custom options provided", () => {
|
|
229
|
-
expect(theme.breakpoints.values).toEqual(DEFAULT_BREAKPOINTS.values);
|
|
230
|
-
});
|
|
231
|
-
|
|
232
|
-
it("should override breakpoints when custom values provided", () => {
|
|
233
|
-
expect(customTheme.breakpoints.values).toEqual(CUSTOM_BREAKPOINTS.values);
|
|
234
|
-
});
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
describe("Components Configuration", () => {
|
|
238
|
-
it("should initialize with default components settings", () => {
|
|
239
|
-
expect(theme.components).toBeDefined();
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
it("should apply configured components variants", () => {
|
|
243
|
-
expect(componentsValues).toBeDefined();
|
|
244
|
-
Object.keys(componentsValues!).forEach((component) => {
|
|
245
|
-
expect(component in theme.components!).toBe(true);
|
|
246
|
-
});
|
|
247
|
-
});
|
|
248
|
-
|
|
249
|
-
it("should override MuiToolbar component breakpoints when custom values provided", () => {
|
|
250
|
-
// Get the component styleOverrides.
|
|
251
|
-
const styleOverrides = customTheme.components?.MuiToolbar?.styleOverrides;
|
|
252
|
-
expect(styleOverrides).toBeDefined();
|
|
253
|
-
|
|
254
|
-
// The root property should be a function that receives theme.
|
|
255
|
-
const rootFunction = styleOverrides?.root;
|
|
256
|
-
expect(typeof rootFunction).toBe("function");
|
|
257
|
-
|
|
258
|
-
if (typeof rootFunction === "function") {
|
|
259
|
-
// Call the function with the custom theme to get the computed styles.
|
|
260
|
-
const computedStyles = rootFunction({
|
|
261
|
-
ownerState: {},
|
|
262
|
-
theme: customTheme,
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
// Verify that the computed styles contain the custom breakpoint values.
|
|
266
|
-
// The breakpoint functions should generate media queries using custom values.
|
|
267
|
-
expect(computedStyles).toBeDefined();
|
|
268
|
-
|
|
269
|
-
const styleKeys = Object.keys(computedStyles!);
|
|
270
|
-
|
|
271
|
-
// Confirm that breakpoint-based custom styles are present.
|
|
272
|
-
expect(
|
|
273
|
-
hasBreakpointKey(styleKeys, CUSTOM_BREAKPOINTS.values.xs),
|
|
274
|
-
).toBeTruthy();
|
|
275
|
-
expect(
|
|
276
|
-
hasBreakpointKey(styleKeys, CUSTOM_BREAKPOINTS.values.lg),
|
|
277
|
-
).toBeTruthy();
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
});
|
|
281
|
-
|
|
282
|
-
describe("Palette Configuration", () => {
|
|
283
|
-
it("should initialize with default palette settings", () => {
|
|
284
|
-
expect(theme.palette).toBeDefined();
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
it("should apply default alert colors", () => {
|
|
288
|
-
expect("alert" in theme.palette).toBe(true);
|
|
289
|
-
validatePaletteColor(theme.palette.alert, DEFAULT_PALETTE_ALERT);
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
it("should apply default background color", () => {
|
|
293
|
-
expect(theme.palette.background.default).toEqual(
|
|
294
|
-
DEFAULT_PALETTE_BACKGROUND.default,
|
|
295
|
-
);
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
it("should apply default info colors", () => {
|
|
299
|
-
expect("info" in theme.palette).toBe(true);
|
|
300
|
-
validatePaletteColor(theme.palette.info, DEFAULT_PALETTE_INFO);
|
|
301
|
-
});
|
|
302
|
-
|
|
303
|
-
it("should apply default ink colors", () => {
|
|
304
|
-
expect("ink" in theme.palette).toBe(true);
|
|
305
|
-
validatePaletteColor(theme.palette.ink, DEFAULT_PALETTE_INK);
|
|
306
|
-
});
|
|
307
|
-
|
|
308
|
-
it("should apply default primary color", () => {
|
|
309
|
-
validatePaletteColor(theme.palette.primary, DEFAULT_PALETTE_PRIMARY);
|
|
310
|
-
});
|
|
311
|
-
|
|
312
|
-
it("should apply default smoke colors", () => {
|
|
313
|
-
expect("smoke" in theme.palette).toBe(true);
|
|
314
|
-
validatePaletteColor(theme.palette.smoke, DEFAULT_PALETTE_SMOKE);
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
it("should apply default success color", () => {
|
|
318
|
-
validatePaletteColor(theme.palette.success, DEFAULT_PALETTE_SUCCESS);
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
it("should apply default text color", () => {
|
|
322
|
-
expect(theme.palette.text.primary).toEqual(DEFAULT_PALETTE_TEXT.primary);
|
|
323
|
-
});
|
|
324
|
-
|
|
325
|
-
it("should apply default warning colors", () => {
|
|
326
|
-
validatePaletteColor(theme.palette.warning, DEFAULT_PALETTE_WARNING);
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
it("should apply custom primary color when specified", () => {
|
|
330
|
-
expect(customTheme.palette.primary.main).toEqual(
|
|
331
|
-
CUSTOM_PALETTE_PRIMARY.main,
|
|
332
|
-
);
|
|
333
|
-
// Validate that primary dark and lightest are not overridden.
|
|
334
|
-
validatePaletteColor(customTheme.palette.primary, {
|
|
335
|
-
dark: DEFAULT_PALETTE_PRIMARY.dark,
|
|
336
|
-
lightest: DEFAULT_PALETTE_PRIMARY.lightest,
|
|
337
|
-
});
|
|
338
|
-
});
|
|
339
|
-
});
|
|
340
|
-
|
|
341
|
-
describe("Shadow Configuration", () => {
|
|
342
|
-
it("should initialize with default shadow settings", () => {
|
|
343
|
-
expect(theme.shadows).toBeDefined();
|
|
344
|
-
});
|
|
345
|
-
|
|
346
|
-
it("should have the correct number of shadows", () => {
|
|
347
|
-
expect(theme.shadows.length).toBe(25);
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
it("should have the correct default shadow values", () => {
|
|
351
|
-
expect(theme.shadows[0]).toBe(DEFAULT_SHADOWS[0]);
|
|
352
|
-
expect(theme.shadows[1]).toBe(DEFAULT_SHADOWS[1]);
|
|
353
|
-
expect(theme.shadows[2]).toBe(DEFAULT_SHADOWS[2]);
|
|
354
|
-
});
|
|
355
|
-
});
|
|
356
|
-
|
|
357
|
-
describe("Typography Configuration", () => {
|
|
358
|
-
it("should initialize with default typography settings", () => {
|
|
359
|
-
expect(theme.typography).toBeDefined();
|
|
360
|
-
});
|
|
361
|
-
|
|
362
|
-
it("should apply configured typography variants", () => {
|
|
363
|
-
Object.keys(typographyValues(baseTheme))
|
|
364
|
-
.filter(filterTypographyVariants)
|
|
365
|
-
.forEach((variant) => {
|
|
366
|
-
expect(variant in theme.typography).toBe(true);
|
|
367
|
-
});
|
|
368
|
-
});
|
|
369
|
-
|
|
370
|
-
it("should apply configured body-400 typography styles", () => {
|
|
371
|
-
expect("body-400" in theme.typography).toBe(true);
|
|
372
|
-
validateTypographyStyle(theme.typography["body-400"], DEFAULT_BODY_400);
|
|
373
|
-
});
|
|
374
|
-
|
|
375
|
-
it("should override body-400 typography styles when custom values provided", () => {
|
|
376
|
-
expect("body-400" in customTheme.typography).toBe(true);
|
|
377
|
-
validateTypographyStyle(
|
|
378
|
-
customTheme.typography["body-400"],
|
|
379
|
-
CUSTOM_BODY_400,
|
|
380
|
-
);
|
|
381
|
-
});
|
|
382
|
-
|
|
383
|
-
it("should apply custom body-400 styles to CSS variables", () => {
|
|
384
|
-
const fontValue = customTheme.vars?.font?.["body-400"];
|
|
385
|
-
const variant = customTheme.typography["body-400"];
|
|
386
|
-
expect(fontValue).toBeDefined();
|
|
387
|
-
expect(fontValue).toContain(variant.fontSize);
|
|
388
|
-
});
|
|
389
|
-
|
|
390
|
-
it("should apply custom fontFamily to CSS variables", () => {
|
|
391
|
-
const appValue = customTheme.vars?.app?.fontFamily;
|
|
392
|
-
const fontFamily = customTheme.typography.fontFamily;
|
|
393
|
-
expect(appValue).toBeDefined();
|
|
394
|
-
expect(appValue).toContain(fontFamily);
|
|
395
|
-
});
|
|
396
|
-
});
|
|
397
|
-
});
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* Filters typography variant keys to exclude specific predefined variant types.
|
|
401
|
-
* @param value - The typography variant key to be evaluated.
|
|
402
|
-
* @returns Returns true if the variant key is not among the excluded keys; otherwise false.
|
|
403
|
-
*/
|
|
404
|
-
function filterTypographyVariants(value: string): boolean {
|
|
405
|
-
return !/fontFamily|fontSize|fontWeightLight|fontWeightRegular|fontWeightMedium|fontWeightBold|htmlFontSize|allVariants/.test(
|
|
406
|
-
value,
|
|
407
|
-
);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* Checks if a style key exists for a given breakpoint.
|
|
412
|
-
* @param keys - Style keys.
|
|
413
|
-
* @param breakpoint - Breakpoint.
|
|
414
|
-
* @returns True if the style key exists for the given breakpoint, false otherwise.
|
|
415
|
-
*/
|
|
416
|
-
function hasBreakpointKey(keys: string[], breakpoint: number): boolean {
|
|
417
|
-
return keys.some(
|
|
418
|
-
(key) => /^@media/.test(key) && key.includes(String(breakpoint)),
|
|
419
|
-
);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* Type guard to check if a value is a PaletteColor.
|
|
424
|
-
* @param color - Color.
|
|
425
|
-
* @returns True if the color is a valid PaletteColor, false otherwise.
|
|
426
|
-
*/
|
|
427
|
-
function isPaletteColor(color: unknown): color is PaletteColor {
|
|
428
|
-
return (
|
|
429
|
-
color !== null &&
|
|
430
|
-
typeof color === "object" &&
|
|
431
|
-
"light" in color &&
|
|
432
|
-
"main" in color
|
|
433
|
-
);
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* Validates that a palette color (like theme.palette.alert)
|
|
438
|
-
* has the expected values for given keys.
|
|
439
|
-
* @param actual - Actual palette color object to validate.
|
|
440
|
-
* @param expected - An object containing the expected key-value pairs.
|
|
441
|
-
*/
|
|
442
|
-
function validatePaletteColor(
|
|
443
|
-
actual: unknown,
|
|
444
|
-
expected: Record<string, string>,
|
|
445
|
-
): void {
|
|
446
|
-
expect(isPaletteColor(actual)).toBe(true);
|
|
447
|
-
for (const [key, value] of Object.entries(expected)) {
|
|
448
|
-
expect((actual as Record<string, unknown>)[key]).toEqual(value);
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* Validates that a typography variant (like theme.typography["body-400"])
|
|
454
|
-
* has the expected typography style values.
|
|
455
|
-
* @param actual - Actual typography style to validate.
|
|
456
|
-
* @param expected - Expected typography style values.
|
|
457
|
-
*/
|
|
458
|
-
export function validateTypographyStyle(
|
|
459
|
-
actual: TypographyStyle,
|
|
460
|
-
expected: TypographyStyle,
|
|
461
|
-
): void {
|
|
462
|
-
for (const [key, value] of Object.entries(expected)) {
|
|
463
|
-
expect(actual[key]).toEqual(value);
|
|
464
|
-
}
|
|
465
|
-
}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { act, render, screen } from "@testing-library/react";
|
|
2
|
-
import React, { JSX } from "react";
|
|
3
|
-
import { ToggleButtonGroupProvider } from "../src/components/common/ToggleButtonGroup/provider/provider";
|
|
4
|
-
import { useToggleButtonGroup } from "../src/components/common/ToggleButtonGroup/provider/hook";
|
|
5
|
-
|
|
6
|
-
enum TEST_VALUE {
|
|
7
|
-
OPTION_A = "OPTION_A",
|
|
8
|
-
OPTION_B = "OPTION_B",
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const TEST_ID_VALUE = "value";
|
|
12
|
-
const TEST_ID_BUTTON = "button";
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Test component that consumes the toggle button group context via hook.
|
|
16
|
-
* @returns Test component.
|
|
17
|
-
*/
|
|
18
|
-
function TestConsumer(): JSX.Element {
|
|
19
|
-
const { onChange, value } = useToggleButtonGroup<TEST_VALUE>();
|
|
20
|
-
return (
|
|
21
|
-
<div>
|
|
22
|
-
<span data-testid={TEST_ID_VALUE}>{value ?? "null"}</span>
|
|
23
|
-
<button
|
|
24
|
-
data-testid={TEST_ID_BUTTON}
|
|
25
|
-
onClick={(e) =>
|
|
26
|
-
onChange?.(
|
|
27
|
-
e as unknown as React.MouseEvent<HTMLElement>,
|
|
28
|
-
TEST_VALUE.OPTION_B,
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
>
|
|
32
|
-
Change
|
|
33
|
-
</button>
|
|
34
|
-
</div>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
describe("ToggleButtonGroupProvider", () => {
|
|
39
|
-
it("should render children", () => {
|
|
40
|
-
render(
|
|
41
|
-
<ToggleButtonGroupProvider>
|
|
42
|
-
<div data-testid="child">child component</div>
|
|
43
|
-
</ToggleButtonGroupProvider>,
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
expect(screen.getByTestId("child")).toBeTruthy();
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it("should set initial value to null by default", () => {
|
|
50
|
-
render(
|
|
51
|
-
<ToggleButtonGroupProvider>
|
|
52
|
-
<TestConsumer />
|
|
53
|
-
</ToggleButtonGroupProvider>,
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
expect(screen.getByTestId(TEST_ID_VALUE).textContent).toBe("null");
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
it("should set initial value when provided", () => {
|
|
60
|
-
render(
|
|
61
|
-
<ToggleButtonGroupProvider<TEST_VALUE> initialValue={TEST_VALUE.OPTION_A}>
|
|
62
|
-
<TestConsumer />
|
|
63
|
-
</ToggleButtonGroupProvider>,
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
expect(screen.getByTestId(TEST_ID_VALUE).textContent).toBe(
|
|
67
|
-
TEST_VALUE.OPTION_A,
|
|
68
|
-
);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
it("should update value on onChange", () => {
|
|
72
|
-
render(
|
|
73
|
-
<ToggleButtonGroupProvider<TEST_VALUE> initialValue={TEST_VALUE.OPTION_A}>
|
|
74
|
-
<TestConsumer />
|
|
75
|
-
</ToggleButtonGroupProvider>,
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
expect(screen.getByTestId(TEST_ID_VALUE).textContent).toBe(
|
|
79
|
-
TEST_VALUE.OPTION_A,
|
|
80
|
-
);
|
|
81
|
-
|
|
82
|
-
act(() => {
|
|
83
|
-
screen.getByTestId(TEST_ID_BUTTON).click();
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
expect(screen.getByTestId(TEST_ID_VALUE).textContent).toBe(
|
|
87
|
-
TEST_VALUE.OPTION_B,
|
|
88
|
-
);
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it("should pass props to render function children", () => {
|
|
92
|
-
render(
|
|
93
|
-
<ToggleButtonGroupProvider<TEST_VALUE> initialValue={TEST_VALUE.OPTION_A}>
|
|
94
|
-
{({ onChange, value }) => (
|
|
95
|
-
<div>
|
|
96
|
-
<span data-testid={TEST_ID_VALUE}>{value}</span>
|
|
97
|
-
<button
|
|
98
|
-
data-testid={TEST_ID_BUTTON}
|
|
99
|
-
onClick={(e) =>
|
|
100
|
-
onChange?.(
|
|
101
|
-
e as unknown as React.MouseEvent<HTMLElement>,
|
|
102
|
-
TEST_VALUE.OPTION_B,
|
|
103
|
-
)
|
|
104
|
-
}
|
|
105
|
-
>
|
|
106
|
-
Change
|
|
107
|
-
</button>
|
|
108
|
-
</div>
|
|
109
|
-
)}
|
|
110
|
-
</ToggleButtonGroupProvider>,
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
expect(screen.getByTestId(TEST_ID_VALUE).textContent).toBe(
|
|
114
|
-
TEST_VALUE.OPTION_A,
|
|
115
|
-
);
|
|
116
|
-
|
|
117
|
-
act(() => {
|
|
118
|
-
screen.getByTestId(TEST_ID_BUTTON).click();
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
expect(screen.getByTestId(TEST_ID_VALUE).textContent).toBe(
|
|
122
|
-
TEST_VALUE.OPTION_B,
|
|
123
|
-
);
|
|
124
|
-
});
|
|
125
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { transformRoute } from "../src/hooks/authentication/session/useSessionActive";
|
|
2
|
-
|
|
3
|
-
describe("transformRoute", () => {
|
|
4
|
-
it("should return the first non-login route without the inactivity param", () => {
|
|
5
|
-
const routes = ["/login", "/route1?inactivityTimeout=true", "/route2"];
|
|
6
|
-
const result = transformRoute(routes);
|
|
7
|
-
expect(result).toBe("/route1");
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
it("should remove the inactivity param from the route", () => {
|
|
11
|
-
const routes = ["/route1?inactivityTimeout=true"];
|
|
12
|
-
const result = transformRoute(routes);
|
|
13
|
-
expect(result).toBe("/route1");
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it("should return undefined if all routes are login routes", () => {
|
|
17
|
-
const routes = ["/login"];
|
|
18
|
-
const result = transformRoute(routes);
|
|
19
|
-
expect(result).toBeUndefined();
|
|
20
|
-
});
|
|
21
|
-
});
|
package/tests/tsconfig.json
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { jest } from "@jest/globals";
|
|
2
|
-
|
|
3
|
-
const URL_INVALID = "invalidUrl";
|
|
4
|
-
const URL_WITH_FETCH_PREPEND = "https://example.com/fetch/repository/file";
|
|
5
|
-
const URL_WITHOUT_FETCH_PREPEND = "https://example.com/repository/file";
|
|
6
|
-
|
|
7
|
-
jest.unstable_mockModule("../src/hooks/useRequestFileLocation", () => ({
|
|
8
|
-
useRequestFileLocation: jest.fn(),
|
|
9
|
-
}));
|
|
10
|
-
|
|
11
|
-
const { buildFetchFileUrl } = await import("../src/hooks/useFileLocation");
|
|
12
|
-
|
|
13
|
-
describe("useFileLocation", () => {
|
|
14
|
-
describe("build file URL", () => {
|
|
15
|
-
describe("buildFetchFileUrl", () => {
|
|
16
|
-
test("url is undefined", () => {
|
|
17
|
-
expect(buildFetchFileUrl()).toBeUndefined();
|
|
18
|
-
});
|
|
19
|
-
test("url is invalid", () => {
|
|
20
|
-
expect(() => buildFetchFileUrl(URL_INVALID)).toThrowError(
|
|
21
|
-
`Invalid file URL: ${URL_INVALID}`,
|
|
22
|
-
);
|
|
23
|
-
});
|
|
24
|
-
test("url with 'fetch' prepended in path", () => {
|
|
25
|
-
expect(buildFetchFileUrl(URL_WITH_FETCH_PREPEND)).toEqual(
|
|
26
|
-
URL_WITH_FETCH_PREPEND,
|
|
27
|
-
);
|
|
28
|
-
});
|
|
29
|
-
test("url without 'fetch' prepended in path", () => {
|
|
30
|
-
expect(buildFetchFileUrl(URL_WITHOUT_FETCH_PREPEND)).toEqual(
|
|
31
|
-
URL_WITH_FETCH_PREPEND,
|
|
32
|
-
);
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
});
|