@lookiero/checkout 11.0.0 → 11.1.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/Expo.js +8 -2
- package/dist/src/ExpoRoot.d.ts +5 -1
- package/dist/src/ExpoRoot.js +10 -6
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -2
- package/src/Expo.tsx +10 -2
- package/src/ExpoRoot.tsx +14 -6
- package/src/infrastructure/ui/views/item/components/itemActions/__snapshots__/ItemActions.test.tsx.snap +8 -0
- package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +8 -0
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +8 -0
package/dist/src/Expo.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { registerRootComponent } from "expo";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { enableLegacyWebImplementation } from "react-native-gesture-handler";
|
|
3
4
|
import "react-native-get-random-values";
|
|
4
|
-
import {
|
|
5
|
+
import { setTheme } from "@lookiero/sty-psp-ui";
|
|
6
|
+
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
5
7
|
enableLegacyWebImplementation(true);
|
|
6
|
-
|
|
8
|
+
const tradename = Tradename.LOOKIERO;
|
|
9
|
+
setTheme({ tradename });
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
11
|
+
const { ExpoRoot } = require("./ExpoRoot");
|
|
12
|
+
registerRootComponent(() => React.createElement(ExpoRoot, { tradename: tradename }));
|
package/dist/src/ExpoRoot.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import "expo/build/Expo.fx";
|
|
2
2
|
import { FC } from "react";
|
|
3
|
-
|
|
3
|
+
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
4
|
+
interface ExpoRootProps {
|
|
5
|
+
readonly tradename: Tradename;
|
|
6
|
+
}
|
|
7
|
+
declare const ExpoRoot: FC<ExpoRootProps>;
|
|
4
8
|
export { ExpoRoot };
|
package/dist/src/ExpoRoot.js
CHANGED
|
@@ -11,7 +11,7 @@ import { PaymentsQueryProvider, setPaymentsBridge } from "@lookiero/payments-fro
|
|
|
11
11
|
import { fetchTranslations, translationExternalEndpoint } from "@lookiero/sty-psp-i18n";
|
|
12
12
|
import { Country, Locale } from "@lookiero/sty-psp-locale";
|
|
13
13
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
14
|
-
import { DummyLayout } from "@lookiero/sty-psp-ui";
|
|
14
|
+
import { DummyLayout, themeByTradename } from "@lookiero/sty-psp-ui";
|
|
15
15
|
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
16
16
|
import { bootstrap as checkoutBootstrap } from "./infrastructure/delivery/bootstrap";
|
|
17
17
|
import { bootstrap as checkoutMockBootstrap } from "./infrastructure/delivery/bootstrap.mock";
|
|
@@ -101,19 +101,23 @@ const Root = root({
|
|
|
101
101
|
sentry: () => (process.env.EXPO_PUBLIC_APP_VARIANT === "test" ? {} : sentryConfig),
|
|
102
102
|
kameleoon: () => kameleoonConfig,
|
|
103
103
|
})({ customerId: customer.customerId });
|
|
104
|
-
const ExpoRoot = () => {
|
|
104
|
+
const ExpoRoot = ({ tradename }) => {
|
|
105
105
|
const [fontsLoaded] = useFonts({
|
|
106
|
-
["AreaInktrap-Semibold"]: require("@lookiero/aurora
|
|
107
|
-
["AreaNormal-Semibold"]: require("@lookiero/aurora
|
|
108
|
-
["AreaNormal-Extrabold"]: require("@lookiero/aurora
|
|
106
|
+
["AreaInktrap-Semibold"]: require("@lookiero/aurora/build/assets/fonts/AreaInktrap-Semibold.otf"),
|
|
107
|
+
["AreaNormal-Semibold"]: require("@lookiero/aurora/build/assets/fonts/AreaNormal-Semibold.otf"),
|
|
108
|
+
["AreaNormal-Extrabold"]: require("@lookiero/aurora/build/assets/fonts/AreaNormal-Extrabold.otf"),
|
|
109
|
+
["OpenSans-Regular"]: require("@lookiero/aurora/build/assets/fonts/OpenSans-Regular.ttf"),
|
|
110
|
+
["OpenSans-Bold"]: require("@lookiero/aurora/build/assets/fonts/OpenSans-Bold.ttf"),
|
|
111
|
+
["DalaFloda-Bold"]: require("@lookiero/aurora/build/assets/fonts/DalaFloda-Bold.otf"),
|
|
109
112
|
auroraicons: require("@lookiero/aurora-iconfont/dist/auroraicons.ttf"),
|
|
110
113
|
});
|
|
111
114
|
const [isAccessible, setIsAccessible] = useState();
|
|
112
115
|
const onNotAccessible = useCallback(() => setIsAccessible(false), []);
|
|
116
|
+
const theme = themeByTradename({ tradename });
|
|
113
117
|
return fontsLoaded ? (React.createElement(PortalProvider, null,
|
|
114
118
|
React.createElement(PaymentsQueryProvider, null,
|
|
115
119
|
React.createElement(EventProvider, null,
|
|
116
|
-
React.createElement(Aurora,
|
|
120
|
+
React.createElement(Aurora, { theme: theme },
|
|
117
121
|
isAccessible === false && React.createElement(Text, { heading: true }, "Checkout is not accessible!"),
|
|
118
122
|
React.createElement(Router, null,
|
|
119
123
|
React.createElement(Routes, null,
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "11.
|
|
1
|
+
export declare const VERSION = "11.1.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "11.
|
|
1
|
+
export const VERSION = "11.1.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lookiero/checkout",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"sideEffects": "false",
|
|
@@ -71,7 +71,6 @@
|
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@gorhom/portal": ">=1.0",
|
|
73
73
|
"@lookiero/aurora": ">=6",
|
|
74
|
-
"@lookiero/aurora-fonts": ">=2",
|
|
75
74
|
"@lookiero/aurora-iconfont": ">=3",
|
|
76
75
|
"@lookiero/event": "^0.3",
|
|
77
76
|
"@lookiero/i18n": ">=2",
|
package/src/Expo.tsx
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { registerRootComponent } from "expo";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { enableLegacyWebImplementation } from "react-native-gesture-handler";
|
|
3
4
|
import "react-native-get-random-values";
|
|
4
|
-
import {
|
|
5
|
+
import { setTheme } from "@lookiero/sty-psp-ui";
|
|
6
|
+
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
5
7
|
|
|
6
8
|
enableLegacyWebImplementation(true);
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
const tradename = Tradename.LOOKIERO;
|
|
11
|
+
setTheme({ tradename });
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
14
|
+
const { ExpoRoot } = require("./ExpoRoot");
|
|
15
|
+
|
|
16
|
+
registerRootComponent(() => <ExpoRoot tradename={tradename} />);
|
package/src/ExpoRoot.tsx
CHANGED
|
@@ -13,7 +13,7 @@ import { fetchTranslations, translationExternalEndpoint } from "@lookiero/sty-ps
|
|
|
13
13
|
import { Country, Locale } from "@lookiero/sty-psp-locale";
|
|
14
14
|
import { SentryEnvironment } from "@lookiero/sty-psp-logging";
|
|
15
15
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
16
|
-
import { DummyLayout } from "@lookiero/sty-psp-ui";
|
|
16
|
+
import { DummyLayout, themeByTradename } from "@lookiero/sty-psp-ui";
|
|
17
17
|
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
18
18
|
import { KameleoonEnvironment } from "./infrastructure/ab-testing/kameleoonEnvironment";
|
|
19
19
|
import { bootstrap as checkoutBootstrap } from "./infrastructure/delivery/bootstrap";
|
|
@@ -123,22 +123,30 @@ const Root = root({
|
|
|
123
123
|
kameleoon: () => kameleoonConfig,
|
|
124
124
|
})({ customerId: customer.customerId });
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
interface ExpoRootProps {
|
|
127
|
+
readonly tradename: Tradename;
|
|
128
|
+
}
|
|
129
|
+
const ExpoRoot: FC<ExpoRootProps> = ({ tradename }) => {
|
|
127
130
|
const [fontsLoaded] = useFonts({
|
|
128
|
-
["AreaInktrap-Semibold"]: require("@lookiero/aurora
|
|
129
|
-
["AreaNormal-Semibold"]: require("@lookiero/aurora
|
|
130
|
-
["AreaNormal-Extrabold"]: require("@lookiero/aurora
|
|
131
|
+
["AreaInktrap-Semibold"]: require("@lookiero/aurora/build/assets/fonts/AreaInktrap-Semibold.otf"),
|
|
132
|
+
["AreaNormal-Semibold"]: require("@lookiero/aurora/build/assets/fonts/AreaNormal-Semibold.otf"),
|
|
133
|
+
["AreaNormal-Extrabold"]: require("@lookiero/aurora/build/assets/fonts/AreaNormal-Extrabold.otf"),
|
|
134
|
+
["OpenSans-Regular"]: require("@lookiero/aurora/build/assets/fonts/OpenSans-Regular.ttf"),
|
|
135
|
+
["OpenSans-Bold"]: require("@lookiero/aurora/build/assets/fonts/OpenSans-Bold.ttf"),
|
|
136
|
+
["DalaFloda-Bold"]: require("@lookiero/aurora/build/assets/fonts/DalaFloda-Bold.otf"),
|
|
131
137
|
auroraicons: require("@lookiero/aurora-iconfont/dist/auroraicons.ttf"),
|
|
132
138
|
});
|
|
133
139
|
|
|
134
140
|
const [isAccessible, setIsAccessible] = useState<boolean>();
|
|
135
141
|
const onNotAccessible = useCallback(() => setIsAccessible(false), []);
|
|
136
142
|
|
|
143
|
+
const theme = themeByTradename({ tradename });
|
|
144
|
+
|
|
137
145
|
return fontsLoaded ? (
|
|
138
146
|
<PortalProvider>
|
|
139
147
|
<PaymentsQueryProvider>
|
|
140
148
|
<EventProvider>
|
|
141
|
-
<Aurora>
|
|
149
|
+
<Aurora theme={theme}>
|
|
142
150
|
{isAccessible === false && <Text heading={true}>Checkout is not accessible!</Text>}
|
|
143
151
|
|
|
144
152
|
<Router>
|
|
@@ -793,6 +793,14 @@ exports[`ItemActions component matches the snapshot 1`] = `
|
|
|
793
793
|
"fontStyle": "normal",
|
|
794
794
|
"fontWeight": "normal",
|
|
795
795
|
"height": 24,
|
|
796
|
+
"letterSpacing": -0.2,
|
|
797
|
+
"lineHeight": 24,
|
|
798
|
+
"minHeight": 24,
|
|
799
|
+
"minWidth": 24,
|
|
800
|
+
"paddingBottom": 0,
|
|
801
|
+
"paddingLeft": 0,
|
|
802
|
+
"paddingRight": 0,
|
|
803
|
+
"paddingTop": 0,
|
|
796
804
|
"width": 24,
|
|
797
805
|
},
|
|
798
806
|
]
|
|
@@ -219,6 +219,14 @@ exports[`SelectField component matches the snapshot 1`] = `
|
|
|
219
219
|
"fontStyle": "normal",
|
|
220
220
|
"fontWeight": "normal",
|
|
221
221
|
"height": 24,
|
|
222
|
+
"letterSpacing": -0.2,
|
|
223
|
+
"lineHeight": 24,
|
|
224
|
+
"minHeight": 24,
|
|
225
|
+
"minWidth": 24,
|
|
226
|
+
"paddingBottom": 0,
|
|
227
|
+
"paddingLeft": 0,
|
|
228
|
+
"paddingRight": 0,
|
|
229
|
+
"paddingTop": 0,
|
|
222
230
|
"width": 24,
|
|
223
231
|
},
|
|
224
232
|
]
|
|
@@ -219,6 +219,14 @@ exports[`SizeWithoutStockModal component matches the snapshot 1`] = `
|
|
|
219
219
|
"fontStyle": "normal",
|
|
220
220
|
"fontWeight": "normal",
|
|
221
221
|
"height": 24,
|
|
222
|
+
"letterSpacing": -0.2,
|
|
223
|
+
"lineHeight": 24,
|
|
224
|
+
"minHeight": 24,
|
|
225
|
+
"minWidth": 24,
|
|
226
|
+
"paddingBottom": 0,
|
|
227
|
+
"paddingLeft": 0,
|
|
228
|
+
"paddingRight": 0,
|
|
229
|
+
"paddingTop": 0,
|
|
222
230
|
"width": 24,
|
|
223
231
|
},
|
|
224
232
|
]
|