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

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 (125) hide show
  1. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +10 -0
  2. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +17 -0
  3. package/dist/src/infrastructure/ui/Root.d.ts +2 -3
  4. package/dist/src/infrastructure/ui/Root.js +4 -2
  5. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +21 -0
  6. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +1 -0
  7. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +6 -0
  8. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +4 -0
  9. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +6 -0
  10. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +5 -0
  11. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +4 -0
  12. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +19 -0
  13. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +3 -0
  14. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +18 -0
  15. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +12 -0
  16. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +13 -0
  17. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.d.ts +0 -5
  18. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +3 -3
  19. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.d.ts +0 -5
  20. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.js +1 -1
  21. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +0 -5
  22. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +4 -3
  23. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.js +1 -1
  24. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +2 -2
  25. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.d.ts +1 -3
  26. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +5 -4
  27. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +4 -4
  28. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +6 -0
  29. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +11 -0
  30. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +8 -0
  31. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +11 -0
  32. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +11 -0
  33. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +49 -0
  34. package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +9 -0
  35. package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +9 -0
  36. package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +19 -0
  37. package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +21 -0
  38. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +9 -0
  39. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +21 -0
  40. package/dist/src/infrastructure/ui/routing/Routing.d.ts +0 -7
  41. package/dist/src/infrastructure/ui/routing/Routing.js +5 -5
  42. package/dist/src/infrastructure/ui/test/render.js +3 -1
  43. package/dist/src/infrastructure/ui/views/App.d.ts +0 -8
  44. package/dist/src/infrastructure/ui/views/App.js +10 -7
  45. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +7 -0
  46. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +10 -0
  47. package/dist/src/infrastructure/ui/views/item/Item.d.ts +0 -5
  48. package/dist/src/infrastructure/ui/views/item/Item.js +3 -3
  49. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.d.ts +0 -2
  50. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +4 -3
  51. package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.d.ts +1 -5
  52. package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.js +2 -2
  53. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.d.ts +0 -5
  54. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +2 -2
  55. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +11 -0
  56. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +40 -0
  57. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +12 -0
  58. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +15 -0
  59. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.d.ts +0 -7
  60. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +6 -5
  61. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.d.ts +0 -2
  62. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +4 -3
  63. package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.d.ts +0 -5
  64. package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.js +2 -2
  65. package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.d.ts +0 -5
  66. package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +2 -2
  67. package/dist/src/infrastructure/ui/views/return/Return.d.ts +0 -5
  68. package/dist/src/infrastructure/ui/views/return/Return.js +2 -2
  69. package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +40 -0
  70. package/dist/src/infrastructure/ui/views/return/Return.style.js +43 -0
  71. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -5
  72. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +11 -10
  73. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +6 -2
  74. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.js +6 -2
  75. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +13 -0
  76. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +9 -0
  77. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +7 -0
  78. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +10 -0
  79. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +17 -0
  80. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +13 -0
  81. package/dist/src/projection/shared/country.d.ts +14 -0
  82. package/dist/src/projection/shared/country.js +15 -0
  83. package/dist/src/projection/shared/customer.d.ts +8 -0
  84. package/dist/src/projection/shared/customer.js +1 -0
  85. package/dist/src/projection/shared/locale.d.ts +12 -0
  86. package/dist/src/projection/shared/locale.js +13 -0
  87. package/dist/src/projection/shared/order.d.ts +6 -0
  88. package/dist/src/projection/shared/order.js +1 -0
  89. package/dist/src/projection/shared/price.d.ts +10 -0
  90. package/dist/src/projection/shared/price.js +1 -0
  91. package/dist/src/projection/shared/size.d.ts +20 -0
  92. package/dist/src/projection/shared/size.js +3 -0
  93. package/dist/src/projection/shared/subscription.d.ts +2 -0
  94. package/dist/src/projection/shared/subscription.js +1 -0
  95. package/dist/src/shared/ui/components/atoms/error/Error.d.ts +10 -0
  96. package/dist/src/shared/ui/components/atoms/error/Error.js +4 -0
  97. package/dist/src/version.d.ts +1 -1
  98. package/dist/src/version.js +1 -1
  99. package/package.json +2 -2
  100. package/src/infrastructure/ui/Root.tsx +22 -21
  101. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.tsx +1 -14
  102. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.tsx +1 -8
  103. package/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.ts +0 -6
  104. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +3 -3
  105. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.tsx +0 -2
  106. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +0 -2
  107. package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +4 -6
  108. package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +2 -3
  109. package/src/infrastructure/ui/routing/Routing.tsx +5 -13
  110. package/src/infrastructure/ui/test/render.tsx +4 -1
  111. package/src/infrastructure/ui/views/App.tsx +23 -26
  112. package/src/infrastructure/ui/views/item/Item.tsx +2 -8
  113. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +5 -10
  114. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +6 -3
  115. package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +2 -8
  116. package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +3 -12
  117. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +6 -17
  118. package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +5 -8
  119. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +6 -5
  120. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +6 -3
  121. package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.tsx +2 -12
  122. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +2 -12
  123. package/src/infrastructure/ui/views/return/Return.tsx +1 -8
  124. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.ts +6 -2
  125. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +30 -31
