@commercetools-frontend/l10n 23.3.0 → 24.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.
@@ -50,7 +50,7 @@ var moment__default = /*#__PURE__*/_interopDefault(moment);
50
50
  var omit__default = /*#__PURE__*/_interopDefault(omit);
51
51
 
52
52
  // NOTE: This string will be replaced on build time with the package version.
53
- var version = "23.3.0";
53
+ var version = "24.0.0";
54
54
 
55
55
  // https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros
56
56
  const supportedLocales = ["en", "de", "es", "fr-FR", "pt-BR"];
@@ -50,7 +50,7 @@ var moment__default = /*#__PURE__*/_interopDefault(moment);
50
50
  var omit__default = /*#__PURE__*/_interopDefault(omit);
51
51
 
52
52
  // NOTE: This string will be replaced on build time with the package version.
53
- var version = "23.3.0";
53
+ var version = "24.0.0";
54
54
 
55
55
  // https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros
56
56
  const supportedLocales = ["en", "de", "es", "fr-FR", "pt-BR"];
@@ -24,7 +24,7 @@ import moment from 'moment-timezone';
24
24
  import omit from 'lodash/omit';
25
25
 
26
26
  // NOTE: This string will be replaced on build time with the package version.
27
- var version = "23.3.0";
27
+ var version = "24.0.0";
28
28
 
29
29
  // https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros
30
30
  const supportedLocales = ["en", "de", "es", "fr-FR", "pt-BR"];
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import PropTypes from 'prop-types';
3
- import type { Countries } from './types';
4
3
  export declare const countriesShape: PropTypes.Requireable<{
5
4
  [x: string]: string | null | undefined;
6
5
  }>;
@@ -10,6 +9,5 @@ export declare const withCountries: <Props extends {}>(mapPropsToLocale: (props:
10
9
  };
11
10
  export declare const useCountries: (locale: string) => {
12
11
  isLoading: boolean;
13
- data: {} | Countries;
14
- error?: Error | undefined;
12
+ data: {};
15
13
  };
@@ -6,12 +6,10 @@ type InjectorOptions<LoadedData extends {}> = {
6
6
  propLoadingKey: string;
7
7
  loadLocale: LoadLocale<LoadedData>;
8
8
  };
9
- type State<Data extends {}> = {
9
+ export declare function createL10NHook<LoadedData extends {}>(loadLocale: LoadLocale<LoadedData>): (locale: string) => {
10
10
  isLoading: boolean;
11
- data: Data | {};
12
- error?: Error;
11
+ data: {};
13
12
  };
14
- export declare function createL10NHook<LoadedData extends {}>(loadLocale: LoadLocale<LoadedData>): (locale: string) => State<LoadedData>;
15
13
  export declare function createL10NInjector<LoadedData extends {}>({ displayName, propKey, propLoadingKey, loadLocale, }: InjectorOptions<LoadedData>): <Props extends {}>(mapPropsToLocale: (props: Props) => string) => (WrappedComponent: ComponentType<Props>) => {
16
14
  (props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
17
15
  displayName: string;
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import PropTypes from 'prop-types';
3
- import type { Currencies } from './types';
4
3
  export declare const currenciesShape: PropTypes.Requireable<{
5
4
  [x: string]: PropTypes.InferProps<{
6
5
  label: PropTypes.Requireable<string>;
@@ -13,6 +12,5 @@ export declare const withCurrencies: <Props extends {}>(mapPropsToLocale: (props
13
12
  };
14
13
  export declare const useCurrencies: (locale: string) => {
15
14
  isLoading: boolean;
16
- data: {} | Currencies;
17
- error?: Error | undefined;
15
+ data: {};
18
16
  };
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import PropTypes from 'prop-types';
3
- import type { Languages } from './types';
4
3
  export declare const languagesShape: PropTypes.Requireable<{
5
4
  [x: string]: PropTypes.InferProps<{
6
5
  country: PropTypes.Requireable<string>;
@@ -13,6 +12,5 @@ export declare const withLanguages: <Props extends {}>(mapPropsToLocale: (props:
13
12
  };
14
13
  export declare const useLanguages: (locale: string) => {
15
14
  isLoading: boolean;
16
- data: {} | Languages;
17
- error?: Error | undefined;
15
+ data: {};
18
16
  };
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import PropTypes from 'prop-types';
3
- import type { TimeZones } from './types';
4
3
  export declare const timeZonesShape: PropTypes.Requireable<{
5
4
  [x: string]: PropTypes.InferProps<{
6
5
  label: PropTypes.Requireable<string>;
@@ -15,6 +14,5 @@ export declare const withTimeZones: <Props extends {}>(mapPropsToLocale: (props:
15
14
  };
16
15
  export declare const useTimeZones: (locale: string) => {
17
16
  isLoading: boolean;
18
- data: {} | TimeZones;
19
- error?: Error | undefined;
17
+ data: {};
20
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/l10n",
3
- "version": "23.3.0",
3
+ "version": "24.0.0",
4
4
  "description": "React bindings to load l10n data",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -33,18 +33,17 @@
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.22.15",
35
35
  "@babel/runtime-corejs3": "^7.22.15",
36
- "@commercetools-frontend/sentry": "23.3.0",
36
+ "@commercetools-frontend/sentry": "24.0.0",
37
37
  "@emotion/react": "^11.14.0",
38
38
  "@types/lodash": "^4.14.198",
39
39
  "@types/prop-types": "^15.7.5",
40
- "@types/react": "^17.0.83",
40
+ "@types/react": "^19.0.3",
41
41
  "lodash": "4.17.21",
42
42
  "moment": "^2.29.4",
43
43
  "moment-timezone": "^0.5.40",
44
44
  "prop-types": "15.8.1"
45
45
  },
46
46
  "devDependencies": {
47
- "@testing-library/react-hooks": "8.0.1",
48
47
  "@types/cldr": "^7.1.4",
49
48
  "@types/jest": "^29.5.4",
50
49
  "@types/prettier": "2.7.3",
@@ -54,11 +53,11 @@
54
53
  "node-fetch": "2.7.0",
55
54
  "prettier": "2.8.8",
56
55
  "prompts": "^2.4.2",
57
- "react": "17.0.2",
56
+ "react": "19.0.0",
58
57
  "rimraf": "5.0.7"
59
58
  },
60
59
  "peerDependencies": {
61
- "react": "17.x"
60
+ "react": "19.x"
62
61
  },
63
62
  "scripts": {
64
63
  "generate-data": "node ./scripts/generate-l10n-data.js"