@lookiero/checkout 9.2.0 → 9.3.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/dist/src/infrastructure/ui/views/App.js +2 -2
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +1 -1
- package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.js +1 -1
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.d.ts +3 -2
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +2 -2
- package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
- package/src/infrastructure/ui/views/App.tsx +2 -2
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +1 -1
- package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +1 -0
- package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +14 -5
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +1 -1
|
@@ -8,8 +8,8 @@ import { theme } from "@lookiero/sty-psp-ui";
|
|
|
8
8
|
import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
|
|
9
9
|
const { colorBgBase } = theme();
|
|
10
10
|
const App = ({ children }) => (React.createElement(SafeAreaProvider, null,
|
|
11
|
-
React.createElement(PortalProvider,
|
|
11
|
+
React.createElement(PortalProvider, { rootHostName: "Checkout" },
|
|
12
12
|
React.createElement(StatusBar, { backgroundColor: colorBgBase, barStyle: "dark-content", translucent: true }),
|
|
13
|
-
React.createElement(Notifications, { contextId: MESSAGING_CONTEXT_ID }),
|
|
13
|
+
React.createElement(Notifications, { contextId: MESSAGING_CONTEXT_ID, portalHostName: "Checkout" }),
|
|
14
14
|
React.createElement(AuroraPortalProvider, null, children))));
|
|
15
15
|
export { App };
|
|
@@ -10,7 +10,7 @@ const GetOutOfCheckoutModal = ({ visible, onDismiss, onConfirm }) => {
|
|
|
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
|
-
return (React.createElement(Modal, { visible: visible, onClose: onDismiss },
|
|
13
|
+
return (React.createElement(Modal, { portalHostName: "Checkout", visible: visible, onClose: onDismiss },
|
|
14
14
|
React.createElement(View, { style: style.modalContent },
|
|
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),
|
|
@@ -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, portalHostName: "Checkout", testID: "select-field-modal", title: changeSizeButtonText, value: currentProductVariant.id, onChange: onReplace, onClose: handleOnModalClose })));
|
|
38
38
|
};
|
|
39
39
|
export { ItemActions };
|
|
@@ -14,10 +14,11 @@ 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 portalHostName?: string;
|
|
20
|
+
readonly onChange?: (value: string) => void;
|
|
21
|
+
readonly onClose?: () => void;
|
|
21
22
|
}
|
|
22
23
|
declare const SelectModal: FC<SelectModalProps>;
|
|
23
24
|
export type { Option };
|
|
@@ -4,12 +4,12 @@ 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,
|
|
7
|
+
const SelectModal = ({ modalVisible, options, style: customStyle, testID, title, value, portalHostName, onChange = () => void 0, onClose = () => void 0, }) => {
|
|
8
8
|
const handleOnPressOption = useCallback((value) => {
|
|
9
9
|
onChange(value);
|
|
10
10
|
onClose();
|
|
11
11
|
}, [onClose, onChange]);
|
|
12
|
-
return (React.createElement(Modal, { testID: testID, visible: modalVisible, scroll: true, showCloseButton: true, onClose: onClose },
|
|
12
|
+
return (React.createElement(Modal, { portalHostName: portalHostName, testID: testID, visible: modalVisible, scroll: true, showCloseButton: true, onClose: onClose },
|
|
13
13
|
React.createElement(View, { style: [style.modalContent, customStyle?.modalContent] },
|
|
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 },
|
|
@@ -9,7 +9,7 @@ const SizeWithoutStockModal = ({ visible, 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
|
-
return (React.createElement(Modal, { visible: visible, showCloseButton: true, onClose: onDismiss },
|
|
12
|
+
return (React.createElement(Modal, { portalHostName: "Checkout", visible: visible, showCloseButton: true, onClose: onDismiss },
|
|
13
13
|
React.createElement(View, { style: style.modalContent },
|
|
14
14
|
React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
|
|
15
15
|
React.createElement(Text, { level: 3, style: style.description }, descriptionText),
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "9.
|
|
1
|
+
export declare const VERSION = "9.3.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "9.
|
|
1
|
+
export const VERSION = "9.3.0";
|
package/package.json
CHANGED
|
@@ -15,9 +15,9 @@ interface AppProps {
|
|
|
15
15
|
|
|
16
16
|
const App: FC<AppProps> = ({ children }) => (
|
|
17
17
|
<SafeAreaProvider>
|
|
18
|
-
<PortalProvider>
|
|
18
|
+
<PortalProvider rootHostName="Checkout">
|
|
19
19
|
<StatusBar backgroundColor={colorBgBase} barStyle="dark-content" translucent />
|
|
20
|
-
<Notifications contextId={MESSAGING_CONTEXT_ID} />
|
|
20
|
+
<Notifications contextId={MESSAGING_CONTEXT_ID} portalHostName="Checkout" />
|
|
21
21
|
{/*
|
|
22
22
|
We are using the Aurora's PortalProvider at this level for notifications to work properly.
|
|
23
23
|
|
package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx
CHANGED
|
@@ -18,7 +18,7 @@ const GetOutOfCheckoutModal: FC<GetOutOfCheckoutModalProps> = ({ visible, onDism
|
|
|
18
18
|
const confirmButtonText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_CONFIRM_BUTTON });
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
|
-
<Modal visible={visible} onClose={onDismiss}>
|
|
21
|
+
<Modal portalHostName="Checkout" visible={visible} onClose={onDismiss}>
|
|
22
22
|
<View style={style.modalContent}>
|
|
23
23
|
<Text align={ALIGN.CENTER} level={1} style={style.title}>
|
|
24
24
|
{titleText}
|
|
@@ -22,21 +22,23 @@ interface SelectModalProps {
|
|
|
22
22
|
readonly value: string | undefined;
|
|
23
23
|
readonly options: Option[];
|
|
24
24
|
readonly style?: Partial<SelectModalStyle>;
|
|
25
|
-
readonly onChange?: (value: string) => void;
|
|
26
|
-
readonly onClose?: () => void;
|
|
27
25
|
readonly modalVisible: boolean;
|
|
28
26
|
readonly testID?: string;
|
|
27
|
+
readonly portalHostName?: string;
|
|
28
|
+
readonly onChange?: (value: string) => void;
|
|
29
|
+
readonly onClose?: () => void;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
const SelectModal: FC<SelectModalProps> = ({
|
|
32
33
|
modalVisible,
|
|
33
|
-
onChange = () => void 0,
|
|
34
|
-
onClose = () => void 0,
|
|
35
34
|
options,
|
|
36
35
|
style: customStyle,
|
|
37
36
|
testID,
|
|
38
37
|
title,
|
|
39
38
|
value,
|
|
39
|
+
portalHostName,
|
|
40
|
+
onChange = () => void 0,
|
|
41
|
+
onClose = () => void 0,
|
|
40
42
|
}) => {
|
|
41
43
|
const handleOnPressOption = useCallback(
|
|
42
44
|
(value: string) => {
|
|
@@ -47,7 +49,14 @@ const SelectModal: FC<SelectModalProps> = ({
|
|
|
47
49
|
);
|
|
48
50
|
|
|
49
51
|
return (
|
|
50
|
-
<Modal
|
|
52
|
+
<Modal
|
|
53
|
+
portalHostName={portalHostName}
|
|
54
|
+
testID={testID}
|
|
55
|
+
visible={modalVisible}
|
|
56
|
+
scroll
|
|
57
|
+
showCloseButton
|
|
58
|
+
onClose={onClose}
|
|
59
|
+
>
|
|
51
60
|
<View style={[style.modalContent, customStyle?.modalContent]}>
|
|
52
61
|
{title && (
|
|
53
62
|
<Text level={3} style={style.modalTitle} heading>
|
package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx
CHANGED
|
@@ -16,7 +16,7 @@ const SizeWithoutStockModal: FC<SizeWithoutStockModalProps> = ({ visible, onDism
|
|
|
16
16
|
const buttonText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_BUTTON });
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
|
-
<Modal visible={visible} showCloseButton onClose={onDismiss}>
|
|
19
|
+
<Modal portalHostName="Checkout" visible={visible} showCloseButton onClose={onDismiss}>
|
|
20
20
|
<View style={style.modalContent}>
|
|
21
21
|
<Text level={3} style={style.title} heading>
|
|
22
22
|
{titleText}
|