@empathyco/x-components 3.0.0-alpha.102 → 3.0.0-alpha.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,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.103](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.102...@empathyco/x-components@3.0.0-alpha.103) (2022-05-25)
7
+
8
+ ### Documentation
9
+
10
+ - fix links and minor typos
11
+ ([e0197d5](https://github.com/empathyco/x/commit/e0197d5bff978048aed39dff5878d60682b7aa9f)),
12
+ closes [EX-6125](https://searchbroker.atlassian.net/browse/EX-6125)
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.102](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.101...@empathyco/x-components@3.0.0-alpha.102) (2022-05-19)
7
20
 
8
21
  ### Features
@@ -3211,10 +3211,6 @@
3211
3211
  border-radius: var(--x-size-border-radius-progress-bar-default);
3212
3212
  background-color: var(--x-color-background-progress-bar-line-default);
3213
3213
  }
3214
- .x-result.x-result--card {
3215
- overflow: hidden;
3216
- --x-size-border-radius-result-default: var(--x-size-border-radius-result-card);
3217
- }
3218
3214
  :root {
3219
3215
  --x-size-height-progress-bar-line-default: var(--x-size-base-02);
3220
3216
  --x-size-width-progress-bar-line-default: var(--x-size-base-20);
@@ -3224,6 +3220,10 @@
3224
3220
  --x-size-border-radius-progress-bar-default: var(--x-size-border-radius-base-pill);
3225
3221
  --x-size-border-width-progress-bar-default: 0;
3226
3222
  }
3223
+ .x-result.x-result--card {
3224
+ overflow: hidden;
3225
+ --x-size-border-radius-result-default: var(--x-size-border-radius-result-card);
3226
+ }
3227
3227
  :root {
3228
3228
  --x-size-border-radius-result-card: var(--x-size-border-radius-base-s);
3229
3229
  }
@@ -26,10 +26,10 @@ Start building your search and discovery experience:
26
26
 
27
27
  - **Discover the [Interface X ecosystem](#the-interface-x-ecosystem)** and how Interface X
28
28
  works.
29
- - **[Develop using Interface X](#develop-with-interface-x)** inside your project.
30
- - **[Integrate the Interface X Archetype](#integrate-interface-x-archetype)** in your store web
29
+ - **[Develop using Interface X](#developing-with-interface-x)** inside your project.
30
+ - **[Integrate the Interface X Archetype](#integrating-interface-x-archetype)** in your store web
31
31
  application.
32
- - **[Use and configure the Interface X Components](#use-and-configure-the-interface-x-components)**
32
+ - **[Use and configure the Interface X Components](#using-and-configuring-the-interface-x-components)**
33
33
  in your project.
34
34
 
35
35
  <!-- 3. Style your UI. 4. Translate your search experience-->
@@ -47,7 +47,7 @@ Check out the **[open source project in GitHub](https://github.com/empathyco/x)*
47
47
  Interested in learning more about how Interface&nbsp;X works? Discover more about its
48
48
  **[architecture](web-x-architecture.md)**.
49
49
 
50
- ## Develop with Interface X
50
+ ## Developing with Interface X
51
51
 
52
52
  You can use the Interface&nbsp;X in a project in two ways:
53
53
 
@@ -62,7 +62,7 @@ You can use Empathy Search API, Elasticsearch, or Solr endpoints with both appro
62
62
 
63
63
  :::
64
64
 
65
- ##### Develop via Interface X Archetype
65
+ ##### Developing via Interface X Archetype
66
66
 
67
67
  The **[Interface&nbsp;X&nbsp;Archetype](https://github.com/empathyco/x-archetype)** project is the
68
68
  perfect combination of all the existing X&nbsp;Components. It allows you to ramp up quickly with an
@@ -80,7 +80,7 @@ This is the perfect solution for most cases as you can use it as a springboard t
80
80
  To start developing the X&nbsp;Archetype project, see
81
81
  **[Develop using Interface&nbsp;X&nbsp;Archetype](web-archetype-development-guide.md)**.
82
82
 
83
- ##### Develop via Interface X Components library
83
+ ##### Developing via Interface X Components library
84
84
 
85
85
  This is the more deep and flexible use of the
86
86
  **[Interface&nbsp;X&nbsp;Components library](https://github.com/empathyco/x/tree/main/packages/x-components)**,
@@ -96,7 +96,7 @@ go if you like to look under the hood.
96
96
  To get started with the X&nbsp;Components library, check out
97
97
  **[Develop using Interface&nbsp;X&nbsp;Components library](web-x-components-development-guide.md)**.
98
98
 
99
- ## Integrate Interface X Archetype
99
+ ## Integrating Interface X Archetype
100
100
 
101
101
  With the **[Interface&nbsp;X&nbsp;Archetype](https://github.com/empathyco/x-archetype)** you have an
102
102
  isolated search layer up and running in your store web application in a matter of minutes.
@@ -108,7 +108,7 @@ Check out
108
108
  **[Integrate InterfaceX&nbsp;Archetype into an existing website](web-archetype-integration-guide.md)**,
109
109
  to integrate the X&nbsp;Archetype project.
110
110
 
111
- ## Use and configure the Interface X Components
111
+ ## Using and configuring the Interface X Components
112
112
 
113
113
  To use the Interface&nbsp;X&nbsp;Components, just **import** and **register** the component,
114
114
  **include** it in your template, and you’re ready to go.
@@ -35,7 +35,7 @@ To use Interface&nbsp;X&nbsp;Archetype as a search UI layer, you need:
35
35
  3. Configure the **search adapter**.
36
36
  4. Configure the **xPlugin**.
37
37
 
38
- ## 1. Clone the project and initialize your repository
38
+ ## Cloning the project and initializing your repository
39
39
 
40
40
  Clone the [X Archetype project](https://github.com/empathyco/x-archetype.git) from the GitHub
41
41
  repository to your target folder. You need a non-initialized repository, so make sure you remove the
@@ -79,7 +79,7 @@ repository in the `package.json` file.
79
79
  }
80
80
  ```
81
81
 
82
- ## 2. Install the dependencies and execute the project
82
+ ## Installing the dependencies and executing the project
83
83
 
84
84
  Install the project dependencies via `npm` in the root folder of your cloned repository. Then, you
85
85
  can run the project.
@@ -100,7 +100,7 @@ Interface&nbsp;X&nbsp;Archetype repository.
100
100
 
101
101
  :::
102
102
 
103
- ## 3. Configure the search adapter
103
+ ## Configuring the search adapter
104
104
 
105
105
  Before using your project, configure the Empathy Search Adapter in the
106
106
  `x-archetype/src/adapter/adapter.ts` file, using the Empathy Adapter Builder to make it work with
@@ -109,7 +109,7 @@ configurations, or mappers that points to a demo environment. You need to adjust
109
109
  according to the search features you use in your project.
110
110
 
111
111
  Export the required search adapter with your configuration as you will need it for the search
112
- [xPlugin configuration](#4-configure-the-plugin).
112
+ [xPlugin configuration](#configuring-the-plugin).
113
113
 
114
114
  ::: interact
115
115
 
@@ -132,11 +132,11 @@ are displayed in English. However, if you want to deploy the application in Spai
132
132
  </br>
133
133
 
134
134
  For detailed information, see
135
- [Snippet configuration](web-archetype-integration-guide.md#snippet-configuration)
135
+ [Snippet configuration](web-archetype-integration-guide.md#snippet-configuration).
136
136
 
137
137
  :::
138
138
 
139
- ## 4. Configure the plugin
139
+ ## Configuring the plugin
140
140
 
141
141
  The `xPlugin` initializes the properties needed by the X&nbsp;Components. It has key options that
142
142
  you can configure in the `/x-archetype/src/x-components/plugin.options.ts` file.
@@ -173,7 +173,8 @@ new XInstaller(installXOptions).init({
173
173
  Once you have your Interface&nbsp;X&nbsp;Archetype project, you're ready to **integrate** it in your
174
174
  store or **extend** the search and discovery experience to meet your business needs:
175
175
 
176
- - [**Integrate an Interface&nbsp;X&nbsp;Archetype project** into an existing website](web-archetype-integration-guide.md).
176
+ - [**Integrate an Interface&nbsp;X&nbsp;Archetype project**](web-archetype-integration-guide.md)
177
+ into an existing website.
177
178
  - Change the **configuration of [X&nbsp;Components](web-how-to-use-x-components-guide.md)** or
178
179
  create new ones.
179
180
  - Adapt the
@@ -19,11 +19,13 @@ meet your business needs.
19
19
  To integrate the Interface&nbsp;X&nbsp;Archetype layer in your commerce store, just **load** the
20
20
  generated Interface&nbsp;X JavaScript file and **initialize** it.
21
21
 
22
- ::: note IMPORTANT If the X&nbsp;Archetype script is hosted by Empathy, all the X resources are
23
- provided by a CDN through the following environment URLs:
22
+ ::: note IMPORTANT
24
23
 
25
- - **Production**: https://x.empathy.co/{INSTANCE}/app.js
26
- - **Staging**: https://x.staging.empathy.co/{INSTANCE}/app.js
24
+ If the X&nbsp;Archetype script is hosted by Empathy, all the X resources are provided by a CDN
25
+ through the following environment URLs:
26
+
27
+ - **Production**: `https://x.empathy.co/{INSTANCE}/app.js`
28
+ - **Staging**: `https://x.staging.empathy.co/{INSTANCE}/app.js`
27
29
 
28
30
  Where `{INSTANCE}` is the name of your commerce store. If you require any assistance, contact
29
31
  [Empathy Support](mailto:support@empathy.co).
@@ -32,8 +34,8 @@ Where `{INSTANCE}` is the name of your commerce store. If you require any assist
32
34
 
33
35
  Depending on your business needs, Interface&nbsp;X supports two initialization types:
34
36
 
35
- - **[Automatic initialization](#initializing-interface-x-project-automatically)**
36
- - **[On-demand initialization](#initializing-interface-x-project-on-demand)**
37
+ - **[Automatic initialization](#initializing-the-interface-x-project-automatically)**
38
+ - **[On-demand initialization](#initializing-the-interface-x-project-on-demand)**
37
39
 
38
40
  ::: develop Frameworks & libraries integration
39
41
 
@@ -43,16 +45,18 @@ for a correct implementation.
43
45
 
44
46
  :::
45
47
 
46
- ## Initializing Interface X project automatically
48
+ ## Initializing the Interface X project automatically
47
49
 
48
50
  Automatic initialization is the easiest way to integrate the Interface&nbsp;X project in a website.
49
51
 
50
- You first **configure the JavaScript snippet** to define either an initialization object or a
51
- function. Then, you **load and initialize the Interface&nbsp;X script**.
52
+ **Steps to initialize the project automatically**
53
+
54
+ 1. **Configure the JavaScript snippet** to define either an initialization object or a function.
55
+ 2. **Load and initialize** the Interface&nbsp;X script.
52
56
 
53
- ### 1. Add the snippet configuration
57
+ #### Configuring the snippet
54
58
 
55
- First, configure the JavaScript snippet to define multiple initialization options, i.e. the API to
59
+ First, add the JavaScript snippet configuration to define multiple initialization options, i.e. the API to
56
60
  use, the language or currency to display, or even the tagging parameters to collect search-related
57
61
  data to generate conversational search features and analytics.
58
62
 
@@ -97,7 +101,7 @@ more information on the supported parameters, check out
97
101
 
98
102
  :::
99
103
 
100
- ### 2. Load the script
104
+ #### Loading the script
101
105
 
102
106
  Once the snippet configuration is ready, add the Interface&nbsp;X script to your webpage. The script
103
107
  is hosted in a URL with the following syntax:
@@ -140,14 +144,16 @@ attribute `src` so that it points to the staging environment as follows:
140
144
  Thus, when the Interface&nbsp;X JavaScript file is loaded, it retrieves the configuration from the
141
145
  defined object or function.
142
146
 
143
- ## Initializing Interface X project on demand
147
+ ## Initializing the Interface X project on demand
144
148
 
145
149
  On-demand initialization allows you to control when Interface&nbsp;X is loaded.
146
150
 
147
- You first **load the Interface&nbsp;X script**. Then, you invoke a function with the required
148
- initialization options to **initialize Interface&nbsp;X**.
151
+ **Steps to initialize the project on demand**
152
+
153
+ 1. **Load** the Interface&nbsp;X script.
154
+ 2. **Initialize** Interface&nbsp;X.
149
155
 
150
- ### 1. Load the script
156
+ #### Loading the script
151
157
 
152
158
  Add the Interface&nbsp;X script hosted in a URL with the following syntax:
153
159
  `https://x.<environment?>.empathy.co/<instance>/app.js`.
@@ -166,9 +172,9 @@ attribute `src` so that it points to the staging environment as follows:
166
172
  <script src="https://x.staging.empathy.co/my-store/app.js"></script>
167
173
  ```
168
174
 
169
- ### 2. Initialize Interface&nbsp;X
175
+ #### Initializing Interface&nbsp;X
170
176
 
171
- Since no initialization configuration was defined when loading the script, you need to **invoke the
177
+ Since no initialization configuration is defined when loading the script, you need to **invoke the
172
178
  initialization function** created automatically in the
173
179
  [X API](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-installer/api/base-api.ts)
174
180
  object to provide the initialization options:
@@ -232,7 +238,7 @@ following configuration options:
232
238
 
233
239
  ::: note Consent parameter
234
240
 
235
- When the `Consent` parameter is set to `false`, the `sessionId` is not generated nor sent to the
241
+ When the `consent` parameter is set to `false`, the `sessionId` is not generated nor sent to the
236
242
  Tagging API. Only shoppers' behavioral data (wisdom of the crowd) is inferred from the current
237
243
  session. The `consent` parameter is set to `true` as soon as the shopper accepts the use of cookies.
238
244
  If page reload is not triggered after accepting cookies, update the `consent` parameter
@@ -24,7 +24,7 @@ you’re ready to use X&nbsp;Components in your project.
24
24
 
25
25
  2. **Configure the X&nbsp;Components behavior** to customize the search and discovery experience.
26
26
 
27
- ## 1. Import and register the X Components
27
+ ## Importing and registering the X Components
28
28
 
29
29
  Many of the X&nbsp;Components are distributed into modules to make them easier to manage. So you
30
30
  need to indicate from which module you’re importing each component as appropriate.
@@ -56,7 +56,7 @@ export default {
56
56
  //The components are now ready to be used inside your template.
57
57
  ```
58
58
 
59
- ## 2. Configure the X Components
59
+ ## Configuring the X Components
60
60
 
61
61
  You can configure some behaviors for each component to customize the search experience.
62
62
 
@@ -115,7 +115,7 @@ Learn more about the
115
115
 
116
116
  :::
117
117
 
118
- ### Importing the components from the search-box module
118
+ **1. Importing the components from the search-box module**
119
119
 
120
120
  For this purpose, you need to import the `SearchInput`, `SearchButton`, and `ClearSearchInput`
121
121
  components from the `search-box` module to the desired app component. Then, register them and
@@ -147,7 +147,7 @@ Now, you’re ready to start using the component wherever you want in your templ
147
147
  </template>
148
148
  ```
149
149
 
150
- ### Configuring the SearchInput component
150
+ **2. Configuring the SearchInput component**
151
151
 
152
152
  Next, you want to configure the behavior of the `SearchInput` component. Here you use the
153
153
  `maxLength` prop to limit the maximum length to 20 characters.
@@ -32,8 +32,6 @@ You can find the X&nbsp;Components library in the
32
32
 
33
33
  To integrate the X&nbsp;Components in a frontend UI, you need:
34
34
 
35
- <br/>
36
-
37
35
  - **Empathy Search API** to retrieve search data (or any other search API)
38
36
  - A **search adapter** to communicate with the search API. You can use the Empathy Adapter and
39
37
  configure it with the `EmpathyAdapterBuilder`
@@ -49,7 +47,7 @@ To integrate the X&nbsp;Components in a frontend UI, you need:
49
47
  3. Configure the **xPlugin**.
50
48
  4. Install and **initialize the xPlugin**.
51
49
 
52
- ## 1. Install the dependencies
50
+ ## Installing the dependencies
53
51
 
54
52
  To build your search and discovery UI, the following project dependencies are required:
55
53
 
@@ -78,7 +76,7 @@ Install the project dependencies via `npm` as follows:
78
76
  npm install --save @empathyco/x-components @empathyco/x-types @empathyco/x-adapter reflect-metadata
79
77
  ```
80
78
 
81
- ## 2. Configure the search adapter
79
+ ## Configuring the search adapter
82
80
 
83
81
  ::: warning
84
82
 
@@ -88,7 +86,7 @@ have imported the `reflect-metadata` polyfill before executing any code of the s
88
86
  :::
89
87
 
90
88
  Next, construct the search adapter. You will need the search adapter in the
91
- [xPlugin configuration](#3-configure-the-plugin).
89
+ [xPlugin configuration](#configuring-the-plugin).
92
90
 
93
91
  Empathy Search Adapter is a library for making it easier to consume search APIs. The project
94
92
  contains two main parts: an **implementation** to consume the Empathy Search API, and an
@@ -121,7 +119,7 @@ If you do not use the Empathy Search API, you need to build your own adapter.
121
119
  For more information, see
122
120
  [Using the Empathy Search Adapter](https://github.com/empathyco/x/tree/main/packages/search-adapter).
123
121
 
124
- ## 3. Configure the plugin
122
+ ## Configuring the plugin
125
123
 
126
124
  Plugins are self-contained code that usually add global-level functionality to Vue projects. They’re
127
125
  specifically objects that expose an `install` method, allowing you to keep your components clear and
@@ -143,7 +141,7 @@ Then, **configure** the xPlugin. It has two key options you need to configure:
143
141
  1. **Adapter**: A search adapter is required to connect and communicate with the search API. Here
144
142
  you’re using the `EmpathyAdapterBuilder` to communicate specifically with the Empathy Search API.
145
143
  If you are not using the Empathy Search API, you need to build your own adapter. See
146
- [Configure the search adapter](#2-configure-the-search-adapter).
144
+ [Configuring the search adapter](#configuring-the-search-adapter).
147
145
 
148
146
  ::: develop
149
147
 
@@ -162,7 +160,7 @@ Then, **configure** the xPlugin. It has two key options you need to configure:
162
160
 
163
161
  :::
164
162
 
165
- ## 4. Install and initialize the plugin
163
+ ## Installing and initializing the plugin
166
164
 
167
165
  Finally, the last step is to install and initialize the xPlugin. You need to do this in the
168
166
  `main.ts` or `main.js file` of the project.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-components",
3
- "version": "3.0.0-alpha.102",
3
+ "version": "3.0.0-alpha.103",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -125,5 +125,5 @@
125
125
  "access": "public",
126
126
  "directory": "dist"
127
127
  },
128
- "gitHead": "47c002879464f4559e8e256cf2b1d1122e81a181"
128
+ "gitHead": "ebf432d98e58e51b0a1eec708b1d1a78e13f0bb6"
129
129
  }