@3cr/viewer-browser 0.0.247 → 0.0.292
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/.circleci/config.yml +53 -0
- package/README.md +79 -74
- package/components.d.ts +94 -36
- package/dist/Viewer3CR.js +663 -47
- package/dist/Viewer3CR.mjs +108285 -37154
- package/dist/Viewer3CR.umd.js +663 -47
- package/index.html +35 -33
- package/package.json +27 -8
- package/playground/img.png +0 -0
- package/playground/index.html +6 -2
- package/src/App.vue +41 -97
- package/src/__tests__/app.spec.ts +2 -1
- package/src/__tests__/main.spec.ts +14 -14
- package/src/assets/_palette.scss +112 -0
- package/src/assets/_settings.scss +64 -0
- package/src/assets/_typography.scss +187 -0
- package/src/assets/images/cloud-storage.svg +22 -0
- package/src/assets/images/courtney.png +0 -0
- package/src/assets/images/dark/magic-wand.svg +32 -0
- package/src/assets/images/dark-theme.svg +33 -0
- package/src/assets/images/dot.svg +5 -0
- package/src/assets/images/dr-miles.png +0 -0
- package/src/assets/images/illustration.svg +118 -0
- package/src/assets/images/intro.svg +30 -0
- package/src/assets/{magic_wand.svg → images/light/magic-wand.svg} +22 -14
- package/src/assets/images/light-theme.svg +33 -0
- package/src/assets/images/system-theme.svg +51 -0
- package/src/assets/images/totalSegmentator.png +0 -0
- package/src/assets/logos/3dicom/black/black.svg +30 -0
- package/src/assets/logos/3dicom/colour/colour.svg +18 -0
- package/src/assets/logos/3dicom/colour/colour_single.svg +18 -0
- package/src/assets/logos/3dicom/wordmark/patients/patients.svg +29 -0
- package/src/assets/logos/3dicom/wordmark/powered-by/powered-by.svg +41 -0
- package/src/assets/logos/3dicom/wordmark/practitioners/practitioner.svg +34 -0
- package/src/assets/logos/3dicom/wordmark/research/research.svg +29 -0
- package/src/assets/logos/license/black/black.svg +22 -0
- package/src/assets/logos/license/white/white.svg +22 -0
- package/src/assets/styles.scss +435 -12
- package/src/components/ShFlatIconBtn.vue +36 -0
- package/src/components/ShPlainIconBtn.vue +42 -0
- package/src/components/ShSelect.vue +48 -0
- package/src/components/ShTextField.vue +39 -0
- package/src/components/ShTextarea.vue +39 -0
- package/src/components/__tests__/ShFlatIconBtn.spec.ts +32 -0
- package/src/components/__tests__/ShPlainIconBtn.spec.ts +37 -0
- package/src/components/__tests__/ShSelect.spec.ts +30 -0
- package/src/components/__tests__/ShTextField.spec.ts +30 -0
- package/src/components/__tests__/ShTextarea.spec.ts +30 -0
- package/src/components/demo/CloudDropZone.vue +105 -0
- package/src/components/demo/DemoAvatarDropdownMenu.vue +343 -0
- package/src/components/demo/DemoInfoModal.vue +60 -0
- package/src/components/demo/DemoNotificationNavigationDrawer.vue +118 -0
- package/src/components/demo/DemoPurchaseCreditsModal.vue +141 -0
- package/src/components/demo/DemoUpgradeCloudStorageModal.vue +74 -0
- package/src/components/demo/DemoUpgradePlanModal.vue +17 -0
- package/src/components/demo/UploadDicomToCloudModal.vue +225 -0
- package/src/components/demo/__tests__/CloudDropZone.spec.ts +132 -0
- package/src/components/demo/__tests__/DemoAvatarDropdownMenu.spec.ts +16 -0
- package/src/components/demo/{licence/__tests__/DemoLicenceEnableCloudStorageModal.spec.ts → __tests__/DemoEnableCloudStorageModal.spec.ts} +11 -11
- package/src/components/demo/{licence/__tests__/DemoLicenceInfoModal.spec.ts → __tests__/DemoInfoModal.spec.ts} +11 -8
- package/src/components/demo/__tests__/DemoNotificationNavigationDrawer.spec.ts +56 -0
- package/src/components/demo/__tests__/UploadDicomToCloudModal.spec.ts +320 -0
- package/src/components/demo/__tests__/demo-payload.spec.ts +10 -0
- package/src/components/demo/demo-notifications.ts +45 -0
- package/src/components/demo/demo-payload.ts +9 -0
- package/src/components/demo/fileReader.ts +47 -0
- package/src/{composables/useViewerOptions.ts → components/demo/mockDemoViewerStlDecimator.ts} +8 -12
- package/src/components/intro/ViewerIntro.vue +56 -0
- package/src/components/intro/ViewerTour.vue +53 -0
- package/src/components/intro/tour/Tour.vue +205 -0
- package/src/components/intro/tour/step.ts +6 -0
- package/src/components/modal/ActionRail.vue +4 -0
- package/src/components/modal/Viewer3cr.vue +224 -0
- package/src/components/modal/Viewer3crWebGL.vue +65 -0
- package/src/components/modal/ViewerActionRail.vue +10 -27
- package/src/components/modal/ViewerMain.vue +83 -0
- package/src/components/modal/ViewerNavigationDrawer.vue +269 -68
- package/src/components/modal/ViewerScanView.vue +223 -67
- package/src/components/modal/__tests__/{MftpWebGL3DRModal.spec.ts → Viewer3cr.spec.ts} +154 -53
- package/src/components/modal/__tests__/{WebGL3DR.spec.ts → Viewer3crWebGL.spec.ts} +11 -11
- package/src/components/modal/__tests__/ViewerNavigationDrawer.spec.ts +271 -11
- package/src/components/modal/__tests__/ViewerScanView.spec.ts +15 -7
- package/src/components/modal/actions/Action.vue +3 -8
- package/src/components/modal/actions/Flip3dAction.vue +31 -16
- package/src/components/modal/actions/FlipHorizontalAction.vue +14 -5
- package/src/components/modal/actions/FlipVerticalAction.vue +14 -5
- package/src/components/modal/actions/FullscreenAction.vue +9 -5
- package/src/components/modal/actions/PanAction.vue +11 -51
- package/src/components/modal/actions/ResetViewAction.vue +10 -8
- package/src/components/modal/actions/Rotate2dAction.vue +25 -15
- package/src/components/modal/actions/Slice3dAction.vue +22 -10
- package/src/components/modal/actions/ZoomAction.vue +21 -13
- package/src/components/modal/actions/__tests__/Action.spec.ts +2 -2
- package/src/components/modal/actions/__tests__/Flip3dAction.spec.ts +58 -14
- package/src/components/modal/actions/__tests__/FlipHorizontalAction.spec.ts +15 -5
- package/src/components/modal/actions/__tests__/FlipVerticalAction.spec.ts +15 -5
- package/src/components/modal/actions/__tests__/FullscreenAction.spec.ts +7 -5
- package/src/components/modal/actions/__tests__/PanAction.spec.ts +13 -32
- package/src/components/modal/actions/__tests__/ResetViewAction.spec.ts +5 -3
- package/src/components/modal/actions/__tests__/Rotate2dAction.spec.ts +13 -6
- package/src/components/modal/actions/__tests__/Slice3dAction.spec.ts +1 -1
- package/src/components/modal/actions/__tests__/ZoomAction.spec.ts +25 -11
- package/src/components/modal/app-bars/ViewerActionBar.vue +224 -0
- package/src/components/modal/app-bars/ViewerAppBar.vue +126 -0
- package/src/components/modal/app-bars/__tests__/ViewerActionBar.spec.ts +176 -0
- package/src/components/modal/app-bars/__tests__/ViewerAppBar.spec.ts +99 -0
- package/src/components/modal/layouts/Layout1x3ClipPath.vue +35 -0
- package/src/components/modal/layouts/Layout2x2ClipPath.vue +35 -0
- package/src/components/modal/layouts/LayoutFullscreenClipPath.vue +29 -0
- package/src/components/modal/layouts/__tests__/Layout1x3ClipPath.spec.ts +15 -0
- package/src/components/modal/layouts/__tests__/Layout2x2ClipPath.spec.ts +15 -0
- package/src/components/modal/layouts/__tests__/LayoutFullscreenClipPath.spec.ts +15 -0
- package/src/components/modal/layouts/composables/__tests__/useLayout1x3.spec.ts +40 -0
- package/src/components/modal/layouts/composables/__tests__/useLayout2x2.spec.ts +40 -0
- package/src/components/modal/layouts/composables/__tests__/useLayoutFullscreen.spec.ts +40 -0
- package/src/components/modal/layouts/composables/useLayout1x3.ts +46 -0
- package/src/components/modal/layouts/composables/useLayout2x2.ts +46 -0
- package/src/components/modal/layouts/composables/useLayoutFullscreen.ts +24 -0
- package/src/components/modal/menus/AutoAnnotateMenu.vue +67 -0
- package/src/components/modal/menus/AvatarDropdownMenu.vue +66 -0
- package/src/components/modal/menus/HelpMenu.vue +47 -0
- package/src/components/modal/menus/SettingsMenu.vue +242 -92
- package/src/components/modal/menus/ShareMenu.vue +58 -0
- package/src/components/modal/menus/__tests__/AutoAnnotateMenu.spec.ts +80 -0
- package/src/components/modal/menus/__tests__/AvatarDropdownMenu.spec.ts +49 -0
- package/src/components/modal/menus/__tests__/HelpMenu.spec.ts +12 -0
- package/src/components/modal/menus/__tests__/SettingsMenu.spec.ts +163 -57
- package/src/components/modal/modal/AboutModal.vue +61 -0
- package/src/components/modal/modal/AiModelList.vue +70 -0
- package/src/components/modal/{AskAI.vue → modal/AskAiModal.vue} +26 -34
- package/src/components/modal/modal/AutoAnnotateModal.vue +136 -0
- package/src/components/modal/modal/CloseViewerModal.vue +108 -0
- package/src/components/modal/modal/DataOverlayGeneralModal.vue +122 -0
- package/src/components/modal/modal/DataOverlayMeasurementModal.vue +59 -0
- package/src/components/modal/modal/DataOverlayModal.vue +121 -0
- package/src/components/modal/modal/ShareModal.vue +201 -0
- package/src/components/modal/modal/UploadsDrawer.vue +165 -0
- package/src/components/modal/modal/WhatsNewModal.vue +45 -0
- package/src/components/modal/modal/__tests__/AboutModal.spec.ts +60 -0
- package/src/components/modal/modal/__tests__/AiModelList.spec.ts +50 -0
- package/src/components/modal/{__tests__ → modal/__tests__}/AskAI.spec.ts +8 -7
- package/src/components/modal/modal/__tests__/AutoAnnotateModal.spec.ts +29 -0
- package/src/components/modal/modal/__tests__/CloseViewerModal.spec.ts +60 -0
- package/src/components/modal/modal/__tests__/DataOverlayGeneralModal.spec.ts +55 -0
- package/src/components/modal/modal/__tests__/DataOverlayMeasurementModal.spec.ts +82 -0
- package/src/components/modal/modal/__tests__/DataOverlayModal.spec.ts +94 -0
- package/src/components/modal/modal/__tests__/ShareModal.spec.ts +262 -0
- package/src/components/modal/modal/__tests__/UploadsDrawer.spec.ts +174 -0
- package/src/components/modal/modal/__tests__/WhatsNewModal.spec.ts +29 -0
- package/src/components/modal/snackbars/AnnotationGeneratedSnackbar.vue +34 -0
- package/src/components/modal/snackbars/ImagesSharedSnackbar.vue +26 -0
- package/src/components/modal/snackbars/LinkCopiedSnackbar.vue +26 -0
- package/src/components/modal/snackbars/__tests__/AnnotationGeneratedSnackbar.spec.ts +43 -0
- package/src/components/modal/snackbars/__tests__/ImagesSharedSnackbar.spec.ts +22 -0
- package/src/components/modal/snackbars/__tests__/LinkCopiedSnackbar.spec.ts +21 -0
- package/src/components/navigation/annotation/AnnotationCreateModal.vue +114 -0
- package/src/components/navigation/annotation/AnnotationCreateSnackbar.vue +20 -0
- package/src/components/navigation/annotation/AnnotationDataTable.vue +157 -0
- package/src/components/navigation/annotation/AnnotationDeleteModal.vue +48 -0
- package/src/components/navigation/annotation/AnnotationDeleteSnackbar.vue +25 -0
- package/src/components/navigation/annotation/AnnotationForm.vue +277 -0
- package/src/components/navigation/annotation/AnnotationIcon.vue +45 -0
- package/src/components/navigation/annotation/AnnotationInfo.vue +141 -0
- package/src/components/navigation/annotation/AnnotationMenu.vue +99 -0
- package/src/components/navigation/annotation/AnnotationPanel.vue +30 -0
- package/src/components/navigation/annotation/AnnotationTools.vue +104 -0
- package/src/components/navigation/annotation/AnnotationUpdateModal.vue +78 -0
- package/src/components/navigation/annotation/AnnotationVisibilityBtn.vue +52 -0
- package/src/components/navigation/annotation/DrawerTitle.vue +25 -0
- package/src/components/navigation/annotation/__tests__/AnnotationCreateModal.spec.ts +178 -0
- package/src/components/navigation/annotation/__tests__/AnnotationCreateSnackbar.spec.ts +31 -0
- package/src/components/navigation/annotation/__tests__/AnnotationDataTable.spec.ts +79 -0
- package/src/components/navigation/annotation/__tests__/AnnotationDeleteSnackbar.spec.ts +66 -0
- package/src/components/navigation/annotation/__tests__/AnnotationForm.spec.ts +261 -0
- package/src/components/navigation/annotation/__tests__/AnnotationIcon.spec.ts +13 -0
- package/src/components/navigation/annotation/__tests__/AnnotationTools.spec.ts +116 -0
- package/src/components/navigation/display/DisplayPanel.vue +156 -0
- package/src/components/{views/__tests__/DisplaySettings.spec.ts → navigation/display/__tests__/DisplayPanel.spec.ts} +14 -3
- package/src/components/navigation/history/HistoryModal.vue +140 -0
- package/src/components/navigation/mcad/McadAddObjectBtn.vue +41 -0
- package/src/components/navigation/mcad/McadDataTable.vue +78 -0
- package/src/components/navigation/mcad/McadDataTableItems.vue +382 -0
- package/src/components/navigation/mcad/McadDeleteModal.vue +44 -0
- package/src/components/navigation/mcad/McadDropZone.vue +148 -0
- package/src/components/navigation/mcad/McadFloating.vue +193 -0
- package/src/components/navigation/mcad/McadIcon.vue +34 -0
- package/src/components/navigation/mcad/McadInvert.vue +91 -0
- package/src/components/navigation/mcad/McadLockBtn.vue +62 -0
- package/src/components/navigation/mcad/McadMenu.vue +248 -0
- package/src/components/navigation/mcad/McadOpacity.vue +79 -0
- package/src/components/navigation/mcad/McadPanel.vue +31 -0
- package/src/components/navigation/mcad/McadToggleSortBtn.vue +18 -0
- package/src/components/navigation/mcad/McadToggleVisibilityBtn.vue +46 -0
- package/src/components/navigation/mcad/McadUpdateModal.vue +108 -0
- package/src/components/navigation/mcad/McadVisibilityBtn.vue +46 -0
- package/src/components/navigation/mcad/__tests__/McadAddObjectBtn.spec.ts +73 -0
- package/src/components/navigation/mcad/__tests__/McadDataTable.spec.ts +27 -0
- package/src/components/navigation/mcad/__tests__/McadDataTableItems.spec.ts +621 -0
- package/src/components/navigation/mcad/__tests__/McadDeleteModal.spec.ts +67 -0
- package/src/components/navigation/mcad/__tests__/McadDropZone.spec.ts +109 -0
- package/src/components/navigation/mcad/__tests__/McadIcon.spec.ts +13 -0
- package/src/components/navigation/mcad/__tests__/McadInvert.spec.ts +45 -0
- package/src/components/navigation/mcad/__tests__/McadLockBtn.spec.ts +38 -0
- package/src/components/navigation/mcad/__tests__/McadMenu.spec.ts +258 -0
- package/src/components/navigation/mcad/__tests__/McadOpacity.spec.ts +68 -0
- package/src/components/navigation/mcad/__tests__/McadToggleSortBtn.spec.ts +36 -0
- package/src/components/navigation/mcad/__tests__/McadToggleVisibilityBtn.spec.ts +53 -0
- package/src/components/navigation/mcad/__tests__/McadUpdateModal.spec.ts +122 -0
- package/src/components/navigation/mcad/__tests__/McadVisibilityBtn.spec.ts +45 -0
- package/src/components/navigation/measurement/MeasurementAngleSnackbar.vue +18 -0
- package/src/components/navigation/measurement/MeasurementDataTable.vue +162 -0
- package/src/components/navigation/measurement/MeasurementDeleteModal.vue +49 -0
- package/src/components/navigation/measurement/MeasurementDeleteSnackbar.vue +40 -0
- package/src/components/navigation/measurement/MeasurementIcon.vue +41 -0
- package/src/components/navigation/measurement/MeasurementInfo.vue +25 -0
- package/src/components/navigation/measurement/MeasurementInfoAngle.vue +36 -0
- package/src/components/navigation/measurement/MeasurementInfoLength.vue +37 -0
- package/src/components/navigation/measurement/MeasurementInfoPolygon.vue +58 -0
- package/src/components/navigation/measurement/MeasurementLengthSnackbar.vue +18 -0
- package/src/components/navigation/measurement/MeasurementMenu.vue +97 -0
- package/src/components/navigation/measurement/MeasurementPanel.vue +30 -0
- package/src/components/navigation/measurement/MeasurementPolygonSnackbar.vue +18 -0
- package/src/components/navigation/measurement/MeasurementTools.vue +101 -0
- package/src/components/navigation/measurement/MeasurementVisibilityBtn.vue +53 -0
- package/src/components/navigation/measurement/__tests__/MeasurementAngleSnackbar.spec.ts +34 -0
- package/src/components/navigation/measurement/__tests__/MeasurementDataTable.spec.ts +79 -0
- package/src/components/navigation/measurement/__tests__/MeasurementDeleteSnackbar.spec.ts +51 -0
- package/src/components/navigation/measurement/__tests__/MeasurementInfo.spec.ts +77 -0
- package/src/components/navigation/measurement/__tests__/MeasurementLengthSnackbar.spec.ts +35 -0
- package/src/components/navigation/measurement/__tests__/MeasurementPolygonSnackbar.spec.ts +35 -0
- package/src/components/navigation/measurement/__tests__/MeasurementTools.spec.ts +87 -0
- package/src/components/shared/ColourPalette.vue +72 -0
- package/src/components/shared/DoubleSliderSelector.vue +66 -28
- package/src/components/shared/HorizontalSliderSelector.vue +80 -0
- package/src/components/shared/KeyboardShortcuts.vue +184 -0
- package/src/components/shared/LoadingSpinner.vue +508 -144
- package/src/components/shared/MultiLoginError.vue +98 -0
- package/src/components/shared/NotificationToaster.vue +112 -0
- package/src/components/shared/UpdateSnackbar.vue +22 -9
- package/src/components/shared/ValueSelector.vue +10 -10
- package/src/components/shared/VerticalSliderSelector.vue +45 -44
- package/src/components/shared/__tests__/ColourPalette.spec.ts +21 -0
- package/src/components/shared/__tests__/DoubleSliderSelector.spec.ts +58 -46
- package/src/components/shared/__tests__/HorizontalSliderSelector.spec.ts +35 -0
- package/src/components/shared/__tests__/KeyboardShortcuts.spec.ts +50 -0
- package/src/components/shared/__tests__/MultiLoginError.spec.ts +50 -0
- package/src/components/shared/__tests__/NotificationToaster.spec.ts +65 -0
- package/src/components/shared/__tests__/UpdateSnackbar.spec.ts +7 -7
- package/src/components/shared/__tests__/ValueSelector.spec.ts +6 -0
- package/src/composables/__tests__/useDebounce.spec.ts +17 -0
- package/src/composables/__tests__/useMovingAverage.spec.ts +40 -0
- package/src/composables/__tests__/useNavigationCube.spec.ts +79 -0
- package/src/{functions/__tests__/notification.spec.ts → composables/__tests__/useNotificationHandler.spec.ts} +74 -17
- package/src/composables/__tests__/useToolGroup.spec.ts +41 -0
- package/src/composables/__tests__/useViewName.spec.ts +29 -0
- package/src/composables/useBoundingBox.ts +32 -0
- package/src/composables/useEventListener.ts +7 -9
- package/src/composables/useMedia.ts +27 -0
- package/src/composables/useNavigationCube.ts +80 -0
- package/src/composables/useNotificationHandler.ts +82 -0
- package/src/composables/useResizeObserver.ts +31 -0
- package/src/composables/useToolGroup.ts +36 -0
- package/src/composables/useViewName.ts +34 -0
- package/src/composables/useViewer3cr.ts +3 -2
- package/src/config.ts +1 -1
- package/src/constants.ts +8 -0
- package/src/functions/HotkeyScope.ts +87 -0
- package/src/functions/__tests__/HotkeyScope.spec.ts +49 -0
- package/src/functions/__tests__/colours.spec.ts +42 -0
- package/src/functions/__tests__/fileReader.spec.ts +130 -0
- package/src/functions/__tests__/modelHelper.spec.ts +1 -0
- package/src/functions/__tests__/tsHelper.spec.ts +7 -0
- package/src/functions/chunker.ts +21 -0
- package/src/functions/colours.ts +45 -0
- package/src/functions/fileReader.ts +48 -0
- package/src/functions/guards/__tests__/isDataOverlayAngle.spec.ts +21 -0
- package/src/functions/guards/__tests__/isDataOverlayLength.spec.ts +21 -0
- package/src/functions/guards/__tests__/isDataOverlayPolygon.spec.ts +21 -0
- package/src/functions/guards/isDataOverlayAngle.ts +3 -4
- package/src/functions/guards/isDataOverlayLength.ts +3 -4
- package/src/functions/guards/isDataOverlayPolygon.ts +3 -4
- package/src/functions/openUrl.ts +3 -0
- package/src/functions/{__tests__ → parsers/__tests__}/parseAction.spec.ts +1 -1
- package/src/functions/{__tests__ → parsers/__tests__}/parseCallToAction.spec.ts +1 -1
- package/src/functions/{__tests__ → parsers/__tests__}/parseDataOverlay.spec.ts +1 -1
- package/src/functions/{__tests__ → parsers/__tests__}/parseDataOverlayData.spec.ts +1 -1
- package/src/functions/{__tests__ → parsers/__tests__}/parseDataOverlayEvent.spec.ts +3 -3
- package/src/functions/{__tests__ → parsers/__tests__}/parseMcadEvent.spec.ts +3 -3
- package/src/functions/{parseAction.ts → parsers/parseAction.ts} +1 -2
- package/src/functions/{parseCallToAction.ts → parsers/parseCallToAction.ts} +2 -2
- package/src/functions/{parseDataOverlay.ts → parsers/parseDataOverlay.ts} +3 -3
- package/src/functions/parsers/parseDataOverlayData.ts +9 -0
- package/src/functions/parsers/parseDataOverlayEvent.ts +19 -0
- package/src/functions/parsers/parseMcadEvent.ts +9 -0
- package/src/functions/platform.ts +7 -0
- package/src/functions/translateTooltipShortcut.ts +35 -0
- package/src/functions/tsHelper.ts +3 -0
- package/src/main.ts +68 -43
- package/src/models/__tests__/iso-languages.spec.ts +23 -0
- package/src/models/__tests__/scanState.spec.ts +14 -38
- package/src/models/iso-languages.ts +1609 -0
- package/src/models/progress.ts +23 -0
- package/src/models/scanState.ts +56 -100
- package/src/plugins/__tests__/pinia.spec.ts +7 -0
- package/src/plugins/__tests__/vue-i18n.spec.ts +7 -0
- package/src/plugins/__tests__/vuetify.spec.ts +3 -3
- package/src/plugins/locales/en.json +442 -0
- package/src/plugins/material-symbols/aliases.ts +43 -0
- package/src/plugins/material-symbols/material-symbols-filled.ts +11 -0
- package/src/plugins/material-symbols/material-symbols-outlined.ts +9 -0
- package/src/plugins/pinia.ts +3 -0
- package/src/plugins/vue-i18n.ts +9 -0
- package/src/plugins/vuetify.ts +157 -25
- package/src/services/__tests__/features.service.spec.ts +14 -0
- package/src/services/__tests__/gpt.service.spec.ts +64 -3
- package/src/services/__tests__/viewer-3cr.service.spec.ts +616 -192
- package/src/services/features.service.ts +32 -0
- package/src/services/gpt.service.ts +5 -2
- package/src/services/viewer-3cr.service.ts +374 -307
- package/src/stores/__tests__/data-overlay.store.spec.ts +92 -0
- package/src/stores/__tests__/demo.store.spec.ts +196 -0
- package/src/stores/__tests__/drawer.store.spec.ts +27 -0
- package/src/stores/__tests__/intro.store.spec.ts +102 -0
- package/src/stores/__tests__/language.store.spec.ts +83 -0
- package/src/stores/__tests__/mcad-floating.store.spec.ts +339 -0
- package/src/stores/__tests__/mcad.store.spec.ts +88 -0
- package/src/stores/__tests__/save.store.spec.ts +51 -0
- package/src/stores/__tests__/theme.store.spec.ts +18 -0
- package/src/stores/__tests__/tool.store.spec.ts +53 -0
- package/src/stores/__tests__/upload.store.spec.ts +19 -0
- package/src/stores/__tests__/viewer.store.spec.ts +20 -0
- package/src/stores/data-overlay.store.ts +93 -0
- package/src/stores/demo.store.ts +284 -0
- package/src/stores/drawer.store.ts +23 -0
- package/src/stores/intro.store.ts +35 -0
- package/src/stores/language.store.ts +59 -0
- package/src/stores/mcad-floating.store.ts +141 -0
- package/src/stores/mcad.store.ts +53 -0
- package/src/stores/save.store.ts +59 -0
- package/src/stores/theme.store.ts +45 -0
- package/src/stores/tool.store.ts +41 -0
- package/src/stores/upload.store.ts +19 -0
- package/src/stores/viewer.store.ts +34 -0
- package/src/tools/__tests__/annotation-create.tool.spec.ts +90 -0
- package/src/tools/__tests__/annotation-move.tool.spec.ts +107 -0
- package/src/tools/__tests__/data-overlay.tool.spec.ts +127 -0
- package/src/tools/__tests__/mcad-move.tool.spec.ts +106 -0
- package/src/tools/__tests__/mcad-rotate.tool.spec.ts +103 -0
- package/src/tools/__tests__/mcad-scale.tool.spec.ts +8 -0
- package/src/tools/__tests__/mcad-select.tool.spec.ts +63 -0
- package/src/tools/__tests__/measurement-angle.tool.spec.ts +26 -0
- package/src/tools/__tests__/measurement-length.tool.spec.ts +26 -0
- package/src/tools/__tests__/measurement-polygon.tool.spec.ts +26 -0
- package/src/tools/annotation-create.tool.ts +48 -0
- package/src/tools/annotation-move.tool.ts +48 -0
- package/src/tools/data-overlay.tool.ts +45 -48
- package/src/tools/mcad-move.tool.ts +47 -0
- package/src/tools/mcad-rotate.tool.ts +47 -0
- package/src/tools/mcad-scale-tool.ts +10 -0
- package/src/tools/mcad-select-tool.ts +32 -0
- package/src/tools/measurement-angle.tool.ts +20 -0
- package/src/tools/measurement-length.tool.ts +20 -0
- package/src/tools/measurement-polygon.tool.ts +20 -0
- package/src/types/feature.ts +6 -0
- package/src/types/viewer-tool.ts +5 -0
- package/test/MockImportOriginal.ts +7 -0
- package/test/assertions/beTypeOrNull.ts +24 -0
- package/test/fakers/action-data.faker.ts +1 -1
- package/test/fakers/action.faker.ts +1 -1
- package/test/fakers/call-to-action.faker.ts +1 -1
- package/test/fakers/data-overlay-angle.faker.ts +1 -1
- package/test/fakers/data-overlay-annotation.faker.ts +1 -1
- package/test/fakers/data-overlay-data.faker.ts +18 -15
- package/test/fakers/data-overlay-interaction.faker.ts +25 -17
- package/test/fakers/data-overlay-length.faker.ts +1 -1
- package/test/fakers/data-overlay-mcad.faker.ts +4 -3
- package/test/fakers/data-overlay-polygon.faker.ts +1 -1
- package/test/fakers/feature.faker.ts +13 -0
- package/test/fakers/file.faker.ts +11 -0
- package/test/fakers/gpt-question.faker.ts +1 -1
- package/test/fakers/gpt-response.faker.ts +1 -1
- package/test/fakers/mcad-object-interaction.faker.ts +4 -4
- package/test/fakers/orientation.faker.ts +1 -1
- package/test/fakers/segment-angle.faker.ts +1 -1
- package/test/fakers/upload.faker.ts +14 -0
- package/test/getAnimationFrame.ts +3 -0
- package/test/plugins/findByTestId.ts +13 -6
- package/test/plugins/pinia.ts +20 -0
- package/test/plugins/vitest.d.ts +8 -0
- package/test/plugins/vue-i18n.ts +22 -0
- package/test/plugins/vuetify.ts +10 -0
- package/test/setup.ts +37 -12
- package/tsconfig.json +1 -1
- package/vite.config.mts +48 -18
- package/vitest.config.mts +12 -3
- package/src/assets/images/MainBackdrop.svg +0 -48
- package/src/assets/images/dark/Singular-Health-Disc-Mono.svg +0 -9
- package/src/assets/images/dark/demo-icon-small.png +0 -0
- package/src/assets/images/dark/demo-logo-small.svg +0 -27
- package/src/assets/images/dark/demo-logo.svg +0 -1
- package/src/assets/images/light/Singular-Health-Disc-Mono.svg +0 -9
- package/src/assets/logos/3dicom/white-mini.svg +0 -20
- package/src/components/demo/DemoModal.vue +0 -44
- package/src/components/demo/DemoPatientModal.vue +0 -52
- package/src/components/demo/__tests__/DemoModal.spec.ts +0 -26
- package/src/components/demo/__tests__/DemoPatientModal.spec.ts +0 -38
- package/src/components/demo/__tests__/options.spec.ts +0 -25
- package/src/components/demo/licence/DemoLicenceEnableCloudStorageModal.vue +0 -64
- package/src/components/demo/licence/DemoLicenceInfoModal.vue +0 -49
- package/src/components/demo/licence/DemoLicenceSendToPartyModal.vue +0 -178
- package/src/components/demo/licence/DemoLicenceShareToMobileModal.vue +0 -102
- package/src/components/demo/licence/__tests__/DemoLicenceSendToPartyModal.spec.ts +0 -36
- package/src/components/demo/licence/__tests__/DemoLicenceShareToMobileModal.spec.ts +0 -52
- package/src/components/demo/options.ts +0 -170
- package/src/components/demo/patient/DemoPatientEnableCloudStorageModal.vue +0 -64
- package/src/components/demo/patient/DemoPatientInfoModal.vue +0 -49
- package/src/components/demo/patient/DemoPatientSendToPartyModal.vue +0 -177
- package/src/components/demo/patient/DemoPatientShareToMobileModal.vue +0 -102
- package/src/components/demo/patient/__tests__/DemoPatientEnableCloudStorageModal.spec.ts +0 -38
- package/src/components/demo/patient/__tests__/DemoPatientInfoModal.spec.ts +0 -38
- package/src/components/demo/patient/__tests__/DemoPatientSendToPartyModal.spec.ts +0 -36
- package/src/components/demo/patient/__tests__/DemoPatientShareToMobileModal.spec.ts +0 -52
- package/src/components/modal/CloseViewerModal.vue +0 -69
- package/src/components/modal/MftpWebGL3DRModal.vue +0 -336
- package/src/components/modal/ViewerNavigationDrawerContent.vue +0 -168
- package/src/components/modal/ViewerNavigationDrawerFooter.vue +0 -131
- package/src/components/modal/ViewerNavigationDrawerHeader.vue +0 -33
- package/src/components/modal/WebGL3DR.vue +0 -91
- package/src/components/modal/__tests__/CloseViewerModal.spec.ts +0 -70
- package/src/components/modal/__tests__/ViewerNavigationDrawerContent.spec.ts +0 -11
- package/src/components/modal/__tests__/ViewerNavigationDrawerFooter.spec.ts +0 -46
- package/src/components/modal/__tests__/ViewerNavigationDrawerHeader.spec.ts +0 -40
- package/src/components/modal/actions/NavigationCubeAction.vue +0 -26
- package/src/components/modal/actions/__tests__/NavigationCubeAction.spec.ts +0 -25
- package/src/components/modal/buttons/AutoAnnotateBtn.vue +0 -197
- package/src/components/modal/buttons/__tests__/AutoAnnotateBtn.spec.ts +0 -28
- package/src/components/modal/menus/FileMenu.vue +0 -73
- package/src/components/modal/menus/__tests__/FileMenu.spec.ts +0 -110
- package/src/components/navigation/mcad/McadGlobalActions.vue +0 -20
- package/src/components/navigation/mcad/McadGlobalOpacitySlider.vue +0 -103
- package/src/components/navigation/mcad/McadGlobalScanViewBtn.vue +0 -28
- package/src/components/navigation/mcad/McadGlobalVisibilityBtn.vue +0 -38
- package/src/components/views/AnnotationTreeView.vue +0 -236
- package/src/components/views/DisplaySettings.vue +0 -94
- package/src/components/views/MarkupTreeView.vue +0 -201
- package/src/components/views/McadObjectTreeView.vue +0 -129
- package/src/components/views/__tests__/AnnotationTreeView.spec.ts +0 -62
- package/src/components/views/__tests__/MarkupTreeView.spec.ts +0 -41
- package/src/components/views/__tests__/McadObjectTreeView.spec.ts +0 -47
- package/src/components/views/modals/DataOverlayGeneralModal.vue +0 -71
- package/src/components/views/modals/DataOverlayMarkupModal.vue +0 -60
- package/src/components/views/modals/DataOverlayModal.vue +0 -88
- package/src/components/views/shared/MaskIcon.vue +0 -44
- package/src/components/views/shared/ObjectColor.vue +0 -31
- package/src/components/views/shared/ObjectLabel.vue +0 -30
- package/src/components/views/shared/Opacity.vue +0 -65
- package/src/components/views/shared/VisibilityBtn.vue +0 -25
- package/src/components/views/shared/__tests__/MaskIcon.spec.ts +0 -10
- package/src/components/views/shared/__tests__/ObjectColor.spec.ts +0 -10
- package/src/components/views/shared/__tests__/ObjectLabel.spec.ts +0 -10
- package/src/components/views/shared/__tests__/Opacity.spec.ts +0 -24
- package/src/components/views/shared/__tests__/VisibilityBtn.spec.ts +0 -11
- package/src/components/views/types/annotation-tree-view-item-child-action.ts +0 -6
- package/src/components/views/types/annotation-tree-view-item-child.ts +0 -9
- package/src/components/views/types/annotation-tree-view-item.ts +0 -13
- package/src/components/views/types/markup-tree-view-item-child.ts +0 -6
- package/src/components/views/types/markup-tree-view-item.ts +0 -14
- package/src/components/views/types/mcad-object-tree-view-item.ts +0 -13
- package/src/composables/__tests__/useAnnotations.spec.ts +0 -35
- package/src/composables/__tests__/useIntroJs.spec.ts +0 -51
- package/src/composables/__tests__/useMarkups.spec.ts +0 -39
- package/src/composables/__tests__/useMcadObjects.spec.ts +0 -36
- package/src/composables/__tests__/useNavigationCubeObserver.spec.ts +0 -61
- package/src/composables/useAnnotations.ts +0 -37
- package/src/composables/useIntroJs.ts +0 -142
- package/src/composables/useMarkups.ts +0 -41
- package/src/composables/useMcadObjects.ts +0 -32
- package/src/composables/useNavigationCubeObserver.ts +0 -114
- package/src/composables/useVersion3cr.ts +0 -7
- package/src/functions/__tests__/layoutOverlayStyle.spec.ts +0 -325
- package/src/functions/layoutOverlayStyle.ts +0 -84
- package/src/functions/notification.ts +0 -82
- package/src/functions/parseDataOverlayData.ts +0 -10
- package/src/functions/parseDataOverlayEvent.ts +0 -17
- package/src/functions/parseMcadEvent.ts +0 -10
- package/src/functions/rgbaToCss.ts +0 -13
- package/src/models/__tests__/loadViewerOptions.spec.ts +0 -72
- package/src/models/__tests__/loadViewerPayload.spec.ts +0 -10
- package/src/models/callbacks.ts +0 -4
- package/src/models/loadViewerOptions.ts +0 -79
- package/src/models/loadViewerPayload.ts +0 -17
- package/src/plugins/__tests__/usePlugins.spec.ts +0 -12
- package/src/plugins/usePlugins.ts +0 -8
- package/src/types/action-data.ts +0 -4
- package/src/types/action.ts +0 -13
- package/src/types/call-to-action.ts +0 -9
- package/src/types/colour.ts +0 -6
- package/src/types/data-overlay-angle.ts +0 -16
- package/src/types/data-overlay-annotation.ts +0 -18
- package/src/types/data-overlay-data.ts +0 -15
- package/src/types/data-overlay-event.ts +0 -5
- package/src/types/data-overlay-info.ts +0 -18
- package/src/types/data-overlay-interaction.ts +0 -15
- package/src/types/data-overlay-length.ts +0 -16
- package/src/types/data-overlay-markup.ts +0 -7
- package/src/types/data-overlay-mcad.ts +0 -20
- package/src/types/data-overlay-polygon.ts +0 -18
- package/src/types/data-overlay.ts +0 -16
- package/src/types/demo-type.ts +0 -4
- package/src/types/gpt-question.ts +0 -4
- package/src/types/gpt-response-payload.ts +0 -6
- package/src/types/mcad-object-interaction.ts +0 -15
- package/src/types/segment-angle.ts +0 -5
- package/src/types/vector2.ts +0 -4
- package/src/types/vector3.ts +0 -5
- package/test/fakers/data-overlay-info.faker.ts +0 -29
- /package/src/assets/logos/3dicom/{white.svg → white/white.svg} +0 -0
- /package/src/assets/{images/light/Singular-Health-Trademark-mono.svg → logos/singular-health/black/black.svg} +0 -0
- /package/src/assets/{images/dark/Singular-Health-Trademark-mono.svg → logos/singular-health/white/white.svg} +0 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import CloudDropZone from '@/components/demo/CloudDropZone.vue';
|
|
2
|
+
import { mount } from '@vue/test-utils';
|
|
3
|
+
describe('Cloud DropZone Component', () => {
|
|
4
|
+
beforeEach(() => {
|
|
5
|
+
vi.restoreAllMocks();
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
afterEach(() => {
|
|
9
|
+
document.body.innerHTML = '';
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should render the drop zone correctly', () => {
|
|
13
|
+
const wrapper = mount(CloudDropZone, {
|
|
14
|
+
props: {
|
|
15
|
+
onFilesDropped: vi.fn()
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
expect(wrapper.find('.drop-zone').exists()).toBe(true);
|
|
19
|
+
expect(wrapper.find('.icon-container').exists()).toBe(true);
|
|
20
|
+
expect(wrapper.text()).toContain('Click to upload or drag and drop');
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('should add drag-over class on dragover and remove it on drag leave', async () => {
|
|
24
|
+
const wrapper = mount(CloudDropZone, {
|
|
25
|
+
props: {
|
|
26
|
+
onFilesDropped: vi.fn()
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const dropZone = wrapper.find('.drop-zone');
|
|
30
|
+
await dropZone.trigger('dragover');
|
|
31
|
+
expect(wrapper.classes()).toContain('drag-over');
|
|
32
|
+
await dropZone.trigger('dragleave');
|
|
33
|
+
expect(wrapper.classes()).not.toContain('drag-over');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('should add drag-over class on drag enter', async () => {
|
|
37
|
+
const wrapper = mount(CloudDropZone, {
|
|
38
|
+
props: {
|
|
39
|
+
onFilesDropped: vi.fn()
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const dropZone = wrapper.find('.drop-zone');
|
|
43
|
+
await dropZone.trigger('dragenter');
|
|
44
|
+
expect(wrapper.classes()).toContain('drag-over');
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('should call onFilesDropped with files on drop', async () => {
|
|
48
|
+
const mockFiles = [new File(['content'], 'test-file.txt')];
|
|
49
|
+
const onFilesDropped = vi.fn();
|
|
50
|
+
const wrapper = mount(CloudDropZone, {
|
|
51
|
+
props: {
|
|
52
|
+
onFilesDropped
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const dropZone = wrapper.find('.drop-zone');
|
|
56
|
+
await dropZone.trigger('drop', {
|
|
57
|
+
dataTransfer: {
|
|
58
|
+
files: mockFiles
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
expect(onFilesDropped).toHaveBeenCalledOnce();
|
|
62
|
+
expect(onFilesDropped).toHaveBeenCalledWith(mockFiles);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it('should handle drop event with no files', async () => {
|
|
66
|
+
const onFilesDropped = vi.fn();
|
|
67
|
+
const wrapper = mount(CloudDropZone, {
|
|
68
|
+
props: {
|
|
69
|
+
onFilesDropped
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const dropZone = wrapper.find('.drop-zone');
|
|
73
|
+
const consoleWarnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
|
|
74
|
+
await dropZone.trigger('drop', {
|
|
75
|
+
dataTransfer: {
|
|
76
|
+
files: null
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
expect(onFilesDropped).not.toHaveBeenCalled();
|
|
80
|
+
expect(consoleWarnSpy).toHaveBeenCalledWith('No files were dropped.');
|
|
81
|
+
consoleWarnSpy.mockRestore();
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it('should call onFilesDropped with files when files are selected', async () => {
|
|
85
|
+
const mockFiles = [new File(['content'], 'test-file.dcm')];
|
|
86
|
+
const onFilesDropped = vi.fn();
|
|
87
|
+
const wrapper = mount(CloudDropZone, {
|
|
88
|
+
props: {
|
|
89
|
+
onFilesDropped
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
const mockInput = document.createElement('input') as HTMLInputElement; // Create an actual input element
|
|
93
|
+
Object.defineProperty(mockInput, 'files', {
|
|
94
|
+
value: mockFiles,
|
|
95
|
+
writable: true
|
|
96
|
+
});
|
|
97
|
+
const spy = vi.spyOn(document, 'createElement').mockReturnValue(mockInput);
|
|
98
|
+
await wrapper.find('.drop-zone').trigger('click');
|
|
99
|
+
if (mockInput.onchange) {
|
|
100
|
+
mockInput.onchange(new Event('change'));
|
|
101
|
+
}
|
|
102
|
+
expect(onFilesDropped).toHaveBeenCalledOnce();
|
|
103
|
+
expect(onFilesDropped).toHaveBeenCalledWith(mockFiles);
|
|
104
|
+
|
|
105
|
+
spy.mockRestore();
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
it('should log a warning when no files are selected', async () => {
|
|
109
|
+
const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
|
|
110
|
+
const onFilesDropped = vi.fn();
|
|
111
|
+
const wrapper = mount(CloudDropZone, {
|
|
112
|
+
props: {
|
|
113
|
+
onFilesDropped
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
const mockInput = document.createElement('input') as HTMLInputElement;
|
|
117
|
+
|
|
118
|
+
Object.defineProperty(mockInput, 'files', {
|
|
119
|
+
value: null,
|
|
120
|
+
writable: true
|
|
121
|
+
});
|
|
122
|
+
const spy = vi.spyOn(document, 'createElement').mockReturnValue(mockInput);
|
|
123
|
+
await wrapper.find('.drop-zone').trigger('click');
|
|
124
|
+
if (mockInput.onchange) {
|
|
125
|
+
mockInput.onchange(new Event('change'));
|
|
126
|
+
}
|
|
127
|
+
expect(onFilesDropped).not.toHaveBeenCalled();
|
|
128
|
+
expect(warnSpy).toHaveBeenCalledWith('No files were selected.');
|
|
129
|
+
warnSpy.mockRestore();
|
|
130
|
+
spy.mockRestore();
|
|
131
|
+
});
|
|
132
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import DemoAvatarDropdownMenu from '@/components/demo/DemoAvatarDropdownMenu.vue';
|
|
2
|
+
import { mount } from '@vue/test-utils';
|
|
3
|
+
|
|
4
|
+
describe('DemoAvatarDropdownMenu', () => {
|
|
5
|
+
it('should render correctly and trigger actions', async () => {
|
|
6
|
+
const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
|
|
7
|
+
const onFilesDropped = vi.fn();
|
|
8
|
+
const wrapper = mount(DemoAvatarDropdownMenu, {
|
|
9
|
+
props: {
|
|
10
|
+
onFilesDropped
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
expect(wrapper.exists()).toBe(true);
|
|
14
|
+
warnSpy.mockRestore();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { PRICING_URL } from '../../options';
|
|
2
1
|
import { mount } from '@vue/test-utils';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import DemoLicenceEnableCloudStorageModal from '@/components/demo/UploadDicomToCloudModal.vue';
|
|
3
|
+
import { PRICING_URL } from '@/constants';
|
|
5
4
|
|
|
6
5
|
describe('DemoLicenceEnableCloudStorageModal tests', () => {
|
|
7
6
|
it('should mount', () => {
|
|
@@ -13,7 +12,7 @@ describe('DemoLicenceEnableCloudStorageModal tests', () => {
|
|
|
13
12
|
it('should close modal', async () => {
|
|
14
13
|
const props = { modal: true };
|
|
15
14
|
const wrapper = mount(DemoLicenceEnableCloudStorageModal, { props });
|
|
16
|
-
const close = wrapper.
|
|
15
|
+
const close = wrapper.findComponentByTestId('cancel');
|
|
17
16
|
await close.trigger('click');
|
|
18
17
|
expect(wrapper.emitted('update:modal')).toBeTruthy();
|
|
19
18
|
});
|
|
@@ -23,16 +22,17 @@ describe('DemoLicenceEnableCloudStorageModal tests', () => {
|
|
|
23
22
|
const spy = vi.spyOn(window, 'open');
|
|
24
23
|
const props = { modal: true };
|
|
25
24
|
const wrapper = mount(DemoLicenceEnableCloudStorageModal, { props });
|
|
26
|
-
const button = wrapper.
|
|
25
|
+
const button = wrapper.findComponentByTestId('done');
|
|
27
26
|
await button.trigger('click');
|
|
28
27
|
expect(spy).toHaveBeenCalledWith(PRICING_URL, '_self');
|
|
29
28
|
vi.restoreAllMocks();
|
|
30
29
|
});
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
// TODO: check after coverage
|
|
32
|
+
// it('should open via input', async () => {
|
|
33
|
+
// const props = { modal: false };
|
|
34
|
+
// const wrapper = mount(DemoLicenceEnableCloudStorageModal, { props });
|
|
35
|
+
// const dialog = wrapper.findComponent(VDialog);
|
|
36
|
+
// await dialog.setValue(true);
|
|
37
|
+
// });
|
|
38
38
|
});
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { demoLicenceSubtitles, demoLicenceTitle, SUPPORT_URL } from '@/components/demo/options';
|
|
2
1
|
import { mount } from '@vue/test-utils';
|
|
2
|
+
import { storeToRefs } from 'pinia';
|
|
3
3
|
import { VCardText, VCardTitle, VDialog } from 'vuetify/components';
|
|
4
|
-
import DemoLicenceInfoModal from '@/components/demo/
|
|
4
|
+
import DemoLicenceInfoModal from '@/components/demo/DemoInfoModal.vue';
|
|
5
|
+
import { PRICING_URL } from '@/constants';
|
|
6
|
+
import { useDemoStore } from '@/stores/demo.store';
|
|
5
7
|
|
|
6
8
|
describe('DemoLicenceInfoModal tests', () => {
|
|
7
9
|
it('should mount', () => {
|
|
@@ -13,7 +15,7 @@ describe('DemoLicenceInfoModal tests', () => {
|
|
|
13
15
|
it('should close modal', async () => {
|
|
14
16
|
const props = { modal: true, isModalOpen: true };
|
|
15
17
|
const wrapper = mount(DemoLicenceInfoModal, { props });
|
|
16
|
-
const close = wrapper.
|
|
18
|
+
const close = wrapper.findComponentByTestId('close');
|
|
17
19
|
await close.trigger('click');
|
|
18
20
|
expect(wrapper.emitted('update:modal')).toBeTruthy();
|
|
19
21
|
});
|
|
@@ -23,10 +25,10 @@ describe('DemoLicenceInfoModal tests', () => {
|
|
|
23
25
|
const spy = vi.spyOn(window, 'open');
|
|
24
26
|
const props = { modal: true, isModalOpen: true };
|
|
25
27
|
const wrapper = mount(DemoLicenceInfoModal, { props });
|
|
26
|
-
const button = wrapper.
|
|
28
|
+
const button = wrapper.findComponentByTestId('confirm');
|
|
27
29
|
await button.trigger('click');
|
|
28
|
-
expect(spy).toHaveBeenCalledWith(
|
|
29
|
-
vi.
|
|
30
|
+
expect(spy).toHaveBeenCalledWith(PRICING_URL, '_self');
|
|
31
|
+
vi.clearAllMocks();
|
|
30
32
|
});
|
|
31
33
|
|
|
32
34
|
it('should open via input', async () => {
|
|
@@ -37,8 +39,9 @@ describe('DemoLicenceInfoModal tests', () => {
|
|
|
37
39
|
});
|
|
38
40
|
|
|
39
41
|
it('should show title and subtitle', async () => {
|
|
40
|
-
|
|
41
|
-
vi.spyOn(
|
|
42
|
+
const { demoTitle, demoSubtitles } = storeToRefs(useDemoStore());
|
|
43
|
+
vi.spyOn(demoTitle, 'value', 'get').mockReturnValue('Title');
|
|
44
|
+
vi.spyOn(demoSubtitles, 'value', 'get').mockReturnValue(['Subtitle']);
|
|
42
45
|
const props = { modal: true, isModalOpen: true };
|
|
43
46
|
const wrapper = mount(DemoLicenceInfoModal, { props });
|
|
44
47
|
expect(wrapper.findComponent(VCardTitle).text()).contains('Title');
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import DemoNotificationNavigationDrawer from '@/components/demo/DemoNotificationNavigationDrawer.vue';
|
|
2
|
+
import { mount } from '@vue/test-utils';
|
|
3
|
+
import { defineComponent } from 'vue';
|
|
4
|
+
import { Notification, NotificationType } from '@3cr/viewer-types-ts';
|
|
5
|
+
|
|
6
|
+
const mockNotifications: Notification[] = [
|
|
7
|
+
{
|
|
8
|
+
avatar: 'avatar1.png',
|
|
9
|
+
title: 'Notification 1',
|
|
10
|
+
type: NotificationType.Text,
|
|
11
|
+
text: 'This is a text notification',
|
|
12
|
+
timestamp: new Date(),
|
|
13
|
+
isUnread: true
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
avatar: 'avatar2.png',
|
|
17
|
+
title: 'Notification 2',
|
|
18
|
+
type: NotificationType.Download,
|
|
19
|
+
timestamp: new Date(),
|
|
20
|
+
onDownload: vi.fn(),
|
|
21
|
+
isUnread: false
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
avatar: 'avatar3.png',
|
|
25
|
+
title: 'Notification 3',
|
|
26
|
+
type: NotificationType.Share,
|
|
27
|
+
timestamp: new Date(),
|
|
28
|
+
onShare: vi.fn(),
|
|
29
|
+
isUnread: true
|
|
30
|
+
}
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const DrawerWrapper = defineComponent({
|
|
34
|
+
template: `
|
|
35
|
+
<v-app>
|
|
36
|
+
<DemoNotificationNavigationDrawer :notifications="notifications" />
|
|
37
|
+
</v-app>
|
|
38
|
+
`,
|
|
39
|
+
props: {
|
|
40
|
+
notifications: {}
|
|
41
|
+
},
|
|
42
|
+
components: {
|
|
43
|
+
DemoNotificationNavigationDrawer
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
describe('NotificationDrawer.vue', () => {
|
|
48
|
+
it('renders correctly with notifications', () => {
|
|
49
|
+
const wrapper = mount(DrawerWrapper, {
|
|
50
|
+
props: { notifications: mockNotifications }
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
expect(wrapper.findAll('.v-list-item').length).toBe(mockNotifications.length);
|
|
54
|
+
expect(wrapper.find('.text-h6').text()).toBe('labels.notifications');
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { flushPromises, mount } from '@vue/test-utils';
|
|
2
|
+
import { PRICING_URL } from '@/constants';
|
|
3
|
+
import UploadDicomToCloudModal from '@/components/demo/UploadDicomToCloudModal.vue';
|
|
4
|
+
import { VBtn, VCard, VDialog } from 'vuetify/components';
|
|
5
|
+
import { Upload } from '@3cr/viewer-types-ts';
|
|
6
|
+
import { AsMock, MockImportOriginal } from '@test/MockImportOriginal';
|
|
7
|
+
import { v4 } from 'uuid';
|
|
8
|
+
import { useViewerStore } from '@/stores/viewer.store';
|
|
9
|
+
import { storeToRefs } from 'pinia';
|
|
10
|
+
|
|
11
|
+
vi.mock('uuid', async (importOriginal: MockImportOriginal<typeof import('uuid')>) => {
|
|
12
|
+
return {
|
|
13
|
+
...(await importOriginal()),
|
|
14
|
+
v4: vi.fn()
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
describe('UploadDicomToCloudModal tests', () => {
|
|
19
|
+
it('should mount', () => {
|
|
20
|
+
const props = { modal: true };
|
|
21
|
+
const wrapper = mount(UploadDicomToCloudModal, { props });
|
|
22
|
+
expect(wrapper).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('should close modal', async () => {
|
|
26
|
+
const props = { modal: true };
|
|
27
|
+
const wrapper = mount(UploadDicomToCloudModal, { props });
|
|
28
|
+
const close = wrapper.findComponentByTestId('close');
|
|
29
|
+
await close.trigger('click');
|
|
30
|
+
expect(wrapper.emitted('update:modal')).toStrictEqual([[false]]);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('should close modal via cancel', async () => {
|
|
34
|
+
const props = { modal: true };
|
|
35
|
+
const wrapper = mount(UploadDicomToCloudModal, { props });
|
|
36
|
+
const close = wrapper.findComponentByTestId('cancel');
|
|
37
|
+
await close.trigger('click');
|
|
38
|
+
expect(wrapper.emitted('update:modal')).toStrictEqual([[false]]);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('should close modal', async () => {
|
|
42
|
+
const props = { modal: false };
|
|
43
|
+
const wrapper = mount(UploadDicomToCloudModal, { props });
|
|
44
|
+
const dialog = wrapper.findComponent(VDialog);
|
|
45
|
+
await dialog.setValue(true);
|
|
46
|
+
expect(wrapper.emitted('update:modal')).toStrictEqual([[true]]);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('should open pricing url', async () => {
|
|
50
|
+
vi.stubGlobal('open', vi.fn());
|
|
51
|
+
const spy = vi.spyOn(window, 'open');
|
|
52
|
+
const props = { modal: true };
|
|
53
|
+
const wrapper = mount(UploadDicomToCloudModal, { props });
|
|
54
|
+
const button = wrapper.findComponentByTestId('done');
|
|
55
|
+
await button.trigger('click');
|
|
56
|
+
expect(spy).toHaveBeenCalledWith(PRICING_URL, '_self');
|
|
57
|
+
vi.restoreAllMocks();
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('should get current progress 50%', async () => {
|
|
61
|
+
const props = { modal: true };
|
|
62
|
+
const wrapper = mount(UploadDicomToCloudModal, {
|
|
63
|
+
props,
|
|
64
|
+
global: {
|
|
65
|
+
stubs: {
|
|
66
|
+
VProgressLinear: true
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const progress = {
|
|
72
|
+
progress: 0.5
|
|
73
|
+
} as Upload;
|
|
74
|
+
expect(wrapper.vm.getProgress(progress)).toBe(50);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('should get current progress 95%', async () => {
|
|
78
|
+
const props = { modal: true };
|
|
79
|
+
const wrapper = mount(UploadDicomToCloudModal, {
|
|
80
|
+
props,
|
|
81
|
+
global: {
|
|
82
|
+
stubs: {
|
|
83
|
+
VProgressLinear: true
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const progress = {
|
|
89
|
+
progress: 0.95
|
|
90
|
+
} as Upload;
|
|
91
|
+
expect(wrapper.vm.getProgress(progress)).toBe(95);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
it('should get current progress 0', async () => {
|
|
95
|
+
const props = { modal: true };
|
|
96
|
+
const wrapper = mount(UploadDicomToCloudModal, {
|
|
97
|
+
props,
|
|
98
|
+
global: {
|
|
99
|
+
stubs: {
|
|
100
|
+
VProgressLinear: true
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
const progress = {} as Upload;
|
|
106
|
+
expect(wrapper.vm.getProgress(progress)).toBe(0);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it('should delete no file', async () => {
|
|
110
|
+
const props = { modal: true };
|
|
111
|
+
const wrapper = mount(UploadDicomToCloudModal, {
|
|
112
|
+
props,
|
|
113
|
+
global: {
|
|
114
|
+
stubs: {
|
|
115
|
+
VProgressLinear: true
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
const parent = wrapper.findComponent(VCard);
|
|
120
|
+
|
|
121
|
+
expect(parent.findAll('.file-item').length).toBe(0);
|
|
122
|
+
|
|
123
|
+
const file = {
|
|
124
|
+
id: '123'
|
|
125
|
+
} as Upload;
|
|
126
|
+
|
|
127
|
+
wrapper.vm.deleteFile(file);
|
|
128
|
+
|
|
129
|
+
await flushPromises();
|
|
130
|
+
expect(parent.findAll('.file-item').length).toBe(0);
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
it('should execute interval n + 1 times', async () => {
|
|
134
|
+
const props = { modal: true };
|
|
135
|
+
const wrapper = mount(UploadDicomToCloudModal, {
|
|
136
|
+
props,
|
|
137
|
+
global: {
|
|
138
|
+
stubs: {
|
|
139
|
+
VProgressLinear: true
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
const numRevolutions = 10;
|
|
144
|
+
const interval = '123123123';
|
|
145
|
+
const clearIntervalSpy = vi.spyOn(window, 'clearInterval');
|
|
146
|
+
const spy = vi.spyOn(window, 'setInterval').mockImplementation((fn: () => void) => {
|
|
147
|
+
//Run this after the interval has been returned
|
|
148
|
+
setTimeout(() => {
|
|
149
|
+
for (let i = 0; i < numRevolutions; i++) {
|
|
150
|
+
fn();
|
|
151
|
+
}
|
|
152
|
+
fn();
|
|
153
|
+
expect(clearIntervalSpy).toHaveBeenCalledWith(interval);
|
|
154
|
+
}, 1);
|
|
155
|
+
|
|
156
|
+
return interval;
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
await wrapper.vm.handleFilesDropped([new File([], 'something different')]);
|
|
160
|
+
expect(spy).toHaveBeenCalled();
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
it('should delete 1 file', async () => {
|
|
164
|
+
const props = { modal: true };
|
|
165
|
+
const wrapper = mount(UploadDicomToCloudModal, {
|
|
166
|
+
props,
|
|
167
|
+
global: {
|
|
168
|
+
stubs: {
|
|
169
|
+
VProgressLinear: true
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
const mockedId = '123';
|
|
175
|
+
const parent = wrapper.findComponent(VCard);
|
|
176
|
+
AsMock(v4).mockReturnValue(mockedId);
|
|
177
|
+
|
|
178
|
+
await wrapper.vm.handleFilesDropped([new File([], 'something different')]);
|
|
179
|
+
await flushPromises();
|
|
180
|
+
|
|
181
|
+
expect(parent.findAll('.file-item').length).toBe(1);
|
|
182
|
+
|
|
183
|
+
const file = {
|
|
184
|
+
id: mockedId
|
|
185
|
+
} as Upload;
|
|
186
|
+
|
|
187
|
+
wrapper.vm.deleteFile(file);
|
|
188
|
+
|
|
189
|
+
await flushPromises();
|
|
190
|
+
expect(parent.findAll('.file-item').length).toBe(0);
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
it('should delete 1 file through template', async () => {
|
|
194
|
+
const props = { modal: true };
|
|
195
|
+
const wrapper = mount(UploadDicomToCloudModal, {
|
|
196
|
+
props,
|
|
197
|
+
global: {
|
|
198
|
+
stubs: {
|
|
199
|
+
VProgressLinear: true
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
const mockedId = '123';
|
|
204
|
+
const parent = wrapper.findComponent(VCard);
|
|
205
|
+
AsMock(v4).mockReturnValue(mockedId);
|
|
206
|
+
|
|
207
|
+
await wrapper.vm.handleFilesDropped([new File([], 'something different')]);
|
|
208
|
+
await flushPromises();
|
|
209
|
+
|
|
210
|
+
expect(parent.findAll('.file-item').length).toBe(1);
|
|
211
|
+
|
|
212
|
+
await parent.findAllComponents(VBtn)[1].trigger('click');
|
|
213
|
+
|
|
214
|
+
await flushPromises();
|
|
215
|
+
expect(parent.findAll('.file-item').length).toBe(0);
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
it('should retry 1 file', async () => {
|
|
219
|
+
const props = { modal: true };
|
|
220
|
+
const wrapper = mount(UploadDicomToCloudModal, {
|
|
221
|
+
props,
|
|
222
|
+
global: {
|
|
223
|
+
stubs: {
|
|
224
|
+
VProgressLinear: true
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
const mockedId = '123';
|
|
229
|
+
const parent = wrapper.findComponent(VCard);
|
|
230
|
+
AsMock(v4).mockReturnValue(mockedId);
|
|
231
|
+
|
|
232
|
+
await wrapper.vm.handleFilesDropped([new File([], 'something different')]);
|
|
233
|
+
await flushPromises();
|
|
234
|
+
|
|
235
|
+
const file = {
|
|
236
|
+
id: mockedId,
|
|
237
|
+
status: 'failed'
|
|
238
|
+
} as Upload;
|
|
239
|
+
|
|
240
|
+
wrapper.vm.retryUpload(file);
|
|
241
|
+
|
|
242
|
+
await flushPromises();
|
|
243
|
+
expect(parent.findAll('.file-item').length).toBe(1);
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
it('should retry 1 file through template', async () => {
|
|
247
|
+
const props = { modal: true };
|
|
248
|
+
const wrapper = mount(UploadDicomToCloudModal, {
|
|
249
|
+
props,
|
|
250
|
+
global: {
|
|
251
|
+
stubs: {
|
|
252
|
+
VProgressLinear: true
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
const mockedId = '123';
|
|
257
|
+
const parent = wrapper.findComponent(VCard);
|
|
258
|
+
|
|
259
|
+
const file = {
|
|
260
|
+
id: mockedId,
|
|
261
|
+
status: 'failed'
|
|
262
|
+
} as Upload;
|
|
263
|
+
|
|
264
|
+
wrapper.vm.droppedFiles.push(file);
|
|
265
|
+
|
|
266
|
+
await flushPromises();
|
|
267
|
+
|
|
268
|
+
await parent.findAll('a')[0].trigger('click');
|
|
269
|
+
|
|
270
|
+
await flushPromises();
|
|
271
|
+
expect(parent.findAll('.file-item').length).toBe(1);
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
it('should show uploading linear', async () => {
|
|
275
|
+
const props = { modal: true };
|
|
276
|
+
const wrapper = mount(UploadDicomToCloudModal, {
|
|
277
|
+
props,
|
|
278
|
+
global: {
|
|
279
|
+
stubs: {
|
|
280
|
+
VProgressLinear: true
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
const mockedId = '123';
|
|
285
|
+
const parent = wrapper.findComponent(VCard);
|
|
286
|
+
|
|
287
|
+
const file = {
|
|
288
|
+
id: mockedId,
|
|
289
|
+
title: 'hello world',
|
|
290
|
+
status: 'uploading'
|
|
291
|
+
} as Upload;
|
|
292
|
+
|
|
293
|
+
wrapper.vm.droppedFiles.push(file);
|
|
294
|
+
|
|
295
|
+
await flushPromises();
|
|
296
|
+
expect(parent.find('.progress-container').exists()).toBe(true);
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
it('should onComplete', async () => {
|
|
300
|
+
const { options } = storeToRefs(useViewerStore());
|
|
301
|
+
|
|
302
|
+
options.value.onCloudStorage = vi.fn();
|
|
303
|
+
|
|
304
|
+
const props = { modal: true };
|
|
305
|
+
const wrapper = mount(UploadDicomToCloudModal, {
|
|
306
|
+
props,
|
|
307
|
+
global: {
|
|
308
|
+
stubs: {
|
|
309
|
+
VProgressLinear: true
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
const ext = [new File([], 'something different.dcm'), new File([], 'something different.notExt')];
|
|
315
|
+
|
|
316
|
+
await wrapper.vm.handleFilesDropped(ext);
|
|
317
|
+
|
|
318
|
+
expect(options.value.onCloudStorage).toHaveBeenCalledWith([ext[0]]);
|
|
319
|
+
});
|
|
320
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { demoPayload } from '@/components/demo/demo-payload';
|
|
2
|
+
|
|
3
|
+
describe('demo payload tests', () => {
|
|
4
|
+
it('should exist', () => {
|
|
5
|
+
expect(demoPayload.Url).toBeTruthy();
|
|
6
|
+
expect(demoPayload.DecryptionKey).toBeTruthy();
|
|
7
|
+
expect(demoPayload.DecryptionKey.Iv).toBeTruthy();
|
|
8
|
+
expect(demoPayload.DecryptionKey.Key).toBeTruthy();
|
|
9
|
+
});
|
|
10
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { addDays, addHours } from 'date-fns';
|
|
2
|
+
import { faker } from '@faker-js/faker';
|
|
3
|
+
import drMiles from '@/assets/images/dr-miles.png';
|
|
4
|
+
import { NotificationType, Notification } from '@3cr/viewer-types-ts';
|
|
5
|
+
|
|
6
|
+
export const DEMO_NOTIFICATIONS: Notification[] = [
|
|
7
|
+
{
|
|
8
|
+
avatar: drMiles,
|
|
9
|
+
title: '<strong>Dr. Miles</strong> created an annotation in <strong>File Name</strong>',
|
|
10
|
+
timestamp: addHours(new Date(), -1),
|
|
11
|
+
isUnread: true,
|
|
12
|
+
type: NotificationType.Plain
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
avatar: drMiles,
|
|
16
|
+
title: '<strong>Dr. Miles</strong> created annotations in <strong>File Name</strong>',
|
|
17
|
+
timestamp: addHours(new Date(), -2),
|
|
18
|
+
isUnread: false,
|
|
19
|
+
type: NotificationType.Text,
|
|
20
|
+
text: faker.lorem.sentence()
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
avatar: drMiles,
|
|
24
|
+
title: '<strong>Dr. Miles</strong> shared file <strong>DICOM File Name</strong>',
|
|
25
|
+
timestamp: addDays(new Date(), -1),
|
|
26
|
+
isUnread: false,
|
|
27
|
+
type: NotificationType.Download,
|
|
28
|
+
onDownload: () => {}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
avatar: drMiles,
|
|
32
|
+
title: '<strong>Dr. Miles</strong> invited you to <strong>DICOM File Name</strong>',
|
|
33
|
+
timestamp: addDays(new Date(), -2),
|
|
34
|
+
isUnread: false,
|
|
35
|
+
type: NotificationType.Share,
|
|
36
|
+
onShare: () => {}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
avatar: drMiles,
|
|
40
|
+
title: '<strong>Dr. Miles</strong> created an annotation in <strong>File Name</strong>',
|
|
41
|
+
timestamp: addDays(new Date(), -43),
|
|
42
|
+
isUnread: false,
|
|
43
|
+
type: NotificationType.Plain
|
|
44
|
+
}
|
|
45
|
+
];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ViewerPayload } from '@3cr/viewer-types-ts';
|
|
2
|
+
|
|
3
|
+
export const demoPayload: ViewerPayload = {
|
|
4
|
+
Url: 'https://webgl-3dr.singular.health/demo/scans/chest_v6.3vxl',
|
|
5
|
+
DecryptionKey: {
|
|
6
|
+
Iv: 'xDt9F6CjVSZElwoS5No77Q==',
|
|
7
|
+
Key: 'Oc5F5YatHrB0MHRcphh/DlDKUqG5mpbniEm+fWPooag='
|
|
8
|
+
}
|
|
9
|
+
};
|