@lookiero/checkout 8.14.0-beta.102 → 8.14.0-beta.2

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 (178) hide show
  1. package/dist/pact.config.d.ts +4 -12
  2. package/dist/pact.config.js +4 -11
  3. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.d.ts +0 -1
  4. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.js +24 -24
  5. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +33 -40
  6. package/dist/src/infrastructure/projection/checkout/checkout.mock.d.ts +6 -6
  7. package/dist/src/infrastructure/projection/checkout/checkout.mock.js +12 -15
  8. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +82 -89
  9. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +33 -40
  10. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +31 -38
  11. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +31 -38
  12. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +31 -38
  13. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.d.ts +0 -1
  14. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.js +3 -3
  15. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +33 -40
  16. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.d.ts +6 -10
  17. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.js +38 -39
  18. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +33 -40
  19. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.d.ts +0 -1
  20. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.js +96 -97
  21. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +33 -40
  22. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +83 -94
  23. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.d.ts +1 -7
  24. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.js +173 -178
  25. package/dist/src/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.js +1 -1
  26. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +33 -40
  27. package/dist/src/infrastructure/projection/pricing/pricing.mock.d.ts +2 -3
  28. package/dist/src/infrastructure/projection/pricing/pricing.mock.js +34 -35
  29. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +33 -40
  30. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.d.ts +0 -1
  31. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.js +377 -378
  32. package/dist/src/infrastructure/ui/Root.d.ts +2 -0
  33. package/dist/src/infrastructure/ui/Root.js +2 -2
  34. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.d.ts +5 -0
  35. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +3 -3
  36. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.d.ts +5 -0
  37. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.js +1 -1
  38. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +5 -0
  39. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +2 -2
  40. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +1 -1
  41. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +1 -1
  42. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.js +1 -1
  43. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +2 -2
  44. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.d.ts +3 -1
  45. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +3 -3
  46. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +4 -4
  47. package/dist/src/infrastructure/ui/routing/Routing.d.ts +7 -0
  48. package/dist/src/infrastructure/ui/routing/Routing.js +5 -5
  49. package/dist/src/infrastructure/ui/views/App.d.ts +8 -0
  50. package/dist/src/infrastructure/ui/views/App.js +4 -4
  51. package/dist/src/infrastructure/ui/views/App.style.d.ts +3 -3
  52. package/dist/src/infrastructure/ui/views/App.style.js +3 -4
  53. package/dist/src/infrastructure/ui/views/item/Item.d.ts +5 -0
  54. package/dist/src/infrastructure/ui/views/item/Item.js +3 -3
  55. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.d.ts +2 -0
  56. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +2 -2
  57. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +1 -1
  58. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +1 -1
  59. package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.d.ts +5 -1
  60. package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.js +2 -2
  61. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.d.ts +5 -0
  62. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +2 -2
  63. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.d.ts +3 -3
  64. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +2 -2
  65. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.d.ts +1 -1
  66. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.js +1 -1
  67. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.d.ts +2 -0
  68. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +2 -2
  69. package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.d.ts +5 -0
  70. package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.js +2 -2
  71. package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.d.ts +5 -0
  72. package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +2 -2
  73. package/dist/src/infrastructure/ui/views/return/Return.d.ts +5 -0
  74. package/dist/src/infrastructure/ui/views/return/Return.js +2 -2
  75. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +5 -0
  76. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +12 -14
  77. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +2 -6
  78. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.js +2 -6
  79. package/dist/src/version.d.ts +1 -1
  80. package/dist/src/version.js +1 -1
  81. package/jest.setup.js +20 -0
  82. package/package.json +5 -4
  83. package/pact.config.ts +31 -0
  84. package/pact.publish.js +32 -0
  85. package/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.ts +62 -0
  86. package/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.ts +128 -0
  87. package/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.ts +63 -0
  88. package/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.ts +57 -0
  89. package/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.ts +57 -0
  90. package/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.ts +57 -0
  91. package/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.ts +63 -0
  92. package/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.ts +64 -0
  93. package/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.ts +62 -0
  94. package/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.ts +136 -0
  95. package/src/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.ts +1 -1
  96. package/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.ts +62 -0
  97. package/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.ts +62 -0
  98. package/src/infrastructure/ui/Root.tsx +4 -1
  99. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.tsx +14 -1
  100. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.tsx +8 -1
  101. package/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.ts +6 -0
  102. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.ts +1 -1
  103. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +2 -1
  104. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.tsx +2 -0
  105. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +2 -0
  106. package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +5 -2
  107. package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +3 -2
  108. package/src/infrastructure/ui/routing/Routing.tsx +13 -5
  109. package/{dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js → src/infrastructure/ui/views/App.style.ts} +2 -7
  110. package/src/infrastructure/ui/views/App.tsx +14 -7
  111. package/src/infrastructure/ui/views/item/Item.tsx +8 -2
  112. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.ts +1 -1
  113. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +9 -3
  114. package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +8 -1
  115. package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +12 -3
  116. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.ts +1 -1
  117. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +6 -6
  118. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +4 -3
  119. package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.tsx +12 -2
  120. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +14 -4
  121. package/src/infrastructure/ui/views/return/Return.tsx +8 -1
  122. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.ts +2 -6
  123. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +33 -38
  124. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +0 -13
  125. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +0 -19
  126. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +0 -22
  127. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +0 -1
  128. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +0 -7
  129. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +0 -5
  130. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +0 -7
  131. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +0 -6
  132. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +0 -4
  133. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +0 -20
  134. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +0 -4
  135. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +0 -43
  136. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +0 -12
  137. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +0 -7
  138. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +0 -21
  139. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +0 -8
  140. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +0 -12
  141. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +0 -12
  142. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +0 -64
  143. package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +0 -10
  144. package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +0 -17
  145. package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +0 -20
  146. package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +0 -27
  147. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +0 -10
  148. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +0 -27
  149. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +0 -7
  150. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +0 -11
  151. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -12
  152. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +0 -64
  153. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +0 -12
  154. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +0 -16
  155. package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +0 -40
  156. package/dist/src/infrastructure/ui/views/return/Return.style.js +0 -44
  157. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -14
  158. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +0 -28
  159. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +0 -7
  160. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +0 -11
  161. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +0 -26
  162. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +0 -21
  163. package/dist/src/projection/shared/country.d.ts +0 -14
  164. package/dist/src/projection/shared/country.js +0 -15
  165. package/dist/src/projection/shared/customer.d.ts +0 -9
  166. package/dist/src/projection/shared/customer.js +0 -1
  167. package/dist/src/projection/shared/locale.d.ts +0 -12
  168. package/dist/src/projection/shared/locale.js +0 -13
  169. package/dist/src/projection/shared/order.d.ts +0 -6
  170. package/dist/src/projection/shared/order.js +0 -1
  171. package/dist/src/projection/shared/price.d.ts +0 -11
  172. package/dist/src/projection/shared/price.js +0 -1
  173. package/dist/src/projection/shared/size.d.ts +0 -21
  174. package/dist/src/projection/shared/size.js +0 -4
  175. package/dist/src/projection/shared/subscription.d.ts +0 -2
  176. package/dist/src/projection/shared/subscription.js +0 -1
  177. package/dist/src/shared/ui/components/atoms/error/Error.d.ts +0 -11
  178. package/dist/src/shared/ui/components/atoms/error/Error.js +0 -6
