@lookiero/checkout 7.2.0 → 8.0.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/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ComponentType } from "react";
2
2
  import { EndpointFunction } from "@lookiero/i18n";
3
3
  import { translationEndpoint, translationExternalEndpoint } from "@lookiero/sty-psp-i18n";
4
- import { Country } from "@lookiero/sty-psp-locale";
4
+ import { Country, Locale } from "@lookiero/sty-psp-locale";
5
5
  import { SentryEnvironment, SentryLoggerFunctionArgs } from "@lookiero/sty-psp-logging";
6
6
  import { Segment } from "@lookiero/sty-psp-segment";
7
7
  import { CheckoutStatus } from "./src/domain/checkout/model/checkout";
@@ -33,4 +33,4 @@ interface BootstrapFunction {
33
33
  }
34
34
  declare const bootstrap: BootstrapFunction;
35
35
  export { bootstrap, translationEndpoint, translationExternalEndpoint, Country, Segment, CheckoutStatus };
36
- export type { SentryEnvironment, KameleoonEnvironment, Customer, Subscription, Order };
36
+ export type { SentryEnvironment, KameleoonEnvironment, Customer, Subscription, Order, Locale };
@@ -9,7 +9,7 @@ import { EventProvider } from "@lookiero/event";
9
9
  import { i18n } from "@lookiero/i18n-react";
10
10
  import { PaymentsQueryProvider, setPaymentsBridge } from "@lookiero/payments-front";
11
11
  import { fetchTranslations, translationExternalEndpoint } from "@lookiero/sty-psp-i18n";
12
- import { Country } from "@lookiero/sty-psp-locale";
12
+ import { Country, Locale } from "@lookiero/sty-psp-locale";
13
13
  import { Segment } from "@lookiero/sty-psp-segment";
14
14
  import { DummyLayout } from "@lookiero/sty-psp-ui";
15
15
  // import { bootstrap as checkoutMockBootstrap } from "./infrastructure/delivery/bootstrap.mock";
@@ -17,7 +17,7 @@ import { bootstrap as checkoutBootstrap } from "./infrastructure/delivery/bootst
17
17
  import { root } from "./infrastructure/ui/Root";
18
18
  import { Router } from "./infrastructure/ui/routing/router/Router";
19
19
  import { VERSION } from "./version";
20
- const locale = "es-ES";
20
+ const locale = Locale.es_ES;
21
21
  const subscription = "b";
