@lookiero/checkout 8.14.0-beta.3 → 8.14.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 (254) 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/ReturnQuestion.js +3 -1
  28. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/isChildReturnQuestion.js +2 -1
  29. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.d.ts +3 -3
  30. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +4 -3
  31. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.d.ts +2 -1
  32. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.js +1 -0
  33. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.d.ts +2 -1
  34. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +8 -6
  35. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.d.ts +2 -1
  36. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.js +2 -1
  37. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.d.ts +2 -1
  38. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +4 -4
  39. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +1 -1
  40. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +1 -1
  41. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.d.ts +2 -1
  42. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.js +1 -0
  43. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.d.ts +2 -1
  44. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +5 -3
  45. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +6 -5
  46. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.d.ts +2 -1
  47. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +2 -1
  48. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.d.ts +2 -1
  49. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +2 -1
  50. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.d.ts +2 -1
  51. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +2 -1
  52. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.d.ts +2 -1
  53. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +2 -1
  54. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.js +18 -9
  55. package/dist/src/infrastructure/ui/test/render.js +1 -3
  56. package/dist/src/infrastructure/ui/views/App.js +7 -12
  57. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +2 -3
  58. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +1 -1
  59. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +1 -1
  60. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +1 -1
  61. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.d.ts +9 -2
  62. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +5 -6
  63. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.d.ts +1 -1
  64. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.js +1 -1
  65. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +2 -3
  66. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +4 -3
  67. package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +2 -2
  68. package/dist/src/projection/returnQuestion/returnQuestion.constants.d.ts +9 -0
  69. package/dist/src/projection/returnQuestion/returnQuestion.constants.js +10 -0
  70. package/dist/src/projection/returnQuestion/returnQuestion.d.ts +23 -16
  71. package/dist/src/projection/returnQuestion/returnQuestion.js +1 -11
  72. package/dist/src/projection/returnQuestion/returnQuestion.metadata.d.ts +12 -0
  73. package/dist/src/projection/returnQuestion/returnQuestion.metadata.js +1 -0
  74. package/dist/src/projection/returnQuestion/returnQuestion.typeguard.d.ts +5 -0
  75. package/dist/src/projection/returnQuestion/returnQuestion.typeguard.js +10 -0
  76. package/dist/src/version.d.ts +1 -1
  77. package/dist/src/version.js +1 -1
  78. package/jest.setup.js +0 -20
  79. package/package.json +8 -7
  80. package/src/ExpoRoot.tsx +2 -2
  81. package/src/infrastructure/domain/uiSetting/react/useUpdateUiSetting.test.ts +1 -1
  82. package/src/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.ts +1 -1
  83. package/src/infrastructure/projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId.test.ts +4 -9
  84. package/src/infrastructure/projection/returnQuestion/returnQuestions.mock.ts +72 -117
  85. package/src/infrastructure/ui/Root.tsx +17 -21
  86. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.test.tsx +10 -12
  87. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.tsx +10 -8
  88. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.test.tsx +10 -9
  89. package/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/isChildReturnQuestion.ts +2 -1
  90. package/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.test.tsx +7 -9
  91. package/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.tsx +3 -3
  92. package/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.ts +4 -3
  93. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.test.tsx +7 -13
  94. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.tsx +4 -2
  95. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.test.tsx +8 -14
  96. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.tsx +13 -7
  97. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.tsx +7 -5
  98. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.ts +1 -1
  99. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.test.tsx +10 -14
  100. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +9 -8
  101. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.tsx +5 -3
  102. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.test.tsx +43 -36
  103. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +10 -7
  104. package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +13 -12
  105. package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.test.tsx +8 -14
  106. package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.tsx +6 -4
  107. package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +6 -4
  108. package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.test.tsx +23 -25
  109. package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.tsx +5 -3
  110. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.test.tsx +9 -29
  111. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +7 -5
  112. package/src/infrastructure/ui/components/organisms/returnQuestions/util/__snapshots__/returnQuestionFeedback.test.ts.snap +5 -4
  113. package/src/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.ts +32 -18
  114. package/src/infrastructure/ui/test/render.tsx +1 -4
  115. package/src/infrastructure/ui/views/App.tsx +16 -23
  116. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.ts +1 -1
  117. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +2 -3
  118. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +10 -6
  119. package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +0 -1
  120. package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +2 -4
  121. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.ts +1 -1
  122. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +21 -10
  123. package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +15 -5
  124. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +2 -4
  125. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +10 -6
  126. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +2 -2
  127. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +10 -4
  128. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +2 -2
  129. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +2 -2
  130. package/src/projection/returnQuestion/listReturnQuestionsByCheckoutItemId.test.ts +4 -12
  131. package/src/projection/returnQuestion/returnQuestion.constants.ts +10 -0
  132. package/src/projection/returnQuestion/returnQuestion.metadata.ts +17 -0
  133. package/src/projection/returnQuestion/returnQuestion.ts +42 -20
  134. package/src/projection/returnQuestion/returnQuestion.typeguard.ts +24 -0
  135. package/dist/pact.config.d.ts +0 -13
  136. package/dist/pact.config.js +0 -9
  137. package/dist/public/public/assets/adaptive-icon.png +0 -0
  138. package/dist/public/public/assets/favicon.png +0 -0
  139. package/dist/public/public/assets/icon.png +0 -0
  140. package/dist/public/public/assets/splash.png +0 -0
  141. package/dist/public/public/images/not-found.png +0 -0
  142. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.d.ts +0 -3
  143. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.js +0 -27
  144. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.d.ts +0 -1
  145. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +0 -48
  146. package/dist/src/infrastructure/projection/checkout/checkout.mock.d.ts +0 -19
  147. package/dist/src/infrastructure/projection/checkout/checkout.mock.js +0 -21
  148. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.d.ts +0 -1
  149. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +0 -109
  150. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.d.ts +0 -1
  151. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +0 -49
  152. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.d.ts +0 -1
  153. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +0 -44
  154. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.d.ts +0 -1
  155. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +0 -44
  156. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.d.ts +0 -1
  157. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +0 -44
  158. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +0 -10
  159. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +0 -17
  160. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.d.ts +0 -3
  161. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.js +0 -6
  162. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.d.ts +0 -1
  163. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +0 -49
  164. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.d.ts +0 -15
  165. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.js +0 -43
  166. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.d.ts +0 -1
  167. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +0 -50
  168. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.d.ts +0 -3
  169. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.js +0 -103
  170. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.d.ts +0 -1
  171. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +0 -48
  172. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.d.ts +0 -1
  173. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +0 -109
  174. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.d.ts +0 -6
  175. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.js +0 -183
  176. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.d.ts +0 -1
  177. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +0 -48
  178. package/dist/src/infrastructure/projection/pricing/pricing.mock.d.ts +0 -9
  179. package/dist/src/infrastructure/projection/pricing/pricing.mock.js +0 -42
  180. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.d.ts +0 -1
  181. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +0 -48
  182. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.d.ts +0 -3
  183. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.js +0 -400
  184. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +0 -21
  185. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +0 -1
  186. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +0 -6
  187. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +0 -4
  188. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +0 -6
  189. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +0 -5
  190. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +0 -4
  191. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +0 -19
  192. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +0 -3
  193. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +0 -18
  194. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +0 -12
  195. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +0 -13
  196. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +0 -6
  197. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +0 -11
  198. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +0 -8
  199. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +0 -11
  200. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +0 -11
  201. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +0 -49
  202. package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +0 -9
  203. package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +0 -9
  204. package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +0 -19
  205. package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +0 -21
  206. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +0 -9
  207. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +0 -21
  208. package/dist/src/infrastructure/ui/views/App.style.d.ts +0 -6
  209. package/dist/src/infrastructure/ui/views/App.style.js +0 -7
  210. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +0 -7
  211. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +0 -10
  212. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -11
  213. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +0 -40
  214. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +0 -12
  215. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +0 -15
  216. package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +0 -40
  217. package/dist/src/infrastructure/ui/views/return/Return.style.js +0 -43
  218. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -13
  219. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +0 -9
  220. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +0 -7
  221. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +0 -10
  222. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +0 -17
  223. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +0 -13
  224. package/dist/src/projection/shared/country.d.ts +0 -14
  225. package/dist/src/projection/shared/country.js +0 -15
  226. package/dist/src/projection/shared/customer.d.ts +0 -8
  227. package/dist/src/projection/shared/customer.js +0 -1
  228. package/dist/src/projection/shared/locale.d.ts +0 -12
  229. package/dist/src/projection/shared/locale.js +0 -13
  230. package/dist/src/projection/shared/order.d.ts +0 -6
  231. package/dist/src/projection/shared/order.js +0 -1
  232. package/dist/src/projection/shared/price.d.ts +0 -10
  233. package/dist/src/projection/shared/price.js +0 -1
  234. package/dist/src/projection/shared/size.d.ts +0 -20
  235. package/dist/src/projection/shared/size.js +0 -3
  236. package/dist/src/projection/shared/subscription.d.ts +0 -2
  237. package/dist/src/projection/shared/subscription.js +0 -1
  238. package/dist/src/shared/ui/components/atoms/error/Error.d.ts +0 -10
  239. package/dist/src/shared/ui/components/atoms/error/Error.js +0 -4
  240. package/pact.config.ts +0 -31
  241. package/pact.publish.js +0 -32
  242. package/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.ts +0 -62
  243. package/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.ts +0 -128
  244. package/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.ts +0 -63
  245. package/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.ts +0 -57
  246. package/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.ts +0 -57
  247. package/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.ts +0 -57
  248. package/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.ts +0 -63
  249. package/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.ts +0 -64
  250. package/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.ts +0 -62
  251. package/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.ts +0 -136
  252. package/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.ts +0 -62
  253. package/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.ts +0 -62
  254. package/src/infrastructure/ui/views/App.style.ts +0 -9
