@lookiero/checkout 9.8.3 → 9.8.4

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 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
  };
@@ -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, queryBus: queryBus, subscription: subscription, useRedirect: useRedirect, onNotAccessible: onNotAccessible }) }),
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, queryBus, onNotAccessible, onCheckoutSubmitted, useRedirect, useRoutes = reactRouterUseRoutes, }) => {
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 },
@@ -1 +1 @@
1
- export declare const VERSION = "9.8.3";
1
+ export declare const VERSION = "9.8.4";
@@ -1 +1 @@
1
- export const VERSION = "9.8.3";
1
+ export const VERSION = "9.8.4";
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "9.8.3",
3
+ "version": "9.8.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": "false",
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 = ({ Messaging, I18n, getAuthToken, development, sentry, kameleoon: kameleoonConfig }) => {
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,