@lookiero/checkout 10.0.0-beta.2 → 10.0.0-beta.3

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 (229) hide show
  1. package/dist/index.js +2 -1
  2. package/dist/src/ExpoRoot.js +3 -2
  3. package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.js +2 -1
  4. package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.style.js +3 -2
  5. package/dist/src/infrastructure/ui/components/atoms/price/Price.js +3 -0
  6. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +7 -3
  7. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.d.ts +18 -2
  8. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.js +14 -2
  9. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.js +2 -1
  10. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.js +2 -1
  11. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.js +4 -3
  12. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.d.ts +0 -1
  13. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.js +0 -1
  14. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +3 -3
  15. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.js +3 -2
  16. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +4 -4
  17. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +3 -2
  18. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +3 -2
  19. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +2 -1
  20. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +5 -4
  21. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +6 -6
  22. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +4 -3
  23. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.d.ts +0 -1
  24. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.js +0 -1
  25. package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js +2 -2
  26. package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js +2 -2
  27. package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.js +2 -2
  28. package/dist/src/infrastructure/ui/hooks/useCheckoutFlow.js +9 -9
  29. package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.d.ts +1 -1
  30. package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.js +55 -22
  31. package/dist/src/infrastructure/ui/i18n/i18n.d.ts +2 -1
  32. package/dist/src/infrastructure/ui/i18n/i18n.js +2 -1
  33. package/dist/src/infrastructure/ui/test/render.js +4 -2
  34. package/dist/src/infrastructure/ui/views/App.js +2 -1
  35. package/dist/src/infrastructure/ui/views/checkout/Checkout.js +3 -3
  36. package/dist/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.js +16 -16
  37. package/dist/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.js +2 -2
  38. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.js +2 -2
  39. package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.js +3 -3
  40. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +11 -5
  41. package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.js +4 -4
  42. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +3 -3
  43. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.d.ts +1 -0
  44. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +2 -1
  45. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +2 -2
  46. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +4 -4
  47. package/dist/src/infrastructure/ui/views/return/components/price/Price.js +3 -0
  48. package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +3 -3
  49. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +4 -4
  50. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +1 -0
  51. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.js +2 -1
  52. package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +4 -4
  53. package/dist/src/infrastructure/ui/views/summary/Summary.js +4 -4
  54. package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +3 -2
  55. package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +8 -6
  56. package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.js +5 -5
  57. package/dist/src/version.d.ts +1 -1
  58. package/dist/src/version.js +1 -1
  59. package/index.ts +2 -1
  60. package/jest.config.js +2 -2
  61. package/package.json +7 -8
  62. package/src/ExpoRoot.tsx +3 -2
  63. package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.style.ts +3 -2
  64. package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.tsx +3 -2
  65. package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/__snapshots__/FiveItemsDiscountBanner.test.tsx.snap +1 -1
  66. package/src/infrastructure/ui/components/atoms/price/Price.tsx +3 -0
  67. package/src/infrastructure/ui/components/atoms/price/__snapshots__/Price.test.tsx.snap +3 -3
  68. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.ts +25 -4
  69. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.tsx +13 -7
  70. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.tsx +2 -1
  71. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.tsx +2 -1
  72. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.ts +0 -1
  73. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.tsx +4 -2
  74. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.tsx +3 -3
  75. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.tsx +3 -2
  76. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +5 -5
  77. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +3 -2
  78. package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +3 -2
  79. package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.tsx +2 -1
  80. package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +6 -5
  81. package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.tsx +7 -7
  82. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.ts +0 -1
  83. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +4 -2
  84. package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.tsx +2 -2
  85. package/src/infrastructure/ui/components/templates/header/checkoutHeader/__snapshots__/CheckoutHeader.test.tsx.snap +1 -1
  86. package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx +2 -2
  87. package/src/infrastructure/ui/components/templates/header/itemDetailHeader/__snapshots__/ItemDetailHeader.test.tsx.snap +1 -1
  88. package/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.tsx +2 -2
  89. package/src/infrastructure/ui/components/templates/header/itemHeader/__snapshots__/ItemHeader.test.tsx.snap +1 -1
  90. package/src/infrastructure/ui/hooks/useCheckoutFlow.test.tsx +302 -0
  91. package/src/infrastructure/ui/hooks/useCheckoutFlow.tsx +9 -9
  92. package/src/infrastructure/ui/i18n/i18n.ts +3 -1
  93. package/src/infrastructure/ui/test/render.tsx +6 -3
  94. package/src/infrastructure/ui/views/App.tsx +2 -1
  95. package/src/infrastructure/ui/views/checkout/Checkout.test.tsx +51 -40
  96. package/src/infrastructure/ui/views/checkout/Checkout.tsx +3 -3
  97. package/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.tsx +2 -2
  98. package/src/infrastructure/ui/views/checkout/components/deliveryBanner/__snapshots__/DeliveryBanner.test.tsx.snap +1 -1
  99. package/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.tsx +2 -2
  100. package/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.tsx +3 -3
  101. package/src/infrastructure/ui/views/item/components/banner/__snapshots__/CustomerDecissionBanner.test.tsx.snap +3 -3
  102. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +11 -5
  103. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +160 -88
  104. package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +4 -4
  105. package/src/infrastructure/ui/views/item/components/itemActions/__snapshots__/ItemActions.test.tsx.snap +244 -128
  106. package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.ts +2 -1
  107. package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +3 -3
  108. package/src/infrastructure/ui/views/item/components/productVariantDescription/__snapshots__/ProductVariantDescription.test.tsx.snap +10 -8
  109. package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +30 -30
  110. package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +2 -2
  111. package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +1 -1
  112. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +4 -4
  113. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +75 -41
  114. package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +105 -102
  115. package/src/infrastructure/ui/views/return/components/price/Price.tsx +3 -0
  116. package/src/infrastructure/ui/views/return/components/price/__snapshots__/Price.test.tsx.snap +3 -3
  117. package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +3 -3
  118. package/src/infrastructure/ui/views/return/components/productVariantPreview/__snapshots__/ProductVariantPreview.test.tsx.snap +1 -1
  119. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.ts +2 -1
  120. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +4 -4
  121. package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +4 -4
  122. package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +30 -30
  123. package/src/infrastructure/ui/views/summary/Summary.tsx +4 -4
  124. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +3 -2
  125. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +154 -82
  126. package/src/infrastructure/ui/views/summary/components/pricing/Pricing.tsx +8 -6
  127. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +5 -5
  128. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +62 -62
  129. package/dist/pact.config.d.ts +0 -21
  130. package/dist/pact.config.js +0 -16
  131. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.d.ts +0 -1
  132. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +0 -55
  133. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.d.ts +0 -1
  134. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +0 -116
  135. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.d.ts +0 -1
  136. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +0 -56
  137. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.d.ts +0 -1
  138. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +0 -51
  139. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.d.ts +0 -1
  140. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +0 -51
  141. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.d.ts +0 -1
  142. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +0 -51
  143. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +0 -13
  144. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +0 -19
  145. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.d.ts +0 -1
  146. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +0 -56
  147. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.d.ts +0 -1
  148. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +0 -57
  149. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.d.ts +0 -1
  150. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +0 -55
  151. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.d.ts +0 -1
  152. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +0 -120
  153. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.d.ts +0 -1
  154. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +0 -55
  155. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.d.ts +0 -1
  156. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +0 -55
  157. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +0 -22
  158. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +0 -1
  159. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +0 -7
  160. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +0 -5
  161. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +0 -7
  162. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +0 -6
  163. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +0 -4
  164. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +0 -20
  165. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +0 -4
  166. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +0 -43
  167. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +0 -12
  168. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +0 -14
  169. package/dist/src/infrastructure/ui/components/templates/footer/Footer.d.ts +0 -3
  170. package/dist/src/infrastructure/ui/components/templates/footer/Footer.js +0 -13
  171. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +0 -7
  172. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +0 -21
  173. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +0 -8
  174. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +0 -12
  175. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +0 -12
  176. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +0 -64
  177. package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +0 -10
  178. package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +0 -17
  179. package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +0 -20
  180. package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +0 -27
  181. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +0 -10
  182. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +0 -27
  183. package/dist/src/infrastructure/ui/views/App.style.d.ts +0 -6
  184. package/dist/src/infrastructure/ui/views/App.style.js +0 -8
  185. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +0 -7
  186. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +0 -11
  187. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -12
  188. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +0 -64
  189. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +0 -12
  190. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +0 -16
  191. package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +0 -40
  192. package/dist/src/infrastructure/ui/views/return/Return.style.js +0 -44
  193. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -14
  194. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +0 -28
  195. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +0 -7
  196. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +0 -11
  197. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +0 -26
  198. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +0 -21
  199. package/dist/src/projection/shared/country.d.ts +0 -14
  200. package/dist/src/projection/shared/country.js +0 -15
  201. package/dist/src/projection/shared/customer.d.ts +0 -9
  202. package/dist/src/projection/shared/customer.js +0 -1
  203. package/dist/src/projection/shared/locale.d.ts +0 -12
  204. package/dist/src/projection/shared/locale.js +0 -13
  205. package/dist/src/projection/shared/order.d.ts +0 -6
  206. package/dist/src/projection/shared/order.js +0 -1
  207. package/dist/src/projection/shared/price.d.ts +0 -11
  208. package/dist/src/projection/shared/price.js +0 -1
  209. package/dist/src/projection/shared/size.d.ts +0 -21
  210. package/dist/src/projection/shared/size.js +0 -4
  211. package/dist/src/projection/shared/subscription.d.ts +0 -2
  212. package/dist/src/projection/shared/subscription.js +0 -1
  213. package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.d.ts +0 -15
  214. package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.js +0 -16
  215. package/dist/src/shared/ui/components/atoms/error/Error.d.ts +0 -11
  216. package/dist/src/shared/ui/components/atoms/error/Error.js +0 -6
  217. package/dist/src/shared/ui/components/atoms/field/Field.d.ts +0 -14
  218. package/dist/src/shared/ui/components/atoms/field/Field.js +0 -29
  219. package/dist/src/shared/ui/components/atoms/field/Field.style.d.ts +0 -16
  220. package/dist/src/shared/ui/components/atoms/field/Field.style.js +0 -19
  221. package/dist/src/shared/ui/components/molecules/inputField/InputField.d.ts +0 -24
  222. package/dist/src/shared/ui/components/molecules/inputField/InputField.js +0 -28
  223. package/dist/src/shared/ui/components/molecules/inputField/InputField.style.d.ts +0 -29
  224. package/dist/src/shared/ui/components/molecules/inputField/InputField.style.js +0 -37
  225. package/src/infrastructure/ui/components/templates/footer/Footer.test.tsx +0 -15
  226. package/src/infrastructure/ui/components/templates/footer/Footer.tsx +0 -19
  227. package/src/infrastructure/ui/components/templates/footer/__snapshots__/Footer.test.tsx.snap +0 -1127
  228. package/src/infrastructure/ui/hooks/useCheckoutFlow.test.ts +0 -297
  229. package/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.test.tsx +0 -126
