@empathyco/x-components 3.0.0-alpha.358 → 3.0.0-alpha.359

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 CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.0-alpha.359](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.358...@empathyco/x-components@3.0.0-alpha.359) (2023-04-24)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **search:** export `SortPickerList` (#1157)
11
+ ([eaf877d](https://github.com/empathyco/x/commit/eaf877db49b7c6578ce4daf707d91c711621eae2))
12
+
13
+ # Change Log
14
+
15
+ All notable changes to this project will be documented in this file. See
16
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
17
+
6
18
  ## [3.0.0-alpha.358](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.357...@empathyco/x-components@3.0.0-alpha.358) (2023-04-24)
7
19
 
8
20
  ### Features
package/core/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -139,6 +139,7 @@ X-Components is a library usable everywhere not only for search experiences.
139
139
  | [SortedFilters](./x-components.sortedfilters.md) | Component that sorts a list of filters and returns them using the default scoped slot. |
140
140
  | [SortList](./x-components.sortlist.md) | The <code>SortList</code> component allows user to select the search results order. This component also allows to change the selected sort programmatically. |
141
141
  | [SortMixin](./x-components.sortmixin.md) | Mixin to share Sort logic. |
142
+ | [SortPickerList](./x-components.sortpickerlist.md) | The <code>SortPickerList</code> component allows user to select the search results order. This component also allows to change the selected sort programmatically. |
142
143
  | [Spellcheck](./x-components.spellcheck.md) | <p>The <code>Spellcheck</code> component allows to inform the user with a friendly message that he might have misspelled the search query. This message can be set using the default slot of the component, which gives access to the searched query using the <code>query</code> scope property, and the spellchecked query proposal, using the <code>spellcheckedQuery</code> scope property.</p><p>The component will only render itself if the <code>spellcheckedQuery</code> property has value.</p> |
143
144
  | [SpellcheckButton](./x-components.spellcheckbutton.md) | A button that when pressed emits the [XEventsTypes.UserAcceptedAQuery](./x-components.xeventstypes.useracceptedaquery.md) and [XEventsTypes.UserAcceptedSpellcheckQuery](./x-components.xeventstypes.useracceptedspellcheckquery.md) events, expressing the user intention to set the spellchecked query. |
144
145
  | [StaggeredFadeAndSlide](./x-components.staggeredfadeandslide.md) | Renders a transition group wrapping the elements passed in the default slot and animating them with an staggered fade and slide animation. |
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [SortPickerList](./x-components.sortpickerlist.md) &gt; [animation](./x-components.sortpickerlist.animation.md)
4
+
5
+ ## SortPickerList.animation property
6
+
7
+ The transition to use for rendering the list.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ animation?: string | typeof Vue;
13
+ ```
@@ -0,0 +1,25 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [SortPickerList](./x-components.sortpickerlist.md)
4
+
5
+ ## SortPickerList class
6
+
7
+ The `SortPickerList` component allows user to select the search results order. This component also allows to change the selected sort programmatically.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export default class SortPickerList extends SortPickerList_base
13
+ ```
14
+ **Extends:** SortPickerList\_base
15
+
16
+ ## Remarks
17
+
18
+ It extends [SortMixin](./x-components.sortmixin.md)<!-- -->.
19
+
20
+ ## Properties
21
+
22
+ | Property | Modifiers | Type | Description |
23
+ | --- | --- | --- | --- |
24
+ | [animation?](./x-components.sortpickerlist.animation.md) | | string \| typeof Vue | _(Optional)_ The transition to use for rendering the list. |
25
+
package/js/index.js CHANGED
@@ -355,6 +355,7 @@ export { default as Redirection } from './x-modules/search/components/redirectio
355
355
  export { default as ResultsList } from './x-modules/search/components/results-list.vue.js';
356
356
  export { default as SortDropdown } from './x-modules/search/components/sort-dropdown.vue.js';
357
357
  export { default as SortList } from './x-modules/search/components/sort-list.vue.js';
358
+ export { default as SortPickerList } from './x-modules/search/components/sort-picker-list.vue.js';
358
359
  export { default as SortMixin } from './x-modules/search/components/sort.mixin.js';
359
360
  export { default as Spellcheck } from './x-modules/search/components/spellcheck.vue.js';
360
361
  export { default as SpellcheckButton } from './x-modules/search/components/spellcheck-button.vue.js';
package/js/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,84 @@
1
+ import script from './sort-picker-list.vue_rollup-plugin-vue_script.vue.js';
2
+ import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.mjs';
3
+
4
+ /* script */
5
+ const __vue_script__ = script;
6
+
7
+ /* template */
8
+ var __vue_render__ = function () {
9
+ var _vm = this;
10
+ var _h = _vm.$createElement;
11
+ var _c = _vm._self._c || _h;
12
+ return _c(
13
+ _vm.animation,
14
+ {
15
+ tag: "component",
16
+ staticClass: "x-sort-picker-list",
17
+ attrs: { tag: "div", "data-test": "sort-picker", role: "list" },
18
+ },
19
+ _vm._l(_vm.listItems, function (ref) {
20
+ var item = ref.item;
21
+ var cssClasses = ref.cssClasses;
22
+ var event = ref.event;
23
+ return _c(
24
+ "BaseEventButton",
25
+ {
26
+ key: item,
27
+ class: [cssClasses, _vm.buttonClass],
28
+ attrs: {
29
+ "data-test": "sort-picker-button",
30
+ events: event,
31
+ "aria-pressed": item === _vm.selectedSort,
32
+ role: "listitem",
33
+ },
34
+ },
35
+ [
36
+ _vm._t(
37
+ "default",
38
+ function () {
39
+ return [_vm._v(" " + _vm._s(item) + " ")]
40
+ },
41
+ null,
42
+ { item: item, isSelected: item === _vm.selectedSort }
43
+ ),
44
+ ],
45
+ 2
46
+ )
47
+ }),
48
+ 1
49
+ )
50
+ };
51
+ var __vue_staticRenderFns__ = [];
52
+ __vue_render__._withStripped = true;
53
+
54
+ /* style */
55
+ const __vue_inject_styles__ = undefined;
56
+ /* scoped */
57
+ const __vue_scope_id__ = undefined;
58
+ /* module identifier */
59
+ const __vue_module_identifier__ = undefined;
60
+ /* functional template */
61
+ const __vue_is_functional_template__ = false;
62
+ /* style inject */
63
+
64
+ /* style inject SSR */
65
+
66
+ /* style inject shadow dom */
67
+
68
+
69
+
70
+ const __vue_component__ = /*#__PURE__*/__vue_normalize__(
71
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
72
+ __vue_inject_styles__,
73
+ __vue_script__,
74
+ __vue_scope_id__,
75
+ __vue_is_functional_template__,
76
+ __vue_module_identifier__,
77
+ false,
78
+ undefined,
79
+ undefined,
80
+ undefined
81
+ );
82
+
83
+ export { __vue_component__ as default };
84
+ //# sourceMappingURL=sort-picker-list.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-picker-list.vue.js","sources":["../../../../../src/x-modules/search/components/sort-picker-list.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n tag=\"div\"\n class=\"x-sort-picker-list\"\n data-test=\"sort-picker\"\n role=\"list\"\n >\n <BaseEventButton\n v-for=\"{ item, cssClasses, event } in listItems\"\n :key=\"item\"\n :class=\"[cssClasses, buttonClass]\"\n data-test=\"sort-picker-button\"\n :events=\"event\"\n :aria-pressed=\"item === selectedSort\"\n role=\"listitem\"\n >\n <slot v-bind=\"{ item, isSelected: item === selectedSort }\">\n {{ item }}\n </slot>\n </BaseEventButton>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { Sort } from '@empathyco/x-types';\n import { mixins } from 'vue-class-component';\n import { Component, Prop } from 'vue-property-decorator';\n import Vue from 'vue';\n import { BaseEventButton } from '../../../components';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { VueCSSClasses } from '../../../utils';\n import { XEventsTypes } from '../../../wiring';\n import { searchXModule } from '../x-module';\n import { dynamicPropsMixin } from '../../../components/dynamic-props.mixin';\n import SortMixin from './sort.mixin';\n\n /**\n * Sort Picker item options.\n *\n * @public\n */\n interface SortPickerItem {\n item: Sort;\n cssClasses: VueCSSClasses;\n event: Partial<XEventsTypes>;\n }\n /**\n * The `SortPickerList` component allows user to select the search results order. This component\n * also allows to change the selected sort programmatically.\n *\n * @remarks It extends {@link SortMixin}.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(searchXModule), dynamicPropsMixin(['buttonClass'])],\n components: {\n BaseEventButton\n }\n })\n export default class SortPickerList extends mixins(SortMixin) {\n /**\n * The transition to use for rendering the list.\n *\n * @public\n */\n @Prop({ default: 'div' })\n public animation?: string | typeof Vue;\n /**\n * Sort list items.\n *\n * @returns A list of items with their css class and the event associate to it.\n *\n * @internal\n */\n protected get listItems(): SortPickerItem[] {\n return this.items.map(item => ({\n item,\n cssClasses: [\n {\n 'x-selected': item === this.selectedSort\n }\n ],\n event: { UserClickedASort: item }\n }));\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Sort Picker List\n\nThe `SortPickerList` component can be used to change the way the search results are ordered.\n\nTo do so, the list of valid sort values has to be provided using the `items` prop. These are the\nvalues that can then be received in the `SearchAdapter`.\n\nThe component also optionally accepts the selected sort, which can be set using the `value` prop.\nThis prop allows changing programmatically the selected sort, as it will be synced with the store\nimmediately. If this prop is not provided, the first item from the `items` prop will be the one\nselected by default.\n\nThis component also allows customizing each one of the possible sort values. This can be done with\nthe `default` slot.\n\n## Examples\n\n### Only providing the list of items\n\n```vue\n<template>\n <SortPickerList :items=\"sortValues\">\n <template #item=\"{ item, isSelected }\">Item: {{ item }}</template>\n </SortPickerList>\n</template>\n\n<script>\n import { SortPickerList } from '@empathyco/x-components/search';\n\n export default {\n components: {\n SortPickerList\n },\n data() {\n return { sortValues: ['Relevance', 'Price asc', 'Price desc'] };\n }\n };\n</script>\n```\n\n### Providing also the selected value\n\n```vue\n<template>\n <SortPickerList v-model=\"selectedSort\" :items=\"sortValues\">\n <template #item=\"{ item, isSelected }\">\n <span v-if=\"isSelected\">✅</span>\n {{ item }}\n </template>\n </SortPickerList>\n</template>\n\n<script>\n import { SortPickerList } from '@empathyco/x-components/search';\n\n export default {\n components: {\n SortPickerList\n },\n data() {\n return {\n selectedSort: 'Price asc',\n sortValues: ['Relevance', 'Price asc', 'Price desc']\n };\n }\n };\n</script>\n```\n\n### Customizing the items with classes\n\nThe `buttonClass` prop can be used to add classes to the sort items.\n\n```vue\n<template>\n <SortPickerList :items=\"sortValues\" buttonClass=\"x-button-outlined\" />\n</template>\n\n<script>\n import { SortPickerList } from '@empathyco/x-components/search';\n\n export default {\n components: {\n SortPickerList\n },\n data() {\n return { sortValues: ['Relevance', 'Price asc', 'Price desc'] };\n }\n };\n</script>\n```\n\n## Events\n\nThis component emits 2 different events:\n\n- SelectedSortProvided: To sync the selected sort with the store state value. This event is emitted\n as soon as the list of items is received, whenever this list changes if there is no provided\n value, and when the provided value changes.\n- UserClickedASort: As its name suggest, the event is emitted after the user clicks one of the sort\n options. This does not mean that the sort has changed, only that the user has clicked it.\n</docs>\n"],"names":[],"mappings":";;;;AAEA,MAAc,cAAA,GAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,195 @@
1
+ import { __decorate } from 'tslib';
2
+ import { mixins } from 'vue-class-component';
3
+ import { Prop, Component } from 'vue-property-decorator';
4
+ import '../../../components/animations/animate-width.vue.js';
5
+ import '../../../components/animations/collapse-height.vue.js';
6
+ import '../../../components/animations/collapse-width.vue.js';
7
+ import '../../../components/animations/cross-fade.vue.js';
8
+ import '../../../components/animations/fade.vue.js';
9
+ import '../../../components/animations/fade-and-slide.vue.js';
10
+ import '../../../components/animations/staggered-fade-and-slide.vue.js';
11
+ import '../../../components/animations/staggering-transition-group.vue_rollup-plugin-vue_script.vue.js';
12
+ import '../../../components/animations/staggering-transition-group.vue_rollup-plugin-vue_styles.0.vue.js';
13
+ import 'vue-runtime-helpers/dist/normalize-component.mjs';
14
+ import '../../../components/animations/disable-animation.mixin.js';
15
+ import 'vue';
16
+ import '../../../components/animations/animate-clip-path/animate-clip-path.style.scss.js';
17
+ import '../../../components/animations/animate-scale/animate-scale.style.scss.js';
18
+ import '../../../components/animations/animate-translate/animate-translate.style.scss.js';
19
+ import '../../../components/column-picker/base-column-picker-dropdown.vue.js';
20
+ import '../../../components/column-picker/base-column-picker-list.vue.js';
21
+ import '../../../components/column-picker/column-picker.mixin.js';
22
+ import '../../../components/currency/base-currency.vue.js';
23
+ import '../../../components/filters/labels/base-price-filter-label.vue_rollup-plugin-vue_script.vue.js';
24
+ import '../../../components/filters/labels/base-rating-filter-label.vue.js';
25
+ import '../../../components/icons/arrow-down.vue.js';
26
+ import '../../../components/icons/arrow-left.vue.js';
27
+ import '../../../components/icons/arrow-right.vue.js';
28
+ import '../../../components/icons/arrow-up.vue.js';
29
+ import '../../../components/icons/bag.vue.js';
30
+ import '../../../components/icons/bar-code.vue.js';
31
+ import '../../../components/icons/barcode-tiny.vue.js';
32
+ import '../../../components/icons/cart.vue.js';
33
+ import '../../../components/icons/cart-filled.vue.js';
34
+ import '../../../components/icons/check-tiny.vue.js';
35
+ import '../../../components/icons/check.vue.js';
36
+ import '../../../components/icons/checkbox-selected.vue.js';
37
+ import '../../../components/icons/checkbox-selected-filled.vue.js';
38
+ import '../../../components/icons/checkbox-unselected.vue.js';
39
+ import '../../../components/icons/checkbox-unselected-filled.vue.js';
40
+ import '../../../components/icons/chevron-down.vue.js';
41
+ import '../../../components/icons/chevron-left.vue.js';
42
+ import '../../../components/icons/chevron-right.vue.js';
43
+ import '../../../components/icons/chevron-tiny-down.vue.js';
44
+ import '../../../components/icons/chevron-tiny-left.vue.js';
45
+ import '../../../components/icons/chevron-tiny-right.vue.js';
46
+ import '../../../components/icons/chevron-tiny-up.vue.js';
47
+ import '../../../components/icons/chevron-up.vue.js';
48
+ import '../../../components/icons/corner-arrow-left.vue.js';
49
+ import '../../../components/icons/corner-arrow-right.vue.js';
50
+ import '../../../components/icons/cross-tiny.vue.js';
51
+ import '../../../components/icons/cross.vue.js';
52
+ import '../../../components/icons/curated-check.vue.js';
53
+ import '../../../components/icons/curated-check-filled.vue.js';
54
+ import '../../../components/icons/curated-check-tiny.vue.js';
55
+ import '../../../components/icons/curated-check-tiny-filled.vue.js';
56
+ import '../../../components/icons/diagonal-arrow-left-down.vue.js';
57
+ import '../../../components/icons/diagonal-arrow-left-top.vue.js';
58
+ import '../../../components/icons/diagonal-arrow-right-down.vue.js';
59
+ import '../../../components/icons/diagonal-arrow-right-top.vue.js';
60
+ import '../../../components/icons/filters.vue.js';
61
+ import '../../../components/icons/grid-1-col.vue.js';
62
+ import '../../../components/icons/grid-2-col.vue.js';
63
+ import '../../../components/icons/grid-4-col.vue.js';
64
+ import '../../../components/icons/grid-2-rows.vue.js';
65
+ import '../../../components/icons/heart.vue.js';
66
+ import '../../../components/icons/heart-filled.vue.js';
67
+ import '../../../components/icons/hide.vue.js';
68
+ import '../../../components/icons/history-tiny.vue.js';
69
+ import '../../../components/icons/history.vue.js';
70
+ import '../../../components/icons/light-bulb-off.vue.js';
71
+ import '../../../components/icons/light-bulb-on.vue.js';
72
+ import '../../../components/icons/menu.vue.js';
73
+ import '../../../components/icons/minus-tiny.vue.js';
74
+ import '../../../components/icons/minus.vue.js';
75
+ import '../../../components/icons/plus.vue.js';
76
+ import '../../../components/icons/plus-tiny.vue.js';
77
+ import '../../../components/icons/radiobutton-selected.vue.js';
78
+ import '../../../components/icons/radiobutton-unselected.vue.js';
79
+ import '../../../components/icons/search.vue.js';
80
+ import '../../../components/icons/settings.vue.js';
81
+ import '../../../components/icons/show.vue.js';
82
+ import '../../../components/icons/sort-az.vue.js';
83
+ import '../../../components/icons/sort-price-down.vue.js';
84
+ import '../../../components/icons/sort-price-up.vue.js';
85
+ import '../../../components/icons/sort-relevancy.vue.js';
86
+ import '../../../components/icons/sort-za.vue.js';
87
+ import '../../../components/icons/star.vue.js';
88
+ import '../../../components/icons/star-filled.vue.js';
89
+ import '../../../components/icons/search-tiny.vue.js';
90
+ import '../../../components/icons/tag.vue.js';
91
+ import '../../../components/icons/tag-filled.vue.js';
92
+ import '../../../components/icons/trash-open.vue.js';
93
+ import '../../../components/icons/trash.vue.js';
94
+ import '../../../components/icons/trending-tiny.vue.js';
95
+ import '../../../components/icons/trending.vue.js';
96
+ import '../../../components/icons/user.vue.js';
97
+ import '../../../components/icons/user-filled.vue.js';
98
+ import '../../../components/layouts/fixed-header-and-asides-layout.vue.js';
99
+ import '../../../components/layouts/multi-column-max-width-layout.vue.js';
100
+ import '../../../components/layouts/single-column-layout.vue.js';
101
+ import '../../../components/modals/base-events-modal-close.vue.js';
102
+ import '../../../components/modals/base-events-modal.vue.js';
103
+ import '../../../components/modals/base-events-modal-open.vue.js';
104
+ import '../../../components/modals/base-modal.vue.js';
105
+ import '../../../components/modals/base-id-modal.vue.js';
106
+ import '../../../components/modals/base-id-modal-close.vue.js';
107
+ import '../../../components/modals/base-id-modal-open.vue.js';
108
+ import '../../../components/modals/close-main-modal.vue.js';
109
+ import '../../../components/modals/main-modal.vue.js';
110
+ import '../../../components/modals/open-main-modal.vue.js';
111
+ import '../../../components/panels/base-header-toggle-panel.vue.js';
112
+ import '../../../components/panels/base-toggle-panel.vue.js';
113
+ import '../../../components/panels/base-id-toggle-panel.vue.js';
114
+ import '../../../components/panels/base-id-toggle-panel-button.vue.js';
115
+ import '../../../components/panels/base-tabs-panel.vue.js';
116
+ import '../../../components/result/base-result-add-to-cart.vue.js';
117
+ import '../../../components/result/base-result-current-price.vue.js';
118
+ import '../../../components/result/base-result-image.vue.js';
119
+ import '../../../components/result/base-result-link.vue.js';
120
+ import '../../../components/result/base-result-previous-price.vue.js';
121
+ import '../../../components/result/base-result-fallback-image.vue.js';
122
+ import '../../../components/result/base-result-placeholder-image.vue.js';
123
+ import '../../../components/result/base-result-rating.vue.js';
124
+ import '../../../components/result/result-variants-provider.vue_rollup-plugin-vue_script.vue.js';
125
+ import '../../../components/result/result-variant-selector.vue.js';
126
+ import '../../../components/scroll/base-scroll.vue.js';
127
+ import '../../../components/scroll/scroll.mixin.js';
128
+ import '../../../components/suggestions/base-suggestion.vue.js';
129
+ import '../../../components/suggestions/base-suggestions.vue.js';
130
+ import '../../../components/auto-progress-bar.vue.js';
131
+ import '../../../components/base-dropdown.vue.js';
132
+ import __vue_component__ from '../../../components/base-event-button.vue.js';
133
+ import '../../../components/base-grid.vue.js';
134
+ import '../../../components/base-keyboard-navigation.vue.js';
135
+ import '../../../components/base-rating.vue.js';
136
+ import '../../../components/base-switch.vue.js';
137
+ import '../../../components/base-variable-column-grid.vue.js';
138
+ import '../../../components/global-x-bus.vue_rollup-plugin-vue_script.vue.js';
139
+ import '../../../components/highlight.vue.js';
140
+ import '../../../components/items-list.vue.js';
141
+ import '../../../components/location-provider.vue_rollup-plugin-vue_script.vue.js';
142
+ import '../../../components/no-element.js';
143
+ import '../../../components/sliding-panel.vue.js';
144
+ import '../../../components/snippet-callbacks.vue.js';
145
+ import 'rxjs';
146
+ import 'rxjs/operators';
147
+ import '../../../components/items-list-injection.mixin.js';
148
+ import { xComponentMixin } from '../../../components/x-component.mixin.js';
149
+ import { searchXModule } from '../x-module.js';
150
+ import { dynamicPropsMixin } from '../../../components/dynamic-props.mixin.js';
151
+ import SortMixin from './sort.mixin.js';
152
+
153
+ /**
154
+ * The `SortPickerList` component allows user to select the search results order. This component
155
+ * also allows to change the selected sort programmatically.
156
+ *
157
+ * @remarks It extends {@link SortMixin}.
158
+ *
159
+ * @public
160
+ */
161
+ let SortPickerList = class SortPickerList extends mixins(SortMixin) {
162
+ /**
163
+ * Sort list items.
164
+ *
165
+ * @returns A list of items with their css class and the event associate to it.
166
+ *
167
+ * @internal
168
+ */
169
+ get listItems() {
170
+ return this.items.map(item => ({
171
+ item,
172
+ cssClasses: [
173
+ {
174
+ 'x-selected': item === this.selectedSort
175
+ }
176
+ ],
177
+ event: { UserClickedASort: item }
178
+ }));
179
+ }
180
+ };
181
+ __decorate([
182
+ Prop({ default: 'div' })
183
+ ], SortPickerList.prototype, "animation", void 0);
184
+ SortPickerList = __decorate([
185
+ Component({
186
+ mixins: [xComponentMixin(searchXModule), dynamicPropsMixin(['buttonClass'])],
187
+ components: {
188
+ BaseEventButton: __vue_component__
189
+ }
190
+ })
191
+ ], SortPickerList);
192
+ var script = SortPickerList;
193
+
194
+ export { script as default };
195
+ //# sourceMappingURL=sort-picker-list.vue_rollup-plugin-vue_script.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-picker-list.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../../src/x-modules/search/components/sort-picker-list.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n import { Sort } from '@empathyco/x-types';\n import { mixins } from 'vue-class-component';\n import { Component, Prop } from 'vue-property-decorator';\n import Vue from 'vue';\n import { BaseEventButton } from '../../../components';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { VueCSSClasses } from '../../../utils';\n import { XEventsTypes } from '../../../wiring';\n import { searchXModule } from '../x-module';\n import { dynamicPropsMixin } from '../../../components/dynamic-props.mixin';\n import SortMixin from './sort.mixin';\n\n /**\n * Sort Picker item options.\n *\n * @public\n */\n interface SortPickerItem {\n item: Sort;\n cssClasses: VueCSSClasses;\n event: Partial<XEventsTypes>;\n }\n /**\n * The `SortPickerList` component allows user to select the search results order. This component\n * also allows to change the selected sort programmatically.\n *\n * @remarks It extends {@link SortMixin}.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(searchXModule), dynamicPropsMixin(['buttonClass'])],\n components: {\n BaseEventButton\n }\n })\n export default class SortPickerList extends mixins(SortMixin) {\n /**\n * The transition to use for rendering the list.\n *\n * @public\n */\n @Prop({ default: 'div' })\n public animation?: string | typeof Vue;\n /**\n * Sort list items.\n *\n * @returns A list of items with their css class and the event associate to it.\n *\n * @internal\n */\n protected get listItems(): SortPickerItem[] {\n return this.items.map(item => ({\n item,\n cssClasses: [\n {\n 'x-selected': item === this.selectedSort\n }\n ],\n event: { UserClickedASort: item }\n }));\n }\n }\n"],"names":["BaseEventButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CE;;;;;;;AAOG;AAOY,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,MAAM,CAAC,SAAS,CAAC,CAAA;AAQ3D;;;;;;AAMG;AACH,IAAA,IAAc,SAAS,GAAA;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK;YAC7B,IAAI;AACJ,YAAA,UAAU,EAAE;AACV,gBAAA;AACE,oBAAA,YAAY,EAAE,IAAI,KAAK,IAAI,CAAC,YAAY;AACzC,iBAAA;AACF,aAAA;AACD,YAAA,KAAK,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE;AAClC,SAAA,CAAC,CAAC,CAAC;KACL;CACF,CAAA;AAnBC,UAAA,CAAA;AADC,IAAA,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AACc,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAPpB,cAAc,GAAA,UAAA,CAAA;AANlC,IAAA,SAAS,CAAC;AACT,QAAA,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,EAAE,iBAAiB,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;AAC5E,QAAA,UAAU,EAAE;6BACVA,iBAAe;AAChB,SAAA;KACF,CAAC;AACmB,CAAA,EAAA,cAAc,CA0BlC,CAAA;aA1BoB,cAAc;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-components",
3
- "version": "3.0.0-alpha.358",
3
+ "version": "3.0.0-alpha.359",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -143,5 +143,5 @@
143
143
  "access": "public",
144
144
  "directory": "dist"
145
145
  },
146
- "gitHead": "70912f9cbfb4e0d921e22ed13d4107a2786bfce8"
146
+ "gitHead": "6ca064a467768220f7cb5df238384848091730e8"
147
147
  }
@@ -52223,6 +52223,73 @@
52223
52223
  },
