@lookiero/checkout 11.5.0 → 12.0.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.
Files changed (39) hide show
  1. package/dist/index.d.ts +1 -2
  2. package/dist/src/ExpoRoot.d.ts +0 -1
  3. package/dist/src/ExpoRoot.js +2 -3
  4. package/dist/src/infrastructure/ui/routing/CheckoutMiddleware.d.ts +1 -1
  5. package/dist/src/infrastructure/ui/routing/CheckoutMiddleware.js +4 -2
  6. package/dist/src/infrastructure/ui/test/render.js +1 -1
  7. package/dist/src/infrastructure/ui/views/App.d.ts +1 -1
  8. package/dist/src/projection/returnQuestion/returnQuestion.typeguard.d.ts +2 -2
  9. package/dist/src/version.d.ts +1 -1
  10. package/dist/src/version.js +1 -1
  11. package/index.ts +1 -1
  12. package/jest.config.js +0 -3
  13. package/jest.setup.js +9 -1
  14. package/package.json +22 -20
  15. package/src/ExpoRoot.tsx +2 -3
  16. package/src/infrastructure/ui/hooks/useCheckoutFlow.test.tsx +11 -1
  17. package/src/infrastructure/ui/hooks/useQueryBus.test.tsx +1 -1
  18. package/src/infrastructure/ui/hooks/useStaticInfo.test.tsx +1 -1
  19. package/src/infrastructure/ui/routing/CheckoutMiddleware.tsx +5 -3
  20. package/src/infrastructure/ui/test/render.tsx +1 -1
  21. package/src/infrastructure/ui/views/App.tsx +1 -1
  22. package/src/infrastructure/ui/views/checkout/Checkout.test.tsx +9 -2
  23. package/src/infrastructure/ui/views/feedback/Feedback.test.tsx +7 -1
  24. package/src/infrastructure/ui/views/item/Item.test.tsx +7 -1
  25. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +34 -43
  26. package/src/infrastructure/ui/views/item/components/itemActions/__snapshots__/ItemActions.test.tsx.snap +34 -43
  27. package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +76 -99
  28. package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +34 -43
  29. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +34 -43
  30. package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.test.tsx +7 -1
  31. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.test.tsx +7 -1
  32. package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +228 -297
  33. package/src/infrastructure/ui/views/return/Return.test.tsx +8 -1
  34. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.test.tsx +2 -1
  35. package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +26 -32
  36. package/src/infrastructure/ui/views/summary/Summary.test.tsx +7 -1
  37. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +16 -24
  38. package/src/infrastructure/ui/views/summaryTabs/SummaryTabs.test.tsx +7 -1
  39. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +105 -135
@@ -59,44 +59,37 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
59
59
  >
60
60
  <View
61
61
  collapsable={false}
62
- jestAnimatedStyle={
63
- {
64
- "value": {
62
+ style={
63
+ [
64
+ {
65
+ "flex": 1,
66
+ "flexDirection": "row",
67
+ "height": "100%",
68
+ },
69
+ {
70
+ "width": 600,
71
+ },
72
+ {
65
73
  "transform": [
66
74
  {
67
75
  "translateX": 0,
68
76
  },
69
77
  ],
70
78
  },
71
- }
72
- }
73
- style={
74
- {
75
- "flex": 1,
76
- "flexDirection": "row",
77
- "height": "100%",
78
- "transform": [
79
- {
80
- "translateX": 0,
81
- },
82
- ],
83
- "width": 600,
84
- }
79
+ ]
85
80
  }
86
81
  testID="carousel-track"
87
82
  >
88
83
  <View
89
- collapsable={false}
90
- jestAnimatedStyle={
91
- {
92
- "value": {},
93
- }
94
- }
95
84
  style={
96
- {
97
- "flex": 1,
98
- "width": 300,
99
- }
85
+ [
86
+ {
87
+ "flex": 1,
88
+ },
89
+ {
90
+ "width": 300,
91
+ },
92
+ ]
100
93
  }
101
94
  testID="carousel-item"
102
95
  >
@@ -213,14 +206,6 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
213
206
  </View>
214
207
  </View>
215
208
  <Image
216
- collapsable={false}
217
- jestAnimatedStyle={
218
- {
219
- "value": {
220
- "opacity": 0,
221
- },
222
- }
223
- }
224
209
  onLoad={[Function]}
225
210
  resizeMode="stretch"
226
211
  source={
@@ -229,14 +214,19 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
229
214
  }
230
215
  }
231
216
  style={
232
- {
233
- "flex": 1,
234
- "height": "100%",
235
- "opacity": 0,
236
- "position": "absolute",
237
- "width": "100%",
238
- "zIndex": 10,
239
- }
217
+ [
218
+ {
219
+ "flex": 1,
220
+ "height": "100%",
221
+ "position": "absolute",
222
+ "width": "100%",
223
+ "zIndex": 10,
224
+ },
225
+ undefined,
226
+ {
227
+ "opacity": 0,
228
+ },
229
+ ]
240
230
  }
241
231
  testID="lazy-image-main-image"
242
232
  />
@@ -245,17 +235,15 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
245
235
  </View>
246
236
  </View>
247
237
  <View
248
- collapsable={false}
249
- jestAnimatedStyle={
250
- {
251
- "value": {},
252
- }
253
- }
254
238
  style={
255
- {
256
- "flex": 1,
257
- "width": 300,
258
- }
239
+ [
240
+ {
241
+ "flex": 1,
242
+ },
243
+ {
244
+ "width": 300,
245
+ },
246
+ ]
259
247
  }
260
248
  testID="carousel-item"
261
249
  >
@@ -372,14 +360,6 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
372
360
  </View>
373
361
  </View>
374
362
  <Image
375
- collapsable={false}
376
- jestAnimatedStyle={
377
- {
378
- "value": {
379
- "opacity": 0,
380
- },
381
- }
382
- }
383
363
  onLoad={[Function]}
384
364
  resizeMode="stretch"
385
365
  source={
@@ -388,14 +368,19 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
388
368
  }
389
369
  }
