@lookiero/checkout 9.8.5 → 9.9.0-beta.1

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 (144) 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/Checkout.js +5 -2
  77. package/dist/src/infrastructure/ui/views/checkout/Checkout.style.d.ts +3 -0
  78. package/dist/src/infrastructure/ui/views/checkout/Checkout.style.js +3 -0
  79. package/dist/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.js +2 -2
  80. package/dist/src/infrastructure/ui/views/checkout/components/paymentInstrument/PaymentInstrument.js +7 -7
  81. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +7 -0
  82. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +11 -0
  83. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +12 -0
  84. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +64 -0
  85. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +12 -0
  86. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +16 -0
  87. package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +40 -0
  88. package/dist/src/infrastructure/ui/views/return/Return.style.js +44 -0
  89. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +14 -0
  90. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +28 -0
  91. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +7 -0
  92. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +11 -0
  93. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +26 -0
  94. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +21 -0
  95. package/dist/src/projection/customer/customer.d.ts +2 -0
  96. package/dist/src/projection/shared/country.d.ts +14 -0
  97. package/dist/src/projection/shared/country.js +15 -0
  98. package/dist/src/projection/shared/customer.d.ts +9 -0
  99. package/dist/src/projection/shared/customer.js +1 -0
  100. package/dist/src/projection/shared/locale.d.ts +12 -0
  101. package/dist/src/projection/shared/locale.js +13 -0
  102. package/dist/src/projection/shared/order.d.ts +6 -0
  103. package/dist/src/projection/shared/order.js +1 -0
  104. package/dist/src/projection/shared/price.d.ts +11 -0
  105. package/dist/src/projection/shared/price.js +1 -0
  106. package/dist/src/projection/shared/size.d.ts +21 -0
  107. package/dist/src/projection/shared/size.js +4 -0
  108. package/dist/src/projection/shared/subscription.d.ts +2 -0
  109. package/dist/src/projection/shared/subscription.js +1 -0
  110. package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.d.ts +15 -0
  111. package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.js +16 -0
  112. package/dist/src/shared/ui/components/atoms/error/Error.d.ts +11 -0
  113. package/dist/src/shared/ui/components/atoms/error/Error.js +6 -0
  114. package/dist/src/shared/ui/components/atoms/field/Field.d.ts +14 -0
  115. package/dist/src/shared/ui/components/atoms/field/Field.js +29 -0
  116. package/dist/src/shared/ui/components/atoms/field/Field.style.d.ts +16 -0
  117. package/dist/src/shared/ui/components/atoms/field/Field.style.js +19 -0
  118. package/dist/src/shared/ui/components/molecules/inputField/InputField.d.ts +24 -0
  119. package/dist/src/shared/ui/components/molecules/inputField/InputField.js +28 -0
  120. package/dist/src/shared/ui/components/molecules/inputField/InputField.style.d.ts +29 -0
  121. package/dist/src/shared/ui/components/molecules/inputField/InputField.style.js +37 -0
  122. package/dist/src/version.d.ts +1 -1
  123. package/dist/src/version.js +1 -1
  124. package/index.ts +1 -1
  125. package/package.json +3 -3
  126. package/src/ExpoRoot.tsx +6 -4
  127. package/src/infrastructure/ui/Root.tsx +17 -30
  128. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.ts +1 -0
  129. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.tsx +0 -1
  130. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.ts +1 -0
  131. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +0 -1
  132. package/src/infrastructure/ui/hooks/usePaymentInstrumentEvents.ts +18 -60
  133. package/src/infrastructure/ui/hooks/useSubmitCheckout.test.ts +0 -58
  134. package/src/infrastructure/ui/hooks/useSubmitCheckout.ts +33 -77
  135. package/src/infrastructure/ui/i18n/i18n.ts +1 -0
  136. package/src/infrastructure/ui/views/checkout/Checkout.style.ts +3 -0
  137. package/src/infrastructure/ui/views/checkout/Checkout.tsx +12 -3
  138. package/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.tsx +2 -2
  139. package/src/infrastructure/ui/views/checkout/components/paymentInstrument/PaymentInstrument.tsx +8 -8
  140. package/src/projection/customer/customer.ts +2 -0
  141. package/dist/src/infrastructure/ui/hooks/useQueryBus.d.ts +0 -9
  142. package/dist/src/infrastructure/ui/hooks/useQueryBus.js +0 -10
  143. package/src/infrastructure/ui/hooks/useQueryBus.test.tsx +0 -23
  144. package/src/infrastructure/ui/hooks/useQueryBus.tsx +0 -27
