@tolgee/core 1.4.0 → 1.6.1
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/tolgee.cjs.js +253 -171
- package/dist/tolgee.cjs.js.map +1 -1
- package/dist/tolgee.cjs.min.js +1 -1
- package/dist/tolgee.cjs.min.js.map +1 -1
- package/dist/tolgee.umd.js +253 -171
- package/dist/tolgee.umd.js.map +1 -1
- package/dist/tolgee.umd.min.js +16 -0
- package/dist/tolgee.umd.min.js.map +1 -0
- package/lib/Tolgee.d.ts +5 -3
- package/lib/Tolgee.js +51 -28
- package/lib/Tolgee.js.map +1 -1
- package/lib/TolgeeConfig.d.ts +2 -2
- package/lib/services/TextService.d.ts +3 -3
- package/lib/services/TextService.js +106 -24
- package/lib/services/TextService.js.map +1 -1
- package/lib/services/TranslationService.d.ts +3 -2
- package/lib/services/TranslationService.js +53 -77
- package/lib/services/TranslationService.js.map +1 -1
- package/lib/types.d.ts +18 -2
- package/package.json +2 -2
package/lib/types.d.ts
CHANGED
|
@@ -18,20 +18,36 @@ export interface TextInputElementData {
|
|
|
18
18
|
oldPlaceholder: string;
|
|
19
19
|
placeholderInputs: string[];
|
|
20
20
|
}
|
|
21
|
-
export declare type
|
|
22
|
-
[key: string]: string |
|
|
21
|
+
export declare type TreeTranslationsData = {
|
|
22
|
+
[key: string]: string | TreeTranslationsData;
|
|
23
23
|
};
|
|
24
|
+
export declare type Translations = Record<string, string>;
|
|
24
25
|
export declare type TranslationParams = {
|
|
25
26
|
[key: string]: string | number | bigint;
|
|
26
27
|
};
|
|
28
|
+
export declare type TranslateProps = {
|
|
29
|
+
key: string;
|
|
30
|
+
defaultValue?: string;
|
|
31
|
+
params?: TranslationParams;
|
|
32
|
+
noWrap?: boolean;
|
|
33
|
+
};
|
|
34
|
+
export declare type InstantProps = {
|
|
35
|
+
key: string;
|
|
36
|
+
defaultValue?: string;
|
|
37
|
+
params?: TranslationParams;
|
|
38
|
+
noWrap?: boolean;
|
|
39
|
+
orEmpty?: boolean;
|
|
40
|
+
};
|
|
27
41
|
export declare type KeyAndParams = {
|
|
28
42
|
key: string;
|
|
29
43
|
params: TranslationParams;
|
|
44
|
+
defaultValue?: string;
|
|
30
45
|
};
|
|
31
46
|
export declare type TranslatedWithMetadata = {
|
|
32
47
|
translated: string;
|
|
33
48
|
key: string;
|
|
34
49
|
params: TranslationParams;
|
|
50
|
+
defaultValue: string | undefined;
|
|
35
51
|
};
|
|
36
52
|
export declare type NodeWithMeta = Node & {
|
|
37
53
|
_tolgee: NodeMeta;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tolgee/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Library providing ability to translate messages directly in context of developed application.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "./dist/tolgee.umd.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"tslib": "^2.3.1",
|
|
53
53
|
"typescript": "4.3.5"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "b6e504048631b393729348499f6c2a418880614a",
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
}
|