@3cr/viewer-browser 0.0.162 → 0.0.194
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 +8 -6
- package/__tests__/index.spec.ts +31 -24
- package/components.d.ts +32 -0
- package/dist/Viewer3CR.js +44 -27
- package/dist/Viewer3CR.mjs +22731 -17742
- package/dist/Viewer3CR.umd.js +44 -27
- package/index.html +5 -8
- package/index.ts +7 -2
- package/package.json +4 -2
- package/playground/index.html +6 -4
- package/src/App.vue +12 -4
- package/src/__tests__/app.spec.ts +2 -13
- package/src/assets/magic_wand.svg +24 -0
- package/src/components/WebGL3DR.vue +53 -92
- package/src/components/__tests__/webgl3dr.spec.ts +29 -48
- package/src/{demo → components/demo}/DemoModal.vue +1 -1
- package/src/{demo → components/demo}/DemoPatientModal.vue +4 -1
- package/src/components/demo/__tests__/DemoModal.spec.ts +25 -0
- package/src/components/demo/__tests__/DemoPatientModal.spec.ts +37 -0
- package/src/components/demo/__tests__/options.spec.ts +25 -0
- package/src/components/demo/licence/DemoLicenceEnableCloudStorageModal.vue +64 -0
- package/src/{demo → components/demo}/licence/DemoLicenceInfoModal.vue +5 -4
- package/src/{demo → components/demo}/licence/DemoLicenceSendToPartyModal.vue +6 -4
- package/src/{demo → components/demo}/licence/DemoLicenceShareToMobileModal.vue +8 -6
- package/src/components/demo/licence/__tests__/DemoLicenceEnableCloudStorageModal.spec.ts +37 -0
- package/src/components/demo/licence/__tests__/DemoLicenceInfoModal.spec.ts +37 -0
- package/src/components/demo/licence/__tests__/DemoLicenceSendToPartyModal.spec.ts +36 -0
- package/src/components/demo/licence/__tests__/DemoLicenceShareToMobileModal.spec.ts +51 -0
- package/src/{demo → components/demo}/options.ts +18 -20
- package/src/components/demo/patient/DemoPatientEnableCloudStorageModal.vue +64 -0
- package/src/{demo → components/demo}/patient/DemoPatientInfoModal.vue +5 -4
- package/src/{demo → components/demo}/patient/DemoPatientSendToPartyModal.vue +4 -3
- package/src/{demo → components/demo}/patient/DemoPatientShareToMobileModal.vue +8 -6
- package/src/components/demo/patient/__tests__/DemoPatientEnableCloudStorageModal.spec.ts +37 -0
- package/src/components/demo/patient/__tests__/DemoPatientInfoModal.spec.ts +37 -0
- package/src/components/demo/patient/__tests__/DemoPatientSendToPartyModal.spec.ts +36 -0
- package/src/components/demo/patient/__tests__/DemoPatientShareToMobileModal.spec.ts +51 -0
- package/src/components/loading/LoadingSpinner.vue +1 -1
- package/src/components/modal/ActionRail.vue +96 -0
- package/src/components/modal/AskAI.vue +250 -0
- package/src/components/modal/CloseViewerModal.vue +104 -0
- package/src/components/modal/MftpWebGL3DRModal.vue +415 -834
- package/src/components/modal/ViewerActionRail.vue +123 -0
- package/src/components/modal/ViewerAnnotationModal.vue +115 -0
- package/src/components/modal/ViewerAnnotations.vue +283 -0
- package/src/components/modal/ViewerDisplaySettings.vue +102 -0
- package/src/components/modal/ViewerNavigationDrawer.vue +90 -0
- package/src/components/modal/ViewerNavigationDrawerContent.vue +126 -0
- package/src/components/modal/ViewerNavigationDrawerFooter.vue +111 -0
- package/src/components/modal/ViewerNavigationDrawerHeader.vue +63 -0
- package/src/components/modal/__tests__/CloseViewerModal.spec.ts +60 -0
- package/src/components/modal/__tests__/{mftp-webgl-3dr-modal.spec.ts → MftpWebGL3DRModal.spec.ts} +47 -298
- package/src/components/modal/__tests__/ViewerAnnotationModal.spec.ts +79 -0
- package/src/components/modal/__tests__/ViewerDisplaySettings.spec.ts +61 -0
- package/src/components/modal/__tests__/ViewerNavigationDrawer.spec.ts +32 -0
- package/src/components/modal/__tests__/ViewerNavigationDrawerContent.spec.ts +29 -0
- package/src/components/modal/__tests__/ViewerNavigationDrawerFooter.spec.ts +43 -0
- package/src/components/modal/__tests__/ViewerNavigationDrawerHeader.spec.ts +37 -0
- package/src/components/modal/actions/Action.vue +40 -0
- package/src/components/modal/actions/Flip3dAction.vue +79 -0
- package/src/components/modal/actions/FlipHorizontalAction.vue +36 -0
- package/src/components/modal/actions/FlipVerticalAction.vue +36 -0
- package/src/components/modal/actions/FullscreenAction.vue +47 -0
- package/src/components/modal/actions/NavigationCubeAction.vue +33 -0
- package/src/components/modal/actions/PanAction.vue +78 -0
- package/src/components/modal/actions/ResetViewAction.vue +29 -0
- package/src/components/modal/actions/Rotate2dAction.vue +78 -0
- package/src/components/modal/actions/Slice3dAction.vue +71 -0
- package/src/components/modal/actions/ZoomAction.vue +70 -0
- package/src/components/modal/actions/__tests__/Action.spec.ts +29 -0
- package/src/components/modal/actions/__tests__/Flip3dAction.spec.ts +48 -0
- package/src/components/modal/actions/__tests__/FlipHorizontalAction.spec.ts +17 -0
- package/src/components/modal/actions/__tests__/FlipVerticalAction.spec.ts +17 -0
- package/src/components/modal/actions/__tests__/FullscreenAction.spec.ts +28 -0
- package/src/components/modal/actions/__tests__/NavigationCubeAction.spec.ts +25 -0
- package/src/components/modal/actions/__tests__/PanAction.spec.ts +46 -0
- package/src/components/modal/actions/__tests__/ResetViewAction.spec.ts +17 -0
- package/src/components/modal/actions/__tests__/Rotate2dAction.spec.ts +23 -0
- package/src/components/modal/actions/__tests__/Slice3dAction.spec.ts +14 -0
- package/src/components/modal/actions/__tests__/ZoomAction.spec.ts +34 -0
- package/src/components/modal/composables/__tests__/useNavigationCubeObserver.spec.ts +56 -0
- package/src/components/modal/composables/useEventListener.ts +22 -0
- package/src/components/modal/composables/useNavigationCubeObserver.ts +104 -0
- package/src/components/selectors/ValueSelector.vue +30 -33
- package/src/components/selectors/__tests__/value-selector.spec.ts +1 -1
- package/src/components/sliders/DoubleSliderSelector.vue +79 -71
- package/src/components/sliders/VerticalSliderSelector.vue +12 -17
- package/src/components/sliders/__tests__/double-slider-selector.spec.ts +1 -1
- package/src/components/sliders/__tests__/vertical-slider-selector.spec.ts +1 -1
- package/src/dataLayer/__tests__/clamp.spec.ts +16 -0
- package/src/dataLayer/__tests__/eventHandlers.spec.ts +38 -0
- package/src/dataLayer/__tests__/getIconForPreset.spec.ts +40 -0
- package/src/dataLayer/__tests__/patchDataOverlay.spec.ts +88 -0
- package/src/dataLayer/__tests__/scanState.spec.ts +93 -0
- package/src/dataLayer/__tests__/useViewer3cr.spec.ts +10 -0
- package/src/dataLayer/__tests__/viewer3cr.spec.ts +331 -0
- package/src/dataLayer/clamp.ts +9 -0
- package/src/dataLayer/eventHandlers.ts +26 -0
- package/src/dataLayer/patchDataOverlay.ts +101 -0
- package/src/dataLayer/scanState.ts +105 -26
- package/src/dataLayer/useViewer3cr.ts +7 -0
- package/src/dataLayer/viewer3cr.ts +410 -0
- package/src/helpers/__tests__/layout-overlay-style.spec.ts +24 -22
- package/src/helpers/__tests__/model-helper.spec.ts +44 -13
- package/src/helpers/layoutOverlayStyle.ts +16 -27
- package/src/helpers/modelHelper.ts +62 -10
- package/src/models/Callbacks.ts +2 -2
- package/src/models/LoadViewerOptions.ts +2 -0
- package/src/models/LoadViewerPayload.ts +1 -0
- package/src/notifications/notification.ts +3 -4
- package/src/plugins/vuetify.ts +5 -0
- package/src/services/gpt/__tests__/gpt.service.spec.ts +27 -0
- package/src/services/gpt/gpt.service.ts +27 -0
- package/static/3cr-types-browser/index.ts +74 -0
- package/static/3cr-types-browser/types/Action.ts +6 -0
- package/static/3cr-types-browser/types/ActionData.ts +4 -0
- package/static/3cr-types-browser/types/AlphaKeys.ts +5 -0
- package/static/3cr-types-browser/types/AnchorPoint.ts +12 -0
- package/static/3cr-types-browser/types/CallToAction.ts +5 -0
- package/static/3cr-types-browser/types/ColourData.ts +7 -0
- package/static/3cr-types-browser/types/ColourPresetData.ts +9 -0
- package/static/3cr-types-browser/types/CurrentDataOverlayState.ts +6 -0
- package/static/3cr-types-browser/types/CurrentScanState.ts +22 -0
- package/static/3cr-types-browser/types/DataOverlay.ts +22 -0
- package/static/3cr-types-browser/types/DataOverlayActions.ts +14 -0
- package/static/3cr-types-browser/types/DataOverlayData.ts +8 -0
- package/static/3cr-types-browser/types/DataOverlayEvent.ts +8 -0
- package/static/3cr-types-browser/types/DecryptionKey.ts +4 -0
- package/static/3cr-types-browser/types/DisplaySettings.ts +10 -0
- package/static/3cr-types-browser/types/EmptyPayload.ts +3 -0
- package/static/3cr-types-browser/types/EnumPayload.ts +4 -0
- package/static/3cr-types-browser/types/FileManagementActions.ts +11 -0
- package/static/3cr-types-browser/types/FlipValue.ts +7 -0
- package/static/3cr-types-browser/types/FrontEndInterfaces.ts +14 -0
- package/static/3cr-types-browser/types/GradientKeys.ts +7 -0
- package/static/3cr-types-browser/types/GreyscalePresetData.ts +6 -0
- package/static/3cr-types-browser/types/InitialDataOverlayState.ts +6 -0
- package/static/3cr-types-browser/types/InitialScanState.ts +19 -0
- package/static/3cr-types-browser/types/InteractionType.ts +8 -0
- package/static/3cr-types-browser/types/InteractivityActions.ts +6 -0
- package/static/3cr-types-browser/types/InteractivityState.ts +4 -0
- package/static/3cr-types-browser/types/InvertTransformData.ts +6 -0
- package/static/3cr-types-browser/types/LayoutActions.ts +6 -0
- package/static/3cr-types-browser/types/LayoutData.ts +7 -0
- package/static/3cr-types-browser/types/LoadDataSet.ts +6 -0
- package/static/3cr-types-browser/types/LoadSessionState.ts +4 -0
- package/static/3cr-types-browser/types/LocalLoadDataset.ts +3 -0
- package/static/3cr-types-browser/types/MovementData.ts +7 -0
- package/static/3cr-types-browser/types/NavigationCubeActions.ts +8 -0
- package/static/3cr-types-browser/types/NavigationCubeData.ts +12 -0
- package/static/3cr-types-browser/types/NavigationCubeTransform.ts +9 -0
- package/static/3cr-types-browser/types/NotificationPayload.ts +7 -0
- package/static/3cr-types-browser/types/NotificationsActions.ts +6 -0
- package/static/3cr-types-browser/types/Object.ts +1 -0
- package/static/3cr-types-browser/types/ObjectColour.ts +7 -0
- package/static/3cr-types-browser/types/ObjectIcon.ts +5 -0
- package/static/3cr-types-browser/types/ObjectInvert.ts +7 -0
- package/static/3cr-types-browser/types/ObjectSize.ts +7 -0
- package/static/3cr-types-browser/types/ObjectSize2D.ts +7 -0
- package/static/3cr-types-browser/types/ObjectVisible.ts +5 -0
- package/static/3cr-types-browser/types/PositionData.ts +14 -0
- package/static/3cr-types-browser/types/PresetsActions.ts +4 -0
- package/static/3cr-types-browser/types/RotationValue.ts +7 -0
- package/static/3cr-types-browser/types/ScanMovementActions.ts +27 -0
- package/static/3cr-types-browser/types/ScanMovementData.ts +3 -0
- package/static/3cr-types-browser/types/ScanOrientationActions.ts +6 -0
- package/static/3cr-types-browser/types/ScanStateActions.ts +4 -0
- package/static/3cr-types-browser/types/ScanView.ts +6 -0
- package/static/3cr-types-browser/types/SettingsData.ts +12 -0
- package/static/3cr-types-browser/types/SlicerData.ts +9 -0
- package/static/3cr-types-browser/types/SliderValue.ts +4 -0
- package/static/3cr-types-browser/types/SlidersActions.ts +18 -0
- package/static/3cr-types-browser/types/Vector2Data.ts +5 -0
- package/static/3cr-types-browser/types/Vector3Data.ts +6 -0
- package/static/3cr-types-browser/types/VectorMovementData.ts +8 -0
- package/static/3cr-types-browser/types/ViewInteractiveMode.ts +5 -0
- package/static/3cr-types-browser/types/ViewOrientation.ts +8 -0
- package/static/3cr-types-browser/types/ViewOrientations.ts +10 -0
- package/static/3cr-types-browser/types/ViewSelectionActions.ts +9 -0
- package/static/3cr-types-browser/types/ViewToggleData.ts +7 -0
- package/static/3cr-types-browser/types/VolumeOrientation.ts +7 -0
- package/test/helper.ts +10 -1
- package/test/setup.ts +13 -0
- package/tsconfig.json +1 -0
- package/vite.config.mts +1 -0
- package/src/dataLayer/__tests__/payload-handler.spec.ts +0 -214
- package/src/dataLayer/payloadHandler.ts +0 -138
- /package/src/dataLayer/{iconData.ts → getIconForPreset.ts} +0 -0
package/.circleci/config.yml
CHANGED
|
@@ -11,8 +11,8 @@ jobs:
|
|
|
11
11
|
name: Install Dependencies
|
|
12
12
|
command: |
|
|
13
13
|
npm install
|
|
14
|
-
BUCKET_NAME="3cr-playground"
|
|
15
|
-
DIST_NAME="3cr-playground-development"
|
|
14
|
+
export BUCKET_NAME="3cr-playground"
|
|
15
|
+
export DIST_NAME="3cr-playground-development"
|
|
16
16
|
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
|
|
17
17
|
npm run deploy:ci
|
|
18
18
|
npm run deploy:playground
|
|
@@ -26,10 +26,12 @@ jobs:
|
|
|
26
26
|
name: Install Dependencies
|
|
27
27
|
command: |
|
|
28
28
|
npm install
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
PRE='@3cr/viewer\-browser'
|
|
30
|
+
POST='@3cr/viewer\-browser\-development'
|
|
31
|
+
sed -i -e "s:@3cr/viewer\\-browser:@3cr/viewer\\-browser\\-development:g" ./package.json
|
|
32
|
+
sed -i -e "s:@3cr/viewer\\-browser:@3cr/viewer\\-browser\\-development:g" ./README.md
|
|
33
|
+
export BUCKET_NAME="3cr-playground-development"
|
|
34
|
+
export DIST_NAME="EO7C7NEHS1T35"
|
|
33
35
|
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
|
|
34
36
|
npm run deploy:ci
|
|
35
37
|
npm run deploy:playground
|
package/__tests__/index.spec.ts
CHANGED
|
@@ -1,31 +1,38 @@
|
|
|
1
|
-
import { describe, expect, it
|
|
2
|
-
import { loadViewer, registerViewer
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import {ejectViewer, loadSession, loadViewer, registerViewer} from "../index";
|
|
3
|
+
|
|
4
|
+
describe('index tests', () => {
|
|
5
|
+
const errorMessage = 'Please call `registerViewer(version: string)` first';
|
|
6
|
+
|
|
7
|
+
it('should reject loadViewer', () => {
|
|
8
|
+
expect(() => loadViewer()).rejects.toThrow(errorMessage);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('should reject loadSession invalid url', () => {
|
|
12
|
+
expect(() => loadSession('')).rejects.toThrow(errorMessage);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('should resolve loadViewer', async () => {
|
|
16
|
+
await registerViewer("1.0.0");
|
|
17
|
+
expect(loadViewer()).resolves.not.toThrow(errorMessage);
|
|
18
|
+
});
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
expect(()
|
|
19
|
-
"Please call `registerViewer(version: string, idSelector: string)` first"
|
|
20
|
-
);
|
|
20
|
+
it('should resolve loadSession 3crds url', async () => {
|
|
21
|
+
await registerViewer("1.0.0");
|
|
22
|
+
expect(loadSession('https://localhost/example.3crds')).resolves.not.toThrow(errorMessage);
|
|
21
23
|
});
|
|
22
|
-
|
|
24
|
+
|
|
25
|
+
it('should resolve loadSession 3crms url', async () => {
|
|
23
26
|
await registerViewer("1.0.0");
|
|
27
|
+
expect(loadSession('https://localhost/example.3crms')).resolves.not.toThrow(errorMessage);
|
|
24
28
|
});
|
|
25
|
-
|
|
29
|
+
|
|
30
|
+
it('should resolve loadSession 3crs url', async () => {
|
|
26
31
|
await registerViewer("1.0.0");
|
|
27
|
-
expect(()
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
expect(loadSession('https://localhost/example.3crs')).resolves.not.toThrow(errorMessage);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('should eject viewer', () => {
|
|
36
|
+
expect(ejectViewer()).resolves.not.toThrow();
|
|
30
37
|
});
|
|
31
38
|
});
|
package/components.d.ts
CHANGED
|
@@ -7,12 +7,44 @@ export {}
|
|
|
7
7
|
|
|
8
8
|
declare module 'vue' {
|
|
9
9
|
export interface GlobalComponents {
|
|
10
|
+
Action: typeof import('./src/components/modal/actions/Action.vue')['default']
|
|
11
|
+
ActionRail: typeof import('./src/components/modal/ActionRail.vue')['default']
|
|
12
|
+
AskAI: typeof import('./src/components/modal/AskAI.vue')['default']
|
|
13
|
+
CloseViewerModal: typeof import('./src/components/modal/CloseViewerModal.vue')['default']
|
|
14
|
+
DemoLicenceEnableCloudStorageModal: typeof import('./src/components/demo/licence/DemoLicenceEnableCloudStorageModal.vue')['default']
|
|
15
|
+
DemoLicenceInfoModal: typeof import('./src/components/demo/licence/DemoLicenceInfoModal.vue')['default']
|
|
16
|
+
DemoLicenceSendToPartyModal: typeof import('./src/components/demo/licence/DemoLicenceSendToPartyModal.vue')['default']
|
|
17
|
+
DemoLicenceShareToMobileModal: typeof import('./src/components/demo/licence/DemoLicenceShareToMobileModal.vue')['default']
|
|
18
|
+
DemoModal: typeof import('./src/components/demo/DemoModal.vue')['default']
|
|
19
|
+
DemoPatientEnableCloudStorageModal: typeof import('./src/components/demo/patient/DemoPatientEnableCloudStorageModal.vue')['default']
|
|
20
|
+
DemoPatientInfoModal: typeof import('./src/components/demo/patient/DemoPatientInfoModal.vue')['default']
|
|
21
|
+
DemoPatientModal: typeof import('./src/components/demo/DemoPatientModal.vue')['default']
|
|
22
|
+
DemoPatientSendToPartyModal: typeof import('./src/components/demo/patient/DemoPatientSendToPartyModal.vue')['default']
|
|
23
|
+
DemoPatientShareToMobileModal: typeof import('./src/components/demo/patient/DemoPatientShareToMobileModal.vue')['default']
|
|
10
24
|
DoubleSliderSelector: typeof import('./src/components/sliders/DoubleSliderSelector.vue')['default']
|
|
25
|
+
Flip3dAction: typeof import('./src/components/modal/actions/Flip3dAction.vue')['default']
|
|
26
|
+
FlipHorizontalAction: typeof import('./src/components/modal/actions/FlipHorizontalAction.vue')['default']
|
|
27
|
+
FlipVerticalAction: typeof import('./src/components/modal/actions/FlipVerticalAction.vue')['default']
|
|
28
|
+
FullscreenAction: typeof import('./src/components/modal/actions/FullscreenAction.vue')['default']
|
|
11
29
|
Liver: typeof import('./src/components/icons/liver.vue')['default']
|
|
12
30
|
LoadingSpinner: typeof import('./src/components/loading/LoadingSpinner.vue')['default']
|
|
13
31
|
MftpWebGL3DRModal: typeof import('./src/components/modal/MftpWebGL3DRModal.vue')['default']
|
|
32
|
+
NavigationCubeAction: typeof import('./src/components/modal/actions/NavigationCubeAction.vue')['default']
|
|
33
|
+
PanAction: typeof import('./src/components/modal/actions/PanAction.vue')['default']
|
|
34
|
+
ResetViewAction: typeof import('./src/components/modal/actions/ResetViewAction.vue')['default']
|
|
35
|
+
Rotate2dAction: typeof import('./src/components/modal/actions/Rotate2dAction.vue')['default']
|
|
36
|
+
Slice3dAction: typeof import('./src/components/modal/actions/Slice3dAction.vue')['default']
|
|
14
37
|
ValueSelector: typeof import('./src/components/selectors/ValueSelector.vue')['default']
|
|
15
38
|
VerticalSliderSelector: typeof import('./src/components/sliders/VerticalSliderSelector.vue')['default']
|
|
39
|
+
ViewerActionRail: typeof import('./src/components/modal/ViewerActionRail.vue')['default']
|
|
40
|
+
ViewerAnnotationModal: typeof import('./src/components/modal/ViewerAnnotationModal.vue')['default']
|
|
41
|
+
ViewerAnnotations: typeof import('./src/components/modal/ViewerAnnotations.vue')['default']
|
|
42
|
+
ViewerDisplaySettings: typeof import('./src/components/modal/ViewerDisplaySettings.vue')['default']
|
|
43
|
+
ViewerNavigationDrawer: typeof import('./src/components/modal/ViewerNavigationDrawer.vue')['default']
|
|
44
|
+
ViewerNavigationDrawerContent: typeof import('./src/components/modal/ViewerNavigationDrawerContent.vue')['default']
|
|
45
|
+
ViewerNavigationDrawerFooter: typeof import('./src/components/modal/ViewerNavigationDrawerFooter.vue')['default']
|
|
46
|
+
ViewerNavigationDrawerHeader: typeof import('./src/components/modal/ViewerNavigationDrawerHeader.vue')['default']
|
|
16
47
|
WebGL3DR: typeof import('./src/components/WebGL3DR.vue')['default']
|
|
48
|
+
ZoomAction: typeof import('./src/components/modal/actions/ZoomAction.vue')['default']
|
|
17
49
|
}
|
|
18
50
|
}
|