@empathyco/x-components 3.0.0-alpha.21 → 3.0.0-alpha.25

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 (214) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/core/index.js +3 -1
  3. package/core/index.js.map +1 -1
  4. package/design-system/badge-default.css +46 -0
  5. package/design-system/base.css +4 -1
  6. package/design-system/button-primary.css +11 -2
  7. package/design-system/button-secondary.css +12 -3
  8. package/design-system/button-tertiary.css +11 -2
  9. package/design-system/default-theme.css +150 -42
  10. package/design-system/dropdown-default.css +68 -33
  11. package/design-system/dropdown-l.css +1 -1
  12. package/design-system/dropdown-m.css +1 -1
  13. package/design-system/dropdown-s.css +1 -1
  14. package/design-system/dropdown-xl.css +1 -1
  15. package/design-system/full-theme.css +2564 -194
  16. package/design-system/list-default.css +1 -0
  17. package/design-system/list-gap.css +61 -1
  18. package/design-system/list-padding.css +54 -1
  19. package/design-system/row-padding.css +2 -0
  20. package/design-system/utilities-background-color.css +20 -0
  21. package/design-system/utilities-border-color.css +20 -0
  22. package/design-system/utilities-border-radius.css +981 -0
  23. package/design-system/utilities-border-width.css +333 -0
  24. package/design-system/{shadow-shadow.css → utilities-box-shadow.css} +32 -23
  25. package/design-system/utilities-font-color.css +20 -0
  26. package/design-system/utilities-margin.css +435 -0
  27. package/design-system/utilities-padding.css +406 -0
  28. package/docs/API-reference/api/x-components.baseresultimage.animation.md +13 -0
  29. package/docs/API-reference/api/x-components.baseresultimage.md +1 -0
  30. package/docs/API-reference/api/x-components.capitalize.md +30 -0
  31. package/docs/API-reference/api/x-components.crossfade.md +15 -0
  32. package/docs/API-reference/api/x-components.md +10 -1
  33. package/docs/API-reference/api/{x-components.urlstate.filters.md → x-components.params.filters.md} +2 -2
  34. package/docs/API-reference/api/x-components.params.md +25 -0
  35. package/docs/API-reference/api/{x-components.urlstate.page.md → x-components.params.page.md} +2 -2
  36. package/docs/API-reference/api/{x-components.urlstate.query.md → x-components.params.query.md} +2 -2
  37. package/docs/API-reference/api/{x-components.urlstate.relatedtags.md → x-components.params.relatedtags.md} +2 -2
  38. package/docs/API-reference/api/x-components.params.scroll.md +11 -0
  39. package/docs/API-reference/api/{x-components.urlstate.sort.md → x-components.params.sort.md} +2 -2
  40. package/docs/API-reference/api/x-components.setquery.md +13 -0
  41. package/docs/API-reference/api/x-components.setqueryfromurl.md +13 -0
  42. package/docs/API-reference/api/x-components.setsearchextraparams.md +1 -1
  43. package/docs/API-reference/api/x-components.setsearchqueryfromurl.md +13 -0
  44. package/docs/API-reference/api/x-components.translatefromleft.md +15 -0
  45. package/docs/API-reference/api/x-components.translatefromright.md +1 -1
  46. package/docs/API-reference/api/x-components.updatestoreurl.md +13 -0
  47. package/docs/API-reference/api/x-components.updateurl.md +13 -0
  48. package/docs/API-reference/api/x-components.urlactions.md +2 -1
  49. package/docs/API-reference/api/x-components.urlactions.updatestorefromurl.md +17 -0
  50. package/docs/API-reference/api/x-components.urlactions.updateurl.md +1 -1
  51. package/docs/API-reference/api/x-components.urlgetters.md +2 -2
  52. package/docs/API-reference/api/x-components.urlgetters.urlmappedparamnames.md +3 -1
  53. package/docs/API-reference/api/x-components.urlgetters.urlparams.md +2 -0
  54. package/docs/API-reference/api/x-components.urlmutations.md +4 -1
  55. package/docs/API-reference/api/x-components.urlmutations.setextraparams.md +24 -0
  56. package/docs/API-reference/api/x-components.urlmutations.setparams.md +24 -0
  57. package/docs/API-reference/api/x-components.urlmutations.setquery.md +24 -0
  58. package/docs/API-reference/api/x-components.urlmutations.seturlconfig.md +3 -1
  59. package/docs/API-reference/api/x-components.urlparamkey.md +3 -1
  60. package/docs/API-reference/api/x-components.urlstate.md +1 -5
  61. package/docs/API-reference/api/x-components.urlstate.params.md +11 -0
  62. package/docs/API-reference/api/x-components.urlxevents.md +1 -0
  63. package/docs/API-reference/api/x-components.urlxevents.paramsloadedfromurl.md +13 -0
  64. package/docs/API-reference/api/x-types.banner.md +2 -2
  65. package/docs/API-reference/api/x-types.historyquery.md +2 -2
  66. package/docs/API-reference/api/x-types.nextqueries.md +2 -2
  67. package/docs/API-reference/api/x-types.nextquery.md +2 -2
  68. package/docs/API-reference/api/x-types.promoted.md +2 -2
  69. package/docs/API-reference/api/x-types.relatedtag.md +2 -2
  70. package/docs/API-reference/api/x-types.result.md +2 -2
  71. package/docs/API-reference/api/x-types.suggestion.md +2 -2
  72. package/docs/API-reference/components/common/animations/x-components.cross-fade.md +30 -0
  73. package/docs/API-reference/components/common/animations/x-components.translate-from-left.md +30 -0
  74. package/docs/API-reference/components/common/animations/x-components.translate-from-right.md +6 -5
  75. package/docs/API-reference/components/common/result/x-components.base-result-image.md +7 -6
  76. package/docs/API-reference/components/url/x-components.url-handler.md +86 -0
  77. package/docs/sidebar.json +1 -1
  78. package/js/components/animations/cross-fade.vue.js +58 -0
  79. package/js/components/animations/cross-fade.vue.js.map +1 -0
  80. package/js/components/animations/cross-fade.vue_rollup-plugin-vue=script.js +23 -0
  81. package/js/components/animations/cross-fade.vue_rollup-plugin-vue=script.js.map +1 -0
  82. package/js/components/animations/translate-from-left.vue.js +58 -0
  83. package/js/components/animations/translate-from-left.vue.js.map +1 -0
  84. package/js/components/animations/translate-from-left.vue_rollup-plugin-vue=script.js +23 -0
  85. package/js/components/animations/translate-from-left.vue_rollup-plugin-vue=script.js.map +1 -0
  86. package/js/components/animations/translate-from-right.vue.js +2 -2
  87. package/js/components/animations/translate-from-right.vue.js.map +1 -1
  88. package/js/components/animations/translate-from-right.vue_rollup-plugin-vue=script.js +2 -2
  89. package/js/components/animations/translate-from-right.vue_rollup-plugin-vue=script.js.map +1 -1
  90. package/js/components/base-dropdown.vue.js +2 -2
  91. package/js/components/base-dropdown.vue.js.map +1 -1
  92. package/js/components/base-rating.vue.js +1 -1
  93. package/js/components/column-picker/base-column-picker-list.vue.js +1 -1
  94. package/js/components/layouts/multi-column-max-width-layout.vue.js +1 -1
  95. package/js/components/layouts/single-column-layout.vue.js +1 -1
  96. package/js/components/modals/base-modal.vue.js +1 -1
  97. package/js/components/result/base-result-image.vue.js +40 -30
  98. package/js/components/result/base-result-image.vue.js.map +1 -1
  99. package/js/components/result/base-result-image.vue_rollup-plugin-vue=script.js +3 -0
  100. package/js/components/result/base-result-image.vue_rollup-plugin-vue=script.js.map +1 -1
  101. package/js/components/sliding-panel.vue.js +1 -1
  102. package/js/index.js +6 -4
  103. package/js/index.js.map +1 -1
  104. package/js/utils/string.js +16 -1
  105. package/js/utils/string.js.map +1 -1
  106. package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +2 -0
  107. package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
  108. package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +2 -0
  109. package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js.map +1 -1
  110. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js +2 -0
  111. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
  112. package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js +2 -0
  113. package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  114. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js +2 -0
  115. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js.map +1 -1
  116. package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +2 -0
  117. package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  118. package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +2 -0
  119. package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  120. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +2 -0
  121. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  122. package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +2 -0
  123. package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  124. package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js +2 -0
  125. package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  126. package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +2 -0
  127. package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  128. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js +2 -0
  129. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js.map +1 -1
  130. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +2 -0
  131. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js.map +1 -1
  132. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +2 -0
  133. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js.map +1 -1
  134. package/js/x-modules/facets/components/lists/selected-filters-list.vue_rollup-plugin-vue=script.js +2 -0
  135. package/js/x-modules/facets/components/lists/selected-filters-list.vue_rollup-plugin-vue=script.js.map +1 -1
  136. package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +2 -0
  137. package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  138. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js +2 -0
  139. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  140. package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js +2 -0
  141. package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  142. package/js/x-modules/related-tags/components/related-tags.vue.js +1 -1
  143. package/js/x-modules/search/components/banner.vue.js +1 -1
  144. package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js +2 -0
  145. package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js.map +1 -1
  146. package/js/x-modules/search/components/promoted.vue.js +1 -1
  147. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +2 -0
  148. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js.map +1 -1
  149. package/js/x-modules/search/components/sort.mixin.js +2 -0
  150. package/js/x-modules/search/components/sort.mixin.js.map +1 -1
  151. package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js +2 -0
  152. package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js.map +1 -1
  153. package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js +2 -0
  154. package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js.map +1 -1
  155. package/js/x-modules/search/wiring.js +11 -1
  156. package/js/x-modules/search/wiring.js.map +1 -1
  157. package/js/x-modules/search-box/wiring.js +11 -1
  158. package/js/x-modules/search-box/wiring.js.map +1 -1
  159. package/js/x-modules/url/store/actions/update-store-from-url.action.js +76 -0
  160. package/js/x-modules/url/store/actions/update-store-from-url.action.js.map +1 -0
  161. package/js/x-modules/url/store/actions/update-url.action.js +22 -5
  162. package/js/x-modules/url/store/actions/update-url.action.js.map +1 -1
  163. package/js/x-modules/url/store/getters/{url-param-names.getter.js → url-mapped-param-names.getter.js} +4 -4
  164. package/js/x-modules/url/store/getters/url-mapped-param-names.getter.js.map +1 -0
  165. package/js/x-modules/url/store/getters/url-params.getter.js +5 -4
  166. package/js/x-modules/url/store/getters/url-params.getter.js.map +1 -1
  167. package/js/x-modules/url/store/module.js +22 -7
  168. package/js/x-modules/url/store/module.js.map +1 -1
  169. package/js/x-modules/url/wiring.js +41 -2
  170. package/js/x-modules/url/wiring.js.map +1 -1
  171. package/package.json +5 -5
  172. package/report/tsdoc-metadata.json +1 -1
  173. package/report/x-adapter.api.json +1 -1
  174. package/report/x-components.api.json +749 -107
  175. package/report/x-components.api.md +72 -14
  176. package/report/x-types.api.json +51 -23
  177. package/search/index.js +1 -1
  178. package/search-box/index.js +1 -1
  179. package/types/components/animations/cross-fade.vue.d.ts +10 -0
  180. package/types/components/animations/cross-fade.vue.d.ts.map +1 -0
  181. package/types/components/animations/index.d.ts +2 -0
  182. package/types/components/animations/index.d.ts.map +1 -1
  183. package/types/components/animations/translate-from-left.vue.d.ts +10 -0
  184. package/types/components/animations/translate-from-left.vue.d.ts.map +1 -0
  185. package/types/components/animations/translate-from-right.vue.d.ts +2 -2
  186. package/types/components/result/base-result-image.vue.d.ts +7 -0
  187. package/types/components/result/base-result-image.vue.d.ts.map +1 -1
  188. package/types/utils/string.d.ts +13 -0
  189. package/types/utils/string.d.ts.map +1 -1
  190. package/types/x-modules/search/wiring.d.ts +13 -2
  191. package/types/x-modules/search/wiring.d.ts.map +1 -1
  192. package/types/x-modules/search-box/wiring.d.ts +11 -0
  193. package/types/x-modules/search-box/wiring.d.ts.map +1 -1
  194. package/types/x-modules/url/components/index.d.ts +2 -0
  195. package/types/x-modules/url/components/index.d.ts.map +1 -0
  196. package/types/x-modules/url/events.types.d.ts +5 -0
  197. package/types/x-modules/url/events.types.d.ts.map +1 -1
  198. package/types/x-modules/url/store/actions/update-store-from-url.action.d.ts +11 -0
  199. package/types/x-modules/url/store/actions/update-store-from-url.action.d.ts.map +1 -0
  200. package/types/x-modules/url/store/actions/update-url.action.d.ts.map +1 -1
  201. package/types/x-modules/url/store/getters/{url-param-names.getter.d.ts → url-mapped-param-names.getter.d.ts} +1 -1
  202. package/types/x-modules/url/store/getters/url-mapped-param-names.getter.d.ts.map +1 -0
  203. package/types/x-modules/url/store/getters/url-params.getter.d.ts.map +1 -1
  204. package/types/x-modules/url/store/module.d.ts.map +1 -1
  205. package/types/x-modules/url/store/types.d.ts +44 -5
  206. package/types/x-modules/url/store/types.d.ts.map +1 -1
  207. package/types/x-modules/url/wiring.d.ts +33 -0
  208. package/types/x-modules/url/wiring.d.ts.map +1 -1
  209. package/url/index.js +1 -1
  210. package/design-system/list-background.css +0 -20
  211. package/design-system/list-border.css +0 -44
  212. package/design-system/row-background.css +0 -20
  213. package/js/x-modules/url/store/getters/url-param-names.getter.js.map +0 -1
  214. package/types/x-modules/url/store/getters/url-param-names.getter.d.ts.map +0 -1
