@etsoo/smarterp-core 1.0.25 → 1.0.26
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/LICENSE +1 -1
- package/lib/cjs/CoreApp.d.ts +1 -2
- package/lib/cjs/CoreApp.js +2 -3
- package/lib/cjs/components/app/AppSwitchPopover.js +2 -2
- package/lib/cjs/dto/app/AppQueryData.d.ts +1 -1
- package/lib/cjs/dto/app/AppReadDto.d.ts +1 -2
- package/lib/cjs/dto/member/MemberReadDto.d.ts +1 -2
- package/lib/cjs/index.d.ts +0 -1
- package/lib/cjs/index.js +0 -1
- package/lib/cjs/rq/app/AppGetMyRQ.d.ts +1 -1
- package/lib/cjs/rq/app/AppListRQ.d.ts +1 -2
- package/lib/mjs/CoreApp.d.ts +1 -2
- package/lib/mjs/CoreApp.js +1 -2
- package/lib/mjs/components/app/AppSwitchPopover.js +1 -1
- package/lib/mjs/dto/app/AppQueryData.d.ts +1 -1
- package/lib/mjs/dto/app/AppReadDto.d.ts +1 -2
- package/lib/mjs/dto/member/MemberReadDto.d.ts +1 -2
- package/lib/mjs/index.d.ts +0 -1
- package/lib/mjs/index.js +0 -1
- package/lib/mjs/rq/app/AppGetMyRQ.d.ts +1 -1
- package/lib/mjs/rq/app/AppListRQ.d.ts +1 -2
- package/package.json +7 -7
- package/src/CoreApp.ts +6 -2
- package/src/components/app/AppSwitchPopover.tsx +1 -2
- package/src/dto/app/AppQueryData.ts +1 -1
- package/src/dto/app/AppReadDto.ts +1 -2
- package/src/dto/member/MemberReadDto.ts +1 -2
- package/src/index.ts +0 -2
- package/src/rq/app/AppGetMyRQ.ts +1 -1
- package/src/rq/app/AppListRQ.ts +1 -2
- package/lib/cjs/dto/IdentityType.d.ts +0 -21
- package/lib/cjs/dto/IdentityType.js +0 -25
- package/lib/mjs/dto/IdentityType.d.ts +0 -21
- package/lib/mjs/dto/IdentityType.js +0 -22
- package/src/dto/IdentityType.ts +0 -23
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2004-
|
|
3
|
+
Copyright (c) 2004-2025 ETSOO ® (亿速思维 ®), https://etsoo.com, https://etsoo.nz
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/lib/cjs/CoreApp.d.ts
CHANGED
|
@@ -4,8 +4,7 @@ import { OrgApi } from "./OrgApi";
|
|
|
4
4
|
import { AppApi } from "./AppApi";
|
|
5
5
|
import { PublicApi } from "./PublicApi";
|
|
6
6
|
import { UserApi } from "./UserApi";
|
|
7
|
-
import { AuthApi, IApp, UserIdentifierType } from "@etsoo/appscript";
|
|
8
|
-
import { IdentityType } from "./dto/IdentityType";
|
|
7
|
+
import { AuthApi, IApp, IdentityType, UserIdentifierType } from "@etsoo/appscript";
|
|
9
8
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
10
9
|
import { ListType } from "@etsoo/shared";
|
|
11
10
|
type AppData = {
|
package/lib/cjs/CoreApp.js
CHANGED
|
@@ -7,7 +7,6 @@ const AppApi_1 = require("./AppApi");
|
|
|
7
7
|
const PublicApi_1 = require("./PublicApi");
|
|
8
8
|
const UserApi_1 = require("./UserApi");
|
|
9
9
|
const appscript_1 = require("@etsoo/appscript");
|
|
10
|
-
const IdentityType_1 = require("./dto/IdentityType");
|
|
11
10
|
const AuthCodeApi_1 = require("./AuthCodeApi");
|
|
12
11
|
const shared_1 = require("@etsoo/shared");
|
|
13
12
|
/**
|
|
@@ -124,8 +123,8 @@ class CoreApp {
|
|
|
124
123
|
*/
|
|
125
124
|
getIdentities(identity) {
|
|
126
125
|
if (identity == null)
|
|
127
|
-
return this.app.getEnumList(
|
|
128
|
-
return this.app.getEnumList(
|
|
126
|
+
return this.app.getEnumList(appscript_1.IdentityType, "id");
|
|
127
|
+
return this.app.getEnumList(appscript_1.IdentityType, "id", (id, _key) => {
|
|
129
128
|
if ((id & identity) > 0)
|
|
130
129
|
return id;
|
|
131
130
|
});
|
|
@@ -10,7 +10,7 @@ const material_1 = require("@mui/material");
|
|
|
10
10
|
const react_router_dom_1 = require("react-router-dom");
|
|
11
11
|
const materialui_1 = require("@etsoo/materialui");
|
|
12
12
|
const ICoreServiceApp_1 = require("../../ICoreServiceApp");
|
|
13
|
-
const
|
|
13
|
+
const appscript_1 = require("@etsoo/appscript");
|
|
14
14
|
function AppSwitchPopover(props) {
|
|
15
15
|
// Destruct
|
|
16
16
|
const { appName } = props;
|
|
@@ -31,7 +31,7 @@ function AppSwitchPopover(props) {
|
|
|
31
31
|
ml: 0.5,
|
|
32
32
|
whiteSpace: "nowrap",
|
|
33
33
|
cursor: "pointer"
|
|
34
|
-
}, title: labels.switchApp, onClick: (e) => callback(e.currentTarget), children: appName })), loadData: () => app.core.appApi.getMy({ maxItems, identityType:
|
|
34
|
+
}, title: labels.switchApp, onClick: (e) => callback(e.currentTarget), children: appName })), loadData: () => app.core.appApi.getMy({ maxItems, identityType: appscript_1.IdentityType.User }, { showLoading: false }), position: "left", children: (data) => {
|
|
35
35
|
if (data == null)
|
|
36
36
|
return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, {});
|
|
37
37
|
// Remove the current app
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ export * from "./dto/user/AuditHistoryDto";
|
|
|
24
24
|
export * from "./dto/user/DeviceListDto";
|
|
25
25
|
export * from "./dto/user/UserIdentifierData";
|
|
26
26
|
export * from "./dto/user/UserUpdateReadDto";
|
|
27
|
-
export * from "./dto/IdentityType";
|
|
28
27
|
export * from "./i18n/CoreCulture";
|
|
29
28
|
export * from "./rq/app/AppBuyNewRQ";
|
|
30
29
|
export * from "./rq/app/AppBuyRQ";
|
package/lib/cjs/index.js
CHANGED
|
@@ -41,7 +41,6 @@ __exportStar(require("./dto/user/AuditHistoryDto"), exports);
|
|
|
41
41
|
__exportStar(require("./dto/user/DeviceListDto"), exports);
|
|
42
42
|
__exportStar(require("./dto/user/UserIdentifierData"), exports);
|
|
43
43
|
__exportStar(require("./dto/user/UserUpdateReadDto"), exports);
|
|
44
|
-
__exportStar(require("./dto/IdentityType"), exports);
|
|
45
44
|
// i18n
|
|
46
45
|
__exportStar(require("./i18n/CoreCulture"), exports);
|
|
47
46
|
// RQ
|
package/lib/mjs/CoreApp.d.ts
CHANGED
|
@@ -4,8 +4,7 @@ import { OrgApi } from "./OrgApi";
|
|
|
4
4
|
import { AppApi } from "./AppApi";
|
|
5
5
|
import { PublicApi } from "./PublicApi";
|
|
6
6
|
import { UserApi } from "./UserApi";
|
|
7
|
-
import { AuthApi, IApp, UserIdentifierType } from "@etsoo/appscript";
|
|
8
|
-
import { IdentityType } from "./dto/IdentityType";
|
|
7
|
+
import { AuthApi, IApp, IdentityType, UserIdentifierType } from "@etsoo/appscript";
|
|
9
8
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
10
9
|
import { ListType } from "@etsoo/shared";
|
|
11
10
|
type AppData = {
|
package/lib/mjs/CoreApp.js
CHANGED
|
@@ -3,8 +3,7 @@ import { OrgApi } from "./OrgApi";
|
|
|
3
3
|
import { AppApi } from "./AppApi";
|
|
4
4
|
import { PublicApi } from "./PublicApi";
|
|
5
5
|
import { UserApi } from "./UserApi";
|
|
6
|
-
import { AuthApi, UserIdentifierType } from "@etsoo/appscript";
|
|
7
|
-
import { IdentityType } from "./dto/IdentityType";
|
|
6
|
+
import { AuthApi, IdentityType, UserIdentifierType } from "@etsoo/appscript";
|
|
8
7
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
9
8
|
import { DataTypes } from "@etsoo/shared";
|
|
10
9
|
/**
|
|
@@ -4,7 +4,7 @@ import { Button, Stack, Typography } from "@mui/material";
|
|
|
4
4
|
import { useNavigate } from "react-router-dom";
|
|
5
5
|
import { ButtonPopover } from "@etsoo/materialui";
|
|
6
6
|
import { useRequiredAppContext } from "../../ICoreServiceApp";
|
|
7
|
-
import { IdentityType } from "
|
|
7
|
+
import { IdentityType } from "@etsoo/appscript";
|
|
8
8
|
export function AppSwitchPopover(props) {
|
|
9
9
|
// Destruct
|
|
10
10
|
const { appName } = props;
|
package/lib/mjs/index.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ export * from "./dto/user/AuditHistoryDto";
|
|
|
24
24
|
export * from "./dto/user/DeviceListDto";
|
|
25
25
|
export * from "./dto/user/UserIdentifierData";
|
|
26
26
|
export * from "./dto/user/UserUpdateReadDto";
|
|
27
|
-
export * from "./dto/IdentityType";
|
|
28
27
|
export * from "./i18n/CoreCulture";
|
|
29
28
|
export * from "./rq/app/AppBuyNewRQ";
|
|
30
29
|
export * from "./rq/app/AppBuyRQ";
|
package/lib/mjs/index.js
CHANGED
|
@@ -25,7 +25,6 @@ export * from "./dto/user/AuditHistoryDto";
|
|
|
25
25
|
export * from "./dto/user/DeviceListDto";
|
|
26
26
|
export * from "./dto/user/UserIdentifierData";
|
|
27
27
|
export * from "./dto/user/UserUpdateReadDto";
|
|
28
|
-
export * from "./dto/IdentityType";
|
|
29
28
|
// i18n
|
|
30
29
|
export * from "./i18n/CoreCulture";
|
|
31
30
|
// RQ
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/smarterp-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"description": "TypeScript APIs for SmartERP Core",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "tsc -p tsconfig.json && tsc -p tsconfig.cjs.json",
|
|
22
22
|
"test": "vitest",
|
|
23
|
-
"localtest": "set NODE_ENV=local&&
|
|
23
|
+
"localtest": "set NODE_ENV=local&&vitest"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
@@ -50,15 +50,15 @@
|
|
|
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.9"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@etsoo/appscript": "^1.6.
|
|
57
|
-
"@etsoo/materialui": "^1.4.
|
|
58
|
-
"@etsoo/react": "^1.8.
|
|
56
|
+
"@etsoo/appscript": "^1.6.19",
|
|
57
|
+
"@etsoo/materialui": "^1.4.99",
|
|
58
|
+
"@etsoo/react": "^1.8.33",
|
|
59
59
|
"@etsoo/shared": "^1.2.62",
|
|
60
60
|
"@etsoo/toolpad": "^1.0.19",
|
|
61
|
-
"@mui/material": "^6.4.
|
|
61
|
+
"@mui/material": "^6.4.8",
|
|
62
62
|
"react": "^18.3.1",
|
|
63
63
|
"react-dom": "^18.3.1"
|
|
64
64
|
}
|
package/src/CoreApp.ts
CHANGED
|
@@ -4,8 +4,12 @@ import { OrgApi } from "./OrgApi";
|
|
|
4
4
|
import { AppApi } from "./AppApi";
|
|
5
5
|
import { PublicApi } from "./PublicApi";
|
|
6
6
|
import { UserApi } from "./UserApi";
|
|
7
|
-
import {
|
|
8
|
-
|
|
7
|
+
import {
|
|
8
|
+
AuthApi,
|
|
9
|
+
IApp,
|
|
10
|
+
IdentityType,
|
|
11
|
+
UserIdentifierType
|
|
12
|
+
} from "@etsoo/appscript";
|
|
9
13
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
10
14
|
import { DataTypes, ListType } from "@etsoo/shared";
|
|
11
15
|
|
|
@@ -3,9 +3,8 @@ import { Button, Stack, Typography } from "@mui/material";
|
|
|
3
3
|
import { useNavigate } from "react-router-dom";
|
|
4
4
|
import { ButtonPopover } from "@etsoo/materialui";
|
|
5
5
|
import { useRequiredAppContext } from "../../ICoreServiceApp";
|
|
6
|
-
import { IdentityType } from "../../dto/IdentityType";
|
|
7
6
|
import { AppData } from "../../dto/app/AppData";
|
|
8
|
-
import { AuthRequest } from "@etsoo/appscript";
|
|
7
|
+
import { AuthRequest, IdentityType } from "@etsoo/appscript";
|
|
9
8
|
|
|
10
9
|
export type AppSwitchPopoverProps = {
|
|
11
10
|
appName: string;
|
package/src/index.ts
CHANGED
package/src/rq/app/AppGetMyRQ.ts
CHANGED
package/src/rq/app/AppListRQ.ts
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IdentityType = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Identity type
|
|
6
|
-
* 标识类型
|
|
7
|
-
*/
|
|
8
|
-
var IdentityType;
|
|
9
|
-
(function (IdentityType) {
|
|
10
|
-
/**
|
|
11
|
-
* User
|
|
12
|
-
* 用户
|
|
13
|
-
*/
|
|
14
|
-
IdentityType[IdentityType["User"] = 1] = "User";
|
|
15
|
-
/**
|
|
16
|
-
* Customer
|
|
17
|
-
* 客户
|
|
18
|
-
*/
|
|
19
|
-
IdentityType[IdentityType["Customer"] = 2] = "Customer";
|
|
20
|
-
/**
|
|
21
|
-
* Supplier
|
|
22
|
-
* 供应商
|
|
23
|
-
*/
|
|
24
|
-
IdentityType[IdentityType["Supplier"] = 4] = "Supplier";
|
|
25
|
-
})(IdentityType || (exports.IdentityType = IdentityType = {}));
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Identity type
|
|
3
|
-
* 标识类型
|
|
4
|
-
*/
|
|
5
|
-
export var IdentityType;
|
|
6
|
-
(function (IdentityType) {
|
|
7
|
-
/**
|
|
8
|
-
* User
|
|
9
|
-
* 用户
|
|
10
|
-
*/
|
|
11
|
-
IdentityType[IdentityType["User"] = 1] = "User";
|
|
12
|
-
/**
|
|
13
|
-
* Customer
|
|
14
|
-
* 客户
|
|
15
|
-
*/
|
|
16
|
-
IdentityType[IdentityType["Customer"] = 2] = "Customer";
|
|
17
|
-
/**
|
|
18
|
-
* Supplier
|
|
19
|
-
* 供应商
|
|
20
|
-
*/
|
|
21
|
-
IdentityType[IdentityType["Supplier"] = 4] = "Supplier";
|
|
22
|
-
})(IdentityType || (IdentityType = {}));
|
package/src/dto/IdentityType.ts
DELETED