@abi-software/mapintegratedvuer 0.7.2-vue3.0-alpha.0 → 1.0.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/LICENSE +201 -201
- package/README.md +150 -150
- package/assets/styleguide.css +19 -19
- package/cypress.config.js +23 -23
- package/dist/index.html +17 -17
- package/dist/mapintegratedvuer.js +74203 -73758
- package/dist/mapintegratedvuer.umd.cjs +878 -515
- package/dist/style.css +1 -1
- package/package.json +134 -135
- package/public/index.html +17 -17
- package/reporter-config.json +9 -9
- package/src/App.vue +245 -245
- package/src/assets/_variables.scss +43 -43
- package/src/assets/fonts/mapicon-species.eot +0 -0
- package/src/assets/fonts/mapicon-species.ttf +0 -0
- package/src/assets/fonts/mapicon-species.woff +0 -0
- package/src/assets/header-icon.scss +67 -67
- package/src/assets/mapicon-species-style.css +41 -41
- package/src/assets/styles.scss +9 -9
- package/src/components/ContentBar.vue +376 -376
- package/src/components/ContentVuer.vue +217 -217
- package/src/components/ContextCard.vue +385 -385
- package/src/components/ContextHelp.vue +73 -73
- package/src/components/CustomSplitter.vue +151 -151
- package/src/components/DatasetHeader.vue +97 -97
- package/src/components/DialogToolbarContent.vue +464 -464
- package/src/components/EventBus.js +3 -3
- package/src/components/FlatmapContextCard.vue +134 -134
- package/src/components/MapContent.vue +328 -333
- package/src/components/ResizeSensor.vue +47 -47
- package/src/components/SearchControls.vue +115 -115
- package/src/components/SimulatedData.js +721 -721
- package/src/components/SplitDialog.vue +287 -287
- package/src/components/SplitFlow.vue +414 -414
- package/src/components/index.js +7 -7
- package/src/components/markerZoomLevelsHardCoded.js +255 -255
- package/src/components/scripts/utilities.js +173 -173
- package/src/components/viewers/Flatmap.vue +145 -145
- package/src/components/viewers/Iframe.vue +31 -31
- package/src/components/viewers/MultiFlatmap.vue +384 -384
- package/src/components/viewers/Plot.vue +23 -23
- package/src/components/viewers/Scaffold.vue +198 -198
- package/src/components/viewers/Simulation.vue +21 -21
- package/src/icons/yellowstar.js +1 -1
- package/src/main.js +31 -31
- package/src/mixins/ContentMixin.js +438 -438
- package/src/mixins/DynamicMarkerMixin.js +88 -88
- package/src/mixins/S3Bucket.vue +37 -37
- package/src/stores/entries.js +40 -40
- package/src/stores/index.js +23 -23
- package/src/stores/settings.js +144 -144
- package/src/stores/splitFlow.js +523 -523
- package/static.json +7 -7
- package/vite.config.js +70 -70
- package/vite.static-build.js +12 -12
- package/vitest.workspace.js +3 -3
- package/vuese-generator.js +65 -65
- package/assets/gazelle-icons-no-background.css +0 -32
- package/dist/matterport.pdf +0 -0
- package/dist/test.txt +0 -0
- package/public/matterport.pdf +0 -0
- package/public/test.txt +0 -0
- package/q.json +0 -690
- package/src/mixins/RetrieveContextCardMixin.js +0 -82
- package/tsconfig.json +0 -19
@@ -1,464 +1,464 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="header">
|
3
|
-
<map-svg-sprite-color />
|
4
|
-
<search-controls
|
5
|
-
@search="$emit('local-search', {term: $event});"
|
6
|
-
@fetch-suggestions="$emit('fetch-suggestions', {data: $event});"
|
7
|
-
:failedSearch="failedSearch"
|
8
|
-
/>
|
9
|
-
|
10
|
-
<div v-if="syncMode" class="switch-control">
|
11
|
-
<el-switch
|
12
|
-
class="switch"
|
13
|
-
v-model="independent"
|
14
|
-
active-text="Independent"
|
15
|
-
:width=30
|
16
|
-
inactive-text="Linked">
|
17
|
-
</el-switch>
|
18
|
-
<el-popover
|
19
|
-
class="tooltip"
|
20
|
-
placement="bottom-end"
|
21
|
-
:show-after="helpDelay"
|
22
|
-
:teleported=false
|
23
|
-
trigger="hover"
|
24
|
-
popper-class="header-popper">
|
25
|
-
<template #reference>
|
26
|
-
<map-svg-icon icon="help" class="sync-help header-icon"/>
|
27
|
-
</template>
|
28
|
-
<template #default>
|
29
|
-
When in Linked mode the two maps will interact
|
30
|
-
<br>
|
31
|
-
together. Select an organ in one and it will
|
32
|
-
<br>
|
33
|
-
be automatically selected in the other.
|
34
|
-
<br>
|
35
|
-
In Independent mode the maps will work separately."
|
36
|
-
</template>
|
37
|
-
</el-popover>
|
38
|
-
</div>
|
39
|
-
|
40
|
-
<el-row class="icon-group">
|
41
|
-
<el-popover
|
42
|
-
v-if="activeViewRef"
|
43
|
-
:virtual-ref="activeViewRef"
|
44
|
-
ref="viewPopover"
|
45
|
-
placement="bottom"
|
46
|
-
width="133"
|
47
|
-
:teleported=false
|
48
|
-
trigger="click"
|
49
|
-
popper-class="view-icon-popover"
|
50
|
-
virtual-triggering
|
51
|
-
>
|
52
|
-
<el-row :gutter="20"
|
53
|
-
v-for="item in viewIcons"
|
54
|
-
:key="item.name"
|
55
|
-
:class="[{ 'active': item.icon == activeView},
|
56
|
-
{'disabled': item.min > numberOfEntries},
|
57
|
-
'view-icon-row']"
|
58
|
-
@click="viewClicked(item.icon)"
|
59
|
-
>
|
60
|
-
<el-col :span="4">
|
61
|
-
<map-svg-icon :icon="item.icon"
|
62
|
-
class="view-icon"/>
|
63
|
-
</el-col>
|
64
|
-
<el-col :offset="2" :span="18" class="view-text">
|
65
|
-
{{item.name}}
|
66
|
-
</el-col>
|
67
|
-
</el-row>
|
68
|
-
</el-popover>
|
69
|
-
<el-popover class="tooltip" content="Split screen" placement="bottom-end"
|
70
|
-
:show-after="helpDelay" :teleported=false trigger="hover"
|
71
|
-
popper-class="header-popper"
|
72
|
-
>
|
73
|
-
<template #reference>
|
74
|
-
<map-svg-icon :icon="activeView"
|
75
|
-
ref="activeViewRef"
|
76
|
-
:class="[{'disabled': (1 >= numberOfEntries)},
|
77
|
-
'header-icon']"
|
78
|
-
/>
|
79
|
-
</template>
|
80
|
-
</el-popover>
|
81
|
-
|
82
|
-
<el-popover class="tooltip" content="Help" placement="bottom-end" :show-after="helpDelay"
|
83
|
-
:teleported=false trigger="hover" popper-class="header-popper" >
|
84
|
-
<template #reference>
|
85
|
-
<map-svg-icon icon="tooltips" class="header-icon" @click="startHelp()"/>
|
86
|
-
</template>
|
87
|
-
</el-popover>
|
88
|
-
<el-popover class="tooltip"
|
89
|
-
content="Fullscreen" placement="bottom-end" :show-after="helpDelay"
|
90
|
-
:teleported=false trigger="hover" popper-class="header-popper">
|
91
|
-
<template #reference>
|
92
|
-
<map-svg-icon v-show="!isFullscreen" icon="fullScreen" class="header-icon" @click="onFullscreen"/>
|
93
|
-
</template>
|
94
|
-
</el-popover>
|
95
|
-
<el-popover class="tooltip"
|
96
|
-
content="Exit fullscreen" placement="bottom-end" :show-after="helpDelay"
|
97
|
-
:teleported=false trigger="hover" popper-class="header-popper">
|
98
|
-
<template #reference>
|
99
|
-
<map-svg-icon v-show="isFullscreen" icon="closeFullScreen" class="header-icon"
|
100
|
-
@click="onFullscreen"/>
|
101
|
-
</template>
|
102
|
-
</el-popover>
|
103
|
-
<el-popover
|
104
|
-
v-if="permalinkRef"
|
105
|
-
ref="linkPopover"
|
106
|
-
:virtual-ref="permalinkRef"
|
107
|
-
placement="bottom-end"
|
108
|
-
width="400"
|
109
|
-
:teleported=false
|
110
|
-
trigger="click"
|
111
|
-
popper-class="link-popover"
|
112
|
-
virtual-triggering
|
113
|
-
>
|
114
|
-
<el-row :gutter="20"
|
115
|
-
v-loading="loadingLink"
|
116
|
-
element-loading-text="Creating link...">
|
117
|
-
<el-col :span="20">
|
118
|
-
<el-input
|
119
|
-
class="link-input"
|
120
|
-
size="small"
|
121
|
-
placeholder="Permanant Link Here"
|
122
|
-
:readonly=true
|
123
|
-
v-model="shareLink"
|
124
|
-
ref="linkInput">
|
125
|
-
</el-input>
|
126
|
-
</el-col>
|
127
|
-
<el-col :span="4">
|
128
|
-
<el-popover class="tooltip" content="Copy link" placement="bottom-end"
|
129
|
-
:show-after="helpDelay" :teleported=false trigger="hover"
|
130
|
-
popper-class="header-popper">
|
131
|
-
<template #reference>
|
132
|
-
<el-button class="copy-button"
|
133
|
-
:icon="ElIconCopyDocument" size="small"
|
134
|
-
@click="copyShareLink"></el-button>
|
135
|
-
</template>
|
136
|
-
</el-popover>
|
137
|
-
</el-col>
|
138
|
-
</el-row>
|
139
|
-
</el-popover>
|
140
|
-
<el-popover class="tooltip" content="Get permalink" placement="bottom-end"
|
141
|
-
:show-after="helpDelay" :teleported=false trigger="hover"
|
142
|
-
popper-class="header-popper"
|
143
|
-
>
|
144
|
-
<template #reference>
|
145
|
-
<map-svg-icon icon="permalink"
|
146
|
-
ref="permalinkRef"
|
147
|
-
class="header-icon"
|
148
|
-
@click="getShareLink"
|
149
|
-
v-show="shareLink"
|
150
|
-
/>
|
151
|
-
</template>
|
152
|
-
</el-popover>
|
153
|
-
<el-popover class="tooltip" content="Close" placement="bottom-end" :show-after="helpDelay"
|
154
|
-
:teleported=false trigger="hover" popper-class="header-popper">
|
155
|
-
<template #reference>
|
156
|
-
<map-svg-icon icon="close" class="header-icon" @click="close" v-show="showIcons"/>
|
157
|
-
</template>
|
158
|
-
</el-popover>
|
159
|
-
|
160
|
-
</el-row>
|
161
|
-
</div>
|
162
|
-
</template>
|
163
|
-
|
164
|
-
|
165
|
-
<script>
|
166
|
-
/* eslint-disable no-alert, no-console */
|
167
|
-
import { shallowRef } from 'vue';
|
168
|
-
import EventBus from './EventBus';
|
169
|
-
import { mapStores } from 'pinia';
|
170
|
-
import { useEntriesStore } from '../stores/entries';
|
171
|
-
import { useSettingsStore } from '../stores/settings';
|
172
|
-
import { useSplitFlowStore } from '../stores/splitFlow';
|
173
|
-
import { MapSvgIcon, MapSvgSpriteColor } from '@abi-software/svg-sprite';
|
174
|
-
import SearchControls from './SearchControls.vue';
|
175
|
-
import {
|
176
|
-
CopyDocument as ElIconCopyDocument,
|
177
|
-
} from '@element-plus/icons-vue';
|
178
|
-
import {
|
179
|
-
ElButton as Button,
|
180
|
-
ElCol as Col,
|
181
|
-
ElIcon as Icon,
|
182
|
-
ElInput as Input,
|
183
|
-
ElPopover as Popover,
|
184
|
-
ElRow as Row,
|
185
|
-
ElSwitch as Switch,
|
186
|
-
} from "element-plus";
|
187
|
-
|
188
|
-
/**
|
189
|
-
* Cmponent for the header of differnt vuers.
|
190
|
-
*/
|
191
|
-
export default {
|
192
|
-
name: "DialogToolbarContent",
|
193
|
-
components: {
|
194
|
-
Button,
|
195
|
-
Col,
|
196
|
-
Icon,
|
197
|
-
Input,
|
198
|
-
Popover,
|
199
|
-
Row,
|
200
|
-
Switch,
|
201
|
-
MapSvgIcon,
|
202
|
-
MapSvgSpriteColor,
|
203
|
-
SearchControls,
|
204
|
-
ElIconCopyDocument,
|
205
|
-
},
|
206
|
-
props: {
|
207
|
-
/**
|
208
|
-
* Array of titles.
|
209
|
-
*/
|
210
|
-
numberOfEntries: {
|
211
|
-
type: Number,
|
212
|
-
default: 0
|
213
|
-
},
|
214
|
-
/**
|
215
|
-
* Display icons for docking, undocking and etc.
|
216
|
-
*/
|
217
|
-
showIcons: {
|
218
|
-
type: Boolean,
|
219
|
-
default: false
|
220
|
-
|
221
|
-
},
|
222
|
-
},
|
223
|
-
computed: {
|
224
|
-
...mapStores(useEntriesStore, useSettingsStore, useSplitFlowStore),
|
225
|
-
activeView() {
|
226
|
-
return this.splitFlowStore.activeView;
|
227
|
-
},
|
228
|
-
helpDelay() {
|
229
|
-
return this.settingsStore.helpDelay;
|
230
|
-
},
|
231
|
-
shareLink() {
|
232
|
-
return this.settingsStore.shareLink;
|
233
|
-
},
|
234
|
-
syncMode() {
|
235
|
-
return this.splitFlowStore.syncMode;
|
236
|
-
},
|
237
|
-
viewIcons() {
|
238
|
-
return this.splitFlowStore.viewIcons;
|
239
|
-
},
|
240
|
-
globalCallback() {
|
241
|
-
return this.splitFlowStore.globalCallback;
|
242
|
-
}
|
243
|
-
},
|
244
|
-
watch: {
|
245
|
-
shareLink: function() {
|
246
|
-
this.loadingLink = false;
|
247
|
-
},
|
248
|
-
independent: function(value) {
|
249
|
-
let flag = !(value === true);
|
250
|
-
if (this.globalCallback !== flag)
|
251
|
-
this.splitFlowStore.toggleGlobalCallback(flag);
|
252
|
-
},
|
253
|
-
globalCallback: function(value) {
|
254
|
-
let flag = !(value === true);
|
255
|
-
if (flag !== this.independent)
|
256
|
-
this.independent = flag;
|
257
|
-
}
|
258
|
-
},
|
259
|
-
data: function() {
|
260
|
-
return {
|
261
|
-
isFullscreen: false,
|
262
|
-
loadingLink: true,
|
263
|
-
shareLinkDisplay: false,
|
264
|
-
independent: true,
|
265
|
-
failedSearch: undefined,
|
266
|
-
activeViewRef: undefined,
|
267
|
-
permalinkRef: undefined,
|
268
|
-
ElIconCopyDocument: shallowRef(ElIconCopyDocument)
|
269
|
-
}
|
270
|
-
},
|
271
|
-
methods: {
|
272
|
-
titleClicked: function(id) {
|
273
|
-
this.$emit("titleClicked", id);
|
274
|
-
},
|
275
|
-
startHelp: function(){
|
276
|
-
EventBus.emit("startHelp");
|
277
|
-
},
|
278
|
-
onFullscreen: function() {
|
279
|
-
this.$emit("onFullscreen");
|
280
|
-
this.isFullscreen = !this.isFullscreen;
|
281
|
-
},
|
282
|
-
close: function() {
|
283
|
-
this.$emit("close");
|
284
|
-
},
|
285
|
-
copyShareLink: function() {
|
286
|
-
if (document) {
|
287
|
-
this.$refs.linkInput.$el.querySelector("input").select();
|
288
|
-
document.execCommand('copy');
|
289
|
-
}
|
290
|
-
},
|
291
|
-
setFailedSearch: function(result) {
|
292
|
-
this.failedSearch = result;
|
293
|
-
},
|
294
|
-
getShareLink: function() {
|
295
|
-
this.loadingLink = true;
|
296
|
-
this.shareLinkDisplay = true;
|
297
|
-
EventBus.emit("updateShareLinkRequested");
|
298
|
-
},
|
299
|
-
viewClicked: function(view) {
|
300
|
-
this.splitFlowStore.updateActiveView({
|
301
|
-
view,
|
302
|
-
entries: this.entriesStore.entries,
|
303
|
-
});
|
304
|
-
}
|
305
|
-
},
|
306
|
-
mounted: function () {
|
307
|
-
this.activeViewRef = shallowRef(this.$refs.activeViewRef);
|
308
|
-
this.permalinkRef = shallowRef(this.$refs.permalinkRef);
|
309
|
-
},
|
310
|
-
};
|
311
|
-
</script>
|
312
|
-
|
313
|
-
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
314
|
-
<style scoped lang="scss">
|
315
|
-
@use "../assets/header-icon.scss";
|
316
|
-
|
317
|
-
.icon-group {
|
318
|
-
:deep(.el-button--text) {
|
319
|
-
color:#606266;
|
320
|
-
font-size: 1.5em;
|
321
|
-
&:hover {
|
322
|
-
color: $app-primary-color;
|
323
|
-
}
|
324
|
-
}
|
325
|
-
}
|
326
|
-
|
327
|
-
.icon-transform {
|
328
|
-
-moz-transform: rotate(90deg);
|
329
|
-
-webkit-transform: rotate(90deg);
|
330
|
-
-o-transform: rotate(90deg);
|
331
|
-
-ms-transform: rotate(90deg);
|
332
|
-
transform: rotate(90deg);
|
333
|
-
padding:10px;
|
334
|
-
}
|
335
|
-
|
336
|
-
.header {
|
337
|
-
height:32px;
|
338
|
-
}
|
339
|
-
|
340
|
-
:deep(.header-popper.el-popover.el-popper) {
|
341
|
-
padding: 6px 4px;
|
342
|
-
font-size:12px;
|
343
|
-
color: rgb(48, 49, 51);
|
344
|
-
background-color: #f3ecf6;
|
345
|
-
border: 1px solid $app-primary-color;
|
346
|
-
white-space: nowrap;
|
347
|
-
min-width: unset;
|
348
|
-
.el-popper__arrow {
|
349
|
-
&:before {
|
350
|
-
border-color: $app-primary-color;
|
351
|
-
background-color: #f3ecf6;
|
352
|
-
}
|
353
|
-
}
|
354
|
-
}
|
355
|
-
|
356
|
-
:deep(.link-popover) {
|
357
|
-
border: 1px solid $app-primary-color;
|
358
|
-
}
|
359
|
-
|
360
|
-
:deep(.el-loading-spinner) {
|
361
|
-
.path {
|
362
|
-
stroke: $app-primary-color;
|
363
|
-
}
|
364
|
-
.el-loading-text {
|
365
|
-
color: $app-primary-color;
|
366
|
-
}
|
367
|
-
}
|
368
|
-
|
369
|
-
.copy-button {
|
370
|
-
color:#FFFFFF;
|
371
|
-
background-color:$app-primary-color;
|
372
|
-
&:hover, &:focus {
|
373
|
-
color:#FFFFFF;
|
374
|
-
background-color:$app-primary-color;
|
375
|
-
box-shadow: -3px 2px 4px #000000;
|
376
|
-
}
|
377
|
-
}
|
378
|
-
|
379
|
-
.link-input {
|
380
|
-
:deep(.el-input__inner) {
|
381
|
-
color:#303133;
|
382
|
-
&:focus {
|
383
|
-
border-color:$app-primary-color;
|
384
|
-
}
|
385
|
-
}
|
386
|
-
}
|
387
|
-
|
388
|
-
.view-icon-row {
|
389
|
-
height: 32px;
|
390
|
-
width: 133px;
|
391
|
-
border-radius: 4px;
|
392
|
-
border: 1px solid rgb(151, 151, 151);
|
393
|
-
font-size: 14px;
|
394
|
-
margin:8px 0px 0px 0px!important;
|
395
|
-
cursor: pointer;
|
396
|
-
|
397
|
-
&.active {
|
398
|
-
border: 1px solid $app-primary-color;
|
399
|
-
background: rgba(131, 0, 191, 0.1);
|
400
|
-
}
|
401
|
-
}
|
402
|
-
|
403
|
-
.view-icon {
|
404
|
-
font-size: 1.7em;
|
405
|
-
height: 24px!important;
|
406
|
-
width: 24px!important;
|
407
|
-
color: $app-primary-color;
|
408
|
-
padding-top:3px;
|
409
|
-
}
|
410
|
-
|
411
|
-
.view-text {
|
412
|
-
letter-spacing:0px;
|
413
|
-
font-size:11px;
|
414
|
-
line-height:14px;
|
415
|
-
font-family:'Asap', 'Avenir', Arial, sans-serif;
|
416
|
-
font-weight:550;
|
417
|
-
padding-top:7px;
|
418
|
-
}
|
419
|
-
|
420
|
-
:deep(.view-icon-popover.el-popper) {
|
421
|
-
border: 1px solid $app-primary-color;
|
422
|
-
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
|
423
|
-
padding: 4px 8px 12px 8px;
|
424
|
-
min-width:unset!important;
|
425
|
-
width:unset!important;
|
426
|
-
cursor:default;
|
427
|
-
.el-popper__arrow {
|
428
|
-
&:before {
|
429
|
-
border-color: $app-primary-color;
|
430
|
-
background-color: #f3ecf6;
|
431
|
-
}
|
432
|
-
}
|
433
|
-
}
|
434
|
-
|
435
|
-
.switch-control {
|
436
|
-
width:250px;
|
437
|
-
top:2px;
|
438
|
-
left: calc(50% - 60px);
|
439
|
-
position: absolute;
|
440
|
-
.sync-help {
|
441
|
-
left:5px;
|
442
|
-
stroke: $app-primary-color;
|
443
|
-
}
|
444
|
-
}
|
445
|
-
|
446
|
-
.switch {
|
447
|
-
padding-right: 0.5rem;
|
448
|
-
padding-left: 0.5rem;
|
449
|
-
border-radius: 4px;
|
450
|
-
border: 1px solid rgb(220, 223, 230);
|
451
|
-
vertical-align: super;
|
452
|
-
height: 28px;
|
453
|
-
}
|
454
|
-
|
455
|
-
.sync-help {
|
456
|
-
margin-left: 5px;
|
457
|
-
}
|
458
|
-
|
459
|
-
:deep(.el-loading-spinner) {
|
460
|
-
top: 0px;
|
461
|
-
scale: 0.7;
|
462
|
-
}
|
463
|
-
|
464
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div class="header">
|
3
|
+
<map-svg-sprite-color />
|
4
|
+
<search-controls
|
5
|
+
@search="$emit('local-search', {term: $event});"
|
6
|
+
@fetch-suggestions="$emit('fetch-suggestions', {data: $event});"
|
7
|
+
:failedSearch="failedSearch"
|
8
|
+
/>
|
9
|
+
|
10
|
+
<div v-if="syncMode" class="switch-control">
|
11
|
+
<el-switch
|
12
|
+
class="switch"
|
13
|
+
v-model="independent"
|
14
|
+
active-text="Independent"
|
15
|
+
:width=30
|
16
|
+
inactive-text="Linked">
|
17
|
+
</el-switch>
|
18
|
+
<el-popover
|
19
|
+
class="tooltip"
|
20
|
+
placement="bottom-end"
|
21
|
+
:show-after="helpDelay"
|
22
|
+
:teleported=false
|
23
|
+
trigger="hover"
|
24
|
+
popper-class="header-popper">
|
25
|
+
<template #reference>
|
26
|
+
<map-svg-icon icon="help" class="sync-help header-icon"/>
|
27
|
+
</template>
|
28
|
+
<template #default>
|
29
|
+
When in Linked mode the two maps will interact
|
30
|
+
<br>
|
31
|
+
together. Select an organ in one and it will
|
32
|
+
<br>
|
33
|
+
be automatically selected in the other.
|
34
|
+
<br>
|
35
|
+
In Independent mode the maps will work separately."
|
36
|
+
</template>
|
37
|
+
</el-popover>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<el-row class="icon-group">
|
41
|
+
<el-popover
|
42
|
+
v-if="activeViewRef"
|
43
|
+
:virtual-ref="activeViewRef"
|
44
|
+
ref="viewPopover"
|
45
|
+
placement="bottom"
|
46
|
+
width="133"
|
47
|
+
:teleported=false
|
48
|
+
trigger="click"
|
49
|
+
popper-class="view-icon-popover"
|
50
|
+
virtual-triggering
|
51
|
+
>
|
52
|
+
<el-row :gutter="20"
|
53
|
+
v-for="item in viewIcons"
|
54
|
+
:key="item.name"
|
55
|
+
:class="[{ 'active': item.icon == activeView},
|
56
|
+
{'disabled': item.min > numberOfEntries},
|
57
|
+
'view-icon-row']"
|
58
|
+
@click="viewClicked(item.icon)"
|
59
|
+
>
|
60
|
+
<el-col :span="4">
|
61
|
+
<map-svg-icon :icon="item.icon"
|
62
|
+
class="view-icon"/>
|
63
|
+
</el-col>
|
64
|
+
<el-col :offset="2" :span="18" class="view-text">
|
65
|
+
{{item.name}}
|
66
|
+
</el-col>
|
67
|
+
</el-row>
|
68
|
+
</el-popover>
|
69
|
+
<el-popover class="tooltip" content="Split screen" placement="bottom-end"
|
70
|
+
:show-after="helpDelay" :teleported=false trigger="hover"
|
71
|
+
popper-class="header-popper"
|
72
|
+
>
|
73
|
+
<template #reference>
|
74
|
+
<map-svg-icon :icon="activeView"
|
75
|
+
ref="activeViewRef"
|
76
|
+
:class="[{'disabled': (1 >= numberOfEntries)},
|
77
|
+
'header-icon']"
|
78
|
+
/>
|
79
|
+
</template>
|
80
|
+
</el-popover>
|
81
|
+
|
82
|
+
<el-popover class="tooltip" content="Help" placement="bottom-end" :show-after="helpDelay"
|
83
|
+
:teleported=false trigger="hover" popper-class="header-popper" >
|
84
|
+
<template #reference>
|
85
|
+
<map-svg-icon icon="tooltips" class="header-icon" @click="startHelp()"/>
|
86
|
+
</template>
|
87
|
+
</el-popover>
|
88
|
+
<el-popover class="tooltip"
|
89
|
+
content="Fullscreen" placement="bottom-end" :show-after="helpDelay"
|
90
|
+
:teleported=false trigger="hover" popper-class="header-popper">
|
91
|
+
<template #reference>
|
92
|
+
<map-svg-icon v-show="!isFullscreen" icon="fullScreen" class="header-icon" @click="onFullscreen"/>
|
93
|
+
</template>
|
94
|
+
</el-popover>
|
95
|
+
<el-popover class="tooltip"
|
96
|
+
content="Exit fullscreen" placement="bottom-end" :show-after="helpDelay"
|
97
|
+
:teleported=false trigger="hover" popper-class="header-popper">
|
98
|
+
<template #reference>
|
99
|
+
<map-svg-icon v-show="isFullscreen" icon="closeFullScreen" class="header-icon"
|
100
|
+
@click="onFullscreen"/>
|
101
|
+
</template>
|
102
|
+
</el-popover>
|
103
|
+
<el-popover
|
104
|
+
v-if="permalinkRef"
|
105
|
+
ref="linkPopover"
|
106
|
+
:virtual-ref="permalinkRef"
|
107
|
+
placement="bottom-end"
|
108
|
+
width="400"
|
109
|
+
:teleported=false
|
110
|
+
trigger="click"
|
111
|
+
popper-class="link-popover"
|
112
|
+
virtual-triggering
|
113
|
+
>
|
114
|
+
<el-row :gutter="20"
|
115
|
+
v-loading="loadingLink"
|
116
|
+
element-loading-text="Creating link...">
|
117
|
+
<el-col :span="20">
|
118
|
+
<el-input
|
119
|
+
class="link-input"
|
120
|
+
size="small"
|
121
|
+
placeholder="Permanant Link Here"
|
122
|
+
:readonly=true
|
123
|
+
v-model="shareLink"
|
124
|
+
ref="linkInput">
|
125
|
+
</el-input>
|
126
|
+
</el-col>
|
127
|
+
<el-col :span="4">
|
128
|
+
<el-popover class="tooltip" content="Copy link" placement="bottom-end"
|
129
|
+
:show-after="helpDelay" :teleported=false trigger="hover"
|
130
|
+
popper-class="header-popper">
|
131
|
+
<template #reference>
|
132
|
+
<el-button class="copy-button"
|
133
|
+
:icon="ElIconCopyDocument" size="small"
|
134
|
+
@click="copyShareLink"></el-button>
|
135
|
+
</template>
|
136
|
+
</el-popover>
|
137
|
+
</el-col>
|
138
|
+
</el-row>
|
139
|
+
</el-popover>
|
140
|
+
<el-popover class="tooltip" content="Get permalink" placement="bottom-end"
|
141
|
+
:show-after="helpDelay" :teleported=false trigger="hover"
|
142
|
+
popper-class="header-popper"
|
143
|
+
>
|
144
|
+
<template #reference>
|
145
|
+
<map-svg-icon icon="permalink"
|
146
|
+
ref="permalinkRef"
|
147
|
+
class="header-icon"
|
148
|
+
@click="getShareLink"
|
149
|
+
v-show="shareLink"
|
150
|
+
/>
|
151
|
+
</template>
|
152
|
+
</el-popover>
|
153
|
+
<el-popover class="tooltip" content="Close" placement="bottom-end" :show-after="helpDelay"
|
154
|
+
:teleported=false trigger="hover" popper-class="header-popper">
|
155
|
+
<template #reference>
|
156
|
+
<map-svg-icon icon="close" class="header-icon" @click="close" v-show="showIcons"/>
|
157
|
+
</template>
|
158
|
+
</el-popover>
|
159
|
+
|
160
|
+
</el-row>
|
161
|
+
</div>
|
162
|
+
</template>
|
163
|
+
|
164
|
+
|
165
|
+
<script>
|
166
|
+
/* eslint-disable no-alert, no-console */
|
167
|
+
import { shallowRef } from 'vue';
|
168
|
+
import EventBus from './EventBus';
|
169
|
+
import { mapStores } from 'pinia';
|
170
|
+
import { useEntriesStore } from '../stores/entries';
|
171
|
+
import { useSettingsStore } from '../stores/settings';
|
172
|
+
import { useSplitFlowStore } from '../stores/splitFlow';
|
173
|
+
import { MapSvgIcon, MapSvgSpriteColor } from '@abi-software/svg-sprite';
|
174
|
+
import SearchControls from './SearchControls.vue';
|
175
|
+
import {
|
176
|
+
CopyDocument as ElIconCopyDocument,
|
177
|
+
} from '@element-plus/icons-vue';
|
178
|
+
import {
|
179
|
+
ElButton as Button,
|
180
|
+
ElCol as Col,
|
181
|
+
ElIcon as Icon,
|
182
|
+
ElInput as Input,
|
183
|
+
ElPopover as Popover,
|
184
|
+
ElRow as Row,
|
185
|
+
ElSwitch as Switch,
|
186
|
+
} from "element-plus";
|
187
|
+
|
188
|
+
/**
|
189
|
+
* Cmponent for the header of differnt vuers.
|
190
|
+
*/
|
191
|
+
export default {
|
192
|
+
name: "DialogToolbarContent",
|
193
|
+
components: {
|
194
|
+
Button,
|
195
|
+
Col,
|
196
|
+
Icon,
|
197
|
+
Input,
|
198
|
+
Popover,
|
199
|
+
Row,
|
200
|
+
Switch,
|
201
|
+
MapSvgIcon,
|
202
|
+
MapSvgSpriteColor,
|
203
|
+
SearchControls,
|
204
|
+
ElIconCopyDocument,
|
205
|
+
},
|
206
|
+
props: {
|
207
|
+
/**
|
208
|
+
* Array of titles.
|
209
|
+
*/
|
210
|
+
numberOfEntries: {
|
211
|
+
type: Number,
|
212
|
+
default: 0
|
213
|
+
},
|
214
|
+
/**
|
215
|
+
* Display icons for docking, undocking and etc.
|
216
|
+
*/
|
217
|
+
showIcons: {
|
218
|
+
type: Boolean,
|
219
|
+
default: false
|
220
|
+
|
221
|
+
},
|
222
|
+
},
|
223
|
+
computed: {
|
224
|
+
...mapStores(useEntriesStore, useSettingsStore, useSplitFlowStore),
|
225
|
+
activeView() {
|
226
|
+
return this.splitFlowStore.activeView;
|
227
|
+
},
|
228
|
+
helpDelay() {
|
229
|
+
return this.settingsStore.helpDelay;
|
230
|
+
},
|
231
|
+
shareLink() {
|
232
|
+
return this.settingsStore.shareLink;
|
233
|
+
},
|
234
|
+
syncMode() {
|
235
|
+
return this.splitFlowStore.syncMode;
|
236
|
+
},
|
237
|
+
viewIcons() {
|
238
|
+
return this.splitFlowStore.viewIcons;
|
239
|
+
},
|
240
|
+
globalCallback() {
|
241
|
+
return this.splitFlowStore.globalCallback;
|
242
|
+
}
|
243
|
+
},
|
244
|
+
watch: {
|
245
|
+
shareLink: function() {
|
246
|
+
this.loadingLink = false;
|
247
|
+
},
|
248
|
+
independent: function(value) {
|
249
|
+
let flag = !(value === true);
|
250
|
+
if (this.globalCallback !== flag)
|
251
|
+
this.splitFlowStore.toggleGlobalCallback(flag);
|
252
|
+
},
|
253
|
+
globalCallback: function(value) {
|
254
|
+
let flag = !(value === true);
|
255
|
+
if (flag !== this.independent)
|
256
|
+
this.independent = flag;
|
257
|
+
}
|
258
|
+
},
|
259
|
+
data: function() {
|
260
|
+
return {
|
261
|
+
isFullscreen: false,
|
262
|
+
loadingLink: true,
|
263
|
+
shareLinkDisplay: false,
|
264
|
+
independent: true,
|
265
|
+
failedSearch: undefined,
|
266
|
+
activeViewRef: undefined,
|
267
|
+
permalinkRef: undefined,
|
268
|
+
ElIconCopyDocument: shallowRef(ElIconCopyDocument)
|
269
|
+
}
|
270
|
+
},
|
271
|
+
methods: {
|
272
|
+
titleClicked: function(id) {
|
273
|
+
this.$emit("titleClicked", id);
|
274
|
+
},
|
275
|
+
startHelp: function(){
|
276
|
+
EventBus.emit("startHelp");
|
277
|
+
},
|
278
|
+
onFullscreen: function() {
|
279
|
+
this.$emit("onFullscreen");
|
280
|
+
this.isFullscreen = !this.isFullscreen;
|
281
|
+
},
|
282
|
+
close: function() {
|
283
|
+
this.$emit("close");
|
284
|
+
},
|
285
|
+
copyShareLink: function() {
|
286
|
+
if (document) {
|
287
|
+
this.$refs.linkInput.$el.querySelector("input").select();
|
288
|
+
document.execCommand('copy');
|
289
|
+
}
|
290
|
+
},
|
291
|
+
setFailedSearch: function(result) {
|
292
|
+
this.failedSearch = result;
|
293
|
+
},
|
294
|
+
getShareLink: function() {
|
295
|
+
this.loadingLink = true;
|
296
|
+
this.shareLinkDisplay = true;
|
297
|
+
EventBus.emit("updateShareLinkRequested");
|
298
|
+
},
|
299
|
+
viewClicked: function(view) {
|
300
|
+
this.splitFlowStore.updateActiveView({
|
301
|
+
view,
|
302
|
+
entries: this.entriesStore.entries,
|
303
|
+
});
|
304
|
+
}
|
305
|
+
},
|
306
|
+
mounted: function () {
|
307
|
+
this.activeViewRef = shallowRef(this.$refs.activeViewRef);
|
308
|
+
this.permalinkRef = shallowRef(this.$refs.permalinkRef);
|
309
|
+
},
|
310
|
+
};
|
311
|
+
</script>
|
312
|
+
|
313
|
+
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
314
|
+
<style scoped lang="scss">
|
315
|
+
@use "../assets/header-icon.scss";
|
316
|
+
|
317
|
+
.icon-group {
|
318
|
+
:deep(.el-button--text) {
|
319
|
+
color:#606266;
|
320
|
+
font-size: 1.5em;
|
321
|
+
&:hover {
|
322
|
+
color: $app-primary-color;
|
323
|
+
}
|
324
|
+
}
|
325
|
+
}
|
326
|
+
|
327
|
+
.icon-transform {
|
328
|
+
-moz-transform: rotate(90deg);
|
329
|
+
-webkit-transform: rotate(90deg);
|
330
|
+
-o-transform: rotate(90deg);
|
331
|
+
-ms-transform: rotate(90deg);
|
332
|
+
transform: rotate(90deg);
|
333
|
+
padding:10px;
|
334
|
+
}
|
335
|
+
|
336
|
+
.header {
|
337
|
+
height:32px;
|
338
|
+
}
|
339
|
+
|
340
|
+
:deep(.header-popper.el-popover.el-popper) {
|
341
|
+
padding: 6px 4px;
|
342
|
+
font-size:12px;
|
343
|
+
color: rgb(48, 49, 51);
|
344
|
+
background-color: #f3ecf6;
|
345
|
+
border: 1px solid $app-primary-color;
|
346
|
+
white-space: nowrap;
|
347
|
+
min-width: unset;
|
348
|
+
.el-popper__arrow {
|
349
|
+
&:before {
|
350
|
+
border-color: $app-primary-color;
|
351
|
+
background-color: #f3ecf6;
|
352
|
+
}
|
353
|
+
}
|
354
|
+
}
|
355
|
+
|
356
|
+
:deep(.link-popover) {
|
357
|
+
border: 1px solid $app-primary-color;
|
358
|
+
}
|
359
|
+
|
360
|
+
:deep(.el-loading-spinner) {
|
361
|
+
.path {
|
362
|
+
stroke: $app-primary-color;
|
363
|
+
}
|
364
|
+
.el-loading-text {
|
365
|
+
color: $app-primary-color;
|
366
|
+
}
|
367
|
+
}
|
368
|
+
|
369
|
+
.copy-button {
|
370
|
+
color:#FFFFFF;
|
371
|
+
background-color:$app-primary-color;
|
372
|
+
&:hover, &:focus {
|
373
|
+
color:#FFFFFF;
|
374
|
+
background-color:$app-primary-color;
|
375
|
+
box-shadow: -3px 2px 4px #000000;
|
376
|
+
}
|
377
|
+
}
|
378
|
+
|
379
|
+
.link-input {
|
380
|
+
:deep(.el-input__inner) {
|
381
|
+
color:#303133;
|
382
|
+
&:focus {
|
383
|
+
border-color:$app-primary-color;
|
384
|
+
}
|
385
|
+
}
|
386
|
+
}
|
387
|
+
|
388
|
+
.view-icon-row {
|
389
|
+
height: 32px;
|
390
|
+
width: 133px;
|
391
|
+
border-radius: 4px;
|
392
|
+
border: 1px solid rgb(151, 151, 151);
|
393
|
+
font-size: 14px;
|
394
|
+
margin:8px 0px 0px 0px!important;
|
395
|
+
cursor: pointer;
|
396
|
+
|
397
|
+
&.active {
|
398
|
+
border: 1px solid $app-primary-color;
|
399
|
+
background: rgba(131, 0, 191, 0.1);
|
400
|
+
}
|
401
|
+
}
|
402
|
+
|
403
|
+
.view-icon {
|
404
|
+
font-size: 1.7em;
|
405
|
+
height: 24px!important;
|
406
|
+
width: 24px!important;
|
407
|
+
color: $app-primary-color;
|
408
|
+
padding-top:3px;
|
409
|
+
}
|
410
|
+
|
411
|
+
.view-text {
|
412
|
+
letter-spacing:0px;
|
413
|
+
font-size:11px;
|
414
|
+
line-height:14px;
|
415
|
+
font-family:'Asap', 'Avenir', Arial, sans-serif;
|
416
|
+
font-weight:550;
|
417
|
+
padding-top:7px;
|
418
|
+
}
|
419
|
+
|
420
|
+
:deep(.view-icon-popover.el-popper) {
|
421
|
+
border: 1px solid $app-primary-color;
|
422
|
+
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
|
423
|
+
padding: 4px 8px 12px 8px;
|
424
|
+
min-width:unset!important;
|
425
|
+
width:unset!important;
|
426
|
+
cursor:default;
|
427
|
+
.el-popper__arrow {
|
428
|
+
&:before {
|
429
|
+
border-color: $app-primary-color;
|
430
|
+
background-color: #f3ecf6;
|
431
|
+
}
|
432
|
+
}
|
433
|
+
}
|
434
|
+
|
435
|
+
.switch-control {
|
436
|
+
width:250px;
|
437
|
+
top:2px;
|
438
|
+
left: calc(50% - 60px);
|
439
|
+
position: absolute;
|
440
|
+
.sync-help {
|
441
|
+
left:5px;
|
442
|
+
stroke: $app-primary-color;
|
443
|
+
}
|
444
|
+
}
|
445
|
+
|
446
|
+
.switch {
|
447
|
+
padding-right: 0.5rem;
|
448
|
+
padding-left: 0.5rem;
|
449
|
+
border-radius: 4px;
|
450
|
+
border: 1px solid rgb(220, 223, 230);
|
451
|
+
vertical-align: super;
|
452
|
+
height: 28px;
|
453
|
+
}
|
454
|
+
|
455
|
+
.sync-help {
|
456
|
+
margin-left: 5px;
|
457
|
+
}
|
458
|
+
|
459
|
+
:deep(.el-loading-spinner) {
|
460
|
+
top: 0px;
|
461
|
+
scale: 0.7;
|
462
|
+
}
|
463
|
+
|
464
|
+
</style>
|