@lookiero/checkout 0.8.7-beta.4 → 0.8.8
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/infrastructure/projection/bookedProductsVariants/react/useViewBookedProductsVariantsForCheckoutItem.js +1 -1
- package/dist/infrastructure/projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId.js +9 -1
- package/dist/infrastructure/projection/checkout/react/useViewFiveItemsDiscountByCustomerId.js +1 -1
- package/dist/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +7 -1
- package/dist/infrastructure/projection/checkoutQuestion/react/useListCheckoutQuestionsByCheckoutId.js +1 -1
- package/dist/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.js +1 -1
- package/dist/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.js +6 -1
- package/dist/infrastructure/projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId.js +1 -1
- package/dist/infrastructure/projection/uiSetting/react/useViewUiSettingByKey.js +1 -1
- package/dist/infrastructure/ui/views/item/Item.js +8 -22
- package/dist/shared/notifications/projection/notification/react/useListNotifications.js +1 -1
- package/package.json +1 -1
- package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.d.ts +0 -10
- package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.js +0 -11
- package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.d.ts +0 -6
- package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.js +0 -7
- package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.d.ts +0 -6
- package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.js +0 -9
- package/dist/infrastructure/ui/hooks/usePaymentInstrumentUpdateEvents.d.ts +0 -2
- package/dist/infrastructure/ui/hooks/usePaymentInstrumentUpdateEvents.js +0 -28
- package/dist/infrastructure/ui/views/intro/Intro.d.ts +0 -6
- package/dist/infrastructure/ui/views/intro/Intro.js +0 -52
- package/dist/infrastructure/ui/views/intro/Intro.style.d.ts +0 -52
- package/dist/infrastructure/ui/views/intro/Intro.style.js +0 -55
|
@@ -7,6 +7,6 @@ const useViewBookedProductsVariantsForCheckoutItem = ({ checkoutItemId, }) => us
|
|
|
7
7
|
query: viewBookedProductsVariantsForCheckoutItem({ checkoutItemId }),
|
|
8
8
|
contextId: MESSAGING_CONTEXT_ID,
|
|
9
9
|
invalidation: isCheckoutBookingBooked,
|
|
10
|
-
options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
10
|
+
options: { refetchOnMount: "always", staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
11
11
|
});
|
|
12
12
|
export { useViewBookedProductsVariantsForCheckoutItem };
|
package/dist/infrastructure/projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useQuery } from "@lookiero/messaging-react";
|
|
2
2
|
import { CHECKOUT_STARTED } from "../../../../domain/checkout/model/checkoutStarted";
|
|
3
3
|
import { CHECKOUT_SUBMITTED } from "../../../../domain/checkout/model/checkoutSubmitted";
|
|
4
|
+
import { CHECKOUT_BOOKING_BOOKED } from "../../../../domain/checkoutBooking/model/checkoutBookingBooked";
|
|
4
5
|
import { CHECKOUT_BOOKING_EXPIRED, } from "../../../../domain/checkoutBooking/model/checkoutBookingExpired";
|
|
5
6
|
import { CHECKOUT_FEEDBACK_GIVEN, } from "../../../../domain/checkoutFeedback/model/checkoutFeedbackGiven";
|
|
6
7
|
import { CHECKOUT_ITEM_KEPT } from "../../../../domain/checkoutItem/model/checkoutItemKept";
|
|
@@ -14,6 +15,7 @@ const isCheckoutItemReplaced = (event) => event.name === CHECKOUT_ITEM_REPLACED;
|
|
|
14
15
|
const isCheckoutStarted = (event) => event.name === CHECKOUT_STARTED;
|
|
15
16
|
const isCheckoutSubmitted = (event) => event.name === CHECKOUT_SUBMITTED;
|
|
16
17
|
const isCheckoutFeedbackGiven = (event) => event.name === CHECKOUT_FEEDBACK_GIVEN;
|
|
18
|
+
const isCheckoutBookingBooked = (event) => event.name === CHECKOUT_BOOKING_BOOKED;
|
|
17
19
|
const isCheckoutBookingExpired = (event) => event.name === CHECKOUT_BOOKING_EXPIRED;
|
|
18
20
|
const shouldInvalidate = (event) => isCheckoutItemKept(event) ||
|
|
19
21
|
isCheckoutItemReplaced(event) ||
|
|
@@ -21,11 +23,17 @@ const shouldInvalidate = (event) => isCheckoutItemKept(event) ||
|
|
|
21
23
|
isCheckoutStarted(event) ||
|
|
22
24
|
isCheckoutSubmitted(event) ||
|
|
23
25
|
isCheckoutFeedbackGiven(event) ||
|
|
26
|
+
isCheckoutBookingBooked(event) ||
|
|
24
27
|
isCheckoutBookingExpired(event);
|
|
25
28
|
const useViewFirstAvailableCheckoutByCustomerId = ({ customerId }) => useQuery({
|
|
26
29
|
query: viewFirstAvailableCheckoutByCustomerId({ customerId }),
|
|
27
30
|
contextId: MESSAGING_CONTEXT_ID,
|
|
28
31
|
invalidation: shouldInvalidate,
|
|
29
|
-
options: {
|
|
32
|
+
options: {
|
|
33
|
+
refetchOnMount: "always",
|
|
34
|
+
staleTime: Infinity,
|
|
35
|
+
retry: false,
|
|
36
|
+
refetchOnWindowFocus: false,
|
|
37
|
+
},
|
|
30
38
|
});
|
|
31
39
|
export { useViewFirstAvailableCheckoutByCustomerId };
|
package/dist/infrastructure/projection/checkout/react/useViewFiveItemsDiscountByCustomerId.js
CHANGED
|
@@ -4,6 +4,6 @@ import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
|
4
4
|
const useViewFiveItemsDiscountByCustomerId = ({ customerId }) => useQuery({
|
|
5
5
|
query: viewFiveItemsDiscountByCustomerId({ customerId }),
|
|
6
6
|
contextId: MESSAGING_CONTEXT_ID,
|
|
7
|
-
options: { staleTime: Infinity },
|
|
7
|
+
options: { refetchOnMount: "always", staleTime: Infinity },
|
|
8
8
|
});
|
|
9
9
|
export { useViewFiveItemsDiscountByCustomerId };
|
package/dist/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js
CHANGED
|
@@ -7,6 +7,12 @@ const useViewIsCheckoutAccessibleByCustomerId = ({ customerId }) => useQuery({
|
|
|
7
7
|
query: viewIsCheckoutAccessibleByCustomerId({ customerId }),
|
|
8
8
|
contextId: MESSAGING_CONTEXT_ID,
|
|
9
9
|
invalidation: isCheckoutFeedbackGiven,
|
|
10
|
-
options: {
|
|
10
|
+
options: {
|
|
11
|
+
refetchOnMount: "always",
|
|
12
|
+
staleTime: Infinity,
|
|
13
|
+
retry: false,
|
|
14
|
+
refetchOnWindowFocus: false,
|
|
15
|
+
cacheTime: 0,
|
|
16
|
+
},
|
|
11
17
|
});
|
|
12
18
|
export { useViewIsCheckoutAccessibleByCustomerId };
|
|
@@ -4,6 +4,6 @@ import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
|
4
4
|
const useListCheckoutQuestionsByCheckoutId = ({ checkoutId }) => useQuery({
|
|
5
5
|
query: listCheckoutQuestionsByCheckoutId({ checkoutId }),
|
|
6
6
|
contextId: MESSAGING_CONTEXT_ID,
|
|
7
|
-
options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
7
|
+
options: { refetchOnMount: "always", staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
8
8
|
});
|
|
9
9
|
export { useListCheckoutQuestionsByCheckoutId };
|
package/dist/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.js
CHANGED
|
@@ -12,6 +12,6 @@ const useViewPaymentFlowPayloadByCheckoutId = ({ checkoutId }) => useQuery({
|
|
|
12
12
|
query: viewPaymentFlowPayloadByCheckoutId({ checkoutId: checkoutId }),
|
|
13
13
|
contextId: MESSAGING_CONTEXT_ID,
|
|
14
14
|
invalidation: shouldInvalidate,
|
|
15
|
-
options: { enabled: Boolean(checkoutId) },
|
|
15
|
+
options: { refetchOnMount: "always", enabled: Boolean(checkoutId) },
|
|
16
16
|
});
|
|
17
17
|
export { useViewPaymentFlowPayloadByCheckoutId };
|
|
@@ -12,6 +12,11 @@ const useViewPricingByCheckoutId = ({ checkoutId }) => useQuery({
|
|
|
12
12
|
query: viewPricingByCheckoutId({ checkoutId }),
|
|
13
13
|
contextId: MESSAGING_CONTEXT_ID,
|
|
14
14
|
invalidation: shouldInvalidate,
|
|
15
|
-
options: {
|
|
15
|
+
options: {
|
|
16
|
+
refetchOnMount: "always",
|
|
17
|
+
staleTime: Infinity,
|
|
18
|
+
retry: false,
|
|
19
|
+
refetchOnWindowFocus: false,
|
|
20
|
+
},
|
|
16
21
|
});
|
|
17
22
|
export { useViewPricingByCheckoutId };
|
|
@@ -4,6 +4,6 @@ import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
|
4
4
|
const useListReturnQuestionsByCheckoutItemId = ({ checkoutItemId }) => useQuery({
|
|
5
5
|
query: listReturnQuestionsByCheckoutItemId({ checkoutItemId }),
|
|
6
6
|
contextId: MESSAGING_CONTEXT_ID,
|
|
7
|
-
options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
7
|
+
options: { refetchOnMount: "always", staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
8
8
|
});
|
|
9
9
|
export { useListReturnQuestionsByCheckoutItemId };
|
|
@@ -7,6 +7,6 @@ const useViewUiSettingByKey = ({ key }) => useQuery({
|
|
|
7
7
|
query: viewUiSettingByKey({ key }),
|
|
8
8
|
contextId: MESSAGING_CONTEXT_ID,
|
|
9
9
|
invalidation: isUiSettingUpdated,
|
|
10
|
-
options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
10
|
+
options: { refetchOnMount: "always", staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
11
11
|
});
|
|
12
12
|
export { useViewUiSettingByKey };
|
|
@@ -107,31 +107,16 @@ const Item = ({ customerId, country }) => {
|
|
|
107
107
|
const handleOnEditFeedback = useCallback(() => handleOnShowReturnQuestions(), [handleOnShowReturnQuestions]);
|
|
108
108
|
const handleOnSubmit = useCallback(async (feedbacks) => {
|
|
109
109
|
handleOnHideReturnQuestions();
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
navigateToNextView();
|
|
113
|
-
}
|
|
114
|
-
catch (e) {
|
|
115
|
-
// TODO show an error Notification?
|
|
116
|
-
}
|
|
110
|
+
await returnCheckoutItem({ feedbacks });
|
|
111
|
+
navigateToNextView();
|
|
117
112
|
}, [handleOnHideReturnQuestions, navigateToNextView, returnCheckoutItem]);
|
|
118
113
|
const handleOnKeep = useCallback(async () => {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
navigateToNextView();
|
|
122
|
-
}
|
|
123
|
-
catch (e) {
|
|
124
|
-
// TODO show an error Notification?
|
|
125
|
-
}
|
|
114
|
+
await keepCheckoutItem();
|
|
115
|
+
navigateToNextView();
|
|
126
116
|
}, [keepCheckoutItem, navigateToNextView]);
|
|
127
117
|
const handleOnReplace = useCallback(async (replacedForId) => {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
handleOnShowSizeChangeModal();
|
|
131
|
-
}
|
|
132
|
-
catch (e) {
|
|
133
|
-
// TODO show an error Notification?
|
|
134
|
-
}
|
|
118
|
+
await replaceCheckoutItem({ replacedForId });
|
|
119
|
+
handleOnShowSizeChangeModal();
|
|
135
120
|
}, [handleOnShowSizeChangeModal, replaceCheckoutItem]);
|
|
136
121
|
const handleOnReturn = useCallback(() => handleOnShowReturnQuestions(), [handleOnShowReturnQuestions]);
|
|
137
122
|
const productVariantSelected = useMemo(() => checkoutItem.status === CheckoutItemStatus.REPLACED && checkoutItem.replacedFor
|
|
@@ -139,7 +124,8 @@ const Item = ({ customerId, country }) => {
|
|
|
139
124
|
: { id: checkoutItem.productVariant.id, size: checkoutItem.productVariant.size }, [checkoutItem.productVariant.id, checkoutItem.productVariant.size, checkoutItem.replacedFor, checkoutItem.status]);
|
|
140
125
|
const dependenciesLoadedStatuses = [QueryStatus.ERROR, QueryStatus.SUCCESS];
|
|
141
126
|
const dependenciesLoaded = dependenciesLoadedStatuses.includes(returnQuestionsStatus) &&
|
|
142
|
-
|
|
127
|
+
// This will ensure that the view is not shown until bookCheckoutBooking use-case is dispatched
|
|
128
|
+
(dependenciesLoadedStatuses.includes(checkoutStatus) || (checkout && checkout.checkoutBookingId)) &&
|
|
143
129
|
dependenciesLoadedStatuses.includes(bookedProductsVariantsStatus) &&
|
|
144
130
|
bookedProductsVariants;
|
|
145
131
|
if (!dependenciesLoaded)
|
|
@@ -9,6 +9,6 @@ const useListNotifications = ({ contextId }) => useQuery({
|
|
|
9
9
|
query: listNotifications(),
|
|
10
10
|
contextId,
|
|
11
11
|
invalidation: shouldInvalidate,
|
|
12
|
-
options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
12
|
+
options: { refetchOnMount: "always", staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
13
13
|
});
|
|
14
14
|
export { useListNotifications };
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CommandStatus } from "@lookiero/messaging-react";
|
|
2
|
-
interface IncrementIntroShownCountFunction {
|
|
3
|
-
(): Promise<void>;
|
|
4
|
-
}
|
|
5
|
-
type UseIncrementIntroShownCount = [incrementIntroShownCount: IncrementIntroShownCountFunction, status: CommandStatus];
|
|
6
|
-
interface UseIncrementIntroShownCountFunction {
|
|
7
|
-
(): UseIncrementIntroShownCount;
|
|
8
|
-
}
|
|
9
|
-
declare const useIncrementIntroShownCount: UseIncrementIntroShownCountFunction;
|
|
10
|
-
export { useIncrementIntroShownCount };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { useCallback } from "react";
|
|
2
|
-
import { useViewIntroShownCount } from "../../../projection/uiSetting/react/useViewIntroShownCount";
|
|
3
|
-
import { UISettings } from "../../../ui/settings/UISettings";
|
|
4
|
-
import { useUpdateUiSetting } from "./useUpdateUiSetting";
|
|
5
|
-
const useIncrementIntroShownCount = () => {
|
|
6
|
-
const [update, status] = useUpdateUiSetting();
|
|
7
|
-
const [introShownCount] = useViewIntroShownCount();
|
|
8
|
-
const incrementIntroShownCount = useCallback(() => update({ key: UISettings.INTRO_SHOWN_COUNT, value: introShownCount + 1 }), [introShownCount, update]);
|
|
9
|
-
return [incrementIntroShownCount, status];
|
|
10
|
-
};
|
|
11
|
-
export { useIncrementIntroShownCount };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { useViewIntroShownCount } from "./useViewIntroShownCount";
|
|
2
|
-
const MAX_INTRO_SHOWN_COUNT = 2;
|
|
3
|
-
const useShouldIntroBeShown = () => {
|
|
4
|
-
const [introShownCount, introShownCountStatus] = useViewIntroShownCount();
|
|
5
|
-
return [introShownCount < MAX_INTRO_SHOWN_COUNT, introShownCountStatus];
|
|
6
|
-
};
|
|
7
|
-
export { useShouldIntroBeShown };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { UISettings } from "../../../ui/settings/UISettings";
|
|
2
|
-
import { useViewUiSettingByKey } from "./useViewUiSettingByKey";
|
|
3
|
-
const useViewIntroShownCount = () => {
|
|
4
|
-
const [introShownCount, introShownCountStatus] = useViewUiSettingByKey({
|
|
5
|
-
key: UISettings.INTRO_SHOWN_COUNT,
|
|
6
|
-
});
|
|
7
|
-
return [introShownCount?.value || 0, introShownCountStatus];
|
|
8
|
-
};
|
|
9
|
-
export { useViewIntroShownCount };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { useEvent } from "@lookiero/event";
|
|
2
|
-
import { useCallback, useEffect } from "react";
|
|
3
|
-
import { useCreateNotification } from "../../../shared/notifications";
|
|
4
|
-
import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
|
|
5
|
-
import { I18nMessages } from "../i18n/i18n";
|
|
6
|
-
import { useToast } from "./useToast";
|
|
7
|
-
const PAYMENT_ERROR = "ERROR";
|
|
8
|
-
const PAYMENT_SUCCESS = "PAYMENT_INSTRUMENT_UPDATED";
|
|
9
|
-
const usePaymentInstrumentUpdateEvents = () => {
|
|
10
|
-
const { subscribe, unsubscribe } = useEvent();
|
|
11
|
-
const { showError, showSuccess } = useToast();
|
|
12
|
-
const [createNotification] = useCreateNotification({ contextId: MESSAGING_CONTEXT_ID });
|
|
13
|
-
const onSuccess = useCallback(({ message }) => showSuccess({ message: message.id }), [showSuccess]);
|
|
14
|
-
const onError = useCallback(({ error }) => {
|
|
15
|
-
if (error.toaster) {
|
|
16
|
-
showError({ message: error.toaster.id || I18nMessages.CHECKOUT_TOAST_PAYMENT_ERROR });
|
|
17
|
-
}
|
|
18
|
-
}, [showError]);
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
subscribe({ event: PAYMENT_ERROR }, onError);
|
|
21
|
-
subscribe({ event: PAYMENT_SUCCESS }, onSuccess);
|
|
22
|
-
return () => {
|
|
23
|
-
unsubscribe({ event: PAYMENT_ERROR }, onError);
|
|
24
|
-
unsubscribe({ event: PAYMENT_SUCCESS }, onSuccess);
|
|
25
|
-
};
|
|
26
|
-
}, [subscribe, unsubscribe, createNotification, onError, onSuccess]);
|
|
27
|
-
};
|
|
28
|
-
export { usePaymentInstrumentUpdateEvents };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Button } from "@lookiero/aurora-next/build/components/atoms/Button/Button";
|
|
2
|
-
import { Icon } from "@lookiero/aurora-next/build/components/primitives/Icon/Icon";
|
|
3
|
-
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
4
|
-
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
-
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { Platform, View } from "react-native";
|
|
8
|
-
import { Spinner } from "../../../../shared/ui/components/atoms/spinner/Spinner";
|
|
9
|
-
import { useIncrementIntroShownCount } from "../../../domain/uiSetting/react/useIncrementIntroShownCount";
|
|
10
|
-
import { useViewFiveItemsDiscountByCustomerId } from "../../../projection/checkout/react/useViewFiveItemsDiscountByCustomerId";
|
|
11
|
-
import { Body } from "../../components/layouts/body/Body";
|
|
12
|
-
import { SafeAreaScrollView } from "../../components/templates/SafeAreaScrollView";
|
|
13
|
-
import { I18nMessages } from "../../i18n/i18n";
|
|
14
|
-
import { HEADER_HEIGHT } from "../navigation/components/header/Header.style";
|
|
15
|
-
import { style } from "./Intro.style";
|
|
16
|
-
const Bullet = ({ text }) => (React.createElement(View, { style: style.bullet },
|
|
17
|
-
React.createElement(Icon, { name: "rounded-tick", style: style.tickIcon }),
|
|
18
|
-
React.createElement(Text, { level: 2, detail: true }, text)));
|
|
19
|
-
const Intro = ({ customerId }) => {
|
|
20
|
-
const titleText = useI18nMessage({ id: I18nMessages.INTRO_TITLE });
|
|
21
|
-
const subTitleText = useI18nMessage({ id: I18nMessages.INTRO_SUBTITLE });
|
|
22
|
-
const discountText = useI18nMessage({ id: I18nMessages.INTRO_DISCOUNT });
|
|
23
|
-
const bulletOneText = useI18nMessage({ id: I18nMessages.INTRO_BULLET_ONE });
|
|
24
|
-
const bulletTwoText = useI18nMessage({ id: I18nMessages.INTRO_BULLET_TWO });
|
|
25
|
-
const bulletThreeText = useI18nMessage({ id: I18nMessages.INTRO_BULLET_THREE });
|
|
26
|
-
const buttonText = useI18nMessage({ id: I18nMessages.INTRO_BUTTON });
|
|
27
|
-
const [fiveItemsDiscount, fiveItemsDiscountStatus] = useViewFiveItemsDiscountByCustomerId({
|
|
28
|
-
customerId,
|
|
29
|
-
});
|
|
30
|
-
const [incrementIntroShownCount, incrementIntroShownCountStatus] = useIncrementIntroShownCount();
|
|
31
|
-
if (fiveItemsDiscountStatus === QueryStatus.LOADING)
|
|
32
|
-
return React.createElement(Spinner, null);
|
|
33
|
-
return (React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0 },
|
|
34
|
-
React.createElement(Body, { style: { column: style.bodyColumn } },
|
|
35
|
-
React.createElement(View, { style: style.intro },
|
|
36
|
-
React.createElement(View, { style: style.content },
|
|
37
|
-
React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
|
|
38
|
-
React.createElement(Text, { level: 3, style: style.subtitle, body: true }, subTitleText),
|
|
39
|
-
fiveItemsDiscount !== 0 && (React.createElement(View, { style: style.discountContainer },
|
|
40
|
-
React.createElement(View, { style: style.discount },
|
|
41
|
-
React.createElement(Text, { level: 2, heading: true },
|
|
42
|
-
"- ",
|
|
43
|
-
fiveItemsDiscount),
|
|
44
|
-
React.createElement(Text, { level: 3, style: style.percentage, heading: true }, "%")),
|
|
45
|
-
React.createElement(Text, { level: 3, body: true }, discountText))),
|
|
46
|
-
React.createElement(View, { style: style.description },
|
|
47
|
-
React.createElement(Bullet, { text: bulletOneText }),
|
|
48
|
-
React.createElement(Bullet, { text: bulletTwoText }),
|
|
49
|
-
React.createElement(Bullet, { text: bulletThreeText }))),
|
|
50
|
-
React.createElement(Button, { disabled: incrementIntroShownCountStatus === CommandStatus.LOADING, onPress: incrementIntroShownCount }, buttonText)))));
|
|
51
|
-
};
|
|
52
|
-
export { Intro };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
declare const style: {
|
|
2
|
-
bodyColumn: {
|
|
3
|
-
paddingHorizontal: number;
|
|
4
|
-
};
|
|
5
|
-
bullet: {
|
|
6
|
-
alignItems: "center";
|
|
7
|
-
flexDirection: "row";
|
|
8
|
-
marginVertical: number;
|
|
9
|
-
};
|
|
10
|
-
content: {
|
|
11
|
-
alignItems: "center";
|
|
12
|
-
};
|
|
13
|
-
description: {
|
|
14
|
-
borderWidth: number;
|
|
15
|
-
marginBottom: number;
|
|
16
|
-
padding: number;
|
|
17
|
-
width: string;
|
|
18
|
-
};
|
|
19
|
-
discount: {
|
|
20
|
-
alignItems: "flex-end";
|
|
21
|
-
flexDirection: "row";
|
|
22
|
-
justifyContent: "center";
|
|
23
|
-
marginBottom: number;
|
|
24
|
-
};
|
|
25
|
-
discountContainer: {
|
|
26
|
-
alignItems: "center";
|
|
27
|
-
backgroundColor: string;
|
|
28
|
-
marginBottom: number;
|
|
29
|
-
padding: number;
|
|
30
|
-
textAlign: "center";
|
|
31
|
-
width: string;
|
|
32
|
-
};
|
|
33
|
-
intro: {
|
|
34
|
-
flex: number;
|
|
35
|
-
justifyContent: "space-between";
|
|
36
|
-
};
|
|
37
|
-
percentage: {
|
|
38
|
-
marginLeft: number;
|
|
39
|
-
};
|
|
40
|
-
subtitle: {
|
|
41
|
-
marginBottom: number;
|
|
42
|
-
textAlign: "center";
|
|
43
|
-
};
|
|
44
|
-
tickIcon: {
|
|
45
|
-
marginRight: number;
|
|
46
|
-
};
|
|
47
|
-
title: {
|
|
48
|
-
marginBottom: number;
|
|
49
|
-
textAlign: "center";
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
export { style };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from "react-native";
|
|
2
|
-
import { theme } from "../../theme/theme";
|
|
3
|
-
const { borderSize, colorAccent, spaceXS, spaceS, spaceM, spaceL, spaceXL } = theme();
|
|
4
|
-
const style = StyleSheet.create({
|
|
5
|
-
bodyColumn: {
|
|
6
|
-
paddingHorizontal: spaceXL,
|
|
7
|
-
},
|
|
8
|
-
bullet: {
|
|
9
|
-
alignItems: "center",
|
|
10
|
-
flexDirection: "row",
|
|
11
|
-
marginVertical: spaceS,
|
|
12
|
-
},
|
|
13
|
-
content: {
|
|
14
|
-
alignItems: "center",
|
|
15
|
-
},
|
|
16
|
-
description: {
|
|
17
|
-
borderWidth: borderSize,
|
|
18
|
-
marginBottom: spaceXL,
|
|
19
|
-
padding: spaceM,
|
|
20
|
-
width: "100%",
|
|
21
|
-
},
|
|
22
|
-
discount: {
|
|
23
|
-
alignItems: "flex-end",
|
|
24
|
-
flexDirection: "row",
|
|
25
|
-
justifyContent: "center",
|
|
26
|
-
marginBottom: spaceS,
|
|
27
|
-
},
|
|
28
|
-
discountContainer: {
|
|
29
|
-
alignItems: "center",
|
|
30
|
-
backgroundColor: colorAccent,
|
|
31
|
-
marginBottom: spaceL,
|
|
32
|
-
padding: spaceM,
|
|
33
|
-
textAlign: "center",
|
|
34
|
-
width: "100%",
|
|
35
|
-
},
|
|
36
|
-
intro: {
|
|
37
|
-
flex: 1,
|
|
38
|
-
justifyContent: "space-between",
|
|
39
|
-
},
|
|
40
|
-
percentage: {
|
|
41
|
-
marginLeft: spaceXS,
|
|
42
|
-
},
|
|
43
|
-
subtitle: {
|
|
44
|
-
marginBottom: spaceXL,
|
|
45
|
-
textAlign: "center",
|
|
46
|
-
},
|
|
47
|
-
tickIcon: {
|
|
48
|
-
marginRight: spaceS,
|
|
49
|
-
},
|
|
50
|
-
title: {
|
|
51
|
-
marginBottom: spaceM,
|
|
52
|
-
textAlign: "center",
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
export { style };
|