@freelog/tools-lib 0.1.104 → 0.1.107
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/i18n/I18nNext.d.ts +21 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/index.d.ts +2 -1
- package/dist/service-API/i18n.d.ts +8 -0
- package/dist/service-API/index.d.ts +2 -0
- package/dist/service-API/resources.d.ts +1 -1
- package/dist/service-API/storages.d.ts +1 -2
- package/dist/tools-lib.cjs.development.js +966 -267
- package/dist/tools-lib.cjs.development.js.map +1 -1
- package/dist/tools-lib.cjs.production.min.js +1 -1
- package/dist/tools-lib.cjs.production.min.js.map +1 -1
- package/dist/tools-lib.esm.js +966 -268
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/format.d.ts +5 -0
- package/package.json +4 -1
- package/src/i18n/I18nNext.ts +146 -0
- package/src/i18n/index.ts +7 -0
- package/src/index.ts +2 -0
- package/src/service-API/i18n.ts +35 -0
- package/src/service-API/index.ts +2 -0
- package/src/service-API/resources.ts +1 -1
- package/src/service-API/storages.ts +3 -3
- package/src/utils/format.ts +9 -0
- package/src/utils/index.ts +2 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare type LanguageKeyType = 'zh_CN' | 'en_US';
|
|
2
|
+
declare const allLanguage: {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}[];
|
|
6
|
+
declare class I18nNext {
|
|
7
|
+
private _loadingData;
|
|
8
|
+
private _taskQueue;
|
|
9
|
+
private _currentLanguage;
|
|
10
|
+
constructor();
|
|
11
|
+
ready(): Promise<unknown>;
|
|
12
|
+
t(key: string, options?: {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}): string;
|
|
15
|
+
changeLanguage(lng: LanguageKeyType): void;
|
|
16
|
+
getAllLanguage(): typeof allLanguage;
|
|
17
|
+
getCurrentLanguage(): LanguageKeyType;
|
|
18
|
+
private _handleData;
|
|
19
|
+
private _fetchData;
|
|
20
|
+
}
|
|
21
|
+
export default I18nNext;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import * as Event from './events';
|
|
|
12
12
|
import * as Activity from './activities';
|
|
13
13
|
import * as TestQualification from './testQualifications';
|
|
14
14
|
import * as Statistic from './statistics';
|
|
15
|
+
import * as I18n from './i18n';
|
|
15
16
|
declare const FServiceAPI: {
|
|
16
17
|
Node: typeof Node;
|
|
17
18
|
Exhibit: typeof Exhibit;
|
|
@@ -27,5 +28,6 @@ declare const FServiceAPI: {
|
|
|
27
28
|
Activity: typeof Activity;
|
|
28
29
|
TestQualification: typeof TestQualification;
|
|
29
30
|
Statistic: typeof Statistic;
|
|
31
|
+
I18n: typeof I18n;
|
|
30
32
|
};
|
|
31
33
|
export default FServiceAPI;
|
|
@@ -90,7 +90,7 @@ interface UpdateObjectParamsType {
|
|
|
90
90
|
type: string;
|
|
91
91
|
versionRange?: string;
|
|
92
92
|
}[];
|
|
93
|
-
resourceType?: string;
|
|
93
|
+
resourceType?: string[];
|
|
94
94
|
}
|
|
95
95
|
export declare function updateObject({ objectIdOrName, ...params }: UpdateObjectParamsType): Promise<any>;
|
|
96
96
|
interface BatchObjectListParamsType {
|
|
@@ -101,7 +101,6 @@ interface BatchObjectListParamsType {
|
|
|
101
101
|
export declare function batchObjectList(params: BatchObjectListParamsType): Promise<any>;
|
|
102
102
|
interface FilePropertyParamsType {
|
|
103
103
|
sha1: string;
|
|
104
|
-
resourceType: string;
|
|
105
104
|
}
|
|
106
105
|
export declare function fileProperty({ sha1, ...params }: FilePropertyParamsType): Promise<any>;
|
|
107
106
|
interface CycleDependencyCheckParamsType {
|