@ohif/ui-next 3.14.0-beta.97 → 3.14.0-beta.99
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/ohif-ui-next.umd.js +4 -1925
- package/package.json +18 -7
- package/src/__mocks__/fileMock.js +7 -0
- package/src/assets/fonts.css +50 -0
- package/src/assets/styles.css +55 -0
- package/src/assets/woff2/latin.woff2 +0 -0
- package/src/components/Accordion/Accordion.tsx +70 -0
- package/src/components/Accordion/index.ts +3 -0
- package/src/components/AllInOneMenu/BackItem.tsx +32 -0
- package/src/components/AllInOneMenu/DividerItem.tsx +11 -0
- package/src/components/AllInOneMenu/HeaderItem.tsx +15 -0
- package/src/components/AllInOneMenu/IconMenu.tsx +83 -0
- package/src/components/AllInOneMenu/Item.tsx +51 -0
- package/src/components/AllInOneMenu/ItemPanel.tsx +38 -0
- package/src/components/AllInOneMenu/Menu.tsx +231 -0
- package/src/components/AllInOneMenu/PanelSelector.tsx +32 -0
- package/src/components/AllInOneMenu/SubMenu.tsx +36 -0
- package/src/components/AllInOneMenu/index.ts +42 -0
- package/src/components/BackgroundColorSelect/BackgroundColorSelect.tsx +38 -0
- package/src/components/BackgroundColorSelect/index.tsx +1 -0
- package/src/components/Badge/Badge.tsx +38 -0
- package/src/components/Badge/index.ts +1 -0
- package/src/components/Button/Button.tsx +65 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Calendar/Calendar.tsx +258 -0
- package/src/components/Calendar/index.tsx +3 -0
- package/src/components/Card/Card.tsx +83 -0
- package/src/components/Card/index.ts +2 -0
- package/src/components/Checkbox/Checkbox.tsx +27 -0
- package/src/components/Checkbox/index.tsx +3 -0
- package/src/components/CinePlayer/CinePlayer.tsx +187 -0
- package/src/components/CinePlayer/index.ts +5 -0
- package/src/components/Clipboard/Clipboard.tsx +58 -0
- package/src/components/Clipboard/index.tsx +3 -0
- package/src/components/ColorCircle.tsx +12 -0
- package/src/components/Combobox/Combobox.tsx +66 -0
- package/src/components/Combobox/index.ts +3 -0
- package/src/components/Command/Command.tsx +149 -0
- package/src/components/Command/index.ts +23 -0
- package/src/components/ContextMenu/ContextMenu.tsx +202 -0
- package/src/components/ContextMenu/index.ts +35 -0
- package/src/components/ContextMenuViewport/ContextMenuViewport.tsx +47 -0
- package/src/components/ContextMenuViewport/index.ts +1 -0
- package/src/components/DataRow/DataRow.tsx +532 -0
- package/src/components/DataRow/index.ts +1 -0
- package/src/components/DataRow/types.ts +31 -0
- package/src/components/DataTable/ActionOverlayCell.tsx +153 -0
- package/src/components/DataTable/ColumnHeader.tsx +70 -0
- package/src/components/DataTable/DataTable.tsx +532 -0
- package/src/components/DataTable/FilterRow.tsx +52 -0
- package/src/components/DataTable/Pagination.tsx +78 -0
- package/src/components/DataTable/Title.tsx +5 -0
- package/src/components/DataTable/Toolbar.tsx +5 -0
- package/src/components/DataTable/ViewOptions.tsx +86 -0
- package/src/components/DataTable/context.tsx +21 -0
- package/src/components/DataTable/index.ts +5 -0
- package/src/components/DataTable/types.ts +27 -0
- package/src/components/DataTable/useResponsiveColumns.tsx +346 -0
- package/src/components/DateRange/DateRange.tsx +163 -0
- package/src/components/DateRange/index.ts +3 -0
- package/src/components/Dialog/Dialog.tsx +201 -0
- package/src/components/Dialog/index.ts +25 -0
- package/src/components/Dialog/useDraggable.ts +108 -0
- package/src/components/DisplaySetMessageListTooltip/DisplaySetMessageListTooltip.tsx +64 -0
- package/src/components/DisplaySetMessageListTooltip/index.ts +3 -0
- package/src/components/DoubleSlider/DoubleSlider.test.ts +232 -0
- package/src/components/DoubleSlider/DoubleSlider.tsx +211 -0
- package/src/components/DoubleSlider/index.tsx +3 -0
- package/src/components/DropdownMenu/DropdownMenu.tsx +213 -0
- package/src/components/DropdownMenu/index.ts +35 -0
- package/src/components/Errorboundary/ErrorBoundary.tsx +345 -0
- package/src/components/Errorboundary/index.tsx +3 -0
- package/src/components/FooterAction/FooterAction.tsx +115 -0
- package/src/components/FooterAction/index.tsx +3 -0
- package/src/components/Header/Header.tsx +140 -0
- package/src/components/Header/index.js +2 -0
- package/src/components/HoverCard/HoverCard.tsx +30 -0
- package/src/components/HoverCard/index.ts +1 -0
- package/src/components/Icons/Icons.tsx +852 -0
- package/src/components/Icons/Sources/ActionNewDialog.tsx +64 -0
- package/src/components/Icons/Sources/Actions.tsx +47 -0
- package/src/components/Icons/Sources/Add.tsx +51 -0
- package/src/components/Icons/Sources/Alert.tsx +32 -0
- package/src/components/Icons/Sources/AlertOutline.tsx +30 -0
- package/src/components/Icons/Sources/ArrowLeftBold.tsx +49 -0
- package/src/components/Icons/Sources/ArrowRight.tsx +25 -0
- package/src/components/Icons/Sources/Cancel.tsx +37 -0
- package/src/components/Icons/Sources/CheckBoxChecked.tsx +39 -0
- package/src/components/Icons/Sources/CheckBoxUnChecked.tsx +25 -0
- package/src/components/Icons/Sources/Checked.tsx +23 -0
- package/src/components/Icons/Sources/ChevronClosed.tsx +40 -0
- package/src/components/Icons/Sources/ChevronLeft.tsx +28 -0
- package/src/components/Icons/Sources/ChevronOpen.tsx +38 -0
- package/src/components/Icons/Sources/Clear.tsx +34 -0
- package/src/components/Icons/Sources/Clipboard.tsx +15 -0
- package/src/components/Icons/Sources/Close.tsx +28 -0
- package/src/components/Icons/Sources/CloudSettings.tsx +34 -0
- package/src/components/Icons/Sources/Code.tsx +7 -0
- package/src/components/Icons/Sources/ColorChange.tsx +100 -0
- package/src/components/Icons/Sources/ContentNext.tsx +35 -0
- package/src/components/Icons/Sources/ContentPrev.tsx +35 -0
- package/src/components/Icons/Sources/Controls.tsx +99 -0
- package/src/components/Icons/Sources/Copy.tsx +44 -0
- package/src/components/Icons/Sources/Database.tsx +33 -0
- package/src/components/Icons/Sources/Delete.tsx +58 -0
- package/src/components/Icons/Sources/DicomTagBrowser.tsx +79 -0
- package/src/components/Icons/Sources/DisplayFillAndOutline.tsx +49 -0
- package/src/components/Icons/Sources/DisplayFillOnly.tsx +40 -0
- package/src/components/Icons/Sources/DisplayOutlineOnly.tsx +40 -0
- package/src/components/Icons/Sources/Download.tsx +75 -0
- package/src/components/Icons/Sources/Export.tsx +53 -0
- package/src/components/Icons/Sources/ExternalLink.tsx +26 -0
- package/src/components/Icons/Sources/EyeHidden.tsx +32 -0
- package/src/components/Icons/Sources/EyeVisible.tsx +28 -0
- package/src/components/Icons/Sources/FeedbackComplete.tsx +35 -0
- package/src/components/Icons/Sources/GearSettings.tsx +59 -0
- package/src/components/Icons/Sources/GroupLayers.tsx +33 -0
- package/src/components/Icons/Sources/Helpers.tsx +398 -0
- package/src/components/Icons/Sources/Hide.tsx +45 -0
- package/src/components/Icons/Sources/IconColorLUT.tsx +103 -0
- package/src/components/Icons/Sources/IconMPR.tsx +55 -0
- package/src/components/Icons/Sources/IconTransferring.tsx +25 -0
- package/src/components/Icons/Sources/IllustrationNotFound.tsx +102 -0
- package/src/components/Icons/Sources/Info.tsx +55 -0
- package/src/components/Icons/Sources/InfoLink.tsx +23 -0
- package/src/components/Icons/Sources/InfoSeries.tsx +52 -0
- package/src/components/Icons/Sources/InvestigationalUse.tsx +82 -0
- package/src/components/Icons/Sources/JumpToSlice.tsx +69 -0
- package/src/components/Icons/Sources/LaunchArrow.tsx +34 -0
- package/src/components/Icons/Sources/LaunchInfo.tsx +38 -0
- package/src/components/Icons/Sources/LayerBackground.tsx +28 -0
- package/src/components/Icons/Sources/LayerForeground.tsx +34 -0
- package/src/components/Icons/Sources/LayerSegmentation.tsx +20 -0
- package/src/components/Icons/Sources/Layout.tsx +433 -0
- package/src/components/Icons/Sources/Link.tsx +58 -0
- package/src/components/Icons/Sources/ListView.tsx +79 -0
- package/src/components/Icons/Sources/LoadingOHIFMark.tsx +21 -0
- package/src/components/Icons/Sources/LoadingSpinner.tsx +49 -0
- package/src/components/Icons/Sources/Lock.tsx +35 -0
- package/src/components/Icons/Sources/Magnifier.tsx +37 -0
- package/src/components/Icons/Sources/Minus.tsx +40 -0
- package/src/components/Icons/Sources/MissingIcon.tsx +6 -0
- package/src/components/Icons/Sources/More.tsx +53 -0
- package/src/components/Icons/Sources/MultiplePatients.tsx +76 -0
- package/src/components/Icons/Sources/NavigationPanelReveal.tsx +25 -0
- package/src/components/Icons/Sources/NotificationInfo.tsx +33 -0
- package/src/components/Icons/Sources/NotificationWarning.tsx +44 -0
- package/src/components/Icons/Sources/OHIFLogo.tsx +72 -0
- package/src/components/Icons/Sources/OHIFLogoColorDarkBackground.tsx +78 -0
- package/src/components/Icons/Sources/OHIFLogoHorizontal.tsx +139 -0
- package/src/components/Icons/Sources/Opacity.tsx +106 -0
- package/src/components/Icons/Sources/OrientationSwitch.tsx +41 -0
- package/src/components/Icons/Sources/OrientationSwitchA.tsx +41 -0
- package/src/components/Icons/Sources/OrientationSwitchC.tsx +41 -0
- package/src/components/Icons/Sources/OrientationSwitchR.tsx +41 -0
- package/src/components/Icons/Sources/OrientationSwitchS.tsx +41 -0
- package/src/components/Icons/Sources/PanelRight.tsx +29 -0
- package/src/components/Icons/Sources/Patient.tsx +58 -0
- package/src/components/Icons/Sources/PatientStudyList.tsx +62 -0
- package/src/components/Icons/Sources/Pause.tsx +26 -0
- package/src/components/Icons/Sources/Pencil.tsx +16 -0
- package/src/components/Icons/Sources/Pin.tsx +50 -0
- package/src/components/Icons/Sources/PinFill.tsx +51 -0
- package/src/components/Icons/Sources/Play.tsx +25 -0
- package/src/components/Icons/Sources/Plus.tsx +29 -0
- package/src/components/Icons/Sources/PowerOff.tsx +19 -0
- package/src/components/Icons/Sources/Redo.tsx +51 -0
- package/src/components/Icons/Sources/Refresh.tsx +42 -0
- package/src/components/Icons/Sources/Rename.tsx +50 -0
- package/src/components/Icons/Sources/Search.tsx +35 -0
- package/src/components/Icons/Sources/SegActions.tsx +594 -0
- package/src/components/Icons/Sources/Series.tsx +47 -0
- package/src/components/Icons/Sources/SeriesPlaceholder.tsx +40 -0
- package/src/components/Icons/Sources/Settings.tsx +105 -0
- package/src/components/Icons/Sources/SettingsStudyList.tsx +28 -0
- package/src/components/Icons/Sources/Show.tsx +67 -0
- package/src/components/Icons/Sources/SidePanelCloseLeft.tsx +75 -0
- package/src/components/Icons/Sources/SidePanelCloseRight.tsx +74 -0
- package/src/components/Icons/Sources/SocialGithub.tsx +39 -0
- package/src/components/Icons/Sources/Sorting.tsx +39 -0
- package/src/components/Icons/Sources/SortingAscending.tsx +28 -0
- package/src/components/Icons/Sources/SortingDescending.tsx +26 -0
- package/src/components/Icons/Sources/SortingNew.tsx +20 -0
- package/src/components/Icons/Sources/SortingNewAscending.tsx +35 -0
- package/src/components/Icons/Sources/SortingNewDescending.tsx +35 -0
- package/src/components/Icons/Sources/StatusAlert.tsx +36 -0
- package/src/components/Icons/Sources/StatusError.tsx +57 -0
- package/src/components/Icons/Sources/StatusLocked.tsx +35 -0
- package/src/components/Icons/Sources/StatusSuccess.tsx +45 -0
- package/src/components/Icons/Sources/StatusTracking.tsx +37 -0
- package/src/components/Icons/Sources/StatusUntracked.tsx +30 -0
- package/src/components/Icons/Sources/StatusWarning.tsx +58 -0
- package/src/components/Icons/Sources/Tab4D.tsx +54 -0
- package/src/components/Icons/Sources/TabContours.tsx +63 -0
- package/src/components/Icons/Sources/TabLinear.tsx +47 -0
- package/src/components/Icons/Sources/TabPatientInfo.tsx +33 -0
- package/src/components/Icons/Sources/TabRoiThreshold.tsx +38 -0
- package/src/components/Icons/Sources/TabSegmentation.tsx +38 -0
- package/src/components/Icons/Sources/TabStudies.tsx +62 -0
- package/src/components/Icons/Sources/Threshold.tsx +38 -0
- package/src/components/Icons/Sources/ThumbnailView.tsx +67 -0
- package/src/components/Icons/Sources/Tools.tsx +3659 -0
- package/src/components/Icons/Sources/Trash.tsx +17 -0
- package/src/components/Icons/Sources/Undo.tsx +51 -0
- package/src/components/Icons/Sources/Upload.tsx +29 -0
- package/src/components/Icons/Sources/ViewportViews.tsx +45 -0
- package/src/components/Icons/Sources/ViewportWindowLevel.tsx +58 -0
- package/src/components/Icons/Sources/WindowLevelAdvanced.tsx +30 -0
- package/src/components/Icons/index.ts +4 -0
- package/src/components/Icons/types.ts +3 -0
- package/src/components/Input/Input.tsx +25 -0
- package/src/components/Input/index.tsx +3 -0
- package/src/components/InputFilter/InputFilter.tsx +200 -0
- package/src/components/InputFilter/index.ts +2 -0
- package/src/components/InputMultiSelect/InputMultiSelect.tsx +370 -0
- package/src/components/InputMultiSelect/index.ts +1 -0
- package/src/components/InputNumber/InputNumber.tsx +439 -0
- package/src/components/InputNumber/index.ts +3 -0
- package/src/components/InvestigationalUseDialog/InvestigationalUseDialog.tsx +98 -0
- package/src/components/InvestigationalUseDialog/index.ts +3 -0
- package/src/components/Label/Label.tsx +24 -0
- package/src/components/Label/index.tsx +3 -0
- package/src/components/Labelling/LabellingFlow.tsx +92 -0
- package/src/components/Labelling/index.ts +2 -0
- package/src/components/LayoutSelector/LayoutSelector.tsx +345 -0
- package/src/components/LayoutSelector/index.ts +4 -0
- package/src/components/LineChart/LineChart.css +40 -0
- package/src/components/LineChart/LineChart.tsx +101 -0
- package/src/components/LineChart/d3LineChart/chart.ts +365 -0
- package/src/components/LineChart/d3LineChart/events.ts +149 -0
- package/src/components/LineChart/d3LineChart/index.ts +3 -0
- package/src/components/LineChart/d3LineChart/lineChart.ts +272 -0
- package/src/components/LineChart/index.ts +1 -0
- package/src/components/LoadingIndicatorProgress/LoadingIndicatorProgress.tsx +29 -0
- package/src/components/LoadingIndicatorProgress/index.ts +2 -0
- package/src/components/LoadingIndicatorTotalPercent/LoadingIndicatorTotalPercent.tsx +49 -0
- package/src/components/LoadingIndicatorTotalPercent/index.ts +2 -0
- package/src/components/MeasurementTable/MeasurementTable.tsx +144 -0
- package/src/components/MeasurementTable/index.js +3 -0
- package/src/components/Modal/Modal.tsx +44 -0
- package/src/components/NavBar/NavBar.tsx +32 -0
- package/src/components/NavBar/index.js +2 -0
- package/src/components/Numeric/Numeric.test.ts +124 -0
- package/src/components/Numeric/Numeric.tsx +576 -0
- package/src/components/Numeric/index.ts +3 -0
- package/src/components/OHIFDialogs/InputDialog.tsx +287 -0
- package/src/components/OHIFDialogs/PresetDialog.tsx +106 -0
- package/src/components/OHIFDialogs/index.ts +2 -0
- package/src/components/OHIFModals/AboutModal.tsx +114 -0
- package/src/components/OHIFModals/AppearanceModal.tsx +38 -0
- package/src/components/OHIFModals/ImageModal.tsx +251 -0
- package/src/components/OHIFModals/UserPreferencesModal.tsx +229 -0
- package/src/components/OHIFModals/index.ts +4 -0
- package/src/components/OHIFPanels/WindowLevel.tsx +162 -0
- package/src/components/OHIFPanels/WindowLevelHistogram.tsx +237 -0
- package/src/components/OHIFPanels/index.ts +3 -0
- package/src/components/OHIFPanels/types.ts +41 -0
- package/src/components/OHIFToolSettings/RowDoubleRange.tsx +67 -0
- package/src/components/OHIFToolSettings/RowInputRange.tsx +65 -0
- package/src/components/OHIFToolSettings/RowSegmentedControl.tsx +77 -0
- package/src/components/OHIFToolSettings/ToolSettings.tsx +253 -0
- package/src/components/OHIFToolSettings/index.ts +1 -0
- package/src/components/OHIFToolbox/ToolboxUI.tsx +104 -0
- package/src/components/OHIFToolbox/index.ts +1 -0
- package/src/components/Onboarding/Onboarding.css +48 -0
- package/src/components/Onboarding/Onboarding.tsx +58 -0
- package/src/components/Onboarding/index.ts +3 -0
- package/src/components/Onboarding/utilities.ts +91 -0
- package/src/components/PanelSection/PanelSection.tsx +70 -0
- package/src/components/PanelSection/index.ts +2 -0
- package/src/components/Popover/Popover.tsx +35 -0
- package/src/components/Popover/index.ts +3 -0
- package/src/components/ProgressDropdown/ProgressDiscreteBar.tsx +24 -0
- package/src/components/ProgressDropdown/ProgressDropdown.tsx +158 -0
- package/src/components/ProgressDropdown/ProgressItem.tsx +27 -0
- package/src/components/ProgressDropdown/ProgressItemDetail.tsx +89 -0
- package/src/components/ProgressDropdown/index.ts +1 -0
- package/src/components/ProgressDropdown/types.ts +9 -0
- package/src/components/ProgressLoadingBar/ProgressLoadingBar.css +26 -0
- package/src/components/ProgressLoadingBar/ProgressLoadingBar.tsx +32 -0
- package/src/components/ProgressLoadingBar/index.ts +2 -0
- package/src/components/Resizable/Resizable.tsx +43 -0
- package/src/components/Resizable/index.ts +3 -0
- package/src/components/ScrollArea/ScrollArea.tsx +127 -0
- package/src/components/ScrollArea/index.tsx +3 -0
- package/src/components/SegmentationTable/AddSegmentRow.tsx +78 -0
- package/src/components/SegmentationTable/AddSegmentationRow.tsx +56 -0
- package/src/components/SegmentationTable/SegmentStatistics.tsx +104 -0
- package/src/components/SegmentationTable/SegmentationCollapsed.tsx +211 -0
- package/src/components/SegmentationTable/SegmentationExpanded.tsx +173 -0
- package/src/components/SegmentationTable/SegmentationHeader.tsx +58 -0
- package/src/components/SegmentationTable/SegmentationLabel.tsx +27 -0
- package/src/components/SegmentationTable/SegmentationSegments.tsx +206 -0
- package/src/components/SegmentationTable/SegmentationTable.tsx +169 -0
- package/src/components/SegmentationTable/SegmentationTableConfig.tsx +194 -0
- package/src/components/SegmentationTable/contexts/SegmentStatisticsContext.tsx +45 -0
- package/src/components/SegmentationTable/contexts/SegmentationExpandedContext.tsx +45 -0
- package/src/components/SegmentationTable/contexts/SegmentationTableContext.tsx +148 -0
- package/src/components/SegmentationTable/contexts/index.ts +15 -0
- package/src/components/SegmentationTable/index.ts +24 -0
- package/src/components/Select/Select.tsx +167 -0
- package/src/components/Select/index.tsx +40 -0
- package/src/components/Separator/Separator.tsx +32 -0
- package/src/components/Separator/index.ts +3 -0
- package/src/components/Separator/index.tsx +3 -0
- package/src/components/SidePanel/SidePanel.tsx +479 -0
- package/src/components/SidePanel/index.ts +2 -0
- package/src/components/Slider/Slider.tsx +24 -0
- package/src/components/Slider/index.tsx +3 -0
- package/src/components/SmartScrollbar/SmartScrollbar.tsx +349 -0
- package/src/components/SmartScrollbar/SmartScrollbarEndpoints.tsx +82 -0
- package/src/components/SmartScrollbar/SmartScrollbarFill.tsx +54 -0
- package/src/components/SmartScrollbar/SmartScrollbarIndicator.tsx +59 -0
- package/src/components/SmartScrollbar/SmartScrollbarTrack.tsx +104 -0
- package/src/components/SmartScrollbar/defaultSmartScrollbarIndicatorConfig.tsx +48 -0
- package/src/components/SmartScrollbar/index.ts +11 -0
- package/src/components/SmartScrollbar/useByteArray.ts +146 -0
- package/src/components/SmartScrollbar/utils.test.ts +124 -0
- package/src/components/SmartScrollbar/utils.ts +168 -0
- package/src/components/Sonner/Sonner.tsx +31 -0
- package/src/components/Sonner/index.ts +4 -0
- package/src/components/StudyBrowser/StudyBrowser.tsx +89 -0
- package/src/components/StudyBrowser/index.ts +2 -0
- package/src/components/StudyBrowserSort/StudyBrowserSort.tsx +87 -0
- package/src/components/StudyBrowserSort/index.ts +3 -0
- package/src/components/StudyBrowserViewOptions/StudyBrowserViewOptions.tsx +50 -0
- package/src/components/StudyBrowserViewOptions/index.ts +3 -0
- package/src/components/StudyItem/StudyItem.tsx +100 -0
- package/src/components/StudyItem/index.ts +2 -0
- package/src/components/StudyList/columns/defaultColumns.tsx +258 -0
- package/src/components/StudyList/components/ActionCell.tsx +19 -0
- package/src/components/StudyList/components/Layout.tsx +206 -0
- package/src/components/StudyList/components/PreviewContainer.tsx +45 -0
- package/src/components/StudyList/components/PreviewContent.tsx +186 -0
- package/src/components/StudyList/components/PreviewHeader.tsx +5 -0
- package/src/components/StudyList/components/PreviewPatientSummary.tsx +224 -0
- package/src/components/StudyList/components/PreviewSeriesList.tsx +64 -0
- package/src/components/StudyList/components/PreviewToggleButton.tsx +69 -0
- package/src/components/StudyList/components/SettingsPopover.tsx +214 -0
- package/src/components/StudyList/components/Table.tsx +247 -0
- package/src/components/StudyList/components/WorkflowMenu.tsx +72 -0
- package/src/components/StudyList/components/WorkflowsProvider.tsx +169 -0
- package/src/components/StudyList/hooks/useDefaultWorkflow.ts +60 -0
- package/src/components/StudyList/index.ts +52 -0
- package/src/components/StudyList/types/types.ts +42 -0
- package/src/components/StudyList/utils/tokenizeModalities.ts +6 -0
- package/src/components/StudySummary/StudySummary.tsx +27 -0
- package/src/components/StudySummary/index.tsx +3 -0
- package/src/components/Switch/Switch.tsx +28 -0
- package/src/components/Switch/index.tsx +3 -0
- package/src/components/Table/Table.tsx +134 -0
- package/src/components/Table/index.ts +11 -0
- package/src/components/Tabs/Tabs.tsx +56 -0
- package/src/components/Tabs/index.ts +3 -0
- package/src/components/Tabs/index.tsx +3 -0
- package/src/components/ThemeWrapper/ThemeWrapper.tsx +5 -0
- package/src/components/ThemeWrapper/index.ts +1 -0
- package/src/components/Thumbnail/Thumbnail.test.ts +71 -0
- package/src/components/Thumbnail/Thumbnail.tsx +351 -0
- package/src/components/Thumbnail/index.ts +2 -0
- package/src/components/ThumbnailList/ThumbnailList.tsx +94 -0
- package/src/components/ThumbnailList/index.ts +2 -0
- package/src/components/Toggle/Toggle.tsx +45 -0
- package/src/components/Toggle/index.ts +3 -0
- package/src/components/Toggle/index.tsx +3 -0
- package/src/components/ToggleGroup/ToggleGroup.tsx +63 -0
- package/src/components/ToggleGroup/index.ts +3 -0
- package/src/components/ToolButton/ToolButton.tsx +134 -0
- package/src/components/ToolButton/ToolButtonList.tsx +243 -0
- package/src/components/ToolButton/index.ts +8 -0
- package/src/components/Tooltip/Tooltip.tsx +34 -0
- package/src/components/Tooltip/index.ts +3 -0
- package/src/components/Viewport/ImageScrollbar.module.css +89 -0
- package/src/components/Viewport/ImageScrollbar.tsx +71 -0
- package/src/components/Viewport/PatientInfo.tsx +126 -0
- package/src/components/Viewport/ViewportActionArrows.tsx +36 -0
- package/src/components/Viewport/ViewportActionBar.tsx +107 -0
- package/src/components/Viewport/ViewportActionButton.tsx +25 -0
- package/src/components/Viewport/ViewportActionCorners.tsx +171 -0
- package/src/components/Viewport/ViewportGrid.tsx +24 -0
- package/src/components/Viewport/ViewportOverlay.css +32 -0
- package/src/components/Viewport/ViewportOverlay.tsx +54 -0
- package/src/components/Viewport/ViewportPane.tsx +82 -0
- package/src/components/Viewport/index.ts +9 -0
- package/src/components/ViewportDialog/ViewportDialog.tsx +128 -0
- package/src/components/ViewportDialog/index.ts +2 -0
- package/src/components/index.ts +323 -0
- package/src/contextProviders/ActiveThemeProvider.tsx +204 -0
- package/src/contextProviders/CineProvider.tsx +98 -0
- package/src/contextProviders/DialogProvider.tsx +103 -0
- package/src/contextProviders/DragAndDropProvider.tsx +37 -0
- package/src/contextProviders/IconPresentationProvider.tsx +88 -0
- package/src/contextProviders/ImageViewerProvider.tsx +15 -0
- package/src/contextProviders/ManagedDialog.tsx +176 -0
- package/src/contextProviders/ModalProvider.tsx +102 -0
- package/src/contextProviders/NotificationProvider.tsx +246 -0
- package/src/contextProviders/UserAuthenticationProvider.tsx +118 -0
- package/src/contextProviders/ViewportDialogProvider.tsx +42 -0
- package/src/contextProviders/ViewportGridProvider.tsx +556 -0
- package/src/contextProviders/index.ts +26 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useDynamicMaxHeight.ts +105 -0
- package/src/hooks/useSessionStorage.test.js +103 -0
- package/src/hooks/useSessionStorage.tsx +71 -0
- package/src/index.ts +7 -0
- package/src/lib/utils.ts +6 -0
- package/src/tailwind.css +266 -0
- package/src/themes/arctic.json +31 -0
- package/src/themes/deep.json +31 -0
- package/src/themes/index.ts +16 -0
- package/src/themes/midnight.json +31 -0
- package/src/themes/orchid.json +31 -0
- package/src/themes/slate.json +31 -0
- package/src/themes/themes.css +206 -0
- package/src/themes/verdant.json +31 -0
- package/src/types/ActionCorners.ts +18 -0
- package/src/types/AppTypes.ts +24 -0
- package/src/types/ContextMenuItem.ts +9 -0
- package/src/types/Predicate.ts +1 -0
- package/src/types/ThumbnailType.ts +3 -0
- package/src/types/ViewportActionCornersTypes.ts +13 -0
- package/src/types/global.d.ts +4 -0
- package/src/types/index.ts +21 -0
- package/src/utils/formatDICOMDate.test.ts +61 -0
- package/src/utils/formatDICOMDate.ts +65 -0
- package/src/utils/formatDICOMTime.test.ts +62 -0
- package/src/utils/formatDICOMTime.ts +49 -0
- package/src/utils/getToggledClassName.tsx +5 -0
- package/src/utils/index.ts +15 -0
- package/src/utils/parseStudyDateTimestamp.test.ts +47 -0
- package/src/utils/parseStudyDateTimestamp.ts +27 -0
- package/src/utils/roundNumber.ts +43 -0
- package/tailwind.config.js +120 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Thumbnail } from '../../Thumbnail';
|
|
3
|
+
import { TooltipProvider } from '../../Tooltip';
|
|
4
|
+
import {
|
|
5
|
+
PreviewThumbnailStatusState,
|
|
6
|
+
type PreviewThumbnailStatus,
|
|
7
|
+
type StudyRow,
|
|
8
|
+
} from '../types/types';
|
|
9
|
+
import { PreviewPatientSummary } from './PreviewPatientSummary';
|
|
10
|
+
import { PreviewSeriesList } from './PreviewSeriesList';
|
|
11
|
+
import { ToggleGroup, ToggleGroupItem } from '../../ToggleGroup';
|
|
12
|
+
import { Icons } from '../../Icons';
|
|
13
|
+
import { ScrollArea } from '../../ScrollArea';
|
|
14
|
+
|
|
15
|
+
type PreviewSeriesViewMode = 'thumbnails' | 'list';
|
|
16
|
+
type PreviewSeriesView = 'all' | PreviewSeriesViewMode;
|
|
17
|
+
|
|
18
|
+
function PreviewContent({
|
|
19
|
+
study,
|
|
20
|
+
series = [],
|
|
21
|
+
seriesView = 'all',
|
|
22
|
+
onThumbnailImageError,
|
|
23
|
+
}: {
|
|
24
|
+
study?: StudyRow | null;
|
|
25
|
+
series?: Array<{
|
|
26
|
+
seriesInstanceUid?: string;
|
|
27
|
+
SeriesInstanceUID?: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
SeriesDescription?: string;
|
|
30
|
+
seriesNumber?: number;
|
|
31
|
+
SeriesNumber?: number;
|
|
32
|
+
numInstances?: number;
|
|
33
|
+
numSeriesInstances?: number;
|
|
34
|
+
modality?: string;
|
|
35
|
+
Modality?: string;
|
|
36
|
+
thumbnailStatus?: PreviewThumbnailStatus;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* Controls which series views are available in the preview.
|
|
40
|
+
* - `'all'` (default): toggle visible; initially shows the thumbnails.
|
|
41
|
+
* - `'thumbnails'`: toggle hidden; locked to thumbnails view.
|
|
42
|
+
* - `'list'`: toggle hidden; locked to list view.
|
|
43
|
+
*/
|
|
44
|
+
seriesView?: PreviewSeriesView;
|
|
45
|
+
/**
|
|
46
|
+
* Called when the thumbnail src URL fails to decode in the browser (broken image).
|
|
47
|
+
*/
|
|
48
|
+
onThumbnailImageError?: (seriesInstanceUid: string) => void;
|
|
49
|
+
}) {
|
|
50
|
+
const isToggleVisible = seriesView === 'all';
|
|
51
|
+
const [seriesViewMode, setSeriesViewMode] = React.useState<PreviewSeriesViewMode>('thumbnails');
|
|
52
|
+
const effectiveSeriesViewMode: PreviewSeriesViewMode = isToggleVisible
|
|
53
|
+
? seriesViewMode
|
|
54
|
+
: seriesView;
|
|
55
|
+
const imagingSeries = series.filter(
|
|
56
|
+
s => s.thumbnailStatus?.status !== PreviewThumbnailStatusState.NotApplicable
|
|
57
|
+
);
|
|
58
|
+
const nonImagingSeries = series.filter(
|
|
59
|
+
s => s.thumbnailStatus?.status === PreviewThumbnailStatusState.NotApplicable
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
// Handle empty state when no study is provided
|
|
63
|
+
if (!study) {
|
|
64
|
+
return (
|
|
65
|
+
<PreviewPatientSummary>
|
|
66
|
+
<PreviewPatientSummary.Patient />
|
|
67
|
+
<PreviewPatientSummary.Workflows />
|
|
68
|
+
</PreviewPatientSummary>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<TooltipProvider delayDuration={200}>
|
|
74
|
+
<div className="flex h-full min-h-0 w-full flex-col gap-3">
|
|
75
|
+
<PreviewPatientSummary data={study}>
|
|
76
|
+
<PreviewPatientSummary.Patient />
|
|
77
|
+
<PreviewPatientSummary.Workflows />
|
|
78
|
+
</PreviewPatientSummary>
|
|
79
|
+
<div className="text-muted-foreground flex h-5 w-full items-center justify-between gap-1 px-2 text-base">
|
|
80
|
+
<span className="leading-tight">
|
|
81
|
+
{series?.length ? study?.description || 'No Description' : 'No Series'}
|
|
82
|
+
</span>
|
|
83
|
+
{isToggleVisible && (
|
|
84
|
+
<ToggleGroup
|
|
85
|
+
type="single"
|
|
86
|
+
value={seriesViewMode}
|
|
87
|
+
onValueChange={value => value && setSeriesViewMode(value as 'thumbnails' | 'list')}
|
|
88
|
+
>
|
|
89
|
+
<ToggleGroupItem
|
|
90
|
+
value="thumbnails"
|
|
91
|
+
aria-label="Thumbnail view"
|
|
92
|
+
className="text-primary"
|
|
93
|
+
>
|
|
94
|
+
<Icons.ThumbnailView />
|
|
95
|
+
</ToggleGroupItem>
|
|
96
|
+
<ToggleGroupItem
|
|
97
|
+
value="list"
|
|
98
|
+
aria-label="List view"
|
|
99
|
+
className="text-primary"
|
|
100
|
+
>
|
|
101
|
+
<Icons.ListView />
|
|
102
|
+
</ToggleGroupItem>
|
|
103
|
+
</ToggleGroup>
|
|
104
|
+
)}
|
|
105
|
+
</div>
|
|
106
|
+
<ScrollArea className="h-full min-h-0 w-full flex-1">
|
|
107
|
+
{effectiveSeriesViewMode === 'thumbnails' ? (
|
|
108
|
+
<div className="flex flex-col">
|
|
109
|
+
{imagingSeries.length > 0 && (
|
|
110
|
+
<div className="grid grid-cols-[repeat(auto-fit,_minmax(0,135px))] place-items-start gap-[4px] pr-2">
|
|
111
|
+
{imagingSeries.map((seriesItem, index) => {
|
|
112
|
+
const seriesUID =
|
|
113
|
+
seriesItem.seriesInstanceUid || seriesItem.SeriesInstanceUID || String(index);
|
|
114
|
+
const thumbnailState = seriesItem.thumbnailStatus;
|
|
115
|
+
const imageSrc =
|
|
116
|
+
thumbnailState?.status === PreviewThumbnailStatusState.Ready
|
|
117
|
+
? thumbnailState.src
|
|
118
|
+
: undefined;
|
|
119
|
+
return (
|
|
120
|
+
<Thumbnail
|
|
121
|
+
key={`series-imaging-${seriesUID}`}
|
|
122
|
+
displaySetInstanceUID={`series-${seriesUID}`}
|
|
123
|
+
imageSrc={imageSrc as any}
|
|
124
|
+
onImageLoadError={() => onThumbnailImageError?.(seriesUID)}
|
|
125
|
+
imageAltText={seriesItem.description || seriesItem.SeriesDescription || ''}
|
|
126
|
+
description={
|
|
127
|
+
seriesItem.description || seriesItem.SeriesDescription || '(empty)'
|
|
128
|
+
}
|
|
129
|
+
seriesNumber={seriesItem.seriesNumber ?? seriesItem.SeriesNumber ?? ''}
|
|
130
|
+
numInstances={seriesItem.numSeriesInstances ?? seriesItem.numInstances ?? 0}
|
|
131
|
+
modality={seriesItem.modality || seriesItem.Modality || ''}
|
|
132
|
+
isActive={false}
|
|
133
|
+
onClick={() => {}}
|
|
134
|
+
onDoubleClick={() => {}}
|
|
135
|
+
isDraggable={false}
|
|
136
|
+
viewPreset="thumbnails"
|
|
137
|
+
thumbnailType="thumbnail"
|
|
138
|
+
>
|
|
139
|
+
{thumbnailState?.status === PreviewThumbnailStatusState.NotAvailable && (
|
|
140
|
+
<div className="bg-muted/50 flex h-full w-full items-center justify-center rounded">
|
|
141
|
+
<Icons.SeriesPlaceholder className="text-muted-foreground h-[40px] w-[60px] opacity-50" />
|
|
142
|
+
</div>
|
|
143
|
+
)}
|
|
144
|
+
</Thumbnail>
|
|
145
|
+
);
|
|
146
|
+
})}
|
|
147
|
+
</div>
|
|
148
|
+
)}
|
|
149
|
+
{nonImagingSeries.length > 0 && (
|
|
150
|
+
<div className="mt-1 grid grid-cols-[repeat(auto-fit,_minmax(0,275px))] place-items-start gap-[2px] pr-2">
|
|
151
|
+
{nonImagingSeries.map((seriesItem, index) => {
|
|
152
|
+
const seriesUID =
|
|
153
|
+
seriesItem.seriesInstanceUid || seriesItem.SeriesInstanceUID || String(index);
|
|
154
|
+
return (
|
|
155
|
+
<Thumbnail
|
|
156
|
+
key={`series-non-imaging-${seriesUID}`}
|
|
157
|
+
displaySetInstanceUID={`series-${seriesUID}`}
|
|
158
|
+
imageAltText={seriesItem.description || seriesItem.SeriesDescription || ''}
|
|
159
|
+
description={
|
|
160
|
+
seriesItem.description || seriesItem.SeriesDescription || '(empty)'
|
|
161
|
+
}
|
|
162
|
+
seriesNumber={seriesItem.seriesNumber ?? seriesItem.SeriesNumber ?? ''}
|
|
163
|
+
numInstances={seriesItem.numSeriesInstances ?? seriesItem.numInstances ?? 0}
|
|
164
|
+
modality={seriesItem.modality || seriesItem.Modality || ''}
|
|
165
|
+
isActive={false}
|
|
166
|
+
onClick={() => {}}
|
|
167
|
+
onDoubleClick={() => {}}
|
|
168
|
+
isDraggable={false}
|
|
169
|
+
viewPreset="list"
|
|
170
|
+
thumbnailType="thumbnailNoImage"
|
|
171
|
+
/>
|
|
172
|
+
);
|
|
173
|
+
})}
|
|
174
|
+
</div>
|
|
175
|
+
)}
|
|
176
|
+
</div>
|
|
177
|
+
) : (
|
|
178
|
+
<PreviewSeriesList series={series} />
|
|
179
|
+
)}
|
|
180
|
+
</ScrollArea>
|
|
181
|
+
</div>
|
|
182
|
+
</TooltipProvider>
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export { PreviewContent };
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PreviewPatientSummary — compound component for patient header + workflow actions
|
|
3
|
+
*
|
|
4
|
+
* What it is
|
|
5
|
+
* - A compact summary API composed under a root provider: Patient and Workflows.
|
|
6
|
+
* - Subcomponents read the current study row from context.
|
|
7
|
+
*
|
|
8
|
+
* Minimal usage
|
|
9
|
+
* <PreviewPatientSummary data={row}>
|
|
10
|
+
* <PreviewPatientSummary.Patient />
|
|
11
|
+
* <PreviewPatientSummary.Workflows />
|
|
12
|
+
* </PreviewPatientSummary>
|
|
13
|
+
*
|
|
14
|
+
* Default workflow behavior
|
|
15
|
+
* - Workflows uses WorkflowsProvider context for available workflows and the default selection.
|
|
16
|
+
* - Shows the default workflow as a badge (with a clear-X) and the remaining applicable
|
|
17
|
+
* workflows as buttons below.
|
|
18
|
+
*
|
|
19
|
+
* Helpful references
|
|
20
|
+
* - platform/ui-next/src/components/StudyList/components/PreviewContent.tsx (in-context example, including empty state handling)
|
|
21
|
+
*/
|
|
22
|
+
import * as React from 'react';
|
|
23
|
+
import { Cross2Icon } from '@radix-ui/react-icons';
|
|
24
|
+
import { cn } from '../../../lib/utils';
|
|
25
|
+
import { Icons } from '../../Icons/Icons';
|
|
26
|
+
import { Button } from '../../Button';
|
|
27
|
+
import type { StudyRow } from '../types/types';
|
|
28
|
+
import { useWorkflows } from './WorkflowsProvider';
|
|
29
|
+
|
|
30
|
+
type SummaryContextValue = {
|
|
31
|
+
data: StudyRow | null;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const SummaryContext = React.createContext<SummaryContextValue | null>(null);
|
|
35
|
+
|
|
36
|
+
function useSummaryContext(): SummaryContextValue {
|
|
37
|
+
const context = React.useContext(SummaryContext);
|
|
38
|
+
if (!context) {
|
|
39
|
+
throw new Error(
|
|
40
|
+
'PreviewPatientSummary.* components must be used within <PreviewPatientSummary>'
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
return context;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
type RootProps = {
|
|
47
|
+
data?: StudyRow | null;
|
|
48
|
+
className?: string;
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
function Root({ data: dataProp, className, children }: RootProps) {
|
|
53
|
+
const data = dataProp ?? null;
|
|
54
|
+
const value: SummaryContextValue = { data };
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<SummaryContext.Provider value={value}>
|
|
58
|
+
<div className={cn('flex w-full flex-col gap-1', className)}>{children}</div>
|
|
59
|
+
</SummaryContext.Provider>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function Patient({ className }: { className?: string } = {}) {
|
|
64
|
+
const { data } = useSummaryContext();
|
|
65
|
+
const patientName = data?.patientName;
|
|
66
|
+
const mrn = data?.mrn;
|
|
67
|
+
|
|
68
|
+
const nameContent = patientName ?? 'Select a study';
|
|
69
|
+
const nameTitle =
|
|
70
|
+
typeof patientName === 'string' || typeof patientName === 'number'
|
|
71
|
+
? String(patientName)
|
|
72
|
+
: undefined;
|
|
73
|
+
|
|
74
|
+
const showMrn = mrn !== null && mrn !== undefined && mrn !== '';
|
|
75
|
+
const mrnTitle =
|
|
76
|
+
typeof mrn === 'string' || typeof mrn === 'number' ? String(mrn) : undefined;
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<div className={cn('bg-muted flex items-center gap-3 rounded-lg px-4 py-3', className)}>
|
|
80
|
+
<div
|
|
81
|
+
className="text-primary shrink-0"
|
|
82
|
+
aria-hidden
|
|
83
|
+
style={{ width: 33, height: 33 }}
|
|
84
|
+
>
|
|
85
|
+
<Icons.PatientStudyList />
|
|
86
|
+
</div>
|
|
87
|
+
<div className="flex h-[38px] min-w-0 flex-col justify-center gap-px">
|
|
88
|
+
<span
|
|
89
|
+
className="text-foreground truncate text-lg font-medium leading-tight"
|
|
90
|
+
title={nameTitle}
|
|
91
|
+
>
|
|
92
|
+
{nameContent}
|
|
93
|
+
</span>
|
|
94
|
+
{showMrn && (
|
|
95
|
+
<span
|
|
96
|
+
className="text-muted-foreground truncate text-lg leading-tight"
|
|
97
|
+
title={mrnTitle}
|
|
98
|
+
>
|
|
99
|
+
{mrn}
|
|
100
|
+
</span>
|
|
101
|
+
)}
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Workflows panel.
|
|
109
|
+
*
|
|
110
|
+
* - Must be used inside `<PreviewPatientSummary>` to read the current study from context.
|
|
111
|
+
* - Must be used inside `<WorkflowsProvider>` to access workflow context.
|
|
112
|
+
* - Shows the default workflow badge (with a clear-X) when one is set, and renders the
|
|
113
|
+
* remaining applicable workflows as buttons below.
|
|
114
|
+
*/
|
|
115
|
+
function Workflows({ className }: { className?: string } = {}) {
|
|
116
|
+
const { data: studyRow } = useSummaryContext();
|
|
117
|
+
const { workflows, getWorkflowsForStudy, getDefaultWorkflowForStudy, setDefaultWorkflowId } =
|
|
118
|
+
useWorkflows();
|
|
119
|
+
|
|
120
|
+
const availableWorkflows = studyRow ? getWorkflowsForStudy(studyRow) : workflows;
|
|
121
|
+
|
|
122
|
+
const defaultWorkflow = studyRow
|
|
123
|
+
? getDefaultWorkflowForStudy(studyRow)
|
|
124
|
+
: workflows.find(w => w.isDefault);
|
|
125
|
+
|
|
126
|
+
const otherWorkflows = !defaultWorkflow
|
|
127
|
+
? availableWorkflows
|
|
128
|
+
: availableWorkflows.filter(w => w.displayName !== defaultWorkflow.displayName);
|
|
129
|
+
|
|
130
|
+
const handleLaunch = (displayName: string) => {
|
|
131
|
+
if (!studyRow) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const wf = availableWorkflows.find(w => w.displayName === displayName);
|
|
135
|
+
wf?.launchWithStudy(studyRow);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const handleClearDefault = () => {
|
|
139
|
+
setDefaultWorkflowId();
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
return (
|
|
143
|
+
<div
|
|
144
|
+
className={cn(
|
|
145
|
+
'border-border/50 bg-muted w-full rounded-lg px-4 py-3 text-left transition',
|
|
146
|
+
className
|
|
147
|
+
)}
|
|
148
|
+
>
|
|
149
|
+
<div className="flex w-full items-center justify-between">
|
|
150
|
+
<span className="text-foreground text-base font-medium leading-tight">Launch workflow</span>
|
|
151
|
+
<span
|
|
152
|
+
className="text-primary shrink-0 -translate-y-0.5"
|
|
153
|
+
aria-hidden
|
|
154
|
+
style={{ width: 18, height: 18 }}
|
|
155
|
+
>
|
|
156
|
+
<Icons.Info />
|
|
157
|
+
</span>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
{defaultWorkflow && (
|
|
161
|
+
<div
|
|
162
|
+
className="mt-2 flex flex-wrap items-center gap-0"
|
|
163
|
+
role="status"
|
|
164
|
+
aria-live="polite"
|
|
165
|
+
>
|
|
166
|
+
<Button
|
|
167
|
+
variant="ghost"
|
|
168
|
+
size="sm"
|
|
169
|
+
className="bg-primary/20 text-primary ring-primary ring-offset-background ml-1 mb-1 h-6 w-32 overflow-hidden ring-1 ring-offset-2"
|
|
170
|
+
onClick={() => handleLaunch(defaultWorkflow.displayName)}
|
|
171
|
+
title={defaultWorkflow.displayName}
|
|
172
|
+
>
|
|
173
|
+
<span className="truncate">{defaultWorkflow.displayName}</span>
|
|
174
|
+
</Button>
|
|
175
|
+
<Button
|
|
176
|
+
type="button"
|
|
177
|
+
variant="ghost"
|
|
178
|
+
size="icon"
|
|
179
|
+
aria-label="Clear default mode"
|
|
180
|
+
className="text-primary focus-visible:ring-ring focus-visible:ring-offset-background ml-1.5 mb-1 opacity-70 transition hover:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-2"
|
|
181
|
+
onClick={handleClearDefault}
|
|
182
|
+
>
|
|
183
|
+
<Cross2Icon
|
|
184
|
+
className="text-primary h-3.5 w-3.5"
|
|
185
|
+
aria-hidden
|
|
186
|
+
/>
|
|
187
|
+
<span className="sr-only">Clear default mode</span>
|
|
188
|
+
</Button>
|
|
189
|
+
</div>
|
|
190
|
+
)}
|
|
191
|
+
|
|
192
|
+
{defaultWorkflow && studyRow && otherWorkflows.length > 0 && (
|
|
193
|
+
<div className="text-muted-foreground mt-2 text-sm">Other Available Workflows</div>
|
|
194
|
+
)}
|
|
195
|
+
|
|
196
|
+
{studyRow && otherWorkflows.length > 0 && (
|
|
197
|
+
<div className="mt-2 flex flex-wrap items-center gap-0">
|
|
198
|
+
{otherWorkflows.map(wf => (
|
|
199
|
+
<Button
|
|
200
|
+
key={wf.displayName}
|
|
201
|
+
variant="ghost"
|
|
202
|
+
size="sm"
|
|
203
|
+
className="bg-primary/20 ml-1 mb-1 h-6 w-32 overflow-hidden"
|
|
204
|
+
onClick={() => handleLaunch(wf.displayName)}
|
|
205
|
+
title={wf.displayName}
|
|
206
|
+
>
|
|
207
|
+
<span className="truncate">{wf.displayName}</span>
|
|
208
|
+
</Button>
|
|
209
|
+
))}
|
|
210
|
+
</div>
|
|
211
|
+
)}
|
|
212
|
+
</div>
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
type PreviewPatientSummaryNamespace = typeof Root & {
|
|
217
|
+
Patient: typeof Patient;
|
|
218
|
+
Workflows: typeof Workflows;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
export const PreviewPatientSummary: PreviewPatientSummaryNamespace = Object.assign(Root, {
|
|
222
|
+
Patient,
|
|
223
|
+
Workflows,
|
|
224
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '../../Table';
|
|
3
|
+
import { Icons } from '../../Icons';
|
|
4
|
+
|
|
5
|
+
type Series = {
|
|
6
|
+
seriesInstanceUid?: string;
|
|
7
|
+
SeriesInstanceUID?: string;
|
|
8
|
+
modality?: string;
|
|
9
|
+
Modality?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
SeriesDescription?: string;
|
|
12
|
+
seriesNumber?: number | string;
|
|
13
|
+
SeriesNumber?: number | string;
|
|
14
|
+
numSeriesInstances?: number;
|
|
15
|
+
numInstances?: number;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type PreviewSeriesListProps = {
|
|
19
|
+
series: Series[];
|
|
20
|
+
onSeriesClick?: (series: Series) => void;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export function PreviewSeriesList({ series, onSeriesClick }: PreviewSeriesListProps) {
|
|
24
|
+
return (
|
|
25
|
+
<div className="w-full px-2">
|
|
26
|
+
<Table noScroll>
|
|
27
|
+
<TableHeader>
|
|
28
|
+
<TableRow className="hover:bg-transparent">
|
|
29
|
+
<TableHead className="pl-0 text-base font-normal">
|
|
30
|
+
<span className="text-foreground">Modality</span>
|
|
31
|
+
<span className="text-muted-foreground"> / Series</span>
|
|
32
|
+
</TableHead>
|
|
33
|
+
<TableHead className="text-foreground w-8 pr-0 text-right text-base font-normal">
|
|
34
|
+
<Icons.Series className="ml-auto h-4 w-4" />
|
|
35
|
+
</TableHead>
|
|
36
|
+
</TableRow>
|
|
37
|
+
</TableHeader>
|
|
38
|
+
<TableBody>
|
|
39
|
+
{series.map((s, idx) => {
|
|
40
|
+
const seriesUID = s.seriesInstanceUid || s.SeriesInstanceUID || String(idx);
|
|
41
|
+
const modality = String(s.modality || s.Modality || '').toUpperCase();
|
|
42
|
+
const description = s.description || s.SeriesDescription || '';
|
|
43
|
+
const numInstances = s.numSeriesInstances ?? s.numInstances ?? 0;
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<TableRow
|
|
47
|
+
key={seriesUID}
|
|
48
|
+
className="hover:text-muted-foreground cursor-default hover:bg-transparent"
|
|
49
|
+
>
|
|
50
|
+
<TableCell className="pl-0 text-base">
|
|
51
|
+
<div className="flex items-center gap-2">
|
|
52
|
+
<span className="text-foreground font-normal">{modality}</span>
|
|
53
|
+
<span className="font-normal">{description}</span>
|
|
54
|
+
</div>
|
|
55
|
+
</TableCell>
|
|
56
|
+
<TableCell className="w-8 pr-0 text-right text-base">{numInstances}</TableCell>
|
|
57
|
+
</TableRow>
|
|
58
|
+
);
|
|
59
|
+
})}
|
|
60
|
+
</TableBody>
|
|
61
|
+
</Table>
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button } from '../../Button';
|
|
3
|
+
import { Icons } from '../../Icons';
|
|
4
|
+
import { useLayout } from './Layout';
|
|
5
|
+
|
|
6
|
+
type PreviewToggleButtonProps = React.HTMLAttributes<HTMLButtonElement> & {
|
|
7
|
+
'aria-label'?: string;
|
|
8
|
+
shouldShow: boolean;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
defaultAriaLabel: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
function PreviewToggleButton({
|
|
14
|
+
className,
|
|
15
|
+
'aria-label': ariaLabel,
|
|
16
|
+
shouldShow,
|
|
17
|
+
onClick,
|
|
18
|
+
defaultAriaLabel,
|
|
19
|
+
}: PreviewToggleButtonProps) {
|
|
20
|
+
if (!shouldShow) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return (
|
|
24
|
+
<Button
|
|
25
|
+
variant="ghost"
|
|
26
|
+
size="icon"
|
|
27
|
+
aria-label={ariaLabel ?? defaultAriaLabel}
|
|
28
|
+
onClick={onClick}
|
|
29
|
+
className={className}
|
|
30
|
+
>
|
|
31
|
+
<Icons.PanelRight
|
|
32
|
+
aria-hidden="true"
|
|
33
|
+
className="text-primary h-4 w-4"
|
|
34
|
+
/>
|
|
35
|
+
</Button>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function OpenPreviewButton({
|
|
40
|
+
className,
|
|
41
|
+
'aria-label': ariaLabel = 'Open preview',
|
|
42
|
+
}: React.HTMLAttributes<HTMLButtonElement> & { 'aria-label'?: string }) {
|
|
43
|
+
const { isPreviewOpen, openPreview } = useLayout();
|
|
44
|
+
return (
|
|
45
|
+
<PreviewToggleButton
|
|
46
|
+
className={className}
|
|
47
|
+
aria-label={ariaLabel}
|
|
48
|
+
shouldShow={!isPreviewOpen}
|
|
49
|
+
onClick={openPreview}
|
|
50
|
+
defaultAriaLabel="Open preview"
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ClosePreviewButton({
|
|
56
|
+
className,
|
|
57
|
+
'aria-label': ariaLabel = 'Close preview',
|
|
58
|
+
}: React.HTMLAttributes<HTMLButtonElement> & { 'aria-label'?: string }) {
|
|
59
|
+
const { isPreviewOpen, closePreview } = useLayout();
|
|
60
|
+
return (
|
|
61
|
+
<PreviewToggleButton
|
|
62
|
+
className={className}
|
|
63
|
+
aria-label={ariaLabel}
|
|
64
|
+
shouldShow={isPreviewOpen}
|
|
65
|
+
onClick={closePreview}
|
|
66
|
+
defaultAriaLabel="Close preview"
|
|
67
|
+
/>
|
|
68
|
+
);
|
|
69
|
+
}
|