390
370
  style={
391
- {
392
- "flex": 1,
393
- "height": "100%",
394
- "opacity": 0,
395
- "position": "absolute",
396
- "width": "100%",
397
- "zIndex": 10,
398
- }
371
+ [
372
+ {
373
+ "flex": 1,
374
+ "height": "100%",
375
+ "position": "absolute",
376
+ "width": "100%",
377
+ "zIndex": 10,
378
+ },
379
+ undefined,
380
+ {
381
+ "opacity": 0,
382
+ },
383
+ ]
399
384
  }
400
385
  testID="lazy-image-main-image"
401
386
  />
@@ -465,25 +450,21 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
465
450
  "selected": true,
466
451
  }
467
452
  }
468
- collapsable={false}
469
- jestAnimatedStyle={
470
- {
471
- "value": {
453
+ style={
454
+ [
455
+ {
456
+ "backgroundColor": "#0C0A0A",
457
+ "marginHorizontal": 3,
458
+ },
459
+ {
472
460
  "height": 8,
473
461
  "opacity": 1,
474
462
  "width": 8,
475
463
  },
476
- }
477
- }
478
- style={
479
- {
480
- "backgroundColor": "#0C0A0A",
481
- "borderRadius": 8,
482
- "height": 8,
483
- "marginHorizontal": 3,
484
- "opacity": 1,
485
- "width": 8,
486
- }
464
+ {
465
+ "borderRadius": 8,
466
+ },
467
+ ]
487
468
  }
488
469
  testID="bullet"
489
470
  />
@@ -525,25 +506,21 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
525
506
  "selected": false,
526
507
  }
527
508
  }
