@lookiero/checkout 0.3.26 → 0.4.0-beta.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 (433) hide show
  1. package/dist/domain/checkout/command/startCheckout.d.ts +13 -0
  2. package/dist/domain/checkout/command/startCheckout.js +4 -0
  3. package/dist/domain/checkout/model/checkout.d.ts +18 -0
  4. package/dist/domain/checkout/model/checkout.js +20 -0
  5. package/dist/domain/checkout/model/checkoutStarted.d.ts +13 -0
  6. package/dist/domain/checkout/model/checkoutStarted.js +4 -0
  7. package/dist/domain/checkout/model/checkouts.d.ts +7 -0
  8. package/dist/domain/checkout/model/checkouts.js +1 -0
  9. package/dist/domain/checkoutBooking/command/bookCheckoutBookingForCheckoutItem.d.ts +15 -0
  10. package/dist/domain/checkoutBooking/command/bookCheckoutBookingForCheckoutItem.js +7 -0
  11. package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.d.ts +15 -0
  12. package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.js +7 -0
  13. package/dist/domain/checkoutBooking/model/checkoutBooking.d.ts +9 -0
  14. package/dist/domain/checkoutBooking/model/checkoutBooking.js +9 -0
  15. package/dist/domain/checkoutBooking/model/checkoutBookingBooked.d.ts +14 -0
  16. package/dist/domain/checkoutBooking/model/checkoutBookingBooked.js +7 -0
  17. package/dist/domain/checkoutBooking/model/checkoutBookings.d.ts +7 -0
  18. package/dist/domain/checkoutBooking/model/checkoutBookings.js +1 -0
  19. package/dist/domain/checkoutItem/command/keepCheckoutItem.d.ts +13 -0
  20. package/dist/domain/checkoutItem/command/keepCheckoutItem.js +4 -0
  21. package/dist/domain/checkoutItem/command/replaceCheckoutItem.d.ts +14 -0
  22. package/dist/domain/checkoutItem/command/replaceCheckoutItem.js +7 -0
  23. package/dist/domain/checkoutItem/command/returnCheckoutItem.d.ts +15 -0
  24. package/dist/domain/checkoutItem/command/returnCheckoutItem.js +7 -0
  25. package/dist/domain/checkoutItem/model/checkoutItem.d.ts +24 -0
  26. package/dist/domain/checkoutItem/model/checkoutItem.js +40 -0
  27. package/dist/domain/checkoutItem/model/checkoutItemKept.d.ts +13 -0
  28. package/dist/domain/checkoutItem/model/checkoutItemKept.js +4 -0
  29. package/dist/domain/checkoutItem/model/checkoutItemReplaced.d.ts +13 -0
  30. package/dist/domain/checkoutItem/model/checkoutItemReplaced.js +4 -0
  31. package/dist/domain/checkoutItem/model/checkoutItemReturned.d.ts +13 -0
  32. package/dist/domain/checkoutItem/model/checkoutItemReturned.js +4 -0
  33. package/dist/domain/checkoutItem/model/checkoutItems.d.ts +7 -0
  34. package/dist/domain/checkoutItem/model/checkoutItems.js +1 -0
  35. package/dist/domain/checkoutItem/model/currency.d.ts +5 -0
  36. package/dist/domain/checkoutItem/model/currency.js +6 -0
  37. package/dist/domain/checkoutItem/model/feedbacks.d.ts +3 -0
  38. package/dist/domain/checkoutItem/model/feedbacks.js +1 -0
  39. package/dist/domain/checkoutItem/model/price.d.ts +10 -0
  40. package/dist/domain/checkoutItem/model/price.js +1 -0
  41. package/dist/domain/uiSetting/command/updateUiSetting.d.ts +15 -0
  42. package/dist/domain/uiSetting/command/updateUiSetting.js +10 -0
  43. package/dist/domain/uiSetting/model/uiSetting.d.ts +9 -0
  44. package/dist/domain/uiSetting/model/uiSetting.js +11 -0
  45. package/dist/domain/uiSetting/model/uiSettingUpdated.d.ts +14 -0
  46. package/dist/domain/uiSetting/model/uiSettingUpdated.js +7 -0
  47. package/dist/domain/uiSetting/model/uiSettings.d.ts +7 -0
  48. package/dist/domain/uiSetting/model/uiSettings.js +1 -0
  49. package/dist/index.d.ts +24 -0
  50. package/dist/index.js +19 -0
  51. package/dist/infrastructure/delivery/baseBootstrap.d.ts +56 -0
  52. package/dist/infrastructure/delivery/baseBootstrap.js +55 -0
  53. package/dist/infrastructure/delivery/bootstrap.d.ts +10 -0
  54. package/dist/infrastructure/delivery/bootstrap.js +44 -0
  55. package/dist/infrastructure/delivery/http/fetchHttpClient.d.ts +14 -0
  56. package/dist/infrastructure/delivery/http/fetchHttpClient.js +20 -0
  57. package/dist/infrastructure/delivery/http/httpClient.d.ts +16 -0
  58. package/dist/infrastructure/delivery/http/httpClient.js +1 -0
  59. package/dist/infrastructure/delivery/mock/checkoutBookingDataSource.d.ts +14 -0
  60. package/dist/infrastructure/delivery/mock/checkoutBookingDataSource.js +12 -0
  61. package/dist/infrastructure/delivery/mock/checkoutDataSource.d.ts +17 -0
  62. package/dist/infrastructure/delivery/mock/checkoutDataSource.js +18 -0
  63. package/dist/infrastructure/delivery/mock/dataSourceCheckoutBookings.d.ts +14 -0
  64. package/dist/infrastructure/delivery/mock/dataSourceCheckoutBookings.js +21 -0
  65. package/dist/infrastructure/delivery/mock/dataSourceCheckoutItems.d.ts +14 -0
  66. package/dist/infrastructure/delivery/mock/dataSourceCheckoutItems.js +25 -0
  67. package/dist/infrastructure/delivery/mock/dataSourceCheckouts.d.ts +11 -0
  68. package/dist/infrastructure/delivery/mock/dataSourceCheckouts.js +27 -0
  69. package/dist/infrastructure/domain/checkout/model/httpCheckouts.d.ts +16 -0
  70. package/dist/infrastructure/domain/checkout/model/httpCheckouts.js +19 -0
  71. package/dist/infrastructure/domain/checkout/model/httpCheckoutsStart.d.ts +5 -0
  72. package/dist/infrastructure/domain/checkout/model/httpCheckoutsStart.js +13 -0
  73. package/dist/infrastructure/domain/checkout/react/useStartCheckout.d.ts +13 -0
  74. package/dist/infrastructure/domain/checkout/react/useStartCheckout.js +10 -0
  75. package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.d.ts +16 -0
  76. package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.js +15 -0
  77. package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBook.d.ts +5 -0
  78. package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBook.js +18 -0
  79. package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.d.ts +15 -0
  80. package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.js +15 -0
  81. package/dist/infrastructure/domain/checkoutBooking/react/useBookSizeReplaceableProductVariantsForCheckoutItem.d.ts +15 -0
  82. package/dist/infrastructure/domain/checkoutBooking/react/useBookSizeReplaceableProductVariantsForCheckoutItem.js +14 -0
  83. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItems.d.ts +16 -0
  84. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItems.js +26 -0
  85. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsKeep.d.ts +5 -0
  86. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsKeep.js +13 -0
  87. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReplace.d.ts +5 -0
  88. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReplace.js +13 -0
  89. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReturn.d.ts +5 -0
  90. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReturn.js +13 -0
  91. package/dist/infrastructure/domain/checkoutItem/react/useKeepCheckoutItem.d.ts +13 -0
  92. package/dist/infrastructure/domain/checkoutItem/react/useKeepCheckoutItem.js +12 -0
  93. package/dist/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.d.ts +16 -0
  94. package/dist/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.js +13 -0
  95. package/dist/infrastructure/domain/checkoutItem/react/useReturnCheckoutItem.d.ts +17 -0
  96. package/dist/infrastructure/domain/checkoutItem/react/useReturnCheckoutItem.js +13 -0
  97. package/dist/infrastructure/domain/uiSetting/model/storageUiSettings.d.ts +17 -0
  98. package/dist/infrastructure/domain/uiSetting/model/storageUiSettings.js +20 -0
  99. package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.d.ts +10 -0
  100. package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.js +11 -0
  101. package/dist/infrastructure/domain/uiSetting/react/useUpdateUiSetting.d.ts +14 -0
  102. package/dist/infrastructure/domain/uiSetting/react/useUpdateUiSetting.js +15 -0
  103. package/dist/infrastructure/persistence/asyncStorageStorage.d.ts +5 -0
  104. package/dist/infrastructure/persistence/asyncStorageStorage.js +7 -0
  105. package/dist/infrastructure/persistence/storage.d.ts +7 -0
  106. package/dist/infrastructure/persistence/storage.js +1 -0
  107. package/dist/infrastructure/persistence/uiSettingData.d.ts +6 -0
  108. package/dist/infrastructure/persistence/uiSettingData.js +1 -0
  109. package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.d.ts +12 -0
  110. package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.js +9 -0
  111. package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/react/useViewBookedSizeChangeProductsVariantsForCheckoutItem.d.ts +10 -0
  112. package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/react/useViewBookedSizeChangeProductsVariantsForCheckoutItem.js +9 -0
  113. package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/bookedSizeReplaceableProductVariants.mock.d.ts +3 -0
  114. package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/bookedSizeReplaceableProductVariants.mock.js +17 -0
  115. package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.d.ts +34 -0
  116. package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.js +26 -0
  117. package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/react/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.d.ts +10 -0
  118. package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/react/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.js +9 -0
  119. package/dist/infrastructure/projection/checkout/checkout.d.ts +18 -0
  120. package/dist/infrastructure/projection/checkout/checkout.js +5 -0
  121. package/dist/infrastructure/projection/checkout/httpCheckoutByIdView.d.ts +12 -0
  122. package/dist/infrastructure/projection/checkout/httpCheckoutByIdView.js +10 -0
  123. package/dist/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.d.ts +12 -0
  124. package/dist/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.js +10 -0
  125. package/dist/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.d.ts +12 -0
  126. package/dist/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.js +8 -0
  127. package/dist/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.d.ts +12 -0
  128. package/dist/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.js +8 -0
  129. package/dist/infrastructure/projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId.d.ts +10 -0
  130. package/dist/infrastructure/projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId.js +14 -0
  131. package/dist/infrastructure/projection/checkout/react/useViewFiveItemsDiscountByCustomerId.d.ts +10 -0
  132. package/dist/infrastructure/projection/checkout/react/useViewFiveItemsDiscountByCustomerId.js +9 -0
  133. package/dist/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +10 -0
  134. package/dist/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +9 -0
  135. package/dist/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.d.ts +12 -0
  136. package/dist/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.js +9 -0
  137. package/dist/infrastructure/projection/checkoutItem/checkoutItem.d.ts +45 -0
  138. package/dist/infrastructure/projection/checkoutItem/checkoutItem.js +40 -0
  139. package/dist/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.d.ts +12 -0
  140. package/dist/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.js +9 -0
  141. package/dist/infrastructure/projection/feedback/feedback.mock.d.ts +3 -0
  142. package/dist/infrastructure/projection/feedback/feedback.mock.js +6 -0
  143. package/dist/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.d.ts +12 -0
  144. package/dist/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.js +9 -0
  145. package/dist/infrastructure/projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId.d.ts +10 -0
  146. package/dist/infrastructure/projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId.js +9 -0
  147. package/dist/infrastructure/projection/returnQuestion/returnQuestion.d.ts +14 -0
  148. package/dist/infrastructure/projection/returnQuestion/returnQuestion.js +9 -0
  149. package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.d.ts +6 -0
  150. package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.js +7 -0
  151. package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.d.ts +6 -0
  152. package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.js +9 -0
  153. package/dist/infrastructure/projection/uiSetting/react/useViewUiSettingByKey.d.ts +10 -0
  154. package/dist/infrastructure/projection/uiSetting/react/useViewUiSettingByKey.js +12 -0
  155. package/dist/infrastructure/projection/uiSetting/storageUiSettingByKeyView.d.ts +13 -0
  156. package/dist/infrastructure/projection/uiSetting/storageUiSettingByKeyView.js +15 -0
  157. package/dist/infrastructure/ui/Root.d.ts +20 -0
  158. package/dist/infrastructure/ui/Root.js +11 -0
  159. package/dist/infrastructure/ui/components/atoms/price/Price.d.ts +12 -0
  160. package/dist/infrastructure/ui/components/atoms/price/Price.js +28 -0
  161. package/dist/infrastructure/ui/components/atoms/price/Price.style.d.ts +13 -0
  162. package/dist/infrastructure/ui/components/atoms/price/Price.style.js +16 -0
  163. package/dist/infrastructure/ui/components/layouts/body/Body.d.ts +9 -0
  164. package/dist/infrastructure/ui/components/layouts/body/Body.js +7 -0
  165. package/dist/infrastructure/ui/components/layouts/body/Body.style.d.ts +7 -0
  166. package/dist/infrastructure/ui/components/layouts/body/Body.style.js +8 -0
  167. package/dist/infrastructure/ui/components/layouts/tabs/Tabs.d.ts +26 -0
  168. package/dist/infrastructure/ui/components/layouts/tabs/Tabs.js +47 -0
  169. package/dist/infrastructure/ui/components/layouts/tabs/Tabs.style.d.ts +32 -0
  170. package/dist/infrastructure/ui/components/layouts/tabs/Tabs.style.js +35 -0
  171. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.d.ts +9 -0
  172. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +8 -0
  173. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.d.ts +8 -0
  174. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.js +4 -0
  175. package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback.d.ts +29 -0
  176. package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback.js +27 -0
  177. package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.d.ts +18 -0
  178. package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.js +12 -0
  179. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +10 -0
  180. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.js +1 -0
  181. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.d.ts +3 -0
  182. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.js +3 -0
  183. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.d.ts +3 -0
  184. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +12 -0
  185. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.d.ts +8 -0
  186. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.js +11 -0
  187. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.d.ts +3 -0
  188. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +34 -0
  189. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +11 -0
  190. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +14 -0
  191. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.d.ts +3 -0
  192. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.js +27 -0
  193. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.d.ts +12 -0
  194. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.js +15 -0
  195. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.d.ts +3 -0
  196. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +15 -0
  197. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.d.ts +12 -0
  198. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.js +15 -0
  199. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.d.ts +3 -0
  200. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +26 -0
  201. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.style.d.ts +10 -0
  202. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.style.js +13 -0
  203. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.d.ts +3 -0
  204. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +13 -0
  205. package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.d.ts +22 -0
  206. package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.js +58 -0
  207. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.d.ts +8 -0
  208. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.js +14 -0
  209. package/dist/infrastructure/ui/hooks/useMediaImage.d.ts +7 -0
  210. package/dist/infrastructure/ui/hooks/useMediaImage.js +12 -0
  211. package/dist/infrastructure/ui/i18n/i18n.d.ts +39 -0
  212. package/dist/infrastructure/ui/i18n/i18n.js +40 -0
  213. package/dist/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +9 -0
  214. package/dist/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +21 -0
  215. package/dist/infrastructure/ui/routing/CheckoutMiddleware.d.ts +9 -0
  216. package/dist/infrastructure/ui/routing/CheckoutMiddleware.js +47 -0
  217. package/dist/infrastructure/ui/routing/Routing.d.ts +12 -0
  218. package/dist/infrastructure/ui/routing/Routing.js +45 -0
  219. package/dist/infrastructure/ui/routing/router/Router.d.ts +1 -0
  220. package/dist/infrastructure/ui/routing/router/Router.js +1 -0
  221. package/dist/infrastructure/ui/routing/router/Router.native.d.ts +1 -0
  222. package/dist/infrastructure/ui/routing/router/Router.native.js +1 -0
  223. package/dist/infrastructure/ui/routing/routes.d.ts +6 -0
  224. package/dist/infrastructure/ui/routing/routes.js +7 -0
  225. package/dist/infrastructure/ui/settings/UISettings.d.ts +4 -0
  226. package/dist/infrastructure/ui/settings/UISettings.js +5 -0
  227. package/dist/infrastructure/ui/shared/components/atoms/error/Error.d.ts +10 -0
  228. package/dist/infrastructure/ui/shared/components/atoms/error/Error.js +5 -0
  229. package/dist/infrastructure/ui/shared/components/atoms/error/Error.style.d.ts +6 -0
  230. package/dist/infrastructure/ui/shared/components/atoms/error/Error.style.js +9 -0
  231. package/dist/infrastructure/ui/shared/components/atoms/field/Field.d.ts +14 -0
  232. package/dist/infrastructure/ui/shared/components/atoms/field/Field.js +29 -0
  233. package/dist/infrastructure/ui/shared/components/atoms/field/Field.style.d.ts +14 -0
  234. package/dist/infrastructure/ui/shared/components/atoms/field/Field.style.js +17 -0
  235. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.d.ts +12 -0
  236. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.js +7 -0
  237. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.d.ts +13 -0
  238. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.js +16 -0
  239. package/dist/infrastructure/ui/shared/components/atoms/input/Input.d.ts +11 -0
  240. package/dist/infrastructure/ui/shared/components/atoms/input/Input.js +37 -0
  241. package/dist/infrastructure/ui/shared/components/atoms/input/Input.style.d.ts +19 -0
  242. package/dist/infrastructure/ui/shared/components/atoms/input/Input.style.js +26 -0
  243. package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.d.ts +3 -0
  244. package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.js +8 -0
  245. package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.style.d.ts +9 -0
  246. package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.style.js +10 -0
  247. package/dist/infrastructure/ui/shared/components/layouts/column/Column.d.ts +10 -0
  248. package/dist/infrastructure/ui/shared/components/layouts/column/Column.js +10 -0
  249. package/dist/infrastructure/ui/shared/components/layouts/column/Column.style.d.ts +12 -0
  250. package/dist/infrastructure/ui/shared/components/layouts/column/Column.style.js +23 -0
  251. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.d.ts +20 -0
  252. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.js +79 -0
  253. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.d.ts +58 -0
  254. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.js +70 -0
  255. package/dist/infrastructure/ui/shared/components/layouts/row/Row.d.ts +6 -0
  256. package/dist/infrastructure/ui/shared/components/layouts/row/Row.js +10 -0
  257. package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.d.ts +13 -0
  258. package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.js +17 -0
  259. package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.d.ts +14 -0
  260. package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.js +11 -0
  261. package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.style.d.ts +23 -0
  262. package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.style.js +27 -0
  263. package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.d.ts +20 -0
  264. package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.js +132 -0
  265. package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.style.d.ts +11 -0
  266. package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.style.js +12 -0
  267. package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.d.ts +14 -0
  268. package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.js +12 -0
  269. package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.style.d.ts +46 -0
  270. package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.style.js +33 -0
  271. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.d.ts +16 -0
  272. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.js +7 -0
  273. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.style.d.ts +7 -0
  274. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.style.js +10 -0
  275. package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.d.ts +25 -0
  276. package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.js +26 -0
  277. package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.style.d.ts +17 -0
  278. package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.style.js +20 -0
  279. package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.d.ts +26 -0
  280. package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.js +26 -0
  281. package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.style.d.ts +15 -0
  282. package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.style.js +18 -0
  283. package/dist/infrastructure/ui/shared/hooks/useScreenSize.d.ts +4 -0
  284. package/dist/infrastructure/ui/shared/hooks/useScreenSize.js +9 -0
  285. package/dist/infrastructure/ui/theme/theme.d.ts +10 -0
  286. package/dist/infrastructure/ui/theme/theme.js +5 -0
  287. package/dist/infrastructure/ui/views/App.d.ts +6 -0
  288. package/dist/infrastructure/ui/views/App.js +6 -0
  289. package/dist/infrastructure/ui/views/intro/Intro.d.ts +6 -0
  290. package/dist/infrastructure/ui/views/intro/Intro.js +51 -0
  291. package/dist/infrastructure/ui/views/intro/Intro.style.d.ts +52 -0
  292. package/dist/infrastructure/ui/views/intro/Intro.style.js +55 -0
  293. package/dist/infrastructure/ui/views/item/Item.d.ts +7 -0
  294. package/dist/infrastructure/ui/views/item/Item.js +97 -0
  295. package/dist/infrastructure/ui/views/item/Item.style.d.ts +15 -0
  296. package/dist/infrastructure/ui/views/item/Item.style.js +18 -0
  297. package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.d.ts +10 -0
  298. package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.js +21 -0
  299. package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.d.ts +17 -0
  300. package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.js +20 -0
  301. package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.d.ts +8 -0
  302. package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +34 -0
  303. package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +19 -0
  304. package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +22 -0
  305. package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.d.ts +18 -0
  306. package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.js +33 -0
  307. package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.style.d.ts +21 -0
  308. package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.style.js +24 -0
  309. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.d.ts +13 -0
  310. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.js +30 -0
  311. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.d.ts +23 -0
  312. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.js +27 -0
  313. package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.d.ts +12 -0
  314. package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +26 -0
  315. package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.d.ts +19 -0
  316. package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +22 -0
  317. package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.d.ts +7 -0
  318. package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js +22 -0
  319. package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.d.ts +25 -0
  320. package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.js +29 -0
  321. package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.d.ts +10 -0
  322. package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +32 -0
  323. package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.d.ts +12 -0
  324. package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.js +15 -0
  325. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +15 -0
  326. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +46 -0
  327. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +11 -0
  328. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +14 -0
  329. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.d.ts +7 -0
  330. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.js +25 -0
  331. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.d.ts +16 -0
  332. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.js +19 -0
  333. package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.d.ts +7 -0
  334. package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +25 -0
  335. package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.d.ts +16 -0
  336. package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.js +19 -0
  337. package/dist/infrastructure/ui/views/summary/Summary.d.ts +6 -0
  338. package/dist/infrastructure/ui/views/summary/Summary.js +18 -0
  339. package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.d.ts +7 -0
  340. package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.js +20 -0
  341. package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.style.d.ts +9 -0
  342. package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.style.js +12 -0
  343. package/dist/package.json +1 -1
  344. package/dist/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.d.ts +13 -0
  345. package/dist/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.js +1 -0
  346. package/dist/projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem.d.ts +25 -0
  347. package/dist/projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem.js +8 -0
  348. package/dist/projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem.d.ts +33 -0
  349. package/dist/projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem.js +8 -0
  350. package/dist/projection/checkout/checkout.d.ts +12 -0
  351. package/dist/projection/checkout/checkout.js +1 -0
  352. package/dist/projection/checkout/viewCheckoutById.d.ts +25 -0
  353. package/dist/projection/checkout/viewCheckoutById.js +8 -0
  354. package/dist/projection/checkout/viewFirstAvailableCheckoutByCustomerId.d.ts +25 -0
  355. package/dist/projection/checkout/viewFirstAvailableCheckoutByCustomerId.js +8 -0
  356. package/dist/projection/checkout/viewFiveItemsDiscountByCustomerId.d.ts +24 -0
  357. package/dist/projection/checkout/viewFiveItemsDiscountByCustomerId.js +8 -0
  358. package/dist/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +17 -0
  359. package/dist/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +13 -0
  360. package/dist/projection/checkout/viewIsCheckoutEnabledByCustomerId.d.ts +24 -0
  361. package/dist/projection/checkout/viewIsCheckoutEnabledByCustomerId.js +8 -0
  362. package/dist/projection/checkoutBooking/checkoutBooking.d.ts +6 -0
  363. package/dist/projection/checkoutBooking/checkoutBooking.js +1 -0
  364. package/dist/projection/checkoutBooking/viewCheckoutBookingById.d.ts +25 -0
  365. package/dist/projection/checkoutBooking/viewCheckoutBookingById.js +8 -0
  366. package/dist/projection/checkoutItem/checkoutItem.d.ts +53 -0
  367. package/dist/projection/checkoutItem/checkoutItem.js +17 -0
  368. package/dist/projection/checkoutItem/viewCheckoutItemById.d.ts +25 -0
  369. package/dist/projection/checkoutItem/viewCheckoutItemById.js +8 -0
  370. package/dist/projection/feedback/feedback.d.ts +3 -0
  371. package/dist/projection/feedback/feedback.js +1 -0
  372. package/dist/projection/returnQuestion/listReturnQuestionsByCheckoutItemId.d.ts +25 -0
  373. package/dist/projection/returnQuestion/listReturnQuestionsByCheckoutItemId.js +8 -0
  374. package/dist/projection/returnQuestion/returnQuestion.d.ts +17 -0
  375. package/dist/projection/returnQuestion/returnQuestion.js +11 -0
  376. package/dist/projection/shared/size.d.ts +10 -0
  377. package/dist/projection/shared/size.js +1 -0
  378. package/dist/projection/uiSetting/viewUiSettingByKey.d.ts +29 -0
  379. package/dist/projection/uiSetting/viewUiSettingByKey.js +8 -0
  380. package/dist/src/ExpoRoot.js +10 -2
  381. package/dist/src/domain/checkout/model/checkout.d.ts +2 -3
  382. package/dist/src/domain/checkout/model/checkout.js +0 -1
  383. package/dist/src/domain/checkoutBooking/model/checkoutBooking.d.ts +1 -5
  384. package/dist/src/domain/checkoutBooking/model/checkoutBooking.js +1 -17
  385. package/dist/src/domain/checkoutItem/command/replaceCheckoutItem.d.ts +1 -1
  386. package/dist/src/domain/checkoutItem/model/checkoutItem.d.ts +1 -1
  387. package/dist/src/domain/checkoutItem/model/checkoutItem.js +2 -2
  388. package/dist/src/infrastructure/delivery/baseBootstrap.d.ts +0 -2
  389. package/dist/src/infrastructure/delivery/baseBootstrap.js +2 -8
  390. package/dist/src/infrastructure/delivery/bootstrap.js +0 -2
  391. package/dist/src/infrastructure/delivery/mock/dataSourceCheckoutBookings.js +1 -5
  392. package/dist/src/infrastructure/delivery/mock/dataSourceCheckoutItems.js +0 -2
  393. package/dist/src/infrastructure/delivery/mock/dataSourceCheckouts.js +2 -2
  394. package/dist/src/infrastructure/domain/checkout/model/httpCheckouts.js +1 -1
  395. package/dist/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.js +2 -9
  396. package/dist/src/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.d.ts +13 -0
  397. package/dist/src/infrastructure/domain/checkoutBooking/react/{useBookCheckoutBookingForCheckoutItem.js → useBookCheckouBookingForCheckoutItem.js} +2 -2
  398. package/dist/src/infrastructure/domain/checkoutItem/model/httpCheckoutItems.js +1 -1
  399. package/dist/src/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReplace.js +2 -2
  400. package/dist/src/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.d.ts +1 -1
  401. package/dist/src/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.js +2 -2
  402. package/dist/src/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.js +1 -1
  403. package/dist/src/infrastructure/projection/checkout/checkout.d.ts +1 -1
  404. package/dist/src/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.js +1 -9
  405. package/dist/src/infrastructure/ui/Root.d.ts +2 -0
  406. package/dist/src/infrastructure/ui/Root.js +2 -2
  407. package/dist/src/infrastructure/ui/routing/CheckoutMiddleware.js +9 -7
  408. package/dist/src/infrastructure/ui/routing/Routing.d.ts +2 -0
  409. package/dist/src/infrastructure/ui/routing/Routing.js +2 -2
  410. package/dist/src/infrastructure/ui/views/App.d.ts +2 -0
  411. package/dist/src/infrastructure/ui/views/App.js +2 -2
  412. package/dist/src/infrastructure/ui/views/header/Header.d.ts +7 -0
  413. package/dist/src/infrastructure/ui/views/header/Header.js +8 -6
  414. package/dist/src/infrastructure/ui/views/item/Item.js +25 -49
  415. package/dist/src/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.js +4 -7
  416. package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +2 -2
  417. package/dist/src/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.d.ts +1 -0
  418. package/dist/src/projection/checkout/checkout.d.ts +1 -1
  419. package/dist/src/projection/checkoutBooking/checkoutBooking.d.ts +0 -2
  420. package/dist/src/projection/checkoutItem/checkoutItem.d.ts +1 -1
  421. package/dist/src/projection/pricing/pricing.d.ts +3 -3
  422. package/package.json +1 -1
  423. package/dist/src/domain/checkoutBooking/command/blockCheckoutBooking.d.ts +0 -13
  424. package/dist/src/domain/checkoutBooking/command/blockCheckoutBooking.js +0 -4
  425. package/dist/src/domain/checkoutBooking/model/checkoutBookingBlocked.d.ts +0 -13
  426. package/dist/src/domain/checkoutBooking/model/checkoutBookingBlocked.js +0 -4
  427. package/dist/src/domain/checkoutBooking/model/checkoutBookingExpired.d.ts +0 -13
  428. package/dist/src/domain/checkoutBooking/model/checkoutBookingExpired.js +0 -4
  429. package/dist/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBlock.d.ts +0 -5
  430. package/dist/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBlock.js +0 -15
  431. package/dist/src/infrastructure/domain/checkoutBooking/react/useBlockCheckoutBooking.d.ts +0 -13
  432. package/dist/src/infrastructure/domain/checkoutBooking/react/useBlockCheckoutBooking.js +0 -12
  433. package/dist/src/infrastructure/domain/checkoutBooking/react/useBookCheckoutBookingForCheckoutItem.d.ts +0 -13
