@iqual/nuxt-icms 1.5.10 → 1.5.11
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.
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
:debug="false"
|
|
82
82
|
:alignHorizontalFull="alignHorizontalFull"
|
|
83
83
|
@results-updated="onResultsUpdated"
|
|
84
|
+
:conjunction="conjunction"
|
|
84
85
|
>
|
|
85
86
|
<template #results="{ results }">
|
|
86
87
|
<slot name="preResults" :results="results"></slot>
|
|
@@ -162,10 +163,8 @@ const props = withDefaults(
|
|
|
162
163
|
titleStyle?: string
|
|
163
164
|
text?: string
|
|
164
165
|
listingType?: string
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
name?: string
|
|
168
|
-
} | null)[]
|
|
166
|
+
conjunction?: 'AND' | 'OR'
|
|
167
|
+
prefilter?: Record<string, Array<{ id?: string; name?: string } | null>>
|
|
169
168
|
availableFacets?: string[]
|
|
170
169
|
contentTypeFilter?: string[]
|
|
171
170
|
additionalFilters?: Array<{ field: string; value: any; operator?: string }>
|
|
@@ -213,9 +212,15 @@ const filterValidItems = (items?: any[]) =>
|
|
|
213
212
|
}[]
|
|
214
213
|
|
|
215
214
|
// Build manual filters object from props for 'manual' listing type
|
|
216
|
-
const manualFilters = computed(() =>
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
const manualFilters = computed(() => {
|
|
216
|
+
const result: Record<string, any> = {}
|
|
217
|
+
|
|
218
|
+
Object.entries(props.prefilter).forEach(([key, items]) => {
|
|
219
|
+
result[key] = filterValidItems(items)
|
|
220
|
+
})
|
|
221
|
+
|
|
222
|
+
return result
|
|
223
|
+
})
|
|
219
224
|
|
|
220
225
|
// Get the valid listing type
|
|
221
226
|
const listingType = computed(() => {
|