528
- collapsable={false}
529
- jestAnimatedStyle={
530
- {
531
- "value": {
509
+ style={
510
+ [
511
+ {
512
+ "backgroundColor": "#0C0A0A",
513
+ "marginHorizontal": 3,
514
+ },
515
+ {
532
516
  "height": 8,
533
517
  "opacity": 0.3,
534
518
  "width": 8,
535
519
  },
536
- }
537
- }
538
- style={
539
- {
540
- "backgroundColor": "#0C0A0A",
541
- "borderRadius": 8,
542
- "height": 8,
543
- "marginHorizontal": 3,
544
- "opacity": 0.3,
545
- "width": 8,
546
- }
520
+ {
521
+ "borderRadius": 8,
522
+ },
523
+ ]
547
524
  }
548
525
  testID="bullet"
549
526
  />
@@ -58,15 +58,7 @@ exports[`SelectField component matches the snapshot 1`] = `
58
58
  }
59
59
  }
60
60
  accessible={true}
61
- collapsable={false}
62
61
  focusable={true}
63
- jestAnimatedStyle={
64
- {
65
- "value": {
66
- "opacity": 1,
67
- },
68
- }
69
- }
70
62
  onClick={[Function]}
71
63
  onResponderGrant={[Function]}
72
64
  onResponderMove={[Function]}
@@ -75,14 +67,19 @@ exports[`SelectField component matches the snapshot 1`] = `
75
67
  onResponderTerminationRequest={[Function]}
76
68
  onStartShouldSetResponder={[Function]}
77
69
  style={
78
- {
79
- "backgroundColor": "rgba(12, 10, 10, 0.7)",
80
- "height": "100%",
81
- "opacity": 1,
82
- "position": "absolute",
83
- "width": "100%",
84
- "zIndex": 1,
85
- }
70
+ [
71
+ {
72
+ "backgroundColor": "rgba(12, 10, 10, 0.7)",
73
+ "height": "100%",
74
+ "position": "absolute",
75
+ "width": "100%",
76
+ "zIndex": 1,
77
+ },
78
+ undefined,
79
+ {
80
+ "opacity": 1,
81
+ },
82
+ ]
86
83
  }
87
84
  testID="modal-close-button"
88
85
  />
@@ -116,10 +113,26 @@ exports[`SelectField component matches the snapshot 1`] = `
116
113
  }
117
114
  >
118
115
  <View
119
- collapsable={false}
120
- jestAnimatedStyle={
121
- {
122
- "value": {
116
+ pointerEvents="auto"
117
+ style={
118
+ [
119
+ {
120
+ "backgroundColor": "#FFFFFF",
121
+ "borderRadius": 16,
122
+ "position": "absolute",
123
+ "width": "100%",
124
+ "zIndex": 3,
125
+ },
126
+ {
127
+ "borderBottomLeftRadius": 0,
128
+ "borderBottomRightRadius": 0,
129
+ },
130
+ undefined,
131
+ {
132
+ "maxHeight": 800,
133
+ },
134
+ undefined,
135
+ {
123
136
  "opacity": 1,
124
137
  "transform": [
125
138
  {
@@ -130,29 +143,7 @@ exports[`SelectField component matches the snapshot 1`] = `
130
143
  },
131
144
  ],
132
145
  },
133
- }
134
- }
135
- pointerEvents="auto"
136
- style={
137
- {
138
- "backgroundColor": "#FFFFFF",
139
- "borderBottomLeftRadius": 0,
140
- "borderBottomRightRadius": 0,
141
- "borderRadius": 16,
142
- "maxHeight": 800,
143
- "opacity": 1,
144
- "position": "absolute",
145
- "transform": [
146
- {
147
- "translateY": 0,
148
- },
149
- {
150
- "scale": 1,
151
- },
152
- ],
153
- "width": "100%",
154
- "zIndex": 3,
155
- }
146
+ ]
156
147
  }
157
148
  >
158
149
  <View
@@ -58,15 +58,7 @@ exports[`SizeWithoutStockModal component matches the snapshot 1`] = `
58
58
  }
59
59
  }
60
60
  accessible={true}
61
- collapsable={false}
62
61
  focusable={true}
63
- jestAnimatedStyle={
64
- {
65
- "value": {
66
- "opacity": 1,
67
- },
68
- }
69
- }
70
62
  onClick={[Function]}
71
63
  onResponderGrant={[Function]}
72
64
  onResponderMove={[Function]}
@@ -75,14 +67,19 @@ exports[`SizeWithoutStockModal component matches the snapshot 1`] = `
75
67
  onResponderTerminationRequest={[Function]}
76
68
  onStartShouldSetResponder={[Function]}
77
69
  style={
78
- {
79
- "backgroundColor": "rgba(12, 10, 10, 0.7)",
80
- "height": "100%",
81
- "opacity": 1,
82
- "position": "absolute",
83
- "width": "100%",
84
- "zIndex": 1,
85
- }
70
+ [
71
+ {
72
+ "backgroundColor": "rgba(12, 10, 10, 0.7)",
73
+ "height": "100%",
74
+ "position": "absolute",
75
+ "width": "100%",
76
+ "zIndex": 1,
77
+ },
78
+ undefined,
79
+ {
80
+ "opacity": 1,
81
+ },
82
+ ]
86
83
  }
87
84
  testID="modal-close-button"
88
85
  />
