@abi-software/map-side-bar 2.11.2 → 2.11.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/map-side-bar",
3
- "version": "2.11.2",
3
+ "version": "2.11.4",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@abi-software/gallery": "^1.2.0",
47
- "@abi-software/map-utilities": "1.7.6",
47
+ "@abi-software/map-utilities": "1.7.7",
48
48
  "@abi-software/svg-sprite": "^1.0.2",
49
49
  "@element-plus/icons-vue": "^2.3.1",
50
50
  "algoliasearch": "^4.10.5",
@@ -3,14 +3,56 @@
3
3
  <MapSvgSpriteColor />
4
4
  <template #header>
5
5
  <div class="header">
6
- <el-input
7
- class="search-input"
8
- placeholder="Search"
9
- v-model="searchInput"
10
- @keyup="searchEvent"
11
- clearable
12
- @clear="clearSearchClicked"
13
- ></el-input>
6
+ <div class="search-input-container" :class="{'is-focus': inputFocus}">
7
+ <el-input
8
+ class="search-input"
9
+ placeholder="Search"
10
+ v-model="searchInput"
11
+ @focus="onInputFocus"
12
+ @blur="onInputBlur"
13
+ @input="onInputChange"
14
+ @keyup="searchEvent"
15
+ clearable
16
+ @clear="clearSearchClicked"
17
+ ></el-input>
18
+ <el-popover
19
+ width="350"
20
+ trigger="hover"
21
+ popper-class="filter-help-popover"
22
+ >
23
+ <template #reference>
24
+ <MapSvgIcon icon="help" class="help" />
25
+ </template>
26
+ <div>
27
+ <strong>Search rules:</strong>
28
+ <ul>
29
+ <li>
30
+ <strong>Partial Matching:</strong> You don't need to type the full word or ID.
31
+ The search will find items that contain your search term.
32
+ </li>
33
+ <li>
34
+ <strong>Multiple Terms:</strong> Separate terms with a comma (<code>,</code>).
35
+ This will find pathways that match any of the terms (an "OR" search).
36
+ </li>
37
+ </ul>
38
+ <br/>
39
+ <strong>Examples:</strong>
40
+ <ul>
41
+ <li>
42
+ <strong>To find by partial ID:</strong>
43
+ Searching for <code>kidney/132</code> will match the full <strong>Pathway ID</strong> <code>ilxtr:sparc-nlp/kidney/132</code>
44
+ </li>
45
+ <li>
46
+ <strong>To find by keyword:</strong>
47
+ Searching for (<code>vagus nerve</code>) will match <strong>pathways</strong> that have <code>vagus nerve</code> in their title OR are linked to a related component (like UBERON:0001759).
48
+ </li>
49
+ <li>
50
+ <strong>To find by multiple terms:</strong>
51
+ Searching for <code>kidney</code>, <code>vagus nerve</code> will find pathways that are related to either <code>kidney</code> OR <code>vagus nerve</code>.</li>
52
+ </ul>
53
+ </div>
54
+ </el-popover>
55
+ </div>
14
56
  <el-button
15
57
  type="primary"
16
58
  class="button"
@@ -216,6 +258,7 @@ export default {
216
258
  expanded: "",
217
259
  filterVisibility: true,
218
260
  expandedData: null,
261
+ inputFocus: false,
219
262
  };
220
263
  },
221
264
  computed: {
@@ -250,6 +293,7 @@ export default {
250
293
  this.$refs.filtersRef.checkShowAllBoxes();
251
294
  this.searchInput = '';
252
295
  this.filter = [];
296
+ this.updateInputFocus();
253
297
  }
254
298
  }
255
299
  },
