@abi-software/mapintegratedvuer 1.17.4 → 1.18.0

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/mapintegratedvuer",
3
- "version": "1.17.4",
3
+ "version": "1.18.0",
4
4
  "license": "Apache-2.0",
5
5
  "scripts": {
6
6
  "serve": "vite --host --force",
@@ -52,11 +52,11 @@
52
52
  "*.js"
53
53
  ],
54
54
  "dependencies": {
55
- "@abi-software/flatmapvuer": "1.13.1",
56
- "@abi-software/map-side-bar": "2.14.2",
57
- "@abi-software/map-utilities": "1.8.1",
55
+ "@abi-software/flatmapvuer": "1.13.2",
56
+ "@abi-software/map-side-bar": "2.14.3",
57
+ "@abi-software/map-utilities": "1.8.2",
58
58
  "@abi-software/plotvuer": "1.0.7",
59
- "@abi-software/scaffoldvuer": "1.15.4",
59
+ "@abi-software/scaffoldvuer": "1.15.5",
60
60
  "@abi-software/simulationvuer": "3.0.16",
61
61
  "@abi-software/sparc-annotation": "0.3.2",
62
62
  "@abi-software/svg-sprite": "1.0.4",
@@ -17,65 +17,71 @@
17
17
  :value="entry.id"
18
18
  />
19
19
  </el-select>
20
- <div v-else class="toolbar-title">
20
+ <div v-else class="toolbar-title shrink">
21
21
  {{ getEntryTitle(entry) }}
22
22
  </div>
23
- </div>
24
- <el-row class="icon-group">
25
- <el-popover
26
- placement="bottom"
27
- :teleported="false"
28
- trigger="manual"
29
- :width="setPopperWidth(slot.id)"
30
- :offset="0"
31
- popper-class="context-card-popover"
32
- :popper-options="popperOptions"
33
- :visible="contextCardVisible"
23
+ <el-button
24
+ v-if="hasSourceInfo"
25
+ round
26
+ size="small"
27
+ class="source-chip shrink"
28
+ @click="openSourceInfo"
34
29
  >
35
- <template #default v-if="contextCardEntry">
36
- <flatmap-context-card
37
- class="flatmap-context-card"
38
- v-if="(contextCardEntry.type == 'Flatmap' ||
39
- contextCardEntry.type == 'MultiFlatmap')"
40
- :mapImpProv="contextCardEntry.mapImpProv"
41
- />
42
- <context-card
43
- v-if="contextCardEntry.type.toLowerCase() == 'scaffold'"
44
- :entry="contextCardEntry"
45
- :envVars="envVars"
46
- class="context-card"
47
- @context-ready="contextCardVisible = true"
48
- @scaffold-view-clicked="$emit('scaffold-view-clicked', $event)"
49
- />
50
- </template>
51
- <template #reference>
52
- <div v-show="contextCardEntry">
53
- <div v-show="contextCardVisible" class="hide" @click="contextCardVisible = false">
54
- Hide information
55
- <el-icon><el-icon-arrow-up /></el-icon>
56
- </div>
57
- <div v-show="!contextCardVisible" class="hide" @click="contextCardVisible = true">
58
- Show information
59
- <el-icon><el-icon-arrow-down /></el-icon>
30
+ {{ getSourceTitle }}
31
+ </el-button>
32
+ <div class="information-group shrink">
33
+ <el-popover
34
+ placement="bottom"
35
+ :teleported="false"
36
+ trigger="manual"
37
+ :width="setPopperWidth(slot.id)"
38
+ :offset="0"
39
+ popper-class="context-card-popover"
40
+ :popper-options="popperOptions"
41
+ :visible="contextCardVisible"
42
+ >
43
+ <template #default v-if="contextCardEntry">
44
+ <flatmap-context-card
45
+ class="flatmap-context-card"
46
+ v-if="(contextCardEntry.type == 'Flatmap' ||
47
+ contextCardEntry.type == 'MultiFlatmap')"
48
+ :mapImpProv="contextCardEntry.mapImpProv"
49
+ />
50
+ <context-card
51
+ v-if="contextCardEntry.type.toLowerCase() == 'scaffold'"
52
+ :entry="contextCardEntry"
53
+ :envVars="envVars"
54
+ class="context-card"
55
+ @context-ready="contextCardVisible = true"
56
+ @scaffold-view-clicked="$emit('scaffold-view-clicked', $event)"
57
+ />
58
+ </template>
59
+ <template #reference>
60
+ <div v-show="contextCardEntry">
61
+ <div v-show="contextCardVisible" class="hide" @click="contextCardVisible = false">
62
+ Hide information
63
+ <el-icon><el-icon-arrow-up /></el-icon>
64
+ </div>
65
+ <div v-show="!contextCardVisible" class="hide" @click="contextCardVisible = true">
66
+ Show information
67
+ <el-icon><el-icon-arrow-down /></el-icon>
68
+ </div>
60
69
  </div>
