@abi-software/mapintegratedvuer 1.6.0 → 1.6.3
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/dist/{ContentMixin-CetX1ug9.js → ContentMixin-CWtYskLS.js} +8 -5
- package/dist/{Flatmap-CfapnFQ6.js → Flatmap-BsxLzsr9.js} +55 -45
- package/dist/{Iframe-CPMsJHLL.js → Iframe-Bsc3ZvDM.js} +2 -2
- package/dist/{MultiFlatmap-C9YhGVTK.js → MultiFlatmap-BoMGY3P5.js} +40 -103
- package/dist/{Plot-B5oQVpfQ.js → Plot-BLZ6qDEp.js} +2 -2
- package/dist/{Scaffold-DH-cWyUN.js → Scaffold-DpRCGJ34.js} +161 -162
- package/dist/{Simulation-vQXlk9Mc.js → Simulation-Dv3scr6u.js} +2 -2
- package/dist/{index-BzopGyiz.js → index-BGGZxwXr.js} +11757 -11660
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +470 -469
- package/dist/{style-CrjDxqUa.js → style-CmiFzzZy.js} +5032 -4934
- package/dist/style.css +1 -1
- package/package.json +7 -7
- package/src/components/ContentBar.vue +15 -0
- package/src/components/DialogToolbarContent.vue +5 -0
- package/src/components/SplitFlow.vue +7 -2
- package/src/components/viewers/Flatmap.vue +12 -1
- package/src/components/viewers/MultiFlatmap.vue +2 -127
- package/src/components/viewers/Scaffold.vue +1 -3
- package/src/mixins/ContentMixin.js +3 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@abi-software/mapintegratedvuer",
|
3
|
-
"version": "1.6.
|
3
|
+
"version": "1.6.3",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"scripts": {
|
6
6
|
"serve": "vite --host --force",
|
@@ -50,13 +50,13 @@
|
|
50
50
|
"*.js"
|
51
51
|
],
|
52
52
|
"dependencies": {
|
53
|
-
"@abi-software/flatmapvuer": "^1.6.
|
54
|
-
"@abi-software/map-side-bar": "^2.5.
|
55
|
-
"@abi-software/map-utilities": "^1.2.
|
53
|
+
"@abi-software/flatmapvuer": "^1.6.1",
|
54
|
+
"@abi-software/map-side-bar": "^2.5.2",
|
55
|
+
"@abi-software/map-utilities": "^1.2.1",
|
56
56
|
"@abi-software/plotvuer": "^1.0.3",
|
57
|
-
"@abi-software/scaffoldvuer": "^1.6.
|
57
|
+
"@abi-software/scaffoldvuer": "^1.6.2",
|
58
58
|
"@abi-software/simulationvuer": "^1.0.1",
|
59
|
-
"@abi-software/sparc-annotation": "0.3.
|
59
|
+
"@abi-software/sparc-annotation": "0.3.2",
|
60
60
|
"@abi-software/svg-sprite": "^1.0.1",
|
61
61
|
"@element-plus/icons-vue": "^2.3.1",
|
62
62
|
"@vitejs/plugin-vue": "^4.6.2",
|
@@ -86,7 +86,7 @@
|
|
86
86
|
"eslint": "^8.56.0",
|
87
87
|
"eslint-plugin-cypress": "^2.15.1",
|
88
88
|
"eslint-plugin-vue": "^9.19.2",
|
89
|
-
"happy-dom": "^
|
89
|
+
"happy-dom": "^15.11.6",
|
90
90
|
"jsdom": "^16.2.2",
|
91
91
|
"jsdom-global": "^3.0.2",
|
92
92
|
"mocha": "^10.4.0",
|
@@ -337,6 +337,21 @@ export default {
|
|
337
337
|
position: relative;
|
338
338
|
top: auto;
|
339
339
|
font-size: 12px;
|
340
|
+
align-items: center;
|
341
|
+
|
342
|
+
:deep(.el-tooltip__trigger) {
|
343
|
+
height: 100%;
|
344
|
+
display: flex;
|
345
|
+
align-items: center;
|
346
|
+
}
|
347
|
+
|
348
|
+
.hide {
|
349
|
+
margin-top: 0;
|
350
|
+
display: flex;
|
351
|
+
flex-direction: row;
|
352
|
+
align-items: center;
|
353
|
+
gap: 4px;
|
354
|
+
}
|
340
355
|
}
|
341
356
|
|
342
357
|
.info-icon {
|
@@ -306,6 +306,10 @@ export default {
|
|
306
306
|
view,
|
307
307
|
entries: this.entriesStore.entries,
|
308
308
|
});
|
309
|
+
|
310
|
+
if (this.$refs.viewPopover) {
|
311
|
+
this.$refs.viewPopover.hide();
|
312
|
+
}
|
309
313
|
}
|
310
314
|
},
|
311
315
|
mounted: function () {
|
@@ -433,6 +437,7 @@ export default {
|
|
433
437
|
padding: 4px 8px 12px 8px;
|
434
438
|
min-width:unset!important;
|
435
439
|
width:unset!important;
|
440
|
+
background-color: #f3ecf6;
|
436
441
|
cursor:default;
|
437
442
|
.el-popper__arrow {
|
438
443
|
&:before {
|
@@ -280,7 +280,12 @@ export default {
|
|
280
280
|
const activeContents = splitdialog.getActiveContents();
|
281
281
|
//Push new suggestions into the pre-existing suggestions array
|
282
282
|
activeContents.forEach(content => content.searchSuggestions(payload.data.term, suggestions));
|
283
|
-
const
|
283
|
+
const parsed = [];
|
284
|
+
//Remove double quote as it is used as a speical character
|
285
|
+
suggestions.forEach(suggestion => {
|
286
|
+
parsed.push(suggestion.replaceAll("\"", ""));
|
287
|
+
});
|
288
|
+
const unique = new Set(parsed);
|
284
289
|
suggestions.length = 0;
|
285
290
|
for (const item of unique) {
|
286
291
|
suggestions.push({"value": "\"" + item +"\""});
|
@@ -304,7 +309,7 @@ export default {
|
|
304
309
|
onConnectivityComponentClick: function (data) {
|
305
310
|
EventBus.emit('connectivity-component-click', {
|
306
311
|
connectivityInfo: this.connectivityInfo,
|
307
|
-
data
|
312
|
+
data: data,
|
308
313
|
});
|
309
314
|
},
|
310
315
|
hoverChanged: function (data) {
|
@@ -15,8 +15,12 @@
|
|
15
15
|
@help-mode-last-item="onHelpModeLastItem"
|
16
16
|
@shown-tooltip="onTooltipShown"
|
17
17
|
@shown-map-tooltip="onMapTooltipShown"
|
18
|
+
@annotation-open="onAnnotationOpen"
|
19
|
+
@annotation-close="onAnnotationClose"
|
20
|
+
:annotationSidebar="annotationSidebar"
|
18
21
|
@connectivity-info-open="onConnectivityInfoOpen"
|
19
22
|
@connectivity-info-close="onConnectivityInfoClose"
|
23
|
+
@connectivity-graph-error="onConnectivityGraphError"
|
20
24
|
:connectivityInfoSidebar="connectivityInfoSidebar"
|
21
25
|
:pathControls="true"
|
22
26
|
ref="flatmap"
|
@@ -131,7 +135,8 @@ export default {
|
|
131
135
|
searchSuggestions: function (term, suggestions) {
|
132
136
|
if (term && this.$refs.flatmap.mapImp) {
|
133
137
|
const results = this.$refs.flatmap.mapImp.search(term);
|
134
|
-
results.__featureIds
|
138
|
+
const featureIds = results.__featureIds || results.featureIds;
|
139
|
+
featureIds.forEach(id => {
|
135
140
|
const annotation = this.$refs.flatmap.mapImp.annotation(id);
|
136
141
|
if (annotation && annotation.label)
|
137
142
|
suggestions.push(annotation.label);
|
@@ -166,6 +171,12 @@ export default {
|
|
166
171
|
},
|
167
172
|
},
|
168
173
|
mounted: function() {
|
174
|
+
EventBus.on('annotation-close', (payload) => {
|
175
|
+
const currentFlatmap = this.$refs.flatmap;
|
176
|
+
if (payload?.tabClose && currentFlatmap) {
|
177
|
+
this.$refs.flatmap.annotationEventCallback({}, { type: 'aborted' })
|
178
|
+
}
|
179
|
+
});
|
169
180
|
EventBus.on("markerUpdate", () => {
|
170
181
|
this.flatmapMarkerUpdate(undefined);
|
171
182
|
});
|
@@ -19,6 +19,7 @@
|
|
19
19
|
:annotationSidebar="annotationSidebar"
|
20
20
|
@connectivity-info-open="onConnectivityInfoOpen"
|
21
21
|
@connectivity-info-close="onConnectivityInfoClose"
|
22
|
+
@connectivity-graph-error="onConnectivityGraphError"
|
22
23
|
:connectivityInfoSidebar="connectivityInfoSidebar"
|
23
24
|
ref="multiflatmap"
|
24
25
|
:displayMinimap="true"
|
@@ -417,136 +418,10 @@ export default {
|
|
417
418
|
const flatmap = this.$refs.multiflatmap.getCurrentFlatmap();
|
418
419
|
flatmap.changeViewingMode(modeName);
|
419
420
|
},
|
420
|
-
removeConnectivityTooltips: function () {
|
421
|
-
const flatmap = this.$refs.multiflatmap.getCurrentFlatmap();
|
422
|
-
if (flatmap?.$el) {
|
423
|
-
// close all tooltips on the current flatmap element
|
424
|
-
const tooltips = flatmap.$el.querySelectorAll('.flatmap-tooltip-popup');
|
425
|
-
tooltips.forEach(tooltip => tooltip.remove());
|
426
|
-
}
|
427
|
-
},
|
428
|
-
createTooltipForConnectivity: function (filteredConnectivityData, mapImp) {
|
429
|
-
// combine all labels to show together
|
430
|
-
// content type must be DOM object to use HTML
|
431
|
-
const labelsContainer = document.createElement('div');
|
432
|
-
labelsContainer.classList.add('flatmap-feature-label');
|
433
|
-
|
434
|
-
filteredConnectivityData.forEach((connectivity, i) => {
|
435
|
-
const { label } = connectivity;
|
436
|
-
labelsContainer.append(capitalise(label));
|
437
|
-
|
438
|
-
if ((i + 1) < filteredConnectivityData.length) {
|
439
|
-
const hr = document.createElement('hr');
|
440
|
-
labelsContainer.appendChild(hr);
|
441
|
-
}
|
442
|
-
});
|
443
|
-
|
444
|
-
mapImp.showPopup(
|
445
|
-
filteredConnectivityData[0].featureId,
|
446
|
-
labelsContainer,
|
447
|
-
{
|
448
|
-
className: 'custom-popup flatmap-tooltip-popup',
|
449
|
-
positionAtLastClick: false,
|
450
|
-
preserveSelection: true,
|
451
|
-
}
|
452
|
-
);
|
453
|
-
},
|
454
|
-
emitConnectivityGraphError: function (errorData) {
|
455
|
-
if (errorData.length) {
|
456
|
-
const errorDataToEmit = [...new Set(errorData)];
|
457
|
-
let errorMessage = '';
|
458
|
-
|
459
|
-
errorDataToEmit.forEach((connectivity, i) => {
|
460
|
-
const { label } = connectivity;
|
461
|
-
errorMessage += (i === 0) ? capitalise(label) : label;
|
462
|
-
|
463
|
-
if (errorDataToEmit.length > 1) {
|
464
|
-
if ((i + 2) === errorDataToEmit.length) {
|
465
|
-
errorMessage += ' and ';
|
466
|
-
} else if ((i + 1) < errorDataToEmit.length) {
|
467
|
-
errorMessage += ', ';
|
468
|
-
}
|
469
|
-
}
|
470
|
-
});
|
471
|
-
errorMessage += ' cannot be found on the map!';
|
472
|
-
EventBus.emit('connectivity-graph-error', {
|
473
|
-
data: errorMessage
|
474
|
-
});
|
475
|
-
}
|
476
|
-
},
|
477
421
|
showConnectivityTooltips: function (payload) {
|
478
|
-
const { connectivityInfo, data } = payload;
|
479
|
-
const featuresToHighlight = [];
|
480
|
-
const connectivityData = [];
|
481
|
-
const filteredConnectivityData = [];
|
482
|
-
const errorData = [];
|
483
|
-
|
484
|
-
if (!data.length) {
|
485
|
-
this.removeConnectivityTooltips();
|
486
|
-
} else {
|
487
|
-
if (typeof data[0] === 'object') {
|
488
|
-
// Connectivity list hover emits array of objects
|
489
|
-
data.forEach((item) => {
|
490
|
-
connectivityData.push({
|
491
|
-
id: item.id,
|
492
|
-
label: item.name,
|
493
|
-
});
|
494
|
-
})
|
495
|
-
} else {
|
496
|
-
// Connectivity graph node click emits an array of data,
|
497
|
-
// a combination of ids and labels.
|
498
|
-
// The first half is ids and the second half is labels.
|
499
|
-
for (let i = 0; i < data.length / 2; i++) {
|
500
|
-
connectivityData.push({
|
501
|
-
id: data[i],
|
502
|
-
label: data[i + data.length / 2]
|
503
|
-
});
|
504
|
-
}
|
505
|
-
}
|
506
|
-
}
|
507
|
-
|
508
|
-
// to keep the highlighted path on map
|
509
|
-
if (connectivityInfo && connectivityInfo.featureId) {
|
510
|
-
featuresToHighlight.push(...connectivityInfo.featureId);
|
511
|
-
}
|
512
|
-
|
513
|
-
// search the features on the map first
|
514
422
|
if (this.flatmapReady) {
|
515
423
|
const flatmap = this.$refs.multiflatmap.getCurrentFlatmap();
|
516
|
-
|
517
|
-
connectivityData.forEach((connectivity, i) => {
|
518
|
-
const {id, label} = connectivity;
|
519
|
-
const response = flatmap.mapImp.search(id);
|
520
|
-
|
521
|
-
if (response?.results.length) {
|
522
|
-
const featureId = response?.results[0].featureId;
|
523
|
-
|
524
|
-
filteredConnectivityData.push({
|
525
|
-
featureId,
|
526
|
-
id,
|
527
|
-
label,
|
528
|
-
});
|
529
|
-
featuresToHighlight.push(id);
|
530
|
-
} else {
|
531
|
-
errorData.push(connectivity);
|
532
|
-
}
|
533
|
-
});
|
534
|
-
|
535
|
-
if (filteredConnectivityData.length) {
|
536
|
-
// show tooltip of the first item
|
537
|
-
// with all labels
|
538
|
-
this.createTooltipForConnectivity(filteredConnectivityData, flatmap.mapImp);
|
539
|
-
} else {
|
540
|
-
errorData.push(...connectivityData);
|
541
|
-
this.removeConnectivityTooltips();
|
542
|
-
}
|
543
|
-
|
544
|
-
// Emit error message for connectivity graph
|
545
|
-
this.emitConnectivityGraphError(errorData);
|
546
|
-
|
547
|
-
// highlight all available features
|
548
|
-
flatmap.mapImp.zoomToFeatures(featuresToHighlight, { noZoomIn: true });
|
549
|
-
}
|
424
|
+
flatmap.showConnectivityTooltips(payload);
|
550
425
|
}
|
551
426
|
},
|
552
427
|
},
|
@@ -72,9 +72,7 @@ export default {
|
|
72
72
|
* Perform a local search on this contentvuer
|
73
73
|
*/
|
74
74
|
search: function (term) {
|
75
|
-
|
76
|
-
const parsed = term.replace(/(^"|"$)/g, '');
|
77
|
-
return this.$refs.scaffold.search(parsed, true);
|
75
|
+
return this.$refs.scaffold.search(term, true);
|
78
76
|
},
|
79
77
|
searchSuggestions: function(term, suggestions){
|
80
78
|
if (term === "" || !this.$refs.scaffold) {
|
@@ -502,6 +502,9 @@ export default {
|
|
502
502
|
onConnectivityInfoClose: function () {
|
503
503
|
EventBus.emit('connectivity-info-close');
|
504
504
|
},
|
505
|
+
onConnectivityGraphError: function (errorInfo) {
|
506
|
+
EventBus.emit('connectivity-graph-error', errorInfo);
|
507
|
+
},
|
505
508
|
},
|
506
509
|
data: function () {
|
507
510
|
return {
|