@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,52 +1,47 @@
1
- import { ReturnQuestionProjection, ReturnQuestionType } from "../../../projection/returnQuestion/returnQuestion";
1
+ import { ReturnQuestionProjection } from "../../../projection/returnQuestion/returnQuestion";
2
+ import { ReturnQuestionType } from "../../../projection/returnQuestion/returnQuestion.constants";
2
3
 
3
4
  const returnQuestions: ReturnQuestionProjection[] = [
4
5
  {
5
6
  id: "efe07b97-f6fb-4b6a-ba92-b68519320b2c",
6
- name: "main_title",
7
- placeholder: "",
7
+ translationKey: "main_title",
8
8
  type: ReturnQuestionType.HOST_DEFAULT,
9
9
  children: [
10
10
  {
11
11
  id: "ed396b68-1436-48ab-842f-fbfea996fad4",
12
- name: "size",
13
- placeholder: "size_placeholder",
12
+ translationKey: "size",
14
13
  type: ReturnQuestionType.HOST_SELECT,
14
+ metadata: {
15
+ placeholder: "size_placeholder",
16
+ },
15
17
  children: [
16
18
  {
17
19
  id: "0ad1dba8-b02c-4121-a1e3-981f1c30800d",
18
- name: "size_title",
19
- placeholder: "",
20
+ translationKey: "size_title",
20
21
  type: ReturnQuestionType.HOST_STACK,
21
22
  children: [
22
23
  {
23
24
  id: "9251dc2c-d76a-484d-9299-346929af932f",
24
- name: "size_large",
25
- placeholder: "",
25
+ translationKey: "size_large",
26
26
  type: ReturnQuestionType.OPTION,
27
27
  children: [
28
28
  {
29
29
  id: "542c4d24-e1da-484f-8c3a-7d89ee135adc",
30
- name: "",
31
- placeholder: "",
32
30
  type: ReturnQuestionType.HOST_STACK,
33
31
  children: [
34
32
  {
35
33
  id: "68c0bb98-b00a-4b86-af43-528fe903cb69",
36
- name: "size_overall",
37
- placeholder: "",
34
+ translationKey: "size_overall",
38
35
  type: ReturnQuestionType.OPTION,
39
36
  },
40
37
  {
41
38
  id: "85e84a77-461c-41e6-8544-95b5294d0b80",
42
- name: "size_trousers_too_long",
43
- placeholder: "",
39
+ translationKey: "size_trousers_too_long",
44
40
  type: ReturnQuestionType.OPTION,
45
41
  },
46
42
  {
47
43
  id: "29441d25-8d9f-471e-a13e-a03f61c88091",
48
- name: "size_fit_cut_does_not_fit",
49
- placeholder: "",
44
+ translationKey: "size_fit_cut_does_not_fit",
50
45
  type: ReturnQuestionType.OPTION,
51
46
  },
52
47
  ],
@@ -55,38 +50,31 @@ const returnQuestions: ReturnQuestionProjection[] = [
55
50
  },
56
51
  {
57
52
  id: "a081c3e9-1904-4a60-8899-b72c1a3a0291",
58
- name: "size_correct",
59
- placeholder: "",
53
+ translationKey: "size_correct",
60
54
  type: ReturnQuestionType.OPTION,
61
55
  },
62
56
  {
63
57
  id: "624cce3d-bd86-463a-b16b-c862ad73d5f3",
64
- name: "size_small",
65
- placeholder: "",
58
+ translationKey: "size_small",
66
59
  type: ReturnQuestionType.OPTION,
67
60
  children: [
68
61
  {
69
62
  id: "58e5ae9a-bc0d-4d27-b267-854a51c2a79a",
70
- name: "",
71
- placeholder: "",
72
63
  type: ReturnQuestionType.HOST_STACK,
73
64
  children: [
74
65
  {
75
66
  id: "6a3d11fc-570c-4085-a850-1967228cdd4c",
76
- name: "size_overall",
77
- placeholder: "",
67
+ translationKey: "size_overall",
78
68
  type: ReturnQuestionType.OPTION,
79
69
  },
80
70
  {
81
71
  id: "c27e1936-deea-4dbe-a8f1-fe4fb8564deb",
82
- name: "size_trousers_too_short",
83
- placeholder: "",
72
+ translationKey: "size_trousers_too_short",
84
73
  type: ReturnQuestionType.OPTION,
85
74
  },
86
75
  {
87
76
  id: "e77232ae-eeec-4722-b2d3-f5c0d34fd0ca",
88
- name: "size_fit_cut_does_not_fit",
89
- placeholder: "",
77
+ translationKey: "size_fit_cut_does_not_fit",
90
78
  type: ReturnQuestionType.OPTION,
91
79
  },
92
80
  ],
@@ -99,44 +87,39 @@ const returnQuestions: ReturnQuestionProjection[] = [
99
87
  },
100
88
  {
101
89
  id: "6a6d3878-5561-412c-96f3-7ed79ee587bb",
102
- name: "style",
103
- placeholder: "style_placeholder",
90
+ translationKey: "style",
104
91
  type: ReturnQuestionType.HOST_SELECT,
92
+ metadata: {
93
+ placeholder: "style_placeholder",
94
+ },
105
95
  children: [
106
96
  {
107
97
  id: "fd7ff4a0-78ed-4c0d-aa4d-64962739c322",
108
- name: "style_title",
109
- placeholder: "",
98
+ translationKey: "style_title",
110
99
  type: ReturnQuestionType.HOST_STACK,
111
100
  children: [
112
101
  {
113
102
  id: "56631448-d33d-49fb-b3f8-4486b68b60c3",
114
- name: "style_i_love_it_but",
115
- placeholder: "",
103
+ translationKey: "style_i_love_it_but",
116
104
  type: ReturnQuestionType.OPTION,
117
105
  children: [
118
106
  {
119
107
  id: "90329d91-bd5d-4439-bb0a-b338caaeff2b",
120
- name: "",
121
- placeholder: "",
122
108
  type: ReturnQuestionType.HOST_STACK,
123
109
  children: [
124
110
  {
125
111
  id: "a3d937b6-7499-4a3c-86bf-5c0af9ab2e23",
126
- name: "style_i_already_have_something_similar",
127
- placeholder: "",
112
+ translationKey: "style_i_already_have_something_similar",
128
113
  type: ReturnQuestionType.OPTION,
129
114
  },
130
115
  {
131
116
  id: "7970edd3-fb5c-42d3-afe3-ce31bcbb856c",
132
- name: "style_very_basic_simple",
133
- placeholder: "",
117
+ translationKey: "style_very_basic_simple",
134
118
  type: ReturnQuestionType.OPTION,
135
119
  },
136
120
  {
137
121
  id: "bab3d4f9-0227-4550-a53f-3c125d68429c",
138
- name: "style_i_dont_need_it_at_the_moment",
139
- placeholder: "",
122
+ translationKey: "style_i_dont_need_it_at_the_moment",
140
123
  type: ReturnQuestionType.OPTION,
141
124
  },
142
125
  ],
@@ -145,32 +128,26 @@ const returnQuestions: ReturnQuestionProjection[] = [
145
128
  },
146
129
  {
147
130
  id: "5287d1df-a28a-42cd-9138-01f82aeea4c2",
148
- name: "style_i_like_it_but",
149
- placeholder: "",
131
+ translationKey: "style_i_like_it_but",
150
132
  type: ReturnQuestionType.OPTION,
151
133
  children: [
152
134
  {
153
135
  id: "35b86395-6b6b-4a39-ab16-05511f58acdd",
154
- name: "",
155
- placeholder: "",
156
136
  type: ReturnQuestionType.HOST_STACK,
157
137
  children: [
158
138
  {
159
139
  id: "e1f6ac53-f203-4b32-9ff0-782c028d9e95",
160
- name: "style_i_already_have_something_similar",
161
- placeholder: "",
140
+ translationKey: "style_i_already_have_something_similar",
162
141
  type: ReturnQuestionType.OPTION,
163
142
  },
164
143
  {
165
144
  id: "12875926-b67a-4ad3-852c-1608c7dcc558",
166
- name: "style_very_basic_simple",
167
- placeholder: "",
145
+ translationKey: "style_very_basic_simple",
168
146
  type: ReturnQuestionType.OPTION,
169
147
  },
170
148
  {
171
149
  id: "a5eb96bf-73d4-4df5-8ad8-097410b24526",
172
- name: "style_i_dont_need_it_at_the_moment",
173
- placeholder: "",
150
+ translationKey: "style_i_dont_need_it_at_the_moment",
174
151
  type: ReturnQuestionType.OPTION,
175
152
  },
176
153
  ],
@@ -179,44 +156,36 @@ const returnQuestions: ReturnQuestionProjection[] = [
179
156
  },
180
157
  {
181
158
  id: "757107a9-8e2d-4194-a7fe-0d55cde49c11",
182
- name: "style_not_bad_but",
183
- placeholder: "",
159
+ translationKey: "style_not_bad_but",
184
160
  type: ReturnQuestionType.OPTION,
185
161
  children: [
186
162
  {
187
163
  id: "c6f75ee3-a445-4103-a682-f0c3a742108d",
188
- name: "",
189
- placeholder: "",
190
164
  type: ReturnQuestionType.HOST_STACK,
191
165
  children: [
192
166
  {
193
167
  id: "4f46d4b1-b103-43b2-b669-be721ab46e03",
194
- name: "style_i_dont_like_the_color",
195
- placeholder: "",
168
+ translationKey: "style_i_dont_like_the_color",
196
169
  type: ReturnQuestionType.OPTION,
197
170
  },
198
171
  {
199
172
  id: "48412165-5e05-4806-8e21-ea59c41d0479",
200
- name: "style_very_basic_simple",
201
- placeholder: "",
173
+ translationKey: "style_very_basic_simple",
202
174
  type: ReturnQuestionType.OPTION,
203
175
  },
204
176
  {
205
177
  id: "51262c01-eaa3-4d3a-aeb9-95dc8b0dd687",
206
- name: "style_i_dont_like_the_fabric",
207
- placeholder: "",
178
+ translationKey: "style_i_dont_like_the_fabric",
208
179
  type: ReturnQuestionType.OPTION,
209
180
  },
210
181
  {
211
182
  id: "9dea1c2b-4f8c-4192-a547-999df55e77e4",
212
- name: "style_i_dont_like_the_print",
213
- placeholder: "",
183
+ translationKey: "style_i_dont_like_the_print",
214
184
  type: ReturnQuestionType.OPTION,
215
185
  },
216
186
  {
217
187
  id: "b1277bf3-4bbb-487a-8e58-88efecc61c3f",
218
- name: "style_not_my_style_in_general",
219
- placeholder: "",
188
+ translationKey: "style_not_my_style_in_general",
220
189
  type: ReturnQuestionType.OPTION,
221
190
  },
222
191
  ],
@@ -225,44 +194,36 @@ const returnQuestions: ReturnQuestionProjection[] = [
225
194
  },
226
195
  {
227
196
  id: "8a9cd6f8-db4b-4904-8a48-3d9bbd6f7a69",
228
- name: "style_i_dont_like",
229
- placeholder: "",
197
+ translationKey: "style_i_dont_like",
230
198
  type: ReturnQuestionType.OPTION,
231
199
  children: [
232
200
  {
233
201
  id: "f604240d-c093-4a9e-ab85-4adc0744066a",
234
- name: "",
235
- placeholder: "",
236
202
  type: ReturnQuestionType.HOST_STACK,
237
203
  children: [
238
204
  {
239
205
  id: "42dbbb93-7808-4ac3-8431-582f812cb314",
240
- name: "style_i_dont_like_the_color",
241
- placeholder: "",
206
+ translationKey: "style_i_dont_like_the_color",
242
207
  type: ReturnQuestionType.OPTION,
243
208
  },
244
209
  {
245
210
  id: "af1ade81-7b22-4f7e-a505-2ae275a6440f",
246
- name: "style_very_basic_simple",
247
- placeholder: "",
211
+ translationKey: "style_very_basic_simple",
248
212
  type: ReturnQuestionType.OPTION,
249
213
  },
250
214
  {
251
215
  id: "26d073b4-2588-4391-9b4c-e8e4a8eba2a8",
252
- name: "style_i_dont_like_the_fabric",
253
- placeholder: "",
216
+ translationKey: "style_i_dont_like_the_fabric",
254
217
  type: ReturnQuestionType.OPTION,
255
218
  },
256
219
  {
257
220
  id: "ee50ab07-b7a6-415e-a04a-c9f350396185",
258
- name: "style_i_dont_like_the_print",
259
- placeholder: "",
221
+ translationKey: "style_i_dont_like_the_print",
260
222
  type: ReturnQuestionType.OPTION,
261
223
  },
262
224
  {
263
225
  id: "ce3227e4-851e-47b7-98c1-c63a402e8477",
264
- name: "style_not_my_style_in_general",
265
- placeholder: "",
226
+ translationKey: "style_not_my_style_in_general",
266
227
  type: ReturnQuestionType.OPTION,
267
228
  },
268
229
  ],
@@ -275,32 +236,30 @@ const returnQuestions: ReturnQuestionProjection[] = [
275
236
  },
276
237
  {
277
238
  id: "a1acdb2d-62c8-467f-b7cc-dc24d967290c",
278
- name: "quality",
279
- placeholder: "quality_placeholder",
239
+ translationKey: "quality",
280
240
  type: ReturnQuestionType.HOST_SELECT,
241
+ metadata: {
242
+ placeholder: "quality_placeholder",
243
+ },
281
244
  children: [
282
245
  {
283
246
  id: "405de847-188f-46c1-b66d-941c22a6b7a9",
284
- name: "quality_title",
285
- placeholder: "",
247
+ translationKey: "quality_title",
286
248
  type: ReturnQuestionType.HOST_STACK,
287
249
  children: [
288
250
  {
289
251
  id: "cce7851c-92c7-461b-8dcb-903c5de59ed1",
290
- name: "quality_good",
291
- placeholder: "",
252
+ translationKey: "quality_good",
292
253
  type: ReturnQuestionType.OPTION,
293
254
  },
294
255
  {
295
256
  id: "4bf8f27d-669b-4d36-8d39-b5599c671816",
296
- name: "quality_regular",
297
- placeholder: "",
257
+ translationKey: "quality_regular",
298
258
  type: ReturnQuestionType.OPTION,
299
259
  },
300
260
  {
301
261
  id: "48bfe766-92c0-4ff5-a793-e107b60786ff",
302
- name: "quality_bad",
303
- placeholder: "",
262
+ translationKey: "quality_bad",
304
263
  type: ReturnQuestionType.OPTION,
305
264
  },
306
265
  ],
@@ -309,32 +268,30 @@ const returnQuestions: ReturnQuestionProjection[] = [
309
268
  },
310
269
  {
311
270
  id: "f25ccdcf-b648-479e-b4a1-86129e3e8c0b",
312
- name: "price",
313
- placeholder: "price_placeholder",
271
+ translationKey: "price",
314
272
  type: ReturnQuestionType.HOST_SELECT,
273
+ metadata: {
274
+ placeholder: "price_placeholder",
275
+ },
315
276
  children: [
316
277
  {
317
278
  id: "b0e0463c-787f-4d6c-adf3-5151ab6fc959",
318
- name: "price_title",
319
- placeholder: "",
279
+ translationKey: "price_title",
320
280
  type: ReturnQuestionType.HOST_STACK,
321
281
  children: [
322
282
  {
323
283
  id: "9c59e396-4135-4255-9437-22555837d686",
324
- name: "price_expensive",
325
- placeholder: "",
284
+ translationKey: "price_expensive",
326
285
  type: ReturnQuestionType.OPTION,
327
286
  },
328
287
  {
329
288
  id: "10db17f8-0982-49ee-9aeb-f752d953654c",
330
- name: "price_cheap",
331
- placeholder: "",
289
+ translationKey: "price_cheap",
332
290
  type: ReturnQuestionType.OPTION,
333
291
  },
334
292
  {
335
293
  id: "acf64bb3-b91b-48e7-bba1-0541620ed1c5",
336
- name: "price_fair",
337
- placeholder: "",
294
+ translationKey: "price_fair",
338
295
  type: ReturnQuestionType.OPTION,
339
296
  },
340
297
  ],
@@ -343,38 +300,35 @@ const returnQuestions: ReturnQuestionProjection[] = [
343
300
  },
344
301
  {
345
302
  id: "b7ad1665-5e54-4ee4-b455-e7189f33083c",
346
- name: "others",
347
- placeholder: "others_placeholder",
303
+ translationKey: "others",
348
304
  type: ReturnQuestionType.HOST_SELECT,
305
+ metadata: {
306
+ placeholder: "others_placeholder",
307
+ },
349
308
  children: [
350
309
  {
351
310
  id: "32cd0ef9-78d7-4605-a279-556749b36d4a",
352
- name: "others_title",
353
- placeholder: "",
311
+ translationKey: "others_title",
354
312
  type: ReturnQuestionType.HOST_STACK,
355
313
  children: [
356
314
  {
357
315
  id: "95c4fd13-9ca3-45a6-8795-23415bbd0a5e",
358
- name: "others_i_dont_like_the_brand",
359
- placeholder: "",
316
+ translationKey: "others_i_dont_like_the_brand",
360
317
  type: ReturnQuestionType.OPTION,
361
318
  },
362
319
  {
363
320
  id: "f25c63bd-42d3-4242-9b81-927025aa9d67",
364
- name: "others_different_from_preview",
365
- placeholder: "",
321
+ translationKey: "others_different_from_preview",
366
322
  type: ReturnQuestionType.OPTION,
367
323
  },
368
324
  {
369
325
  id: "0e0b16c1-a721-4a14-aea6-e0cf5c262222",
370
- name: "others_delivery_delay",
371
- placeholder: "",
326
+ translationKey: "others_delivery_delay",
372
327
  type: ReturnQuestionType.OPTION,
373
328
  },
374
329
  {
375
330
  id: "11699ae8-325d-429c-9c05-ff2d6cc45d54",
376
- name: "others_item_is_defective",
377
- placeholder: "",
331
+ translationKey: "others_item_is_defective",
378
332
  type: ReturnQuestionType.OPTION,
379
333
  },
380
334
  ],
@@ -385,15 +339,16 @@ const returnQuestions: ReturnQuestionProjection[] = [
385
339
  },
386
340
  {
387
341
  id: "ce3e8d57-5eea-4dd3-bef4-2e811a143612",
388
- name: "comment_title",
389
- placeholder: "",
342
+ translationKey: "comment_title",
390
343
  type: ReturnQuestionType.HOST_TEXTAREA,
391
344
  children: [
392
345
  {
393
346
  id: "1123a37d-bc00-43a4-9d28-cee1dfaf356c",
394
- name: "comment_textarea",
395
- placeholder: "comment_textarea_placeholder",
347
+ translationKey: "comment_textarea",
396
348
  type: ReturnQuestionType.TEXTAREA,
349
+ metadata: {
350
+ placeholder: "comment_textarea_placeholder",
351
+ },
397
352
  },
398
353
  ],
399
354
  },
@@ -6,7 +6,7 @@ import { I18n } from "@lookiero/i18n-react";
6
6
  import { MessagingRoot } from "@lookiero/messaging-react/bootstrap";
7
7
  import { Locale } from "@lookiero/sty-psp-locale";
8
8
  import { SentryEnvironment, SentryLoggerFunctionArgs, sentryLogger, sentryLoggerHOC } from "@lookiero/sty-psp-logging";
9
- import { EnvironmentStyle, EnvironmentStyleProvider, Layout } from "@lookiero/sty-psp-ui";
9
+ import { Layout } from "@lookiero/sty-psp-ui";
10
10
  import { Customer } from "../../projection/customer/customer";
11
11
  import { Order } from "../../projection/order/order";
12
12
  import { Subscription } from "../../projection/subscription/subscription";
@@ -33,7 +33,6 @@ interface RootProps {
33
33
  readonly order: Order | undefined;
34
34
  readonly subscription: Subscription | undefined;
35
35
  readonly layout: Layout;
36
- readonly style?: EnvironmentStyle;
37
36
  readonly onNotAccessible: () => void;
38
37
  readonly onCheckoutSubmitted?: () => void;
39
38
  readonly useRedirect: () => Record<string, string>;
@@ -52,7 +51,6 @@ const root: RootFunction = ({ Messaging, I18n, getAuthToken, development, sentry
52
51
  order,
53
52
  subscription,
54
53
  layout,
55
- style,
56
54
  onNotAccessible,
57
55
  onCheckoutSubmitted,
58
56
  useRedirect,
@@ -62,24 +60,22 @@ const root: RootFunction = ({ Messaging, I18n, getAuthToken, development, sentry
62
60
 
63
61
  return (
64
62
  <Messaging includeReactQueryDevTools={Platform.OS === "web"}>
65
- <EnvironmentStyleProvider style={style}>
66
- <Routing
67
- I18n={I18n}
68
- basePath={basePath}
69
- customer={customer}
70
- getAuthToken={getAuthToken}
71
- kameleoon={kameleoon}
72
- layout={layout}
73
- locale={locale}
74
- order={order}
75
- subscription={subscription}
76
- useRedirect={useRedirect}
77
- useRoutes={useRoutes}
78
- onCheckoutSubmitted={onCheckoutSubmitted}
79
- onI18nError={development ? undefined : handleOnI18nError}
80
- onNotAccessible={onNotAccessible}
81
- />
82
- </EnvironmentStyleProvider>
63
+ <Routing
64
+ I18n={I18n}
65
+ basePath={basePath}
66
+ customer={customer}
67
+ getAuthToken={getAuthToken}
68
+ kameleoon={kameleoon}
69
+ layout={layout}
70
+ locale={locale}
71
+ order={order}
72
+ subscription={subscription}
73
+ useRedirect={useRedirect}
74
+ useRoutes={useRoutes}
75
+ onCheckoutSubmitted={onCheckoutSubmitted}
76
+ onI18nError={development ? undefined : handleOnI18nError}
77
+ onNotAccessible={onNotAccessible}
78
+ />
83
79
  </Messaging>
84
80
  );
85
81
  };
@@ -1,10 +1,12 @@
1
+ /* eslint-disable react/prop-types */
1
2
  import { render } from "@testing-library/react-native";
2
3
  import React, { ReactNode } from "react";
3
4
  import { Text } from "react-native";
4
- import { ReturnQuestionProjection, ReturnQuestionType } from "../../../../../projection/returnQuestion/returnQuestion";
5
+ import { ReturnQuestionProjection } from "../../../../../projection/returnQuestion/returnQuestion";
6
+ import { ReturnQuestionType } from "../../../../../projection/returnQuestion/returnQuestion.constants";
5
7
  import ReturnQuestion from "./ReturnQuestion";
6
8
  import { ReturnQuestionItemProvider, ReturnQuestionItems } from "./behaviors/useReturnQuestionItem";
7
- import { ReturnQuestionItem, ReturnQuestionItemProps } from "./components/ReturnQuestionItem";
9
+ import { ReturnQuestionItem } from "./components/ReturnQuestionItem";
8
10
 
9
11
  const mockOnChange = jest.fn();
10
12
  jest.mock("./behaviors/useReturnQuestionFeedback", () => ({
@@ -13,34 +15,30 @@ jest.mock("./behaviors/useReturnQuestionFeedback", () => ({
13
15
 
14
16
  const returnQuestion: ReturnQuestionProjection = {
15
17
  id: "9251dc2c-d76a-484d-9299-346929af932f",
16
- name: "size_large",
17
- placeholder: "",
18
+ translationKey: "size_large",
18
19
  type: ReturnQuestionType.OPTION,
19
20
  children: [
20
21
  {
21
22
  id: "68c0bb98-b00a-4b86-af43-528fe903cb69",
22
- name: "size_overall",
23
- placeholder: "",
23
+ translationKey: "size_overall",
24
24
  type: ReturnQuestionType.OPTION,
25
25
  },
26
26
  {
27
27
  id: "85e84a77-461c-41e6-8544-95b5294d0b80",
28
- name: "size_trousers_too_long",
29
- placeholder: "",
28
+ translationKey: "size_trousers_too_long",
30
29
  type: ReturnQuestionType.OPTION,
31
30
  },
32
31
  {
33
32
  id: "29441d25-8d9f-471e-a13e-a03f61c88091",
34
- name: "size_fit_cut_does_not_fit",
35
- placeholder: "",
33
+ translationKey: "size_fit_cut_does_not_fit",
36
34
  type: ReturnQuestionType.OPTION,
37
35
  },
38
36
  ],
39
37
  };
40
38
 
41
- const Item: ReturnQuestionItem = ({ returnQuestion, children }: ReturnQuestionItemProps) => (
39
+ const Item: ReturnQuestionItem<ReturnQuestionType> = ({ returnQuestion, children }) => (
42
40
  <>
43
- <Text>{returnQuestion.name}</Text>
41
+ <Text>{returnQuestion.translationKey}</Text>
44
42
  {children}
45
43
  </>
46
44
  );
@@ -1,5 +1,6 @@
1
1
  import React, { FC, memo } from "react";
2
2
  import { ReturnQuestionProjection } from "../../../../../projection/returnQuestion/returnQuestion";
3
+ import { returnQuestionHasChildren } from "../../../../../projection/returnQuestion/returnQuestion.typeguard";
3
4
  import { useReturnQuestionItem } from "./behaviors/useReturnQuestionItem";
4
5
 
5
6
  interface ReturnQuestionProps {
@@ -19,14 +20,15 @@ const ReturnQuestion: FC<ReturnQuestionProps> = ({ returnQuestionParent, returnQ
19
20
  testID={returnQuestion.id}
20
21
  >
21
22
  <>
22
- {returnQuestion.children?.map((childReturnQuestion) => (
23
- <ReturnQuestion
24
- key={childReturnQuestion.id}
25
- portalHostName={portalHostName}
26
- returnQuestion={childReturnQuestion}
27
- returnQuestionParent={returnQuestion}
28
- />
29
- ))}
23
+ {returnQuestionHasChildren(returnQuestion) &&
24
+ returnQuestion.children?.map((childReturnQuestion) => (
25
+ <ReturnQuestion
26
+ key={childReturnQuestion.id}
27
+ portalHostName={portalHostName}
28
+ returnQuestion={childReturnQuestion}
29
+ returnQuestionParent={returnQuestion}
30
+ />
31
+ ))}
30
32
  </>
31
33
  </Item>
32
34
  );
@@ -1,34 +1,35 @@
1
+ /* eslint-disable react/prop-types */
1
2
  import { render } from "@testing-library/react-native";
2
3
  import React, { ReactNode } from "react";
3
4
  import { Text } from "react-native";
4
- import { ReturnQuestionProjection, ReturnQuestionType } from "../../../../../projection/returnQuestion/returnQuestion";
5
+ import { ReturnQuestionProjection } from "../../../../../projection/returnQuestion/returnQuestion";
6
+ import { ReturnQuestionType } from "../../../../../projection/returnQuestion/returnQuestion.constants";
5
7
  import { ReturnQuestions } from "./ReturnQuestions";
6
8
  import { ReturnQuestionFeedbackProvider } from "./behaviors/useReturnQuestionFeedback";
7
9
  import { ReturnQuestionItemProvider, ReturnQuestionItems } from "./behaviors/useReturnQuestionItem";
8
- import { ReturnQuestionItem, ReturnQuestionItemProps } from "./components/ReturnQuestionItem";
10
+ import { ReturnQuestionItem } from "./components/ReturnQuestionItem";
9
11
 
10
12
  const returnQuestions: ReturnQuestionProjection[] = [
11
13
  {
12
14
  id: "68c0bb98-b00a-4b86-af43-528fe903cb69",
13
- name: "size_overall",
14
- placeholder: "",
15
+ translationKey: "size_overall",
15
16
  type: ReturnQuestionType.OPTION,
16
17
  },
17
18
  {
18
19
  id: "85e84a77-461c-41e6-8544-95b5294d0b80",
19
- name: "size_trousers_too_long",
20
- placeholder: "",
20
+ translationKey: "size_trousers_too_long",
21
21
  type: ReturnQuestionType.OPTION,
22
22
  },
23
23
  {
24
24
  id: "29441d25-8d9f-471e-a13e-a03f61c88091",
25
- name: "size_fit_cut_does_not_fit",
26
- placeholder: "",
25
+ translationKey: "size_fit_cut_does_not_fit",
27
26
  type: ReturnQuestionType.OPTION,
28
27
  },
29
28
  ];
30
29
 
31
- const Item: ReturnQuestionItem = ({ returnQuestion }: ReturnQuestionItemProps) => <Text>{returnQuestion.name}</Text>;
30
+ const Item: ReturnQuestionItem<ReturnQuestionType> = ({ returnQuestion }) => (
31
+ <Text>{returnQuestion.translationKey}</Text>
32
+ );
32
33
 
33
34
  const returnQuestionItems: ReturnQuestionItems = {
34
35
  [ReturnQuestionType.HOST_DEFAULT]: Item,
@@ -1,4 +1,5 @@
1
1
  import { ReturnQuestionProjection } from "../../../../../../projection/returnQuestion/returnQuestion";
2
+ import { returnQuestionHasChildren } from "../../../../../../projection/returnQuestion/returnQuestion.typeguard";
2
3
 
3
4
  interface IsChildReturnQuestionFunctionArgs {
4
5
  readonly returnQuestionId: string;
@@ -13,7 +14,7 @@ const isChildReturnQuestion: IsChildReturnQuestionFunction = ({ returnQuestionId
13
14
  return true;
14
15
  }
15
16
 
16
- const children = returnQuestion.children || [];
17
+ const children = (returnQuestionHasChildren(returnQuestion) && returnQuestion.children) || [];
17
18
 
18
19
  for (let index = 0; index < children.length; index++) {
19
20
  const isChild = isChildReturnQuestion({