@lookiero/checkout 8.14.0-beta.3 → 8.15.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 (194) hide show
  1. package/.eslintrc.js +1 -1
  2. package/cypress/integration/checkout.spec.ts +259 -0
  3. package/cypress/support/e2e.ts +3 -0
  4. package/cypress/support/index.d.ts +8 -0
  5. package/cypress/support/interceptBlockCheckoutBooking.ts +4 -0
  6. package/cypress/support/interceptGiveCheckoutFeedback.ts +4 -0
  7. package/cypress/support/interceptKeepCheckoutItem.ts +4 -0
  8. package/cypress/support/interceptListCheckoutQuestionsByCheckoutId.ts +9 -0
  9. package/cypress/support/interceptListReturnQuestionsByCheckoutItemId.ts +9 -0
  10. package/cypress/support/interceptPayment.ts +23 -0
  11. package/cypress/support/interceptReplaceCheckoutItem.ts +4 -0
  12. package/cypress/support/interceptReturnCheckoutItem.ts +4 -0
  13. package/cypress/support/interceptSubmitCheckout.ts +4 -0
  14. package/cypress/support/interceptViewBookedProductsVariantsForCheckoutItem.ts +9 -0
  15. package/cypress/support/interceptViewCheckoutById.ts +6 -0
  16. package/cypress/support/interceptViewFirstAvailableCheckoutByCustomerId.ts +9 -0
  17. package/cypress/support/interceptViewFiveItemsDiscountByCustomerId.ts +6 -0
  18. package/cypress/support/interceptViewIsSizeChangeEnabledByCheckoutId.ts +6 -0
  19. package/cypress/support/interceptViewPaymentFlowPayloadByCheckoutId.ts +9 -0
  20. package/cypress/support/interceptViewPricingByCheckoutId.ts +6 -0
  21. package/cypress/tsconfig.json +8 -0
  22. package/cypress.config.ts +50 -0
  23. package/dist/src/ExpoRoot.js +2 -2
  24. package/dist/src/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.js +1 -1
  25. package/dist/src/infrastructure/ui/Root.d.ts +1 -2
  26. package/dist/src/infrastructure/ui/Root.js +2 -4
  27. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +2 -3
  28. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +1 -1
  29. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +1 -1
  30. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +2 -3
  31. package/dist/src/infrastructure/ui/test/render.js +1 -3
  32. package/dist/src/infrastructure/ui/views/App.js +7 -12
  33. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +2 -3
  34. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +1 -1
  35. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +1 -1
  36. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.d.ts +9 -2
  37. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +5 -6
  38. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.d.ts +1 -1
  39. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.js +1 -1
  40. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +2 -3
  41. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +3 -2
  42. package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +2 -2
  43. package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.js +1 -1
  44. package/dist/src/version.d.ts +1 -1
  45. package/dist/src/version.js +1 -1
  46. package/jest.setup.js +0 -20
  47. package/package.json +10 -9
  48. package/src/ExpoRoot.tsx +2 -2
  49. package/src/infrastructure/domain/uiSetting/react/useUpdateUiSetting.test.ts +1 -1
  50. package/src/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.ts +1 -1
  51. package/src/infrastructure/ui/Root.tsx +17 -21
  52. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.ts +1 -1
  53. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +2 -3
  54. package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +2 -3
  55. package/src/infrastructure/ui/test/render.tsx +1 -4
  56. package/src/infrastructure/ui/views/App.tsx +16 -23
  57. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.ts +1 -1
  58. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +2 -3
  59. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +10 -6
  60. package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +0 -1
  61. package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +26 -24
  62. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.ts +1 -1
  63. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +21 -10
  64. package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +15 -5
  65. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +2 -4
  66. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +10 -6
  67. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +2 -2
  68. package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +78 -72
  69. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +9 -3
  70. package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +4 -4
  71. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +2 -2
  72. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +2 -2
  73. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +2 -2
  74. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +30 -28
  75. package/dist/pact.config.d.ts +0 -13
  76. package/dist/pact.config.js +0 -9
  77. package/dist/public/public/assets/adaptive-icon.png +0 -0
  78. package/dist/public/public/assets/favicon.png +0 -0
  79. package/dist/public/public/assets/icon.png +0 -0
  80. package/dist/public/public/assets/splash.png +0 -0
  81. package/dist/public/public/images/not-found.png +0 -0
  82. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.d.ts +0 -3
  83. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.js +0 -27
  84. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.d.ts +0 -1
  85. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +0 -48
  86. package/dist/src/infrastructure/projection/checkout/checkout.mock.d.ts +0 -19
  87. package/dist/src/infrastructure/projection/checkout/checkout.mock.js +0 -21
  88. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.d.ts +0 -1
  89. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +0 -109
  90. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.d.ts +0 -1
  91. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +0 -49
  92. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.d.ts +0 -1
  93. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +0 -44
  94. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.d.ts +0 -1
  95. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +0 -44
  96. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.d.ts +0 -1
  97. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +0 -44
  98. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +0 -10
  99. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +0 -17
  100. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.d.ts +0 -3
  101. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.js +0 -6
  102. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.d.ts +0 -1
  103. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +0 -49
  104. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.d.ts +0 -15
  105. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.js +0 -43
  106. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.d.ts +0 -1
  107. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +0 -50
  108. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.d.ts +0 -3
  109. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.js +0 -103
  110. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.d.ts +0 -1
  111. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +0 -48
  112. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.d.ts +0 -1
  113. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +0 -109
  114. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.d.ts +0 -6
  115. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.js +0 -183
  116. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.d.ts +0 -1
  117. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +0 -48
  118. package/dist/src/infrastructure/projection/pricing/pricing.mock.d.ts +0 -9
  119. package/dist/src/infrastructure/projection/pricing/pricing.mock.js +0 -42
  120. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.d.ts +0 -1
  121. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +0 -48
  122. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.d.ts +0 -3
  123. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.js +0 -400
  124. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +0 -21
  125. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +0 -1
  126. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +0 -6
  127. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +0 -4
  128. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +0 -6
  129. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +0 -5
  130. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +0 -4
  131. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +0 -19
  132. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +0 -3
  133. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +0 -18
  134. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +0 -12
  135. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +0 -13
  136. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +0 -6
  137. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +0 -11
  138. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +0 -8
  139. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +0 -11
  140. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +0 -11
  141. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +0 -49
  142. package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +0 -9
  143. package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +0 -9
  144. package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +0 -19
  145. package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +0 -21
  146. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +0 -9
  147. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +0 -21
  148. package/dist/src/infrastructure/ui/views/App.style.d.ts +0 -6
  149. package/dist/src/infrastructure/ui/views/App.style.js +0 -7
  150. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +0 -7
  151. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +0 -10
  152. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -11
  153. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +0 -40
  154. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +0 -12
  155. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +0 -15
  156. package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +0 -40
  157. package/dist/src/infrastructure/ui/views/return/Return.style.js +0 -43
  158. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -13
  159. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +0 -9
  160. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +0 -7
  161. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +0 -10
  162. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +0 -17
  163. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +0 -13
  164. package/dist/src/projection/shared/country.d.ts +0 -14
  165. package/dist/src/projection/shared/country.js +0 -15
  166. package/dist/src/projection/shared/customer.d.ts +0 -8
  167. package/dist/src/projection/shared/customer.js +0 -1
  168. package/dist/src/projection/shared/locale.d.ts +0 -12
  169. package/dist/src/projection/shared/locale.js +0 -13
  170. package/dist/src/projection/shared/order.d.ts +0 -6
  171. package/dist/src/projection/shared/order.js +0 -1
  172. package/dist/src/projection/shared/price.d.ts +0 -10
  173. package/dist/src/projection/shared/price.js +0 -1
  174. package/dist/src/projection/shared/size.d.ts +0 -20
  175. package/dist/src/projection/shared/size.js +0 -3
  176. package/dist/src/projection/shared/subscription.d.ts +0 -2
  177. package/dist/src/projection/shared/subscription.js +0 -1
  178. package/dist/src/shared/ui/components/atoms/error/Error.d.ts +0 -10
  179. package/dist/src/shared/ui/components/atoms/error/Error.js +0 -4
  180. package/pact.config.ts +0 -31
  181. package/pact.publish.js +0 -32
  182. package/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.ts +0 -62
  183. package/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.ts +0 -128
  184. package/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.ts +0 -63
  185. package/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.ts +0 -57
  186. package/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.ts +0 -57
  187. package/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.ts +0 -57
  188. package/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.ts +0 -63
  189. package/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.ts +0 -64
  190. package/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.ts +0 -62
  191. package/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.ts +0 -136
  192. package/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.ts +0 -62
  193. package/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.ts +0 -62
  194. package/src/infrastructure/ui/views/App.style.ts +0 -9
