@3cr/viewer-browser 0.0.139 → 0.0.141

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3cr/viewer-browser",
3
- "version": "0.0.139",
3
+ "version": "0.0.141",
4
4
  "main": "./dist/Viewer3CR.umd.js",
5
5
  "module": "dist/Viewer3CR.umd.js",
6
6
  "homepage": "https://docs.3cr.singular.health",
@@ -28,13 +28,13 @@
28
28
  width="600"
29
29
  theme="dark"
30
30
  >
31
- <v-card-title>Close Viewer?</v-card-title>
32
- <v-card-text
31
+ <v-card-title class="text-center">Close Viewer?</v-card-title>
32
+ <v-card-text class="text-center mb-2"
33
33
  >Are you sure you want to close the Online Viewer?</v-card-text
34
34
  >
35
35
  <v-card-actions>
36
36
  <v-btn
37
- variant="tonal"
37
+ variant="flat"
38
38
  color="secondary"
39
39
  @click="m_closeDialog = false"
40
40
  >
@@ -43,7 +43,7 @@
43
43
  <v-spacer />
44
44
  <v-btn
45
45
  color="red"
46
- variant="tonal"
46
+ variant="flat"
47
47
  @click="closeModal"
48
48
  v-if="showOption('OnSaveSession')"
49
49
  >
@@ -51,13 +51,13 @@
51
51
  </v-btn>
52
52
  <v-btn
53
53
  color="primary"
54
- variant="tonal"
54
+ variant="flat"
55
55
  @click="closeModalSave"
56
56
  v-if="showOption('OnSaveSession')"
57
57
  >
58
58
  Save Session
59
59
  </v-btn>
60
- <v-btn color="primary" variant="tonal" @click="closeModal" v-else>
60
+ <v-btn color="flat" variant="tonal" @click="closeModal" v-else>
61
61
  Close Viewer
62
62
  </v-btn>
63
63
  </v-card-actions>
@@ -500,21 +500,24 @@
500
500
 
501
501
  <v-btn
502
502
  height="84"
503
+ color="grey"
504
+ variant="flat"
503
505
  width="20"
504
506
  min-width="20"
505
- class="my-auto rounded-bl-0 rounded-tl-0 pa-0 slide-item-card"
507
+ class="my-auto rounded-bl-0 rounded-tl-0 pa-0"
506
508
  style="
507
509
  border-bottom-left-radius: 0 !important;
508
510
  border-top-left-radius: 0 !important;
509
511
  position: absolute;
510
512
  top: 50%;
511
- z-index: 1000;
513
+ opacity: 0.7;
514
+ z-index: 100000;
512
515
  transform: translateY(-50%);
513
516
  "
514
517
  :style="drawerCollapsed ? 'left: 68px' : 'left: 300px'"
515
518
  @click="drawerCollapsed = !drawerCollapsed"
516
519
  >
