@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.
Files changed (65) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +150 -150
  3. package/assets/styleguide.css +19 -19
  4. package/cypress.config.js +23 -23
  5. package/dist/index.html +17 -17
  6. package/dist/mapintegratedvuer.js +74203 -73758
  7. package/dist/mapintegratedvuer.umd.cjs +878 -515
  8. package/dist/style.css +1 -1
  9. package/package.json +134 -135
  10. package/public/index.html +17 -17
  11. package/reporter-config.json +9 -9
  12. package/src/App.vue +245 -245
  13. package/src/assets/_variables.scss +43 -43
  14. package/src/assets/fonts/mapicon-species.eot +0 -0
  15. package/src/assets/fonts/mapicon-species.ttf +0 -0
  16. package/src/assets/fonts/mapicon-species.woff +0 -0
  17. package/src/assets/header-icon.scss +67 -67
  18. package/src/assets/mapicon-species-style.css +41 -41
  19. package/src/assets/styles.scss +9 -9
  20. package/src/components/ContentBar.vue +376 -376
  21. package/src/components/ContentVuer.vue +217 -217
  22. package/src/components/ContextCard.vue +385 -385
  23. package/src/components/ContextHelp.vue +73 -73
  24. package/src/components/CustomSplitter.vue +151 -151
  25. package/src/components/DatasetHeader.vue +97 -97
  26. package/src/components/DialogToolbarContent.vue +464 -464
  27. package/src/components/EventBus.js +3 -3
  28. package/src/components/FlatmapContextCard.vue +134 -134
  29. package/src/components/MapContent.vue +328 -333
  30. package/src/components/ResizeSensor.vue +47 -47
  31. package/src/components/SearchControls.vue +115 -115
  32. package/src/components/SimulatedData.js +721 -721
  33. package/src/components/SplitDialog.vue +287 -287
  34. package/src/components/SplitFlow.vue +414 -414
  35. package/src/components/index.js +7 -7
  36. package/src/components/markerZoomLevelsHardCoded.js +255 -255
  37. package/src/components/scripts/utilities.js +173 -173
  38. package/src/components/viewers/Flatmap.vue +145 -145
  39. package/src/components/viewers/Iframe.vue +31 -31
  40. package/src/components/viewers/MultiFlatmap.vue +384 -384
  41. package/src/components/viewers/Plot.vue +23 -23
  42. package/src/components/viewers/Scaffold.vue +198 -198
  43. package/src/components/viewers/Simulation.vue +21 -21
  44. package/src/icons/yellowstar.js +1 -1
  45. package/src/main.js +31 -31
  46. package/src/mixins/ContentMixin.js +438 -438
  47. package/src/mixins/DynamicMarkerMixin.js +88 -88
  48. package/src/mixins/S3Bucket.vue +37 -37
  49. package/src/stores/entries.js +40 -40
  50. package/src/stores/index.js +23 -23
  51. package/src/stores/settings.js +144 -144
  52. package/src/stores/splitFlow.js +523 -523
  53. package/static.json +7 -7
  54. package/vite.config.js +70 -70
  55. package/vite.static-build.js +12 -12
  56. package/vitest.workspace.js +3 -3
  57. package/vuese-generator.js +65 -65
  58. package/assets/gazelle-icons-no-background.css +0 -32
  59. package/dist/matterport.pdf +0 -0
  60. package/dist/test.txt +0 -0
  61. package/public/matterport.pdf +0 -0
  62. package/public/test.txt +0 -0
  63. package/q.json +0 -690
  64. package/src/mixins/RetrieveContextCardMixin.js +0 -82
  65. package/tsconfig.json +0 -19