@@ -1,17 +1,24 @@
1
- declare enum ReturnQuestionType {
2
- HOST_DEFAULT = "HOST_DEFAULT",
3
- HOST_TEXTAREA = "HOST_TEXTAREA",
4
- HOST_SELECT = "HOST_SELECT",
5
- HOST_STACK = "HOST_STACK",
6
- TEXTAREA = "TEXTAREA",
7
- OPTION = "OPTION"
8
- }
9
- interface ReturnQuestionProjection {
1
+ import { EmptyObject, ExcludePropertyIfOptional, NonEmptyArray } from "@lookiero/sty-psp-typescript";
2
+ import { ReturnQuestionType } from "./returnQuestion.constants";
3
+ import { Metadata } from "./returnQuestion.metadata";
4
+ type ReturnQuestionTypesWithChildren = ReturnQuestionType.HOST_DEFAULT | ReturnQuestionType.HOST_SELECT | ReturnQuestionType.HOST_STACK | ReturnQuestionType.HOST_TEXTAREA;
5
+ type ReturnQuestionTypesWithOptionalChildren = ReturnQuestionType.OPTION;
6
+ type ReturnQuestionTypesWithOptionalTranslationKeys = ReturnQuestionType.HOST_STACK;
7
+ type ReturnQuestionMetadata<RQT extends ReturnQuestionType> = ExcludePropertyIfOptional<"metadata", {
8
+ readonly metadata: Metadata<RQT>;
9
+ }>;
10
+ type ReturnQuestionChildren<RQT extends ReturnQuestionType> = RQT extends ReturnQuestionTypesWithChildren ? {
11
+ readonly children: NonEmptyArray<ReturnQuestion>;
12
+ } : RQT extends ReturnQuestionTypesWithOptionalChildren ? {
13
+ readonly children?: NonEmptyArray<ReturnQuestion>;
14
+ } : EmptyObject;
15
+ type ReturnQuestionTranslationKey<RQT extends ReturnQuestionType> = RQT extends ReturnQuestionTypesWithOptionalTranslationKeys ? {
16
+ readonly translationKey?: string;
17
+ } : {
18
+ readonly translationKey: string;
19
+ };
20
+ type ReturnQuestion<RQT extends ReturnQuestionType = ReturnQuestionType> = RQT extends infer K extends ReturnQuestionType ? {
10
21
  readonly id: string;
11
- readonly name: string;
12
- readonly placeholder: string;
13
- readonly type: ReturnQuestionType;
14
- readonly children?: ReturnQuestionProjection[];
15
- }
16
- export { ReturnQuestionType };
17
- export type { ReturnQuestionProjection };
22
+ readonly type: K;
23
+ } & ReturnQuestionTranslationKey<K> & ReturnQuestionChildren<K> & ReturnQuestionMetadata<K> : never;
24
+ export type { ReturnQuestion as ReturnQuestionProjection, ReturnQuestionTypesWithOptionalTranslationKeys, ReturnQuestionTypesWithChildren, };
@@ -1,11 +1 @@
1
- var ReturnQuestionType;
2
- (function (ReturnQuestionType) {
3
- ReturnQuestionType["HOST_DEFAULT"] = "HOST_DEFAULT";
4
- ReturnQuestionType["HOST_TEXTAREA"] = "HOST_TEXTAREA";
5
- ReturnQuestionType["HOST_SELECT"] = "HOST_SELECT";
6
- ReturnQuestionType["HOST_STACK"] = "HOST_STACK";
7
- ReturnQuestionType["TEXTAREA"] = "TEXTAREA";
8
- ReturnQuestionType["OPTION"] = "OPTION";
9
- // ICON = "ICON",
10
- })(ReturnQuestionType || (ReturnQuestionType = {}));
11
- export { ReturnQuestionType };
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { EmptyObject } from "@lookiero/sty-psp-typescript";
2
+ import { ReturnQuestionType } from "./returnQuestion.constants";
3
+ interface ComponentPlaceholder {
4
+ readonly placeholder: string;
5
+ }
6
+ type MetadataDictionary = Record<ReturnQuestionType, EmptyObject>;
7
+ type ComponentMetadata = MetadataDictionary & {
8
+ [ReturnQuestionType.HOST_SELECT]: ComponentPlaceholder;
9
+ [ReturnQuestionType.TEXTAREA]: ComponentPlaceholder;
10
+ };
11
+ type Metadata<RQT extends ReturnQuestionType> = ComponentMetadata[RQT];
12
+ export type { Metadata };
@@ -0,0 +1 @@
1
+ import { ReturnQuestionType } from "./returnQuestion.constants";
@@ -0,0 +1,5 @@
1
+ import { ReturnQuestionProjection, ReturnQuestionTypesWithChildren } from "./returnQuestion";
2
+ import { ReturnQuestionType } from "./returnQuestion.constants";
3
+ declare const returnQuestionWithTranslationKey: (question: ReturnQuestionProjection) => question is ReturnQuestionProjection<ReturnQuestionType.HOST_DEFAULT | ReturnQuestionType.HOST_TEXTAREA | ReturnQuestionType.HOST_SELECT | ReturnQuestionType.TEXTAREA | ReturnQuestionType.OPTION>;
4
+ declare const returnQuestionHasChildren: (question: ReturnQuestionProjection) => question is ReturnQuestionProjection<ReturnQuestionTypesWithChildren>;
5
+ export { returnQuestionWithTranslationKey, returnQuestionHasChildren };
@@ -0,0 +1,10 @@
1
+ import { ReturnQuestionType } from "./returnQuestion.constants";
2
+ const returnQuestionWithTranslationKey = (question) => Boolean(question.translationKey);
3
+ const returnQuestionHasChildren = (question) => [
4
+ ReturnQuestionType.HOST_DEFAULT,
5
+ ReturnQuestionType.HOST_SELECT,
6
+ ReturnQuestionType.HOST_STACK,
7
+ ReturnQuestionType.HOST_TEXTAREA,
8
+ ReturnQuestionType.OPTION,
9
+ ].includes(question.type);
10
+ export { returnQuestionWithTranslationKey, returnQuestionHasChildren };
@@ -1 +1 @@
1
- export declare const VERSION = "8.14.0-beta.3";
1
+ export declare const VERSION = "8.14.0";
@@ -1 +1 @@
1
- export const VERSION = "8.14.0-beta.3";
1
+ export const VERSION = "8.14.0";
package/jest.setup.js CHANGED
@@ -11,26 +11,6 @@ jest.mock("@react-native-async-storage/async-storage", () => mockAsyncStorage);
11
11
  * Without these, jest will break or pollute the log warnings.
