@lookiero/checkout 9.8.5 → 9.9.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 (139) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/pact.config.d.ts +21 -0
  3. package/dist/pact.config.js +16 -0
  4. package/dist/public/public/assets/adaptive-icon.png +0 -0
  5. package/dist/public/public/assets/favicon.png +0 -0
  6. package/dist/public/public/assets/icon.png +0 -0
  7. package/dist/public/public/assets/splash.png +0 -0
  8. package/dist/public/public/images/not-found.png +0 -0
  9. package/dist/src/ExpoRoot.js +6 -4
  10. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.d.ts +1 -0
  11. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +55 -0
  12. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.d.ts +1 -0
  13. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +116 -0
  14. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.d.ts +1 -0
  15. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +56 -0
  16. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.d.ts +1 -0
  17. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +51 -0
  18. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.d.ts +1 -0
  19. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +51 -0
  20. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.d.ts +1 -0
  21. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +51 -0
  22. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +13 -0
  23. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +19 -0
  24. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.d.ts +1 -0
  25. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +56 -0
  26. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.d.ts +1 -0
  27. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +57 -0
  28. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.d.ts +1 -0
  29. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +55 -0
  30. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.d.ts +1 -0
  31. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +120 -0
  32. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.d.ts +1 -0
  33. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +55 -0
  34. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.d.ts +1 -0
  35. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +55 -0
  36. package/dist/src/infrastructure/ui/Root.d.ts +0 -2
  37. package/dist/src/infrastructure/ui/Root.js +2 -4
  38. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +22 -0
  39. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +1 -0
  40. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +7 -0
  41. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +5 -0
  42. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +7 -0
  43. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +6 -0
  44. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +4 -0
  45. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +20 -0
  46. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +4 -0
  47. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +43 -0
  48. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +12 -0
  49. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +14 -0
  50. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.js +1 -1
  51. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.d.ts +1 -0
  52. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.js +1 -0
  53. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +1 -1
  54. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.d.ts +1 -0
  55. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.js +1 -0
  56. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +7 -0
  57. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +21 -0
  58. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +8 -0
  59. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +12 -0
  60. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +12 -0
  61. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +64 -0
  62. package/dist/src/infrastructure/ui/hooks/usePaymentInstrumentEvents.d.ts +3 -2
  63. package/dist/src/infrastructure/ui/hooks/usePaymentInstrumentEvents.js +17 -26
  64. package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.d.ts +1 -1
  65. package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.js +22 -55
  66. package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +10 -0
  67. package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +17 -0
  68. package/dist/src/infrastructure/ui/i18n/i18n.d.ts +1 -0
  69. package/dist/src/infrastructure/ui/i18n/i18n.js +1 -0
  70. package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +20 -0
  71. package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +27 -0
  72. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +10 -0
  73. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +27 -0
  74. package/dist/src/infrastructure/ui/views/App.style.d.ts +6 -0
  75. package/dist/src/infrastructure/ui/views/App.style.js +8 -0
  76. package/dist/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.js +2 -2
  77. package/dist/src/infrastructure/ui/views/checkout/components/paymentInstrument/PaymentInstrument.js +7 -7
  78. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +7 -0
  79. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +11 -0
  80. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +12 -0
  81. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +64 -0
  82. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +12 -0
  83. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +16 -0
  84. package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +40 -0
  85. package/dist/src/infrastructure/ui/views/return/Return.style.js +44 -0
  86. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +14 -0
  87. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +28 -0
  88. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +7 -0
  89. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +11 -0
  90. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +26 -0
  91. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +21 -0
  92. package/dist/src/projection/customer/customer.d.ts +2 -0
  93. package/dist/src/projection/shared/country.d.ts +14 -0
  94. package/dist/src/projection/shared/country.js +15 -0
  95. package/dist/src/projection/shared/customer.d.ts +9 -0
  96. package/dist/src/projection/shared/customer.js +1 -0
  97. package/dist/src/projection/shared/locale.d.ts +12 -0
  98. package/dist/src/projection/shared/locale.js +13 -0
  99. package/dist/src/projection/shared/order.d.ts +6 -0
  100. package/dist/src/projection/shared/order.js +1 -0
  101. package/dist/src/projection/shared/price.d.ts +11 -0
  102. package/dist/src/projection/shared/price.js +1 -0
  103. package/dist/src/projection/shared/size.d.ts +21 -0
  104. package/dist/src/projection/shared/size.js +4 -0
  105. package/dist/src/projection/shared/subscription.d.ts +2 -0
  106. package/dist/src/projection/shared/subscription.js +1 -0
  107. package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.d.ts +15 -0
  108. package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.js +16 -0
  109. package/dist/src/shared/ui/components/atoms/error/Error.d.ts +11 -0
  110. package/dist/src/shared/ui/components/atoms/error/Error.js +6 -0
  111. package/dist/src/shared/ui/components/atoms/field/Field.d.ts +14 -0
  112. package/dist/src/shared/ui/components/atoms/field/Field.js +29 -0
  113. package/dist/src/shared/ui/components/atoms/field/Field.style.d.ts +16 -0
  114. package/dist/src/shared/ui/components/atoms/field/Field.style.js +19 -0
  115. package/dist/src/shared/ui/components/molecules/inputField/InputField.d.ts +24 -0
  116. package/dist/src/shared/ui/components/molecules/inputField/InputField.js +28 -0
  117. package/dist/src/shared/ui/components/molecules/inputField/InputField.style.d.ts +29 -0
  118. package/dist/src/shared/ui/components/molecules/inputField/InputField.style.js +37 -0
  119. package/dist/src/version.d.ts +1 -1
  120. package/dist/src/version.js +1 -1
  121. package/index.ts +1 -1
  122. package/package.json +3 -3
  123. package/src/ExpoRoot.tsx +6 -4
  124. package/src/infrastructure/ui/Root.tsx +17 -30
  125. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.ts +1 -0
  126. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.tsx +0 -1
  127. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.ts +1 -0
  128. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +0 -1
  129. package/src/infrastructure/ui/hooks/usePaymentInstrumentEvents.ts +18 -60
  130. package/src/infrastructure/ui/hooks/useSubmitCheckout.test.ts +0 -58
  131. package/src/infrastructure/ui/hooks/useSubmitCheckout.ts +33 -77
  132. package/src/infrastructure/ui/i18n/i18n.ts +1 -0
  133. package/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.tsx +2 -2
  134. package/src/infrastructure/ui/views/checkout/components/paymentInstrument/PaymentInstrument.tsx +8 -8
  135. package/src/projection/customer/customer.ts +2 -0
  136. package/dist/src/infrastructure/ui/hooks/useQueryBus.d.ts +0 -9
  137. package/dist/src/infrastructure/ui/hooks/useQueryBus.js +0 -10
  138. package/src/infrastructure/ui/hooks/useQueryBus.test.tsx +0 -23
  139. package/src/infrastructure/ui/hooks/useQueryBus.tsx +0 -27
@@ -1,27 +0,0 @@
1
- import React, { createContext, FC, ReactNode, useContext } from "react";
2
- import invariant from "tiny-invariant";
3
- import { QueryBus } from "@lookiero/messaging";
4
-
5
- const QueryBusContext = createContext<QueryBus>(null as unknown as QueryBus);
6
-
7
- interface QueryBusProviderProps {
8
- readonly children: ReactNode;
9
- readonly queryBus: QueryBus;
10
- }
11
-
12
- const QueryBusProvider: FC<QueryBusProviderProps> = ({ children, queryBus }) => (
13
- <QueryBusContext.Provider value={queryBus}>{children}</QueryBusContext.Provider>
14
- );
15
-
16
- const useQueryBus = () => {
17
- const queryBus = useContext(QueryBusContext);
18
-
19
- invariant(
20
- queryBus,
21
- "Your are trying to use the useQueryBus hook without wrapping your app with the <QueryBusProvider>.",
22
- );
23
-
24
- return queryBus;
25
- };
26
-
27
- export { useQueryBus, QueryBusProvider };