@lookiero/checkout 9.8.3 → 9.8.5
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/index.js +1 -1
- package/dist/src/ExpoRoot.js +2 -1
- package/dist/src/infrastructure/ui/Root.d.ts +1 -1
- package/dist/src/infrastructure/ui/Root.js +2 -2
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.d.ts +0 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.js +0 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.d.ts +0 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.js +0 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
- package/src/ExpoRoot.tsx +1 -1
- package/src/infrastructure/ui/Root.tsx +10 -3
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.ts +0 -1
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.tsx +1 -0
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.ts +0 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +1 -0
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const bootstrap = ({ apiUrl, getAuthToken, translations, sentry, kameleoon }) =>
|
|
|
14
14
|
});
|
|
15
15
|
const firstAvailableCheckoutByCustomerId = ({ customerId }) => queryBus(viewFirstAvailableCheckoutByCustomerId({ customerId: customerId }));
|
|
16
16
|
return {
|
|
17
|
-
root: root({ Messaging, I18n, getAuthToken, sentry, kameleoon }),
|
|
17
|
+
root: root({ Messaging, I18n, queryBus, getAuthToken, sentry, kameleoon }),
|
|
18
18
|
firstAvailableCheckoutByCustomerId,
|
|
19
19
|
};
|
|
20
20
|
};
|
package/dist/src/ExpoRoot.js
CHANGED
|
@@ -89,6 +89,7 @@ const I18n = i18n({
|
|
|
89
89
|
const Root = root({
|
|
90
90
|
Messaging,
|
|
91
91
|
I18n,
|
|
92
|
+
queryBus,
|
|
92
93
|
getAuthToken,
|
|
93
94
|
development: false,
|
|
94
95
|
sentry: () => (process.env.EXPO_PUBLIC_APP_VARIANT === "test" ? {} : sentryConfig),
|
|
@@ -109,7 +110,7 @@ const ExpoRoot = () => {
|
|
|
109
110
|
isAccessible === false && React.createElement(Text, { heading: true }, "Checkout is not accessible!"),
|
|
110
111
|
React.createElement(Router, null,
|
|
111
112
|
React.createElement(Routes, null,
|
|
112
|
-
React.createElement(Route, { path: "/checkout/*", element: React.createElement(Root, { basePath: "/checkout", customer: customer, layout: DummyLayout, locale: locale, order: order,
|
|
113
|
+
React.createElement(Route, { path: "/checkout/*", element: React.createElement(Root, { basePath: "/checkout", customer: customer, layout: DummyLayout, locale: locale, order: order, subscription: subscription, useRedirect: useRedirect, onNotAccessible: onNotAccessible }) }),
|
|
113
114
|
React.createElement(Route, { element: React.createElement(Navigate, { to: "/checkout", replace: true }), path: "*" }))))))) : null;
|
|
114
115
|
};
|
|
115
116
|
export { ExpoRoot };
|
|
@@ -13,6 +13,7 @@ import { KameleoonEnvironment } from "../ab-testing/kameleoonEnvironment";
|
|
|
13
13
|
interface RootFunctionArgs {
|
|
14
14
|
readonly Messaging: MessagingRoot;
|
|
15
15
|
readonly I18n: I18n;
|
|
16
|
+
readonly queryBus: QueryBus;
|
|
16
17
|
readonly development?: boolean;
|
|
17
18
|
readonly sentry: () => SentryEnvironment;
|
|
18
19
|
readonly getAuthToken: () => Promise<string>;
|
|
@@ -28,7 +29,6 @@ interface RootProps {
|
|
|
28
29
|
readonly order: Order | undefined;
|
|
29
30
|
readonly subscription: Subscription | undefined;
|
|
30
31
|
readonly layout: Layout;
|
|
31
|
-
readonly queryBus: QueryBus;
|
|
32
32
|
readonly onNotAccessible: () => void;
|
|
33
33
|
readonly onCheckoutSubmitted?: () => void;
|
|
34
34
|
readonly useRedirect: () => Record<string, string>;
|
|
@@ -6,11 +6,11 @@ import { Locale } from "@lookiero/sty-psp-locale";
|
|
|
6
6
|
import { sentryLogger, sentryLoggerHOC } from "@lookiero/sty-psp-logging";
|
|
7
7
|
import { QueryBusProvider } from "./hooks/useQueryBus";
|
|
8
8
|
import { Routing } from "./routing/Routing";
|
|
9
|
-
const root = ({ Messaging, I18n, getAuthToken, development, sentry, kameleoon: kameleoonConfig }) => {
|
|
9
|
+
const root = ({ Messaging, I18n, queryBus, getAuthToken, development, sentry, kameleoon: kameleoonConfig, }) => {
|
|
10
10
|
const logger = sentryLogger(sentry);
|
|
11
11
|
const kameleoon = kameleoonConfig();
|
|
12
12
|
// eslint-disable-next-line react/display-name, react/prop-types
|
|
13
|
-
const Root = ({ basePath, locale = Locale.en_GB, customer, order, subscription, layout,
|
|
13
|
+
const Root = ({ basePath, locale = Locale.en_GB, customer, order, subscription, layout, onNotAccessible, onCheckoutSubmitted, useRedirect, useRoutes = reactRouterUseRoutes, }) => {
|
|
14
14
|
const handleOnI18nError = useCallback((error) => logger.captureException(error), []);
|
|
15
15
|
return (React.createElement(Messaging, { includeReactQueryDevTools: Platform.OS === "web" },
|
|
16
16
|
React.createElement(QueryBusProvider, { queryBus: queryBus },
|
|
@@ -8,7 +8,7 @@ const TextareaCheckoutQuestionItem = ({ checkoutQuestion, checkoutQuestionParent
|
|
|
8
8
|
const placeholderText = useMemo(() => (checkoutQuestion.placeholder ? formatMessage({ id: checkoutQuestion.placeholder }) : ""), [formatMessage, checkoutQuestion.placeholder]);
|
|
9
9
|
const { feedback, onChange } = useCheckoutQuestionFeedbackForId({ id: checkoutQuestionParentId });
|
|
10
10
|
const handleOnChange = useCallback((value) => onChange({ checkoutQuestionId: checkoutQuestionParentId, checkoutQuestionFeedback: value }), [onChange, checkoutQuestionParentId]);
|
|
11
|
-
return (React.createElement(InputField, { label: placeholderText, value: feedback, input: ({ onBlur, onFocus, style }) => (React.createElement(TextInput, { placeholder: placeholderText, style: style, testID: testID, value: feedback, multiline: true, onBlur: onBlur, onChange: handleOnChange, onFocus: onFocus })), style: {
|
|
11
|
+
return (React.createElement(InputField, { label: placeholderText, value: feedback, input: ({ onBlur, onFocus, style }) => (React.createElement(TextInput, { placeholder: placeholderText, style: style, testID: testID, textAlignVertical: "top", value: feedback, multiline: true, onBlur: onBlur, onChange: handleOnChange, onFocus: onFocus })), style: {
|
|
12
12
|
inputField: style.inputField,
|
|
13
13
|
input: { container: style.inputContainer, input: style.input },
|
|
14
14
|
} }));
|
|
@@ -11,7 +11,7 @@ const TextareaReturnQuestionItem = ({ returnQuestion, returnQuestionParent, test
|
|
|
11
11
|
const { feedback, onChange } = useReturnQuestionFeedbackForReturnQuestion({ returnQuestion: returnQuestionParent });
|
|
12
12
|
const handleOnChange = useCallback((value) => onChange({ returnQuestionId: returnQuestionParent.id, returnQuestionFeedback: value }), [onChange, returnQuestionParent.id]);
|
|
13
13
|
return (React.createElement(View, { style: style.wrapper, testID: "textarea-return-question-item" },
|
|
14
|
-
React.createElement(InputField, { label: placeholderText, value: feedback, input: ({ onBlur, onFocus, style }) => (React.createElement(TextInput, { placeholder: placeholderText, style: style, testID: testID, value: feedback, multiline: true, onBlur: onBlur, onChange: handleOnChange, onFocus: onFocus })), style: {
|
|
14
|
+
React.createElement(InputField, { label: placeholderText, value: feedback, input: ({ onBlur, onFocus, style }) => (React.createElement(TextInput, { placeholder: placeholderText, style: style, testID: testID, textAlignVertical: "top", value: feedback, multiline: true, onBlur: onBlur, onChange: handleOnChange, onFocus: onFocus })), style: {
|
|
15
15
|
inputField: style.inputField,
|
|
16
16
|
input: { container: style.inputContainer, input: style.input },
|
|
17
17
|
} })));
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "9.8.
|
|
1
|
+
export declare const VERSION = "9.8.5";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "9.8.
|
|
1
|
+
export const VERSION = "9.8.5";
|
package/index.ts
CHANGED
|
@@ -51,7 +51,7 @@ const bootstrap: BootstrapFunction = ({ apiUrl, getAuthToken, translations, sent
|
|
|
51
51
|
queryBus(viewFirstAvailableCheckoutByCustomerId({ customerId: customerId as string }));
|
|
52
52
|
|
|
53
53
|
return {
|
|
54
|
-
root: root({ Messaging, I18n, getAuthToken, sentry, kameleoon }),
|
|
54
|
+
root: root({ Messaging, I18n, queryBus, getAuthToken, sentry, kameleoon }),
|
|
55
55
|
firstAvailableCheckoutByCustomerId,
|
|
56
56
|
};
|
|
57
57
|
};
|
package/package.json
CHANGED
package/src/ExpoRoot.tsx
CHANGED
|
@@ -110,6 +110,7 @@ const I18n = i18n({
|
|
|
110
110
|
const Root = root({
|
|
111
111
|
Messaging,
|
|
112
112
|
I18n,
|
|
113
|
+
queryBus,
|
|
113
114
|
getAuthToken,
|
|
114
115
|
development: false,
|
|
115
116
|
sentry: () => (process.env.EXPO_PUBLIC_APP_VARIANT === "test" ? ({} as SentryEnvironment) : sentryConfig),
|
|
@@ -144,7 +145,6 @@ const ExpoRoot: FC = () => {
|
|
|
144
145
|
layout={DummyLayout}
|
|
145
146
|
locale={locale}
|
|
146
147
|
order={order}
|
|
147
|
-
queryBus={queryBus}
|
|
148
148
|
subscription={subscription}
|
|
149
149
|
useRedirect={useRedirect}
|
|
150
150
|
onNotAccessible={onNotAccessible}
|
|
@@ -18,6 +18,7 @@ import { Routing } from "./routing/Routing";
|
|
|
18
18
|
interface RootFunctionArgs {
|
|
19
19
|
readonly Messaging: MessagingRoot;
|
|
20
20
|
readonly I18n: I18n;
|
|
21
|
+
readonly queryBus: QueryBus;
|
|
21
22
|
readonly development?: boolean;
|
|
22
23
|
readonly sentry: () => SentryEnvironment;
|
|
23
24
|
readonly getAuthToken: () => Promise<string>;
|
|
@@ -35,14 +36,21 @@ interface RootProps {
|
|
|
35
36
|
readonly order: Order | undefined;
|
|
36
37
|
readonly subscription: Subscription | undefined;
|
|
37
38
|
readonly layout: Layout;
|
|
38
|
-
readonly queryBus: QueryBus;
|
|
39
39
|
readonly onNotAccessible: () => void;
|
|
40
40
|
readonly onCheckoutSubmitted?: () => void;
|
|
41
41
|
readonly useRedirect: () => Record<string, string>;
|
|
42
42
|
readonly useRoutes?: typeof reactRouterUseRoutes;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
const root: RootFunction = ({
|
|
45
|
+
const root: RootFunction = ({
|
|
46
|
+
Messaging,
|
|
47
|
+
I18n,
|
|
48
|
+
queryBus,
|
|
49
|
+
getAuthToken,
|
|
50
|
+
development,
|
|
51
|
+
sentry,
|
|
52
|
+
kameleoon: kameleoonConfig,
|
|
53
|
+
}) => {
|
|
46
54
|
const logger = sentryLogger(sentry);
|
|
47
55
|
const kameleoon = kameleoonConfig();
|
|
48
56
|
|
|
@@ -54,7 +62,6 @@ const root: RootFunction = ({ Messaging, I18n, getAuthToken, development, sentry
|
|
|
54
62
|
order,
|
|
55
63
|
subscription,
|
|
56
64
|
layout,
|
|
57
|
-
queryBus,
|
|
58
65
|
onNotAccessible,
|
|
59
66
|
onCheckoutSubmitted,
|
|
60
67
|
useRedirect,
|