@3cr/viewer-browser 0.0.136 → 0.0.138

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.136",
3
+ "version": "0.0.138",
4
4
  "main": "./dist/Viewer3CR.umd.js",
5
5
  "module": "dist/Viewer3CR.umd.js",
6
6
  "homepage": "https://docs.3cr.singular.health",
@@ -45,7 +45,7 @@
45
45
  color="red"
46
46
  variant="tonal"
47
47
  @click="closeModal"
48
- v-if="getOption('OnSaveSession') !== undefined"
48
+ v-if="showOption('OnSaveSession')"
49
49
  >
50
50
  Close without saving
51
51
  </v-btn>
@@ -53,16 +53,11 @@
53
53
  color="primary"
54
54
  variant="tonal"
55
55
  @click="closeModalSave"
56
- v-if="getOption('OnSaveSession') !== undefined"
56
+ v-if="showOption('OnSaveSession')"
57
57
  >
58
58
  Save Session
59
59
  </v-btn>
60
- <v-btn
61
- color="primary"
62
- variant="tonal"
63
- @click="closeModal"
64
- v-if="getOption('OnSaveSession') === undefined"
65
- >
60
+ <v-btn color="primary" variant="tonal" @click="closeModal" v-else>
66
61
  Close Viewer
67
62
  </v-btn>
68
63
  </v-card-actions>
@@ -95,31 +90,46 @@
95
90
  </template>
96
91
  <v-card class="">
97
92
  <v-list>
98
- <v-list-item @click="executeOption('OnLoadNewDicomSeries')">
93
+ <v-list-item
94
+ v-if="showOption('OnLoadNewDicomSeries')"
95
+ @click="executeOption('OnLoadNewDicomSeries')"
96
+ >
99
97
  <template v-slot:prepend>
100
98
  <v-icon> upload </v-icon>
101
99
  </template>
102
100
  <v-list-item-title>Load New DICOM Series</v-list-item-title>
103
101
  </v-list-item>
104
- <v-list-item @click="executeOption('OnDownloadDicomSeries')">
102
+ <v-list-item
103
+ v-if="showOption('OnDownloadDicomSeries')"
104
+ @click="executeOption('OnDownloadDicomSeries')"
105
+ >
105
106
  <template v-slot:prepend>
106
107
  <v-icon> download </v-icon>
107
108
  </template>
108
109
  <v-list-item-title>Download DICOM Series</v-list-item-title>
109
110
  </v-list-item>
110
- <v-list-item @click="executeOption('OnLoadSavedSession')">
111
+ <v-list-item
112
+ v-if="showOption('OnLoadSavedSession')"
113
+ @click="executeOption('OnLoadSavedSession')"
114
+ >
111
115
  <template v-slot:prepend>
112
116
  <v-icon> sync </v-icon>
113
117
  </template>
114
118
  <v-list-item-title> Load Saved Session </v-list-item-title>
115
119
  </v-list-item>
116
- <v-list-item @click="executeOption('OnSendTo3rdParty')">
120
+ <v-list-item
121
+ v-if="showOption('OnSendTo3rdParty')"
122
+ @click="executeOption('OnSendTo3rdParty')"
123
+ >
117
124
  <template v-slot:prepend>
118
125
  <v-icon> send </v-icon>
119
126
  </template>
120
127
  <v-list-item-title>Send to 3rd Party</v-list-item-title>
121
128
  </v-list-item>
122
- <v-list-item @click="executeOption('OnShareToMobile')">
129
+ <v-list-item
130
+ v-if="showOption('OnShareToMobile')"
131
+ @click="executeOption('OnShareToMobile')"
132
+ >
123
133
  <template v-slot:prepend>
124
134
  <v-icon> share </v-icon>
125
135
  </template>
@@ -883,7 +893,7 @@ const footerItems = ref([
883
893
  icon: "send",
884
894
  color: "blue",
885
895
  click: async () => executeOption("OnSendTo3rdParty"),
886
- conditional: () => getOption("OnSendTo3rdParty") !== undefined,
896
+ conditional: () => showOption("OnSendTo3rdParty"),
887
897
  },
888
898
  {
889
899
  text: "Share to Mobile / VR",
@@ -892,14 +902,14 @@ const footerItems = ref([
892
902
  icon: "share",
893
903
  color: "yellow",
894
904
  click: async () => executeOption("OnShareToMobile"),
895
- conditional: () => getOption("OnShareToMobile") !== undefined,
905
+ conditional: () => showOption("OnShareToMobile"),
896
906
  },
897
907
  {
898
908
  text: "Screenshot View",
899
909
  icon: "screenshot_region",
900
910
  color: "green",
901
911
  click: async () => executeOption("OnScreenshot"),
902
- conditional: () => getOption("OnScreenshot") !== undefined,
912
+ conditional: () => showOption("OnScreenshot"),
903
913
  },
904
914
  ]);
905
915
  const miniMenu = ref([
@@ -914,6 +924,10 @@ const rotationDeg = ref<number>(0);
914
924
  const stateOverlay = ref<boolean>(false);
915
925
  const m_closeDialog = ref<boolean>(false);
916
926
 
927
+ function showOption(key: keyof LoadViewerOptions): boolean {
928
+ return getOption(key) !== undefined;
929
+ }
930
+
917
931
  function getOption(
918
932
  key: keyof LoadViewerOptions
919
933
  ): ViewerCallback | ViewerAsyncCallback | undefined {