52224
52224
  "implementsTokenRanges": []
52225
52225
  },
52226
+ {
52227
+ "kind": "Class",
52228
+ "canonicalReference": "@empathyco/x-components!SortPickerList:class",
52229
+ "docComment": "/**\n * The `SortPickerList` component allows user to select the search results order. This component also allows to change the selected sort programmatically.\n *\n * @remarks\n *\n * It extends {@link SortMixin}.\n *\n * @public\n */\n",
52230
+ "excerptTokens": [
52231
+ {
52232
+ "kind": "Content",
52233
+ "text": "export default class SortPickerList extends "
52234
+ },
52235
+ {
52236
+ "kind": "Reference",
52237
+ "text": "SortPickerList_base",
52238
+ "canonicalReference": "@empathyco/x-components!~SortPickerList_base"
52239
+ },
52240
+ {
52241
+ "kind": "Content",
52242
+ "text": " "
52243
+ }
52244
+ ],
52245
+ "fileUrlPath": "dist/types/x-modules/search/components/sort-picker-list.vue.d.ts",
52246
+ "releaseTag": "Public",
52247
+ "isAbstract": false,
52248
+ "name": "SortPickerList",
52249
+ "preserveMemberOrder": false,
52250
+ "members": [
52251
+ {
52252
+ "kind": "Property",
52253
+ "canonicalReference": "@empathyco/x-components!SortPickerList#animation:member",
52254
+ "docComment": "/**\n * The transition to use for rendering the list.\n *\n * @public\n */\n",
52255
+ "excerptTokens": [
52256
+ {
52257
+ "kind": "Content",
52258
+ "text": "animation?: "
52259
+ },
52260
+ {
52261
+ "kind": "Content",
52262
+ "text": "string | typeof "
52263
+ },
52264
+ {
52265
+ "kind": "Reference",
52266
+ "text": "Vue",
52267
+ "canonicalReference": "vue!Vue:var"
52268
+ },
52269
+ {
52270
+ "kind": "Content",
52271
+ "text": ";"
52272
+ }
52273
+ ],
52274
+ "isReadonly": false,
52275
+ "isOptional": true,
52276
+ "releaseTag": "Public",
52277
+ "name": "animation",
52278
+ "propertyTypeTokenRange": {
52279
+ "startIndex": 1,
52280
+ "endIndex": 3
52281
+ },
52282
+ "isStatic": false,
52283
+ "isProtected": false,
52284
+ "isAbstract": false
52285
+ }
52286
+ ],
52287
+ "extendsTokenRange": {
52288
+ "startIndex": 1,
52289
+ "endIndex": 2
52290
+ },
52291
+ "implementsTokenRanges": []
52292
+ },
52226
52293
  {
52227
52294
  "kind": "Variable",
52228
52295
  "canonicalReference": "@empathyco/x-components!SortPriceDownIcon:var",
@@ -4842,6 +4842,17 @@ export class SortMixin extends Vue_2 {
4842
4842
  selectedSort: Sort;
4843
4843
  }
4844
4844
 
4845
+ // Warning: (ae-forgotten-export) The symbol "SortPickerList_base" needs to be exported by the entry point index.d.ts
4846
+ //
4847
+ // @public
4848
+ export class SortPickerList extends SortPickerList_base {
4849
+ animation?: string | typeof Vue_2;
4850
+ // Warning: (ae-forgotten-export) The symbol "SortPickerItem" needs to be exported by the entry point index.d.ts
4851
+ //
4852
+ // @internal
4853
+ protected get listItems(): SortPickerItem[];
4854
+ }
4855
+
4845
4856
  // @public (undocumented)
4846
4857
  export const SortPriceDownIcon: {};
4847
4858
 
package/search/index.js CHANGED
@@ -9,6 +9,7 @@ export { default as Redirection } from '../js/x-modules/search/components/redire
9
9
  export { default as ResultsList } from '../js/x-modules/search/components/results-list.vue.js';
10
10
  export { default as SortDropdown } from '../js/x-modules/search/components/sort-dropdown.vue.js';
11
11
  export { default as SortList } from '../js/x-modules/search/components/sort-list.vue.js';
12
+ export { default as SortPickerList } from '../js/x-modules/search/components/sort-picker-list.vue.js';
12
13
  export { default as SortMixin } from '../js/x-modules/search/components/sort.mixin.js';
13
14
  export { default as Spellcheck } from '../js/x-modules/search/components/spellcheck.vue.js';
14
15
  export { default as SpellcheckButton } from '../js/x-modules/search/components/spellcheck-button.vue.js';
@@ -9,6 +9,7 @@ export { default as Redirection } from './redirection.vue';
9
9
  export { default as ResultsList } from './results-list.vue';
10
10
  export { default as SortDropdown } from './sort-dropdown.vue';
11
11
  export { default as SortList } from './sort-list.vue';
12
+ export { default as SortPickerList } from './sort-picker-list.vue';
12
13
  export { default as SortMixin } from './sort.mixin';
13
14
  export { default as Spellcheck } from './spellcheck.vue';
14
15
  export { default as SpellcheckButton } from './spellcheck-button.vue';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/search/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/search/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { Sort } from '@empathyco/x-types';
2
+ import Vue from 'vue';
3
+ import { VueCSSClasses } from '../../../utils';
4
+ import { XEventsTypes } from '../../../wiring';
5
+ import SortMixin from './sort.mixin';
6
+ /**
7
+ * Sort Picker item options.
8
+ *
9
+ * @public
10
+ */
11
+ interface SortPickerItem {
12
+ item: Sort;
13
+ cssClasses: VueCSSClasses;
14
+ event: Partial<XEventsTypes>;
15
+ }
16
+ declare const SortPickerList_base: import("vue-class-component/lib/declarations").VueClass<SortMixin>;
17
+ /**
18
+ * The `SortPickerList` component allows user to select the search results order. This component
19
+ * also allows to change the selected sort programmatically.
20
+ *
21
+ * @remarks It extends {@link SortMixin}.
22
+ *
23
+ * @public
24
+ */
25
+ export default class SortPickerList extends SortPickerList_base {
26
+ /**
27
+ * The transition to use for rendering the list.
28
+ *
29
+ * @public
30
+ */
31
+ animation?: string | typeof Vue;
32
+ /**
33
+ * Sort list items.
34
+ *
35
+ * @returns A list of items with their css class and the event associate to it.
36
+ *
37
+ * @internal
38
+ */
39
+ protected get listItems(): SortPickerItem[];
40
+ }
41
+ export {};
42
+ //# sourceMappingURL=sort-picker-list.vue?rollup-plugin-vue=script.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-picker-list.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/search/components/sort-picker-list.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAyBE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG1C,OAAO,GAAG,MAAM,KAAK,CAAC;AAGtB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC;;;;GAIG;AACH,UAAU,cAAc;IACtB,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,aAAa,CAAC;IAC1B,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CAC9B;;AACD;;;;;;;GAOG;AAOH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,mBAAiB;IAC3D;;;;OAIG;IAEI,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,CAAC;IACvC;;;;;;OAMG;IACH,SAAS,KAAK,SAAS,IAAI,cAAc,EAAE,CAU1C;CACF"}