@regenbio/regenbio-components-react 1.3.34 → 1.3.36
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/components/DataDisplay/DataChart/hook.d.ts +10 -0
- package/build/components/DataDisplay/DataChart/type.d.ts +2 -1
- package/build/components/DataDisplay/DataTable/type.d.ts +3 -0
- package/build/components/DataDisplay/UserCard/type.d.ts +0 -20
- package/build/components/DataEntry/AttachmentText/type.d.ts +0 -5
- package/build/components/DataEntry/Uploader/SingleImageUploader/type.d.ts +0 -10
- package/build/components/PageLayout/AppLayout/type.d.ts +5 -7
- package/build/index.d.ts +7 -6
- package/build/index.js +3 -3
- package/build/services/hooks/useRbAuthorize.d.ts +7 -0
- package/build/services/hooks/useRbDictionary.d.ts +13 -0
- package/build/services/hooks/useRbValueEnum.d.ts +9 -0
- package/build/services/types/commonType.d.ts +44 -1
- package/package.json +1 -1
- package/build/services/utils/dictUtil.d.ts +0 -14
- package/build/services/utils/renderUtil.d.ts +0 -6
- package/build/services/utils/resourceUtil.d.ts +0 -12
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DictListItem } from "../../index";
|
|
2
|
+
import React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* 字典操作Hook
|
|
5
|
+
*/
|
|
6
|
+
declare const useRbDictionary: () => {
|
|
7
|
+
getDataByType: (type: string) => Promise<DictListItem[]>;
|
|
8
|
+
getTagDataByType: (type: string) => Promise<{
|
|
9
|
+
label: React.ReactNode;
|
|
10
|
+
value: number;
|
|
11
|
+
}[]>;
|
|
12
|
+
};
|
|
13
|
+
export default useRbDictionary;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConstantListItem } from "../../index";
|
|
2
|
+
import { ProSchemaValueEnumType } from "@ant-design/pro-provider";
|
|
3
|
+
/**
|
|
4
|
+
* 值枚举操作Hook
|
|
5
|
+
*/
|
|
6
|
+
declare const useRbValueEnum: () => {
|
|
7
|
+
convertListToMap: (list: ConstantListItem[]) => Map<any, ProSchemaValueEnumType>;
|
|
8
|
+
};
|
|
9
|
+
export default useRbValueEnum;
|
|
@@ -138,16 +138,59 @@ export type RbInitialStateReqProps = {
|
|
|
138
138
|
*/
|
|
139
139
|
getPreviewUrl: (guid: any) => null | string;
|
|
140
140
|
};
|
|
141
|
+
/**
|
|
142
|
+
* 全局方法
|
|
143
|
+
*/
|
|
144
|
+
export type RbGlobalFunctionType = {
|
|
145
|
+
/**
|
|
146
|
+
* 请求字典数据接口
|
|
147
|
+
*
|
|
148
|
+
* @param sign 标识
|
|
149
|
+
* @param options
|
|
150
|
+
*/
|
|
151
|
+
getDictDataByType?: (sign: string, options?: {
|
|
152
|
+
[p: string]: any;
|
|
153
|
+
}) => Promise<any>;
|
|
154
|
+
/**
|
|
155
|
+
* 获取用户详情方法
|
|
156
|
+
*
|
|
157
|
+
* @param id 用户主键ID
|
|
158
|
+
* @param options
|
|
159
|
+
*/
|
|
160
|
+
getUserDetail?: (id: string, options?: {
|
|
161
|
+
[key: string]: any;
|
|
162
|
+
}) => Promise<any>;
|
|
163
|
+
/**
|
|
164
|
+
* 获取预览文件URL地址
|
|
165
|
+
*
|
|
166
|
+
* @param guid 文件主键ID
|
|
167
|
+
*/
|
|
168
|
+
getPreviewUrl?: (guid: any) => null | string;
|
|
169
|
+
/**
|
|
170
|
+
* 获取上传文件URL地址
|
|
171
|
+
*
|
|
172
|
+
* @param configCode 文件编码
|
|
173
|
+
*/
|
|
174
|
+
getUploadUrl?: (configCode: string) => string;
|
|
175
|
+
};
|
|
141
176
|
/**
|
|
142
177
|
* 全局参数
|
|
143
178
|
*/
|
|
144
179
|
export type RbGlobalStateType = {
|
|
145
180
|
/**
|
|
146
|
-
*
|
|
181
|
+
* 国际化配置
|
|
147
182
|
*/
|
|
148
183
|
intl: any;
|
|
149
184
|
/**
|
|
150
185
|
* 全局状态
|
|
151
186
|
*/
|
|
152
187
|
initialState: RbInitialStateRespProps;
|
|
188
|
+
/**
|
|
189
|
+
* 当前国际化语言
|
|
190
|
+
*/
|
|
191
|
+
locale: string;
|
|
192
|
+
/**
|
|
193
|
+
* 公共方法
|
|
194
|
+
*/
|
|
195
|
+
globalFunctions: RbGlobalFunctionType;
|
|
153
196
|
};
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
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,6 +0,0 @@
|
|
|
1
|
-
import { ProSchemaValueEnumType } from '@ant-design/pro-provider';
|
|
2
|
-
import { ConstantListItem } from "../types/commonType";
|
|
3
|
-
declare const _default: {
|
|
4
|
-
convertListToMap: (list: ConstantListItem[], intl: any) => Map<any, ProSchemaValueEnumType>;
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 校验资源是否可用
|
|
3
|
-
*
|
|
4
|
-
* @param sign 标识
|
|
5
|
-
* @param initialState 全局变量
|
|
6
|
-
* @param check 是否检查
|
|
7
|
-
*/
|
|
8
|
-
export declare const checkResource: (sign: string | undefined, initialState: any, check?: boolean) => boolean;
|
|
9
|
-
declare const _default: {
|
|
10
|
-
checkResource: (sign: string | undefined, initialState: any, check?: boolean) => boolean;
|
|
11
|
-
};
|
|
12
|
-
export default _default;
|