@databiosphere/findable-ui 48.1.0 → 49.1.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/.github/workflows/release-please.yml +0 -22
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +39 -0
- package/backend/main.py +0 -1
- package/lib/common/ai/config/types.d.ts +22 -0
- package/lib/common/ai/config/types.js +1 -0
- package/lib/common/ai/constants.d.ts +3 -0
- package/lib/common/ai/constants.js +3 -0
- package/lib/common/categories/config/types.d.ts +2 -1
- package/lib/common/chart/sort/constants.d.ts +5 -0
- package/lib/common/chart/sort/constants.js +9 -0
- package/lib/common/chart/sort/types.d.ts +16 -0
- package/lib/common/chart/sort/types.js +8 -0
- package/lib/common/chart/sort/utils.d.ts +7 -0
- package/lib/common/chart/sort/utils.js +19 -0
- package/lib/common/chart/types.d.ts +5 -0
- package/lib/common/chart/types.js +1 -0
- package/lib/common/entities.d.ts +2 -1
- package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.d.ts +0 -2
- package/lib/components/Export/components/ExportToTerra/exportToTerra.d.ts +0 -2
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.d.ts +0 -2
- package/lib/components/Export/components/ManifestDownload/manifestDownload.d.ts +0 -2
- package/lib/components/Filter/components/FilterLabel/filterLabel.js +1 -1
- package/lib/components/Filter/components/FilterLabel/filterLabel.stories.d.ts +3 -0
- package/lib/components/Filter/components/FilterLabel/filterLabel.stories.js +5 -0
- package/lib/components/Filter/components/Filters/stories/constants.js +21 -1
- package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.styles.js +2 -0
- package/lib/components/Filter/components/adapters/tanstack/ColumnFiltersAdapter/utils.js +1 -1
- package/lib/components/Index/components/EntityView/components/views/ChartView/chartView.js +2 -1
- package/lib/components/Index/components/EntityView/components/views/ChartView/components/Chart/hooks/UsePlotOptions/hook.js +2 -7
- package/lib/components/Index/components/EntityView/components/views/ChartView/components/Chart/stories/args.js +12 -12
- package/lib/components/Index/components/EntityView/components/views/ChartView/stories/args.js +3 -3
- package/lib/components/Index/components/EntityView/components/views/ChartView/utils.js +1 -1
- package/lib/components/Layout/components/Sidebar/components/SidebarTools/sidebarTools.styles.d.ts +4 -0
- package/lib/components/Layout/components/Sidebar/components/SidebarTools/sidebarTools.styles.js +4 -0
- package/lib/components/common/Chip/components/Beta/beta.d.ts +10 -0
- package/lib/components/common/Chip/components/Beta/beta.js +12 -0
- package/lib/components/common/Chip/components/Beta/beta.styles.d.ts +3 -0
- package/lib/components/common/Chip/components/Beta/beta.styles.js +14 -0
- package/lib/components/common/Chip/components/Beta/stories/beta.stories.d.ts +6 -0
- package/lib/components/common/Chip/components/Beta/stories/beta.stories.js +6 -0
- package/lib/components/common/CustomIcon/components/UpArrowIcon/upArrowIcon.d.ts +6 -0
- package/lib/components/common/CustomIcon/components/UpArrowIcon/upArrowIcon.js +8 -0
- package/lib/components/common/Tabs/tabs.js +1 -1
- package/lib/components/common/ToggleButtonGroup/provider/context.d.ts +2 -0
- package/lib/components/common/ToggleButtonGroup/provider/context.js +5 -0
- package/lib/components/common/ToggleButtonGroup/provider/hook.d.ts +7 -0
- package/lib/components/common/ToggleButtonGroup/provider/hook.js +9 -0
- package/lib/components/common/ToggleButtonGroup/provider/provider.d.ts +12 -0
- package/lib/components/common/ToggleButtonGroup/provider/provider.js +22 -0
- package/lib/components/common/ToggleButtonGroup/provider/types.d.ts +9 -0
- package/lib/components/common/ToggleButtonGroup/provider/types.js +1 -0
- package/lib/config/entities.d.ts +2 -0
- package/lib/hooks/ai/useAiRoutes/hook.d.ts +6 -0
- package/lib/hooks/ai/useAiRoutes/hook.js +18 -0
- package/lib/hooks/useCategoryFilter.js +1 -1
- package/lib/hooks/useFileManifest/common/entities.d.ts +0 -9
- package/lib/hooks/useFileManifest/common/entities.js +1 -9
- package/lib/styles/common/mui/drawer.d.ts +9 -0
- package/lib/styles/common/mui/drawer.js +15 -0
- package/lib/styles/common/mui/inputBase.d.ts +13 -0
- package/lib/styles/common/mui/inputBase.js +25 -0
- package/lib/styles/common/mui/stack.d.ts +11 -0
- package/lib/styles/common/mui/stack.js +22 -0
- package/lib/tests/testIds.d.ts +3 -0
- package/lib/tests/testIds.js +3 -0
- package/lib/views/EntityDetailView/entityDetailView.js +2 -2
- package/lib/views/ExploreView/entityList/filters/components/ToggleButtonGroup/toggleButtonGroup.d.ts +7 -0
- package/lib/views/ExploreView/entityList/filters/components/ToggleButtonGroup/toggleButtonGroup.js +18 -0
- package/lib/views/ExploreView/entityList/filters/components/ToggleButtonGroup/toggleButtonGroup.styles.d.ts +6 -0
- package/lib/views/ExploreView/entityList/filters/components/ToggleButtonGroup/toggleButtonGroup.styles.js +23 -0
- package/lib/views/ExploreView/entityList/filters/filters.styles.d.ts +7 -0
- package/lib/views/ExploreView/entityList/filters/filters.styles.js +17 -0
- package/lib/views/ExploreView/exploreView.js +3 -2
- package/lib/views/ResearchView/adapter/useAdapter.d.ts +6 -0
- package/lib/views/ResearchView/adapter/useAdapter.js +15 -0
- package/lib/views/ResearchView/assistant/assistant.d.ts +6 -0
- package/lib/views/ResearchView/assistant/assistant.js +18 -0
- package/lib/views/ResearchView/assistant/components/Drawer/drawer.d.ts +9 -0
- package/lib/views/ResearchView/assistant/components/Drawer/drawer.js +15 -0
- package/lib/views/ResearchView/assistant/components/Drawer/drawer.styles.d.ts +4 -0
- package/lib/views/ResearchView/assistant/components/Drawer/drawer.styles.js +21 -0
- package/lib/views/ResearchView/assistant/components/Drawer/types.d.ts +4 -0
- package/lib/views/ResearchView/assistant/components/Drawer/types.js +1 -0
- package/lib/views/ResearchView/assistant/components/Form/constants.d.ts +3 -0
- package/lib/views/ResearchView/assistant/components/Form/constants.js +3 -0
- package/lib/views/ResearchView/assistant/components/Form/form.d.ts +12 -0
- package/lib/views/ResearchView/assistant/components/Form/form.js +40 -0
- package/lib/views/ResearchView/assistant/components/Form/form.styles.d.ts +4 -0
- package/lib/views/ResearchView/assistant/components/Form/form.styles.js +7 -0
- package/lib/views/ResearchView/assistant/components/Form/types.d.ts +4 -0
- package/lib/views/ResearchView/assistant/components/Form/types.js +1 -0
- package/lib/views/ResearchView/assistant/components/Form/utils.d.ts +16 -0
- package/lib/views/ResearchView/assistant/components/Form/utils.js +41 -0
- package/lib/views/ResearchView/assistant/components/Input/constants.d.ts +2 -0
- package/lib/views/ResearchView/assistant/components/Input/constants.js +14 -0
- package/lib/views/ResearchView/assistant/components/Input/hooks/UseKeyShortCuts/constants.d.ts +7 -0
- package/lib/views/ResearchView/assistant/components/Input/hooks/UseKeyShortCuts/constants.js +7 -0
- package/lib/views/ResearchView/assistant/components/Input/hooks/UseKeyShortCuts/hook.d.ts +6 -0
- package/lib/views/ResearchView/assistant/components/Input/hooks/UseKeyShortCuts/hook.js +32 -0
- package/lib/views/ResearchView/assistant/components/Input/hooks/UseKeyShortCuts/types.d.ts +8 -0
- package/lib/views/ResearchView/assistant/components/Input/hooks/UseKeyShortCuts/types.js +1 -0
- package/lib/views/ResearchView/assistant/components/Input/hooks/UseKeyShortCuts/utils.d.ts +32 -0
- package/lib/views/ResearchView/assistant/components/Input/hooks/UseKeyShortCuts/utils.js +74 -0
- package/lib/views/ResearchView/assistant/components/Input/input.d.ts +9 -0
- package/lib/views/ResearchView/assistant/components/Input/input.js +19 -0
- package/lib/views/ResearchView/assistant/components/Input/input.styles.d.ts +8 -0
- package/lib/views/ResearchView/assistant/components/Input/input.styles.js +19 -0
- package/lib/views/ResearchView/assistant/components/Input/stories/input.stories.d.ts +6 -0
- package/lib/views/ResearchView/assistant/components/Input/stories/input.stories.js +11 -0
- package/lib/views/ResearchView/assistant/components/Input/types.d.ts +2 -0
- package/lib/views/ResearchView/assistant/components/Input/types.js +1 -0
- package/lib/views/ResearchView/assistant/components/Input/utils.d.ts +9 -0
- package/lib/views/ResearchView/assistant/components/Input/utils.js +25 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/AssistantMessage/assistantMessage.d.ts +9 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/AssistantMessage/assistantMessage.js +15 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/AssistantMessage/types.d.ts +4 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/AssistantMessage/types.js +1 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/AssistantMessage/utils.d.ts +13 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/AssistantMessage/utils.js +25 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/ErrorMessage/errorMessage.d.ts +9 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/ErrorMessage/errorMessage.js +12 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/ErrorMessage/types.d.ts +4 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/ErrorMessage/types.js +1 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/PromptMessage/components/Chips/chips.d.ts +3 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/PromptMessage/components/Chips/chips.js +10 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/PromptMessage/components/Chips/chips.styles.d.ts +3 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/PromptMessage/components/Chips/chips.styles.js +26 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/PromptMessage/components/Chips/types.d.ts +5 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/PromptMessage/components/Chips/types.js +1 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/PromptMessage/promptMessage.d.ts +10 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/PromptMessage/promptMessage.js +14 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/PromptMessage/types.d.ts +5 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/PromptMessage/types.js +1 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/UserMessage/types.d.ts +4 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/UserMessage/types.js +1 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/UserMessage/useMessage.styles.d.ts +5 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/UserMessage/useMessage.styles.js +10 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/UserMessage/userMessage.d.ts +9 -0
- package/lib/views/ResearchView/assistant/components/Messages/components/UserMessage/userMessage.js +13 -0
- package/lib/views/ResearchView/assistant/components/Messages/hooks/UseScroll/hook.d.ts +7 -0
- package/lib/views/ResearchView/assistant/components/Messages/hooks/UseScroll/hook.js +17 -0
- package/lib/views/ResearchView/assistant/components/Messages/messages.d.ts +9 -0
- package/lib/views/ResearchView/assistant/components/Messages/messages.js +16 -0
- package/lib/views/ResearchView/assistant/components/Messages/messages.styles.d.ts +3 -0
- package/lib/views/ResearchView/assistant/components/Messages/messages.styles.js +9 -0
- package/lib/views/ResearchView/assistant/components/Messages/selector/messageSelector.d.ts +17 -0
- package/lib/views/ResearchView/assistant/components/Messages/selector/messageSelector.js +32 -0
- package/lib/views/ResearchView/assistant/components/Messages/selector/types.d.ts +5 -0
- package/lib/views/ResearchView/assistant/components/Messages/selector/types.js +1 -0
- package/lib/views/ResearchView/assistant/components/Messages/stories/args.d.ts +3 -0
- package/lib/views/ResearchView/assistant/components/Messages/stories/args.js +109 -0
- package/lib/views/ResearchView/assistant/components/Messages/stories/messages.stories.d.ts +6 -0
- package/lib/views/ResearchView/assistant/components/Messages/stories/messages.stories.js +14 -0
- package/lib/views/ResearchView/assistant/components/Messages/types.d.ts +4 -0
- package/lib/views/ResearchView/assistant/components/Messages/types.js +1 -0
- package/lib/views/ResearchView/assistant/components/ToggleButtonGroup/stories/toggleButtonGroup.stories.d.ts +6 -0
- package/lib/views/ResearchView/assistant/components/ToggleButtonGroup/stories/toggleButtonGroup.stories.js +12 -0
- package/lib/views/ResearchView/assistant/components/ToggleButtonGroup/toggleButtonGroup.d.ts +7 -0
- package/lib/views/ResearchView/assistant/components/ToggleButtonGroup/toggleButtonGroup.js +17 -0
- package/lib/views/ResearchView/assistant/components/ToggleButtonGroup/toggleButtonGroup.styles.d.ts +6 -0
- package/lib/views/ResearchView/assistant/components/ToggleButtonGroup/toggleButtonGroup.styles.js +20 -0
- package/lib/views/ResearchView/assistant/stories/args.d.ts +4 -0
- package/lib/views/ResearchView/assistant/stories/args.js +30 -0
- package/lib/views/ResearchView/assistant/stories/assistant.stories.d.ts +6 -0
- package/lib/views/ResearchView/assistant/stories/assistant.stories.js +23 -0
- package/lib/views/ResearchView/query/constants.d.ts +5 -0
- package/lib/views/ResearchView/query/constants.js +5 -0
- package/lib/views/ResearchView/query/fetch.d.ts +17 -0
- package/lib/views/ResearchView/query/fetch.js +44 -0
- package/lib/views/ResearchView/query/types.d.ts +31 -0
- package/lib/views/ResearchView/query/types.js +1 -0
- package/lib/views/ResearchView/query/useQuery.d.ts +7 -0
- package/lib/views/ResearchView/query/useQuery.js +44 -0
- package/lib/views/ResearchView/researchView.d.ts +10 -0
- package/lib/views/ResearchView/researchView.js +13 -0
- package/lib/views/ResearchView/state/actions/setError/action.d.ts +10 -0
- package/lib/views/ResearchView/state/actions/setError/action.js +17 -0
- package/lib/views/ResearchView/state/actions/setError/dispatch.d.ts +7 -0
- package/lib/views/ResearchView/state/actions/setError/dispatch.js +12 -0
- package/lib/views/ResearchView/state/actions/setError/types.d.ts +14 -0
- package/lib/views/ResearchView/state/actions/setError/types.js +1 -0
- package/lib/views/ResearchView/state/actions/setMessage/action.d.ts +10 -0
- package/lib/views/ResearchView/state/actions/setMessage/action.js +21 -0
- package/lib/views/ResearchView/state/actions/setMessage/dispatch.d.ts +7 -0
- package/lib/views/ResearchView/state/actions/setMessage/dispatch.js +12 -0
- package/lib/views/ResearchView/state/actions/setMessage/types.d.ts +15 -0
- package/lib/views/ResearchView/state/actions/setMessage/types.js +1 -0
- package/lib/views/ResearchView/state/actions/setQuery/action.d.ts +10 -0
- package/lib/views/ResearchView/state/actions/setQuery/action.js +17 -0
- package/lib/views/ResearchView/state/actions/setQuery/dispatch.d.ts +7 -0
- package/lib/views/ResearchView/state/actions/setQuery/dispatch.js +12 -0
- package/lib/views/ResearchView/state/actions/setQuery/types.d.ts +14 -0
- package/lib/views/ResearchView/state/actions/setQuery/types.js +1 -0
- package/lib/views/ResearchView/state/actions/setStatus/action.d.ts +10 -0
- package/lib/views/ResearchView/state/actions/setStatus/action.js +13 -0
- package/lib/views/ResearchView/state/actions/setStatus/dispatch.d.ts +7 -0
- package/lib/views/ResearchView/state/actions/setStatus/dispatch.js +12 -0
- package/lib/views/ResearchView/state/actions/setStatus/types.d.ts +14 -0
- package/lib/views/ResearchView/state/actions/setStatus/types.js +1 -0
- package/lib/views/ResearchView/state/actions/types.d.ts +17 -0
- package/lib/views/ResearchView/state/actions/types.js +10 -0
- package/lib/views/ResearchView/state/constants.d.ts +5 -0
- package/lib/views/ResearchView/state/constants.js +7 -0
- package/lib/views/ResearchView/state/context.d.ts +5 -0
- package/lib/views/ResearchView/state/context.js +9 -0
- package/lib/views/ResearchView/state/guards/guards.d.ts +33 -0
- package/lib/views/ResearchView/state/guards/guards.js +41 -0
- package/lib/views/ResearchView/state/hooks/UseChatDispatch/hook.d.ts +6 -0
- package/lib/views/ResearchView/state/hooks/UseChatDispatch/hook.js +26 -0
- package/lib/views/ResearchView/state/hooks/UseChatDispatch/types.d.ts +10 -0
- package/lib/views/ResearchView/state/hooks/UseChatDispatch/types.js +1 -0
- package/lib/views/ResearchView/state/hooks/UseChatReducer/hook.d.ts +8 -0
- package/lib/views/ResearchView/state/hooks/UseChatReducer/hook.js +12 -0
- package/lib/views/ResearchView/state/hooks/UseChatState/hook.d.ts +7 -0
- package/lib/views/ResearchView/state/hooks/UseChatState/hook.js +11 -0
- package/lib/views/ResearchView/state/initializer/initializer.d.ts +8 -0
- package/lib/views/ResearchView/state/initializer/initializer.js +22 -0
- package/lib/views/ResearchView/state/initializer/types.d.ts +2 -0
- package/lib/views/ResearchView/state/initializer/types.js +1 -0
- package/lib/views/ResearchView/state/provider.d.ts +16 -0
- package/lib/views/ResearchView/state/provider.js +17 -0
- package/lib/views/ResearchView/state/reducer.d.ts +10 -0
- package/lib/views/ResearchView/state/reducer.js +32 -0
- package/lib/views/ResearchView/state/types.d.ts +125 -0
- package/lib/views/ResearchView/state/types.js +22 -0
- package/package.json +1 -1
- package/src/common/ai/config/types.ts +25 -0
- package/src/common/ai/constants.ts +3 -0
- package/src/common/categories/config/types.ts +2 -1
- package/src/common/chart/sort/constants.ts +13 -0
- package/src/common/chart/sort/types.ts +22 -0
- package/src/common/chart/sort/utils.ts +22 -0
- package/src/common/chart/types.ts +6 -0
- package/src/common/entities.ts +2 -1
- package/src/components/Export/components/DownloadCurlCommand/downloadCurlCommand.tsx +0 -2
- package/src/components/Export/components/ExportToTerra/exportToTerra.tsx +0 -2
- package/src/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.tsx +0 -2
- package/src/components/Export/components/ManifestDownload/manifestDownload.tsx +0 -2
- package/src/components/Filter/components/FilterLabel/filterLabel.stories.tsx +6 -0
- package/src/components/Filter/components/FilterLabel/filterLabel.tsx +6 -1
- package/src/components/Filter/components/Filters/stories/constants.ts +25 -1
- package/src/components/Filter/components/SearchAllFilters/searchAllFilters.styles.ts +2 -0
- package/src/components/Filter/components/adapters/tanstack/ColumnFiltersAdapter/utils.ts +1 -1
- package/src/components/Index/components/EntityView/components/views/ChartView/chartView.tsx +8 -2
- package/src/components/Index/components/EntityView/components/views/ChartView/components/Chart/hooks/UsePlotOptions/hook.ts +2 -7
- package/src/components/Index/components/EntityView/components/views/ChartView/components/Chart/stories/args.ts +12 -12
- package/src/components/Index/components/EntityView/components/views/ChartView/stories/args.ts +3 -3
- package/src/components/Index/components/EntityView/components/views/ChartView/utils.ts +1 -1
- package/src/components/Layout/components/Sidebar/components/SidebarTools/sidebarTools.styles.ts +4 -0
- package/src/components/common/Chip/components/Beta/beta.styles.ts +15 -0
- package/src/components/common/Chip/components/Beta/beta.tsx +25 -0
- package/src/components/common/Chip/components/Beta/stories/beta.stories.tsx +12 -0
- package/src/components/common/CustomIcon/components/UpArrowIcon/upArrowIcon.tsx +21 -0
- package/src/components/common/Tabs/tabs.tsx +5 -1
- package/src/components/common/ToggleButtonGroup/provider/context.ts +9 -0
- package/src/components/common/ToggleButtonGroup/provider/hook.ts +16 -0
- package/src/components/common/ToggleButtonGroup/provider/provider.tsx +37 -0
- package/src/components/common/ToggleButtonGroup/provider/types.ts +17 -0
- package/src/config/entities.ts +2 -0
- package/src/hooks/ai/useAiRoutes/hook.ts +22 -0
- package/src/hooks/useCategoryFilter.ts +1 -1
- package/src/hooks/useFileManifest/common/entities.ts +0 -11
- package/src/styles/common/mui/drawer.ts +24 -0
- package/src/styles/common/mui/inputBase.ts +38 -0
- package/src/styles/common/mui/stack.ts +33 -0
- package/src/tests/testIds.ts +3 -0
- package/src/views/EntityDetailView/entityDetailView.tsx +1 -3
- package/src/views/ExploreView/entityList/filters/components/ToggleButtonGroup/toggleButtonGroup.styles.ts +25 -0
- package/src/views/ExploreView/entityList/filters/components/ToggleButtonGroup/toggleButtonGroup.tsx +31 -0
- package/src/views/ExploreView/entityList/filters/filters.styles.ts +19 -0
- package/src/views/ExploreView/exploreView.tsx +16 -12
- package/src/views/ResearchView/adapter/useAdapter.ts +19 -0
- package/src/views/ResearchView/assistant/assistant.tsx +30 -0
- package/src/views/ResearchView/assistant/components/Drawer/drawer.styles.ts +24 -0
- package/src/views/ResearchView/assistant/components/Drawer/drawer.tsx +26 -0
- package/src/views/ResearchView/assistant/components/Drawer/types.ts +5 -0
- package/src/views/ResearchView/assistant/components/Form/constants.ts +3 -0
- package/src/views/ResearchView/assistant/components/Form/form.styles.ts +8 -0
- package/src/views/ResearchView/assistant/components/Form/form.tsx +55 -0
- package/src/views/ResearchView/assistant/components/Form/types.ts +11 -0
- package/src/views/ResearchView/assistant/components/Form/utils.ts +51 -0
- package/src/views/ResearchView/assistant/components/Input/constants.ts +16 -0
- package/src/views/ResearchView/assistant/components/Input/hooks/UseKeyShortCuts/constants.ts +7 -0
- package/src/views/ResearchView/assistant/components/Input/hooks/UseKeyShortCuts/hook.ts +45 -0
- package/src/views/ResearchView/assistant/components/Input/hooks/UseKeyShortCuts/types.ts +10 -0
- package/src/views/ResearchView/assistant/components/Input/hooks/UseKeyShortCuts/utils.ts +93 -0
- package/src/views/ResearchView/assistant/components/Input/input.styles.ts +21 -0
- package/src/views/ResearchView/assistant/components/Input/input.tsx +37 -0
- package/src/views/ResearchView/assistant/components/Input/stories/input.stories.tsx +21 -0
- package/src/views/ResearchView/assistant/components/Input/types.ts +3 -0
- package/src/views/ResearchView/assistant/components/Input/utils.ts +34 -0
- package/src/views/ResearchView/assistant/components/Messages/components/AssistantMessage/assistantMessage.tsx +49 -0
- package/src/views/ResearchView/assistant/components/Messages/components/AssistantMessage/types.ts +5 -0
- package/src/views/ResearchView/assistant/components/Messages/components/AssistantMessage/utils.ts +31 -0
- package/src/views/ResearchView/assistant/components/Messages/components/ErrorMessage/errorMessage.tsx +21 -0
- package/src/views/ResearchView/assistant/components/Messages/components/ErrorMessage/types.ts +5 -0
- package/src/views/ResearchView/assistant/components/Messages/components/PromptMessage/components/Chips/chips.styles.ts +27 -0
- package/src/views/ResearchView/assistant/components/Messages/components/PromptMessage/components/Chips/chips.tsx +31 -0
- package/src/views/ResearchView/assistant/components/Messages/components/PromptMessage/components/Chips/types.ts +6 -0
- package/src/views/ResearchView/assistant/components/Messages/components/PromptMessage/promptMessage.tsx +26 -0
- package/src/views/ResearchView/assistant/components/Messages/components/PromptMessage/types.ts +6 -0
- package/src/views/ResearchView/assistant/components/Messages/components/UserMessage/types.ts +5 -0
- package/src/views/ResearchView/assistant/components/Messages/components/UserMessage/useMessage.styles.ts +11 -0
- package/src/views/ResearchView/assistant/components/Messages/components/UserMessage/userMessage.tsx +21 -0
- package/src/views/ResearchView/assistant/components/Messages/hooks/UseScroll/hook.ts +22 -0
- package/src/views/ResearchView/assistant/components/Messages/messages.styles.ts +10 -0
- package/src/views/ResearchView/assistant/components/Messages/messages.tsx +29 -0
- package/src/views/ResearchView/assistant/components/Messages/selector/messageSelector.tsx +37 -0
- package/src/views/ResearchView/assistant/components/Messages/selector/types.ts +6 -0
- package/src/views/ResearchView/assistant/components/Messages/stories/args.ts +115 -0
- package/src/views/ResearchView/assistant/components/Messages/stories/messages.stories.tsx +24 -0
- package/src/views/ResearchView/assistant/components/Messages/types.ts +5 -0
- package/src/views/ResearchView/assistant/components/ToggleButtonGroup/stories/toggleButtonGroup.stories.tsx +22 -0
- package/src/views/ResearchView/assistant/components/ToggleButtonGroup/toggleButtonGroup.styles.ts +22 -0
- package/src/views/ResearchView/assistant/components/ToggleButtonGroup/toggleButtonGroup.tsx +30 -0
- package/src/views/ResearchView/assistant/stories/args.ts +36 -0
- package/src/views/ResearchView/assistant/stories/assistant.stories.tsx +39 -0
- package/src/views/ResearchView/query/constants.ts +5 -0
- package/src/views/ResearchView/query/fetch.ts +58 -0
- package/src/views/ResearchView/query/types.ts +37 -0
- package/src/views/ResearchView/query/useQuery.ts +60 -0
- package/src/views/ResearchView/researchView.tsx +19 -0
- package/src/views/ResearchView/state/actions/setError/action.ts +22 -0
- package/src/views/ResearchView/state/actions/setError/dispatch.ts +14 -0
- package/src/views/ResearchView/state/actions/setError/types.ts +16 -0
- package/src/views/ResearchView/state/actions/setMessage/action.ts +26 -0
- package/src/views/ResearchView/state/actions/setMessage/dispatch.ts +14 -0
- package/src/views/ResearchView/state/actions/setMessage/types.ts +19 -0
- package/src/views/ResearchView/state/actions/setQuery/action.ts +22 -0
- package/src/views/ResearchView/state/actions/setQuery/dispatch.ts +14 -0
- package/src/views/ResearchView/state/actions/setQuery/types.ts +16 -0
- package/src/views/ResearchView/state/actions/setStatus/action.ts +19 -0
- package/src/views/ResearchView/state/actions/setStatus/dispatch.ts +14 -0
- package/src/views/ResearchView/state/actions/setStatus/types.ts +16 -0
- package/src/views/ResearchView/state/actions/types.ts +23 -0
- package/src/views/ResearchView/state/constants.ts +9 -0
- package/src/views/ResearchView/state/context.ts +11 -0
- package/src/views/ResearchView/state/guards/guards.ts +58 -0
- package/src/views/ResearchView/state/hooks/UseChatDispatch/hook.ts +46 -0
- package/src/views/ResearchView/state/hooks/UseChatDispatch/types.ts +11 -0
- package/src/views/ResearchView/state/hooks/UseChatReducer/hook.ts +15 -0
- package/src/views/ResearchView/state/hooks/UseChatState/hook.ts +14 -0
- package/src/views/ResearchView/state/initializer/initializer.ts +23 -0
- package/src/views/ResearchView/state/initializer/types.ts +3 -0
- package/src/views/ResearchView/state/provider.tsx +27 -0
- package/src/views/ResearchView/state/reducer.ts +34 -0
- package/src/views/ResearchView/state/types.ts +149 -0
- package/tests/chartSortUtils.test.ts +119 -0
- package/tests/research.assistantMessageUtils.test.ts +149 -0
- package/tests/research.chatState.test.ts +463 -0
- package/tests/research.fetchResponse.test.ts +164 -0
- package/tests/research.useKeyShortCuts.test.ts +254 -0
- package/tests/research.useQuery.test.ts +165 -0
- package/tests/toggleButtonGroupProvider.test.tsx +125 -0
|
@@ -44,28 +44,6 @@ jobs:
|
|
|
44
44
|
if: ${{ steps.release.outputs.release_created }}
|
|
45
45
|
run: npx tsc
|
|
46
46
|
|
|
47
|
-
- name: Debug OIDC Token
|
|
48
|
-
if: ${{ steps.release.outputs.release_created }}
|
|
49
|
-
run: |
|
|
50
|
-
echo "=== OIDC Debug Info ==="
|
|
51
|
-
echo "Repository: $GITHUB_REPOSITORY"
|
|
52
|
-
echo "Workflow: $GITHUB_WORKFLOW"
|
|
53
|
-
echo "Job: $GITHUB_JOB"
|
|
54
|
-
echo "Run ID: $GITHUB_RUN_ID"
|
|
55
|
-
echo "Ref: $GITHUB_REF"
|
|
56
|
-
echo "Token URL available: ${{ env.ACTIONS_ID_TOKEN_REQUEST_URL != '' }}"
|
|
57
|
-
echo "=== Requesting OIDC token for npm ==="
|
|
58
|
-
if [ -n "$ACTIONS_ID_TOKEN_REQUEST_URL" ]; then
|
|
59
|
-
if OIDC_RESPONSE=$(curl -sS -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
|
|
60
|
-
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=npm" 2>/dev/null); then
|
|
61
|
-
echo "✓ OIDC token request succeeded"
|
|
62
|
-
else
|
|
63
|
-
echo "✗ Failed to get OIDC token"
|
|
64
|
-
fi
|
|
65
|
-
else
|
|
66
|
-
echo "✗ ACTIONS_ID_TOKEN_REQUEST_URL is not set - id-token permission may be missing"
|
|
67
|
-
fi
|
|
68
|
-
|
|
69
47
|
- name: Publish to NPM
|
|
70
48
|
if: ${{ steps.release.outputs.release_created }}
|
|
71
49
|
run: npm publish --provenance --access public
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [49.1.0](https://github.com/DataBiosphere/findable-ui/compare/v49.0.0...v49.1.0) (2026-02-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add research mode with chat-driven dataset discovery ([#778](https://github.com/DataBiosphere/findable-ui/issues/778)) ([#800](https://github.com/DataBiosphere/findable-ui/issues/800)) ([a844aaf](https://github.com/DataBiosphere/findable-ui/commit/a844aaf2927c76e80e97aa2b9dd7d1929da9bdfa))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* improve tooltip ux with delay and better placement ([#775](https://github.com/DataBiosphere/findable-ui/issues/775)) ([#776](https://github.com/DataBiosphere/findable-ui/issues/776)) ([2d60b92](https://github.com/DataBiosphere/findable-ui/commit/2d60b927f91d28eabc8177ac81aa8fb8c8107db2))
|
|
14
|
+
|
|
15
|
+
## [49.0.0](https://github.com/DataBiosphere/findable-ui/compare/v48.1.0...v49.0.0) (2026-02-17)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### ⚠ BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
* chartview: add configurable bar sort order ([#772](https://github.com/DataBiosphere/findable-ui/issues/772)) (#773)
|
|
21
|
+
* remove unused filemanifesttype prop and type definitions from export components ([#767](https://github.com/DataBiosphere/findable-ui/issues/767)) (#768)
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* chartview: add configurable bar sort order ([#772](https://github.com/DataBiosphere/findable-ui/issues/772)) ([#773](https://github.com/DataBiosphere/findable-ui/issues/773)) ([bea776a](https://github.com/DataBiosphere/findable-ui/commit/bea776a987a612d30a0010f29af128946f4aad48))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* remove unused filemanifesttype prop and type definitions from export components ([#767](https://github.com/DataBiosphere/findable-ui/issues/767)) ([#768](https://github.com/DataBiosphere/findable-ui/issues/768)) ([4da929f](https://github.com/DataBiosphere/findable-ui/commit/4da929fcfd3acaccdb60f269bbffa8be033fdec3))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Chores
|
|
34
|
+
|
|
35
|
+
* remove debug code ([#762](https://github.com/DataBiosphere/findable-ui/issues/762)) ([#765](https://github.com/DataBiosphere/findable-ui/issues/765)) ([6a6b8f5](https://github.com/DataBiosphere/findable-ui/commit/6a6b8f5087bf972397fa4104f946b41eae03a0da))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Code Refactoring
|
|
39
|
+
|
|
40
|
+
* render null instead of empty fragment when hideTabs is true ([#770](https://github.com/DataBiosphere/findable-ui/issues/770)) ([#771](https://github.com/DataBiosphere/findable-ui/issues/771)) ([62733b7](https://github.com/DataBiosphere/findable-ui/commit/62733b7fb271fa6be4a29b7c7d545272a1c3e9ef))
|
|
41
|
+
|
|
3
42
|
## [48.1.0](https://github.com/DataBiosphere/findable-ui/compare/v48.0.0...v48.1.0) (2026-01-11)
|
|
4
43
|
|
|
5
44
|
|
package/backend/main.py
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI configuration.
|
|
3
|
+
*/
|
|
4
|
+
export interface AiConfig {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
prompt?: AiPrompt;
|
|
7
|
+
routes: {
|
|
8
|
+
research: string;
|
|
9
|
+
search: string;
|
|
10
|
+
};
|
|
11
|
+
url: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AiPrompt {
|
|
14
|
+
inputPlaceholder?: string;
|
|
15
|
+
suggestions?: AiSuggestions[];
|
|
16
|
+
text: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AiSuggestions {
|
|
19
|
+
label: string;
|
|
20
|
+
query: string;
|
|
21
|
+
variant: "CHIP";
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Chart } from "../../chart/types";
|
|
1
2
|
import { CategoryKey, DataDictionaryAnnotation, SelectCategoryValueView } from "../../entities";
|
|
2
3
|
import { RangeViewKind } from "../views/range/types";
|
|
3
4
|
import { SelectViewKind } from "../views/select/types";
|
|
@@ -23,6 +24,6 @@ export interface RangeCategoryConfig extends CommonCategoryConfig, RangeViewKind
|
|
|
23
24
|
* Select category config.
|
|
24
25
|
*/
|
|
25
26
|
export interface SelectCategoryConfig extends CommonCategoryConfig, SelectViewKind {
|
|
26
|
-
|
|
27
|
+
chart?: Chart;
|
|
27
28
|
mapSelectCategoryValue?: (selectCategoryValue: SelectCategoryValueView) => SelectCategoryValueView;
|
|
28
29
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { sortCategoryValueViewsAlpha, sortCategoryValueViewsCount, } from "../../filters/sort/models/utils";
|
|
2
|
+
import { CHART_SORT } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Map of chart sort options to their corresponding sort functions.
|
|
5
|
+
*/
|
|
6
|
+
export const CHART_SORT_FN = {
|
|
7
|
+
[CHART_SORT.ALPHA]: sortCategoryValueViewsAlpha,
|
|
8
|
+
[CHART_SORT.COUNT]: sortCategoryValueViewsCount,
|
|
9
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SelectCategoryValueView } from "../../entities";
|
|
2
|
+
/**
|
|
3
|
+
* Chart sorting options for select categories.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum CHART_SORT {
|
|
6
|
+
ALPHA = "ALPHA",
|
|
7
|
+
COUNT = "COUNT"
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Sorting function type for select category values.
|
|
11
|
+
*/
|
|
12
|
+
export type ChartSortFn = (a: SelectCategoryValueView, b: SelectCategoryValueView) => number;
|
|
13
|
+
/**
|
|
14
|
+
* Chart sort options - either a preset (ALPHA, COUNT) or a custom sort function.
|
|
15
|
+
*/
|
|
16
|
+
export type ChartSortOptions = CHART_SORT | ChartSortFn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChartSortOptions, ChartSortFn } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Resolves chart sort options to a sorting function.
|
|
4
|
+
* @param chartSortOptions - Chart sort option (ALPHA, COUNT, or custom function).
|
|
5
|
+
* @returns Sorting function to use for chart data.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getChartSortFn(chartSortOptions?: ChartSortOptions): ChartSortFn;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CHART_SORT_FN } from "./constants";
|
|
2
|
+
import { CHART_SORT } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Resolves chart sort options to a sorting function.
|
|
5
|
+
* @param chartSortOptions - Chart sort option (ALPHA, COUNT, or custom function).
|
|
6
|
+
* @returns Sorting function to use for chart data.
|
|
7
|
+
*/
|
|
8
|
+
export function getChartSortFn(chartSortOptions) {
|
|
9
|
+
// Default to COUNT sort if not specified.
|
|
10
|
+
if (!chartSortOptions) {
|
|
11
|
+
return CHART_SORT_FN[CHART_SORT.COUNT];
|
|
12
|
+
}
|
|
13
|
+
// If it's a custom function, return it directly.
|
|
14
|
+
if (typeof chartSortOptions === "function") {
|
|
15
|
+
return chartSortOptions;
|
|
16
|
+
}
|
|
17
|
+
// Otherwise, look up the function from the map.
|
|
18
|
+
return CHART_SORT_FN[chartSortOptions];
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/common/entities.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RowData, TableOptions } from "@tanstack/react-table";
|
|
2
|
+
import { Chart } from "./chart/types";
|
|
2
3
|
/**
|
|
3
4
|
* Model of a value of a metadata class.
|
|
4
5
|
*/
|
|
@@ -133,7 +134,7 @@ export interface SelectCategoryValueView {
|
|
|
133
134
|
*/
|
|
134
135
|
export interface SelectCategoryView {
|
|
135
136
|
annotation?: DataDictionaryAnnotation;
|
|
136
|
-
|
|
137
|
+
chart?: Chart;
|
|
137
138
|
isDisabled?: boolean;
|
|
138
139
|
key: CategoryKey;
|
|
139
140
|
label: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { JSX, ElementType } from "react";
|
|
2
2
|
import { Filters } from "../../../../common/entities";
|
|
3
|
-
import { FileManifestType } from "../../../../hooks/useFileManifest/common/entities";
|
|
4
3
|
import { FileManifestState } from "../../../../providers/fileManifestState";
|
|
5
4
|
import { FormFacet, ManifestDownloadFormat } from "../../common/entities";
|
|
6
5
|
interface DownloadCurlCommandProps {
|
|
@@ -8,7 +7,6 @@ interface DownloadCurlCommandProps {
|
|
|
8
7
|
DownloadCurlStart: ElementType;
|
|
9
8
|
DownloadCurlSuccess: ElementType;
|
|
10
9
|
fileManifestState: FileManifestState;
|
|
11
|
-
fileManifestType: FileManifestType;
|
|
12
10
|
fileSummaryFacetName: string;
|
|
13
11
|
filters: Filters;
|
|
14
12
|
formFacet: FormFacet;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { JSX, ElementType } from "react";
|
|
2
2
|
import { Filters } from "../../../../common/entities";
|
|
3
|
-
import { FileManifestType } from "../../../../hooks/useFileManifest/common/entities";
|
|
4
3
|
import { FileManifestState } from "../../../../providers/fileManifestState";
|
|
5
4
|
import { FormFacet, ManifestDownloadFormat } from "../../common/entities";
|
|
6
5
|
export interface ExportToTerraProps {
|
|
@@ -8,7 +7,6 @@ export interface ExportToTerraProps {
|
|
|
8
7
|
ExportToTerraStart: ElementType;
|
|
9
8
|
ExportToTerraSuccess: ElementType;
|
|
10
9
|
fileManifestState: FileManifestState;
|
|
11
|
-
fileManifestType: FileManifestType;
|
|
12
10
|
fileSummaryFacetName: string;
|
|
13
11
|
filters: Filters;
|
|
14
12
|
formFacet: FormFacet;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { JSX } from "react";
|
|
2
2
|
import { Filters } from "../../../../../../common/entities";
|
|
3
|
-
import { FileManifestType } from "../../../../../../hooks/useFileManifest/common/entities";
|
|
4
3
|
import { ManifestDownloadFormat } from "../../../../common/entities";
|
|
5
4
|
export interface ManifestDownloadEntityProps {
|
|
6
|
-
fileManifestType: FileManifestType;
|
|
7
5
|
filters: Filters;
|
|
8
6
|
manifestDownloadFormat?: ManifestDownloadFormat;
|
|
9
7
|
metadataFilters: Filters;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { JSX, ElementType } from "react";
|
|
2
2
|
import { Filters } from "../../../../common/entities";
|
|
3
|
-
import { FileManifestType } from "../../../../hooks/useFileManifest/common/entities";
|
|
4
3
|
import { FileManifestState } from "../../../../providers/fileManifestState";
|
|
5
4
|
import { FormFacet, ManifestDownloadFormat } from "../../common/entities";
|
|
6
5
|
export interface ManifestDownloadProps {
|
|
7
6
|
fileManifestState: FileManifestState;
|
|
8
|
-
fileManifestType: FileManifestType;
|
|
9
7
|
fileSummaryFacetName: string;
|
|
10
8
|
filters: Filters;
|
|
11
9
|
formFacet: FormFacet;
|
|
@@ -4,5 +4,5 @@ import { Tooltip } from "../../../DataDictionary/components/Tooltip/tooltip";
|
|
|
4
4
|
import { StyledButton } from "./filterLabel.styles";
|
|
5
5
|
export const FilterLabel = ({ annotation, count, disabled = false, isOpen, label, onClick, surfaceType, }) => {
|
|
6
6
|
const filterLabel = count ? `${label}\xa0(${count})` : label; // When the count is present, a non-breaking space is used to prevent it from being on its own line
|
|
7
|
-
return (_jsx(Tooltip, { description: annotation?.description, title: annotation?.label, children: _jsx(StyledButton, { color: "inherit", disabled: disabled, endIcon: _jsx(ArrowDropDownRounded, { fontSize: "small" }), fullWidth: true, isOpen: isOpen, onClick: onClick, surfaceType: surfaceType, children: filterLabel }) }));
|
|
7
|
+
return (_jsx(Tooltip, { description: annotation?.description, enterDelay: 300, placement: "right", title: annotation?.label, children: _jsx(StyledButton, { color: "inherit", disabled: disabled, endIcon: _jsx(ArrowDropDownRounded, { fontSize: "small" }), fullWidth: true, isOpen: isOpen, onClick: onClick, surfaceType: surfaceType, children: filterLabel }) }));
|
|
8
8
|
};
|
|
@@ -3,6 +3,7 @@ import { SURFACE_TYPE } from "../surfaces/types";
|
|
|
3
3
|
import { FilterLabel } from "./filterLabel";
|
|
4
4
|
const meta = {
|
|
5
5
|
argTypes: {
|
|
6
|
+
annotation: { control: "object" },
|
|
6
7
|
count: { control: "number" },
|
|
7
8
|
disabled: { control: "boolean" },
|
|
8
9
|
isOpen: { control: "boolean" },
|
|
@@ -17,6 +18,10 @@ const meta = {
|
|
|
17
18
|
export default meta;
|
|
18
19
|
export const FilterLabelStory = {
|
|
19
20
|
args: {
|
|
21
|
+
annotation: {
|
|
22
|
+
description: "This is a description of the filter label that provides additional context to the user.",
|
|
23
|
+
label: "Label",
|
|
24
|
+
},
|
|
20
25
|
count: 123,
|
|
21
26
|
disabled: false,
|
|
22
27
|
isOpen: false,
|
|
@@ -92,6 +92,10 @@ const PROCESSED = {
|
|
|
92
92
|
* Biological Sex select category view
|
|
93
93
|
*/
|
|
94
94
|
export const BIOLOGICAL_SEX = {
|
|
95
|
+
annotation: {
|
|
96
|
+
description: "The biological sex of the donor organism, typically determined by chromosomal composition.",
|
|
97
|
+
label: "Biological Sex",
|
|
98
|
+
},
|
|
95
99
|
key: "biologicalSex",
|
|
96
100
|
label: "Biological Sex",
|
|
97
101
|
values: [MALE, FEMALE],
|
|
@@ -100,6 +104,10 @@ export const BIOLOGICAL_SEX = {
|
|
|
100
104
|
* Genus Species select category view
|
|
101
105
|
*/
|
|
102
106
|
export const GENUS_SPECIES = {
|
|
107
|
+
annotation: {
|
|
108
|
+
description: "The scientific name of the organism from which the sample was derived.",
|
|
109
|
+
label: "Genus Species",
|
|
110
|
+
},
|
|
103
111
|
key: "genusSpecies",
|
|
104
112
|
label: "Genus Species",
|
|
105
113
|
values: [HOMO_SAPIENS, MUS_MUSCLES],
|
|
@@ -108,7 +116,11 @@ export const GENUS_SPECIES = {
|
|
|
108
116
|
* Donor Count range category view
|
|
109
117
|
*/
|
|
110
118
|
export const DONOR_COUNT = {
|
|
111
|
-
|
|
119
|
+
annotation: {
|
|
120
|
+
description: "The number of unique donors contributing to the dataset.",
|
|
121
|
+
label: "Donor Count",
|
|
122
|
+
},
|
|
123
|
+
key: "donorCount",
|
|
112
124
|
label: "Donor Count",
|
|
113
125
|
max: 200,
|
|
114
126
|
min: 10,
|
|
@@ -119,6 +131,10 @@ export const DONOR_COUNT = {
|
|
|
119
131
|
* File Format select category view
|
|
120
132
|
*/
|
|
121
133
|
export const FILE_FORMAT = {
|
|
134
|
+
annotation: {
|
|
135
|
+
description: "The format of the file, such as BAM, CSV, FASTQ, or TSV, indicating how the data is structured.",
|
|
136
|
+
label: "File Format",
|
|
137
|
+
},
|
|
122
138
|
key: "fileFormat",
|
|
123
139
|
label: "File Format",
|
|
124
140
|
values: [BAM, CSV, FASTQ, TSV],
|
|
@@ -127,6 +143,10 @@ export const FILE_FORMAT = {
|
|
|
127
143
|
* File Type select category view
|
|
128
144
|
*/
|
|
129
145
|
export const FILE_TYPE = {
|
|
146
|
+
annotation: {
|
|
147
|
+
description: "The type of file, indicating whether the data is raw or has been processed.",
|
|
148
|
+
label: "File Type",
|
|
149
|
+
},
|
|
130
150
|
isDisabled: true,
|
|
131
151
|
key: "fileType",
|
|
132
152
|
label: "File Type",
|
|
@@ -145,7 +145,7 @@ function mapColumnToSelectCategoryView(column, filterSort, categoryConfig) {
|
|
|
145
145
|
const values = mapColumnToSelectCategoryValueView(column, filterSort).map(categoryConfig?.mapSelectCategoryValue || getSelectCategoryValue);
|
|
146
146
|
return {
|
|
147
147
|
annotation: undefined,
|
|
148
|
-
|
|
148
|
+
chart: undefined,
|
|
149
149
|
isDisabled,
|
|
150
150
|
key: column.id,
|
|
151
151
|
label: getColumnHeader(column),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Typography } from "@mui/material";
|
|
3
3
|
import { Fragment } from "react";
|
|
4
|
+
import { getChartSortFn } from "../../../../../../../common/chart/sort/utils";
|
|
4
5
|
import { TYPOGRAPHY_PROPS } from "../../../../../../../styles/common/mui/typography";
|
|
5
6
|
import { Loading, LOADING_PANEL_STYLE, } from "../../../../../../Loading/loading";
|
|
6
7
|
import { StyledToolbar } from "../../../../../../Table/components/TableToolbar/tableToolbar.styles";
|
|
@@ -12,5 +13,5 @@ export const ChartView = ({ categoryFilters, entityName, loading, testId, }) =>
|
|
|
12
13
|
const { chartViewRef, selectCategoryViews, width } = useChartView(categoryFilters);
|
|
13
14
|
if (selectCategoryViews.length === 0)
|
|
14
15
|
return null;
|
|
15
|
-
return (_jsxs(Fragment, { children: [_jsx(StyledToolbar, { children: _jsx(ViewToggle, {}) }), _jsx(Loading, { appear: false, autoPosition: false, loading: loading, panelStyle: LOADING_PANEL_STYLE.INHERIT }), _jsx(StyledGrid, { "data-testid": testId, ref: chartViewRef, children: selectCategoryViews.map(({ key, label, values }) => (_jsxs(StyledGridPaperSection, { children: [_jsxs(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.HEADING_SMALL, children: [entityName, " by ", label] }), _jsx(Chart, { selectCategoryValueViews: values, width: width })] }, key))) })] }));
|
|
16
|
+
return (_jsxs(Fragment, { children: [_jsx(StyledToolbar, { children: _jsx(ViewToggle, {}) }), _jsx(Loading, { appear: false, autoPosition: false, loading: loading, panelStyle: LOADING_PANEL_STYLE.INHERIT }), _jsx(StyledGrid, { "data-testid": testId, ref: chartViewRef, children: selectCategoryViews.map(({ chart, key, label, values }) => (_jsxs(StyledGridPaperSection, { children: [_jsxs(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.HEADING_SMALL, children: [entityName, " by ", label] }), _jsx(Chart, { selectCategoryValueViews: [...values].sort(getChartSortFn(chart?.sortBy)), width: width })] }, key))) })] }));
|
|
16
17
|
};
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
|
-
import { sortCategoryValueViewsCount } from "../../../../../../../../../../../common/filters/sort/models/utils";
|
|
3
2
|
import { getPlotOptions } from "../../barX/plot";
|
|
4
3
|
import { getCategoryTotalCount } from "../../barX/utils";
|
|
5
4
|
export const usePlotOptions = (selectCategoryValueViews, width, barCount) => {
|
|
6
|
-
//
|
|
7
|
-
const data = selectCategoryValueViews
|
|
8
|
-
// Sort the category values by count and label.
|
|
9
|
-
.sort(sortCategoryValueViewsCount)
|
|
10
|
-
// Slice the category values to the number of bars to display.
|
|
11
|
-
.slice(0, barCount);
|
|
5
|
+
// Slice the category values to the number of bars to display.
|
|
6
|
+
const data = selectCategoryValueViews.slice(0, barCount);
|
|
12
7
|
// Build the plot options.
|
|
13
8
|
const options = useMemo(() => getPlotOptions(data, getCategoryTotalCount(selectCategoryValueViews), width), [data, selectCategoryValueViews, width]);
|
|
14
9
|
return { options };
|
|
@@ -12,12 +12,6 @@ export const CHART_ARGS = {
|
|
|
12
12
|
label: "male",
|
|
13
13
|
selected: false,
|
|
14
14
|
},
|
|
15
|
-
{
|
|
16
|
-
count: 240,
|
|
17
|
-
key: "mixed",
|
|
18
|
-
label: "mixed",
|
|
19
|
-
selected: false,
|
|
20
|
-
},
|
|
21
15
|
{
|
|
22
16
|
count: 78715,
|
|
23
17
|
key: "unknown",
|
|
@@ -30,6 +24,12 @@ export const CHART_ARGS = {
|
|
|
30
24
|
label: "Unspecified",
|
|
31
25
|
selected: false,
|
|
32
26
|
},
|
|
27
|
+
{
|
|
28
|
+
count: 240,
|
|
29
|
+
key: "mixed",
|
|
30
|
+
label: "mixed",
|
|
31
|
+
selected: false,
|
|
32
|
+
},
|
|
33
33
|
],
|
|
34
34
|
width: 800,
|
|
35
35
|
};
|
|
@@ -47,12 +47,6 @@ export const SELECT_CHART_ARGS = {
|
|
|
47
47
|
label: "male",
|
|
48
48
|
selected: true,
|
|
49
49
|
},
|
|
50
|
-
{
|
|
51
|
-
count: 240,
|
|
52
|
-
key: "mixed",
|
|
53
|
-
label: "mixed",
|
|
54
|
-
selected: false,
|
|
55
|
-
},
|
|
56
50
|
{
|
|
57
51
|
count: 78715,
|
|
58
52
|
key: "unknown",
|
|
@@ -65,6 +59,12 @@ export const SELECT_CHART_ARGS = {
|
|
|
65
59
|
label: "Unspecified",
|
|
66
60
|
selected: true,
|
|
67
61
|
},
|
|
62
|
+
{
|
|
63
|
+
count: 240,
|
|
64
|
+
key: "mixed",
|
|
65
|
+
label: "mixed",
|
|
66
|
+
selected: false,
|
|
67
|
+
},
|
|
68
68
|
],
|
|
69
69
|
width: 800,
|
|
70
70
|
};
|
package/lib/components/Index/components/EntityView/components/views/ChartView/stories/args.js
CHANGED
|
@@ -3,7 +3,7 @@ export const CHART_VIEW_ARGS = {
|
|
|
3
3
|
{
|
|
4
4
|
categoryViews: [
|
|
5
5
|
{
|
|
6
|
-
|
|
6
|
+
chart: { enable: true },
|
|
7
7
|
key: "biological-sex",
|
|
8
8
|
label: "Biological Sex",
|
|
9
9
|
values: [
|
|
@@ -40,7 +40,7 @@ export const CHART_VIEW_ARGS = {
|
|
|
40
40
|
],
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
|
|
43
|
+
chart: { enable: true },
|
|
44
44
|
key: "genusSpecies",
|
|
45
45
|
label: "Genus Species",
|
|
46
46
|
values: [
|
|
@@ -71,7 +71,7 @@ export const CHART_VIEW_ARGS = {
|
|
|
71
71
|
],
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
|
-
|
|
74
|
+
chart: { enable: false },
|
|
75
75
|
key: "pairedEnd",
|
|
76
76
|
label: "Paired End",
|
|
77
77
|
values: [
|
|
@@ -8,7 +8,7 @@ export function getSelectCategoryViews(categoryFilters) {
|
|
|
8
8
|
return categoryFilters
|
|
9
9
|
.flatMap(({ categoryViews }) => categoryViews)
|
|
10
10
|
.filter(isSelectCategoryView)
|
|
11
|
-
.filter(({
|
|
11
|
+
.filter(({ chart }) => chart?.enable !== false)
|
|
12
12
|
.filter(({ values }) => values.length > 0);
|
|
13
13
|
}
|
|
14
14
|
/**
|
package/lib/components/Layout/components/Sidebar/components/SidebarTools/sidebarTools.styles.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Container for sidebar tools, including the mode toggle and filter controls.
|
|
3
|
+
* @deprecated - This styled component is deprecated and will be removed in a future release.
|
|
4
|
+
*/
|
|
1
5
|
export declare const SidebarTools: import("@emotion/styled").StyledComponent<{
|
|
2
6
|
theme?: import("@emotion/react").Theme;
|
|
3
7
|
as?: React.ElementType;
|
package/lib/components/Layout/components/Sidebar/components/SidebarTools/sidebarTools.styles.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import { bpUpMd } from "../../../../../../styles/common/mixins/breakpoints";
|
|
3
|
+
/**
|
|
4
|
+
* Container for sidebar tools, including the mode toggle and filter controls.
|
|
5
|
+
* @deprecated - This styled component is deprecated and will be removed in a future release.
|
|
6
|
+
*/
|
|
3
7
|
export const SidebarTools = styled.div `
|
|
4
8
|
display: grid;
|
|
5
9
|
gap: 8px 0;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChipProps } from "@mui/material";
|
|
2
|
+
import { JSX } from "react";
|
|
3
|
+
import { BaseComponentProps } from "../../../../types";
|
|
4
|
+
/**
|
|
5
|
+
* Beta chip component to indicate features that are in beta.
|
|
6
|
+
* @param props - Component props.
|
|
7
|
+
* @param props.className - Classname.
|
|
8
|
+
* @returns Beta chip JSX element.
|
|
9
|
+
*/
|
|
10
|
+
export declare const Beta: ({ className, ...props }: BaseComponentProps & ChipProps) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CHIP_PROPS } from "../../../../../styles/common/mui/chip";
|
|
3
|
+
import { StyledChip } from "./beta.styles";
|
|
4
|
+
/**
|
|
5
|
+
* Beta chip component to indicate features that are in beta.
|
|
6
|
+
* @param props - Component props.
|
|
7
|
+
* @param props.className - Classname.
|
|
8
|
+
* @returns Beta chip JSX element.
|
|
9
|
+
*/
|
|
10
|
+
export const Beta = ({ className, ...props }) => {
|
|
11
|
+
return (_jsx(StyledChip, { className: className, label: "Beta", size: CHIP_PROPS.SIZE.SMALL, ...props }));
|
|
12
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const StyledChip: import("@emotion/styled").StyledComponent<import("@mui/material").ChipOwnProps & import("@mui/material").ChipSlotsAndSlotProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "size" | "label" | "style" | "className" | "classes" | "children" | "disabled" | "sx" | "tabIndex" | "color" | "variant" | "slots" | "slotProps" | "icon" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & {
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { Chip } from "@mui/material";
|
|
3
|
+
import { PALETTE } from "../../../../../styles/common/constants/palette";
|
|
4
|
+
import { FONT } from "../../../../../styles/common/constants/font";
|
|
5
|
+
export const StyledChip = styled(Chip) `
|
|
6
|
+
background-color: ${PALETTE.PRIMARY_LIGHTEST};
|
|
7
|
+
border-radius: 4px;
|
|
8
|
+
color: ${PALETTE.PRIMARY_MAIN};
|
|
9
|
+
|
|
10
|
+
.MuiChip-label {
|
|
11
|
+
font: ${FONT.BODY_SMALL_500};
|
|
12
|
+
padding: 0 5px;
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SvgIcon } from "@mui/material";
|
|
3
|
+
/**
|
|
4
|
+
* Custom up arrow icon.
|
|
5
|
+
*/
|
|
6
|
+
export const UpArrowIcon = ({ fontSize = "xsmall", viewBox = "0 0 18 18", ...props /* SvgIconProps */ }) => {
|
|
7
|
+
return (_jsx(SvgIcon, { fontSize: fontSize, viewBox: viewBox, ...props, children: _jsx("path", { d: "M8.24985 6.60005L6.07485 8.77505C5.93735 8.91255 5.76235 8.9813 5.54985 8.9813C5.33735 8.9813 5.16235 8.91255 5.02485 8.77505C4.88735 8.63755 4.8186 8.46255 4.8186 8.25005C4.8186 8.03755 4.88735 7.86255 5.02485 7.72505L8.47485 4.27505C8.62485 4.12505 8.79985 4.05005 8.99985 4.05005C9.19985 4.05005 9.37485 4.12505 9.52485 4.27505L12.9749 7.72505C13.1124 7.86255 13.1811 8.03755 13.1811 8.25005C13.1811 8.46255 13.1124 8.63755 12.9749 8.77505C12.8374 8.91255 12.6624 8.9813 12.4499 8.9813C12.2374 8.9813 12.0624 8.91255 11.9249 8.77505L9.74985 6.60005V12.75C9.74985 12.9625 9.67798 13.1407 9.53423 13.2844C9.39048 13.4282 9.21235 13.5 8.99985 13.5C8.78735 13.5 8.60923 13.4282 8.46548 13.2844C8.32173 13.1407 8.24985 12.9625 8.24985 12.75V6.60005Z", fill: "currentColor" }) }));
|
|
8
|
+
};
|