61
- </div>
62
- </template>
63
- </el-popover>
70
+ </template>
71
+ </el-popover>
72
+ </div>
64
73
  <el-popover class="tooltip" content="Close and remove" placement="bottom-end" :show-after="helpDelay"
65
74
  :teleported=false trigger="hover" popper-class="header-popper" >
66
75
  <template #reference>
67
- <map-svg-icon icon="close-no-bk" class="header-icon"
76
+ <map-svg-icon icon="close-no-bk" class="header-icon rightmost"
68
77
  v-show="(activeView !== 'singlepanel') && ((entry.mode !== 'main') || allClosable )"
69
78
  @click="closeAndRemove()"/>
70
79
  </template>
71
80
  </el-popover>
72
-
73
- </el-row>
74
-
81
+ </div>
75
82
  </div>
76
83
  </template>
77
84
 
78
-
79
85
  <script>
80
86
  /* eslint-disable no-alert, no-console */
81
87
  import EventBus from './EventBus';
@@ -89,7 +95,6 @@ import FlatmapContextCard from './FlatmapContextCard.vue';
89
95
  import {
90
96
  ArrowDown as ElIconArrowDown,
91
97
  ArrowUp as ElIconArrowUp,
92
- InfoFilled as ElIconInfoFilled,
93
98
  } from '@element-plus/icons-vue'