@@ -1,287 +1,287 @@
1
- <template>
2
- <div class="tab-container" ref="tabContainer">
3
- <custom-splitter
4
- index="split-1"
5
- key="split-1"
6
- />
7
- <div
8
- v-for="entry in entries"
9
- :key="entry.id"
10
- :style="getStyle(entry.id)"
11
- :class="[getClass(entry.id), 'contentvuer']"
12
- >
13
- <ContentVuer
14
- :key="entry.id"
15
- :entry="entry"
16
- ref="content"
17
- @resource-selected="resourceSelected"
18
- :visible="isIdVisible(entry.id)"
19
- />
20
- </div>
21
- </div>
22
- </template>
23
-
24
-
25
- <script>
26
- /* eslint-disable no-alert, no-console */
27
- import ContentVuer from "./ContentVuer.vue";
28
- import CustomSplitter from "./CustomSplitter.vue";
29
- import EventBus from './EventBus';
30
- import { mapStores } from 'pinia';
31
- import { useSplitFlowStore } from '../stores/splitFlow';
32
-
33
- export default {
34
- name: "SplitDialog",
35
- components: {
36
- ContentVuer,
37
- CustomSplitter,
38
- },
39
- props: {
40
- entries: {
41
- type: Array,
42
- default: function() {
43
- return [];
44
- }
45
- }
46
- },
47
- data: function() {
48
- return {
49
- styles: { }
50
- }
51
- },
52
- methods: {
53
- /**
54
- * Callback when the vuers emit a selected event.
55
- */
56
- resourceSelected: function(result) {
57
- this.$emit("resource-selected", result);
58
- },
59
- getClass: function(id) {
60
- if (this.isIdVisible(id)) {
61
- return this.getRefsName(id);
62
- } else {
63
- return "inactive";
64
- }
65
- },
66
- getRefsName: function(id) {
67
- const refName = this.splitFlowStore.getPaneNameById(id);
68
- if (refName) {
69
- if (!(refName in this.styles)) {
70
- this.styles[refName] = {};
71
- }
72
- }
73
- return refName;
74
- },
75
- getStyle: function(id) {
76
- /*
77
- Set the style based on the position of the spltters
78
- Header is 30px in height and the splitter is 1px in
79
- height/width. The width, height and positon of the
80
- viewer should take that into account.
81
- */
82
- const refName = this.getRefsName(id);
83
- if (refName && refName in this.styles && this.styles[refName]) {
84
- return this.styles[refName];
85
- }
86
- return {};
87
- },
88
- getActiveContents: function() {
89
- const activeContents = [];
90
- const vuers = this.$refs['content'];
91
- if (vuers) {
92
- vuers.forEach(vuer => {
93
- if (vuer.isVisible())
94
- activeContents.push(vuer);
95
- });
96
- }
97
- return activeContents;
98
- },
99
- isIdVisible: function(id) {
100
- const refName = this.splitFlowStore.getPaneNameById(id);
101
- return refName !== undefined;
102
- },
103
- sendSynchronisedEvent: function(resource) {
104
- const activeContents = this.getActiveContents();
105
- activeContents.forEach(content => {
106
- content.receiveSynchronisedEvent(resource);
107
- });
108
- },
109
- getContentsWithId: function(id) {
110
- let contents = this.$refs["content"];
111
- for (let i = 0; i < contents.length; i++) {
112
- if (contents[i].getId() == id) {
113
- return contents[i];
114
- }
115
- }
116
- return undefined;
117
- },
118
- getContentsState: function() {
119
- let states = [];
120
- let contents = this.$refs["content"];
121
- for (let i = 0; i < contents.length; i++) {
122
- states.push(contents[i].getState());
123
- }
124
- return states;
125
- },
126
- setStyles: function(refName, rect) {
127
- if (this.$refs && ('tabContainer' in this.$refs)) {
128
- const bound = this.$refs.tabContainer.getBoundingClientRect();
129
- const style = {};
130
- style["width"] = `${rect.width}px`;
131
- style["left"] = `${rect.left - bound.left}px`;
132
- style["height"] = `${rect.height}px`;
133
- style["top"] = `${rect.top - bound.top}px`;
134
- style["display"] = "block";
135
- this.styles[refName] = style;
136
- }
137
- },
138
- hidePane: function(refName) {
139
- if (this.$refs && ('tabContainer' in this.$refs)) {
140
- const style = {};
141
- style["display"] = "none";
142
- this.styles[refName] = style;
143
- }
144
- },
145
- resize: function() {
146
- this.__userResize__ = true;
147
- },
148
- resized: function(splitterName, event) {
149
- if (this.__userResize__) {
150
- this.splitFlowStore.setSplitter({
151
- name: splitterName,
152
- value: event[0].size
153
- });
154
- }
155
- this.__userResize__ = false;
156
- }
157
- },
158
- computed: {
159
- ...mapStores(useSplitFlowStore),
160
- activeView: function() {
161
- return this.splitFlowStore.activeView;
162
- },
163
- horizontal() {
164
- if (this.splitFlowStore.activeView === "2horpanel") {
165
- return true;
166
- }
167
- return false;
168
- },
169
- splitters() {
170
- return this.splitFlowStore.splitters;
171
- },
172
- globalCallback() {
173
- return this.splitFlowStore.globalCallback;
174
- },
175
- },
176
- watch: {
177
- globalCallback: {
178
- handler: function(val) {
179
- //Only activate for active
180
- if (val) {
181
- const contents = this.getActiveContents();
182
- if (contents) {
183
- contents.forEach(content => {
184
- content.requestSynchronisedEvent(val);
185
- });
186
- }
187
- } else {
188
- //Turn sync off, this can be requested for all contents
189
- const contents = this.$refs['content'];
190
- if (contents) {
191
- contents.forEach(content => {
192
- content.requestSynchronisedEvent(false);
193
- });
194
- }
195
- }
196
- },
197
- immediate: true,
198
- deep: true
199
- },
200
- },
201
- mounted: function () {
202
- EventBus.on("PaneResize", payload => {
203
- this.setStyles(payload.refName, payload.rect);
204
- });
205
- EventBus.on("PaneUnmounted", payload => {
206
- this.hidePane(payload.refName);
207
- });
208
- },
209
- };
210
- </script>
211
- <!-- Add "scoped" attribute to limit CSS to this component only -->
212
- <style scoped lang="scss">
213
- :deep(.splitpanes.default-theme .splitpanes__pane) {
214
- background-color: #ccc !important;
215
- position: relative;
216
- }
217
-
218
- :deep(.splitpanes__splitter) {
219
- margin: 0px 0px 0px 0px !important;
220
- z-index: 6 !important;
221
- &::before {
222
- content: "";
223
- position: absolute;
224
- left: 0;
225
- top: 0;
226
- transition: opacity 0.4s;
227
- background-color: rgba(131, 0, 191, 0.3) !important;
228
- opacity: 0;
229
- z-index: 7 !important;
230
- &:hover {
231
- opacity: 1;
232
- }
233
- }
234
- }
235
-
236
- :deep(.splitpanes--horizontal > .splitpanes__splitter),
237
- :deep(.splitpanes--vertical > .splitpanes__splitter) {
238
- background-color: #ccc !important;
239
- border-left: unset;
240
- }
241
-
242
- :deep(.splitpanes--horizontal > .splitpanes__splitter) {
243
- height: 1px;
244
- &::before {
245
- top: -2px;
246
- height: 10px;
247
- width: 100%;
248
- }
249
- }
250
-
251
- :deep(.splitpanes--vertical > .splitpanes__splitter) {
252
- width: 1px;
253
- &::before {
254
- left: -3px;
255
- width: 11px;
256
- height: 100%;
257
- }
258
- }
259
-
260
- .tab-container {
261
- position: absolute;
262
- width: 100% !important;
263
- height: 100% !important;
264
- left: 0px !important;
265
- top: 0px !important;
266
- }
267
-
268
- .button-group {
269
- position: absolute;
270
- top: 1%;
271
- right: 1%;
272
- }
273
-
274
- .contentvuer {
275
- position: absolute;
276
- transition: all 1s ease;
277
- background: rgba(255, 255, 255, 1);
278
-
279
- &.inactive {
280
- display: none;
281
- width: 0%;
282
- height: 0%;
283
- left: 0px;
284
- top: 30px;
285
- }
286
- }
287
- </style>
1
+ <template>
2
+ <div class="tab-container" ref="tabContainer">
3
+ <custom-splitter
4
+ index="split-1"
5
+ key="split-1"
6
+ />
7
+ <div
8
+ v-for="entry in entries"
9
+ :key="entry.id"
10
+ :style="getStyle(entry.id)"
11
+ :class="[getClass(entry.id), 'contentvuer']"
12
+ >
13
+ <ContentVuer
14
+ :key="entry.id"
15
+ :entry="entry"
16
+ ref="content"
17
+ @resource-selected="resourceSelected"
18
+ :visible="isIdVisible(entry.id)"
19
+ />
20
+ </div>
21
+ </div>
22
+ </template>
23
+
24
+
25
+ <script>
26
+ /* eslint-disable no-alert, no-console */
27
+ import ContentVuer from "./ContentVuer.vue";
28
+ import CustomSplitter from "./CustomSplitter.vue";
29
+ import EventBus from './EventBus';
30
+ import { mapStores } from 'pinia';
31
+ import { useSplitFlowStore } from '../stores/splitFlow';
32
+
33
+ export default {
34
+ name: "SplitDialog",
35
+ components: {
36
+ ContentVuer,
37
+ CustomSplitter,
38
+ },
39
+ props: {
40
+ entries: {
41
+ type: Array,
42
+ default: function() {
43
+ return [];
44
+ }
45
+ }
46
+ },
47
+ data: function() {
48
+ return {
49
+ styles: { }
50
+ }
51
+ },
52
+ methods: {
53
+ /**
54
+ * Callback when the vuers emit a selected event.
55
+ */
56
+ resourceSelected: function(result) {
57
+ this.$emit("resource-selected", result);
58
+ },
59
+ getClass: function(id) {
60
+ if (this.isIdVisible(id)) {
61
+ return this.getRefsName(id);
62
+ } else {
63
+ return "inactive";
64
+ }
65
+ },
66
+ getRefsName: function(id) {
67
+ const refName = this.splitFlowStore.getPaneNameById(id);
68
+ if (refName) {
69
+ if (!(refName in this.styles)) {
70
+ this.styles[refName] = {};
71
+ }
72
+ }
73
+ return refName;
74
+ },
75
+ getStyle: function(id) {
76
+ /*
77
+ Set the style based on the position of the spltters
78
+ Header is 30px in height and the splitter is 1px in
79
+ height/width. The width, height and positon of the
80
+ viewer should take that into account.
81
+ */
82
+ const refName = this.getRefsName(id);
83
+ if (refName && refName in this.styles && this.styles[refName]) {
84
+ return this.styles[refName];
85
+ }
86
+ return {};
87
+ },
88
+ getActiveContents: function() {
89
+ const activeContents = [];
90
+ const vuers = this.$refs['content'];
91
+ if (vuers) {
92
+ vuers.forEach(vuer => {
93
+ if (vuer.isVisible())
94
+ activeContents.push(vuer);
95
+ });
96
+ }
97
+ return activeContents;
98
+ },
99
+ isIdVisible: function(id) {
100
+ const refName = this.splitFlowStore.getPaneNameById(id);
101
+ return refName !== undefined;
102
+ },
103
+ sendSynchronisedEvent: function(resource) {
104
+ const activeContents = this.getActiveContents();
105
+ activeContents.forEach(content => {
106
+ content.receiveSynchronisedEvent(resource);
107
+ });
108
+ },
109
+ getContentsWithId: function(id) {
110
+ let contents = this.$refs["content"];
111
+ for (let i = 0; i < contents.length; i++) {
112
+ if (contents[i].getId() == id) {
113
+ return contents[i];
114
+ }
115
+ }
116
+ return undefined;
117
+ },
118
+ getContentsState: function() {
119
+ let states = [];
120
+ let contents = this.$refs["content"];
121
+ for (let i = 0; i < contents.length; i++) {
122
+ states.push(contents[i].getState());
123
+ }
124
+ return states;
125
+ },
126
+ setStyles: function(refName, rect) {
127
+ if (this.$refs && ('tabContainer' in this.$refs)) {
128
+ const bound = this.$refs.tabContainer.getBoundingClientRect();
129
+ const style = {};
130
+ style["width"] = `${rect.width}px`;
131
+ style["left"] = `${rect.left - bound.left}px`;
132
+ style["height"] = `${rect.height}px`;
133
+ style["top"] = `${rect.top - bound.top}px`;
134
+ style["display"] = "block";
135
+ this.styles[refName] = style;
136
+ }
137
+ },
138
+ hidePane: function(refName) {
139
+ if (this.$refs && ('tabContainer' in this.$refs)) {
140
+ const style = {};
141
+ style["display"] = "none";
142
+ this.styles[refName] = style;
143
+ }
144
+ },
145
+ resize: function() {
146
+ this.__userResize__ = true;
147
+ },
148
+ resized: function(splitterName, event) {
149
+ if (this.__userResize__) {
150
+ this.splitFlowStore.setSplitter({
151
+ name: splitterName,
152
+ value: event[0].size
153
+ });
154
+ }
155
+ this.__userResize__ = false;
156
+ }
157
+ },
158
+ computed: {
159
+ ...mapStores(useSplitFlowStore),
160
+ activeView: function() {
161
+ return this.splitFlowStore.activeView;
162
+ },
163
+ horizontal() {
164
+ if (this.splitFlowStore.activeView === "2horpanel") {
165
+ return true;
166
+ }
167
+ return false;
168
+ },
169
+ splitters() {
170
+ return this.splitFlowStore.splitters;
171
+ },
172
+ globalCallback() {
173
+ return this.splitFlowStore.globalCallback;
174
+ },
175
+ },
176
+ watch: {
177
+ globalCallback: {
178
+ handler: function(val) {
179
+ //Only activate for active
180
+ if (val) {
181
+ const contents = this.getActiveContents();
182
+ if (contents) {
183
+ contents.forEach(content => {
184
+ content.requestSynchronisedEvent(val);
185
+ });
186
+ }
187
+ } else {
188
+ //Turn sync off, this can be requested for all contents
189
+ const contents = this.$refs['content'];
190
+ if (contents) {
191
+ contents.forEach(content => {
192
+ content.requestSynchronisedEvent(false);
193
+ });
194
+ }
195
+ }
196
+ },
197
+ immediate: true,
198
+ deep: true
199
+ },
200
+ },
201
+ mounted: function () {
202
+ EventBus.on("PaneResize", payload => {
203
+ this.setStyles(payload.refName, payload.rect);
204
+ });
205
+ EventBus.on("PaneUnmounted", payload => {
206
+ this.hidePane(payload.refName);
207
+ });
208
+ },
209
+ };
210
+ </script>
211
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
212
+ <style scoped lang="scss">
213
+ :deep(.splitpanes.default-theme .splitpanes__pane) {
214
+ background-color: #ccc !important;
215
+ position: relative;
216
+ }
217
+
218
+ :deep(.splitpanes__splitter) {
219
+ margin: 0px 0px 0px 0px !important;
220
+ z-index: 6 !important;
221
+ &::before {
222
+ content: "";
223
+ position: absolute;
224
+ left: 0;
225
+ top: 0;
226
+ transition: opacity 0.4s;
227
+ background-color: rgba(131, 0, 191, 0.3) !important;
228
+ opacity: 0;
229
+ z-index: 7 !important;
230
+ &:hover {
231
+ opacity: 1;
232
+ }
233
+ }
234
+ }
235
+
236
+ :deep(.splitpanes--horizontal > .splitpanes__splitter),
237
+ :deep(.splitpanes--vertical > .splitpanes__splitter) {
238
+ background-color: #ccc !important;
239
+ border-left: unset;
240
+ }
241
+
242
+ :deep(.splitpanes--horizontal > .splitpanes__splitter) {
243
+ height: 1px;
244
+ &::before {
245
+ top: -2px;
246
+ height: 10px;
247
+ width: 100%;
248
+ }
249
+ }
250
+
251
+ :deep(.splitpanes--vertical > .splitpanes__splitter) {
252
+ width: 1px;
253
+ &::before {
254
+ left: -3px;
255
+ width: 11px;
256
+ height: 100%;
257
+ }
258
+ }
259
+
260
+ .tab-container {
261
+ position: absolute;
262
+ width: 100% !important;
263
+ height: 100% !important;
264
+ left: 0px !important;
265
+ top: 0px !important;
266
+ }
267
+
268
+ .button-group {
269
+ position: absolute;
270
+ top: 1%;
271
+ right: 1%;
272
+ }
273
+
274
+ .contentvuer {
275
+ position: absolute;
276
+ transition: all 1s ease;
277
+ background: rgba(255, 255, 255, 1);
278
+
279
+ &.inactive {
280
+ display: none;
281
+ width: 0%;
282
+ height: 0%;
283
+ left: 0px;
284
+ top: 30px;
285
+ }
286
+ }
287
+ </style>