@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,217 +1,217 @@
1
- <template>
2
- <div
3
- class="content-container"
4
- @mouseover="mouseHovered = true"
5
- @mouseleave="mouseHovered = false"
6
- >
7
- <ContentBar
8
- class="toolbar"
9
- :entry="entry"
10
- ref="contentBar"
11
- @chooser-changed="onResize"
12
- @scaffold-view-clicked="scaffoldViewClicked"
13
- @vue:mounted="setPanesBoundary"
14
- />
15
- <!--
16
- <DatasetHeader
17
- v-if="entry.datasetTitle"
18
- class="dataset-header"
19
- :entry="entry"
20
- ></DatasetHeader>
21
- -->
22
- <div class="component-container" ref="container">
23
- <Component
24
- :is="viewerType"
25
- :entry="entry"
26
- :mouseHovered="mouseHovered"
27
- :visible="visible"
28
- ref="viewer"
29
- @flatmap-provenance-ready="flatmapProvenacneReady"
30
- @resource-selected="resourceSelected"
31
- @species-changed="speciesChanged"
32
- />
33
- </div>
34
- </div>
35
- </template>
36
-
37
- <script>
38
- /* eslint-disable no-alert, no-console */
39
- import { ElButton as Button } from "element-plus";
40
- import ContentBar from "./ContentBar.vue";
41
- import Flatmap from "./viewers/Flatmap.vue";
42
- import Iframe from "./viewers/Iframe.vue";
43
- import MultiFlatmap from "./viewers/MultiFlatmap.vue";
44
- import Plot from "./viewers/Plot.vue";
45
- import Scaffold from "./viewers/Scaffold.vue";
46
- import Simulation from "./viewers/Simulation.vue";
47
- import { mapStores } from 'pinia';
48
- import { useEntriesStore } from '../stores/entries';
49
- import { useSplitFlowStore } from '../stores/splitFlow';
50
-
51
- export default {
52
- name: "ContentVuer",
53
- props: {
54
- /**
55
- * Object containing information for
56
- * the required viewing.
57
- */
58
- entry: Object,
59
- visible: {
60
- type: Boolean,
61
- default: true,
62
- },
63
- },
64
- components: {
65
- //DatasetHeader,
66
- Button,
67
- ContentBar,
68
- Flatmap,
69
- Iframe,
70
- MultiFlatmap,
71
- Plot,
72
- Scaffold,
73
- Simulation,
74
- },
75
- methods: {
76
- flatmapProvenacneReady: function(prov) {
77
- this.$refs.contentBar.setupFlatmapContextCard(prov);
78
- },
79
- /**
80
- * Toggle sync mode on/off depending on species and current state
81
- */
82
- toggleSyncMode: function () {
83
- this.$refs.viewer.toggleSyncMode();
84
- },
85
- getId: function () {
86
- return this.entry.id;
87
- },
88
- getState: function () {
89
- return this.$refs.viewer.getState();
90
- },
91
- resourceSelected: function (payload) {
92
- this.$emit("resource-selected", payload);
93
- },
94
- scaffoldViewClicked: function (viewUrl) {
95
- if (this.entry.viewUrl !== viewUrl) {
96
- this.entriesStore.updateViewForEntry({id: this.entry.id, viewUrl});
97
- } else {
98
- //Manually set it as it cannot be set with reactivity
99
- this.$refs.viewer.updateWithViewUrl(viewUrl);
100
- }
101
- },
102
- /**
103
- * Perform a local search on this contentvuer
104
- */
105
- search: function (term) {
106
- return this.$refs.viewer.search(term);
107
- },
108
- /**
109
- * Push the suggested terms into the suggestions array
110
- */
111
- searchSuggestions: function(term, suggestions) {
112
- this.$refs.viewer.searchSuggestions(term, suggestions);
113
- },
114
- setPanesBoundary: function() {
115
- this.$refs.contentBar.setBoundary(this.$refs["container"][0]);
116
- },
117
- speciesChanged: function (species) {
118
- this.activeSpecies = species;
119
- },
120
- receiveSynchronisedEvent: async function (data) {
121
- this.$refs.viewer.receiveSynchronisedEvent(data);
122
- },
123
- requestSynchronisedEvent: function (flag) {
124
- this.$refs.viewer.requestSynchronisedEvent(flag);
125
- },
126
- /**
127
- * Check if this viewer is currently visible
128
- */
129
- isVisible: function() {
130
- const paneName = this.splitFlowStore.getPaneNameById(this.entry.id);
131
- return paneName !== undefined;
132
- },
133
- onResize: function () {
134
- this.$refs.viewer.onResize();
135
- },
136
- },
137
- data: function () {
138
- return {
139
- mouseHovered: false,
140
- activeSpecies: "Rat",
141
- };
142
- },
143
- computed: {
144
- ...mapStores(useEntriesStore, useSplitFlowStore),
145
- syncMode() {
146
- return this.splitFlowStore.syncMode;
147
- },
148
- viewerType() {
149
- switch (this.entry.type) {
150
- case "Biolucida":
151
- case "Iframe":
152
- case "Segmentation":
153
- return 'Iframe';
154
- default:
155
- return this.entry.type;
156
- }
157
- },
158
- },
159
- };
160
- </script>
161
-
162
- <!-- Add "scoped" attribute to limit CSS to this component only -->
163
- <style scoped lang="scss">
164
- .toolbar {
165
- width: 100%;
166
- background-color: #f5f7fa !important;
167
- position: absolute;
168
- transition: all 1s ease;
169
- height: 32px;
170
- border-bottom: 1px solid rgb(220, 223, 230);
171
- z-index: 7;
172
- box-sizing: border-box;
173
- display: flex;
174
- flex-direction: row;
175
- justify-content: space-between;
176
- }
177
-
178
- .component-container {
179
- height: calc(100% - 32px);
180
- width: 100%;
181
- bottom: 0px;
182
- position: absolute;
183
- z-index:6;
184
- overflow: hidden;
185
- }
186
-
187
- .dataset-header {
188
- height: 23px;
189
- }
190
-
191
- .content-container {
192
- height: 100%;
193
- width: 100%;
194
- }
195
-
196
- .open-scaffold {
197
- position: absolute;
198
- left: calc(50% - 64px);
199
- z-index: 2;
200
- top: 8px;
201
- font-size: 16px;
202
- padding-top: 9px;
203
- padding-bottom: 9px;
204
- &.el-button--primary.is-plain {
205
- &:hover,
206
- &:active,
207
- &:focus {
208
- color: #8300bf;
209
- background: #f3e6f9;
210
- border-color: #cd99e5;
211
- }
212
- &:hover {
213
- box-shadow: -3px 2px 4px rgba(0, 0, 0, 0.2);
214
- }
215
- }
216
- }
217
- </style>
1
+ <template>
2
+ <div
3
+ class="content-container"
4
+ @mouseover="mouseHovered = true"
5
+ @mouseleave="mouseHovered = false"
6
+ >
7
+ <ContentBar
8
+ class="toolbar"
9
+ :entry="entry"
10
+ ref="contentBar"
11
+ @chooser-changed="onResize"
12
+ @scaffold-view-clicked="scaffoldViewClicked"
13
+ @vue:mounted="setPanesBoundary"
14
+ />
15
+ <!--
16
+ <DatasetHeader
17
+ v-if="entry.datasetTitle"
18
+ class="dataset-header"
19
+ :entry="entry"
20
+ ></DatasetHeader>
21
+ -->
22
+ <div class="component-container" ref="container">
23
+ <Component
24
+ :is="viewerType"
25
+ :entry="entry"
26
+ :mouseHovered="mouseHovered"
27
+ :visible="visible"
28
+ ref="viewer"
29
+ @flatmap-provenance-ready="flatmapProvenacneReady"
30
+ @resource-selected="resourceSelected"
31
+ @species-changed="speciesChanged"
32
+ />
33
+ </div>
34
+ </div>
35
+ </template>
36
+
37
+ <script>
38
+ /* eslint-disable no-alert, no-console */
39
+ import { ElButton as Button } from "element-plus";
40
+ import ContentBar from "./ContentBar.vue";
41
+ import Flatmap from "./viewers/Flatmap.vue";
42
+ import Iframe from "./viewers/Iframe.vue";
43
+ import MultiFlatmap from "./viewers/MultiFlatmap.vue";
44
+ import Plot from "./viewers/Plot.vue";
45
+ import Scaffold from "./viewers/Scaffold.vue";
46
+ import Simulation from "./viewers/Simulation.vue";
47
+ import { mapStores } from 'pinia';
48
+ import { useEntriesStore } from '../stores/entries';
49
+ import { useSplitFlowStore } from '../stores/splitFlow';
50
+
51
+ export default {
52
+ name: "ContentVuer",
53
+ props: {
54
+ /**
55
+ * Object containing information for
56
+ * the required viewing.
57
+ */
58
+ entry: Object,
59
+ visible: {
60
+ type: Boolean,
61
+ default: true,
62
+ },
63
+ },
64
+ components: {
65
+ //DatasetHeader,
66
+ Button,
67
+ ContentBar,
68
+ Flatmap,
69
+ Iframe,
70
+ MultiFlatmap,
71
+ Plot,
72
+ Scaffold,
73
+ Simulation,
74
+ },
75
+ methods: {
76
+ flatmapProvenacneReady: function(prov) {
77
+ this.$refs.contentBar.setupFlatmapContextCard(prov);
78
+ },
79
+ /**
80
+ * Toggle sync mode on/off depending on species and current state
81
+ */
82
+ toggleSyncMode: function () {
83
+ this.$refs.viewer.toggleSyncMode();
84
+ },
85
+ getId: function () {
86
+ return this.entry.id;
87
+ },
88
+ getState: function () {
89
+ return this.$refs.viewer.getState();
90
+ },
91
+ resourceSelected: function (payload) {
92
+ this.$emit("resource-selected", payload);
93
+ },
94
+ scaffoldViewClicked: function (viewUrl) {
95
+ if (this.entry.viewUrl !== viewUrl) {
96
+ this.entriesStore.updateViewForEntry({id: this.entry.id, viewUrl});
97
+ } else {
98
+ //Manually set it as it cannot be set with reactivity
99
+ this.$refs.viewer.updateWithViewUrl(viewUrl);
100
+ }
101
+ },
102
+ /**
103
+ * Perform a local search on this contentvuer
104
+ */
105
+ search: function (term) {
106
+ return this.$refs.viewer.search(term);
107
+ },
108
+ /**
109
+ * Push the suggested terms into the suggestions array
110
+ */
111
+ searchSuggestions: function(term, suggestions) {
112
+ this.$refs.viewer.searchSuggestions(term, suggestions);
113
+ },
114
+ setPanesBoundary: function() {
115
+ this.$refs.contentBar.setBoundary(this.$refs["container"][0]);
116
+ },
117
+ speciesChanged: function (species) {
118
+ this.activeSpecies = species;
119
+ },
120
+ receiveSynchronisedEvent: async function (data) {
121
+ this.$refs.viewer.receiveSynchronisedEvent(data);
122
+ },
123
+ requestSynchronisedEvent: function (flag) {
124
+ this.$refs.viewer.requestSynchronisedEvent(flag);
125
+ },
126
+ /**
127
+ * Check if this viewer is currently visible
128
+ */
129
+ isVisible: function() {
130
+ const paneName = this.splitFlowStore.getPaneNameById(this.entry.id);
131
+ return paneName !== undefined;
132
+ },
133
+ onResize: function () {
134
+ this.$refs.viewer.onResize();
135
+ },
136
+ },
137
+ data: function () {
138
+ return {
139
+ mouseHovered: false,
140
+ activeSpecies: "Rat",
141
+ };
142
+ },
143
+ computed: {
144
+ ...mapStores(useEntriesStore, useSplitFlowStore),
145
+ syncMode() {
146
+ return this.splitFlowStore.syncMode;
147
+ },
148
+ viewerType() {
149
+ switch (this.entry.type) {
150
+ case "Biolucida":
151
+ case "Iframe":
152
+ case "Segmentation":
153
+ return 'Iframe';
154
+ default:
155
+ return this.entry.type;
156
+ }
157
+ },
158
+ },
159
+ };
160
+ </script>
161
+
162
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
163
+ <style scoped lang="scss">
164
+ .toolbar {
165
+ width: 100%;
166
+ background-color: #f5f7fa !important;
167
+ position: absolute;
168
+ transition: all 1s ease;
169
+ height: 32px;
170
+ border-bottom: 1px solid rgb(220, 223, 230);
171
+ z-index: 7;
172
+ box-sizing: border-box;
173
+ display: flex;
174
+ flex-direction: row;
175
+ justify-content: space-between;
176
+ }
177
+
178
+ .component-container {
179
+ height: calc(100% - 32px);
180
+ width: 100%;
181
+ bottom: 0px;
182
+ position: absolute;
183
+ z-index:6;
184
+ overflow: hidden;
185
+ }
186
+
187
+ .dataset-header {
188
+ height: 23px;
189
+ }
190
+
191
+ .content-container {
192
+ height: 100%;
193
+ width: 100%;
194
+ }
195
+
196
+ .open-scaffold {
197
+ position: absolute;
198
+ left: calc(50% - 64px);
199
+ z-index: 2;
200
+ top: 8px;
201
+ font-size: 16px;
202
+ padding-top: 9px;
203
+ padding-bottom: 9px;
204
+ &.el-button--primary.is-plain {
205
+ &:hover,
206
+ &:active,
207
+ &:focus {
208
+ color: #8300bf;
209
+ background: #f3e6f9;
210
+ border-color: #cd99e5;
211
+ }
212
+ &:hover {
213
+ box-shadow: -3px 2px 4px rgba(0, 0, 0, 0.2);
214
+ }
215
+ }
216
+ }
217
+ </style>