@regenbio/regenbio-components-react 1.3.34 → 1.3.35

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.
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 值枚举操作Hook
3
+ */
4
+ declare const useAuthorize: () => {
5
+ checkResource: (sign: string | undefined, gap?: boolean) => boolean;
6
+ };
7
+ export default useAuthorize;
@@ -0,0 +1,13 @@
1
+ import { DictListItem } from "../../index";
2
+ import React from "react";
3
+ /**
4
+ * 字典操作Hook
5
+ */
6
+ declare const useDictionary: () => {
7
+ getDataByType: (type: string) => Promise<DictListItem[]>;
8
+ getTagDataByType: (type: string) => Promise<{
9
+ label: React.ReactNode;
10
+ value: number;
11
+ }[]>;
12
+ };
13
+ export default useDictionary;
@@ -0,0 +1,9 @@
1
+ import { ConstantListItem } from "../../index";
2
+ import { ProSchemaValueEnumType } from "@ant-design/pro-provider";
3
+ /**
4
+ * 值枚举操作Hook
5
+ */
6
+ declare const useValueEnum: () => {
7
+ convertListToMap: (list: ConstantListItem[]) => Map<any, ProSchemaValueEnumType>;
8
+ };
9
+ export default useValueEnum;
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@regenbio/regenbio-components-react",
3
- "version": "1.3.34",
3
+ "version": "1.3.35",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -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;