@abi-software/map-side-bar 2.3.0 → 2.4.0-alpha-1

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 (43) hide show
  1. package/.eslintrc.js +12 -12
  2. package/.postcssrc.json +5 -5
  3. package/LICENSE +201 -201
  4. package/README.md +168 -168
  5. package/cypress.config.js +23 -23
  6. package/dist/data/pmr-sample.json +3181 -0
  7. package/dist/map-side-bar.js +15142 -9024
  8. package/dist/map-side-bar.umd.cjs +50 -103
  9. package/dist/style.css +1 -1
  10. package/package.json +77 -77
  11. package/public/data/pmr-sample.json +3181 -0
  12. package/reporter-config.json +9 -9
  13. package/src/App.vue +266 -265
  14. package/src/algolia/algolia.js +255 -242
  15. package/src/algolia/utils.js +100 -100
  16. package/src/assets/_variables.scss +43 -43
  17. package/src/assets/styles.scss +6 -6
  18. package/src/components/BadgesGroup.vue +124 -124
  19. package/src/components/ConnectivityInfo.vue +619 -619
  20. package/src/components/DatasetCard.vue +367 -357
  21. package/src/components/EventBus.js +3 -3
  22. package/src/components/ExternalResourceCard.vue +113 -113
  23. package/src/components/FlatmapDatasetCard.vue +171 -0
  24. package/src/components/ImageGallery.vue +542 -542
  25. package/src/components/PMRDatasetCard.vue +237 -0
  26. package/src/components/SearchFilters.vue +1023 -1006
  27. package/src/components/SearchHistory.vue +175 -175
  28. package/src/components/SideBar.vue +436 -436
  29. package/src/components/SidebarContent.vue +730 -603
  30. package/src/components/Tabs.vue +145 -145
  31. package/src/components/allPaths.js +5928 -0
  32. package/src/components/index.js +8 -8
  33. package/src/components/pmrTest.js +4 -0
  34. package/src/components/species-map.js +8 -8
  35. package/src/components.d.ts +2 -0
  36. package/src/exampleConnectivityInput.js +291 -291
  37. package/src/flatmapQueries/flatmapQueries.js +169 -0
  38. package/src/main.js +9 -9
  39. package/src/mixins/S3Bucket.vue +37 -37
  40. package/src/mixins/mixedPageCalculation.vue +78 -0
  41. package/static.json +6 -6
  42. package/vite.config.js +55 -55
  43. package/vuese-generator.js +65 -65
