@abi-software/mapintegratedvuer 0.7.1-demo.0 → 0.7.2-vue3.0-alpha.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 -142
  3. package/assets/gazelle-icons-no-background.css +32 -0
  4. package/assets/styleguide.css +19 -19
  5. package/cypress.config.js +23 -23
  6. package/dist/index.html +17 -17
  7. package/dist/mapintegratedvuer.js +60394 -59859
  8. package/dist/mapintegratedvuer.umd.cjs +515 -907
  9. package/dist/matterport.pdf +0 -0
  10. package/dist/style.css +1 -1
  11. package/dist/test.txt +0 -0
  12. package/package.json +135 -136
  13. package/public/index.html +17 -17
  14. package/public/matterport.pdf +0 -0
  15. package/public/test.txt +0 -0
  16. package/q.json +690 -0
  17. package/reporter-config.json +9 -9
  18. package/src/App.vue +245 -245
  19. package/src/assets/_variables.scss +43 -43
  20. package/src/assets/fonts/mapicon-species.eot +0 -0
  21. package/src/assets/fonts/mapicon-species.ttf +0 -0
  22. package/src/assets/fonts/mapicon-species.woff +0 -0
  23. package/src/assets/header-icon.scss +67 -67
  24. package/src/assets/mapicon-species-style.css +41 -41
  25. package/src/assets/styles.scss +9 -9
  26. package/src/components/ContentBar.vue +376 -376
  27. package/src/components/ContentVuer.vue +217 -217
  28. package/src/components/ContextCard.vue +385 -385
  29. package/src/components/ContextHelp.vue +73 -73
  30. package/src/components/CustomSplitter.vue +151 -151
  31. package/src/components/DatasetHeader.vue +97 -97
  32. package/src/components/DialogToolbarContent.vue +464 -464
  33. package/src/components/EventBus.js +3 -3
  34. package/src/components/FlatmapContextCard.vue +134 -134
  35. package/src/components/MapContent.vue +333 -285
  36. package/src/components/ResizeSensor.vue +47 -47
  37. package/src/components/SearchControls.vue +115 -115
  38. package/src/components/SimulatedData.js +721 -721
  39. package/src/components/SplitDialog.vue +287 -287
  40. package/src/components/SplitFlow.vue +414 -414
  41. package/src/components/index.js +7 -7
  42. package/src/components/markerZoomLevelsHardCoded.js +255 -255
  43. package/src/components/scripts/utilities.js +173 -173
  44. package/src/components/viewers/Flatmap.vue +145 -145
  45. package/src/components/viewers/Iframe.vue +31 -31
  46. package/src/components/viewers/MultiFlatmap.vue +384 -384
  47. package/src/components/viewers/Plot.vue +23 -23
  48. package/src/components/viewers/Scaffold.vue +198 -198
  49. package/src/components/viewers/Simulation.vue +21 -21
  50. package/src/icons/yellowstar.js +1 -1
  51. package/src/main.js +32 -22
  52. package/src/mixins/ContentMixin.js +438 -438
  53. package/src/mixins/DynamicMarkerMixin.js +88 -88
  54. package/src/mixins/RetrieveContextCardMixin.js +82 -0
  55. package/src/mixins/S3Bucket.vue +37 -37
  56. package/src/stores/entries.js +40 -40
  57. package/src/stores/index.js +24 -16
  58. package/src/stores/settings.js +144 -144
  59. package/src/stores/splitFlow.js +523 -523
  60. package/static.json +7 -7
  61. package/tsconfig.json +19 -0
  62. package/vite.config.js +70 -66
  63. package/vite.static-build.js +12 -12
  64. package/vitest.workspace.js +3 -3
  65. package/vuese-generator.js +65 -0
@@ -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>