@@ -9,5 +9,5 @@ Sets the search state `params`<!-- -->.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- setSearchExtraParams: import("../..").Wire<import("../..").Dictionary<unknown>>
12
+ setSearchExtraParams: import("../..").Wire<Dictionary<unknown>>
13
13
  ```
@@ -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; [setSearchQueryFromUrl](./x-components.setsearchqueryfromurl.md)
4
+
5
+ ## setSearchQueryFromUrl variable
6
+
7
+ Sets the search state `query`<!-- -->.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ setSearchQueryFromUrl: import("../..").Wire<Dictionary<UrlParamValue>>
13
+ ```
@@ -0,0 +1,15 @@
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; [TranslateFromLeft](./x-components.translatefromleft.md)
4
+
5
+ ## TranslateFromLeft class
6
+
7
+ Renders a transition wrapping the element passed in the default slot and moving it to its desired position.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export default class TranslateFromLeft extends Vue
13
+ ```
14
+ <b>Extends:</b> Vue
15
+
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## TranslateFromRight class
6
6
 
7
- Renders a transition group wrapping the element passed in the default slot and animating it with a scale.
7
+ Renders a transition wrapping the element passed in the default slot and moving it to its desired position.
8
8
 
9
9
  <b>Signature:</b>
10
10
 
@@ -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; [updateStoreUrl](./x-components.updatestoreurl.md)
4
+
5
+ ## updateStoreUrl variable
6
+
7
+ Updates the store state from the URL.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ updateStoreUrl: import("../..").AnyWire
13
+ ```
@@ -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; [updateUrl](./x-components.updateurl.md)
4
+
5
+ ## updateUrl variable
6
+
7
+ Updates the URL.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ updateUrl: import("../..").AnyWire
13
+ ```
@@ -16,5 +16,6 @@ export interface UrlActions
16
16
 
17
17
  | Method | Description |
18
18
  | --- | --- |
19
- | [updateUrl()](./x-components.urlactions.updateurl.md) | Updates the URL with values from the store. It replaces the current url with a new entry in the browser history. Also returns the params with the custom names provided in the config if present. |
19
+ | [updateStoreFromUrl()](./x-components.urlactions.updatestorefromurl.md) | Updates the store with values from the URL. |
20
+ | [updateUrl()](./x-components.urlactions.updateurl.md) | Updates the URL with values from the store. It replaces the current url with a new entry in the browser history. Also returns the params with the custom names provided in the config if any. |
20
21
 
@@ -0,0 +1,17 @@
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; [UrlActions](./x-components.urlactions.md) &gt; [updateStoreFromUrl](./x-components.urlactions.updatestorefromurl.md)
4
+
5
+ ## UrlActions.updateStoreFromUrl() method
6
+
7
+ Updates the store with values from the URL.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ updateStoreFromUrl(): void;
13
+ ```
14
+ <b>Returns:</b>
15
+
16
+ void
17
+
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## UrlActions.updateUrl() method
6
6
 