@@ -116,10 +113,26 @@ exports[`SizeWithoutStockModal component matches the snapshot 1`] = `
116
113
  }
117
114
  >
118
115
  <View
119
- collapsable={false}
120
- jestAnimatedStyle={
121
- {
122
- "value": {
116
+ pointerEvents="auto"
117
+ style={
118
+ [
119
+ {
120
+ "backgroundColor": "#FFFFFF",
121
+ "borderRadius": 16,
122
+ "position": "absolute",
123
+ "width": "100%",
124
+ "zIndex": 3,
125
+ },
126
+ {
127
+ "borderBottomLeftRadius": 0,
128
+ "borderBottomRightRadius": 0,
129
+ },
130
+ undefined,
131
+ {
132
+ "maxHeight": 800,
133
+ },
134
+ undefined,
135
+ {
123
136
  "opacity": 1,
124
137
  "transform": [
125
138
  {
@@ -130,29 +143,7 @@ exports[`SizeWithoutStockModal component matches the snapshot 1`] = `
130
143
  },
131
144
  ],
132
145
  },
133
- }
134
- }
135
- pointerEvents="auto"
136
- style={
137
- {
138
- "backgroundColor": "#FFFFFF",
139
- "borderBottomLeftRadius": 0,
140
- "borderBottomRightRadius": 0,
141
- "borderRadius": 16,
142
- "maxHeight": 800,
143
- "opacity": 1,
144
- "position": "absolute",
145
- "transform": [
146
- {
147
- "translateY": 0,
148
- },
149
- {
150
- "scale": 1,
151
- },
152
- ],
153
- "width": "100%",
154
- "zIndex": 3,
155
- }
146
+ ]
156
147
  }
157
148
  >
158
149
  <View
@@ -4,6 +4,7 @@ import { CommandStatus } from "@lookiero/messaging-react";
4
4
  import { Country } from "@lookiero/sty-psp-locale";
5
5
  import { Segment } from "@lookiero/sty-psp-segment";
6
6
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
7
+ import { Customer } from "../../../../../../projection/customer/customer";
7
8
  import { useResetCheckoutItem } from "../../../../../domain/checkoutItem/react/useResetCheckoutItem";
8
9
  import { checkoutItem } from "../../../../../projection/checkoutItem/checkoutItem.mock";
9
10
  import { returnQuestions as mockReturnQuestions } from "../../../../../projection/returnQuestion/returnQuestions.mock";
@@ -22,9 +23,14 @@ const checkoutId = "a5422445-0e62-4b11-8a3f-1bb5469ee154";
22
23
  const customerId = "5257f9c4-277a-45fe-af45-db0b5addaac3";
23
24
  const country = Country.ES;
24
25
  const segment = Segment.WOMEN;
26
+ const mockCustomer: Customer = {
27
+ customerId,
28
+ country,
29
+ segment,
30
+ } as Customer;
25
31
 
26
32
  jest.mock("../../../../hooks/useStaticInfo", () => ({
27
- useStaticInfo: () => ({ customer: { customerId, country, segment } }),
33
+ useStaticInfo: () => ({ customer: mockCustomer }),
28
34
  }));
29
35
 
30
36
  interface RenderItemWithCustomerDecissionFunctionArgs {
@@ -5,6 +5,7 @@ import { Country } from "@lookiero/sty-psp-locale";
5
5
  import { Segment } from "@lookiero/sty-psp-segment";
6
6
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
7
7
  import { BookedProductsVariantsProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
8
+ import { Customer } from "../../../../../../projection/customer/customer";
8
9
  import { useKeepCheckoutItem } from "../../../../../domain/checkoutItem/react/useKeepCheckoutItem";
9
10
  import { useReplaceCheckoutItem } from "../../../../../domain/checkoutItem/react/useReplaceCheckoutItem";
10
11
  import { bookedProductsVariants as mockBookedProductsVariants } from "../../../../../projection/bookedProductsVariants/bookedProductsVariants.mock";
@@ -29,9 +30,14 @@ const checkoutId = "a5422445-0e62-4b11-8a3f-1bb5469ee154";
29
30
  const customerId = "5257f9c4-277a-45fe-af45-db0b5addaac3";
30
31
  const country = Country.ES;
31
32
  const segment = Segment.WOMEN;
33
+ const mockCustomer: Customer = {
34
+ customerId,
35
+ country,
36
+ segment,
37
+ } as Customer;
32
38
 
33
39
  jest.mock("../../../../hooks/useStaticInfo", () => ({
34
- useStaticInfo: () => ({ customer: { customerId, country, segment } }),
40
+ useStaticInfo: () => ({ customer: mockCustomer }),
35
41
  }));
36
42
 
37
43
  interface RenderItemWithoutCustomerDecissionFunctionArgs {