package/dist/index.js CHANGED
@@ -5,12 +5,13 @@ import { Segment } from "@lookiero/sty-psp-segment";
5
5
  import { CheckoutStatus } from "./src/domain/checkout/model/checkout";
6
6
  import { bootstrap as checkoutBootstrap } from "./src/infrastructure/delivery/bootstrap";
7
7
  import { root } from "./src/infrastructure/ui/Root";
8
+ import { DOMAIN } from "./src/infrastructure/ui/i18n/i18n";
8
9
  import { viewFirstAvailableCheckoutByCustomerId } from "./src/projection/checkout/viewFirstAvailableCheckoutByCustomerId";
9
10
  const bootstrap = ({ apiUrl, getAuthToken, translations, sentry, kameleoon }) => {
10
11
  const { Component: Messaging, queryBus } = checkoutBootstrap({ apiUrl, getAuthToken });
11
12
  const I18n = i18n({
12
13
  fetchTranslation: fetchTranslations({ translations }),
13
- contextId: "CheckoutI18n",
14
+ domain: DOMAIN,
14
15
  });
15
16
  const firstAvailableCheckoutByCustomerId = ({ customerId }) => queryBus(viewFirstAvailableCheckoutByCustomerId({ customerId: customerId }));
16
17
  return {
@@ -15,6 +15,7 @@ import { DummyLayout } from "@lookiero/sty-psp-ui";
15
15
  import { bootstrap as checkoutBootstrap } from "./infrastructure/delivery/bootstrap";
16
16
  import { bootstrap as checkoutMockBootstrap } from "./infrastructure/delivery/bootstrap.mock";
17
17
  import { root } from "./infrastructure/ui/Root";
18
+ import { DOMAIN } from "./infrastructure/ui/i18n/i18n";
18
19
  import { Router } from "./infrastructure/ui/routing/router/Router";
19
20
  import { VERSION } from "./version";
20
21
  const locale = Locale.es_ES;
@@ -52,7 +53,7 @@ const externalTranslationsUrl = Platform.OS !== "web"
52
53
  const translations = [
53
54
  (locale) => translationExternalEndpoint({
54
55
  translationsUrl: externalTranslationsUrl,
55
- projects: [["user-area-front"], ["inventory-catalog", "feature;feature_value;Color"], ["checkout"]],
56
+ projects: [["checkout"]],
56
57
  })(locale),
57
58
  ];
58
59
  const useRedirect = () => ({
@@ -88,7 +89,7 @@ const { Component: Messaging, queryBus } = process.env.EXPO_PUBLIC_APP_VARIANT =
88
89
  : checkoutBootstrap({ apiUrl: () => apiUrl, getAuthToken });
89
90
  const I18n = i18n({
90
91
  fetchTranslation: fetchTranslations({ translations }),
91
- contextId: "CheckoutI18n",
92
+ domain: DOMAIN,
92
93
  });
93
94
  const Root = root({
94
95
  Messaging,
@@ -1,10 +1,11 @@
1
1
  import React from "react";
2
2
  import { ALIGN, DISPLAY, InfoBox, INFOBOX_TYPE, Text } from "@lookiero/aurora";
3
3
  import { useI18nMessage } from "@lookiero/i18n-react";
4
- import { I18nMessages } from "../../../i18n/i18n";
4
+ import { DOMAIN, I18nMessages } from "../../../i18n/i18n";
5
5
  import { style } from "./FiveItemsDiscountBanner.style";
6
6
  const FiveItemsDiscountBanner = ({ fiveItemsDiscount }) => {
7
7
  const bannerText = useI18nMessage({
8
+ domain: DOMAIN,
8
9
  id: I18nMessages.BANNER_DISCOUNT_TEXT,
9
10
  values: {
10
11
  discount: fiveItemsDiscount.toString(),
@@ -1,8 +1,9 @@
1
1
  import { StyleSheet } from "react-native";
2
- // TODO: get the font family from Aurora
2
+ import { theme } from "@lookiero/sty-psp-ui";
3
+ const { fontMap } = theme();
3
4
  const style = StyleSheet.create({
4
5
  textBold: {
5
- fontFamily: "AreaNormal-Extrabold",
6
+ fontFamily: fontMap.Action,
6
7
  },
7
8
  });
8
9
  export { style };
@@ -2,6 +2,7 @@ import React from "react";
2
2
  import { View } from "react-native";
3
3
  import { Text } from "@lookiero/aurora";
4
4
  import { useI18nNumber } from "@lookiero/i18n-react";
5
+ import { DOMAIN } from "../../../i18n/i18n";
5
6
  import { style } from "./Price.style";
6
7
  const PRICE_VARIANT = {
7
8
  default: { detail: true, level: 1 },
@@ -12,11 +13,13 @@ const PRICE_VARIANT = {
12
13
  const Price = ({ price, variant = "default", withPercentage = false }) => {
13
14
  const isDiscounted = price.discountedPrice && price.discountedPrice.percentage > 0;
14
15
  const productPrice = useI18nNumber({
16
+ domain: DOMAIN,
15
17
  value: price.amount / 100,
16
18
  style: "currency",
17
19
  currency: price.currency,
18
20
  });
19
21
  const productDiscountedPrice = useI18nNumber({
22
+ domain: DOMAIN,
20
23
  value: (price.discountedPrice?.amount || 0) / 100,
21
24
  style: "currency",
22
25
  currency: price.currency,
@@ -1,12 +1,16 @@
1
1
  import React, { useCallback } from "react";
2
- import { Button, BUTTON_VARIANT } from "@lookiero/aurora";
2
+ import { TouchableOpacity } from "react-native";
3
+ import { ALIGN, Text } from "@lookiero/aurora";
3
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
+ import { DOMAIN } from "../../../../../i18n/i18n";
4
6
  import { useCheckoutQuestionFeedbackForId } from "../../behaviors/useCheckoutQuestionFeedback";
5
7
  import { style } from "./ButtonCheckoutQuestionItem.style";
8
+ const ACTIVE_OPACITY = 0.6;
6
9
  const ButtonCheckoutQuestionItem = ({ checkoutQuestion, checkoutQuestionParentId, testID, }) => {
7
10
  const { feedback, onChange } = useCheckoutQuestionFeedbackForId({ id: checkoutQuestionParentId });
8
- const optionText = useI18nMessage({ id: checkoutQuestion.name });
11
+ const optionText = useI18nMessage({ domain: DOMAIN, id: checkoutQuestion.name });
9
12
  const handleOnPress = useCallback(() => onChange({ checkoutQuestionId: checkoutQuestionParentId, checkoutQuestionFeedback: checkoutQuestion.id }), [onChange, checkoutQuestion.id, checkoutQuestionParentId]);
10
- return (React.createElement(Button, { accessibilityLabel: testID, style: style.button, testID: testID, variant: feedback === checkoutQuestion.id ? BUTTON_VARIANT.PRIMARY : BUTTON_VARIANT.SECONDARY, onPress: handleOnPress }, optionText));
13
+ return (React.createElement(TouchableOpacity, { accessibilityLabel: testID, activeOpacity: ACTIVE_OPACITY, style: [style.button, feedback === checkoutQuestion.id && style.buttonActive], testID: testID, onPress: handleOnPress },
14
+ React.createElement(Text, { align: ALIGN.CENTER, level: 3, style: feedback === checkoutQuestion.id && style.textActive, action: true }, optionText)));
11
15
  };
12
16
  export { ButtonCheckoutQuestionItem };
@@ -1,5 +1,21 @@
1
- import { ViewStyle } from "react-native";
2
1
  declare const style: {
3
- button: ViewStyle;
2
+ button: {
3
+ alignContent: "center";
4
+ borderColor: string;
5
+ borderRadius: number;
6
+ borderWidth: number;
7
+ flex: number;
8
+ height: number;
9
+ justifyContent: "center";
10
+ marginHorizontal: number;
11
+ paddingLeft: number;
12
+ paddingRight: number;
13
+ };
14
+ buttonActive: {
15
+ backgroundColor: string;
16
+ };
17
+ textActive: {
18
+ color: string;
19
+ };
4
20
  };
5
21
  export { style };
@@ -1,13 +1,25 @@
1
1
  import { StyleSheet } from "react-native";
2
2
  import { theme } from "@lookiero/sty-psp-ui";
3
- const { colorBorderActionSecondary, borderWidth2, borderStyle } = theme();
3
+ const { colorBorderActionSecondary, colorBgActionPrimaryActive, colorTextActionPrimary, borderWidth2, borderRadiusFull, space6, space16, } = theme();
4
+ const HEIGHT = space16;
4
5
  const style = StyleSheet.create({
5
6
  button: {
7
+ alignContent: "center",
6
8
  borderColor: colorBorderActionSecondary,
7
- borderStyle: borderStyle,
9
+ borderRadius: borderRadiusFull,
8
10
  borderWidth: borderWidth2,
9
11
  flex: 1,
12
+ height: HEIGHT,
13
+ justifyContent: "center",
10
14
  marginHorizontal: 12,
15
+ paddingLeft: space6,
16
+ paddingRight: space6,
17
+ },
18
+ buttonActive: {
19
+ backgroundColor: colorBgActionPrimaryActive,
20
+ },
21
+ textActive: {
22
+ color: colorTextActionPrimary,
11
23
  },
12
24
  });
13
25
  export { style };
@@ -2,9 +2,10 @@ import React from "react";
2
2
  import { View } from "react-native";
3
3
  import { Text } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
+ import { DOMAIN } from "../../../../../i18n/i18n";
5
6
  import { style } from "./HostDefaultCheckoutQuestionItem.style";
6
7
  const HostDefaultCheckoutQuestionItem = ({ checkoutQuestion, children, }) => {
7
- const titleText = useI18nMessage({ id: checkoutQuestion.name });
8
+ const titleText = useI18nMessage({ domain: DOMAIN, id: checkoutQuestion.name });
8
9
  return (React.createElement(React.Fragment, null,
9
10
  React.createElement(Text, { level: 3, style: style.title }, titleText),
10
11
  React.createElement(View, { style: style.content }, children)));
@@ -2,9 +2,10 @@ import React from "react";
2
2
  import { View } from "react-native";
3
3
  import { Text } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
+ import { DOMAIN } from "../../../../../i18n/i18n";
5
6
  import { style } from "./HostSelectCheckoutQuestionItem.style";
6
7
  const HostSelectCheckoutQuestionItem = ({ checkoutQuestion, children, }) => {
7
- const titleText = useI18nMessage({ id: checkoutQuestion.name });
8
+ const titleText = useI18nMessage({ domain: DOMAIN, id: checkoutQuestion.name });
8
9
  return (React.createElement(React.Fragment, null,
9
10
  React.createElement(Text, { level: 3, style: style.title }, titleText),
10
11
  React.createElement(View, { style: style.content }, children)));
@@ -1,14 +1,15 @@
1
1
  import React, { useCallback, useMemo } from "react";
2
- import { useIntl } from "@lookiero/i18n-react";
2
+ import { useI18n } from "@lookiero/i18n-react";
3
3
  import { InputField, TextInput } from "@lookiero/sty-psp-ui";
4
+ import { DOMAIN } from "../../../../../i18n/i18n";
4
5
  import { useCheckoutQuestionFeedbackForId } from "../../behaviors/useCheckoutQuestionFeedback";
5
6
  import { style } from "./TextareaCheckoutQuestionItem.style";
6
7
  const TextareaCheckoutQuestionItem = ({ checkoutQuestion, checkoutQuestionParentId, testID, }) => {
7
- const { formatMessage } = useIntl();
8
+ const { formatMessage } = useI18n({ domain: DOMAIN });
8
9
  const placeholderText = useMemo(() => (checkoutQuestion.placeholder ? formatMessage({ id: checkoutQuestion.placeholder }) : ""), [formatMessage, checkoutQuestion.placeholder]);
9
10
  const { feedback, onChange } = useCheckoutQuestionFeedbackForId({ id: checkoutQuestionParentId });
10
11
  const handleOnChange = useCallback((value) => onChange({ checkoutQuestionId: checkoutQuestionParentId, checkoutQuestionFeedback: value }), [onChange, checkoutQuestionParentId]);
11
- return (React.createElement(InputField, { label: placeholderText, value: feedback, input: ({ onBlur, onFocus, style }) => (React.createElement(TextInput, { placeholder: placeholderText, style: style, testID: testID, value: feedback, multiline: true, onBlur: onBlur, onChange: handleOnChange, onFocus: onFocus })), style: {
12
+ return (React.createElement(InputField, { label: placeholderText, value: feedback, input: ({ onBlur, onFocus, style }) => (React.createElement(TextInput, { placeholder: placeholderText, style: style, testID: testID, textAlignVertical: "top", value: feedback, multiline: true, onBlur: onBlur, onChange: handleOnChange, onFocus: onFocus })), style: {
12
13
  inputField: style.inputField,
13
14
  input: { container: style.inputContainer, input: style.input },
14
15
  } }));
@@ -1,7 +1,6 @@
1
1
  declare const style: {
2
2
  input: {
3
3
  paddingTop: number;
4
- height?: "auto" | undefined;
5
4
  };
6
5
  inputContainer: {
7
6
  alignItems?: "flex-start" | undefined;
@@ -8,7 +8,6 @@ const style = StyleSheet.create({
8
8
  ...Platform.select({
9
9
  android: {
10
10
  paddingTop: space2,
11
- height: "auto",
12
11
  },
13
12
  }),
14
13
  },
@@ -1,12 +1,12 @@
1
1
  /* eslint-disable react/prop-types */
2
2
  import React from "react";
3
3
  import { Text, View } from "@lookiero/aurora";
4
- import { useIntl } from "@lookiero/i18n-react";
4
+ import { useI18n } from "@lookiero/i18n-react";
5
5
  import { returnQuestionWithTranslationKey } from "../../../../../../../projection/returnQuestion/returnQuestion.typeguard";
6
- import { I18nMessages } from "../../../../../i18n/i18n";
6
+ import { DOMAIN, I18nMessages } from "../../../../../i18n/i18n";
7
7
  import { style } from "./HostDefaultReturnQuestionItem.style";
8
8
  const HostDefaultReturnQuestionItem = ({ returnQuestion, children, }) => {
9
- const { formatMessage } = useIntl();
9
+ const { formatMessage } = useI18n({ domain: DOMAIN });
10
10
  const isAllOptions = returnQuestion.translationKey === I18nMessages.RETURN_QUESTION_MAIN_ALL_OPINION;
11
11
  return (React.createElement(React.Fragment, null,
12
12
  returnQuestionWithTranslationKey(returnQuestion) && returnQuestion.translationKey !== " " && !isAllOptions ? (React.createElement(View, { style: style.title },
@@ -2,10 +2,11 @@
2
2
  import React, { useMemo } from "react";
3
3
  import { View } from "react-native";
4
4
  import { Text } from "@lookiero/aurora";
5
- import { useIntl } from "@lookiero/i18n-react";
5
+ import { useI18n } from "@lookiero/i18n-react";
6
+ import { DOMAIN } from "../../../../../i18n/i18n";
6
7
  import { style } from "./HostRadioGroupReturnQuestionItem.style";
7
8
  const HostRadioGroupReturnQuestionItem = ({ returnQuestion, children, testID, }) => {
8
- const { formatMessage } = useIntl();
9
+ const { formatMessage } = useI18n({ domain: DOMAIN });
9
10
  const placeholderText = useMemo(() => (returnQuestion.metadata.placeholder ? formatMessage({ id: returnQuestion.metadata.placeholder }) : ""), [formatMessage, returnQuestion.metadata.placeholder]);
10
11
  return (React.createElement(React.Fragment, null,
11
12
  React.createElement(View, { style: style.wrapper, testID: testID },
@@ -2,21 +2,21 @@
2
2
  import React, { useCallback, useEffect, useMemo, useState } from "react";
3
3
  import { TouchableHighlight, View } from "react-native";
4
4
  import { ButtonIcon } from "@lookiero/aurora";
5
- import { useIntl } from "@lookiero/i18n-react";
5
+ import { useI18n } from "@lookiero/i18n-react";
6
6
  import { InputField, Modal, TextInput } from "@lookiero/sty-psp-ui";
7
+ import { DOMAIN } from "../../../../../i18n/i18n";
7
8
  import { useReturnQuestionFeedback, useReturnQuestionFeedbackForReturnQuestion, } from "../../behaviors/useReturnQuestionFeedback";
8
9
  import { deepestReturnQuestionWithFeedbackForReturnQuestion, feedbackForReturnQuestion, } from "../../util/returnQuestionFeedback";
9
10
  import { style, containerUnderlayColor } from "./HostSelectReturnQuestionItem.style";
10
11
  const HostSelectReturnQuestionItem = ({ returnQuestion, children, portalHostName, testID, }) => {
11
- const { formatMessage } = useIntl();
12
+ const { formatMessage } = useI18n({ domain: DOMAIN });
12
13
  const placeholderText = useMemo(() => (returnQuestion.metadata.placeholder ? formatMessage({ id: returnQuestion.metadata.placeholder }) : ""), [formatMessage, returnQuestion.metadata.placeholder]);
13
14
  const [modalVisible, setModalVisible] = useState(false);
14
15
  const handleOnPress = useCallback(() => setModalVisible(true), []);
15
16
  const handleOnModalClose = useCallback(() => setModalVisible(false), []);
16
17
  const feedback = useReturnQuestionFeedback();
17
18
  const { onChange } = useReturnQuestionFeedbackForReturnQuestion({ returnQuestion });
18
- const intl = useIntl();
19
- const translate = useCallback((returnQuestionName) => intl.formatMessage({ id: returnQuestionName, defaultMessage: returnQuestionName }), [intl]);
19
+ const translate = useCallback((returnQuestionName) => formatMessage({ id: returnQuestionName, defaultMessage: returnQuestionName }), [formatMessage]);
20
20
  const inputValue = feedbackForReturnQuestion({ feedback, returnQuestion, translate }).join(" / ");
21
21
  const [deepestReturnQuestionWithFeedback, isLeaf] = deepestReturnQuestionWithFeedbackForReturnQuestion({
22
22
  feedback,
@@ -3,13 +3,14 @@ import React, { useCallback, useMemo } from "react";
3
3
  import { View } from "react-native";
4
4
  import Animated, { useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
5
5
  import { COLOR, Text } from "@lookiero/aurora";
6
- import { useIntl } from "@lookiero/i18n-react";
6
+ import { useI18n } from "@lookiero/i18n-react";
7
7
  import { returnQuestionHasChildren } from "../../../../../../../../projection/returnQuestion/returnQuestion.typeguard";
8
+ import { DOMAIN } from "../../../../../../i18n/i18n";
8
9
  import ReturnQuestion from "../../../ReturnQuestion";
9
10
  import { useReturnQuestionFeedbackForReturnQuestion } from "../../../behaviors/useReturnQuestionFeedback";
10
11
  import { style } from "./HostStackReturnQuestionItem.style";
11
12
  const HostStackReturnQuestionItem = ({ returnQuestion, children, portalHostName, }) => {
12
- const { formatMessage } = useIntl();
13
+ const { formatMessage } = useI18n({ domain: DOMAIN });
13
14
  const { feedback } = useReturnQuestionFeedbackForReturnQuestion({ returnQuestion });
14
15
  const feedbackReturnQuestion = feedback
15
16
  ? returnQuestion.children?.find((returnQuestion) => returnQuestion.id === feedback)
@@ -1,13 +1,14 @@
1
1
  import React from "react";
2
2
  import { View } from "react-native";
3
3
  import { COLOR, Text } from "@lookiero/aurora";
4
- import { useIntl } from "@lookiero/i18n-react";
4
+ import { useI18n } from "@lookiero/i18n-react";
5
5
  import { Modal } from "@lookiero/sty-psp-ui";
6
6
  import { returnQuestionHasChildren } from "../../../../../../../projection/returnQuestion/returnQuestion.typeguard";
7
+ import { DOMAIN } from "../../../../../i18n/i18n";
7
8
  import ReturnQuestion from "../../ReturnQuestion";
8
9
  import { style } from "./ModalOptionReturnQuestionItems.style";
9
10
  const ModalOptionReturnQuestionItems = ({ portalHostName, returnQuestion, visible, onClose, }) => {
10
- const { formatMessage } = useIntl();
11
+ const { formatMessage } = useI18n({ domain: DOMAIN });
11
12
  const title = formatMessage({ id: returnQuestion.translationKey });
12
13
  return (React.createElement(Modal, { portalHostName: portalHostName, visible: visible, scroll: true, showCloseButton: true, onClose: onClose },
13
14
  React.createElement(View, { style: style.modalContent },
@@ -3,11 +3,12 @@ import React, { useCallback } from "react";
3
3
  import { TouchableHighlight } from "react-native";
4
4
  import { Text } from "@lookiero/aurora";
5
5
  import { useI18nMessage } from "@lookiero/i18n-react";
6
+ import { DOMAIN } from "../../../../../i18n/i18n";
6
7
  import { useReturnQuestionFeedbackForReturnQuestion } from "../../behaviors/useReturnQuestionFeedback";
7
8
  import { containerUnderlayColor, style } from "./OptionReturnQuestionItem.style";
8
9
  const OptionReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID, }) => {
9
10
  const { onChange } = useReturnQuestionFeedbackForReturnQuestion({ returnQuestion: returnQuestionParent });
10
- const optionText = useI18nMessage({ id: returnQuestion.translationKey });
11
+ const optionText = useI18nMessage({ domain: DOMAIN, id: returnQuestion.translationKey });
11
12
  const handleOnPress = useCallback(() => onChange({ returnQuestionId: returnQuestionParent.id, returnQuestionFeedback: returnQuestion.id }), [onChange, returnQuestion.id, returnQuestionParent.id]);
12
13
  return (React.createElement(TouchableHighlight, { accessibilityLabel: testID, style: style.container, testID: testID, underlayColor: containerUnderlayColor, onPress: handleOnPress },
13
14
  React.createElement(Text, { level: 3, style: style.text }, optionText)));
@@ -1,19 +1,20 @@
1
1
  /* eslint-disable react/prop-types */
2
2
  import React, { useCallback, useEffect, useState } from "react";
3
3
  import { View, Option, OPTION_VARIANT, SIZE } from "@lookiero/aurora";
4
- import { useIntl } from "@lookiero/i18n-react";
4
+ import { useI18n } from "@lookiero/i18n-react";
5
+ import { DOMAIN } from "../../../../../i18n/i18n";
5
6
  import { useReturnQuestionFeedback, useReturnQuestionFeedbackForReturnQuestion, } from "../../behaviors/useReturnQuestionFeedback";
6
7
  import { deepestReturnQuestionWithFeedbackForReturnQuestion, feedbackForReturnQuestion, } from "../../util/returnQuestionFeedback";
7
8
  import { ModalOptionReturnQuestionItems } from "../modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems";
8
9
  import { style } from "./RadioReturnQuestionItem.style";
9
10
  const RadioReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID, portalHostName, }) => {
10
- const intl = useIntl();
11
+ const { formatMessage } = useI18n({ domain: DOMAIN });
11
12
  const [modalVisible, setModalVisible] = useState(false);
12
13
  const { feedback: feedbackId, onChange, clear, } = useReturnQuestionFeedbackForReturnQuestion({ returnQuestion: returnQuestionParent });
13
14
  const feedback = useReturnQuestionFeedback();
14
- const translate = useCallback((returnQuestionName) => intl.formatMessage({ id: returnQuestionName, defaultMessage: returnQuestionName }), [intl]);
15
+ const translate = useCallback((returnQuestionName) => formatMessage({ id: returnQuestionName, defaultMessage: returnQuestionName }), [formatMessage]);
15
16
  const inputValue = feedbackForReturnQuestion({ feedback, returnQuestion, translate }).join(" / ");
16
- const optionText = intl.formatMessage({ id: returnQuestion.translationKey });
17
+ const optionText = formatMessage({ id: returnQuestion.translationKey });
17
18
  const hasChildren = Boolean(returnQuestion.children && returnQuestion.children.length > 0);
18
19
  const handleOnModalClose = useCallback(() => {
19
20
  // Uncomment if we want to clear current selection (and update callback's dependencies)
@@ -2,17 +2,17 @@
2
2
  import React, { useCallback } from "react";
3
3
  import { View } from "react-native";
4
4
  import { Text } from "@lookiero/aurora";
5
- import { useI18nMessage, useIntl } from "@lookiero/i18n-react";
6
- import { I18nMessages } from "../../../../../i18n/i18n";
5
+ import { useI18nMessage, useI18n } from "@lookiero/i18n-react";
6
+ import { DOMAIN, I18nMessages } from "../../../../../i18n/i18n";
7
7
  import { useReturnQuestionFeedback } from "../../behaviors/useReturnQuestionFeedback";
8
8
  import { feedbackForReturnQuestion } from "../../util/returnQuestionFeedback";
9
9
  import { style } from "./ReturnQuestionFeedbackItem.style";
10
10
  const ReturnQuestionFeedbackItem = ({ returnQuestion }) => {
11
- const titleText = useI18nMessage({ id: returnQuestion.translationKey });
12
- const unansweredText = useI18nMessage({ id: I18nMessages.FEEDBACK_UNANSWERED });
11
+ const titleText = useI18nMessage({ domain: DOMAIN, id: returnQuestion.translationKey });
12
+ const unansweredText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.FEEDBACK_UNANSWERED });
13
13
  const returnQuestionFeedback = useReturnQuestionFeedback();
14
- const intl = useIntl();
15
- const translate = useCallback((returnQuestionName) => intl.formatMessage({ id: returnQuestionName, defaultMessage: returnQuestionName }), [intl]);
14
+ const { formatMessage } = useI18n({ domain: DOMAIN });
15
+ const translate = useCallback((returnQuestionName) => formatMessage({ id: returnQuestionName, defaultMessage: returnQuestionName }), [formatMessage]);
16
16
  const feedback = feedbackForReturnQuestion({ feedback: returnQuestionFeedback, returnQuestion, translate }).join(" / ");
17
17
  return (React.createElement(View, { style: style.container },
18
18
  React.createElement(Text, { level: 2, style: style.title, detailBold: true }, titleText),
@@ -1,17 +1,18 @@
1
1
  /* eslint-disable react/prop-types */
2
2
  import React, { useCallback, useMemo } from "react";
3
3
  import { View } from "@lookiero/aurora";
4
- import { useIntl } from "@lookiero/i18n-react";
4
+ import { useI18n } from "@lookiero/i18n-react";
5
5
  import { InputField, TextInput } from "@lookiero/sty-psp-ui";
6
+ import { DOMAIN } from "../../../../../i18n/i18n";
6
7
  import { useReturnQuestionFeedbackForReturnQuestion } from "../../behaviors/useReturnQuestionFeedback";
7
8
  import { style } from "./TextareaReturnQuestionItem.style";
8
9
  const TextareaReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID, }) => {
9
- const { formatMessage } = useIntl();
10
+ const { formatMessage } = useI18n({ domain: DOMAIN });
10
11
  const placeholderText = useMemo(() => (returnQuestion.metadata.placeholder ? formatMessage({ id: returnQuestion.metadata.placeholder }) : ""), [formatMessage, returnQuestion.metadata.placeholder]);
11
12
  const { feedback, onChange } = useReturnQuestionFeedbackForReturnQuestion({ returnQuestion: returnQuestionParent });
12
13
  const handleOnChange = useCallback((value) => onChange({ returnQuestionId: returnQuestionParent.id, returnQuestionFeedback: value }), [onChange, returnQuestionParent.id]);
13
14
  return (React.createElement(View, { style: style.wrapper, testID: "textarea-return-question-item" },
14
- React.createElement(InputField, { label: placeholderText, value: feedback, input: ({ onBlur, onFocus, style }) => (React.createElement(TextInput, { placeholder: placeholderText, style: style, testID: testID, value: feedback, multiline: true, onBlur: onBlur, onChange: handleOnChange, onFocus: onFocus })), style: {
15
+ React.createElement(InputField, { label: placeholderText, value: feedback, input: ({ onBlur, onFocus, style }) => (React.createElement(TextInput, { placeholder: placeholderText, style: style, testID: testID, textAlignVertical: "top", value: feedback, multiline: true, onBlur: onBlur, onChange: handleOnChange, onFocus: onFocus })), style: {
15
16
  inputField: style.inputField,
16
17
  input: { container: style.inputContainer, input: style.input },
17
18
  } })));
@@ -1,7 +1,6 @@
1
1
  declare const style: {
2
2
  input: {
3
3
  paddingTop: number;
4
- height?: "auto" | undefined;
5
4
  };
6
5
  inputContainer: {
7
6
  alignItems?: "flex-start" | undefined;
@@ -8,7 +8,6 @@ const style = StyleSheet.create({
8
8
  ...Platform.select({
9
9
  android: {
10
10
  paddingTop: space2,
11
- height: "auto",
12
11
  },
13
12
  }),
14
13
  },
@@ -1,12 +1,12 @@
1
1
  import React from "react";
2
2
  import { ButtonIcon, Text } from "@lookiero/aurora";
3
3
  import { useI18nMessage } from "@lookiero/i18n-react";
4
- import { I18nMessages } from "../../../../i18n/i18n";
4
+ import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
5
5
  import { Header } from "../Header";
6
6
  import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
7
7
  import { style } from "./CheckoutHeader.style";
8
8
  const CheckoutHeader = ({ onBack }) => {
9
- const title = useI18nMessage({ id: I18nMessages.HEADER_COMPLETE_CHECKOUT_TITLE });
9
+ const title = useI18nMessage({ domain: DOMAIN, id: I18nMessages.HEADER_COMPLETE_CHECKOUT_TITLE });
10
10
  return (React.createElement(Header, { testID: "checkout-header" },
11
11
  React.createElement(ButtonIcon, { name: "arrow_left", style: style.button, testID: "arrow-left-button-icon", onPress: onBack }),
12
12
  React.createElement(Text, { level: 3, action: true }, title),
@@ -1,12 +1,12 @@
1
1
  import React from "react";
2
2
  import { ButtonIcon, Text } from "@lookiero/aurora";
3
3
  import { useI18nMessage } from "@lookiero/i18n-react";
4
- import { I18nMessages } from "../../../../i18n/i18n";
4
+ import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
5
5
  import { Header } from "../Header";
6
6
  import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
7
7
  import { style } from "./ItemDetailHeader.style";
8
8
  const ItemDetailHeader = ({ onBack }) => {
9
- const title = useI18nMessage({ id: I18nMessages.HEADER_CHECKOUT_TITLE });
9
+ const title = useI18nMessage({ domain: DOMAIN, id: I18nMessages.HEADER_CHECKOUT_TITLE });
10
10
  return (React.createElement(Header, { testID: "item-detail-header" },
11
11
  React.createElement(ButtonIconPlaceholder, null),
12
12
  React.createElement(Text, { level: 3, action: true }, title),
@@ -3,13 +3,13 @@ import { generatePath, useNavigate } from "react-router-native";
3
3
  import { ButtonIcon, Text } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
5
  import { useStaticInfo } from "../../../../hooks/useStaticInfo";
6
- import { I18nMessages } from "../../../../i18n/i18n";
6
+ import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
7
7
  import { Routes } from "../../../../routing/routes";
8
8
  import { Header } from "../Header";
9
9
  import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
10
10
  import style from "./ItemHeader.style";
11
11
  const ItemHeader = ({ items, item, onNext, onPrevious }) => {
12
- const title = useI18nMessage({ id: I18nMessages.HEADER_CHECKOUT_TITLE });
12
+ const title = useI18nMessage({ domain: DOMAIN, id: I18nMessages.HEADER_CHECKOUT_TITLE });
13
13
  const itemIndex = items.indexOf(item);
14
14
  const isFirstItem = itemIndex === 0;
15
15
  const isLastItem = itemIndex === items.length - 1;
@@ -5,7 +5,7 @@ import { useLogger } from "@lookiero/sty-psp-logging";
5
5
  import { NotificationLevel, useCreateToastNotification } from "@lookiero/sty-psp-notifications";
6
6
  import { viewCheckoutBookingById, } from "../../../projection/checkoutBooking/viewCheckoutBookingById";
7
7
  import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
8
- import { useSubmitCheckout as useSubmitCheckoutCommand } from "../../domain/checkout/react/useSubmitCheckout";
8
+ import { useSubmitCheckout } from "../../domain/checkout/react/useSubmitCheckout";
9
9
  import { useBlockCheckoutBooking } from "../../domain/checkoutBooking/react/useBlockCheckoutBooking";
10
10
  import { useViewIsSizeChangeEnabledByCheckoutId } from "../../projection/checkout/react/useViewIsSizeChangeEnabledByCheckoutId";
11
11
  import { useViewPaymentFlowPayloadByCheckoutId } from "../../projection/payment/react/useViewPaymentFlowPayloadByCheckoutId";
@@ -29,7 +29,7 @@ const useCheckoutFlow = ({ checkout: checkoutProjection, order: orderProjection,
29
29
  checkoutId: checkoutProjection?.id,
30
30
  queryOptions: { refetchOnMount: true },
31
31
  });
32
- const [submitCheckoutCommand, submitCheckoutCommandStatus] = useSubmitCheckoutCommand({
32
+ const [submitCheckout, submitCheckoutStatus] = useSubmitCheckout({
33
33
  checkoutId: checkoutProjection?.id,
34
34
  logger,
35
35
  });
@@ -72,7 +72,7 @@ const useCheckoutFlow = ({ checkout: checkoutProjection, order: orderProjection,
72
72
  paymentFlowRef.current?.startLegacyBoxCheckout({
73
73
  ...paymentFlowPayload,
74
74
  userInformation: { email, name },
75
- returnUrl: `${basePath}/${Routes.CHECKOUT}?foo=bar`,
75
+ returnUrl: `${basePath}/${Routes.CHECKOUT}`,
76
76
  });
77
77
  }, [
78
78
  checkoutProjection?.checkoutBookingId,
@@ -86,14 +86,14 @@ const useCheckoutFlow = ({ checkout: checkoutProjection, order: orderProjection,
86
86
  ]);
87
87
  const onPaymentSuccess = useCallback(async () => {
88
88
  setStartLegacyBoxCheckoutStatus("success");
89
- await submitCheckoutCommand();
89
+ await submitCheckout();
90
90
  createNotification({
91
91
  bodyI18nKey: I18nMessages.CHECKOUT_TOAST_PAYMENT_SUCCESS,
92
92
  level: NotificationLevel.SUCCESS,
93
93
  });
94
94
  trackCheckout();
95
95
  onSuccess();
96
- }, [createNotification, onSuccess, submitCheckoutCommand, trackCheckout]);
96
+ }, [createNotification, onSuccess, submitCheckout, trackCheckout]);
97
97
  const onPaymentError = useCallback((payload) => {
98
98
  setStartLegacyBoxCheckoutStatus("error");
99
99
  createNotification({
@@ -105,22 +105,22 @@ const useCheckoutFlow = ({ checkout: checkoutProjection, order: orderProjection,
105
105
  const checkoutFlowStatus = useMemo(() => {
106
106
  if (blockCheckoutBookingStatus === CommandStatus.LOADING ||
107
107
  startLegacyBoxCheckoutStatus === "loading" ||
108
- submitCheckoutCommandStatus === CommandStatus.LOADING) {
108
+ submitCheckoutStatus === CommandStatus.LOADING) {
109
109
  return "loading";
110
110
  }
111
111
  if (blockCheckoutBookingStatus === CommandStatus.SUCCESS &&
112
112
  startLegacyBoxCheckoutStatus === "success" &&
113
- submitCheckoutCommandStatus === CommandStatus.SUCCESS) {
113
+ submitCheckoutStatus === CommandStatus.SUCCESS) {
114
114
  return "success";
115
115
  }
116
116
  if (blockCheckoutBookingStatus === CommandStatus.ERROR ||
117
117
  startLegacyBoxCheckoutStatus === "error" ||
118
- submitCheckoutCommandStatus === CommandStatus.ERROR ||
118
+ submitCheckoutStatus === CommandStatus.ERROR ||
119
119
  checkoutBookingExpired) {
120
120
  return "error";
121
121
  }
122
122
  return "idle";
123
- }, [blockCheckoutBookingStatus, startLegacyBoxCheckoutStatus, submitCheckoutCommandStatus, checkoutBookingExpired]);
123
+ }, [blockCheckoutBookingStatus, startLegacyBoxCheckoutStatus, submitCheckoutStatus, checkoutBookingExpired]);
124
124
  const paymentFlow = useMemo(() => (authToken ? React.createElement(PaymentFlow, { ref: paymentFlowRef, section: Section.BOX_CHECKOUT, token: authToken }) : null), [authToken]);
125
125
  return useMemo(() => [checkoutFlow, checkoutFlowStatus, paymentFlow], [checkoutFlow, paymentFlow, checkoutFlowStatus]);
126
126
  };
@@ -16,7 +16,7 @@ interface UseSubmitCheckoutFunctionArgs {
16
16
  readonly checkoutBookingId: string;
17
17
  readonly paymentFlowRef: RefObject<PaymentFlowRef>;
18
18
  readonly onError: () => void;
19
- readonly onSuccess: () => void;
19
+ readonly onSuccess?: () => void;
20
20
  readonly logger: Logger;
21
21
  }
22
22
  interface UseSubmitCheckoutFunction {