@abi-software/map-side-bar 2.9.1 → 2.9.2-demo.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.
- package/dist/map-side-bar.js +857 -839
- package/dist/map-side-bar.umd.cjs +20 -20
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/algolia/algolia.js +6 -1
- package/src/algolia/utils.js +1 -0
- package/src/components/ConnectivityCard.vue +19 -2
- package/src/components/ConnectivityExplorer.vue +0 -1
- package/src/components/SearchFilters.vue +7 -5
package/package.json
CHANGED
package/src/algolia/algolia.js
CHANGED
|
@@ -18,12 +18,17 @@ export class AlgoliaClient {
|
|
|
18
18
|
getAlgoliaFacets(propPathMapping) {
|
|
19
19
|
const facetPropPaths = propPathMapping.map(facet => facet.facetPropPath)
|
|
20
20
|
const facetSubpropPaths = propPathMapping.map(item => item.facetSubpropPath)
|
|
21
|
+
const facetSubsubpropPaths = propPathMapping.map(
|
|
22
|
+
item => item.facetSubsubpropPath).filter(
|
|
23
|
+
i => i !== undefined
|
|
24
|
+
)
|
|
21
25
|
let facetData = []
|
|
22
26
|
let facetId = 0
|
|
27
|
+
console.log("getAlgoliaFacets", facetPropPaths.concat(facetSubpropPaths).concat(facetSubsubpropPaths))
|
|
23
28
|
return this.index
|
|
24
29
|
.search('', {
|
|
25
30
|
sortFacetValuesBy: 'alpha',
|
|
26
|
-
facets: facetPropPaths.concat(facetSubpropPaths),
|
|
31
|
+
facets: facetPropPaths.concat(facetSubpropPaths).concat(facetSubsubpropPaths),
|
|
27
32
|
})
|
|
28
33
|
.then(response => {
|
|
29
34
|
facetPropPaths.map((facetPropPath) => {
|
package/src/algolia/utils.js
CHANGED
|
@@ -14,6 +14,7 @@ export const facetPropPathMapping = [
|
|
|
14
14
|
id: 'anatomy.organ.category',
|
|
15
15
|
facetPropPath: 'anatomy.organ.category.name',
|
|
16
16
|
facetSubpropPath: 'anatomy.organ.subcategory.name',
|
|
17
|
+
facetSubsubpropPath: 'anatomy.organ.subsubcategory.name',
|
|
17
18
|
facetFilterPath: 'anatomy.organ.name'
|
|
18
19
|
},
|
|
19
20
|
{
|
|
@@ -6,7 +6,13 @@
|
|
|
6
6
|
<div class="card-title">{{ capitalise(entry.label) }}</div>
|
|
7
7
|
<template v-for="field in displayFields" :key="field">
|
|
8
8
|
<div class="card-details" v-if="entry[field]">
|
|
9
|
-
<strong>{{ field }}:</strong>
|
|
9
|
+
<strong>{{ field }}:</strong>
|
|
10
|
+
<div v-if="field === 'nerve-label'" class="card-tags">
|
|
11
|
+
<el-tag type="primary" size="small" v-for="nerve in entry[field]">
|
|
12
|
+
{{ nerve }}
|
|
13
|
+
</el-tag>
|
|
14
|
+
</div>
|
|
15
|
+
<span v-else>{{ entry[field] }}</span>
|
|
10
16
|
</div>
|
|
11
17
|
</template>
|
|
12
18
|
</div>
|
|
@@ -19,7 +25,7 @@ export default {
|
|
|
19
25
|
name: "ConnectivityCard",
|
|
20
26
|
data() {
|
|
21
27
|
return {
|
|
22
|
-
displayFields: ["id"],
|
|
28
|
+
displayFields: ["id", "nerve-label"],
|
|
23
29
|
};
|
|
24
30
|
},
|
|
25
31
|
props: {
|
|
@@ -90,4 +96,15 @@ export default {
|
|
|
90
96
|
line-height: 1.5;
|
|
91
97
|
letter-spacing: 1.05px;
|
|
92
98
|
}
|
|
99
|
+
|
|
100
|
+
.card-tags {
|
|
101
|
+
overflow-y: scroll;
|
|
102
|
+
max-height: 4.1rem;
|
|
103
|
+
|
|
104
|
+
&::-webkit-scrollbar {
|
|
105
|
+
display: none; /* Hide scrollbar for Chrome, Safari and Opera */
|
|
106
|
+
}
|
|
107
|
+
-ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
|
|
108
|
+
scrollbar-width: none; /* Hide scrollbar for Firefox */
|
|
109
|
+
}
|
|
93
110
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="filters">
|
|
3
3
|
<MapSvgSpriteColor />
|
|
4
|
-
<div v-if="showFilters">
|
|
4
|
+
<div v-if="showFilters && options.length > 0">
|
|
5
5
|
<div class="cascader-tag" v-if="presentTags.length > 0">
|
|
6
6
|
<el-tag
|
|
7
7
|
class="ml-2"
|
|
@@ -230,10 +230,12 @@ export default {
|
|
|
230
230
|
// Populate the cascader with new options
|
|
231
231
|
this.populateCascader().then(() => {
|
|
232
232
|
this.cascaderIsReady = true
|
|
233
|
-
this.
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
233
|
+
if (this.options.length) {
|
|
234
|
+
this.checkShowAllBoxes()
|
|
235
|
+
// this.setCascader(this.entry.filterFacets)
|
|
236
|
+
this.cssMods()
|
|
237
|
+
this.$emit('cascaderReady')
|
|
238
|
+
}
|
|
237
239
|
})
|
|
238
240
|
}
|
|
239
241
|
},
|