@myxtra/authentication-green 2.1.0-alpha.0 → 2.2.0

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/README.md CHANGED
@@ -51,10 +51,10 @@ the access token if it is present.
51
51
 
52
52
  Examples of some endpoints that will be called by components:
53
53
 
54
- | BFF URL | API Gateway URL |
55
- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
56
- | https://bff.syst.mijnxtra.be/xtra/newsletter/v1/newsletters | https://api.syst.myxtra.be/newsletter/v1/newsletters |
57
- | https://bff.syst.mijnxtra.be/xtra/newsletter/v1/newsletters?partnerClientId=123456 | https://api.syst.myxtra.be/newsletter/v1/newsletters?partnerClientId=123456 |
54
+ | BFF URL | API Gateway URL |
55
+ | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------- |
56
+ | <https://bff.syst.mijnxtra.be/xtra/newsletter/v1/newsletters> | <https://api.syst.myxtra.be/newsletter/v1/newsletters> |
57
+ | <https://bff.syst.mijnxtra.be/xtra/newsletter/v1/newsletters?partnerClientId=123456> | <https://api.syst.myxtra.be/newsletter/v1/newsletters?partnerClientId=123456> |
58
58
 
59
59
  ## Installation
60
60
 
@@ -116,9 +116,32 @@ type Config = {
116
116
  redirectUrl?: string;
117
117
  // The position of the flyout menu, defaults to 'right'
118
118
  position?: 'left' | 'right';
119
+ // The ID of the commerce/BOU for which the component will show the icon when the Terms & Condition dialog is shown.
120
+ commerceId?:
121
+ | 'bioplanet'
122
+ | 'collectgo'
123
+ | 'collibri'
124
+ | 'colruyt'
125
+ | 'colruytacademy'
126
+ | 'colruytgroup'
127
+ | 'dats24'
128
+ | 'dreambaby'
129
+ | 'dreamland'
130
+ | 'okay'
131
+ | 'spar'
132
+ | 'xtra';
133
+ // Add links to custom pages on the menu (only visible to authenticated users)
134
+ bouMenuItems?: Array<{
135
+ label: string; // Text to display for the link
136
+ url: string; // URL of the custom page
137
+ icon: string; // Icon to show in front of the text (see disclaimer below)
138
+ }>;
119
139
  };
120
140
  ```
121
141
 
142
+ > ❗ You can find a list of available BOU menu item icons
143
+ > [here](https://unpkg.com/@myxtra/authentication-green/dist/icons/bouMenuIcons.html).
144
+
122
145
  ## Events & window object
123
146
 
124
147
  The authentication component will emit events and add properties to the window object. For backwards
@@ -139,16 +162,17 @@ type XTRA = {
139
162
  yob: () => number;
140
163
  gender: () => 'M' | 'F';
141
164
  phone: () => string;
142
- streetName: () => string,
143
- houseNr: () => string,
144
- box: () => string,
145
- zip: () => string,
146
- city: () => string,
147
- country: () => string,
148
- email: () => string,
149
- cbh: () => string,
150
- state: () => 'Authenticated',
151
- }
165
+ streetName: () => string;
166
+ houseNr: () => string;
167
+ box: () => string;
168
+ zip: () => string;
169
+ city: () => string;
170
+ country: () => string;
171
+ email: () => string;
172
+ cbh: () => string;
173
+ state: () => 'Authenticated';
174
+ };
175
+ };
152
176
  ```
153
177
 
154
178
  The authenticated event is sent through