gt-react 9.2.29-alpha.12 → 9.2.29-alpha.2
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/client.cjs.min.cjs +3 -3
- package/dist/client.d.ts +16 -19
- package/dist/client.esm.min.mjs +3 -3
- package/dist/hooks/useGTClass.d.ts +1 -1
- package/dist/hooks/useGTClass.d.ts.map +1 -1
- package/dist/index.cjs.min.cjs +3 -3
- package/dist/index.esm.min.mjs +3 -3
- package/dist/provider/ClientProvider.d.ts.map +1 -1
- package/dist/provider/GTProvider.d.ts.map +1 -1
- package/dist/provider/hooks/useCreateInternalUseGTFunction.d.ts +2 -2
- package/dist/provider/hooks/useCreateInternalUseGTFunction.d.ts.map +1 -1
- package/dist/provider/hooks/useCreateInternalUseTranslationsFunction.d.ts +2 -2
- package/dist/provider/hooks/useCreateInternalUseTranslationsFunction.d.ts.map +1 -1
- package/dist/provider/hooks/useRuntimeTranslation.d.ts +2 -3
- package/dist/provider/hooks/useRuntimeTranslation.d.ts.map +1 -1
- package/dist/types/context.d.ts +3 -4
- package/dist/types/context.d.ts.map +1 -1
- package/dist/types/runtime.d.ts +3 -5
- package/dist/types/runtime.d.ts.map +1 -1
- package/dist/variables/Currency.d.ts +2 -2
- package/dist/variables/Currency.d.ts.map +1 -1
- package/dist/variables/DateTime.d.ts +2 -2
- package/dist/variables/DateTime.d.ts.map +1 -1
- package/dist/variables/Num.d.ts +2 -2
- package/dist/variables/Num.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/types/context.d.ts
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
import { TranslationsObject, RenderMethod, InlineTranslationOptions, DictionaryTranslationOptions } from './types';
|
2
|
-
import {
|
3
|
-
import
|
2
|
+
import { TranslateContentCallback, TranslateChildrenCallback } from './runtime';
|
3
|
+
import GT from 'generaltranslation';
|
4
4
|
export type GTContextType = {
|
5
5
|
gt: GT;
|
6
|
-
|
7
|
-
registerIcuForTranslation: TranslateIcuCallback;
|
6
|
+
registerContentForTranslation: TranslateContentCallback;
|
8
7
|
registerJsxForTranslation: TranslateChildrenCallback;
|
9
8
|
_internalUseGTFunction: (string: string, options?: InlineTranslationOptions) => string;
|
10
9
|
_internalUseTranslationsFunction: (id: string, options?: DictionaryTranslationOptions) => string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/types/context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AACjB,OAAO,
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/types/context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAChF,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpC,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,EAAE,CAAC;IACP,6BAA6B,EAAE,wBAAwB,CAAC;IACxD,yBAAyB,EAAE,yBAAyB,CAAC;IACrD,sBAAsB,EAAE,CACtB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,wBAAwB,KAC/B,MAAM,CAAC;IACZ,gCAAgC,EAAE,CAChC,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,4BAA4B,KACnC,MAAM,CAAC;IACZ,yBAAyB,EAAE,OAAO,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACxC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,0BAA0B,EAAE,OAAO,CAAC;IACpC,cAAc,EAAE;QAAE,MAAM,EAAE,YAAY,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
package/dist/types/runtime.d.ts
CHANGED
@@ -1,16 +1,14 @@
|
|
1
|
-
import { JsxChildren } from 'generaltranslation/types';
|
2
1
|
import { TranslationSuccess, TranslationLoading, TranslationError } from './types';
|
3
|
-
export type
|
4
|
-
source:
|
2
|
+
export type TranslateContentCallback = (params: {
|
3
|
+
source: any;
|
5
4
|
targetLocale: string;
|
6
5
|
metadata: {
|
7
6
|
hash: string;
|
8
7
|
context?: string;
|
9
8
|
} & Record<string, any>;
|
10
9
|
}) => Promise<TranslationSuccess | TranslationLoading | TranslationError>;
|
11
|
-
export type TranslateI18nextCallback = TranslateIcuCallback;
|
12
10
|
export type TranslateChildrenCallback = (params: {
|
13
|
-
source:
|
11
|
+
source: any;
|
14
12
|
targetLocale: string;
|
15
13
|
metadata: {
|
16
14
|
hash: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/types/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/types/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,wBAAwB,GAAG,CAAC,MAAM,EAAE;IAC9C,MAAM,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpE,KAAK,OAAO,CAAC,kBAAkB,GAAG,kBAAkB,GAAG,gBAAgB,CAAC,CAAC;AAE1E,MAAM,MAAM,yBAAyB,GAAG,CAAC,MAAM,EAAE;IAC/C,MAAM,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpE,KAAK,OAAO,CAAC,kBAAkB,GAAG,kBAAkB,GAAG,gBAAgB,CAAC,CAAC"}
|
@@ -17,12 +17,12 @@ import React from 'react';
|
|
17
17
|
* @returns {JSX.Element} The formatted currency component.
|
18
18
|
*/
|
19
19
|
declare function Currency({ children, currency, locales, options, }: {
|
20
|
-
children: number | string
|
20
|
+
children: number | string;
|
21
21
|
currency?: string;
|
22
22
|
name?: string;
|
23
23
|
locales?: string[];
|
24
24
|
options?: Intl.NumberFormatOptions;
|
25
|
-
}): React.JSX.Element
|
25
|
+
}): React.JSX.Element;
|
26
26
|
declare namespace Currency {
|
27
27
|
var gtTransformation: string;
|
28
28
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../src/variables/Currency.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,QAAgB,EAChB,OAAO,EACP,OAAY,GACb,EAAE;IACD,QAAQ,EAAE,MAAM,GAAG,MAAM,
|
1
|
+
{"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../src/variables/Currency.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,QAAgB,EAChB,OAAO,EACP,OAAY,GACb,EAAE;IACD,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;CACpC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAcpB;kBAzBQ,QAAQ;;;AA8BjB,eAAe,QAAQ,CAAC"}
|
@@ -17,11 +17,11 @@ import React from 'react';
|
|
17
17
|
* @returns {JSX.Element} The formatted date or time component.
|
18
18
|
*/
|
19
19
|
declare function DateTime({ children, locales, options, }: {
|
20
|
-
children: Date
|
20
|
+
children: Date;
|
21
21
|
locales?: string[];
|
22
22
|
name?: string;
|
23
23
|
options?: Intl.DateTimeFormatOptions;
|
24
|
-
}): React.JSX.Element
|
24
|
+
}): React.JSX.Element;
|
25
25
|
declare namespace DateTime {
|
26
26
|
var gtTransformation: string;
|
27
27
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../src/variables/DateTime.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,OAAO,EACP,OAAY,GACb,EAAE;IACD,QAAQ,EAAE,IAAI,
|
1
|
+
{"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../src/variables/DateTime.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,OAAO,EACP,OAAY,GACb,EAAE;IACD,QAAQ,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;CACtC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CASpB;kBAlBQ,QAAQ;;;AAuBjB,eAAe,QAAQ,CAAC"}
|
package/dist/variables/Num.d.ts
CHANGED
@@ -19,11 +19,11 @@ import React from 'react';
|
|
19
19
|
* @returns {JSX.Element} The formatted number component.
|
20
20
|
*/
|
21
21
|
declare function Num({ children, locales, options, }: {
|
22
|
-
children: number | string
|
22
|
+
children: number | string;
|
23
23
|
locales?: string[];
|
24
24
|
options?: Intl.NumberFormatOptions;
|
25
25
|
name?: string;
|
26
|
-
}): React.JSX.Element
|
26
|
+
}): React.JSX.Element;
|
27
27
|
declare namespace Num {
|
28
28
|
var gtTransformation: string;
|
29
29
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Num.d.ts","sourceRoot":"","sources":["../../src/variables/Num.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,GAAG,CAAC,EACX,QAAQ,EACR,OAAO,EACP,OAAY,GACb,EAAE;IACD,QAAQ,EAAE,MAAM,GAAG,MAAM,
|
1
|
+
{"version":3,"file":"Num.d.ts","sourceRoot":"","sources":["../../src/variables/Num.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,GAAG,CAAC,EACX,QAAQ,EACR,OAAO,EACP,OAAY,GACb,EAAE;IACD,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAWpB;kBApBQ,GAAG;;;AAwBZ,eAAe,GAAG,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "gt-react",
|
3
|
-
"version": "9.2.29-alpha.
|
3
|
+
"version": "9.2.29-alpha.2",
|
4
4
|
"description": "A React library for automatic internationalization.",
|
5
5
|
"main": "./dist/index.cjs.min.cjs",
|
6
6
|
"module": "./dist/index.esm.min.mjs",
|
@@ -14,8 +14,8 @@
|
|
14
14
|
"react-dom": ">=16.8.0"
|
15
15
|
},
|
16
16
|
"dependencies": {
|
17
|
-
"@generaltranslation/supported-locales": "^2.0.11-alpha.
|
18
|
-
"generaltranslation": "^7.0.0-alpha.
|
17
|
+
"@generaltranslation/supported-locales": "^2.0.11-alpha.2",
|
18
|
+
"generaltranslation": "^7.0.0-alpha.2"
|
19
19
|
},
|
20
20
|
"scripts": {
|
21
21
|
"patch": "npm version patch",
|