@flatbiz/pro-layout 3.0.16 → 4.0.1

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/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /// <reference types="prop-types" />
2
2
  /// <reference types="scheduler" />
3
3
 
4
- import { ButtonProps } from 'antd';
4
+ import { ButtonProps, MenuProps } from 'antd';
5
+ import { ConfigProviderProps } from 'antd/es/config-provider';
5
6
  import { SizeType } from 'antd/lib/config-provider/SizeContext';
6
- import { Locale } from 'antd/lib/locale-provider';
7
7
  import { CSSProperties, ComponentType, ReactElement } from 'react';
8
8
 
9
9
  export interface FallbackProps {
@@ -70,7 +70,7 @@ export declare type TAdminUser = null | {
70
70
  };
71
71
  export interface TRouteItemProps {
72
72
  path: string;
73
- element: ReactElement | null;
73
+ element: ReactElement | ComponentType | null;
74
74
  redirect?: string | false;
75
75
  caseSensitive?: boolean;
76
76
  }
@@ -119,7 +119,7 @@ export declare type BootstrapOptions = {
119
119
  /**
120
120
  * @default zhCN
121
121
  */
122
- locale?: Locale;
122
+ locale?: "en" | "zh-cn";
123
123
  /**
124
124
  * 是否禁用顶部菜单
125
125
  */
@@ -156,7 +156,7 @@ export declare type BootstrapOptions = {
156
156
  }) => void;
157
157
  onErrorReset?: (...args: any[]) => void;
158
158
  onSignOut?: (user: TAdminUser, hostUrl: string) => void;
159
- AccountOperateMenus?: (() => JSX.Element) | null;
159
+ accountOperateMenuItems?: MenuProps["items"];
160
160
  onSessionExpired: (user: TAdminUser, hostUrl: string) => void;
161
161
  verifySessionExpired: (err: any) => boolean;
162
162
  /**
@@ -178,16 +178,23 @@ export declare type BootstrapOptions = {
178
178
  hideDefaultBread?: boolean;
179
179
  headerThemeConfig?: {
180
180
  bgColor?: string;
181
- activeBgColor?: string;
182
- color?: string;
183
- activeColor?: string;
181
+ textColor?: string;
182
+ menuActiveBgColor?: string;
183
+ menuActiveTextColor?: string;
184
+ menuSelectedBgColor?: string;
185
+ menuSelectedTextColor?: string;
186
+ menuColor?: string;
187
+ menuTextFontSize?: number;
184
188
  };
185
189
  sidebarThemeConfig?: {
186
190
  bgColor?: string;
187
191
  menuActiveBgColor?: string;
192
+ menuActiveTextColor?: string;
188
193
  menuSelectedBgColor?: string;
189
- color?: string;
190
- activeColor?: string;
194
+ menuSelectedTextColor?: string;
195
+ menuColor?: string;
196
+ menuTextFontSize?: number;
197
+ menuItemHeight?: number;
191
198
  /**
192
199
  * 默认值 16
193
200
  */
@@ -201,11 +208,19 @@ export declare type BootstrapOptions = {
201
208
  * 是否隐藏侧边栏中收缩按键
202
209
  */
203
210
  hideSidebarShrink?: boolean;
211
+ configProviderProps?: ConfigProviderProps;
212
+ /**
213
+ * 配置theme后 sidebarThemeConfig 配置失效
214
+ */
215
+ sidebarMenuConfigProviderProps?: Omit<ConfigProviderProps, "locale">;
216
+ /**
217
+ * 配置theme后 headerThemeConfig 配置失效
218
+ */
219
+ topMenuConfigProviderProps?: Omit<ConfigProviderProps, "locale">;
204
220
  };
205
221
  export declare type LayoutCtxProps = {
206
222
  sidebarWidth: number;
207
223
  componentSize: SizeType;
208
- locale: Locale;
209
224
  routeList: TRouteItemProps[];
210
225
  breads: BreadsData;
211
226
  } & Omit<BootstrapOptions, "sidebarWidth" | "componentSize" | "locale">;
@@ -213,7 +228,7 @@ export interface LeaveMenuProps {
213
228
  leaveMenus?: TMenuItem[];
214
229
  selectedKeys?: string[];
215
230
  }
216
- export declare const bootstrap: (options: BootstrapOptions, callback?: () => void) => void;
231
+ export declare const bootstrap: (options: BootstrapOptions) => void;
217
232
  export declare const Bread: (props: any) => JSX.Element | null;
218
233
  export declare type HistoryBackProps = {
219
234
  breads: BreadsData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/pro-layout",
3
- "version": "3.0.16",
3
+ "version": "4.0.1",
4
4
  "description": "WEB菜单布局",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -32,17 +32,17 @@
32
32
  "enquire.js": "^2.1.6"
33
33
  },
34
34
  "peerDependencies": {
35
- "@ant-design/icons": ">=4.7.0",
35
+ "@ant-design/icons": ">=4.8.0",
36
36
  "@dimjs/lang": ">=1.2.23",
37
37
  "@dimjs/model": ">=1.1.8",
38
38
  "@dimjs/model-react": ">=1.1.8",
39
39
  "@dimjs/utils": ">=1.2.23",
40
40
  "@wove/react": ">=1.2.22",
41
- "antd": "4.22.2",
41
+ "antd": ">=5.0.4",
42
42
  "react": ">=18.2.0",
43
43
  "react-dom": ">=18.2.0",
44
- "react-router": "6.3.0",
45
- "react-router-dom": "6.3.0"
44
+ "react-router": ">=6.4.4",
45
+ "react-router-dom": ">=6.4.4"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@ant-design/icons": "^4.7.0",
@@ -50,12 +50,11 @@
50
50
  "@dimjs/model": "^1.1.8",
51
51
  "@dimjs/model-react": "^1.1.8",
52
52
  "@dimjs/utils": "^1.2.23",
53
- "@wove/react": "^1.2.21",
54
- "antd": "4.22.2",
53
+ "@wove/react": "^1.2.22",
54
+ "antd": "^5.0.4",
55
55
  "react": "18.2.0",
56
56
  "react-dom": "18.2.0",
57
- "react-router": "6.3.0",
58
- "react-router-dom": "6.3.0"
59
- },
60
- "gitHead": "11b3140bb659694aee609fa334b8a7e7e0b1e531"
57
+ "react-router": "^6.4.4",
58
+ "react-router-dom": "^6.4.4"
59
+ }
61
60
  }