@plurix/ecom-components 1.14.1-bugfix-1891.0 → 1.14.1-bugfix-1891.2
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 +506 -0
- package/dist/packages/Regionalization/context/RegionalizationContext.d.ts +1 -1
- package/dist/packages/Regionalization/context/RegionalizationContext.js +32 -30
- package/dist/packages/Regionalization/types/RegionalizationProps.d.ts +1 -0
- package/dist/packages/Regionalization/views/InitialView.js +35 -34
- package/package.json +1 -1
- package/dist/node_modules/@faststore/components/dist/esm/atoms/Button/Button.js +0 -45
- package/dist/node_modules/@faststore/components/dist/esm/atoms/Loader/Loader.js +0 -34
- package/dist/node_modules/@faststore/components/dist/esm/molecules/IconButton/IconButton.js +0 -29
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- [COM-797](https://dev.azure.com/Plurix/Digital/_workitems/edit/797) - Adjusting ProductCardBadgeKg visibility
|
|
13
|
+
|
|
14
|
+
## [1.14.0-loyalty] - 2025-07-02
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- [SHLO-465](https://dev.azure.com/Plurix/Digital/_workitems/edit/465) - Added product cards to intelligent and adjust general in card
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- [SHLO-497](https://dev.azure.com/Plurix/Digital/_workitems/edit/497) - Quantity selector width
|
|
23
|
+
- [SHLO-524](https://dev.azure.com/Plurix/Digital/_workitems/edit/524) - Modal and onboarding css
|
|
24
|
+
|
|
25
|
+
## [1.13.0-club] - 2025-06-09
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- [SL-2649](https://plurix.atlassian.net/browse/SL-2649) - Added ProductCardSeeMore horizontal Variant
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- [SL-2680](https://plurix.atlassian.net/browse/SL-2680) - Added new function in ProductCardSeeMore
|
|
34
|
+
- [SL-2569](https://plurix.atlassian.net/browse/SL-2569) - New product card UI Horizontal
|
|
35
|
+
- [SL-2529](https://plurix.atlassian.net/browse/SL-2529) - New product card UI Vertical
|
|
36
|
+
|
|
37
|
+
## [1.12.0-commerce] - 2025-06-04
|
|
38
|
+
|
|
39
|
+
## Added
|
|
40
|
+
|
|
41
|
+
- [COM-138](https://dev.azure.com/Plurix/Digital/_workitems/edit/138) - Added Skeleton component to ecom-components
|
|
42
|
+
- [COM-137](https://dev.azure.com/Plurix/Digital/_workitems/edit/137) - Added search suggestions component from acct repo to ecom-components
|
|
43
|
+
- [COM-136](https://dev.azure.com/Plurix/Digital/_workitems/edit/136) - Adding ContactCard component
|
|
44
|
+
|
|
45
|
+
## [1.10.0-loyalty] - 2025-03-26
|
|
46
|
+
|
|
47
|
+
- [SL-2446](https://plurix.atlassian.net/browse/SL-2446) - Added text '+ amigo' in cartClubAlert
|
|
48
|
+
|
|
49
|
+
## [1.9.0-commerce] - 2025-03-13
|
|
50
|
+
|
|
51
|
+
- [SCS-2173](https://plurix.atlassian.net/browse/SCS-2173) - Added validation for low stock products without similar products
|
|
52
|
+
|
|
53
|
+
## [1.8.1-commerce] - 2025-02-11
|
|
54
|
+
|
|
55
|
+
### Added
|
|
56
|
+
|
|
57
|
+
- [SL-2446](https://plurix.atlassian.net/browse/SL-2446) - [Coupons] - Added button in mobile version of coupons
|
|
58
|
+
|
|
59
|
+
## [1.7.0-loyalty] - 2024-02-10
|
|
60
|
+
|
|
61
|
+
### Added
|
|
62
|
+
|
|
63
|
+
- [SHLO-242](https://plurix.atlassian.net/browse/SHLO-242) - [Coupons] - POST method in getCoupons api
|
|
64
|
+
|
|
65
|
+
## [1.6.0-commerce] - 2024-12-18
|
|
66
|
+
|
|
67
|
+
### Changed
|
|
68
|
+
|
|
69
|
+
- [SCS-2154](https://plurix.atlassian.net/browse/SCS-2154) - Correcting prices and discount percentage in change order modal
|
|
70
|
+
|
|
71
|
+
## [1.5.0-club] - 2024-12-12
|
|
72
|
+
|
|
73
|
+
### Changed
|
|
74
|
+
|
|
75
|
+
- [SL-2063](https://plurix.atlassian.net/browse/SL-2063) - Change tag p from (H1, H2, H3 e H4) for SEO in components coupons
|
|
76
|
+
|
|
77
|
+
## [1.4.0-commerce] - 2024-11-21
|
|
78
|
+
|
|
79
|
+
### Added
|
|
80
|
+
|
|
81
|
+
- [SCS-1825](https://plurix.atlassian.net/browse/SCS-1825) - Change Order Modal
|
|
82
|
+
|
|
83
|
+
## [1.3.0-loyalty] - 2024-11-19
|
|
84
|
+
|
|
85
|
+
### Added
|
|
86
|
+
|
|
87
|
+
- [SL-2399](https://plurix.atlassian.net/browse/SL-2399) - Bullet active status in carousel component
|
|
88
|
+
|
|
89
|
+
## [1.2.0-loyalty] - 2024-10-24
|
|
90
|
+
|
|
91
|
+
### Added
|
|
92
|
+
|
|
93
|
+
- [SL-2078](https://plurix.atlassian.net/browse/SL-2078) - Adding props to carousel component
|
|
94
|
+
|
|
95
|
+
## [1.1.3-loyalty] - 2024-08-26
|
|
96
|
+
|
|
97
|
+
### Removed
|
|
98
|
+
|
|
99
|
+
- Removed "div" reference from modal global css
|
|
100
|
+
- Removed avenida validation to coupons
|
|
101
|
+
|
|
102
|
+
## [1.1.2-loyalty] - 2024-07-25
|
|
103
|
+
|
|
104
|
+
### Changed
|
|
105
|
+
|
|
106
|
+
- [SL-1694](https://plurix.atlassian.net/browse/SL-1694) - Cupons modal changes
|
|
107
|
+
- [SL-1715](https://plurix.atlassian.net/browse/SL-1715) - Onboarding modal padronization
|
|
108
|
+
- [SL-1823](https://plurix.atlassian.net/browse/SL-1823) - Adding variable to hide header on Modal component
|
|
109
|
+
|
|
110
|
+
## [1.1.1-loyalty] - 2024-06-26
|
|
111
|
+
|
|
112
|
+
- [SL-1698](https://plurix.atlassian.net/browse/SL-1698) - [Web] NoCoupons components changed
|
|
113
|
+
- [SL-1856](https://plurix.atlassian.net/browse/SL-1856) - added window.reload in handler remove coupon in coupons component
|
|
114
|
+
|
|
115
|
+
## [1.1.0-loyalty] - 2024-06-13
|
|
116
|
+
|
|
117
|
+
### Changed
|
|
118
|
+
|
|
119
|
+
- [SL-1700](https://plurix.atlassian.net/browse/SL-1700) - Coupons badge variables
|
|
120
|
+
|
|
121
|
+
## [1.0.0] - 2024-06-05
|
|
122
|
+
|
|
123
|
+
### Refactored
|
|
124
|
+
|
|
125
|
+
- [SL-1720](https://plurix.atlassian.net/browse/SL-1720) - Restructured repository, uniting all packages into one called @plurix/ecom-components
|
|
126
|
+
|
|
127
|
+
<!-- All records below are from when this repository contained several NPM packages, we are saving these registers -->
|
|
128
|
+
<!-- Regionalization -->
|
|
129
|
+
|
|
130
|
+
## [16.0.0] - 2023-11-03
|
|
131
|
+
|
|
132
|
+
### Added
|
|
133
|
+
|
|
134
|
+
- [SCS-641](https://plurix.atlassian.net/browse/SCS-911) - [Regionalization] - Initial Flow
|
|
135
|
+
- [SCS-970](https://plurix.atlassian.net/browse/SCS-970) - [Regionalization] - Invalid shipping pickup option
|
|
136
|
+
|
|
137
|
+
### Changed
|
|
138
|
+
|
|
139
|
+
- [SCS-980](https://plurix.atlassian.net/browse/SCS-980) - [Regionalization] - More infos view
|
|
140
|
+
- [SCS-917](https://plurix.atlassian.net/browse/SCS-917) - [Regionalization] Region | Delivery Modall
|
|
141
|
+
|
|
142
|
+
## [0.15.1] - 2023-10-11
|
|
143
|
+
|
|
144
|
+
### Fixed
|
|
145
|
+
|
|
146
|
+
- [SCS-1000](https://plurix.atlassian.net/browse/SCS-1000) - Correction in the regionalization modal scroll
|
|
147
|
+
|
|
148
|
+
## [0.15.0] - 2023-08-11
|
|
149
|
+
|
|
150
|
+
### Added
|
|
151
|
+
|
|
152
|
+
- [SCS-641](https://plurix.atlassian.net/browse/SCS-449) - Custom cms pickup point text prop
|
|
153
|
+
|
|
154
|
+
## [0.14.0] - 2023-07-24
|
|
155
|
+
|
|
156
|
+
### Added
|
|
157
|
+
|
|
158
|
+
- [SCS-449](https://plurix.atlassian.net/browse/SCS-449)
|
|
159
|
+
|
|
160
|
+
## [0.13.9] - 2022-11-01
|
|
161
|
+
|
|
162
|
+
### Changed
|
|
163
|
+
|
|
164
|
+
- More times infos button style
|
|
165
|
+
|
|
166
|
+
## [0.13.8] - 2022-10-31
|
|
167
|
+
|
|
168
|
+
### Added
|
|
169
|
+
|
|
170
|
+
- Pickup point validation
|
|
171
|
+
|
|
172
|
+
## [0.13.7] - 2022-10-31
|
|
173
|
+
|
|
174
|
+
### Changed
|
|
175
|
+
|
|
176
|
+
- Optional chaining in filteredStores
|
|
177
|
+
|
|
178
|
+
## [0.13.6] - 2022-10-31
|
|
179
|
+
|
|
180
|
+
### Changed
|
|
181
|
+
|
|
182
|
+
- Icons default color
|
|
183
|
+
|
|
184
|
+
## [0.13.4] - 2022-10-31
|
|
185
|
+
|
|
186
|
+
### Changed
|
|
187
|
+
|
|
188
|
+
- Icons colors to variables
|
|
189
|
+
|
|
190
|
+
## [0.13.3] - 2022-10-25
|
|
191
|
+
|
|
192
|
+
### Added
|
|
193
|
+
|
|
194
|
+
- Important in bagde text color
|
|
195
|
+
|
|
196
|
+
## [0.13.2] - 2022-10-20
|
|
197
|
+
|
|
198
|
+
### Change
|
|
199
|
+
|
|
200
|
+
- New style to back button and title in all stores screen
|
|
201
|
+
|
|
202
|
+
## [0.13.1] - 2022-10-20
|
|
203
|
+
|
|
204
|
+
### Added
|
|
205
|
+
|
|
206
|
+
- New price data
|
|
207
|
+
|
|
208
|
+
## [0.13.0] - 2022-10-17
|
|
209
|
+
|
|
210
|
+
### Change
|
|
211
|
+
|
|
212
|
+
- Replace session storage to LocalStorage
|
|
213
|
+
|
|
214
|
+
## [0.12.1] - 2022-10-11
|
|
215
|
+
|
|
216
|
+
### Change
|
|
217
|
+
|
|
218
|
+
- Replace Estimate and Pickup point set method
|
|
219
|
+
|
|
220
|
+
## [0.12.0] - 2022-10-10
|
|
221
|
+
|
|
222
|
+
### Change
|
|
223
|
+
|
|
224
|
+
- Change cookies to sessions
|
|
225
|
+
|
|
226
|
+
## [0.11.2] - 2022-10-05
|
|
227
|
+
|
|
228
|
+
### Change
|
|
229
|
+
|
|
230
|
+
- Validate condition
|
|
231
|
+
|
|
232
|
+
## [0.11.1] - 2022-09-23
|
|
233
|
+
|
|
234
|
+
### Change
|
|
235
|
+
|
|
236
|
+
- Pickup name to pickup-in-point
|
|
237
|
+
|
|
238
|
+
## [0.11.0] - 2022-09-22
|
|
239
|
+
|
|
240
|
+
### Added
|
|
241
|
+
|
|
242
|
+
- useEffect for pickuppoints state
|
|
243
|
+
|
|
244
|
+
## [0.10.1] - 2022-09-13
|
|
245
|
+
|
|
246
|
+
### Fixed
|
|
247
|
+
|
|
248
|
+
- Align button on store-container
|
|
249
|
+
|
|
250
|
+
## [0.10.0] - 2022-09-12
|
|
251
|
+
|
|
252
|
+
### Added
|
|
253
|
+
|
|
254
|
+
- [SHC-1130](https://smrholding.atlassian.net/browse/SHC-1130) - Variable colors
|
|
255
|
+
|
|
256
|
+
## [0.9.3] - 2022-09-08
|
|
257
|
+
|
|
258
|
+
### Added
|
|
259
|
+
|
|
260
|
+
- Set postal code in pickup
|
|
261
|
+
|
|
262
|
+
## [0.9.2] - 2022-09-08
|
|
263
|
+
|
|
264
|
+
### Added
|
|
265
|
+
|
|
266
|
+
- Pickup cookies and states
|
|
267
|
+
|
|
268
|
+
## [0.9.1] - 2022-09-08
|
|
269
|
+
|
|
270
|
+
### Fixed
|
|
271
|
+
|
|
272
|
+
- types and setStates
|
|
273
|
+
|
|
274
|
+
## [0.9.0] - 2022-09-06
|
|
275
|
+
|
|
276
|
+
### Added
|
|
277
|
+
|
|
278
|
+
- [SHC-1080](https://smrholding.atlassian.net/browse/SHC-1080) - Regionalize catalog
|
|
279
|
+
|
|
280
|
+
## [0.8.3] - 2022-08-31
|
|
281
|
+
|
|
282
|
+
### Added
|
|
283
|
+
|
|
284
|
+
- Pickup Point name state
|
|
285
|
+
|
|
286
|
+
## [0.8.2] - 2022-08-31
|
|
287
|
+
|
|
288
|
+
### Change
|
|
289
|
+
|
|
290
|
+
-Change the set method function
|
|
291
|
+
|
|
292
|
+
## [0.8.1] - 2022-08-26
|
|
293
|
+
|
|
294
|
+
### Change
|
|
295
|
+
|
|
296
|
+
-Moved the "method" state to external receive.
|
|
297
|
+
-Change badge css.
|
|
298
|
+
|
|
299
|
+
## [0.8.0] - 2022-08-26
|
|
300
|
+
|
|
301
|
+
### Added
|
|
302
|
+
|
|
303
|
+
- [SHC-1062](https://smrholding.atlassian.net/browse/SHC-1062) - Pickup Point infos
|
|
304
|
+
|
|
305
|
+
## [0.7.0] - 2022-08-26
|
|
306
|
+
|
|
307
|
+
### Added
|
|
308
|
+
|
|
309
|
+
- [SHC-1088](https://smrholding.atlassian.net/browse/SHC-1088) - Cart simulator context
|
|
310
|
+
|
|
311
|
+
## [0.6.2] - 2022-08-26
|
|
312
|
+
|
|
313
|
+
### Fixed
|
|
314
|
+
|
|
315
|
+
- edit address button text
|
|
316
|
+
|
|
317
|
+
## [0.6.1] - 2022-08-26
|
|
318
|
+
|
|
319
|
+
### Fixed
|
|
320
|
+
|
|
321
|
+
- close modal in navigation
|
|
322
|
+
|
|
323
|
+
## [0.6.0] - 2022-08-26
|
|
324
|
+
|
|
325
|
+
### Added
|
|
326
|
+
|
|
327
|
+
- [SHC-1008](https://smrholding.atlassian.net/browse/SHC-1008) - Store choosed view
|
|
328
|
+
|
|
329
|
+
## [0.5.0] - 2022-08-25
|
|
330
|
+
|
|
331
|
+
### Added
|
|
332
|
+
|
|
333
|
+
- Delivery props
|
|
334
|
+
|
|
335
|
+
## [0.4.0] - 2022-08-25
|
|
336
|
+
|
|
337
|
+
### Added
|
|
338
|
+
|
|
339
|
+
- [SHC-906](https://smrholding.atlassian.net/browse/SHC-906) - Stores list
|
|
340
|
+
|
|
341
|
+
## [0.3.0] - 2022-08-24
|
|
342
|
+
|
|
343
|
+
### Added
|
|
344
|
+
|
|
345
|
+
- [SHC-819](https://smrholding.atlassian.net/browse/SHC-819) - Pickup modal
|
|
346
|
+
|
|
347
|
+
### Changed
|
|
348
|
+
|
|
349
|
+
- props
|
|
350
|
+
|
|
351
|
+
## [0.2.3] - 2022-08-19
|
|
352
|
+
|
|
353
|
+
### Changed
|
|
354
|
+
|
|
355
|
+
- Fix Status import in context
|
|
356
|
+
|
|
357
|
+
## [0.2.2] - 2022-08-19
|
|
358
|
+
|
|
359
|
+
### Changed
|
|
360
|
+
|
|
361
|
+
- Status in RegionalizationProps
|
|
362
|
+
|
|
363
|
+
## [0.2.1] - 2022-08-19
|
|
364
|
+
|
|
365
|
+
### Fixed
|
|
366
|
+
|
|
367
|
+
- Export in index.ts
|
|
368
|
+
|
|
369
|
+
## [0.2.0] - 2022-08-19
|
|
370
|
+
|
|
371
|
+
### Changed
|
|
372
|
+
|
|
373
|
+
- refactored and componentized
|
|
374
|
+
|
|
375
|
+
## [0.1.21] - 2022-06-27
|
|
376
|
+
|
|
377
|
+
### Changed
|
|
378
|
+
|
|
379
|
+
- update start price function
|
|
380
|
+
|
|
381
|
+
### Fixed
|
|
382
|
+
|
|
383
|
+
- Update input and button in initial view
|
|
384
|
+
|
|
385
|
+
## [0.1.20] - 2022-06-27
|
|
386
|
+
|
|
387
|
+
### Fixed
|
|
388
|
+
|
|
389
|
+
- Update input and button in initial view
|
|
390
|
+
|
|
391
|
+
## [0.1.19] - 2022-06-27
|
|
392
|
+
|
|
393
|
+
### Fixed
|
|
394
|
+
|
|
395
|
+
-Add mask in postal code input and minWidth
|
|
396
|
+
|
|
397
|
+
## [0.1.18] - 2022-06-20
|
|
398
|
+
|
|
399
|
+
### Fixed
|
|
400
|
+
|
|
401
|
+
- style defaultStyleContainerSections renamed
|
|
402
|
+
|
|
403
|
+
## [0.1.17] - 2022-06-20
|
|
404
|
+
|
|
405
|
+
### Fixed
|
|
406
|
+
|
|
407
|
+
- default styles in times section
|
|
408
|
+
|
|
409
|
+
## [0.1.15] - 2022-06-20
|
|
410
|
+
|
|
411
|
+
### Added
|
|
412
|
+
|
|
413
|
+
- added validation in cep input
|
|
414
|
+
|
|
415
|
+
## [0.1.14] - 2022-06-15
|
|
416
|
+
|
|
417
|
+
### Removed
|
|
418
|
+
|
|
419
|
+
- Import React in useWindowsDimensions hook
|
|
420
|
+
|
|
421
|
+
## [0.1.13] - 2022-06-15
|
|
422
|
+
|
|
423
|
+
### Added
|
|
424
|
+
|
|
425
|
+
- Created button disabled style
|
|
426
|
+
|
|
427
|
+
## [0.1.12] - 2022-06-15
|
|
428
|
+
|
|
429
|
+
### Added
|
|
430
|
+
|
|
431
|
+
- Changed to clean package
|
|
432
|
+
|
|
433
|
+
<!-- Coupons -->
|
|
434
|
+
|
|
435
|
+
## [2.1.0] 2024-01-22
|
|
436
|
+
|
|
437
|
+
### Added
|
|
438
|
+
|
|
439
|
+
- [SL-1323](https://plurix.atlassian.net/browse/SL-1323) - Prop to disable first empty modal
|
|
440
|
+
|
|
441
|
+
## [2.0.0] 2023-09-21
|
|
442
|
+
|
|
443
|
+
### Added
|
|
444
|
+
|
|
445
|
+
- [SL-802](https://plurix.atlassian.net/browse/SL-802) - All custom coupons logic in the package
|
|
446
|
+
|
|
447
|
+
## [0.2.13] 2023-09-11
|
|
448
|
+
|
|
449
|
+
### Added
|
|
450
|
+
|
|
451
|
+
- [SL-803](https://plurix.atlassian.net/browse/SL-803) - [PLP-COUPONS] - changed plp of coupons added some alert message and coupon notification
|
|
452
|
+
- [SL-561](https://plurix.atlassian.net/browse/SL-561) - [PLP-COUPONS] - added tagging plp of coupons
|
|
453
|
+
|
|
454
|
+
<!-- Carousel -->
|
|
455
|
+
|
|
456
|
+
## [1.4.4]
|
|
457
|
+
|
|
458
|
+
- [SL-1227](https://plurix.atlassian.net/browse/SL-1227) - changed css to improve carousel layout
|
|
459
|
+
|
|
460
|
+
<!-- Tour -->
|
|
461
|
+
|
|
462
|
+
## [1.0.0] - 2024-02-14
|
|
463
|
+
|
|
464
|
+
### Added
|
|
465
|
+
|
|
466
|
+
- [SL-1328](https://plurix.atlassian.net/browse/SL-1328) - Tour package
|
|
467
|
+
|
|
468
|
+
<!-- Onboarding -->
|
|
469
|
+
|
|
470
|
+
## [1.0.0] 2024-01-22
|
|
471
|
+
|
|
472
|
+
### Added
|
|
473
|
+
|
|
474
|
+
- [SL-1318](https://plurix.atlassian.net/browse/SL-1318) - Onboarding package
|
|
475
|
+
|
|
476
|
+
<!-- Club Cart Alert -->
|
|
477
|
+
|
|
478
|
+
## [0.4.0]
|
|
479
|
+
|
|
480
|
+
### Added
|
|
481
|
+
|
|
482
|
+
- Update style and remove title
|
|
483
|
+
|
|
484
|
+
## [0.2.0] - 2022-11-17
|
|
485
|
+
|
|
486
|
+
### Added
|
|
487
|
+
|
|
488
|
+
- Redirect links
|
|
489
|
+
|
|
490
|
+
## [0.1.2] - 2022-10-25
|
|
491
|
+
|
|
492
|
+
### Added
|
|
493
|
+
|
|
494
|
+
- Scss returned and export a specific css file to Vtex IO
|
|
495
|
+
|
|
496
|
+
## [0.1.1] - 2022-10-24
|
|
497
|
+
|
|
498
|
+
### Changed
|
|
499
|
+
|
|
500
|
+
- Scss to css and removed mocked text
|
|
501
|
+
|
|
502
|
+
## [0.1.0] - 2022-10-24
|
|
503
|
+
|
|
504
|
+
### Added
|
|
505
|
+
|
|
506
|
+
- Component created
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RegionalizationProps, ContextProps } from '../types';
|
|
2
2
|
|
|
3
|
-
export declare const RegionalizationContextProvider: ({ setMethod, setPickupName, setCity, setUf, setPickupTimes, pricesAndHours, setModalOpen, inputPostalCode, setInputPostalCode, sendPostalCode, status, setStatus, priceStockInformation, pickupPoints, titleText, moreInfosText, textBackButton, confirmButton, editAddress, delivery, deliveryPrice, pickup, regionalizeCatalog, pickupConfirmScreenText, children }: RegionalizationProps & ContextProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const RegionalizationContextProvider: ({ setMethod, setPickupName, setCity, setUf, setPickupTimes, pricesAndHours, setModalOpen, inputPostalCode, setInputPostalCode, sendPostalCode, status, setStatus, priceStockInformation, pickupPoints, titleText, moreInfosText, textBackButton, confirmButton, editAddress, delivery, deliveryPrice, pickup, regionalizeCatalog, pickupConfirmScreenText, deliveryStartPrice, children }: RegionalizationProps & ContextProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare const useRegionalizationContext: () => RegionalizationProps & ContextProps;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { removeSpecialCharacter as
|
|
1
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as M, useState as e, useEffect as ee, useContext as oe } from "react";
|
|
3
|
+
import { removeSpecialCharacter as se } from "../utils/postalCode.js";
|
|
4
4
|
import { getFullLocalStorage as c } from "../utils/localStorage.js";
|
|
5
|
-
const v =
|
|
5
|
+
const v = M(null), re = ({
|
|
6
6
|
setMethod: o,
|
|
7
7
|
setPickupName: C,
|
|
8
8
|
setCity: p,
|
|
@@ -27,12 +27,13 @@ const v = _(null), ae = ({
|
|
|
27
27
|
pickup: q,
|
|
28
28
|
regionalizeCatalog: E,
|
|
29
29
|
pickupConfirmScreenText: W,
|
|
30
|
-
|
|
30
|
+
deliveryStartPrice: j = "",
|
|
31
|
+
children: B
|
|
31
32
|
}) => {
|
|
32
|
-
const [
|
|
33
|
+
const [F, u] = e(), [L, g] = e("InitialView"), [Q, m] = e(""), [$, A] = e(), [s, G] = e(), [J, f] = e(), [K, N] = e(), [O, U] = e(!1), X = {
|
|
33
34
|
openingTime: (s == null ? void 0 : s.businessHours.businessHoursWeek.openingTime.slice(0, 2)) || "",
|
|
34
35
|
closingTime: (s == null ? void 0 : s.businessHours.businessHoursWeek.closingTime.slice(0, 2)) || ""
|
|
35
|
-
},
|
|
36
|
+
}, Y = async () => {
|
|
36
37
|
i({ loading: !0, message: "Carregando..." });
|
|
37
38
|
const {
|
|
38
39
|
isValid: n,
|
|
@@ -40,32 +41,32 @@ const v = _(null), ae = ({
|
|
|
40
41
|
deliveryInfos: a,
|
|
41
42
|
customShipping: r
|
|
42
43
|
} = await d();
|
|
43
|
-
n && (i({ loading: !1 }), u("delivery"),
|
|
44
|
-
},
|
|
44
|
+
n && (i({ loading: !1 }), u("delivery"), A(t), i({}), m(l), f(a), g("ConfirmScreen"), N(r));
|
|
45
|
+
}, Z = () => {
|
|
45
46
|
/\d{8}$/.test(
|
|
46
|
-
|
|
47
|
-
) ?
|
|
47
|
+
se(l)
|
|
48
|
+
) ? Y() : i({
|
|
48
49
|
status: "failed",
|
|
49
50
|
loading: !1,
|
|
50
51
|
message: "Que Pena, ainda não entregamos na sua região."
|
|
51
52
|
});
|
|
52
53
|
};
|
|
53
|
-
return
|
|
54
|
+
return ee(() => {
|
|
54
55
|
var n, t, a, r;
|
|
55
56
|
m((t = (n = c()) == null ? void 0 : n.userAddressInfos) == null ? void 0 : t.postalCode), o == null || o((a = c()) == null ? void 0 : a.regionalized), f((r = c()) == null ? void 0 : r.deliveryInfos);
|
|
56
|
-
}, []), /* @__PURE__ */
|
|
57
|
+
}, []), /* @__PURE__ */ _(
|
|
57
58
|
v.Provider,
|
|
58
59
|
{
|
|
59
60
|
value: {
|
|
60
|
-
backToDelivery:
|
|
61
|
-
setBackToDelivery:
|
|
61
|
+
backToDelivery: O,
|
|
62
|
+
setBackToDelivery: U,
|
|
62
63
|
setMethod: o,
|
|
63
64
|
priceStockInformation: T,
|
|
64
65
|
setPickupName: C,
|
|
65
66
|
setCity: p,
|
|
66
67
|
setUf: x,
|
|
67
68
|
setPickupTimes: y,
|
|
68
|
-
pickupTimes:
|
|
69
|
+
pickupTimes: X,
|
|
69
70
|
pickupConfirmScreenText: W,
|
|
70
71
|
pricesAndHours: R,
|
|
71
72
|
setModalOpen: w,
|
|
@@ -77,30 +78,31 @@ const v = _(null), ae = ({
|
|
|
77
78
|
pickupPoints: b,
|
|
78
79
|
titleText: z,
|
|
79
80
|
moreInfosText: P,
|
|
80
|
-
customShippingData:
|
|
81
|
+
customShippingData: K,
|
|
81
82
|
textBackButton: S,
|
|
82
83
|
confirmButton: h,
|
|
83
84
|
editAddress: H,
|
|
84
85
|
delivery: V,
|
|
85
86
|
pickup: q,
|
|
86
|
-
view:
|
|
87
|
+
view: L,
|
|
87
88
|
setView: g,
|
|
88
|
-
postalCodeValidation:
|
|
89
|
-
address:
|
|
89
|
+
postalCodeValidation: Z,
|
|
90
|
+
address: $,
|
|
90
91
|
pickupAddress: s,
|
|
91
|
-
setPickupAddress:
|
|
92
|
-
deliveryRequestInfos:
|
|
93
|
-
postalCode:
|
|
94
|
-
internalMethod:
|
|
92
|
+
setPickupAddress: G,
|
|
93
|
+
deliveryRequestInfos: J,
|
|
94
|
+
postalCode: Q,
|
|
95
|
+
internalMethod: F,
|
|
95
96
|
setInternalMethod: u,
|
|
96
97
|
regionalizeCatalog: E,
|
|
97
|
-
deliveryPrice: k
|
|
98
|
+
deliveryPrice: k,
|
|
99
|
+
deliveryStartPrice: j
|
|
98
100
|
},
|
|
99
|
-
children:
|
|
101
|
+
children: B
|
|
100
102
|
}
|
|
101
103
|
);
|
|
102
|
-
},
|
|
103
|
-
const o =
|
|
104
|
+
}, le = () => {
|
|
105
|
+
const o = oe(v);
|
|
104
106
|
if (!o)
|
|
105
107
|
throw new Error(
|
|
106
108
|
"useRegionalizationContext must be used within a RegionalizationContextProvider"
|
|
@@ -108,6 +110,6 @@ const v = _(null), ae = ({
|
|
|
108
110
|
return o;
|
|
109
111
|
};
|
|
110
112
|
export {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
re as RegionalizationContextProvider,
|
|
114
|
+
le as useRegionalizationContext
|
|
113
115
|
};
|
|
@@ -1,51 +1,52 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import { Title as
|
|
1
|
+
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as f } from "react";
|
|
3
|
+
import { Title as d } from "../components/Title.js";
|
|
4
4
|
import { SetViewButton as n } from "../components/SetViewButton.js";
|
|
5
|
-
import { ArrowIcon as
|
|
6
|
-
import { ShoppingBagsIcon as
|
|
7
|
-
import { ShoppingIcon as
|
|
8
|
-
import { useRegionalizationContext as
|
|
9
|
-
import { formatPrice as
|
|
10
|
-
const
|
|
5
|
+
import { ArrowIcon as h } from "../../../assets/svgs/ArrowIcon.js";
|
|
6
|
+
import { ShoppingBagsIcon as v } from "../../../assets/svgs/ShoppingBagsIcon.js";
|
|
7
|
+
import { ShoppingIcon as u } from "../../../assets/svgs/ShoppingIcon.js";
|
|
8
|
+
import { useRegionalizationContext as I } from "../context/RegionalizationContext.js";
|
|
9
|
+
import { formatPrice as S } from "../utils/formatPrice.js";
|
|
10
|
+
const y = () => {
|
|
11
11
|
const {
|
|
12
|
-
titleText:
|
|
12
|
+
titleText: c,
|
|
13
13
|
moreInfosText: l,
|
|
14
|
-
deliveryPrice:
|
|
15
|
-
priceStockInformation:
|
|
16
|
-
backToDelivery:
|
|
17
|
-
setBackToDelivery:
|
|
14
|
+
deliveryPrice: r,
|
|
15
|
+
priceStockInformation: a,
|
|
16
|
+
backToDelivery: s,
|
|
17
|
+
setBackToDelivery: t,
|
|
18
18
|
status: i,
|
|
19
|
-
setStatus:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */ o(
|
|
19
|
+
setStatus: m,
|
|
20
|
+
postalCode: p
|
|
21
|
+
} = I();
|
|
22
|
+
return console.log("sbs deliveryPrice", r), console.log("sbs status", i), console.log("sbs postalCode", p), f(() => {
|
|
23
|
+
s && (t == null || t(!1)), (i == null ? void 0 : i.status) === "failed" && m({});
|
|
24
|
+
}, [s, i]), /* @__PURE__ */ e("div", { className: "inital-view-container", children: [
|
|
25
|
+
/* @__PURE__ */ o(d, { title: c }),
|
|
26
|
+
/* @__PURE__ */ o("p", { className: "price-stock-information", children: a }),
|
|
27
|
+
/* @__PURE__ */ e(n, { view: "MoreInfosScreen", className: "more-infos-button", children: [
|
|
27
28
|
l,
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ o("span", { children: /* @__PURE__ */ o(h, { color: "var(--color-main)" }) })
|
|
29
30
|
] }),
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ e("div", { className: "delivery-option-container", children: [
|
|
32
|
+
/* @__PURE__ */ e(n, { view: "PostalCodeInputScreen", className: "option", children: [
|
|
33
|
+
/* @__PURE__ */ o(v, {}),
|
|
34
|
+
/* @__PURE__ */ o("h4", { children: "Receber em casa" }),
|
|
35
|
+
/* @__PURE__ */ e("p", { children: [
|
|
35
36
|
" ",
|
|
36
37
|
"A partir de",
|
|
37
38
|
" ",
|
|
38
|
-
|
|
39
|
+
r ? S(r) : "Consulte o valor"
|
|
39
40
|
] })
|
|
40
41
|
] }),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ e(n, { view: "PickupPointInfoScreen", className: "option", children: [
|
|
43
|
+
/* @__PURE__ */ o(u, {}),
|
|
44
|
+
/* @__PURE__ */ o("h4", { children: "Retirar na Loja" }),
|
|
45
|
+
/* @__PURE__ */ o("p", { children: " Grátis" })
|
|
45
46
|
] })
|
|
46
47
|
] })
|
|
47
48
|
] });
|
|
48
49
|
};
|
|
49
50
|
export {
|
|
50
|
-
|
|
51
|
+
y as InitialView
|
|
51
52
|
};
|
package/package.json
CHANGED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var R = Object.defineProperty;
|
|
2
|
-
var o = Object.getOwnPropertySymbols;
|
|
3
|
-
var b = Object.prototype.hasOwnProperty, m = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var l = (e, a, t) => a in e ? R(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, p = (e, a) => {
|
|
5
|
-
for (var t in a || (a = {}))
|
|
6
|
-
b.call(a, t) && l(e, t, a[t]);
|
|
7
|
-
if (o)
|
|
8
|
-
for (var t of o(a))
|
|
9
|
-
m.call(a, t) && l(e, t, a[t]);
|
|
10
|
-
return e;
|
|
11
|
-
};
|
|
12
|
-
var c = (e, a) => {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var r in e)
|
|
15
|
-
b.call(e, r) && a.indexOf(r) < 0 && (t[r] = e[r]);
|
|
16
|
-
if (e != null && o)
|
|
17
|
-
for (var r of o(e))
|
|
18
|
-
a.indexOf(r) < 0 && m.call(e, r) && (t[r] = e[r]);
|
|
19
|
-
return t;
|
|
20
|
-
};
|
|
21
|
-
import n, { forwardRef as h } from "react";
|
|
22
|
-
import k from "../Loader/Loader.js";
|
|
23
|
-
const x = h(function(y, w) {
|
|
24
|
-
var s = y, { children: a, variant: t, inverse: r, size: i = "regular", testId: E = "fs-button", loading: f, loadingLabel: g, icon: u, iconPosition: d = "left", disabled: B } = s, v = c(s, ["children", "variant", "inverse", "size", "testId", "loading", "loadingLabel", "icon", "iconPosition", "disabled"]);
|
|
25
|
-
return n.createElement(
|
|
26
|
-
"button",
|
|
27
|
-
p({ ref: w, "data-fs-button": !0, "data-fs-button-inverse": r, "data-fs-button-size": i, "data-fs-button-loading": f, "data-fs-button-variant": t, disabled: B, "data-testid": E }, v),
|
|
28
|
-
n.createElement(
|
|
29
|
-
"div",
|
|
30
|
-
{ "data-fs-button-wrapper": !0 },
|
|
31
|
-
f && n.createElement(
|
|
32
|
-
"p",
|
|
33
|
-
{ "data-fs-button-loading-label": !0 },
|
|
34
|
-
g,
|
|
35
|
-
n.createElement(k, { variant: t === "primary" && !r ? "light" : "dark" })
|
|
36
|
-
),
|
|
37
|
-
!!u && d === "left" && n.createElement("span", { "data-fs-button-icon": !0 }, u),
|
|
38
|
-
a && n.createElement("span", null, a),
|
|
39
|
-
!!u && d === "right" && n.createElement("span", { "data-fs-button-icon": !0 }, u)
|
|
40
|
-
)
|
|
41
|
-
);
|
|
42
|
-
}), j = x;
|
|
43
|
-
export {
|
|
44
|
-
j as default
|
|
45
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var u = Object.defineProperty;
|
|
2
|
-
var d = Object.getOwnPropertySymbols;
|
|
3
|
-
var f = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var s = (e, t, a) => t in e ? u(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, m = (e, t) => {
|
|
5
|
-
for (var a in t || (t = {}))
|
|
6
|
-
f.call(t, a) && s(e, a, t[a]);
|
|
7
|
-
if (d)
|
|
8
|
-
for (var a of d(t))
|
|
9
|
-
l.call(t, a) && s(e, a, t[a]);
|
|
10
|
-
return e;
|
|
11
|
-
};
|
|
12
|
-
var c = (e, t) => {
|
|
13
|
-
var a = {};
|
|
14
|
-
for (var r in e)
|
|
15
|
-
f.call(e, r) && t.indexOf(r) < 0 && (a[r] = e[r]);
|
|
16
|
-
if (e != null && d)
|
|
17
|
-
for (var r of d(e))
|
|
18
|
-
t.indexOf(r) < 0 && l.call(e, r) && (a[r] = e[r]);
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
|
-
import o, { forwardRef as p } from "react";
|
|
22
|
-
const E = p(function(L, i) {
|
|
23
|
-
var n = L, { testId: t = "fs-loader", variant: a = "dark" } = n, r = c(n, ["testId", "variant"]);
|
|
24
|
-
return o.createElement(
|
|
25
|
-
"span",
|
|
26
|
-
m({ ref: i, "data-fs-loader": !0, "data-fs-loader-variant": a, "data-testid": t }, r),
|
|
27
|
-
o.createElement("span", { "data-fs-loader-item": !0 }),
|
|
28
|
-
o.createElement("span", { "data-fs-loader-item": !0 }),
|
|
29
|
-
o.createElement("span", { "data-fs-loader-item": !0 })
|
|
30
|
-
);
|
|
31
|
-
}), v = E;
|
|
32
|
-
export {
|
|
33
|
-
v as default
|
|
34
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var I = Object.defineProperty;
|
|
2
|
-
var r = Object.getOwnPropertySymbols;
|
|
3
|
-
var f = Object.prototype.hasOwnProperty, s = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var c = (t, e, o) => e in t ? I(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, i = (t, e) => {
|
|
5
|
-
for (var o in e || (e = {}))
|
|
6
|
-
f.call(e, o) && c(t, o, e[o]);
|
|
7
|
-
if (r)
|
|
8
|
-
for (var o of r(e))
|
|
9
|
-
s.call(e, o) && c(t, o, e[o]);
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
var l = (t, e) => {
|
|
13
|
-
var o = {};
|
|
14
|
-
for (var n in t)
|
|
15
|
-
f.call(t, n) && e.indexOf(n) < 0 && (o[n] = t[n]);
|
|
16
|
-
if (t != null && r)
|
|
17
|
-
for (var n of r(t))
|
|
18
|
-
e.indexOf(n) < 0 && s.call(t, n) && (o[n] = t[n]);
|
|
19
|
-
return o;
|
|
20
|
-
};
|
|
21
|
-
import p, { forwardRef as R } from "react";
|
|
22
|
-
import g from "../../atoms/Button/Button.js";
|
|
23
|
-
const w = R(function(x, B) {
|
|
24
|
-
var a = x, { icon: e, children: o, testId: n = "fs-icon-button", "aria-label": b, size: d = "regular", variant: u } = a, m = l(a, ["icon", "children", "testId", "aria-label", "size", "variant"]);
|
|
25
|
-
return p.createElement(g, i({ ref: B, "data-fs-button": !0, "data-fs-icon-button": !0, variant: u != null ? u : "tertiary", icon: e, "aria-label": b, testId: n, size: d }, m), o);
|
|
26
|
-
}), $ = w;
|
|
27
|
-
export {
|
|
28
|
-
$ as default
|
|
29
|
-
};
|