@lookiero/checkout 14.2.0 → 14.2.2-beta.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/ExpoRoot.js +2 -2
- package/dist/src/infrastructure/ui/components/atoms/price/Price.js +5 -5
- package/dist/src/infrastructure/ui/components/atoms/price/Price.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/components/atoms/price/Price.style.js +1 -0
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostLegacyRadioGroupReturnQuestionItem/HostLegacyRadioGroupReturnQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +2 -2
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js +1 -1
- package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js +1 -1
- package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.js +1 -1
- package/dist/src/infrastructure/ui/views/checkout/Checkout.js +1 -1
- package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.js +1 -1
- package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.d.ts +3 -0
- package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.js +3 -0
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +2 -2
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +3 -3
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +1 -1
- package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +1 -1
- package/dist/src/infrastructure/ui/views/return/components/price/Price.js +3 -3
- package/dist/src/infrastructure/ui/views/return/components/price/Price.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/views/return/components/price/Price.style.js +1 -0
- package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +3 -3
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +2 -2
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +4 -4
- package/dist/src/infrastructure/ui/views/summary/Summary.js +1 -1
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +1 -1
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +1 -1
- package/dist/src/version.d.ts +2 -2
- package/dist/src/version.js +2 -2
- package/package.json +1 -1
- package/src/ExpoRoot.tsx +2 -2
- package/src/infrastructure/ui/components/atoms/price/Price.style.ts +1 -0
- package/src/infrastructure/ui/components/atoms/price/Price.tsx +8 -15
- package/src/infrastructure/ui/components/atoms/price/__snapshots__/Price.test.tsx.snap +4 -1
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.tsx +1 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.tsx +1 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostLegacyRadioGroupReturnQuestionItem/HostLegacyRadioGroupReturnQuestionItem.tsx +1 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.tsx +1 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +1 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +1 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.tsx +2 -2
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.tsx +1 -1
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/__snapshots__/CheckoutHeader.test.tsx.snap +2 -0
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx +1 -1
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/__snapshots__/ItemDetailHeader.test.tsx.snap +2 -0
- package/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.tsx +1 -1
- package/src/infrastructure/ui/components/templates/header/itemHeader/__snapshots__/ItemHeader.test.tsx.snap +3 -0
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +1 -1
- package/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.ts +3 -0
- package/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.tsx +1 -1
- package/src/infrastructure/ui/views/item/components/banner/__snapshots__/CustomerDecissionBanner.test.tsx.snap +9 -3
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +12 -2
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +4 -0
- package/src/infrastructure/ui/views/item/components/itemActions/__snapshots__/ItemActions.test.tsx.snap +4 -0
- package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +3 -3
- package/src/infrastructure/ui/views/item/components/productVariantDescription/__snapshots__/ProductVariantDescription.test.tsx.snap +8 -0
- package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +1 -1
- package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +2 -0
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +1 -1
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +3 -0
- package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +12 -0
- package/src/infrastructure/ui/views/return/components/price/Price.style.ts +1 -0
- package/src/infrastructure/ui/views/return/components/price/Price.tsx +3 -3
- package/src/infrastructure/ui/views/return/components/price/__snapshots__/Price.test.tsx.snap +4 -1
- package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +3 -3
- package/src/infrastructure/ui/views/return/components/productVariantPreview/__snapshots__/ProductVariantPreview.test.tsx.snap +4 -0
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +2 -2
- package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +4 -4
- package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +10 -0
- package/src/infrastructure/ui/views/summary/Summary.tsx +1 -1
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +1 -1
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +6 -0
- package/src/infrastructure/ui/views/summary/components/pricing/Pricing.tsx +1 -1
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +24 -0
- package/dist/src/projection/order/order.d.ts +0 -6
- package/dist/src/projection/order/order.js +0 -1
- package/dist/src/projection/subscription/subscription.d.ts +0 -2
- package/dist/src/projection/subscription/subscription.js +0 -1
package/dist/src/ExpoRoot.js
CHANGED
|
@@ -20,7 +20,7 @@ const tradename = Tradename.LOOKIERO;
|
|
|
20
20
|
const theme = themeByTradename({ tradename });
|
|
21
21
|
const locale = Locale.es_ES;
|
|
22
22
|
const customer = {
|
|
23
|
-
customerId: "
|
|
23
|
+
customerId: "5bf90313-d56e-4a55-b422-16084a4466de",
|
|
24
24
|
country: Country.ES,
|
|
25
25
|
segment: Segment.WOMEN,
|
|
26
26
|
email: "email@example.com",
|
|
@@ -98,7 +98,7 @@ const ExpoRoot = () => {
|
|
|
98
98
|
React.createElement(PaymentsQueryProvider, null,
|
|
99
99
|
React.createElement(EventProvider, null,
|
|
100
100
|
React.createElement(Aurora, { theme: theme },
|
|
101
|
-
isAccessible === false && React.createElement(Text, {
|
|
101
|
+
isAccessible === false && React.createElement(Text, { variant: "heading" }, "Checkout is not accessible!"),
|
|
102
102
|
React.createElement(Router, null,
|
|
103
103
|
React.createElement(Routes, null,
|
|
104
104
|
React.createElement(Route, { path: "/checkout/*", element: React.createElement(Root, { basePath: "/checkout", customer: customer, layout: DummyLayout, locale: locale, tradename: tradename, useRedirect: useRedirect, onCheckoutFlowSuccess: () => console.log("Checkout flow success!"), onNotAccessible: onNotAccessible }) }),
|
|
@@ -5,10 +5,10 @@ import { Text } from "@lookiero/sty-psp-ui";
|
|
|
5
5
|
import { DOMAIN } from "../../../i18n/i18n";
|
|
6
6
|
import { style as priceStyle } from "./Price.style";
|
|
7
7
|
const PRICE_VARIANT = {
|
|
8
|
-
default: {
|
|
9
|
-
detail: {
|
|
10
|
-
subtotal: {
|
|
11
|
-
total: {
|
|
8
|
+
default: { variant: "detail", level: 1 },
|
|
9
|
+
detail: { variant: "detail", level: 2 },
|
|
10
|
+
subtotal: { variant: "detail", level: 1 },
|
|
11
|
+
total: { variant: "action", level: 2 },
|
|
12
12
|
};
|
|
13
13
|
const Price = ({ price, variant = "default", withPercentage = false }) => {
|
|
14
14
|
const isDiscounted = price.discountedPrice && price.discountedPrice.percentage > 0;
|
|
@@ -29,7 +29,7 @@ const Price = ({ price, variant = "default", withPercentage = false }) => {
|
|
|
29
29
|
return (React.createElement(View, { style: style.price, testID: "price" },
|
|
30
30
|
React.createElement(Text, { ...PRICE_VARIANT[variant], testID: "price-text" }, priceValue),
|
|
31
31
|
isDiscounted && (React.createElement(View, { style: style.discountedPriceInfo },
|
|
32
|
-
React.createElement(Text, { ...PRICE_VARIANT[variant], style: style.discountedPriceText, testID: "discounted-price-text"
|
|
32
|
+
React.createElement(Text, { ...PRICE_VARIANT[variant], style: style.discountedPriceText, testID: "discounted-price-text" }, productPrice),
|
|
33
33
|
withPercentage ? (React.createElement(Text, { ...PRICE_VARIANT[variant], style: style.discountedPercentage, testID: "discounted-percentage-text" }, `-${price.discountedPrice.percentage}%`)) : null))));
|
|
34
34
|
};
|
|
35
35
|
export { Price };
|
|
@@ -14,6 +14,6 @@ const ButtonCheckoutQuestionItem = ({ checkoutQuestion, checkoutQuestionParentId
|
|
|
14
14
|
const style = useMemo(() => buttonCheckoutQuestionItemStyle(), []);
|
|
15
15
|
const checked = feedback === checkoutQuestion.id;
|
|
16
16
|
return (React.createElement(TouchableOpacity, { accessibilityLabel: testID, activeOpacity: ACTIVE_OPACITY, style: [style.button, checked && style.buttonActive], testID: testID, onPress: handleOnPress },
|
|
17
|
-
React.createElement(Text, { level: 3, style: [style.text, checked && style.textActive],
|
|
17
|
+
React.createElement(Text, { level: 3, style: [style.text, checked && style.textActive], variant: "action" }, optionText)));
|
|
18
18
|
};
|
|
19
19
|
export { ButtonCheckoutQuestionItem };
|
|
@@ -11,7 +11,7 @@ const HostDefaultReturnQuestionItem = ({ returnQuestion, children, }) => {
|
|
|
11
11
|
const style = useMemo(() => hostDefaultReturnQuestionItemStyle(), []);
|
|
12
12
|
return (React.createElement(React.Fragment, null,
|
|
13
13
|
returnQuestion.translationKey && returnQuestion.translationKey !== " " && !isAllOptions ? (React.createElement(View, { style: style.title },
|
|
14
|
-
React.createElement(Text, { level: 3,
|
|
14
|
+
React.createElement(Text, { level: 3, variant: "action" }, formatMessage({ id: returnQuestion.translationKey })))) : null,
|
|
15
15
|
children));
|
|
16
16
|
};
|
|
17
17
|
export { HostDefaultReturnQuestionItem };
|
|
@@ -11,7 +11,7 @@ const HostLegacyRadioGroupReturnQuestionItem = ({ returnQuestion, children, test
|
|
|
11
11
|
const style = useMemo(() => hostLegacyRadioGroupReturnQuestionItemStyle(), []);
|
|
12
12
|
return (React.createElement(React.Fragment, null,
|
|
13
13
|
React.createElement(View, { style: style.wrapper, testID: testID },
|
|
14
|
-
React.createElement(Text, { level: 3, style: style.title,
|
|
14
|
+
React.createElement(Text, { level: 3, style: style.title, variant: "action" }, placeholderText),
|
|
15
15
|
children)));
|
|
16
16
|
};
|
|
17
17
|
export { HostLegacyRadioGroupReturnQuestionItem };
|
|
@@ -9,7 +9,7 @@ const HostRadioGroupReturnQuestionItem = ({ returnQuestion, children, testID, })
|
|
|
9
9
|
const { formatMessage } = useI18n({ domain: DOMAIN });
|
|
10
10
|
const style = useMemo(() => hostRadioGroupReturnQuestionItemStyle(), []);
|
|
11
11
|
return (React.createElement(View, { style: style.wrapper, testID: testID },
|
|
12
|
-
returnQuestion.translationKey && (React.createElement(Text, { level: 3, style: style.title,
|
|
12
|
+
returnQuestion.translationKey && (React.createElement(Text, { level: 3, style: style.title, variant: "action" }, formatMessage({ id: returnQuestion.translationKey }))),
|
|
13
13
|
children));
|
|
14
14
|
};
|
|
15
15
|
export { HostRadioGroupReturnQuestionItem };
|
|
@@ -25,7 +25,7 @@ const HostStackReturnQuestionItem = ({ returnQuestion, children, portalHostName,
|
|
|
25
25
|
const style = useMemo(() => hostStackReturnQuestionItemStyle(), []);
|
|
26
26
|
return (React.createElement(Animated.View, { style: stackAnimatedStyle },
|
|
27
27
|
React.createElement(View, { onLayout: handleOnLayout },
|
|
28
|
-
titleText && (React.createElement(Text, { level: 3, style: style.title,
|
|
28
|
+
titleText && (React.createElement(Text, { level: 3, style: style.title, variant: "heading" }, titleText)),
|
|
29
29
|
feedbackReturnQuestion && returnQuestionHasChildren(feedbackReturnQuestion) ? (React.createElement(React.Fragment, null,
|
|
30
30
|
React.createElement(Text, { level: 3, style: style.text }, feedbackText),
|
|
31
31
|
feedbackReturnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: portalHostName, returnQuestion: childReturnQuestion, returnQuestionParent: feedbackReturnQuestion }))))) : (children))));
|
|
@@ -11,7 +11,7 @@ import { deepestReturnQuestionWithFeedbackForReturnQuestion, feedbackForReturnQu
|
|
|
11
11
|
import { ModalOptionReturnQuestionItems } from "../modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems";
|
|
12
12
|
import { style as radioReturnQuestionItemStyle } from "./RadioReturnQuestionItem.style";
|
|
13
13
|
const TEXT = {
|
|
14
|
-
[Tradename.LOOKIERO]: (props) => React.createElement(Text, { level: 1,
|
|
14
|
+
[Tradename.LOOKIERO]: (props) => React.createElement(Text, { level: 1, variant: "detail", ...props }),
|
|
15
15
|
[Tradename.OUTFITTERY]: (props) => React.createElement(Text, { level: 3, ...props }),
|
|
16
16
|
};
|
|
17
17
|
const RadioReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID, portalHostName, }) => {
|
|
@@ -15,7 +15,7 @@ const ReturnQuestionFeedbackItem = ({ returnQuestion }) => {
|
|
|
15
15
|
const feedback = feedbackForReturnQuestion({ feedback: returnQuestionFeedback, returnQuestion, translate }).join(" / ");
|
|
16
16
|
const style = useMemo(() => returnQuestionFeedbackItemStyle(), []);
|
|
17
17
|
return (React.createElement(View, { style: style.container },
|
|
18
|
-
returnQuestion.translationKey && (React.createElement(Text, { level: 2, style: style.title,
|
|
19
|
-
React.createElement(Text, { level: 1,
|
|
18
|
+
returnQuestion.translationKey && (React.createElement(Text, { level: 2, style: style.title, variant: "detailBold" }, formatMessage({ id: returnQuestion.translationKey }))),
|
|
19
|
+
React.createElement(Text, { level: 1, variant: "detail" }, feedback || unansweredText)));
|
|
20
20
|
};
|
|
21
21
|
export { ReturnQuestionFeedbackItem };
|
package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js
CHANGED
|
@@ -11,7 +11,7 @@ const CheckoutHeader = ({ onBack }) => {
|
|
|
11
11
|
const style = useMemo(() => checkoutHeader(), []);
|
|
12
12
|
return (React.createElement(Header, { testID: "checkout-header" },
|
|
13
13
|
React.createElement(ButtonIcon, { name: "arrow_left", style: { button: style.button }, testID: "arrow-left-button-icon", onPress: onBack }),
|
|
14
|
-
React.createElement(Text, { level: 3,
|
|
14
|
+
React.createElement(Text, { level: 3, variant: "action" }, title),
|
|
15
15
|
React.createElement(ButtonIconPlaceholder, null)));
|
|
16
16
|
};
|
|
17
17
|
export { CheckoutHeader };
|
package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js
CHANGED
|
@@ -11,7 +11,7 @@ const ItemDetailHeader = ({ onBack }) => {
|
|
|
11
11
|
const style = useMemo(() => itemDetailHeaderStyle(), []);
|
|
12
12
|
return (React.createElement(Header, { testID: "item-detail-header" },
|
|
13
13
|
React.createElement(ButtonIconPlaceholder, null),
|
|
14
|
-
React.createElement(Text, { level: 3,
|
|
14
|
+
React.createElement(Text, { level: 3, variant: "action" }, title),
|
|
15
15
|
React.createElement(ButtonIcon, { name: "close", style: { button: style.button }, testID: "close-button-icon", onPress: onBack })));
|
|
16
16
|
};
|
|
17
17
|
export { ItemDetailHeader };
|
|
@@ -31,7 +31,7 @@ const ItemHeader = ({ items, item, onNext, onPrevious }) => {
|
|
|
31
31
|
}, [basePath, item.id, itemIndex, items, navigate, onNext]);
|
|
32
32
|
return (React.createElement(Header, { testID: "item-header" },
|
|
33
33
|
!isFirstItem ? (React.createElement(ButtonIcon, { name: "arrow_left", style: { button: style.button }, testID: "arrow-left-button-icon", onPress: navigateToPreviousItem })) : (React.createElement(ButtonIconPlaceholder, null)),
|
|
34
|
-
React.createElement(Text, { level: 3,
|
|
34
|
+
React.createElement(Text, { level: 3, variant: "action" }, title),
|
|
35
35
|
!isLastItem ? (React.createElement(ButtonIcon, { name: "arrow_right", style: { button: style.button }, testID: "arrow-right-button-icon", onPress: navigateToNextItem })) : (React.createElement(ButtonIconPlaceholder, null))));
|
|
36
36
|
};
|
|
37
37
|
export { ItemHeader };
|
|
@@ -90,7 +90,7 @@ const Checkout = ({ layout: Layout, getAuthToken, useRedirect, onCheckoutFlowSuc
|
|
|
90
90
|
React.createElement(View, { style: [style.contentWrapper, isDektopScreen && style.desktopContentWrapper] },
|
|
91
91
|
country === Country.NL && (React.createElement(View, { style: style.paymentSelectorNL },
|
|
92
92
|
React.createElement(PaymentInstrument, { useRedirect: useRedirect }))),
|
|
93
|
-
React.createElement(Text, { level: 3, style: style.title,
|
|
93
|
+
React.createElement(Text, { level: 3, style: style.title, variant: "heading" }, titleText),
|
|
94
94
|
checkoutItemsKept?.map((checkoutItem) => (React.createElement(View, { key: checkoutItem.id, testID: "checkout-items-kept" },
|
|
95
95
|
React.createElement(ProductVariant, { brand: checkoutItem.productVariant.brand, color: checkoutItem.productVariant.color, country: country, media: checkoutItem.productVariant.media, name: checkoutItem.productVariant.name, price: checkoutItem.price, status: checkoutItem.status, size: checkoutItem.status === CheckoutItemStatus.REPLACED && checkoutItem.replacedFor
|
|
96
96
|
? checkoutItem.replacedFor.size
|
|
@@ -21,6 +21,6 @@ const CustomerDecissionBanner = ({ checkoutItemStatus, onPress }) => {
|
|
|
21
21
|
return (React.createElement(View, { style: [style.container, isSmallScreen ? style.smallContainer : null] },
|
|
22
22
|
React.createElement(InfoBox, { text: decissionText },
|
|
23
23
|
React.createElement(Pressable, { testID: "customer-decission-banner", onPress: onPress },
|
|
24
|
-
React.createElement(Text, { level: isSmallScreen ? 2 : 1,
|
|
24
|
+
React.createElement(Text, { level: isSmallScreen ? 2 : 1, style: style.underlinedText, variant: "detail" }, bannerButtonText)))));
|
|
25
25
|
};
|
|
26
26
|
export { CustomerDecissionBanner };
|
|
@@ -22,8 +22,8 @@ const GetOutOfCheckoutModal = ({ visible, onDismiss, onConfirm }) => {
|
|
|
22
22
|
React.createElement(Text, { level: 1, style: style.title }, titleText),
|
|
23
23
|
React.createElement(Text, { level: 3, style: style.description }, descriptionText),
|
|
24
24
|
React.createElement(Button, { style: style.button, onPress: onDismiss },
|
|
25
|
-
React.createElement(Text, { level: 3, selectable: false, style: [style.buttonText, { textTransform: "uppercase" }],
|
|
25
|
+
React.createElement(Text, { level: 3, selectable: false, style: [style.buttonText, { textTransform: "uppercase" }], variant: "action" }, dismissButtonText)),
|
|
26
26
|
React.createElement(Button, { style: [style.button, style.confirmButton], variant: BUTTON_VARIANT.SECONDARY, onPress: onConfirm },
|
|
27
|
-
React.createElement(Text, { level: 3, selectable: false, style: [style.buttonText, { textTransform: "uppercase" }],
|
|
27
|
+
React.createElement(Text, { level: 3, selectable: false, style: [style.buttonText, { textTransform: "uppercase" }], variant: "action" }, confirmButtonText)))));
|
|
28
28
|
};
|
|
29
29
|
export { GetOutOfCheckoutModal };
|
|
@@ -16,9 +16,9 @@ const ProductVariantDescription = ({ brand, name, price, size: sizeProjection, c
|
|
|
16
16
|
return (React.createElement(View, { style: [style.container, !isDesktopScreen && style.smallContainer] },
|
|
17
17
|
React.createElement(View, { style: style.info },
|
|
18
18
|
React.createElement(View, { style: style.content },
|
|
19
|
-
React.createElement(Text, { level: 1, style: style.brand,
|
|
20
|
-
React.createElement(Text, { level: 1,
|
|
19
|
+
React.createElement(Text, { level: 1, style: style.brand, variant: "detail" }, brand),
|
|
20
|
+
React.createElement(Text, { level: 1, variant: "detailBold" }, name)),
|
|
21
21
|
React.createElement(Price, { price: price, withPercentage: true })),
|
|
22
|
-
React.createElement(Text, { level: 1,
|
|
22
|
+
React.createElement(Text, { level: 1, variant: "detail" }, `${sizeText} ${sizeProjection.unique ? uniqueText : size({ size: sizeProjection, country })}`)));
|
|
23
23
|
};
|
|
24
24
|
export { ProductVariantDescription };
|
|
@@ -11,7 +11,7 @@ const SelectModal = ({ modalVisible, options, style: customStyle, testID, title,
|
|
|
11
11
|
const style = useMemo(() => modalStyle(), []);
|
|
12
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
|
-
title && (React.createElement(Text, { level: 3, style: style.modalTitle,
|
|
14
|
+
title && (React.createElement(Text, { level: 3, style: style.modalTitle, variant: "heading" }, 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: style.underlayColor, accessible: true, onPress: value !== optionValue ? () => handleOnPressOption(optionValue) : undefined },
|
|
16
16
|
React.createElement(Text, { level: 3, style: [style.optionText, value === optionValue && style.textActive, customStyle?.optionText] }, label)))))));
|
|
17
17
|
};
|
|
@@ -12,7 +12,7 @@ const SizeWithoutStockModal = ({ visible, onDismiss }) => {
|
|
|
12
12
|
const style = useMemo(() => sizeWithoutStockModalStyle(), []);
|
|
13
13
|
return (React.createElement(Modal, { portalHostName: "Checkout", visible: visible, showCloseButton: true, onClose: onDismiss },
|
|
14
14
|
React.createElement(View, { style: style.modalContent },
|
|
15
|
-
React.createElement(Text, { level: 3, style: style.title,
|
|
15
|
+
React.createElement(Text, { level: 3, style: style.title, variant: "heading" }, titleText),
|
|
16
16
|
React.createElement(Text, { level: 3, style: style.description }, descriptionText),
|
|
17
17
|
React.createElement(Button, { onPress: onDismiss }, buttonText))));
|
|
18
18
|
};
|
|
@@ -21,9 +21,9 @@ const Price = ({ price, withPercentage = false }) => {
|
|
|
21
21
|
const priceValue = isDiscounted ? productDiscountedPrice : productPrice;
|
|
22
22
|
const style = useMemo(() => priceStyle(), []);
|
|
23
23
|
return (React.createElement(View, { style: style.price, testID: "price" },
|
|
24
|
-
isDiscounted && (React.createElement(Text, { level: 1, style: style.discountedPriceText, testID: "discounted-price-text",
|
|
24
|
+
isDiscounted && (React.createElement(Text, { level: 1, style: style.discountedPriceText, testID: "discounted-price-text", variant: "detail" }, productPrice)),
|
|
25
25
|
React.createElement(View, { style: style.discountedPriceInfo },
|
|
26
|
-
React.createElement(Text, { level: 1, testID: "price-text",
|
|
27
|
-
isDiscounted && withPercentage ? (React.createElement(Text, { level: 1, style: style.discountedPercentage, testID: "discounted-percentage-text",
|
|
26
|
+
React.createElement(Text, { level: 1, testID: "price-text", variant: "detail" }, priceValue),
|
|
27
|
+
isDiscounted && withPercentage ? (React.createElement(Text, { level: 1, style: style.discountedPercentage, testID: "discounted-percentage-text", variant: "detail" }, `-${price.discountedPrice.percentage}%`)) : null)));
|
|
28
28
|
};
|
|
29
29
|
export { Price };
|
|
@@ -26,9 +26,9 @@ const ProductVariantPreview = ({ item, country }) => {
|
|
|
26
26
|
}),
|
|
27
27
|
} })),
|
|
28
28
|
React.createElement(View, { style: style.info },
|
|
29
|
-
React.createElement(Text, { level: 2, style: style.text,
|
|
30
|
-
React.createElement(Text, { level: 2,
|
|
31
|
-
React.createElement(Text, { level: 2, style: style.text,
|
|
29
|
+
React.createElement(Text, { level: 2, style: style.text, variant: "detail" }, brand),
|
|
30
|
+
React.createElement(Text, { level: 2, variant: "detail" }, name),
|
|
31
|
+
React.createElement(Text, { level: 2, style: style.text, variant: "detail" }, `${sizeText} ${sizeProjection.unique ? uniqueText : size({ size: sizeProjection, country })}`)),
|
|
32
32
|
React.createElement(View, { style: style.price },
|
|
33
33
|
React.createElement(Price, { price: price, withPercentage: true }))))));
|
|
34
34
|
};
|
|
@@ -121,8 +121,8 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
|
|
|
121
121
|
!isMobileScreen && style.infoDesktop,
|
|
122
122
|
tradename === Tradename.OUTFITTERY && style.infoOutfittery,
|
|
123
123
|
] },
|
|
124
|
-
React.createElement(Text, { level: 3,
|
|
125
|
-
React.createElement(Text, { level: 1, style: style.description,
|
|
124
|
+
React.createElement(Text, { level: 3, variant: "heading" }, titleText),
|
|
125
|
+
React.createElement(Text, { level: 1, style: style.description, variant: "detail" }, descriptionText)),
|
|
126
126
|
React.createElement(ReturnQuestions, { portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME, returnQuestions: returnQuestions }),
|
|
127
127
|
React.createElement(View, { style: [style.submit, !isMobileScreen && style.submitDesktop] },
|
|
128
128
|
React.createElement(Button, { testID: "return-questions-button", onPress: handleOnSubmit }, submitButtonText)))))))));
|
|
@@ -21,14 +21,14 @@ const ProductVariant = ({ media, brand, name, price, size: sizeProjection, color
|
|
|
21
21
|
React.createElement(LazyImage, { hiResSrc: cdnImageUrl({ url: media[0]?.url, width: IMAGE_WIDTH }), resizeMode: "contain", src: cdnImageUrl({ url: media[0]?.url, width: IMAGE_WIDTH, dpi: 1 }), style: { view: [style.media, customStyle?.image] }, testID: "product-variant-media" })),
|
|
22
22
|
React.createElement(View, { style: style.descriptionContainer },
|
|
23
23
|
React.createElement(View, { style: style.infoProductVariant },
|
|
24
|
-
React.createElement(Text, { level: 2, style: style.text,
|
|
25
|
-
React.createElement(Text, { level: 2,
|
|
26
|
-
React.createElement(Text, { level: 2, style: style.text,
|
|
24
|
+
React.createElement(Text, { level: 2, style: style.text, variant: "detail" }, brand),
|
|
25
|
+
React.createElement(Text, { level: 2, variant: "detail" }, name),
|
|
26
|
+
React.createElement(Text, { level: 2, style: style.text, variant: "detail" },
|
|
27
27
|
sizeProjection.unique ? uniqueText : size({ size: sizeProjection, country }),
|
|
28
28
|
" / ",
|
|
29
29
|
colorLabel),
|
|
30
30
|
status === CheckoutItemStatus.REPLACED && (React.createElement(View, { style: style.sizeChange },
|
|
31
|
-
React.createElement(Text, { level: 2,
|
|
31
|
+
React.createElement(Text, { level: 2, variant: "detail" }, sizeChangeText)))),
|
|
32
32
|
React.createElement(Price, { price: price, variant: "detail" }))),
|
|
33
33
|
onPress && React.createElement(Icon, { name: "arrow_right" })));
|
|
34
34
|
};
|
|
@@ -92,7 +92,7 @@ const Summary = ({ layout: Layout, children }) => {
|
|
|
92
92
|
React.createElement(Box, { size: { L: "2/3" }, style: isDesktopScreen && style.desktopListSpacing },
|
|
93
93
|
React.createElement(View, { style: [style.contentWrapper, isDesktopScreen && style.desktopContentWrapper] },
|
|
94
94
|
React.createElement(View, { style: !isDesktopScreen && style.mobileInfo },
|
|
95
|
-
React.createElement(Text, { level: 3, style: style.title,
|
|
95
|
+
React.createElement(Text, { level: 3, style: style.title, variant: "heading" }, titleText),
|
|
96
96
|
React.createElement(Text, { level: 3, style: style.description }, descriptionText)),
|
|
97
97
|
children)),
|
|
98
98
|
pricing && isDesktopScreen ? (React.createElement(Box, { size: { L: "1/3" }, style: [style.resume, isDesktopScreen ? style.desktopResume : style.mobileResume] },
|
package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js
CHANGED
|
@@ -27,7 +27,7 @@ const CollapsiblePricing = ({ migrated, tradename, pricing, totalCheckoutItemsKe
|
|
|
27
27
|
collapsible && (React.createElement(Pressable, { style: style.iconContainer, testID: "pricing-collapsed", onPress: onPress }, collapsed ? (React.createElement(Icon, { name: "arrow_up_small", testID: "arrow-up" })) : (React.createElement(Icon, { name: "arrow_down_small", testID: "arrow-down" })))),
|
|
28
28
|
collapsed && collapsible ? (React.createElement(Animated.View, { key: "collapsed", style: [style.collapsed, collapsedAnimatedStyle] },
|
|
29
29
|
React.createElement(View, { style: style.collapsedContent },
|
|
30
|
-
React.createElement(Text, { level: 1, style: style.totalCollapsed,
|
|
30
|
+
React.createElement(Text, { level: 1, style: style.totalCollapsed, variant: "detail" },
|
|
31
31
|
totalText,
|
|
32
32
|
" ",
|
|
33
33
|
totalCheckoutItemsKeptText),
|
|
@@ -9,7 +9,7 @@ import { style as pricingStyle } from "./Pricing.style";
|
|
|
9
9
|
const Row = ({ action = false, text, level = 3, children }) => {
|
|
10
10
|
const style = useMemo(() => pricingStyle(), []);
|
|
11
11
|
return (React.createElement(View, { style: style.row },
|
|
12
|
-
React.createElement(Text, {
|
|
12
|
+
React.createElement(Text, { level: level, variant: action ? "action" : "body" }, text),
|
|
13
13
|
children));
|
|
14
14
|
};
|
|
15
15
|
const Pricing = ({ pricing, totalCheckoutItemsKept, tradename, migrated }) => {
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "14.2.0";
|
|
2
|
-
export declare const RELEASE = "checkout@14.2.0";
|
|
1
|
+
export declare const VERSION = "14.2.2-beta.0";
|
|
2
|
+
export declare const RELEASE = "checkout@14.2.2-beta.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "14.2.0";
|
|
2
|
-
export const RELEASE = "checkout@14.2.0";
|
|
1
|
+
export const VERSION = "14.2.2-beta.0";
|
|
2
|
+
export const RELEASE = "checkout@14.2.2-beta.0";
|
package/package.json
CHANGED
package/src/ExpoRoot.tsx
CHANGED
|
@@ -25,7 +25,7 @@ const theme = themeByTradename({ tradename });
|
|
|
25
25
|
const locale: Locale = Locale.es_ES;
|
|
26
26
|
|
|
27
27
|
const customer: Customer = {
|
|
28
|
-
customerId: "
|
|
28
|
+
customerId: "5bf90313-d56e-4a55-b422-16084a4466de",
|
|
29
29
|
country: Country.ES,
|
|
30
30
|
segment: Segment.WOMEN,
|
|
31
31
|
email: "email@example.com",
|
|
@@ -118,7 +118,7 @@ const ExpoRoot: FC = () => {
|
|
|
118
118
|
<PaymentsQueryProvider>
|
|
119
119
|
<EventProvider>
|
|
120
120
|
<Aurora theme={theme}>
|
|
121
|
-
{isAccessible === false && <Text heading
|
|
121
|
+
{isAccessible === false && <Text variant="heading">Checkout is not accessible!</Text>}
|
|
122
122
|
|
|
123
123
|
<Router>
|
|
124
124
|
<Routes>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { FC, useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { useI18nNumber } from "@lookiero/i18n-react";
|
|
4
|
-
import { Text } from "@lookiero/sty-psp-ui";
|
|
4
|
+
import { Text, TextLevel, TextVariant } from "@lookiero/sty-psp-ui";
|
|
5
5
|
import { PriceProjection } from "../../../../../projection/price/price";
|
|
6
6
|
import { DOMAIN } from "../../../i18n/i18n";
|
|
7
7
|
import { style as priceStyle } from "./Price.style";
|
|
@@ -9,17 +9,15 @@ import { style as priceStyle } from "./Price.style";
|
|
|
9
9
|
type PriceVariant = "default" | "detail" | "subtotal" | "total";
|
|
10
10
|
|
|
11
11
|
interface PriceVariantProps {
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly action?: boolean;
|
|
15
|
-
readonly level?: 1 | 2 | 3;
|
|
12
|
+
readonly variant?: TextVariant;
|
|
13
|
+
readonly level?: TextLevel;
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
const PRICE_VARIANT: Partial<Record<PriceVariant, PriceVariantProps>> = {
|
|
19
|
-
default: {
|
|
20
|
-
detail: {
|
|
21
|
-
subtotal: {
|
|
22
|
-
total: {
|
|
17
|
+
default: { variant: "detail", level: 1 },
|
|
18
|
+
detail: { variant: "detail", level: 2 },
|
|
19
|
+
subtotal: { variant: "detail", level: 1 },
|
|
20
|
+
total: { variant: "action", level: 2 },
|
|
23
21
|
};
|
|
24
22
|
|
|
25
23
|
interface PriceProps {
|
|
@@ -53,12 +51,7 @@ const Price: FC<PriceProps> = ({ price, variant = "default", withPercentage = fa
|
|
|
53
51
|
</Text>
|
|
54
52
|
{isDiscounted && (
|
|
55
53
|
<View style={style.discountedPriceInfo}>
|
|
56
|
-
<Text
|
|
57
|
-
{...PRICE_VARIANT[variant]}
|
|
58
|
-
style={style.discountedPriceText}
|
|
59
|
-
testID="discounted-price-text"
|
|
60
|
-
lineThrough
|
|
61
|
-
>
|
|
54
|
+
<Text {...PRICE_VARIANT[variant]} style={style.discountedPriceText} testID="discounted-price-text">
|
|
62
55
|
{productPrice}
|
|
63
56
|
</Text>
|
|
64
57
|
{withPercentage ? (
|
|
@@ -41,6 +41,7 @@ exports[`Price atom matches the snapshot for a discounted price: discounted pric
|
|
|
41
41
|
style={
|
|
42
42
|
[
|
|
43
43
|
{
|
|
44
|
+
"color": "#0C0A0A",
|
|
44
45
|
"fontFamily": "AreaNormal-Semibold",
|
|
45
46
|
"fontSize": 13,
|
|
46
47
|
"fontStyle": "normal",
|
|
@@ -67,16 +68,17 @@ exports[`Price atom matches the snapshot for a discounted price: discounted pric
|
|
|
67
68
|
style={
|
|
68
69
|
[
|
|
69
70
|
{
|
|
71
|
+
"color": "#0C0A0A",
|
|
70
72
|
"fontFamily": "AreaNormal-Semibold",
|
|
71
73
|
"fontSize": 13,
|
|
72
74
|
"fontStyle": "normal",
|
|
73
75
|
"fontWeight": "normal",
|
|
74
76
|
"letterSpacing": 0.1,
|
|
75
77
|
"lineHeight": 17,
|
|
76
|
-
"textDecorationLine": "line-through",
|
|
77
78
|
},
|
|
78
79
|
{
|
|
79
80
|
"color": "#837C7C",
|
|
81
|
+
"textDecorationLine": "line-through",
|
|
80
82
|
},
|
|
81
83
|
]
|
|
82
84
|
}
|
|
@@ -130,6 +132,7 @@ exports[`Price atom matches the snapshot for a non-discounted price: non-discoun
|
|
|
130
132
|
style={
|
|
131
133
|
[
|
|
132
134
|
{
|
|
135
|
+
"color": "#0C0A0A",
|
|
133
136
|
"fontFamily": "AreaNormal-Semibold",
|
|
134
137
|
"fontSize": 13,
|
|
135
138
|
"fontStyle": "normal",
|
|
@@ -36,7 +36,7 @@ const ButtonCheckoutQuestionItem: CheckoutQuestionItem<CheckoutFeedbackQuestionT
|
|
|
36
36
|
testID={testID}
|
|
37
37
|
onPress={handleOnPress}
|
|
38
38
|
>
|
|
39
|
-
<Text level={3} style={[style.text, checked && style.textActive]} action>
|
|
39
|
+
<Text level={3} style={[style.text, checked && style.textActive]} variant="action">
|
|
40
40
|
{optionText}
|
|
41
41
|
</Text>
|
|
42
42
|
</TouchableOpacity>
|
|
@@ -21,7 +21,7 @@ const HostDefaultReturnQuestionItem: ReturnQuestionItem<ReturnQuestionType.HOST_
|
|
|
21
21
|
<>
|
|
22
22
|
{returnQuestion.translationKey && returnQuestion.translationKey !== " " && !isAllOptions ? (
|
|
23
23
|
<View style={style.title}>
|
|
24
|
-
<Text level={3} action>
|
|
24
|
+
<Text level={3} variant="action">
|
|
25
25
|
{formatMessage({ id: returnQuestion.translationKey })}
|
|
26
26
|
</Text>
|
|
27
27
|
</View>
|
|
@@ -24,7 +24,7 @@ const HostLegacyRadioGroupReturnQuestionItem: ReturnQuestionItem<ReturnQuestionT
|
|
|
24
24
|
return (
|
|
25
25
|
<>
|
|
26
26
|
<View style={style.wrapper} testID={testID}>
|
|
27
|
-
<Text level={3} style={style.title} action>
|
|
27
|
+
<Text level={3} style={style.title} variant="action">
|
|
28
28
|
{placeholderText}
|
|
29
29
|
</Text>
|
|
30
30
|
{children}
|
|
@@ -19,7 +19,7 @@ const HostRadioGroupReturnQuestionItem: ReturnQuestionItem<ReturnQuestionType.HO
|
|
|
19
19
|
return (
|
|
20
20
|
<View style={style.wrapper} testID={testID}>
|
|
21
21
|
{returnQuestion.translationKey && (
|
|
22
|
-
<Text level={3} style={style.title} action>
|
|
22
|
+
<Text level={3} style={style.title} variant="action">
|
|
23
23
|
{formatMessage({ id: returnQuestion.translationKey })}
|
|
24
24
|
</Text>
|
|
25
25
|
)}
|
|
@@ -52,7 +52,7 @@ const HostStackReturnQuestionItem: ReturnQuestionItem<ReturnQuestionType.HOST_ST
|
|
|
52
52
|
<Animated.View style={stackAnimatedStyle}>
|
|
53
53
|
<View onLayout={handleOnLayout}>
|
|
54
54
|
{titleText && (
|
|
55
|
-
<Text level={3} style={style.title} heading>
|
|
55
|
+
<Text level={3} style={style.title} variant="heading">
|
|
56
56
|
{titleText}
|
|
57
57
|
</Text>
|
|
58
58
|
)}
|
|
@@ -20,7 +20,7 @@ import { ModalOptionReturnQuestionItems } from "../modalOptionReturnQuestionItem
|
|
|
20
20
|
import { style as radioReturnQuestionItemStyle } from "./RadioReturnQuestionItem.style";
|
|
21
21
|
|
|
22
22
|
const TEXT: Record<Tradename, FC<RNTextProps>> = {
|
|
23
|
-
[Tradename.LOOKIERO]: (props) => <Text level={1} detail {...props} />,
|
|
23
|
+
[Tradename.LOOKIERO]: (props) => <Text level={1} variant="detail" {...props} />,
|
|
24
24
|
[Tradename.OUTFITTERY]: (props) => <Text level={3} {...props} />,
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -29,11 +29,11 @@ const ReturnQuestionFeedbackItem: ReturnQuestionItem<ReturnQuestionType.HOST_DEF
|
|
|
29
29
|
return (
|
|
30
30
|
<View style={style.container}>
|
|
31
31
|
{returnQuestion.translationKey && (
|
|
32
|
-
<Text level={2} style={style.title} detailBold>
|
|
32
|
+
<Text level={2} style={style.title} variant="detailBold">
|
|
33
33
|
{formatMessage({ id: returnQuestion.translationKey })}
|
|
34
34
|
</Text>
|
|
35
35
|
)}
|
|
36
|
-
<Text level={1} detail>
|
|
36
|
+
<Text level={1} variant="detail">
|
|
37
37
|
{feedback || unansweredText}
|
|
38
38
|
</Text>
|
|
39
39
|
</View>
|
|
@@ -19,7 +19,7 @@ const CheckoutHeader: FC<CheckoutHeaderProps> = ({ onBack }) => {
|
|
|
19
19
|
return (
|
|
20
20
|
<Header testID="checkout-header">
|
|
21
21
|
<ButtonIcon name="arrow_left" style={{ button: style.button }} testID="arrow-left-button-icon" onPress={onBack} />
|
|
22
|
-
<Text level={3} action>
|
|
22
|
+
<Text level={3} variant="action">
|
|
23
23
|
{title}
|
|
24
24
|
</Text>
|
|
25
25
|
<ButtonIconPlaceholder />
|