@@ -0,0 +1,64 @@
1
+ import React, { createContext, useContext, useEffect, useMemo, useRef } from "react";
2
+ import invariant from "tiny-invariant";
3
+ import { Spinner } from "@lookiero/aurora";
4
+ import { useAssignedVariationByExperimentId } from "@lookiero/sty-psp-ab-testing";
5
+ import { useViewFirstAvailableCheckoutByCustomerId } from "../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
6
+ import { useTrackAssignedVariationByExperiment } from "../../tracking/useTrackAssignedVariationByExperiment";
7
+ import { useStaticInfo } from "./useStaticInfo";
8
+
9
+ var NewFeedbackExperimentVariation;
10
+ (function (NewFeedbackExperimentVariation) {
11
+ NewFeedbackExperimentVariation["CONTROL"] = "control";
12
+ NewFeedbackExperimentVariation["RETURN_PAGE"] = "return_page";
13
+ })(NewFeedbackExperimentVariation || (NewFeedbackExperimentVariation = {}));
14
+ const NewFeedbackExperimentContext = createContext(null);
15
+ const NewFeedbackExperimentProvider = ({ children }) => {
16
+ const {
17
+ kameleoon: {
18
+ experiments: {
19
+ newFeedback: { id: newFeedbackId, variations },
20
+ },
21
+ },
22
+ customer: { customerId, country, segment },
23
+ } = useStaticInfo();
24
+ const [checkout] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
25
+ const { assignedVariation: newFeedbackVariation } = useAssignedVariationByExperimentId({
26
+ experimentId: newFeedbackId,
27
+ });
28
+ const trackAssignedVariation = useTrackAssignedVariationByExperiment({
29
+ checkoutId: checkout?.id,
30
+ country,
31
+ segment,
32
+ experimentId: newFeedbackId,
33
+ });
34
+ const value = useMemo(
35
+ () => ({
36
+ variation:
37
+ newFeedbackVariation?.id === Number(variations.v1)
38
+ ? NewFeedbackExperimentVariation.RETURN_PAGE
39
+ : NewFeedbackExperimentVariation.CONTROL,
40
+ }),
41
+ [newFeedbackVariation?.id, variations.v1],
42
+ );
43
+ const assignedVariantTracked = useRef(false);
44
+ useEffect(() => {
45
+ if (assignedVariantTracked.current || !newFeedbackVariation || !checkout?.id) {
46
+ return;
47
+ }
48
+ trackAssignedVariation({ assignedVariation: newFeedbackVariation });
49
+ assignedVariantTracked.current = true;
50
+ }, [checkout?.id, newFeedbackVariation, trackAssignedVariation]);
51
+ if (!checkout) {
52
+ return React.createElement(Spinner, null);
53
+ }
54
+ return React.createElement(NewFeedbackExperimentContext.Provider, { value: value }, children);
55
+ };
56
+ const useNewFeedbackExperiment = () => {
57
+ const newFeedbackExperiment = useContext(NewFeedbackExperimentContext);
58
+ invariant(
59
+ newFeedbackExperiment,
60
+ "Your are trying to use the useNewFeedbackExperiment hook without wrapping your app with the <NewFeedbackExperimentProvider>.",
61
+ );
62
+ return newFeedbackExperiment.variation;
63
+ };
64
+ export { useNewFeedbackExperiment, NewFeedbackExperimentProvider, NewFeedbackExperimentVariation };
@@ -1,6 +1,7 @@
1
- import { Logger } from "@lookiero/sty-psp-logging";
1
+ import { PaymentPayload } from "@lookiero/payments-front";
2
2
  interface UsePaymentInstrumentEventsFunctionArgs {
3
- readonly logger: Logger;
3
+ readonly onSuccess: (payload: PaymentPayload) => void;
4
+ readonly onError: (payload: PaymentPayload) => void;
4
5
  }