517
- <v-icon>{{
520
+ <v-icon color="black">{{
518
521
  drawerCollapsed ? "chevron_right" : "chevron_left"
519
522
  }}</v-icon>
520
523
  </v-btn>
@@ -1053,6 +1056,7 @@ async function i_fileManagement(action: string, message: string) {
1053
1056
  scanLoading.value = false;
1054
1057
  drawerCollapsed.value = false;
1055
1058
  await payloadHandler.hoverOverCanvas(false);
1059
+ await payloadHandler.setNavCubeVisibility(false);
1056
1060
  }
1057
1061
  }
1058
1062
 
@@ -4,6 +4,7 @@ import {
4
4
  FrontEndInterfaces,
5
5
  InteractivityActions,
6
6
  LayoutActions,
7
+ NavigationCubeActions,
7
8
  PresetsActions,
8
9
  ScanMovementActions,
9
10
  ScanOrientationActions,
@@ -76,6 +77,17 @@ export class PayloadHandler {
76
77
  }
77
78
  }
78
79
 
80
+ async setNavCubeVisibility(visibility: any) {
81
+ await this.sendPayload(
82
+ FrontEndInterfaces.navigation_cube,
83
+ NavigationCubeActions.nc02,
84
+ {
85
+ Version: "0.0.1",
86
+ Value: visibility,
87
+ }
88
+ );
89
+ }
90
+
79
91
  async hoverOverCanvas(isHovering: boolean) {
80
92
  await this.sendPayload(
81
93
  FrontEndInterfaces.interactivity,
@@ -26,7 +26,7 @@ const modalState = computed({
26
26
  <template>
27
27
  <v-dialog v-model:model-value="modalState">
28
28
  <v-card class="pa-1 ma-auto position-relative" max-width="450">
29
- <v-card-title>Demo Instance</v-card-title>
29
+ <v-card-title class="font-weight-bold">Demo Instance</v-card-title>
30
30
  <v-card-text>
31
31
  This instance of 3Dicom Online Viewer is a Demo instance.
32
32
  </v-card-text>
@@ -37,7 +37,7 @@ const modalState = computed({
37
37
  theme="dark"
38
38
  max-width="680"
39
39
  >
40
- <v-card-title class="text-center mb-4 mt-2">{{
40
+ <v-card-title class="text-center mb-4 mt-2 font-weight-bold">{{
41
41
  demoLicenceTitle
42
42
  }}</v-card-title>
43
43
  <v-card-text
@@ -47,11 +47,7 @@ const modalState = computed({
47
47
  >{{ subtitle }}
48
48
  </v-card-text>
49
49
  <v-card-actions class="mt-4">
50
- <v-btn
51
- color="error"
52
- @click="modalState = false"
53
- :disabled="!isModalOpen"
54
- >
50
+ <v-btn color="red" @click="modalState = false" :disabled="!isModalOpen">
55
51
  Continue with Demo
56
52
  </v-btn>
57
53
  <v-spacer />
@@ -47,8 +47,8 @@ function isValid() {
47
47
  max-width="680"
48
48
  min-width="450"
49
49
  >
50
- <v-card-title class="text-center mb-4 mt-2">
51
- Download 3Dicom Mobile
50
+ <v-card-title class="text-center mb-4 mt-2 font-weight-bold">
51
+ Send Scan to a 3rd Party
52
52
  </v-card-title>
53
53
  <v-card-text>
54
54
  <v-text-field
@@ -116,7 +116,7 @@ function isValid() {
116
116
  </v-alert>
117
117
  </v-card-text>
118
118
  <v-card-actions>
119
- <v-btn color="error" @click="modalState = false">
119
+ <v-btn color="red" @click="modalState = false">
120
120
  Continue with Demo
121
121
  </v-btn>
122
122
  <v-spacer />
@@ -140,7 +140,9 @@ function isValid() {
140
140
  theme="dark"
141
141
  max-width="680"
142
142
  >
143
- <v-card-title class="text-center mb-4 mt-2"> Scan shared </v-card-title>
143
+ <v-card-title class="text-center mb-4 mt-2 font-weight-bold">
144
+ Scan shared
145
+ </v-card-title>
144
146
  <v-card-text class="text-justify">
145
147
  Congratulations, you have sent your scan to a 3rd party.
146
148
  </v-card-text>
@@ -153,7 +155,7 @@ function isValid() {
153
155
  please select below
154
156
  </v-card-text>
155
157
  <v-card-actions>
156
- <v-btn color="error" @click="step2 = false"> Continue with Demo </v-btn>
158
+ <v-btn color="red" @click="step2 = false"> Continue with Demo </v-btn>
157
159
  <v-spacer />
158
160
  <v-btn
159
161
  variant="flat"
@@ -32,7 +32,7 @@ const modalState = computed({
32
32
  theme="dark"
33
33
  max-width="680"
34
34
  >
35
- <v-card-title class="text-center mb-4 mt-2">
35
+ <v-card-title class="text-center mb-4 mt-2 font-weight-bold">
36
36
  Download 3Dicom Mobile
37
37
  </v-card-title>
38
38
  <v-card-text class="text-justify">
@@ -50,7 +50,7 @@ const modalState = computed({
50
50
  />
51
51
  </v-card-text>
52
52
  <v-card-actions>
53
- <v-btn color="error" @click="modalState = false">
53
+ <v-btn color="red" @click="modalState = false">
54
54
  Continue with Demo
55
55
  </v-btn>
56
56
  <v-spacer />
@@ -73,7 +73,7 @@ const modalState = computed({
73
73
  theme="dark"
74
74
  max-width="680"
75
75
  >
76
- <v-card-title class="text-center mb-4 mt-2">
76
+ <v-card-title class="text-center mb-4 mt-2 font-weight-bold">
77
77
  Load your scan
78
78
  </v-card-title>
79
79
  <v-card-text class="text-justify">
@@ -83,7 +83,7 @@ const modalState = computed({
83
83
  Tomography (PET) scans.
84
84
  </v-card-text>
85
85
  <v-card-actions>
86
- <v-btn color="error" @click="step2 = false"> Continue with Demo </v-btn>
86
+ <v-btn color="red" @click="step2 = false"> Continue with Demo </v-btn>
87
87
  <v-spacer />
88
88
  <v-btn
89
89
  variant="flat"
@@ -1,4 +1,4 @@
1
- import { computed, ref, unref } from "vue";
1
+ import { computed, ref, unref, watch } from "vue";
2
2
  import { LoadViewerOptions } from "@/models/LoadViewerOptions";
3
3
  import { LoadViewerPayload } from "@/models/LoadViewerPayload";
4
4
  import { ViewerAsyncCallback, ViewerCallback } from "@/models/Callbacks";
@@ -81,6 +81,11 @@ export const demoPatientOptions: LoadViewerOptions = {
81
81
  "Should you have any further questions or enquiries, please get in touch by emailing support@singular.health",
82
82
  ];
83
83
  m_demoPatient.value = true;
84
+ watch(m_demoPatient, () => {
85
+ if (!m_demoPatient) {
86
+ window.close();
87
+ }
88
+ });
84
89
  },
85
90
  OnLoadNewDicomSeries: () => {
86
91
  demoPatientTitle.value =
@@ -95,7 +100,8 @@ export const demoPatientOptions: LoadViewerOptions = {
95
100
  demoPatientTitle.value =
96
101
  "3Dicom Patient enables on-demand download of DICOM series";
97
102
  demoPatientSubtitles.value = [
98
- "3Dicom Patient enables you to store your medical imaging and related files / reports online or share them temporarily between devices. DICOM files can be downloaded to your device for local storage and providing to 3rd parties via CD/USB.",
103
+ "3Dicom Patient enables you to store your medical imaging and related files / reports online or share them temporarily between devices. ",
104
+ "DICOM files can be downloaded to your device for local storage and providing to 3rd parties via CD/USB.",
99
105
  "Purchase 3Dicom Patient to gain control over your DICOM file storage.",
100
106
  ];
101
107
  m_demoPatient.value = true;
@@ -128,9 +134,14 @@ export const demoPatientOptions: LoadViewerOptions = {
128
134
  OnScreenshot: undefined,
129
135
  };
130
136
 
137
+ const optionalTypes = ["licence", "patient"];
138
+
131
139
  export const demoType = computed(() => {
132
140
  const urlParams = new URLSearchParams(window.location.search);
133
- return (urlParams.get("demoType") || "licence").toLowerCase();
141
+ let type = (urlParams.get("demoType") || "licence").toLowerCase();
142
+
143
+ if (type === "license") type = optionalTypes[0];
144
+ return optionalTypes.includes(type) ? type : optionalTypes[0];
134
145
  });
135
146
 
136
147
  export function executeDemoOption(key: keyof LoadViewerOptions) {
@@ -37,7 +37,7 @@ const modalState = computed({
37
37
  theme="dark"
38
38
  max-width="680"
39
39
  >
40
- <v-card-title class="text-center mb-4 mt-2">{{
40
+ <v-card-title class="text-center mb-4 mt-2 font-weight-bold">{{
41
41
  demoPatientTitle
42
42
  }}</v-card-title>
43
43
  <v-card-text
@@ -47,11 +47,7 @@ const modalState = computed({
47
47
  >{{ subtitle }}
48
48
  </v-card-text>
49
49
  <v-card-actions class="mt-4">
50
- <v-btn
51
- color="error"
52
- @click="modalState = false"
53
- :disabled="!isModalOpen"
54
- >
50
+ <v-btn color="red" @click="modalState = false" :disabled="!isModalOpen">
55
51
  Continue with Demo
56
52
  </v-btn>
57
53
  <v-spacer />
@@ -47,8 +47,8 @@ function isValid() {
47
47
  max-width="680"
48
48
  min-width="450"
49
49
  >
50
- <v-card-title class="text-center mb-4 mt-2">
51
- Download 3Dicom Mobile
50
+ <v-card-title class="text-center mb-4 mt-2 font-weight-bold">
51
+ Send Scan to a 3rd Party
52
52
  </v-card-title>
53
53
  <v-card-text>
54
54
  <v-text-field
@@ -116,7 +116,7 @@ function isValid() {
116
116
  </v-alert>
117
117
  </v-card-text>
118
118
  <v-card-actions>
119
- <v-btn color="error" @click="modalState = false">
119
+ <v-btn color="red" @click="modalState = false">
120
120
  Continue with Demo
121
121
  </v-btn>
122
122
  <v-spacer />
@@ -140,7 +140,9 @@ function isValid() {
140
140
  theme="dark"
141
141
  max-width="680"
142
142
  >
143
- <v-card-title class="text-center mb-4 mt-2"> Scan shared </v-card-title>
143
+ <v-card-title class="text-center mb-4 mt-2 font-weight-bold">
144
+ Scan shared
145
+ </v-card-title>
144
146
  <v-card-text class="text-justify">
145
147
  Congratulations, you have sent your scan to a 3rd party.
146
148
  </v-card-text>
@@ -153,7 +155,7 @@ function isValid() {
153
155
  please select below
154
156
  </v-card-text>
155
157
  <v-card-actions>
156
- <v-btn color="error" @click="step2 = false"> Continue with Demo </v-btn>
158
+ <v-btn color="red" @click="step2 = false"> Continue with Demo </v-btn>
157
159
  <v-spacer />
158
160
  <v-btn
159
161
  variant="flat"
@@ -32,7 +32,7 @@ const modalState = computed({
32
32
  theme="dark"
33
33
  max-width="680"
34
34
  >
35
- <v-card-title class="text-center mb-4 mt-2">
35
+ <v-card-title class="text-center mb-4 mt-2 font-weight-bold">
36
36
  Download 3Dicom Mobile
37
37
  </v-card-title>
38
38
  <v-card-text class="text-justify">
@@ -50,7 +50,7 @@ const modalState = computed({
50
50
  />
51
51
  </v-card-text>
52
52
  <v-card-actions>
53
- <v-btn color="error" @click="modalState = false">
53
+ <v-btn color="red" @click="modalState = false">
54
54
  Continue with Demo
55
55
  </v-btn>
56
56
  <v-spacer />
@@ -73,7 +73,7 @@ const modalState = computed({
73
73
  theme="dark"
74
74
  max-width="680"
75
75
  >
76
- <v-card-title class="text-center mb-4 mt-2">
76
+ <v-card-title class="text-center mb-4 mt-2 font-weight-bold">
77
77
  Load your scan
78
78
  </v-card-title>
79
79
  <v-card-text class="text-justify">
@@ -83,7 +83,7 @@ const modalState = computed({
83
83
  Tomography (PET) scans.
84
84
  </v-card-text>
85
85
  <v-card-actions>
86
- <v-btn color="error" @click="step2 = false"> Continue with Demo </v-btn>
86
+ <v-btn color="red" @click="step2 = false"> Continue with Demo </v-btn>
87
87
  <v-spacer />
88
88
  <v-btn
89
89
  variant="flat"