@lookiero/checkout 8.9.0 → 8.11.0-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/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/ExpoRoot.js +1 -1
- package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +10 -0
- package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +17 -0
- package/dist/src/infrastructure/ui/Root.js +1 -1
- package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +21 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +1 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +6 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +4 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +6 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +5 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +4 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +19 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +3 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +18 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +12 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +13 -0
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +6 -0
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +11 -0
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +8 -0
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +11 -0
- package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +11 -0
- package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +49 -0
- package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +9 -0
- package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +9 -0
- package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +19 -0
- package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +21 -0
- package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +9 -0
- package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +21 -0
- package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +7 -0
- package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +10 -0
- package/dist/src/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js +2 -8
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +11 -0
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +40 -0
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +12 -0
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +15 -0
- package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +40 -0
- package/dist/src/infrastructure/ui/views/return/Return.style.js +43 -0
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +3 -7
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +13 -0
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +9 -0
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +7 -0
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +10 -0
- package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +17 -0
- package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +13 -0
- package/dist/src/projection/shared/country.d.ts +14 -0
- package/dist/src/projection/shared/country.js +15 -0
- package/dist/src/projection/shared/customer.d.ts +8 -0
- package/dist/src/projection/shared/customer.js +1 -0
- package/dist/src/projection/shared/locale.d.ts +12 -0
- package/dist/src/projection/shared/locale.js +13 -0
- package/dist/src/projection/shared/order.d.ts +6 -0
- package/dist/src/projection/shared/order.js +1 -0
- package/dist/src/projection/shared/price.d.ts +10 -0
- package/dist/src/projection/shared/price.js +1 -0
- package/dist/src/projection/shared/size.d.ts +20 -0
- package/dist/src/projection/shared/size.js +3 -0
- package/dist/src/projection/shared/subscription.d.ts +2 -0
- package/dist/src/projection/shared/subscription.js +1 -0
- package/dist/src/shared/ui/components/atoms/error/Error.d.ts +10 -0
- package/dist/src/shared/ui/components/atoms/error/Error.js +4 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +16 -16
- package/src/ExpoRoot.tsx +1 -1
- package/src/infrastructure/ui/Root.tsx +1 -1
- package/src/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.tsx +5 -9
- package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +234 -20
- package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +702 -60
- package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +6 -9
- package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +242 -28
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +484 -56
- package/webpack.config.js +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Pressable, View } from "react-native";
|
|
3
3
|
import { COLOR, Icon, Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { LazyImage } from "@lookiero/sty-psp-ui";
|
|
5
6
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
6
7
|
import { size } from "../../../../../../projection/size/size";
|
|
7
8
|
import { Price } from "../../../../components/atoms/price/Price";
|
|
@@ -16,12 +17,7 @@ const ProductVariant = ({ media, brand, name, price, size: sizeProjection, color
|
|
|
16
17
|
return (React.createElement(Pressable, { pointerEvents: onPress ? "auto" : "none", style: style.container, testID: "product-variant", onPress: onPress },
|
|
17
18
|
React.createElement(View, { style: style.row },
|
|
18
19
|
React.createElement(View, null,
|
|
19
|
-
React.createElement(
|
|
20
|
-
uri: cdnImageUrl({
|
|
21
|
-
url: media[0]?.url,
|
|
22
|
-
width: IMAGE_WIDTH,
|
|
23
|
-
}),
|
|
24
|
-
} })),
|
|
20
|
+
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" })),
|
|
25
21
|
React.createElement(View, { style: style.descriptionContainer },
|
|
26
22
|
React.createElement(View, { style: style.infoProductVariant },
|
|
27
23
|
React.createElement(Text, { color: COLOR.TEXT_MEDIUM, level: 2, detail: true }, brand),
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { LayoutRectangle } from "react-native";
|
|
3
|
+
import { PricingProjection } from "../../../../../../projection/pricing/pricing";
|
|
4
|
+
interface StickyPricingProps {
|
|
5
|
+
readonly pricing: PricingProjection;
|
|
6
|
+
readonly totalCheckoutItemsKept: number;
|
|
7
|
+
readonly collapsed: boolean;
|
|
8
|
+
readonly onPress: () => void;
|
|
9
|
+
readonly onSubmit: () => void;
|
|
10
|
+
readonly onLayout?: ({ width, height }: LayoutRectangle) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const StickyPricing: FC<StickyPricingProps>;
|
|
13
|
+
export { StickyPricing };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Sticky } from "@lookiero/sty-psp-ui";
|
|
3
|
+
import { Body } from "../../../../components/layouts/body/Body";
|
|
4
|
+
import { Pricing } from "../pricing/Pricing";
|
|
5
|
+
import { style } from "./StickyPricing.style";
|
|
6
|
+
const StickyPricing = ({ pricing, totalCheckoutItemsKept, collapsed, onPress, onSubmit, onLayout, }) => (React.createElement(Sticky, { style: style.sticky, onLayout: onLayout },
|
|
7
|
+
React.createElement(Body, null,
|
|
8
|
+
React.createElement(Pricing, { balanceDiscount: pricing.balanceDiscount, collapsed: collapsed, discount: pricing.discount, discountPercentage: pricing.discountPercentage, pendingToPay: pricing.pendingToPay, service: pricing.service, subtotal: pricing.subtotal, totalCheckoutItemsKept: totalCheckoutItemsKept, onPress: onPress, onSubmit: onSubmit }))));
|
|
9
|
+
export { StickyPricing };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
|
|
2
|
+
type IsCheckoutAccessibleByCustomerIdProjection = boolean;
|
|
3
|
+
declare const VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID = "view_is_checkout_accessible_by_customer_id";
|
|
4
|
+
interface ViewIsCheckoutAccessibleByCustomerIdPayload {
|
|
5
|
+
readonly customerId: string | undefined;
|
|
6
|
+
}
|
|
7
|
+
interface ViewIsCheckoutAccessibleByCustomerId extends Query<typeof VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID>, ViewIsCheckoutAccessibleByCustomerIdPayload {
|
|
8
|
+
}
|
|
9
|
+
interface ViewIsCheckoutAccessibleByCustomerIdFunction {
|
|
10
|
+
(payload: ViewIsCheckoutAccessibleByCustomerIdPayload): ViewIsCheckoutAccessibleByCustomerId;
|
|
11
|
+
}
|
|
12
|
+
declare const viewIsCheckoutAccessibleByCustomerId: ViewIsCheckoutAccessibleByCustomerIdFunction;
|
|
13
|
+
interface ViewIsCheckoutAccessibleByCustomerIdHandlerFunctionArgs extends QueryHandlerFunctionArgs {
|
|
14
|
+
}
|
|
15
|
+
declare const viewIsCheckoutAccessibleByCustomerIdHandler: QueryHandlerFunction<ViewIsCheckoutAccessibleByCustomerId, IsCheckoutAccessibleByCustomerIdProjection, ViewIsCheckoutAccessibleByCustomerIdHandlerFunctionArgs>;
|
|
16
|
+
export type { IsCheckoutAccessibleByCustomerIdProjection };
|
|
17
|
+
export { VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID, viewIsCheckoutAccessibleByCustomerId, viewIsCheckoutAccessibleByCustomerIdHandler, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { query } from "@lookiero/messaging";
|
|
2
|
+
import { viewFirstAvailableCheckoutByCustomerId } from "./viewFirstAvailableCheckoutByCustomerId";
|
|
3
|
+
import { viewIsCheckoutEnabledByCustomerId } from "./viewIsCheckoutEnabledByCustomerId";
|
|
4
|
+
const VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID = "view_is_checkout_accessible_by_customer_id";
|
|
5
|
+
const viewIsCheckoutAccessibleByCustomerId = (payload) => ({
|
|
6
|
+
...query({ name: VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID }),
|
|
7
|
+
...payload,
|
|
8
|
+
});
|
|
9
|
+
const isNonEmptyCustomerId = (customerId) => Boolean(customerId);
|
|
10
|
+
const viewIsCheckoutAccessibleByCustomerIdHandler = ({ queryBus }) => async ({ customerId }) => isNonEmptyCustomerId(customerId) &&
|
|
11
|
+
Boolean(await queryBus(viewFirstAvailableCheckoutByCustomerId({ customerId }))) &&
|
|
12
|
+
Boolean(await queryBus(viewIsCheckoutEnabledByCustomerId({ customerId })));
|
|
13
|
+
export { VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID, viewIsCheckoutAccessibleByCustomerId, viewIsCheckoutAccessibleByCustomerIdHandler, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var Country;
|
|
2
|
+
(function (Country) {
|
|
3
|
+
Country["ES"] = "ES";
|
|
4
|
+
Country["FR"] = "FR";
|
|
5
|
+
Country["GB"] = "GB";
|
|
6
|
+
Country["BE"] = "BE";
|
|
7
|
+
Country["LU"] = "LU";
|
|
8
|
+
Country["IT"] = "IT";
|
|
9
|
+
Country["PT"] = "PT";
|
|
10
|
+
Country["DE"] = "DE";
|
|
11
|
+
Country["AT"] = "AT";
|
|
12
|
+
Country["NL"] = "NL";
|
|
13
|
+
Country["SE"] = "SE";
|
|
14
|
+
})(Country || (Country = {}));
|
|
15
|
+
export { Country };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var Locale;
|
|
2
|
+
(function (Locale) {
|
|
3
|
+
Locale["ES"] = "es";
|
|
4
|
+
Locale["FR"] = "fr";
|
|
5
|
+
Locale["EN"] = "en";
|
|
6
|
+
Locale["IT"] = "it";
|
|
7
|
+
Locale["PT"] = "pt";
|
|
8
|
+
Locale["DE"] = "de";
|
|
9
|
+
Locale["AT"] = "at";
|
|
10
|
+
Locale["NL"] = "nl";
|
|
11
|
+
Locale["SE"] = "sv";
|
|
12
|
+
})(Locale || (Locale = {}));
|
|
13
|
+
export { Locale };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Currency } from "../../domain/checkoutItem/model/currency";
|
|
2
|
+
interface PriceProjection {
|
|
3
|
+
readonly amount: number;
|
|
4
|
+
readonly currency: Currency;
|
|
5
|
+
readonly discountedPrice?: {
|
|
6
|
+
readonly amount: number;
|
|
7
|
+
readonly percentage: number;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export type { PriceProjection };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Country } from "./country";
|
|
2
|
+
interface SizeProjection {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly lookiero: string;
|
|
5
|
+
readonly uk: string;
|
|
6
|
+
readonly it: string;
|
|
7
|
+
readonly europe: string;
|
|
8
|
+
readonly unique: boolean;
|
|
9
|
+
readonly visualOrder?: number;
|
|
10
|
+
}
|
|
11
|
+
interface SizeFunctionArgs {
|
|
12
|
+
readonly size: SizeProjection;
|
|
13
|
+
readonly country: Country;
|
|
14
|
+
}
|
|
15
|
+
interface SizeFunction {
|
|
16
|
+
(args: SizeFunctionArgs): string;
|
|
17
|
+
}
|
|
18
|
+
declare const size: SizeFunction;
|
|
19
|
+
export type { SizeProjection };
|
|
20
|
+
export { size };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { StyleProp, TextStyle } from "react-native";
|
|
3
|
+
type ErrorStyle = StyleProp<TextStyle>;
|
|
4
|
+
interface ErrorProps {
|
|
5
|
+
readonly error?: string | null;
|
|
6
|
+
readonly style?: ErrorStyle;
|
|
7
|
+
}
|
|
8
|
+
declare const Error: FC<ErrorProps>;
|
|
9
|
+
export type { ErrorStyle };
|
|
10
|
+
export { Error };
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "8.
|
|
1
|
+
export declare const VERSION = "8.11.0-beta.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "8.
|
|
1
|
+
export const VERSION = "8.11.0-beta.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lookiero/checkout",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.11.0-beta.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"sideEffects": "false",
|
|
@@ -15,21 +15,21 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@lookiero/messaging": "^8.1.1",
|
|
17
17
|
"@lookiero/messaging-react": "^8.1.1",
|
|
18
|
-
"@lookiero/sty-psp-ab-testing": "^0.2
|
|
19
|
-
"@lookiero/sty-psp-expo-config": "^0.1
|
|
20
|
-
"@lookiero/sty-psp-http": "^2.0
|
|
21
|
-
"@lookiero/sty-psp-i18n": "^0.2
|
|
22
|
-
"@lookiero/sty-psp-locale": "^0.4
|
|
23
|
-
"@lookiero/sty-psp-logging": "^0.
|
|
24
|
-
"@lookiero/sty-psp-notifications": "^0.5
|
|
25
|
-
"@lookiero/sty-psp-react-native": "^0.2
|
|
26
|
-
"@lookiero/sty-psp-segment": "^0.1
|
|
27
|
-
"@lookiero/sty-psp-storage": "^0.1
|
|
28
|
-
"@lookiero/sty-psp-tracking": "^0.1
|
|
29
|
-
"@lookiero/sty-psp-ui": "
|
|
30
|
-
"@lookiero/sty-psp-ui-settings": "^0.1
|
|
31
|
-
"@lookiero/sty-psp-units": "^0.1
|
|
32
|
-
"@lookiero/sty-psp-uuid": "^0.1
|
|
18
|
+
"@lookiero/sty-psp-ab-testing": "^0.2",
|
|
19
|
+
"@lookiero/sty-psp-expo-config": "^0.1",
|
|
20
|
+
"@lookiero/sty-psp-http": "^2.0",
|
|
21
|
+
"@lookiero/sty-psp-i18n": "^0.2",
|
|
22
|
+
"@lookiero/sty-psp-locale": "^0.4",
|
|
23
|
+
"@lookiero/sty-psp-logging": "^0.3",
|
|
24
|
+
"@lookiero/sty-psp-notifications": "^0.5",
|
|
25
|
+
"@lookiero/sty-psp-react-native": "^0.2",
|
|
26
|
+
"@lookiero/sty-psp-segment": "^0.1",
|
|
27
|
+
"@lookiero/sty-psp-storage": "^0.1",
|
|
28
|
+
"@lookiero/sty-psp-tracking": "^0.1",
|
|
29
|
+
"@lookiero/sty-psp-ui": "0.5.11-beta.0",
|
|
30
|
+
"@lookiero/sty-psp-ui-settings": "^0.1",
|
|
31
|
+
"@lookiero/sty-psp-units": "^0.1",
|
|
32
|
+
"@lookiero/sty-psp-uuid": "^0.1",
|
|
33
33
|
"@react-native-async-storage/async-storage": "^1.22.3",
|
|
34
34
|
"@react-spring/native": "9.6.1",
|
|
35
35
|
"react-native-svg": "^13.4.0",
|
package/src/ExpoRoot.tsx
CHANGED
|
@@ -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.eyJzdWIiOjUzNzYyNDEsImV4cCI6MTcyNzAwMTc2MiwiZGlzcGxheU5hbWUiOiJNaWtlbCIsImNvdW50cnlfY29kZSI6IkVTIiwiYWNjZXNzVmlhIjoiZW1haWwiLCJzdWJzY3JpcHRpb25TdGFydGluZ0RhdGUiOiIyMDI0LTA4LTIwIiwiaW1wZXJzb25hdGVkIjpmYWxzZSwidXVpZCI6IjRmMDg0ZTg0LWM5ZTEtNDE0NS1iMjM1LWE5ZjEyOWQ0OWMyMiIsImlhdCI6MTcyNDMyMzM2Mn0.mBDi_xW9DJLWLuWbxbC-TS6OWJriD4BTAXZAHoOMdcQ";
|
|
52
52
|
const getAuthToken = () => Promise.resolve(authToken);
|
|
53
53
|
|
|
54
54
|
const externalTranslationsUrl =
|
|
@@ -86,7 +86,7 @@ const root: RootFunction = ({ Messaging, I18n, getAuthToken, development, sentry
|
|
|
86
86
|
* It's important to not call sentryLoggerHOC each time this function gets called.
|
|
87
87
|
* That's why its called outside this method.
|
|
88
88
|
*/
|
|
89
|
-
return ({ customerId }) => hoc({ customerId })(Root);
|
|
89
|
+
return ({ customerId, rootClient }) => hoc({ customerId, rootClient })(Root);
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
export type { RootProps };
|
package/src/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { FC, useCallback, useState } from "react";
|
|
2
|
-
import { Image } from "react-native";
|
|
3
2
|
import {
|
|
4
3
|
Bullets,
|
|
5
4
|
Carousel,
|
|
5
|
+
LazyImage,
|
|
6
6
|
RenderBulletsFunction,
|
|
7
7
|
RenderItemFunction,
|
|
8
8
|
theme,
|
|
@@ -46,16 +46,12 @@ const ProductVariantSlider: FC<ProductVariantSlider> = ({ producVariantMedia, on
|
|
|
46
46
|
alignSelf: isCollageImage ? (isLastItem ? "flex-end" : "flex-start") : undefined,
|
|
47
47
|
}}
|
|
48
48
|
>
|
|
49
|
-
<
|
|
49
|
+
<LazyImage
|
|
50
|
+
hiResSrc={cdnImageUrl({ url: item.url, width: 600 })}
|
|
50
51
|
resizeMode="stretch"
|
|
51
|
-
|
|
52
|
+
src={cdnImageUrl({ url: item.url, width: 600, dpi: 1 })}
|
|
53
|
+
style={{ view: [style.image, isDesktopScreen ? style.largeImage : null] }}
|
|
52
54
|
testID="product-variant-image"
|
|
53
|
-
source={{
|
|
54
|
-
uri: cdnImageUrl({
|
|
55
|
-
url: item.url,
|
|
56
|
-
width: 600,
|
|
57
|
-
}),
|
|
58
|
-
}}
|
|
59
55
|
/>
|
|
60
56
|
</AspectRatioView>
|
|
61
57
|
);
|
|
@@ -135,23 +135,130 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
|
|
|
135
135
|
]
|
|
136
136
|
}
|
|
137
137
|
>
|
|
138
|
-
<
|
|
139
|
-
resizeMode="stretch"
|
|
140
|
-
source={
|
|
141
|
-
{
|
|
142
|
-
"uri": "https://cdn-catalog-back-prod.envs.lookiero.tech/1a/28/1a28f712-a76c-4172-8a11-f15002981dc0.jpg?w=1200&f=auto",
|
|
143
|
-
}
|
|
144
|
-
}
|
|
138
|
+
<View
|
|
145
139
|
style={
|
|
146
140
|
[
|
|
147
141
|
{
|
|
148
|
-
"
|
|
142
|
+
"position": "relative",
|
|
149
143
|
},
|
|
150
|
-
|
|
144
|
+
[
|
|
145
|
+
{
|
|
146
|
+
"flex": 1,
|
|
147
|
+
},
|
|
148
|
+
null,
|
|
149
|
+
],
|
|
151
150
|
]
|
|
152
151
|
}
|
|
153
152
|
testID="product-variant-image"
|
|
154
|
-
|
|
153
|
+
>
|
|
154
|
+
<View
|
|
155
|
+
style={
|
|
156
|
+
[
|
|
157
|
+
{
|
|
158
|
+
"flex": 1,
|
|
159
|
+
},
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
testID="lazy-image-skeleton"
|
|
163
|
+
>
|
|
164
|
+
<View
|
|
165
|
+
onLayout={[Function]}
|
|
166
|
+
style={
|
|
167
|
+
[
|
|
168
|
+
{
|
|
169
|
+
"backgroundColor": "#F8F7F7",
|
|
170
|
+
"flex": 1,
|
|
171
|
+
"height": undefined,
|
|
172
|
+
"overflow": "hidden",
|
|
173
|
+
"width": undefined,
|
|
174
|
+
},
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
>
|
|
178
|
+
<View
|
|
179
|
+
collapsable={false}
|
|
180
|
+
duration={1200}
|
|
181
|
+
style={
|
|
182
|
+
{
|
|
183
|
+
"height": "100%",
|
|
184
|
+
"left": 0,
|
|
185
|
+
"transform": [
|
|
186
|
+
{
|
|
187
|
+
"translateX": -375,
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
"width": "100%",
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
>
|
|
194
|
+
<View
|
|
195
|
+
colors={
|
|
196
|
+
[
|
|
197
|
+
"rgba(255, 255, 255, 0)",
|
|
198
|
+
"#DAD8D8",
|
|
199
|
+
"#DAD8D8",
|
|
200
|
+
"rgba(255, 255, 255, 0)",
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
end={
|
|
204
|
+
{
|
|
205
|
+
"x": 1,
|
|
206
|
+
"y": 0,
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
locations={
|
|
210
|
+
[
|
|
211
|
+
0,
|
|
212
|
+
0.25,
|
|
213
|
+
0.75,
|
|
214
|
+
1,
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
start={
|
|
218
|
+
{
|
|
219
|
+
"x": 0,
|
|
220
|
+
"y": 0,
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
style={
|
|
224
|
+
{
|
|
225
|
+
"height": "100%",
|
|
226
|
+
"width": "100%",
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
/>
|
|
230
|
+
</View>
|
|
231
|
+
</View>
|
|
232
|
+
</View>
|
|
233
|
+
<Image
|
|
234
|
+
animatedStyle={
|
|
235
|
+
{
|
|
236
|
+
"value": {
|
|
237
|
+
"opacity": 0,
|
|
238
|
+
},
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
collapsable={false}
|
|
242
|
+
onLoad={[Function]}
|
|
243
|
+
resizeMode="stretch"
|
|
244
|
+
source={
|
|
245
|
+
{
|
|
246
|
+
"uri": "https://cdn-catalog-back-prod.envs.lookiero.tech/1a/28/1a28f712-a76c-4172-8a11-f15002981dc0.jpg?w=600&f=auto",
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
style={
|
|
250
|
+
{
|
|
251
|
+
"flex": 1,
|
|
252
|
+
"height": "100%",
|
|
253
|
+
"opacity": 0,
|
|
254
|
+
"position": "absolute",
|
|
255
|
+
"width": "100%",
|
|
256
|
+
"zIndex": 10,
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
testID="lazy-image-main-image"
|
|
260
|
+
/>
|
|
261
|
+
</View>
|
|
155
262
|
</View>
|
|
156
263
|
</View>
|
|
157
264
|
</View>
|
|
@@ -186,23 +293,130 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
|
|
|
186
293
|
]
|
|
187
294
|
}
|
|
188
295
|
>
|
|
189
|
-
<
|
|
190
|
-
resizeMode="stretch"
|
|
191
|
-
source={
|
|
192
|
-
{
|
|
193
|
-
"uri": "https://cdn-catalog-back-prod.envs.lookiero.tech/15/ac/15aca112-4e71-4646-8db5-7f9723bc0130.jpg?w=1200&f=auto",
|
|
194
|
-
}
|
|
195
|
-
}
|
|
296
|
+
<View
|
|
196
297
|
style={
|
|
197
298
|
[
|
|
198
299
|
{
|
|
199
|
-
"
|
|
300
|
+
"position": "relative",
|
|
200
301
|
},
|
|
201
|
-
|
|
302
|
+
[
|
|
303
|
+
{
|
|
304
|
+
"flex": 1,
|
|
305
|
+
},
|
|
306
|
+
null,
|
|
307
|
+
],
|
|
202
308
|
]
|
|
203
309
|
}
|
|
204
310
|
testID="product-variant-image"
|
|
205
|
-
|
|
311
|
+
>
|
|
312
|
+
<View
|
|
313
|
+
style={
|
|
314
|
+
[
|
|
315
|
+
{
|
|
316
|
+
"flex": 1,
|
|
317
|
+
},
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
testID="lazy-image-skeleton"
|
|
321
|
+
>
|
|
322
|
+
<View
|
|
323
|
+
onLayout={[Function]}
|
|
324
|
+
style={
|
|
325
|
+
[
|
|
326
|
+
{
|
|
327
|
+
"backgroundColor": "#F8F7F7",
|
|
328
|
+
"flex": 1,
|
|
329
|
+
"height": undefined,
|
|
330
|
+
"overflow": "hidden",
|
|
331
|
+
"width": undefined,
|
|
332
|
+
},
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
>
|
|
336
|
+
<View
|
|
337
|
+
collapsable={false}
|
|
338
|
+
duration={1200}
|
|
339
|
+
style={
|
|
340
|
+
{
|
|
341
|
+
"height": "100%",
|
|
342
|
+
"left": 0,
|
|
343
|
+
"transform": [
|
|
344
|
+
{
|
|
345
|
+
"translateX": -375,
|
|
346
|
+
},
|
|
347
|
+
],
|
|
348
|
+
"width": "100%",
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
>
|
|
352
|
+
<View
|
|
353
|
+
colors={
|
|
354
|
+
[
|
|
355
|
+
"rgba(255, 255, 255, 0)",
|
|
356
|
+
"#DAD8D8",
|
|
357
|
+
"#DAD8D8",
|
|
358
|
+
"rgba(255, 255, 255, 0)",
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
end={
|
|
362
|
+
{
|
|
363
|
+
"x": 1,
|
|
364
|
+
"y": 0,
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
locations={
|
|
368
|
+
[
|
|
369
|
+
0,
|
|
370
|
+
0.25,
|
|
371
|
+
0.75,
|
|
372
|
+
1,
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
start={
|
|
376
|
+
{
|
|
377
|
+
"x": 0,
|
|
378
|
+
"y": 0,
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
style={
|
|
382
|
+
{
|
|
383
|
+
"height": "100%",
|
|
384
|
+
"width": "100%",
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
/>
|
|
388
|
+
</View>
|
|
389
|
+
</View>
|
|
390
|
+
</View>
|
|
391
|
+
<Image
|
|
392
|
+
animatedStyle={
|
|
393
|
+
{
|
|
394
|
+
"value": {
|
|
395
|
+
"opacity": 0,
|
|
396
|
+
},
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
collapsable={false}
|
|
400
|
+
onLoad={[Function]}
|
|
401
|
+
resizeMode="stretch"
|
|
402
|
+
source={
|
|
403
|
+
{
|
|
404
|
+
"uri": "https://cdn-catalog-back-prod.envs.lookiero.tech/15/ac/15aca112-4e71-4646-8db5-7f9723bc0130.jpg?w=600&f=auto",
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
style={
|
|
408
|
+
{
|
|
409
|
+
"flex": 1,
|
|
410
|
+
"height": "100%",
|
|
411
|
+
"opacity": 0,
|
|
412
|
+
"position": "absolute",
|
|
413
|
+
"width": "100%",
|
|
414
|
+
"zIndex": 10,
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
testID="lazy-image-main-image"
|
|
418
|
+
/>
|
|
419
|
+
</View>
|
|
206
420
|
</View>
|
|
207
421
|
</View>
|
|
208
422
|
</View>
|