@lookiero/checkout 8.14.0-beta.3 → 8.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +1 -1
- package/cypress/integration/checkout.spec.ts +259 -0
- package/cypress/support/e2e.ts +3 -0
- package/cypress/support/index.d.ts +8 -0
- package/cypress/support/interceptBlockCheckoutBooking.ts +4 -0
- package/cypress/support/interceptGiveCheckoutFeedback.ts +4 -0
- package/cypress/support/interceptKeepCheckoutItem.ts +4 -0
- package/cypress/support/interceptListCheckoutQuestionsByCheckoutId.ts +9 -0
- package/cypress/support/interceptListReturnQuestionsByCheckoutItemId.ts +9 -0
- package/cypress/support/interceptPayment.ts +23 -0
- package/cypress/support/interceptReplaceCheckoutItem.ts +4 -0
- package/cypress/support/interceptReturnCheckoutItem.ts +4 -0
- package/cypress/support/interceptSubmitCheckout.ts +4 -0
- package/cypress/support/interceptViewBookedProductsVariantsForCheckoutItem.ts +9 -0
- package/cypress/support/interceptViewCheckoutById.ts +6 -0
- package/cypress/support/interceptViewFirstAvailableCheckoutByCustomerId.ts +9 -0
- package/cypress/support/interceptViewFiveItemsDiscountByCustomerId.ts +6 -0
- package/cypress/support/interceptViewIsSizeChangeEnabledByCheckoutId.ts +6 -0
- package/cypress/support/interceptViewPaymentFlowPayloadByCheckoutId.ts +9 -0
- package/cypress/support/interceptViewPricingByCheckoutId.ts +6 -0
- package/cypress/tsconfig.json +8 -0
- package/cypress.config.ts +50 -0
- package/dist/src/ExpoRoot.js +2 -2
- package/dist/src/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.js +1 -1
- package/dist/src/infrastructure/ui/Root.d.ts +1 -2
- package/dist/src/infrastructure/ui/Root.js +2 -4
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +2 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +2 -3
- package/dist/src/infrastructure/ui/test/render.js +1 -3
- package/dist/src/infrastructure/ui/views/App.js +7 -12
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +2 -3
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +1 -1
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.d.ts +9 -2
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +5 -6
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.js +1 -1
- package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +2 -3
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +3 -2
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +2 -2
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.js +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/jest.setup.js +0 -20
- package/package.json +10 -9
- package/src/ExpoRoot.tsx +2 -2
- package/src/infrastructure/domain/uiSetting/react/useUpdateUiSetting.test.ts +1 -1
- package/src/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.ts +1 -1
- package/src/infrastructure/ui/Root.tsx +17 -21
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.ts +1 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +2 -3
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +2 -3
- package/src/infrastructure/ui/test/render.tsx +1 -4
- package/src/infrastructure/ui/views/App.tsx +16 -23
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.ts +1 -1
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +2 -3
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +10 -6
- package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +0 -1
- package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +26 -24
- package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.ts +1 -1
- package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +21 -10
- package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +15 -5
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +2 -4
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +10 -6
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +2 -2
- package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +78 -72
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +9 -3
- package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +4 -4
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +2 -2
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +2 -2
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +2 -2
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +30 -28
- package/dist/pact.config.d.ts +0 -13
- package/dist/pact.config.js +0 -9
- package/dist/public/public/assets/adaptive-icon.png +0 -0
- package/dist/public/public/assets/favicon.png +0 -0
- package/dist/public/public/assets/icon.png +0 -0
- package/dist/public/public/assets/splash.png +0 -0
- package/dist/public/public/images/not-found.png +0 -0
- package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.d.ts +0 -3
- package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.js +0 -27
- package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +0 -48
- package/dist/src/infrastructure/projection/checkout/checkout.mock.d.ts +0 -19
- package/dist/src/infrastructure/projection/checkout/checkout.mock.js +0 -21
- package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +0 -109
- package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +0 -49
- package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +0 -44
- package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +0 -44
- package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +0 -44
- package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +0 -10
- package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +0 -17
- package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.d.ts +0 -3
- package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.js +0 -6
- package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +0 -49
- package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.d.ts +0 -15
- package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.js +0 -43
- package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +0 -50
- package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.d.ts +0 -3
- package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.js +0 -103
- package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +0 -48
- package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +0 -109
- package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.d.ts +0 -6
- package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.js +0 -183
- package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +0 -48
- package/dist/src/infrastructure/projection/pricing/pricing.mock.d.ts +0 -9
- package/dist/src/infrastructure/projection/pricing/pricing.mock.js +0 -42
- package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +0 -48
- package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.d.ts +0 -3
- package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.js +0 -400
- package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +0 -21
- package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +0 -1
- package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +0 -6
- package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +0 -4
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +0 -6
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +0 -5
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +0 -4
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +0 -19
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +0 -3
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +0 -18
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +0 -12
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +0 -13
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +0 -6
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +0 -11
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +0 -8
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +0 -11
- package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +0 -11
- package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +0 -49
- package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +0 -9
- package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +0 -9
- package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +0 -19
- package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +0 -21
- package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +0 -9
- package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +0 -21
- package/dist/src/infrastructure/ui/views/App.style.d.ts +0 -6
- package/dist/src/infrastructure/ui/views/App.style.js +0 -7
- package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +0 -7
- package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +0 -10
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -11
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +0 -40
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +0 -12
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +0 -15
- package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +0 -40
- package/dist/src/infrastructure/ui/views/return/Return.style.js +0 -43
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -13
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +0 -9
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +0 -7
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +0 -10
- package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +0 -17
- package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +0 -13
- package/dist/src/projection/shared/country.d.ts +0 -14
- package/dist/src/projection/shared/country.js +0 -15
- package/dist/src/projection/shared/customer.d.ts +0 -8
- package/dist/src/projection/shared/customer.js +0 -1
- package/dist/src/projection/shared/locale.d.ts +0 -12
- package/dist/src/projection/shared/locale.js +0 -13
- package/dist/src/projection/shared/order.d.ts +0 -6
- package/dist/src/projection/shared/order.js +0 -1
- package/dist/src/projection/shared/price.d.ts +0 -10
- package/dist/src/projection/shared/price.js +0 -1
- package/dist/src/projection/shared/size.d.ts +0 -20
- package/dist/src/projection/shared/size.js +0 -3
- package/dist/src/projection/shared/subscription.d.ts +0 -2
- package/dist/src/projection/shared/subscription.js +0 -1
- package/dist/src/shared/ui/components/atoms/error/Error.d.ts +0 -10
- package/dist/src/shared/ui/components/atoms/error/Error.js +0 -4
- package/pact.config.ts +0 -31
- package/pact.publish.js +0 -32
- package/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.ts +0 -62
- package/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.ts +0 -128
- package/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.ts +0 -63
- package/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.ts +0 -57
- package/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.ts +0 -57
- package/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.ts +0 -57
- package/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.ts +0 -63
- package/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.ts +0 -64
- package/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.ts +0 -62
- package/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.ts +0 -136
- package/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.ts +0 -62
- package/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.ts +0 -62
- package/src/infrastructure/ui/views/App.style.ts +0 -9
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
import { PortalProvider } from "@gorhom/portal";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { StatusBar
|
|
3
|
+
import { StatusBar } from "react-native";
|
|
4
4
|
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
5
5
|
import { PortalProvider as AuroraPortalProvider } from "@lookiero/aurora";
|
|
6
6
|
import { Notifications } from "@lookiero/sty-psp-notifications";
|
|
7
|
-
import { theme
|
|
7
|
+
import { theme } from "@lookiero/sty-psp-ui";
|
|
8
8
|
import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
|
|
9
|
-
import { style } from "./App.style";
|
|
10
9
|
const { colorBgBase } = theme();
|
|
11
|
-
const App = ({ children }) =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
React.createElement(
|
|
15
|
-
|
|
16
|
-
React.createElement(StatusBar, { backgroundColor: colorBgBase, barStyle: "dark-content", translucent: true }),
|
|
17
|
-
React.createElement(Notifications, { contextId: MESSAGING_CONTEXT_ID }),
|
|
18
|
-
React.createElement(AuroraPortalProvider, null, children)))));
|
|
19
|
-
};
|
|
10
|
+
const App = ({ children }) => (React.createElement(SafeAreaProvider, null,
|
|
11
|
+
React.createElement(PortalProvider, null,
|
|
12
|
+
React.createElement(StatusBar, { backgroundColor: colorBgBase, barStyle: "dark-content", translucent: true }),
|
|
13
|
+
React.createElement(Notifications, { contextId: MESSAGING_CONTEXT_ID }),
|
|
14
|
+
React.createElement(AuroraPortalProvider, null, children))));
|
|
20
15
|
export { App };
|
|
@@ -2,17 +2,16 @@ import React from "react";
|
|
|
2
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
|
|
5
|
+
import { Modal } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
7
7
|
import { style } from "./GetOutOfCheckoutModal.style";
|
|
8
8
|
const GetOutOfCheckoutModal = ({ visible, onDismiss, onConfirm }) => {
|
|
9
|
-
const { modal } = useEnvironmentStyle();
|
|
10
9
|
const titleText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_TITLE });
|
|
11
10
|
const descriptionText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DESCRIPTION });
|
|
12
11
|
const dismissButtonText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DISMISS_BUTTON });
|
|
13
12
|
const confirmButtonText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_CONFIRM_BUTTON });
|
|
14
13
|
return (React.createElement(Modal, { visible: visible, onClose: onDismiss },
|
|
15
|
-
React.createElement(View, { style:
|
|
14
|
+
React.createElement(View, { style: style.modalContent },
|
|
16
15
|
React.createElement(Text, { align: ALIGN.CENTER, level: 1, style: style.title }, titleText),
|
|
17
16
|
React.createElement(Text, { level: 3, style: style.description }, descriptionText),
|
|
18
17
|
React.createElement(Button, { style: style.button, onPress: onDismiss },
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
+
import { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
3
|
+
interface SelectModalStyle {
|
|
4
|
+
readonly modalContent: StyleProp<ViewStyle>;
|
|
5
|
+
readonly option: StyleProp<ViewStyle>;
|
|
6
|
+
readonly optionText: StyleProp<TextStyle>;
|
|
7
|
+
}
|
|
2
8
|
interface Option {
|
|
3
9
|
readonly label: string;
|
|
4
10
|
readonly value: string;
|
|
@@ -7,10 +13,11 @@ interface SelectModalProps {
|
|
|
7
13
|
readonly title?: string;
|
|
8
14
|
readonly value: string | undefined;
|
|
9
15
|
readonly options: Option[];
|
|
10
|
-
readonly
|
|
11
|
-
readonly testID?: string;
|
|
16
|
+
readonly style?: Partial<SelectModalStyle>;
|
|
12
17
|
readonly onChange?: (value: string) => void;
|
|
13
18
|
readonly onClose?: () => void;
|
|
19
|
+
readonly modalVisible: boolean;
|
|
20
|
+
readonly testID?: string;
|
|
14
21
|
}
|
|
15
22
|
declare const SelectModal: FC<SelectModalProps>;
|
|
16
23
|
export type { Option };
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import React, { useCallback } from "react";
|
|
2
2
|
import { TouchableHighlight, View } from "react-native";
|
|
3
3
|
import { COLOR, Text } from "@lookiero/aurora";
|
|
4
|
-
import { Modal, theme
|
|
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,
|
|
8
|
-
const { modal } = useEnvironmentStyle();
|
|
7
|
+
const SelectModal = ({ modalVisible, onChange = () => void 0, onClose = () => void 0, options, style: customStyle, testID, title, value, }) => {
|
|
9
8
|
const handleOnPressOption = useCallback((value) => {
|
|
10
9
|
onChange(value);
|
|
11
10
|
onClose();
|
|
12
11
|
}, [onClose, onChange]);
|
|
13
12
|
return (React.createElement(Modal, { testID: testID, visible: modalVisible, scroll: true, showCloseButton: true, onClose: onClose },
|
|
14
|
-
React.createElement(View, { style: [style.
|
|
13
|
+
React.createElement(View, { style: [style.modalContent, customStyle?.modalContent] },
|
|
15
14
|
title && (React.createElement(Text, { level: 3, style: style.modalTitle, heading: true }, title)),
|
|
16
|
-
options.map(({ label, value: optionValue }) => (React.createElement(TouchableHighlight, { key: optionValue, accessibilityLabel: optionValue, disabled: value === optionValue, style: style.option, testID: optionValue, underlayColor: colorBgPrimaryLight, accessible: true, onPress: value !== optionValue ? () => handleOnPressOption(optionValue) : undefined },
|
|
17
|
-
React.createElement(Text, { color: value === optionValue ? COLOR.TEXT_MEDIUM : COLOR.TEXT, level: 3, style: style.optionText }, label)))))));
|
|
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
|
+
React.createElement(Text, { color: value === optionValue ? COLOR.TEXT_MEDIUM : COLOR.TEXT, level: 3, style: [style.optionText, customStyle?.optionText] }, label)))))));
|
|
18
17
|
};
|
|
19
18
|
export { SelectModal };
|
|
@@ -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
|
-
|
|
5
|
+
modalContent: {
|
|
6
6
|
paddingBottom: space6,
|
|
7
7
|
paddingHorizontal: space6,
|
|
8
8
|
},
|
|
@@ -2,16 +2,15 @@ import React from "react";
|
|
|
2
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
|
|
5
|
+
import { Modal } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
7
7
|
import { style } from "./SizeWithoutStockModal.style";
|
|
8
8
|
const SizeWithoutStockModal = ({ visible, onDismiss }) => {
|
|
9
|
-
const { modal } = useEnvironmentStyle();
|
|
10
9
|
const titleText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_TITLE });
|
|
11
10
|
const descriptionText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_DESCRIPTION });
|
|
12
11
|
const buttonText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_BUTTON });
|
|
13
12
|
return (React.createElement(Modal, { visible: visible, showCloseButton: true, onClose: onDismiss },
|
|
14
|
-
React.createElement(View, { style:
|
|
13
|
+
React.createElement(View, { style: style.modalContent },
|
|
15
14
|
React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
|
|
16
15
|
React.createElement(Text, { level: 3, style: style.description }, descriptionText),
|
|
17
16
|
React.createElement(Button, { onPress: onDismiss }, buttonText))));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PortalHost } from "@gorhom/portal";
|
|
2
2
|
import React, { useCallback, useMemo } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Platform } from "react-native";
|
|
4
|
+
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
4
5
|
import { generatePath, useNavigate } from "react-router-native";
|
|
5
6
|
import { Box, Button, Layout as AuroraLayout, Spinner, Text, View, useDevice } from "@lookiero/aurora";
|
|
6
7
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
@@ -100,7 +101,7 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
|
|
|
100
101
|
header: style.header,
|
|
101
102
|
} },
|
|
102
103
|
React.createElement(ProductVariantPreview, { country: country, item: checkoutItem }),
|
|
103
|
-
React.createElement(
|
|
104
|
+
React.createElement(KeyboardAwareScrollView, { extraScrollHeight: Platform.OS === "android" ? 10 : 120, keyboardShouldPersistTaps: "handled", showsVerticalScrollIndicator: false, testID: "return-questions-form" },
|
|
104
105
|
React.createElement(View, { style: style.background },
|
|
105
106
|
React.createElement(AuroraLayout, { fullWidth: !screen.L, style: [style.layout, screen.L ? style.desktopLayoutSpacing : undefined] },
|
|
106
107
|
React.createElement(Box, { size: { L: "2/3" } },
|
package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js
CHANGED
|
@@ -26,8 +26,8 @@ const CollapsiblePricing = ({ pricing, totalCheckoutItemsKept, collapsible = tru
|
|
|
26
26
|
totalCheckoutItemsKeptText),
|
|
27
27
|
React.createElement(Price, { price: pendingToPay, variant: "detail" })),
|
|
28
28
|
React.createElement(View, { style: style.collapsedContent },
|
|
29
|
-
React.createElement(Button, { testID: "
|
|
29
|
+
React.createElement(Button, { testID: "submit-checkout-collpased-button", small: true, onPress: onSubmit }, submitButtonText)))) : (React.createElement(animated.View, { style: { opacity: notCollapsedStyle.opacitiy } },
|
|
30
30
|
React.createElement(Pricing, { pricing: pricing, totalCheckoutItemsKept: totalCheckoutItemsKept }),
|
|
31
|
-
React.createElement(Button, { testID: "
|
|
31
|
+
React.createElement(Button, { testID: "submit-checkout-button", onPress: onSubmit }, submitButtonText)))));
|
|
32
32
|
};
|
|
33
33
|
export { CollapsiblePricing };
|
|
@@ -16,7 +16,7 @@ const CheckoutItemsTabs = ({ tabIndex, checkoutItemsKept, checkoutItemsReturned,
|
|
|
16
16
|
const keepEmptyText = useI18nMessage({ id: I18nMessages.SUMMARY_KEEP_EMPTY });
|
|
17
17
|
const returnEmptyText = useI18nMessage({ id: I18nMessages.SUMMARY_RETURN_EMPTY });
|
|
18
18
|
const handleOnPressItem = useCallback((checkoutItemId) => onPressItem(checkoutItemId), [onPressItem]);
|
|
19
|
-
const data = useMemo(() => [0,
|
|
19
|
+
const data = useMemo(() => [{ id: "0" }, { id: "1" }], []);
|
|
20
20
|
const renderItem = useCallback(({ index }) => index === 0 ? (checkoutItemsKept.length === 0 ? (React.createElement(Text, { style: style.emptyText }, keepEmptyText)) : (React.createElement(React.Fragment, null, checkoutItemsKept.map((checkoutItem) => (React.createElement(CheckoutItem, { key: checkoutItem.id, checkoutItemPrice: checkoutItem.price, checkoutItemStatus: checkoutItem.status, country: country, testID: "keep-checkout-item", checkoutItemProductVariant: checkoutItem.status === CheckoutItemStatus.REPLACED && checkoutItem.replacedFor
|
|
21
21
|
? checkoutItem.replacedFor
|
|
22
22
|
: checkoutItem.productVariant, onPress: () => handleOnPressItem(checkoutItem.id) })))))) : checkoutItemsReturned.length === 0 ? (React.createElement(Text, { style: style.emptyText }, returnEmptyText)) : (React.createElement(React.Fragment, null, checkoutItemsReturned.map((checkoutItem) => (React.createElement(CheckoutItem, { key: checkoutItem.id, checkoutItemPrice: checkoutItem.price, checkoutItemProductVariant: checkoutItem.productVariant, checkoutItemStatus: checkoutItem.status, country: country, testID: "return-checkout-item", onPress: () => handleOnPressItem(checkoutItem.id) }))))), [checkoutItemsKept, checkoutItemsReturned, country, handleOnPressItem, keepEmptyText, returnEmptyText]);
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "8.
|
|
1
|
+
export declare const VERSION = "8.15.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "8.
|
|
1
|
+
export const VERSION = "8.15.0";
|
package/jest.setup.js
CHANGED
|
@@ -11,26 +11,6 @@ jest.mock("@react-native-async-storage/async-storage", () => mockAsyncStorage);
|
|
|
11
11
|
* Without these, jest will break or pollute the log warnings.
|
|
12
12
|
*/
|
|
13
13
|
jest.mock("expo-linear-gradient", () => ({ LinearGradient: require("react-native").View }));
|
|
14
|
-
jest.mock("expo-image-picker", () => ({
|
|
15
|
-
PermissionStatus: {
|
|
16
|
-
GRANTED: "granted",
|
|
17
|
-
UNDETERMINED: "undetermined",
|
|
18
|
-
DENIED: "denied",
|
|
19
|
-
},
|
|
20
|
-
MediaTypeOptions: {
|
|
21
|
-
Images: "Images",
|
|
22
|
-
},
|
|
23
|
-
requestMediaLibraryPermissionsAsync: jest.fn(),
|
|
24
|
-
requestCameraPermissionsAsync: jest.fn(),
|
|
25
|
-
launchImageLibraryAsync: jest.fn(),
|
|
26
|
-
launchCameraAsync: jest.fn(),
|
|
27
|
-
}));
|
|
28
|
-
jest.mock("expo-image-manipulator", () => ({
|
|
29
|
-
manipulateAsync: jest.fn(),
|
|
30
|
-
SaveFormat: {
|
|
31
|
-
JPEG: "jpeg",
|
|
32
|
-
},
|
|
33
|
-
}));
|
|
34
14
|
|
|
35
15
|
jest.mock("react-native-safe-area-context", () => ({
|
|
36
16
|
SafeAreaProvider: ({ children }) => children,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lookiero/checkout",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.15.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"sideEffects": "false",
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
"serve": "sty-psp serve",
|
|
11
11
|
"format": "prettier --write .",
|
|
12
12
|
"lint": "eslint --fix .",
|
|
13
|
-
"test": "jest"
|
|
13
|
+
"test": "jest",
|
|
14
|
+
"cypress": "METRO_PORT=8084 WEB_PORT=19004 start-server-and-test dev 19004 'cypress run'",
|
|
15
|
+
"cypress:open": "METRO_PORT=8084 WEB_PORT=19004 start-server-and-test dev 19004 'cypress open'"
|
|
14
16
|
},
|
|
15
17
|
"dependencies": {
|
|
16
18
|
"@lookiero/messaging": "^8.1.1",
|
|
@@ -26,16 +28,18 @@
|
|
|
26
28
|
"@lookiero/sty-psp-segment": "^0.1",
|
|
27
29
|
"@lookiero/sty-psp-storage": "^0.1",
|
|
28
30
|
"@lookiero/sty-psp-tracking": "^0.1",
|
|
29
|
-
"@lookiero/sty-psp-ui": "^0.
|
|
31
|
+
"@lookiero/sty-psp-ui": "^0.6",
|
|
30
32
|
"@lookiero/sty-psp-ui-settings": "^0.1",
|
|
31
33
|
"@lookiero/sty-psp-units": "^0.1",
|
|
32
34
|
"@lookiero/sty-psp-uuid": "^0.1",
|
|
33
35
|
"@react-native-async-storage/async-storage": "^1.22.3",
|
|
34
36
|
"@react-spring/native": "9.6.1",
|
|
35
|
-
"react-native-
|
|
37
|
+
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
|
38
|
+
"react-native-svg": ">=13.6.0",
|
|
36
39
|
"tiny-invariant": "^1.3.1"
|
|
37
40
|
},
|
|
38
41
|
"devDependencies": {
|
|
42
|
+
"@cypress/webpack-preprocessor": "^6.0.2",
|
|
39
43
|
"@lookiero/eslint-config-sty-psp": "*",
|
|
40
44
|
"@lookiero/event": "^0.3",
|
|
41
45
|
"@lookiero/payments-front": "5.0.1",
|
|
@@ -43,13 +47,10 @@
|
|
|
43
47
|
"@lookiero/sty-psp-prettier-config": "*",
|
|
44
48
|
"@lookiero/sty-psp-scripts": "*",
|
|
45
49
|
"@lookiero/sty-psp-typescript": "*",
|
|
46
|
-
"@lookiero/testing-library-e2e-native": "1.0.41",
|
|
47
|
-
"@pact-foundation/pact": "^10.1.4",
|
|
48
|
-
"@pact-foundation/pact-node": "^10.17.6",
|
|
49
50
|
"@remix-run/router": ">=1.10",
|
|
50
51
|
"@testing-library/react-native": ">=12",
|
|
51
52
|
"@types/jest-when": ">=3",
|
|
52
|
-
"
|
|
53
|
+
"cypress": "^13.14.2",
|
|
53
54
|
"apollo-boost": "0.4.4",
|
|
54
55
|
"buffer": "5.6.0",
|
|
55
56
|
"jest-mock-extended": ">=3",
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"react": ">=18",
|
|
73
74
|
"react-native": ">=0.71",
|
|
74
75
|
"react-native-get-random-values": ">=1.9",
|
|
75
|
-
"react-native-reanimated": ">=3.
|
|
76
|
+
"react-native-reanimated": ">=3.7",
|
|
76
77
|
"react-native-safe-area-context": ">=4.5",
|
|
77
78
|
"react-router-dom": ">=6.14",
|
|
78
79
|
"react-router-native": ">=6.14",
|
package/src/ExpoRoot.tsx
CHANGED
|
@@ -33,7 +33,7 @@ const order: Order = {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const customer: Customer = {
|
|
36
|
-
customerId: "
|
|
36
|
+
customerId: "74cb4f76-3f14-4983-81a6-2ee2a9a275d4",
|
|
37
37
|
country: Country.ES,
|
|
38
38
|
segment: Segment.WOMEN,
|
|
39
39
|
};
|
|
@@ -48,7 +48,7 @@ const sentryConfig: SentryEnvironment = {
|
|
|
48
48
|
const apiUrl =
|
|
49
49
|
Platform.OS !== "web" ? "https://web2.sp.dev.aws.lookiero.es/quiz/api" : __DEV__ ? "/local-to-dev" : "/checkout/api";
|
|
50
50
|
const authToken =
|
|
51
|
-
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.
|
|
51
|
+
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjU2NDg3OTAsImV4cCI6MTczNDAwNTE4MywiZGlzcGxheU5hbWUiOiJUZXN0aW5nIiwiY291bnRyeV9jb2RlIjoiRVMiLCJhY2Nlc3NWaWEiOiJlbWFpbCIsInN1YnNjcmlwdGlvblN0YXJ0aW5nRGF0ZSI6IjIwMjQtMTEtMDgiLCJpbXBlcnNvbmF0ZWQiOmZhbHNlLCJ1dWlkIjoiNzRjYjRmNzYtM2YxNC00OTgzLTgxYTYtMmVlMmE5YTI3NWQ0IiwiaWF0IjoxNzMxNDEzMTgzfQ.KU6RhR19P6FhbH-lad-Hyx2PP1pv25GaDiE2txK9LMI";
|
|
52
52
|
const getAuthToken = () => Promise.resolve(authToken);
|
|
53
53
|
|
|
54
54
|
const externalTranslationsUrl =
|
|
@@ -36,7 +36,7 @@ describe("useUpdateUiSetting integration hook", () => {
|
|
|
36
36
|
const [, status] = result.current;
|
|
37
37
|
expect(status).toBe(CommandStatus.SUCCESS);
|
|
38
38
|
});
|
|
39
|
-
});
|
|
39
|
+
}, 10000);
|
|
40
40
|
|
|
41
41
|
it("calls logger.captureException when 'update' fails", async () => {
|
|
42
42
|
const error = new Error("Some error");
|
package/src/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.ts
CHANGED
|
@@ -27,7 +27,7 @@ const useViewPaymentFlowPayloadByCheckoutId: UseViewPaymentFlowPayloadByCheckout
|
|
|
27
27
|
query: viewPaymentFlowPayloadByCheckoutId({ checkoutId: checkoutId as string }),
|
|
28
28
|
contextId: MESSAGING_CONTEXT_ID,
|
|
29
29
|
invalidation: shouldInvalidate,
|
|
30
|
-
options: { refetchOnMount: "always", enabled: Boolean(checkoutId), cacheTime: 0 },
|
|
30
|
+
options: { refetchOnMount: "always", enabled: Boolean(checkoutId), cacheTime: 0, refetchOnWindowFocus: false },
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
export { useViewPaymentFlowPayloadByCheckoutId };
|
|
@@ -6,7 +6,7 @@ import { I18n } from "@lookiero/i18n-react";
|
|
|
6
6
|
import { MessagingRoot } from "@lookiero/messaging-react/bootstrap";
|
|
7
7
|
import { Locale } from "@lookiero/sty-psp-locale";
|
|
8
8
|
import { SentryEnvironment, SentryLoggerFunctionArgs, sentryLogger, sentryLoggerHOC } from "@lookiero/sty-psp-logging";
|
|
9
|
-
import {
|
|
9
|
+
import { Layout } from "@lookiero/sty-psp-ui";
|
|
10
10
|
import { Customer } from "../../projection/customer/customer";
|
|
11
11
|
import { Order } from "../../projection/order/order";
|
|
12
12
|
import { Subscription } from "../../projection/subscription/subscription";
|
|
@@ -33,7 +33,6 @@ interface RootProps {
|
|
|
33
33
|
readonly order: Order | undefined;
|
|
34
34
|
readonly subscription: Subscription | undefined;
|
|
35
35
|
readonly layout: Layout;
|
|
36
|
-
readonly style?: EnvironmentStyle;
|
|
37
36
|
readonly onNotAccessible: () => void;
|
|
38
37
|
readonly onCheckoutSubmitted?: () => void;
|
|
39
38
|
readonly useRedirect: () => Record<string, string>;
|
|
@@ -52,7 +51,6 @@ const root: RootFunction = ({ Messaging, I18n, getAuthToken, development, sentry
|
|
|
52
51
|
order,
|
|
53
52
|
subscription,
|
|
54
53
|
layout,
|
|
55
|
-
style,
|
|
56
54
|
onNotAccessible,
|
|
57
55
|
onCheckoutSubmitted,
|
|
58
56
|
useRedirect,
|
|
@@ -62,24 +60,22 @@ const root: RootFunction = ({ Messaging, I18n, getAuthToken, development, sentry
|
|
|
62
60
|
|
|
63
61
|
return (
|
|
64
62
|
<Messaging includeReactQueryDevTools={Platform.OS === "web"}>
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
/>
|
|
82
|
-
</EnvironmentStyleProvider>
|
|
63
|
+
<Routing
|
|
64
|
+
I18n={I18n}
|
|
65
|
+
basePath={basePath}
|
|
66
|
+
customer={customer}
|
|
67
|
+
getAuthToken={getAuthToken}
|
|
68
|
+
kameleoon={kameleoon}
|
|
69
|
+
layout={layout}
|
|
70
|
+
locale={locale}
|
|
71
|
+
order={order}
|
|
72
|
+
subscription={subscription}
|
|
73
|
+
useRedirect={useRedirect}
|
|
74
|
+
useRoutes={useRoutes}
|
|
75
|
+
onCheckoutSubmitted={onCheckoutSubmitted}
|
|
76
|
+
onI18nError={development ? undefined : handleOnI18nError}
|
|
77
|
+
onNotAccessible={onNotAccessible}
|
|
78
|
+
/>
|
|
83
79
|
</Messaging>
|
|
84
80
|
);
|
|
85
81
|
};
|
|
@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
|
2
2
|
import { TouchableHighlight, View } from "react-native";
|
|
3
3
|
import { ButtonIcon } from "@lookiero/aurora";
|
|
4
4
|
import { useIntl } from "@lookiero/i18n-react";
|
|
5
|
-
import { Modal
|
|
5
|
+
import { Modal } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { InputField } from "../../../../../../../shared/ui/components/molecules/inputField/InputField";
|
|
7
7
|
import {
|
|
8
8
|
useReturnQuestionFeedback,
|
|
@@ -21,7 +21,6 @@ const HostSelectReturnQuestionItem: ReturnQuestionItem = ({
|
|
|
21
21
|
portalHostName,
|
|
22
22
|
testID,
|
|
23
23
|
}: ReturnQuestionItemProps) => {
|
|
24
|
-
const { modal } = useEnvironmentStyle();
|
|
25
24
|
const { formatMessage } = useIntl();
|
|
26
25
|
const placeholderText = useMemo(
|
|
27
26
|
() => (returnQuestion.placeholder ? formatMessage({ id: returnQuestion.placeholder }) : ""),
|
|
@@ -91,7 +90,7 @@ const HostSelectReturnQuestionItem: ReturnQuestionItem = ({
|
|
|
91
90
|
showCloseButton
|
|
92
91
|
onClose={handleOnModalClose}
|
|
93
92
|
>
|
|
94
|
-
<View style={
|
|
93
|
+
<View style={style.modalContent}>{children}</View>
|
|
95
94
|
</Modal>
|
|
96
95
|
</>
|
|
97
96
|
);
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
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
|
|
5
|
+
import { Modal } 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";
|
|
@@ -21,13 +21,12 @@ const ModalOptionReturnQuestionItems = ({
|
|
|
21
21
|
visible,
|
|
22
22
|
onClose,
|
|
23
23
|
}: ModalOptionReturnQuestionItemsProps) => {
|
|
24
|
-
const { modal } = useEnvironmentStyle();
|
|
25
24
|
const { formatMessage } = useIntl();
|
|
26
25
|
const title = formatMessage({ id: returnQuestion.name });
|
|
27
26
|
|
|
28
27
|
return (
|
|
29
28
|
<Modal portalHostName={portalHostName} visible={visible} scroll showCloseButton onClose={onClose}>
|
|
30
|
-
<View style={
|
|
29
|
+
<View style={style.modalContent}>
|
|
31
30
|
<Text color={COLOR.TEXT_MEDIUM} level={2} style={style.optionText}>
|
|
32
31
|
{title}
|
|
33
32
|
</Text>
|
|
@@ -5,7 +5,6 @@ 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";
|
|
9
8
|
import { BasePathProvider } from "../routing/useBasePath";
|
|
10
9
|
|
|
11
10
|
interface RenderArgs {
|
|
@@ -28,9 +27,7 @@ const renderWrapper: RenderWrapperFunction =
|
|
|
28
27
|
<IntlProvider locale={locale as string} messages={messages} onError={() => void 0}>
|
|
29
28
|
<LoggerProvider logger={logger}>
|
|
30
29
|
<BasePathProvider basePath="">
|
|
31
|
-
<
|
|
32
|
-
<Wrapper>{children}</Wrapper>
|
|
33
|
-
</EnvironmentStyleProvider>
|
|
30
|
+
<Wrapper>{children}</Wrapper>
|
|
34
31
|
</BasePathProvider>
|
|
35
32
|
</LoggerProvider>
|
|
36
33
|
</IntlProvider>
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { PortalProvider } from "@gorhom/portal";
|
|
2
2
|
import React, { FC } from "react";
|
|
3
|
-
import { StatusBar
|
|
3
|
+
import { StatusBar } from "react-native";
|
|
4
4
|
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
5
5
|
import { PortalProvider as AuroraPortalProvider } from "@lookiero/aurora";
|
|
6
6
|
import { Notifications } from "@lookiero/sty-psp-notifications";
|
|
7
|
-
import { theme
|
|
7
|
+
import { theme } from "@lookiero/sty-psp-ui";
|
|
8
8
|
import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
|
|
9
|
-
import { style } from "./App.style";
|
|
10
9
|
|
|
11
10
|
const { colorBgBase } = theme();
|
|
12
11
|
|
|
@@ -14,26 +13,20 @@ interface AppProps {
|
|
|
14
13
|
readonly children: JSX.Element;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
|
-
const App: FC<AppProps> = ({ children }) =>
|
|
18
|
-
|
|
16
|
+
const App: FC<AppProps> = ({ children }) => (
|
|
17
|
+
<SafeAreaProvider>
|
|
18
|
+
<PortalProvider>
|
|
19
|
+
<StatusBar backgroundColor={colorBgBase} barStyle="dark-content" translucent />
|
|
20
|
+
<Notifications contextId={MESSAGING_CONTEXT_ID} />
|
|
21
|
+
{/*
|
|
22
|
+
We are using the Aurora's PortalProvider at this level for notifications to work properly.
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
};
|
|
24
|
+
PaymentInstrumentSelect uses Aurora's Portal, and if we rely on UAF's Portal (injected by <Aurora>)
|
|
25
|
+
notifications would be displayed in a layer below Portal's one (not visible).
|
|
26
|
+
*/}
|
|
27
|
+
<AuroraPortalProvider>{children}</AuroraPortalProvider>
|
|
28
|
+
</PortalProvider>
|
|
29
|
+
</SafeAreaProvider>
|
|
30
|
+
);
|
|
38
31
|
|
|
39
32
|
export { App };
|
package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import React, { FC } from "react";
|
|
|
2
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
|
|
5
|
+
import { Modal } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
7
7
|
import { style } from "./GetOutOfCheckoutModal.style";
|
|
8
8
|
|
|
@@ -12,7 +12,6 @@ interface GetOutOfCheckoutModalProps {
|
|
|
12
12
|
readonly onConfirm: () => void;
|
|
13
13
|
}
|
|
14
14
|
const GetOutOfCheckoutModal: FC<GetOutOfCheckoutModalProps> = ({ visible, onDismiss, onConfirm }) => {
|
|
15
|
-
const { modal } = useEnvironmentStyle();
|
|
16
15
|
const titleText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_TITLE });
|
|
17
16
|
const descriptionText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DESCRIPTION });
|
|
18
17
|
const dismissButtonText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DISMISS_BUTTON });
|
|
@@ -20,7 +19,7 @@ const GetOutOfCheckoutModal: FC<GetOutOfCheckoutModalProps> = ({ visible, onDism
|
|
|
20
19
|
|
|
21
20
|
return (
|
|
22
21
|
<Modal visible={visible} onClose={onDismiss}>
|
|
23
|
-
<View style={
|
|
22
|
+
<View style={style.modalContent}>
|
|
24
23
|
<Text align={ALIGN.CENTER} level={1} style={style.title}>
|
|
25
24
|
{titleText}
|
|
26
25
|
</Text>
|
|
@@ -76,6 +76,7 @@ exports[`GetOutOfCheckoutModal component matches the snapshot 1`] = `
|
|
|
76
76
|
"zIndex": 1,
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
testID="modal-close-button"
|
|
79
80
|
/>
|
|
80
81
|
<View
|
|
81
82
|
pointerEvents="box-none"
|
|
@@ -132,6 +133,12 @@ exports[`GetOutOfCheckoutModal component matches the snapshot 1`] = `
|
|
|
132
133
|
}
|
|
133
134
|
>
|
|
134
135
|
<View
|
|
136
|
+
contentInset={
|
|
137
|
+
{
|
|
138
|
+
"bottom": 0,
|
|
139
|
+
"top": 0,
|
|
140
|
+
}
|
|
141
|
+
}
|
|
135
142
|
keyboardShouldPersistTaps="handled"
|
|
136
143
|
showsVerticalScrollIndicator={false}
|
|
137
144
|
>
|
|
@@ -144,12 +151,9 @@ exports[`GetOutOfCheckoutModal component matches the snapshot 1`] = `
|
|
|
144
151
|
>
|
|
145
152
|
<View
|
|
146
153
|
style={
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
},
|
|
151
|
-
undefined,
|
|
152
|
-
]
|
|
154
|
+
{
|
|
155
|
+
"paddingHorizontal": 24,
|
|
156
|
+
}
|
|
153
157
|
}
|
|
154
158
|
>
|
|
155
159
|
<Text
|