@@ -0,0 +1,12 @@
1
+ import { IsCheckoutEnabledByCustomerIdView } from "../../../projection/checkout/viewIsCheckoutEnabledByCustomerId";
2
+ import { HttpGetFunction } from "../../delivery/http/httpClient";
3
+ interface HttpIsCheckoutEnabledByCustomerIdView extends IsCheckoutEnabledByCustomerIdView {
4
+ }
5
+ interface HttpIsCheckoutEnabledByCustomerIdViewFunctionArgs {
6
+ readonly httpGet: HttpGetFunction;
7
+ }
8
+ interface HttpIsCheckoutEnabledByCustomerIdViewFunction {
9
+ (args: HttpIsCheckoutEnabledByCustomerIdViewFunctionArgs): HttpIsCheckoutEnabledByCustomerIdView;
10
+ }
11
+ declare const httpIsCheckoutEnabledByCustomerIdView: HttpIsCheckoutEnabledByCustomerIdViewFunction;
12
+ export { httpIsCheckoutEnabledByCustomerIdView };
@@ -0,0 +1,8 @@
1
+ const httpIsCheckoutEnabledByCustomerIdView = ({ httpGet }) => async ({ customerId, signal }) => {
2
+ const response = await httpGet({
3
+ endpoint: `/is-new-checkout-enabled/${customerId}`,
4
+ signal,
5
+ });
6
+ return !response.ok ? false : await response.json();
7
+ };
8
+ export { httpIsCheckoutEnabledByCustomerIdView };
@@ -0,0 +1,10 @@
1
+ import { UseQueryFunctionResult } from "@lookiero/messaging-react";
2
+ import { CheckoutProjection } from "../../../../projection/checkout/checkout";
3
+ interface UseViewFirstAvailableCheckoutByCustomerIdFunctionArgs {
4
+ readonly customerId: string;
5
+ }
6
+ interface UseViewFirstAvailableCheckoutByCustomerIdFunction {
7
+ (args: UseViewFirstAvailableCheckoutByCustomerIdFunctionArgs): UseQueryFunctionResult<CheckoutProjection>;
8
+ }
9
+ declare const useViewFirstAvailableCheckoutByCustomerId: UseViewFirstAvailableCheckoutByCustomerIdFunction;
10
+ export { useViewFirstAvailableCheckoutByCustomerId };
@@ -0,0 +1,14 @@
1
+ import { useQuery } from "@lookiero/messaging-react";
2
+ import { CHECKOUT_ITEM_KEPT } from "../../../../domain/checkoutItem/model/checkoutItemKept";
3
+ import { CHECKOUT_ITEM_RETURNED, } from "../../../../domain/checkoutItem/model/checkoutItemReturned";
4
+ import { viewFirstAvailableCheckoutByCustomerId } from "../../../../projection/checkout/viewFirstAvailableCheckoutByCustomerId";
5
+ import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
6
+ const isCheckoutItemKept = (event) => event.name === CHECKOUT_ITEM_KEPT;
7
+ const isCheckoutItemReturned = (event) => event.name === CHECKOUT_ITEM_RETURNED;
8
+ const useViewFirstAvailableCheckoutByCustomerId = ({ customerId }) => useQuery({
9
+ query: viewFirstAvailableCheckoutByCustomerId({ customerId }),
10
+ contextId: MESSAGING_CONTEXT_ID,
11
+ invalidation: isCheckoutItemKept || isCheckoutItemReturned,
12
+ options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
13
+ });
14
+ export { useViewFirstAvailableCheckoutByCustomerId };
@@ -0,0 +1,10 @@
1
+ import { UseQueryFunctionResult } from "@lookiero/messaging-react";
2
+ import { FiveItemsDiscountByCustomerIdProjection } from "../../../../projection/checkout/viewFiveItemsDiscountByCustomerId";
3
+ interface UseViewFiveItemsDiscountByCustomerIdFunctionArgs {
4
+ readonly customerId: string;
5
+ }
6
+ interface UseViewFiveItemsDiscountByCustomerIdFunction {
7
+ (args: UseViewFiveItemsDiscountByCustomerIdFunctionArgs): UseQueryFunctionResult<FiveItemsDiscountByCustomerIdProjection>;
8
+ }
9
+ declare const useViewFiveItemsDiscountByCustomerId: UseViewFiveItemsDiscountByCustomerIdFunction;
10
+ export { useViewFiveItemsDiscountByCustomerId };
@@ -0,0 +1,9 @@
1
+ import { useQuery } from "@lookiero/messaging-react";
2
+ import { viewFiveItemsDiscountByCustomerId, } from "../../../../projection/checkout/viewFiveItemsDiscountByCustomerId";
3
+ import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
4
+ const useViewFiveItemsDiscountByCustomerId = ({ customerId }) => useQuery({
5
+ query: viewFiveItemsDiscountByCustomerId({ customerId }),
6
+ contextId: MESSAGING_CONTEXT_ID,
7
+ options: { staleTime: Infinity },
8
+ });
9
+ export { useViewFiveItemsDiscountByCustomerId };
@@ -0,0 +1,10 @@
1
+ import { UseQueryFunctionResult } from "@lookiero/messaging-react";
2
+ import { IsCheckoutAccessibleByCustomerIdProjection } from "../../../../projection/checkout/viewIsCheckoutAccessibleByCustomerId";
3
+ interface UseViewIsCheckoutAccessibleByCustomerIdFunctionArgs {
4
+ readonly customerId: string | undefined;
5
+ }
6
+ interface UseViewIsCheckoutAccessibleByCustomerIdFunction {
7
+ (args: UseViewIsCheckoutAccessibleByCustomerIdFunctionArgs): UseQueryFunctionResult<IsCheckoutAccessibleByCustomerIdProjection>;
8
+ }
9
+ declare const useViewIsCheckoutAccessibleByCustomerId: UseViewIsCheckoutAccessibleByCustomerIdFunction;
10
+ export { useViewIsCheckoutAccessibleByCustomerId };
@@ -0,0 +1,9 @@
1
+ import { useQuery } from "@lookiero/messaging-react";
2
+ import { viewIsCheckoutAccessibleByCustomerId, } from "../../../../projection/checkout/viewIsCheckoutAccessibleByCustomerId";
3
+ import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
4
+ const useViewIsCheckoutAccessibleByCustomerId = ({ customerId }) => useQuery({
5
+ query: viewIsCheckoutAccessibleByCustomerId({ customerId }),
6
+ contextId: MESSAGING_CONTEXT_ID,
7
+ options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
8
+ });
9
+ export { useViewIsCheckoutAccessibleByCustomerId };
@@ -0,0 +1,12 @@
1
+ import { CheckoutBookingByIdView } from "../../../projection/checkoutBooking/viewCheckoutBookingById";
2
+ import { HttpPostFunction } from "../../delivery/http/httpClient";
3
+ interface HttpCheckoutBookingByIdView extends CheckoutBookingByIdView {
4
+ }
5
+ interface HttpCheckoutBookingByIdViewFunctionArgs {
6
+ readonly httpPost: HttpPostFunction;
7
+ }
8
+ interface HttpCheckoutBookingByIdViewFunction {
9
+ (args: HttpCheckoutBookingByIdViewFunctionArgs): HttpCheckoutBookingByIdView;
10
+ }
11
+ declare const httpCheckoutBookingByIdView: HttpCheckoutBookingByIdViewFunction;
12
+ export { httpCheckoutBookingByIdView };
@@ -0,0 +1,9 @@
1
+ const httpCheckoutBookingByIdView = ({ httpPost }) => async ({ checkoutBookingId, signal }) => {
2
+ const response = await httpPost({
3
+ endpoint: "/view-checkout-booking-by-id",
4
+ body: { checkoutBookingId },
5
+ signal,
6
+ });
7
+ return !response.ok || response.status === 404 ? null : (await response.json()).result;
8
+ };
9
+ export { httpCheckoutBookingByIdView };
@@ -0,0 +1,45 @@
1
+ import { CheckoutItemStatus } from "../../../domain/checkoutItem/model/checkoutItem";
2
+ import { CheckoutItemProjection, Currency, MediaPerspective } from "../../../projection/checkoutItem/checkoutItem";
3
+ interface CheckoutItemDto {
4
+ readonly id: string;
5
+ readonly status: CheckoutItemStatus;
6
+ readonly price: {
7
+ readonly amount: number;
8
+ readonly currency: Currency;
9
+ readonly discounted_price?: {
10
+ readonly amount: number;
11
+ readonly percentage: number;
12
+ };
13
+ };
14
+ readonly replaced_for?: string;
15
+ readonly feedback: Record<string, string>;
16
+ readonly product_variant: {
17
+ readonly id: string;
18
+ readonly media: {
19
+ readonly id: string;
20
+ readonly url: string;
21
+ readonly perspective: MediaPerspective;
22
+ }[];
23
+ readonly brand: string;
24
+ readonly name: string;
25
+ readonly size: {
26
+ readonly id: string;
27
+ readonly lookiero: string;
28
+ readonly uk: string;
29
+ readonly it: string;
30
+ readonly europe: string;
31
+ readonly unique: boolean;
32
+ readonly visual_order?: number;
33
+ };
34
+ readonly color: {
35
+ readonly id: string;
36
+ readonly label: string;
37
+ };
38
+ };
39
+ }
40
+ interface ToCheckoutItemProjectionFunction {
41
+ (checkoutItemDto: CheckoutItemDto): CheckoutItemProjection;
42
+ }
43
+ declare const toCheckoutItemProjection: ToCheckoutItemProjectionFunction;
44
+ export type { CheckoutItemDto };
45
+ export { toCheckoutItemProjection };
@@ -0,0 +1,40 @@
1
+ const toCheckoutItemProjection = (checkoutItemDto) => ({
2
+ id: checkoutItemDto.id,
3
+ status: checkoutItemDto.status,
4
+ price: {
5
+ amount: checkoutItemDto.price.amount,
6
+ currency: checkoutItemDto.price.currency,
7
+ discountedPrice: checkoutItemDto.price.discounted_price
8
+ ? {
9
+ amount: checkoutItemDto.price.discounted_price.amount,
10
+ percentage: checkoutItemDto.price.discounted_price.percentage,
11
+ }
12
+ : undefined,
13
+ },
14
+ replacedFor: checkoutItemDto.replaced_for,
15
+ feedback: checkoutItemDto.feedback,
16
+ productVariant: {
17
+ id: checkoutItemDto.product_variant.id,
18
+ media: checkoutItemDto.product_variant.media.map((media) => ({
19
+ id: media.id,
20
+ url: media.url,
21
+ perspective: media.perspective,
22
+ })),
23
+ brand: checkoutItemDto.product_variant.brand,
24
+ name: checkoutItemDto.product_variant.name,
25
+ size: {
26
+ id: checkoutItemDto.product_variant.size.id,
27
+ lookiero: checkoutItemDto.product_variant.size.lookiero,
28
+ uk: checkoutItemDto.product_variant.size.uk,
29
+ it: checkoutItemDto.product_variant.size.it,
30
+ europe: checkoutItemDto.product_variant.size.europe,
31
+ unique: checkoutItemDto.product_variant.size.unique,
32
+ visualOrder: checkoutItemDto.product_variant.size.visual_order,
33
+ },
34
+ color: {
35
+ id: checkoutItemDto.product_variant.color.id,
36
+ label: checkoutItemDto.product_variant.color.label,
37
+ },
38
+ },
39
+ });
40
+ export { toCheckoutItemProjection };
@@ -0,0 +1,12 @@
1
+ import { CheckoutItemByIdView } from "../../../projection/checkoutItem/viewCheckoutItemById";
2
+ import { HttpPostFunction } from "../../delivery/http/httpClient";
3
+ interface HttpCheckoutItemByIdView extends CheckoutItemByIdView {
4
+ }
5
+ interface HttpCheckoutItemByIdViewFunctionArgs {
6
+ readonly httpPost: HttpPostFunction;
7
+ }
8
+ interface HttpCheckoutItemByIdViewFunction {
9
+ (args: HttpCheckoutItemByIdViewFunctionArgs): HttpCheckoutItemByIdView;
10
+ }
11
+ declare const httpCheckoutItemByIdView: HttpCheckoutItemByIdViewFunction;
12
+ export { httpCheckoutItemByIdView };
@@ -0,0 +1,9 @@
1
+ const httpCheckoutItemByIdView = ({ httpPost }) => async ({ checkoutItemId, signal }) => {
2
+ const response = await httpPost({
3
+ endpoint: "/view-checkout-item-by-id",
4
+ body: { checkoutItemId },
5
+ signal,
6
+ });
7
+ return !response.ok || response.status === 404 ? null : (await response.json()).result;
8
+ };
9
+ export { httpCheckoutItemByIdView };
@@ -0,0 +1,3 @@
1
+ import { FeedbackProjection } from "../../../projection/feedback/feedback";
2
+ declare const feedback: FeedbackProjection;
3
+ export { feedback };
@@ -0,0 +1,6 @@
1
+ const feedback = {
2
+ ["0ad1dba8-b02c-4121-a1e3-981f1c30800d"]: "9251dc2c-d76a-484d-9299-346929af932f",
3
+ ["542c4d24-e1da-484f-8c3a-7d89ee135adc"]: "68c0bb98-b00a-4b86-af43-528fe903cb69",
4
+ ["1123a37d-bc00-43a4-9d28-cee1dfaf356c"]: "Free text comment",
5
+ };
6
+ export { feedback };
@@ -0,0 +1,12 @@
1
+ import { ReturnQuestionsByCheckoutItemIdView } from "../../../projection/returnQuestion/listReturnQuestionsByCheckoutItemId";
2
+ import { HttpPostFunction } from "../../delivery/http/httpClient";
3
+ interface HttpReturnQuestionsByCheckoutItemIdView extends ReturnQuestionsByCheckoutItemIdView {
4
+ }
5
+ interface HttpReturnQuestionsByCheckoutItemIdViewFunctionArgs {
6
+ readonly httpPost: HttpPostFunction;
7
+ }
8
+ interface HttpReturnQuestionsByCheckoutItemIdViewFunction {
9
+ (args: HttpReturnQuestionsByCheckoutItemIdViewFunctionArgs): HttpReturnQuestionsByCheckoutItemIdView;
10
+ }
11
+ declare const httpReturnQuestionsByCheckoutItemIdView: HttpReturnQuestionsByCheckoutItemIdViewFunction;
12
+ export { httpReturnQuestionsByCheckoutItemIdView };
@@ -0,0 +1,9 @@
1
+ const httpReturnQuestionsByCheckoutItemIdView = ({ httpPost }) => async ({ checkoutItemId, signal }) => {
2
+ const response = await httpPost({
3
+ endpoint: "/list-return-questions-by-checkout-item-id",
4
+ body: { checkoutItemId },
5
+ signal,
6
+ });
7
+ return !response.ok || response.status === 404 ? null : (await response.json()).result;
8
+ };
9
+ export { httpReturnQuestionsByCheckoutItemIdView };
@@ -0,0 +1,10 @@
1
+ import { UseQueryFunctionResult } from "@lookiero/messaging-react";
2
+ import { ReturnQuestionProjection } from "../../../../projection/returnQuestion/returnQuestion";
3
+ interface UseListReturnQuestionsByCheckoutItemIdFunctionArgs {
4
+ readonly checkoutItemId: string;
5
+ }
6
+ interface UseListReturnQuestionsByCheckoutItemIdFunction {
7
+ (args: UseListReturnQuestionsByCheckoutItemIdFunctionArgs): UseQueryFunctionResult<ReturnQuestionProjection[]>;
8
+ }
9
+ declare const useListReturnQuestionsByCheckoutItemId: UseListReturnQuestionsByCheckoutItemIdFunction;
10
+ export { useListReturnQuestionsByCheckoutItemId };
@@ -0,0 +1,9 @@
1
+ import { useQuery } from "@lookiero/messaging-react";
2
+ import { listReturnQuestionsByCheckoutItemId } from "../../../../projection/returnQuestion/listReturnQuestionsByCheckoutItemId";
3
+ import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
4
+ const useListReturnQuestionsByCheckoutItemId = ({ checkoutItemId }) => useQuery({
5
+ query: listReturnQuestionsByCheckoutItemId({ checkoutItemId }),
6
+ contextId: MESSAGING_CONTEXT_ID,
7
+ options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
8
+ });
9
+ export { useListReturnQuestionsByCheckoutItemId };
@@ -0,0 +1,14 @@
1
+ import { ReturnQuestionProjection, ReturnQuestionType } from "../../../projection/returnQuestion/returnQuestion";
2
+ interface ReturnQuestionDto {
3
+ readonly id: string;
4
+ readonly name: string;
5
+ readonly placeholder?: string;
6
+ readonly type: ReturnQuestionType;
7
+ readonly children?: ReturnQuestionDto[];
8
+ }
9
+ interface ToReturnQuestionsProjectionFunction {
10
+ (returnQuestionsDto: ReturnQuestionDto[]): ReturnQuestionProjection[];
11
+ }
12
+ declare const toReturnQuestionsProjection: ToReturnQuestionsProjectionFunction;
13
+ export type { ReturnQuestionDto };
14
+ export { toReturnQuestionsProjection };
@@ -0,0 +1,9 @@
1
+ const toReturnQuestionProjection = (returnQuestionDto) => ({
2
+ id: returnQuestionDto.id,
3
+ name: returnQuestionDto.name,
4
+ placeholder: returnQuestionDto.placeholder,
5
+ type: returnQuestionDto.type,
6
+ children: returnQuestionDto.children ? toReturnQuestionsProjection(returnQuestionDto.children) : undefined,
7
+ });
8
+ const toReturnQuestionsProjection = (returnQuestionsDto) => returnQuestionsDto.map(toReturnQuestionProjection);
9
+ export { toReturnQuestionsProjection };
@@ -0,0 +1,6 @@
1
+ import { QueryStatus } from "@lookiero/messaging-react";
2
+ interface UseShouldIntroBeShownFunction {
3
+ (): [boolean, QueryStatus];
4
+ }
5
+ declare const useShouldIntroBeShown: UseShouldIntroBeShownFunction;
6
+ export { useShouldIntroBeShown };
@@ -0,0 +1,7 @@
1
+ import { useViewIntroShownCount } from "./useViewIntroShownCount";
2
+ const MAX_INTRO_SHOWN_COUNT = 2;
3
+ const useShouldIntroBeShown = () => {
4
+ const [introShownCount, introShownCountStatus] = useViewIntroShownCount();
5
+ return [introShownCount < MAX_INTRO_SHOWN_COUNT, introShownCountStatus];
6
+ };
7
+ export { useShouldIntroBeShown };
@@ -0,0 +1,6 @@
1
+ import { QueryStatus } from "@lookiero/messaging-react";
2
+ interface UseViewIntroShownCountFunction {
3
+ (): [number, QueryStatus];
4
+ }
5
+ declare const useViewIntroShownCount: UseViewIntroShownCountFunction;
6
+ export { useViewIntroShownCount };
@@ -0,0 +1,9 @@
1
+ import { UISettings } from "../../../ui/settings/UISettings";
2
+ import { useViewUiSettingByKey } from "./useViewUiSettingByKey";
3
+ const useViewIntroShownCount = () => {
4
+ const [introShownCount, introShownCountStatus] = useViewUiSettingByKey({
5
+ key: UISettings.INTRO_SHOWN_COUNT,
6
+ });
7
+ return [introShownCount?.value || 0, introShownCountStatus];
8
+ };
9
+ export { useViewIntroShownCount };
@@ -0,0 +1,10 @@
1
+ import { UseQueryFunctionResult } from "@lookiero/messaging-react";
2
+ import { UiSettingProjection } from "../../../../projection/uiSetting/viewUiSettingByKey";
3
+ interface UseViewUiSettingByKeyFunctionArgs {
4
+ readonly key: string;
5
+ }
6
+ interface UseViewUiSettingByKeyFunction {
7
+ (args: UseViewUiSettingByKeyFunctionArgs): UseQueryFunctionResult<UiSettingProjection>;
8
+ }
9
+ declare const useViewUiSettingByKey: UseViewUiSettingByKeyFunction;
10
+ export { useViewUiSettingByKey };
@@ -0,0 +1,12 @@
1
+ import { useQuery } from "@lookiero/messaging-react";
2
+ import { UI_SETTING_UPDATED } from "../../../../domain/uiSetting/model/uiSettingUpdated";
3
+ import { viewUiSettingByKey } from "../../../../projection/uiSetting/viewUiSettingByKey";
4
+ import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
5
+ const isUiSettingUpdated = (event) => event.name === UI_SETTING_UPDATED;
6
+ const useViewUiSettingByKey = ({ key }) => useQuery({
7
+ query: viewUiSettingByKey({ key }),
8
+ contextId: MESSAGING_CONTEXT_ID,
9
+ invalidation: isUiSettingUpdated,
10
+ options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
11
+ });
12
+ export { useViewUiSettingByKey };
@@ -0,0 +1,13 @@
1
+ import { UiSettingByKeyView } from "../../../projection/uiSetting/viewUiSettingByKey";
2
+ import { ReadFunction } from "../../persistence/storage";
3
+ import { UiSettingDto } from "../../persistence/uiSettingData";
4
+ interface StorageUiSettingByKeyView extends UiSettingByKeyView {
5
+ }
6
+ interface StorageUiSettingByKeyViewFunctionArgs {
7
+ readonly read: ReadFunction<UiSettingDto>;
8
+ }
9
+ interface StorageUiSettingByKeyViewFunction {
10
+ (args: StorageUiSettingByKeyViewFunctionArgs): StorageUiSettingByKeyView;
11
+ }
12
+ declare const storageUiSettingByKeyView: StorageUiSettingByKeyViewFunction;
13
+ export { storageUiSettingByKeyView };
@@ -0,0 +1,15 @@
1
+ const toUiSettingProjection = (uiSettingDto) => ({
2
+ id: uiSettingDto.id,
3
+ key: uiSettingDto.key,
4
+ value: uiSettingDto.value,
5
+ });
6
+ const storageUiSettingByKeyView = ({ read }) => async ({ key }) => {
7
+ try {
8
+ const uiSettingDto = await read(key);
9
+ return uiSettingDto ? toUiSettingProjection(uiSettingDto) : null;
10
+ }
11
+ catch (ignored) {
12
+ throw new Error("Could not fetch the uiSetting");
13
+ }
14
+ };
15
+ export { storageUiSettingByKeyView };
@@ -0,0 +1,20 @@
1
+ import { I18n } from "@lookiero/i18n-react";
2
+ import { MessagingRoot } from "@lookiero/messaging-react/bootstrap";
3
+ import { FC } from "react";
4
+ interface RootFunctionArgs {
5
+ readonly Messaging: MessagingRoot;
6
+ readonly I18n: I18n;
7
+ readonly development?: boolean;
8
+ }
9
+ interface RootFunction {
10
+ (args: RootFunctionArgs): FC<RootProps>;
11
+ }
12
+ interface RootProps {
13
+ readonly basePath: string;
14
+ readonly locale?: string;
15
+ readonly customerId: string | undefined;
16
+ readonly onNotAccessible: () => void;
17
+ }
18
+ declare const root: RootFunction;
19
+ export type { RootProps };
20
+ export { root };
@@ -0,0 +1,11 @@
1
+ import React, { useCallback } from "react";
2
+ import { Platform } from "react-native";
3
+ import { Routing } from "./routing/Routing";
4
+ const root = ({ Messaging, I18n, development }) =>
5
+ // eslint-disable-next-line react/display-name, react/prop-types
6
+ ({ basePath, locale = "en", customerId, onNotAccessible }) => {
7
+ const handleOnI18nError = useCallback(() => void 0, []);
8
+ return (React.createElement(Messaging, { includeReactQueryDevTools: Platform.OS === "web" },
9
+ React.createElement(Routing, { I18n: I18n, basePath: basePath, customerId: customerId, locale: locale, onI18nError: development ? undefined : handleOnI18nError, onNotAccessible: onNotAccessible })));
10
+ };
11
+ export { root };
@@ -0,0 +1,12 @@
1
+ import { FC } from "react";
2
+ import { TextProps } from "react-native";
3
+ import { PriceProjection } from "../../../../../projection/checkoutItem/checkoutItem";
4
+ declare type PriceStyle = "priceText" | "discountedText";
5
+ declare type PriceVariant = "default" | "detail" | "subtotal" | "total";
6
+ interface PriceProps {
7
+ readonly price: PriceProjection;
8
+ readonly variant?: PriceVariant;
9
+ readonly style?: Partial<Record<PriceStyle, TextProps>>;
10
+ }
11
+ declare const Price: FC<PriceProps>;
12
+ export { Price };
@@ -0,0 +1,28 @@
1
+ import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
2
+ import { useI18nNumber } from "@lookiero/i18n-react";
3
+ import React from "react";
4
+ import { View } from "react-native";
5
+ import { style } from "./Price.style";
6
+ const PRICE_VARIANT = {
7
+ default: { body: true, level: 3 },
8
+ detail: { detail: true, level: 2 },
9
+ subtotal: { action: true, level: 3 },
10
+ total: { action: true, level: 2 },
11
+ };
12
+ const Price = ({ price, variant = "default", style: customStyle }) => {
13
+ const isDiscounted = price.discountedPrice && price.discountedPrice.percentage !== 0;
14
+ const productPrice = useI18nNumber({
15
+ value: price.amount / 100,
16
+ style: "currency",
17
+ currency: price.currency,
18
+ });
19
+ const productDiscountedPrice = useI18nNumber({
20
+ value: (price.discountedPrice?.amount || 0) / 100,
21
+ style: "currency",
22
+ currency: price.currency,
23
+ });
24
+ return (React.createElement(View, { style: style.price, testID: "price" },
25
+ React.createElement(Text, { ...PRICE_VARIANT[variant], style: [isDiscounted && style.priceTextDiscounted, customStyle?.priceText], testID: "price-text" }, productPrice),
26
+ isDiscounted && (React.createElement(Text, { ...PRICE_VARIANT[variant], style: [style.discountedPriceText, customStyle?.discountedText], testID: "discounted-price-text" }, productDiscountedPrice))));
27
+ };
28
+ export { Price };
@@ -0,0 +1,13 @@
1
+ declare const style: {
2
+ discountedPriceText: {
3
+ color: string;
4
+ marginLeft: number;
5
+ };
6
+ price: {
7
+ flexDirection: "row";
8
+ };
9
+ priceTextDiscounted: {
10
+ textDecorationLine: "line-through";
11
+ };
12
+ };
13
+ export { style };
@@ -0,0 +1,16 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { theme } from "../../../theme/theme";
3
+ const { colorPrimary, spaceS } = theme();
4
+ const style = StyleSheet.create({
5
+ discountedPriceText: {
6
+ color: colorPrimary,
7
+ marginLeft: spaceS,
8
+ },
9
+ price: {
10
+ flexDirection: "row",
11
+ },
12
+ priceTextDiscounted: {
13
+ textDecorationLine: "line-through",
14
+ },
15
+ });
16
+ export { style };
@@ -0,0 +1,9 @@
1
+ import { FC, ReactNode } from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ declare type BodyStyle = "row" | "column";
4
+ interface BodyProps {
5
+ readonly children: ReactNode;
6
+ readonly style?: Partial<Record<BodyStyle, StyleProp<ViewStyle>>>;
7
+ }
8
+ declare const Body: FC<BodyProps>;
9
+ export { Body };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { Column } from "../../../shared/components/layouts/column/Column";
3
+ import { Row } from "../../../shared/components/layouts/row/Row";
4
+ import { style } from "./Body.style";
5
+ const Body = ({ children, style: customStyle }) => (React.createElement(Row, { style: [style.row, customStyle?.row] },
6
+ React.createElement(Column, { style: customStyle?.column }, children)));
7
+ export { Body };
@@ -0,0 +1,7 @@
1
+ declare const style: {
2
+ row: {
3
+ flex: number;
4
+ justifyContent: "center";
5
+ };
6
+ };
7
+ export { style };
@@ -0,0 +1,8 @@
1
+ import { StyleSheet } from "react-native";
2
+ const style = StyleSheet.create({
3
+ row: {
4
+ flex: 1,
5
+ justifyContent: "center",
6
+ },
7
+ });
8
+ export { style };
@@ -0,0 +1,26 @@
1
+ import { FC, ReactNode } from "react";
2
+ import { StyleProp, TextStyle, ViewStyle } from "react-native";
3
+ interface TabStyle {
4
+ readonly tab: StyleProp<ViewStyle>;
5
+ readonly tabText: StyleProp<TextStyle>;
6
+ }
7
+ interface TabListStyle {
8
+ readonly tabList: StyleProp<ViewStyle>;
9
+ readonly indicator: StyleProp<ViewStyle>;
10
+ readonly tab: Partial<TabStyle>;
11
+ }
12
+ interface TabsStyle {
13
+ readonly tabContainer: StyleProp<ViewStyle>;
14
+ readonly sliderContainer: StyleProp<ViewStyle>;
15
+ readonly tabList: Partial<TabListStyle>;
16
+ }
17
+ interface TabsProps {
18
+ readonly children: JSX.Element[];
19
+ readonly defaultIndex?: number;
20
+ readonly tabLabels: string[];
21
+ readonly style?: Partial<TabsStyle>;
22
+ readonly onChanged?: (index: number) => void;
23
+ readonly tabLabelsWrapper?: (children: ReactNode) => ReactNode;
24
+ }
25
+ declare const Tabs: FC<TabsProps>;
26
+ export { Tabs };
@@ -0,0 +1,47 @@
1
+ import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
2
+ import { animated, useSpring } from "@react-spring/native";
3
+ import React, { Children, useCallback, useState } from "react";
4
+ import { Pressable, View } from "react-native";
5
+ import invariant from "tiny-invariant";
6
+ import { Slider } from "../../../shared/components/layouts/slider/Slider";
7
+ import { style } from "./Tabs.style";
8
+ const Tab = ({ children, active, disabled = false, style: customStyle, onPress, onLayout }) => (React.createElement(Pressable, { disabled: disabled, style: [style.tab, customStyle?.tab], testID: "tab", onLayout: onLayout, onPress: onPress },
9
+ React.createElement(Text, { level: 2, style: [style.tabText, active && style.tabActiveText, customStyle?.tabText], detail: true }, children)));
10
+ const TabList = ({ labels = [], tabIndex = 0, style: customStyle, onSelect }) => {
11
+ const [tabItemPositions, setTabItemPositions] = useState([]);
12
+ const handleOnLayout = useCallback(({ nativeEvent: { layout: { width, x }, }, }, index) => setTabItemPositions((prevState) => [
13
+ ...prevState.slice(0, index),
14
+ {
15
+ position: x,
16
+ width,
17
+ },
18
+ ...prevState.slice(index),
19
+ ]), []);
20
+ const springs = useSpring({
21
+ width: tabItemPositions[tabIndex]?.width,
22
+ left: tabItemPositions[tabIndex]?.position,
23
+ });
24
+ return (React.createElement(View, { style: [style.tabs, customStyle?.tabList], testID: "tab-list" },
25
+ labels.map((item, index) => (React.createElement(Tab, { key: index, active: tabIndex === index, style: customStyle?.tab, onLayout: (event) => handleOnLayout(event, index), onPress: () => onSelect?.(index) }, item))),
26
+ React.createElement(animated.View, { style: [
27
+ style.indicator,
28
+ {
29
+ width: springs.width,
30
+ left: springs.left,
31
+ },
32
+ customStyle?.indicator,
33
+ ] })));
34
+ };
35
+ const Tabs = ({ children, defaultIndex = 0, tabLabels, style: customStyle, onChanged, tabLabelsWrapper = (children) => children, }) => {
36
+ invariant(Children.count(children) === tabLabels.length, "Children and tab labels must be the same length");
37
+ const [active, setActive] = useState(defaultIndex);
38
+ const handleOnActiveChanged = useCallback((activeIndex) => {
39
+ setActive(activeIndex);
40
+ onChanged?.(activeIndex);
41
+ }, [onChanged]);
42
+ return (React.createElement(View, { style: [style.container, customStyle?.tabContainer], testID: "tabs" },
43
+ tabLabelsWrapper(React.createElement(TabList, { labels: tabLabels, style: customStyle?.tabList, tabIndex: active, onSelect: handleOnActiveChanged })),
44
+ React.createElement(View, { style: customStyle?.sliderContainer },
45
+ React.createElement(Slider, { active: active, gesturesEnabled: false, paginationEnabled: false, onChanged: handleOnActiveChanged }, children))));
46
+ };
47
+ export { Tabs };