@flatbiz/pro-layout 3.0.16 → 4.0.0

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 {
@@ -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
  /**
@@ -185,9 +185,10 @@ export declare type BootstrapOptions = {
185
185
  sidebarThemeConfig?: {
186
186
  bgColor?: string;
187
187
  menuActiveBgColor?: string;
188
+ menuActiveTextColor?: string;
188
189
  menuSelectedBgColor?: string;
189
- color?: string;
190
- activeColor?: string;
190
+ menuSelectedTextColor?: string;
191
+ menuColor?: string;
191
192
  /**
192
193
  * 默认值 16
193
194
  */
@@ -201,11 +202,11 @@ export declare type BootstrapOptions = {
201
202
  * 是否隐藏侧边栏中收缩按键
202
203
  */
203
204
  hideSidebarShrink?: boolean;
205
+ configProviderProps?: ConfigProviderProps;
204
206
  };
205
207
  export declare type LayoutCtxProps = {
206
208
  sidebarWidth: number;
207
209
  componentSize: SizeType;
208
- locale: Locale;
209
210
  routeList: TRouteItemProps[];
210
211
  breads: BreadsData;
211
212
  } & Omit<BootstrapOptions, "sidebarWidth" | "componentSize" | "locale">;
@@ -213,7 +214,7 @@ export interface LeaveMenuProps {
213
214
  leaveMenus?: TMenuItem[];
214
215
  selectedKeys?: string[];
215
216
  }
216
- export declare const bootstrap: (options: BootstrapOptions, callback?: () => void) => void;
217
+ export declare const bootstrap: (options: BootstrapOptions) => void;
217
218
  export declare const Bread: (props: any) => JSX.Element | null;
218
219
  export declare type HistoryBackProps = {
219
220
  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.0",
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,12 @@
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"
57
+ "react-router": "^6.4.4",
58
+ "react-router-dom": "^6.4.4"
59
59
  },
60
- "gitHead": "11b3140bb659694aee609fa334b8a7e7e0b1e531"
60
+ "gitHead": "5381ba2486f8ee1fdfb6ff8957b82166f69a1b0c"
61
61
  }