@regenbio/regenbio-components-react 1.3.15 → 1.3.17
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/build/index.d.ts +4 -1
- package/build/index.js +3 -3
- package/build/services/enums/storageEnum.d.ts +12 -0
- package/build/services/interfaces/oauth2Interface.d.ts +19 -0
- package/build/services/utils/dictUtil.d.ts +14 -0
- package/build/services/utils/eventUtil.d.ts +3 -0
- package/build/services/utils/requestUtil.d.ts +18 -0
- package/build/services/utils/storageUtil.d.ts +7 -14
- package/package.json +7 -6
|
@@ -10,6 +10,18 @@ declare enum StorageEnum {
|
|
|
10
10
|
* 快捷方式
|
|
11
11
|
*/
|
|
12
12
|
QUICK_METHOD = "REGENBIO_STORAGE_QUICK_METHOD",
|
|
13
|
+
/**
|
|
14
|
+
* 主动登出标记
|
|
15
|
+
*/
|
|
16
|
+
ACTIVE_LOGOUT = "REGENBIO_STORAGE_ACTIVE_LOGOUT",
|
|
17
|
+
/**
|
|
18
|
+
* 外部授权绑定前的路由名称
|
|
19
|
+
*/
|
|
20
|
+
BEFORE_EXTERNAL_BIND_PATHNAME = "REGENBIO_STORAGE_BEFORE_EXTERNAL_BIND_PATHNAME",
|
|
21
|
+
/**
|
|
22
|
+
* 访问令牌
|
|
23
|
+
*/
|
|
24
|
+
ACCESS_TOKEN = "REGENBIO_STORAGE_ACCESS_TOKEN",
|
|
13
25
|
/**
|
|
14
26
|
* 本地语言
|
|
15
27
|
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 令牌实体类
|
|
3
|
+
*/
|
|
4
|
+
export interface TokenDO {
|
|
5
|
+
/** 客户端ID */
|
|
6
|
+
client_id: string;
|
|
7
|
+
/** 用户ID */
|
|
8
|
+
openid: string;
|
|
9
|
+
/** 访问令牌 */
|
|
10
|
+
access_token: string;
|
|
11
|
+
/** 访问令牌超期时间 */
|
|
12
|
+
expires_in: number;
|
|
13
|
+
/** 刷新令牌 */
|
|
14
|
+
refresh_token: string;
|
|
15
|
+
/** 刷新令牌超期时间 */
|
|
16
|
+
refresh_expires_in: number;
|
|
17
|
+
/** 授权范围 */
|
|
18
|
+
scope: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DictListItem } from "../../index";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
getDictData: <T>(type: string, locale: string, getDictDataByType: (sign: string, options?: {
|
|
5
|
+
[p: string]: any;
|
|
6
|
+
}) => Promise<any>) => Promise<DictListItem[]>;
|
|
7
|
+
getDictData4Column: <T>(type: string, locale: string, getDictDataByType: (sign: string, options?: {
|
|
8
|
+
[p: string]: any;
|
|
9
|
+
}) => Promise<any>) => Promise<{
|
|
10
|
+
label: React.ReactNode;
|
|
11
|
+
value: number;
|
|
12
|
+
}[]>;
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import EventEmitter from "eventemitter3";
|
|
2
|
+
import { NoticeType } from "antd/es/message/interface";
|
|
2
3
|
declare const _default: {
|
|
3
4
|
eventEmitter: EventEmitter<string | symbol, any>;
|
|
5
|
+
pushMessageEvent: (level: NoticeType, content: string) => void;
|
|
6
|
+
pushNotificationEvent: (level: NoticeType, config: any) => void;
|
|
4
7
|
};
|
|
5
8
|
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ParamsType } from '@ant-design/pro-provider';
|
|
2
|
+
import { SortOrder } from 'antd/es/table/interface';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
convertPageParam: (func: (any: any) => any, params: ParamsType & {
|
|
5
|
+
pageSize?: number;
|
|
6
|
+
current?: number;
|
|
7
|
+
keyword?: string;
|
|
8
|
+
}, sort: Record<string, SortOrder>, filter: Record<string, (string | number)[] | null>) => Promise<{
|
|
9
|
+
data: any;
|
|
10
|
+
success: boolean;
|
|
11
|
+
total: number;
|
|
12
|
+
}>;
|
|
13
|
+
downloadFile: (url: string | null, filename: string) => void;
|
|
14
|
+
executeLogout: (history: any, loginLoadPath: string) => void;
|
|
15
|
+
getOAuth2Url: (locale: string, theme: "realDark" | "light", gatewayUrl: string, clientConfig: any, redirectRoute?: string) => string;
|
|
16
|
+
getExternalAuthUrl: (authUrl: string, locale: string, theme: "realDark" | "light", externalGuid: string, loginLoadPath: string, userGuid?: string) => string;
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
* 设置快捷方式
|
|
3
|
-
*
|
|
4
|
-
* @param menuList 菜单列表
|
|
5
|
-
* @param clientId 客户端ID
|
|
6
|
-
*/
|
|
7
|
-
export declare const setQuickMethod: (menuList: string[], clientId: string) => void;
|
|
8
|
-
/**
|
|
9
|
-
* 获取快捷方式
|
|
10
|
-
*
|
|
11
|
-
* @return 菜单列表
|
|
12
|
-
* @param clientId 客户端ID
|
|
13
|
-
*/
|
|
14
|
-
export declare const getQuickMethod: (clientId: string) => string[] | undefined;
|
|
1
|
+
import { TokenDO } from "@/interfaces/oauth2Interface";
|
|
15
2
|
declare const _default: {
|
|
16
3
|
setThemeMode: (darkMode: "realDark" | "light") => void;
|
|
17
4
|
getThemeMode: () => "realDark" | "light";
|
|
18
5
|
getLocale: () => string;
|
|
19
6
|
setQuickMethod: (menuList: string[], clientId: string) => void;
|
|
20
7
|
getQuickMethod: (clientId: string) => string[] | undefined;
|
|
8
|
+
setActiveLogout: () => void;
|
|
9
|
+
getActiveLogout: () => boolean;
|
|
10
|
+
setBeforeExternalBindPathname: (pathname: string) => void;
|
|
11
|
+
getBeforeExternalBindPathname: () => string;
|
|
12
|
+
setToken: (token: TokenDO) => void;
|
|
13
|
+
getToken: () => TokenDO | undefined;
|
|
21
14
|
};
|
|
22
15
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regenbio/regenbio-components-react",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.17",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@babel/preset-env": "^7.26.0",
|
|
31
31
|
"@babel/preset-react": "^7.26.3",
|
|
32
32
|
"@types/lodash": "^4.17.13",
|
|
33
|
+
"@types/showdown": "^2.0.6",
|
|
33
34
|
"antd": "^5.22.2",
|
|
34
35
|
"antd-style": "^3.6.1",
|
|
35
36
|
"babel-loader": "^9.2.1",
|
|
@@ -37,22 +38,22 @@
|
|
|
37
38
|
"lodash": "^4.17.21",
|
|
38
39
|
"react": "^18.2.0",
|
|
39
40
|
"react-dom": "^18.2.0",
|
|
41
|
+
"react-mde": "^11.5.0",
|
|
42
|
+
"react-syntax-highlighter": "^15.5.0",
|
|
40
43
|
"rimraf": "^6.0.1",
|
|
44
|
+
"showdown": "^2.1.0",
|
|
41
45
|
"style-loader": "^4.0.0",
|
|
42
46
|
"ts-loader": "^9.5.1",
|
|
43
47
|
"typescript": "^5.7.2",
|
|
44
48
|
"webpack": "^5.97.1",
|
|
45
|
-
"webpack-cli": "^6.0.1"
|
|
46
|
-
"react-mde": "^11.5.0",
|
|
47
|
-
"react-syntax-highlighter": "^15.5.0",
|
|
48
|
-
"showdown": "^2.1.0",
|
|
49
|
-
"@types/showdown": "^2.0.6"
|
|
49
|
+
"webpack-cli": "^6.0.1"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@antv/g2": "^5.2.7",
|
|
53
53
|
"animate.css": "^4.1.1",
|
|
54
54
|
"dexie": "^4.0.11",
|
|
55
55
|
"eventemitter3": "^5.0.1",
|
|
56
|
+
"querystring": "^0.2.1",
|
|
56
57
|
"uuid": "^11.0.3"
|
|
57
58
|
}
|
|
58
59
|
}
|