22
22
  const order = {
23
23
  isFirstOrder: false,
@@ -2,13 +2,14 @@
2
2
  import React, { useCallback } from "react";
3
3
  import { Platform } from "react-native";
4
4
  import { useRoutes as reactRouterUseRoutes } from "react-router-native";
5
+ import { Locale } from "@lookiero/sty-psp-locale";
5
6
  import { sentryLogger, sentryLoggerHOC } from "@lookiero/sty-psp-logging";
6
7
  import { Routing } from "./routing/Routing";
7
8
  const root = ({ Messaging, I18n, getAuthToken, development, sentry, kameleoon: kameleoonConfig }) => {
8
9
  const logger = sentryLogger(sentry);
9
10
  const kameleoon = kameleoonConfig();
10
11
  // eslint-disable-next-line react/display-name, react/prop-types
11
- const Root = ({ basePath, locale = "en-GB", customer, order, subscription, layout, onNotAccessible, onCheckoutSubmitted, useRedirect, useRoutes = reactRouterUseRoutes, }) => {
12
+ const Root = ({ basePath, locale = Locale.en_GB, customer, order, subscription, layout, onNotAccessible, onCheckoutSubmitted, useRedirect, useRoutes = reactRouterUseRoutes, }) => {
12
13
  const handleOnI18nError = useCallback((error) => logger.captureException(error), []);
13
14
  return (React.createElement(Messaging, { includeReactQueryDevTools: Platform.OS === "web" },
14
15
  React.createElement(Routing, { I18n: I18n, basePath: basePath, customer: customer, getAuthToken: getAuthToken, kameleoon: kameleoon, layout: layout, locale: locale, order: order, subscription: subscription, useRedirect: useRedirect, useRoutes: useRoutes, onCheckoutSubmitted: onCheckoutSubmitted, onI18nError: development ? undefined : handleOnI18nError, onNotAccessible: onNotAccessible })));
@@ -1 +1 @@
1
- export declare const VERSION = "7.2.0";
1
+ export declare const VERSION = "8.0.0";
@@ -1 +1 @@
1
- export const VERSION = "7.2.0";
1
+ export const VERSION = "8.0.0";
package/index.ts CHANGED
@@ -2,7 +2,7 @@ import { ComponentType } from "react";
2
2
  import { EndpointFunction } from "@lookiero/i18n";
3
3
  import { i18n } from "@lookiero/i18n-react";
4
4
  import { fetchTranslations, translationEndpoint, translationExternalEndpoint } from "@lookiero/sty-psp-i18n";
5
- import { Country } from "@lookiero/sty-psp-locale";
5
+ import { Country, Locale } from "@lookiero/sty-psp-locale";
6
6
  import { SentryEnvironment, SentryLoggerFunctionArgs } from "@lookiero/sty-psp-logging";
7
7
  import { Segment } from "@lookiero/sty-psp-segment";
8
8
  import { CheckoutStatus } from "./src/domain/checkout/model/checkout";
@@ -57,4 +57,4 @@ const bootstrap: BootstrapFunction = ({ apiUrl, getAuthToken, translations, sent
57
57
  };
58
58
 
59
59
  export { bootstrap, translationEndpoint, translationExternalEndpoint, Country, Segment, CheckoutStatus };
60
- export type { SentryEnvironment, KameleoonEnvironment, Customer, Subscription, Order };
60
+ export type { SentryEnvironment, KameleoonEnvironment, Customer, Subscription, Order, Locale };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "7.2.0",
3
+ "version": "8.0.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": "false",
@@ -18,14 +18,14 @@
18
18
  "@lookiero/sty-psp-ab-testing": "^0.2.2",
19
19
  "@lookiero/sty-psp-expo-config": "^0.1.0",
20
20
  "@lookiero/sty-psp-http": "^2.0.0",
21
- "@lookiero/sty-psp-i18n": "^0.1.8",
22
- "@lookiero/sty-psp-locale": "^0.3.0",
21
+ "@lookiero/sty-psp-i18n": "^0.1.9",
22
+ "@lookiero/sty-psp-locale": "^0.4.0",
23
23
  "@lookiero/sty-psp-logging": "^0.2.2",
24
24
  "@lookiero/sty-psp-notifications": "^0.5.8",
25
25
  "@lookiero/sty-psp-react-native": "^0.2.0",
26
26
  "@lookiero/sty-psp-segment": "^0.1.1",
27
27
  "@lookiero/sty-psp-storage": "^0.1.3",
28
- "@lookiero/sty-psp-tracking": "^0.1.7",
28
+ "@lookiero/sty-psp-tracking": "^0.1.8",
29
29
  "@lookiero/sty-psp-ui": "^0.5.5",
30
30
  "@lookiero/sty-psp-ui-settings": "^0.1.1",
31
31
  "@lookiero/sty-psp-units": "^0.1.1",
package/src/ExpoRoot.tsx CHANGED
@@ -24,7 +24,7 @@ import { Order } from "./projection/order/order";
24
24
  import { Subscription } from "./projection/subscription/subscription";
25
25
  import { VERSION } from "./version";
26
26
 
27
- const locale: Locale = "es-ES";
27
+ const locale: Locale = Locale.es_ES;
28
28
  const subscription: Subscription = "b";
29
29
  const order: Order = {
30
30
  isFirstOrder: false,
@@ -46,7 +46,7 @@ const root: RootFunction = ({ Messaging, I18n, getAuthToken, development, sentry
46
46
  // eslint-disable-next-line react/display-name, react/prop-types
47
47
  const Root = ({
48
48
  basePath,
49
- locale = "en-GB",
49
+ locale = Locale.en_GB,
50
50
  customer,
51
51
  order,
52
52
  subscription,