@generaltranslation/react-core 1.0.6 → 1.0.8
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/CHANGELOG.md +14 -0
- package/dist/errors-dir/createErrors.d.ts +4 -0
- package/dist/errors-dir/createErrors.d.ts.map +1 -1
- package/dist/index.cjs.min.cjs +3 -3
- package/dist/index.cjs.min.cjs.map +1 -1
- package/dist/index.esm.min.mjs +3 -3
- package/dist/index.esm.min.mjs.map +1 -1
- package/dist/internal.cjs.min.cjs +3 -3
- package/dist/internal.cjs.min.cjs.map +1 -1
- package/dist/internal.esm.min.mjs +1 -1
- package/dist/internal.esm.min.mjs.map +1 -1
- package/dist/messages/messages.d.ts.map +1 -1
- package/dist/provider/GTProvider.d.ts.map +1 -1
- package/dist/provider/hooks/translation/useCreateInternalUseGTFunction.d.ts +2 -1
- package/dist/provider/hooks/translation/useCreateInternalUseGTFunction.d.ts.map +1 -1
- package/dist/provider/hooks/translation/useCreateInternalUseTranslationsFunction.d.ts +2 -1
- package/dist/provider/hooks/translation/useCreateInternalUseTranslationsFunction.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/messages/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/messages/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAK9D,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAiDpE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;AACrD,wBAAgB,GAAG,CAAC,CAAC,SAAS,MAAM,EAClC,OAAO,EAAE,CAAC,EACV,OAAO,EAAE,wBAAwB,GAChC,MAAM,CAAC;AA4CV;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,IAAI,GAAG,SAAS,EAC3D,UAAU,EAAE,CAAC,GACZ,CAAC,CAKH;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAC5C,CAAC;IACC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,wBAAwB,CAAC,GAC7B,IAAI,CAeP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GTProvider.d.ts","sourceRoot":"","sources":["../../src/provider/GTProvider.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAa9D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,EACR,MAAM,EACN,WAA0B,EAC1B,SAAS,EAAE,UAAoC,EAC/C,SAAS,EAAE,UAAoC,EAC/C,UAA+B,EAC/B,UAAU,EAAE,WAAsC,EAClD,OAA+B,EAC/B,aAA6D,EAC7D,QAA8C,EAC9C,UAAuD,EACvD,cACuC,EACvC,GAAmC,EACnC,gBAAsE,EACtE,MAAM,EAAE,OAAY,EACpB,MAAM,EAAE,OAAO,EACf,cAAc,EACd,gBAAgB,EAChB,QAAoB,EACpB,YAAY,EAAE,aAAoB,EAClC,aAAqC,EACrC,eAAkC,EAClC,kBAAwC,EACxC,cAAgC,EAChC,GAAG,QAAQ,EACZ,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"GTProvider.d.ts","sourceRoot":"","sources":["../../src/provider/GTProvider.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAa9D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,EACR,MAAM,EACN,WAA0B,EAC1B,SAAS,EAAE,UAAoC,EAC/C,SAAS,EAAE,UAAoC,EAC/C,UAA+B,EAC/B,UAAU,EAAE,WAAsC,EAClD,OAA+B,EAC/B,aAA6D,EAC7D,QAA8C,EAC9C,UAAuD,EACvD,cACuC,EACvC,GAAmC,EACnC,gBAAsE,EACtE,MAAM,EAAE,OAAY,EACpB,MAAM,EAAE,OAAO,EACf,cAAc,EACd,gBAAgB,EAChB,QAAoB,EACpB,YAAY,EAAE,aAAoB,EAClC,aAAqC,EACrC,eAAkC,EAClC,kBAAwC,EACxC,cAAgC,EAChC,GAAG,QAAQ,EACZ,EAAE,uBAAuB,2CA+MzB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InlineTranslationOptions, Translations, _Messages } from '../../../types-dir/types';
|
|
2
2
|
import { TranslateIcuCallback } from '../../../types-dir/runtime';
|
|
3
3
|
import { GT } from 'generaltranslation';
|
|
4
|
-
export default function useCreateInternalUseGTFunction({ gt, translations, locale, defaultLocale, translationRequired, developmentApiEnabled, registerIcuForTranslation, }: {
|
|
4
|
+
export default function useCreateInternalUseGTFunction({ gt, translations, locale, defaultLocale, translationRequired, developmentApiEnabled, registerIcuForTranslation, environment, }: {
|
|
5
5
|
gt: GT;
|
|
6
6
|
translations: Translations | null;
|
|
7
7
|
locale: string;
|
|
@@ -9,6 +9,7 @@ export default function useCreateInternalUseGTFunction({ gt, translations, local
|
|
|
9
9
|
translationRequired: boolean;
|
|
10
10
|
developmentApiEnabled: boolean;
|
|
11
11
|
registerIcuForTranslation: TranslateIcuCallback;
|
|
12
|
+
environment: 'development' | 'production' | 'test';
|
|
12
13
|
}): {
|
|
13
14
|
_tFunction: (message: string, options?: InlineTranslationOptions, preloadedTranslations?: Translations) => string;
|
|
14
15
|
_mFunction: <T extends string | null | undefined>(message: T, options?: Record<string, any>, preloadedTranslations?: Translations) => T extends string ? string : T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateInternalUseGTFunction.d.ts","sourceRoot":"","sources":["../../../../src/provider/hooks/translation/useCreateInternalUseGTFunction.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,SAAS,EAEV,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"useCreateInternalUseGTFunction.d.ts","sourceRoot":"","sources":["../../../../src/provider/hooks/translation/useCreateInternalUseGTFunction.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,SAAS,EAEV,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAkBxC,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAC,EACrD,EAAE,EACF,YAAY,EACZ,MAAM,EACN,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,WAAW,GACZ,EAAE;IACD,EAAE,EAAE,EAAE,CAAC;IACP,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,oBAAoB,CAAC;IAChD,WAAW,EAAE,aAAa,GAAG,YAAY,GAAG,MAAM,CAAC;CACpD,GAAG;IACF,UAAU,EAAE,CACV,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,wBAAwB,EAClC,qBAAqB,CAAC,EAAE,YAAY,KACjC,MAAM,CAAC;IACZ,UAAU,EAAE,CAAC,CAAC,SAAS,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9C,OAAO,EAAE,CAAC,EACV,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,qBAAqB,CAAC,EAAE,YAAY,KACjC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC;IACnC,yBAAyB,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,SAAS,CAAC;IAC/D,gBAAgB,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;CACnE,CA4UA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Dictionary, DictionaryTranslationOptions, Translations } from '../../../types-dir/types';
|
|
2
|
+
import { GT } from 'generaltranslation';
|
|
2
3
|
import { TranslateIcuCallback } from '../../../types-dir/runtime';
|
|
3
|
-
export default function useCreateInternalUseTranslationsFunction(dictionary: Dictionary | undefined, dictionaryTranslations: Dictionary | undefined, translations: Translations | null, locale: string, defaultLocale: string, translationRequired: boolean, dialectTranslationRequired: boolean, developmentApiEnabled: boolean, registerIcuForTranslation: TranslateIcuCallback): (id: string, options?: DictionaryTranslationOptions) => string;
|
|
4
|
+
export default function useCreateInternalUseTranslationsFunction(gt: GT, dictionary: Dictionary | undefined, dictionaryTranslations: Dictionary | undefined, translations: Translations | null, locale: string, defaultLocale: string, translationRequired: boolean, dialectTranslationRequired: boolean, developmentApiEnabled: boolean, registerIcuForTranslation: TranslateIcuCallback, environment: 'development' | 'production' | 'test'): (id: string, options?: DictionaryTranslationOptions) => string;
|
|
4
5
|
//# sourceMappingURL=useCreateInternalUseTranslationsFunction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateInternalUseTranslationsFunction.d.ts","sourceRoot":"","sources":["../../../../src/provider/hooks/translation/useCreateInternalUseTranslationsFunction.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,YAAY,EACb,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"useCreateInternalUseTranslationsFunction.d.ts","sourceRoot":"","sources":["../../../../src/provider/hooks/translation/useCreateInternalUseTranslationsFunction.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,YAAY,EACb,MAAM,0BAA0B,CAAC;AAalC,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,CAAC,OAAO,UAAU,wCAAwC,CAC9D,EAAE,EAAE,EAAE,EACN,UAAU,EAAE,UAAU,GAAG,SAAS,EAClC,sBAAsB,EAAE,UAAU,GAAG,SAAS,EAC9C,YAAY,EAAE,YAAY,GAAG,IAAI,EACjC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,OAAO,EAC5B,0BAA0B,EAAE,OAAO,EACnC,qBAAqB,EAAE,OAAO,EAC9B,yBAAyB,EAAE,oBAAoB,EAC/C,WAAW,EAAE,aAAa,GAAG,YAAY,GAAG,MAAM,QAG3C,MAAM,YAAW,4BAA4B,KAAQ,MAAM,CAwJnE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@generaltranslation/react-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "A pure React library for internationalization",
|
|
5
5
|
"main": "./dist/index.cjs.min.cjs",
|
|
6
6
|
"module": "./dist/index.esm.min.mjs",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"react": ">=16.8.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@generaltranslation/supported-locales": "2.0.
|
|
17
|
-
"generaltranslation": "7.
|
|
16
|
+
"@generaltranslation/supported-locales": "2.0.21",
|
|
17
|
+
"generaltranslation": "7.9.0"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|