@abi-software/map-side-bar 2.11.2 → 2.11.4-acupoints.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.
- package/dist/map-side-bar.js +10235 -9570
- package/dist/map-side-bar.umd.cjs +63 -63
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/App.vue +24 -1
- package/src/acupoints.js +19 -2
- package/src/components/AcupointsCard.vue +58 -15
- package/src/components/AcupointsInfoSearch.vue +92 -26
- package/src/components/ConnectivityExplorer.vue +104 -8
- package/src/components/ConnectivityInfo.vue +2 -2
- package/src/components/SideBar.vue +46 -3
- package/src/components.d.ts +3 -0
|
@@ -64,6 +64,14 @@
|
|
|
64
64
|
@connectivity-item-close="onConnectivityItemClose"
|
|
65
65
|
/>
|
|
66
66
|
</template>
|
|
67
|
+
<template v-else-if="tab.type === 'acupoints' && acupointsInfoList">
|
|
68
|
+
<acupoints-info-search
|
|
69
|
+
:ref="'acupointsTab_' + tab.id"
|
|
70
|
+
:entry="acupointsInfoList"
|
|
71
|
+
@on-acupoints-click="acupointClicked"
|
|
72
|
+
v-show="tab.id === activeTabId"
|
|
73
|
+
/>
|
|
74
|
+
</template>
|
|
67
75
|
<template v-else>
|
|
68
76
|
<DatasetExplorer
|
|
69
77
|
class="sidebar-content-container"
|
|
@@ -92,6 +100,7 @@ import { ElDrawer as Drawer, ElIcon as Icon } from 'element-plus'
|
|
|
92
100
|
import DatasetExplorer from './DatasetExplorer.vue'
|
|
93
101
|
import EventBus from './EventBus.js'
|
|
94
102
|
import Tabs from './Tabs.vue'
|
|
103
|
+
import AcupointsInfoSearch from './AcupointsInfoSearch.vue'
|
|
95
104
|
import AnnotationTool from './AnnotationTool.vue'
|
|
96
105
|
import ConnectivityExplorer from './ConnectivityExplorer.vue'
|
|
97
106
|
import { removeShowAllFacets } from '../algolia/utils.js'
|
|
@@ -151,6 +160,13 @@ export default {
|
|
|
151
160
|
type: Array,
|
|
152
161
|
default: [],
|
|
153
162
|
},
|
|
163
|
+
/**
|
|
164
|
+
* The acupoints info to show in sidebar.
|
|
165
|
+
*/
|
|
166
|
+
acupointsInfoList: {
|
|
167
|
+
type: Object,
|
|
168
|
+
default: null,
|
|
169
|
+
},
|
|
154
170
|
/**
|
|
155
171
|
* The annotation data to show in sidebar.
|
|
156
172
|
*/
|
|
@@ -204,6 +220,13 @@ export default {
|
|
|
204
220
|
}
|
|
205
221
|
},
|
|
206
222
|
methods: {
|
|
223
|
+
/**
|
|
224
|
+
* This event is emitted with a mouse click on acupoint card
|
|
225
|
+
* @arg data
|
|
226
|
+
*/
|
|
227
|
+
acupointClicked: function (data) {
|
|
228
|
+
this.$emit('acupoints-clicked', data)
|
|
229
|
+
},
|
|
207
230
|
onConnectivityCollapseChange: function (data) {
|
|
208
231
|
this.$emit('connectivity-collapse-change', data)
|
|
209
232
|
},
|
|
@@ -295,9 +318,6 @@ export default {
|
|
|
295
318
|
datasetExplorerTabRef.openSearch(facets, query);
|
|
296
319
|
})
|
|
297
320
|
},
|
|
298
|
-
/**
|
|
299
|
-
* Get the ref id of the tab by id and type.
|
|
300
|
-
*/
|
|
301
321
|
getTabRef: function (id, type, switchTab = false) {
|
|
302
322
|
const matchedTab = this.tabEntries.filter((tabEntry) => {
|
|
303
323
|
return (id === undefined || tabEntry.id === id) &&
|
|
@@ -407,6 +427,14 @@ export default {
|
|
|
407
427
|
updateConnectivityError: function (errorInfo) {
|
|
408
428
|
EventBus.emit('connectivity-error', errorInfo);
|
|
409
429
|
},
|
|
430
|
+
openAcupointsSearch: function (term) {
|
|
431
|
+
this.drawerOpen = true
|
|
432
|
+
// Because refs are in v-for, nextTick is needed here
|
|
433
|
+
this.$nextTick(() => {
|
|
434
|
+
const tabRef = this.getTabRef(undefined, 'acupoints', true);
|
|
435
|
+
tabRef.search(term);
|
|
436
|
+
})
|
|
437
|
+
},
|
|
410
438
|
/**
|
|
411
439
|
* Store available anatomy facets data for connectivity list component
|
|
412
440
|
*/
|
|
@@ -503,6 +531,11 @@ export default {
|
|
|
503
531
|
// This should respect the information provided by the property
|
|
504
532
|
tabEntries: function () {
|
|
505
533
|
return this.tabs.filter((tab) =>
|
|
534
|
+
(tab.type === "acupoints" &&
|
|
535
|
+
(
|
|
536
|
+
this.acupointsInfoList &&
|
|
537
|
+
Object.keys(this.acupointsInfoList).length > 0
|
|
538
|
+
)) ||
|
|
506
539
|
tab.type === "datasetExplorer" ||
|
|
507
540
|
tab.type === "connectivityExplorer" ||
|
|
508
541
|
(
|
|
@@ -565,6 +598,16 @@ export default {
|
|
|
565
598
|
this.$emit('connectivity-source-change', payLoad);
|
|
566
599
|
})
|
|
567
600
|
|
|
601
|
+
// Emit acupoints clicked event
|
|
602
|
+
EventBus.on('acupoints-clicked', (payLoad) => {
|
|
603
|
+
this.$emit('acupoints-clicked', payLoad);
|
|
604
|
+
})
|
|
605
|
+
|
|
606
|
+
// Emit acupoints hovered event
|
|
607
|
+
EventBus.on('acupoints-hovered', (payLoad) => {
|
|
608
|
+
this.$emit('acupoints-hovered', payLoad);
|
|
609
|
+
})
|
|
610
|
+
|
|
568
611
|
// Get available anatomy facets for the connectivity info
|
|
569
612
|
EventBus.on('available-facets', (payLoad) => {
|
|
570
613
|
this.availableAnatomyFacets = payLoad.find((facet) => facet.label === 'Anatomical Structure').children
|
package/src/components.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ declare module 'vue' {
|
|
|
21
21
|
ElCascader: typeof import('element-plus/es')['ElCascader']
|
|
22
22
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
|
23
23
|
ElCol: typeof import('element-plus/es')['ElCol']
|
|
24
|
+
ElCollapse: typeof import('element-plus/es')['ElCollapse']
|
|
25
|
+
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
|
|
24
26
|
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
|
25
27
|
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
|
26
28
|
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
|
@@ -40,6 +42,7 @@ declare module 'vue' {
|
|
|
40
42
|
ElPagination: typeof import('element-plus/es')['ElPagination']
|
|
41
43
|
ElPopover: typeof import('element-plus/es')['ElPopover']
|
|
42
44
|
ElRadio: typeof import('element-plus/es')['ElRadio']
|
|
45
|
+
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
|
43
46
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
|
44
47
|
ElRow: typeof import('element-plus/es')['ElRow']
|
|
45
48
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|