@regenbio/regenbio-components-react 1.3.10 → 1.3.11

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,21 @@
1
+ import { RbAppLayoutProps, RbInitialStateReqProps, RbInitialStateRespProps } from "./type";
2
+ /**
3
+ * 获取初始化数据
4
+ *
5
+ * @see https://umijs.org/zh-CN/plugins/plugin-initial-state
6
+ * @param props 初始化入参
7
+ * @return 初始化结果
8
+ */
9
+ export declare const getInitialState: (props: RbInitialStateReqProps) => Promise<RbInitialStateRespProps>;
10
+ /**
11
+ * 获取样式
12
+ *
13
+ * @param props 入参
14
+ * @return 配置
15
+ */
16
+ export declare const getAppLayout: (props: RbAppLayoutProps) => any;
17
+ declare const _default: {
18
+ getInitialState: (props: RbInitialStateReqProps) => Promise<RbInitialStateRespProps>;
19
+ getAppLayout: (props: RbAppLayoutProps) => any;
20
+ };
21
+ export default _default;
@@ -0,0 +1,122 @@
1
+ import type { Settings as LayoutSettings } from '@ant-design/pro-components';
2
+ import { RbCurrentUser, RbCurrentTheme } from "./interface";
3
+ import React from "react";
4
+ /**
5
+ * 全局初始化状态相请求参数
6
+ */
7
+ export type RbInitialStateReqProps = {
8
+ /**
9
+ * 当前国际化语言
10
+ */
11
+ locale: string;
12
+ /**
13
+ * 路由
14
+ */
15
+ history: any;
16
+ /**
17
+ * 默认配置
18
+ */
19
+ defaultSettings: Partial<LayoutSettings>;
20
+ /**
21
+ * 登录加载路径
22
+ */
23
+ loginLoadPath: string;
24
+ /**
25
+ * 获取用户初始化详情
26
+ *
27
+ * @param options 参数
28
+ */
29
+ getUserInitDetail: (options?: {
30
+ [p: string]: any;
31
+ }) => Promise<any>;
32
+ /**
33
+ * 获取当前主题详情
34
+ *
35
+ * @param options 参数
36
+ */
37
+ getCurrentThemeDetail: (options?: {
38
+ [p: string]: any;
39
+ }) => Promise<any>;
40
+ /**
41
+ * 获取头像预览URL方法
42
+ *
43
+ * @param guid 头像文件主键ID
44
+ */
45
+ getPreviewUrl: (guid: any) => null | string;
46
+ /**
47
+ * 退出登录执行方法
48
+ */
49
+ executeLogout: () => void;
50
+ };
51
+ /**
52
+ * 全局初始化状态相响应参数
53
+ */
54
+ export type RbInitialStateRespProps = {
55
+ /**
56
+ * 配置信息
57
+ */
58
+ settings?: Partial<LayoutSettings>;
59
+ /**
60
+ * 当前用户信息
61
+ */
62
+ currentUser?: RbCurrentUser;
63
+ /**
64
+ * 当前主题信息
65
+ */
66
+ currentTheme?: RbCurrentTheme;
67
+ /**
68
+ * 加载状态
69
+ */
70
+ loading?: boolean;
71
+ /**
72
+ * 触发远程用户信息的方法
73
+ */
74
+ fetchUserInfo?: () => Promise<RbCurrentUser>;
75
+ /**
76
+ * 触发远程主题信息的方法
77
+ */
78
+ fetchThemeInfo: () => Promise<RbCurrentTheme>;
79
+ };
80
+ /**
81
+ * 应用布局属性
82
+ */
83
+ export type RbAppLayoutProps = {
84
+ /**
85
+ * 路由
86
+ */
87
+ history: any;
88
+ /**
89
+ * 登录加载路径
90
+ */
91
+ loginLoadPath: string;
92
+ /**
93
+ * 客户端ID
94
+ */
95
+ clientId: string;
96
+ /**
97
+ * 全局初始化状态
98
+ */
99
+ initialState: RbInitialStateRespProps;
100
+ /**
101
+ * 设置全局初始化状态
102
+ */
103
+ setInitialState: (any: any) => void;
104
+ /**
105
+ * 获取头像预览URL方法
106
+ *
107
+ * @param guid 头像文件主键ID
108
+ */
109
+ getPreviewUrl: (guid: any) => null | string;
110
+ /**
111
+ * 语言组件
112
+ */
113
+ selectLang: React.ReactNode;
114
+ /**
115
+ * 头像名称
116
+ */
117
+ avatarName: React.ReactNode;
118
+ /**
119
+ * 头像下拉
120
+ */
121
+ avatarDropdown: (children: React.ReactNode[]) => React.ReactNode;
122
+ };
package/build/index.d.ts CHANGED
@@ -27,6 +27,8 @@ import { RbMarkdownEditor, RbMarkdownConverter } from "./components/MarkdownEdit
27
27
  import { RbMarkdownEditorProps } from "./components/MarkdownEditor/type";
28
28
  import RbSingleImageUploader from "./components/Uploader/SingleImageUploader";
29
29
  import { RbSingleImageUploaderProps } from "./components/Uploader/SingleImageUploader/type";
30
+ import { getInitialState, getAppLayout } from "./components/AppLayout";
31
+ import { RbInitialStateReqProps, RbInitialStateRespProps, RbAppLayoutProps } from "./components/AppLayout/type";
30
32
  import DbUtil from "./services/utils/dbUtil";
31
33
  import ObjectUtil from "./services/utils/objectUtil";
32
34
  import EventUtil from "./services/utils/eventUtil";
@@ -43,7 +45,7 @@ import StorageEnum from "./services/enums/storageEnum";
43
45
  import CommonConstant from "./services/constants/commonConstant";
44
46
  import IconConstant from "./services/constants/iconConstant";
45
47
  import DbConstant from "./services/constants/dbConstant";
46
- import { RespDTO, ConstantListItem } from "./services/types/commonType";
48
+ import { RespDTO, ConstantListItem, DictListItem, PageParams } from "./services/types/commonType";
47
49
  import zhCN from "./locales/zh-CN";
48
50
  import enUS from "./locales/en-US";
49
51
  export { RbDataTable };
@@ -75,10 +77,13 @@ export { RbMarkdownConverter, RbMarkdownEditor };
75
77
  export type { RbMarkdownEditorProps };
76
78
  export { RbSingleImageUploader };
77
79
  export type { RbSingleImageUploaderProps };
80
+ export { getInitialState, getAppLayout };
81
+ export type { RbInitialStateReqProps, RbInitialStateRespProps, RbAppLayoutProps };
78
82
  export { DbUtil, ObjectUtil, EventUtil, StorageUtil, ResourceUtil, RenderUtil, StringUtil, NumberUtil, RandomUtil, UnicodeUtil, UploadUtil };
79
83
  export { EventEnum, StorageEnum };
80
84
  export { CommonConstant, IconConstant, DbConstant };
81
- export { RespDTO, ConstantListItem };
85
+ export { RespDTO, ConstantListItem, DictListItem, PageParams };
86
+ export type { BaseDO, BaseRelativeDO } from './services/interfaces/commonInterface';
82
87
  export { zhCN, enUS };
83
88
  declare const _default: {
84
89
  RbDataTable: <DataSource, U, ValueType = "text">(props: RbDataTableProps<DataSource, U, ValueType>) => any;