@abi-software/map-utilities 1.3.3-beta.0 → 1.3.3-beta.1

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": "@abi-software/map-utilities",
3
- "version": "1.3.3-beta.0",
3
+ "version": "1.3.3-beta.1",
4
4
  "files": [
5
5
  "dist/*",
6
6
  "src/*",
@@ -1,6 +1,10 @@
1
1
  <template>
2
2
  <div class="connectivity-graph" v-loading="loading" ref="connectivityGraphRef">
3
3
 
4
+ <div class="sckan-version">
5
+ SCKAN Release: {{ this.selectedSource }}
6
+ </div>
7
+
4
8
  <div ref="graphCanvas" class="graph-canvas"></div>
5
9
 
6
10
  <div class="control-panel control-panel-tools">
@@ -149,6 +153,10 @@ export default {
149
153
  type: String,
150
154
  default: '',
151
155
  },
156
+ sckanVersion: {
157
+ type: String,
158
+ default: '',
159
+ },
152
160
  selectedConnectivityData: {
153
161
  type: Array,
154
162
  default: [],
@@ -196,6 +204,12 @@ export default {
196
204
  if (selectedSource) {
197
205
  this.selectedSource = selectedSource;
198
206
  }
207
+ // Update knowledge source if SCKAN version is provided
208
+ if (this.sckanVersion) {
209
+ this.selectedSource = this.sckanVersion;
210
+ sessionStorage.setItem('connectivity-graph-source', this.selectedSource);
211
+ this.updateCacheExpiry();
212
+ }
199
213
  if (pathList) {
200
214
  this.pathList = JSON.parse(pathList);
201
215
  }
@@ -207,6 +221,13 @@ export default {
207
221
  this.schemaVersion = schemaVersion;
208
222
  }
209
223
  },
224
+ isValidKnowledgeSource: function () {
225
+ const selectedSource = sessionStorage.getItem('connectivity-graph-source');
226
+ if (this.sckanVersion && (this.sckanVersion !== selectedSource)) {
227
+ return false;
228
+ }
229
+ return true;
230
+ },
210
231
  removeAllCacheData: function () {
211
232
  const keys = [
212
233
  'connectivity-graph-expiry',
@@ -222,8 +243,9 @@ export default {
222
243
  refreshCache: function () {
223
244
  const expiry = sessionStorage.getItem('connectivity-graph-expiry');
224
245
  const now = new Date();
246
+ const validKnowledgeSource = this.isValidKnowledgeSource();
225
247
 
226
- if (now.getTime() > expiry) {
248
+ if (now.getTime() > expiry || !validKnowledgeSource) {
227
249
  this.removeAllCacheData();
228
250
  }
229
251
  },
@@ -641,6 +663,16 @@ export default {
641
663
  white-space: nowrap;
642
664
  width: 1px;
643
665
  }
666
+
667
+ .sckan-version {
668
+ position: absolute;
669
+ bottom: 0;
670
+ right: 0;
671
+ margin-bottom: -22px;
672
+ font-size: 12px;
673
+ font-style: italic;
674
+ color: gray;
675
+ }
644
676
  </style>
645
677
 
646
678
  <style lang="scss">
@@ -14,9 +14,7 @@ declare module 'vue' {
14
14
  CreateTooltipContent: typeof import('./components/Tooltip/CreateTooltipContent.vue')['default']
15
15
  DrawToolbar: typeof import('./components/DrawToolbar/DrawToolbar.vue')['default']
16
16
  ElButton: typeof import('element-plus/es')['ElButton']
17
- ElCard: typeof import('element-plus/es')['ElCard']
18
17
  ElCol: typeof import('element-plus/es')['ElCol']
19
- ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
20
18
  ElContainer: typeof import('element-plus/es')['ElContainer']
21
19
  ElHeader: typeof import('element-plus/es')['ElHeader']
22
20
  ElIcon: typeof import('element-plus/es')['ElIcon']
@@ -30,7 +28,6 @@ declare module 'vue' {
30
28
  ElIconFinished: typeof import('@element-plus/icons-vue')['Finished']
31
29
  ElIconLock: typeof import('@element-plus/icons-vue')['Lock']
32
30
  ElIconUnlock: typeof import('@element-plus/icons-vue')['Unlock']
33
- ElIconWarning: typeof import('@element-plus/icons-vue')['Warning']
34
31
  ElIconZoomIn: typeof import('@element-plus/icons-vue')['ZoomIn']
35
32
  ElIconZoomOut: typeof import('@element-plus/icons-vue')['ZoomOut']
36
33
  ElInput: typeof import('element-plus/es')['ElInput']
@@ -40,7 +37,6 @@ declare module 'vue' {
40
37
  ElRow: typeof import('element-plus/es')['ElRow']
41
38
  ElSelect: typeof import('element-plus/es')['ElSelect']
42
39
  ElTooltip: typeof import('element-plus/es')['ElTooltip']
43
- ElTree: typeof import('element-plus/es')['ElTree']
44
40
  ExternalResourceCard: typeof import('./components/Tooltip/ExternalResourceCard.vue')['default']
45
41
  HelpModeDialog: typeof import('./components/HelpModeDialog/HelpModeDialog.vue')['default']
46
42
  ProvenancePopup: typeof import('./components/Tooltip/ProvenancePopup.vue')['default']