@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
|
@@ -43,13 +43,13 @@ content. By default, it renders the suggestion query of the popular search.
|
|
|
43
43
|
</template>
|
|
44
44
|
|
|
45
45
|
<script setup>
|
|
46
|
-
import { PopularSearch } from
|
|
47
|
-
import { ref } from
|
|
46
|
+
import { PopularSearch } from "@empathyco/x-components/popular-searches";
|
|
47
|
+
import { ref } from "vue";
|
|
48
48
|
const suggestion = ref({
|
|
49
|
-
modelName:
|
|
50
|
-
query:
|
|
49
|
+
modelName: "PopularSearch",
|
|
50
|
+
query: "tshirt",
|
|
51
51
|
facets: [],
|
|
52
|
-
})
|
|
52
|
+
});
|
|
53
53
|
</script>
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -66,13 +66,13 @@ const suggestion = ref({
|
|
|
66
66
|
</template>
|
|
67
67
|
|
|
68
68
|
<script setup>
|
|
69
|
-
import { PopularSearch } from
|
|
70
|
-
import { TrendingIcon } from
|
|
71
|
-
import { ref } from
|
|
69
|
+
import { PopularSearch } from "@empathyco/x-components/popular-searches";
|
|
70
|
+
import { TrendingIcon } from "@empathyco/x-components";
|
|
71
|
+
import { ref } from "vue";
|
|
72
72
|
const suggestion = ref({
|
|
73
|
-
modelName:
|
|
74
|
-
query:
|
|
73
|
+
modelName: "PopularSearch",
|
|
74
|
+
query: "tshirt",
|
|
75
75
|
facets: [],
|
|
76
|
-
})
|
|
76
|
+
});
|
|
77
77
|
</script>
|
|
78
78
|
```
|
|
@@ -41,7 +41,7 @@ searches it will show them.
|
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script setup>
|
|
44
|
-
import { PopularSearches } from
|
|
44
|
+
import { PopularSearches } from "@empathyco/x-components/popular-searches";
|
|
45
45
|
</script>
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -54,8 +54,8 @@ The component has two optional props. `animation` to render the component with a
|
|
|
54
54
|
</template>
|
|
55
55
|
|
|
56
56
|
<script setup>
|
|
57
|
-
import { PopularSearches } from
|
|
58
|
-
import FadeAndSlide from
|
|
57
|
+
import { PopularSearches } from "@empathyco/x-components/popular-searches";
|
|
58
|
+
import FadeAndSlide from "@empathyco/x-components/animations/fade-and-slide.vue";
|
|
59
59
|
</script>
|
|
60
60
|
```
|
|
61
61
|
|
|
@@ -76,8 +76,8 @@ query of the Popular Search's suggestion.
|
|
|
76
76
|
</template>
|
|
77
77
|
|
|
78
78
|
<script setup>
|
|
79
|
-
import { PopularSearches } from
|
|
80
|
-
import { TrendingIcon } from
|
|
79
|
+
import { PopularSearches } from "@empathyco/x-components/popular-searches";
|
|
80
|
+
import { TrendingIcon } from "@empathyco/x-components";
|
|
81
81
|
</script>
|
|
82
82
|
```
|
|
83
83
|
|
|
@@ -105,7 +105,10 @@ Search component.
|
|
|
105
105
|
</template>
|
|
106
106
|
|
|
107
107
|
<script setup>
|
|
108
|
-
import {
|
|
109
|
-
|
|
108
|
+
import {
|
|
109
|
+
PopularSearches,
|
|
110
|
+
PopularSearch,
|
|
111
|
+
} from "@empathyco/x-components/popular-searches";
|
|
112
|
+
import { TrendingIcon } from "@empathyco/x-components";
|
|
110
113
|
</script>
|
|
111
114
|
```
|
|
@@ -37,9 +37,9 @@ The component content has the query preview query as default.
|
|
|
37
37
|
</template>
|
|
38
38
|
|
|
39
39
|
<script setup>
|
|
40
|
-
import { QueryPreviewButton } from
|
|
41
|
-
import { reactive } from
|
|
42
|
-
const queryPreviewInfo = reactive({ query:
|
|
40
|
+
import { QueryPreviewButton } from "@empathyco/x-components/queries-preview";
|
|
41
|
+
import { reactive } from "vue";
|
|
42
|
+
const queryPreviewInfo = reactive({ query: "shoes" });
|
|
43
43
|
</script>
|
|
44
44
|
```
|
|
45
45
|
|
|
@@ -55,9 +55,9 @@ The content of the button is customizable via its default slot.
|
|
|
55
55
|
</template>
|
|
56
56
|
|
|
57
57
|
<script setup>
|
|
58
|
-
import { QueryPreviewButton } from
|
|
59
|
-
import { reactive } from
|
|
60
|
-
const queryPreviewInfo = reactive({ query:
|
|
58
|
+
import { QueryPreviewButton } from "@empathyco/x-components/queries-preview";
|
|
59
|
+
import { reactive } from "vue";
|
|
60
|
+
const queryPreviewInfo = reactive({ query: "shoes" });
|
|
61
61
|
</script>
|
|
62
62
|
```
|
|
63
63
|
|
|
@@ -40,13 +40,13 @@ names of the results.
|
|
|
40
40
|
</template>
|
|
41
41
|
|
|
42
42
|
<script setup>
|
|
43
|
-
import { QueryPreviewList } from
|
|
44
|
-
import { reactive } from
|
|
43
|
+
import { QueryPreviewList } from "@empathyco/x-components/queries-preview";
|
|
44
|
+
import { reactive } from "vue";
|
|
45
45
|
const queriesPreviewInfo = reactive([
|
|
46
|
-
{ query:
|
|
47
|
-
{ query:
|
|
48
|
-
{ query:
|
|
49
|
-
])
|
|
46
|
+
{ query: "sandals" },
|
|
47
|
+
{ query: "tshirt" },
|
|
48
|
+
{ query: "jacket" },
|
|
49
|
+
]);
|
|
50
50
|
</script>
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -61,7 +61,9 @@ In this example, the results will be rendered inside a sliding panel.
|
|
|
61
61
|
#default="{ queryPreviewInfo, totalResults, results }"
|
|
62
62
|
>
|
|
63
63
|
<div class="x-flex x-flex-col x-gap-8 x-mb-16">
|
|
64
|
-
<h1 class="x-title2">
|
|
64
|
+
<h1 class="x-title2">
|
|
65
|
+
{{ queryPreviewInfo.query }} ({{ totalResults }})
|
|
66
|
+
</h1>
|
|
65
67
|
<SlidingPanel :resetOnContentChange="false">
|
|
66
68
|
<div class="x-flex x-gap-8">
|
|
67
69
|
<Result
|
|
@@ -77,15 +79,15 @@ In this example, the results will be rendered inside a sliding panel.
|
|
|
77
79
|
</template>
|
|
78
80
|
|
|
79
81
|
<script setup>
|
|
80
|
-
import { QueryPreviewList } from
|
|
81
|
-
import SlidingPanel from
|
|
82
|
-
import Result from
|
|
83
|
-
import { reactive } from
|
|
82
|
+
import { QueryPreviewList } from "@empathyco/x-components/queries-preview";
|
|
83
|
+
import SlidingPanel from "@empathyco/x-components/sliding-panel.vue";
|
|
84
|
+
import Result from "@empathyco/x-components/result.vue";
|
|
85
|
+
import { reactive } from "vue";
|
|
84
86
|
const queriesPreviewInfo = reactive([
|
|
85
|
-
{ query:
|
|
86
|
-
{ query:
|
|
87
|
-
{ query:
|
|
88
|
-
])
|
|
87
|
+
{ query: "sandals" },
|
|
88
|
+
{ query: "tshirt" },
|
|
89
|
+
{ query: "jacket" },
|
|
90
|
+
]);
|
|
89
91
|
</script>
|
|
90
92
|
```
|
|
91
93
|
|
|
@@ -108,12 +110,12 @@ In this example, the ID of the results will be rendered along with the name.
|
|
|
108
110
|
</template>
|
|
109
111
|
|
|
110
112
|
<script setup>
|
|
111
|
-
import { QueryPreviewList } from
|
|
112
|
-
import { reactive } from
|
|
113
|
+
import { QueryPreviewList } from "@empathyco/x-components/queries-preview";
|
|
114
|
+
import { reactive } from "vue";
|
|
113
115
|
const queriesPreviewInfo = reactive([
|
|
114
|
-
{ query:
|
|
115
|
-
{ query:
|
|
116
|
-
{ query:
|
|
117
|
-
])
|
|
116
|
+
{ query: "sandals" },
|
|
117
|
+
{ query: "tshirt" },
|
|
118
|
+
{ query: "jacket" },
|
|
119
|
+
]);
|
|
118
120
|
</script>
|
|
119
121
|
```
|
|
@@ -61,9 +61,9 @@ results.
|
|
|
61
61
|
</template>
|
|
62
62
|
|
|
63
63
|
<script setup>
|
|
64
|
-
import { QueryPreview } from
|
|
65
|
-
import { reactive } from
|
|
66
|
-
const queryPreviewInfo = reactive({ query:
|
|
64
|
+
import { QueryPreview } from "@empathyco/x-components/queries-preview";
|
|
65
|
+
import { reactive } from "vue";
|
|
66
|
+
const queryPreviewInfo = reactive({ query: "sandals" });
|
|
67
67
|
</script>
|
|
68
68
|
```
|
|
69
69
|
|
|
@@ -73,7 +73,10 @@ In this example, the results will be rendered inside a sliding panel.
|
|
|
73
73
|
|
|
74
74
|
```vue live
|
|
75
75
|
<template>
|
|
76
|
-
<QueryPreview
|
|
76
|
+
<QueryPreview
|
|
77
|
+
:queryPreviewInfo="queryPreviewInfo"
|
|
78
|
+
#default="{ totalResults, results }"
|
|
79
|
+
>
|
|
77
80
|
<section>
|
|
78
81
|
<p>Total results: {{ totalResults }}</p>
|
|
79
82
|
<SlidingPanel :resetOnContentChange="false">
|
|
@@ -98,10 +101,14 @@ In this example, the results will be rendered inside a sliding panel.
|
|
|
98
101
|
</template>
|
|
99
102
|
|
|
100
103
|
<script setup>
|
|
101
|
-
import { QueryPreview } from
|
|
102
|
-
import {
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
import { QueryPreview } from "@empathyco/x-components/queries-preview";
|
|
105
|
+
import {
|
|
106
|
+
BaseResultImage,
|
|
107
|
+
BaseResultLink,
|
|
108
|
+
SlidingPanel,
|
|
109
|
+
} from "@empathyco/x-components";
|
|
110
|
+
import { reactive } from "vue";
|
|
111
|
+
const queryPreviewInfo = reactive({ query: "flip-flops" });
|
|
105
112
|
</script>
|
|
106
113
|
```
|
|
107
114
|
|
|
@@ -120,9 +127,9 @@ In this example, the ID of the results will be rendered along with the name.
|
|
|
120
127
|
</template>
|
|
121
128
|
|
|
122
129
|
<script setup>
|
|
123
|
-
import { QueryPreview } from
|
|
124
|
-
import { reactive } from
|
|
125
|
-
const queryPreviewInfo = reactive({ query:
|
|
130
|
+
import { QueryPreview } from "@empathyco/x-components/queries-preview";
|
|
131
|
+
import { reactive } from "vue";
|
|
132
|
+
const queryPreviewInfo = reactive({ query: "flip-flops" });
|
|
126
133
|
</script>
|
|
127
134
|
```
|
|
128
135
|
|
|
@@ -146,10 +153,14 @@ In this example, the query preview has been limited to render a maximum of 4 res
|
|
|
146
153
|
</template>
|
|
147
154
|
|
|
148
155
|
<script setup>
|
|
149
|
-
import {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
156
|
+
import {
|
|
157
|
+
BaseGrid,
|
|
158
|
+
BaseResultImage,
|
|
159
|
+
BaseResultLink,
|
|
160
|
+
} from "@empathyco/x-components";
|
|
161
|
+
import { QueryPreview } from "@empathyco/x-components/queries-preview";
|
|
162
|
+
import { reactive } from "vue";
|
|
163
|
+
const maxItemsToRender = 4;
|
|
164
|
+
const queryPreviewInfo = reactive({ query: "flip-flops" });
|
|
154
165
|
</script>
|
|
155
166
|
```
|
|
@@ -47,13 +47,13 @@ Here you can see how a single query suggestion is rendered using the `suggestion
|
|
|
47
47
|
</template>
|
|
48
48
|
|
|
49
49
|
<script setup>
|
|
50
|
-
import { QuerySuggestion } from
|
|
51
|
-
import { ref } from
|
|
50
|
+
import { QuerySuggestion } from "@empathyco/x-components/query-suggestions";
|
|
51
|
+
import { ref } from "vue";
|
|
52
52
|
const suggestion = ref({
|
|
53
|
-
modelName:
|
|
54
|
-
query:
|
|
53
|
+
modelName: "QuerySuggestion",
|
|
54
|
+
query: "tshirt",
|
|
55
55
|
facets: [],
|
|
56
|
-
})
|
|
56
|
+
});
|
|
57
57
|
</script>
|
|
58
58
|
```
|
|
59
59
|
|
|
@@ -70,13 +70,13 @@ In this example, we are adding an emoji next to the suggestion.
|
|
|
70
70
|
</template>
|
|
71
71
|
|
|
72
72
|
<script setup>
|
|
73
|
-
import { QuerySuggestion } from
|
|
74
|
-
import { ref } from
|
|
73
|
+
import { QuerySuggestion } from "@empathyco/x-components/query-suggestions";
|
|
74
|
+
import { ref } from "vue";
|
|
75
75
|
const suggestion = ref({
|
|
76
|
-
modelName:
|
|
77
|
-
query:
|
|
76
|
+
modelName: "QuerySuggestion",
|
|
77
|
+
query: "tshirt",
|
|
78
78
|
facets: [],
|
|
79
|
-
})
|
|
79
|
+
});
|
|
80
80
|
</script>
|
|
81
81
|
```
|
|
82
82
|
|
|
@@ -87,19 +87,22 @@ the `UserSelectedAQuerySuggestion` event has been triggered.
|
|
|
87
87
|
|
|
88
88
|
```vue live
|
|
89
89
|
<template>
|
|
90
|
-
<QuerySuggestion
|
|
90
|
+
<QuerySuggestion
|
|
91
|
+
:suggestion="suggestion"
|
|
92
|
+
@UserSelectedAQuerySuggestion="alertSuggestion"
|
|
93
|
+
/>
|
|
91
94
|
</template>
|
|
92
95
|
|
|
93
96
|
<script setup>
|
|
94
|
-
import { QuerySuggestion } from
|
|
95
|
-
import { ref } from
|
|
97
|
+
import { QuerySuggestion } from "@empathyco/x-components/query-suggestions";
|
|
98
|
+
import { ref } from "vue";
|
|
96
99
|
const suggestion = ref({
|
|
97
|
-
modelName:
|
|
98
|
-
query:
|
|
100
|
+
modelName: "QuerySuggestion",
|
|
101
|
+
query: "tshirt",
|
|
99
102
|
facets: [],
|
|
100
|
-
})
|
|
103
|
+
});
|
|
101
104
|
function alertSuggestion(querySuggestion) {
|
|
102
|
-
alert(`You have clicked the query suggestion: ${querySuggestion.query}`)
|
|
105
|
+
alert(`You have clicked the query suggestion: ${querySuggestion.query}`);
|
|
103
106
|
}
|
|
104
107
|
</script>
|
|
105
108
|
```
|
|
@@ -49,8 +49,8 @@ _Type “sandal” or another fashion term in the input field to try it out!_
|
|
|
49
49
|
</template>
|
|
50
50
|
|
|
51
51
|
<script setup>
|
|
52
|
-
import { QuerySuggestions } from
|
|
53
|
-
import { SearchInput } from
|
|
52
|
+
import { QuerySuggestions } from "@empathyco/x-components/query-suggestions";
|
|
53
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
54
54
|
</script>
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -68,10 +68,10 @@ _Type “lipstick” or another fashion term in the input field to try it out!_
|
|
|
68
68
|
</template>
|
|
69
69
|
|
|
70
70
|
<script>
|
|
71
|
-
import Vue from
|
|
72
|
-
import { QuerySuggestions } from
|
|
73
|
-
import { SearchInput } from
|
|
74
|
-
import StaggeredFadeAndSlide from
|
|
71
|
+
import Vue from "vue";
|
|
72
|
+
import { QuerySuggestions } from "@empathyco/x-components/query-suggestions";
|
|
73
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
74
|
+
import StaggeredFadeAndSlide from "@empathyco/x-components/animations/staggered-fade-and-slide.vue";
|
|
75
75
|
</script>
|
|
76
76
|
```
|
|
77
77
|
|
|
@@ -93,8 +93,11 @@ _Type “bag” or another fashion term in the input field to try it out!_
|
|
|
93
93
|
</template>
|
|
94
94
|
|
|
95
95
|
<script setup>
|
|
96
|
-
import {
|
|
97
|
-
|
|
96
|
+
import {
|
|
97
|
+
QuerySuggestion,
|
|
98
|
+
QuerySuggestions,
|
|
99
|
+
} from "@empathyco/x-components/query-suggestions";
|
|
100
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
98
101
|
</script>
|
|
99
102
|
```
|
|
100
103
|
|
|
@@ -156,9 +159,9 @@ _Type “trousers” or another toy in the input field to try it out!_
|
|
|
156
159
|
</template>
|
|
157
160
|
|
|
158
161
|
<script setup>
|
|
159
|
-
import { QuerySuggestions } from
|
|
160
|
-
import { SearchInput } from
|
|
161
|
-
import { Highlight } from
|
|
162
|
+
import { QuerySuggestions } from "@empathyco/x-components/query-suggestions";
|
|
163
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
164
|
+
import { Highlight } from "@empathyco/x-components";
|
|
162
165
|
</script>
|
|
163
166
|
```
|
|
164
167
|
|
|
@@ -179,7 +182,7 @@ _Type “pants” or another toy in the input field to try it out!_
|
|
|
179
182
|
</template>
|
|
180
183
|
|
|
181
184
|
<script setup>
|
|
182
|
-
import { QuerySuggestions } from
|
|
183
|
-
import { SearchInput } from
|
|
185
|
+
import { QuerySuggestions } from "@empathyco/x-components/query-suggestions";
|
|
186
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
184
187
|
</script>
|
|
185
188
|
```
|
|
@@ -58,13 +58,15 @@ modules such as the `tagging` one.
|
|
|
58
58
|
/>
|
|
59
59
|
<span class="x-recommendations__title">{{ recommendation.name }}</span>
|
|
60
60
|
</BaseResultLink>
|
|
61
|
-
<BaseResultAddToCart :result="recommendation"
|
|
61
|
+
<BaseResultAddToCart :result="recommendation"
|
|
62
|
+
>Add to cart</BaseResultAddToCart
|
|
63
|
+
>
|
|
62
64
|
</Recommendations>
|
|
63
65
|
</template>
|
|
64
66
|
|
|
65
67
|
<script setup>
|
|
66
|
-
import { Recommendations } from
|
|
67
|
-
import { BaseResultLink, BaseResultAddToCart } from
|
|
68
|
+
import { Recommendations } from "@empathyco/x-components/recommendations";
|
|
69
|
+
import { BaseResultLink, BaseResultAddToCart } from "@empathyco/x-components";
|
|
68
70
|
</script>
|
|
69
71
|
```
|
|
70
72
|
|
|
@@ -88,14 +90,16 @@ In this example, the component will render a maximum of 4 result recommendations
|
|
|
88
90
|
/>
|
|
89
91
|
<span class="x-recommendations__title">{{ recommendation.name }}</span>
|
|
90
92
|
</BaseResultLink>
|
|
91
|
-
<BaseResultAddToCart :result="recommendation"
|
|
93
|
+
<BaseResultAddToCart :result="recommendation"
|
|
94
|
+
>Add to cart</BaseResultAddToCart
|
|
95
|
+
>
|
|
92
96
|
</Recommendations>
|
|
93
97
|
</template>
|
|
94
98
|
|
|
95
99
|
<script setup>
|
|
96
|
-
import { Recommendations } from
|
|
97
|
-
import { BaseResultLink, BaseResultAddToCart } from
|
|
98
|
-
import StaggeredFadeAndSlide from
|
|
100
|
+
import { Recommendations } from "@empathyco/x-components/recommendations";
|
|
101
|
+
import { BaseResultLink, BaseResultAddToCart } from "@empathyco/x-components";
|
|
102
|
+
import StaggeredFadeAndSlide from "@empathyco/x-components/animations/staggered-fade-and-slide.vue";
|
|
99
103
|
</script>
|
|
100
104
|
```
|
|
101
105
|
|
|
@@ -114,22 +118,29 @@ layout you want using the `layout` slot.
|
|
|
114
118
|
v-for="recommendation in recommendations"
|
|
115
119
|
:key="recommendation.id"
|
|
116
120
|
>
|
|
117
|
-
<BaseResultLink
|
|
121
|
+
<BaseResultLink
|
|
122
|
+
:result="recommendation"
|
|
123
|
+
class="x-recommendations__link"
|
|
124
|
+
>
|
|
118
125
|
<img
|
|
119
126
|
:src="recommendation.images[0]"
|
|
120
127
|
:alt="recommendation.name"
|
|
121
128
|
class="x-recommendations__image"
|
|
122
129
|
/>
|
|
123
|
-
<span class="x-recommendations__title">{{
|
|
130
|
+
<span class="x-recommendations__title">{{
|
|
131
|
+
recommendation.name
|
|
132
|
+
}}</span>
|
|
124
133
|
</BaseResultLink>
|
|
125
|
-
<BaseResultAddToCart :result="recommendation"
|
|
134
|
+
<BaseResultAddToCart :result="recommendation"
|
|
135
|
+
>Add to cart</BaseResultAddToCart
|
|
136
|
+
>
|
|
126
137
|
</article>
|
|
127
138
|
</div>
|
|
128
139
|
</Recommendations>
|
|
129
140
|
</template>
|
|
130
141
|
|
|
131
142
|
<script setup>
|
|
132
|
-
import { Recommendations } from
|
|
133
|
-
import { BaseResultLink, BaseResultAddToCart } from
|
|
143
|
+
import { Recommendations } from "@empathyco/x-components/recommendations";
|
|
144
|
+
import { BaseResultLink, BaseResultAddToCart } from "@empathyco/x-components";
|
|
134
145
|
</script>
|
|
135
146
|
```
|
|
@@ -31,14 +31,14 @@ This component shows a suggested related prompt.
|
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
33
|
<script setup>
|
|
34
|
-
import { RelatedPrompt } from
|
|
35
|
-
import { ref } from
|
|
34
|
+
import { RelatedPrompt } from "@empathyco/x-components/related-prompts";
|
|
35
|
+
import { ref } from "vue";
|
|
36
36
|
|
|
37
37
|
const relatedPrompt = ref({
|
|
38
|
-
suggestionText:
|
|
39
|
-
suggestionImageUrl:
|
|
40
|
-
nextQueries: [
|
|
41
|
-
})
|
|
38
|
+
suggestionText: "Try shoes",
|
|
39
|
+
suggestionImageUrl: "https://via.placeholder.com/56",
|
|
40
|
+
nextQueries: ["shoes"],
|
|
41
|
+
});
|
|
42
42
|
</script>
|
|
43
43
|
```
|
|
44
44
|
|
|
@@ -54,13 +54,13 @@ const relatedPrompt = ref({
|
|
|
54
54
|
</template>
|
|
55
55
|
|
|
56
56
|
<script setup>
|
|
57
|
-
import { RelatedPrompt } from
|
|
58
|
-
import { ref } from
|
|
57
|
+
import { RelatedPrompt } from "@empathyco/x-components/related-prompts";
|
|
58
|
+
import { ref } from "vue";
|
|
59
59
|
|
|
60
60
|
const relatedPrompt = ref({
|
|
61
|
-
suggestionText:
|
|
62
|
-
suggestionImageUrl:
|
|
63
|
-
nextQueries: [
|
|
64
|
-
})
|
|
61
|
+
suggestionText: "Try bags",
|
|
62
|
+
suggestionImageUrl: "",
|
|
63
|
+
nextQueries: ["bags"],
|
|
64
|
+
});
|
|
65
65
|
</script>
|
|
66
66
|
```
|
|
@@ -41,9 +41,9 @@ the results list.
|
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script setup>
|
|
44
|
-
import { RelatedPromptsList } from
|
|
45
|
-
import { ResultsList } from
|
|
46
|
-
import { SearchInput } from
|
|
44
|
+
import { RelatedPromptsList } from "@empathyco/x-components/related-prompts";
|
|
45
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
46
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
47
47
|
</script>
|
|
48
48
|
```
|
|
49
49
|
|
|
@@ -71,9 +71,9 @@ Each group can contain up to `6` related prompts (`maxRelatedPromptsPerGroup`).
|
|
|
71
71
|
</template>
|
|
72
72
|
|
|
73
73
|
<script setup>
|
|
74
|
-
import { RelatedPromptsList } from
|
|
75
|
-
import { ResultsList } from
|
|
76
|
-
import { SearchInput } from
|
|
74
|
+
import { RelatedPromptsList } from "@empathyco/x-components/related-prompts";
|
|
75
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
76
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
77
77
|
</script>
|
|
78
78
|
```
|
|
79
79
|
|
|
@@ -100,9 +100,9 @@ In the following example, related prompts will be displayed regardless of the nu
|
|
|
100
100
|
</template>
|
|
101
101
|
|
|
102
102
|
<script setup>
|
|
103
|
-
import { RelatedPromptsList } from
|
|
104
|
-
import { ResultsList } from
|
|
105
|
-
import { SearchInput } from
|
|
103
|
+
import { RelatedPromptsList } from "@empathyco/x-components/related-prompts";
|
|
104
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
105
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
106
106
|
</script>
|
|
107
107
|
```
|
|
108
108
|
|
|
@@ -144,9 +144,9 @@ the `BaseGrid` component. To do so, you can use the `default` slot as follows:
|
|
|
144
144
|
</template>
|
|
145
145
|
|
|
146
146
|
<script setup>
|
|
147
|
-
import { RelatedPromptsList } from
|
|
148
|
-
import { ResultsList } from
|
|
149
|
-
import { SearchInput } from
|
|
150
|
-
import { BaseGrid } from
|
|
147
|
+
import { RelatedPromptsList } from "@empathyco/x-components/related-prompts";
|
|
148
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
149
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
150
|
+
import { BaseGrid } from "@empathyco/x-components";
|
|
151
151
|
</script>
|
|
152
152
|
```
|
package/docs/API-reference/components/related-prompts/x-components.related-prompts-tag-list.md
CHANGED
|
@@ -41,7 +41,7 @@ necessary to handle the selection of the related prompt and to trigger the stagg
|
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script setup>
|
|
44
|
-
import { RelatedPromptsTagList } from
|
|
44
|
+
import { RelatedPromptsTagList } from "@empathyco/x-components/related-prompts";
|
|
45
45
|
</script>
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -49,11 +49,14 @@ import { RelatedPromptsTagList } from '@empathyco/x-components/related-prompts'
|
|
|
49
49
|
|
|
50
50
|
```vue live
|
|
51
51
|
<template>
|
|
52
|
-
<RelatedPromptsTagList
|
|
52
|
+
<RelatedPromptsTagList
|
|
53
|
+
:tagColors="['x-bg-neutral-50', 'x-bg-lead-50']"
|
|
54
|
+
tagClass="rounded"
|
|
55
|
+
/>
|
|
53
56
|
</template>
|
|
54
57
|
|
|
55
58
|
<script setup>
|
|
56
|
-
import { RelatedPromptsTagList } from
|
|
59
|
+
import { RelatedPromptsTagList } from "@empathyco/x-components/related-prompts";
|
|
57
60
|
</script>
|
|
58
61
|
```
|
|
59
62
|
|
|
@@ -71,7 +74,7 @@ import { RelatedPromptsTagList } from '@empathyco/x-components/related-prompts'
|
|
|
71
74
|
</template>
|
|
72
75
|
|
|
73
76
|
<script setup>
|
|
74
|
-
import { RelatedPromptsTagList } from
|
|
77
|
+
import { RelatedPromptsTagList } from "@empathyco/x-components/related-prompts";
|
|
75
78
|
</script>
|
|
76
79
|
```
|
|
77
80
|
|
|
@@ -87,6 +90,6 @@ import { RelatedPromptsTagList } from '@empathyco/x-components/related-prompts'
|
|
|
87
90
|
</template>
|
|
88
91
|
|
|
89
92
|
<script setup>
|
|
90
|
-
import { RelatedPromptsTagList } from
|
|
93
|
+
import { RelatedPromptsTagList } from "@empathyco/x-components/related-prompts";
|
|
91
94
|
</script>
|
|
92
95
|
```
|