@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
|
@@ -39,10 +39,13 @@ The component exposes a single default slot, where you can add icons or text.
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script setup>
|
|
42
|
-
import { SearchInput } from
|
|
43
|
-
import {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
43
|
+
import {
|
|
44
|
+
HistoryQueries,
|
|
45
|
+
ClearHistoryQueries,
|
|
46
|
+
} from "@empathyco/x-components/history-queries";
|
|
47
|
+
import { FadeAndSlide } from "@empathyco/x-components";
|
|
48
|
+
|
|
49
|
+
const animation = FadeAndSlide;
|
|
47
50
|
</script>
|
|
48
51
|
```
|
package/docs/API-reference/components/history-queries/x-components.history-queries-switch.md
CHANGED
|
@@ -34,7 +34,7 @@ _Try clicking it to see how it changes its state_
|
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
36
|
<script setup>
|
|
37
|
-
import { HistoryQueriesSwitch } from
|
|
37
|
+
import { HistoryQueriesSwitch } from "@empathyco/x-components/history-queries";
|
|
38
38
|
</script>
|
|
39
39
|
```
|
|
40
40
|
|
|
@@ -60,18 +60,21 @@ Here you have a more complex example.
|
|
|
60
60
|
</template>
|
|
61
61
|
|
|
62
62
|
<script setup>
|
|
63
|
-
import { BaseEventButton, BaseEventsModal } from
|
|
64
|
-
import {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
import { BaseEventButton, BaseEventsModal } from "@empathyco/x-components";
|
|
64
|
+
import {
|
|
65
|
+
HistoryQueriesSwitch,
|
|
66
|
+
HistoryQueries,
|
|
67
|
+
} from "@empathyco/x-components/history-queries";
|
|
68
|
+
import { SearchInput, SearchButton } from "@empathyco/x-components/search-box";
|
|
69
|
+
import { ref } from "vue";
|
|
70
|
+
|
|
71
|
+
const eventsToOpenModal = ref(["UserClickedDisableHistoryQueries"]);
|
|
69
72
|
const disableEvents = ref({
|
|
70
73
|
UserClickedConfirmDisableHistoryQueries: undefined,
|
|
71
74
|
UserClickedCloseEventsModal: undefined,
|
|
72
|
-
})
|
|
75
|
+
});
|
|
73
76
|
const cancelEvents = ref({
|
|
74
77
|
UserClickedCloseEventsModal: undefined,
|
|
75
|
-
})
|
|
78
|
+
});
|
|
76
79
|
</script>
|
|
77
80
|
```
|
|
@@ -45,8 +45,8 @@ Here you have a basic example of how the HistoryQueries is rendered.
|
|
|
45
45
|
</template>
|
|
46
46
|
|
|
47
47
|
<script setup>
|
|
48
|
-
import { SearchInput } from
|
|
49
|
-
import { HistoryQueries } from
|
|
48
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
49
|
+
import { HistoryQueries } from "@empathyco/x-components/history-queries";
|
|
50
50
|
</script>
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -64,8 +64,8 @@ it is 5).
|
|
|
64
64
|
</template>
|
|
65
65
|
|
|
66
66
|
<script setup>
|
|
67
|
-
import { SearchInput } from
|
|
68
|
-
import { HistoryQueries } from
|
|
67
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
68
|
+
import { HistoryQueries } from "@empathyco/x-components/history-queries";
|
|
69
69
|
</script>
|
|
70
70
|
```
|
|
71
71
|
|
|
@@ -80,11 +80,11 @@ import { HistoryQueries } from '@empathyco/x-components/history-queries'
|
|
|
80
80
|
</template>
|
|
81
81
|
|
|
82
82
|
<script setup>
|
|
83
|
-
import { SearchInput } from
|
|
84
|
-
import { HistoryQueries } from
|
|
85
|
-
import { FadeAndSlide } from
|
|
83
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
84
|
+
import { HistoryQueries } from "@empathyco/x-components/history-queries";
|
|
85
|
+
import { FadeAndSlide } from "@empathyco/x-components";
|
|
86
86
|
|
|
87
|
-
const animation = FadeAndSlide
|
|
87
|
+
const animation = FadeAndSlide;
|
|
88
88
|
</script>
|
|
89
89
|
```
|
|
90
90
|
|
|
@@ -104,8 +104,11 @@ In this example, the [`HistoryQuery`](./x-components.history-query.md) component
|
|
|
104
104
|
</template>
|
|
105
105
|
|
|
106
106
|
<script setup>
|
|
107
|
-
import { SearchInput } from
|
|
108
|
-
import {
|
|
107
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
108
|
+
import {
|
|
109
|
+
HistoryQueries,
|
|
110
|
+
HistoryQuery,
|
|
111
|
+
} from "@empathyco/x-components/history-queries";
|
|
109
112
|
</script>
|
|
110
113
|
```
|
|
111
114
|
|
|
@@ -126,8 +129,8 @@ passed.
|
|
|
126
129
|
</template>
|
|
127
130
|
|
|
128
131
|
<script setup>
|
|
129
|
-
import { SearchInput } from
|
|
130
|
-
import { HistoryQueries } from
|
|
132
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
133
|
+
import { HistoryQueries } from "@empathyco/x-components/history-queries";
|
|
131
134
|
</script>
|
|
132
135
|
```
|
|
133
136
|
|
|
@@ -148,8 +151,8 @@ icon to remove the history query.
|
|
|
148
151
|
</template>
|
|
149
152
|
|
|
150
153
|
<script setup>
|
|
151
|
-
import { SearchInput } from
|
|
152
|
-
import { HistoryQueries } from
|
|
153
|
-
import { CrossIcon } from
|
|
154
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
155
|
+
import { HistoryQueries } from "@empathyco/x-components/history-queries";
|
|
156
|
+
import { CrossIcon } from "@empathyco/x-components";
|
|
154
157
|
</script>
|
|
155
158
|
```
|
|
@@ -51,14 +51,14 @@ This component only requires a prop called `suggestion`.
|
|
|
51
51
|
</template>
|
|
52
52
|
|
|
53
53
|
<script setup>
|
|
54
|
-
import { HistoryQuery } from
|
|
55
|
-
import { ref } from
|
|
54
|
+
import { HistoryQuery } from "@empathyco/x-components/history-queries";
|
|
55
|
+
import { ref } from "vue";
|
|
56
56
|
|
|
57
57
|
const suggestion = ref({
|
|
58
|
-
modelName:
|
|
59
|
-
query:
|
|
58
|
+
modelName: "HistoryQuery",
|
|
59
|
+
query: "trousers",
|
|
60
60
|
facets: [],
|
|
61
|
-
})
|
|
61
|
+
});
|
|
62
62
|
</script>
|
|
63
63
|
```
|
|
64
64
|
|
|
@@ -87,15 +87,15 @@ that serves to remove this query from the history. This slot only has one proper
|
|
|
87
87
|
</template>
|
|
88
88
|
|
|
89
89
|
<script setup>
|
|
90
|
-
import { HistoryQuery } from
|
|
91
|
-
import { HistoryIcon, CrossIcon, Highlight } from
|
|
92
|
-
import { ref } from
|
|
90
|
+
import { HistoryQuery } from "@empathyco/x-components/history-queries";
|
|
91
|
+
import { HistoryIcon, CrossIcon, Highlight } from "@empathyco/x-components";
|
|
92
|
+
import { ref } from "vue";
|
|
93
93
|
|
|
94
94
|
const suggestion = ref({
|
|
95
|
-
modelName:
|
|
96
|
-
query:
|
|
95
|
+
modelName: "HistoryQuery",
|
|
96
|
+
query: "trousers",
|
|
97
97
|
facets: [],
|
|
98
|
-
})
|
|
98
|
+
});
|
|
99
99
|
</script>
|
|
100
100
|
```
|
|
101
101
|
|
|
@@ -109,14 +109,14 @@ The `suggestionClass` prop can be used to add classes to the history query sugge
|
|
|
109
109
|
</template>
|
|
110
110
|
|
|
111
111
|
<script setup>
|
|
112
|
-
import { HistoryQuery } from
|
|
113
|
-
import { ref } from
|
|
112
|
+
import { HistoryQuery } from "@empathyco/x-components/history-queries";
|
|
113
|
+
import { ref } from "vue";
|
|
114
114
|
|
|
115
115
|
const suggestion = ref({
|
|
116
|
-
modelName:
|
|
117
|
-
query:
|
|
116
|
+
modelName: "HistoryQuery",
|
|
117
|
+
query: "trousers",
|
|
118
118
|
facets: [],
|
|
119
|
-
})
|
|
119
|
+
});
|
|
120
120
|
</script>
|
|
121
121
|
```
|
|
122
122
|
|
|
@@ -128,13 +128,13 @@ The `removeButtonClass` prop can be used to add classes to the remove history qu
|
|
|
128
128
|
</template>
|
|
129
129
|
|
|
130
130
|
<script setup>
|
|
131
|
-
import { HistoryQuery } from
|
|
132
|
-
import { ref } from
|
|
131
|
+
import { HistoryQuery } from "@empathyco/x-components/history-queries";
|
|
132
|
+
import { ref } from "vue";
|
|
133
133
|
|
|
134
134
|
const suggestion = ref({
|
|
135
|
-
modelName:
|
|
136
|
-
query:
|
|
135
|
+
modelName: "HistoryQuery",
|
|
136
|
+
query: "trousers",
|
|
137
137
|
facets: [],
|
|
138
|
-
})
|
|
138
|
+
});
|
|
139
139
|
</script>
|
|
140
140
|
```
|
|
@@ -40,7 +40,7 @@ Here you have a basic example of how the MyHistory is rendered.
|
|
|
40
40
|
</template>
|
|
41
41
|
|
|
42
42
|
<script setup>
|
|
43
|
-
import { MyHistory } from
|
|
43
|
+
import { MyHistory } from "@empathyco/x-components/history-queries";
|
|
44
44
|
</script>
|
|
45
45
|
```
|
|
46
46
|
|
|
@@ -54,7 +54,7 @@ In this example, the my history has been configured to use the 'es' locale.
|
|
|
54
54
|
</template>
|
|
55
55
|
|
|
56
56
|
<script setup>
|
|
57
|
-
import { MyHistory } from
|
|
57
|
+
import { MyHistory } from "@empathyco/x-components/history-queries";
|
|
58
58
|
</script>
|
|
59
59
|
```
|
|
60
60
|
|
|
@@ -66,10 +66,10 @@ import { MyHistory } from '@empathyco/x-components/history-queries'
|
|
|
66
66
|
</template>
|
|
67
67
|
|
|
68
68
|
<script setup>
|
|
69
|
-
import { MyHistory } from
|
|
70
|
-
import { FadeAndSlide } from
|
|
69
|
+
import { MyHistory } from "@empathyco/x-components/history-queries";
|
|
70
|
+
import { FadeAndSlide } from "@empathyco/x-components";
|
|
71
71
|
|
|
72
|
-
const animation = FadeAndSlide
|
|
72
|
+
const animation = FadeAndSlide;
|
|
73
73
|
</script>
|
|
74
74
|
```
|
|
75
75
|
|
|
@@ -86,7 +86,10 @@ In this example, the [`HistoryQuery`](./x-components.history-query.md) component
|
|
|
86
86
|
</template>
|
|
87
87
|
|
|
88
88
|
<script setup>
|
|
89
|
-
import {
|
|
89
|
+
import {
|
|
90
|
+
MyHistory,
|
|
91
|
+
HistoryQuery,
|
|
92
|
+
} from "@empathyco/x-components/history-queries";
|
|
90
93
|
</script>
|
|
91
94
|
```
|
|
92
95
|
|
|
@@ -104,7 +107,7 @@ passed.
|
|
|
104
107
|
</template>
|
|
105
108
|
|
|
106
109
|
<script setup>
|
|
107
|
-
import { MyHistory } from
|
|
110
|
+
import { MyHistory } from "@empathyco/x-components/history-queries";
|
|
108
111
|
</script>
|
|
109
112
|
```
|
|
110
113
|
|
|
@@ -120,7 +123,7 @@ In this example, an HTML span tag for the date is passed.
|
|
|
120
123
|
</template>
|
|
121
124
|
|
|
122
125
|
<script setup>
|
|
123
|
-
import { MyHistory } from
|
|
126
|
+
import { MyHistory } from "@empathyco/x-components/history-queries";
|
|
124
127
|
</script>
|
|
125
128
|
```
|
|
126
129
|
|
|
@@ -138,8 +141,8 @@ icon to remove the history query.
|
|
|
138
141
|
</template>
|
|
139
142
|
|
|
140
143
|
<script setup>
|
|
141
|
-
import { MyHistory } from
|
|
142
|
-
import { CrossIcon } from
|
|
144
|
+
import { MyHistory } from "@empathyco/x-components/history-queries";
|
|
145
|
+
import { CrossIcon } from "@empathyco/x-components";
|
|
143
146
|
</script>
|
|
144
147
|
```
|
|
145
148
|
|
|
@@ -153,6 +156,6 @@ The `queriesListClass` prop can be used to add classes to the suggestions list.
|
|
|
153
156
|
</template>
|
|
154
157
|
|
|
155
158
|
<script setup>
|
|
156
|
-
import { MyHistory } from
|
|
159
|
+
import { MyHistory } from "@empathyco/x-components/history-queries";
|
|
157
160
|
</script>
|
|
158
161
|
```
|
|
@@ -44,13 +44,13 @@ You can customize the content that this component renders. To do so, simply use
|
|
|
44
44
|
</template>
|
|
45
45
|
|
|
46
46
|
<script setup>
|
|
47
|
-
import { RemoveHistoryQuery } from
|
|
48
|
-
import { ref } from
|
|
47
|
+
import { RemoveHistoryQuery } from "@empathyco/x-components/history-queries";
|
|
48
|
+
import { ref } from "vue";
|
|
49
49
|
|
|
50
50
|
const historyQuery = ref({
|
|
51
|
-
modelName:
|
|
52
|
-
query:
|
|
51
|
+
modelName: "HistoryQuery",
|
|
52
|
+
query: "trousers",
|
|
53
53
|
facets: [],
|
|
54
|
-
})
|
|
54
|
+
});
|
|
55
55
|
</script>
|
|
56
56
|
```
|
|
@@ -28,10 +28,10 @@ from the state. Receives as prop the result data.
|
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
30
|
<script setup>
|
|
31
|
-
import IdentifierResult from
|
|
31
|
+
import IdentifierResult from "@empathyco/x-components/js/x-modules/identifier-results/components/identifier-result.vue";
|
|
32
32
|
const result = {
|
|
33
|
-
identifier: { value:
|
|
33
|
+
identifier: { value: "ABC-123-XYZ" },
|
|
34
34
|
// ...other result properties
|
|
35
|
-
}
|
|
35
|
+
};
|
|
36
36
|
</script>
|
|
37
37
|
```
|
|
@@ -45,12 +45,12 @@ component.
|
|
|
45
45
|
</template>
|
|
46
46
|
|
|
47
47
|
<script setup>
|
|
48
|
-
import IdentifierResults from
|
|
49
|
-
import IdentifierResult from
|
|
50
|
-
import BaseResultLink from
|
|
51
|
-
import FadeAndSlide from
|
|
48
|
+
import IdentifierResults from "@empathyco/x-components/js/x-modules/identifier-results/components/identifier-results.vue";
|
|
49
|
+
import IdentifierResult from "@empathyco/x-components/js/x-modules/identifier-results/components/identifier-result.vue";
|
|
50
|
+
import BaseResultLink from "@empathyco/x-components/js/components/base-result-link.vue";
|
|
51
|
+
import FadeAndSlide from "@empathyco/x-components/js/animations/fade-and-slide.vue";
|
|
52
52
|
|
|
53
|
-
const animation = FadeAndSlide
|
|
53
|
+
const animation = FadeAndSlide;
|
|
54
54
|
</script>
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -68,7 +68,7 @@ In this example, the identifier results have been limited to render a maximum of
|
|
|
68
68
|
</template>
|
|
69
69
|
|
|
70
70
|
<script setup>
|
|
71
|
-
import IdentifierResults from
|
|
72
|
-
import IdentifierResult from
|
|
71
|
+
import IdentifierResults from "@empathyco/x-components/js/x-modules/identifier-results/components/identifier-results.vue";
|
|
72
|
+
import IdentifierResult from "@empathyco/x-components/js/x-modules/identifier-results/components/identifier-result.vue";
|
|
73
73
|
</script>
|
|
74
74
|
```
|
|
@@ -48,9 +48,9 @@ results list.
|
|
|
48
48
|
</template>
|
|
49
49
|
|
|
50
50
|
<script setup>
|
|
51
|
-
import { NextQueriesList } from
|
|
52
|
-
import { ResultsList } from
|
|
53
|
-
import { SearchInput } from
|
|
51
|
+
import { NextQueriesList } from "@empathyco/x-components/next-queries";
|
|
52
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
53
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
54
54
|
</script>
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -68,15 +68,20 @@ more groups will be inserted. Each one of this groups will have up to `6` next q
|
|
|
68
68
|
<div>
|
|
69
69
|
<SearchInput />
|
|
70
70
|
<ResultsList>
|
|
71
|
-
<NextQueriesList
|
|
71
|
+
<NextQueriesList
|
|
72
|
+
:offset="48"
|
|
73
|
+
:frequency="72"
|
|
74
|
+
:maxNextQueriesPerGroup="6"
|
|
75
|
+
:maxGroups="3"
|
|
76
|
+
/>
|
|
72
77
|
</ResultsList>
|
|
73
78
|
</div>
|
|
74
79
|
</template>
|
|
75
80
|
|
|
76
81
|
<script setup>
|
|
77
|
-
import { NextQueriesList } from
|
|
78
|
-
import { ResultsList } from
|
|
79
|
-
import { SearchInput } from
|
|
82
|
+
import { NextQueriesList } from "@empathyco/x-components/next-queries";
|
|
83
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
84
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
80
85
|
</script>
|
|
81
86
|
```
|
|
82
87
|
|
|
@@ -102,9 +107,9 @@ than the offset, but this behavior can be deactivated by setting the `showOnlyAf
|
|
|
102
107
|
</template>
|
|
103
108
|
|
|
104
109
|
<script setup>
|
|
105
|
-
import { NextQueriesList } from
|
|
106
|
-
import { ResultsList } from
|
|
107
|
-
import { SearchInput } from
|
|
110
|
+
import { NextQueriesList } from "@empathyco/x-components/next-queries";
|
|
111
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
112
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
108
113
|
</script>
|
|
109
114
|
```
|
|
110
115
|
|
|
@@ -128,7 +133,7 @@ component, for example the `BaseGrid`. To do so, you can use the `default` slot
|
|
|
128
133
|
>
|
|
129
134
|
<BaseGrid :items="items">
|
|
130
135
|
<template #next-queries-group="{ item }">
|
|
131
|
-
<span>NextQueriesGroup: {{ item.queries.join(
|
|
136
|
+
<span>NextQueriesGroup: {{ item.queries.join(", ") }}</span>
|
|
132
137
|
</template>
|
|
133
138
|
<template #result="{ item }">
|
|
134
139
|
<span>Result: {{ item.name }}</span>
|
|
@@ -143,9 +148,9 @@ component, for example the `BaseGrid`. To do so, you can use the `default` slot
|
|
|
143
148
|
</template>
|
|
144
149
|
|
|
145
150
|
<script setup>
|
|
146
|
-
import { NextQueriesList } from
|
|
147
|
-
import { ResultsList } from
|
|
148
|
-
import { SearchInput } from
|
|
149
|
-
import { BaseGrid } from
|
|
151
|
+
import { NextQueriesList } from "@empathyco/x-components/next-queries";
|
|
152
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
153
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
154
|
+
import { BaseGrid } from "@empathyco/x-components";
|
|
150
155
|
</script>
|
|
151
156
|
```
|
|
@@ -52,8 +52,8 @@ queries it will show them
|
|
|
52
52
|
</template>
|
|
53
53
|
|
|
54
54
|
<script setup>
|
|
55
|
-
import { SearchInput } from
|
|
56
|
-
import { NextQueries } from
|
|
55
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
56
|
+
import { NextQueries } from "@empathyco/x-components/next-queries";
|
|
57
57
|
</script>
|
|
58
58
|
```
|
|
59
59
|
|
|
@@ -65,16 +65,20 @@ The component has three optional props. `animation` to render the component with
|
|
|
65
65
|
<template>
|
|
66
66
|
<div>
|
|
67
67
|
<SearchInput />
|
|
68
|
-
<NextQueries
|
|
68
|
+
<NextQueries
|
|
69
|
+
:animation="animation"
|
|
70
|
+
:maxItemsToRender="10"
|
|
71
|
+
:highlightCurated="true"
|
|
72
|
+
/>
|
|
69
73
|
</div>
|
|
70
74
|
</template>
|
|
71
75
|
|
|
72
76
|
<script setup>
|
|
73
|
-
import { SearchInput } from
|
|
74
|
-
import { NextQueries } from
|
|
75
|
-
import { FadeAndSlide } from
|
|
77
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
78
|
+
import { NextQueries } from "@empathyco/x-components/next-queries";
|
|
79
|
+
import { FadeAndSlide } from "@empathyco/x-components";
|
|
76
80
|
|
|
77
|
-
const animation = FadeAndSlide
|
|
81
|
+
const animation = FadeAndSlide;
|
|
78
82
|
</script>
|
|
79
83
|
```
|
|
80
84
|
|
|
@@ -98,9 +102,9 @@ Next Query suggestion.
|
|
|
98
102
|
</template>
|
|
99
103
|
|
|
100
104
|
<script setup>
|
|
101
|
-
import { SearchInput } from
|
|
102
|
-
import { NextQueries } from
|
|
103
|
-
import { TrendingIcon } from
|
|
105
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
106
|
+
import { NextQueries } from "@empathyco/x-components/next-queries";
|
|
107
|
+
import { TrendingIcon } from "@empathyco/x-components";
|
|
104
108
|
</script>
|
|
105
109
|
```
|
|
106
110
|
|
|
@@ -130,8 +134,8 @@ is wrapped in a `span`.
|
|
|
130
134
|
</template>
|
|
131
135
|
|
|
132
136
|
<script setup>
|
|
133
|
-
import { SearchInput } from
|
|
134
|
-
import { NextQueries, NextQuery } from
|
|
135
|
-
import { TrendingIcon } from
|
|
137
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
138
|
+
import { NextQueries, NextQuery } from "@empathyco/x-components/next-queries";
|
|
139
|
+
import { TrendingIcon } from "@empathyco/x-components";
|
|
136
140
|
</script>
|
|
137
141
|
```
|
|
@@ -42,14 +42,14 @@ names of the results.
|
|
|
42
42
|
</template>
|
|
43
43
|
|
|
44
44
|
<script setup>
|
|
45
|
-
import { NextQueryPreview } from
|
|
46
|
-
import { ref } from
|
|
45
|
+
import { NextQueryPreview } from "@empathyco/x-components/next-queries";
|
|
46
|
+
import { ref } from "vue";
|
|
47
47
|
|
|
48
48
|
const suggestion = ref({
|
|
49
|
-
modelName:
|
|
50
|
-
query:
|
|
49
|
+
modelName: "NextQuery",
|
|
50
|
+
query: "tshirt",
|
|
51
51
|
facets: [],
|
|
52
|
-
})
|
|
52
|
+
});
|
|
53
53
|
</script>
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -59,7 +59,10 @@ In this example, the results will be rendered inside a sliding panel.
|
|
|
59
59
|
|
|
60
60
|
```vue live
|
|
61
61
|
<template>
|
|
62
|
-
<NextQueryPreview
|
|
62
|
+
<NextQueryPreview
|
|
63
|
+
:suggestion="suggestion"
|
|
64
|
+
#default="{ totalResults, results }"
|
|
65
|
+
>
|
|
63
66
|
<p>Total results: {{ totalResults }}</p>
|
|
64
67
|
<SlidingPanel :resetOnContentChange="false">
|
|
65
68
|
<article
|
|
@@ -82,15 +85,19 @@ In this example, the results will be rendered inside a sliding panel.
|
|
|
82
85
|
</template>
|
|
83
86
|
|
|
84
87
|
<script setup>
|
|
85
|
-
import { NextQueryPreview } from
|
|
86
|
-
import {
|
|
87
|
-
|
|
88
|
+
import { NextQueryPreview } from "@empathyco/x-components/next-queries";
|
|
89
|
+
import {
|
|
90
|
+
SlidingPanel,
|
|
91
|
+
BaseResultLink,
|
|
92
|
+
BaseResultImage,
|
|
93
|
+
} from "@empathyco/x-components";
|
|
94
|
+
import { ref } from "vue";
|
|
88
95
|
|
|
89
96
|
const suggestion = ref({
|
|
90
|
-
modelName:
|
|
91
|
-
query:
|
|
97
|
+
modelName: "NextQuery",
|
|
98
|
+
query: "tshirt",
|
|
92
99
|
facets: [],
|
|
93
|
-
})
|
|
100
|
+
});
|
|
94
101
|
</script>
|
|
95
102
|
```
|
|
96
103
|
|
|
@@ -109,14 +116,14 @@ In this example, the ID of the results will be rendered along with the name.
|
|
|
109
116
|
</template>
|
|
110
117
|
|
|
111
118
|
<script setup>
|
|
112
|
-
import { NextQueryPreview } from
|
|
113
|
-
import { ref } from
|
|
119
|
+
import { NextQueryPreview } from "@empathyco/x-components/next-queries";
|
|
120
|
+
import { ref } from "vue";
|
|
114
121
|
|
|
115
122
|
const suggestion = ref({
|
|
116
|
-
modelName:
|
|
117
|
-
query:
|
|
123
|
+
modelName: "NextQuery",
|
|
124
|
+
query: "tshirt",
|
|
118
125
|
facets: [],
|
|
119
|
-
})
|
|
126
|
+
});
|
|
120
127
|
</script>
|
|
121
128
|
```
|
|
122
129
|
|
|
@@ -140,15 +147,19 @@ In this example, the suggestions have been limited to render a maximum of 4 item
|
|
|
140
147
|
</template>
|
|
141
148
|
|
|
142
149
|
<script setup>
|
|
143
|
-
import {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
150
|
+
import {
|
|
151
|
+
BaseGrid,
|
|
152
|
+
BaseResultImage,
|
|
153
|
+
BaseResultLink,
|
|
154
|
+
} from "@empathyco/x-components";
|
|
155
|
+
import { NextQueryPreview } from "@empathyco/x-components/next-queries";
|
|
156
|
+
import { ref } from "vue";
|
|
157
|
+
|
|
158
|
+
const maxItemsToRender = ref(4);
|
|
148
159
|
const suggestion = ref({
|
|
149
|
-
modelName:
|
|
150
|
-
query:
|
|
160
|
+
modelName: "NextQuery",
|
|
161
|
+
query: "tshirt",
|
|
151
162
|
facets: [],
|
|
152
|
-
})
|
|
163
|
+
});
|
|
153
164
|
</script>
|
|
154
165
|
```
|
|
@@ -53,14 +53,14 @@ Using default slot:
|
|
|
53
53
|
</template>
|
|
54
54
|
|
|
55
55
|
<script setup>
|
|
56
|
-
import { NextQuery } from
|
|
57
|
-
import { ref } from
|
|
56
|
+
import { NextQuery } from "@empathyco/x-components/next-queries";
|
|
57
|
+
import { ref } from "vue";
|
|
58
58
|
|
|
59
59
|
const suggestion = ref({
|
|
60
|
-
modelName:
|
|
61
|
-
query:
|
|
60
|
+
modelName: "NextQuery",
|
|
61
|
+
query: "tshirt",
|
|
62
62
|
facets: [],
|
|
63
|
-
})
|
|
63
|
+
});
|
|
64
64
|
</script>
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -72,19 +72,21 @@ The default slot allows you to replace the content of the suggestion button.
|
|
|
72
72
|
<template>
|
|
73
73
|
<NextQuery :suggestion="suggestion" #default="{ suggestion }">
|
|
74
74
|
<TrendingIcon />
|
|
75
|
-
<span class="x-next-query__query" :aria-label="suggestion.query">{{
|
|
75
|
+
<span class="x-next-query__query" :aria-label="suggestion.query">{{
|
|
76
|
+
suggestion.query
|
|
77
|
+
}}</span>
|
|
76
78
|
</NextQuery>
|
|
77
79
|
</template>
|
|
78
80
|
|
|
79
81
|
<script setup>
|
|
80
|
-
import { NextQuery } from
|
|
81
|
-
import { TrendingIcon } from
|
|
82
|
-
import { ref } from
|
|
82
|
+
import { NextQuery } from "@empathyco/x-components/next-queries";
|
|
83
|
+
import { TrendingIcon } from "@empathyco/x-components";
|
|
84
|
+
import { ref } from "vue";
|
|
83
85
|
|
|
84
86
|
const suggestion = ref({
|
|
85
|
-
modelName:
|
|
86
|
-
query:
|
|
87
|
+
modelName: "NextQuery",
|
|
88
|
+
query: "tshirt",
|
|
87
89
|
facets: [],
|
|
88
|
-
})
|
|
90
|
+
});
|
|
89
91
|
</script>
|
|
90
92
|
```
|