@empathyco/x-components 3.0.0-alpha.28 → 3.0.0-alpha.29

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/docs/API-reference/api/x-components.md +1 -0
  3. package/docs/API-reference/api/x-components.seturlsort.md +13 -0
  4. package/docs/API-reference/api/x-components.sortmixin.items.md +1 -1
  5. package/docs/API-reference/api/x-components.sortmixin.md +2 -3
  6. package/docs/API-reference/api/x-components.sortmixin.providedselectedsort.md +1 -1
  7. package/docs/API-reference/api/x-components.urlmutations.md +1 -0
  8. package/docs/API-reference/api/x-components.urlmutations.setsort.md +24 -0
  9. package/docs/API-reference/components/search/x-components.sort-dropdown.md +4 -5
  10. package/docs/API-reference/components/search/x-components.sort-list.md +4 -5
  11. package/js/index.js +1 -1
  12. package/js/x-modules/search/components/sort.mixin.js +2 -6
  13. package/js/x-modules/search/components/sort.mixin.js.map +1 -1
  14. package/js/x-modules/search/store/actions/set-url-params.action.js +2 -1
  15. package/js/x-modules/search/store/actions/set-url-params.action.js.map +1 -1
  16. package/js/x-modules/url/store/module.js +3 -0
  17. package/js/x-modules/url/store/module.js.map +1 -1
  18. package/js/x-modules/url/wiring.js +10 -1
  19. package/js/x-modules/url/wiring.js.map +1 -1
  20. package/package.json +2 -2
  21. package/report/x-components.api.json +76 -30
  22. package/report/x-components.api.md +7 -1
  23. package/types/x-modules/search/components/sort.mixin.d.ts +3 -11
  24. package/types/x-modules/search/components/sort.mixin.d.ts.map +1 -1
  25. package/types/x-modules/search/store/actions/set-url-params.action.d.ts.map +1 -1
  26. package/types/x-modules/url/store/module.d.ts.map +1 -1
  27. package/types/x-modules/url/store/types.d.ts +6 -0
  28. package/types/x-modules/url/store/types.d.ts.map +1 -1
  29. package/types/x-modules/url/wiring.d.ts +9 -0
  30. package/types/x-modules/url/wiring.d.ts.map +1 -1
  31. package/url/index.js +1 -1
  32. package/docs/API-reference/api/x-components.sortmixin.value.md +0 -13