@@ -9,6 +9,7 @@ import { Customer } from "../../projection/customer/customer";
9
9
  import { Order } from "../../projection/order/order";
10
10
  import { Subscription } from "../../projection/subscription/subscription";
11
11
  import { KameleoonEnvironment } from "../ab-testing/kameleoonEnvironment";
12
+ import { RoutingStyle } from "./routing/Routing";
12
13
  interface RootFunctionArgs {
13
14
  readonly Messaging: MessagingRoot;
14
15
  readonly I18n: I18n;
@@ -27,6 +28,7 @@ interface RootProps {
27
28
  readonly order: Order | undefined;
28
29
  readonly subscription: Subscription | undefined;
29
30
  readonly layout: Layout;
31
+ readonly style?: Partial<RoutingStyle>;
30
32
  readonly onNotAccessible: () => void;
31
33
  readonly onCheckoutSubmitted?: () => void;
32
34
  readonly useRedirect: () => Record<string, string>;
@@ -9,10 +9,10 @@ const root = ({ Messaging, I18n, getAuthToken, development, sentry, kameleoon: k
9
9
  const logger = sentryLogger(sentry);
10
10
  const kameleoon = kameleoonConfig();
11
11
  // eslint-disable-next-line react/display-name, react/prop-types
12
- const Root = ({ basePath, locale = Locale.en_GB, customer, order, subscription, layout, onNotAccessible, onCheckoutSubmitted, useRedirect, useRoutes = reactRouterUseRoutes, }) => {
12
+ const Root = ({ basePath, locale = Locale.en_GB, customer, order, subscription, layout, style: customStyle, onNotAccessible, onCheckoutSubmitted, useRedirect, useRoutes = reactRouterUseRoutes, }) => {
13
13
  const handleOnI18nError = useCallback((error) => logger.captureException(error), []);
14
14
  return (React.createElement(Messaging, { includeReactQueryDevTools: Platform.OS === "web" },
15
- React.createElement(Routing, { I18n: I18n, basePath: basePath, customer: customer, getAuthToken: getAuthToken, kameleoon: kameleoon, layout: layout, locale: locale, order: order, subscription: subscription, useRedirect: useRedirect, useRoutes: useRoutes, onCheckoutSubmitted: onCheckoutSubmitted, onI18nError: development ? undefined : handleOnI18nError, onNotAccessible: onNotAccessible })));
15
+ React.createElement(Routing, { I18n: I18n, basePath: basePath, customer: customer, getAuthToken: getAuthToken, kameleoon: kameleoon, layout: layout, locale: locale, order: order, style: customStyle, subscription: subscription, useRedirect: useRedirect, useRoutes: useRoutes, onCheckoutSubmitted: onCheckoutSubmitted, onI18nError: development ? undefined : handleOnI18nError, onNotAccessible: onNotAccessible })));
16
16
  };
17
17
  const hoc = sentryLoggerHOC({ logger });
18
18
  /**
@@ -1,9 +1,14 @@
1
1
  import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
2
3
  import { ReturnQuestionProjection } from "../../../../../projection/returnQuestion/returnQuestion";
4
+ interface ReturnQuestionStyle {
5
+ readonly modal: StyleProp<ViewStyle>;
6
+ }
3
7
  interface ReturnQuestionProps {
4
8
  readonly returnQuestionParent: ReturnQuestionProjection;
5
9
  readonly returnQuestion: ReturnQuestionProjection;
6
10
  readonly portalHostName?: string;
11
+ readonly style?: Partial<ReturnQuestionStyle>;
7
12
  }
8
13
  declare const _default: React.NamedExoticComponent<ReturnQuestionProps>;
9
14
  export default _default;
@@ -1,8 +1,8 @@
1
1
  import React, { memo } from "react";
2
2
  import { useReturnQuestionItem } from "./behaviors/useReturnQuestionItem";
3
- const ReturnQuestion = ({ returnQuestionParent, returnQuestion, portalHostName }) => {
3
+ const ReturnQuestion = ({ returnQuestionParent, returnQuestion, portalHostName, style: customStyle, }) => {
4
4
  const Item = useReturnQuestionItem({ type: returnQuestion.type });
5
- return (React.createElement(Item, { portalHostName: portalHostName, returnQuestion: returnQuestion, returnQuestionParent: returnQuestionParent, testID: returnQuestion.id },
6
- React.createElement(React.Fragment, null, returnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: portalHostName, returnQuestion: childReturnQuestion, returnQuestionParent: returnQuestion }))))));
5
+ return (React.createElement(Item, { portalHostName: portalHostName, returnQuestion: returnQuestion, returnQuestionParent: returnQuestionParent, style: customStyle, testID: returnQuestion.id },
6
+ React.createElement(React.Fragment, null, returnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: portalHostName, returnQuestion: childReturnQuestion, returnQuestionParent: returnQuestion, style: customStyle }))))));
7
7
  };
8
8
  export default memo(ReturnQuestion);
@@ -1,8 +1,13 @@
1
1
  import { FC } from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
2
3
  import { ReturnQuestionProjection } from "../../../../../projection/returnQuestion/returnQuestion";
4
+ interface ReturnQuestionsStyle {
5
+ readonly modal: StyleProp<ViewStyle>;
6
+ }
3
7
  interface ReturnQuestionsProps {
4
8
  readonly returnQuestions: ReturnQuestionProjection[];
5
9
  readonly portalHostName?: string;
10
+ readonly style?: Partial<ReturnQuestionsStyle>;
6
11
  }
7
12
  declare const ReturnQuestions: FC<ReturnQuestionsProps>;
8
13
  export { ReturnQuestions };
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import ReturnQuestion from "./ReturnQuestion";
3
- const ReturnQuestions = ({ returnQuestions, portalHostName }) => (React.createElement(React.Fragment, null, returnQuestions.map((returnQuestion) => (React.createElement(ReturnQuestion, { key: returnQuestion.id, portalHostName: portalHostName, returnQuestion: returnQuestion, returnQuestionParent: {} })))));
3
+ const ReturnQuestions = ({ returnQuestions, portalHostName, style: customStyle }) => (React.createElement(React.Fragment, null, returnQuestions.map((returnQuestion) => (React.createElement(ReturnQuestion, { key: returnQuestion.id, portalHostName: portalHostName, returnQuestion: returnQuestion, returnQuestionParent: {}, style: customStyle })))));
4
4
  export { ReturnQuestions };
@@ -1,11 +1,16 @@
1
1
  import { FC, ReactNode } from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
2
3
  import { ReturnQuestionProjection } from "../../../../../../projection/returnQuestion/returnQuestion";
4
+ interface ReturnQuestionItemStyle {
5
+ readonly modal: StyleProp<ViewStyle>;
6
+ }
3
7
  interface ReturnQuestionItemProps {
4
8
  readonly returnQuestionParent: ReturnQuestionProjection;
5
9
  readonly returnQuestion: ReturnQuestionProjection;
6
10
  readonly children?: ReactNode;
7
11
  readonly portalHostName?: string;
8
12
  readonly testID?: string;
13
+ readonly style?: Partial<ReturnQuestionItemStyle>;
9
14
  }
10
15
  type ReturnQuestionItem = FC<ReturnQuestionItemProps>;
11
16
  export type { ReturnQuestionItem, ReturnQuestionItemProps };
@@ -7,7 +7,7 @@ import { InputField } from "../../../../../../../shared/ui/components/molecules/
7
7
  import { useReturnQuestionFeedback, useReturnQuestionFeedbackForReturnQuestion, } from "../../behaviors/useReturnQuestionFeedback";
8
8
  import { deepestReturnQuestionWithFeedbackForReturnQuestion, feedbackForReturnQuestion, } from "../../util/returnQuestionFeedback";
9
9
  import { style, containerUnderlayColor } from "./HostSelectReturnQuestionItem.style";
10
- const HostSelectReturnQuestionItem = ({ returnQuestion, children, portalHostName, testID, }) => {
10
+ const HostSelectReturnQuestionItem = ({ returnQuestion, children, portalHostName, testID, style: customStyle, }) => {
11
11
  const { formatMessage } = useIntl();
12
12
  const placeholderText = useMemo(() => (returnQuestion.placeholder ? formatMessage({ id: returnQuestion.placeholder }) : ""), [formatMessage, returnQuestion.placeholder]);
13
13
  const [modalVisible, setModalVisible] = useState(false);
@@ -35,6 +35,6 @@ const HostSelectReturnQuestionItem = ({ returnQuestion, children, portalHostName
35
35
  React.createElement(View, { pointerEvents: "none" },
36
36
  React.createElement(InputField, { editable: false, icon: "arrow_down", label: placeholderText, value: inputValue }))),
37
37
  React.createElement(Modal, { portalHostName: portalHostName, style: deepestReturnQuestionWithFeedback && { header: style.header }, visible: modalVisible, header: deepestReturnQuestionWithFeedback && (React.createElement(ButtonIcon, { name: "arrow_left", style: style.backButton, testID: "modal-back-button", onPress: handleOnBackButtonPress })), scroll: true, showCloseButton: true, onClose: handleOnModalClose },
38
- React.createElement(View, { style: style.modalContent }, children))));
38
+ React.createElement(View, { style: [style.modal, customStyle?.modal] }, children))));
39
39
  };
40
40
  export { HostSelectReturnQuestionItem };
@@ -9,7 +9,7 @@ declare const style: {
9
9
  header: {
10
10
  justifyContent: "space-between";
11
11
  };
12
- modalContent: {
12
+ modal: {
13
13
  paddingBottom: number;
14
14
  paddingHorizontal: number;
15
15
  };
@@ -12,7 +12,7 @@ const style = StyleSheet.create({
12
12
  header: {
13
13
  justifyContent: "space-between",
14
14
  },
15
- modalContent: {
15
+ modal: {
16
16
  paddingBottom: space6,
17
17
  paddingHorizontal: space6,
18
18
  },
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import ReturnQuestion from "../../../ReturnQuestion";
3
- const HostStackReturnQuestionItem = ({ returnQuestion, portalHostName, }) => (React.createElement(React.Fragment, null, returnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: portalHostName, returnQuestion: childReturnQuestion, returnQuestionParent: returnQuestion })))));
3
+ const HostStackReturnQuestionItem = ({ returnQuestion, portalHostName, style: customStyle, }) => (React.createElement(React.Fragment, null, returnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: portalHostName, returnQuestion: childReturnQuestion, returnQuestionParent: returnQuestion, style: customStyle })))));
4
4
  export { HostStackReturnQuestionItem };
@@ -6,7 +6,7 @@ import { useIntl } from "@lookiero/i18n-react";
6
6
  import ReturnQuestion from "../../../ReturnQuestion";
7
7
  import { useReturnQuestionFeedbackForReturnQuestion } from "../../../behaviors/useReturnQuestionFeedback";
8
8
  import { style } from "./HostStackReturnQuestionItem.style";
9
- const HostStackReturnQuestionItem = ({ returnQuestion, children, portalHostName, }) => {
9
+ const HostStackReturnQuestionItem = ({ returnQuestion, children, portalHostName, style: customStyle, }) => {
10
10
  const { formatMessage } = useIntl();
11
11
  const { feedback } = useReturnQuestionFeedbackForReturnQuestion({ returnQuestion });
12
12
  const feedbackReturnQuestion = feedback
@@ -22,6 +22,6 @@ const HostStackReturnQuestionItem = ({ returnQuestion, children, portalHostName,
22
22
  titleText && (React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText)),
23
23
  feedbackReturnQuestion ? (React.createElement(React.Fragment, null,
24
24
  React.createElement(Text, { color: COLOR.TEXT_MEDIUM, level: 3 }, feedbackText),
25
- feedbackReturnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: portalHostName, returnQuestion: childReturnQuestion, returnQuestionParent: feedbackReturnQuestion }))))) : (children))));
25
+ feedbackReturnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: portalHostName, returnQuestion: childReturnQuestion, returnQuestionParent: feedbackReturnQuestion, style: customStyle }))))) : (children))));
26
26
  };
27
27
  export { HostStackReturnQuestionItem };
@@ -1,11 +1,13 @@
1
1
  import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
2
3
  import { ReturnQuestionProjection } from "../../../../../../../projection/returnQuestion/returnQuestion";
3
4
  interface ModalOptionReturnQuestionItemsProps {
4
5
  readonly portalHostName?: string;
5
6
  readonly returnQuestion: ReturnQuestionProjection;
6
7
  readonly returnQuestionParent: ReturnQuestionProjection;
7
8
  readonly visible: boolean;
9
+ readonly style?: StyleProp<ViewStyle>;
8
10
  readonly onClose: () => void;
9
11
  }
10
- declare const ModalOptionReturnQuestionItems: ({ portalHostName, returnQuestion, visible, onClose, }: ModalOptionReturnQuestionItemsProps) => React.JSX.Element;
12
+ declare const ModalOptionReturnQuestionItems: ({ portalHostName, returnQuestion, visible, style: customStyle, onClose, }: ModalOptionReturnQuestionItemsProps) => React.JSX.Element;
11
13
  export { ModalOptionReturnQuestionItems };
@@ -5,12 +5,12 @@ import { useIntl } from "@lookiero/i18n-react";
5
5
  import { Modal } from "@lookiero/sty-psp-ui";
6
6
  import ReturnQuestion from "../../ReturnQuestion";
7
7
  import { style } from "./ModalOptionReturnQuestionItems.style";
8
- const ModalOptionReturnQuestionItems = ({ portalHostName, returnQuestion, visible, onClose, }) => {
8
+ const ModalOptionReturnQuestionItems = ({ portalHostName, returnQuestion, visible, style: customStyle, onClose, }) => {
9
9
  const { formatMessage } = useIntl();
10
10
  const title = formatMessage({ id: returnQuestion.name });
11
11
  return (React.createElement(Modal, { portalHostName: portalHostName, visible: visible, scroll: true, showCloseButton: true, onClose: onClose },
12
- React.createElement(View, { style: style.modalContent },
12
+ React.createElement(View, { style: [style.modalContent, customStyle] },
13
13
  React.createElement(Text, { color: COLOR.TEXT_MEDIUM, level: 2, style: style.optionText }, title),
14
- React.createElement(React.Fragment, null, returnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: "", returnQuestion: childReturnQuestion, returnQuestionParent: returnQuestion })))))));
14
+ React.createElement(React.Fragment, null, returnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: "", returnQuestion: childReturnQuestion, returnQuestionParent: returnQuestion, style: { modal: customStyle } })))))));
15
15
  };
16
16
  export { ModalOptionReturnQuestionItems };
@@ -1,11 +1,11 @@
1
1
  import React, { useCallback, useEffect, useState } from "react";
2
- import { View, Option, OPTION_VARIANT, SIZE } from "@lookiero/aurora";
2
+ import { View, Option, OPTION_VARIANT } from "@lookiero/aurora";
3
3
  import { useIntl } from "@lookiero/i18n-react";
4
4
  import { useReturnQuestionFeedback, useReturnQuestionFeedbackForReturnQuestion, } from "../../behaviors/useReturnQuestionFeedback";
5
5
  import { deepestReturnQuestionWithFeedbackForReturnQuestion, feedbackForReturnQuestion, } from "../../util/returnQuestionFeedback";
6
6
  import { ModalOptionReturnQuestionItems } from "../modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems";
7
7
  import { style } from "./RadioReturnQuestionItem.style";
8
- const RadioReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID, portalHostName, }) => {
8
+ const RadioReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID, portalHostName, style: customStyle, }) => {
9
9
  const intl = useIntl();
10
10
  const [modalVisible, setModalVisible] = useState(false);
11
11
  const { feedback: feedbackId, onChange, clear, } = useReturnQuestionFeedbackForReturnQuestion({ returnQuestion: returnQuestionParent });
@@ -43,7 +43,7 @@ const RadioReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID,
43
43
  */
44
44
  return (React.createElement(React.Fragment, null,
45
45
  React.createElement(View, { style: style.wrapper, testID: testID },
46
- React.createElement(Option, { checked: returnQuestion.id === feedbackId, flex: SIZE.XS, name: returnQuestion.id, title: inputValue ? `${optionText} / ${inputValue}` : `${optionText}`, value: returnQuestion.id, variant: OPTION_VARIANT.BUTTON, onChange: handleOnPress })),
47
- hasChildren ? (React.createElement(ModalOptionReturnQuestionItems, { portalHostName: portalHostName, returnQuestion: returnQuestion, returnQuestionParent: returnQuestion, visible: modalVisible, onClose: handleOnModalClose })) : null));
46
+ React.createElement(Option, { checked: returnQuestion.id === feedbackId, name: returnQuestion.id, title: inputValue ? `${optionText} / ${inputValue}` : `${optionText}`, value: returnQuestion.id, variant: OPTION_VARIANT.BUTTON, onChange: handleOnPress })),
47
+ hasChildren ? (React.createElement(ModalOptionReturnQuestionItems, { portalHostName: portalHostName, returnQuestion: returnQuestion, returnQuestionParent: returnQuestion, style: customStyle?.modal, visible: modalVisible, onClose: handleOnModalClose })) : null));
48
48
  };