5
6
  interface UsePaymentInstrumentEventsFunction {
6
7
  (args: UsePaymentInstrumentEventsFunctionArgs): void;
@@ -1,29 +1,20 @@
1
- import { useCallback, useEffect } from "react";
2
- import { useEvent } from "@lookiero/event";
3
- import { NotificationLevel, useCreateToastNotification } from "@lookiero/sty-psp-notifications";
4
- import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
5
- import { I18nMessages } from "../i18n/i18n";
6
- const PAYMENT_ERROR = "ERROR";
7
- const PAYMENT_SUCCESS = "PAYMENT_INSTRUMENT_UPDATED";
8
- const usePaymentInstrumentEvents = ({ logger }) => {
9
- const { subscribe, unsubscribe } = useEvent();
10
- const [createNotification] = useCreateToastNotification({ contextId: MESSAGING_CONTEXT_ID, logger });
11
- const onSuccess = useCallback(({ message }) => createNotification({ bodyI18nKey: message.id, level: NotificationLevel.SUCCESS }), [createNotification]);
12
- const onError = useCallback(({ error }) => {
13
- if (error.toaster) {
14
- createNotification({
15
- bodyI18nKey: error.toaster.id || I18nMessages.CHECKOUT_TOAST_PAYMENT_ERROR,
16
- level: NotificationLevel.ERROR,
17
- });
18
- }
19
- }, [createNotification]);
1
+ import { useEffect } from "react";
2
+ import { Section, usePaymentStatusManager } from "@lookiero/payments-front";
3
+ const usePaymentInstrumentEvents = ({ onSuccess, onError }) => {
4
+ const refreshStatus = usePaymentStatusManager(Section.BOX_CHECKOUT);
20
5
  useEffect(() => {
21
- subscribe({ event: PAYMENT_ERROR }, onError);
22
- subscribe({ event: PAYMENT_SUCCESS }, onSuccess);
23
- return () => {
24
- unsubscribe({ event: PAYMENT_ERROR }, onError);
25
- unsubscribe({ event: PAYMENT_SUCCESS }, onSuccess);
26
- };
27
- }, [subscribe, unsubscribe, createNotification, onError, onSuccess]);
6
+ const { isLoading, consumePayload } = refreshStatus;
7
+ if (isLoading) {
8
+ return;
9
+ }
10
+ consumePayload((payload) => {
11
+ if (payload.success) {
12
+ onSuccess(payload);
13
+ }
14
+ else {
15
+ onError(payload);
16
+ }
17
+ });
18
+ }, [onError, onSuccess, refreshStatus]);
28
19
  };
29
20
  export { usePaymentInstrumentEvents };
@@ -16,7 +16,7 @@ interface UseSubmitCheckoutFunctionArgs {
16
16
  readonly checkoutBookingId: string;
17
17
  readonly paymentFlowRef: RefObject<PaymentFlowRef>;
18
18
  readonly onError: () => void;
19
- readonly onSuccess?: () => void;
19
+ readonly onSuccess: () => void;
20
20
  readonly logger: Logger;
21
21
  }
