@explorer-1/vue 0.2.61 → 0.2.62
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 +2 -2
- package/src/components/BaseAccordionItem/BaseAccordionItem.vue +3 -2
- package/src/components/SearchFilterGroup/SearchFilterGroup.vue +10 -2
- package/src/components/SearchFilterGroupAccordionItem/SearchFilterGroupAccordionItem.vue +4 -3
- package/src/components/SearchResultsList/SearchResultsList.vue +4 -2
- package/src/templates/edu/PageEduStudentProject/PageEduStudentProject.vue +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@explorer-1/vue",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.62",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"vue-bind-once": "^0.2.1",
|
|
31
31
|
"vue3-compare-image": "^1.2.5",
|
|
32
32
|
"vue3-observe-visibility": "^1.0.1",
|
|
33
|
-
"@explorer-1/common": "1.1.
|
|
33
|
+
"@explorer-1/common": "1.1.16"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
@@ -3,6 +3,7 @@ import { computed, reactive, ref } from 'vue'
|
|
|
3
3
|
import type { AccordionItemObject } from './../../interfaces.ts'
|
|
4
4
|
import { uniqueId } from 'lodash'
|
|
5
5
|
import IconPlus from './../Icons/IconPlus.vue'
|
|
6
|
+
import IconMinus from './../Icons/IconMinus.vue'
|
|
6
7
|
|
|
7
8
|
export interface BaseAccordionItemProps {
|
|
8
9
|
headingLevel?: string
|
|
@@ -76,9 +77,9 @@ const emit = defineEmits(['accordionItemOpened', 'accordionItemClosed'])
|
|
|
76
77
|
</slot>
|
|
77
78
|
<span
|
|
78
79
|
class="BaseAccordion-icon pointer-events-none text-xs text-action flex-shrink-0 transform transition-transform"
|
|
79
|
-
:class="{ 'rotate-45': !isHidden }"
|
|
80
80
|
>
|
|
81
|
-
<IconPlus />
|
|
81
|
+
<IconPlus v-if="isHidden" />
|
|
82
|
+
<IconMinus v-else />
|
|
82
83
|
</span>
|
|
83
84
|
</button>
|
|
84
85
|
</component>
|
|
@@ -81,7 +81,8 @@
|
|
|
81
81
|
<!-- correct for zero based index -->
|
|
82
82
|
<div
|
|
83
83
|
v-if="!truncateFilters || index <= checkbox.checkboxLimit - 1"
|
|
84
|
-
class="flex
|
|
84
|
+
class="flex"
|
|
85
|
+
:class="{ 'pt-2 mt-2 mb-3': styleAsAccordion, 'my-2': !styleAsAccordion }"
|
|
85
86
|
>
|
|
86
87
|
<input
|
|
87
88
|
:id="
|
|
@@ -102,9 +103,10 @@
|
|
|
102
103
|
: generateId(bucket.key, groupKey)
|
|
103
104
|
"
|
|
104
105
|
class="form-check-label pl-2 tracking-normal align-middle"
|
|
106
|
+
:class="{ 'font-extrabold': styleAsAccordion }"
|
|
105
107
|
>
|
|
106
108
|
{{ prettyFilterNames(bucket.key_as_string ? bucket.key_as_string : bucket.key) }}
|
|
107
|
-
<span class="text-gray-mid-dark text-sm">
|
|
109
|
+
<span class="text-gray-mid-dark text-sm font-normal">
|
|
108
110
|
({{ bucket.doc_count.toLocaleString() }})
|
|
109
111
|
</span>
|
|
110
112
|
</label>
|
|
@@ -180,6 +182,12 @@ export default {
|
|
|
180
182
|
subFilterAggKey: {
|
|
181
183
|
type: String,
|
|
182
184
|
default: undefined
|
|
185
|
+
},
|
|
186
|
+
// force accordion styles and spacing even if there are no subfilters
|
|
187
|
+
// useful when mixing filters with and without subfilters together
|
|
188
|
+
styleAsAccordion: {
|
|
189
|
+
type: Boolean,
|
|
190
|
+
default: false
|
|
183
191
|
}
|
|
184
192
|
},
|
|
185
193
|
emits: ['update:filterBy'],
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { computed, reactive, ref } from 'vue'
|
|
3
3
|
import { uniqueId } from 'lodash'
|
|
4
4
|
import IconPlus from './../Icons/IconPlus.vue'
|
|
5
|
+
import IconMinus from './../Icons/IconMinus.vue'
|
|
5
6
|
|
|
6
7
|
export interface SearchFilterGroupAccordionItemProps {
|
|
7
8
|
initOpen?: boolean
|
|
@@ -57,10 +58,10 @@ const emit = defineEmits(['filterGroupAccordionItemOpened', 'filterGroupAccordio
|
|
|
57
58
|
@click="handleClick()"
|
|
58
59
|
>
|
|
59
60
|
<span
|
|
60
|
-
class="SearchFilterGroupAccordionItem-icon inline-block text-xs text-action flex-shrink-0
|
|
61
|
-
:class="{ '!rotate-45': !isHidden }"
|
|
61
|
+
class="SearchFilterGroupAccordionItem-icon inline-block text-xs text-action flex-shrink-0"
|
|
62
62
|
>
|
|
63
|
-
<IconPlus />
|
|
63
|
+
<IconPlus v-if="isHidden" />
|
|
64
|
+
<IconMinus v-else />
|
|
64
65
|
</span>
|
|
65
66
|
</button>
|
|
66
67
|
</template>
|
|
@@ -193,9 +193,11 @@ export default defineComponent({
|
|
|
193
193
|
page.id = page._id
|
|
194
194
|
page.score = page._score
|
|
195
195
|
// ensure router links
|
|
196
|
+
// TODO: issues with router links so disabling for now
|
|
197
|
+
// page.url = page._source.url
|
|
198
|
+
// ? page._source.url.replace(/^[^:]+:\/\/[^/?#]+/, '')
|
|
199
|
+
// : undefined
|
|
196
200
|
page.url = page._source.url
|
|
197
|
-
? page._source.url.replace(/^[^:]+:\/\/[^/?#]+/, '')
|
|
198
|
-
: undefined
|
|
199
201
|
page.title = page._source.title
|
|
200
202
|
page.type = pageType
|
|
201
203
|
page.topic = topic
|