@@ -12,7 +12,6 @@ const HostStackReturnQuestionItem: ReturnQuestionItem = ({
12
12
  returnQuestion,
13
13
  children,
14
14
  portalHostName,
15
- style: customStyle,
16
15
  }: ReturnQuestionItemProps) => {
17
16
  const { formatMessage } = useIntl();
18
17
  const { feedback } = useReturnQuestionFeedbackForReturnQuestion({ returnQuestion });
@@ -60,7 +59,6 @@ const HostStackReturnQuestionItem: ReturnQuestionItem = ({
60
59
  portalHostName={portalHostName}
61
60
  returnQuestion={childReturnQuestion}
62
61
  returnQuestionParent={feedbackReturnQuestion}
63
- style={customStyle}
64
62
  />
65
63
  ))}
66
64
  </>
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
- import { StyleProp, View, ViewStyle } from "react-native";
2
+ import { View } from "react-native";
3
3
  import { COLOR, Text } from "@lookiero/aurora";
4
4
  import { useIntl } from "@lookiero/i18n-react";
5
- import { Modal } from "@lookiero/sty-psp-ui";
5
+ import { Modal, useEnvironmentStyle } from "@lookiero/sty-psp-ui";
6
6
  import { ReturnQuestionProjection } from "../../../../../../../projection/returnQuestion/returnQuestion";
7
7
  import ReturnQuestion from "../../ReturnQuestion";
8
8
  import { style } from "./ModalOptionReturnQuestionItems.style";
@@ -12,7 +12,6 @@ interface ModalOptionReturnQuestionItemsProps {
12
12
  readonly returnQuestion: ReturnQuestionProjection;
13
13
  readonly returnQuestionParent: ReturnQuestionProjection;
14
14
  readonly visible: boolean;
15
- readonly style?: StyleProp<ViewStyle>;
16
15
  readonly onClose: () => void;
17
16
  }
18
17
 
@@ -20,15 +19,15 @@ const ModalOptionReturnQuestionItems = ({
20
19
  portalHostName,
21
20
  returnQuestion,
22
21
  visible,
23
- style: customStyle,
24
22
  onClose,
25
23
  }: ModalOptionReturnQuestionItemsProps) => {
24
+ const { modal } = useEnvironmentStyle();
26
25
  const { formatMessage } = useIntl();
27
26
  const title = formatMessage({ id: returnQuestion.name });
28
27
 
29
28
  return (
30
29
  <Modal portalHostName={portalHostName} visible={visible} scroll showCloseButton onClose={onClose}>
31
- <View style={[style.modalContent, customStyle]}>
30
+ <View style={[style.modalContent, modal?.content]}>
32
31
  <Text color={COLOR.TEXT_MEDIUM} level={2} style={style.optionText}>
33
32
  {title}
34
33
  </Text>
@@ -39,7 +38,6 @@ const ModalOptionReturnQuestionItems = ({
39
38
  portalHostName=""
40
39
  returnQuestion={childReturnQuestion}
41
40
  returnQuestionParent={returnQuestion}
42
- style={{ modal: customStyle }}
43
41
  />
44
42
  ))}
45
43
  </>
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useEffect, useState } from "react";
2
- import { View, Option, OPTION_VARIANT } from "@lookiero/aurora";
2
+ import { View, Option, OPTION_VARIANT, SIZE } from "@lookiero/aurora";
3
3
  import { useIntl } from "@lookiero/i18n-react";