22
22
  interface UseSubmitCheckoutFunction {
@@ -1,29 +1,15 @@
1
1
  import { useCallback, useMemo, useState } from "react";
2
2
  import { CommandStatus } from "@lookiero/messaging-react";
3
3
  import { NotificationLevel, useCreateToastNotification } from "@lookiero/sty-psp-notifications";
4
- import { viewCheckoutBookingById, } from "../../../projection/checkoutBooking/viewCheckoutBookingById";
5
4
  import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
6
5
  import { useSubmitCheckout as useSubmitCheckoutCommand } from "../../domain/checkout/react/useSubmitCheckout";
7
6
  import { useBlockCheckoutBooking } from "../../domain/checkoutBooking/react/useBlockCheckoutBooking";
8
7
  import { I18nMessages } from "../i18n/i18n";
9
- import { useQueryBus } from "./useQueryBus";
10
- var ChargeStatus;
11
- (function (ChargeStatus) {
12
- ChargeStatus["EXECUTED"] = "EXECUTED";
13
- ChargeStatus["REQUIRES_ACTION"] = "REQUIRES_ACTION";
14
- ChargeStatus["REQUIRED_ACTION_CANCELLED"] = "REQUIRED_ACTION_CANCELLED";
15
- ChargeStatus["REJECTED"] = "REJECTED";
16
- ChargeStatus["CANCELLED"] = "CANCELLED";
17
- ChargeStatus["TO_CONFIRM"] = "TO_CONFIRM";
18
- ChargeStatus["ERROR"] = "ERROR";
19
- ChargeStatus["UNKNOWN"] = "UNKNOWN";
20
- })(ChargeStatus || (ChargeStatus = {}));
8
+ import { usePaymentInstrumentEvents } from "./usePaymentInstrumentEvents";
21
9
  const useSubmitCheckout = ({ checkoutId, checkoutBookingId, paymentFlowRef, onError, onSuccess, logger, }) => {
22
- const queryBus = useQueryBus();
23
10
  const [submitCheckoutCommand, submitCheckoutCommandStatus] = useSubmitCheckoutCommand({ checkoutId, logger });
24
11
  const [blockCheckoutBooking, blockCheckoutBookingStatus] = useBlockCheckoutBooking({ checkoutBookingId, logger });
25
12
  const [createNotification] = useCreateToastNotification({ contextId: MESSAGING_CONTEXT_ID, logger });
26
- const [checkoutBookingExpired, setCheckoutBookingExpired] = useState(false);
27
13
  const [startLegacyBoxCheckoutStatus, setStartLegacyBoxCheckoutStatus] = useState("idle");
28
14
  const submitCheckout = useCallback(async ({ paymentFlowPayload, sizeChangeEnabled }) => {
29
15
  try {
@@ -32,40 +18,27 @@ const useSubmitCheckout = ({ checkoutId, checkoutBookingId, paymentFlowRef, onEr
32
18
  catch (error) {
33
19
  return;
34
20
  }
35
- const checkoutBooking = await queryBus(viewCheckoutBookingById({ checkoutBookingId }));
36
- if (checkoutBooking?.isExpired) {
37
- setCheckoutBookingExpired(true);
38
- return;
39
- }
40
- paymentFlowRef.current?.startLegacyBoxCheckout(
21
+ setStartLegacyBoxCheckoutStatus("loading");
41
22
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
42
23
  // @ts-ignore
43
- paymentFlowPayload, async ({ status, toaster, final }) => {
44
- setStartLegacyBoxCheckoutStatus("loading");
45
- if (final) {
46
- if (status === ChargeStatus.EXECUTED) {
47
- setStartLegacyBoxCheckoutStatus("success");
48
- await submitCheckoutCommand();
49
- onSuccess?.();
50
- }
51
- else {
52
- createNotification({
53
- level: NotificationLevel.ERROR,
54
- bodyI18nKey: toaster?.id || I18nMessages.CHECKOUT_TOAST_PAYMENT_ERROR,
55
- });
56
- setStartLegacyBoxCheckoutStatus("error");
57
- }
58
- }
24
+ paymentFlowRef.current?.startLegacyBoxCheckout(paymentFlowPayload);
25
+ }, [paymentFlowRef, blockCheckoutBooking]);
26
+ const onPaymentSuccess = useCallback(async () => {
27
+ setStartLegacyBoxCheckoutStatus("success");
28
+ await submitCheckoutCommand();
29
+ createNotification({
30
+ bodyI18nKey: I18nMessages.CHECKOUT_TOAST_PAYMENT_SUCCESS,
31
+ level: NotificationLevel.SUCCESS,
32
+ });
33
+ }, [createNotification, submitCheckoutCommand]);
34
+ const onPaymentError = useCallback((payload) => {
35
+ setStartLegacyBoxCheckoutStatus("error");
36
+ createNotification({
37
+ bodyI18nKey: payload.metadata?.toaster?.id || I18nMessages.CHECKOUT_TOAST_PAYMENT_ERROR,
38
+ level: NotificationLevel.ERROR,
59
39
  });
60
- }, [
61
- queryBus,
62
- checkoutBookingId,
63
- paymentFlowRef,
64
- blockCheckoutBooking,
65
- submitCheckoutCommand,
66
- onSuccess,
67
- createNotification,
68
- ]);
40
+ }, [createNotification]);
41
+ usePaymentInstrumentEvents({ onSuccess: onPaymentSuccess, onError: onPaymentError });
69
42
  const status = useMemo(() => {
70
43
  if (blockCheckoutBookingStatus === CommandStatus.LOADING ||
71
44
  startLegacyBoxCheckoutStatus === "loading" ||
@@ -75,23 +48,17 @@ const useSubmitCheckout = ({ checkoutId, checkoutBookingId, paymentFlowRef, onEr
75
48
  if (blockCheckoutBookingStatus === CommandStatus.SUCCESS &&
76
49
  startLegacyBoxCheckoutStatus === "success" &&
77
50
  submitCheckoutCommandStatus === CommandStatus.SUCCESS) {
51
+ onSuccess();
78
52
  return "success";
79
53
  }
80
54
  if (blockCheckoutBookingStatus === CommandStatus.ERROR ||
81
55
  startLegacyBoxCheckoutStatus === "error" ||
82
- submitCheckoutCommandStatus === CommandStatus.ERROR ||
83
- checkoutBookingExpired) {
56
+ submitCheckoutCommandStatus === CommandStatus.ERROR) {
84
57
  onError();
85
58
  return "error";
86
59
  }
87
60
  return "idle";
88
- }, [
89
- blockCheckoutBookingStatus,
90
- startLegacyBoxCheckoutStatus,
91
- submitCheckoutCommandStatus,
92
- checkoutBookingExpired,
93
- onError,
94
- ]);
61
+ }, [blockCheckoutBookingStatus, startLegacyBoxCheckoutStatus, submitCheckoutCommandStatus, onSuccess, onError]);
95
62
  return [submitCheckout, status];
96
63
  };
97
64
  export { useSubmitCheckout };
@@ -0,0 +1,10 @@
1
+ import { EndpointFunction, FetchTranslationFuction } from "@lookiero/i18n";
2
+
3
+ interface FetchTranslationsFuntionArgs {
4
+ readonly translations: EndpointFunction[];
5
+ }
6
+ interface FetchTranslationsFuntion {
7
+ (args: FetchTranslationsFuntionArgs): FetchTranslationFuction;
8
+ }
9
+ declare const fetchTranslations: FetchTranslationsFuntion;
10
+ export { fetchTranslations };
@@ -0,0 +1,17 @@
1
+ import { fetchFetchTranslation } from "@lookiero/i18n";
2
+
3
+ const fetchTranslations =
4
+ ({ translations }) =>
5
+ async ({ locale }) => {
6
+ const translationsMessages = await Promise.all(
7
+ translations.map((endpoint) => fetchFetchTranslation({ endpoint })({ locale })),
8
+ );
9
+ return translationsMessages.reduce(
10
+ (acc, translationMessages) => ({
11
+ ...acc,
12
+ ...translationMessages,
13
+ }),
14
+ {},
15
+ );
16
+ };
17
+ export { fetchTranslations };
@@ -46,6 +46,7 @@ declare enum I18nMessages {
46
46
  CHECKOUT_TITLE = "checkout.title",
47
47
  CHECKOUT_PAY_BUTTON = "checkout.pay_button",
48
48
  CHECKOUT_TOAST_PAYMENT_ERROR = "checkout.toast_payment_error",
49
+ CHECKOUT_TOAST_PAYMENT_SUCCESS = "checkout.toast_payment_success",
49
50
  CHECKOUT_SUCCESS_MODAL_TITLE = "checkout.success_modal_title",
50
51
  CHECKOUT_SUCCESS_MODAL_DESCRIPTION = "checkout.success_modal_description",
51
52
  CHECKOUT_SUCCESS_MODAL_BUTTON = "checkout.success_modal_button",
@@ -48,6 +48,7 @@ var I18nMessages;
48
48
  I18nMessages["CHECKOUT_TITLE"] = "checkout.title";
49
49
  I18nMessages["CHECKOUT_PAY_BUTTON"] = "checkout.pay_button";
50
50
  I18nMessages["CHECKOUT_TOAST_PAYMENT_ERROR"] = "checkout.toast_payment_error";
51
+ I18nMessages["CHECKOUT_TOAST_PAYMENT_SUCCESS"] = "checkout.toast_payment_success";
51
52
  I18nMessages["CHECKOUT_SUCCESS_MODAL_TITLE"] = "checkout.success_modal_title";
52
53
  I18nMessages["CHECKOUT_SUCCESS_MODAL_DESCRIPTION"] = "checkout.success_modal_description";
53
54
  I18nMessages["CHECKOUT_SUCCESS_MODAL_BUTTON"] = "checkout.success_modal_button";
@@ -0,0 +1,20 @@
1
+ import { EndpointFunction } from "@lookiero/i18n";
2
+
3
+ interface TranslationEndpointFunctionArgs {
4
+ readonly translationsUrl: string;
5
+ readonly translationsApiKey: string;
6
+ }
7
+ interface TranslationEndpointFunction {
8
+ (args: TranslationEndpointFunctionArgs): EndpointFunction;
9
+ }
10
+ declare const translationEndpoint: TranslationEndpointFunction;
11
+ type Project = "user-area-front" | "inventory-catalog" | "checkout";
12
+ interface TranslationExternalEndpointFunctionArgs {
13
+ readonly translationsUrl: string;
14
+ readonly projects: [project: Project, filter?: string][];
15
+ }
16
+ interface TranslationExternalEndpointFunction {
17
+ (args: TranslationExternalEndpointFunctionArgs): EndpointFunction;
18
+ }
19
+ declare const translationExternalEndpoint: TranslationExternalEndpointFunction;
20
+ export { translationEndpoint, translationExternalEndpoint };
@@ -0,0 +1,27 @@
1
+ import { Country } from "../../../projection/shared/country";
2
+ import { Locale } from "../../../projection/shared/locale";
3
+
4
+ const translationEndpoint =
5
+ ({ translationsUrl, translationsApiKey }) =>
6
+ (locale) =>
7
+ `${translationsUrl}/${locale}?key=${translationsApiKey}&no-folding=true`;
8
+ const COUNTRY = {
9
+ [Locale.ES]: Country.ES,
10
+ [Locale.FR]: Country.FR,
11
+ [Locale.EN]: Country.GB,
12
+ [Locale.IT]: Country.IT,
13
+ [Locale.PT]: Country.PT,
14
+ [Locale.DE]: Country.DE,
15
+ [Locale.AT]: Country.AT,
16
+ [Locale.NL]: Country.NL,
17
+ [Locale.SE]: Country.SE,
18
+ };
19
+ const translationExternalEndpoint =
20
+ ({ translationsUrl, projects }) =>
21
+ (locale) => {
22
+ const projectsQueryParam = projects
23
+ .map(([project, filter]) => `projectFilter=${project}${filter ? `:${filter}` : ""}`)
24
+ .join("&");
25
+ return `${translationsUrl}/${locale}/${COUNTRY[locale]}?${projectsQueryParam}`;
26
+ };
27
+ export { translationEndpoint, translationExternalEndpoint };
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+
3
+ interface CheckoutAccessibilityMiddlewareProps {
4
+ readonly customerId: string | undefined;
5
+ readonly onNotAccessible: () => void;
6
+ readonly loader?: JSX.Element;
7
+ readonly children: JSX.Element;
8
+ }
9
+ declare const CheckoutAccessibilityMiddleware: FC<CheckoutAccessibilityMiddlewareProps>;
10
+ export { CheckoutAccessibilityMiddleware };
@@ -0,0 +1,27 @@
1
+ import React, { useEffect, useRef } from "react";
2
+ import { Spinner } from "@lookiero/aurora";
3
+ import { QueryStatus } from "@lookiero/messaging-react";
4
+ import { useViewIsCheckoutAccessibleByCustomerId } from "../../projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId";
5
+
6
+ const CheckoutAccessibilityMiddleware = ({
7
+ customerId,
8
+ onNotAccessible,
9
+ loader = React.createElement(Spinner, null),
10
+ children,
11
+ }) => {
12
+ const [accessible, status] = useViewIsCheckoutAccessibleByCustomerId({ customerId });
13
+ const onNotAccessibleRef = useRef(onNotAccessible);
14
+ onNotAccessibleRef.current = onNotAccessible;
15
+ const notAccessible = accessible === false || status === QueryStatus.ERROR;
16
+ useEffect(() => {
17
+ if (notAccessible) {
18
+ onNotAccessibleRef.current();
19
+ }
20
+ }, [notAccessible]);
21
+ return accessible === undefined && [QueryStatus.IDLE, QueryStatus.LOADING].includes(status)
22
+ ? loader
23
+ : accessible
24
+ ? children
25
+ : null;
26
+ };
27
+ export { CheckoutAccessibilityMiddleware };
@@ -0,0 +1,6 @@
1
+ declare const style: {
2
+ container: {
3
+ flex: number;
4
+ };
5
+ };
6
+ export { style };
@@ -0,0 +1,8 @@
1
+ import { StyleSheet } from "react-native";
2
+
3
+ const style = StyleSheet.create({
4
+ container: {
5
+ flex: 1,
6
+ },
7
+ });
8
+ export { style };
@@ -4,6 +4,7 @@ import { useNavigate } from "react-router-native";
4
4
  import { Box, Button, Layout as AuroraLayout, Spinner, Text, useDevice } from "@lookiero/aurora";
5
5
  import { useI18nMessage } from "@lookiero/i18n-react";
6
6
  import { QueryStatus } from "@lookiero/messaging-react";
7
+ import { Country } from "@lookiero/sty-psp-locale";
7
8
  import { Sticky } from "@lookiero/sty-psp-ui";
8
9
  import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
9
10
  import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
@@ -77,13 +78,15 @@ const Checkout = ({ children, layout: Layout, useRedirect }) => {
77
78
  React.createElement(AuroraLayout, { fullWidth: !screen.L, style: [screen.L && style.desktopLayoutSpacing, !screen.L && { paddingBottom: pricingHeight }] },
78
79
  React.createElement(Box, { size: { L: "2/3" }, style: screen.L && style.desktopListSpacing },
79
80
  React.createElement(View, { style: [style.contentWrapper, screen.L && style.desktopContentWrapper] },
81
+ country === Country.NL && (React.createElement(View, { style: style.paymentSelectorNL },
82
+ React.createElement(PaymentInstrument, { useRedirect: useRedirect }))),
80
83
  React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
81
84
  checkoutItemsKept?.map((checkoutItem) => (React.createElement(View, { key: checkoutItem.id, testID: "checkout-items-kept" },
82
85
  React.createElement(ProductVariant, { brand: checkoutItem.productVariant.brand, color: checkoutItem.productVariant.color, country: country, media: checkoutItem.productVariant.media, name: checkoutItem.productVariant.name, price: checkoutItem.price, status: checkoutItem.status, size: checkoutItem.status === CheckoutItemStatus.REPLACED && checkoutItem.replacedFor
83
86
  ? checkoutItem.replacedFor.size
84
87
  : checkoutItem.productVariant.size })))),
85
- React.createElement(View, { style: style.paymentSelector },
86
- React.createElement(PaymentInstrument, { useRedirect: useRedirect })))),
88
+ country !== Country.NL && (React.createElement(View, { style: style.paymentSelector },
89
+ React.createElement(PaymentInstrument, { useRedirect: useRedirect }))))),
87
90
  React.createElement(Box, { size: { L: "1/3" }, style: [style.resume, screen.L && style.desktopResume] }, pricing ? (React.createElement(View, { style: [style.princingWrapper, !screen.L && style.princingWrapperSmall] },
88
91
  React.createElement(Pricing, { pricing: pricing, totalCheckoutItemsKept: checkoutItemsKept?.length || 0 }),
89
92
  screen.L ? (React.createElement(Button, { testID: "confirm-checkout-button", onPress: handleOnSubmit }, submitButtonText)) : null)) : null))),
@@ -24,6 +24,9 @@ declare const style: {
24
24
  paymentSelector: {
25
25
  marginTop: number;
26
26
  };
27
+ paymentSelectorNL: {
28
+ marginBottom: number;
29
+ };
27
30
  princingWrapper: {
28
31
  padding: number;
29
32
  };
@@ -28,6 +28,9 @@ const style = StyleSheet.create({
28
28
  paymentSelector: {
29
29
  marginTop: space6,
30
30
  },
31
+ paymentSelectorNL: {
32
+ marginBottom: space6,
33
+ },
31
34
  princingWrapper: {
32
35
  padding: space6,
33
36
  },
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback, useEffect, useRef, useState } from "react";
2
2
  import { useNavigate } from "react-router-native";
3
3
  import { QueryStatus } from "@lookiero/messaging-react";
4
- import { PaymentFlow } from "@lookiero/payments-front";
4
+ import { PaymentFlow, Section } from "@lookiero/payments-front";
5
5
  import { useLogger } from "@lookiero/sty-psp-logging";
6
6
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
7
7
  import { useViewFirstAvailableCheckoutByCustomerId } from "../../../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
@@ -85,6 +85,6 @@ const CheckoutPaymentModal = ({ coupon, isFirstOrder, subscription, orderNumber,
85
85
  const dependenciesLoaded = (dependenciesLoadedStatuses.includes(checkoutStatus) || checkout) && authToken;
86
86
  if (!dependenciesLoaded)
87
87
  return null;
88
- return React.createElement(PaymentFlow, { ref: paymentFlowRef, token: authToken });
88
+ return React.createElement(PaymentFlow, { ref: paymentFlowRef, section: Section.BOX_CHECKOUT, token: authToken });
89
89
  };
90
90
  export { CheckoutPaymentModal };
@@ -1,12 +1,12 @@
1
- import React, { useRef } from "react";
1
+ import React from "react";
2
2
  import { PaymentInstrumentSelect, Section } from "@lookiero/payments-front";
3
- import { useLogger } from "@lookiero/sty-psp-logging";
4
- import { usePaymentInstrumentEvents } from "../../../../hooks/usePaymentInstrumentEvents";
3
+ import { useStaticInfo } from "../../../../hooks/useStaticInfo";
5
4
  const PaymentInstrument = ({ useRedirect }) => {
6
- const paymentInstrumentSelectRef = useRef(null);
7
5
  const { returnUrl } = useRedirect();
8
- const logger = useLogger();
9
- usePaymentInstrumentEvents({ logger });
10
- return (React.createElement(PaymentInstrumentSelect, { ref: paymentInstrumentSelectRef, beforeRedirect: returnUrl ? () => Promise.resolve(returnUrl) : undefined, hasError: false, section: Section.BOX_CHECKOUT }));
6
+ const { customer } = useStaticInfo();
7
+ return (React.createElement(PaymentInstrumentSelect, { beforeRedirect: returnUrl ? () => Promise.resolve(returnUrl) : undefined, hasError: false, section: Section.BOX_CHECKOUT, userInformation: {
8
+ email: customer.email,
9
+ name: customer.name,
10
+ }, showSingleUsePaymentMethods: true }));
11
11
  };
12
12
  export { PaymentInstrument };
@@ -0,0 +1,7 @@
1
+ declare const style: {
2
+ buttonContainer: {
3
+ paddingHorizontal: number;
4
+ paddingVertical: number;
5
+ };
6
+ };
7
+ export { style };
@@ -0,0 +1,11 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { theme } from "@lookiero/sty-psp-ui";
3
+
4
+ const { space6, space8 } = theme();
5
+ const style = StyleSheet.create({
6
+ buttonContainer: {
7
+ paddingHorizontal: space6,
8
+ paddingVertical: space8,
9
+ },
10
+ });
11
+ export { style };
@@ -0,0 +1,12 @@
1
+ import { FC } from "react";
2
+ import { FeedbackProjection } from "../../../../../../projection/feedback/feedback";
3
+ import { ReturnQuestionProjection } from "../../../../../../projection/returnQuestion/returnQuestion";
4
+
5
+ interface ReturnQuestionsFormProps {
6
+ readonly visible: boolean;
7
+ readonly returnQuestions: ReturnQuestionProjection[];
8
+ readonly onSubmit: (feedback: FeedbackProjection) => void;
9
+ readonly onClose: () => void;
10
+ }
11
+ declare const ReturnQuestionsForm: FC<ReturnQuestionsFormProps>;
12
+ export { ReturnQuestionsForm };
@@ -0,0 +1,64 @@
1
+ import { PortalHost } from "@gorhom/portal";
2
+ import React, { useCallback } from "react";
3
+ import { View } from "react-native";
4
+ import { Button, Text } from "@lookiero/aurora";
5
+ import { useI18nMessage } from "@lookiero/i18n-react";
6
+ import { Modal } from "@lookiero/sty-psp-ui";
7
+ import { ReturnQuestionType } from "../../../../../../projection/returnQuestion/returnQuestion";
8
+ import { ReturnQuestions } from "../../../../components/organisms/returnQuestions/ReturnQuestions";
9
+ import { useReturnQuestionFeedback } from "../../../../components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback";
10
+ import { ReturnQuestionItemProvider } from "../../../../components/organisms/returnQuestions/behaviors/useReturnQuestionItem";
11
+ import { HostDefaultReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem";
12
+ import { HostSelectReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem";
13
+ import { HostStackReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem";
14
+ import { OptionReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem";
15
+ import { TextareaReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem";
16
+ import { I18nMessages } from "../../../../i18n/i18n";
17
+ import { style } from "./ReturnQuestionsForm.style";
18
+
19
+ const RETURN_QUESTION_FORM_PORTAL_HOST_NAME = "return-question-form-portal";
20
+ const returnQuestionItems = {
21
+ [ReturnQuestionType.HOST_DEFAULT]: HostDefaultReturnQuestionItem,
22
+ [ReturnQuestionType.HOST_TEXTAREA]: HostDefaultReturnQuestionItem,
23
+ [ReturnQuestionType.HOST_SELECT]: HostSelectReturnQuestionItem,
24
+ [ReturnQuestionType.HOST_STACK]: HostStackReturnQuestionItem,
25
+ [ReturnQuestionType.TEXTAREA]: TextareaReturnQuestionItem,
26
+ [ReturnQuestionType.OPTION]: OptionReturnQuestionItem,
27
+ };
28
+ const ReturnQuestionsForm = ({ returnQuestions, visible, onSubmit, onClose }) => {
29
+ const titleText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_TITLE });
30
+ const submitButtonText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_SUBMIT_BUTTON });
31
+ const feedback = useReturnQuestionFeedback();
32
+ const handleOnSubmit = useCallback(() => onSubmit(feedback), [feedback, onSubmit]);
33
+ return React.createElement(
34
+ ReturnQuestionItemProvider,
35
+ { returnQuestionItems: returnQuestionItems },
36
+ React.createElement(PortalHost, { name: RETURN_QUESTION_FORM_PORTAL_HOST_NAME }),
37
+ React.createElement(
38
+ Modal,
39
+ {
40
+ portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME,
41
+ testID: "return-questions-form-modal",
42
+ visible: visible,
43
+ scroll: true,
44
+ showCloseButton: true,
45
+ onClose: onClose,
46
+ },
47
+ React.createElement(
48
+ View,
49
+ { style: style.modalContent },
50
+ React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
51
+ React.createElement(ReturnQuestions, {
52
+ portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME,
53
+ returnQuestions: returnQuestions,
54
+ }),
55
+ React.createElement(
56
+ Button,
57
+ { style: style.submit, testID: "return-questions-button", onPress: handleOnSubmit },
58
+ submitButtonText,
59
+ ),
60
+ ),
61
+ ),
62
+ );
63
+ };
64
+ export { ReturnQuestionsForm };
@@ -0,0 +1,12 @@
1
+ declare const style: {
2
+ modalContent: {
3
+ paddingHorizontal: number;
4
+ };
5
+ submit: {
6
+ marginTop: number;
7
+ };
8
+ title: {
9
+ marginBottom: number;
10
+ };
11
+ };
12
+ export { style };
@@ -0,0 +1,16 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { theme } from "@lookiero/sty-psp-ui";
3
+
4
+ const { space6, space8 } = theme();
5
+ const style = StyleSheet.create({
6
+ modalContent: {
7
+ paddingHorizontal: space6,
8
+ },
9
+ submit: {
10
+ marginTop: space8,
11
+ },
12
+ title: {
13
+ marginBottom: space6,
14
+ },
15
+ });
16
+ export { style };