12
12
  */
13
13
  jest.mock("expo-linear-gradient", () => ({ LinearGradient: require("react-native").View }));
14
- jest.mock("expo-image-picker", () => ({
15
- PermissionStatus: {
16
- GRANTED: "granted",
17
- UNDETERMINED: "undetermined",
18
- DENIED: "denied",
19
- },
20
- MediaTypeOptions: {
21
- Images: "Images",
22
- },
23
- requestMediaLibraryPermissionsAsync: jest.fn(),
24
- requestCameraPermissionsAsync: jest.fn(),
25
- launchImageLibraryAsync: jest.fn(),
26
- launchCameraAsync: jest.fn(),
27
- }));
28
- jest.mock("expo-image-manipulator", () => ({
29
- manipulateAsync: jest.fn(),
30
- SaveFormat: {
31
- JPEG: "jpeg",
32
- },
33
- }));
34
14
 
35
15
  jest.mock("react-native-safe-area-context", () => ({
36
16
  SafeAreaProvider: ({ children }) => children,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "8.14.0-beta.3",
3
+ "version": "8.14.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": "false",
@@ -10,7 +10,9 @@
10
10
  "serve": "sty-psp serve",
11
11
  "format": "prettier --write .",
12
12
  "lint": "eslint --fix .",
13
- "test": "jest"
13
+ "test": "jest",
14
+ "cypress": "METRO_PORT=8084 WEB_PORT=19004 start-server-and-test dev 19004 'cypress run'",
15
+ "cypress:open": "METRO_PORT=8084 WEB_PORT=19004 start-server-and-test dev 19004 'cypress open'"
14
16
  },
15
17
  "dependencies": {
16
18
  "@lookiero/messaging": "^8.1.1",
@@ -32,10 +34,12 @@
32
34
  "@lookiero/sty-psp-uuid": "^0.1",
33
35
  "@react-native-async-storage/async-storage": "^1.22.3",
34
36
  "@react-spring/native": "9.6.1",
35
- "react-native-svg": "^13.4.0",
37
+ "react-native-keyboard-aware-scroll-view": "^0.9.5",
38
+ "react-native-svg": ">=13.6.0",
36
39
  "tiny-invariant": "^1.3.1"
37
40
  },
38
41
  "devDependencies": {
42
+ "@cypress/webpack-preprocessor": "^6.0.2",
39
43
  "@lookiero/eslint-config-sty-psp": "*",
40
44
  "@lookiero/event": "^0.3",
41
45
  "@lookiero/payments-front": "5.0.1",
@@ -43,13 +47,10 @@
43
47
  "@lookiero/sty-psp-prettier-config": "*",
44
48
  "@lookiero/sty-psp-scripts": "*",
45
49
  "@lookiero/sty-psp-typescript": "*",
46
- "@lookiero/testing-library-e2e-native": "1.0.41",
47
- "@pact-foundation/pact": "^10.1.4",
48
- "@pact-foundation/pact-node": "^10.17.6",
49
50
  "@remix-run/router": ">=1.10",
50
51
  "@testing-library/react-native": ">=12",
51
52
  "@types/jest-when": ">=3",
52
- "@wdio/globals": "^8.23.0",
53
+ "cypress": "^13.14.2",
53
54
  "apollo-boost": "0.4.4",
54
55
  "buffer": "5.6.0",
55
56
  "jest-mock-extended": ">=3",
package/src/ExpoRoot.tsx CHANGED
@@ -33,7 +33,7 @@ const order: Order = {
33
33
  };
34
34
 
35
35
  const customer: Customer = {
36
- customerId: "caa609aa-437c-487a-b2f5-f8037fdfb029",
36
+ customerId: "74cb4f76-3f14-4983-81a6-2ee2a9a275d4",
37
37
  country: Country.ES,
38
38
  segment: Segment.WOMEN,
39
39
  };
@@ -48,7 +48,7 @@ const sentryConfig: SentryEnvironment = {
48
48
  const apiUrl =
49
49
  Platform.OS !== "web" ? "https://web2.sp.dev.aws.lookiero.es/quiz/api" : __DEV__ ? "/local-to-dev" : "/checkout/api";
50
50
  const authToken =
51
- "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjUzNzc0NzMsImV4cCI6MTcyNzUyMDA0NywiZGlzcGxheU5hbWUiOiJBbGV4YW5kZXIiLCJjb3VudHJ5X2NvZGUiOiJFUyIsImFjY2Vzc1ZpYSI6ImVtYWlsIiwic3Vic2NyaXB0aW9uU3RhcnRpbmdEYXRlIjoiMjAyNC0wOC0yNiIsImltcGVyc29uYXRlZCI6ZmFsc2UsInV1aWQiOiJjYWE2MDlhYS00MzdjLTQ4N2EtYjJmNS1mODAzN2ZkZmIwMjkiLCJpYXQiOjE3MjQ4NDE2NDd9.qDSpZGFDac-5iXVacM5j79ejkSra3ePpECl750kRJfc";
51
+ "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjU2NDg3OTAsImV4cCI6MTczNDAwNTE4MywiZGlzcGxheU5hbWUiOiJUZXN0aW5nIiwiY291bnRyeV9jb2RlIjoiRVMiLCJhY2Nlc3NWaWEiOiJlbWFpbCIsInN1YnNjcmlwdGlvblN0YXJ0aW5nRGF0ZSI6IjIwMjQtMTEtMDgiLCJpbXBlcnNvbmF0ZWQiOmZhbHNlLCJ1dWlkIjoiNzRjYjRmNzYtM2YxNC00OTgzLTgxYTYtMmVlMmE5YTI3NWQ0IiwiaWF0IjoxNzMxNDEzMTgzfQ.KU6RhR19P6FhbH-lad-Hyx2PP1pv25GaDiE2txK9LMI";
52
52
  const getAuthToken = () => Promise.resolve(authToken);
53
53
 
54
54
  const externalTranslationsUrl =
@@ -36,7 +36,7 @@ describe("useUpdateUiSetting integration hook", () => {
36
36
  const [, status] = result.current;
37
37
  expect(status).toBe(CommandStatus.SUCCESS);
38
38
  });
39
- });
39
+ }, 10000);
40
40
 
