@flatbiz/pro-layout 4.1.3 → 4.1.4

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
@@ -9,6 +9,9 @@ import { NotificationInstance } from 'antd/es/notification/interface';
9
9
  import { SizeType } from 'antd/lib/config-provider/SizeContext';
10
10
  import { CSSProperties, ComponentType, ReactElement } from 'react';
11
11
 
12
+ export type ConfigProviderWrapperProps = Omit<ConfigProviderProps, "locale"> & {
13
+ locale?: "en" | "zh-cn";
14
+ };
12
15
  export interface FallbackProps {
13
16
  error: Error;
14
17
  resetErrorBoundary: (...args: Array<unknown>) => void;
@@ -114,8 +117,10 @@ export type BootstrapOptions = {
114
117
  /**
115
118
  * layout模式
116
119
  * ```
117
- * 1. no-layout 无结构,常用语登录页面
118
- * 2. normal 普通菜单结构
120
+ * 1. no-layout 无结构,常用于登录页面
121
+ * 2. iframe-main iframe main页面
122
+ * 3. iframe-tab iframe tab页面
123
+ * 4. normal 普通路由&刷新页面
119
124
  * ```
120
125
  */
121
126
  layoutMode: "iframe-main" | "iframe-tab" | "normal" | "no-layout";
@@ -247,15 +252,19 @@ export type BootstrapOptions = {
247
252
  * 自定义全局风格
248
253
  * 如果项目通过本地引入源代码的方式,此配置不生效
249
254
  */
250
- configProviderProps?: ConfigProviderProps;
255
+ configProviderProps?: ConfigProviderWrapperProps;
251
256
  /**
252
257
  * 配置theme后 sidebarThemeConfig 配置失效
253
258
  */
254
- sidebarMenuConfigProviderProps?: Omit<ConfigProviderProps, "locale">;
259
+ sidebarMenuConfigProviderProps?: ConfigProviderWrapperProps;
255
260
  /**
256
261
  * 配置theme后 headerThemeConfig 配置失效
257
262
  */
258
- topMenuConfigProviderProps?: Omit<ConfigProviderProps, "locale">;
263
+ topMenuConfigProviderProps?: ConfigProviderWrapperProps;
264
+ /**
265
+ * iframe tab 点击刷新效果,默认:true
266
+ */
267
+ iframeTabClickRefresh?: boolean;
259
268
  };
260
269
  export type LayoutCtxProps = {
261
270
  menus: TMenuItem[];
package/index.js CHANGED
@@ -1,4 +1 @@
1
- 'use strict';
2
-
3
- module.exports = require('./cjs/index.js');
4
- module.exports.default = module.exports;
1
+ export * from './esm/index';
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@flatbiz/pro-layout",
3
- "version": "4.1.3",
3
+ "version": "4.1.4",
4
4
  "description": "WEB菜单布局",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
7
7
  "files": [
8
- "cjs/",
8
+ "esm/",
9
9
  "index.js",
10
10
  "index.d.ts",
11
11
  "README.md",
@@ -32,17 +32,17 @@
32
32
  "enquire.js": "^2.1.6"
33
33
  },
34
34
  "peerDependencies": {
35
- "@ant-design/icons": ">=4.8.0",
36
- "@dimjs/lang": ">=1.2.23",
35
+ "@ant-design/icons": ">=5.0.1",
36
+ "@dimjs/lang": ">=1.2.33",
37
37
  "@dimjs/model": ">=1.1.8",
38
38
  "@dimjs/model-react": ">=1.1.8",
39
- "@dimjs/utils": ">=1.2.23",
39
+ "@dimjs/utils": ">=1.2.33",
40
40
  "@wove/react": ">=1.2.22",
41
- "antd": ">=5.1.3",
41
+ "antd": ">=5.2.1",
42
42
  "react": ">=18.2.0",
43
43
  "react-dom": ">=18.2.0",
44
- "react-router": ">=6.4.5",
45
- "react-router-dom": ">=6.4.5",
44
+ "react-router": ">=6.8.1",
45
+ "react-router-dom": ">=6.8.1",
46
46
  "react-is": ">=18.2.0"
47
47
  },
48
48
  "devDependencies": {
package/cjs/index.css DELETED
@@ -1,508 +0,0 @@
1
- html,
2
- body,
3
- #app,
4
- #app > .ant-app {
5
- height: 100%;
6
- width: 100%;
7
- margin: 0;
8
- }
9
- *,
10
- :after,
11
- :before {
12
- box-sizing: border-box;
13
- }
14
- #app {
15
- background-color: #f9f9f9;
16
- }
17
- .flatbiz-layout {
18
- overflow: auto;
19
- height: 100vh;
20
- position: fixed;
21
- left: 0;
22
- top: 0;
23
- bottom: 0;
24
- right: 0;
25
- display: flex;
26
- flex-direction: row;
27
- }
28
- .flatbiz-layout-main {
29
- display: flex;
30
- overflow: hidden;
31
- flex: 1;
32
- }
33
- .flatbiz-layout-main-content {
34
- flex: 1;
35
- overflow-y: auto;
36
- }
37
- .flatbiz-layout-windows ::-webkit-scrollbar,
38
- .layout-page-windows ::-webkit-scrollbar,
39
- .page-windows ::-webkit-scrollbar {
40
- width: 8px;
41
- height: 8px;
42
- background-color: #eee;
43
- }
44
- .flatbiz-layout-windows ::-webkit-scrollbar-thumb,
45
- .layout-page-windows ::-webkit-scrollbar-thumb,
46
- .page-windows ::-webkit-scrollbar-thumb {
47
- background-color: #cfcfcf;
48
- border-radius: 10px;
49
- }
50
- .flatbiz-layout-windows ::-webkit-scrollbar-thumb:hover,
51
- .layout-page-windows ::-webkit-scrollbar-thumb:hover,
52
- .page-windows ::-webkit-scrollbar-thumb:hover {
53
- background-color: #a8a8a8;
54
- }
55
- .flatbiz-layout-windows ::-webkit-scrollbar-thumb:active,
56
- .layout-page-windows ::-webkit-scrollbar-thumb:active,
57
- .page-windows ::-webkit-scrollbar-thumb:active {
58
- background-color: #787878;
59
- }
60
-
61
- .bread-wrapper {
62
- padding: 6px 15px 6px 8px;
63
- margin-bottom: 10px;
64
- background: #fff;
65
- display: flex;
66
- align-items: center;
67
- justify-content: space-between;
68
- }
69
- .bread-wrapper .bread {
70
- display: inline-block;
71
- }
72
- .bread-wrapper .ant-breadcrumb ol {
73
- padding: 0;
74
- margin: 0;
75
- }
76
- .bread-extend {
77
- flex: 1;
78
- }
79
-
80
- .layout-shrink {
81
- font-size: 18px;
82
- cursor: pointer;
83
- transition: all 0.3s ease-out;
84
- padding: 10px 20px;
85
- display: flex;
86
- align-items: center;
87
- justify-content: center;
88
- }
89
- .sider-bar-shrink {
90
- color: var(--sidebar-menuSelectedTextColor);
91
- background-color: var(--sidebar-bgColor);
92
- box-shadow: 0px 0px 17px rgba(0, 0, 0, 0.1);
93
- }
94
- .sider-bar-shrink:hover {
95
- color: var(--sidebar-menuSelectedBgColor);
96
- }
97
- .header-shrink {
98
- color: var(--header-textColor);
99
- }
100
- .header-shrink:hover {
101
- color: var(--header-menuSelectedBgColor);
102
- }
103
-
104
- .header-account {
105
- line-height: initial;
106
- margin-right: 20px;
107
- cursor: pointer;
108
- height: 100%;
109
- color: unset;
110
- flex-shrink: 0;
111
- }
112
- .header-account:hover {
113
- background: var(--header-menuSelectedBgColor);
114
- color: var(--header-menuSelectedTextColor);
115
- }
116
- .header-account .header-account-wraper {
117
- padding: 0 15px;
118
- height: 100%;
119
- display: flex;
120
- align-items: center;
121
- }
122
- .account-dropdown-overlay {
123
- z-index: 900;
124
- box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.08);
125
- }
126
-
127
- .layout-brand {
128
- position: relative;
129
- height: 64px;
130
- line-height: 64px;
131
- overflow: hidden;
132
- transition: all 0.2s;
133
- color: var(--header-textColor);
134
- background: var(--header-bgColor);
135
- display: flex;
136
- align-items: center;
137
- justify-content: center;
138
- white-space: nowrap;
139
- }
140
- .brand-logo {
141
- background-size: 40px 100%;
142
- width: 40px;
143
- height: 100%;
144
- background-repeat: no-repeat;
145
- background-position: center center;
146
- }
147
- .brand-name {
148
- margin-left: 15px;
149
- font-size: 18px;
150
- white-space: nowrap;
151
- }
152
- .ant-layout-sider-collapsed .layout-brand {
153
- display: block;
154
- overflow: hidden;
155
- }
156
- .ant-layout-sider-collapsed .brand-logo {
157
- width: 60px;
158
- }
159
-
160
- .flatbiz-layout-main-header {
161
- z-index: 1;
162
- background: var(--header-bgColor);
163
- color: var(--header-textColor);
164
- height: 64px;
165
- display: flex;
166
- flex-shrink: 0;
167
- }
168
- .flatbiz-layout-system-name {
169
- display: flex;
170
- align-items: center;
171
- font-size: 18px;
172
- margin-left: 15px;
173
- flex-shrink: 0;
174
- color: unset;
175
- }
176
- .flatbiz-layout-header-fill {
177
- flex: 1;
178
- overflow: hidden;
179
- display: flex;
180
- justify-content: flex-end;
181
- }
182
- .flatbiz-layout-header-fill > .ant-menu {
183
- border-bottom: none;
184
- height: unset;
185
- background: unset;
186
- }
187
- .flatbiz-layout-header-fill > .ant-menu.ant-menu-horizontal {
188
- border-bottom: none;
189
- line-height: inherit;
190
- }
191
- .flatbiz-layout-header-fill > .ant-menu .ant-menu-item {
192
- display: flex;
193
- align-items: center;
194
- border-radius: 0 !important;
195
- }
196
- .flatbiz-layout-header-fill > .ant-menu .ant-menu-item:hover:after {
197
- border: none;
198
- }
199
- .flatbiz-layout-header-fill > .ant-menu .ant-menu-item::after {
200
- bottom: 12px;
201
- border-bottom: 0;
202
- }
203
- .flatbiz-layout-header-fill > .ant-menu .ant-menu-item.ant-menu-item-selected::after {
204
- border: none;
205
- background: var(--header-menuSelectedTextColor);
206
- }
207
- .flatbiz-layout-header-fill > .ant-menu .ant-menu-item.ant-menu-item-active:not(.ant-menu-item-selected) {
208
- background: var(--header-menuActiveBgColor);
209
- }
210
- .flatbiz-layout-header-fill > .ant-menu .ant-menu-item.ant-menu-item-active:not(.ant-menu-item-selected)::after {
211
- border: none;
212
- background: var(--header-menuActiveTextColor);
213
- }
214
- .flatbiz-layout-header-fill > .ant-menu .ant-menu-item-selected:after,
215
- .flatbiz-layout-header-fill > .ant-menu .ant-menu-item-active:after {
216
- height: 3px;
217
- width: 30%;
218
- min-width: 22px;
219
- position: absolute;
220
- bottom: 12px;
221
- left: 50% !important;
222
- transform: translateX(-50%);
223
- border-radius: 3px;
224
- content: '';
225
- }
226
- .flatbiz-layout-header-fill > .ant-menu .ant-menu-overflow-item-rest {
227
- display: flex;
228
- align-items: center;
229
- background-color: transparent !important;
230
- }
231
- .flatbiz-layout-header-fill > .ant-menu .ant-menu-overflow-item-rest .ant-menu-submenu-title {
232
- color: var(--header-textColor) !important;
233
- }
234
- .flatbiz-layout-header-fill > .ant-menu .ant-menu-overflow-item-rest .ant-menu-submenu-title:hover {
235
- color: unset !important;
236
- }
237
- .flatbiz-layout-header-fill > .ant-menu .ant-menu-overflow-item-rest::after {
238
- width: 0;
239
- }
240
- .flatbiz-layout-topmenu {
241
- flex: 1;
242
- overflow: hidden;
243
- }
244
- .flatbiz-layout-main-header-has-menu .flatbiz-layout-header-fill {
245
- justify-content: space-between;
246
- }
247
- .flatbiz-layout-topmenu-overflowed-modal .ant-menu-submenu {
248
- background-color: transparent !important;
249
- }
250
- .flatbiz-layout-topmenu-overflowed-modal .ant-menu-item {
251
- color: #000 !important;
252
- }
253
-
254
- .loader {
255
- background-color: #ffffff;
256
- position: absolute;
257
- top: 0;
258
- bottom: 0;
259
- left: 0;
260
- right: 0;
261
- z-index: 100000;
262
- display: flex;
263
- justify-content: center;
264
- align-items: center;
265
- opacity: 1;
266
- text-align: center;
267
- }
268
- .loader.fullScreen {
269
- position: fixed;
270
- }
271
- .loader .loader-wrapper {
272
- width: 100px;
273
- height: 100px;
274
- display: inline-flex;
275
- flex-direction: column;
276
- justify-content: space-around;
277
- }
278
- .loader .loader-inner {
279
- width: 30px;
280
- height: 30px;
281
- margin: 0 auto;
282
- text-indent: -12345px;
283
- border-top: 2px solid rgba(0, 128, 227, 0.08);
284
- border-right: 2px solid rgba(0, 128, 227, 0.08);
285
- border-bottom: 2px solid rgba(0, 128, 227, 0.08);
286
- border-left: 2px solid rgba(0, 84, 153, 0.7);
287
- border-radius: 50%;
288
- z-index: 100001;
289
- animation: spinner 600ms infinite linear;
290
- }
291
- .loader .loader-text {
292
- width: 100px;
293
- height: 20px;
294
- text-align: center;
295
- font-size: 12px;
296
- letter-spacing: 4px;
297
- color: #0080e3;
298
- }
299
- .loader.hidden {
300
- display: none;
301
- }
302
- @keyframes spinner {
303
- 0% {
304
- transform: rotate(0deg);
305
- }
306
- 100% {
307
- transform: rotate(360deg);
308
- }
309
- }
310
-
311
- .icon-change-show-active .menu-icon-img-active {
312
- display: block;
313
- }
314
- .icon-change-show-active .menu-icon-img {
315
- display: none;
316
- }
317
- .menu-icon-img,
318
- .menu-icon-img-active {
319
- background-size: 100% 100%;
320
- background-repeat: no-repeat;
321
- background-position: left center;
322
- display: none;
323
- width: 16px;
324
- height: 16px;
325
- flex-shrink: 0;
326
- }
327
- .menu-icon-img {
328
- display: block;
329
- }
330
- .flatbiz-layout-sider {
331
- z-index: 10;
332
- display: flex;
333
- height: 100%;
334
- flex-direction: column;
335
- flex: 1 !important;
336
- overflow: hidden;
337
- }
338
- .flatbiz-layout-sider .ant-layout-sider-children {
339
- display: flex;
340
- flex-direction: column;
341
- }
342
- .flatbiz-layout-sider .ant-layout-sider-children > .ant-menu-root {
343
- padding-bottom: 30px;
344
- }
345
- .flatbiz-layout-sider .ant-menu-root {
346
- flex: 1;
347
- overflow-x: hidden;
348
- overflow-y: auto;
349
- }
350
- .flatbiz-layout-sider .ant-menu-title-content {
351
- margin-left: 5px;
352
- }
353
- .flatbiz-layout-sider .ant-menu-item-selected .menu-icon-img-active {
354
- display: block;
355
- }
356
- .flatbiz-layout-sider .ant-menu-item-selected .menu-icon-img {
357
- display: none;
358
- }
359
- .flatbiz-layout-sider .ant-menu-item-active .menu-icon-img-active {
360
- display: block;
361
- }
362
- .flatbiz-layout-sider .ant-menu-item-active .menu-icon-img {
363
- display: none;
364
- }
365
- .flatbiz-layout-sider .ant-menu-submenu-selected .ant-menu-submenu-title .menu-icon-img-active,
366
- .flatbiz-layout-sider .ant-menu-submenu-active .ant-menu-submenu-title .menu-icon-img-active {
367
- display: block;
368
- }
369
- .flatbiz-layout-sider .ant-menu-submenu-selected .ant-menu-submenu-title .menu-icon-img,
370
- .flatbiz-layout-sider .ant-menu-submenu-active .ant-menu-submenu-title .menu-icon-img {
371
- display: none;
372
- }
373
- .ant-menu-root.ant-menu-inline-collapsed > .ant-menu-submenu .ant-menu-submenu-title {
374
- display: flex;
375
- align-items: center;
376
- }
377
- .ant-menu-root.ant-menu-inline-collapsed > .ant-menu-item {
378
- display: flex;
379
- align-items: center;
380
- }
381
- .ant-menu-root.ant-menu-inline-collapsed .menu-icon-img-active + span {
382
- display: none;
383
- }
384
- .menu-icon-wrapper {
385
- display: flex;
386
- align-items: center;
387
- }
388
- .flatbiz-layout-sider-submenu-popup .ant-menu-item-selected .menu-icon-img-active {
389
- display: block;
390
- }
391
- .flatbiz-layout-sider-submenu-popup .ant-menu-item-selected .menu-icon-img {
392
- display: none;
393
- }
394
- .flatbiz-layout-sider-submenu-popup .ant-menu-item-selected .ant-menu-title-content {
395
- color: var(--sidebar-menuSelectedTextColor);
396
- }
397
- .flatbiz-layout-sider-submenu-popup .ant-menu-item-active .menu-icon-img-active {
398
- display: block;
399
- }
400
- .flatbiz-layout-sider-submenu-popup .ant-menu-item-active .menu-icon-img {
401
- display: none;
402
- }
403
- .flatbiz-layout-sider-submenu-popup .ant-menu-item-active .ant-menu-title-content {
404
- color: var(--sidebar-menuSelectedTextColor);
405
- }
406
- .flatbiz-layout-sider-submenu-popup .ant-menu-item {
407
- display: flex !important;
408
- align-items: center !important;
409
- }
410
- .flatbiz-layout-sider-submenu-popup .ant-menu-title-content {
411
- margin-left: 5px;
412
- color: rgba(0, 0, 0, 0.88);
413
- }
414
-
415
- .iframe-tabs {
416
- background-color: #fff;
417
- }
418
- .iframe-tabs .ant-tabs-tab {
419
- margin: 0 !important;
420
- border: none !important;
421
- border-right: 1px solid #f2f4f8 !important;
422
- border-bottom: none !important;
423
- background-color: #fff !important;
424
- border-radius: 0 !important;
425
- height: 38px;
426
- padding: 0 16px !important;
427
- }
428
- .iframe-tabs .ant-tabs-tab.ant-tabs-tab-active {
429
- background-color: #f2f4f8 !important;
430
- border-bottom: none !important;
431
- }
432
- .iframe-tabs .ant-tabs-tab-btn {
433
- margin: 0 auto;
434
- }
435
- .iframe-tabs .ant-tabs-tab-remove {
436
- display: flex;
437
- margin-left: 0;
438
- padding-right: 0;
439
- }
440
- .iframe-tabs .tab-icon {
441
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAV5JREFUWEftVTtSwzAQfZuchJqL2KGJDAMFyKkIDZ+GUJGZDNDwafg0QGUbCpjBdkPsg3AALoKXUUhsF8YfKNRYnaTdt2/falcEzYs0x0dLoFWgVaBSAeftfdLtdtaY6UQK47VO23pBvE7g868kcQarK5Myn0oCT2H0wYxlBdIB2ZvC8MoAvTC2wewoGwI+t4S59C8CKhuAXxYgzDy0rd5jEagXREMA99kdbVSpVqmAAnsOYpmA3RzwnhTGXZ6E60f7RLhOz4gGsm/kfIp1qEVAubr+dJuIHrIAPJL93pXae340AuEiF2JHCjOzLalBbQKzQEG8C/BtWg5gPK/1aVYiHNiWeVPnsc5965r+2Hnh9BBMl4VejCNpmcV3v4RppMACww2iYwLSrNU5A2NbmGfN0pl1SvOllYDWEmh9hFrbUOsg0j6KtX9G2r/j5lOimcefBlGzEOXWLYFWgVaBb9EEtCFLbAZ7AAAAAElFTkSuQmCC);
442
- background-size: 100% 100%;
443
- height: 16px;
444
- width: 16px;
445
- display: inline-block;
446
- border-radius: 100%;
447
- }
448
- .iframe-tabs .tab-icon:hover {
449
- background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAASdJREFUWEftljtOBDEQRF8dhZjrIIhYIpaET8ISsRICEj4JCwkQARGchwNwk0KWvFJrNcN4dpCcjKORu11dXW13j6i8VDk+I4FRgVGBTgVsXwBbwKWkr5Jna3sbuAHeJKXzrauEwDewmREmkj7+ArQ9SYGzz4+kjaEEUjafAWQq6bUJ1PYUeA62nS7VOhVIYLZ3gfcAfCTpKZKwfQw8hL09SfFMoxBFBDKJfeAloMwk3WfbDLgNtgNJ0Xf9O7CS5SHwGPbm+fsq7J1IWpRc1uRTrMAS0PYpcNcS4ExSm21YCVaUOAdi1sk8l3RdmvnSr7cCueb1CFQtge16l9B2vWdYtRHlwVKvFduuPozqjuO+jaWv/1qNqG+QQf8D/xmsCWtUYFSgugK/gSWEIdTkUcAAAAAASUVORK5CYII=');
450
- background-size: 100% 100%;
451
- background-color: #f96868;
452
- }
453
- .iframe-tabs .ant-tabs-nav {
454
- margin: 0 !important;
455
- border-bottom: 1px solid #f2f4f8;
456
- }
457
- .iframe-tabs .ant-tabs-nav::before {
458
- border: none !important;
459
- }
460
- .iframe-tabs .ant-tabs-content {
461
- height: 100%;
462
- }
463
- .iframe-tabs .ant-tabs-extra-content {
464
- margin-right: 20px;
465
- }
466
- .iframe-tabs .menu-tabs-operate {
467
- width: 24px;
468
- text-align: center;
469
- }
470
-
471
- .layout-page-wrapper {
472
- position: relative;
473
- padding: 8px 8px 0 8px;
474
- flex: 1;
475
- overflow: hidden;
476
- height: 100%;
477
- }
478
- .layout-page {
479
- position: relative;
480
- height: 100%;
481
- display: flex;
482
- flex-direction: column;
483
- overflow: hidden;
484
- }
485
- .layout-page-noheader {
486
- padding: 0;
487
- }
488
- .layout-page-noheader .bread-wrapper {
489
- padding: 5px 15px 5px 8px;
490
- }
491
- .layout-page-noheader .page {
492
- padding: 0 8px 8px 8px;
493
- }
494
-
495
- .page {
496
- position: relative;
497
- overflow-y: auto;
498
- overflow-x: hidden;
499
- flex: 1;
500
- }
501
- .page-flex {
502
- display: flex;
503
- flex-direction: column;
504
- }
505
- .page-full {
506
- flex: 1;
507
- overflow-y: auto;
508
- }