@etsoo/smarterp-core 1.0.23 → 1.0.25
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/lib/cjs/CoreApp.d.ts +9 -10
- package/lib/cjs/CoreApp.js +1 -1
- package/lib/cjs/dto/app/AppPurchasedQueryData.d.ts +4 -0
- package/lib/cjs/dto/org/OrgReadDto.d.ts +5 -0
- package/lib/mjs/CoreApp.d.ts +9 -10
- package/lib/mjs/CoreApp.js +1 -1
- package/lib/mjs/dto/app/AppPurchasedQueryData.d.ts +4 -0
- package/lib/mjs/dto/org/OrgReadDto.d.ts +5 -0
- package/package.json +7 -7
- package/src/CoreApp.ts +7 -3
- package/src/dto/app/AppPurchasedQueryData.ts +5 -0
- package/src/dto/org/OrgReadDto.ts +6 -0
package/lib/cjs/CoreApp.d.ts
CHANGED
|
@@ -8,6 +8,12 @@ import { AuthApi, IApp, UserIdentifierType } from "@etsoo/appscript";
|
|
|
8
8
|
import { IdentityType } from "./dto/IdentityType";
|
|
9
9
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
10
10
|
import { ListType } from "@etsoo/shared";
|
|
11
|
+
type AppData = {
|
|
12
|
+
id: number;
|
|
13
|
+
appId?: number;
|
|
14
|
+
name: string;
|
|
15
|
+
localName?: string;
|
|
16
|
+
};
|
|
11
17
|
/**
|
|
12
18
|
* Core application interface
|
|
13
19
|
* 核心应用程序接口
|
|
@@ -47,11 +53,7 @@ export interface ICoreApp {
|
|
|
47
53
|
* @param data App data
|
|
48
54
|
* @returns Name
|
|
49
55
|
*/
|
|
50
|
-
getAppName(data:
|
|
51
|
-
id: number;
|
|
52
|
-
name: string;
|
|
53
|
-
localName?: string;
|
|
54
|
-
}): string;
|
|
56
|
+
getAppName(data: AppData): string;
|
|
55
57
|
/**
|
|
56
58
|
* Get user identifier type label
|
|
57
59
|
* 获取用户标识类型标签
|
|
@@ -137,11 +139,7 @@ export declare class CoreApp implements ICoreApp {
|
|
|
137
139
|
* @param data App data
|
|
138
140
|
* @returns Name
|
|
139
141
|
*/
|
|
140
|
-
getAppName(data:
|
|
141
|
-
id: number;
|
|
142
|
-
name: string;
|
|
143
|
-
localName?: string;
|
|
144
|
-
}): string;
|
|
142
|
+
getAppName(data: AppData): string;
|
|
145
143
|
/**
|
|
146
144
|
* Get user identifier type label
|
|
147
145
|
* 获取用户标识类型标签
|
|
@@ -165,3 +163,4 @@ export declare class CoreApp implements ICoreApp {
|
|
|
165
163
|
*/
|
|
166
164
|
getIdentities(identity?: number): ListType[];
|
|
167
165
|
}
|
|
166
|
+
export {};
|
package/lib/cjs/CoreApp.js
CHANGED
|
@@ -90,7 +90,7 @@ class CoreApp {
|
|
|
90
90
|
* @returns Name
|
|
91
91
|
*/
|
|
92
92
|
getAppName(data) {
|
|
93
|
-
return data.localName ?? this.app.get(`app${data.id}`) ?? data.name;
|
|
93
|
+
return (data.localName ?? this.app.get(`app${data.appId ?? data.id}`) ?? data.name);
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* Get user identifier type label
|
package/lib/mjs/CoreApp.d.ts
CHANGED
|
@@ -8,6 +8,12 @@ import { AuthApi, IApp, UserIdentifierType } from "@etsoo/appscript";
|
|
|
8
8
|
import { IdentityType } from "./dto/IdentityType";
|
|
9
9
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
10
10
|
import { ListType } from "@etsoo/shared";
|
|
11
|
+
type AppData = {
|
|
12
|
+
id: number;
|
|
13
|
+
appId?: number;
|
|
14
|
+
name: string;
|
|
15
|
+
localName?: string;
|
|
16
|
+
};
|
|
11
17
|
/**
|
|
12
18
|
* Core application interface
|
|
13
19
|
* 核心应用程序接口
|
|
@@ -47,11 +53,7 @@ export interface ICoreApp {
|
|
|
47
53
|
* @param data App data
|
|
48
54
|
* @returns Name
|
|
49
55
|
*/
|
|
50
|
-
getAppName(data:
|
|
51
|
-
id: number;
|
|
52
|
-
name: string;
|
|
53
|
-
localName?: string;
|
|
54
|
-
}): string;
|
|
56
|
+
getAppName(data: AppData): string;
|
|
55
57
|
/**
|
|
56
58
|
* Get user identifier type label
|
|
57
59
|
* 获取用户标识类型标签
|
|
@@ -137,11 +139,7 @@ export declare class CoreApp implements ICoreApp {
|
|
|
137
139
|
* @param data App data
|
|
138
140
|
* @returns Name
|
|
139
141
|
*/
|
|
140
|
-
getAppName(data:
|
|
141
|
-
id: number;
|
|
142
|
-
name: string;
|
|
143
|
-
localName?: string;
|
|
144
|
-
}): string;
|
|
142
|
+
getAppName(data: AppData): string;
|
|
145
143
|
/**
|
|
146
144
|
* Get user identifier type label
|
|
147
145
|
* 获取用户标识类型标签
|
|
@@ -165,3 +163,4 @@ export declare class CoreApp implements ICoreApp {
|
|
|
165
163
|
*/
|
|
166
164
|
getIdentities(identity?: number): ListType[];
|
|
167
165
|
}
|
|
166
|
+
export {};
|
package/lib/mjs/CoreApp.js
CHANGED
|
@@ -87,7 +87,7 @@ export class CoreApp {
|
|
|
87
87
|
* @returns Name
|
|
88
88
|
*/
|
|
89
89
|
getAppName(data) {
|
|
90
|
-
return data.localName ?? this.app.get(`app${data.id}`) ?? data.name;
|
|
90
|
+
return (data.localName ?? this.app.get(`app${data.appId ?? data.id}`) ?? data.name);
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* Get user identifier type label
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/smarterp-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
4
4
|
"description": "TypeScript APIs for SmartERP Core",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -41,24 +41,24 @@
|
|
|
41
41
|
"homepage": "https://github.com/ETSOO/etsoo-smarterp-core#readme",
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/cli": "^7.26.4",
|
|
44
|
-
"@babel/core": "^7.26.
|
|
45
|
-
"@babel/plugin-transform-runtime": "^7.26.
|
|
44
|
+
"@babel/core": "^7.26.10",
|
|
45
|
+
"@babel/plugin-transform-runtime": "^7.26.10",
|
|
46
46
|
"@babel/preset-env": "^7.26.9",
|
|
47
|
-
"@babel/runtime-corejs3": "^7.26.
|
|
47
|
+
"@babel/runtime-corejs3": "^7.26.10",
|
|
48
48
|
"@types/react": "^18.3.1",
|
|
49
49
|
"@types/react-dom": "^18.3.1",
|
|
50
50
|
"@vitejs/plugin-react": "^4.3.4",
|
|
51
51
|
"jsdom": "^26.0.0",
|
|
52
52
|
"typescript": "^5.8.2",
|
|
53
|
-
"vitest": "^3.0.
|
|
53
|
+
"vitest": "^3.0.8"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@etsoo/appscript": "^1.6.
|
|
56
|
+
"@etsoo/appscript": "^1.6.18",
|
|
57
57
|
"@etsoo/materialui": "^1.4.97",
|
|
58
58
|
"@etsoo/react": "^1.8.32",
|
|
59
59
|
"@etsoo/shared": "^1.2.62",
|
|
60
60
|
"@etsoo/toolpad": "^1.0.19",
|
|
61
|
-
"@mui/material": "^6.4.
|
|
61
|
+
"@mui/material": "^6.4.7",
|
|
62
62
|
"react": "^18.3.1",
|
|
63
63
|
"react-dom": "^18.3.1"
|
|
64
64
|
}
|
package/src/CoreApp.ts
CHANGED
|
@@ -9,6 +9,8 @@ import { IdentityType } from "./dto/IdentityType";
|
|
|
9
9
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
10
10
|
import { DataTypes, ListType } from "@etsoo/shared";
|
|
11
11
|
|
|
12
|
+
type AppData = { id: number; appId?: number; name: string; localName?: string };
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
15
|
* Core application interface
|
|
14
16
|
* 核心应用程序接口
|
|
@@ -55,7 +57,7 @@ export interface ICoreApp {
|
|
|
55
57
|
* @param data App data
|
|
56
58
|
* @returns Name
|
|
57
59
|
*/
|
|
58
|
-
getAppName(data:
|
|
60
|
+
getAppName(data: AppData): string;
|
|
59
61
|
|
|
60
62
|
/**
|
|
61
63
|
* Get user identifier type label
|
|
@@ -168,8 +170,10 @@ export class CoreApp implements ICoreApp {
|
|
|
168
170
|
* @param data App data
|
|
169
171
|
* @returns Name
|
|
170
172
|
*/
|
|
171
|
-
getAppName(data:
|
|
172
|
-
return
|
|
173
|
+
getAppName(data: AppData) {
|
|
174
|
+
return (
|
|
175
|
+
data.localName ?? this.app.get(`app${data.appId ?? data.id}`) ?? data.name
|
|
176
|
+
);
|
|
173
177
|
}
|
|
174
178
|
|
|
175
179
|
/**
|