7
- Updates the URL with values from the store. It replaces the current url with a new entry in the browser history. Also returns the params with the custom names provided in the config if present.
7
+ Updates the URL with values from the store. It replaces the current url with a new entry in the browser history. Also returns the params with the custom names provided in the config if any.
8
8
 
9
9
  <b>Signature:</b>
10
10
 
@@ -16,6 +16,6 @@ export interface UrlGetters
16
16
 
17
17
  | Property | Type | Description |
18
18
  | --- | --- | --- |
19
- | [urlMappedParamNames](./x-components.urlgetters.urlmappedparamnames.md) | [Dictionary](./x-components.dictionary.md)<!-- -->&lt;[UrlParamKey](./x-components.urlparamkey.md)<!-- -->&gt; | |
20
- | [urlParams](./x-components.urlgetters.urlparams.md) | [Dictionary](./x-components.dictionary.md)<!-- -->&lt;[UrlParamValue](./x-components.urlparamvalue.md)<!-- -->&gt; | |
19
+ | [urlMappedParamNames](./x-components.urlgetters.urlmappedparamnames.md) | [Dictionary](./x-components.dictionary.md)<!-- -->&lt;[UrlParamKey](./x-components.urlparamkey.md) \| string&gt; | All the parameter names with their corresponding key. |
20
+ | [urlParams](./x-components.urlgetters.urlparams.md) | [Dictionary](./x-components.dictionary.md)<!-- -->&lt;[UrlParamValue](./x-components.urlparamvalue.md)<!-- -->&gt; | The current params in the url. |
21
21
 
@@ -4,8 +4,10 @@
4
4
 
5
5
  ## UrlGetters.urlMappedParamNames property
6
6
 
7
+ All the parameter names with their corresponding key.
8
+
7
9
  <b>Signature:</b>
8
10
 
9
11
  ```typescript
10
- urlMappedParamNames: Dictionary<UrlParamKey>;
12
+ urlMappedParamNames: Dictionary<UrlParamKey | string>;
11
13
  ```
@@ -4,6 +4,8 @@
4
4
 
5
5
  ## UrlGetters.urlParams property
6
6
 
7
+ The current params in the url.
8
+
7
9
  <b>Signature:</b>
8
10
 
9
11
  ```typescript
@@ -16,5 +16,8 @@ export interface UrlMutations
16
16
 
17
17
  | Method | Description |
18
18
  | --- | --- |
19
- | [setUrlConfig(config)](./x-components.urlmutations.seturlconfig.md) | |
19
+ | [setExtraParams(extraParam)](./x-components.urlmutations.setextraparams.md) | Sets new extra params. |
20
+ | [setParams(params)](./x-components.urlmutations.setparams.md) | Sets the new params. |
21
+ | [setQuery(query)](./x-components.urlmutations.setquery.md) | Sets the new query. |
22
+ | [setUrlConfig(config)](./x-components.urlmutations.seturlconfig.md) | Sets a new url configuration. |
20
23
 
@@ -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; [setExtraParams](./x-components.urlmutations.setextraparams.md)
4
+
5
+ ## UrlMutations.setExtraParams() method
6
+
7
+ Sets new extra params.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ setExtraParams(extraParam: Dictionary<UrlParamValue>): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | extraParam | [Dictionary](./x-components.dictionary.md)<!-- -->&lt;[UrlParamValue](./x-components.urlparamvalue.md)<!-- -->&gt; | The new extra params of the Url. |
20
+
21
+ <b>Returns:</b>
22
+
23
+ void
24
+
@@ -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; [setParams](./x-components.urlmutations.setparams.md)
4
+
5
+ ## UrlMutations.setParams() method
6
+
7
+ Sets the new params.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ setParams(params: Record<keyof Params, UrlParamValue>): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | params | Record&lt;keyof [Params](./x-components.params.md)<!-- -->, [UrlParamValue](./x-components.urlparamvalue.md)<!-- -->&gt; | The new params of the Url. |
20
+
21
+ <b>Returns:</b>
22
+
23
+ void
24
+
@@ -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; [setQuery](./x-components.urlmutations.setquery.md)
4
+
5
+ ## UrlMutations.setQuery() method
6
+
7
+ Sets the new query.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ setQuery(query: string): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | query | string | The new query of the Url. |
20
+
21
+ <b>Returns:</b>
22
+
23
+ void
24
+
@@ -4,6 +4,8 @@
4
4
 
5
5
  ## UrlMutations.setUrlConfig() method
6
6
 
7
+ Sets a new url configuration.
8
+
7
9
  <b>Signature:</b>
8
10
 
9
11
  ```typescript
@@ -14,7 +16,7 @@ setUrlConfig(config: UrlConfig): void;
14
16
 
15
17
  | Parameter | Type | Description |
16
18
  | --- | --- | --- |
17
- | config | [UrlConfig](./x-components.urlconfig.md) | |
19
+ | config | [UrlConfig](./x-components.urlconfig.md) | The new config of the Url. |
18
20
 
19
21
  <b>Returns:</b>
20
22
 
@@ -9,5 +9,7 @@ The key of the parameter to store in the URL.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- export declare type UrlParamKey = string;
12
+ export declare type UrlParamKey = Extract<keyof Params, string>;
13
13
  ```
14
+ <b>References:</b> [Params](./x-components.params.md)
15
+
@@ -18,9 +18,5 @@ export interface UrlState
18
18
  | --- | --- | --- |
19
19
  | [config](./x-components.urlstate.config.md) | [UrlConfig](./x-components.urlconfig.md) | |
20
20
  | [extraParams](./x-components.urlstate.extraparams.md) | [Dictionary](./x-components.dictionary.md)<!-- -->&lt;[UrlParamValue](./x-components.urlparamvalue.md)<!-- -->&gt; | |
21
- | [filters](./x-components.urlstate.filters.md) | string\[\] | |
22
- | [page](./x-components.urlstate.page.md) | number | |
23
- | [query](./x-components.urlstate.query.md) | string | |
24
- | [relatedTags](./x-components.urlstate.relatedtags.md) | string\[\] | |
25
- | [sort](./x-components.urlstate.sort.md) | string | |
21
+ | [params](./x-components.urlstate.params.md) | Record&lt;keyof [Params](./x-components.params.md)<!-- -->, [UrlParamValue](./x-components.urlparamvalue.md)<!-- -->&gt; | |
26
22
 
@@ -0,0 +1,11 @@
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; [UrlState](./x-components.urlstate.md) &gt; [params](./x-components.urlstate.params.md)
4
+
5
+ ## UrlState.params property
6
+
7
+ <b>Signature:</b>
8
+
9
+ ```typescript
10
+ params: Record<keyof Params, UrlParamValue>;
11
+ ```
@@ -21,6 +21,7 @@ export interface UrlXEvents
21
21
  | [ExtraParamsLoadedFromUrl](./x-components.urlxevents.extraparamsloadedfromurl.md) | string\[\] | Extra params has been loaded from the URL. \* Payload: The extra params array. |
22
22
  | [FiltersLoadedFromUrl](./x-components.urlxevents.filtersloadedfromurl.md) | string\[\] | Filters has been loaded from the URL. \* Payload: The filters array. |
23
23
  | [PageLoadedFromUrl](./x-components.urlxevents.pageloadedfromurl.md) | string | Page has been loaded from the URL. \* Payload: The page number. |
24
+ | [ParamsLoadedFromUrl](./x-components.urlxevents.paramsloadedfromurl.md) | [UrlGetters](./x-components.urlgetters.md)<!-- -->\['urlParams'\] | Url loaded from the url changed. \* Payload: The new URL params. |
24
25
  | [QueryLoadedFromUrl](./x-components.urlxevents.queryloadedfromurl.md) | string | Query has been loaded from the URL. \* Payload: The query string. |
25
26
  | [RelatedTagsLoadedFromUrl](./x-components.urlxevents.relatedtagsloadedfromurl.md) | string\[\] | Related tags has been loaded from the URL. \* Payload: The related tag array. |
26
27
  | [SortLoadedFromUrl](./x-components.urlxevents.sortloadedfromurl.md) | string | Sort has been loaded from the URL. \* Payload: The sort string. |
@@ -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; [UrlXEvents](./x-components.urlxevents.md) &gt; [ParamsLoadedFromUrl](./x-components.urlxevents.paramsloadedfromurl.md)
4
+
5
+ ## UrlXEvents.ParamsLoadedFromUrl property
6
+
7
+ Url loaded from the url changed. \* Payload: The new URL params.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ ParamsLoadedFromUrl: UrlGetters['urlParams'];
13
+ ```
@@ -9,9 +9,9 @@ A banner is an image with a title, that when clicked redirect the user to an URL
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- export interface Banner extends NamedModel, Identifiable
12
+ export interface Banner extends NamedModel<'Banner'>, Identifiable
13
13
  ```
14
- <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->, [Identifiable](./x-types.identifiable.md)
14
+ <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->&lt;'Banner'&gt;, [Identifiable](./x-types.identifiable.md)
15
15
 
16
16
  ## Properties
17
17
 
@@ -9,9 +9,9 @@ Represents a query that has been made by the user.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- export interface HistoryQuery extends Previewable, NamedModel
12
+ export interface HistoryQuery extends Previewable, NamedModel<'HistoryQuery'>
13
13
  ```
14
- <b>Extends:</b> [Previewable](./x-types.previewable.md)<!-- -->, [NamedModel](./x-types.namedmodel.md)
14
+ <b>Extends:</b> [Previewable](./x-types.previewable.md)<!-- -->, [NamedModel](./x-types.namedmodel.md)<!-- -->&lt;'HistoryQuery'&gt;
15
15
 
16
16
  ## Properties
17
17
 
@@ -9,9 +9,9 @@ A group of next queries.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- export interface NextQueries extends NamedModel, Identifiable
12
+ export interface NextQueries extends NamedModel<'NextQueries'>, Identifiable
13
13
  ```
14
- <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->, [Identifiable](./x-types.identifiable.md)
14
+ <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->&lt;'NextQueries'&gt;, [Identifiable](./x-types.identifiable.md)
15
15
 
16
16
  ## Properties
17
17
 
@@ -9,7 +9,7 @@ A next query is a suggestion of a new query that the user may be interested afte
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- export interface NextQuery extends NamedModel, Required<Previewable>
12
+ export interface NextQuery extends NamedModel<'NextQuery'>, Required<Previewable>
13
13
  ```
14
- <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->, Required&lt;[Previewable](./x-types.previewable.md)<!-- -->&gt;
14
+ <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->&lt;'NextQuery'&gt;, Required&lt;[Previewable](./x-types.previewable.md)<!-- -->&gt;
15
15
 
@@ -9,9 +9,9 @@ A promoted is an image with a title, that when clicked redirect the user to an U
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- export interface Promoted extends NamedModel, Identifiable
12
+ export interface Promoted extends NamedModel<'Promoted'>, Identifiable
13
13
  ```
14
- <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->, [Identifiable](./x-types.identifiable.md)
14
+ <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->&lt;'Promoted'&gt;, [Identifiable](./x-types.identifiable.md)
15
15
 
16
16
  ## Properties
17
17
 
@@ -9,9 +9,9 @@ A related tag is just a term that refines the current query.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- export interface RelatedTag extends NamedModel, Previewable
12
+ export interface RelatedTag extends NamedModel<'RelatedTag'>, Previewable
13
13
  ```
14
- <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->, [Previewable](./x-types.previewable.md)
14
+ <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->&lt;'RelatedTag'&gt;, [Previewable](./x-types.previewable.md)
15
15
 
16
16
  ## Properties
17
17
 
@@ -9,9 +9,9 @@ A search result.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- export interface Result extends NamedModel, Identifiable
12
+ export interface Result extends NamedModel<'Result'>, Identifiable
13
13
  ```
14
- <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->, [Identifiable](./x-types.identifiable.md)
14
+ <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->&lt;'Result'&gt;, [Identifiable](./x-types.identifiable.md)
15
15
 
16
16
  ## Properties
17
17
 
@@ -9,9 +9,9 @@ A suggestion represents a query that has been proposed to the user, due of being
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- export interface Suggestion extends NamedModel, Previewable
12
+ export interface Suggestion extends NamedModel<'QuerySuggestion' | 'PopularSearch'>, Previewable
13
13
  ```
14
- <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->, [Previewable](./x-types.previewable.md)
14
+ <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->&lt;'QuerySuggestion' \| 'PopularSearch'&gt;, [Previewable](./x-types.previewable.md)
15
15
 
16
16
  ## Properties
17
17
 
@@ -0,0 +1,30 @@
1
+ ---
2
+ id: x-components.x-components.cross-fade
3
+ title: Cross Fade
4
+ sidebar_label: Cross Fade
5
+ ---
6
+ # CrossFade
7
+
8
+ > Renders a transition wrapping the element passed in the default slo. The transition
9
+ > fades between the two toggled elements at the same time.
10
+
11
+ ## Slots
12
+
13
+ | Name | Description | Bindings<br />(name - type - description) |
14
+ | -------------------- | ------------------------------------------- | ----------------------------------------- |
15
+ | <code>default</code> | (Required) to add content to the transition | None |
16
+
17
+ ---
18
+
19
+ # Example
20
+
21
+ The `CrossFade` component is intended to be used as animation to wrap an element with v-if or v-show
22
+ and animate it. The animation fades the new element into the previous one.
23
+
24
+ Wrapping a component:
25
+
26
+ ```vue
27
+ <CrossFade>
28
+ <ComponentOrElement v-if="open"/>
29
+ </CrossFade>
30
+ ```
@@ -0,0 +1,30 @@
1
+ ---
2
+ id: x-components.x-components.translate-from-left
3
+ title: Translate From Left
4
+ sidebar_label: Translate From Left
5
+ ---
6
+ # TranslateFromLeft
7
+
8
+ > Renders a transition wrapping the element passed in the default slot and moving it to its
9
+ > desired position.
10
+
11
+ ## Slots
12
+
13
+ | Name | Description | Bindings<br />(name - type - description) |
14
+ | -------------------- | ------------------------------------------- | ----------------------------------------- |
15
+ | <code>default</code> | (Required) to add content to the transition | None |
16
+
17
+ ---
18
+
19
+ # Example
20
+
21
+ The `TranslateFromRight` component is intended to be used as animation to wrap an element with v-if
22
+ or v-show and animate it. The animation translates the item from/to left 100%.
23
+
24
+ Wrapping a component:
25
+
26
+ ```vue
27
+ <TranslateFromLeft>
28
+ <ComponentOrElement v-if="open"/>
29
+ </TranslateFromLeft>
30
+ ```
@@ -5,8 +5,8 @@ sidebar_label: Translate From Right
5
5
  ---
6
6
  # TranslateFromRight
7
7
 
8
- > Renders a transition group wrapping the element passed in the default slot and animating
9
- > it with a scale.
8
+ > Renders a transition wrapping the element passed in the default slot and moving it to its
9
+ > desired position.
10
10
 
11
11
  ## Slots
12
12
 
@@ -16,9 +16,10 @@ sidebar_label: Translate From Right
16
16
 
17
17
  ---
18
18
 
19
- #Example
20
- The CollapseTop component is intended to be used as animation to wrap an element with
21
- v-if or v-show and animate it. The animation consists on translate the item from/to right 100%.
19
+ # Example
20
+
21
+ The `TranslateFromRight` component is intended to be used as animation to wrap an element with v-if
22
+ or v-show and animate it. The animation translates the item from/to right 100%.
22
23
 
23
24
  Used wrapping a component:
24
25
 
@@ -9,9 +9,10 @@ sidebar_label: Base Result Image
9
9
 
10
10
  ## Props
11
11
 
12
- | Name | Description | Type | Default |
13
- | ------------------- | ----------------------------------------------------------------------- | ------------------- | ------------- |
14
- | <code>result</code> | (Required) The {@link @empathyco/x-types#Result \| result} information. | <code>Result</code> | <code></code> |
12
+ | Name | Description | Type | Default |
13
+ | ---------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------- | ---------------------------- |
14
+ | <code>animation</code> | Animation to use when switching between the placeholder, the loaded image, or the failed<br />image fallback. | <code>union</code> | <code>() => NoElement</code> |
15
+ | <code>result</code> | (Required) The {@link @empathyco/x-types#Result \| result} information. | <code>Result</code> | <code></code> |
15
16
 
16
17
  ## Slots
17
18
 
@@ -22,12 +23,12 @@ sidebar_label: Base Result Image
22
23
 
23
24
  ---
24
25
 
25
- #Examples
26
+ # Examples
26
27
 
27
28
  ## Basic example
28
29
 
29
- This component is for the result image. It may be part of
30
- the search result page, recommendations or other section which needs to include results.
30
+ This component is for the result image. It may be part of the search result page, recommendations or
31
+ other section which needs to include results.
31
32
 
32
33
  The result prop is required. It will render a `<img/>` with the result image:
33
34
 
@@ -0,0 +1,86 @@
1
+ ---
2
+ id: x-components.x-components.url-handler
3
+ title: Url Handler
4
+ sidebar_label: Url Handler
5
+ ---
6
+ # url-handler
7
+
8
+ ---
9
+
10
+ ## Events
11
+
12
+ This component emits the following events:
13
+
14
+ - [`UrlConfigProvided`](./../../api/x-components.urlxevents.urlconfigprovided.md)
15
+ - [`DocumentLoaded`](./../../api/x-components.urlxevents.documentloaded.md)
16
+ - [`DocumentHistoryChanged`](./../../api/x-components.urlxevents.documenthistorychanged.md)
17
+ - [`ParamsLoadedFromUrl`](./../../api/x-components.urlxevents.paramsloadedfromurl.md)
18
+ - [`UserOpenXProgrammatically`](./../../api/x-components.xeventstypes.useropenxprotrammaticaaly.md)
19
+
20
+ ## See it in action
21
+
22
+ This component doesn't render elements to the DOM, but serves as a way to easily change the default
23
+ url parameter names.
24
+
25
+ _Try to make some requests and take a look to the url!_
26
+
27
+ ```vue
28
+ <template>
29
+ <UrlHandler />
30
+ </template>
31
+
32
+ <script>
33
+ import { UrlHandler } from "@empathyco/x-components/url-handler";
34
+
35
+ export default {
36
+ name: "UrlHandlerDemo",
37
+ components: {
38
+ UrlHandler
39
+ }
40
+ };
41
+ </script>
42
+ ```
43
+
44
+ ### Play with props
45
+
46
+ In this example, the `UrlHandler` component changes the following query parameter names:
47
+
48
+ - `query` to be `ebq`.
49
+ - `page` to be `p`.
50
+ - `filters` to be `f`
51
+ - `sort` to be `s`
52
+
53
+ _Try to make some requests and take a look to the url!_
54
+
55
+ ```vue
56
+ <template>
57
+ <UrlHandler :query="query" :page="page" :filters="filters" :sort="sort" />
58
+ </template>
59
+
60
+ <script>
61
+ import { UrlHandler } from "@empathyco/x-components/url-handler";
62
+
63
+ export default {
64
+ name: "UrlHandlerDemo",
65
+ components: {
66
+ UrlHandler
67
+ },
68
+ data() {
69
+ return {
70
+ query: "ebq",
71
+ page: "p",
72
+ filters: "f",
73
+ sort: "s"
74
+ };
75
+ }
76
+ };
77
+ </script>
78
+ ```
79
+
80
+ ### Play with events
81
+
82
+ The `UrlHandler` will emit a `UrlConfigProvided` event, with the new url param names if they are
83
+ provided.
84
+
85
+ It also emits the `DocumentLoaded` when the page is loaded and the `DocumentHistoryChanged` when the
86
+ url changes.