@empathyco/x-components 3.0.0-alpha.30 → 3.0.0-alpha.31
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 +37 -0
- package/core/index.js.map +1 -1
- package/design-system/default-theme.css +6 -1
- package/design-system/full-theme.css +6 -1
- package/design-system/list-default.css +3 -0
- package/design-system/suggestion-default.css +3 -1
- package/docs/API-reference/api/x-components.identifierresultsactions.md +0 -1
- package/docs/API-reference/api/x-components.identifierresultsmutations.md +1 -0
- package/docs/API-reference/api/x-components.identifierresultsmutations.setparams.md +24 -0
- package/docs/API-reference/api/x-components.identifierresultsstate.md +1 -0
- package/docs/API-reference/api/x-components.identifierresultsstate.params.md +13 -0
- package/docs/API-reference/api/x-components.md +3 -0
- package/docs/API-reference/api/x-components.setconsent.md +1 -1
- package/docs/API-reference/api/x-components.setidentifierresultsextraparams.md +13 -0
- package/docs/API-reference/api/x-components.setquerytaggingdebounce.md +1 -1
- package/docs/API-reference/api/x-components.setsessionduration.md +1 -1
- package/docs/API-reference/api/x-components.taggingactions.md +7 -0
- package/docs/API-reference/api/x-components.taggingactions.track.md +24 -0
- package/docs/API-reference/api/x-components.track.md +13 -0
- package/docs/API-reference/api/x-components.trackwire.md +13 -0
- package/docs/build-search-ui/README.md +113 -0
- package/docs/build-search-ui/web-archetype-integration-guide.md +183 -0
- package/docs/build-search-ui/web-use-x-components-guide.md +170 -0
- package/docs/build-search-ui/web-x-components-integration-guide.md +197 -0
- package/docs/build-search-ui/x-architecture/README.md +133 -0
- package/docs/sidebar.json +1 -1
- package/identifier-results/index.js +1 -1
- package/js/index.js +3 -2
- package/js/index.js.map +1 -1
- package/js/x-modules/history-queries/components/history-query.vue.js +1 -1
- package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-query.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/identifier-results/store/actions/save-query.action.js +4 -0
- package/js/x-modules/identifier-results/store/actions/save-query.action.js.map +1 -1
- package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js +4 -8
- package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js.map +1 -1
- package/js/x-modules/identifier-results/store/module.js +5 -3
- package/js/x-modules/identifier-results/store/module.js.map +1 -1
- package/js/x-modules/identifier-results/wiring.js +14 -2
- package/js/x-modules/identifier-results/wiring.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query.vue.js +2 -1
- package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-search.vue.js +2 -1
- package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-search.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +2 -1
- package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestion.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/related-tags/components/related-tag.vue.js +2 -2
- package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
- package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js +15 -7
- package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/partial-query-button.vue.js.map +1 -1
- package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js +14 -6
- package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/spellcheck-button.vue.js.map +1 -1
- package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js +14 -6
- package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/store/emitters.js +8 -1
- package/js/x-modules/search/store/emitters.js.map +1 -1
- package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-button.vue_rollup-plugin-vue=script.js +14 -6
- package/js/x-modules/search-box/components/search-button.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search-box/components/search-input.vue.js +2 -2
- package/js/x-modules/search-box/components/search-input.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue=script.js +10 -9
- package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/tagging/store/actions/track.action.js +43 -0
- package/js/x-modules/tagging/store/actions/track.action.js.map +1 -0
- package/js/x-modules/tagging/store/module.js +6 -2
- package/js/x-modules/tagging/store/module.js.map +1 -1
- package/js/x-modules/tagging/wiring.js +26 -2
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js +2 -2
- package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js.map +1 -1
- package/package.json +2 -2
- package/report/x-components.api.json +234 -49
- package/report/x-components.api.md +34 -6
- package/tagging/index.js +2 -1
- package/types/adapter/mocked-adapter.d.ts.map +1 -1
- package/types/x-modules/history-queries/components/history-query.vue.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/actions/save-query.action.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/getters/identifier-results-request.getter.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/module.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/types.d.ts +9 -7
- package/types/x-modules/identifier-results/store/types.d.ts.map +1 -1
- package/types/x-modules/identifier-results/wiring.d.ts +10 -1
- package/types/x-modules/identifier-results/wiring.d.ts.map +1 -1
- package/types/x-modules/next-queries/components/next-query.vue.d.ts.map +1 -1
- package/types/x-modules/popular-searches/components/popular-search.vue.d.ts.map +1 -1
- package/types/x-modules/query-suggestions/components/query-suggestion.vue.d.ts.map +1 -1
- package/types/x-modules/related-tags/components/related-tag.vue.d.ts +8 -0
- package/types/x-modules/related-tags/components/related-tag.vue.d.ts.map +1 -1
- package/types/x-modules/search/components/partial-query-button.vue.d.ts +8 -0
- package/types/x-modules/search/components/partial-query-button.vue.d.ts.map +1 -1
- package/types/x-modules/search/components/spellcheck-button.vue.d.ts +8 -0
- package/types/x-modules/search/components/spellcheck-button.vue.d.ts.map +1 -1
- package/types/x-modules/search/store/emitters.d.ts +4 -1
- package/types/x-modules/search/store/emitters.d.ts.map +1 -1
- package/types/x-modules/search-box/components/search-button.vue.d.ts +8 -0
- package/types/x-modules/search-box/components/search-button.vue.d.ts.map +1 -1
- package/types/x-modules/search-box/components/search-input.vue.d.ts +1 -1
- package/types/x-modules/search-box/components/search-input.vue.d.ts.map +1 -1
- package/types/x-modules/tagging/store/actions/index.d.ts +2 -0
- package/types/x-modules/tagging/store/actions/index.d.ts.map +1 -0
- package/types/x-modules/tagging/store/actions/track.action.d.ts +12 -0
- package/types/x-modules/tagging/store/actions/track.action.d.ts.map +1 -0
- package/types/x-modules/tagging/store/index.d.ts +1 -0
- package/types/x-modules/tagging/store/index.d.ts.map +1 -1
- package/types/x-modules/tagging/store/module.d.ts.map +1 -1
- package/types/x-modules/tagging/store/types.d.ts +7 -0
- package/types/x-modules/tagging/store/types.d.ts.map +1 -1
- package/types/x-modules/tagging/wiring.d.ts +17 -7
- package/types/x-modules/tagging/wiring.d.ts.map +1 -1
- package/docs/API-reference/api/x-components.identifierresultsactions.seturlparams.md +0 -24
- package/docs/css/global.scss +0 -1
- package/docs/css/utils/utils.scss +0 -35
- package/docs/css/xcomponents/clear-search-input.scss +0 -9
- package/docs/css/xcomponents/index.scss +0 -16
- package/docs/css/xcomponents/search-input.scss +0 -10
- package/docs/css/xcomponents/suggestions.scss +0 -19
- package/docs/guide/getting-started/components/clear-search-input.md +0 -98
- package/docs/guide/getting-started/components/live-examples.md +0 -100
- package/docs/guide/getting-started/components/query-suggestions.md +0 -76
- package/docs/guide/getting-started/components/search-button.md +0 -98
- package/docs/guide/getting-started/components/search-input.md +0 -105
- package/docs/guide/getting-started/install-xplugin.md +0 -72
- package/docs/guide/getting-started/use-components.md +0 -75
- package/docs/guide/install.md +0 -30
- package/docs/react-components/ReactComponents.jsx +0 -46
- package/docs/react-components/Utils.jsx +0 -34
- package/js/x-modules/identifier-results/store/actions/set-url-params.action.js +0 -17
- package/js/x-modules/identifier-results/store/actions/set-url-params.action.js.map +0 -1
- package/types/x-modules/identifier-results/store/actions/set-url-params.action.d.ts +0 -12
- package/types/x-modules/identifier-results/store/actions/set-url-params.action.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,43 @@
|
|
|
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.31](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.30...@empathyco/x-components@3.0.0-alpha.31) (2021-11-25)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **design-system:** add identifier result in suggestion component
|
|
11
|
+
([d4ce3c2](https://github.com/empathyco/x/commit/d4ce3c2eb1188e38e55e466f65c9da165bf9bfe7)),
|
|
12
|
+
closes [EX-5065](https://searchbroker.atlassian.net/browse/EX-5065)
|
|
13
|
+
- **identifier-results:** add extra params in the x-module
|
|
14
|
+
([6afff42](https://github.com/empathyco/x/commit/6afff426081b645bb0e878c77915a4c319b847d2)),
|
|
15
|
+
closes [EX-5066](https://searchbroker.atlassian.net/browse/EX-5066)
|
|
16
|
+
- **tagging:** `track` query
|
|
17
|
+
([594c656](https://github.com/empathyco/x/commit/594c65649cbf08f586dc9912b367ea39d9da2fa6)),
|
|
18
|
+
closes [EX-4989](https://searchbroker.atlassian.net/browse/EX-4989)
|
|
19
|
+
- **tagging:** add feature hardcoded values
|
|
20
|
+
([ee6db3a](https://github.com/empathyco/x/commit/ee6db3a360228528a109fedc732bd552ad5d5a61)),
|
|
21
|
+
closes [EX-5003](https://searchbroker.atlassian.net/browse/EX-5003)
|
|
22
|
+
|
|
23
|
+
### Testing
|
|
24
|
+
|
|
25
|
+
- **e2e:** Reduce command timeout and number of retries.
|
|
26
|
+
([5e1521f](https://github.com/empathyco/x/commit/5e1521f53aad1e4bfc8f60c7e705422ab2af052c)),
|
|
27
|
+
closes [EX-5015](https://searchbroker.atlassian.net/browse/EX-5015)
|
|
28
|
+
- **e2e:** reorder mocked responses
|
|
29
|
+
([8cab691](https://github.com/empathyco/x/commit/8cab691b553af31d9b5bc80130e16886877f1b60)),
|
|
30
|
+
closes [EX-4923](https://searchbroker.atlassian.net/browse/EX-4923)
|
|
31
|
+
|
|
32
|
+
### Documentation
|
|
33
|
+
|
|
34
|
+
- add new static docs.
|
|
35
|
+
([8a40986](https://github.com/empathyco/x/commit/8a409865fea2cd67e0c2daa5d4464f553ff33a2b)),
|
|
36
|
+
closes [EX-5033](https://searchbroker.atlassian.net/browse/EX-5033)
|
|
37
|
+
|
|
38
|
+
# Change Log
|
|
39
|
+
|
|
40
|
+
All notable changes to this project will be documented in this file. See
|
|
41
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
42
|
+
|
|
6
43
|
## [3.0.0-alpha.30](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.29...@empathyco/x-components@3.0.0-alpha.30) (2021-11-22)
|
|
7
44
|
|
|
8
45
|
### 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1091,6 +1091,9 @@
|
|
|
1091
1091
|
.x-list > .x-list__item--expand {
|
|
1092
1092
|
flex: 1 1 auto; }
|
|
1093
1093
|
|
|
1094
|
+
.x-list > .x-list__item--no-expand {
|
|
1095
|
+
flex: 0 0 auto; }
|
|
1096
|
+
|
|
1094
1097
|
.x-list.x-list--horizontal > .x-list__item--expand {
|
|
1095
1098
|
min-width: 0; }
|
|
1096
1099
|
|
|
@@ -1888,7 +1891,7 @@
|
|
|
1888
1891
|
margin-right: var(--x-size-gap-suggestion-default); } }
|
|
1889
1892
|
.x-suggestion__query {
|
|
1890
1893
|
flex: 1 1 auto; }
|
|
1891
|
-
.x-suggestion__matching-part {
|
|
1894
|
+
.x-suggestion__matching-part, .x-suggestion .x-identifier-result__matching-part {
|
|
1892
1895
|
font-family: var(--x-font-family-suggestion-matching-part-default);
|
|
1893
1896
|
font-size: var(--x-size-font-suggestion-matching-part-default);
|
|
1894
1897
|
line-height: var(--x-size-line-height-suggestion-matching-part-default);
|
|
@@ -1902,6 +1905,8 @@
|
|
|
1902
1905
|
--x-number-font-weight-suggestion-default-matching
|
|
1903
1906
|
);
|
|
1904
1907
|
--x-color-text-suggestion-default: var(--x-color-text-suggestion-default-matching); }
|
|
1908
|
+
.x-suggestion > .x-identifier-result {
|
|
1909
|
+
flex: none; }
|
|
1905
1910
|
|
|
1906
1911
|
:root {
|
|
1907
1912
|
--x-color-text-suggestion-default: var(--x-color-text-default);
|
|
@@ -1474,6 +1474,9 @@
|
|
|
1474
1474
|
.x-list > .x-list__item--expand {
|
|
1475
1475
|
flex: 1 1 auto; }
|
|
1476
1476
|
|
|
1477
|
+
.x-list > .x-list__item--no-expand {
|
|
1478
|
+
flex: 0 0 auto; }
|
|
1479
|
+
|
|
1477
1480
|
.x-list.x-list--horizontal > .x-list__item--expand {
|
|
1478
1481
|
min-width: 0; }
|
|
1479
1482
|
|
|
@@ -2828,7 +2831,7 @@
|
|
|
2828
2831
|
margin-right: var(--x-size-gap-suggestion-default); } }
|
|
2829
2832
|
.x-suggestion__query {
|
|
2830
2833
|
flex: 1 1 auto; }
|
|
2831
|
-
.x-suggestion__matching-part {
|
|
2834
|
+
.x-suggestion__matching-part, .x-suggestion .x-identifier-result__matching-part {
|
|
2832
2835
|
font-family: var(--x-font-family-suggestion-matching-part-default);
|
|
2833
2836
|
font-size: var(--x-size-font-suggestion-matching-part-default);
|
|
2834
2837
|
line-height: var(--x-size-line-height-suggestion-matching-part-default);
|
|
@@ -2842,6 +2845,8 @@
|
|
|
2842
2845
|
--x-number-font-weight-suggestion-default-matching
|
|
2843
2846
|
);
|
|
2844
2847
|
--x-color-text-suggestion-default: var(--x-color-text-suggestion-default-matching); }
|
|
2848
|
+
.x-suggestion > .x-identifier-result {
|
|
2849
|
+
flex: none; }
|
|
2845
2850
|
|
|
2846
2851
|
:root {
|
|
2847
2852
|
--x-color-text-suggestion-default: var(--x-color-text-default);
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
margin-right: var(--x-size-gap-suggestion-default); } }
|
|
64
64
|
.x-suggestion__query {
|
|
65
65
|
flex: 1 1 auto; }
|
|
66
|
-
.x-suggestion__matching-part {
|
|
66
|
+
.x-suggestion__matching-part, .x-suggestion .x-identifier-result__matching-part {
|
|
67
67
|
font-family: var(--x-font-family-suggestion-matching-part-default);
|
|
68
68
|
font-size: var(--x-size-font-suggestion-matching-part-default);
|
|
69
69
|
line-height: var(--x-size-line-height-suggestion-matching-part-default);
|
|
@@ -77,3 +77,5 @@
|
|
|
77
77
|
--x-number-font-weight-suggestion-default-matching
|
|
78
78
|
);
|
|
79
79
|
--x-color-text-suggestion-default: var(--x-color-text-suggestion-default-matching); }
|
|
80
|
+
.x-suggestion > .x-identifier-result {
|
|
81
|
+
flex: none; }
|
|
@@ -21,5 +21,4 @@ export interface IdentifierResultsActions
|
|
|
21
21
|
| [fetchIdentifierResults(request)](./x-components.identifierresultsactions.fetchidentifierresults.md) | Requests a new set of identifier results for the module query, and returns them. |
|
|
22
22
|
| [saveOrigin(originInit)](./x-components.identifierresultsactions.saveorigin.md) | Creates a [QueryOrigin](./x-components.queryorigin.md) and saves it. |
|
|
23
23
|
| [saveQuery(query)](./x-components.identifierresultsactions.savequery.md) | Stores the query in the module if it matches the regex. |
|
|
24
|
-
| [setUrlParams(urlParams)](./x-components.identifierresultsactions.seturlparams.md) | Checks if the url has a query on it and then updates the state with that value. |
|
|
25
24
|
|
|
@@ -19,5 +19,6 @@ export interface IdentifierResultsMutations extends StatusMutations
|
|
|
19
19
|
| --- | --- |
|
|
20
20
|
| [setIdentifierResults(identifierResults)](./x-components.identifierresultsmutations.setidentifierresults.md) | Sets the identifier results of the module. |
|
|
21
21
|
| [setOrigin(origin)](./x-components.identifierresultsmutations.setorigin.md) | Sets the origin of the module. |
|
|
22
|
+
| [setParams(params)](./x-components.identifierresultsmutations.setparams.md) | Sets the extra params of the module. |
|
|
22
23
|
| [setQuery(newQuery)](./x-components.identifierresultsmutations.setquery.md) | Sets the query of the module, which is used to retrieve the identifier-results. |
|
|
23
24
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [IdentifierResultsMutations](./x-components.identifierresultsmutations.md) > [setParams](./x-components.identifierresultsmutations.setparams.md)
|
|
4
|
+
|
|
5
|
+
## IdentifierResultsMutations.setParams() method
|
|
6
|
+
|
|
7
|
+
Sets the extra params of the module.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setParams(params: Dictionary<unknown>): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| params | [Dictionary](./x-components.dictionary.md)<!-- --><unknown> | The new extra params. |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
@@ -20,5 +20,6 @@ export interface IdentifierResultsState extends StatusState
|
|
|
20
20
|
| [config](./x-components.identifierresultsstate.config.md) | [IdentifierResultsConfig](./x-components.identifierresultsconfig.md) | The configuration of the identifier results module. |
|
|
21
21
|
| [identifierResults](./x-components.identifierresultsstate.identifierresults.md) | Result\[\] | The list of the identifier results, related to the <code>query</code> property of the state. |
|
|
22
22
|
| [origin](./x-components.identifierresultsstate.origin.md) | [QueryOrigin](./x-components.queryorigin.md) \| null | The origin property of the request. |
|
|
23
|
+
| [params](./x-components.identifierresultsstate.params.md) | [Dictionary](./x-components.dictionary.md)<!-- --><unknown> | The extra params property of the state. |
|
|
23
24
|
| [query](./x-components.identifierresultsstate.query.md) | string | The internal query of the module. Used to request the identifier results. |
|
|
24
25
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [IdentifierResultsState](./x-components.identifierresultsstate.md) > [params](./x-components.identifierresultsstate.params.md)
|
|
4
|
+
|
|
5
|
+
## IdentifierResultsState.params property
|
|
6
|
+
|
|
7
|
+
The extra params property of the state.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
params: Dictionary<unknown>;
|
|
13
|
+
```
|
|
@@ -480,6 +480,7 @@ X-Components is a library usable everywhere not only for search experiences.
|
|
|
480
480
|
| [setExtraParams](./x-components.setextraparams.md) | Sets the extra params of the [ExtraParamsXModule](./x-components.extraparamsxmodule.md)<!-- -->. |
|
|
481
481
|
| [setHistoryQueries](./x-components.sethistoryqueries.md) | Default implementation for the [HistoryQueriesActions.setHistoryQueries()](./x-components.historyqueriesactions.sethistoryqueries.md)<!-- -->. |
|
|
482
482
|
| [setHistoryQueriesQuery](./x-components.sethistoryqueriesquery.md) | Sets the query of the history queries module. Used for searching into the history queries. |
|
|
483
|
+
| [setIdentifierResultsExtraParams](./x-components.setidentifierresultsextraparams.md) | Sets the identifier result state <code>params</code>. |
|
|
483
484
|
| [setIdentifierResultsQuery](./x-components.setidentifierresultsquery.md) | Sets the identifier-results module query. |
|
|
484
485
|
| [setInitialExtraParams](./x-components.setinitialextraparams.md) | Sets the initial provided extra params. |
|
|
485
486
|
| [setName](./x-components.setname.md) | Sets the device of the [DeviceXModule](./x-components.devicexmodule.md)<!-- -->. |
|
|
@@ -526,6 +527,8 @@ X-Components is a library usable everywhere not only for search experiences.
|
|
|
526
527
|
| [throttleFunction](./x-components.throttlefunction.md) | Util function that returns a throttled version of the function passed as parameter. |
|
|
527
528
|
| [toggleRelatedTag](./x-components.togglerelatedtag.md) | Default implementation for the [RelatedTagsActions.toggleRelatedTag()](./x-components.relatedtagsactions.togglerelatedtag.md)<!-- -->. |
|
|
528
529
|
| [toggleRelatedTagWire](./x-components.togglerelatedtagwire.md) | Sets the selected related tags. |
|
|
530
|
+
| [track](./x-components.track.md) | Default implementation for the [TaggingActions.track()](./x-components.taggingactions.track.md)<!-- -->. |
|
|
531
|
+
| [trackWire](./x-components.trackwire.md) | Tracks the tagging of the query using a debounce which ends if the user accepts a query. |
|
|
529
532
|
| [TrashIcon](./x-components.trashicon.md) | |
|
|
530
533
|
| [TrashOpenIcon](./x-components.trashopenicon.md) | |
|
|
531
534
|
| [TrendingIcon](./x-components.trendingicon.md) | |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [setIdentifierResultsExtraParams](./x-components.setidentifierresultsextraparams.md)
|
|
4
|
+
|
|
5
|
+
## setIdentifierResultsExtraParams variable
|
|
6
|
+
|
|
7
|
+
Sets the identifier result state `params`<!-- -->.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setIdentifierResultsExtraParams: import("../..").Wire<import("../..").Dictionary<unknown>>
|
|
13
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [TaggingActions](./x-components.taggingactions.md) > [track](./x-components.taggingactions.track.md)
|
|
4
|
+
|
|
5
|
+
## TaggingActions.track() method
|
|
6
|
+
|
|
7
|
+
Tracks a user interaction.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
track(tagging: TaggingInfo | TaggingInfo[]): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| tagging | TaggingInfo \| TaggingInfo\[\] | The information of the event to track. |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [track](./x-components.track.md)
|
|
4
|
+
|
|
5
|
+
## track variable
|
|
6
|
+
|
|
7
|
+
Default implementation for the [TaggingActions.track()](./x-components.taggingactions.track.md)<!-- -->.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
track: TaggingXStoreModule['actions']['track']
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [trackWire](./x-components.trackwire.md)
|
|
4
|
+
|
|
5
|
+
## trackWire variable
|
|
6
|
+
|
|
7
|
+
Tracks the tagging of the query using a debounce which ends if the user accepts a query.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
trackWire: import("../../wiring").AnyWire
|
|
13
|
+
```
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: x-components.README
|
|
3
|
+
title: README
|
|
4
|
+
sidebar_label: README
|
|
5
|
+
---
|
|
6
|
+
---
|
|
7
|
+
title: Build your search UI for web
|
|
8
|
+
tags:
|
|
9
|
+
- getting started
|
|
10
|
+
- x integration
|
|
11
|
+
- use x components
|
|
12
|
+
- x components
|
|
13
|
+
- interface x
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
::: slot left-intro-column
|
|
17
|
+
|
|
18
|
+
## Getting started with Interface X Components
|
|
19
|
+
|
|
20
|
+
Start building your search and discovery experience in a few simple steps:
|
|
21
|
+
|
|
22
|
+
:::
|
|
23
|
+
|
|
24
|
+
::: slot right-intro-column
|
|
25
|
+
|
|
26
|
+
<img :src="$withBase('/assets/media/build-search-ui.svg')" alt="Build Your Search UI">
|
|
27
|
+
|
|
28
|
+
:::
|
|
29
|
+
|
|
30
|
+
- **Discover more about the
|
|
31
|
+
[Interface X ecosystem](/develop-empathy-platform/build-search-ui/README.md#the-interface-x-ecosystem)**
|
|
32
|
+
and how Interface X works.
|
|
33
|
+
- **[Integrate the Interface X Components](/develop-empathy-platform/build-search-ui/README.md#integrate-x-components)**
|
|
34
|
+
in your store web application.
|
|
35
|
+
- **[Use & configure the Interface X Components](/develop-empathy-platform/build-search-ui/README.md#use-configure-the-x-components)**
|
|
36
|
+
in your project.
|
|
37
|
+
|
|
38
|
+
<!-- 3. Style your UI. 4. Translate your search experience-->
|
|
39
|
+
<!-- HIDE VIDEO UNTIL CONTENT BOX FIXED <VideoContent title="Want to learn more?" :links="[{title:'How-to guide',link:'/develop-empathy-platform/build-search-ui/web-x-components-integration-guide'},{title:'Architecture',link:'/develop-empathy-platform/build-search-ui/x-architecture/'},{title:'UI reference',link:'/develop-empathy-platform/ui-reference/'}]"></VideoContent>-->
|
|
40
|
+
|
|
41
|
+
## The Interface X ecosystem
|
|
42
|
+
|
|
43
|
+
The Interface X ecosystem consists of libraries of components for web. These independent
|
|
44
|
+
building blocks, with their own unique view and behavior, allows you to progressively build your
|
|
45
|
+
search and discovery experience. The more you add, the more functionality you get. There are
|
|
46
|
+
numerous components to choose from, and the catalog evolves quickly with new experiences.
|
|
47
|
+
|
|
48
|
+
Check out the **[open source project in GitHub](https://github.com/empathyco/x)**.
|
|
49
|
+
|
|
50
|
+
Interested in learning more about how Interface X works? Discover more about its
|
|
51
|
+
**[architecture](/develop-empathy-platform/build-search-ui/x-architecture/)**.
|
|
52
|
+
|
|
53
|
+
## Integrate Interface X Components
|
|
54
|
+
|
|
55
|
+
You can use the X Components in a project in two ways:
|
|
56
|
+
|
|
57
|
+
- using the separate **Interface X Archetype** project, an out-of-the-box project with all
|
|
58
|
+
you need to get up and running fast, or
|
|
59
|
+
- integrating the individual **Interface X Components** library in your Vue project for a
|
|
60
|
+
more custom approach.
|
|
61
|
+
|
|
62
|
+
::: note You can use Empathy Search API, Elasticsearch, or Solr endpoints with both approaches. :::
|
|
63
|
+
|
|
64
|
+
##### Integration via Interface X Archetype project
|
|
65
|
+
|
|
66
|
+
The **[Interface X Archetype](https://github.com/empathyco/x-archetype)** project is the
|
|
67
|
+
perfect combination of all the existing X Components. Instead of starting from a completely
|
|
68
|
+
blank canvas, ramp up quickly with an already working search and discovery experience. This is the
|
|
69
|
+
perfect solution for most cases. But don’t worry! It’s still super flexible! You’re still able to:
|
|
70
|
+
|
|
71
|
+
- Change the default styles for styles that match your application through design tokens or custom
|
|
72
|
+
CSS.
|
|
73
|
+
- Change configuration parameters such as the number of suggestions, enable, or disable instant
|
|
74
|
+
search.
|
|
75
|
+
- Change the layout, position, or the number of the components used.
|
|
76
|
+
- Use the individual X Component internationalization tool or use your own tool.
|
|
77
|
+
- Create new components or modify the existing ones.
|
|
78
|
+
|
|
79
|
+
To start using the X Archetype project, see
|
|
80
|
+
**[Integrate Interface X Archetype project](web-archetype-integration-guide.md)**.
|
|
81
|
+
|
|
82
|
+
##### Integration via Interface X Components library
|
|
83
|
+
|
|
84
|
+
This is the more deep and flexible use of the
|
|
85
|
+
**[Interface X Components library](https://github.com/empathyco/x/tree/main/packages/x-components)**,
|
|
86
|
+
allowing you to import any components you desire into your Vue application. It lets you connect,
|
|
87
|
+
customize, extend, style, or even create new components without any limitations. This is the way to
|
|
88
|
+
go if you like to look under the hood!
|
|
89
|
+
|
|
90
|
+
- Mix and match with other Vue components.
|
|
91
|
+
- Implement in Vue or React projects.
|
|
92
|
+
- Extend component behavior with your own development.
|
|
93
|
+
- Determine styles using design tokens or custom CSS.
|
|
94
|
+
|
|
95
|
+
To get started with the X Components library, check out
|
|
96
|
+
**[Integrate Interface X Components in your Vue application](web-x-components-integration-guide.md)**.
|
|
97
|
+
|
|
98
|
+
## Use & configure the Interface X Components
|
|
99
|
+
|
|
100
|
+
Using the Interface X Components is a piece of cake! Just import and register the
|
|
101
|
+
component, include it in your template, and you’re ready to go! What’s more, each component offers
|
|
102
|
+
multiple configuration parameters to play around with, allowing you greater flexibility over the
|
|
103
|
+
experience.
|
|
104
|
+
|
|
105
|
+
Unsure how to start? Check out
|
|
106
|
+
**[Use & configure Interface X Components in your project](web-use-x-components-guide.md)**.
|
|
107
|
+
|
|
108
|
+
<!--
|
|
109
|
+
## Style your UI
|
|
110
|
+
|
|
111
|
+
## Translate your search experience
|
|
112
|
+
|
|
113
|
+
-->
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: x-components.web-archetype-integration-guide
|
|
3
|
+
title: Web Archetype Integration Guide
|
|
4
|
+
sidebar_label: Web Archetype Integration Guide
|
|
5
|
+
---
|
|
6
|
+
---
|
|
7
|
+
title: Integrate Interface X Archetype
|
|
8
|
+
tags:
|
|
9
|
+
- integration
|
|
10
|
+
- archetype
|
|
11
|
+
- X Components archetype integration
|
|
12
|
+
- x integration
|
|
13
|
+
- interface x
|
|
14
|
+
- x components
|
|
15
|
+
- archetype integration
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Integrate Interface X Archetype
|
|
19
|
+
|
|
20
|
+
In this tutorial, you’ll learn how to integrate the Interface X Archetype project in your
|
|
21
|
+
store in a matter of minutes so you can develop a search interface layer based on predefined
|
|
22
|
+
features and components.
|
|
23
|
+
|
|
24
|
+
For this tutorial, the Empathy Search API is used, but you can use any search API. This guide
|
|
25
|
+
requires knowledge of JavaScript and Vue.js.
|
|
26
|
+
|
|
27
|
+
::: note Before you begin
|
|
28
|
+
|
|
29
|
+
To integrate Interface X Archetype as a search UI layer, you need:
|
|
30
|
+
|
|
31
|
+
- **Empathy Search API** (or any search API that you use to retrieve search data).
|
|
32
|
+
- **Empathy Search Adapter** to communicate with the Empathy Search API (or any search adapter to
|
|
33
|
+
connect with the search API you are using).
|
|
34
|
+
|
|
35
|
+
:::
|
|
36
|
+
|
|
37
|
+
##### Steps to integrate X Archetype project:
|
|
38
|
+
|
|
39
|
+
1. **Clone** the X Archetype project and **initialize** your repository.
|
|
40
|
+
2. Install the **project dependencies** and execute the project.
|
|
41
|
+
3. Configure the **search adapter**.
|
|
42
|
+
4. Configure the **xPlugin**.
|
|
43
|
+
|
|
44
|
+
## 1. Clone the project and initialize your repository
|
|
45
|
+
|
|
46
|
+
Clone the [X Archetype project](https://github.com/empathyco/x-archetype.git) from the GitHub
|
|
47
|
+
repository to your target folder. You need a non-initialized repository, so make sure you remove the
|
|
48
|
+
git folder from the cloned project.
|
|
49
|
+
|
|
50
|
+
```batch
|
|
51
|
+
// Clone the X Archetype project from GitHub
|
|
52
|
+
git clone --depth 1 https://github.com/empathyco/x-archetype.git <your-target-folder>
|
|
53
|
+
|
|
54
|
+
// Remove the git folder
|
|
55
|
+
rm -rf .git
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
::: develop
|
|
59
|
+
|
|
60
|
+
You can use [Degit](https://github.com/Rich-Harris/degit) to clone the git repository without
|
|
61
|
+
downloading the entire git history:
|
|
62
|
+
`npx degit https://github.com/empathyco/x-archetype.git <your-target-folder>`.
|
|
63
|
+
|
|
64
|
+
:::
|
|
65
|
+
|
|
66
|
+
Once you have cloned the project and removed the git history from the project, initialize the
|
|
67
|
+
repository from the root directory.
|
|
68
|
+
|
|
69
|
+
```batch
|
|
70
|
+
// Initialize the repository
|
|
71
|
+
git init
|
|
72
|
+
git remote add origin <your-repository-url>
|
|
73
|
+
git add .
|
|
74
|
+
git commit -m "Initial X-Components Setup"
|
|
75
|
+
git push -u origin main
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Then, replace the current repository name (`@empathyco/x-archetype`) with the name of your
|
|
79
|
+
repository in the `package.json` file.
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
// Define your repository
|
|
83
|
+
{
|
|
84
|
+
"name": "<your-repo>",
|
|
85
|
+
"author": "Empathy Systems Corporation S.L.",
|
|
86
|
+
…
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## 2. Install the dependencies and execute the project
|
|
92
|
+
|
|
93
|
+
Install the project dependencies via `npm` in the root folder of your cloned repository. Then, you
|
|
94
|
+
can run the project.
|
|
95
|
+
|
|
96
|
+
```batch
|
|
97
|
+
// Install the dependencies via npm
|
|
98
|
+
npm install
|
|
99
|
+
|
|
100
|
+
// Execute the project
|
|
101
|
+
npm run serve
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
::: interact
|
|
105
|
+
For a full list of the project dependencies, check the
|
|
106
|
+
[`package.json`](https://github.com/empathyco/x-archetype/blob/main/package.json) file in the
|
|
107
|
+
Interface X Archetype repository. :::
|
|
108
|
+
|
|
109
|
+
## 3. Configure the search adapter
|
|
110
|
+
|
|
111
|
+
Before using your project, configure the Empathy Search Adapter in the
|
|
112
|
+
`x-archetype/src/adapter/adapter.ts` file, using the Empathy Adapter Builder to make it work with
|
|
113
|
+
the Empathy Search API. The Empathy Search Adapter contains a sample configuration for setup, global
|
|
114
|
+
configurations, or mappers that points to a demo environment. You need to make some adjustments in
|
|
115
|
+
the configuration according to the search features you use in your project.
|
|
116
|
+
|
|
117
|
+
Export the required search adapter with your configuration as you will need it for the search
|
|
118
|
+
[xPlugin configuration](web-archetype-integration-guide.md#_4-configure-the-plugin).
|
|
119
|
+
|
|
120
|
+
::: interact For detailed information about other configuration options in the Empathy Search
|
|
121
|
+
Adapter, go to the
|
|
122
|
+
[x-adapter repository](https://github.com/empathyco/x/tree/main/packages/search-adapter). :::
|
|
123
|
+
|
|
124
|
+
::: note Although you configure the values for the `instance`, `language`, `scope`, and `endpoint`
|
|
125
|
+
options when integrating the project, you can still change these values when the project is
|
|
126
|
+
deployed. Use the `/x-archetype/public/snippet-script.js` file to perform hot changes for `lang`,
|
|
127
|
+
`store`, `device`, and `catalog` parameters.
|
|
128
|
+
|
|
129
|
+
For example, you may configure the adapter to use EN as `lang` so that when you search, the results
|
|
130
|
+
are displayed in English. However, if you want to deploy the application in Spain, you want the
|
|
131
|
+
`lang` to be ES. You change these values in the `snippet-script.js` file.
|
|
132
|
+
|
|
133
|
+
:::
|
|
134
|
+
|
|
135
|
+
## 4. Configure the plugin
|
|
136
|
+
|
|
137
|
+
The `xPlugin` initializes the properties needed by the X Components. It has key options that
|
|
138
|
+
you can configure in the `/x-archetype/src/x-components/plugin.options.ts` file.
|
|
139
|
+
|
|
140
|
+
Since the X Archetype project operates as a layer and is designed to be integrated on top of
|
|
141
|
+
any kind of website regardless the chosen technology, the `XInstaller` utility and its
|
|
142
|
+
`installXOptions` object are designed to install the xPlugin, adding the connection between the
|
|
143
|
+
X Components and the search API and bootstrapping the entire application with powerful APIs
|
|
144
|
+
that are available in the `window.X` object.
|
|
145
|
+
|
|
146
|
+
To configure the xPlugin, run this code:
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
import { InstallXOptions, XInstaller } from '@empathyco/x-components';
|
|
150
|
+
import App from './App.vue';
|
|
151
|
+
import store from './store';
|
|
152
|
+
import { adapter } from '../adapter';
|
|
153
|
+
|
|
154
|
+
export const installXOptions: InstallXOptions = {
|
|
155
|
+
adapter,
|
|
156
|
+
store,
|
|
157
|
+
app: App
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
new XInstaller(installXOptions).init({
|
|
161
|
+
instance: '<your-search-api-instance>',
|
|
162
|
+
lang: '<your-application-language>',
|
|
163
|
+
scope: '<your-application-scope>'
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### Next steps
|
|
170
|
+
|
|
171
|
+
Once you have integrated the Interface X Archetype in your store, you're ready to start
|
|
172
|
+
using the X Archetype as is or extend the search and discovery experience to meet your business
|
|
173
|
+
needs:
|
|
174
|
+
|
|
175
|
+
- Change the configuration of [X Components](web-use-x-components-guide.md) or create new ones.
|
|
176
|
+
- Adapt the
|
|
177
|
+
[design system](https://github.com/empathyco/x/blob/main/packages/x-components/contributing/design-system.md)
|
|
178
|
+
to your branding.
|
|
179
|
+
- Manage
|
|
180
|
+
[internationalization options](https://github.com/empathyco/x-archetype/blob/main/docs/i18n.md) to
|
|
181
|
+
support different languages.
|
|
182
|
+
|
|
183
|
+
<!-- add links to design system and internationalization content pages when ready-->
|