@@ -1,400 +0,0 @@
1
- import { ReturnQuestionType } from "../../../projection/returnQuestion/returnQuestion";
2
- const returnQuestions = [
3
- {
4
- id: "efe07b97-f6fb-4b6a-ba92-b68519320b2c",
5
- name: "main_title",
6
- placeholder: "",
7
- type: ReturnQuestionType.HOST_DEFAULT,
8
- children: [
9
- {
10
- id: "ed396b68-1436-48ab-842f-fbfea996fad4",
11
- name: "size",
12
- placeholder: "size_placeholder",
13
- type: ReturnQuestionType.HOST_SELECT,
14
- children: [
15
- {
16
- id: "0ad1dba8-b02c-4121-a1e3-981f1c30800d",
17
- name: "size_title",
18
- placeholder: "",
19
- type: ReturnQuestionType.HOST_STACK,
20
- children: [
21
- {
22
- id: "9251dc2c-d76a-484d-9299-346929af932f",
23
- name: "size_large",
24
- placeholder: "",
25
- type: ReturnQuestionType.OPTION,
26
- children: [
27
- {
28
- id: "542c4d24-e1da-484f-8c3a-7d89ee135adc",
29
- name: "",
30
- placeholder: "",
31
- type: ReturnQuestionType.HOST_STACK,
32
- children: [
33
- {
34
- id: "68c0bb98-b00a-4b86-af43-528fe903cb69",
35
- name: "size_overall",
36
- placeholder: "",
37
- type: ReturnQuestionType.OPTION,
38
- },
39
- {
40
- id: "85e84a77-461c-41e6-8544-95b5294d0b80",
41
- name: "size_trousers_too_long",
42
- placeholder: "",
43
- type: ReturnQuestionType.OPTION,
44
- },
45
- {
46
- id: "29441d25-8d9f-471e-a13e-a03f61c88091",
47
- name: "size_fit_cut_does_not_fit",
48
- placeholder: "",
49
- type: ReturnQuestionType.OPTION,
50
- },
51
- ],
52
- },
53
- ],
54
- },
55
- {
56
- id: "a081c3e9-1904-4a60-8899-b72c1a3a0291",
57
- name: "size_correct",
58
- placeholder: "",
59
- type: ReturnQuestionType.OPTION,
60
- },
61
- {
62
- id: "624cce3d-bd86-463a-b16b-c862ad73d5f3",
63
- name: "size_small",
64
- placeholder: "",
65
- type: ReturnQuestionType.OPTION,
66
- children: [
67
- {
68
- id: "58e5ae9a-bc0d-4d27-b267-854a51c2a79a",
69
- name: "",
70
- placeholder: "",
71
- type: ReturnQuestionType.HOST_STACK,
72
- children: [
73
- {
74
- id: "6a3d11fc-570c-4085-a850-1967228cdd4c",
75
- name: "size_overall",
76
- placeholder: "",
77
- type: ReturnQuestionType.OPTION,
78
- },
79
- {
80
- id: "c27e1936-deea-4dbe-a8f1-fe4fb8564deb",
81
- name: "size_trousers_too_short",
82
- placeholder: "",
83
- type: ReturnQuestionType.OPTION,
84
- },
85
- {
86
- id: "e77232ae-eeec-4722-b2d3-f5c0d34fd0ca",
87
- name: "size_fit_cut_does_not_fit",
88
- placeholder: "",
89
- type: ReturnQuestionType.OPTION,
90
- },
91
- ],
92
- },
93
- ],
94
- },
95
- ],
96
- },
97
- ],
98
- },
99
- {
100
- id: "6a6d3878-5561-412c-96f3-7ed79ee587bb",
101
- name: "style",
102
- placeholder: "style_placeholder",
103
- type: ReturnQuestionType.HOST_SELECT,
104
- children: [
105
- {
106
- id: "fd7ff4a0-78ed-4c0d-aa4d-64962739c322",
107
- name: "style_title",
108
- placeholder: "",
109
- type: ReturnQuestionType.HOST_STACK,
110
- children: [
111
- {
112
- id: "56631448-d33d-49fb-b3f8-4486b68b60c3",
113
- name: "style_i_love_it_but",
114
- placeholder: "",
115
- type: ReturnQuestionType.OPTION,
116
- children: [
117
- {
118
- id: "90329d91-bd5d-4439-bb0a-b338caaeff2b",
119
- name: "",
120
- placeholder: "",
121
- type: ReturnQuestionType.HOST_STACK,
122
- children: [
123
- {
124
- id: "a3d937b6-7499-4a3c-86bf-5c0af9ab2e23",
125
- name: "style_i_already_have_something_similar",
126
- placeholder: "",
127
- type: ReturnQuestionType.OPTION,
128
- },
129
- {
130
- id: "7970edd3-fb5c-42d3-afe3-ce31bcbb856c",
131
- name: "style_very_basic_simple",
132
- placeholder: "",
133
- type: ReturnQuestionType.OPTION,
134
- },
135
- {
136
- id: "bab3d4f9-0227-4550-a53f-3c125d68429c",
137
- name: "style_i_dont_need_it_at_the_moment",
138
- placeholder: "",
139
- type: ReturnQuestionType.OPTION,
140
- },
141
- ],
142
- },
143
- ],
144
- },
145
- {
146
- id: "5287d1df-a28a-42cd-9138-01f82aeea4c2",
147
- name: "style_i_like_it_but",
148
- placeholder: "",
149
- type: ReturnQuestionType.OPTION,
150
- children: [
151
- {
152
- id: "35b86395-6b6b-4a39-ab16-05511f58acdd",
153
- name: "",
154
- placeholder: "",
155
- type: ReturnQuestionType.HOST_STACK,
156
- children: [
157
- {
158
- id: "e1f6ac53-f203-4b32-9ff0-782c028d9e95",
159
- name: "style_i_already_have_something_similar",
160
- placeholder: "",
161
- type: ReturnQuestionType.OPTION,
162
- },
163
- {
164
- id: "12875926-b67a-4ad3-852c-1608c7dcc558",
165
- name: "style_very_basic_simple",
166
- placeholder: "",
167
- type: ReturnQuestionType.OPTION,
168
- },
169
- {
170
- id: "a5eb96bf-73d4-4df5-8ad8-097410b24526",
171
- name: "style_i_dont_need_it_at_the_moment",
172
- placeholder: "",
173
- type: ReturnQuestionType.OPTION,
174
- },
175
- ],
176
- },
177
- ],
178
- },
179
- {
180
- id: "757107a9-8e2d-4194-a7fe-0d55cde49c11",
181
- name: "style_not_bad_but",
182
- placeholder: "",
183
- type: ReturnQuestionType.OPTION,
184
- children: [
185
- {
186
- id: "c6f75ee3-a445-4103-a682-f0c3a742108d",
187
- name: "",
188
- placeholder: "",
189
- type: ReturnQuestionType.HOST_STACK,
190
- children: [
191
- {
192
- id: "4f46d4b1-b103-43b2-b669-be721ab46e03",
193
- name: "style_i_dont_like_the_color",
194
- placeholder: "",
195
- type: ReturnQuestionType.OPTION,
196
- },
197
- {
198
- id: "48412165-5e05-4806-8e21-ea59c41d0479",
199
- name: "style_very_basic_simple",
200
- placeholder: "",
201
- type: ReturnQuestionType.OPTION,
202
- },
203
- {
204
- id: "51262c01-eaa3-4d3a-aeb9-95dc8b0dd687",
205
- name: "style_i_dont_like_the_fabric",
206
- placeholder: "",
207
- type: ReturnQuestionType.OPTION,
208
- },
209
- {
210
- id: "9dea1c2b-4f8c-4192-a547-999df55e77e4",
211
- name: "style_i_dont_like_the_print",
212
- placeholder: "",
213
- type: ReturnQuestionType.OPTION,
214
- },
215
- {
216
- id: "b1277bf3-4bbb-487a-8e58-88efecc61c3f",
217
- name: "style_not_my_style_in_general",
218
- placeholder: "",
219
- type: ReturnQuestionType.OPTION,
220
- },
221
- ],
222
- },
223
- ],
224
- },
225
- {
226
- id: "8a9cd6f8-db4b-4904-8a48-3d9bbd6f7a69",
227
- name: "style_i_dont_like",
228
- placeholder: "",
229
- type: ReturnQuestionType.OPTION,
230
- children: [
231
- {
232
- id: "f604240d-c093-4a9e-ab85-4adc0744066a",
233
- name: "",
234
- placeholder: "",
235
- type: ReturnQuestionType.HOST_STACK,
236
- children: [
237
- {
238
- id: "42dbbb93-7808-4ac3-8431-582f812cb314",
239
- name: "style_i_dont_like_the_color",
240
- placeholder: "",
241
- type: ReturnQuestionType.OPTION,
242
- },
243
- {
244
- id: "af1ade81-7b22-4f7e-a505-2ae275a6440f",
245
- name: "style_very_basic_simple",
246
- placeholder: "",
247
- type: ReturnQuestionType.OPTION,
248
- },
249
- {
250
- id: "26d073b4-2588-4391-9b4c-e8e4a8eba2a8",
251
- name: "style_i_dont_like_the_fabric",
252
- placeholder: "",
253
- type: ReturnQuestionType.OPTION,
254
- },
255
- {
256
- id: "ee50ab07-b7a6-415e-a04a-c9f350396185",
257
- name: "style_i_dont_like_the_print",
258
- placeholder: "",
259
- type: ReturnQuestionType.OPTION,
260
- },
261
- {
262
- id: "ce3227e4-851e-47b7-98c1-c63a402e8477",
263
- name: "style_not_my_style_in_general",
264
- placeholder: "",
265
- type: ReturnQuestionType.OPTION,
266
- },
267
- ],
268
- },
269
- ],
270
- },
271
- ],
272
- },
273
- ],
274
- },
275
- {
276
- id: "a1acdb2d-62c8-467f-b7cc-dc24d967290c",
277
- name: "quality",
278
- placeholder: "quality_placeholder",
279
- type: ReturnQuestionType.HOST_SELECT,
280
- children: [
281
- {
282
- id: "405de847-188f-46c1-b66d-941c22a6b7a9",
283
- name: "quality_title",
284
- placeholder: "",
285
- type: ReturnQuestionType.HOST_STACK,
286
- children: [
287
- {
288
- id: "cce7851c-92c7-461b-8dcb-903c5de59ed1",
289
- name: "quality_good",
290
- placeholder: "",
291
- type: ReturnQuestionType.OPTION,
292
- },
293
- {
294
- id: "4bf8f27d-669b-4d36-8d39-b5599c671816",
295
- name: "quality_regular",
296
- placeholder: "",
297
- type: ReturnQuestionType.OPTION,
298
- },
299
- {
300
- id: "48bfe766-92c0-4ff5-a793-e107b60786ff",
301
- name: "quality_bad",
302
- placeholder: "",
303
- type: ReturnQuestionType.OPTION,
304
- },
305
- ],
306
- },
307
- ],
308
- },
309
- {
310
- id: "f25ccdcf-b648-479e-b4a1-86129e3e8c0b",
311
- name: "price",
312
- placeholder: "price_placeholder",
313
- type: ReturnQuestionType.HOST_SELECT,
314
- children: [
315
- {
316
- id: "b0e0463c-787f-4d6c-adf3-5151ab6fc959",
317
- name: "price_title",
318
- placeholder: "",
319
- type: ReturnQuestionType.HOST_STACK,
320
- children: [
321
- {
322
- id: "9c59e396-4135-4255-9437-22555837d686",
323
- name: "price_expensive",
324
- placeholder: "",
325
- type: ReturnQuestionType.OPTION,
326
- },
327
- {
328
- id: "10db17f8-0982-49ee-9aeb-f752d953654c",
329
- name: "price_cheap",
330
- placeholder: "",
331
- type: ReturnQuestionType.OPTION,
332
- },
333
- {
334
- id: "acf64bb3-b91b-48e7-bba1-0541620ed1c5",
335
- name: "price_fair",
336
- placeholder: "",
337
- type: ReturnQuestionType.OPTION,
338
- },
339
- ],
340
- },
341
- ],
342
- },
343
- {
344
- id: "b7ad1665-5e54-4ee4-b455-e7189f33083c",
345
- name: "others",
346
- placeholder: "others_placeholder",
347
- type: ReturnQuestionType.HOST_SELECT,
348
- children: [
349
- {
350
- id: "32cd0ef9-78d7-4605-a279-556749b36d4a",
351
- name: "others_title",
352
- placeholder: "",
353
- type: ReturnQuestionType.HOST_STACK,
354
- children: [
355
- {
356
- id: "95c4fd13-9ca3-45a6-8795-23415bbd0a5e",
357
- name: "others_i_dont_like_the_brand",
358
- placeholder: "",
359
- type: ReturnQuestionType.OPTION,
360
- },
361
- {
362
- id: "f25c63bd-42d3-4242-9b81-927025aa9d67",
363
- name: "others_different_from_preview",
364
- placeholder: "",
365
- type: ReturnQuestionType.OPTION,
366
- },
367
- {
368
- id: "0e0b16c1-a721-4a14-aea6-e0cf5c262222",
369
- name: "others_delivery_delay",
370
- placeholder: "",
371
- type: ReturnQuestionType.OPTION,
372
- },
373
- {
374
- id: "11699ae8-325d-429c-9c05-ff2d6cc45d54",
375
- name: "others_item_is_defective",
376
- placeholder: "",
377
- type: ReturnQuestionType.OPTION,
378
- },
379
- ],
380
- },
381
- ],
382
- },
383
- ],
384
- },
385
- {
386
- id: "ce3e8d57-5eea-4dd3-bef4-2e811a143612",
387
- name: "comment_title",
388
- placeholder: "",
389
- type: ReturnQuestionType.HOST_TEXTAREA,
390
- children: [
391
- {
392
- id: "1123a37d-bc00-43a4-9d28-cee1dfaf356c",
393
- name: "comment_textarea",
394
- placeholder: "comment_textarea_placeholder",
395
- type: ReturnQuestionType.TEXTAREA,
396
- },
397
- ],
398
- },
399
- ];
400
- export { returnQuestions };
@@ -1,21 +0,0 @@
1
- import { FC, ReactNode, RefObject } from "react";
2
- import { LayoutChangeEvent, ScrollView, StyleProp, ViewStyle } from "react-native";
3
- interface LayoutStyle {
4
- readonly safeAreaView: StyleProp<ViewStyle>;
5
- readonly scrollView: StyleProp<ViewStyle>;
6
- readonly header: StyleProp<ViewStyle>;
7
- }
8
- interface LayoutProps {
9
- readonly children: ReactNode;
10
- readonly header?: JSX.Element | null;
11
- readonly footer?: JSX.Element | null;
12
- readonly panel?: JSX.Element | null;
13
- readonly stickyHeader?: boolean;
14
- readonly stickyHeaderHiddenOnScroll?: boolean;
15
- readonly scrollRef?: RefObject<ScrollView>;
16
- readonly scrollEnabled?: boolean;
17
- readonly style?: Partial<LayoutStyle>;
18
- readonly onLayout?: (event: LayoutChangeEvent) => void;
19
- }
20
- type Layout = FC<LayoutProps>;
21
- export type { Layout };
@@ -1,6 +0,0 @@
1
- import { FC, ReactNode } from "react";
2
- interface FooterProps {
3
- readonly children: ReactNode;
4
- }
5
- declare const Footer: FC<FooterProps>;
6
- export { Footer };
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import { Platform } from "react-native";
3
- const Footer = ({ children }) => (Platform.OS !== "web" ? React.createElement(React.Fragment, null, children) : null);
4
- export { Footer };
@@ -1,6 +0,0 @@
1
- import { FC, ReactNode } from "react";
2
- interface HeaderProps {
3
- readonly children: ReactNode;
4
- }
5
- declare const Header: FC<HeaderProps>;
6
- export { Header };
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- import { View } from "react-native";
3
- import { style } from "./Header.style";
4
- const Header = ({ children }) => React.createElement(View, { style: style.header }, children);
5
- export { Header };
@@ -1,4 +0,0 @@
1
- declare const style: {
2
- header: {};
3
- };
4
- export { style };
@@ -1,19 +0,0 @@
1
- import { Platform, StyleSheet } from "react-native";
2
- import { HEADER_HEIGHT } from "../../../../templates/header/Header.style";
3
- const style = StyleSheet.create({
4
- header: {
5
- ...Platform.select({
6
- web: {
7
- position: "sticky",
8
- top: 0,
9
- zIndex: 10,
10
- height: HEADER_HEIGHT,
11
- },
12
- native: {
13
- position: "relative",
14
- height: HEADER_HEIGHT,
15
- },
16
- }),
17
- },
18
- });
19
- export { style };
@@ -1,3 +0,0 @@
1
- import { Layout } from "../Layout";
2
- declare const DummyLayout: Layout;
3
- export { DummyLayout };
@@ -1,18 +0,0 @@
1
- /* eslint-disable react/prop-types */
2
- import React from "react";
3
- import { View } from "react-native";
4
- import { GestureHandlerRootView, ScrollView as RNGHScrollView } from "react-native-gesture-handler";
5
- import { SafeAreaView } from "react-native-safe-area-context";
6
- import { Footer as DefaultFooter } from "../../../templates/footer/Footer";
7
- import { DefaultHeader } from "../../../templates/header/defaultHeader/DefaultHeader";
8
- import { Footer } from "../components/footer/Footer";
9
- import { Header } from "../components/header/Header";
10
- import { style } from "./DummyLayout.style";
11
- const DummyLayout = ({ children, header = React.createElement(DefaultHeader, null), footer = React.createElement(DefaultFooter, null), panel, style: customStyle, scrollEnabled, onLayout, }) => (React.createElement(SafeAreaView, { style: [style.safeAreaView, customStyle?.safeAreaView] },
12
- React.createElement(GestureHandlerRootView, { style: { flex: 1 } },
13
- React.createElement(RNGHScrollView, { contentContainerStyle: [style.scrollView, customStyle?.scrollView], scrollEnabled: scrollEnabled, scrollEventThrottle: 16, showsVerticalScrollIndicator: false, stickyHeaderIndices: [0] },
14
- React.createElement(Header, null, header),
15
- panel,
16
- React.createElement(View, { style: style.children, onLayout: onLayout }, children))),
17
- React.createElement(Footer, null, footer)));
18
- export { DummyLayout };
@@ -1,12 +0,0 @@
1
- declare const style: {
2
- children: {
3
- flex: number;
4
- };
5
- safeAreaView: {
6
- flex: number;
7
- };
8
- scrollView: {
9
- flexGrow: number;
10
- };
11
- };
12
- export { style };
@@ -1,13 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
- const style = StyleSheet.create({
3
- children: {
4
- flex: 1,
5
- },
6
- safeAreaView: {
7
- flex: 1,
8
- },
9
- scrollView: {
10
- flexGrow: 1,
11
- },
12
- });
13
- export { style };
@@ -1,6 +0,0 @@
1
- import { FC } from "react";
2
- interface DefaultHeaderProps {
3
- readonly onPressMenu?: () => void;
4
- }
5
- declare const DefaultHeader: FC<DefaultHeaderProps>;
6
- export { DefaultHeader };
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- import { ButtonIcon } from "@lookiero/aurora";
3
- import { Header } from "../Header";
4
- import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
5
- import { Logo } from "../logo/Logo";
6
- import { style } from "./DefaultHeader.style";
7
- const DefaultHeader = ({ onPressMenu }) => (React.createElement(Header, { testID: "default-header" },
8
- React.createElement(Logo, null),
9
- React.createElement(ButtonIconPlaceholder, null),
10
- React.createElement(ButtonIcon, { name: "menu", style: style.button, testID: "menu-button-icon", onPress: onPressMenu })));
11
- export { DefaultHeader };
@@ -1,8 +0,0 @@
1
- declare const style: {
2
- button: {
3
- alignSelf: "auto";
4
- height: number;
5
- width: number;
6
- };
7
- };
8
- export { style };
@@ -1,11 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
- import { theme } from "@lookiero/sty-psp-ui";
3
- const { space10 } = theme();
4
- const style = StyleSheet.create({
5
- button: {
6
- alignSelf: "auto",
7
- height: space10,
8
- width: space10,
9
- },
10
- });
11
- export { style };
@@ -1,11 +0,0 @@
1
- import { FC, ReactNode } from "react";
2
- declare enum NewFeedbackExperimentVariation {
3
- CONTROL = "control",
4
- RETURN_PAGE = "return_page"
5
- }
6
- interface NewFeedbackExperimentProviderProps {
7
- readonly children: ReactNode;
8
- }
9
- declare const NewFeedbackExperimentProvider: FC<NewFeedbackExperimentProviderProps>;
10
- declare const useNewFeedbackExperiment: () => NewFeedbackExperimentVariation;
11
- export { useNewFeedbackExperiment, NewFeedbackExperimentProvider, NewFeedbackExperimentVariation };
@@ -1,49 +0,0 @@
1
- import React, { createContext, useContext, useEffect, useMemo, useRef } from "react";
2
- import invariant from "tiny-invariant";
3
- import { Spinner } from "@lookiero/aurora";
4
- import { useAssignedVariationByExperimentId } from "@lookiero/sty-psp-ab-testing";
5
- import { useViewFirstAvailableCheckoutByCustomerId } from "../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
6
- import { useTrackAssignedVariationByExperiment } from "../../tracking/useTrackAssignedVariationByExperiment";
7
- import { useStaticInfo } from "./useStaticInfo";
8
- var NewFeedbackExperimentVariation;
9
- (function (NewFeedbackExperimentVariation) {
10
- NewFeedbackExperimentVariation["CONTROL"] = "control";
11
- NewFeedbackExperimentVariation["RETURN_PAGE"] = "return_page";
12
- })(NewFeedbackExperimentVariation || (NewFeedbackExperimentVariation = {}));
13
- const NewFeedbackExperimentContext = createContext(null);
14
- const NewFeedbackExperimentProvider = ({ children }) => {
15
- const { kameleoon: { experiments: { newFeedback: { id: newFeedbackId, variations }, }, }, customer: { customerId, country, segment }, } = useStaticInfo();
16
- const [checkout] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
17
- const { assignedVariation: newFeedbackVariation } = useAssignedVariationByExperimentId({
18
- experimentId: newFeedbackId,
19
- });
20
- const trackAssignedVariation = useTrackAssignedVariationByExperiment({
21
- checkoutId: checkout?.id,
22
- country,
23
- segment,
24
- experimentId: newFeedbackId,
25
- });
26
- const value = useMemo(() => ({
27
- variation: newFeedbackVariation?.id === Number(variations.v1)
28
- ? NewFeedbackExperimentVariation.RETURN_PAGE
29
- : NewFeedbackExperimentVariation.CONTROL,
30
- }), [newFeedbackVariation?.id, variations.v1]);
31
- const assignedVariantTracked = useRef(false);
32
- useEffect(() => {
33
- if (assignedVariantTracked.current || !newFeedbackVariation || !checkout?.id) {
34
- return;
35
- }
36
- trackAssignedVariation({ assignedVariation: newFeedbackVariation });
37
- assignedVariantTracked.current = true;
38
- }, [checkout?.id, newFeedbackVariation, trackAssignedVariation]);
39
- if (!checkout) {
40
- return React.createElement(Spinner, null);
41
- }
42
- return React.createElement(NewFeedbackExperimentContext.Provider, { value: value }, children);
43
- };
44
- const useNewFeedbackExperiment = () => {
45
- const newFeedbackExperiment = useContext(NewFeedbackExperimentContext);
46
- invariant(newFeedbackExperiment, "Your are trying to use the useNewFeedbackExperiment hook without wrapping your app with the <NewFeedbackExperimentProvider>.");
47
- return newFeedbackExperiment.variation;
48
- };
49
- export { useNewFeedbackExperiment, NewFeedbackExperimentProvider, NewFeedbackExperimentVariation };
@@ -1,9 +0,0 @@
1
- import { EndpointFunction, FetchTranslationFuction } from "@lookiero/i18n";
2
- interface FetchTranslationsFuntionArgs {
3
- readonly translations: EndpointFunction[];
4
- }
5
- interface FetchTranslationsFuntion {
6
- (args: FetchTranslationsFuntionArgs): FetchTranslationFuction;
7
- }
8
- declare const fetchTranslations: FetchTranslationsFuntion;
9
- export { fetchTranslations };