@regenbio/regenbio-components-react 1.3.33 → 1.3.34

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.
@@ -1,3 +1,5 @@
1
+ import type { Settings as LayoutSettings } from "@ant-design/pro-layout";
2
+ import { RbCurrentTheme, RbCurrentUser } from "../../components/PageLayout/AppLayout/interface";
1
3
  /**
2
4
  * 响应结果传输类
3
5
  */
@@ -64,10 +66,82 @@ export type PageParams = {
64
66
  current?: number;
65
67
  pageSize?: number;
66
68
  };
69
+ /**
70
+ * 全局初始化状态相响应参数
71
+ */
72
+ export type RbInitialStateRespProps = {
73
+ /**
74
+ * 配置信息
75
+ */
76
+ settings?: Partial<LayoutSettings>;
77
+ /**
78
+ * 当前用户信息
79
+ */
80
+ currentUser?: RbCurrentUser;
81
+ /**
82
+ * 当前主题信息
83
+ */
84
+ currentTheme?: RbCurrentTheme;
85
+ /**
86
+ * 加载状态
87
+ */
88
+ loading?: boolean;
89
+ /**
90
+ * 触发远程用户信息的方法
91
+ */
92
+ fetchUserInfo: () => Promise<RbCurrentUser>;
93
+ /**
94
+ * 触发远程主题信息的方法
95
+ */
96
+ fetchThemeInfo: () => Promise<RbCurrentTheme>;
97
+ };
98
+ /**
99
+ * 全局初始化状态相请求参数
100
+ */
101
+ export type RbInitialStateReqProps = {
102
+ /**
103
+ * 当前国际化语言
104
+ */
105
+ locale: string;
106
+ /**
107
+ * 路由
108
+ */
109
+ history: any;
110
+ /**
111
+ * 默认配置
112
+ */
113
+ defaultSettings: Partial<LayoutSettings>;
114
+ /**
115
+ * 登录加载路径
116
+ */
117
+ loginLoadPath: string;
118
+ /**
119
+ * 获取用户初始化详情
120
+ *
121
+ * @param options 参数
122
+ */
123
+ getUserInitDetail: (options?: {
124
+ [p: string]: any;
125
+ }) => Promise<any>;
126
+ /**
127
+ * 获取当前主题详情
128
+ *
129
+ * @param options 参数
130
+ */
131
+ getCurrentThemeDetail: (options?: {
132
+ [p: string]: any;
133
+ }) => Promise<any>;
134
+ /**
135
+ * 获取头像预览URL方法
136
+ *
137
+ * @param guid 头像文件主键ID
138
+ */
139
+ getPreviewUrl: (guid: any) => null | string;
140
+ };
67
141
  /**
68
142
  * 全局参数
69
143
  */
70
- export type globalStateType = {
144
+ export type RbGlobalStateType = {
71
145
  /**
72
146
  * 国际化语言
73
147
  */
@@ -75,5 +149,5 @@ export type globalStateType = {
75
149
  /**
76
150
  * 全局状态
77
151
  */
78
- initialState: any;
152
+ initialState: RbInitialStateRespProps;
79
153
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regenbio/regenbio-components-react",
3
- "version": "1.3.33",
3
+ "version": "1.3.34",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },