@empathyco/x-components 6.0.0-alpha.219 → 6.0.0-alpha.220
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/CHANGELOG.md +8 -0
- package/docs/API-reference/components/ai/x-components.ai-overview.md +4 -4
- package/docs/API-reference/components/common/animations/x-components.animate-width.md +4 -4
- package/docs/API-reference/components/common/animations/x-components.change-height.md +10 -6
- package/docs/API-reference/components/common/animations/x-components.collapse-height.md +15 -11
- package/docs/API-reference/components/common/animations/x-components.collapse-width.md +12 -10
- package/docs/API-reference/components/common/animations/x-components.cross-fade.md +9 -9
- package/docs/API-reference/components/common/animations/x-components.fade-and-slide.md +6 -6
- package/docs/API-reference/components/common/animations/x-components.fade.md +9 -9
- package/docs/API-reference/components/common/animations/x-components.no-animation.md +2 -2
- package/docs/API-reference/components/common/animations/x-components.staggered-fade-and-slide.md +5 -5
- package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-dropdown.md +13 -9
- package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-list.md +18 -18
- package/docs/API-reference/components/common/currency/x-components.base-currency.md +15 -15
- package/docs/API-reference/components/common/filters/labels/x-components.base-price-filter-label.md +6 -2
- package/docs/API-reference/components/common/filters/labels/x-components.base-rating-filter-label.md +26 -26
- package/docs/API-reference/components/common/layouts/x-components.fixed-header-and-asides-layout.md +1 -1
- package/docs/API-reference/components/common/layouts/x-components.multi-column-max-width-layout.md +1 -1
- package/docs/API-reference/components/common/layouts/x-components.single-column-layout.md +1 -1
- package/docs/API-reference/components/common/modals/x-components.base-events-modal-close.md +5 -3
- package/docs/API-reference/components/common/modals/x-components.base-events-modal-open.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-events-modal.md +28 -10
- package/docs/API-reference/components/common/modals/x-components.base-id-modal-close.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-id-modal-open.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-id-modal.md +10 -2
- package/docs/API-reference/components/common/modals/x-components.base-modal.md +12 -12
- package/docs/API-reference/components/common/modals/x-components.close-main-modal.md +5 -1
- package/docs/API-reference/components/common/modals/x-components.main-modal.md +20 -4
- package/docs/API-reference/components/common/modals/x-components.open-main-modal.md +5 -1
- package/docs/API-reference/components/common/panels/x-components.base-header-toggle-panel.md +17 -13
- package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel-button.md +11 -4
- package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel.md +20 -13
- package/docs/API-reference/components/common/panels/x-components.base-tabs-panel.md +13 -10
- package/docs/API-reference/components/common/panels/x-components.base-toggle-panel.md +4 -4
- package/docs/API-reference/components/common/result/x-components.base-result-add-to-cart.md +4 -4
- package/docs/API-reference/components/common/result/x-components.base-result-current-price.md +7 -5
- package/docs/API-reference/components/common/result/x-components.base-result-image.md +25 -19
- package/docs/API-reference/components/common/result/x-components.base-result-link.md +5 -5
- package/docs/API-reference/components/common/result/x-components.base-result-previous-price.md +7 -5
- package/docs/API-reference/components/common/result/x-components.base-result-rating.md +26 -23
- package/docs/API-reference/components/common/result/x-components.result-variant-selector.md +62 -42
- package/docs/API-reference/components/common/result/x-components.result-variants-provider.md +35 -25
- package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +11 -11
- package/docs/API-reference/components/common/suggestions/x-components.base-suggestion.md +24 -24
- package/docs/API-reference/components/common/suggestions/x-components.base-suggestions.md +47 -44
- package/docs/API-reference/components/common/x-components.auto-progress-bar.md +8 -5
- package/docs/API-reference/components/common/x-components.base-dropdown.md +7 -5
- package/docs/API-reference/components/common/x-components.base-event-button.md +9 -7
- package/docs/API-reference/components/common/x-components.base-grid.md +23 -23
- package/docs/API-reference/components/common/x-components.base-keyboard-navigation.md +6 -6
- package/docs/API-reference/components/common/x-components.base-rating.md +3 -3
- package/docs/API-reference/components/common/x-components.base-slider.md +20 -16
- package/docs/API-reference/components/common/x-components.base-switch.md +6 -6
- package/docs/API-reference/components/common/x-components.base-variable-column-grid.md +37 -28
- package/docs/API-reference/components/common/x-components.display-click-provider.md +9 -9
- package/docs/API-reference/components/common/x-components.display-emitter.md +1 -1
- package/docs/API-reference/components/common/x-components.global-x-bus.md +3 -3
- package/docs/API-reference/components/common/x-components.highlight.md +6 -6
- package/docs/API-reference/components/common/x-components.location-provider.md +4 -4
- package/docs/API-reference/components/common/x-components.page-loader-button.md +14 -14
- package/docs/API-reference/components/common/x-components.page-selector.md +12 -12
- package/docs/API-reference/components/common/x-components.sliding-panel.md +23 -20
- package/docs/API-reference/components/common/x-components.snippet-callbacks.md +3 -3
- package/docs/API-reference/components/device/x-components.device-detector.md +15 -15
- package/docs/API-reference/components/empathize/x-components.empathize.md +20 -20
- package/docs/API-reference/components/experience-controls/x-components.experience-controls.md +1 -1
- package/docs/API-reference/components/extra-params/x-components.extra-params.md +3 -3
- package/docs/API-reference/components/extra-params/x-components.renderless-extra-param.md +9 -5
- package/docs/API-reference/components/extra-params/x-components.snippet-config-extra-params.md +8 -8
- package/docs/API-reference/components/facets/x-components.clear-filters.md +10 -6
- package/docs/API-reference/components/facets/x-components.facets/facets-provider.md +16 -16
- package/docs/API-reference/components/facets/x-components.facets/facets.md +15 -9
- package/docs/API-reference/components/facets/x-components.filters/all-filter.md +20 -6
- package/docs/API-reference/components/facets/x-components.filters/editable-number-range-filter.md +37 -30
- package/docs/API-reference/components/facets/x-components.filters/hierarchical-filter.md +33 -27
- package/docs/API-reference/components/facets/x-components.filters/number-range-filter.md +19 -16
- package/docs/API-reference/components/facets/x-components.filters/renderless-filter.md +17 -15
- package/docs/API-reference/components/facets/x-components.filters/simple-filter.md +38 -32
- package/docs/API-reference/components/facets/x-components.lists/exclude-filters-with-no-results.md +30 -30
- package/docs/API-reference/components/facets/x-components.lists/filters-list.md +15 -15
- package/docs/API-reference/components/facets/x-components.lists/filters-search.md +31 -22
- package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +8 -6
- package/docs/API-reference/components/facets/x-components.lists/selected-filters.md +5 -5
- package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +35 -8
- package/docs/API-reference/components/facets/x-components.lists/sorted-filters.md +7 -2
- package/docs/API-reference/components/facets/x-components.preselected-filters.md +15 -9
- package/docs/API-reference/components/history-queries/x-components.clear-history-queries.md +8 -5
- package/docs/API-reference/components/history-queries/x-components.history-queries-switch.md +12 -9
- package/docs/API-reference/components/history-queries/x-components.history-queries.md +18 -15
- package/docs/API-reference/components/history-queries/x-components.history-query.md +21 -21
- package/docs/API-reference/components/history-queries/x-components.my-history.md +14 -11
- package/docs/API-reference/components/history-queries/x-components.remove-history-query.md +5 -5
- package/docs/API-reference/components/identifier-results/x-components.identifier-result.md +3 -3
- package/docs/API-reference/components/identifier-results/x-components.identifier-results.md +7 -7
- package/docs/API-reference/components/next-queries/x-components.next-queries-list.md +20 -15
- package/docs/API-reference/components/next-queries/x-components.next-queries.md +17 -13
- package/docs/API-reference/components/next-queries/x-components.next-query-preview.md +36 -25
- package/docs/API-reference/components/next-queries/x-components.next-query.md +14 -12
- package/docs/API-reference/components/popular-searches/x-components.popular-search.md +11 -11
- package/docs/API-reference/components/popular-searches/x-components.popular-searches.md +10 -7
- package/docs/API-reference/components/queries-preview/x-components.query-preview-button.md +6 -6
- package/docs/API-reference/components/queries-preview/x-components.query-preview-list.md +23 -21
- package/docs/API-reference/components/queries-preview/x-components.query-preview.md +27 -16
- package/docs/API-reference/components/query-suggestions/x-components.query-suggestion.md +20 -17
- package/docs/API-reference/components/query-suggestions/x-components.query-suggestions.md +16 -13
- package/docs/API-reference/components/recommendations/x-components.recommendations.md +23 -12
- package/docs/API-reference/components/related-prompts/x-components.related-prompt.md +12 -12
- package/docs/API-reference/components/related-prompts/x-components.related-prompts-list.md +13 -13
- package/docs/API-reference/components/related-prompts/x-components.related-prompts-tag-list.md +8 -5
- package/docs/API-reference/components/related-tags/x-components.related-tag.md +16 -16
- package/docs/API-reference/components/related-tags/x-components.related-tags.md +19 -16
- package/docs/API-reference/components/scroll/x-components.main-scroll-item.md +9 -5
- package/docs/API-reference/components/scroll/x-components.main-scroll.md +16 -8
- package/docs/API-reference/components/scroll/x-components.scroll-to-top.md +1 -1
- package/docs/API-reference/components/scroll/x-components.scroll.md +27 -27
- package/docs/API-reference/components/search/x-components.banner.md +16 -16
- package/docs/API-reference/components/search/x-components.banners-list.md +13 -13
- package/docs/API-reference/components/search/x-components.fallback-disclaimer.md +4 -4
- package/docs/API-reference/components/search/x-components.partial-query-button.md +6 -6
- package/docs/API-reference/components/search/x-components.partial-results-list.md +11 -7
- package/docs/API-reference/components/search/x-components.promoted.md +16 -16
- package/docs/API-reference/components/search/x-components.promoteds-list.md +13 -13
- package/docs/API-reference/components/search/x-components.redirection.md +2 -2
- package/docs/API-reference/components/search/x-components.results-list.md +17 -13
- package/docs/API-reference/components/search/x-components.sort-dropdown.md +13 -9
- package/docs/API-reference/components/search/x-components.sort-list.md +7 -7
- package/docs/API-reference/components/search/x-components.sort-picker-list.md +10 -10
- package/docs/API-reference/components/search/x-components.spellcheck-button.md +2 -2
- package/docs/API-reference/components/search/x-components.spellcheck.md +5 -3
- package/docs/API-reference/components/search-box/x-components.clear-search-input.md +15 -7
- package/docs/API-reference/components/search-box/x-components.search-button.md +11 -11
- package/docs/API-reference/components/search-box/x-components.search-input-placeholder.md +22 -16
- package/docs/API-reference/components/search-box/x-components.search-input.md +19 -10
- package/docs/API-reference/components/semantic-queries/x-components.semantic-queries.md +17 -11
- package/docs/API-reference/components/semantic-queries/x-components.semantic-query.md +12 -9
- package/docs/API-reference/components/tagging/x-components.tagging.md +8 -4
- package/docs/API-reference/components/url/x-components.url-handler.md +2 -2
- package/js/store/utils/store-emitters.utils.js.map +1 -1
- package/js/x-bus/x-bus.js.map +1 -1
- package/js/x-bus/x-priority-queue/x-priority-queue.js.map +1 -1
- package/js/x-modules/facets/entities/types.js.map +1 -1
- package/package.json +6 -6
- package/types/store/utils/store-emitters.utils.d.ts.map +1 -1
- package/types/wiring/events.types.d.ts.map +1 -1
- package/types/x-bus/x-bus.d.ts.map +1 -1
- package/types/x-bus/x-priority-queue/x-priority-queue.d.ts.map +1 -1
- package/types/x-modules/facets/entities/types.d.ts.map +1 -1
- package/types/x-modules/facets/store/types.d.ts.map +1 -1
- package/types/x-modules/history-queries/store/types.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/types.d.ts.map +1 -1
- package/types/x-modules/next-queries/store/types.d.ts.map +1 -1
- package/types/x-modules/popular-searches/store/types.d.ts.map +1 -1
- package/types/x-modules/query-suggestions/store/types.d.ts.map +1 -1
- package/types/x-modules/recommendations/store/types.d.ts.map +1 -1
- package/types/x-modules/related-tags/store/types.d.ts.map +1 -1
- package/types/x-modules/search/store/types.d.ts.map +1 -1
- package/types/x-modules/semantic-queries/store/types.d.ts.map +1 -1
|
@@ -60,7 +60,7 @@ _Type any term in the input field to try it out!_
|
|
|
60
60
|
</template>
|
|
61
61
|
|
|
62
62
|
<script setup>
|
|
63
|
-
import { Redirection } from
|
|
63
|
+
import { Redirection } from "@empathyco/x-components/search";
|
|
64
64
|
</script>
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -78,6 +78,6 @@ forcing the user to accept the redirection
|
|
|
78
78
|
</template>
|
|
79
79
|
|
|
80
80
|
<script setup>
|
|
81
|
-
import { Redirection } from
|
|
81
|
+
import { Redirection } from "@empathyco/x-components/search";
|
|
82
82
|
</script>
|
|
83
83
|
```
|
|
@@ -51,8 +51,8 @@ _Type any term in the input field to try it out!_
|
|
|
51
51
|
</template>
|
|
52
52
|
|
|
53
53
|
<script setup>
|
|
54
|
-
import { ResultsList } from
|
|
55
|
-
import { SearchInput } from
|
|
54
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
55
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
56
56
|
</script>
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -67,11 +67,11 @@ import { SearchInput } from '@empathyco/x-components/search-box'
|
|
|
67
67
|
</template>
|
|
68
68
|
|
|
69
69
|
<script setup>
|
|
70
|
-
import { ResultsList } from
|
|
71
|
-
import { SearchInput } from
|
|
72
|
-
import { FadeAndSlide } from
|
|
70
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
71
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
72
|
+
import { FadeAndSlide } from "@empathyco/x-components/animations";
|
|
73
73
|
|
|
74
|
-
const fadeAndSlide = FadeAndSlide
|
|
74
|
+
const fadeAndSlide = FadeAndSlide;
|
|
75
75
|
</script>
|
|
76
76
|
```
|
|
77
77
|
|
|
@@ -95,9 +95,9 @@ const fadeAndSlide = FadeAndSlide
|
|
|
95
95
|
</template>
|
|
96
96
|
|
|
97
97
|
<script setup>
|
|
98
|
-
import { ResultsList } from
|
|
99
|
-
import { SearchInput } from
|
|
100
|
-
import { BaseGrid } from
|
|
98
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
99
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
100
|
+
import { BaseGrid } from "@empathyco/x-components";
|
|
101
101
|
</script>
|
|
102
102
|
```
|
|
103
103
|
|
|
@@ -116,8 +116,8 @@ import { BaseGrid } from '@empathyco/x-components'
|
|
|
116
116
|
</template>
|
|
117
117
|
|
|
118
118
|
<script setup>
|
|
119
|
-
import { SearchInput } from
|
|
120
|
-
import { ResultsList } from
|
|
119
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
120
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
121
121
|
</script>
|
|
122
122
|
```
|
|
123
123
|
|
|
@@ -149,7 +149,11 @@ that, occupying the rows.
|
|
|
149
149
|
</template>
|
|
150
150
|
|
|
151
151
|
<script setup>
|
|
152
|
-
import {
|
|
153
|
-
|
|
152
|
+
import {
|
|
153
|
+
ResultsList,
|
|
154
|
+
BannersList,
|
|
155
|
+
PromotedsList,
|
|
156
|
+
} from "@empathyco/x-components/search";
|
|
157
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
154
158
|
</script>
|
|
155
159
|
```
|
|
@@ -63,7 +63,9 @@ This component emits 2 different events:
|
|
|
63
63
|
```vue
|
|
64
64
|
<template>
|
|
65
65
|
<SortDropdown :items="sortValues">
|
|
66
|
-
<template #toggle="{ item, isOpen }"
|
|
66
|
+
<template #toggle="{ item, isOpen }"
|
|
67
|
+
>{{ item }} {{ isOpen ? "🔼" : "🔽" }}</template
|
|
68
|
+
>
|
|
67
69
|
<template #item="{ item, isHighlighted, isSelected }">
|
|
68
70
|
<span v-if="isSelected">✅</span>
|
|
69
71
|
<span v-if="isHighlighted">🟢</span>
|
|
@@ -73,10 +75,10 @@ This component emits 2 different events:
|
|
|
73
75
|
</template>
|
|
74
76
|
|
|
75
77
|
<script setup>
|
|
76
|
-
import { SortDropdown } from
|
|
77
|
-
import { ref } from
|
|
78
|
+
import { SortDropdown } from "@empathyco/x-components/search";
|
|
79
|
+
import { ref } from "vue";
|
|
78
80
|
|
|
79
|
-
const sortValues = ref([
|
|
81
|
+
const sortValues = ref(["Relevance", "Price asc", "Price desc"]);
|
|
80
82
|
</script>
|
|
81
83
|
```
|
|
82
84
|
|
|
@@ -85,7 +87,9 @@ const sortValues = ref(['Relevance', 'Price asc', 'Price desc'])
|
|
|
85
87
|
```vue
|
|
86
88
|
<template>
|
|
87
89
|
<SortDropdown v-model="selectedSort" :items="sortValues">
|
|
88
|
-
<template #toggle="{ item, isOpen }"
|
|
90
|
+
<template #toggle="{ item, isOpen }"
|
|
91
|
+
>{{ item }} {{ isOpen ? "🔼" : "🔽" }}</template
|
|
92
|
+
>
|
|
89
93
|
<template #item="{ item, isHighlighted, isSelected }">
|
|
90
94
|
<span v-if="isSelected">✅</span>
|
|
91
95
|
<span v-if="isHighlighted">🟢</span>
|
|
@@ -95,10 +99,10 @@ const sortValues = ref(['Relevance', 'Price asc', 'Price desc'])
|
|
|
95
99
|
</template>
|
|
96
100
|
|
|
97
101
|
<script setup>
|
|
98
|
-
import { SortDropdown } from
|
|
99
|
-
import { ref } from
|
|
102
|
+
import { SortDropdown } from "@empathyco/x-components/search";
|
|
103
|
+
import { ref } from "vue";
|
|
100
104
|
|
|
101
|
-
const selectedSort = ref(
|
|
102
|
-
const sortValues = ref([
|
|
105
|
+
const selectedSort = ref("Price asc");
|
|
106
|
+
const sortValues = ref(["Relevance", "Price asc", "Price desc"]);
|
|
103
107
|
</script>
|
|
104
108
|
```
|
|
@@ -61,10 +61,10 @@ This component emits 2 different events:
|
|
|
61
61
|
</template>
|
|
62
62
|
|
|
63
63
|
<script setup>
|
|
64
|
-
import { SortList } from
|
|
65
|
-
import { ref } from
|
|
64
|
+
import { SortList } from "@empathyco/x-components/search";
|
|
65
|
+
import { ref } from "vue";
|
|
66
66
|
|
|
67
|
-
const sortValues = ref([
|
|
67
|
+
const sortValues = ref(["Relevance", "Price asc", "Price desc"]);
|
|
68
68
|
</script>
|
|
69
69
|
```
|
|
70
70
|
|
|
@@ -81,10 +81,10 @@ const sortValues = ref(['Relevance', 'Price asc', 'Price desc'])
|
|
|
81
81
|
</template>
|
|
82
82
|
|
|
83
83
|
<script setup>
|
|
84
|
-
import { SortList } from
|
|
85
|
-
import { ref } from
|
|
84
|
+
import { SortList } from "@empathyco/x-components/search";
|
|
85
|
+
import { ref } from "vue";
|
|
86
86
|
|
|
87
|
-
const selectedSort = ref(
|
|
88
|
-
const sortValues = ref([
|
|
87
|
+
const selectedSort = ref("Price asc");
|
|
88
|
+
const sortValues = ref(["Relevance", "Price asc", "Price desc"]);
|
|
89
89
|
</script>
|
|
90
90
|
```
|
|
@@ -62,10 +62,10 @@ This component emits 2 different events:
|
|
|
62
62
|
</template>
|
|
63
63
|
|
|
64
64
|
<script setup>
|
|
65
|
-
import { SortPickerList } from
|
|
66
|
-
import { ref } from
|
|
65
|
+
import { SortPickerList } from "@empathyco/x-components/search";
|
|
66
|
+
import { ref } from "vue";
|
|
67
67
|
|
|
68
|
-
const sortValues = ref([
|
|
68
|
+
const sortValues = ref(["Relevance", "Price asc", "Price desc"]);
|
|
69
69
|
</script>
|
|
70
70
|
```
|
|
71
71
|
|
|
@@ -82,11 +82,11 @@ const sortValues = ref(['Relevance', 'Price asc', 'Price desc'])
|
|
|
82
82
|
</template>
|
|
83
83
|
|
|
84
84
|
<script setup>
|
|
85
|
-
import { SortPickerList } from
|
|
86
|
-
import { ref } from
|
|
85
|
+
import { SortPickerList } from "@empathyco/x-components/search";
|
|
86
|
+
import { ref } from "vue";
|
|
87
87
|
|
|
88
|
-
const selectedSort = ref(
|
|
89
|
-
const sortValues = ref([
|
|
88
|
+
const selectedSort = ref("Price asc");
|
|
89
|
+
const sortValues = ref(["Relevance", "Price asc", "Price desc"]);
|
|
90
90
|
</script>
|
|
91
91
|
```
|
|
92
92
|
|
|
@@ -100,9 +100,9 @@ The `buttonClass` prop can be used to add classes to the sort items.
|
|
|
100
100
|
</template>
|
|
101
101
|
|
|
102
102
|
<script setup>
|
|
103
|
-
import { SortPickerList } from
|
|
104
|
-
import { ref } from
|
|
103
|
+
import { SortPickerList } from "@empathyco/x-components/search";
|
|
104
|
+
import { ref } from "vue";
|
|
105
105
|
|
|
106
|
-
const sortValues = ref([
|
|
106
|
+
const sortValues = ref(["Relevance", "Price asc", "Price desc"]);
|
|
107
107
|
</script>
|
|
108
108
|
```
|
|
@@ -40,7 +40,7 @@ and `UserAcceptedSpellcheckQuery` events.
|
|
|
40
40
|
</template>
|
|
41
41
|
|
|
42
42
|
<script setup>
|
|
43
|
-
import { SpellcheckButton } from
|
|
43
|
+
import { SpellcheckButton } from "@empathyco/x-components/search";
|
|
44
44
|
</script>
|
|
45
45
|
```
|
|
46
46
|
|
|
@@ -58,6 +58,6 @@ import { SpellcheckButton } from '@empathyco/x-components/search'
|
|
|
58
58
|
</template>
|
|
59
59
|
|
|
60
60
|
<script setup>
|
|
61
|
-
import { SpellcheckButton } from
|
|
61
|
+
import { SpellcheckButton } from "@empathyco/x-components/search";
|
|
62
62
|
</script>
|
|
63
63
|
```
|
|
@@ -34,7 +34,7 @@ This two props should be show like a message comparing them.
|
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
36
|
<script setup>
|
|
37
|
-
import { Spellcheck } from
|
|
37
|
+
import { Spellcheck } from "@empathyco/x-components/search";
|
|
38
38
|
</script>
|
|
39
39
|
```
|
|
40
40
|
|
|
@@ -44,12 +44,14 @@ import { Spellcheck } from '@empathyco/x-components/search'
|
|
|
44
44
|
<template>
|
|
45
45
|
<Spellcheck>
|
|
46
46
|
<template #default="{ query, spellcheckedQuery }">
|
|
47
|
-
No results found for '{{ query }}'. We show you results for '{{
|
|
47
|
+
No results found for '{{ query }}'. We show you results for '{{
|
|
48
|
+
spellcheckedQuery
|
|
49
|
+
}}'
|
|
48
50
|
</template>
|
|
49
51
|
</Spellcheck>
|
|
50
52
|
</template>
|
|
51
53
|
|
|
52
54
|
<script setup>
|
|
53
|
-
import { Spellcheck } from
|
|
55
|
+
import { Spellcheck } from "@empathyco/x-components/search";
|
|
54
56
|
</script>
|
|
55
57
|
```
|
|
@@ -36,7 +36,10 @@ _Type any term in the input field and then click the Clear button to try it out!
|
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<script setup>
|
|
39
|
-
import {
|
|
39
|
+
import {
|
|
40
|
+
ClearSearchInput,
|
|
41
|
+
SearchInput,
|
|
42
|
+
} from "@empathyco/x-components/search-box";
|
|
40
43
|
</script>
|
|
41
44
|
```
|
|
42
45
|
|
|
@@ -53,7 +56,7 @@ _Click the icon button to try it out!_
|
|
|
53
56
|
</template>
|
|
54
57
|
|
|
55
58
|
<script setup>
|
|
56
|
-
import { ClearSearchInput } from
|
|
59
|
+
import { ClearSearchInput } from "@empathyco/x-components/search-box";
|
|
57
60
|
</script>
|
|
58
61
|
```
|
|
59
62
|
|
|
@@ -67,16 +70,18 @@ _Click the Clear button to try it out!_
|
|
|
67
70
|
```vue live
|
|
68
71
|
<template>
|
|
69
72
|
<div>
|
|
70
|
-
<ClearSearchInput @UserPressedClearSearchBoxButton="message = 'clear'"
|
|
73
|
+
<ClearSearchInput @UserPressedClearSearchBoxButton="message = 'clear'"
|
|
74
|
+
>Clear</ClearSearchInput
|
|
75
|
+
>
|
|
71
76
|
{{ message }}
|
|
72
77
|
</div>
|
|
73
78
|
</template>
|
|
74
79
|
|
|
75
80
|
<script setup>
|
|
76
|
-
import { ClearSearchInput } from
|
|
77
|
-
import { ref } from
|
|
81
|
+
import { ClearSearchInput } from "@empathyco/x-components/search-box";
|
|
82
|
+
import { ref } from "vue";
|
|
78
83
|
|
|
79
|
-
const message = ref(
|
|
84
|
+
const message = ref("");
|
|
80
85
|
</script>
|
|
81
86
|
```
|
|
82
87
|
|
|
@@ -97,6 +102,9 @@ _Type any term in the input field and then click the icon button to try it out!_
|
|
|
97
102
|
</template>
|
|
98
103
|
|
|
99
104
|
<script setup>
|
|
100
|
-
import {
|
|
105
|
+
import {
|
|
106
|
+
SearchInput,
|
|
107
|
+
ClearSearchInput,
|
|
108
|
+
} from "@empathyco/x-components/search-box";
|
|
101
109
|
</script>
|
|
102
110
|
```
|
|
@@ -44,7 +44,7 @@ _Click the Search button to try it out!_
|
|
|
44
44
|
</template>
|
|
45
45
|
|
|
46
46
|
<script setup>
|
|
47
|
-
import { SearchButton } from
|
|
47
|
+
import { SearchButton } from "@empathyco/x-components/search-box";
|
|
48
48
|
</script>
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -60,7 +60,7 @@ _Click the icon button to try it out!_
|
|
|
60
60
|
</template>
|
|
61
61
|
|
|
62
62
|
<script setup>
|
|
63
|
-
import { SearchButton } from
|
|
63
|
+
import { SearchButton } from "@empathyco/x-components/search-box";
|
|
64
64
|
</script>
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -78,8 +78,8 @@ _Type any term in the input field and then click the Search button to try it out
|
|
|
78
78
|
<SearchInput />
|
|
79
79
|
<SearchButton
|
|
80
80
|
@UserPressedSearchButton="
|
|
81
|
-
query => {
|
|
82
|
-
message = query
|
|
81
|
+
(query) => {
|
|
82
|
+
message = query;
|
|
83
83
|
}
|
|
84
84
|
"
|
|
85
85
|
/>
|
|
@@ -89,10 +89,10 @@ _Type any term in the input field and then click the Search button to try it out
|
|
|
89
89
|
</template>
|
|
90
90
|
|
|
91
91
|
<script setup>
|
|
92
|
-
import { SearchInput, SearchButton } from
|
|
93
|
-
import { ref } from
|
|
92
|
+
import { SearchInput, SearchButton } from "@empathyco/x-components/search-box";
|
|
93
|
+
import { ref } from "vue";
|
|
94
94
|
|
|
95
|
-
const message = ref(
|
|
95
|
+
const message = ref("");
|
|
96
96
|
</script>
|
|
97
97
|
```
|
|
98
98
|
|
|
@@ -112,7 +112,7 @@ _Type any term in the input field and then click the Search button to try it out
|
|
|
112
112
|
<SearchButton
|
|
113
113
|
@UserAcceptedAQuery="
|
|
114
114
|
() => {
|
|
115
|
-
message = 'looking for results'
|
|
115
|
+
message = 'looking for results';
|
|
116
116
|
}
|
|
117
117
|
"
|
|
118
118
|
>Search</SearchButton
|
|
@@ -123,9 +123,9 @@ _Type any term in the input field and then click the Search button to try it out
|
|
|
123
123
|
</template>
|
|
124
124
|
|
|
125
125
|
<script setup>
|
|
126
|
-
import { SearchButton, SearchInput } from
|
|
127
|
-
import { ref } from
|
|
126
|
+
import { SearchButton, SearchInput } from "@empathyco/x-components/search-box";
|
|
127
|
+
import { ref } from "vue";
|
|
128
128
|
|
|
129
|
-
const message = ref(
|
|
129
|
+
const message = ref("");
|
|
130
130
|
</script>
|
|
131
131
|
```
|
|
@@ -31,16 +31,19 @@ Here a basic example of how the animated search input placeholder is rendered.
|
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
33
|
<script setup>
|
|
34
|
-
import {
|
|
35
|
-
|
|
34
|
+
import {
|
|
35
|
+
SearchInput,
|
|
36
|
+
SearchInputPlaceholder,
|
|
37
|
+
} from "@empathyco/x-components/search-box";
|
|
38
|
+
import { ref } from "vue";
|
|
36
39
|
|
|
37
40
|
const placeholderMessages = ref([
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
])
|
|
41
|
+
"Find shirts",
|
|
42
|
+
"Find shoes",
|
|
43
|
+
"Find watches",
|
|
44
|
+
"Find handbags",
|
|
45
|
+
"Find sunglasses",
|
|
46
|
+
]);
|
|
44
47
|
</script>
|
|
45
48
|
```
|
|
46
49
|
|
|
@@ -62,15 +65,18 @@ input, showing the first message of the array the rest of the time.
|
|
|
62
65
|
</template>
|
|
63
66
|
|
|
64
67
|
<script setup>
|
|
65
|
-
import {
|
|
66
|
-
|
|
68
|
+
import {
|
|
69
|
+
SearchInput,
|
|
70
|
+
SearchInputPlaceholder,
|
|
71
|
+
} from "@empathyco/x-components/search-box";
|
|
72
|
+
import { ref } from "vue";
|
|
67
73
|
|
|
68
74
|
const placeholderMessages = ref([
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
])
|
|
75
|
+
"Find shirts",
|
|
76
|
+
"Find shoes",
|
|
77
|
+
"Find watches",
|
|
78
|
+
"Find handbags",
|
|
79
|
+
"Find sunglasses",
|
|
80
|
+
]);
|
|
75
81
|
</script>
|
|
76
82
|
```
|
|
@@ -48,7 +48,7 @@ _Type any term in the input field to try it out!_
|
|
|
48
48
|
</template>
|
|
49
49
|
|
|
50
50
|
<script setup>
|
|
51
|
-
import { SearchInput } from
|
|
51
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
52
52
|
</script>
|
|
53
53
|
```
|
|
54
54
|
|
|
@@ -62,11 +62,16 @@ _Type a term with more than 5 characters to try it out!_
|
|
|
62
62
|
|
|
63
63
|
```vue live
|
|
64
64
|
<template>
|
|
65
|
-
<SearchInput
|
|
65
|
+
<SearchInput
|
|
66
|
+
:maxLength="5"
|
|
67
|
+
:autofocus="false"
|
|
68
|
+
:instant="true"
|
|
69
|
+
:instantDebounceInMs="1000"
|
|
70
|
+
/>
|
|
66
71
|
</template>
|
|
67
72
|
|
|
68
73
|
<script setup>
|
|
69
|
-
import { SearchInput } from
|
|
74
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
70
75
|
</script>
|
|
71
76
|
```
|
|
72
77
|
|
|
@@ -99,16 +104,16 @@ _Type any term in the input field to try it out!_
|
|
|
99
104
|
@UserIsTypingAQuery="value = 'typing'"
|
|
100
105
|
/>
|
|
101
106
|
<strong>{{ value }}</strong>
|
|
102
|
-
<span>{{ hasFocus ?
|
|
107
|
+
<span>{{ hasFocus ? "focused" : "unfocused" }}</span>
|
|
103
108
|
</div>
|
|
104
109
|
</template>
|
|
105
110
|
|
|
106
111
|
<script setup>
|
|
107
|
-
import { SearchInput } from
|
|
108
|
-
import { ref } from
|
|
112
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
113
|
+
import { ref } from "vue";
|
|
109
114
|
|
|
110
|
-
const value = ref(
|
|
111
|
-
const hasFocus = ref(false)
|
|
115
|
+
const value = ref("");
|
|
116
|
+
const hasFocus = ref(false);
|
|
112
117
|
</script>
|
|
113
118
|
```
|
|
114
119
|
|
|
@@ -138,7 +143,11 @@ out!_
|
|
|
138
143
|
</template>
|
|
139
144
|
|
|
140
145
|
<script setup>
|
|
141
|
-
import {
|
|
142
|
-
|
|
146
|
+
import {
|
|
147
|
+
SearchInput,
|
|
148
|
+
ClearSearchInput,
|
|
149
|
+
SearchButton,
|
|
150
|
+
} from "@empathyco/x-components/search-box";
|
|
151
|
+
import { QuerySuggestions } from "@empathyco/x-components/query-suggestions";
|
|
143
152
|
</script>
|
|
144
153
|
```
|
|
@@ -29,7 +29,7 @@ By default, the `SemanticQueries` component will render a list of semantic queri
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script setup>
|
|
32
|
-
import { SemanticQueries } from
|
|
32
|
+
import { SemanticQueries } from "@empathyco/x-components/semantic-queries";
|
|
33
33
|
</script>
|
|
34
34
|
```
|
|
35
35
|
|
|
@@ -46,10 +46,10 @@ The component has the following props:
|
|
|
46
46
|
</template>
|
|
47
47
|
|
|
48
48
|
<script setup>
|
|
49
|
-
import { SemanticQueries } from
|
|
50
|
-
import { FadeAndSlide } from
|
|
49
|
+
import { SemanticQueries } from "@empathyco/x-components/semantic-queries";
|
|
50
|
+
import { FadeAndSlide } from "@empathyco/x-components";
|
|
51
51
|
|
|
52
|
-
const animation = FadeAndSlide
|
|
52
|
+
const animation = FadeAndSlide;
|
|
53
53
|
</script>
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -72,8 +72,8 @@ The default slot is used to overwrite the whole content of the component.
|
|
|
72
72
|
</template>
|
|
73
73
|
|
|
74
74
|
<script setup>
|
|
75
|
-
import { SemanticQueries } from
|
|
76
|
-
import { SlidingPanel } from
|
|
75
|
+
import { SemanticQueries } from "@empathyco/x-components/semantic-queries";
|
|
76
|
+
import { SlidingPanel } from "@empathyco/x-components";
|
|
77
77
|
</script>
|
|
78
78
|
```
|
|
79
79
|
|
|
@@ -89,7 +89,10 @@ semantic query to use it in another element.
|
|
|
89
89
|
<section>
|
|
90
90
|
<QueryPreviewList :queries="queries" #slot="{ query, results }">
|
|
91
91
|
<div>
|
|
92
|
-
<SemanticQuery
|
|
92
|
+
<SemanticQuery
|
|
93
|
+
:suggestion="findSemanticQuery(query)"
|
|
94
|
+
#default="{ suggestion }"
|
|
95
|
+
>
|
|
93
96
|
{{ suggestion.query }} ({{ suggestion.distance }})
|
|
94
97
|
</SemanticQuery>
|
|
95
98
|
<ul>
|
|
@@ -104,8 +107,11 @@ semantic query to use it in another element.
|
|
|
104
107
|
</template>
|
|
105
108
|
|
|
106
109
|
<script setup>
|
|
107
|
-
import {
|
|
108
|
-
|
|
110
|
+
import {
|
|
111
|
+
SemanticQueries,
|
|
112
|
+
SemanticQuery,
|
|
113
|
+
} from "@empathyco/x-components/semantic-queries";
|
|
114
|
+
import { QueryPreviewList } from "@empathyco/x-components/queries-preview";
|
|
109
115
|
</script>
|
|
110
116
|
```
|
|
111
117
|
|
|
@@ -126,7 +132,7 @@ In this example, the query will be rendered along with the distance.
|
|
|
126
132
|
</template>
|
|
127
133
|
|
|
128
134
|
<script setup>
|
|
129
|
-
import { SemanticQueries } from
|
|
135
|
+
import { SemanticQueries } from "@empathyco/x-components/semantic-queries";
|
|
130
136
|
</script>
|
|
131
137
|
```
|
|
132
138
|
|
|
@@ -146,6 +152,6 @@ SemanticQuery component internally.
|
|
|
146
152
|
</template>
|
|
147
153
|
|
|
148
154
|
<script setup>
|
|
149
|
-
import { SemanticQueries } from
|
|
155
|
+
import { SemanticQueries } from "@empathyco/x-components/semantic-queries";
|
|
150
156
|
</script>
|
|
151
157
|
```
|
|
@@ -41,13 +41,13 @@ Here you can see that the semantic query is rendered.
|
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script setup>
|
|
44
|
-
import { SemanticQuery } from
|
|
44
|
+
import { SemanticQuery } from "@empathyco/x-components/semantic-queries";
|
|
45
45
|
|
|
46
46
|
const semanticQuery = {
|
|
47
|
-
modelName:
|
|
48
|
-
query:
|
|
47
|
+
modelName: "SemanticQuery",
|
|
48
|
+
query: "jacket",
|
|
49
49
|
distance: 2,
|
|
50
|
-
}
|
|
50
|
+
};
|
|
51
51
|
</script>
|
|
52
52
|
```
|
|
53
53
|
|
|
@@ -59,17 +59,20 @@ In this example, we add the distance of the semantic query next to the query.
|
|
|
59
59
|
<template>
|
|
60
60
|
<SemanticQuery :suggestion="semanticQuery" #default="{ suggestion, query }">
|
|
61
61
|
<div>Original query: {{ query }}</div>
|
|
62
|
-
<div>
|
|
62
|
+
<div>
|
|
63
|
+
Suggested semantic query: {{ suggestion.query }} -
|
|
64
|
+
{{ suggestion.distance }}
|
|
65
|
+
</div>
|
|
63
66
|
</SemanticQuery>
|
|
64
67
|
</template>
|
|
65
68
|
|
|
66
69
|
<script setup>
|
|
67
|
-
import { SemanticQuery } from
|
|
70
|
+
import { SemanticQuery } from "@empathyco/x-components/semantic-queries";
|
|
68
71
|
|
|
69
72
|
const semanticQuery = {
|
|
70
|
-
modelName:
|
|
71
|
-
query:
|
|
73
|
+
modelName: "SemanticQuery",
|
|
74
|
+
query: "jacket",
|
|
72
75
|
distance: 2,
|
|
73
|
-
}
|
|
76
|
+
};
|
|
74
77
|
</script>
|
|
75
78
|
```
|
|
@@ -38,7 +38,7 @@ doesn't render elements to the DOM.
|
|
|
38
38
|
</template>
|
|
39
39
|
|
|
40
40
|
<script setup>
|
|
41
|
-
import { Tagging } from
|
|
41
|
+
import { Tagging } from "@empathyco/x-components/tagging";
|
|
42
42
|
</script>
|
|
43
43
|
```
|
|
44
44
|
|
|
@@ -55,11 +55,15 @@ will be used since `storageKey` default value is 'url'.
|
|
|
55
55
|
|
|
56
56
|
```vue
|
|
57
57
|
<template>
|
|
58
|
-
<Tagging
|
|
58
|
+
<Tagging
|
|
59
|
+
:consent="true"
|
|
60
|
+
:queryTaggingDebounceMs="300"
|
|
61
|
+
:sessionDurationMs="30000"
|
|
62
|
+
/>
|
|
59
63
|
</template>
|
|
60
64
|
|
|
61
65
|
<script setup>
|
|
62
|
-
import { Tagging } from
|
|
66
|
+
import { Tagging } from "@empathyco/x-components/tagging";
|
|
63
67
|
</script>
|
|
64
68
|
```
|
|
65
69
|
|
|
@@ -72,7 +76,7 @@ during 60 seconds and the product id will be used as storage key
|
|
|
72
76
|
</template>
|
|
73
77
|
|
|
74
78
|
<script setup>
|
|
75
|
-
import { Tagging } from
|
|
79
|
+
import { Tagging } from "@empathyco/x-components/tagging";
|
|
76
80
|
</script>
|
|
77
81
|
```
|
|
78
82
|
|
|
@@ -32,7 +32,7 @@ _Try to make some requests and take a look at the URL!_
|
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script setup>
|
|
35
|
-
import { UrlHandler } from
|
|
35
|
+
import { UrlHandler } from "@empathyco/x-components/url-handler";
|
|
36
36
|
</script>
|
|
37
37
|
```
|
|
38
38
|
|
|
@@ -53,7 +53,7 @@ _Try to make some requests and take a look at the URL!_
|
|
|
53
53
|
</template>
|
|
54
54
|
|
|
55
55
|
<script setup>
|
|
56
|
-
import { UrlHandler } from
|
|
56
|
+
import { UrlHandler } from "@empathyco/x-components/url-handler";
|
|
57
57
|
</script>
|
|
58
58
|
```
|
|
59
59
|
|