@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,32 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import ShFlatIconBtn from '@/components/ShFlatIconBtn.vue';
|
|
3
|
+
|
|
4
|
+
describe('ShFlatIconBtn', () => {
|
|
5
|
+
const mockProps = {
|
|
6
|
+
text: 'Close',
|
|
7
|
+
icon: 'close'
|
|
8
|
+
};
|
|
9
|
+
const createWrapper = (props = {}, slots = {}) =>
|
|
10
|
+
mount(ShFlatIconBtn, {
|
|
11
|
+
props: {
|
|
12
|
+
...mockProps,
|
|
13
|
+
...props
|
|
14
|
+
},
|
|
15
|
+
slots: {
|
|
16
|
+
append: `<span></span>`
|
|
17
|
+
},
|
|
18
|
+
attrs: {
|
|
19
|
+
'data-testid': 'button'
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
it('renders correctly with text and icon', () => {
|
|
23
|
+
const wrapper = createWrapper();
|
|
24
|
+
expect(wrapper.find('[data-testid="icon"]').exists()).toBe(true);
|
|
25
|
+
expect(wrapper.text().includes('Close')).toBeTruthy();
|
|
26
|
+
});
|
|
27
|
+
it('renders correctly without an icon', () => {
|
|
28
|
+
const wrapper = createWrapper({ icon: undefined });
|
|
29
|
+
expect(wrapper.find('[data-testid="icon"]').exists()).toBe(false);
|
|
30
|
+
expect(wrapper.text().includes('Close')).toBeTruthy();
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import ShPlainIconBtn from '@/components/ShPlainIconBtn.vue';
|
|
3
|
+
|
|
4
|
+
describe('ShPlainIconBtn', () => {
|
|
5
|
+
const mockProps = {
|
|
6
|
+
text: 'Close',
|
|
7
|
+
icon: 'close',
|
|
8
|
+
border: false
|
|
9
|
+
};
|
|
10
|
+
const createWrapper = (props = {}, slots = {}) =>
|
|
11
|
+
mount(ShPlainIconBtn, {
|
|
12
|
+
props: {
|
|
13
|
+
...mockProps,
|
|
14
|
+
...props
|
|
15
|
+
},
|
|
16
|
+
slots: {
|
|
17
|
+
append: `<span></span>`
|
|
18
|
+
},
|
|
19
|
+
attrs: {
|
|
20
|
+
'data-testid': 'button'
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
it('renders correctly with text and icon', () => {
|
|
24
|
+
const wrapper = createWrapper();
|
|
25
|
+
expect(wrapper.find('[data-testid="icon"]').exists()).toBe(true);
|
|
26
|
+
expect(wrapper.text().includes('Close')).toBeTruthy();
|
|
27
|
+
});
|
|
28
|
+
it('renders if props.border is true', () => {
|
|
29
|
+
const wrapper = createWrapper({ border: true });
|
|
30
|
+
expect(wrapper.find('[data-testid="button"]').exists()).toBe(true);
|
|
31
|
+
});
|
|
32
|
+
it('renders correctly without an icon', () => {
|
|
33
|
+
const wrapper = createWrapper({ icon: undefined });
|
|
34
|
+
expect(wrapper.find('[data-testid="icon"]').exists()).toBe(false);
|
|
35
|
+
expect(wrapper.text().includes('Close')).toBeTruthy();
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import ShSelect from '@/components/ShSelect.vue';
|
|
3
|
+
|
|
4
|
+
describe('ShSelect', () => {
|
|
5
|
+
const mockProps = {
|
|
6
|
+
label: 'Label',
|
|
7
|
+
childRef: 'childRef'
|
|
8
|
+
};
|
|
9
|
+
const createWrapper = (props = {}, slots = {}) =>
|
|
10
|
+
mount(ShSelect, {
|
|
11
|
+
props: {
|
|
12
|
+
...mockProps,
|
|
13
|
+
...props
|
|
14
|
+
},
|
|
15
|
+
slots: {
|
|
16
|
+
append: `<span></span>`
|
|
17
|
+
},
|
|
18
|
+
attrs: {
|
|
19
|
+
'data-testid': 'button'
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
it('renders correctly if label is a string', () => {
|
|
23
|
+
const wrapper = createWrapper();
|
|
24
|
+
expect(wrapper.find('[data-testid="label"]').exists()).toBe(true);
|
|
25
|
+
});
|
|
26
|
+
it('does not renders correctly if label is null', () => {
|
|
27
|
+
const wrapper = createWrapper({ label: false });
|
|
28
|
+
expect(wrapper.find('[data-testid="label"]').exists()).toBe(false);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import ShTextField from '@/components/ShTextField.vue';
|
|
3
|
+
|
|
4
|
+
describe('ShTextField', () => {
|
|
5
|
+
const mockProps = {
|
|
6
|
+
label: 'Label',
|
|
7
|
+
childRef: 'childRef'
|
|
8
|
+
};
|
|
9
|
+
const createWrapper = (props = {}, slots = {}) =>
|
|
10
|
+
mount(ShTextField, {
|
|
11
|
+
props: {
|
|
12
|
+
...mockProps,
|
|
13
|
+
...props
|
|
14
|
+
},
|
|
15
|
+
slots: {
|
|
16
|
+
append: `<span></span>`
|
|
17
|
+
},
|
|
18
|
+
attrs: {
|
|
19
|
+
'data-testid': 'button'
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
it('renders correctly if label is a string', () => {
|
|
23
|
+
const wrapper = createWrapper({ label: 'Label' });
|
|
24
|
+
expect(wrapper.find('[data-testid="label"]').exists()).toBe(true);
|
|
25
|
+
});
|
|
26
|
+
it('does not renders correctly if label is null', () => {
|
|
27
|
+
const wrapper = createWrapper({ label: false });
|
|
28
|
+
expect(wrapper.find('[data-testid="label"]').exists()).toBe(false);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import ShTextarea from '@/components/ShTextarea.vue';
|
|
3
|
+
|
|
4
|
+
describe('ShTextarea', () => {
|
|
5
|
+
const mockProps = {
|
|
6
|
+
label: 'Label',
|
|
7
|
+
childRef: 'childRef'
|
|
8
|
+
};
|
|
9
|
+
const createWrapper = (props = {}, slots = {}) =>
|
|
10
|
+
mount(ShTextarea, {
|
|
11
|
+
props: {
|
|
12
|
+
...mockProps,
|
|
13
|
+
...props
|
|
14
|
+
},
|
|
15
|
+
slots: {
|
|
16
|
+
append: `<span></span>`
|
|
17
|
+
},
|
|
18
|
+
attrs: {
|
|
19
|
+
'data-testid': 'button'
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
it('renders correctly if label is a string', () => {
|
|
23
|
+
const wrapper = createWrapper({ label: 'Label' });
|
|
24
|
+
expect(wrapper.find('[data-testid="label"]').exists()).toBe(true);
|
|
25
|
+
});
|
|
26
|
+
it('does not renders correctly if label is null', () => {
|
|
27
|
+
const wrapper = createWrapper({ label: false });
|
|
28
|
+
expect(wrapper.find('[data-testid="label"]').exists()).toBe(false);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="drop-zone"
|
|
4
|
+
@drop.prevent="handleDrop"
|
|
5
|
+
@dragover.prevent="onDragOver"
|
|
6
|
+
@dragenter.prevent="onDragEnter"
|
|
7
|
+
@dragleave.prevent="onDragLeave"
|
|
8
|
+
:class="{ 'drag-over': isDragOver }"
|
|
9
|
+
@click="handleClick"
|
|
10
|
+
>
|
|
11
|
+
<div class="ma-4">
|
|
12
|
+
<div class="icon-container mx-auto mb-1">
|
|
13
|
+
<v-icon class="minsk-500" icon="cloud" size="large" />
|
|
14
|
+
</div>
|
|
15
|
+
<p class="shark-600 text-sm-regular">
|
|
16
|
+
<span class="minsk-900 text-sm-semibold">Click to upload</span> or drag and drop <br />
|
|
17
|
+
<span class="shark-600 text-xs-regular">DICOM, UNITY, PNG, JPG, or PDF (max. 200 mb)</span>
|
|
18
|
+
</p>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
import { ref } from 'vue';
|
|
25
|
+
|
|
26
|
+
interface Props {
|
|
27
|
+
onFilesDropped: (files: File[]) => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const props = defineProps<Props>();
|
|
31
|
+
|
|
32
|
+
const isDragOver = ref<boolean>(false);
|
|
33
|
+
|
|
34
|
+
function handleDrop(event: DragEvent): void {
|
|
35
|
+
isDragOver.value = false;
|
|
36
|
+
if (event.dataTransfer?.files) {
|
|
37
|
+
const files = Array.from(event.dataTransfer.files);
|
|
38
|
+
props.onFilesDropped(files);
|
|
39
|
+
} else {
|
|
40
|
+
console.warn('No files were dropped.');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function handleClick(): void {
|
|
45
|
+
const input = document.createElement('input');
|
|
46
|
+
input.type = 'file';
|
|
47
|
+
input.accept = '.dcm,.unity,.png,.jpg,.jpeg,.pdf';
|
|
48
|
+
input.multiple = true;
|
|
49
|
+
input.onchange = () => {
|
|
50
|
+
if (input.files && input.files.length > 0) {
|
|
51
|
+
const selectedFiles = Array.from(input.files);
|
|
52
|
+
props.onFilesDropped(selectedFiles);
|
|
53
|
+
} else {
|
|
54
|
+
console.warn('No files were selected.');
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
input.click();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function onDragOver(): void {
|
|
61
|
+
isDragOver.value = true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function onDragEnter(): void {
|
|
65
|
+
isDragOver.value = true;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function onDragLeave(): void {
|
|
69
|
+
isDragOver.value = false;
|
|
70
|
+
}
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<style scoped>
|
|
74
|
+
.drop-zone {
|
|
75
|
+
width: 503px;
|
|
76
|
+
height: auto;
|
|
77
|
+
border: transparent;
|
|
78
|
+
border-radius: 8px;
|
|
79
|
+
text-align: center;
|
|
80
|
+
line-height: 20px;
|
|
81
|
+
font-size: 16px;
|
|
82
|
+
background-color: #f7f7f8;
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.drag-over {
|
|
87
|
+
background-color: #c9d7fc;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.drop-zone p {
|
|
91
|
+
margin: 0;
|
|
92
|
+
color: #333;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.icon-container {
|
|
96
|
+
background-color: white;
|
|
97
|
+
height: 40px;
|
|
98
|
+
width: 40px;
|
|
99
|
+
border-radius: 8px;
|
|
100
|
+
display: flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-menu v-model="profileDropdown.modal" :target="[profileDropdown.x, profileDropdown.y]">
|
|
3
|
+
<v-card id="demo-menu-card" class="pa-2">
|
|
4
|
+
<div class="px-4 py-2 grid-avatar">
|
|
5
|
+
<v-badge icon="edit" color="minsk_900" @click="" offset-x="55" offset-y="52">
|
|
6
|
+
<v-img :src="userAvatar" width="64px" height="64px" rounded="circle" style="opacity: 1 !important" />
|
|
7
|
+
</v-badge>
|
|
8
|
+
<div class="ml-2">
|
|
9
|
+
<v-list-item-title>
|
|
10
|
+
<span>{{ t('data.profiles[0].name') }}</span>
|
|
11
|
+
</v-list-item-title>
|
|
12
|
+
<v-list-item-subtitle>
|
|
13
|
+
<span>{{ t('data.profiles[0].licence') }}</span>
|
|
14
|
+
</v-list-item-subtitle>
|
|
15
|
+
<v-btn variant="flat" size="small" color="minsk_900" class="mt-1">
|
|
16
|
+
<span>{{ t('labels.editProfile') }}</span>
|
|
17
|
+
</v-btn>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<v-divider class="py-1" />
|
|
21
|
+
<div class="px-4 py-2 shark-600 text-sm-semibold">
|
|
22
|
+
<span>{{ t('labels.switchAccounts') }}</span>
|
|
23
|
+
</div>
|
|
24
|
+
<v-list density="compact" class="py-0 pb-1">
|
|
25
|
+
<v-list-item link prepend-avatar="https://cdn.vuetifyjs.com/images/john.jpg">
|
|
26
|
+
<v-list-item-title>
|
|
27
|
+
<span>{{ t('data.profiles[1].name') }}</span>
|
|
28
|
+
</v-list-item-title>
|
|
29
|
+
<v-list-item-subtitle>
|
|
30
|
+
<span>{{ t('data.profiles[1].licence') }}</span>
|
|
31
|
+
</v-list-item-subtitle>
|
|
32
|
+
</v-list-item>
|
|
33
|
+
</v-list>
|
|
34
|
+
<v-list density="compact" class="py-0 pb-1">
|
|
35
|
+
<v-list-item link>
|
|
36
|
+
<template #prepend>
|
|
37
|
+
<v-icon size="small" icon="add" />
|
|
38
|
+
</template>
|
|
39
|
+
<v-list-item-title>
|
|
40
|
+
<span>{{ t('labels.addAccount') }}</span>
|
|
41
|
+
</v-list-item-title>
|
|
42
|
+
</v-list-item>
|
|
43
|
+
</v-list>
|
|
44
|
+
<v-divider class="pb-1" />
|
|
45
|
+
<v-list density="compact" class="py-0 pb-1">
|
|
46
|
+
<v-list-item link>
|
|
47
|
+
<template #prepend>
|
|
48
|
+
<v-icon size="small" icon="credit_score" />
|
|
49
|
+
</template>
|
|
50
|
+
<v-list-item-title>
|
|
51
|
+
<span>{{ t('labels.manageSubscription') }}</span>
|
|
52
|
+
</v-list-item-title>
|
|
53
|
+
</v-list-item>
|
|
54
|
+
<v-list-item link>
|
|
55
|
+
<template #prepend>
|
|
56
|
+
<v-icon size="small" icon="credit_card" />
|
|
57
|
+
</template>
|
|
58
|
+
<v-list-item-title>
|
|
59
|
+
<span>{{ t('labels.billingSettings') }}</span>
|
|
60
|
+
</v-list-item-title>
|
|
61
|
+
</v-list-item>
|
|
62
|
+
<v-list-item link>
|
|
63
|
+
<template #prepend>
|
|
64
|
+
<v-icon size="small" icon="security" />
|
|
65
|
+
</template>
|
|
66
|
+
<v-list-item-title>
|
|
67
|
+
<span>{{ t('labels.securitySettings') }}</span>
|
|
68
|
+
</v-list-item-title>
|
|
69
|
+
</v-list-item>
|
|
70
|
+
</v-list>
|
|
71
|
+
<v-divider class="pb-1" />
|
|
72
|
+
<v-list density="compact" class="py-0 pb-1">
|
|
73
|
+
<v-list-item class="py-2" link @click="purchaseCredits">
|
|
74
|
+
<template #prepend>
|
|
75
|
+
<v-icon size="small" icon="toll" />
|
|
76
|
+
</template>
|
|
77
|
+
<v-list-item-title>
|
|
78
|
+
<span>{{ t('labels.credits') }}</span>
|
|
79
|
+
</v-list-item-title>
|
|
80
|
+
<v-list-item-subtitle class="sub-link">
|
|
81
|
+
<span>{{ t('labels.addMoreCredits') }}</span>
|
|
82
|
+
</v-list-item-subtitle>
|
|
83
|
+
<template v-slot:append>
|
|
84
|
+
<v-badge class="prog-3-5" content="3 / 5" inline></v-badge>
|
|
85
|
+
</template>
|
|
86
|
+
</v-list-item>
|
|
87
|
+
<v-list-item class="py-2" link @click="cloudStorage">
|
|
88
|
+
<template #prepend>
|
|
89
|
+
<v-icon size="small" icon="cloud_done" />
|
|
90
|
+
</template>
|
|
91
|
+
<v-list-item-title>
|
|
92
|
+
<span>{{ t('labels.cloudStorage') }}</span>
|
|
93
|
+
</v-list-item-title>
|
|
94
|
+
<v-list-item-subtitle>
|
|
95
|
+
<v-progress-linear class="mt-2" :model-value="50" color="minsk_500" bg-color="shark_200" rounded />
|
|
96
|
+
</v-list-item-subtitle>
|
|
97
|
+
<template v-slot:append>
|
|
98
|
+
<v-badge class="prog-1-5" content="1 / 3" inline></v-badge>
|
|
99
|
+
</template>
|
|
100
|
+
</v-list-item>
|
|
101
|
+
</v-list>
|
|
102
|
+
<v-divider class="pb-1" />
|
|
103
|
+
<v-list density="compact" class="py-0 pb-1">
|
|
104
|
+
<v-list-item class="py-2" link>
|
|
105
|
+
<template #prepend>
|
|
106
|
+
<v-icon size="small"><font-awesome-icon :icon="faApple" /></v-icon>
|
|
107
|
+
</template>
|
|
108
|
+
<v-list-item-title>
|
|
109
|
+
<span>{{ t('labels.ios') }}</span>
|
|
110
|
+
</v-list-item-title>
|
|
111
|
+
<v-list-item-subtitle class="sub-link">
|
|
112
|
+
<span>{{ t('labels.findOutMore') }}</span>
|
|
113
|
+
</v-list-item-subtitle>
|
|
114
|
+
</v-list-item>
|
|
115
|
+
<v-list-item class="py-2" link>
|
|
116
|
+
<template #prepend>
|
|
117
|
+
<v-icon size="small"><font-awesome-icon :icon="faAndroid" /></v-icon>
|
|
118
|
+
</template>
|
|
119
|
+
<v-list-item-title>
|
|
120
|
+
<span>{{ t('labels.android') }}</span>
|
|
121
|
+
</v-list-item-title>
|
|
122
|
+
<v-list-item-subtitle class="sub-link">
|
|
123
|
+
<span>{{ t('labels.findOutMore') }}</span>
|
|
124
|
+
</v-list-item-subtitle>
|
|
125
|
+
</v-list-item>
|
|
126
|
+
<v-list-item class="py-2" link>
|
|
127
|
+
<template #prepend>
|
|
128
|
+
<v-icon size="small">
|
|
129
|
+
<font-awesome-icon :icon="faAndroid" />
|
|
130
|
+
</v-icon>
|
|
131
|
+
</template>
|
|
132
|
+
<v-list-item-title>
|
|
133
|
+
<span>{{ t('labels.arVrAddon') }}</span>
|
|
134
|
+
</v-list-item-title>
|
|
135
|
+
<v-list-item-subtitle>
|
|
136
|
+
<span>+{{ t('labels.perMonth', { price: addonPrice }) }}</span>
|
|
137
|
+
</v-list-item-subtitle>
|
|
138
|
+
</v-list-item>
|
|
139
|
+
</v-list>
|
|
140
|
+
<v-divider class="pb-1" />
|
|
141
|
+
<v-list density="compact" class="py-0 pb-0">
|
|
142
|
+
<v-list-item link @click="close">
|
|
143
|
+
<template #prepend>
|
|
144
|
+
<v-icon size="small" icon="west" />
|
|
145
|
+
</template>
|
|
146
|
+
<v-list-item-title>
|
|
147
|
+
<span>{{ t('labels.backToPortal') }}</span>
|
|
148
|
+
</v-list-item-title>
|
|
149
|
+
</v-list-item>
|
|
150
|
+
</v-list>
|
|
151
|
+
</v-card>
|
|
152
|
+
</v-menu>
|
|
153
|
+
</template>
|
|
154
|
+
|
|
155
|
+
<script setup lang="ts">
|
|
156
|
+
import { storeToRefs } from 'pinia';
|
|
157
|
+
import { faAndroid, faApple } from '@fortawesome/free-brands-svg-icons';
|
|
158
|
+
import { useDemoStore } from '@/stores/demo.store';
|
|
159
|
+
import { useViewerStore } from '@/stores/viewer.store';
|
|
160
|
+
import { computed, ref } from 'vue';
|
|
161
|
+
import { useI18n } from 'vue-i18n';
|
|
162
|
+
|
|
163
|
+
type Emits = {
|
|
164
|
+
close: [void];
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
const emit = defineEmits<Emits>();
|
|
168
|
+
|
|
169
|
+
const { t } = useI18n();
|
|
170
|
+
const { profileDropdown } = useDemoStore();
|
|
171
|
+
const { options } = storeToRefs(useViewerStore());
|
|
172
|
+
|
|
173
|
+
const addonPrice = ref<string>('2.95');
|
|
174
|
+
|
|
175
|
+
const userAvatar = computed(() => {
|
|
176
|
+
const name = options.value.user?.name || 'Unknown User';
|
|
177
|
+
return options.value.user?.avatarUrl || name[0];
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
async function purchaseCredits(): Promise<void> {
|
|
181
|
+
if (options.value.onPurchaseCredits) {
|
|
182
|
+
await options.value.onPurchaseCredits();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
async function cloudStorage(): Promise<void> {
|
|
187
|
+
if (options.value.onCloudStorage) {
|
|
188
|
+
// TODO: implement
|
|
189
|
+
await options.value.onCloudStorage([]);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
async function close(): Promise<void> {
|
|
194
|
+
if (options.value.onExit) {
|
|
195
|
+
await options.value.onExit();
|
|
196
|
+
}
|
|
197
|
+
emit('close');
|
|
198
|
+
}
|
|
199
|
+
</script>
|
|
200
|
+
|
|
201
|
+
<style lang="scss">
|
|
202
|
+
#demo-menu-card {
|
|
203
|
+
width: 312px;
|
|
204
|
+
border-radius: var(--base, 8px);
|
|
205
|
+
|
|
206
|
+
/* Box shadow/md */
|
|
207
|
+
box-shadow:
|
|
208
|
+
0px 2px 4px -2px rgba(29, 29, 73, 0.1),
|
|
209
|
+
0px 4px 6px -1px rgba(29, 29, 73, 0.1);
|
|
210
|
+
|
|
211
|
+
.v-list-item {
|
|
212
|
+
.v-icon--size-small {
|
|
213
|
+
font-size: 24px;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.v-list-item-subtitle {
|
|
218
|
+
&.sub-link {
|
|
219
|
+
color: #2e3176;
|
|
220
|
+
text-decoration-line: underline;
|
|
221
|
+
}
|
|
222
|
+
.v-progress-linear__background {
|
|
223
|
+
opacity: 1 !important;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.v-list-item__spacer {
|
|
228
|
+
width: 12px;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.v-badge {
|
|
232
|
+
&.prog-1-5 .v-badge__wrapper {
|
|
233
|
+
& {
|
|
234
|
+
border: 1px solid rgb(var(--v-theme-minsk_200)) !important;
|
|
235
|
+
background: rgb(var(--v-theme-minsk_050)) !important;
|
|
236
|
+
}
|
|
237
|
+
.v-badge__badge {
|
|
238
|
+
color: rgb(var(--v-theme-minsk_900)) !important;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
&.prog-2-5 .v-badge__wrapper {
|
|
242
|
+
& {
|
|
243
|
+
border: 1px solid rgb(var(--v-theme-minsk_200)) !important;
|
|
244
|
+
background: rgb(var(--v-theme-minsk_050)) !important;
|
|
245
|
+
}
|
|
246
|
+
.v-badge__badge {
|
|
247
|
+
color: rgb(var(--v-theme-minsk_900)) !important;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
&.prog-3-5 .v-badge__wrapper {
|
|
251
|
+
& {
|
|
252
|
+
border: 1px solid rgb(var(--v-theme-lightning_200)) !important;
|
|
253
|
+
background: rgb(var(--v-theme-lightning_050)) !important;
|
|
254
|
+
}
|
|
255
|
+
.v-badge__badge {
|
|
256
|
+
color: rgb(var(--v-theme-lightning_800)) !important;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
&.prog-4-5 .v-badge__wrapper {
|
|
260
|
+
& {
|
|
261
|
+
border: 1px solid rgb(var(--v-theme-lightning_200)) !important;
|
|
262
|
+
background: rgb(var(--v-theme-lightning_050)) !important;
|
|
263
|
+
}
|
|
264
|
+
.v-badge__badge {
|
|
265
|
+
color: rgb(var(--v-theme-lightning_800)) !important;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
&.prog-5-5 .v-badge__wrapper {
|
|
269
|
+
& {
|
|
270
|
+
border: 1px solid rgb(var(--v-theme-amaranth_200)) !important;
|
|
271
|
+
background: rgb(var(--v-theme-amaranth_050)) !important;
|
|
272
|
+
}
|
|
273
|
+
.v-badge__badge {
|
|
274
|
+
color: rgb(var(--v-theme-amaranth_700)) !important;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.v-badge__wrapper {
|
|
280
|
+
& {
|
|
281
|
+
margin: 0 !important;
|
|
282
|
+
padding: 1px 6px !important;
|
|
283
|
+
border-radius: var(--base, 8px) !important;
|
|
284
|
+
}
|
|
285
|
+
.v-badge__badge {
|
|
286
|
+
& {
|
|
287
|
+
background: unset !important;
|
|
288
|
+
padding: 0 !important;
|
|
289
|
+
font-size: 12px;
|
|
290
|
+
font-style: normal;
|
|
291
|
+
font-weight: 600;
|
|
292
|
+
line-height: 16px; /* 133.333% */
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.v-ripple__container {
|
|
298
|
+
border-radius: var(--base, 4px);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.grid-avatar {
|
|
302
|
+
display: grid;
|
|
303
|
+
flex: none;
|
|
304
|
+
grid-template-areas: 'prepend content append';
|
|
305
|
+
grid-template-columns: max-content 1fr auto;
|
|
306
|
+
outline: none;
|
|
307
|
+
max-width: 100%;
|
|
308
|
+
padding: 4px 16px;
|
|
309
|
+
position: relative;
|
|
310
|
+
text-decoration: none;
|
|
311
|
+
.v-btn {
|
|
312
|
+
height: 28px !important;
|
|
313
|
+
.v-btn__content {
|
|
314
|
+
font-size: 12px !important;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
.v-badge__wrapper {
|
|
318
|
+
& {
|
|
319
|
+
color: rgb(var(--v-theme-minsk_900)) !important;
|
|
320
|
+
margin: 0 !important;
|
|
321
|
+
padding: 1px 6px !important;
|
|
322
|
+
border-radius: var(--base, 8px) !important;
|
|
323
|
+
}
|
|
324
|
+
.v-badge__badge {
|
|
325
|
+
& {
|
|
326
|
+
color: rgb(var(--v-theme-minsk_900)) !important;
|
|
327
|
+
cursor: pointer !important;
|
|
328
|
+
border-radius: var(--sm, 3.333px);
|
|
329
|
+
background: #fff !important;
|
|
330
|
+
box-shadow:
|
|
331
|
+
0px 0.714px 1.429px -0.714px rgba(29, 29, 73, 0.1),
|
|
332
|
+
0px 1.429px 2.143px -0.357px rgba(29, 29, 73, 0.1);
|
|
333
|
+
padding: 0 !important;
|
|
334
|
+
font-size: 12px;
|
|
335
|
+
font-style: normal;
|
|
336
|
+
font-weight: 600;
|
|
337
|
+
line-height: 16px; /* 133.333% */
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-dialog v-model="modalState" max-width="680">
|
|
3
|
+
<v-card>
|
|
4
|
+
<v-card-title class="text-center text-h5">
|
|
5
|
+
<span>{{ demoTitle }}</span>
|
|
6
|
+
</v-card-title>
|
|
7
|
+
<v-card-text class="text-justify" v-for="subtitle in demoSubtitles" :key="subtitle">
|
|
8
|
+
<p>{{ subtitle }}</p>
|
|
9
|
+
</v-card-text>
|
|
10
|
+
<v-card-actions class="mt-4">
|
|
11
|
+
<v-btn data-testid="close" color="error" @click="modalState = false" :disabled="!isModalOpen">
|
|
12
|
+
<span>{{ t('labels.continueWithDemo') }}</span>
|
|
13
|
+
</v-btn>
|
|
14
|
+
<v-spacer />
|
|
15
|
+
<v-btn
|
|
16
|
+
v-if="demoType === DemoType.Licence"
|
|
17
|
+
data-testid="confirm"
|
|
18
|
+
variant="flat"
|
|
19
|
+
color="success"
|
|
20
|
+
@click="enquire"
|
|
21
|
+
>
|
|
22
|
+
<span>{{ t('labels.enquireAboutIntegration') }}</span>
|
|
23
|
+
</v-btn>
|
|
24
|
+
<v-btn v-else data-testid="confirm" variant="flat" color="success" @click="purchase">
|
|
25
|
+
<span>{{ t('labels.purchase3dicom') }}</span>
|
|
26
|
+
</v-btn>
|
|
27
|
+
</v-card-actions>
|
|
28
|
+
</v-card>
|
|
29
|
+
</v-dialog>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script setup lang="ts">
|
|
33
|
+
import { storeToRefs } from 'pinia';
|
|
34
|
+
import { openUrl } from '@/functions/openUrl';
|
|
35
|
+
import { useDemoStore } from '@/stores/demo.store';
|
|
36
|
+
import { PRICING_URL, SUPPORT_URL } from '@/constants';
|
|
37
|
+
import { useI18n } from 'vue-i18n';
|
|
38
|
+
import { DemoType } from '@3cr/viewer-types-ts';
|
|
39
|
+
|
|
40
|
+
interface Props {
|
|
41
|
+
isModalOpen?: boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
withDefaults(defineProps<Props>(), {
|
|
45
|
+
isModalOpen: true
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const { t } = useI18n();
|
|
49
|
+
const { demoTitle, demoSubtitles, demoType } = storeToRefs(useDemoStore());
|
|
50
|
+
|
|
51
|
+
const modalState = defineModel('modal', { default: false });
|
|
52
|
+
|
|
53
|
+
function enquire(): void {
|
|
54
|
+
openUrl(SUPPORT_URL);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function purchase(): void {
|
|
58
|
+
openUrl(PRICING_URL);
|
|
59
|
+
}
|
|
60
|
+
</script>
|