package/CHANGELOG.md CHANGED
@@ -3,6 +3,19 @@
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.29](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.28...@empathyco/x-components@3.0.0-alpha.29) (2021-11-09)
7
+
8
+ ### Features
9
+
10
+ - **url:** set sort values and read them from the url
11
+ ([6d98ca3](https://github.com/empathyco/x/commit/6d98ca3e031a9075c27f436419818e2d85b610cc)),
12
+ closes [EX-3517](https://searchbroker.atlassian.net/browse/EX-3517)
13
+
14
+ # Change Log
15
+
16
+ All notable changes to this project will be documented in this file. See
17
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
18
+
6
19
  ## [3.0.0-alpha.28](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.27...@empathyco/x-components@3.0.0-alpha.28) (2021-11-03)
7
20
 
8
21
  ### Features
@@ -491,6 +491,7 @@ X-Components is a library usable everywhere not only for search experiences.
491
491
  | [setUrlParamsWire](./x-components.seturlparamswire.md) | Saves the params from the url. |
492
492
  | [setUrlQuery](./x-components.seturlquery.md) | Sets the query of the url module. |
493
493
  | [setUrlRelatedTags](./x-components.seturlrelatedtags.md) | Sets the [related tags](./x-components.relatedtag.md)<!-- -->. |
494
+ | [setUrlSort](./x-components.seturlsort.md) | Sets the sort of the url module. |
494
495
  | [ShowIcon](./x-components.showicon.md) | |
495
496
  | [StarIcon](./x-components.staricon.md) | |
496
497
  | [storageKey](./x-components.storagekey.md) | Default implementation for the [HistoryQueriesGetters.storageKey](./x-components.historyqueriesgetters.storagekey.md) getter. |
@@ -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; [setUrlSort](./x-components.seturlsort.md)
4
+
5
+ ## setUrlSort variable
6
+
7
+ Sets the sort of the url module.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ setUrlSort: import("../..").Wire<string>
13
+ ```
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## SortMixin.items property
6
6
 
7
- The list of possible sort values. If the [SortMixin.value](./x-components.sortmixin.value.md) option is not provided, the first item of this list will be selected.
7
+ The list of possible sort values. If there are no values selected, the first item of this list will be selected.
8
8
 
9
9
  <b>Signature:</b>
10
10
 
@@ -17,7 +17,6 @@ export default class SortMixin extends Vue
17
17
 
18
18
  | Property | Modifiers | Type | Description |
19
19
  | --- | --- | --- | --- |
20
- | [items](./x-components.sortmixin.items.md) | | Sort\[\] | The list of possible sort values. If the [SortMixin.value](./x-components.sortmixin.value.md) option is not provided, the first item of this list will be selected. |
21
- | [providedSelectedSort](./x-components.sortmixin.providedselectedsort.md) | | Sort | Emits the [SelectedSortProvided](./x-components.searchxevents.selectedsortprovided.md) event whenever the provided [SortMixin.value](./x-components.sortmixin.value.md) changes. If no value is provided, the first item of the [SortMixin.items](./x-components.sortmixin.items.md) will be used as fallback. |
22
- | [value?](./x-components.sortmixin.value.md) | | Sort | <i>(Optional)</i> The selected sort value. This is an optional prop that allows to change programmatically the selected sort. If it is not provided, the first item of the [SortMixin.items](./x-components.sortmixin.items.md) list will be selected. |
20
+ | [items](./x-components.sortmixin.items.md) | | Sort\[\] | The list of possible sort values. If there are no values selected, the first item of this list will be selected. |
21
+ | [providedSelectedSort](./x-components.sortmixin.providedselectedsort.md) | | Sort | Emits the [SelectedSortProvided](./x-components.searchxevents.selectedsortprovided.md) event whenever the provided changes. If no value is provided, the first item of the [SortMixin.items](./x-components.sortmixin.items.md) will be used as fallback. |
23
22
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## SortMixin.providedSelectedSort property
6
6
 
7
- Emits the [SelectedSortProvided](./x-components.searchxevents.selectedsortprovided.md) event whenever the provided [SortMixin.value](./x-components.sortmixin.value.md) changes. If no value is provided, the first item of the [SortMixin.items](./x-components.sortmixin.items.md) will be used as fallback.
7
+ Emits the [SelectedSortProvided](./x-components.searchxevents.selectedsortprovided.md) event whenever the provided changes. If no value is provided, the first item of the [SortMixin.items](./x-components.sortmixin.items.md) will be used as fallback.
8
8
 
9
9
  <b>Signature:</b>
10
10
 
@@ -22,4 +22,5 @@ export interface UrlMutations
22
22
  | [setParams(params)](./x-components.urlmutations.setparams.md) | Sets the new params. |
23
23
  | [setQuery(query)](./x-components.urlmutations.setquery.md) | Sets the new query. |
24
24
  | [setRelatedTags(relatedTags)](./x-components.urlmutations.setrelatedtags.md) | Sets the related tags. |
25
+ | [setSort(sort)](./x-components.urlmutations.setsort.md) | Sets the new sort. |
25
26
 
@@ -0,0 +1,24 @@
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; [UrlMutations](./x-components.urlmutations.md) &gt; [setSort](./x-components.urlmutations.setsort.md)
4
+
5
+ ## UrlMutations.setSort() method
6
+
7
+ Sets the new sort.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ setSort(sort: string): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | sort | string | The new sort of the url. |
20
+
21
+ <b>Returns:</b>
22
+
23
+ void
24
+
@@ -10,11 +10,10 @@ sidebar_label: Sort Dropdown
10
10
 
11
11
  ## Props
12
12
 
13
- | Name | Description | Type | Default |
14
- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------------- |
15
- | <code>items</code> | The list of possible sort values. If the {@link SortMixin.value} option<br />is not provided, the first item of this list will be selected. | <code>Array</code> | <code></code> |
16
- | <code>value</code> | The selected sort value. This is an optional prop that allows to change programmatically<br />the selected sort. If it is not provided, the first item of the {@link SortMixin.items}<br />list will be selected. | <code>Sort</code> | <code></code> |
17
- | <code>animation</code> | The transition to use for opening and closing the dropdown. | <code>union</code> | <code></code> |
13
+ | Name | Description | Type | Default |
14
+ | ---------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------ | ------------- |
15
+ | <code>items</code> | The list of possible sort values. If there are no values selected, the first item of<br />this list will be selected. | <code>Array</code> | <code></code> |
16
+ | <code>animation</code> | The transition to use for opening and closing the dropdown. | <code>union</code> | <code></code> |
18
17
 
19
18
  ## Events
20
19
 
@@ -10,11 +10,10 @@ sidebar_label: Sort List
10
10
 
11
11
  ## Props
12
12
 
13
- | Name | Description | Type | Default |
14
- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----------------- |
15
- | <code>items</code> | The list of possible sort values. If the {@link SortMixin.value} option<br />is not provided, the first item of this list will be selected. | <code>Array</code> | <code></code> |
16
- | <code>value</code> | The selected sort value. This is an optional prop that allows to change programmatically<br />the selected sort. If it is not provided, the first item of the {@link SortMixin.items}<br />list will be selected. | <code>Sort</code> | <code></code> |
17
- | <code>animation</code> | The transition to use for rendering the list. | <code>union</code> | <code>'ul'</code> |
13
+ | Name | Description | Type | Default |
14
+ | ---------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------ | ----------------- |
15
+ | <code>items</code> | The list of possible sort values. If there are no values selected, the first item of<br />this list will be selected. | <code>Array</code> | <code></code> |
16
+ | <code>animation</code> | The transition to use for rendering the list. | <code>union</code> | <code>'ul'</code> |
18
17
 
19
18
  ## Slots
20
19
 
package/js/index.js CHANGED
@@ -303,7 +303,7 @@ export { taggingWiring } from './x-modules/tagging/wiring.js';
303
303
  export { taggingXModule } from './x-modules/tagging/x-module.js';
304
304
  export { urlXStoreModule } from './x-modules/url/store/module.js';
305
305
  export { replaceableParams, urlEmitters } from './x-modules/url/store/emitters.js';
306
- export { setInitialExtraParams, setParams, setUrlFilters, setUrlPage, setUrlQuery, setUrlRelatedTags, urlWiring } from './x-modules/url/wiring.js';
306
+ export { setInitialExtraParams, setParams, setUrlFilters, setUrlPage, setUrlQuery, setUrlRelatedTags, setUrlSort, urlWiring } from './x-modules/url/wiring.js';
307
307
  export { urlXModule } from './x-modules/url/x-module.js';
308
308
  export { default as UrlHandler } from './x-modules/url/components/url-handler.vue.js';
309
309
  //# sourceMappingURL=index.js.map
@@ -122,7 +122,7 @@ var SortMixin = /** @class */ (function (_super) {
122
122
  Object.defineProperty(SortMixin.prototype, "providedSelectedSort", {
123
123
  /**
124
124
  * Emits the {@link SearchXEvents.SelectedSortProvided | SelectedSortProvided} event whenever the
125
- * provided {@link SortMixin.value} changes. If no value is provided, the first item of the
125
+ * provided {@link SortMixin.selectedSort} changes. If no value is provided, the first item of the
126
126
  * {@link SortMixin.items} will be used as fallback.
127
127
  *
128
128
  * @returns The sorting value.
@@ -130,8 +130,7 @@ var SortMixin = /** @class */ (function (_super) {
130
130
  * @public
131
131
  */
132
132
  get: function () {
133
- var _a;
134
- return (_a = this.value) !== null && _a !== void 0 ? _a : this.items[0];
133
+ return this.selectedSort;
135
134
  },
136
135
  enumerable: false,
137
136
  configurable: true
@@ -142,9 +141,6 @@ var SortMixin = /** @class */ (function (_super) {
142
141
  __decorate([
143
142
  State('search', 'sort')
144
143
  ], SortMixin.prototype, "selectedSort", void 0);
145
- __decorate([
146
- Prop()
147
- ], SortMixin.prototype, "value", void 0);
148
144
  __decorate([
149
145
  XEmit('SelectedSortProvided')
150
146
  ], SortMixin.prototype, "providedSelectedSort", null);
@@ -1 +1 @@
1
- {"version":3,"file":"sort.mixin.js","sources":["../../../../../src/x-modules/search/components/sort.mixin.ts"],"sourcesContent":["import { Sort } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport Component from 'vue-class-component';\nimport { Prop } from 'vue-property-decorator';\nimport { State, XEmit } from '../../../components';\n\n/**\n * Mixin to share Sort logic.\n *\n * @public\n */\n@Component\nexport default class SortMixin extends Vue {\n /**\n * The list of possible sort values. If the {@link SortMixin.value} option\n * is not provided, the first item of this list will be selected.\n *\n * @public\n */\n @Prop({ required: true })\n public items!: Sort[];\n\n /**\n * The search module selected sort. This is the source of truth when checking which\n * sort is selected.\n *\n * @internal\n */\n @State('search', 'sort')\n public selectedSort!: Sort;\n\n /**\n * The selected sort value. This is an optional prop that allows to change programmatically\n * the selected sort. If it is not provided, the first item of the {@link SortMixin.items}\n * list will be selected.\n *\n * @public\n */\n @Prop()\n public value?: Sort;\n\n /**\n * Emits the {@link SearchXEvents.SelectedSortProvided | SelectedSortProvided} event whenever the\n * provided {@link SortMixin.value} changes. If no value is provided, the first item of the\n * {@link SortMixin.items} will be used as fallback.\n *\n * @returns The sorting value.\n *\n * @public\n */\n @XEmit('SelectedSortProvided')\n public get providedSelectedSort(): Sort {\n return this.value ?? this.items[0];\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;AAMA;IAAuC,6BAAG;IAA1C;;KA0CC;IAHC,sBAAW,2CAAoB;;;;;;;;;;aAA/B;;YACE,OAAO,MAAA,IAAI,CAAC,KAAK,mCAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SACpC;;;OAAA;IAjCD;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;4CACH;IAStB;QADC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;mDACG;IAU3B;QADC,IAAI,EAAE;4CACa;IAYpB;QADC,KAAK,CAAC,sBAAsB,CAAC;yDAG7B;IAzCkB,SAAS;QAD7B,SAAS;OACW,SAAS,CA0C7B;IAAD,gBAAC;CAAA,CA1CsC,GAAG;;;;"}
1
+ {"version":3,"file":"sort.mixin.js","sources":["../../../../../src/x-modules/search/components/sort.mixin.ts"],"sourcesContent":["import { Sort } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport Component from 'vue-class-component';\nimport { Prop } from 'vue-property-decorator';\nimport { State, XEmit } from '../../../components';\n\n/**\n * Mixin to share Sort logic.\n *\n * @public\n */\n@Component\nexport default class SortMixin extends Vue {\n /**\n * The list of possible sort values. If there are no values selected, the first item of\n * this list will be selected.\n *\n * @public\n */\n @Prop({ required: true })\n public items!: Sort[];\n\n /**\n * The search module selected sort. This is the source of truth when checking which\n * sort is selected.\n *\n * @internal\n */\n @State('search', 'sort')\n public selectedSort!: Sort;\n\n /**\n * Emits the {@link SearchXEvents.SelectedSortProvided | SelectedSortProvided} event whenever the\n * provided {@link SortMixin.selectedSort} changes. If no value is provided, the first item of the\n * {@link SortMixin.items} will be used as fallback.\n *\n * @returns The sorting value.\n *\n * @public\n */\n @XEmit('SelectedSortProvided')\n public get providedSelectedSort(): Sort {\n return this.selectedSort;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;AAMA;IAAuC,6BAAG;IAA1C;;KAgCC;IAHC,sBAAW,2CAAoB;;;;;;;;;;aAA/B;YACE,OAAO,IAAI,CAAC,YAAY,CAAC;SAC1B;;;OAAA;IAvBD;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;4CACH;IAStB;QADC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;mDACG;IAY3B;QADC,KAAK,CAAC,sBAAsB,CAAC;yDAG7B;IA/BkB,SAAS;QAD7B,SAAS;OACW,SAAS,CAgC7B;IAAD,gBAAC;CAAA,CAhCsC,GAAG;;;;"}
@@ -10,9 +10,10 @@
10
10
  */
11
11
  var setUrlParams = function (_a, _b) {
12
12
  var commit = _a.commit;
13
- var query = _b.query, page = _b.page;
13
+ var query = _b.query, page = _b.page, sort = _b.sort;
14
14
  commit('setQuery', query);
15
15
  commit('setPage', page);
16
+ commit('setSort', sort);
16
17
  };
17
18
 
18
19
  export { setUrlParams };
@@ -1 +1 @@
1
- {"version":3,"file":"set-url-params.action.js","sources":["../../../../../../src/x-modules/search/store/actions/set-url-params.action.ts"],"sourcesContent":["import { SearchXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link SearchActions.setUrlParams}.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n *\n * @param urlParams - List of params from the url.\n *\n * @public\n */\nexport const setUrlParams: SearchXStoreModule['actions']['setUrlParams'] = (\n { commit },\n { query, page }\n) => {\n commit('setQuery', query);\n commit('setPage', page);\n};\n"],"names":[],"mappings":"AAEA;;;;;;;;;;IAUa,YAAY,GAAkD,UACzE,EAAU,EACV,EAAe;QADb,MAAM,YAAA;QACN,KAAK,WAAA,EAAE,IAAI,UAAA;IAEb,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAC1B,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC1B;;;;"}
1
+ {"version":3,"file":"set-url-params.action.js","sources":["../../../../../../src/x-modules/search/store/actions/set-url-params.action.ts"],"sourcesContent":["import { SearchXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link SearchActions.setUrlParams}.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n *\n * @param urlParams - List of params from the url.\n *\n * @public\n */\nexport const setUrlParams: SearchXStoreModule['actions']['setUrlParams'] = (\n { commit },\n { query, page, sort }\n) => {\n commit('setQuery', query);\n commit('setPage', page);\n commit('setSort', sort);\n};\n"],"names":[],"mappings":"AAEA;;;;;;;;;;IAUa,YAAY,GAAkD,UACzE,EAAU,EACV,EAAqB;QADnB,MAAM,YAAA;QACN,KAAK,WAAA,EAAE,IAAI,UAAA,EAAE,IAAI,UAAA;IAEnB,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAC1B,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACxB,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC1B;;;;"}
@@ -27,6 +27,9 @@ var urlXStoreModule = {
27
27
  setPage: function (state, page) {
28
28
  state.page = page;
29
29
  },
30
+ setSort: function (state, sort) {
31
+ state.sort = sort;
32
+ },
30
33
  setInitialExtraParams: function (state, extraParams) {
31
34
  state.initialExtraParams = extraParams;
32
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../../../../../src/x-modules/url/store/module.ts"],"sourcesContent":["import { urlParams } from './getters/url-params.getter';\nimport { initialUrlState } from './initial-state';\nimport { setParams } from './mutations/set-params.mutation';\nimport { UrlXStoreModule } from './types';\n\n/**\n * {@link XStoreModule} For the URL module.\n *\n * @internal\n */\nexport const urlXStoreModule: UrlXStoreModule = {\n state: () => ({\n ...initialUrlState,\n initialExtraParams: {}\n }),\n getters: {\n urlParams\n },\n mutations: {\n setParams,\n setQuery(state, query) {\n state.query = query;\n },\n setRelatedTags(state, relatedTags) {\n state.tag = relatedTags.map(relatedTag => relatedTag.tag);\n },\n setFilters(state, newFilters) {\n state.filter = newFilters.map(filter => filter.id as string);\n },\n setPage(state, page) {\n state.page = page;\n },\n setInitialExtraParams(state, extraParams) {\n state.initialExtraParams = extraParams;\n }\n },\n actions: {}\n};\n"],"names":[],"mappings":";;;;;AAKA;;;;;IAKa,eAAe,GAAoB;IAC9C,KAAK,EAAE,cAAM,8BACR,eAAe,KAClB,kBAAkB,EAAE,EAAE,OACtB;IACF,OAAO,EAAE;QACP,SAAS,WAAA;KACV;IACD,SAAS,EAAE;QACT,SAAS,WAAA;QACT,QAAQ,YAAC,KAAK,EAAE,KAAK;YACnB,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;SACrB;QACD,cAAc,YAAC,KAAK,EAAE,WAAW;YAC/B,KAAK,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG,CAAC,UAAA,UAAU,IAAI,OAAA,UAAU,CAAC,GAAG,GAAA,CAAC,CAAC;SAC3D;QACD,UAAU,EAAV,UAAW,KAAK,EAAE,UAAU;YAC1B,KAAK,CAAC,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,UAAA,MAAM,IAAI,OAAA,MAAM,CAAC,EAAY,GAAA,CAAC,CAAC;SAC9D;QACD,OAAO,YAAC,KAAK,EAAE,IAAI;YACjB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;SACnB;QACD,qBAAqB,YAAC,KAAK,EAAE,WAAW;YACtC,KAAK,CAAC,kBAAkB,GAAG,WAAW,CAAC;SACxC;KACF;IACD,OAAO,EAAE,EAAE;;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../../../../../src/x-modules/url/store/module.ts"],"sourcesContent":["import { urlParams } from './getters/url-params.getter';\nimport { initialUrlState } from './initial-state';\nimport { setParams } from './mutations/set-params.mutation';\nimport { UrlXStoreModule } from './types';\n\n/**\n * {@link XStoreModule} For the URL module.\n *\n * @internal\n */\nexport const urlXStoreModule: UrlXStoreModule = {\n state: () => ({\n ...initialUrlState,\n initialExtraParams: {}\n }),\n getters: {\n urlParams\n },\n mutations: {\n setParams,\n setQuery(state, query) {\n state.query = query;\n },\n setRelatedTags(state, relatedTags) {\n state.tag = relatedTags.map(relatedTag => relatedTag.tag);\n },\n setFilters(state, newFilters) {\n state.filter = newFilters.map(filter => filter.id as string);\n },\n setPage(state, page) {\n state.page = page;\n },\n setSort(state, sort) {\n state.sort = sort;\n },\n setInitialExtraParams(state, extraParams) {\n state.initialExtraParams = extraParams;\n }\n },\n actions: {}\n};\n"],"names":[],"mappings":";;;;;AAKA;;;;;IAKa,eAAe,GAAoB;IAC9C,KAAK,EAAE,cAAM,8BACR,eAAe,KAClB,kBAAkB,EAAE,EAAE,OACtB;IACF,OAAO,EAAE;QACP,SAAS,WAAA;KACV;IACD,SAAS,EAAE;QACT,SAAS,WAAA;QACT,QAAQ,YAAC,KAAK,EAAE,KAAK;YACnB,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;SACrB;QACD,cAAc,YAAC,KAAK,EAAE,WAAW;YAC/B,KAAK,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG,CAAC,UAAA,UAAU,IAAI,OAAA,UAAU,CAAC,GAAG,GAAA,CAAC,CAAC;SAC3D;QACD,UAAU,EAAV,UAAW,KAAK,EAAE,UAAU;YAC1B,KAAK,CAAC,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,UAAA,MAAM,IAAI,OAAA,MAAM,CAAC,EAAY,GAAA,CAAC,CAAC;SAC9D;QACD,OAAO,YAAC,KAAK,EAAE,IAAI;YACjB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;SACnB;QACD,OAAO,YAAC,KAAK,EAAE,IAAI;YACjB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;SACnB;QACD,qBAAqB,YAAC,KAAK,EAAE,WAAW;YACtC,KAAK,CAAC,kBAAkB,GAAG,WAAW,CAAC;SACxC;KACF;IACD,OAAO,EAAE,EAAE;;;;;"}
@@ -25,6 +25,12 @@ var setUrlQuery = wireCommit('setQuery');
25
25
  * @public
26
26
  */
27
27
  var setUrlPage = wireCommit('setPage');
28
+ /**
29
+ * Sets the sort of the url module.
30
+ *
31
+ * @public
32
+ */
33
+ var setUrlSort = wireCommit('setSort');
28
34
  /**
29
35
  * Sets the extra params of the url module.
30
36
  *
@@ -67,6 +73,9 @@ var urlWiring = createWiring({
67
73
  PageChanged: {
68
74
  setUrlPage: setUrlPage
69
75
  },
76
+ SortChanged: {
77
+ setUrlSort: setUrlSort
78
+ },
70
79
  ExtraParamsChanged: {
71
80
  setParams: setParams
72
81
  },
@@ -75,5 +84,5 @@ var urlWiring = createWiring({
75
84
  }
76
85
  });
77
86
 
78
- export { setInitialExtraParams, setParams, setUrlFilters, setUrlPage, setUrlQuery, setUrlRelatedTags, urlWiring };
87
+ export { setInitialExtraParams, setParams, setUrlFilters, setUrlPage, setUrlQuery, setUrlRelatedTags, setUrlSort, urlWiring };
79
88
  //# sourceMappingURL=wiring.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/url/wiring.ts"],"sourcesContent":["import { namespacedWireCommit } from '../../wiring/namespaced-wires.factory';\nimport { createWiring } from '../../wiring/wiring.utils';\n\n/**\n * WireCommit for {@link UrlXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit('url');\n\n/**\n * Sets the {@link RelatedTag | related tags }.\n *\n * @public\n */\nexport const setUrlRelatedTags = wireCommit('setRelatedTags');\n\n/**\n * Sets the query of the url module.\n *\n * @public\n */\nexport const setUrlQuery = wireCommit('setQuery');\n\n/**\n * Sets the page of the url module.\n *\n * @public\n */\nexport const setUrlPage = wireCommit('setPage');\n\n/**\n * Sets the extra params of the url module.\n *\n * @public\n */\nexport const setParams = wireCommit('setParams');\n\n/**\n * Sets the initial provided extra params.\n *\n * @public\n */\nexport const setInitialExtraParams = wireCommit('setInitialExtraParams');\n\n/**\n * Sets the filters of the url module.\n *\n * @public\n */\nexport const setUrlFilters = wireCommit('setFilters');\n\n/**\n * Wiring configuration for the {@link UrlXModule | url module}.\n *\n * @internal\n */\nexport const urlWiring = createWiring({\n UserAcceptedAQuery: {\n setUrlQuery\n },\n UserClearedQuery: {\n setUrlQuery\n },\n ParamsLoadedFromUrl: {\n setParams\n },\n SelectedRelatedTagsChanged: {\n setUrlRelatedTags\n },\n SelectedFiltersChanged: {\n setUrlFilters\n },\n PageChanged: {\n setUrlPage\n },\n ExtraParamsChanged: {\n setParams\n },\n ExtraParamsInitialized: {\n setInitialExtraParams\n }\n});\n"],"names":[],"mappings":";;;AAGA;;;;;AAKA,IAAM,UAAU,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAE/C;;;;;IAKa,iBAAiB,GAAG,UAAU,CAAC,gBAAgB,EAAE;AAE9D;;;;;IAKa,WAAW,GAAG,UAAU,CAAC,UAAU,EAAE;AAElD;;;;;IAKa,UAAU,GAAG,UAAU,CAAC,SAAS,EAAE;AAEhD;;;;;IAKa,SAAS,GAAG,UAAU,CAAC,WAAW,EAAE;AAEjD;;;;;IAKa,qBAAqB,GAAG,UAAU,CAAC,uBAAuB,EAAE;AAEzE;;;;;IAKa,aAAa,GAAG,UAAU,CAAC,YAAY,EAAE;AAEtD;;;;;IAKa,SAAS,GAAG,YAAY,CAAC;IACpC,kBAAkB,EAAE;QAClB,WAAW,aAAA;KACZ;IACD,gBAAgB,EAAE;QAChB,WAAW,aAAA;KACZ;IACD,mBAAmB,EAAE;QACnB,SAAS,WAAA;KACV;IACD,0BAA0B,EAAE;QAC1B,iBAAiB,mBAAA;KAClB;IACD,sBAAsB,EAAE;QACtB,aAAa,eAAA;KACd;IACD,WAAW,EAAE;QACX,UAAU,YAAA;KACX;IACD,kBAAkB,EAAE;QAClB,SAAS,WAAA;KACV;IACD,sBAAsB,EAAE;QACtB,qBAAqB,uBAAA;KACtB;CACF;;;;"}
1
+ {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/url/wiring.ts"],"sourcesContent":["import { namespacedWireCommit } from '../../wiring/namespaced-wires.factory';\nimport { createWiring } from '../../wiring/wiring.utils';\n\n/**\n * WireCommit for {@link UrlXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit('url');\n\n/**\n * Sets the {@link RelatedTag | related tags }.\n *\n * @public\n */\nexport const setUrlRelatedTags = wireCommit('setRelatedTags');\n\n/**\n * Sets the query of the url module.\n *\n * @public\n */\nexport const setUrlQuery = wireCommit('setQuery');\n\n/**\n * Sets the page of the url module.\n *\n * @public\n */\nexport const setUrlPage = wireCommit('setPage');\n\n/**\n * Sets the sort of the url module.\n *\n * @public\n */\nexport const setUrlSort = wireCommit('setSort');\n\n/**\n * Sets the extra params of the url module.\n *\n * @public\n */\nexport const setParams = wireCommit('setParams');\n\n/**\n * Sets the initial provided extra params.\n *\n * @public\n */\nexport const setInitialExtraParams = wireCommit('setInitialExtraParams');\n\n/**\n * Sets the filters of the url module.\n *\n * @public\n */\nexport const setUrlFilters = wireCommit('setFilters');\n\n/**\n * Wiring configuration for the {@link UrlXModule | url module}.\n *\n * @internal\n */\nexport const urlWiring = createWiring({\n UserAcceptedAQuery: {\n setUrlQuery\n },\n UserClearedQuery: {\n setUrlQuery\n },\n ParamsLoadedFromUrl: {\n setParams\n },\n SelectedRelatedTagsChanged: {\n setUrlRelatedTags\n },\n SelectedFiltersChanged: {\n setUrlFilters\n },\n PageChanged: {\n setUrlPage\n },\n SortChanged: {\n setUrlSort\n },\n ExtraParamsChanged: {\n setParams\n },\n ExtraParamsInitialized: {\n setInitialExtraParams\n }\n});\n"],"names":[],"mappings":";;;AAGA;;;;;AAKA,IAAM,UAAU,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAE/C;;;;;IAKa,iBAAiB,GAAG,UAAU,CAAC,gBAAgB,EAAE;AAE9D;;;;;IAKa,WAAW,GAAG,UAAU,CAAC,UAAU,EAAE;AAElD;;;;;IAKa,UAAU,GAAG,UAAU,CAAC,SAAS,EAAE;AAEhD;;;;;IAKa,UAAU,GAAG,UAAU,CAAC,SAAS,EAAE;AAEhD;;;;;IAKa,SAAS,GAAG,UAAU,CAAC,WAAW,EAAE;AAEjD;;;;;IAKa,qBAAqB,GAAG,UAAU,CAAC,uBAAuB,EAAE;AAEzE;;;;;IAKa,aAAa,GAAG,UAAU,CAAC,YAAY,EAAE;AAEtD;;;;;IAKa,SAAS,GAAG,YAAY,CAAC;IACpC,kBAAkB,EAAE;QAClB,WAAW,aAAA;KACZ;IACD,gBAAgB,EAAE;QAChB,WAAW,aAAA;KACZ;IACD,mBAAmB,EAAE;QACnB,SAAS,WAAA;KACV;IACD,0BAA0B,EAAE;QAC1B,iBAAiB,mBAAA;KAClB;IACD,sBAAsB,EAAE;QACtB,aAAa,eAAA;KACd;IACD,WAAW,EAAE;QACX,UAAU,YAAA;KACX;IACD,WAAW,EAAE;QACX,UAAU,YAAA;KACX;IACD,kBAAkB,EAAE;QAClB,SAAS,WAAA;KACV;IACD,sBAAsB,EAAE;QACtB,qBAAqB,uBAAA;KACtB;CACF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-components",
3
- "version": "3.0.0-alpha.28",
3
+ "version": "3.0.0-alpha.29",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -128,5 +128,5 @@
128
128
  "access": "public",
129
129
  "directory": "dist"
130
130
  },
131
- "gitHead": "a551d70b0499ca0068e70668a2bbf8ca5d5ce6be"
131
+ "gitHead": "abc95f0040c34f9a4acac5765e5fbf468f14b32a"
132
132
  }
@@ -37650,6 +37650,36 @@
37650
37650
  "endIndex": 6
37651
37651
  }
37652
37652
  },
37653
+ {
37654
+ "kind": "Variable",
37655
+ "canonicalReference": "@empathyco/x-components!setUrlSort:var",
37656
+ "docComment": "/**\n * Sets the sort of the url module.\n *\n * @public\n */\n",
37657
+ "excerptTokens": [
37658
+ {
37659
+ "kind": "Content",
37660
+ "text": "setUrlSort: "
37661
+ },
37662
+ {
37663
+ "kind": "Content",
37664
+ "text": "import(\"../..\")."
37665
+ },
37666
+ {
37667
+ "kind": "Reference",
37668
+ "text": "Wire",
37669
+ "canonicalReference": "@empathyco/x-components!Wire:type"
37670
+ },
37671
+ {
37672
+ "kind": "Content",
37673
+ "text": "<string>"
37674
+ }
37675
+ ],
37676
+ "releaseTag": "Public",
37677
+ "name": "setUrlSort",
37678
+ "variableTypeTokenRange": {
37679
+ "startIndex": 1,
37680
+ "endIndex": 4
37681
+ }
37682
+ },
37653
37683
  {
37654
37684
  "kind": "Variable",
37655
37685
  "canonicalReference": "@empathyco/x-components!ShowIcon:var",
@@ -38723,7 +38753,7 @@
38723
38753
  {
38724
38754
  "kind": "Property",
38725
38755
  "canonicalReference": "@empathyco/x-components!SortMixin#items:member",
38726
- "docComment": "/**\n * The list of possible sort values. If the {@link SortMixin.value} option is not provided, the first item of this list will be selected.\n *\n * @public\n */\n",
38756
+ "docComment": "/**\n * The list of possible sort values. If there are no values selected, the first item of this list will be selected.\n *\n * @public\n */\n",
38727
38757
  "excerptTokens": [
38728
38758
  {
38729
38759
  "kind": "Content",
@@ -38755,7 +38785,7 @@
38755
38785
  {
38756
38786
  "kind": "Property",
38757
38787
  "canonicalReference": "@empathyco/x-components!SortMixin#providedSelectedSort:member",
38758
- "docComment": "/**\n * Emits the {@link SearchXEvents.SelectedSortProvided | SelectedSortProvided} event whenever the provided {@link SortMixin.value} changes. If no value is provided, the first item of the {@link SortMixin.items} will be used as fallback.\n *\n * @returns The sorting value.\n *\n * @public\n */\n",
38788
+ "docComment": "/**\n * Emits the {@link SearchXEvents.SelectedSortProvided | SelectedSortProvided} event whenever the provided {@link SortMixin.selectedSort} changes. If no value is provided, the first item of the {@link SortMixin.items} will be used as fallback.\n *\n * @returns The sorting value.\n *\n * @public\n */\n",
38759
38789
  "excerptTokens": [
38760
38790
  {
38761
38791
  "kind": "Content",
@@ -38779,34 +38809,6 @@
38779
38809
  "endIndex": 2
38780
38810
  },
38781
38811
  "isStatic": false
38782
- },
38783
- {
38784
- "kind": "Property",
38785
- "canonicalReference": "@empathyco/x-components!SortMixin#value:member",
38786
- "docComment": "/**\n * The selected sort value. This is an optional prop that allows to change programmatically the selected sort. If it is not provided, the first item of the {@link SortMixin.items} list will be selected.\n *\n * @public\n */\n",
38787
- "excerptTokens": [
38788
- {
38789
- "kind": "Content",
38790
- "text": "value?: "
38791
- },
38792
- {
38793
- "kind": "Reference",
38794
- "text": "Sort",
38795
- "canonicalReference": "@empathyco/x-components!Sort:type"
38796
- },
38797
- {
38798
- "kind": "Content",
38799
- "text": ";"
38800
- }
38801
- ],
38802
- "isOptional": true,
38803
- "releaseTag": "Public",
38804
- "name": "value",
38805
- "propertyTypeTokenRange": {
38806
- "startIndex": 1,
38807
- "endIndex": 2
38808
- },
38809
- "isStatic": false
38810
38812
  }
38811
38813
  ],
38812
38814
  "extendsTokenRange": {
@@ -41297,6 +41299,50 @@
41297
41299
  }
41298
41300
  ],
41299
41301
  "name": "setRelatedTags"
41302
+ },
41303
+ {
41304
+ "kind": "MethodSignature",
41305
+ "canonicalReference": "@empathyco/x-components!UrlMutations#setSort:member(1)",
41306
+ "docComment": "/**\n * Sets the new sort.\n *\n * @param sort - The new sort of the url.\n */\n",
41307
+ "excerptTokens": [
41308
+ {
41309
+ "kind": "Content",
41310
+ "text": "setSort(sort: "
41311
+ },
41312
+ {
41313
+ "kind": "Content",
41314
+ "text": "string"
41315
+ },
41316
+ {
41317
+ "kind": "Content",
41318
+ "text": "): "
41319
+ },
41320
+ {
41321
+ "kind": "Content",
41322
+ "text": "void"
41323
+ },
41324
+ {
41325
+ "kind": "Content",
41326
+ "text": ";"
41327
+ }
41328
+ ],
41329
+ "isOptional": false,
41330
+ "returnTypeTokenRange": {
41331
+ "startIndex": 3,
41332
+ "endIndex": 4
41333
+ },
41334
+ "releaseTag": "Public",
41335
+ "overloadIndex": 1,
41336
+ "parameters": [
41337
+ {
41338
+ "parameterName": "sort",
41339
+ "parameterTypeTokenRange": {
41340
+ "startIndex": 1,
41341
+ "endIndex": 2
41342
+ }
41343
+ }
41344
+ ],
41345
+ "name": "setSort"
41300
41346
  }
41301
41347
  ],
41302
41348
  "extendsTokenRanges": []
@@ -3537,6 +3537,9 @@ export const setUrlQuery: Wire<string>;
3537
3537
  // @public
3538
3538
  export const setUrlRelatedTags: Wire<RelatedTag_2[]>;
3539
3539
 
3540
+ // @public
3541
+ export const setUrlSort: Wire<string>;
3542
+
3540
3543
  // @internal
3541
3544
  export function setXComponentXModuleName(component: Vue_2, name: XModuleName): void;
3542
3545
 
@@ -3692,7 +3695,6 @@ export class SortMixin extends Vue_2 {
3692
3695
  get providedSelectedSort(): Sort;
3693
3696
  // @internal
3694
3697
  selectedSort: Sort;
3695
- value?: Sort;
3696
3698
  }
3697
3699
 
3698
3700
  // @public
@@ -3985,6 +3987,7 @@ export interface UrlMutations {
3985
3987
  setParams(params: Partial<UrlParams>): void;
3986
3988
  setQuery(query: string): void;
3987
3989
  setRelatedTags(relatedTags: RelatedTag_2[]): void;
3990
+ setSort(sort: string): void;
3988
3991
  }
3989
3992
 
3990
3993
  // @public
@@ -4036,6 +4039,9 @@ export const urlWiring: {
4036
4039
  PageChanged: {
4037
4040
  setUrlPage: Wire<number>;
4038
4041
  };
4042
+ SortChanged: {
4043
+ setUrlSort: Wire<string>;
4044
+ };
4039
4045
  ExtraParamsChanged: {
4040
4046
  setParams: Wire<Partial<UrlParams>>;
4041
4047
  };
@@ -7,8 +7,8 @@ import Vue from 'vue';
7
7
  */
8
8
  export default class SortMixin extends Vue {
9
9
  /**
10
- * The list of possible sort values. If the {@link SortMixin.value} option
11
- * is not provided, the first item of this list will be selected.
10
+ * The list of possible sort values. If there are no values selected, the first item of
11
+ * this list will be selected.
12
12
  *
13
13
  * @public
14
14
  */
@@ -20,17 +20,9 @@ export default class SortMixin extends Vue {
20
20
  * @internal
21
21
  */
22
22
  selectedSort: Sort;
23
- /**
24
- * The selected sort value. This is an optional prop that allows to change programmatically
25
- * the selected sort. If it is not provided, the first item of the {@link SortMixin.items}
26
- * list will be selected.
27
- *
28
- * @public
29
- */
30
- value?: Sort;
31
23
  /**
32
24
  * Emits the {@link SearchXEvents.SelectedSortProvided | SelectedSortProvided} event whenever the
33
- * provided {@link SortMixin.value} changes. If no value is provided, the first item of the
25
+ * provided {@link SortMixin.selectedSort} changes. If no value is provided, the first item of the
34
26
  * {@link SortMixin.items} will be used as fallback.
35
27
  *
36
28
  * @returns The sorting value.
@@ -1 +1 @@
1
- {"version":3,"file":"sort.mixin.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/search/components/sort.mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,GAAG,MAAM,KAAK,CAAC;AAKtB;;;;GAIG;AAEH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,GAAG;IACxC;;;;;OAKG;IAEI,KAAK,EAAG,IAAI,EAAE,CAAC;IAEtB;;;;;OAKG;IAEI,YAAY,EAAG,IAAI,CAAC;IAE3B;;;;;;OAMG;IAEI,KAAK,CAAC,EAAE,IAAI,CAAC;IAEpB;;;;;;;;OAQG;IACH,IACW,oBAAoB,IAAI,IAAI,CAEtC;CACF"}
1
+ {"version":3,"file":"sort.mixin.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/search/components/sort.mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,GAAG,MAAM,KAAK,CAAC;AAKtB;;;;GAIG;AAEH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,GAAG;IACxC;;;;;OAKG;IAEI,KAAK,EAAG,IAAI,EAAE,CAAC;IAEtB;;;;;OAKG;IAEI,YAAY,EAAG,IAAI,CAAC;IAE3B;;;;;;;;OAQG;IACH,IACW,oBAAoB,IAAI,IAAI,CAEtC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"set-url-params.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/search/store/actions/set-url-params.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC,cAAc,CAMtE,CAAC"}
1
+ {"version":3,"file":"set-url-params.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/search/store/actions/set-url-params.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC,cAAc,CAOtE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/url/store/module.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,eA2B7B,CAAC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/url/store/module.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,eA8B7B,CAAC"}
@@ -67,6 +67,12 @@ export interface UrlMutations {
67
67
  * @param page - The new page of the url.
68
68
  */
69
69
  setPage(page: number): void;
70
+ /**
71
+ * Sets the new sort.
72
+ *
73
+ * @param sort - The new sort of the url.
74
+ */
75
+ setSort(sort: string): void;
70
76
  /**
71
77
  * Sets the initial extra params.
72
78
  *
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/url/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;;;GAIG;AACH,oBAAY,QAAQ,GAAG,SAAS,GAAG;IACjC,kBAAkB,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;CACzC,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,qCAAqC;IACrC,SAAS,EAAE,SAAS,CAAC;CACtB;AAED;;;;GAIG;AACH,oBAAY,WAAW,GAAG,OAAO,CAAC,MAAM,SAAS,EAAE,MAAM,CAAC,CAAC;AAE3D;;;;GAIG;AACH,oBAAY,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAEzF;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IAC5C;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;;OAIG;IACH,cAAc,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAChD;;;;OAIG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACpC;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;;OAIG;IACH,qBAAqB,CAAC,WAAW,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;CAC/D;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;CAAG;AAE9B;;;;GAIG;AACH,oBAAY,eAAe,GAAG,YAAY,CAAC,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE3F;;;;GAIG;AACH,oBAAY,gBAAgB,GAAG,cAAc,CAAC,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/url/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;;;GAIG;AACH,oBAAY,QAAQ,GAAG,SAAS,GAAG;IACjC,kBAAkB,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;CACzC,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,qCAAqC;IACrC,SAAS,EAAE,SAAS,CAAC;CACtB;AAED;;;;GAIG;AACH,oBAAY,WAAW,GAAG,OAAO,CAAC,MAAM,SAAS,EAAE,MAAM,CAAC,CAAC;AAE3D;;;;GAIG;AACH,oBAAY,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAEzF;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IAC5C;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;;OAIG;IACH,cAAc,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAChD;;;;OAIG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACpC;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;;OAIG;IACH,qBAAqB,CAAC,WAAW,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;CAC/D;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;CAAG;AAE9B;;;;GAIG;AACH,oBAAY,eAAe,GAAG,YAAY,CAAC,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE3F;;;;GAIG;AACH,oBAAY,gBAAgB,GAAG,cAAc,CAAC,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC"}
@@ -16,6 +16,12 @@ export declare const setUrlQuery: import("../..").Wire<string>;
16
16
  * @public
17
17
  */
18
18
  export declare const setUrlPage: import("../..").Wire<number>;
19
+ /**
20
+ * Sets the sort of the url module.
21
+ *
22
+ * @public
23
+ */
24
+ export declare const setUrlSort: import("../..").Wire<string>;
19
25
  /**
20
26
  * Sets the extra params of the url module.
21
27
  *
@@ -58,6 +64,9 @@ export declare const urlWiring: {
58
64
  PageChanged: {
59
65
  setUrlPage: import("../..").Wire<number>;
60
66
  };
67
+ SortChanged: {
68
+ setUrlSort: import("../..").Wire<string>;
69
+ };
61
70
  ExtraParamsChanged: {
62
71
  setParams: import("../..").Wire<Partial<import("../..").UrlParams>>;
63
72
  };
@@ -1 +1 @@
1
- {"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/url/wiring.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,iEAA+B,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,WAAW,8BAAyB,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,UAAU,8BAAwB,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,SAAS,0DAA0B,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,2DAAsC,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,aAAa,6DAA2B,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;CAyBpB,CAAC"}
1
+ {"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/url/wiring.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,iEAA+B,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,WAAW,8BAAyB,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,UAAU,8BAAwB,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,UAAU,8BAAwB,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,SAAS,0DAA0B,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,2DAAsC,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,aAAa,6DAA2B,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BpB,CAAC"}
package/url/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { urlXStoreModule } from '../js/x-modules/url/store/module.js';
2
2
  export { replaceableParams, urlEmitters } from '../js/x-modules/url/store/emitters.js';
3
- export { setInitialExtraParams, setParams, setUrlFilters, setUrlPage, setUrlQuery, setUrlRelatedTags, urlWiring } from '../js/x-modules/url/wiring.js';
3
+ export { setInitialExtraParams, setParams, setUrlFilters, setUrlPage, setUrlQuery, setUrlRelatedTags, setUrlSort, urlWiring } from '../js/x-modules/url/wiring.js';
4
4
  export { urlXModule } from '../js/x-modules/url/x-module.js';
5
5
  export { default as UrlHandler } from '../js/x-modules/url/components/url-handler.vue.js';
@@ -1,13 +0,0 @@
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; [SortMixin](./x-components.sortmixin.md) &gt; [value](./x-components.sortmixin.value.md)
4
-
5
- ## SortMixin.value property
6
-
7
- The selected sort value. This is an optional prop that allows to change programmatically the selected sort. If it is not provided, the first item of the [SortMixin.items](./x-components.sortmixin.items.md) list will be selected.
8
-
9
- <b>Signature:</b>
10
-
11
- ```typescript
12
- value?: Sort;
13
- ```