41
41
  it("calls logger.captureException when 'update' fails", async () => {
42
42
  const error = new Error("Some error");
@@ -27,7 +27,7 @@ const useViewPaymentFlowPayloadByCheckoutId: UseViewPaymentFlowPayloadByCheckout
27
27
  query: viewPaymentFlowPayloadByCheckoutId({ checkoutId: checkoutId as string }),
28
28
  contextId: MESSAGING_CONTEXT_ID,
29
29
  invalidation: shouldInvalidate,
30
- options: { refetchOnMount: "always", enabled: Boolean(checkoutId), cacheTime: 0 },
30
+ options: { refetchOnMount: "always", enabled: Boolean(checkoutId), cacheTime: 0, refetchOnWindowFocus: false },
31
31
  });
32
32
 
33
33
  export { useViewPaymentFlowPayloadByCheckoutId };
@@ -4,18 +4,13 @@ import {
4
4
  listReturnQuestionsByCheckoutItemIdHandler,
5
5
  LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID,
6
6
  } from "../../../../projection/returnQuestion/listReturnQuestionsByCheckoutItemId";
7
- import { ReturnQuestionProjection, ReturnQuestionType } from "../../../../projection/returnQuestion/returnQuestion";
8
7
  import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
8
+ import { returnQuestions } from "../returnQuestions.mock";
9
9
  import { useListReturnQuestionsByCheckoutItemId as sut } from "./useListReturnQuestionsByCheckoutItemId";
