@ohif/ui-next 3.14.0-beta.11 → 3.14.0-beta.111
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.css +6 -6
- package/dist/ohif-ui-next.umd.js +4 -1838
- package/package.json +31 -14
- 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 +16 -0
- package/src/components/SegmentationTable/index.ts +27 -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 +330 -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,246 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
createContext,
|
|
3
|
+
useContext,
|
|
4
|
+
useCallback,
|
|
5
|
+
useEffect,
|
|
6
|
+
ReactNode,
|
|
7
|
+
useState,
|
|
8
|
+
useRef,
|
|
9
|
+
} from 'react';
|
|
10
|
+
import { Toaster, toast } from '../components';
|
|
11
|
+
|
|
12
|
+
const NotificationContext = createContext(null);
|
|
13
|
+
|
|
14
|
+
export const useNotification = () => useContext(NotificationContext);
|
|
15
|
+
|
|
16
|
+
// Notification deduplication cache
|
|
17
|
+
interface NotificationCacheEntry {
|
|
18
|
+
timestamp: number;
|
|
19
|
+
id: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface NotificationProviderProps {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
service?: any;
|
|
25
|
+
deduplicationInterval?: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Constant: hoisted to module scope so it has a stable identity. Built inside the
|
|
29
|
+
// component it was a new object every render, which made it unusable as a
|
|
30
|
+
// dependency of the memoized show() below.
|
|
31
|
+
const DEFAULT_OPTIONS = {
|
|
32
|
+
title: '',
|
|
33
|
+
message: '',
|
|
34
|
+
duration: 5000,
|
|
35
|
+
position: 'bottom-right',
|
|
36
|
+
type: 'info',
|
|
37
|
+
visible: true,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const NotificationProvider = ({
|
|
41
|
+
children,
|
|
42
|
+
service,
|
|
43
|
+
deduplicationInterval = 10000, // Default to 10 seconds
|
|
44
|
+
}: NotificationProviderProps) => {
|
|
45
|
+
const [options, setOptions] = useState([]);
|
|
46
|
+
|
|
47
|
+
// Cache for recent notifications to prevent duplicates
|
|
48
|
+
// Structure: { [title_message_type]: { timestamp, id } }
|
|
49
|
+
const recentNotificationsRef = useRef<Record<string, NotificationCacheEntry>>({});
|
|
50
|
+
|
|
51
|
+
const CustomNotification = service?.getCustomComponent();
|
|
52
|
+
|
|
53
|
+
// Use the configurable deduplication interval from props
|
|
54
|
+
|
|
55
|
+
const show = useCallback(options => {
|
|
56
|
+
const newNotification = {
|
|
57
|
+
...DEFAULT_OPTIONS,
|
|
58
|
+
...options,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const {
|
|
62
|
+
title,
|
|
63
|
+
message,
|
|
64
|
+
duration,
|
|
65
|
+
position,
|
|
66
|
+
type,
|
|
67
|
+
promise,
|
|
68
|
+
allowDuplicates = false,
|
|
69
|
+
deduplicationInterval: optionsDeduplicationInterval,
|
|
70
|
+
action,
|
|
71
|
+
} = newNotification;
|
|
72
|
+
|
|
73
|
+
// Use the provider's deduplicationInterval by default, but allow it to be overridden per notification
|
|
74
|
+
const notificationDeduplicationInterval = optionsDeduplicationInterval || deduplicationInterval;
|
|
75
|
+
|
|
76
|
+
if (promise) {
|
|
77
|
+
return toast.promise(promise, {
|
|
78
|
+
loading: title || 'Loading...',
|
|
79
|
+
success: (data: unknown) => {
|
|
80
|
+
const description = typeof message === 'function' ? message(data) : message;
|
|
81
|
+
return {
|
|
82
|
+
title: title || 'Success',
|
|
83
|
+
description,
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
error: (err: unknown) => {
|
|
87
|
+
const description = typeof message === 'function' ? message(err) : message;
|
|
88
|
+
return {
|
|
89
|
+
title: title || 'Error',
|
|
90
|
+
description,
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Create a cache key from notification properties
|
|
97
|
+
const messageStr = typeof message === 'function' ? 'function' : message;
|
|
98
|
+
const cacheKey = `${title}_${messageStr}_${type}`;
|
|
99
|
+
|
|
100
|
+
// Handle deduplication
|
|
101
|
+
if (!allowDuplicates && type === 'error') {
|
|
102
|
+
const now = Date.now();
|
|
103
|
+
const cachedNotification = recentNotificationsRef.current[cacheKey];
|
|
104
|
+
|
|
105
|
+
// First check if we've shown this notification recently
|
|
106
|
+
if (cachedNotification) {
|
|
107
|
+
const timeSinceLastShown = now - cachedNotification.timestamp;
|
|
108
|
+
|
|
109
|
+
// If it's been shown recently and within the deduplication interval,
|
|
110
|
+
// don't show it again
|
|
111
|
+
if (timeSinceLastShown < notificationDeduplicationInterval) {
|
|
112
|
+
console.debug(
|
|
113
|
+
`Prevented duplicate notification: "${title}" (${timeSinceLastShown}ms < ${notificationDeduplicationInterval}ms)`
|
|
114
|
+
);
|
|
115
|
+
// Return the existing notification ID
|
|
116
|
+
return cachedNotification.id;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// If it's been shown before but outside the deduplication interval,
|
|
120
|
+
// dismiss the old notification first and allow showing a new one
|
|
121
|
+
console.debug(
|
|
122
|
+
`Showing notification again after interval: "${title}" (${timeSinceLastShown}ms >= ${notificationDeduplicationInterval}ms)`
|
|
123
|
+
);
|
|
124
|
+
toast.dismiss(cachedNotification.id);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Show the notification with action if provided
|
|
129
|
+
const toastOptions = {
|
|
130
|
+
duration,
|
|
131
|
+
position,
|
|
132
|
+
description: message,
|
|
133
|
+
id: options.id, // Use provided ID if available
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
// Add action button if provided
|
|
137
|
+
if (action && action.label && typeof action.onClick === 'function') {
|
|
138
|
+
toastOptions.action = {
|
|
139
|
+
label: action.label,
|
|
140
|
+
onClick: action.onClick,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const id = toast[type](title, toastOptions);
|
|
145
|
+
|
|
146
|
+
// Cache this notification for deduplication if it's an error
|
|
147
|
+
if (type === 'error') {
|
|
148
|
+
const timestamp = Date.now();
|
|
149
|
+
recentNotificationsRef.current[cacheKey] = {
|
|
150
|
+
timestamp,
|
|
151
|
+
id,
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
console.debug(
|
|
155
|
+
`Stored notification in cache: "${title}" (id: ${id}, timestamp: ${timestamp})`
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
// We no longer auto-delete the cache entry after duration
|
|
159
|
+
// Instead, we keep it to track when the notification was last shown
|
|
160
|
+
// The entry will be checked against the deduplication interval
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
setOptions(prev => [...prev, { ...newNotification, id: id }]);
|
|
164
|
+
|
|
165
|
+
return id;
|
|
166
|
+
}, [deduplicationInterval]);
|
|
167
|
+
|
|
168
|
+
const hide = useCallback(id => {
|
|
169
|
+
setOptions(state => [...state.filter(item => item.id !== id)]);
|
|
170
|
+
toast.dismiss(id);
|
|
171
|
+
|
|
172
|
+
// Remove from cache if present
|
|
173
|
+
const cacheEntries = Object.entries(recentNotificationsRef.current);
|
|
174
|
+
for (const [key, entry] of cacheEntries) {
|
|
175
|
+
if (entry.id === id) {
|
|
176
|
+
delete recentNotificationsRef.current[key];
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}, []);
|
|
181
|
+
|
|
182
|
+
const hideAll = useCallback(() => {
|
|
183
|
+
setOptions([]);
|
|
184
|
+
toast.dismiss();
|
|
185
|
+
// Clear notification cache
|
|
186
|
+
recentNotificationsRef.current = {};
|
|
187
|
+
}, []);
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Sets the implementation of a notification service that can be used by extensions.
|
|
191
|
+
*
|
|
192
|
+
* @returns void
|
|
193
|
+
*/
|
|
194
|
+
useEffect(() => {
|
|
195
|
+
if (service) {
|
|
196
|
+
service.setServiceImplementation({ hide, show });
|
|
197
|
+
}
|
|
198
|
+
}, [service, hide, show]);
|
|
199
|
+
|
|
200
|
+
// Debug function to get the current cache (for development use)
|
|
201
|
+
const getNotificationCache = useCallback(() => {
|
|
202
|
+
const cache = { ...recentNotificationsRef.current };
|
|
203
|
+
|
|
204
|
+
// Add human-readable timestamps and time since showing
|
|
205
|
+
const now = Date.now();
|
|
206
|
+
const enhancedCache = Object.entries(cache).reduce((result, [key, entry]) => {
|
|
207
|
+
const timeSince = now - entry.timestamp;
|
|
208
|
+
result[key] = {
|
|
209
|
+
...entry,
|
|
210
|
+
date: new Date(entry.timestamp).toISOString(),
|
|
211
|
+
timeSinceMs: timeSince,
|
|
212
|
+
timeSinceStr: `${Math.floor(timeSince / 1000)}s ago`,
|
|
213
|
+
};
|
|
214
|
+
return result;
|
|
215
|
+
}, {});
|
|
216
|
+
|
|
217
|
+
return enhancedCache;
|
|
218
|
+
}, []);
|
|
219
|
+
|
|
220
|
+
return (
|
|
221
|
+
<NotificationContext.Provider value={{ show, hide, hideAll, getNotificationCache }}>
|
|
222
|
+
{CustomNotification ? (
|
|
223
|
+
<CustomNotification options={options} />
|
|
224
|
+
) : (
|
|
225
|
+
<Toaster position="bottom-right" />
|
|
226
|
+
)}
|
|
227
|
+
{children}
|
|
228
|
+
</NotificationContext.Provider>
|
|
229
|
+
);
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
export const withNotification = Component => {
|
|
235
|
+
return function WrappedComponent(props) {
|
|
236
|
+
const notificationContext = useNotification();
|
|
237
|
+
return (
|
|
238
|
+
<Component
|
|
239
|
+
{...props}
|
|
240
|
+
notificationContext={notificationContext}
|
|
241
|
+
/>
|
|
242
|
+
);
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
export default NotificationProvider;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import React, { createContext, useContext, useEffect, useReducer } from 'react';
|
|
2
|
+
|
|
3
|
+
const DEFAULT_STATE = {
|
|
4
|
+
user: null,
|
|
5
|
+
enabled: false,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const UserAuthenticationContext = createContext(DEFAULT_STATE);
|
|
9
|
+
|
|
10
|
+
export function UserAuthenticationProvider({ children, service }) {
|
|
11
|
+
const userAuthenticationReducer = (state, action) => {
|
|
12
|
+
switch (action.type) {
|
|
13
|
+
case 'SET_USER': {
|
|
14
|
+
return {
|
|
15
|
+
...state,
|
|
16
|
+
...{ user: action.payload.user },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
case 'RESET': {
|
|
20
|
+
return {
|
|
21
|
+
user: null,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
case 'SET': {
|
|
26
|
+
return {
|
|
27
|
+
...state,
|
|
28
|
+
...action.payload,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
default:
|
|
33
|
+
return action.payload;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const [userAuthenticationState, dispatch] = useReducer(userAuthenticationReducer, DEFAULT_STATE);
|
|
38
|
+
|
|
39
|
+
const getState = () => userAuthenticationState;
|
|
40
|
+
|
|
41
|
+
const setUser = user =>
|
|
42
|
+
dispatch({
|
|
43
|
+
type: 'SET_USER',
|
|
44
|
+
payload: {
|
|
45
|
+
user,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const getUser = () => userAuthenticationState.user;
|
|
50
|
+
|
|
51
|
+
const reset = () =>
|
|
52
|
+
dispatch({
|
|
53
|
+
type: 'RESET',
|
|
54
|
+
payload: {},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const set = payload =>
|
|
58
|
+
dispatch({
|
|
59
|
+
type: 'SET',
|
|
60
|
+
payload,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Sets the implementation of the UserAuthenticationService that can be used by extensions.
|
|
65
|
+
*
|
|
66
|
+
* @returns void
|
|
67
|
+
*/
|
|
68
|
+
// TODO: should this be a useEffect or not?
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
if (service) {
|
|
71
|
+
service.setServiceImplementation({
|
|
72
|
+
getState,
|
|
73
|
+
setUser,
|
|
74
|
+
getUser,
|
|
75
|
+
reset,
|
|
76
|
+
set,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}, [getState, service, setUser, getUser, reset, set]);
|
|
80
|
+
|
|
81
|
+
// TODO: This may not be correct, but I think we need to set the implementation for the service
|
|
82
|
+
// immediately when this runs, since otherwise the authentication redirects will fail.
|
|
83
|
+
// (useEffect only runs after the child components - in this case, routing logic - has failed)
|
|
84
|
+
if (service) {
|
|
85
|
+
service.setServiceImplementation({
|
|
86
|
+
getState,
|
|
87
|
+
setUser,
|
|
88
|
+
getUser,
|
|
89
|
+
reset,
|
|
90
|
+
set,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const api = {
|
|
95
|
+
getState,
|
|
96
|
+
setUser,
|
|
97
|
+
getUser,
|
|
98
|
+
getAuthorizationHeader: service.getAuthorizationHeader,
|
|
99
|
+
handleUnauthenticated: service.handleUnauthenticated,
|
|
100
|
+
reset,
|
|
101
|
+
set,
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<UserAuthenticationContext.Provider value={[userAuthenticationState, api]}>
|
|
106
|
+
{children}
|
|
107
|
+
</UserAuthenticationContext.Provider>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export default UserAuthenticationProvider;
|
|
112
|
+
|
|
113
|
+
const UserAuthenticationConsumer = UserAuthenticationContext.Consumer;
|
|
114
|
+
export { UserAuthenticationConsumer };
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
export const useUserAuthentication = () => useContext(UserAuthenticationContext);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React, { useState, createContext, useContext, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
const DEFAULT_STATE = {
|
|
4
|
+
message: undefined,
|
|
5
|
+
type: 'info', // "error" | "warning" | "info" | "success"
|
|
6
|
+
actions: undefined, // array of { type, text, value }
|
|
7
|
+
onSubmit: () => {
|
|
8
|
+
console.log('btn value?');
|
|
9
|
+
},
|
|
10
|
+
onOutsideClick: () => {
|
|
11
|
+
console.warn('default: onOutsideClick');
|
|
12
|
+
},
|
|
13
|
+
onDismiss: () => {
|
|
14
|
+
console.log('dismiss? -1');
|
|
15
|
+
},
|
|
16
|
+
onKeyPress: () => {
|
|
17
|
+
console.log('key pressed?');
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const ViewportDialogContext = createContext(null);
|
|
22
|
+
const { Provider } = ViewportDialogContext;
|
|
23
|
+
|
|
24
|
+
export const useViewportDialog = () => useContext(ViewportDialogContext);
|
|
25
|
+
|
|
26
|
+
const ViewportDialogProvider = ({ children, service }) => {
|
|
27
|
+
const [viewportDialogState, setViewportDialogState] = useState(DEFAULT_STATE);
|
|
28
|
+
const show = params => setViewportDialogState({ ...viewportDialogState, ...params });
|
|
29
|
+
const hide = () => setViewportDialogState(DEFAULT_STATE);
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (service) {
|
|
33
|
+
service.setServiceImplementation({ hide, show });
|
|
34
|
+
}
|
|
35
|
+
}, [hide, service, show]);
|
|
36
|
+
|
|
37
|
+
return <Provider value={[viewportDialogState, { show, hide }]}>{children}</Provider>;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
export default ViewportDialogProvider;
|