@lookiero/checkout 6.4.0 → 6.5.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/ui/Root.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/templates/header/Header.js +3 -6
- package/dist/src/infrastructure/ui/components/templates/header/Header.style.d.ts +3 -2
- package/dist/src/infrastructure/ui/components/templates/header/Header.style.js +4 -3
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js +6 -7
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.style.d.ts +2 -1
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.style.js +2 -1
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +2 -1
- 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/components/templates/header/itemDetailHeader/ItemDetailHeader.js +2 -1
- package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.style.d.ts +8 -0
- package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.style.js +11 -0
- package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.style.js +1 -0
- package/dist/src/infrastructure/ui/routing/Routing.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/checkout/Checkout.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/checkout/Checkout.js +9 -9
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.d.ts +5 -18
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.js +7 -21
- package/dist/src/infrastructure/ui/views/feedback/Feedback.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/feedback/Feedback.js +2 -1
- package/dist/src/infrastructure/ui/views/feedback/Feedback.style.d.ts +0 -3
- package/dist/src/infrastructure/ui/views/feedback/Feedback.style.js +0 -4
- package/dist/src/infrastructure/ui/views/item/Item.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/Item.js +4 -4
- package/dist/src/infrastructure/ui/views/item/Item.style.d.ts +4 -4
- package/dist/src/infrastructure/ui/views/item/Item.style.js +5 -6
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +3 -4
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.js +1 -0
- package/dist/src/infrastructure/ui/views/return/Return.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/return/Return.js +0 -1
- package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +0 -3
- package/dist/src/infrastructure/ui/views/return/Return.style.js +1 -5
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.js +2 -2
- package/dist/src/infrastructure/ui/views/summary/Summary.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/summary/Summary.js +20 -18
- package/dist/src/infrastructure/ui/views/summary/Summary.style.d.ts +4 -4
- package/dist/src/infrastructure/ui/views/summary/Summary.style.js +7 -8
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.d.ts +13 -0
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +33 -0
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.style.d.ts +18 -0
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.style.js +21 -0
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.d.ts +2 -14
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +15 -28
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.style.d.ts +0 -15
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.style.js +1 -16
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -1
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +2 -2
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.js +6 -2
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.style.d.ts +10 -1
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.style.js +13 -4
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
- package/src/ExpoRoot.tsx +1 -1
- package/src/infrastructure/ui/Root.tsx +1 -1
- package/src/infrastructure/ui/components/templates/header/Header.style.ts +4 -3
- package/src/infrastructure/ui/components/templates/header/Header.tsx +7 -11
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.style.ts +2 -1
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.tsx +10 -11
- package/src/infrastructure/ui/{views/summary/components/stickyPricing/StickyPricing.style.ts → components/templates/header/defaultHeader/DefaultHeader.style.ts} +5 -4
- package/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.tsx +2 -1
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.style.ts +14 -0
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx +2 -1
- package/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.style.ts +1 -0
- package/src/infrastructure/ui/routing/Routing.tsx +1 -1
- package/src/infrastructure/ui/views/checkout/Checkout.style.ts +7 -21
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +13 -22
- package/src/infrastructure/ui/views/feedback/Feedback.style.ts +0 -4
- package/src/infrastructure/ui/views/feedback/Feedback.tsx +3 -2
- package/src/infrastructure/ui/views/item/Item.style.ts +5 -6
- package/src/infrastructure/ui/views/item/Item.tsx +21 -21
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.ts +1 -0
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +11 -13
- package/src/infrastructure/ui/views/return/Return.style.ts +1 -5
- package/src/infrastructure/ui/views/return/Return.tsx +1 -2
- package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.ts +2 -1
- package/src/infrastructure/ui/views/summary/Summary.style.ts +8 -7
- package/src/infrastructure/ui/views/summary/Summary.tsx +52 -55
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.style.ts +24 -0
- package/src/infrastructure/ui/views/summary/components/{pricing/Pricing.test.tsx → collapsiblePricing/CollapsiblePricing.test.tsx} +2 -7
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +81 -0
- package/src/infrastructure/ui/views/summary/components/pricing/Pricing.style.ts +1 -16
- package/src/infrastructure/ui/views/summary/components/pricing/Pricing.tsx +34 -94
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.style.ts +13 -4
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +6 -2
- package/src/infrastructure/ui/components/layouts/layout/Layout.ts +0 -25
- package/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.test.tsx +0 -40
- package/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.tsx +0 -9
- package/src/infrastructure/ui/components/layouts/layout/components/footer/__snapshots__/Footer.test.tsx.snap +0 -36
- package/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.ts +0 -21
- package/src/infrastructure/ui/components/layouts/layout/components/header/Header.test.tsx +0 -26
- package/src/infrastructure/ui/components/layouts/layout/components/header/Header.tsx +0 -10
- package/src/infrastructure/ui/components/layouts/layout/components/header/__snapshots__/Header.test.tsx.snap +0 -45
- package/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.ts +0 -15
- package/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.test.tsx +0 -66
- package/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.tsx +0 -45
- package/src/infrastructure/ui/components/layouts/layout/dummyLayout/__snapshots__/DummyLayout.test.tsx.snap +0 -1349
- package/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.tsx +0 -46
- /package/src/infrastructure/ui/views/summary/components/{pricing → collapsiblePricing}/__snapshots__/Pricing.test.tsx.snap +0 -0
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Text } from "react-native";
|
|
3
|
-
import { render } from "../../../../../test/render";
|
|
4
|
-
import { Header } from "./Header";
|
|
5
|
-
|
|
6
|
-
describe("Header component", () => {
|
|
7
|
-
it("matches the snapshot", () => {
|
|
8
|
-
const { toJSON } = render(
|
|
9
|
-
<Header>
|
|
10
|
-
<Text>Header content</Text>
|
|
11
|
-
</Header>,
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
expect(toJSON()).toMatchSnapshot();
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it("renders correctly", () => {
|
|
18
|
-
const { getByText } = render(
|
|
19
|
-
<Header>
|
|
20
|
-
<Text>Header content</Text>
|
|
21
|
-
</Header>,
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
expect(getByText("Header content")).toBeTruthy();
|
|
25
|
-
});
|
|
26
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React, { FC, ReactNode } from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
|
-
import { style } from "./Header.style";
|
|
4
|
-
|
|
5
|
-
interface HeaderProps {
|
|
6
|
-
readonly children: ReactNode;
|
|
7
|
-
}
|
|
8
|
-
const Header: FC<HeaderProps> = ({ children }) => <View style={style.header}>{children}</View>;
|
|
9
|
-
|
|
10
|
-
export { Header };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Header component matches the snapshot 1`] = `
|
|
4
|
-
<View
|
|
5
|
-
style={
|
|
6
|
-
[
|
|
7
|
-
{
|
|
8
|
-
"backgroundColor": "#FFFFFF",
|
|
9
|
-
"flex": 1,
|
|
10
|
-
},
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
>
|
|
14
|
-
<View
|
|
15
|
-
style={
|
|
16
|
-
[
|
|
17
|
-
{
|
|
18
|
-
"alignSelf": "center",
|
|
19
|
-
"left": 0,
|
|
20
|
-
"marginHorizontal": "auto",
|
|
21
|
-
"position": "absolute",
|
|
22
|
-
"right": 0,
|
|
23
|
-
"top": 0,
|
|
24
|
-
"width": "100%",
|
|
25
|
-
"zIndex": 5,
|
|
26
|
-
},
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
>
|
|
30
|
-
<RCTSafeAreaView />
|
|
31
|
-
</View>
|
|
32
|
-
<View
|
|
33
|
-
style={
|
|
34
|
-
{
|
|
35
|
-
"height": 48,
|
|
36
|
-
"position": "relative",
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
>
|
|
40
|
-
<Text>
|
|
41
|
-
Header content
|
|
42
|
-
</Text>
|
|
43
|
-
</View>
|
|
44
|
-
</View>
|
|
45
|
-
`;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Text, View } from "react-native";
|
|
3
|
-
import { render } from "../../../../test/render";
|
|
4
|
-
import { DummyLayout } from "./DummyLayout";
|
|
5
|
-
|
|
6
|
-
jest.mock("react-router-native", () => ({
|
|
7
|
-
useLocation: () => ({
|
|
8
|
-
pathname: "/",
|
|
9
|
-
}),
|
|
10
|
-
}));
|
|
11
|
-
|
|
12
|
-
describe("DummyLayout component", () => {
|
|
13
|
-
it("matches the snapshot", () => {
|
|
14
|
-
const { toJSON } = render(
|
|
15
|
-
<DummyLayout>
|
|
16
|
-
<Text>DummyLayout content</Text>
|
|
17
|
-
</DummyLayout>,
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
expect(toJSON()).toMatchSnapshot();
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it("renders correctly", () => {
|
|
24
|
-
const { getByText } = render(
|
|
25
|
-
<DummyLayout>
|
|
26
|
-
<Text>DummyLayout content</Text>
|
|
27
|
-
</DummyLayout>,
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
expect(getByText("DummyLayout content")).toBeTruthy();
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it("renders correctly with custom header", () => {
|
|
34
|
-
const { getByText } = render(
|
|
35
|
-
<DummyLayout
|
|
36
|
-
header={
|
|
37
|
-
<View>
|
|
38
|
-
<Text>Custom header</Text>
|
|
39
|
-
</View>
|
|
40
|
-
}
|
|
41
|
-
>
|
|
42
|
-
<Text>DummyLayout content</Text>
|
|
43
|
-
</DummyLayout>,
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
expect(getByText("Custom header")).toBeTruthy();
|
|
47
|
-
expect(getByText("DummyLayout content")).toBeTruthy();
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
it("renders correctly with custom footer", () => {
|
|
51
|
-
const { getByText } = render(
|
|
52
|
-
<DummyLayout
|
|
53
|
-
footer={
|
|
54
|
-
<View>
|
|
55
|
-
<Text>Custom footer</Text>
|
|
56
|
-
</View>
|
|
57
|
-
}
|
|
58
|
-
>
|
|
59
|
-
<Text>DummyLayout content</Text>
|
|
60
|
-
</DummyLayout>,
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
expect(getByText("Custom footer")).toBeTruthy();
|
|
64
|
-
expect(getByText("DummyLayout content")).toBeTruthy();
|
|
65
|
-
});
|
|
66
|
-
});
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/prop-types */
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { View } from "react-native";
|
|
4
|
-
import { GestureHandlerRootView, ScrollView as RNGHScrollView } from "react-native-gesture-handler";
|
|
5
|
-
import { SafeAreaView } from "react-native-safe-area-context";
|
|
6
|
-
import { Footer as DefaultFooter } from "../../../templates/footer/Footer";
|
|
7
|
-
import { DefaultHeader } from "../../../templates/header/defaultHeader/DefaultHeader";
|
|
8
|
-
import { Layout } from "../Layout";
|
|
9
|
-
import { Footer } from "../components/footer/Footer";
|
|
10
|
-
import { Header } from "../components/header/Header";
|
|
11
|
-
import { style } from "./DummyLayout.style";
|
|
12
|
-
|
|
13
|
-
const DummyLayout: Layout = ({
|
|
14
|
-
children,
|
|
15
|
-
header = <DefaultHeader />,
|
|
16
|
-
footer = <DefaultFooter />,
|
|
17
|
-
panel,
|
|
18
|
-
style: customStyle,
|
|
19
|
-
scrollEnabled,
|
|
20
|
-
onLayout,
|
|
21
|
-
}) => (
|
|
22
|
-
<SafeAreaView style={[style.safeAreaView, customStyle?.safeAreaView]}>
|
|
23
|
-
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
24
|
-
<RNGHScrollView
|
|
25
|
-
contentContainerStyle={[style.scrollView, customStyle?.scrollView]}
|
|
26
|
-
scrollEnabled={scrollEnabled}
|
|
27
|
-
scrollEventThrottle={16}
|
|
28
|
-
showsVerticalScrollIndicator={false}
|
|
29
|
-
stickyHeaderIndices={[0]}
|
|
30
|
-
>
|
|
31
|
-
<Header>{header}</Header>
|
|
32
|
-
|
|
33
|
-
{panel}
|
|
34
|
-
|
|
35
|
-
<View style={style.children} onLayout={onLayout}>
|
|
36
|
-
{children}
|
|
37
|
-
</View>
|
|
38
|
-
</RNGHScrollView>
|
|
39
|
-
</GestureHandlerRootView>
|
|
40
|
-
|
|
41
|
-
<Footer>{footer}</Footer>
|
|
42
|
-
</SafeAreaView>
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
export { DummyLayout };
|