@tetrascience-npm/tetrascience-react-ui 0.5.0-beta.20.1 → 0.5.0-beta.21.1
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/dist/components/charts/AreaGraph/AreaGraph.cjs +2 -0
- package/dist/components/charts/AreaGraph/AreaGraph.cjs.map +1 -0
- package/dist/components/charts/AreaGraph/AreaGraph.js +209 -0
- package/dist/components/charts/AreaGraph/AreaGraph.js.map +1 -0
- package/dist/components/charts/BarGraph/BarGraph.cjs +2 -0
- package/dist/components/charts/BarGraph/BarGraph.cjs.map +1 -0
- package/dist/components/charts/BarGraph/BarGraph.js +175 -0
- package/dist/components/charts/BarGraph/BarGraph.js.map +1 -0
- package/dist/components/charts/Boxplot/Boxplot.cjs +2 -0
- package/dist/components/charts/Boxplot/Boxplot.cjs.map +1 -0
- package/dist/components/charts/Boxplot/Boxplot.js +171 -0
- package/dist/components/charts/Boxplot/Boxplot.js.map +1 -0
- package/dist/components/charts/Chromatogram/Chromatogram.cjs +2 -0
- package/dist/components/charts/Chromatogram/Chromatogram.cjs.map +1 -0
- package/dist/components/charts/Chromatogram/Chromatogram.js +164 -0
- package/dist/components/charts/Chromatogram/Chromatogram.js.map +1 -0
- package/dist/components/charts/ChromatogramChart/ChromatogramChart.cjs +2 -0
- package/dist/components/charts/ChromatogramChart/ChromatogramChart.cjs.map +1 -0
- package/dist/components/charts/ChromatogramChart/ChromatogramChart.js +219 -0
- package/dist/components/charts/ChromatogramChart/ChromatogramChart.js.map +1 -0
- package/dist/components/charts/ChromatogramChart/annotations.cjs +2 -0
- package/dist/components/charts/ChromatogramChart/annotations.cjs.map +1 -0
- package/dist/components/charts/ChromatogramChart/annotations.js +73 -0
- package/dist/components/charts/ChromatogramChart/annotations.js.map +1 -0
- package/dist/components/charts/ChromatogramChart/boundaryMarkers.cjs +2 -0
- package/dist/components/charts/ChromatogramChart/boundaryMarkers.cjs.map +1 -0
- package/dist/components/charts/ChromatogramChart/boundaryMarkers.js +34 -0
- package/dist/components/charts/ChromatogramChart/boundaryMarkers.js.map +1 -0
- package/dist/components/charts/ChromatogramChart/constants.cjs +2 -0
- package/dist/components/charts/ChromatogramChart/constants.cjs.map +1 -0
- package/dist/components/charts/ChromatogramChart/constants.js +24 -0
- package/dist/components/charts/ChromatogramChart/constants.js.map +1 -0
- package/dist/components/charts/ChromatogramChart/dataProcessing.cjs +2 -0
- package/dist/components/charts/ChromatogramChart/dataProcessing.cjs.map +1 -0
- package/dist/components/charts/ChromatogramChart/dataProcessing.js +90 -0
- package/dist/components/charts/ChromatogramChart/dataProcessing.js.map +1 -0
- package/dist/components/charts/ChromatogramChart/peakDetection.cjs +2 -0
- package/dist/components/charts/ChromatogramChart/peakDetection.cjs.map +1 -0
- package/dist/components/charts/ChromatogramChart/peakDetection.js +89 -0
- package/dist/components/charts/ChromatogramChart/peakDetection.js.map +1 -0
- package/dist/components/charts/DotPlot/DotPlot.cjs +2 -0
- package/dist/components/charts/DotPlot/DotPlot.cjs.map +1 -0
- package/dist/components/charts/DotPlot/DotPlot.js +184 -0
- package/dist/components/charts/DotPlot/DotPlot.js.map +1 -0
- package/dist/components/charts/Heatmap/Heatmap.cjs +2 -0
- package/dist/components/charts/Heatmap/Heatmap.cjs.map +1 -0
- package/dist/components/charts/Heatmap/Heatmap.js +67 -0
- package/dist/components/charts/Heatmap/Heatmap.js.map +1 -0
- package/dist/components/charts/Histogram/Histogram.cjs +2 -0
- package/dist/components/charts/Histogram/Histogram.cjs.map +1 -0
- package/dist/components/charts/Histogram/Histogram.js +209 -0
- package/dist/components/charts/Histogram/Histogram.js.map +1 -0
- package/dist/components/charts/LineGraph/LineGraph.cjs +2 -0
- package/dist/components/charts/LineGraph/LineGraph.cjs.map +1 -0
- package/dist/components/charts/LineGraph/LineGraph.js +185 -0
- package/dist/components/charts/LineGraph/LineGraph.js.map +1 -0
- package/dist/components/charts/PieChart/PieChart.cjs +2 -0
- package/dist/components/charts/PieChart/PieChart.cjs.map +1 -0
- package/dist/components/charts/PieChart/PieChart.js +106 -0
- package/dist/components/charts/PieChart/PieChart.js.map +1 -0
- package/dist/components/charts/PlateMap/PlateMap.cjs +2 -0
- package/dist/components/charts/PlateMap/PlateMap.cjs.map +1 -0
- package/dist/components/charts/PlateMap/PlateMap.js +450 -0
- package/dist/components/charts/PlateMap/PlateMap.js.map +1 -0
- package/dist/components/charts/PlateMap/constants.cjs +2 -0
- package/dist/components/charts/PlateMap/constants.cjs.map +1 -0
- package/dist/components/charts/PlateMap/constants.js +137 -0
- package/dist/components/charts/PlateMap/constants.js.map +1 -0
- package/dist/components/charts/PlateMap/types.cjs +2 -0
- package/dist/components/charts/PlateMap/types.cjs.map +1 -0
- package/dist/components/charts/PlateMap/types.js +8 -0
- package/dist/components/charts/PlateMap/types.js.map +1 -0
- package/dist/components/charts/PlateMap/utils.cjs +2 -0
- package/dist/components/charts/PlateMap/utils.cjs.map +1 -0
- package/dist/components/charts/PlateMap/utils.js +235 -0
- package/dist/components/charts/PlateMap/utils.js.map +1 -0
- package/dist/components/charts/ScatterGraph/ScatterGraph.cjs +2 -0
- package/dist/components/charts/ScatterGraph/ScatterGraph.cjs.map +1 -0
- package/dist/components/charts/ScatterGraph/ScatterGraph.js +186 -0
- package/dist/components/charts/ScatterGraph/ScatterGraph.js.map +1 -0
- package/dist/components/composed/AppHeader/AppHeader.cjs +2 -0
- package/dist/components/composed/AppHeader/AppHeader.cjs.map +1 -0
- package/dist/components/composed/AppHeader/AppHeader.js +35 -0
- package/dist/components/composed/AppHeader/AppHeader.js.map +1 -0
- package/dist/components/composed/AppLayout/AppLayout.cjs +2 -0
- package/dist/components/composed/AppLayout/AppLayout.cjs.map +1 -0
- package/dist/components/composed/AppLayout/AppLayout.js +65 -0
- package/dist/components/composed/AppLayout/AppLayout.js.map +1 -0
- package/dist/components/composed/AssistantModal/AssistantModal.cjs +2 -0
- package/dist/components/composed/AssistantModal/AssistantModal.cjs.map +1 -0
- package/dist/components/composed/AssistantModal/AssistantModal.js +75 -0
- package/dist/components/composed/AssistantModal/AssistantModal.js.map +1 -0
- package/dist/components/composed/CodeScriptEditorButton/CodeScriptEditorButton.cjs +3 -0
- package/dist/components/composed/CodeScriptEditorButton/CodeScriptEditorButton.cjs.map +1 -0
- package/dist/components/composed/CodeScriptEditorButton/CodeScriptEditorButton.js +74 -0
- package/dist/components/composed/CodeScriptEditorButton/CodeScriptEditorButton.js.map +1 -0
- package/dist/components/composed/LaunchContent/LaunchContent.cjs +6 -0
- package/dist/components/composed/LaunchContent/LaunchContent.cjs.map +1 -0
- package/dist/components/composed/LaunchContent/LaunchContent.js +66 -0
- package/dist/components/composed/LaunchContent/LaunchContent.js.map +1 -0
- package/dist/components/composed/Main/LaunchContentPanel.cjs +6 -0
- package/dist/components/composed/Main/LaunchContentPanel.cjs.map +1 -0
- package/dist/components/composed/Main/LaunchContentPanel.js +63 -0
- package/dist/components/composed/Main/LaunchContentPanel.js.map +1 -0
- package/dist/components/composed/Main/Main.cjs +2 -0
- package/dist/components/composed/Main/Main.cjs.map +1 -0
- package/dist/components/composed/Main/Main.js +276 -0
- package/dist/components/composed/Main/Main.js.map +1 -0
- package/dist/components/composed/Main/MainHeader.cjs +2 -0
- package/dist/components/composed/Main/MainHeader.cjs.map +1 -0
- package/dist/components/composed/Main/MainHeader.js +36 -0
- package/dist/components/composed/Main/MainHeader.js.map +1 -0
- package/dist/components/composed/Main/MainNavbar.cjs +2 -0
- package/dist/components/composed/Main/MainNavbar.cjs.map +1 -0
- package/dist/components/composed/Main/MainNavbar.js +25 -0
- package/dist/components/composed/Main/MainNavbar.js.map +1 -0
- package/dist/components/composed/Main/MainSidebar.cjs +2 -0
- package/dist/components/composed/Main/MainSidebar.cjs.map +1 -0
- package/dist/components/composed/Main/MainSidebar.js +12 -0
- package/dist/components/composed/Main/MainSidebar.js.map +1 -0
- package/dist/components/composed/Main/MainTabBar.cjs +2 -0
- package/dist/components/composed/Main/MainTabBar.cjs.map +1 -0
- package/dist/components/composed/Main/MainTabBar.js +7 -0
- package/dist/components/composed/Main/MainTabBar.js.map +1 -0
- package/dist/components/composed/Main/ProtocolConfigurationPanel.cjs +2 -0
- package/dist/components/composed/Main/ProtocolConfigurationPanel.cjs.map +1 -0
- package/dist/components/composed/Main/ProtocolConfigurationPanel.js +30 -0
- package/dist/components/composed/Main/ProtocolConfigurationPanel.js.map +1 -0
- package/dist/components/composed/Main/TemplateSidebarCard.cjs +2 -0
- package/dist/components/composed/Main/TemplateSidebarCard.cjs.map +1 -0
- package/dist/components/composed/Main/TemplateSidebarCard.js +71 -0
- package/dist/components/composed/Main/TemplateSidebarCard.js.map +1 -0
- package/dist/components/composed/Navbar/Navbar.cjs +2 -0
- package/dist/components/composed/Navbar/Navbar.cjs.map +1 -0
- package/dist/components/composed/Navbar/Navbar.js +25 -0
- package/dist/components/composed/Navbar/Navbar.js.map +1 -0
- package/dist/components/composed/ProtocolConfiguration/ProtocolConfiguration.cjs +2 -0
- package/dist/components/composed/ProtocolConfiguration/ProtocolConfiguration.cjs.map +1 -0
- package/dist/components/composed/ProtocolConfiguration/ProtocolConfiguration.js +44 -0
- package/dist/components/composed/ProtocolConfiguration/ProtocolConfiguration.js.map +1 -0
- package/dist/components/composed/ProtocolYamlCard/ProtocolYamlCard.cjs +2 -0
- package/dist/components/composed/ProtocolYamlCard/ProtocolYamlCard.cjs.map +1 -0
- package/dist/components/composed/ProtocolYamlCard/ProtocolYamlCard.js +53 -0
- package/dist/components/composed/ProtocolYamlCard/ProtocolYamlCard.js.map +1 -0
- package/dist/components/composed/PythonEditorModal/PythonEditorModal.cjs +2 -0
- package/dist/components/composed/PythonEditorModal/PythonEditorModal.cjs.map +1 -0
- package/dist/components/composed/PythonEditorModal/PythonEditorModal.js +51 -0
- package/dist/components/composed/PythonEditorModal/PythonEditorModal.js.map +1 -0
- package/dist/components/composed/Sidebar/Sidebar.cjs +2 -0
- package/dist/components/composed/Sidebar/Sidebar.cjs.map +1 -0
- package/dist/components/composed/Sidebar/Sidebar.js +46 -0
- package/dist/components/composed/Sidebar/Sidebar.js.map +1 -0
- package/dist/components/composed/TdpSearch/TdpSearch.cjs +2 -0
- package/dist/components/composed/TdpSearch/TdpSearch.cjs.map +1 -0
- package/dist/components/composed/TdpSearch/TdpSearch.js +97 -0
- package/dist/components/composed/TdpSearch/TdpSearch.js.map +1 -0
- package/dist/components/composed/TdpSearch/components/DefaultFilters.cjs +2 -0
- package/dist/components/composed/TdpSearch/components/DefaultFilters.cjs.map +1 -0
- package/dist/components/composed/TdpSearch/components/DefaultFilters.js +31 -0
- package/dist/components/composed/TdpSearch/components/DefaultFilters.js.map +1 -0
- package/dist/components/composed/TdpSearch/components/DefaultResults.cjs +2 -0
- package/dist/components/composed/TdpSearch/components/DefaultResults.cjs.map +1 -0
- package/dist/components/composed/TdpSearch/components/DefaultResults.js +107 -0
- package/dist/components/composed/TdpSearch/components/DefaultResults.js.map +1 -0
- package/dist/components/composed/TdpSearch/components/DefaultSearchBar.cjs +2 -0
- package/dist/components/composed/TdpSearch/components/DefaultSearchBar.cjs.map +1 -0
- package/dist/components/composed/TdpSearch/components/DefaultSearchBar.js +32 -0
- package/dist/components/composed/TdpSearch/components/DefaultSearchBar.js.map +1 -0
- package/dist/components/composed/TdpSearch/constants.cjs +2 -0
- package/dist/components/composed/TdpSearch/constants.cjs.map +1 -0
- package/dist/components/composed/TdpSearch/constants.js +7 -0
- package/dist/components/composed/TdpSearch/constants.js.map +1 -0
- package/dist/components/composed/TdpSearch/hooks/useSearch.cjs +2 -0
- package/dist/components/composed/TdpSearch/hooks/useSearch.cjs.map +1 -0
- package/dist/components/composed/TdpSearch/hooks/useSearch.js +52 -0
- package/dist/components/composed/TdpSearch/hooks/useSearch.js.map +1 -0
- package/dist/components/composed/TdpSearch/hooks/useTdpCredentials.cjs +2 -0
- package/dist/components/composed/TdpSearch/hooks/useTdpCredentials.cjs.map +1 -0
- package/dist/components/composed/TdpSearch/hooks/useTdpCredentials.js +29 -0
- package/dist/components/composed/TdpSearch/hooks/useTdpCredentials.js.map +1 -0
- package/dist/components/composed/TdpSearch/utils.cjs +2 -0
- package/dist/components/composed/TdpSearch/utils.cjs.map +1 -0
- package/dist/components/composed/TdpSearch/utils.js +15 -0
- package/dist/components/composed/TdpSearch/utils.js.map +1 -0
- package/dist/components/composed/tdp-link.cjs +2 -0
- package/dist/components/composed/tdp-link.cjs.map +1 -0
- package/dist/components/composed/tdp-link.js +84 -0
- package/dist/components/composed/tdp-link.js.map +1 -0
- package/dist/components/composed/tdp-url.cjs +2 -0
- package/dist/components/composed/tdp-url.cjs.map +1 -0
- package/dist/components/composed/tdp-url.js +76 -0
- package/dist/components/composed/tdp-url.js.map +1 -0
- package/dist/components/ui/accordion.cjs +2 -0
- package/dist/components/ui/accordion.cjs.map +1 -0
- package/dist/components/ui/accordion.js +83 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.cjs +2 -0
- package/dist/components/ui/alert-dialog.cjs.map +1 -0
- package/dist/components/ui/alert-dialog.js +181 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.cjs +2 -0
- package/dist/components/ui/alert.cjs.map +1 -0
- package/dist/components/ui/alert.js +78 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.cjs +2 -0
- package/dist/components/ui/aspect-ratio.cjs.map +1 -0
- package/dist/components/ui/aspect-ratio.js +11 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.cjs +2 -0
- package/dist/components/ui/avatar.cjs.map +1 -0
- package/dist/components/ui/avatar.js +107 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.cjs +2 -0
- package/dist/components/ui/badge.cjs.map +1 -0
- package/dist/components/ui/badge.js +44 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.cjs +2 -0
- package/dist/components/ui/breadcrumb.cjs.map +1 -0
- package/dist/components/ui/breadcrumb.js +118 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button-group.cjs +2 -0
- package/dist/components/ui/button-group.cjs.map +1 -0
- package/dist/components/ui/button-group.js +77 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.cjs +2 -0
- package/dist/components/ui/button.cjs.map +1 -0
- package/dist/components/ui/button.js +57 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.cjs +2 -0
- package/dist/components/ui/calendar.cjs.map +1 -0
- package/dist/components/ui/calendar.js +174 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.cjs +2 -0
- package/dist/components/ui/card.cjs.map +1 -0
- package/dist/components/ui/card.js +102 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.cjs +2 -0
- package/dist/components/ui/carousel.cjs.map +1 -0
- package/dist/components/ui/carousel.js +179 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/checkbox.cjs +2 -0
- package/dist/components/ui/checkbox.cjs.map +1 -0
- package/dist/components/ui/checkbox.js +35 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/code-editor.cjs +2 -0
- package/dist/components/ui/code-editor.cjs.map +1 -0
- package/dist/components/ui/code-editor.js +103 -0
- package/dist/components/ui/code-editor.js.map +1 -0
- package/dist/components/ui/collapsible.cjs +2 -0
- package/dist/components/ui/collapsible.cjs.map +1 -0
- package/dist/components/ui/collapsible.js +35 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/combobox.cjs +2 -0
- package/dist/components/ui/combobox.cjs.map +1 -0
- package/dist/components/ui/combobox.js +278 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command.cjs +2 -0
- package/dist/components/ui/command.cjs.map +1 -0
- package/dist/components/ui/command.js +174 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.cjs +2 -0
- package/dist/components/ui/context-menu.cjs.map +1 -0
- package/dist/components/ui/context-menu.js +236 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.cjs +2 -0
- package/dist/components/ui/dialog.cjs.map +1 -0
- package/dist/components/ui/dialog.js +154 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/drawer.cjs +2 -0
- package/dist/components/ui/drawer.cjs.map +1 -0
- package/dist/components/ui/drawer.js +125 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.cjs +2 -0
- package/dist/components/ui/dropdown-menu.cjs.map +1 -0
- package/dist/components/ui/dropdown-menu.js +252 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/field.cjs +2 -0
- package/dist/components/ui/field.cjs.map +1 -0
- package/dist/components/ui/field.js +210 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/hover-card.cjs +2 -0
- package/dist/components/ui/hover-card.cjs.map +1 -0
- package/dist/components/ui/hover-card.js +39 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.cjs +2 -0
- package/dist/components/ui/input-group.cjs.map +1 -0
- package/dist/components/ui/input-group.js +145 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.cjs +2 -0
- package/dist/components/ui/input-otp.cjs.map +1 -0
- package/dist/components/ui/input-otp.js +82 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.cjs +2 -0
- package/dist/components/ui/input.cjs.map +1 -0
- package/dist/components/ui/input.js +20 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.cjs +2 -0
- package/dist/components/ui/item.cjs.map +1 -0
- package/dist/components/ui/item.js +191 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.cjs +2 -0
- package/dist/components/ui/kbd.cjs.map +1 -0
- package/dist/components/ui/kbd.js +30 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.cjs +2 -0
- package/dist/components/ui/label.cjs.map +1 -0
- package/dist/components/ui/label.js +23 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.cjs +2 -0
- package/dist/components/ui/menubar.cjs.map +1 -0
- package/dist/components/ui/menubar.js +256 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/navigation-menu.cjs +2 -0
- package/dist/components/ui/navigation-menu.cjs.map +1 -0
- package/dist/components/ui/navigation-menu.js +164 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/radio-group.cjs +2 -0
- package/dist/components/ui/radio-group.cjs.map +1 -0
- package/dist/components/ui/radio-group.js +45 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.cjs +2 -0
- package/dist/components/ui/resizable.cjs.map +1 -0
- package/dist/components/ui/resizable.js +46 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.cjs +2 -0
- package/dist/components/ui/scroll-area.cjs.map +1 -0
- package/dist/components/ui/scroll-area.js +60 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.cjs +2 -0
- package/dist/components/ui/select.cjs.map +1 -0
- package/dist/components/ui/select.js +184 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.cjs +2 -0
- package/dist/components/ui/separator.cjs.map +1 -0
- package/dist/components/ui/separator.js +27 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.cjs +2 -0
- package/dist/components/ui/sheet.cjs.map +1 -0
- package/dist/components/ui/sheet.js +137 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.cjs +2 -0
- package/dist/components/ui/sidebar.cjs.map +1 -0
- package/dist/components/ui/sidebar.js +579 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.cjs +2 -0
- package/dist/components/ui/skeleton.cjs.map +1 -0
- package/dist/components/ui/skeleton.js +16 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.cjs +2 -0
- package/dist/components/ui/slider.cjs.map +1 -0
- package/dist/components/ui/slider.js +60 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.cjs +2 -0
- package/dist/components/ui/sonner.cjs.map +1 -0
- package/dist/components/ui/sonner.js +37 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.cjs +2 -0
- package/dist/components/ui/spinner.cjs.map +1 -0
- package/dist/components/ui/spinner.js +10 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.cjs +2 -0
- package/dist/components/ui/switch.cjs.map +1 -0
- package/dist/components/ui/switch.js +32 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.cjs +2 -0
- package/dist/components/ui/table.cjs.map +1 -0
- package/dist/components/ui/table.js +115 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.cjs +2 -0
- package/dist/components/ui/tabs.cjs.map +1 -0
- package/dist/components/ui/tabs.js +91 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/tetrascience-icon.cjs +2 -0
- package/dist/components/ui/tetrascience-icon.cjs.map +1 -0
- package/dist/components/ui/tetrascience-icon.js +46 -0
- package/dist/components/ui/tetrascience-icon.js.map +1 -0
- package/dist/components/ui/textarea.cjs +2 -0
- package/dist/components/ui/textarea.cjs.map +1 -0
- package/dist/components/ui/textarea.js +19 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toggle-group.cjs +2 -0
- package/dist/components/ui/toggle-group.cjs.map +1 -0
- package/dist/components/ui/toggle-group.js +77 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.cjs +2 -0
- package/dist/components/ui/toggle.cjs.map +1 -0
- package/dist/components/ui/toggle.js +44 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.cjs +2 -0
- package/dist/components/ui/tooltip.cjs.map +1 -0
- package/dist/components/ui/tooltip.js +56 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/hooks/use-code-editor-theme.cjs +2 -0
- package/dist/hooks/use-code-editor-theme.cjs.map +1 -0
- package/dist/hooks/use-code-editor-theme.js +31 -0
- package/dist/hooks/use-code-editor-theme.js.map +1 -0
- package/dist/hooks/use-is-dark.cjs +2 -0
- package/dist/hooks/use-is-dark.cjs.map +1 -0
- package/dist/hooks/use-is-dark.js +18 -0
- package/dist/hooks/use-is-dark.js.map +1 -0
- package/dist/hooks/use-mobile.cjs +2 -0
- package/dist/hooks/use-mobile.cjs.map +1 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-plotly-theme.cjs +2 -0
- package/dist/hooks/use-plotly-theme.cjs.map +1 -0
- package/dist/hooks/use-plotly-theme.js +33 -0
- package/dist/hooks/use-plotly-theme.js.map +1 -0
- package/dist/index.cjs +1 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +389 -9435
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.cjs +2 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/providers/athena.cjs +1 -1
- package/dist/providers/athena.cjs.map +1 -1
- package/dist/providers/athena.js +9 -157
- package/dist/providers/athena.js.map +1 -1
- package/dist/providers/databricks.cjs +1 -1
- package/dist/providers/databricks.cjs.map +1 -1
- package/dist/providers/databricks.js +9 -82
- package/dist/providers/databricks.js.map +1 -1
- package/dist/providers/snowflake.cjs +1 -1
- package/dist/providers/snowflake.cjs.map +1 -1
- package/dist/providers/snowflake.js +8 -118
- package/dist/providers/snowflake.js.map +1 -1
- package/dist/server/auth/JwtTokenManager.cjs +2 -0
- package/dist/server/auth/JwtTokenManager.cjs.map +1 -0
- package/dist/server/auth/JwtTokenManager.js +134 -0
- package/dist/server/auth/JwtTokenManager.js.map +1 -0
- package/dist/server/providers/AthenaProvider.cjs +2 -0
- package/dist/server/providers/AthenaProvider.cjs.map +1 -0
- package/dist/server/providers/AthenaProvider.js +154 -0
- package/dist/server/providers/AthenaProvider.js.map +1 -0
- package/dist/server/providers/DatabricksProvider.cjs +2 -0
- package/dist/server/providers/DatabricksProvider.cjs.map +1 -0
- package/dist/server/providers/DatabricksProvider.js +79 -0
- package/dist/server/providers/DatabricksProvider.js.map +1 -0
- package/dist/server/providers/SnowflakeProvider.cjs +2 -0
- package/dist/server/providers/SnowflakeProvider.cjs.map +1 -0
- package/dist/server/providers/SnowflakeProvider.js +116 -0
- package/dist/server/providers/SnowflakeProvider.js.map +1 -0
- package/dist/server/providers/buildProvider.cjs +2 -0
- package/dist/server/providers/buildProvider.cjs.map +1 -0
- package/dist/server/providers/buildProvider.js +22 -0
- package/dist/server/providers/buildProvider.js.map +1 -0
- package/dist/server/providers/exceptions.cjs +2 -0
- package/dist/server/providers/exceptions.cjs.map +1 -0
- package/dist/{exceptions-jCQ6h5C8.js → server/providers/exceptions.js} +11 -11
- package/dist/server/providers/exceptions.js.map +1 -0
- package/dist/server/providers/getProviderConfigurations.cjs +2 -0
- package/dist/server/providers/getProviderConfigurations.cjs.map +1 -0
- package/dist/server/providers/getProviderConfigurations.js +78 -0
- package/dist/server/providers/getProviderConfigurations.js.map +1 -0
- package/dist/server/providers/providerDiscovery.cjs +2 -0
- package/dist/server/providers/providerDiscovery.cjs.map +1 -0
- package/dist/server/providers/providerDiscovery.js +28 -0
- package/dist/server/providers/providerDiscovery.js.map +1 -0
- package/dist/server.cjs +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +27 -262
- package/dist/server.js.map +1 -1
- package/dist/utils/colors.cjs +2 -0
- package/dist/utils/colors.cjs.map +1 -0
- package/dist/utils/colors.js +98 -0
- package/dist/utils/colors.js.map +1 -0
- package/package.json +4 -1
- package/dist/exceptions-DN25pCDi.cjs +0 -2
- package/dist/exceptions-DN25pCDi.cjs.map +0 -1
- package/dist/exceptions-jCQ6h5C8.js.map +0 -1
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { PLATEMAP_CONSTANTS as c } from "./constants.js";
|
|
2
|
+
const M = 65, d = 26;
|
|
3
|
+
function E(e) {
|
|
4
|
+
return Array.from(
|
|
5
|
+
{ length: e },
|
|
6
|
+
(t, n) => n < d ? String.fromCharCode(M + n) : "A" + String.fromCharCode(M + (n - d))
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
function $(e) {
|
|
10
|
+
return Array.from({ length: e }, (t, n) => n + 1);
|
|
11
|
+
}
|
|
12
|
+
function I(e) {
|
|
13
|
+
const t = e.match(/^([A-Z]{1,2})(\d{1,2})$/i);
|
|
14
|
+
if (!t) return null;
|
|
15
|
+
const n = t[1].toUpperCase(), o = n.length === 1 ? n.charCodeAt(0) - M : d + (n.charCodeAt(1) - M), r = parseInt(t[2], 10) - 1;
|
|
16
|
+
return { row: o, col: r };
|
|
17
|
+
}
|
|
18
|
+
function x(e, t, n) {
|
|
19
|
+
if (!e) return !1;
|
|
20
|
+
const { row: o, col: r } = e;
|
|
21
|
+
return o >= 0 && r >= 0 && o < t && r < n;
|
|
22
|
+
}
|
|
23
|
+
function _(e, t) {
|
|
24
|
+
if (!e) return null;
|
|
25
|
+
const n = t ?? Object.keys(e)[0];
|
|
26
|
+
return n ? e[n] : null;
|
|
27
|
+
}
|
|
28
|
+
function p(e, t, n, o, r) {
|
|
29
|
+
typeof e == "number" ? o[t][n] = e : typeof e == "string" && (r[t][n] = e);
|
|
30
|
+
}
|
|
31
|
+
function S(e, t, n, o) {
|
|
32
|
+
const r = Array.from(
|
|
33
|
+
{ length: t },
|
|
34
|
+
() => Array(n).fill(null)
|
|
35
|
+
), l = Array.from(
|
|
36
|
+
{ length: t },
|
|
37
|
+
() => Array(n).fill(null)
|
|
38
|
+
), a = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
39
|
+
for (const i of e) {
|
|
40
|
+
const f = I(i.wellId);
|
|
41
|
+
if (!x(f, t, n)) continue;
|
|
42
|
+
const u = i.wellId.toUpperCase();
|
|
43
|
+
i.values && a.set(u, i.values), i.tooltipData && s.set(u, i.tooltipData);
|
|
44
|
+
const h = _(i.values, o);
|
|
45
|
+
p(h, f.row, f.col, r, l);
|
|
46
|
+
}
|
|
47
|
+
return { grid: r, categories: l, allValues: a, tooltipData: s };
|
|
48
|
+
}
|
|
49
|
+
function D(e) {
|
|
50
|
+
let t = 1 / 0, n = -1 / 0;
|
|
51
|
+
for (const o of e)
|
|
52
|
+
for (const r of o)
|
|
53
|
+
r !== null && Number.isFinite(r) && (t = Math.min(t, r), n = Math.max(n, r));
|
|
54
|
+
return Number.isFinite(t) || (t = 0), Number.isFinite(n) || (n = 1), t === n && (n = t + 1), { min: t, max: n };
|
|
55
|
+
}
|
|
56
|
+
function P(e) {
|
|
57
|
+
return e.some((t) => t.values && Object.keys(t.values).length > 0);
|
|
58
|
+
}
|
|
59
|
+
function b(e) {
|
|
60
|
+
const t = /* @__PURE__ */ new Set();
|
|
61
|
+
for (const n of e)
|
|
62
|
+
n.values && Object.keys(n.values).forEach((o) => t.add(o));
|
|
63
|
+
return [...t];
|
|
64
|
+
}
|
|
65
|
+
function T(e, t) {
|
|
66
|
+
for (const n of e)
|
|
67
|
+
if (typeof n.values?.[t] == "string")
|
|
68
|
+
return !0;
|
|
69
|
+
return !1;
|
|
70
|
+
}
|
|
71
|
+
function U(e, t) {
|
|
72
|
+
return b(e).map((o) => {
|
|
73
|
+
const r = t?.find((a) => a.id === o), l = T(e, o);
|
|
74
|
+
return {
|
|
75
|
+
id: o,
|
|
76
|
+
name: r?.name ?? o,
|
|
77
|
+
// Auto-set categorical mode for string layers if not explicitly configured
|
|
78
|
+
visualizationMode: r?.visualizationMode ?? (l ? "categorical" : void 0),
|
|
79
|
+
colorScale: r?.colorScale,
|
|
80
|
+
valueMin: r?.valueMin,
|
|
81
|
+
valueMax: r?.valueMax,
|
|
82
|
+
valueUnit: r?.valueUnit,
|
|
83
|
+
categoryColors: r?.categoryColors
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function k(e, t, n) {
|
|
88
|
+
const o = e.match(/^([A-Z]{1,2})(\d{1,2}):([A-Z]{1,2})(\d{1,2})$/i);
|
|
89
|
+
if (!o)
|
|
90
|
+
return null;
|
|
91
|
+
const r = I(`${o[1]}${o[2]}`), l = I(`${o[3]}${o[4]}`), a = Math.min(r.row, l.row), s = Math.max(r.row, l.row), i = Math.min(r.col, l.col), f = Math.max(r.col, l.col), u = t.length, h = n.length;
|
|
92
|
+
return a >= u || s >= u || i >= h || f >= h ? null : { minRow: a, maxRow: s, minCol: i, maxCol: f };
|
|
93
|
+
}
|
|
94
|
+
function H({
|
|
95
|
+
wellId: e,
|
|
96
|
+
value: t,
|
|
97
|
+
allValues: n,
|
|
98
|
+
tooltipExtra: o,
|
|
99
|
+
activeLayerId: r,
|
|
100
|
+
layerConfigMap: l,
|
|
101
|
+
precision: a,
|
|
102
|
+
valueUnit: s
|
|
103
|
+
}) {
|
|
104
|
+
let i = `Well ${e}`;
|
|
105
|
+
return n ? i += L(n, r, l, a) : t !== null ? i += `<br>Value: ${t.toFixed(a)}${s}` : r ? i += `<br>▶ ${r}: -` : i += "<br>No data", o && (i += w(o)), i;
|
|
106
|
+
}
|
|
107
|
+
function L(e, t, n, o) {
|
|
108
|
+
let r = "";
|
|
109
|
+
for (const [l, a] of Object.entries(e)) {
|
|
110
|
+
const i = l === t ? "▶ " : "", f = n.get(l)?.valueUnit, u = f ? ` ${f}` : "";
|
|
111
|
+
a === null ? r += `<br>${i}${l}: -` : typeof a == "number" ? r += `<br>${i}${l}: ${a.toFixed(o)}${u}` : r += `<br>${i}${l}: ${a.charAt(0).toUpperCase() + a.slice(1)}`;
|
|
112
|
+
}
|
|
113
|
+
return r;
|
|
114
|
+
}
|
|
115
|
+
function w(e) {
|
|
116
|
+
let t = "";
|
|
117
|
+
for (const [n, o] of Object.entries(e))
|
|
118
|
+
t += `<br>${n}: ${String(o)}`;
|
|
119
|
+
return t;
|
|
120
|
+
}
|
|
121
|
+
function W(e, t, n) {
|
|
122
|
+
const o = n ? { text: n } : void 0;
|
|
123
|
+
switch (e) {
|
|
124
|
+
case "bottom":
|
|
125
|
+
return {
|
|
126
|
+
orientation: "h",
|
|
127
|
+
thickness: 20,
|
|
128
|
+
len: 0.75,
|
|
129
|
+
outlinewidth: 0,
|
|
130
|
+
ticksuffix: t,
|
|
131
|
+
y: -0.15,
|
|
132
|
+
yanchor: "top",
|
|
133
|
+
x: 0.5,
|
|
134
|
+
xanchor: "center",
|
|
135
|
+
title: o ? { ...o, side: "top" } : void 0
|
|
136
|
+
};
|
|
137
|
+
case "top":
|
|
138
|
+
return {
|
|
139
|
+
orientation: "h",
|
|
140
|
+
thickness: 20,
|
|
141
|
+
len: 0.75,
|
|
142
|
+
outlinewidth: 0,
|
|
143
|
+
ticksuffix: t,
|
|
144
|
+
y: 1.15,
|
|
145
|
+
yanchor: "bottom",
|
|
146
|
+
x: 0.5,
|
|
147
|
+
xanchor: "center",
|
|
148
|
+
title: o ? { ...o, side: "bottom" } : void 0
|
|
149
|
+
};
|
|
150
|
+
case "left":
|
|
151
|
+
return {
|
|
152
|
+
thickness: 28,
|
|
153
|
+
len: 1,
|
|
154
|
+
outlinewidth: 0,
|
|
155
|
+
ticksuffix: t,
|
|
156
|
+
y: 0.5,
|
|
157
|
+
yanchor: "middle",
|
|
158
|
+
x: -0.15,
|
|
159
|
+
xanchor: "right",
|
|
160
|
+
title: o ? { ...o, side: "right" } : void 0
|
|
161
|
+
};
|
|
162
|
+
default:
|
|
163
|
+
return {
|
|
164
|
+
thickness: 20,
|
|
165
|
+
len: 0.9,
|
|
166
|
+
outlinewidth: 0,
|
|
167
|
+
ticksuffix: t,
|
|
168
|
+
x: 0.88,
|
|
169
|
+
xanchor: "left",
|
|
170
|
+
y: 0.5,
|
|
171
|
+
yanchor: "middle",
|
|
172
|
+
title: o ? { ...o, side: "right" } : void 0
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function V(e, t, n) {
|
|
177
|
+
const o = n ? c.MARGIN_TOP : c.MARGIN_RIGHT, r = c.MARGIN_RIGHT, l = e === "left" ? o + c.MARGIN_RIGHT : o, a = e === "right" ? r + c.MARGIN_RIGHT : r, s = e === "bottom" ? c.MARGIN_LEFT : c.MARGIN_RIGHT;
|
|
178
|
+
let i;
|
|
179
|
+
return t ? i = e === "top" ? c.COLORBAR_LENGTH : 100 : i = e === "top" ? c.MARGIN_TOP : c.MARGIN_BOTTOM, { l, r: a, b: s, t: i, pad: 5 };
|
|
180
|
+
}
|
|
181
|
+
function F(e) {
|
|
182
|
+
switch (e) {
|
|
183
|
+
case "left":
|
|
184
|
+
return c.MULTI_VALUE_PRIMARY_RATIO;
|
|
185
|
+
case "right":
|
|
186
|
+
return c.MULTI_VALUE_SECONDARY_RATIO;
|
|
187
|
+
default:
|
|
188
|
+
return 0.5;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
function z(e) {
|
|
192
|
+
switch (e) {
|
|
193
|
+
case "left":
|
|
194
|
+
return [c.DOMAIN_COLORBAR_OFFSET, 1];
|
|
195
|
+
case "right":
|
|
196
|
+
return [0, c.DOMAIN_COLORBAR_END];
|
|
197
|
+
default:
|
|
198
|
+
return [0, 1];
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function B(e, t, n, o, r, l) {
|
|
202
|
+
const a = [], s = [], i = [], f = [];
|
|
203
|
+
for (let u = 0; u < o; u++)
|
|
204
|
+
for (let h = 0; h < r; h++) {
|
|
205
|
+
a.push(h + 1), s.push(t[u]);
|
|
206
|
+
const A = e[u][h];
|
|
207
|
+
i.push(A ?? l), f.push(n[u][h]);
|
|
208
|
+
}
|
|
209
|
+
return { xData: a, yData: s, colorData: i, textData: f };
|
|
210
|
+
}
|
|
211
|
+
const C = 4, O = 1, N = 0.8, m = 100;
|
|
212
|
+
function Z(e, t, n, o, r, l, a) {
|
|
213
|
+
const s = a ? c.MARGIN_TOP : c.MARGIN_RIGHT, i = m, f = l ? m : c.MARGIN_BOTTOM, u = c.MARGIN_RIGHT, h = e - s - i, A = t - f - u, g = h / o, R = A / n, y = r === "square" ? Math.max(g, R) : Math.min(g, R);
|
|
214
|
+
return Math.max(C, y * (r === "square" ? O : N));
|
|
215
|
+
}
|
|
216
|
+
export {
|
|
217
|
+
W as buildColorbarConfig,
|
|
218
|
+
V as buildPlotMargins,
|
|
219
|
+
H as buildWellHoverText,
|
|
220
|
+
z as calculateAxisDomain,
|
|
221
|
+
Z as calculateMarkerSize,
|
|
222
|
+
F as calculateTitleX,
|
|
223
|
+
D as calculateValueRange,
|
|
224
|
+
b as extractLayerIds,
|
|
225
|
+
U as extractLayers,
|
|
226
|
+
B as flattenGridData,
|
|
227
|
+
$ as generateColumnLabels,
|
|
228
|
+
E as generateRowLabels,
|
|
229
|
+
P as hasMultiValueWells,
|
|
230
|
+
T as isStringValueLayer,
|
|
231
|
+
k as parseRegionWells,
|
|
232
|
+
I as parseWellId,
|
|
233
|
+
S as wellDataToGrid
|
|
234
|
+
};
|
|
235
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../src/components/charts/PlateMap/utils.ts"],"sourcesContent":["import { PLATEMAP_CONSTANTS } from \"./constants\";\n\nimport type { WellData, WellDataGridResult, LayerConfig, LegendPosition } from \"./types\";\n\n/** ASCII code for uppercase 'A' */\nconst ASCII_UPPERCASE_A = 65;\n/** Number of letters in the alphabet */\nconst ALPHABET_LENGTH = 26;\n\n/**\n * Generate row labels (A, B, C, ... for 96-well; A-P for 384-well; A-AF for 1536-well)\n * For rows beyond Z (26), uses AA, AB, AC, etc.\n */\nexport function generateRowLabels(count: number): string[] {\n return Array.from({ length: count }, (_, i) =>\n i < ALPHABET_LENGTH\n ? String.fromCharCode(ASCII_UPPERCASE_A + i)\n : \"A\" + String.fromCharCode(ASCII_UPPERCASE_A + (i - ALPHABET_LENGTH))\n );\n}\n\n/**\n * Generate column labels (1, 2, 3, ...)\n */\nexport function generateColumnLabels(count: number): number[] {\n return Array.from({ length: count }, (_, i) => i + 1);\n}\n\n/**\n * Parse well ID to row and column indices\n * @param wellId - Well identifier (e.g., \"A1\", \"H12\", \"P24\", \"AA1\", \"AF48\")\n * @returns { row, col } zero-indexed\n */\nexport function parseWellId(wellId: string): { row: number; col: number } | null {\n // Match single letter (A-Z) or double letter (AA-AF) followed by 1-2 digits\n const match = wellId.match(/^([A-Z]{1,2})(\\d{1,2})$/i);\n if (!match) return null;\n\n const rowStr = match[1].toUpperCase();\n const row =\n rowStr.length === 1\n ? rowStr.charCodeAt(0) - ASCII_UPPERCASE_A\n : ALPHABET_LENGTH + (rowStr.charCodeAt(1) - ASCII_UPPERCASE_A);\n\n const col = parseInt(match[2], 10) - 1;\n\n return { row, col };\n}\n\n/** Parsed well position */\ninterface ParsedWellPosition {\n row: number;\n col: number;\n}\n\n/**\n * Checks if a parsed well position is within grid bounds.\n */\nfunction isValidWellPosition(\n parsed: ParsedWellPosition | null,\n rows: number,\n columns: number\n): parsed is ParsedWellPosition {\n if (!parsed) return false;\n const { row, col } = parsed;\n // Check bounds including >= 0 to prevent negative indices (e.g., \"A0\" -> col=-1)\n return row >= 0 && col >= 0 && row < rows && col < columns;\n}\n\n/**\n * Extracts the layer value from well values for the specified layer.\n */\nfunction extractLayerValue(\n values: Record<string, string | number | null> | undefined,\n layerId?: string\n): string | number | null {\n if (!values) return null;\n const effectiveLayerId = layerId ?? Object.keys(values)[0];\n return effectiveLayerId ? values[effectiveLayerId] : null;\n}\n\n/**\n * Stores the layer value in the appropriate grid based on its type.\n */\nfunction storeLayerValue(\n layerValue: string | number | null,\n row: number,\n col: number,\n grid: (number | null)[][],\n categories: (string | null)[][]\n): void {\n if (typeof layerValue === \"number\") {\n grid[row][col] = layerValue;\n } else if (typeof layerValue === \"string\") {\n categories[row][col] = layerValue;\n }\n}\n\n/**\n * Convert WellData array to 2D grids for a specific layer\n */\nexport function wellDataToGrid(\n wells: WellData[],\n rows: number,\n columns: number,\n layerId?: string\n): WellDataGridResult {\n // Initialize grids with nulls\n const grid: (number | null)[][] = Array.from({ length: rows }, () =>\n Array(columns).fill(null)\n );\n const categories: (string | null)[][] = Array.from({ length: rows }, () =>\n Array(columns).fill(null)\n );\n const allValues = new Map<string, Record<string, string | number | null>>();\n const tooltipData = new Map<string, Record<string, unknown>>();\n\n for (const well of wells) {\n const parsed = parseWellId(well.wellId);\n if (!isValidWellPosition(parsed, rows, columns)) continue;\n\n const wellIdUpper = well.wellId.toUpperCase();\n\n // Store all values for tooltip\n if (well.values) {\n allValues.set(wellIdUpper, well.values);\n }\n\n // Store tooltipData\n if (well.tooltipData) {\n tooltipData.set(wellIdUpper, well.tooltipData);\n }\n\n // Extract and store the layer value\n const layerValue = extractLayerValue(well.values, layerId);\n storeLayerValue(layerValue, parsed.row, parsed.col, grid, categories);\n }\n\n return { grid, categories, allValues, tooltipData };\n}\n\n/**\n * Calculate min/max values from grid, ignoring nulls\n */\nexport function calculateValueRange(grid: (number | null)[][]): { min: number; max: number } {\n let min = Infinity;\n let max = -Infinity;\n\n for (const row of grid) {\n for (const val of row) {\n if (val !== null && Number.isFinite(val)) {\n min = Math.min(min, val);\n max = Math.max(max, val);\n }\n }\n }\n\n // Handle case where all values are null\n if (!Number.isFinite(min)) min = 0;\n if (!Number.isFinite(max)) max = 1;\n\n // Ensure min < max\n if (min === max) {\n max = min + 1;\n }\n\n return { min, max };\n}\n\n/**\n * Check if WellData array contains multi-value wells (has `values` property)\n */\nexport function hasMultiValueWells(data: WellData[]): boolean {\n return data.some((well) => well.values && Object.keys(well.values).length > 0);\n}\n\n/**\n * Extract unique layer IDs from WellData array with `values`\n */\nexport function extractLayerIds(data: WellData[]): string[] {\n const layerIds = new Set<string>();\n for (const well of data) {\n if (well.values) {\n Object.keys(well.values).forEach((k) => layerIds.add(k));\n }\n }\n return [...layerIds];\n}\n\n/**\n * Check if a layer contains string values (categorical) or numeric values (heatmap)\n */\nexport function isStringValueLayer(data: WellData[], layerId: string): boolean {\n for (const well of data) {\n const val = well.values?.[layerId];\n if (typeof val === \"string\") {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Extract layer configs from multi-value WellData array.\n * Creates a layer entry for each unique key found in the `values` objects.\n * Merges with user-provided layerConfigs to apply custom settings.\n */\nexport function extractLayers(\n data: WellData[],\n layerConfigs?: LayerConfig[]\n): LayerConfig[] {\n const layerIds = extractLayerIds(data);\n\n return layerIds.map((id) => {\n const config = layerConfigs?.find((c) => c.id === id);\n const isStringLayer = isStringValueLayer(data, id);\n\n return {\n id,\n name: config?.name ?? id,\n // Auto-set categorical mode for string layers if not explicitly configured\n visualizationMode: config?.visualizationMode ?? (isStringLayer ? \"categorical\" : undefined),\n colorScale: config?.colorScale,\n valueMin: config?.valueMin,\n valueMax: config?.valueMax,\n valueUnit: config?.valueUnit,\n categoryColors: config?.categoryColors,\n };\n });\n}\n\n/**\n * Parse region wells from range notation like \"A1:B6\"\n * Returns the bounding box coordinates for overlay rendering\n */\nexport function parseRegionWells(\n wells: string,\n rowLabels: readonly (string | number)[],\n colLabels: readonly (string | number)[]\n): { minRow: number; maxRow: number; minCol: number; maxCol: number } | null {\n // Parse range notation like \"A1:B6\"\n const rangeMatch = wells.match(/^([A-Z]{1,2})(\\d{1,2}):([A-Z]{1,2})(\\d{1,2})$/i);\n if (!rangeMatch) {\n return null;\n }\n\n // The regex above guarantees valid well ID format, so parseWellId will always succeed\n const startWell = parseWellId(`${rangeMatch[1]}${rangeMatch[2]}`)!;\n const endWell = parseWellId(`${rangeMatch[3]}${rangeMatch[4]}`)!;\n\n const minRow = Math.min(startWell.row, endWell.row);\n const maxRow = Math.max(startWell.row, endWell.row);\n const minCol = Math.min(startWell.col, endWell.col);\n const maxCol = Math.max(startWell.col, endWell.col);\n\n // Validate bounds against actual labels\n const numRows = rowLabels.length;\n const numCols = colLabels.length;\n if (minRow >= numRows || maxRow >= numRows || minCol >= numCols || maxCol >= numCols) {\n return null;\n }\n\n return { minRow, maxRow, minCol, maxCol };\n}\n\n/** Options for building hover text for a well */\nexport interface BuildHoverTextOptions {\n wellId: string;\n value: number | null;\n allValues: Record<string, number | string | null> | undefined;\n tooltipExtra: Record<string, unknown> | undefined;\n activeLayerId: string | undefined;\n layerConfigMap: Map<string, LayerConfig>;\n precision: number;\n valueUnit: string;\n}\n\n/**\n * Builds the hover text HTML for a single well.\n * Shows all layer values with the active layer marked.\n */\nexport function buildWellHoverText({\n wellId,\n value,\n allValues,\n tooltipExtra,\n activeLayerId,\n layerConfigMap,\n precision,\n valueUnit,\n}: BuildHoverTextOptions): string {\n let text = `Well ${wellId}`;\n\n if (allValues) {\n text += formatAllLayerValues(allValues, activeLayerId, layerConfigMap, precision);\n } else if (value !== null) {\n text += `<br>Value: ${value.toFixed(precision)}${valueUnit}`;\n } else if (activeLayerId) {\n text += `<br>▶ ${activeLayerId}: -`;\n } else {\n text += `<br>No data`;\n }\n\n if (tooltipExtra) {\n text += formatTooltipExtra(tooltipExtra);\n }\n\n return text;\n}\n\n/** Formats all layer values for hover text display */\nfunction formatAllLayerValues(\n allValues: Record<string, number | string | null>,\n activeLayerId: string | undefined,\n layerConfigMap: Map<string, LayerConfig>,\n precision: number\n): string {\n let result = \"\";\n for (const [key, value] of Object.entries(allValues)) {\n const isActiveLayer = key === activeLayerId;\n const prefix = isActiveLayer ? \"▶ \" : \"\";\n const rawLayerUnit = layerConfigMap.get(key)?.valueUnit;\n const layerUnit = rawLayerUnit ? ` ${rawLayerUnit}` : \"\";\n\n if (value === null) {\n result += `<br>${prefix}${key}: -`;\n } else if (typeof value === \"number\") {\n result += `<br>${prefix}${key}: ${value.toFixed(precision)}${layerUnit}`;\n } else {\n result += `<br>${prefix}${key}: ${value.charAt(0).toUpperCase() + value.slice(1)}`;\n }\n }\n return result;\n}\n\n/** Formats tooltip extra data for display */\nfunction formatTooltipExtra(tooltipExtra: Record<string, unknown>): string {\n let result = \"\";\n for (const [key, value] of Object.entries(tooltipExtra)) {\n result += `<br>${key}: ${String(value)}`;\n }\n return result;\n}\n\n/** Colorbar configuration for a specific position */\nexport interface ColorbarConfig {\n orientation?: \"h\" | \"v\";\n thickness: number;\n len: number;\n outlinewidth: number;\n ticksuffix: string;\n x: number;\n xanchor: \"left\" | \"center\" | \"right\";\n y: number;\n yanchor: \"top\" | \"middle\" | \"bottom\";\n title?: { text: string; side: \"top\" | \"bottom\" | \"right\" };\n}\n\n/**\n * Builds the colorbar configuration based on legend position.\n */\nexport function buildColorbarConfig(\n position: LegendPosition,\n valueUnit: string,\n legendTitle?: string\n): ColorbarConfig {\n const title = legendTitle ? { text: legendTitle } : undefined;\n\n switch (position) {\n case \"bottom\":\n return {\n orientation: \"h\",\n thickness: 20,\n len: 0.75,\n outlinewidth: 0,\n ticksuffix: valueUnit,\n y: -0.15,\n yanchor: \"top\",\n x: 0.5,\n xanchor: \"center\",\n title: title ? { ...title, side: \"top\" } : undefined,\n };\n case \"top\":\n return {\n orientation: \"h\",\n thickness: 20,\n len: 0.75,\n outlinewidth: 0,\n ticksuffix: valueUnit,\n y: 1.15,\n yanchor: \"bottom\",\n x: 0.5,\n xanchor: \"center\",\n title: title ? { ...title, side: \"bottom\" } : undefined,\n };\n case \"left\":\n return {\n thickness: 28,\n len: 1,\n outlinewidth: 0,\n ticksuffix: valueUnit,\n y: 0.5,\n yanchor: \"middle\",\n x: -0.15,\n xanchor: \"right\",\n title: title ? { ...title, side: \"right\" } : undefined,\n };\n default:\n // \"right\" (default)\n return {\n thickness: 20,\n len: 0.9,\n outlinewidth: 0,\n ticksuffix: valueUnit,\n x: 0.88,\n xanchor: \"left\",\n y: 0.5,\n yanchor: \"middle\",\n title: title ? { ...title, side: \"right\" } : undefined,\n };\n }\n}\n\n/** Margin configuration for the plot */\nexport interface PlotMargins {\n l: number;\n r: number;\n b: number;\n t: number;\n pad: number;\n}\n\n/**\n * Builds the margin configuration based on legend position and title presence.\n */\nexport function buildPlotMargins(\n position: LegendPosition,\n hasTitle: boolean,\n hasYTitle: boolean\n): PlotMargins {\n const baseLeft = hasYTitle ? PLATEMAP_CONSTANTS.MARGIN_TOP : PLATEMAP_CONSTANTS.MARGIN_RIGHT;\n const baseRight = PLATEMAP_CONSTANTS.MARGIN_RIGHT;\n\n const leftMargin = position === \"left\" ? baseLeft + PLATEMAP_CONSTANTS.MARGIN_RIGHT : baseLeft;\n const rightMargin = position === \"right\" ? baseRight + PLATEMAP_CONSTANTS.MARGIN_RIGHT : baseRight;\n const bottomMargin = position === \"bottom\" ? PLATEMAP_CONSTANTS.MARGIN_LEFT : PLATEMAP_CONSTANTS.MARGIN_RIGHT;\n\n let topMargin: number;\n if (hasTitle) {\n topMargin = position === \"top\" ? PLATEMAP_CONSTANTS.COLORBAR_LENGTH : 100;\n } else {\n topMargin = position === \"top\" ? PLATEMAP_CONSTANTS.MARGIN_TOP : PLATEMAP_CONSTANTS.MARGIN_BOTTOM;\n }\n\n return { l: leftMargin, r: rightMargin, b: bottomMargin, t: topMargin, pad: 5 };\n}\n\n/**\n * Calculates the title X position based on legend position.\n */\nexport function calculateTitleX(position: LegendPosition): number {\n switch (position) {\n case \"left\":\n return PLATEMAP_CONSTANTS.MULTI_VALUE_PRIMARY_RATIO;\n case \"right\":\n return PLATEMAP_CONSTANTS.MULTI_VALUE_SECONDARY_RATIO;\n default:\n return 0.5;\n }\n}\n\n/**\n * Calculates the X-axis domain based on legend position.\n */\nexport function calculateAxisDomain(position: LegendPosition): [number, number] {\n switch (position) {\n case \"left\":\n return [PLATEMAP_CONSTANTS.DOMAIN_COLORBAR_OFFSET, 1];\n case \"right\":\n return [0, PLATEMAP_CONSTANTS.DOMAIN_COLORBAR_END];\n default:\n return [0, 1];\n }\n}\n\n/** Data arrays for scatter plot */\nexport interface ScatterPlotData {\n xData: number[];\n yData: string[];\n colorData: number[];\n textData: string[];\n}\n\n/**\n * Flattens 2D grid data into arrays for scatter plot rendering.\n */\nexport function flattenGridData(\n plotZ: (number | null)[][],\n rowLabels: (string | number)[],\n hoverText: string[][],\n rows: number,\n columns: number,\n plotZMin: number\n): ScatterPlotData {\n const xData: number[] = [];\n const yData: string[] = [];\n const colorData: number[] = [];\n const textData: string[] = [];\n\n for (let rowIdx = 0; rowIdx < rows; rowIdx++) {\n for (let colIdx = 0; colIdx < columns; colIdx++) {\n xData.push(colIdx + 1); // 1-indexed columns\n yData.push(rowLabels[rowIdx] as string);\n const zValue = plotZ[rowIdx][colIdx];\n colorData.push(zValue ?? plotZMin); // Use min value for null wells\n textData.push(hoverText[rowIdx][colIdx]);\n }\n }\n\n return { xData, yData, colorData, textData };\n}\n\n/** Marker size calculation result */\nexport interface MarkerSizeResult {\n markerSize: number;\n}\n\n/** Minimum marker size in pixels */\nconst MIN_MARKER_SIZE = 4;\n/** Size multiplier for square markers (fill entire cell) */\nconst SQUARE_SIZE_MULTIPLIER = 1.0;\n/** Size multiplier for circle markers (leave gaps) */\nconst CIRCLE_SIZE_MULTIPLIER = 0.8;\n/** Default colorbar space reservation */\nconst COLORBAR_SPACE = 100;\n\n/**\n * Calculates the marker size based on plot dimensions and marker shape.\n */\nexport function calculateMarkerSize(\n width: number,\n height: number,\n rows: number,\n columns: number,\n markerShape: \"circle\" | \"square\",\n hasTitle: boolean,\n hasYTitle: boolean\n): number {\n const leftMargin = hasYTitle ? PLATEMAP_CONSTANTS.MARGIN_TOP : PLATEMAP_CONSTANTS.MARGIN_RIGHT;\n const rightMargin = COLORBAR_SPACE; // Always reserve space for colorbar\n const topMargin = hasTitle ? COLORBAR_SPACE : PLATEMAP_CONSTANTS.MARGIN_BOTTOM;\n const bottomMargin = PLATEMAP_CONSTANTS.MARGIN_RIGHT;\n const plotWidth = width - leftMargin - rightMargin;\n const plotHeight = height - topMargin - bottomMargin;\n\n const cellWidth = plotWidth / columns;\n const cellHeight = plotHeight / rows;\n\n // Circles: use smaller dimension; Squares: use larger dimension\n const cellSize = markerShape === \"square\"\n ? Math.max(cellWidth, cellHeight)\n : Math.min(cellWidth, cellHeight);\n\n const sizeMultiplier = markerShape === \"square\" ? SQUARE_SIZE_MULTIPLIER : CIRCLE_SIZE_MULTIPLIER;\n return Math.max(MIN_MARKER_SIZE, cellSize * sizeMultiplier);\n}\n"],"names":["ASCII_UPPERCASE_A","ALPHABET_LENGTH","generateRowLabels","count","_","i","generateColumnLabels","parseWellId","wellId","match","rowStr","row","col","isValidWellPosition","parsed","rows","columns","extractLayerValue","values","layerId","effectiveLayerId","storeLayerValue","layerValue","grid","categories","wellDataToGrid","wells","allValues","tooltipData","well","wellIdUpper","calculateValueRange","min","max","val","hasMultiValueWells","data","extractLayerIds","layerIds","k","isStringValueLayer","extractLayers","layerConfigs","id","config","c","isStringLayer","parseRegionWells","rowLabels","colLabels","rangeMatch","startWell","endWell","minRow","maxRow","minCol","maxCol","numRows","numCols","buildWellHoverText","value","tooltipExtra","activeLayerId","layerConfigMap","precision","valueUnit","text","formatAllLayerValues","formatTooltipExtra","result","key","prefix","rawLayerUnit","layerUnit","buildColorbarConfig","position","legendTitle","title","buildPlotMargins","hasTitle","hasYTitle","baseLeft","PLATEMAP_CONSTANTS","baseRight","leftMargin","rightMargin","bottomMargin","topMargin","calculateTitleX","calculateAxisDomain","flattenGridData","plotZ","hoverText","plotZMin","xData","yData","colorData","textData","rowIdx","colIdx","zValue","MIN_MARKER_SIZE","SQUARE_SIZE_MULTIPLIER","CIRCLE_SIZE_MULTIPLIER","COLORBAR_SPACE","calculateMarkerSize","width","height","markerShape","plotWidth","plotHeight","cellWidth","cellHeight","cellSize"],"mappings":";AAKA,MAAMA,IAAoB,IAEpBC,IAAkB;AAMjB,SAASC,EAAkBC,GAAyB;AACzD,SAAO,MAAM;AAAA,IAAK,EAAE,QAAQA,EAAA;AAAA,IAAS,CAACC,GAAGC,MACvCA,IAAIJ,IACA,OAAO,a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MO,CAAM,EAAEC,CAAM;AACnC,MAAAH,EAAU,KAAKI,KAAUP,CAAQ,GACjCI,EAAS,KAAKL,EAAUM,CAAM,EAAEC,CAAM,CAAC;AAAA,IACzC;AAGF,SAAO,EAAE,OAAAL,GAAO,OAAAC,GAAO,WAAAC,GAAW,UAAAC,EAAA;AACpC;AAQA,MAAMI,IAAkB,GAElBC,IAAyB,GAEzBC,IAAyB,KAEzBC,IAAiB;AAKhB,SAASC,EACdC,GACAC,GACA5F,GACAC,GACA4F,GACA7B,GACAC,GACQ;AACR,QAAMI,IAAaJ,IAAYE,EAAmB,aAAaA,EAAmB,cAC5EG,IAAcmB,GACdjB,IAAYR,IAAWyB,IAAiBtB,EAAmB,eAC3DI,IAAeJ,EAAmB,cAClC2B,IAAYH,IAAQtB,IAAaC,GACjCyB,IAAaH,IAASpB,IAAYD,GAElCyB,IAAYF,IAAY7F,GACxBgG,IAAaF,IAAa/F,GAG1BkG,IAAWL,MAAgB,WAC7B,KAAK,IAAIG,GAAWC,CAAU,IAC9B,KAAK,IAAID,GAAWC,CAAU;AAGlC,SAAO,KAAK,IAAIX,GAAiBY,KADVL,MAAgB,WAAWN,IAAyBC,EACjB;AAC5D;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react/jsx-runtime"),A=require("plotly.js-dist"),n=require("react"),_=require("../../../hooks/use-plotly-theme.cjs"),S=({dataSeries:u,width:y=1e3,height:k=600,xRange:a,yRange:m,xTitle:p="Columns",yTitle:d="Rows",title:w="Scatter Plot"})=>{const h=n.useRef(null),t=_.usePlotlyTheme(),{xMin:b,xMax:v,yMin:C,yMax:E}=n.useMemo(()=>{let r=Number.MAX_VALUE,e=Number.MIN_VALUE,s=Number.MAX_VALUE,o=Number.MIN_VALUE;u.forEach(z=>{z.x.forEach(f=>{r=Math.min(r,f),e=Math.max(e,f)}),z.y.forEach(f=>{s=Math.min(s,f),o=Math.max(o,f)})});const i=(e-r)*.1,P=(o-s)*.1;return{xMin:r-i,xMax:e+i,yMin:s-P,yMax:o+P}},[u]),c=n.useMemo(()=>a||[b,v],[a,b,v]),l=n.useMemo(()=>m||[C,E],[m,C,E]),M=n.useMemo(()=>{const r=c[1]-c[0];let e=Math.pow(10,Math.floor(Math.log10(r)));r/e>10&&(e=e*2),r/e<4&&(e=e/2);const s=[];let o=Math.ceil(c[0]/e)*e;for(;o<=c[1];)s.push(o),o+=e;return s},[c]),I=n.useMemo(()=>{const r=l[1]-l[0];let e=Math.pow(10,Math.floor(Math.log10(r)));r/e>10&&(e=e*2),r/e<4&&(e=e/2);const s=[];let o=Math.ceil(l[0]/e)*e;for(;o<=l[1];)s.push(o),o+=e;return s},[l]),g=n.useMemo(()=>({tickcolor:t.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:t.textColor,family:"Inter, sans-serif",weight:400},linecolor:t.lineColor,linewidth:1,position:0,zeroline:!1}),[t]),x=n.useMemo(()=>({showspikes:!0,spikemode:"across",spikedash:"solid",spikecolor:t.spikeColor,spikethickness:2}),[t]);return n.useEffect(()=>{if(!h.current)return;const r=u.map(i=>({x:i.x,y:i.y,type:"scatter",mode:"markers",name:i.name,marker:{color:i.color,size:10,symbol:"circle"},hovertemplate:`${p}: %{x}<br>${d}: %{y}<extra>${i.name}</extra>`})),e={title:{text:w,font:{size:32,family:"Inter, sans-serif",color:t.textColor}},width:y,height:k,margin:{l:80,r:30,b:80,t:60,pad:10},paper_bgcolor:t.paperBg,plot_bgcolor:t.plotBg,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:p,font:{size:16,color:t.textSecondary,family:"Inter, sans-serif",weight:400},standoff:32},gridcolor:t.gridColor,range:a,autorange:!a,tickmode:"array",tickvals:M,ticktext:M.map(String),showgrid:!0,...x,...g},yaxis:{title:{text:d,font:{size:16,color:t.textSecondary,family:"Inter, sans-serif",weight:400},standoff:30},gridcolor:t.gridColor,range:m,autorange:!m,tickmode:"array",tickvals:I,showgrid:!0,...x,...g},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:16,color:t.legendColor,family:"Inter, sans-serif",weight:500}},showlegend:!0,hovermode:"closest"},s={responsive:!0,displayModeBar:!1,displaylogo:!1};A.newPlot(h.current,r,e,s);const o=h.current;return()=>{o&&A.purge(o)}},[u,y,k,a,m,p,d,w,c,l,M,I,g,x,t]),N.jsx("div",{className:"chart-container",children:N.jsx("div",{ref:h,style:{width:"100%",height:"100%"}})})};exports.ScatterGraph=S;
|
|
2
|
+
//# sourceMappingURL=ScatterGraph.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScatterGraph.cjs","sources":["../../../../src/components/charts/ScatterGraph/ScatterGraph.tsx"],"sourcesContent":["import Plotly from \"plotly.js-dist\";\nimport React, { useEffect, useRef, useMemo } from \"react\";\n\nimport { usePlotlyTheme } from \"@/hooks/use-plotly-theme\";\n\ninterface ScatterDataPoint {\n x: number;\n y: number;\n additionalInfo?: Record<string, string | number>;\n}\n\ninterface ScatterDataSeries {\n x: number[];\n y: number[];\n name: string;\n color: string;\n}\n\ninterface ScatterGraphProps {\n dataSeries: ScatterDataSeries[];\n width?: number;\n height?: number;\n xRange?: [number, number];\n yRange?: [number, number];\n xTitle?: string;\n yTitle?: string;\n title?: string;\n}\n\nconst ScatterGraph: React.FC<ScatterGraphProps> = ({\n dataSeries,\n width = 1000,\n height = 600,\n xRange,\n yRange,\n xTitle = \"Columns\",\n yTitle = \"Rows\",\n title = \"Scatter Plot\",\n}) => {\n const plotRef = useRef<HTMLDivElement>(null);\n const theme = usePlotlyTheme();\n\n const { xMin, xMax, yMin, yMax } = useMemo(() => {\n let minX = Number.MAX_VALUE;\n let maxX = Number.MIN_VALUE;\n let minY = Number.MAX_VALUE;\n let maxY = Number.MIN_VALUE;\n\n dataSeries.forEach((series) => {\n series.x.forEach((x) => {\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n });\n series.y.forEach((y) => {\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n });\n });\n\n const xPadding = (maxX - minX) * 0.1;\n const yPadding = (maxY - minY) * 0.1;\n\n return {\n xMin: minX - xPadding,\n xMax: maxX + xPadding,\n yMin: minY - yPadding,\n yMax: maxY + yPadding,\n };\n }, [dataSeries]);\n\n const effectiveXRange = useMemo(\n () => xRange || [xMin, xMax],\n [xRange, xMin, xMax],\n );\n\n const effectiveYRange = useMemo(\n () => yRange || [yMin, yMax],\n [yRange, yMin, yMax],\n );\n\n const xTicks = useMemo(() => {\n const range = effectiveXRange[1] - effectiveXRange[0];\n let step = Math.pow(10, Math.floor(Math.log10(range)));\n\n if (range / step > 10) step = step * 2;\n if (range / step < 4) step = step / 2;\n\n const ticks = [];\n let current = Math.ceil(effectiveXRange[0] / step) * step;\n while (current <= effectiveXRange[1]) {\n ticks.push(current);\n current += step;\n }\n return ticks;\n }, [effectiveXRange]);\n\n const yTicks = useMemo(() => {\n const range = effectiveYRange[1] - effectiveYRange[0];\n let step = Math.pow(10, Math.floor(Math.log10(range)));\n\n if (range / step > 10) step = step * 2;\n if (range / step < 4) step = step / 2;\n\n const ticks = [];\n let current = Math.ceil(effectiveYRange[0] / step) * step;\n while (current <= effectiveYRange[1]) {\n ticks.push(current);\n current += step;\n }\n return ticks;\n }, [effectiveYRange]);\n\n const tickOptions = useMemo(\n () => ({\n tickcolor: theme.tickColor,\n ticklen: 12,\n tickwidth: 1,\n ticks: \"outside\" as const,\n tickfont: {\n size: 16,\n color: theme.textColor,\n family: \"Inter, sans-serif\",\n weight: 400,\n },\n linecolor: theme.lineColor,\n linewidth: 1,\n position: 0,\n zeroline: false,\n }),\n [theme],\n );\n\n const spikeOptions = useMemo(\n () => ({\n showspikes: true,\n spikemode: \"across\" as const,\n spikedash: \"solid\" as const,\n spikecolor: theme.spikeColor,\n spikethickness: 2,\n }),\n [theme],\n );\n\n useEffect(() => {\n if (!plotRef.current) return;\n\n const plotData = dataSeries.map((series) => ({\n x: series.x,\n y: series.y,\n type: \"scatter\" as const,\n mode: \"markers\" as const,\n name: series.name,\n marker: {\n color: series.color,\n size: 10,\n symbol: \"circle\" as const,\n },\n hovertemplate: `${xTitle}: %{x}<br>${yTitle}: %{y}<extra>${series.name}</extra>`,\n }));\n\n const layout = {\n title: {\n text: title,\n font: {\n size: 32,\n family: \"Inter, sans-serif\",\n color: theme.textColor,\n },\n },\n width,\n height,\n margin: { l: 80, r: 30, b: 80, t: 60, pad: 10 },\n paper_bgcolor: theme.paperBg,\n plot_bgcolor: theme.plotBg,\n font: {\n family: \"Inter, sans-serif\",\n },\n dragmode: false as const,\n xaxis: {\n title: {\n text: xTitle,\n font: {\n size: 16,\n color: theme.textSecondary,\n family: \"Inter, sans-serif\",\n weight: 400,\n },\n standoff: 32,\n },\n gridcolor: theme.gridColor,\n range: xRange,\n autorange: !xRange,\n tickmode: \"array\" as const,\n tickvals: xTicks,\n ticktext: xTicks.map(String),\n showgrid: true,\n ...spikeOptions,\n ...tickOptions,\n },\n yaxis: {\n title: {\n text: yTitle,\n font: {\n size: 16,\n color: theme.textSecondary,\n family: \"Inter, sans-serif\",\n weight: 400,\n },\n standoff: 30,\n },\n gridcolor: theme.gridColor,\n range: yRange,\n autorange: !yRange,\n tickmode: \"array\" as const,\n tickvals: yTicks,\n showgrid: true,\n ...spikeOptions,\n ...tickOptions,\n },\n legend: {\n x: 0.5,\n y: -0.2,\n xanchor: \"center\" as const,\n yanchor: \"top\" as const,\n orientation: \"h\" as const,\n font: {\n size: 16,\n color: theme.legendColor,\n family: \"Inter, sans-serif\",\n weight: 500,\n },\n },\n showlegend: true,\n hovermode: \"closest\" as const,\n };\n\n const config = {\n responsive: true,\n displayModeBar: false,\n displaylogo: false,\n };\n\n Plotly.newPlot(plotRef.current, plotData, layout, config);\n\n // Capture ref value for cleanup\n const plotElement = plotRef.current;\n\n return () => {\n if (plotElement) {\n Plotly.purge(plotElement);\n }\n };\n }, [dataSeries, width, height, xRange, yRange, xTitle, yTitle, title, effectiveXRange, effectiveYRange, xTicks, yTicks, tickOptions, spikeOptions, theme]);\n\n return (\n <div className=\"chart-container\">\n <div ref={plotRef} style={{ width: \"100%\", height: \"100%\" }} />\n </div>\n );\n};\n\nexport { ScatterGraph };\nexport type { ScatterDataPoint, ScatterDataSeries, ScatterGraphProps };\n"],"names":["ScatterGraph","dataSeries","width","height","xRange","yRange","xTitle","yTitle","title","plotRef","useRef","theme","usePlotlyTheme","xMin","xMax","yMin","yMax","useMemo","minX","maxX","minY","maxY","series","x","y","xPadding","yPadding","effectiveXRange","effectiveYRange","xTicks","range","step","ticks","current","yTicks","tickOptions","spikeOptions","useEffect","plotData","layout","config","Plotly","plotElement","jsx"],"mappings":"qNA6BMA,EAA4C,CAAC,CACjD,WAAAC,EACA,MAAAC,EAAQ,IACR,OAAAC,EAAS,IACT,OAAAC,EACA,OAAAC,EACA,OAAAC,EAAS,UACT,OAAAC,EAAS,OACT,MAAAC,EAAQ,cACV,IAAM,CACJ,MAAMC,EAAUC,EAAAA,OAAuB,IAAI,EACrCC,EAAQC,EAAAA,eAAA,EAER,CAAE,KAAAC,EAAM,KAAAC,EAAM,KAAAC,EAAM,KAAAC,CAAA,EAASC,EAAAA,QAAQ,IAAM,CAC/C,IAAIC,EAAO,OAAO,UACdC,EAAO,OAAO,UACdC,EAAO,OAAO,UACdC,EAAO,OAAO,UAElBpB,EAAW,QAASqB,GAAW,CAC7BA,EAAO,EAAE,QAASC,GAAM,CACtBL,EAAO,KAAK,IAAIA,EAAMK,CAAC,EACvBJ,EAAO,KAAK,IAAIA,EAAMI,CAAC,CACzB,CAAC,EACDD,EAAO,EAAE,QAASE,GAAM,CACtBJ,EAAO,KAAK,IAAIA,EAAMI,CAAC,EACvBH,EAAO,KAAK,IAAIA,EAAMG,CAAC,CACzB,CAAC,CACH,CAAC,EAED,MAAMC,GAAYN,EAAOD,GAAQ,GAC3BQ,GAAYL,EAAOD,GAAQ,GAEjC,MAA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,SAAU,GACV,GAAGO,EACH,GAAGD,CAAA,EAEL,MAAO,CACL,MAAO,CACL,KAAM5B,EACN,KAAM,CACJ,KAAM,GACN,MAAOI,EAAM,cACb,OAAQ,oBACR,OAAQ,GAAA,EAEV,SAAU,EAAA,EAEZ,UAAWA,EAAM,UACjB,MAAON,EACP,UAAW,CAACA,EACZ,SAAU,QACV,SAAU6B,EACV,SAAU,GACV,GAAGE,EACH,GAAGD,CAAA,EAEL,OAAQ,CACN,EAAG,GACH,EAAG,IACH,QAAS,SACT,QAAS,MACT,YAAa,IACb,KAAM,CACJ,KAAM,GACN,MAAOxB,EAAM,YACb,OAAQ,oBACR,OAAQ,GAAA,CACV,EAEF,WAAY,GACZ,UAAW,SAAA,EAGP6B,EAAS,CACb,WAAY,GACZ,eAAgB,GAChB,YAAa,EAAA,EAGfC,EAAO,QAAQhC,EAAQ,QAAS6B,EAAUC,EAAQC,CAAM,EAGxD,MAAME,EAAcjC,EAAQ,QAE5B,MAAO,IAAM,CACPiC,GACFD,EAAO,MAAMC,CAAW,CAE5B,CACF,EAAG,CAACzC,EAAYC,EAAOC,EAAQC,EAAQC,EAAQC,EAAQC,EAAQC,EAAOmB,EAAiBC,EAAiBC,EAAQK,EAAQC,EAAaC,EAAczB,CAAK,CAAC,EAGvJgC,EAAAA,IAAC,MAAA,CAAI,UAAU,kBACb,eAAC,MAAA,CAAI,IAAKlC,EAAS,MAAO,CAAE,MAAO,OAAQ,OAAQ,MAAA,EAAU,EAC/D,CAEJ"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { jsx as A } from "react/jsx-runtime";
|
|
2
|
+
import P from "plotly.js-dist";
|
|
3
|
+
import { useRef as _, useMemo as s, useEffect as X } from "react";
|
|
4
|
+
import { usePlotlyTheme as L } from "../../../hooks/use-plotly-theme.js";
|
|
5
|
+
const $ = ({
|
|
6
|
+
dataSeries: h,
|
|
7
|
+
width: M = 1e3,
|
|
8
|
+
height: y = 600,
|
|
9
|
+
xRange: c,
|
|
10
|
+
yRange: f,
|
|
11
|
+
xTitle: d = "Columns",
|
|
12
|
+
yTitle: u = "Rows",
|
|
13
|
+
title: w = "Scatter Plot"
|
|
14
|
+
}) => {
|
|
15
|
+
const p = _(null), o = L(), { xMin: b, xMax: v, yMin: C, yMax: E } = s(() => {
|
|
16
|
+
let r = Number.MAX_VALUE, t = Number.MIN_VALUE, i = Number.MAX_VALUE, e = Number.MIN_VALUE;
|
|
17
|
+
h.forEach((N) => {
|
|
18
|
+
N.x.forEach((m) => {
|
|
19
|
+
r = Math.min(r, m), t = Math.max(t, m);
|
|
20
|
+
}), N.y.forEach((m) => {
|
|
21
|
+
i = Math.min(i, m), e = Math.max(e, m);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
const n = (t - r) * 0.1, z = (e - i) * 0.1;
|
|
25
|
+
return {
|
|
26
|
+
xMin: r - n,
|
|
27
|
+
xMax: t + n,
|
|
28
|
+
yMin: i - z,
|
|
29
|
+
yMax: e + z
|
|
30
|
+
};
|
|
31
|
+
}, [h]), l = s(
|
|
32
|
+
() => c || [b, v],
|
|
33
|
+
[c, b, v]
|
|
34
|
+
), a = s(
|
|
35
|
+
() => f || [C, E],
|
|
36
|
+
[f, C, E]
|
|
37
|
+
), x = s(() => {
|
|
38
|
+
const r = l[1] - l[0];
|
|
39
|
+
let t = Math.pow(10, Math.floor(Math.log10(r)));
|
|
40
|
+
r / t > 10 && (t = t * 2), r / t < 4 && (t = t / 2);
|
|
41
|
+
const i = [];
|
|
42
|
+
let e = Math.ceil(l[0] / t) * t;
|
|
43
|
+
for (; e <= l[1]; )
|
|
44
|
+
i.push(e), e += t;
|
|
45
|
+
return i;
|
|
46
|
+
}, [l]), I = s(() => {
|
|
47
|
+
const r = a[1] - a[0];
|
|
48
|
+
let t = Math.pow(10, Math.floor(Math.log10(r)));
|
|
49
|
+
r / t > 10 && (t = t * 2), r / t < 4 && (t = t / 2);
|
|
50
|
+
const i = [];
|
|
51
|
+
let e = Math.ceil(a[0] / t) * t;
|
|
52
|
+
for (; e <= a[1]; )
|
|
53
|
+
i.push(e), e += t;
|
|
54
|
+
return i;
|
|
55
|
+
}, [a]), g = s(
|
|
56
|
+
() => ({
|
|
57
|
+
tickcolor: o.tickColor,
|
|
58
|
+
ticklen: 12,
|
|
59
|
+
tickwidth: 1,
|
|
60
|
+
ticks: "outside",
|
|
61
|
+
tickfont: {
|
|
62
|
+
size: 16,
|
|
63
|
+
color: o.textColor,
|
|
64
|
+
family: "Inter, sans-serif",
|
|
65
|
+
weight: 400
|
|
66
|
+
},
|
|
67
|
+
linecolor: o.lineColor,
|
|
68
|
+
linewidth: 1,
|
|
69
|
+
position: 0,
|
|
70
|
+
zeroline: !1
|
|
71
|
+
}),
|
|
72
|
+
[o]
|
|
73
|
+
), k = s(
|
|
74
|
+
() => ({
|
|
75
|
+
showspikes: !0,
|
|
76
|
+
spikemode: "across",
|
|
77
|
+
spikedash: "solid",
|
|
78
|
+
spikecolor: o.spikeColor,
|
|
79
|
+
spikethickness: 2
|
|
80
|
+
}),
|
|
81
|
+
[o]
|
|
82
|
+
);
|
|
83
|
+
return X(() => {
|
|
84
|
+
if (!p.current) return;
|
|
85
|
+
const r = h.map((n) => ({
|
|
86
|
+
x: n.x,
|
|
87
|
+
y: n.y,
|
|
88
|
+
type: "scatter",
|
|
89
|
+
mode: "markers",
|
|
90
|
+
name: n.name,
|
|
91
|
+
marker: {
|
|
92
|
+
color: n.color,
|
|
93
|
+
size: 10,
|
|
94
|
+
symbol: "circle"
|
|
95
|
+
},
|
|
96
|
+
hovertemplate: `${d}: %{x}<br>${u}: %{y}<extra>${n.name}</extra>`
|
|
97
|
+
})), t = {
|
|
98
|
+
title: {
|
|
99
|
+
text: w,
|
|
100
|
+
font: {
|
|
101
|
+
size: 32,
|
|
102
|
+
family: "Inter, sans-serif",
|
|
103
|
+
color: o.textColor
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
width: M,
|
|
107
|
+
height: y,
|
|
108
|
+
margin: { l: 80, r: 30, b: 80, t: 60, pad: 10 },
|
|
109
|
+
paper_bgcolor: o.paperBg,
|
|
110
|
+
plot_bgcolor: o.plotBg,
|
|
111
|
+
font: {
|
|
112
|
+
family: "Inter, sans-serif"
|
|
113
|
+
},
|
|
114
|
+
dragmode: !1,
|
|
115
|
+
xaxis: {
|
|
116
|
+
title: {
|
|
117
|
+
text: d,
|
|
118
|
+
font: {
|
|
119
|
+
size: 16,
|
|
120
|
+
color: o.textSecondary,
|
|
121
|
+
family: "Inter, sans-serif",
|
|
122
|
+
weight: 400
|
|
123
|
+
},
|
|
124
|
+
standoff: 32
|
|
125
|
+
},
|
|
126
|
+
gridcolor: o.gridColor,
|
|
127
|
+
range: c,
|
|
128
|
+
autorange: !c,
|
|
129
|
+
tickmode: "array",
|
|
130
|
+
tickvals: x,
|
|
131
|
+
ticktext: x.map(String),
|
|
132
|
+
showgrid: !0,
|
|
133
|
+
...k,
|
|
134
|
+
...g
|
|
135
|
+
},
|
|
136
|
+
yaxis: {
|
|
137
|
+
title: {
|
|
138
|
+
text: u,
|
|
139
|
+
font: {
|
|
140
|
+
size: 16,
|
|
141
|
+
color: o.textSecondary,
|
|
142
|
+
family: "Inter, sans-serif",
|
|
143
|
+
weight: 400
|
|
144
|
+
},
|
|
145
|
+
standoff: 30
|
|
146
|
+
},
|
|
147
|
+
gridcolor: o.gridColor,
|
|
148
|
+
range: f,
|
|
149
|
+
autorange: !f,
|
|
150
|
+
tickmode: "array",
|
|
151
|
+
tickvals: I,
|
|
152
|
+
showgrid: !0,
|
|
153
|
+
...k,
|
|
154
|
+
...g
|
|
155
|
+
},
|
|
156
|
+
legend: {
|
|
157
|
+
x: 0.5,
|
|
158
|
+
y: -0.2,
|
|
159
|
+
xanchor: "center",
|
|
160
|
+
yanchor: "top",
|
|
161
|
+
orientation: "h",
|
|
162
|
+
font: {
|
|
163
|
+
size: 16,
|
|
164
|
+
color: o.legendColor,
|
|
165
|
+
family: "Inter, sans-serif",
|
|
166
|
+
weight: 500
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
showlegend: !0,
|
|
170
|
+
hovermode: "closest"
|
|
171
|
+
}, i = {
|
|
172
|
+
responsive: !0,
|
|
173
|
+
displayModeBar: !1,
|
|
174
|
+
displaylogo: !1
|
|
175
|
+
};
|
|
176
|
+
P.newPlot(p.current, r, t, i);
|
|
177
|
+
const e = p.current;
|
|
178
|
+
return () => {
|
|
179
|
+
e && P.purge(e);
|
|
180
|
+
};
|
|
181
|
+
}, [h, M, y, c, f, d, u, w, l, a, x, I, g, k, o]), /* @__PURE__ */ A("div", { className: "chart-container", children: /* @__PURE__ */ A("div", { ref: p, style: { width: "100%", height: "100%" } }) });
|
|
182
|
+
};
|
|
183
|
+
export {
|
|
184
|
+
$ as ScatterGraph
|
|
185
|
+
};
|
|
186
|
+
//# sourceMappingURL=ScatterGraph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScatterGraph.js","sources":["../../../../src/components/charts/ScatterGraph/ScatterGraph.tsx"],"sourcesContent":["import Plotly from \"plotly.js-dist\";\nimport React, { useEffect, useRef, useMemo } from \"react\";\n\nimport { usePlotlyTheme } from \"@/hooks/use-plotly-theme\";\n\ninterface ScatterDataPoint {\n x: number;\n y: number;\n additionalInfo?: Record<string, string | number>;\n}\n\ninterface ScatterDataSeries {\n x: number[];\n y: number[];\n name: string;\n color: string;\n}\n\ninterface ScatterGraphProps {\n dataSeries: ScatterDataSeries[];\n width?: number;\n height?: number;\n xRange?: [number, number];\n yRange?: [number, number];\n xTitle?: string;\n yTitle?: string;\n title?: string;\n}\n\nconst ScatterGraph: React.FC<ScatterGraphProps> = ({\n dataSeries,\n width = 1000,\n height = 600,\n xRange,\n yRange,\n xTitle = \"Columns\",\n yTitle = \"Rows\",\n title = \"Scatter Plot\",\n}) => {\n const plotRef = useRef<HTMLDivElement>(null);\n const theme = usePlotlyTheme();\n\n const { xMin, xMax, yMin, yMax } = useMemo(() => {\n let minX = Number.MAX_VALUE;\n let maxX = Number.MIN_VALUE;\n let minY = Number.MAX_VALUE;\n let maxY = Number.MIN_VALUE;\n\n dataSeries.forEach((series) => {\n series.x.forEach((x) => {\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n });\n series.y.forEach((y) => {\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n });\n });\n\n const xPadding = (maxX - minX) * 0.1;\n const yPadding = (maxY - minY) * 0.1;\n\n return {\n xMin: minX - xPadding,\n xMax: maxX + xPadding,\n yMin: minY - yPadding,\n yMax: maxY + yPadding,\n };\n }, [dataSeries]);\n\n const effectiveXRange = useMemo(\n () => xRange || [xMin, xMax],\n [xRange, xMin, xMax],\n );\n\n const effectiveYRange = useMemo(\n () => yRange || [yMin, yMax],\n [yRange, yMin, yMax],\n );\n\n const xTicks = useMemo(() => {\n const range = effectiveXRange[1] - effectiveXRange[0];\n let step = Math.pow(10, Math.floor(Math.log10(range)));\n\n if (range / step > 10) step = step * 2;\n if (range / step < 4) step = step / 2;\n\n const ticks = [];\n let current = Math.ceil(effectiveXRange[0] / step) * step;\n while (current <= effectiveXRange[1]) {\n ticks.push(current);\n current += step;\n }\n return ticks;\n }, [effectiveXRange]);\n\n const yTicks = useMemo(() => {\n const range = effectiveYRange[1] - effectiveYRange[0];\n let step = Math.pow(10, Math.floor(Math.log10(range)));\n\n if (range / step > 10) step = step * 2;\n if (range / step < 4) step = step / 2;\n\n const ticks = [];\n let current = Math.ceil(effectiveYRange[0] / step) * step;\n while (current <= effectiveYRange[1]) {\n ticks.push(current);\n current += step;\n }\n return ticks;\n }, [effectiveYRange]);\n\n const tickOptions = useMemo(\n () => ({\n tickcolor: theme.tickColor,\n ticklen: 12,\n tickwidth: 1,\n ticks: \"outside\" as const,\n tickfont: {\n size: 16,\n color: theme.textColor,\n family: \"Inter, sans-serif\",\n weight: 400,\n },\n linecolor: theme.lineColor,\n linewidth: 1,\n position: 0,\n zeroline: false,\n }),\n [theme],\n );\n\n const spikeOptions = useMemo(\n () => ({\n showspikes: true,\n spikemode: \"across\" as const,\n spikedash: \"solid\" as const,\n spikecolor: theme.spikeColor,\n spikethickness: 2,\n }),\n [theme],\n );\n\n useEffect(() => {\n if (!plotRef.current) return;\n\n const plotData = dataSeries.map((series) => ({\n x: series.x,\n y: series.y,\n type: \"scatter\" as const,\n mode: \"markers\" as const,\n name: series.name,\n marker: {\n color: series.color,\n size: 10,\n symbol: \"circle\" as const,\n },\n hovertemplate: `${xTitle}: %{x}<br>${yTitle}: %{y}<extra>${series.name}</extra>`,\n }));\n\n const layout = {\n title: {\n text: title,\n font: {\n size: 32,\n family: \"Inter, sans-serif\",\n color: theme.textColor,\n },\n },\n width,\n height,\n margin: { l: 80, r: 30, b: 80, t: 60, pad: 10 },\n paper_bgcolor: theme.paperBg,\n plot_bgcolor: theme.plotBg,\n font: {\n family: \"Inter, sans-serif\",\n },\n dragmode: false as const,\n xaxis: {\n title: {\n text: xTitle,\n font: {\n size: 16,\n color: theme.textSecondary,\n family: \"Inter, sans-serif\",\n weight: 400,\n },\n standoff: 32,\n },\n gridcolor: theme.gridColor,\n range: xRange,\n autorange: !xRange,\n tickmode: \"array\" as const,\n tickvals: xTicks,\n ticktext: xTicks.map(String),\n showgrid: true,\n ...spikeOptions,\n ...tickOptions,\n },\n yaxis: {\n title: {\n text: yTitle,\n font: {\n size: 16,\n color: theme.textSecondary,\n family: \"Inter, sans-serif\",\n weight: 400,\n },\n standoff: 30,\n },\n gridcolor: theme.gridColor,\n range: yRange,\n autorange: !yRange,\n tickmode: \"array\" as const,\n tickvals: yTicks,\n showgrid: true,\n ...spikeOptions,\n ...tickOptions,\n },\n legend: {\n x: 0.5,\n y: -0.2,\n xanchor: \"center\" as const,\n yanchor: \"top\" as const,\n orientation: \"h\" as const,\n font: {\n size: 16,\n color: theme.legendColor,\n family: \"Inter, sans-serif\",\n weight: 500,\n },\n },\n showlegend: true,\n hovermode: \"closest\" as const,\n };\n\n const config = {\n responsive: true,\n displayModeBar: false,\n displaylogo: false,\n };\n\n Plotly.newPlot(plotRef.current, plotData, layout, config);\n\n // Capture ref value for cleanup\n const plotElement = plotRef.current;\n\n return () => {\n if (plotElement) {\n Plotly.purge(plotElement);\n }\n };\n }, [dataSeries, width, height, xRange, yRange, xTitle, yTitle, title, effectiveXRange, effectiveYRange, xTicks, yTicks, tickOptions, spikeOptions, theme]);\n\n return (\n <div className=\"chart-container\">\n <div ref={plotRef} style={{ width: \"100%\", height: \"100%\" }} />\n </div>\n );\n};\n\nexport { ScatterGraph };\nexport type { ScatterDataPoint, ScatterDataSeries, ScatterGraphProps };\n"],"names":["ScatterGraph","dataSeries","width","height","xRange","yRange","xTitle","yTitle","title","plotRef","useRef","theme","usePlotlyTheme","xMin","xMax","yMin","yMax","useMemo","minX","maxX","minY","maxY","series","x","y","xPadding","yPadding","effectiveXRange","effectiveYRange","xTicks","range","step","ticks","current","yTicks","tickOptions","spikeOptions","useEffect","plotData","layout","config","Plotly","plotElement","jsx"],"mappings":";;;;AA6BA,MAAMA,IAA4C,CAAC;AAAA,EACjD,YAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,QAAAC,IAAS;AAAA,EACT,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,QAAAC,IAAS;AAAA,EACT,OAAAC,IAAQ;AACV,MAAM;AACJ,QAAMC,IAAUC,EAAuB,IAAI,GACrCC,IAAQC,EAAA,GAER,EAAE,MAAAC,GAAM,MAAAC,GAAM,MAAAC,GAAM,MAAAC,EAAA,IAASC,EAAQ,MAAM;AAC/C,QAAIC,IAAO,OAAO,WACdC,IAAO,OAAO,WACdC,IAAO,OAAO,WACdC,IAAO,OAAO;AAElB,IAAApB,EAAW,QAAQ,CAACqB,MAAW;AAC7B,MAAAA,EAAO,EAAE,QAAQ,CAACC,MAAM;AACtB,QAAAL,IAAO,KAAK,IAAIA,GAAMK,CAAC,GACvBJ,IAAO,KAAK,IAAIA,GAAMI,CAAC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H,SAAS;AAAA,QACT,SAAS;AAAA,QACT,aAAa;AAAA,QACb,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,OAAOxB,EAAM;AAAA,UACb,QAAQ;AAAA,UACR,QAAQ;AAAA,QAAA;AAAA,MACV;AAAA,MAEF,YAAY;AAAA,MACZ,WAAW;AAAA,IAAA,GAGP6B,IAAS;AAAA,MACb,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,IAAA;AAGf,IAAAC,EAAO,QAAQhC,EAAQ,SAAS6B,GAAUC,GAAQC,CAAM;AAGxD,UAAME,IAAcjC,EAAQ;AAE5B,WAAO,MAAM;AACX,MAAIiC,KACFD,EAAO,MAAMC,CAAW;AAAA,IAE5B;AAAA,EACF,GAAG,CAACzC,GAAYC,GAAOC,GAAQC,GAAQC,GAAQC,GAAQC,GAAQC,GAAOmB,GAAiBC,GAAiBC,GAAQK,GAAQC,GAAaC,GAAczB,CAAK,CAAC,GAGvJ,gBAAAgC,EAAC,OAAA,EAAI,WAAU,mBACb,4BAAC,OAAA,EAAI,KAAKlC,GAAS,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAA,GAAU,GAC/D;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),s=require("lucide-react"),a=require("../../ui/avatar.cjs"),n=require("../../ui/button.cjs"),i=require("../../ui/separator.cjs"),j=({hostname:r,userProfile:t,onHomeClick:c,onSettingsClick:l,onUserProfileClick:o})=>{const x=m=>m.split(" ").map(d=>d.charAt(0)).join("").toUpperCase().substring(0,2);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between h-auto w-full px-7 py-4 box-border",children:[e.jsx("div",{className:"text-lg font-medium leading-7",children:r}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(n.Button,{variant:"outline",size:"icon-sm",onClick:c,"aria-label":"Home",children:e.jsx(s.Home,{size:20})}),e.jsx(n.Button,{variant:"outline",size:"icon-sm",onClick:l,"aria-label":"Settings",children:e.jsx(s.Settings,{size:20})}),e.jsx(i.Separator,{orientation:"vertical"}),e.jsxs(a.Avatar,{onClick:o,children:[e.jsx(a.AvatarImage,{src:t.avatar,alt:t.name}),e.jsx(a.AvatarFallback,{children:x(t.name)})]}),e.jsx("div",{className:"text-base font-normal leading-6",children:t.name})," "]})]}),e.jsx(i.Separator,{})]})};module.exports=j;
|
|
2
|
+
//# sourceMappingURL=AppHeader.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppHeader.cjs","sources":["../../../../src/components/composed/AppHeader/AppHeader.tsx"],"sourcesContent":["import { Settings, Home } from \"lucide-react\";\nimport React from \"react\";\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\";\nimport { Button } from \"@/components/ui/button\";\nimport { Separator } from \"@/components/ui/separator\";\n\ninterface UserProfileProps {\n name: string;\n avatar?: string;\n}\n\nexport interface AppHeaderProps {\n hostname: string;\n userProfile: UserProfileProps;\n onHomeClick?: () => void;\n onSettingsClick?: () => void;\n onUserProfileClick?: () => void;\n}\n\nconst AppHeader: React.FC<AppHeaderProps> = ({\n hostname,\n userProfile,\n onHomeClick,\n onSettingsClick,\n onUserProfileClick,\n}) => {\n // Get initials for avatar placeholder if no image is provided\n const getInitials = (name: string) => {\n return name\n .split(\" \")\n .map((part) => part.charAt(0))\n .join(\"\")\n .toUpperCase()\n .substring(0, 2);\n };\n\n return (\n <>\n <div className=\"flex items-center justify-between h-auto w-full px-7 py-4 box-border\">\n <div className=\"text-lg font-medium leading-7\">{hostname}</div>\n\n <div className=\"flex items-center gap-3\">\n <Button variant=\"outline\" size=\"icon-sm\" onClick={onHomeClick} aria-label=\"Home\">\n <Home size={20} />\n </Button>\n <Button variant=\"outline\" size=\"icon-sm\" onClick={onSettingsClick} aria-label=\"Settings\">\n <Settings size={20} />\n </Button>\n <Separator orientation=\"vertical\" />\n <Avatar onClick={onUserProfileClick}>\n <AvatarImage src={userProfile.avatar} alt={userProfile.name} />\n <AvatarFallback>{getInitials(userProfile.name)}</AvatarFallback>\n </Avatar>\n <div className=\"text-base font-normal leading-6\">{userProfile.name}</div>{\" \"}\n </div>\n </div>\n <Separator />\n </>\n );\n};\n\nexport default AppHeader;\n"],"names":["AppHeader","hostname","userProfile","onHomeClick","onSettingsClick","onUserProfileClick","getInitials","name","part","jsxs","Fragment","jsx","Button","Home","Settings","Separator","Avatar","AvatarImage","AvatarFallback"],"mappings":"kLAoBMA,EAAsC,CAAC,CAC3C,SAAAC,EACA,YAAAC,EACA,YAAAC,EACA,gBAAAC,EACA,mBAAAC,CACF,IAAM,CAEJ,MAAMC,EAAeC,GACZA,EACJ,MAAM,GAAG,EACT,IAAKC,GAASA,EAAK,OAAO,CAAC,CAAC,EAC5B,KAAK,EAAE,EACP,cACA,UAAU,EAAG,CAAC,EAGnB,OACEC,EAAAA,KAAAC,WAAA,CACE,SAAA,CAAAD,EAAAA,KAAC,MAAA,CAAI,UAAU,uEACb,SAAA,CAAAE,EAAAA,IAAC,MAAA,CAAI,UAAU,gCAAiC,SAAAV,EAAS,EAEzDQ,EAAAA,KAAC,MAAA,CAAI,UAAU,0BACb,SAAA,CAAAE,EAAAA,IAACC,EAAAA,OAAA,CAAO,QAAQ,UAAU,KAAK,UAAU,QAAST,EAAa,aAAW,OACxE,SAAAQ,MAACE,EAAAA,KAAA,CAAK,KAAM,GAAI,EAClB,EACAF,EAAAA,IAACC,EAAAA,OAAA,CAAO,QAAQ,UAAU,KAAK,UAAU,QAASR,EAAiB,aAAW,WAC5E,SAAAO,MAACG,EAAAA,SAAA,CAAS,KAAM,GAAI,EACtB,EACAH,EAAAA,IAACI,EAAAA,UAAA,CAAU,YAAY,UAAA,CAAW,EAClCN,EAAAA,KAACO,EAAAA,OAAA,CAAO,QAASX,EACf,SAAA,CAAAM,MAACM,EAAAA,aAAY,IAAKf,EAAY,OAAQ,IAAKA,EAAY,KAAM,EAC7DS,EAAAA,IAACO,EAAAA,eAAA,CAAgB,SAAAZ,EAAYJ,EAAY,IAAI,CAAA,CAAE,CAAA,EACjD,EACAS,EAAAA,IAAC,MAAA,CAAI,UAAU,kCAAmC,WAAY,KAAK,EAAO,GAAA,CAAA,CAC5E,CAAA,EACF,QACCI,EAAAA,UAAA,CAAA,CAAU,CAAA,EACb,CAEJ"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as t, Fragment as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Home as h, Settings as v } from "lucide-react";
|
|
3
|
+
import { Avatar as g, AvatarImage as f, AvatarFallback as x } from "../../ui/avatar.js";
|
|
4
|
+
import { Button as i } from "../../ui/button.js";
|
|
5
|
+
import { Separator as n } from "../../ui/separator.js";
|
|
6
|
+
const z = ({
|
|
7
|
+
hostname: r,
|
|
8
|
+
userProfile: a,
|
|
9
|
+
onHomeClick: l,
|
|
10
|
+
onSettingsClick: o,
|
|
11
|
+
onUserProfileClick: m
|
|
12
|
+
}) => {
|
|
13
|
+
const s = (c) => c.split(" ").map((d) => d.charAt(0)).join("").toUpperCase().substring(0, 2);
|
|
14
|
+
return /* @__PURE__ */ t(p, { children: [
|
|
15
|
+
/* @__PURE__ */ t("div", { className: "flex items-center justify-between h-auto w-full px-7 py-4 box-border", children: [
|
|
16
|
+
/* @__PURE__ */ e("div", { className: "text-lg font-medium leading-7", children: r }),
|
|
17
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
18
|
+
/* @__PURE__ */ e(i, { variant: "outline", size: "icon-sm", onClick: l, "aria-label": "Home", children: /* @__PURE__ */ e(h, { size: 20 }) }),
|
|
19
|
+
/* @__PURE__ */ e(i, { variant: "outline", size: "icon-sm", onClick: o, "aria-label": "Settings", children: /* @__PURE__ */ e(v, { size: 20 }) }),
|
|
20
|
+
/* @__PURE__ */ e(n, { orientation: "vertical" }),
|
|
21
|
+
/* @__PURE__ */ t(g, { onClick: m, children: [
|
|
22
|
+
/* @__PURE__ */ e(f, { src: a.avatar, alt: a.name }),
|
|
23
|
+
/* @__PURE__ */ e(x, { children: s(a.name) })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ e("div", { className: "text-base font-normal leading-6", children: a.name }),
|
|
26
|
+
" "
|
|
27
|
+
] })
|
|
28
|
+
] }),
|
|
29
|
+
/* @__PURE__ */ e(n, {})
|
|
30
|
+
] });
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
z as default
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=AppHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppHeader.js","sources":["../../../../src/components/composed/AppHeader/AppHeader.tsx"],"sourcesContent":["import { Settings, Home } from \"lucide-react\";\nimport React from \"react\";\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\";\nimport { Button } from \"@/components/ui/button\";\nimport { Separator } from \"@/components/ui/separator\";\n\ninterface UserProfileProps {\n name: string;\n avatar?: string;\n}\n\nexport interface AppHeaderProps {\n hostname: string;\n userProfile: UserProfileProps;\n onHomeClick?: () => void;\n onSettingsClick?: () => void;\n onUserProfileClick?: () => void;\n}\n\nconst AppHeader: React.FC<AppHeaderProps> = ({\n hostname,\n userProfile,\n onHomeClick,\n onSettingsClick,\n onUserProfileClick,\n}) => {\n // Get initials for avatar placeholder if no image is provided\n const getInitials = (name: string) => {\n return name\n .split(\" \")\n .map((part) => part.charAt(0))\n .join(\"\")\n .toUpperCase()\n .substring(0, 2);\n };\n\n return (\n <>\n <div className=\"flex items-center justify-between h-auto w-full px-7 py-4 box-border\">\n <div className=\"text-lg font-medium leading-7\">{hostname}</div>\n\n <div className=\"flex items-center gap-3\">\n <Button variant=\"outline\" size=\"icon-sm\" onClick={onHomeClick} aria-label=\"Home\">\n <Home size={20} />\n </Button>\n <Button variant=\"outline\" size=\"icon-sm\" onClick={onSettingsClick} aria-label=\"Settings\">\n <Settings size={20} />\n </Button>\n <Separator orientation=\"vertical\" />\n <Avatar onClick={onUserProfileClick}>\n <AvatarImage src={userProfile.avatar} alt={userProfile.name} />\n <AvatarFallback>{getInitials(userProfile.name)}</AvatarFallback>\n </Avatar>\n <div className=\"text-base font-normal leading-6\">{userProfile.name}</div>{\" \"}\n </div>\n </div>\n <Separator />\n </>\n );\n};\n\nexport default AppHeader;\n"],"names":["AppHeader","hostname","userProfile","onHomeClick","onSettingsClick","onUserProfileClick","getInitials","name","part","jsxs","Fragment","jsx","Button","Home","Settings","Separator","Avatar","AvatarImage","AvatarFallback"],"mappings":";;;;;AAoBA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,oBAAAC;AACF,MAAM;AAEJ,QAAMC,IAAc,CAACC,MACZA,EACJ,MAAM,GAAG,EACT,IAAI,CAACC,MAASA,EAAK,OAAO,CAAC,CAAC,EAC5B,KAAK,EAAE,EACP,cACA,UAAU,GAAG,CAAC;AAGnB,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAD,EAAC,OAAA,EAAI,WAAU,wEACb,UAAA;AAAA,MAAA,gBAAAE,EAAC,OAAA,EAAI,WAAU,iCAAiC,UAAAV,GAAS;AAAA,MAEzD,gBAAAQ,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,QAAA,gBAAAE,EAACC,GAAA,EAAO,SAAQ,WAAU,MAAK,WAAU,SAAST,GAAa,cAAW,QACxE,UAAA,gBAAAQ,EAACE,GAAA,EAAK,MAAM,IAAI,GAClB;AAAA,QACA,gBAAAF,EAACC,GAAA,EAAO,SAAQ,WAAU,MAAK,WAAU,SAASR,GAAiB,cAAW,YAC5E,UAAA,gBAAAO,EAACG,GAAA,EAAS,MAAM,IAAI,GACtB;AAAA,QACA,gBAAAH,EAACI,GAAA,EAAU,aAAY,WAAA,CAAW;AAAA,QAClC,gBAAAN,EAACO,GAAA,EAAO,SAASX,GACf,UAAA;AAAA,UAAA,gBAAAM,EAACM,KAAY,KAAKf,EAAY,QAAQ,KAAKA,EAAY,MAAM;AAAA,UAC7D,gBAAAS,EAACO,GAAA,EAAgB,UAAAZ,EAAYJ,EAAY,IAAI,EAAA,CAAE;AAAA,QAAA,GACjD;AAAA,QACA,gBAAAS,EAAC,OAAA,EAAI,WAAU,mCAAmC,YAAY,MAAK;AAAA,QAAO;AAAA,MAAA,EAAA,CAC5E;AAAA,IAAA,GACF;AAAA,sBACCI,GAAA,CAAA,CAAU;AAAA,EAAA,GACb;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime");;/* empty css */const e=require("lucide-react"),k=require("react"),h=require("../AppHeader/AppHeader.cjs"),S=require("../Navbar/Navbar.cjs"),p=require("../Sidebar/Sidebar.cjs"),C=({userProfile:c,hostname:o,organization:t,children:l})=>{const n=[{icon:e.Search,label:"Search"},{icon:e.SearchCode,label:"SQL Search"},{icon:e.Lamp,label:"Projects"},{icon:e.Workflow,label:"Pipelines"},{icon:e.Monitor,label:"Data & AI Workspace"},{icon:e.Box,label:"Artifacts"},{icon:e.Database,label:"Data Sources"},{icon:e.PieChart,label:"Health Monitoring"},{icon:e.CheckCheck,label:"Bulk Actions"},{icon:e.Code,label:"Attribute Management"},{icon:e.Settings,label:"Administration"}],[a,s]=k.useState("Pipelines"),r=b=>{s(b)},d=()=>{console.log("Home clicked")},u=()=>{console.log("Settings clicked")},m=()=>{console.log("User profile clicked")};return i.jsxs("div",{className:"app-layout",children:[i.jsx(S,{organization:t}),i.jsxs("div",{className:"content-container",children:[i.jsx(p,{items:n,activeItem:a,onItemClick:r}),i.jsxs("div",{className:"main-content",children:[i.jsx(h,{hostname:o,userProfile:c,onHomeClick:d,onSettingsClick:u,onUserProfileClick:m}),i.jsx("div",{className:"main-layout",children:l})]})]})]})};exports.AppLayout=C;
|
|
2
|
+
//# sourceMappingURL=AppLayout.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppLayout.cjs","sources":["../../../../src/components/composed/AppLayout/AppLayout.tsx"],"sourcesContent":["import \"./AppLayout.scss\";\nimport {\n Box,\n CheckCheck,\n Code,\n Database,\n Lamp,\n Monitor,\n PieChart,\n Search,\n SearchCode,\n Settings,\n Workflow,\n} from \"lucide-react\";\nimport React, { useState } from \"react\";\n\nimport { AppHeader } from \"@/components/composed/AppHeader\";\nimport { Navbar } from \"@/components/composed/Navbar\";\nimport { AppSidebar } from \"@/components/composed/Sidebar\";\n\ninterface AppLayoutProps {\n userProfile: {\n name: string;\n avatar?: string;\n };\n hostname: string;\n organization: {\n name: string;\n subtext?: string;\n logo?: React.ReactNode;\n };\n children?: React.ReactNode;\n}\n\nconst AppLayout: React.FC<AppLayoutProps> = ({\n userProfile,\n hostname,\n organization,\n children,\n}) => {\n // Define sidebar items\n const sidebarItems = [\n { icon: Search, label: \"Search\" },\n { icon: SearchCode, label: \"SQL Search\" },\n { icon: Lamp, label: \"Projects\" },\n { icon: Workflow, label: \"Pipelines\" },\n { icon: Monitor, label: \"Data & AI Workspace\" },\n { icon: Box, label: \"Artifacts\" },\n { icon: Database, label: \"Data Sources\" },\n { icon: PieChart, label: \"Health Monitoring\" },\n { icon: CheckCheck, label: \"Bulk Actions\" },\n { icon: Code, label: \"Attribute Management\" },\n { icon: Settings, label: \"Administration\" },\n ];\n\n // State hooks\n const [activeItem, setActiveItem] = useState(\"Pipelines\");\n\n // Handlers\n const handleSidebarItemClick = (label: string) => {\n setActiveItem(label);\n };\n\n const handleHomeClick = () => {\n console.log(\"Home clicked\");\n };\n\n const handleSettingsClick = () => {\n console.log(\"Settings clicked\");\n };\n\n const handleUserProfileClick = () => {\n console.log(\"User profile clicked\");\n };\n\n return (\n <div className=\"app-layout\">\n <Navbar organization={organization} />\n\n <div className=\"content-container\">\n <AppSidebar\n items={sidebarItems}\n activeItem={activeItem}\n onItemClick={handleSidebarItemClick}\n />\n\n <div className=\"main-content\">\n <AppHeader\n hostname={hostname}\n userProfile={userProfile}\n onHomeClick={handleHomeClick}\n onSettingsClick={handleSettingsClick}\n onUserProfileClick={handleUserProfileClick}\n />\n\n <div className=\"main-layout\">{children}</div>\n </div>\n </div>\n </div>\n );\n};\n\nexport { AppLayout };\nexport type { AppLayoutProps };\n"],"names":["AppLayout","userProfile","hostname","organization","children","sidebarItems","Search","SearchCode","Lamp","Workflow","Monitor","Box","Database","PieChart","CheckCheck","Code","Settings","activeItem","setActiveItem","useState","handleSidebarItemClick","label","handleHomeClick","handleSettingsClick","handleUserProfileClick","jsxs","jsx","Navbar","AppSidebar","AppHeader"],"mappings":"sTAkCMA,EAAsC,CAAC,CAC3C,YAAAC,EACA,SAAAC,EACA,aAAAC,EACA,SAAAC,CACF,IAAM,CAEJ,MAAMC,EAAe,CACnB,CAAE,KAAMC,EAAAA,OAAQ,MAAO,QAAA,EACvB,CAAE,KAAMC,EAAAA,WAAY,MAAO,YAAA,EAC3B,CAAE,KAAMC,EAAAA,KAAM,MAAO,UAAA,EACrB,CAAE,KAAMC,EAAAA,SAAU,MAAO,WAAA,EACzB,CAAE,KAAMC,EAAAA,QAAS,MAAO,qBAAA,EACxB,CAAE,KAAMC,EAAAA,IAAK,MAAO,WAAA,EACpB,CAAE,KAAMC,EAAAA,SAAU,MAAO,cAAA,EACzB,CAAE,KAAMC,EAAAA,SAAU,MAAO,mBAAA,EACzB,CAAE,KAAMC,EAAAA,WAAY,MAAO,cAAA,EAC3B,CAAE,KAAMC,EAAAA,KAAM,MAAO,sBAAA,EACrB,CAAE,KAAMC,WAAU,MAAO,gBAAA,CAAiB,EAItC,CAACC,EAAYC,CAAa,EAAIC,EAAAA,SAAS,WAAW,EAGlDC,EAA0BC,GAAkB,CAChDH,EAAcG,CAAK,CACrB,EAEMC,EAAkB,IAAM,CAC5B,QAAQ,IAAI,cAAc,CAC5B,EAEMC,EAAsB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