@@ -1,3 +1,3 @@
1
- import mitt from 'mitt';
2
- const EventBus = new mitt();
3
- export default EventBus;
1
+ import mitt from 'mitt';
2
+ const EventBus = new mitt();
3
+ export default EventBus;
@@ -1,113 +1,113 @@
1
- <template>
2
- <div class="resource-container">
3
- <template v-for="resource in resources" :key="resource.id">
4
- <div class="resource">
5
- <el-button
6
- v-if="resource.id === 'pubmed'"
7
- class="button"
8
- id="open-pubmed-button"
9
- :icon="ElIconNotebook"
10
- @click="openUrl(resource.url)"
11
- >
12
- Open publications in PubMed
13
- </el-button>
14
- </div>
15
- </template>
16
- </div>
17
- </template>
18
-
19
- <script>
20
- import { shallowRef } from 'vue'
21
- import {
22
- Notebook as ElIconNotebook,
23
- } from '@element-plus/icons-vue'
24
- /* eslint-disable no-alert, no-console */
25
- import { ElButton as Button } from 'element-plus'
26
- import EventBus from './EventBus'
27
-
28
- export default {
29
- name: 'ExternalResourceCard',
30
- components: {
31
- Button,
32
- },
33
- props: {
34
- resources: {
35
- type: Array,
36
- default: () => [],
37
- },
38
- },
39
- data: function () {
40
- return {
41
- pubmeds: [],
42
- pubmedIds: [],
43
- ElIconNotebook: shallowRef(ElIconNotebook)
44
- }
45
- },
46
- methods: {
47
- capitalise: function (string) {
48
- return string.charAt(0).toUpperCase() + string.slice(1)
49
- },
50
- openUrl: function (url) {
51
- EventBus.emit('open-pubmed-url', url);
52
- window.open(url, '_blank')
53
- },
54
- },
55
- }
56
- </script>
57
-
58
- <style lang="scss" scoped>
59
- .resource-container {
60
- margin-top: 0.5em;
61
- }
62
-
63
- .attribute-title {
64
- font-size: 16px;
65
- font-weight: 600;
66
- /* font-weight: bold; */
67
- text-transform: uppercase;
68
- }
69
-
70
- .attribute-content {
71
- font-size: 14px;
72
- font-weight: 400;
73
- }
74
-
75
- .el-link {
76
- color: $app-primary-color;
77
- text-decoration: none;
78
- word-wrap: break-word;
79
- &:hover,
80
- &:focus {
81
- color: $app-primary-color;
82
- }
83
- }
84
-
85
- :deep(.el-carousel__button) {
86
- background-color: $app-primary-color;
87
- }
88
-
89
- .attribute-title {
90
- font-size: 16px;
91
- font-weight: 600;
92
- /* font-weight: bold; */
93
- text-transform: uppercase;
94
- }
95
-
96
- .button {
97
- margin-left: 0px !important;
98
- margin-top: 0px !important;
99
- font-size: 14px !important;
100
- background-color: $app-primary-color;
101
- color: #fff;
102
- &:hover {
103
- color: #fff !important;
104
- background: #ac76c5 !important;
105
- border: 1px solid #ac76c5 !important;
106
- }
107
- & + .button {
108
- margin-top: 10px !important;
109
- background-color: $app-primary-color;
110
- color: #fff;
111
- }
112
- }
113
- </style>
1
+ <template>
2
+ <div class="resource-container">
3
+ <template v-for="resource in resources" :key="resource.id">
4
+ <div class="resource">
5
+ <el-button
6
+ v-if="resource.id === 'pubmed'"
7
+ class="button"
8
+ id="open-pubmed-button"
9
+ :icon="ElIconNotebook"
10
+ @click="openUrl(resource.url)"
11
+ >
12
+ Open publications in PubMed
13
+ </el-button>
14
+ </div>
15
+ </template>
16
+ </div>
17
+ </template>
18
+
19
+ <script>
20
+ import { shallowRef } from 'vue'
21
+ import {
22
+ Notebook as ElIconNotebook,
23
+ } from '@element-plus/icons-vue'
24
+ /* eslint-disable no-alert, no-console */
25
+ import { ElButton as Button } from 'element-plus'
26
+ import EventBus from './EventBus'
27
+
28
+ export default {
29
+ name: 'ExternalResourceCard',
30
+ components: {
31
+ Button,
32
+ },
33
+ props: {
34
+ resources: {
35
+ type: Array,
36
+ default: () => [],
37
+ },
38
+ },
39
+ data: function () {
40
+ return {
41
+ pubmeds: [],
42
+ pubmedIds: [],
43
+ ElIconNotebook: shallowRef(ElIconNotebook)
44
+ }
45
+ },
46
+ methods: {
47
+ capitalise: function (string) {
48
+ return string.charAt(0).toUpperCase() + string.slice(1)
49
+ },
50
+ openUrl: function (url) {
51
+ EventBus.emit('open-pubmed-url', url);
52
+ window.open(url, '_blank')
53
+ },
54
+ },
55
+ }
56
+ </script>
57
+
58
+ <style lang="scss" scoped>
59
+ .resource-container {
60
+ margin-top: 0.5em;
61
+ }
62
+
63
+ .attribute-title {
64
+ font-size: 16px;
65
+ font-weight: 600;
66
+ /* font-weight: bold; */
67
+ text-transform: uppercase;
68
+ }
69
+
70
+ .attribute-content {
71
+ font-size: 14px;
72
+ font-weight: 400;
73
+ }
74
+
75
+ .el-link {
76
+ color: $app-primary-color;
77
+ text-decoration: none;
78
+ word-wrap: break-word;
79
+ &:hover,
80
+ &:focus {
81
+ color: $app-primary-color;
82
+ }
83
+ }
84
+
85
+ :deep(.el-carousel__button) {
86
+ background-color: $app-primary-color;
87
+ }
88
+
89
+ .attribute-title {
90
+ font-size: 16px;
91
+ font-weight: 600;
92
+ /* font-weight: bold; */
93
+ text-transform: uppercase;
94
+ }
95
+
96
+ .button {
97
+ margin-left: 0px !important;
98
+ margin-top: 0px !important;
99
+ font-size: 14px !important;
100
+ background-color: $app-primary-color;
101
+ color: #fff;
102
+ &:hover {
103
+ color: #fff !important;
104
+ background: #ac76c5 !important;
105
+ border: 1px solid #ac76c5 !important;
106
+ }
107
+ & + .button {
108
+ margin-top: 10px !important;
109
+ background-color: $app-primary-color;
110
+ color: #fff;
111
+ }
112
+ }
113
+ </style>
@@ -0,0 +1,171 @@
1
+ <template>
2
+ <div class="dataset-card-container" ref="container">
3
+ <div class="dataset-card" ref="card">
4
+ <div class="seperator-path"></div>
5
+ <div v-loading="loading" class="card" >
6
+ <span class="card-left">
7
+ <img class="banner-img" :src="thumbnail" @click="openDataset" />
8
+ </span>
9
+ <div class="card-right" @click="openDataset">
10
+ {{entry[0]}}
11
+ {{entry [1]}}
12
+ <el-button class="button">View on flatmap</el-button>
13
+ <el-button class="button">View connectivity</el-button>
14
+ </div>
15
+
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </template>
20
+
21
+
22
+ <script>
23
+ /* eslint-disable no-alert, no-console */
24
+ import {
25
+ ElButton,
26
+ ElIcon
27
+ } from 'element-plus'
28
+
29
+ export default {
30
+ name: "PMRDatasetCard",
31
+ components: {
32
+ ElButton,
33
+ ElIcon
34
+ },
35
+ props: {
36
+ /**
37
+ * Object containing information for
38
+ * the required viewing.
39
+ */
40
+ entry: {
41
+ type: Array,
42
+ default: () => []
43
+ },
44
+ envVars: {
45
+ type: Object,
46
+ default: () => {}
47
+ },
48
+ },
49
+ data: function () {
50
+ return {
51
+ // url below is a missing image icon
52
+ thumbnail: 'assets/missing-image.svg',
53
+ dataLocation: this.entry.doi,
54
+ discoverId: undefined,
55
+ loading: false,
56
+ version: 1,
57
+ lastDoi: undefined,
58
+ biolucidaData: undefined,
59
+ currentCategory: "All"
60
+ };
61
+ },
62
+ methods: {
63
+ openDataset() {
64
+ window.open(this.entry.model, "_blank");
65
+ },
66
+ }
67
+ };
68
+ </script>
69
+
70
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
71
+ <style scoped lang="scss">
72
+
73
+ .dataset-card {
74
+ padding-left: 16px;
75
+ position: relative;
76
+ min-height:17rem;
77
+ }
78
+
79
+ .title {
80
+ padding-bottom: 0.75rem;
81
+ font-family: Asap;
82
+ font-size: 14px;
83
+ font-weight: bold;
84
+ font-stretch: normal;
85
+ font-style: normal;
86
+ line-height: 1.5;
87
+ letter-spacing: 1.05px;
88
+ color: #484848;
89
+ cursor: pointer;
90
+ }
91
+ .card {
92
+ padding-top: 18px;
93
+ position: relative;
94
+ display: flex;
95
+ }
96
+
97
+ .card-left{
98
+ flex: 1
99
+ }
100
+
101
+ .card-right {
102
+ flex: 1.3;
103
+ padding-left: 6px;
104
+ }
105
+
106
+ .button{
107
+ z-index: 10;
108
+ font-family: Asap;
109
+ font-size: 14px;
110
+ font-weight: normal;
111
+ font-stretch: normal;
112
+ font-style: normal;
113
+ line-height: normal;
114
+ letter-spacing: normal;
115
+ background-color: $app-primary-color;
116
+ border: $app-primary-color;
117
+ color: white;
118
+ cursor: pointer;
119
+ margin-top: 8px;
120
+ }
121
+
122
+ .button:hover {
123
+ background-color: $app-primary-color;
124
+ color: white;
125
+ }
126
+
127
+ .banner-img {
128
+ width: 128px;
129
+ height: 128px;
130
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
131
+ background-color: #ffffff;
132
+ cursor: pointer;
133
+ }
134
+ .details{
135
+ font-family: Asap;
136
+ font-size: 14px;
137
+ font-weight: normal;
138
+ font-stretch: normal;
139
+ font-style: normal;
140
+ line-height: 1.5;
141
+ letter-spacing: 1.05px;
142
+ color: #484848;
143
+ }
144
+
145
+ .badges-container {
146
+ margin-top:0.75rem;
147
+ }
148
+
149
+ .loading-icon {
150
+ z-index: 20;
151
+ width: 40px;
152
+ height: 40px;
153
+ left: 80px;
154
+ }
155
+
156
+ .loading-icon ::v-deep(.el-loading-mask) {
157
+ background-color: rgba(117, 190, 218, 0.0) !important;
158
+ }
159
+
160
+ .loading-icon ::v-deep(.el-loading-spinner .path) {
161
+ stroke: $app-primary-color;
162
+ }
163
+
164
+ .button {
165
+ width: 150px;
166
+ height: 40px;
167
+ background-color: $app-primary-color;
168
+ border: $app-primary-color;
169
+ color: white;
170
+ }
171
+ </style>