@@ -306,6 +350,7 @@ export default {
306
350
  onConnectivityClicked: function (data) {
307
351
  this.searchInput = data.query;
308
352
  this.searchAndFilterUpdate();
353
+ this.updateInputFocus();
309
354
  },
310
355
  collapseChange:function (data) {
311
356
  this.expanded = this.expanded === data.id ? "" : data.id;
@@ -380,6 +425,7 @@ export default {
380
425
  },
381
426
  openSearch: function (filter, search = "") {
382
427
  this.searchInput = search;
428
+ this.updateInputFocus();
383
429
  this.resetPageNavigation();
384
430
  //Proceed normally if cascader is ready
385
431
  if (this.cascaderIsReady) {
@@ -468,13 +514,27 @@ export default {
468
514
  clearSearchClicked: function () {
469
515
  this.searchInput = "";
470
516
  this.searchAndFilterUpdate();
517
+ this.updateInputFocus();
471
518
  },
472
519
  searchEvent: function (event = false) {
473
520
  if (event.keyCode === 13 || event instanceof MouseEvent) {
474
521
  this.searchInput = this.searchInput.trim();
475
522
  this.searchAndFilterUpdate();
523
+ this.updateInputFocus();
476
524
  }
477
525
  },
526
+ updateInputFocus: function () {
527
+ this.inputFocus = this.searchInput ? true : false;
528
+ },
529
+ onInputFocus: function () {
530
+ this.updateInputFocus();
531
+ },
532
+ onInputBlur: function () {
533
+ this.updateInputFocus();
534
+ },
535
+ onInputChange: function () {
536
+ this.updateInputFocus();
537
+ },
478
538
  filterUpdate: function (filters) {
479
539
  this.filter = [...filters];
480
540
  this.searchAndFilterUpdate();
@@ -554,6 +614,7 @@ export default {
554
614
  this.searchInput = item.search;
555
615
  this.filter = item.filters;
556
616
  this.openSearch([...item.filters], item.search);
617
+ this.updateInputFocus();
557
618
  },
558
619
  onConnectivityInfoLoaded: function (result) {
559
620
  const stepItemRef = this.$refs['stepItem-' + result.id];
@@ -650,6 +711,24 @@ export default {
650
711
  }
651
712
  }
652
713
 
714
+ .search-input-container {
715
+ position: relative;
716
+ display: flex;
717
+ align-items: center;
718
+
719
+ .map-icon {
720
+ position: absolute;
721
+ right: 18px;
722
+ color: $app-primary-color !important;
723
+ }
724
+
725
+ &.is-focus {
726
+ .map-icon {
727
+ display: none;
728
+ }
729
+ }
730
+ }
731
+
653
732
  .header {
654
733
  display: flex;
655
734
  align-items: center;
@@ -811,5 +890,9 @@ export default {
811
890
  border-bottom-color: transparent !important;
812
891
  border-right-color: transparent !important;
813
892
  }
893
+
894
+ code {
895
+ font-size: 90%;
896
+ }
814
897
  }
815
898
  </style>
@@ -103,9 +103,9 @@
103
103
  <el-icon class="info"><el-icon-warning /></el-icon>
104
104
  </template>
105
105
  <span style="word-break: keep-all">
106
- <strong>Map</strong> - connectivity as defined in displayed map
106
+ <strong>Map</strong> - connectivity as defined in active map.
107
107
  <br>
108
- <strong>SCKAN</strong> - connectivity as defined in SCKAN
108
+ <strong>SCKAN</strong> - connectivity as defined in SCKAN.
109
109
  </span>
110
110
  </el-popover>
111
111
  </span>
@@ -7,8 +7,6 @@ export {}
7
7
 
8
8
  declare module 'vue' {
9
9
  export interface GlobalComponents {
10
- AcupointsCard: typeof import('./components/AcupointsCard.vue')['default']
11
- AcupointsInfoSearch: typeof import('./components/AcupointsInfoSearch.vue')['default']
12
10
  AnnotationTool: typeof import('./components/AnnotationTool.vue')['default']
13
11
  BadgesGroup: typeof import('./components/BadgesGroup.vue')['default']
14
12
  ConnectivityCard: typeof import('./components/ConnectivityCard.vue')['default']
package/src/acupoints.js DELETED
@@ -1,32 +0,0 @@
1
- export const acupointEntries = {
2
- "LU 1": {
3
- "Acupoint": "LU 1",
4
- "Label": "LU 1",
5
- "Synonym": "Test data",
6
- "UMLS CUI": "",
7
- "Meridian": "LTest data",
8
- "Chinese Name": "Zhongfu",
9
- "English Name": "Central Treasury",
10
- "Location": " z zxczc.",
11
- "Reference": "Test data",
12
- "Indications": "Test data",
13
- "Acupuncture Method": "Test data",
14
- "Vasculature": "Test data",
15
- "Innervation": "Test data"
16
- },
17
- "LU 2": {
18
- "Acupoint": "LU 2",
19
- "Label": "LU 2",
20
- "Synonym": "Test data",
21
- "UMLS CUI": "",
22
- "Meridian": "LTest data",
23
- "Chinese Name": "Yunmen",
24
- "English Name": "Cloud Gate",
25
- "Location": " z zxczc.",
26
- "Reference": "Test data",
27
- "Indications": "Test data",
28
- "Acupuncture Method": "Test data",
29
- "Vasculature": "Test data",
30
- "Innervation": "Test data"
31
- }
32
- }
@@ -1,169 +0,0 @@
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 class="card"
6
- @click="cardClicked(entry)"
7
- @mouseover="cardHovered(entry)"
8
- @mouseleave="cardHovered(undefined)"
9
- >
10
- <div class="card-right">
11
- <div class="title">Acupoint: {{ entry.Acupoint }}</div>
12
- <template v-for="field in displayFields" :key="field">
13
- <div class="details" v-if="entry[field]">
14
- <strong>{{ field }}:</strong> {{ entry[field] }}
15
- </div>
16
- </template>
17
- </div>
18
- </div>
19
- </div>
20
- </div>
21
- </template>
22
-
23
- <script>
24
- import EventBus from './EventBus.js'
25
- /* eslint-disable no-alert, no-console */
26
-
27
- export default {
28
- data() {
29
- return {
30
- displayFields: [
31
- "Synonym",
32
- "Chinese Name",
33
- "English Name",
34
- "Reference",
35
- "Indications",
36
- "Acupuncture Method",
37
- "Vasculature",
38
- "Innervation"
39
- ]
40
- }
41
- },
42
- name: 'AcupointsCard',
43
- props: {
44
- /**
45
- * Object containing information for
46
- * the required viewing.
47
- */
48
- entry: {
49
- type: Object,
50
- default: () => {},
51
- },
52
- },
53
- methods: {
54
- cardClicked: function (data) {
55
- EventBus.emit('acupoints-clicked', data);
56
- },
57
- cardHovered: function (data) {
58
- EventBus.emit('acupoints-hovered', data);
59
- },
60
- }
61
- }
62
- </script>
63
-
64
- <style lang="scss" scoped>
65
- .dataset-card {
66
- padding-left: 5px;
67
- padding-right: 5px;
68
- position: relative;
69
- min-height: 17rem;
70
- }
71
-
72
- .title {
73
- padding-bottom: 0.75rem;
74
- font-family: Asap;
75
- font-size: 14px;
76
- font-weight: bold;
77
- font-stretch: normal;
78
- font-style: normal;
79
- line-height: 1.5;
80
- letter-spacing: 1.05px;
81
- color: #484848;
82
- cursor: pointer;
83
- }
84
- .card {
85
- padding-top: 18px;
86
- position: relative;
87
- display: flex;
88
- }
89
-
90
- .card-left {
91
- flex: 1;
92
- }
93
-
94
- .card-right {
95
- flex: 1.3;
96
- padding-left: 6px;
97
- }
98
-
99
- .button {
100
- z-index: 10;
101
- font-family: Asap;
102
- font-size: 14px;
103
- font-weight: normal;
104
- font-stretch: normal;
105
- font-style: normal;
106
- line-height: normal;
107
- letter-spacing: normal;
108
- background-color: $app-primary-color;
109
- border: $app-primary-color;
110
- color: white;
111
- cursor: pointer;
112
- margin-top: 8px;
113
- }
114
-
115
- .button:hover {
116
- background-color: $app-primary-color;
117
- color: white;
118
- }
119
-
120
- .banner-img {
121
- width: 128px;
122
- height: 128px;
123
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
124
- background-color: #ffffff;
125
- cursor: pointer;
126
- }
127
- .details {
128
- font-family: Asap;
129
- font-size: 14px;
130
- font-weight: normal;
131
- font-stretch: normal;
132
- font-style: normal;
133
- line-height: 1.5;
134
- letter-spacing: 1.05px;
135
- color: #484848;
136
- }
137
-
138
- .badges-container {
139
- margin-top: 0.75rem;
140
- }
141
-
142
- .loading-icon {
143
- z-index: 20;
144
- width: 40px;
145
- height: 40px;
146
- left: 80px;
147
- }
148
-
149
- .loading-icon :deep(.el-loading-mask) {
150
- background-color: rgba(117, 190, 218, 0) !important;
151
- }
152
-
153
- .loading-icon :deep(.el-loading-spinner .path) {
154
- stroke: $app-primary-color;
155
- }
156
-
157
- .float-button-container {
158
- position: absolute;
159
- bottom: 8px;
160
- right: 16px;
161
- opacity: 0;
162
- visibility: hidden;
163
-
164
- .card:hover & {
165
- opacity: 1;
166
- visibility: visible;
167
- }
168
- }
169
- </style>