4
4
  import {
5
5
  useReturnQuestionFeedback,
@@ -18,7 +18,6 @@ const RadioReturnQuestionItem: ReturnQuestionItem = ({
18
18
  returnQuestionParent,
19
19
  testID,
20
20
  portalHostName,
21
- style: customStyle,
22
21
  }: ReturnQuestionItemProps) => {
23
22
  const intl = useIntl();
24
23
  const [modalVisible, setModalVisible] = useState(false);
@@ -75,6 +74,7 @@ const RadioReturnQuestionItem: ReturnQuestionItem = ({
75
74
  <View style={style.wrapper} testID={testID}>
76
75
  <Option
77
76
  checked={returnQuestion.id === feedbackId}
77
+ flex={SIZE.XS}
78
78
  name={returnQuestion.id}
79
79
  title={inputValue ? `${optionText} / ${inputValue}` : `${optionText}`}
80
80
  value={returnQuestion.id}
@@ -87,7 +87,6 @@ const RadioReturnQuestionItem: ReturnQuestionItem = ({
87
87
  portalHostName={portalHostName}
88
88
  returnQuestion={returnQuestion}
89
89
  returnQuestionParent={returnQuestion}
90
- style={customStyle?.modal}
91
90
  visible={modalVisible}
92
91
  onClose={handleOnModalClose}
93
92
  />
@@ -1,5 +1,4 @@
1
1
  import React, { FC, memo, Suspense } from "react";
2
- import { StyleProp, ViewStyle } from "react-native";
3
2
  import { Navigate, Outlet, useRoutes as reactRouterUseRoutes } from "react-router-native";
4
3
  import { Spinner } from "@lookiero/aurora";
5
4
  import { I18n } from "@lookiero/i18n-react";
@@ -11,7 +10,7 @@ import { Order } from "../../../projection/order/order";
11
10
  import { Subscription } from "../../../projection/subscription/subscription";
12
11
  import { KameleoonEnvironment } from "../../ab-testing/kameleoonEnvironment";
13
12
  import { StaticInfoProvider } from "../hooks/useStaticInfo";
14
- import { App, AppStyle } from "../views/App";
13
+ import { App } from "../views/App";
15
14
  import { Checkout } from "../views/checkout/Checkout";
16
15
  import { CheckoutPaymentModal } from "../views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal";
17
16
  import { Feedback } from "../views/feedback/Feedback";
@@ -23,10 +22,6 @@ import { CheckoutMiddleware } from "./CheckoutMiddleware";
23
22
  import { Routes } from "./routes";
24
23
  import { BasePathProvider } from "./useBasePath";
25
24
 
26
- interface RoutingStyle extends AppStyle {
27
- readonly modal: StyleProp<ViewStyle>;
28
- }
29
-
30
25
  interface RoutingProps {
31
26
  readonly basePath?: string;
32
27
  readonly customer: Customer;
@@ -36,7 +31,6 @@ interface RoutingProps {
36
31
  readonly I18n: I18n;
37
32
  readonly kameleoon: KameleoonEnvironment;
38
33
  readonly layout: Layout;
39
- readonly style?: Partial<RoutingStyle>;
40
34
  readonly getAuthToken: () => Promise<string>;
41
35
  readonly onNotAccessible: () => void;
42
36
  readonly onCheckoutSubmitted?: () => void;
@@ -54,7 +48,6 @@ const Routing: FC<RoutingProps> = ({
54
48
  I18n,
55
49
  kameleoon,
56
50
  layout,
57
- style: customStyle,
58
51
  getAuthToken,
59
52
  onI18nError,
60
53
  onNotAccessible,
@@ -71,7 +64,7 @@ const Routing: FC<RoutingProps> = ({
71
64
  <I18n loader={<Spinner />} locale={locale} onError={onI18nError}>
72
65
  <Kameleoon loader={<Spinner />} siteCode={kameleoon.siteCode}>
73
66
  <CheckoutMiddleware customerId={customer?.customerId as string} onNotAccessible={onNotAccessible}>
74
- <App style={{ container: customStyle?.container, notifications: customStyle?.notifications }}>
67
+ <App>
75
68
  <Outlet />
76
69
  </App>
77
70
  </CheckoutMiddleware>
@@ -85,7 +78,7 @@ const Routing: FC<RoutingProps> = ({
85
78
  path: Routes.ITEM,
86
79
  element: (
87
80
  <Suspense fallback={<Spinner />}>
88
- <Item layout={layout} style={{ modal: customStyle?.modal }} />
81
+ <Item layout={layout} />
89
82
  </Suspense>
90
83
  ),
91
84
  },
@@ -93,7 +86,7 @@ const Routing: FC<RoutingProps> = ({
93
86
  path: Routes.ITEM_DETAIL,
94
87
  element: (
95
88
  <Suspense fallback={<Spinner />}>
96
- <Item layout={layout} style={{ modal: customStyle?.modal }} />
89
+ <Item layout={layout} />
97
90
  </Suspense>
98
91
  ),
99
92
  },
@@ -154,7 +147,7 @@ const Routing: FC<RoutingProps> = ({
154
147
  path: Routes.RETURN,
155
148
  element: (
156
149
  <Suspense fallback={<Spinner />}>
157
- <Return layout={layout} style={{ modal: customStyle?.modal }} />
150
+ <Return layout={layout} />
158
151
  </Suspense>
159
152
  ),
160
153
  },
@@ -175,4 +168,3 @@ const Routing: FC<RoutingProps> = ({
175
168
  */
176
169
  const MemoizedRouting = memo(Routing);
177
170
  export { MemoizedRouting as Routing };
178
- export type { RoutingStyle };
@@ -5,6 +5,7 @@ import { IntlProvider } from "react-intl";
5
5
  import { Aurora } from "@lookiero/aurora";
6
6
  import { TranslationMessages } from "@lookiero/i18n/domain/translation/model/translationMessages";
7
7
  import { Logger, LoggerProvider } from "@lookiero/sty-psp-logging";
8
+ import { EnvironmentStyleProvider } from "@lookiero/sty-psp-ui";
8
9
  import { BasePathProvider } from "../routing/useBasePath";
9
10
 
10
11
  interface RenderArgs {
@@ -27,7 +28,9 @@ const renderWrapper: RenderWrapperFunction =
27
28
  <IntlProvider locale={locale as string} messages={messages} onError={() => void 0}>
28
29
  <LoggerProvider logger={logger}>
29
30
  <BasePathProvider basePath="">
30
- <Wrapper>{children}</Wrapper>
31
+ <EnvironmentStyleProvider>
32
+ <Wrapper>{children}</Wrapper>
33
+ </EnvironmentStyleProvider>
31
34
  </BasePathProvider>
32
35
  </LoggerProvider>
33
36
  </IntlProvider>
@@ -1,42 +1,39 @@
1
1
  import { PortalProvider } from "@gorhom/portal";
2
2
  import React, { FC } from "react";
3
- import { StatusBar, StyleProp, View, ViewStyle } from "react-native";
3
+ import { StatusBar, View } from "react-native";
4
4
  import { SafeAreaProvider } from "react-native-safe-area-context";
5
5
  import { PortalProvider as AuroraPortalProvider } from "@lookiero/aurora";
6
- import { Notifications, NotificationsStyle } from "@lookiero/sty-psp-notifications";
7
- import { theme } from "@lookiero/sty-psp-ui";
6
+ import { Notifications } from "@lookiero/sty-psp-notifications";
7
+ import { theme, useEnvironmentStyle } from "@lookiero/sty-psp-ui";
8
8
  import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
9
9
  import { style } from "./App.style";
10
10
 
11
11
  const { colorBgBase } = theme();
12
12
 
13
- interface AppStyle {
14
- readonly container: StyleProp<ViewStyle>;
15
- readonly notifications: Partial<NotificationsStyle>;
16
- }
17
-
18
13
  interface AppProps {
19
14
  readonly children: JSX.Element;
20
- readonly style?: Partial<AppStyle>;
21
15
  }
22
16
 
23
- const App: FC<AppProps> = ({ children, style: customStyle }) => (
24
- <View style={[style.container, customStyle?.container]}>
25
- <SafeAreaProvider>
26
- <PortalProvider>
27
- <StatusBar backgroundColor={colorBgBase} barStyle="dark-content" translucent />
28
- <Notifications contextId={MESSAGING_CONTEXT_ID} style={customStyle?.notifications} />
29
- {/*
30
- We are using the Aurora's PortalProvider at this level for notifications to work properly.
17
+ const App: FC<AppProps> = ({ children }) => {
18
+ const { container } = useEnvironmentStyle();
31
19
 
32
- PaymentInstrumentSelect uses Aurora's Portal, and if we rely on UAF's Portal (injected by <Aurora>)
33
- notifications would be displayed in a layer below Portal's one (not visible).
34
- */}
35
- <AuroraPortalProvider>{children}</AuroraPortalProvider>
36
- </PortalProvider>
37
- </SafeAreaProvider>
38
- </View>
39
- );
20
+ return (
21
+ <View style={[style.container, container]}>
22
+ <SafeAreaProvider>
23
+ <PortalProvider>
24
+ <StatusBar backgroundColor={colorBgBase} barStyle="dark-content" translucent />
25
+ <Notifications contextId={MESSAGING_CONTEXT_ID} />
26
+ {/*
27
+ We are using the Aurora's PortalProvider at this level for notifications to work properly.
28
+
29
+ PaymentInstrumentSelect uses Aurora's Portal, and if we rely on UAF's Portal (injected by <Aurora>)
30
+ notifications would be displayed in a layer below Portal's one (not visible).
31
+ */}
32
+ <AuroraPortalProvider>{children}</AuroraPortalProvider>
33
+ </PortalProvider>
34
+ </SafeAreaProvider>
35
+ </View>
36
+ );
37
+ };
40
38
 
41
- export type { AppStyle };
42
39
  export { App };
@@ -1,5 +1,4 @@
1
1
  import React, { FC, useCallback, useEffect, useMemo, useRef } from "react";
2
- import { StyleProp, ViewStyle } from "react-native";
3
2
  import { generatePath, useMatch, useNavigate, useParams } from "react-router-native";
4
3
  import { Box, Spinner } from "@lookiero/aurora";
5
4
  import { QueryStatus } from "@lookiero/messaging-react";
@@ -55,16 +54,11 @@ interface HandleOnPreviousFunction {
55
54
  (args: HandleOnPreviousFunctionArgs): void;
56
55
  }
57
56
 
58
- interface ItemStyle {
59
- readonly modal: StyleProp<ViewStyle>;
60
- }
61
-
62
57
  interface ItemProps {
63
58
  readonly layout: Layout;
64
- readonly style?: Partial<ItemStyle>;
65
59
  }
66
60
 
67
- const Item: FC<ItemProps> = ({ layout: Layout, style: customStyle }) => {
61
+ const Item: FC<ItemProps> = ({ layout: Layout }) => {
68
62
  const logger = useLogger();
69
63
  const screenSize = useScreenSize();
70
64
  const navigate = useNavigate();
@@ -224,6 +218,7 @@ const Item: FC<ItemProps> = ({ layout: Layout, style: customStyle }) => {
224
218
  return (
225
219
  <ReturnQuestionFeedbackProvider key={checkoutItem.id} feedback={checkoutItem.feedbacks || {}}>
226
220
  <Layout
221
+ footer={null}
227
222
  header={header}
228
223
  scrollEnabled={!itemWithoutCustomerDecission}
229
224
  style={{
@@ -238,7 +233,6 @@ const Item: FC<ItemProps> = ({ layout: Layout, style: customStyle }) => {
238
233
  checkoutId={checkout.id}
239
234
  checkoutItem={checkoutItem as CheckoutItemWithoutCustomerDecission}
240
235
  currentProductVariant={currentProductVariant}
241
- style={customStyle}
242
236
  onReturn={goToReturnPage}
243
237
  />
244
238
  ) : (
@@ -1,23 +1,18 @@
1
1
  import React, { FC } from "react";
2
- import { StyleProp, View, ViewStyle } from "react-native";
2
+ import { View } from "react-native";
3
3
  import { ALIGN, Button, BUTTON_VARIANT, Text } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
- import { Modal } from "@lookiero/sty-psp-ui";
5
+ import { Modal, useEnvironmentStyle } from "@lookiero/sty-psp-ui";
6
6
  import { I18nMessages } from "../../../../i18n/i18n";
7
7
  import { style } from "./GetOutOfCheckoutModal.style";
8
8
 
9
9
  interface GetOutOfCheckoutModalProps {
10
10
  readonly visible: boolean;
11
- readonly style?: StyleProp<ViewStyle>;
12
11
  readonly onDismiss: () => void;
13
12
  readonly onConfirm: () => void;
14
13
  }
15
- const GetOutOfCheckoutModal: FC<GetOutOfCheckoutModalProps> = ({
16
- visible,
17
- style: customStyle,
18
- onDismiss,
19
- onConfirm,
20
- }) => {
14
+ const GetOutOfCheckoutModal: FC<GetOutOfCheckoutModalProps> = ({ visible, onDismiss, onConfirm }) => {
15
+ const { modal } = useEnvironmentStyle();
21
16
  const titleText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_TITLE });
22
17
  const descriptionText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DESCRIPTION });
23
18
  const dismissButtonText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DISMISS_BUTTON });
@@ -25,7 +20,7 @@ const GetOutOfCheckoutModal: FC<GetOutOfCheckoutModalProps> = ({
25
20
 
26
21
  return (
27
22
  <Modal visible={visible} onClose={onDismiss}>
28
- <View style={[style.modal, customStyle]}>
23
+ <View style={[style.modal, modal?.content]}>
29
24
  <Text align={ALIGN.CENTER} level={1} style={style.title}>
30
25
  {titleText}
31
26
  </Text>
@@ -144,9 +144,12 @@ exports[`GetOutOfCheckoutModal component matches the snapshot 1`] = `
144
144
  >
145
145
  <View
146
146
  style={
147
- {
148
- "paddingHorizontal": 24,
149
- }
147
+ [
148
+ {
149
+ "paddingHorizontal": 24,
150
+ },
151
+ undefined,
152
+ ]
150
153
  }
151
154
  >
152
155
  <Text
@@ -1,5 +1,5 @@
1
1
  import React, { FC, useCallback, useMemo, useState } from "react";
2
- import { LayoutRectangle, StyleProp, View, ViewStyle } from "react-native";
2
+ import { LayoutRectangle, View } from "react-native";
3
3
  import { Button, BUTTON_VARIANT } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
5
  import { Country } from "@lookiero/sty-psp-locale";
@@ -11,26 +11,21 @@ import { I18nMessages } from "../../../../i18n/i18n";
11
11
  import { SelectModal } from "../selectModal/SelectModal";
12
12
  import { style } from "./ItemActions.style";
13
13
 
14
- interface ItemActionsStyle {
15
- readonly modal: StyleProp<ViewStyle>;
16
- }
17
-
18
14
  interface ItemActionsProps {
19
15
  readonly productVariants?: ProductVariantProjection[];
20
16
  readonly currentProductVariant: ProductVariantProjection;
21
17
  readonly country: Country;
22
- readonly style?: Partial<ItemActionsStyle>;
23
18
  readonly onShowSizeWithoutStockModal?: () => void;
24
19
  readonly onKeep: () => void;
25
20
  readonly onReturn: () => void;
26
21
  readonly onReplace: (value: string) => void;
27
22
  readonly onLayout?: ({ width, height }: LayoutRectangle) => void;
28
23
  }
24
+
29
25
  const ItemActions: FC<ItemActionsProps> = ({
30
26
  productVariants,
31
27
  currentProductVariant,
32
28
  country,
33
- style: customStyle,
34
29
  onShowSizeWithoutStockModal = () => void 0,
35
30
  onKeep,
36
31
  onReplace,
@@ -102,7 +97,6 @@ const ItemActions: FC<ItemActionsProps> = ({
102
97
  <SelectModal
103
98
  modalVisible={modalVisible}
104
99
  options={sizeSelectorOptions}
105
- style={{ modal: customStyle?.modal }}
106
100
  testID="select-field-modal"
107
101
  title={changeSizeButtonText}
108
102
  value={currentProductVariant.id}
@@ -1,5 +1,5 @@
1
1
  import React, { FC } from "react";
2
- import { StyleProp, View, ViewStyle } from "react-native";
2
+ import { View } from "react-native";
3
3
  import { ButtonIcon, Text } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
5
  import {
@@ -25,21 +25,12 @@ const returnQuestionItems: ReturnQuestionItems = {
25
25
  [ReturnQuestionType.OPTION]: ReturnQuestionFeedbackItem,
26
26
  };
27
27
 
28
- interface ReturnQuestionsFeedbackStyle {
29
- readonly modal: StyleProp<ViewStyle>;
30
- }
31
-
32
28
  interface ReturnQuestionsFeedbackProps {
33
29
  readonly returnQuestions: ReturnQuestionProjection[];
34
- readonly style?: Partial<ReturnQuestionsFeedbackStyle>;
35
30
  readonly onEditFeedback: () => void;
36
31
  }
37
32
 
38
- const ReturnQuestionsFeedback: FC<ReturnQuestionsFeedbackProps> = ({
39
- returnQuestions,
40
- style: customStyle,
41
- onEditFeedback,
42
- }) => {
33
+ const ReturnQuestionsFeedback: FC<ReturnQuestionsFeedbackProps> = ({ returnQuestions, onEditFeedback }) => {
43
34
  const titleText = useI18nMessage({ id: I18nMessages.FEEDBACK_TITLE });
44
35
 
45
36
  return (
@@ -50,7 +41,7 @@ const ReturnQuestionsFeedback: FC<ReturnQuestionsFeedbackProps> = ({
50
41
  </View>
51
42
 
52
43
  <ReturnQuestionItemProvider returnQuestionItems={returnQuestionItems}>
53
- <ReturnQuestions returnQuestions={returnQuestions} style={customStyle} />
44
+ <ReturnQuestions returnQuestions={returnQuestions} />
54
45
  </ReturnQuestionItemProvider>
55
46
  </View>
56
47
  );
@@ -1,17 +1,11 @@
1
1
  import React, { FC, useCallback } from "react";
2
- import { StyleProp, TextStyle, TouchableHighlight, View, ViewStyle } from "react-native";
2
+ import { TouchableHighlight, View } from "react-native";
3
3
  import { COLOR, Text } from "@lookiero/aurora";
4
- import { Modal, theme } from "@lookiero/sty-psp-ui";
4
+ import { Modal, theme, useEnvironmentStyle } from "@lookiero/sty-psp-ui";
5
5
  import { style } from "./SelectModal.style";
6
6
 
7
7
  const { colorBgPrimaryLight } = theme();
8
8
 
9
- interface SelectModalStyle {
10
- readonly modal: StyleProp<ViewStyle>;
11
- readonly option: StyleProp<ViewStyle>;
12
- readonly optionText: StyleProp<TextStyle>;
13
- }
14
-
15
9
  interface Option {
16
10
  readonly label: string;
17
11
  readonly value: string;
@@ -21,7 +15,6 @@ interface SelectModalProps {
21
15
  readonly title?: string;
22
16
  readonly value: string | undefined;
23
17
  readonly options: Option[];
24
- readonly style?: Partial<SelectModalStyle>;
25
18
  readonly modalVisible: boolean;
26
19
  readonly testID?: string;
27
20
  readonly onChange?: (value: string) => void;
@@ -31,13 +24,13 @@ interface SelectModalProps {
31
24
  const SelectModal: FC<SelectModalProps> = ({
32
25
  modalVisible,
33
26
  options,
34
- style: customStyle,
35
27
  testID,
36
28
  title,
37
29
  value,
38
30
  onChange = () => void 0,
39
31
  onClose = () => void 0,
40
32
  }) => {
33
+ const { modal } = useEnvironmentStyle();
41
34
  const handleOnPressOption = useCallback(
42
35
  (value: string) => {
43
36
  onChange(value);
@@ -48,7 +41,7 @@ const SelectModal: FC<SelectModalProps> = ({
48
41
 
49
42
  return (
50
43
  <Modal testID={testID} visible={modalVisible} scroll showCloseButton onClose={onClose}>
51
- <View style={[style.modal, customStyle?.modal]}>
44
+ <View style={[style.modal, modal?.content]}>
52
45
  {title && (
53
46
  <Text level={3} style={style.modalTitle} heading>
54
47
  {title}
@@ -59,17 +52,13 @@ const SelectModal: FC<SelectModalProps> = ({
59
52
  key={optionValue}
60
53
  accessibilityLabel={optionValue}
61
54
  disabled={value === optionValue}
62
- style={[style.option, customStyle?.option]}
55
+ style={style.option}
63
56
  testID={optionValue}
64
57
  underlayColor={colorBgPrimaryLight}
65
58
  accessible
66
59
  onPress={value !== optionValue ? () => handleOnPressOption(optionValue) : undefined}
67
60
  >
68
- <Text
69
- color={value === optionValue ? COLOR.TEXT_MEDIUM : COLOR.TEXT}
70
- level={3}
71
- style={[style.optionText as ViewStyle, customStyle?.optionText]}
72
- >
61
+ <Text color={value === optionValue ? COLOR.TEXT_MEDIUM : COLOR.TEXT} level={3} style={style.optionText}>
73
62
  {label}
74
63
  </Text>
75
64
  </TouchableHighlight>
@@ -253,14 +253,11 @@ exports[`SelectField component matches the snapshot 1`] = `
253
253
  onResponderTerminationRequest={[Function]}
254
254
  onStartShouldSetResponder={[Function]}
255
255
  style={
256
- [
257
- {
258
- "borderBottomColor": "#DAD8D8",
259
- "borderBottomWidth": 1,
260
- "paddingVertical": 20,
261
- },
262
- undefined,
263
- ]
256
+ {
257
+ "borderBottomColor": "#DAD8D8",
258
+ "borderBottomWidth": 1,
259
+ "paddingVertical": 20,
260
+ }
264
261
  }
265
262
  testID="optionValue"
266
263
  >
@@ -1,24 +1,25 @@
1
1
  import React, { FC } from "react";
2
- import { StyleProp, View, ViewStyle } from "react-native";
2
+ import { View } from "react-native";
3
3
  import { Button, Text } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
- import { Modal } from "@lookiero/sty-psp-ui";
5
+ import { Modal, useEnvironmentStyle } from "@lookiero/sty-psp-ui";
6
6
  import { I18nMessages } from "../../../../i18n/i18n";
7
7
  import { style } from "./SizeWithoutStockModal.style";
8
8
 
9
9
  interface SizeWithoutStockModalProps {
10
10
  readonly visible: boolean;
11
- readonly style?: StyleProp<ViewStyle>;
12
11
  readonly onDismiss: () => void;
13
12
  }
14
- const SizeWithoutStockModal: FC<SizeWithoutStockModalProps> = ({ visible, style: customStyle, onDismiss }) => {
13
+
14
+ const SizeWithoutStockModal: FC<SizeWithoutStockModalProps> = ({ visible, onDismiss }) => {
15
+ const { modal } = useEnvironmentStyle();
15
16
  const titleText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_TITLE });
16
17
  const descriptionText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_DESCRIPTION });
17
18
  const buttonText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_BUTTON });
18
19
 
19
20
  return (
20
21
  <Modal visible={visible} showCloseButton onClose={onDismiss}>
21
- <View style={[style.modalContent, customStyle]}>
22
+ <View style={[style.modalContent, modal?.content]}>
22
23
  <Text level={3} style={style.title} heading>
23
24
  {titleText}
24
25
  </Text>
@@ -218,9 +218,12 @@ exports[`SizeWithoutStockModal component matches the snapshot 1`] = `
218
218
  >
219
219
  <View
220
220
  style={
221
- {
222
- "paddingHorizontal": 24,
223
- }
221
+ [
222
+ {
223
+ "paddingHorizontal": 24,
224
+ },
225
+ undefined,
226
+ ]
224
227
  }
225
228
  >
226
229
  <Text
@@ -1,5 +1,5 @@
1
1
  import React, { FC, useCallback } from "react";
2
- import { StyleProp, View, ViewStyle } from "react-native";
2
+ import { View } from "react-native";
3
3
  import { Spinner } from "@lookiero/aurora";
4
4
  import { CommandStatus } from "@lookiero/messaging-react";
5
5
  import { useLogger } from "@lookiero/sty-psp-logging";
@@ -21,10 +21,6 @@ import { ReturnQuestionsFeedback } from "../../components/returnQuestionsFeedbac
21
21
  import { ProductVariant } from "../../views/productVariant/ProductVariant";
22
22
  import { style } from "./ItemWithCustomerDecission.style";
23
23
 
24
- interface ItemWithCustomerDecissionStyle {
25
- readonly modal: StyleProp<ViewStyle>;
26
- }
27
-
28
24
  interface CheckoutItemWithCustomerDecission extends CheckoutItemProjection {
29
25
  readonly status: Exclude<CheckoutItemStatus, CheckoutItemStatus.INITIAL>;
30
26
  }
@@ -34,7 +30,6 @@ interface ItemWithCustomerDecissionProps {
34
30
  readonly checkoutItem: CheckoutItemWithCustomerDecission;
35
31
  readonly returnQuestions: ReturnQuestionProjection[];
36
32
  readonly currentProductVariant: ProductVariantProjection;
37
- readonly style?: Partial<ItemWithCustomerDecissionStyle>;
38
33
  readonly onEditFeedback: () => void;
39
34
  }
40
35
 
@@ -43,7 +38,6 @@ const ItemWithCustomerDecission: FC<ItemWithCustomerDecissionProps> = ({
43
38
  checkoutItem,
44
39
  returnQuestions,
45
40
  currentProductVariant,
46
- style: customStyle,
47
41
  onEditFeedback,
48
42
  }) => {
49
43
  const screenSize = useScreenSize();
@@ -94,11 +88,7 @@ const ItemWithCustomerDecission: FC<ItemWithCustomerDecissionProps> = ({
94
88
  >
95
89
  {checkoutItem.status === CheckoutItemStatus.RETURNED && (
96
90
  <View style={[style.feedbackContainer, isMobile ? style.feedbackContainerMobile : undefined]}>
97
- <ReturnQuestionsFeedback
98
- returnQuestions={returnQuestions}
99
- style={customStyle}
100
- onEditFeedback={onEditFeedback}
101
- />
91
+ <ReturnQuestionsFeedback returnQuestions={returnQuestions} onEditFeedback={onEditFeedback} />
102
92
  </View>
103
93
  )}
104
94
  </ProductVariant>