49
49
  export { RadioReturnQuestionItem };
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
2
3
  import { useRoutes as reactRouterUseRoutes } from "react-router-native";
3
4
  import { I18n } from "@lookiero/i18n-react";
4
5
  import { Locale } from "@lookiero/sty-psp-locale";
@@ -7,6 +8,10 @@ import { Customer } from "../../../projection/customer/customer";
7
8
  import { Order } from "../../../projection/order/order";
8
9
  import { Subscription } from "../../../projection/subscription/subscription";
9
10
  import { KameleoonEnvironment } from "../../ab-testing/kameleoonEnvironment";
11
+ import { AppStyle } from "../views/App";
12
+ interface RoutingStyle extends AppStyle {
13
+ readonly modal: StyleProp<ViewStyle>;
14
+ }
10
15
  interface RoutingProps {
11
16
  readonly basePath?: string;
12
17
  readonly customer: Customer;
@@ -16,6 +21,7 @@ interface RoutingProps {
16
21
  readonly I18n: I18n;
17
22
  readonly kameleoon: KameleoonEnvironment;
18
23
  readonly layout: Layout;
24
+ readonly style?: Partial<RoutingStyle>;
19
25
  readonly getAuthToken: () => Promise<string>;
20
26
  readonly onNotAccessible: () => void;
21
27
  readonly onCheckoutSubmitted?: () => void;
@@ -31,3 +37,4 @@ interface RoutingProps {
31
37
  */
32
38
  declare const MemoizedRouting: React.NamedExoticComponent<RoutingProps>;
33
39
  export { MemoizedRouting as Routing };
40
+ export type { RoutingStyle };
@@ -14,7 +14,7 @@ import { SummaryTabs } from "../views/summaryTabs/SummaryTabs";
14
14
  import { CheckoutMiddleware } from "./CheckoutMiddleware";
15
15
  import { Routes } from "./routes";
16
16
  import { BasePathProvider } from "./useBasePath";
17
- const Routing = ({ basePath = "", customer, order, subscription, locale, I18n, kameleoon, layout, getAuthToken, onI18nError, onNotAccessible, onCheckoutSubmitted, useRedirect, useRoutes = reactRouterUseRoutes, }) => {
17
+ const Routing = ({ basePath = "", customer, order, subscription, locale, I18n, kameleoon, layout, style: customStyle, getAuthToken, onI18nError, onNotAccessible, onCheckoutSubmitted, useRedirect, useRoutes = reactRouterUseRoutes, }) => {
18
18
  return useRoutes([
19
19
  {
20
20
  path: "",
@@ -23,18 +23,18 @@ const Routing = ({ basePath = "", customer, order, subscription, locale, I18n, k
23
23
  React.createElement(I18n, { loader: React.createElement(Spinner, null), locale: locale, onError: onI18nError },
24
24
  React.createElement(Kameleoon, { loader: React.createElement(Spinner, null), siteCode: kameleoon.siteCode },
25
25
  React.createElement(CheckoutMiddleware, { customerId: customer?.customerId, onNotAccessible: onNotAccessible },
26
- React.createElement(App, null,
26
+ React.createElement(App, { style: { container: customStyle?.container, notifications: customStyle?.notifications } },
27
27
  React.createElement(Outlet, null)))))))),
28
28
  children: [
29
29
  {
30
30
  path: Routes.ITEM,
31
31
  element: (React.createElement(Suspense, { fallback: React.createElement(Spinner, null) },
32
- React.createElement(Item, { layout: layout }))),
32
+ React.createElement(Item, { layout: layout, style: { modal: customStyle?.modal } }))),
33
33
  },
34
34
  {
35
35
  path: Routes.ITEM_DETAIL,
36
36
  element: (React.createElement(Suspense, { fallback: React.createElement(Spinner, null) },
37
- React.createElement(Item, { layout: layout }))),
37
+ React.createElement(Item, { layout: layout, style: { modal: customStyle?.modal } }))),
38
38
  },
39
39
  {
40
40
  path: Routes.SUMMARY,
@@ -69,7 +69,7 @@ const Routing = ({ basePath = "", customer, order, subscription, locale, I18n, k
69
69
  {
70
70
  path: Routes.RETURN,
71
71
  element: (React.createElement(Suspense, { fallback: React.createElement(Spinner, null) },
72
- React.createElement(Return, { layout: layout }))),
72
+ React.createElement(Return, { layout: layout, style: { modal: customStyle?.modal } }))),
73
73
  },
74
74
  {
75
75
  path: "*",
@@ -1,6 +1,14 @@
1
1
  import { FC } from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ import { NotificationsStyle } from "@lookiero/sty-psp-notifications";
4
+ interface AppStyle {
5
+ readonly container: StyleProp<ViewStyle>;
6
+ readonly notifications: Partial<NotificationsStyle>;
7
+ }
2
8
  interface AppProps {
3
9
  readonly children: JSX.Element;
10
+ readonly style?: Partial<AppStyle>;
4
11
  }
5
12
  declare const App: FC<AppProps>;
13
+ export type { AppStyle };
6
14
  export { App };
@@ -1,17 +1,17 @@
1
1
  import { PortalProvider } from "@gorhom/portal";
2
2
  import React from "react";
3
- import { StatusBar } from "react-native";
4
- import { KeyboardProvider } from "react-native-keyboard-controller";
3
+ import { StatusBar, View } from "react-native";
5
4
  import { SafeAreaProvider } from "react-native-safe-area-context";
6
5
  import { PortalProvider as AuroraPortalProvider } from "@lookiero/aurora";
7
6
  import { Notifications } from "@lookiero/sty-psp-notifications";
8
7
  import { theme } from "@lookiero/sty-psp-ui";
9
8
  import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
9
+ import { style } from "./App.style";
10
10
  const { colorBgBase } = theme();
11
- const App = ({ children }) => (React.createElement(KeyboardProvider, null,
11
+ const App = ({ children, style: customStyle }) => (React.createElement(View, { style: [style.container, customStyle?.container] },
12
12
  React.createElement(SafeAreaProvider, null,
13
13
  React.createElement(PortalProvider, null,
14
14
  React.createElement(StatusBar, { backgroundColor: colorBgBase, barStyle: "dark-content", translucent: true }),
15
- React.createElement(Notifications, { contextId: MESSAGING_CONTEXT_ID }),
15
+ React.createElement(Notifications, { contextId: MESSAGING_CONTEXT_ID, style: customStyle?.notifications }),
16
16
  React.createElement(AuroraPortalProvider, null, children)))));
17
17
  export { App };
@@ -1,6 +1,6 @@
1
1
  declare const style: {
2
- container: {
3
- flex: number;
4
- };
2
+ container: {
3
+ flex: number;
4
+ };
5
5
  };
6
6
  export { style };
@@ -1,8 +1,7 @@
1
1
  import { StyleSheet } from "react-native";
2
-
3
2
  const style = StyleSheet.create({
4
- container: {
5
- flex: 1,
6
- },
3
+ container: {
4
+ flex: 1,
5
+ },
7
6
  });
8
7
  export { style };
@@ -1,7 +1,12 @@
1
1
  import { FC } from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
2
3
  import { Layout } from "@lookiero/sty-psp-ui";
4
+ interface ItemStyle {
5
+ readonly modal: StyleProp<ViewStyle>;
6
+ }
3
7
  interface ItemProps {
4
8
  readonly layout: Layout;
9
+ readonly style?: Partial<ItemStyle>;
5
10
  }
6
11
  declare const Item: FC<ItemProps>;
7
12
  export { Item };
@@ -26,7 +26,7 @@ import { useBasePath } from "../../routing/useBasePath";
26
26
  import { style } from "./Item.style";
27
27
  import { ItemWithCustomerDecission, } from "./views/itemWithCustomerDecission/ItemWithCustomerDecission";
28
28
  import { ItemWithoutCustomerDecission, } from "./views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission";
29
- const Item = ({ layout: Layout }) => {
29
+ const Item = ({ layout: Layout, style: customStyle }) => {
30
30
  const logger = useLogger();
31
31
  const screenSize = useScreenSize();
32
32
  const navigate = useNavigate();
@@ -141,10 +141,10 @@ const Item = ({ layout: Layout }) => {
141
141
  return React.createElement(Spinner, { testID: "spinner" });
142
142
  }
143
143
  return (React.createElement(ReturnQuestionFeedbackProvider, { key: checkoutItem.id, feedback: checkoutItem.feedbacks || {} },
144
- React.createElement(Layout, { footer: null, header: header, scrollEnabled: !itemWithoutCustomerDecission, style: {
144
+ React.createElement(Layout, { header: header, scrollEnabled: !itemWithoutCustomerDecission, style: {
145
145
  header: fiveItemsDiscount !== 0 ? style.headerWithDoubleHeight : style.header,
146
146
  scrollView: { height: itemWithoutCustomerDecission ? "100%" : "auto" },
147
147
  safeAreaView: isDesktopScreen ? style.safeAreaView : null,
148
- } }, itemWithoutCustomerDecission ? (React.createElement(ItemWithoutCustomerDecission, { bookedProductsVariants: bookedProductsVariants, checkoutId: checkout.id, checkoutItem: checkoutItem, currentProductVariant: currentProductVariant, onReturn: goToReturnPage })) : (React.createElement(ItemWithCustomerDecission, { checkoutId: checkout.id, checkoutItem: checkoutItem, currentProductVariant: currentProductVariant, returnQuestions: returnQuestions, onEditFeedback: goToReturnPage })))));
148
+ } }, itemWithoutCustomerDecission ? (React.createElement(ItemWithoutCustomerDecission, { bookedProductsVariants: bookedProductsVariants, checkoutId: checkout.id, checkoutItem: checkoutItem, currentProductVariant: currentProductVariant, style: customStyle, onReturn: goToReturnPage })) : (React.createElement(ItemWithCustomerDecission, { checkoutId: checkout.id, checkoutItem: checkoutItem, currentProductVariant: currentProductVariant, returnQuestions: returnQuestions, onEditFeedback: goToReturnPage })))));
149
149
  };
150
150
  export { Item };
@@ -1,6 +1,8 @@
1
1
  import { FC } from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
2
3
  interface GetOutOfCheckoutModalProps {
3
4
  readonly visible: boolean;
5
+ readonly style?: StyleProp<ViewStyle>;
4
6
  readonly onDismiss: () => void;
5
7
  readonly onConfirm: () => void;
6
8
  }
@@ -5,13 +5,13 @@ import { useI18nMessage } from "@lookiero/i18n-react";
5
5
  import { Modal } from "@lookiero/sty-psp-ui";
6
6
  import { I18nMessages } from "../../../../i18n/i18n";
7
7
  import { style } from "./GetOutOfCheckoutModal.style";
8
- const GetOutOfCheckoutModal = ({ visible, onDismiss, onConfirm }) => {
8
+ const GetOutOfCheckoutModal = ({ visible, style: customStyle, onDismiss, onConfirm, }) => {
9
9
  const titleText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_TITLE });
10
10
  const descriptionText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DESCRIPTION });
11
11
  const dismissButtonText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DISMISS_BUTTON });
12
12
  const confirmButtonText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_CONFIRM_BUTTON });
13
13
  return (React.createElement(Modal, { visible: visible, onClose: onDismiss },
14
- React.createElement(View, { style: style.modalContent },
14
+ React.createElement(View, { style: [style.modal, customStyle] },
15
15
  React.createElement(Text, { align: ALIGN.CENTER, level: 1, style: style.title }, titleText),
16
16
  React.createElement(Text, { level: 3, style: style.description }, descriptionText),
17
17
  React.createElement(Button, { style: style.button, onPress: onDismiss },
@@ -12,7 +12,7 @@ declare const style: {
12
12
  marginVertical: number;
13
13
  width: "100%";
14
14
  };
15
- modalContent: {
15
+ modal: {
16
16
  paddingHorizontal: number;
17
17
  };
18
18
  title: {
@@ -15,7 +15,7 @@ const style = StyleSheet.create({
15
15
  marginVertical: space8,
16
16
  width: "100%",
17
17
  },
18
- modalContent: {
18
+ modal: {
19
19
  paddingHorizontal: space6,
20
20
  },
21
21
  title: {
@@ -1,11 +1,15 @@
1
1
  import { FC } from "react";
2
- import { LayoutRectangle } from "react-native";
2
+ import { LayoutRectangle, StyleProp, ViewStyle } from "react-native";
3
3
  import { Country } from "@lookiero/sty-psp-locale";
4
4
  import { ProductVariantProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
5
+ interface ItemActionsStyle {
6
+ readonly modal: StyleProp<ViewStyle>;
7
+ }
5
8
  interface ItemActionsProps {
6
9
  readonly productVariants?: ProductVariantProjection[];
7
10
  readonly currentProductVariant: ProductVariantProjection;
8
11
  readonly country: Country;
12
+ readonly style?: Partial<ItemActionsStyle>;
9
13
  readonly onShowSizeWithoutStockModal?: () => void;
10
14
  readonly onKeep: () => void;
11
15
  readonly onReturn: () => void;
@@ -8,7 +8,7 @@ import { Body } from "../../../../components/layouts/body/Body";
8
8
  import { I18nMessages } from "../../../../i18n/i18n";
9
9
  import { SelectModal } from "../selectModal/SelectModal";
10
10
  import { style } from "./ItemActions.style";
11
- const ItemActions = ({ productVariants, currentProductVariant, country, onShowSizeWithoutStockModal = () => void 0, onKeep, onReplace, onReturn, onLayout, }) => {
11
+ const ItemActions = ({ productVariants, currentProductVariant, country, style: customStyle, onShowSizeWithoutStockModal = () => void 0, onKeep, onReplace, onReturn, onLayout, }) => {
12
12
  const [modalVisible, setModalVisible] = useState(false);
13
13
  const changeSizeButtonText = useI18nMessage({ id: I18nMessages.ITEM_CHANGE_SIZE_BUTTON });
14
14
  const keepButtonText = useI18nMessage({ id: I18nMessages.ITEM_KEEP_BUTTON });
@@ -34,6 +34,6 @@ const ItemActions = ({ productVariants, currentProductVariant, country, onShowSi
34
34
  !currentProductVariant.size.unique && productVariants ? (React.createElement(Button, { style: style.sizeSelector, testID: "size-selector", variant: BUTTON_VARIANT.SECONDARY, small: true, onPress: handleOnPressSelectField }, changeSizeButtonText)) : null,
35
35
  React.createElement(Button, { style: style.returnButton, testID: "return-button", variant: BUTTON_VARIANT.SECONDARY, small: true, onPress: onReturn }, returnButtonText)),
36
36
  React.createElement(Button, { testID: "keep-button", small: true, onPress: onKeep }, keepButtonText)),
37
- React.createElement(SelectModal, { modalVisible: modalVisible, options: sizeSelectorOptions, testID: "select-field-modal", title: changeSizeButtonText, value: currentProductVariant.id, onChange: onReplace, onClose: handleOnModalClose })));
37
+ React.createElement(SelectModal, { modalVisible: modalVisible, options: sizeSelectorOptions, style: { modal: customStyle?.modal }, testID: "select-field-modal", title: changeSizeButtonText, value: currentProductVariant.id, onChange: onReplace, onClose: handleOnModalClose })));
38
38
  };
39
39
  export { ItemActions };
@@ -1,7 +1,12 @@
1
1
  import { FC } from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
2
3
  import { ReturnQuestionProjection } from "../../../../../../projection/returnQuestion/returnQuestion";
4
+ interface ReturnQuestionsFeedbackStyle {
5
+ readonly modal: StyleProp<ViewStyle>;
6
+ }
3
7
  interface ReturnQuestionsFeedbackProps {
4
8
  readonly returnQuestions: ReturnQuestionProjection[];
9
+ readonly style?: Partial<ReturnQuestionsFeedbackStyle>;
5
10
  readonly onEditFeedback: () => void;
6
11
  }
7
12
  declare const ReturnQuestionsFeedback: FC<ReturnQuestionsFeedbackProps>;
@@ -17,13 +17,13 @@ const returnQuestionItems = {
17
17
  [ReturnQuestionType.TEXTAREA]: ReturnQuestionFeedbackItem,
18
18
  [ReturnQuestionType.OPTION]: ReturnQuestionFeedbackItem,
19
19
  };
20
- const ReturnQuestionsFeedback = ({ returnQuestions, onEditFeedback }) => {
20
+ const ReturnQuestionsFeedback = ({ returnQuestions, style: customStyle, onEditFeedback, }) => {
21
21
  const titleText = useI18nMessage({ id: I18nMessages.FEEDBACK_TITLE });
22
22
  return (React.createElement(View, null,
23
23
  React.createElement(View, { style: style.titleContainer },
24
24
  React.createElement(Text, { level: 2 }, titleText),
25
25
  React.createElement(ButtonIcon, { name: "pencil", testID: "edit-feedback", onPress: onEditFeedback })),
26
26
  React.createElement(ReturnQuestionItemProvider, { returnQuestionItems: returnQuestionItems },
27
- React.createElement(ReturnQuestions, { returnQuestions: returnQuestions }))));
27
+ React.createElement(ReturnQuestions, { returnQuestions: returnQuestions, style: customStyle }))));
28
28
  };
29
29
  export { ReturnQuestionsFeedback };
@@ -1,7 +1,7 @@
1
1
  import { FC } from "react";
2
2
  import { StyleProp, TextStyle, ViewStyle } from "react-native";
3
3
  interface SelectModalStyle {
4
- readonly modalContent: StyleProp<ViewStyle>;
4
+ readonly modal: StyleProp<ViewStyle>;
5
5
  readonly option: StyleProp<ViewStyle>;
6
6
  readonly optionText: StyleProp<TextStyle>;
7
7
  }
@@ -14,10 +14,10 @@ interface SelectModalProps {
14
14
  readonly value: string | undefined;
15
15
  readonly options: Option[];
16
16
  readonly style?: Partial<SelectModalStyle>;
17
- readonly onChange?: (value: string) => void;
18
- readonly onClose?: () => void;
19
17
  readonly modalVisible: boolean;
20
18
  readonly testID?: string;
19
+ readonly onChange?: (value: string) => void;
20
+ readonly onClose?: () => void;
21
21
  }
22
22
  declare const SelectModal: FC<SelectModalProps>;
23
23
  export type { Option };
@@ -4,13 +4,13 @@ import { COLOR, Text } from "@lookiero/aurora";
4
4
  import { Modal, theme } from "@lookiero/sty-psp-ui";
5
5
  import { style } from "./SelectModal.style";
6
6
  const { colorBgPrimaryLight } = theme();
7
- const SelectModal = ({ modalVisible, onChange = () => void 0, onClose = () => void 0, options, style: customStyle, testID, title, value, }) => {
7
+ const SelectModal = ({ modalVisible, options, style: customStyle, testID, title, value, onChange = () => void 0, onClose = () => void 0, }) => {
8
8
  const handleOnPressOption = useCallback((value) => {
9
9
  onChange(value);
10
10
  onClose();
11
11
  }, [onClose, onChange]);
12
12
  return (React.createElement(Modal, { testID: testID, visible: modalVisible, scroll: true, showCloseButton: true, onClose: onClose },
13
- React.createElement(View, { style: [style.modalContent, customStyle?.modalContent] },
13
+ React.createElement(View, { style: [style.modal, customStyle?.modal] },
14
14
  title && (React.createElement(Text, { level: 3, style: style.modalTitle, heading: true }, title)),
15
15
  options.map(({ label, value: optionValue }) => (React.createElement(TouchableHighlight, { key: optionValue, accessibilityLabel: optionValue, disabled: value === optionValue, style: [style.option, customStyle?.option], testID: optionValue, underlayColor: colorBgPrimaryLight, accessible: true, onPress: value !== optionValue ? () => handleOnPressOption(optionValue) : undefined },
16
16
  React.createElement(Text, { color: value === optionValue ? COLOR.TEXT_MEDIUM : COLOR.TEXT, level: 3, style: [style.optionText, customStyle?.optionText] }, label)))))));
@@ -1,5 +1,5 @@
1
1
  declare const style: {
2
- modalContent: {
2
+ modal: {
3
3
  paddingBottom: number;
4
4
  paddingHorizontal: number;
5
5
  };
@@ -2,7 +2,7 @@ import { StyleSheet } from "react-native";
2
2
  import { theme } from "@lookiero/sty-psp-ui";
3
3
  const { borderWidth1, colorBorderInteractive, space1, space5, space6 } = theme();
4
4
  const style = StyleSheet.create({
5
- modalContent: {
5
+ modal: {
6
6
  paddingBottom: space6,
7
7
  paddingHorizontal: space6,
8
8
  },
@@ -1,6 +1,8 @@
1
1
  import { FC } from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
2
3
  interface SizeWithoutStockModalProps {
3
4
  readonly visible: boolean;
5
+ readonly style?: StyleProp<ViewStyle>;
4
6
  readonly onDismiss: () => void;
5
7
  }
6
8
  declare const SizeWithoutStockModal: FC<SizeWithoutStockModalProps>;
@@ -5,12 +5,12 @@ import { useI18nMessage } from "@lookiero/i18n-react";
5
5
  import { Modal } from "@lookiero/sty-psp-ui";
6
6
  import { I18nMessages } from "../../../../i18n/i18n";
7
7
  import { style } from "./SizeWithoutStockModal.style";
8
- const SizeWithoutStockModal = ({ visible, onDismiss }) => {
8
+ const SizeWithoutStockModal = ({ visible, style: customStyle, onDismiss }) => {
9
9
  const titleText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_TITLE });
10
10
  const descriptionText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_DESCRIPTION });
11
11
  const buttonText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_BUTTON });
12
12
  return (React.createElement(Modal, { visible: visible, showCloseButton: true, onClose: onDismiss },
13
- React.createElement(View, { style: style.modalContent },
13
+ React.createElement(View, { style: [style.modalContent, customStyle] },
14
14
  React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
15
15
  React.createElement(Text, { level: 3, style: style.description }, descriptionText),
16
16
  React.createElement(Button, { onPress: onDismiss }, buttonText))));