94
99
  import {
95
100
  ElInput as Input,
@@ -105,7 +110,6 @@ export default {
105
110
  components: {
106
111
  ElIconArrowDown,
107
112
  ElIconArrowUp,
108
- ElIconInfoFilled,
109
113
  Input,
110
114
  Option,
111
115
  Popover,
@@ -135,6 +139,18 @@ export default {
135
139
  allClosable() {
136
140
  return this.settingsStore.allClosable;
137
141
  },
142
+ getSourceTitle: function() {
143
+ if (this.entry) {
144
+ if (this.entry.doi) {
145
+ return this.entry.doi.replace("https://doi.org/", "");
146
+ } else if (this.entry.connectivityInfo) {
147
+ return "SCKAN";
148
+ }
149
+ }
150
+ },
151
+ hasSourceInfo() {
152
+ return this.entry.doi || this.entry.connectivityInfo;
153
+ },
138
154
  helpDelay() {
139
155
  return this.settingsStore.helpDelay;
140
156
  },
@@ -239,6 +255,17 @@ export default {
239
255
  const character = ' (' + String.fromCharCode(65 + id) + ')';
240
256
  return character;
241
257
  },
258
+ openSourceInfo: function() {
259
+ if (this.entry.doi) {
260
+ const returnedAction = {
261
+ type: "Search",
262
+ term: this.entry.doi.replace("https://doi.org/", ""),
263
+ };
264
+ EventBus.emit("PopoverActionClick", returnedAction);
265
+ } else if (this.entry.connectivityInfo) {
266
+ EventBus.emit('connectivity-info-open', [this.entry.connectivityInfo]);
267
+ }
268
+ },
242
269
  viewerChanged: function(value) {
243
270
  if (this.entry.id && this.entry.id != value) {
244
271
  this.splitFlowStore.assignOrSwapPaneWithIds({
@@ -302,23 +329,39 @@ export default {
302
329
  @use "../assets/header-icon.scss";
303
330
 
304
331
 
305
- .toolbar-title {
306
- width: 160px;
307
- height: 20px;
308
- color: $app-primary-color;
309
- font-size: 14px;
310
- font-weight: normal;
311
- line-height: 20px;
312
- margin-left: 1rem;
313
- margin-top: 4px;
314
- }
315
-
316
332
  .toolbar-flex-container {
317
333
  display:flex;
318
334
  flex-direction: row;
335
+ align-items: center;
336
+ flex-wrap: nowrap;
337
+ width: 100%;
338
+
339
+ .shrink {
340
+ flex-shrink: 1;
341
+ min-width: 0;
342
+ overflow:hidden;
343
+ }
344
+
345
+ .information-group {
346
+ margin-left: auto;
347
+ }
348
+
349
+ .toolbar-title {
350
+ max-width: 160px;
351
+ height: 20px;
352
+ color: $app-primary-color;
353
+ font-size: 14px;
354
+ font-weight: normal;
355
+ line-height: 20px;
356
+ margin-left: 1rem;
357
+ margin-top: 6px;
358
+ }
359
+
319
360
  .select-box {
320
- max-width: 300px;
361
+ max-width: 200px;
321
362
  z-index: 5;
363
+ flex-shrink: 1;
364
+ min-width: 0;
322
365
  :deep(.el-select__wrapper) {
323
366
  color: $app-primary-color;
324
367
  height: 29px;
@@ -328,7 +371,7 @@ export default {
328
371
  margin-top: 1px;
329
372
  margin-left: 8px;
330
373
  padding-left: 8px;
331
- padding-right: 8px;
374
+ padding-right: 2px;
332
375
  box-shadow: none !important;
333
376
  background: transparent;
334
377
  span {
@@ -373,32 +416,33 @@ export default {
373
416
  width: 140px;
374
417
  color: $app-primary-color;
375
418
  }
376
- }
377
419
 
378
- .viewer_dropdown {
379
- z-index: 5;
380
- .el-select-dropdown__item {
381
- white-space: nowrap;
382
- text-align: left;
383
- &.is-selected {
384
- color: $app-primary-color;
385
- font-weight: normal;
420
+ :deep(.info-icon) {
421
+ margin-top: 6px;
422
+ font-size: 20px;
423
+ color: $app-primary-color;
424
+ &:hover {
425
+ cursor: pointer;
386
426
  }
387
427
  }
388
- }
389
-
390
- .hide{
391
- color: $app-primary-color;
392
- cursor: pointer;
393
- margin-right: 6px;
394
- margin-top: 8px;
395
- }
396
428
 
397
- .icon-group {
398
- position: relative;
399
- top: auto;
400
- font-size: 12px;
401
- align-items: center;
429
+ .source-chip {
430
+ padding: 4px;
431
+ margin-left: 2px;
432
+ margin-right:2px;
433
+ background-color: $app-primary-color;
434
+ border-color: $app-primary-color;
435
+ color: #fff;
436
+ font-size: 11px;
437
+ &:hover {
438
+ color: #fff !important;
439
+ background-color: #ac76c5 !important;
440
+ border: 1px solid #ac76c5 !important;
441
+ }
442
+ span {
443
+ text-overflow: ellipsis;
444
+ }
445
+ }
402
446
 
403
447
  :deep(.el-tooltip__trigger) {
404
448
  height: 100%;
@@ -406,24 +450,32 @@ export default {
406
450
  align-items: center;
407
451
  }
408
452
 
453
+ .rightmost {
454
+ flex-shrink: 0;
455
+ }
456
+
409
457
  .hide {
458
+ font-size: 12px;
410
459
  margin-top: 0;
411
460
  display: flex;
412
461
  flex-direction: row;
413
462
  align-items: center;
414
463
  gap: 4px;
464
+ color: $app-primary-color;
465
+ cursor: pointer;
415
466
  }
467
+
416
468
  }
417
469
 
418
- .info-icon {
419
- margin-top: 2px;
420
- margin-right: 8px;
421
- font-size: 28px;
422
- color: $app-primary-color;
423
- cursor: pointer;
424
- &::before { // since the icon is a font, we need to adjust the vertical alignment
425
- position: relative;
426
- top: -2px;
470
+ .viewer_dropdown {
471
+ z-index: 5;
472
+ .el-select-dropdown__item {
473
+ white-space: nowrap;
474
+ text-align: left;
475
+ &.is-selected {
476
+ color: $app-primary-color;
477
+ font-weight: normal;
478
+ }
427
479
  }
428
480
  }
429
481
 
@@ -457,4 +509,5 @@ export default {
457
509
  width: unset!important;
458
510
  background: #fff!important;
459
511
  }
512
+
460
513
  </style>