@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SelectedFilter } from "../../../../../../common/entities";
|
|
2
|
+
import type { ResultSummaryData } from "./components/ResultSummary/types";
|
|
3
|
+
import type { AiResponse } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Builds a summary of matched and unmatched mention-term pairs from the AI response.
|
|
6
|
+
* @param response - The AI response object.
|
|
7
|
+
* @returns A summary object with matched and unmatched pairs, or undefined if no response.
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildSummary(response: AiResponse | null): ResultSummaryData | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Maps the AI response to a list of selected filters.
|
|
12
|
+
* @param response - AI response.
|
|
13
|
+
* @returns List of selected filters.
|
|
14
|
+
*/
|
|
15
|
+
export declare function mapResponse(response: AiResponse): SelectedFilter[];
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds a summary of matched and unmatched mention-term pairs from the AI response.
|
|
3
|
+
* @param response - The AI response object.
|
|
4
|
+
* @returns A summary object with matched and unmatched pairs, or undefined if no response.
|
|
5
|
+
*/
|
|
6
|
+
export function buildSummary(response) {
|
|
7
|
+
if (!response)
|
|
8
|
+
return;
|
|
9
|
+
const matched = [];
|
|
10
|
+
const unmatched = [];
|
|
11
|
+
for (const facet of response.facets) {
|
|
12
|
+
const facetUnmatched = isUnmatchedFacet(facet);
|
|
13
|
+
for (const selectedValue of facet.selectedValues) {
|
|
14
|
+
const { mention, term } = selectedValue;
|
|
15
|
+
const pair = [mention, term];
|
|
16
|
+
if (facetUnmatched || isUnknownValue(selectedValue)) {
|
|
17
|
+
unmatched.push(pair);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
matched.push(pair);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return { matched, unmatched };
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Filters out unknown facets.
|
|
28
|
+
* @param facet - Facet.
|
|
29
|
+
* @returns Boolean.
|
|
30
|
+
*/
|
|
31
|
+
function filterFacet(facet) {
|
|
32
|
+
return facet.facet !== "unknown" && facet.facet !== "unmatched";
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Filters out unknown or unrecognized values.
|
|
36
|
+
* @param selectedValue - Selected value.
|
|
37
|
+
* @returns Boolean.
|
|
38
|
+
*/
|
|
39
|
+
function filterValue(selectedValue) {
|
|
40
|
+
return !isUnknownValue(selectedValue);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Checks if a value is unknown or unrecognized.
|
|
44
|
+
* @param selectedValue - Selected value to check.
|
|
45
|
+
* @returns Boolean.
|
|
46
|
+
*/
|
|
47
|
+
function isUnknownValue(selectedValue) {
|
|
48
|
+
return selectedValue.term === "unknown" || selectedValue.recognized === false;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Identifies unmatched facets.
|
|
52
|
+
* @param facet - Facet.
|
|
53
|
+
* @returns Boolean.
|
|
54
|
+
*/
|
|
55
|
+
function isUnmatchedFacet(facet) {
|
|
56
|
+
return facet.facet === "unknown" || facet.facet === "unmatched";
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Maps the AI response to a list of selected filters.
|
|
60
|
+
* @param response - AI response.
|
|
61
|
+
* @returns List of selected filters.
|
|
62
|
+
*/
|
|
63
|
+
export function mapResponse(response) {
|
|
64
|
+
const { facets } = response;
|
|
65
|
+
// Filter out unknown facets.
|
|
66
|
+
const filteredFacets = facets.filter(filterFacet);
|
|
67
|
+
// Map facets to selected filters.
|
|
68
|
+
return filteredFacets
|
|
69
|
+
.map(mapSelectedFilter)
|
|
70
|
+
.filter((filter) => filter.value.length > 0);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Maps the facet to a selected filter.
|
|
74
|
+
* @param facet - Facet.
|
|
75
|
+
* @returns Selected filter.
|
|
76
|
+
*/
|
|
77
|
+
function mapSelectedFilter(facet) {
|
|
78
|
+
const { facet: categoryKey, selectedValues } = facet;
|
|
79
|
+
return {
|
|
80
|
+
categoryKey,
|
|
81
|
+
value: selectedValues.filter(filterValue).map(mapValue),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Maps the selected value to a string.
|
|
86
|
+
* @param selectedValue - Selected value.
|
|
87
|
+
* @returns String.
|
|
88
|
+
*/
|
|
89
|
+
function mapValue(selectedValue) {
|
|
90
|
+
return selectedValue.term;
|
|
91
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AiSwitchProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* AiSwitch component.
|
|
4
|
+
* Renders a switch for AI search assist to toggle between search all filters and facet assistant.
|
|
5
|
+
* @param props - Component props.
|
|
6
|
+
* @param props.enabled - Whether the switch is enabled.
|
|
7
|
+
* @returns AiSwitch component.
|
|
8
|
+
*/
|
|
9
|
+
export declare const AiSwitch: ({ enabled, ...props }: AiSwitchProps) => JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Switch } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { SWITCH_PROPS } from "../../../../../../../styles/common/mui/switch";
|
|
4
|
+
import { StyledFormControlLabel } from "./aiSwitch.styles";
|
|
5
|
+
/**
|
|
6
|
+
* AiSwitch component.
|
|
7
|
+
* Renders a switch for AI search assist to toggle between search all filters and facet assistant.
|
|
8
|
+
* @param props - Component props.
|
|
9
|
+
* @param props.enabled - Whether the switch is enabled.
|
|
10
|
+
* @returns AiSwitch component.
|
|
11
|
+
*/
|
|
12
|
+
export const AiSwitch = ({ enabled = false, ...props /* MuiSwitchProps */ }) => {
|
|
13
|
+
if (!enabled)
|
|
14
|
+
return null;
|
|
15
|
+
return (React.createElement(StyledFormControlLabel, { control: React.createElement(Switch, { color: SWITCH_PROPS.COLOR.PURPLE, ...props }), label: "AI Search Assist" }));
|
|
16
|
+
};
|
package/lib/components/Filter/components/controls/Controls/components/AiSwitch/aiSwitch.styles.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { FormControlLabel } from "@mui/material";
|
|
3
|
+
import { PALETTE } from "../../../../../../../styles/common/constants/palette";
|
|
4
|
+
export const StyledFormControlLabel = styled(FormControlLabel) `
|
|
5
|
+
.MuiFormControlLabel-label {
|
|
6
|
+
border-bottom: 1px dashed ${PALETTE.SMOKE_DARK};
|
|
7
|
+
height: 20px;
|
|
8
|
+
}
|
|
9
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ButtonProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Button component.
|
|
4
|
+
* Renders a button with sort icon and "sort" text for filter sorting.
|
|
5
|
+
* @param props - Component props.
|
|
6
|
+
* @param props.onClick - Click handler.
|
|
7
|
+
* @param props.open - Whether the button is open.
|
|
8
|
+
* @returns Button component.
|
|
9
|
+
*/
|
|
10
|
+
export declare const Button: ({ onClick, open }: ButtonProps) => JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SortRounded } from "@mui/icons-material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BUTTON_PROPS } from "../../../../../../../../../styles/common/mui/button";
|
|
4
|
+
import { TEST_IDS } from "../../../../../../../../../tests/testIds";
|
|
5
|
+
import { StyledButton } from "./button.styles";
|
|
6
|
+
/**
|
|
7
|
+
* Button component.
|
|
8
|
+
* Renders a button with sort icon and "sort" text for filter sorting.
|
|
9
|
+
* @param props - Component props.
|
|
10
|
+
* @param props.onClick - Click handler.
|
|
11
|
+
* @param props.open - Whether the button is open.
|
|
12
|
+
* @returns Button component.
|
|
13
|
+
*/
|
|
14
|
+
export const Button = ({ onClick, open = false }) => {
|
|
15
|
+
return (React.createElement(StyledButton, { color: BUTTON_PROPS.COLOR.SECONDARY, "data-testid": TEST_IDS.FILTER_SORT_BUTTON, onClick: onClick, open: open, startIcon: React.createElement(SortRounded, null), variant: BUTTON_PROPS.VARIANT.TEXT }, "Sort"));
|
|
16
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MenuProps } from "@mui/material";
|
|
2
|
+
export declare const StyledButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
4
|
+
}, "style" | "size" | "href" | "className" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableFocusRipple" | "loading" | "loadingIndicator" | "variant" | "disableElevation" | "endIcon" | "fullWidth" | "loadingPosition" | "startIcon"> & {
|
|
5
|
+
theme?: import("@emotion/react").Theme;
|
|
6
|
+
} & Pick<MenuProps, "open">, {}, {}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { css } from "@emotion/react";
|
|
2
|
+
import styled from "@emotion/styled";
|
|
3
|
+
import { Button } from "@mui/material";
|
|
4
|
+
import { FONT } from "../../../../../../../../../styles/common/constants/font";
|
|
5
|
+
import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
|
|
6
|
+
export const StyledButton = styled(Button) `
|
|
7
|
+
align-items: center;
|
|
8
|
+
font: ${FONT.BODY_SMALL_500};
|
|
9
|
+
|
|
10
|
+
&:hover {
|
|
11
|
+
text-decoration: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
${({ open }) => open &&
|
|
15
|
+
css `
|
|
16
|
+
color: ${PALETTE.INK_MAIN};
|
|
17
|
+
`}
|
|
18
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IconButtonProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* IconButton component.
|
|
4
|
+
* Renders an icon button with a settings icon for filter sorting.
|
|
5
|
+
* @param props - Component props.
|
|
6
|
+
* @param props.onClick - Click handler.
|
|
7
|
+
* @param props.open - Whether the icon button is open.
|
|
8
|
+
* @returns IconButton component.
|
|
9
|
+
*/
|
|
10
|
+
export declare const IconButton: ({ onClick, open, }: IconButtonProps) => JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SettingsOutlined } from "@mui/icons-material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ICON_BUTTON_PROPS } from "../../../../../../../../../styles/common/mui/iconButton";
|
|
4
|
+
import { TEST_IDS } from "../../../../../../../../../tests/testIds";
|
|
5
|
+
import { SVG_ICON_PROPS } from "./constants";
|
|
6
|
+
import { StyledIconButton } from "./iconButton.styles";
|
|
7
|
+
/**
|
|
8
|
+
* IconButton component.
|
|
9
|
+
* Renders an icon button with a settings icon for filter sorting.
|
|
10
|
+
* @param props - Component props.
|
|
11
|
+
* @param props.onClick - Click handler.
|
|
12
|
+
* @param props.open - Whether the icon button is open.
|
|
13
|
+
* @returns IconButton component.
|
|
14
|
+
*/
|
|
15
|
+
export const IconButton = ({ onClick, open = false, }) => {
|
|
16
|
+
return (React.createElement(StyledIconButton, { color: ICON_BUTTON_PROPS.COLOR.INK_LIGHT, "data-testid": TEST_IDS.FILTER_SORT_BUTTON, onClick: onClick, open: open },
|
|
17
|
+
React.createElement(SettingsOutlined, { ...SVG_ICON_PROPS })));
|
|
18
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MenuProps } from "@mui/material";
|
|
2
|
+
export declare const StyledIconButton: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
4
|
+
}, "style" | "size" | "className" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableFocusRipple" | "edge" | "loading" | "loadingIndicator"> & {
|
|
5
|
+
theme?: import("@emotion/react").Theme;
|
|
6
|
+
} & Pick<MenuProps, "open">, {}, {}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { css } from "@emotion/react";
|
|
2
|
+
import styled from "@emotion/styled";
|
|
3
|
+
import { IconButton } from "@mui/material";
|
|
4
|
+
import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
|
|
5
|
+
export const StyledIconButton = styled(IconButton) `
|
|
6
|
+
align-self: center;
|
|
7
|
+
padding: 0;
|
|
8
|
+
|
|
9
|
+
${({ open }) => open &&
|
|
10
|
+
css `
|
|
11
|
+
color: ${PALETTE.INK_MAIN};
|
|
12
|
+
`}
|
|
13
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ButtonProps as MButtonProps } from "@mui/material";
|
|
2
|
+
import type { BaseComponentProps } from "../../../../../../types";
|
|
3
|
+
import type { FilterCountChipProps } from "../../../../FilterCountChip/types";
|
|
4
|
+
export type ButtonProps = BaseComponentProps & MButtonProps & Pick<FilterCountChipProps, "count">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface CellProps {
|
|
2
|
+
value?: number | string | string[];
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated - use BasicCell from "@databiosphere/findable-ui/lib/components/Table/components/TableCell/components/BasicCell/basicCell"
|
|
6
|
+
*/
|
|
7
|
+
export declare const Cell: ({ value }: CellProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated - use BasicCell from "@databiosphere/findable-ui/lib/components/Table/components/TableCell/components/BasicCell/basicCell"
|
|
4
|
+
*/
|
|
5
|
+
export const Cell = ({ value = "Unspecified" }) => {
|
|
6
|
+
if (typeof value === "string" || typeof value === "number") {
|
|
7
|
+
return React.createElement("div", null, value);
|
|
8
|
+
}
|
|
9
|
+
return (React.createElement(React.Fragment, null, value.map((v) => (React.createElement("div", { key: v }, v)))));
|
|
10
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Typography } from "@mui/material";
|
|
2
|
+
import React, { Fragment } from "react";
|
|
3
|
+
import { TYPOGRAPHY_PROPS } from "../../../../../../styles/common/mui/typography";
|
|
4
|
+
import { Loading, LOADING_PANEL_STYLE } from "../../../../../Loading/loading";
|
|
5
|
+
import { StyledGrid, StyledGridPaperSection } from "./chartView.styles";
|
|
6
|
+
import { Chart } from "./components/Chart/chart";
|
|
7
|
+
import { useChartView } from "./hooks/UseChartView/useChartView";
|
|
8
|
+
export const ChartView = ({ categoryFilters, entityName, loading, testId, }) => {
|
|
9
|
+
const { chartViewRef, selectCategoryViews, width } = useChartView(categoryFilters);
|
|
10
|
+
if (selectCategoryViews.length === 0)
|
|
11
|
+
return null;
|
|
12
|
+
return (React.createElement(Fragment, null,
|
|
13
|
+
React.createElement(Loading, { appear: false, autoPosition: false, loading: loading, panelStyle: LOADING_PANEL_STYLE.INHERIT }),
|
|
14
|
+
React.createElement(StyledGrid, { "data-testid": testId, ref: chartViewRef }, selectCategoryViews.map(({ key, label, values }) => (React.createElement(StyledGridPaperSection, { key: key },
|
|
15
|
+
React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_HEADING_SMALL },
|
|
16
|
+
entityName,
|
|
17
|
+
" by ",
|
|
18
|
+
label),
|
|
19
|
+
React.createElement(Chart, { selectCategoryValueViews: values, width: width })))))));
|
|
20
|
+
};
|
package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.styles.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const StyledGrid: import("@emotion/styled").StyledComponent<import("@mui/material").GridBaseProps & {
|
|
2
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme>;
|
|
3
|
+
} & import("@mui/system").SystemProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
+
}, ("p" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textTransform" | "color" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontStyle" | "textAlign") | "sx" | keyof import("@mui/material").GridBaseProps> & {
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
7
|
+
}, {}, {}>;
|
|
8
|
+
export declare const StyledGridPaperSection: import("@emotion/styled").StyledComponent<{
|
|
9
|
+
theme?: import("@emotion/react").Theme;
|
|
10
|
+
as?: React.ElementType;
|
|
11
|
+
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
12
|
+
theme?: import("@emotion/react").Theme;
|
|
13
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
|
+
import { GridPaperSection } from "../../../../../common/Section/section.styles";
|
|
4
|
+
export const StyledGrid = styled(Grid) `
|
|
5
|
+
display: grid;
|
|
6
|
+
gap: inherit;
|
|
7
|
+
`;
|
|
8
|
+
export const StyledGridPaperSection = styled(GridPaperSection) `
|
|
9
|
+
&:last-of-type {
|
|
10
|
+
border-radius: inherit;
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const BAR_GAP = 8;
|
|
2
|
+
export declare const BAR_HEIGHT = 24;
|
|
3
|
+
export declare const DATA_FIELD: {
|
|
4
|
+
readonly COUNT: "count";
|
|
5
|
+
readonly LABEL: "label";
|
|
6
|
+
readonly SELECTED: "selected";
|
|
7
|
+
};
|
|
8
|
+
export declare const MARGIN_LEFT = 136;
|
|
9
|
+
export declare const TEXT_PADDING = 8;
|
|
10
|
+
export declare const TICKS = 6;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as Plot from "@observablehq/plot";
|
|
2
|
+
import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
|
|
3
|
+
import { formatCountSize } from "../../../../../../../../../utils/formatCountSize";
|
|
4
|
+
import { DATA_FIELD, MARGIN_LEFT, TEXT_PADDING } from "./constants";
|
|
5
|
+
import { getCategoryTotalCount, getCategoryValueText, getCategoryValueTextFill, getColorRangeValue, getCountText, getCountTextFill, getPlotHeight, getTicks, getXDomain, getYPaddingInner, getYPaddingOuter, isAnyValueSelected, renderText, } from "./utils";
|
|
6
|
+
export function getPlotOptions(selectCategoryValueViews, width) {
|
|
7
|
+
const isCategorySelected = isAnyValueSelected(selectCategoryValueViews);
|
|
8
|
+
const totalCount = getCategoryTotalCount(selectCategoryValueViews);
|
|
9
|
+
return {
|
|
10
|
+
color: {
|
|
11
|
+
domain: [false, true], // false = unselected, true = selected.
|
|
12
|
+
legend: false,
|
|
13
|
+
range: [getColorRangeValue(isCategorySelected), PALETTE.PRIMARY_MAIN],
|
|
14
|
+
},
|
|
15
|
+
height: getPlotHeight(selectCategoryValueViews.length),
|
|
16
|
+
margin: 0,
|
|
17
|
+
marginBottom: 32,
|
|
18
|
+
marginLeft: MARGIN_LEFT,
|
|
19
|
+
marks: [
|
|
20
|
+
Plot.axisX({
|
|
21
|
+
className: "x-axis",
|
|
22
|
+
tickFormat: formatCountSize,
|
|
23
|
+
tickPadding: 8,
|
|
24
|
+
tickSize: 0,
|
|
25
|
+
ticks: getTicks(selectCategoryValueViews),
|
|
26
|
+
}),
|
|
27
|
+
Plot.gridX({
|
|
28
|
+
stroke: PALETTE.SMOKE_MAIN,
|
|
29
|
+
strokeOpacity: 1,
|
|
30
|
+
ticks: getTicks(selectCategoryValueViews),
|
|
31
|
+
}),
|
|
32
|
+
Plot.barX(selectCategoryValueViews, {
|
|
33
|
+
className: "x-bar",
|
|
34
|
+
fill: DATA_FIELD.SELECTED,
|
|
35
|
+
rx1: 0,
|
|
36
|
+
rx2: 4,
|
|
37
|
+
sort: { order: "descending", y: "x" }, // Sort by count (x-axis), descending.
|
|
38
|
+
x: DATA_FIELD.COUNT,
|
|
39
|
+
y: DATA_FIELD.LABEL,
|
|
40
|
+
}),
|
|
41
|
+
Plot.text(selectCategoryValueViews, {
|
|
42
|
+
className: "text-category-label",
|
|
43
|
+
dx: -TEXT_PADDING,
|
|
44
|
+
dy: -2,
|
|
45
|
+
fill: (d) => getCategoryValueTextFill(d, isCategorySelected),
|
|
46
|
+
lineHeight: 0.8125,
|
|
47
|
+
lineWidth: (MARGIN_LEFT - TEXT_PADDING) / 13, // "em" unit; font-size is 13px.
|
|
48
|
+
text: getCategoryValueText,
|
|
49
|
+
textAnchor: "end",
|
|
50
|
+
textOverflow: "ellipsis",
|
|
51
|
+
title: getCategoryValueText,
|
|
52
|
+
x: 0,
|
|
53
|
+
y: DATA_FIELD.LABEL,
|
|
54
|
+
}),
|
|
55
|
+
Plot.text(selectCategoryValueViews, {
|
|
56
|
+
className: "text-count",
|
|
57
|
+
dx: -TEXT_PADDING,
|
|
58
|
+
dy: -2,
|
|
59
|
+
fill: (d) => getCountTextFill(d, isCategorySelected),
|
|
60
|
+
fontWeight: 500,
|
|
61
|
+
lineHeight: 0.8125,
|
|
62
|
+
render: renderText,
|
|
63
|
+
text: (d) => getCountText(d, totalCount),
|
|
64
|
+
textAnchor: "end",
|
|
65
|
+
x: DATA_FIELD.COUNT,
|
|
66
|
+
y: DATA_FIELD.LABEL,
|
|
67
|
+
}),
|
|
68
|
+
],
|
|
69
|
+
style: {
|
|
70
|
+
dominantBaseline: "middle",
|
|
71
|
+
font: "inherit",
|
|
72
|
+
overflow: "visible",
|
|
73
|
+
},
|
|
74
|
+
width,
|
|
75
|
+
x: {
|
|
76
|
+
domain: getXDomain(selectCategoryValueViews),
|
|
77
|
+
grid: false,
|
|
78
|
+
label: null,
|
|
79
|
+
line: false,
|
|
80
|
+
},
|
|
81
|
+
y: {
|
|
82
|
+
label: null,
|
|
83
|
+
line: false,
|
|
84
|
+
paddingInner: getYPaddingInner(),
|
|
85
|
+
paddingOuter: getYPaddingOuter(),
|
|
86
|
+
tickFormat: () => "",
|
|
87
|
+
tickSize: 0,
|
|
88
|
+
type: "band", // Treats number-like strings as categorical labels to prevent numeric scale warnings.
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
}
|