10
10
 
11
11
  const checkoutItemId = "29790d24-b139-4ab8-b618-d796d101e974";
12
- const returnQuestionProjection: ReturnQuestionProjection = {
13
- id: "efe07b97-f6fb-4b6a-ba92-b68519320b2c",
14
- name: "main_title",
15
- placeholder: "",
16
- type: ReturnQuestionType.HOST_DEFAULT,
17
- };
18
- const view = jest.fn().mockReturnValue(returnQuestionProjection);
12
+
13
+ const view = jest.fn().mockReturnValue(returnQuestions);
19
14
  const { Component: Messaging } = bootstrap({ id: MESSAGING_CONTEXT_ID })
20
15
  .query(LIST_RETURN_QUESTIONS_BY_CHECKOUT_ITEM_ID, listReturnQuestionsByCheckoutItemIdHandler, { view })
21
16
  .build();
@@ -27,7 +22,7 @@ describe("useListReturnQuestionsByCheckoutItemId integration hook", () => {
27
22
  await waitFor(() => {
28
23
  const [projection, status] = result.current;
29
24
 
30
- expect(projection).toStrictEqual(returnQuestionProjection);
25
+ expect(projection).toStrictEqual(returnQuestions);
31
26
  expect(status).toBe(QueryStatus.SUCCESS);
32
27
  });
33
28
  });