@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
|
@@ -44,25 +44,28 @@ you to customize the grid items using the available slots.
|
|
|
44
44
|
<span data-test="default-slot">{{ item.id }}</span>
|
|
45
45
|
</template>
|
|
46
46
|
<template #result="{ item }">
|
|
47
|
-
<span data-test="result-slot">{{
|
|
47
|
+
<span data-test="result-slot">{{ "Result " + item.id }}</span>
|
|
48
48
|
</template>
|
|
49
49
|
</BaseVariableColumnGrid>
|
|
50
50
|
</section>
|
|
51
51
|
</template>
|
|
52
52
|
|
|
53
53
|
<script setup>
|
|
54
|
-
import { ref } from
|
|
55
|
-
import {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
import { ref } from "vue";
|
|
55
|
+
import {
|
|
56
|
+
BaseVariableColumnGrid,
|
|
57
|
+
StaggeredFadeAndSlide,
|
|
58
|
+
} from "@empathyco/x-components";
|
|
59
|
+
import { use$x } from "../../composables";
|
|
60
|
+
|
|
61
|
+
const x = use$x();
|
|
62
|
+
const animation = StaggeredFadeAndSlide;
|
|
60
63
|
const items = [
|
|
61
|
-
{ id:
|
|
62
|
-
{ id:
|
|
63
|
-
]
|
|
64
|
+
{ id: "res-1", modelName: "Result", name: "Product 1" },
|
|
65
|
+
{ id: "res-2", modelName: "Result", name: "Product 2" },
|
|
66
|
+
];
|
|
64
67
|
function setColumns(columns) {
|
|
65
|
-
x.emit(
|
|
68
|
+
x.emit("UserClickedColumnPicker", columns);
|
|
66
69
|
}
|
|
67
70
|
</script>
|
|
68
71
|
```
|
|
@@ -83,25 +86,28 @@ Configuring the default columns to be rendered. These columns will be the defaul
|
|
|
83
86
|
<span data-test="default-slot">{{ item.id }}</span>
|
|
84
87
|
</template>
|
|
85
88
|
<template #result="{ item }">
|
|
86
|
-
<span data-test="result-slot">{{
|
|
89
|
+
<span data-test="result-slot">{{ "Result " + item.id }}</span>
|
|
87
90
|
</template>
|
|
88
91
|
</BaseVariableColumnGrid>
|
|
89
92
|
</section>
|
|
90
93
|
</template>
|
|
91
94
|
|
|
92
95
|
<script setup>
|
|
93
|
-
import { ref } from
|
|
94
|
-
import {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
import { ref } from "vue";
|
|
97
|
+
import {
|
|
98
|
+
BaseVariableColumnGrid,
|
|
99
|
+
StaggeredFadeAndSlide,
|
|
100
|
+
} from "@empathyco/x-components";
|
|
101
|
+
import { use$x } from "@empathyco/x-components";
|
|
102
|
+
|
|
103
|
+
const x = use$x();
|
|
104
|
+
const animation = StaggeredFadeAndSlide;
|
|
99
105
|
const items = [
|
|
100
|
-
{ id:
|
|
101
|
-
{ id:
|
|
102
|
-
]
|
|
106
|
+
{ id: "res-1", modelName: "Result", name: "Product 1" },
|
|
107
|
+
{ id: "res-2", modelName: "Result", name: "Product 2" },
|
|
108
|
+
];
|
|
103
109
|
function setColumns(columns) {
|
|
104
|
-
x.emit(
|
|
110
|
+
x.emit("UserClickedColumnPicker", columns);
|
|
105
111
|
}
|
|
106
112
|
</script>
|
|
107
113
|
```
|
|
@@ -125,12 +131,15 @@ items.
|
|
|
125
131
|
</template>
|
|
126
132
|
|
|
127
133
|
<script setup>
|
|
128
|
-
import {
|
|
129
|
-
|
|
130
|
-
|
|
134
|
+
import {
|
|
135
|
+
BaseVariableColumnGrid,
|
|
136
|
+
StaggeredFadeAndSlide,
|
|
137
|
+
} from "@empathyco/x-components";
|
|
138
|
+
import { ref } from "vue";
|
|
139
|
+
const animation = StaggeredFadeAndSlide;
|
|
131
140
|
const items = [
|
|
132
|
-
{ id:
|
|
133
|
-
{ id:
|
|
134
|
-
]
|
|
141
|
+
{ id: "res-1", modelName: "Result", name: "Product 1" },
|
|
142
|
+
{ id: "res-2", modelName: "Result", name: "Product 2" },
|
|
143
|
+
];
|
|
135
144
|
</script>
|
|
136
145
|
```
|
|
@@ -30,11 +30,11 @@ The `DisplayClickProvider` component is used to provide context and event metada
|
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<script setup>
|
|
33
|
-
import { DisplayClickProvider } from
|
|
34
|
-
import ResultCard from
|
|
33
|
+
import { DisplayClickProvider } from "@empathyco/x-components";
|
|
34
|
+
import ResultCard from "./ResultCard.vue";
|
|
35
35
|
const result = {
|
|
36
36
|
/* ...result data... */
|
|
37
|
-
}
|
|
37
|
+
};
|
|
38
38
|
</script>
|
|
39
39
|
```
|
|
40
40
|
|
|
@@ -54,20 +54,20 @@ const result = {
|
|
|
54
54
|
</template>
|
|
55
55
|
|
|
56
56
|
<script setup>
|
|
57
|
-
import { DisplayClickProvider } from
|
|
58
|
-
import ResultCard from
|
|
57
|
+
import { DisplayClickProvider } from "@empathyco/x-components";
|
|
58
|
+
import ResultCard from "./ResultCard.vue";
|
|
59
59
|
const result = {
|
|
60
60
|
/* ...result data... */
|
|
61
|
-
}
|
|
61
|
+
};
|
|
62
62
|
const displayTagging = {
|
|
63
63
|
/* ...tagging data... */
|
|
64
|
-
}
|
|
64
|
+
};
|
|
65
65
|
const add2CartTagging = {
|
|
66
66
|
/* ...tagging data... */
|
|
67
|
-
}
|
|
67
|
+
};
|
|
68
68
|
const queryTagging = {
|
|
69
69
|
/* ...tagging data... */
|
|
70
|
-
}
|
|
70
|
+
};
|
|
71
71
|
</script>
|
|
72
72
|
```
|
|
73
73
|
|
|
@@ -30,10 +30,10 @@ Event by using the prop `listeners`
|
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<script setup>
|
|
33
|
-
import { GlobalXBus } from
|
|
33
|
+
import { GlobalXBus } from "@empathyco/x-components";
|
|
34
34
|
function printQuery(query, metadata) {
|
|
35
|
-
console.log(
|
|
36
|
-
console.log(
|
|
35
|
+
console.log("My new query is:", query);
|
|
36
|
+
console.log("And has been triggered by this DOM element:", metadata.target);
|
|
37
37
|
}
|
|
38
38
|
</script>
|
|
39
39
|
```
|
|
@@ -38,9 +38,9 @@ _Type any term in the input field to try it out!_
|
|
|
38
38
|
</template>
|
|
39
39
|
|
|
40
40
|
<script setup>
|
|
41
|
-
import { Highlight } from
|
|
42
|
-
import { ref } from
|
|
43
|
-
const highlight = ref(
|
|
41
|
+
import { Highlight } from "@empathyco/x-components";
|
|
42
|
+
import { ref } from "vue";
|
|
43
|
+
const highlight = ref("");
|
|
44
44
|
</script>
|
|
45
45
|
```
|
|
46
46
|
|
|
@@ -68,8 +68,8 @@ This component allows to customise the whole layout.
|
|
|
68
68
|
</template>
|
|
69
69
|
|
|
70
70
|
<script setup>
|
|
71
|
-
import { Highlight } from
|
|
72
|
-
import { ref } from
|
|
73
|
-
const highlight = ref(
|
|
71
|
+
import { Highlight } from "@empathyco/x-components";
|
|
72
|
+
import { ref } from "vue";
|
|
73
|
+
const highlight = ref("entran");
|
|
74
74
|
</script>
|
|
75
75
|
```
|
|
@@ -34,14 +34,14 @@ different tools that generate the query.
|
|
|
34
34
|
</LocationProvider>
|
|
35
35
|
</template>
|
|
36
36
|
<script>
|
|
37
|
-
import { LocationProvider } from
|
|
38
|
-
import { NextQueries } from
|
|
37
|
+
import { LocationProvider } from "@empathyco/x-components";
|
|
38
|
+
import { NextQueries } from "@empathyco/x-components/next-queries";
|
|
39
39
|
export default {
|
|
40
|
-
name:
|
|
40
|
+
name: "LocationProviderDemo",
|
|
41
41
|
components: {
|
|
42
42
|
LocationProvider,
|
|
43
43
|
NextQueries,
|
|
44
44
|
},
|
|
45
|
-
}
|
|
45
|
+
};
|
|
46
46
|
</script>
|
|
47
47
|
```
|
|
@@ -36,14 +36,14 @@ buttonEvents prop:
|
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<script>
|
|
39
|
-
import { PageLoaderButton } from
|
|
39
|
+
import { PageLoaderButton } from "@empathyco/x-components";
|
|
40
40
|
|
|
41
41
|
export default {
|
|
42
|
-
name:
|
|
42
|
+
name: "PageLoaderButtonDemo",
|
|
43
43
|
components: {
|
|
44
44
|
PageLoaderButton,
|
|
45
45
|
},
|
|
46
|
-
}
|
|
46
|
+
};
|
|
47
47
|
</script>
|
|
48
48
|
```
|
|
49
49
|
|
|
@@ -57,14 +57,14 @@ Here you have a basic example of how the page loader component is rendered.
|
|
|
57
57
|
</template>
|
|
58
58
|
|
|
59
59
|
<script>
|
|
60
|
-
import { PageLoaderButton } from
|
|
60
|
+
import { PageLoaderButton } from "@empathyco/x-components";
|
|
61
61
|
|
|
62
62
|
export default {
|
|
63
|
-
name:
|
|
63
|
+
name: "PageLoaderButtonDemo",
|
|
64
64
|
components: {
|
|
65
65
|
PageLoaderButton,
|
|
66
66
|
},
|
|
67
|
-
}
|
|
67
|
+
};
|
|
68
68
|
</script>
|
|
69
69
|
```
|
|
70
70
|
|
|
@@ -94,14 +94,14 @@ This component has a default slot which allows to customise the entire layout.
|
|
|
94
94
|
</template>
|
|
95
95
|
|
|
96
96
|
<script>
|
|
97
|
-
import { PageLoaderButton } from
|
|
97
|
+
import { PageLoaderButton } from "@empathyco/x-components";
|
|
98
98
|
|
|
99
99
|
export default {
|
|
100
|
-
name:
|
|
100
|
+
name: "PageLoaderButtonDemo",
|
|
101
101
|
components: {
|
|
102
102
|
PageLoaderButton,
|
|
103
103
|
},
|
|
104
|
-
}
|
|
104
|
+
};
|
|
105
105
|
</script>
|
|
106
106
|
```
|
|
107
107
|
|
|
@@ -126,18 +126,18 @@ content inside and customizing its style using the buttonClasses prop.
|
|
|
126
126
|
</template>
|
|
127
127
|
|
|
128
128
|
<script>
|
|
129
|
-
import { PageLoaderButton } from
|
|
129
|
+
import { PageLoaderButton } from "@empathyco/x-components";
|
|
130
130
|
|
|
131
131
|
export default {
|
|
132
|
-
name:
|
|
132
|
+
name: "PageLoaderButtonDemo",
|
|
133
133
|
components: {
|
|
134
134
|
PageLoaderButton,
|
|
135
135
|
},
|
|
136
136
|
data() {
|
|
137
137
|
return {
|
|
138
|
-
buttonClasses:
|
|
139
|
-
}
|
|
138
|
+
buttonClasses: "x-rounded-full",
|
|
139
|
+
};
|
|
140
140
|
},
|
|
141
|
-
}
|
|
141
|
+
};
|
|
142
142
|
</script>
|
|
143
143
|
```
|
|
@@ -44,10 +44,10 @@ Basic example of how the component is rendered.
|
|
|
44
44
|
</template>
|
|
45
45
|
|
|
46
46
|
<script>
|
|
47
|
-
import { PageSelector } from
|
|
47
|
+
import { PageSelector } from "@empathyco/x-components";
|
|
48
48
|
|
|
49
49
|
export default {
|
|
50
|
-
name:
|
|
50
|
+
name: "PageSelectorDemo",
|
|
51
51
|
components: {
|
|
52
52
|
PageSelector,
|
|
53
53
|
},
|
|
@@ -55,9 +55,9 @@ export default {
|
|
|
55
55
|
return {
|
|
56
56
|
page: 0,
|
|
57
57
|
totalPages: 10,
|
|
58
|
-
}
|
|
58
|
+
};
|
|
59
59
|
},
|
|
60
|
-
}
|
|
60
|
+
};
|
|
61
61
|
</script>
|
|
62
62
|
```
|
|
63
63
|
|
|
@@ -93,10 +93,10 @@ This component allows to customise its content using slots.
|
|
|
93
93
|
</template>
|
|
94
94
|
|
|
95
95
|
<script>
|
|
96
|
-
import { PageSelector } from
|
|
96
|
+
import { PageSelector } from "@empathyco/x-components";
|
|
97
97
|
|
|
98
98
|
export default {
|
|
99
|
-
name:
|
|
99
|
+
name: "PageSelectorDemo",
|
|
100
100
|
components: {
|
|
101
101
|
PageSelector,
|
|
102
102
|
},
|
|
@@ -104,9 +104,9 @@ export default {
|
|
|
104
104
|
return {
|
|
105
105
|
page: 2,
|
|
106
106
|
totalPages: 10,
|
|
107
|
-
}
|
|
107
|
+
};
|
|
108
108
|
},
|
|
109
|
-
}
|
|
109
|
+
};
|
|
110
110
|
</script>
|
|
111
111
|
```
|
|
112
112
|
|
|
@@ -118,10 +118,10 @@ export default {
|
|
|
118
118
|
</template>
|
|
119
119
|
|
|
120
120
|
<script>
|
|
121
|
-
import { PageSelector } from
|
|
121
|
+
import { PageSelector } from "@empathyco/x-components";
|
|
122
122
|
|
|
123
123
|
export default {
|
|
124
|
-
name:
|
|
124
|
+
name: "PageSelectorDemo",
|
|
125
125
|
components: {
|
|
126
126
|
PageSelector,
|
|
127
127
|
},
|
|
@@ -130,8 +130,8 @@ export default {
|
|
|
130
130
|
page: 6,
|
|
131
131
|
totalPages: 100,
|
|
132
132
|
range: 4,
|
|
133
|
-
}
|
|
133
|
+
};
|
|
134
134
|
},
|
|
135
|
-
}
|
|
135
|
+
};
|
|
136
136
|
</script>
|
|
137
137
|
```
|
|
@@ -51,14 +51,14 @@ Simplest implementation of the component, just a list-based component inside its
|
|
|
51
51
|
</template>
|
|
52
52
|
|
|
53
53
|
<script>
|
|
54
|
-
import { SlidingPanel } from
|
|
54
|
+
import { SlidingPanel } from "@empathyco/x-components";
|
|
55
55
|
|
|
56
56
|
export default {
|
|
57
|
-
name:
|
|
57
|
+
name: "SlidingPanelDemo",
|
|
58
58
|
components: {
|
|
59
59
|
SlidingPanel,
|
|
60
60
|
},
|
|
61
|
-
}
|
|
61
|
+
};
|
|
62
62
|
</script>
|
|
63
63
|
|
|
64
64
|
<style>
|
|
@@ -91,14 +91,14 @@ prop.
|
|
|
91
91
|
</template>
|
|
92
92
|
|
|
93
93
|
<script>
|
|
94
|
-
import { SlidingPanel } from
|
|
94
|
+
import { SlidingPanel } from "@empathyco/x-components";
|
|
95
95
|
|
|
96
96
|
export default {
|
|
97
|
-
name:
|
|
97
|
+
name: "SlidingPanelDemo",
|
|
98
98
|
components: {
|
|
99
99
|
SlidingPanel,
|
|
100
100
|
},
|
|
101
|
-
}
|
|
101
|
+
};
|
|
102
102
|
</script>
|
|
103
103
|
|
|
104
104
|
<style>
|
|
@@ -130,14 +130,14 @@ just by swiping.
|
|
|
130
130
|
</template>
|
|
131
131
|
|
|
132
132
|
<script>
|
|
133
|
-
import { SlidingPanel } from
|
|
133
|
+
import { SlidingPanel } from "@empathyco/x-components";
|
|
134
134
|
|
|
135
135
|
export default {
|
|
136
|
-
name:
|
|
136
|
+
name: "SlidingPanelDemo",
|
|
137
137
|
components: {
|
|
138
138
|
SlidingPanel,
|
|
139
139
|
},
|
|
140
|
-
}
|
|
140
|
+
};
|
|
141
141
|
</script>
|
|
142
142
|
|
|
143
143
|
<style>
|
|
@@ -160,7 +160,10 @@ The `scrollContainerClass` prop can be used to add classes to the scroll content
|
|
|
160
160
|
|
|
161
161
|
```vue
|
|
162
162
|
<template>
|
|
163
|
-
<SlidingPanel
|
|
163
|
+
<SlidingPanel
|
|
164
|
+
buttonClass="x-button--round"
|
|
165
|
+
scrollContainerClass="x-sliding-panel-fade"
|
|
166
|
+
>
|
|
164
167
|
<div class="item">Item 1</div>
|
|
165
168
|
<div class="item">Item 2</div>
|
|
166
169
|
<div class="item">Item 3</div>
|
|
@@ -169,14 +172,14 @@ The `scrollContainerClass` prop can be used to add classes to the scroll content
|
|
|
169
172
|
</template>
|
|
170
173
|
|
|
171
174
|
<script>
|
|
172
|
-
import { SlidingPanel } from
|
|
175
|
+
import { SlidingPanel } from "@empathyco/x-components";
|
|
173
176
|
|
|
174
177
|
export default {
|
|
175
|
-
name:
|
|
178
|
+
name: "SlidingPanelDemo",
|
|
176
179
|
components: {
|
|
177
180
|
SlidingPanel,
|
|
178
181
|
},
|
|
179
|
-
}
|
|
182
|
+
};
|
|
180
183
|
</script>
|
|
181
184
|
|
|
182
185
|
<style>
|
|
@@ -211,10 +214,10 @@ You can disable this behavior setting the `resetOnContentChange` prop to `false`
|
|
|
211
214
|
</template>
|
|
212
215
|
|
|
213
216
|
<script>
|
|
214
|
-
import { SlidingPanel } from
|
|
217
|
+
import { SlidingPanel } from "@empathyco/x-components";
|
|
215
218
|
|
|
216
219
|
export default {
|
|
217
|
-
name:
|
|
220
|
+
name: "SlidingPanelDemo",
|
|
218
221
|
components: {
|
|
219
222
|
SlidingPanel,
|
|
220
223
|
},
|
|
@@ -222,9 +225,9 @@ export default {
|
|
|
222
225
|
return {
|
|
223
226
|
items: 4,
|
|
224
227
|
resetOnContentChange: false,
|
|
225
|
-
}
|
|
228
|
+
};
|
|
226
229
|
},
|
|
227
|
-
}
|
|
230
|
+
};
|
|
228
231
|
</script>
|
|
229
232
|
|
|
230
233
|
<style>
|
|
@@ -261,14 +264,14 @@ but this content can be customized with anything, from characters to SVG and ima
|
|
|
261
264
|
</template>
|
|
262
265
|
|
|
263
266
|
<script>
|
|
264
|
-
import { SlidingPanel } from
|
|
267
|
+
import { SlidingPanel } from "@empathyco/x-components";
|
|
265
268
|
|
|
266
269
|
export default {
|
|
267
|
-
name:
|
|
270
|
+
name: "SlidingPanelDemo",
|
|
268
271
|
components: {
|
|
269
272
|
SlidingPanel,
|
|
270
273
|
},
|
|
271
|
-
}
|
|
274
|
+
};
|
|
272
275
|
</script>
|
|
273
276
|
|
|
274
277
|
<style>
|
|
@@ -27,12 +27,12 @@ will be triggered once its listened event is emitted.
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script>
|
|
30
|
-
import { SnippetCallbacks } from
|
|
30
|
+
import { SnippetCallbacks } from "@empathyco/x-components";
|
|
31
31
|
export default {
|
|
32
|
-
name:
|
|
32
|
+
name: "SnippetCallbacksTest",
|
|
33
33
|
components: {
|
|
34
34
|
SnippetCallbacks,
|
|
35
35
|
},
|
|
36
|
-
}
|
|
36
|
+
};
|
|
37
37
|
</script>
|
|
38
38
|
```
|
|
@@ -40,16 +40,16 @@ _Try resizing the browser window!_
|
|
|
40
40
|
</template>
|
|
41
41
|
|
|
42
42
|
<script setup>
|
|
43
|
-
import { reactive } from
|
|
44
|
-
import { DeviceDetector } from
|
|
45
|
-
import { use$x } from
|
|
43
|
+
import { reactive } from "vue";
|
|
44
|
+
import { DeviceDetector } from "@empathyco/x-components/device";
|
|
45
|
+
import { use$x } from "../../../composables/use-$x";
|
|
46
46
|
|
|
47
|
-
const x = use$x()
|
|
47
|
+
const x = use$x();
|
|
48
48
|
const breakpoints = reactive({
|
|
49
49
|
mobile: 600,
|
|
50
50
|
tablet: 900,
|
|
51
51
|
desktop: Number.POSITIVE_INFINITY,
|
|
52
|
-
})
|
|
52
|
+
});
|
|
53
53
|
</script>
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -69,16 +69,16 @@ _Try resizing the window to check that it never changes_
|
|
|
69
69
|
</template>
|
|
70
70
|
|
|
71
71
|
<script setup>
|
|
72
|
-
import { reactive } from
|
|
73
|
-
import { DeviceDetector } from
|
|
74
|
-
import { use$x } from
|
|
72
|
+
import { reactive } from "vue";
|
|
73
|
+
import { DeviceDetector } from "@empathyco/x-components/device";
|
|
74
|
+
import { use$x } from "../../../composables/use-$x";
|
|
75
75
|
|
|
76
|
-
const x = use$x()
|
|
76
|
+
const x = use$x();
|
|
77
77
|
const breakpoints = reactive({
|
|
78
78
|
mobile: 600,
|
|
79
79
|
tablet: 900,
|
|
80
80
|
desktop: Number.POSITIVE_INFINITY,
|
|
81
|
-
})
|
|
81
|
+
});
|
|
82
82
|
</script>
|
|
83
83
|
```
|
|
84
84
|
|
|
@@ -98,16 +98,16 @@ _Try resizing the browser window!_
|
|
|
98
98
|
</template>
|
|
99
99
|
|
|
100
100
|
<script setup>
|
|
101
|
-
import { DeviceDetector } from
|
|
102
|
-
import { reactive, ref } from
|
|
103
|
-
const device = ref(
|
|
101
|
+
import { DeviceDetector } from "@empathyco/x-components/device";
|
|
102
|
+
import { reactive, ref } from "vue";
|
|
103
|
+
const device = ref("unknown");
|
|
104
104
|
const breakpoints = reactive({
|
|
105
105
|
mobile: 600,
|
|
106
106
|
tablet: 900,
|
|
107
107
|
desktop: Number.POSITIVE_INFINITY,
|
|
108
|
-
})
|
|
108
|
+
});
|
|
109
109
|
function storeDevice(newDevice) {
|
|
110
|
-
device.value = newDevice
|
|
110
|
+
device.value = newDevice;
|
|
111
111
|
}
|
|
112
112
|
</script>
|
|
113
113
|
```
|
|
@@ -62,11 +62,11 @@ navigation.
|
|
|
62
62
|
</template>
|
|
63
63
|
|
|
64
64
|
<script setup>
|
|
65
|
-
import Empathize from
|
|
66
|
-
import BaseKeyboardNavigation from
|
|
67
|
-
import QuerySuggestions from
|
|
68
|
-
import PopularSearches from
|
|
69
|
-
import HistoryQueries from
|
|
65
|
+
import Empathize from "@empathyco/x-components/js/x-modules/empathize/components/empathize.vue";
|
|
66
|
+
import BaseKeyboardNavigation from "@empathyco/x-components/js/components/base-keyboard-navigation.vue";
|
|
67
|
+
import QuerySuggestions from "@empathyco/x-components/js/x-modules/query-suggestions/components/query-suggestions.vue";
|
|
68
|
+
import PopularSearches from "@empathyco/x-components/js/x-modules/popular-searches/components/popular-searches.vue";
|
|
69
|
+
import HistoryQueries from "@empathyco/x-components/js/x-modules/history-queries/components/history-queries.vue";
|
|
70
70
|
</script>
|
|
71
71
|
```
|
|
72
72
|
|
|
@@ -84,7 +84,7 @@ the search box loses the focus and closing it when the search box receives the f
|
|
|
84
84
|
</template>
|
|
85
85
|
|
|
86
86
|
<script setup>
|
|
87
|
-
import Empathize from
|
|
87
|
+
import Empathize from "@empathyco/x-components/js/x-modules/empathize/components/empathize.vue";
|
|
88
88
|
</script>
|
|
89
89
|
```
|
|
90
90
|
|
|
@@ -99,10 +99,10 @@ be a component with a `Transition` and a slot inside:
|
|
|
99
99
|
</template>
|
|
100
100
|
|
|
101
101
|
<script setup>
|
|
102
|
-
import Empathize from
|
|
103
|
-
import PopularSearches from
|
|
104
|
-
import CollapseFromTop from
|
|
105
|
-
const animation = CollapseFromTop
|
|
102
|
+
import Empathize from "@empathyco/x-components/js/x-modules/empathize/components/empathize.vue";
|
|
103
|
+
import PopularSearches from "@empathyco/x-components/js/x-modules/popular-searches/components/popular-searches.vue";
|
|
104
|
+
import CollapseFromTop from "./collapseFromTop.vue";
|
|
105
|
+
const animation = CollapseFromTop;
|
|
106
106
|
</script>
|
|
107
107
|
```
|
|
108
108
|
|
|
@@ -131,15 +131,15 @@ if the empathize has content or not. It also configures `searchAndCloseDebounceI
|
|
|
131
131
|
</template>
|
|
132
132
|
|
|
133
133
|
<script setup>
|
|
134
|
-
import Empathize from
|
|
135
|
-
import BaseKeyboardNavigation from
|
|
136
|
-
import QuerySuggestions from
|
|
137
|
-
import PopularSearches from
|
|
138
|
-
import HistoryQueries from
|
|
139
|
-
import CollapseFromTop from
|
|
140
|
-
import { ref } from
|
|
141
|
-
const empathizeAnimation = CollapseFromTop
|
|
142
|
-
const empathizeCloseEvents = [
|
|
143
|
-
const showEmpathize = ref(true)
|
|
134
|
+
import Empathize from "@empathyco/x-components/js/x-modules/empathize/components/empathize.vue";
|
|
135
|
+
import BaseKeyboardNavigation from "@empathyco/x-components/js/components/base-keyboard-navigation.vue";
|
|
136
|
+
import QuerySuggestions from "@empathyco/x-components/js/x-modules/query-suggestions/components/query-suggestions.vue";
|
|
137
|
+
import PopularSearches from "@empathyco/x-components/js/x-modules/popular-searches/components/popular-searches.vue";
|
|
138
|
+
import HistoryQueries from "@empathyco/x-components/js/x-modules/history-queries/components/history-queries.vue";
|
|
139
|
+
import CollapseFromTop from "./collapseFromTop.vue";
|
|
140
|
+
import { ref } from "vue";
|
|
141
|
+
const empathizeAnimation = CollapseFromTop;
|
|
142
|
+
const empathizeCloseEvents = ["UserClosedEmpathize", "UserSelectedASuggestion"];
|
|
143
|
+
const showEmpathize = ref(true);
|
|
144
144
|
</script>
|
|
145
145
|
```
|
package/docs/API-reference/components/experience-controls/x-components.experience-controls.md
CHANGED
|
@@ -19,6 +19,6 @@ This component will fire the events received in the `ExperienceControlsEventsCha
|
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script setup>
|
|
22
|
-
import { ExperienceControls } from
|
|
22
|
+
import { ExperienceControls } from "@empathyco/x-components/experience-controls";
|
|
23
23
|
</script>
|
|
24
24
|
```
|
|
@@ -29,10 +29,10 @@ _See how the event is triggered when the component is rendered._
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script setup>
|
|
32
|
-
import { ExtraParams } from
|
|
33
|
-
import { reactive } from
|
|
32
|
+
import { ExtraParams } from "@empathyco/x-components/extra-params";
|
|
33
|
+
import { reactive } from "vue";
|
|
34
34
|
const values = reactive({
|
|
35
35
|
warehouse: 1234,
|
|
36
|
-
})
|
|
36
|
+
});
|
|
37
37
|
</script>
|
|
38
38
|
```
|