@flatbiz/pro-layout 5.2.7 → 5.2.9

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/dist/index.d.ts CHANGED
@@ -7,98 +7,6 @@ import { NotificationInstance } from 'antd/es/notification/interface.js';
7
7
  import { SizeType } from 'antd/lib/config-provider/SizeContext.js';
8
8
  import { CSSProperties, ComponentType, ReactElement } from 'react';
9
9
 
10
- export declare let message: MessageInstance;
11
- export declare let notification: NotificationInstance;
12
- export declare let modal: Omit<ModalStaticFunctions, "warn">;
13
- export type BreadProps = {
14
- children?: ReactElement;
15
- };
16
- export declare const Bread: (props: BreadProps) => import("react").JSX.Element | null;
17
- export type HistoryBackProps = ButtonWrapperProps & {
18
- level?: number;
19
- };
20
- /**
21
- * 通过面包屑路径返回
22
- * @param props
23
- * @returns
24
- * ```
25
- * 1. breads 模块面包屑配置
26
- * 2. level回退级别,如果传递数据未获取到路由配置,则取上一级
27
- * 例如:-1,-2,-3
28
- * 3. 为什么不能使用useNavigate(-1)
29
- * 因为内部iframe和外部浏览器共用history历史记录,导致里外浏览器栈混乱
30
- * 4. 什么场景使用
31
- * 使用iframe tab的项目,在执行路由回退时使用
32
- * 5. onClick返回 promise reject,则不会进行回退处理(V4.2.4)
33
- * ```
34
- */
35
- export declare const HistoryBackButton: (props: HistoryBackProps) => import("react").JSX.Element;
36
- export declare const useHistoryBack: (props?: {
37
- level?: number;
38
- }) => {
39
- path: string;
40
- };
41
- export interface PageProps {
42
- loading?: boolean;
43
- className?: string;
44
- style?: CSSProperties;
45
- fullIndex?: number;
46
- bread?: JSX.Element;
47
- children?: ReactElement | ReactElement[];
48
- elementId?: string;
49
- }
50
- /**
51
- * 页面包装组件
52
- * ```
53
- * 1. 如果初始化面包屑被隐藏,在特殊页面级可以独立设置显示面包屑
54
- * <Page bread={<Bread />}/>
55
- * 2. 如果需要在 面包屑上添加按钮,初始化设置 bootstrap.hideDefaultBread = true,在需要按钮的页面上配置
56
- * <Page bread={<Bread><Button>我是按钮</Button></Bread>}/>
57
- * ```
58
- * @param props
59
- * @returns
60
- */
61
- export declare const Page: (props: PageProps) => import("react").JSX.Element;
62
- export type PageWrapperServiceConfig = {
63
- onRequest: (params?: TAny) => Promise<TAny>;
64
- params?: TPlainObject | (() => TPlainObject);
65
- };
66
- export interface PageWrapperProps extends Omit<PageProps, "children"> {
67
- /** 接口数据配置 */
68
- serviceConfig: PageWrapperServiceConfig;
69
- /** children 为函数,参数【respData】为接口返回数据 */
70
- children?: ReactElement | ReactElement[] | ((respData?: TAny) => ReactElement);
71
- /**
72
- * 是否异步,默认:false
73
- * ```
74
- * true(异步):onRequest、react dom渲染同步执行
75
- * false(同步):onRequest有结果了才渲染 react dom
76
- * ```
77
- */
78
- isAsync?: boolean;
79
- /** 自定义异常渲染处理 */
80
- errorRender?: (error?: TAny) => ReactElement;
81
- }
82
- export type PageWrapperRefApi = {
83
- onRefresh: () => void;
84
- onReload: () => void;
85
- };
86
- /**
87
- * 为Page内置接口处理流程组件,如果无全局初始化接口请求场景,请使用Page组件
88
- * ```
89
- * 包括
90
- * 1. loading显示效果
91
- * 2. error显示效果
92
- * 3. 正常接口数据渲染
93
- * ```
94
- * @param props
95
- * @returns
96
- */
97
- export declare const PageWrapper: import("react").ForwardRefExoticComponent<PageWrapperProps & import("react").RefAttributes<PageWrapperRefApi>>;
98
- export declare const usePageWrapper: () => {
99
- onReload: () => void;
100
- onRefresh: () => void;
101
- };
102
10
  export interface FallbackProps {
103
11
  error: Error;
104
12
  resetErrorBoundary: (...args: Array<unknown>) => void;
@@ -622,6 +530,99 @@ export interface LeaveMenuProps {
622
530
  leaveMenus?: TMenuItem[];
623
531
  selectedKeys?: string[];
624
532
  }
533
+ export declare const Bootstrap: (options: BootstrapOptions) => import("react").JSX.Element;
534
+ export declare let message: MessageInstance;
535
+ export declare let notification: NotificationInstance;
536
+ export declare let modal: Omit<ModalStaticFunctions, "warn">;
537
+ export type BreadProps = {
538
+ children?: ReactElement;
539
+ };
540
+ export declare const Bread: (props: BreadProps) => import("react").JSX.Element | null;
541
+ export type HistoryBackProps = ButtonWrapperProps & {
542
+ level?: number;
543
+ };
544
+ /**
545
+ * 通过面包屑路径返回
546
+ * @param props
547
+ * @returns
548
+ * ```
549
+ * 1. breads 模块面包屑配置
550
+ * 2. level回退级别,如果传递数据未获取到路由配置,则取上一级
551
+ * 例如:-1,-2,-3
552
+ * 3. 为什么不能使用useNavigate(-1)
553
+ * 因为内部iframe和外部浏览器共用history历史记录,导致里外浏览器栈混乱
554
+ * 4. 什么场景使用
555
+ * 使用iframe tab的项目,在执行路由回退时使用
556
+ * 5. onClick返回 promise reject,则不会进行回退处理(V4.2.4)
557
+ * ```
558
+ */
559
+ export declare const HistoryBackButton: (props: HistoryBackProps) => import("react").JSX.Element;
560
+ export declare const useHistoryBack: (props?: {
561
+ level?: number;
562
+ }) => {
563
+ path: string;
564
+ };
565
+ export interface PageProps {
566
+ loading?: boolean;
567
+ className?: string;
568
+ style?: CSSProperties;
569
+ fullIndex?: number;
570
+ bread?: JSX.Element;
571
+ children?: ReactElement | ReactElement[];
572
+ elementId?: string;
573
+ }
574
+ /**
575
+ * 页面包装组件
576
+ * ```
577
+ * 1. 如果初始化面包屑被隐藏,在特殊页面级可以独立设置显示面包屑
578
+ * <Page bread={<Bread />}/>
579
+ * 2. 如果需要在 面包屑上添加按钮,初始化设置 bootstrap.hideDefaultBread = true,在需要按钮的页面上配置
580
+ * <Page bread={<Bread><Button>我是按钮</Button></Bread>}/>
581
+ * ```
582
+ * @param props
583
+ * @returns
584
+ */
585
+ export declare const Page: (props: PageProps) => import("react").JSX.Element;
586
+ export type PageWrapperServiceConfig = {
587
+ onRequest: (params?: TAny) => Promise<TAny>;
588
+ params?: TPlainObject | (() => TPlainObject);
589
+ };
590
+ export interface PageWrapperProps extends Omit<PageProps, "children"> {
591
+ /** 接口数据配置 */
592
+ serviceConfig: PageWrapperServiceConfig;
593
+ /** children 为函数,参数【respData】为接口返回数据 */
594
+ children?: ReactElement | ReactElement[] | ((respData?: TAny) => ReactElement);
595
+ /**
596
+ * 是否异步,默认:false
597
+ * ```
598
+ * true(异步):onRequest、react dom渲染同步执行
599
+ * false(同步):onRequest有结果了才渲染 react dom
600
+ * ```
601
+ */
602
+ isAsync?: boolean;
603
+ /** 自定义异常渲染处理 */
604
+ errorRender?: (error?: TAny) => ReactElement;
605
+ }
606
+ export type PageWrapperRefApi = {
607
+ onRefresh: () => void;
608
+ onReload: () => void;
609
+ };
610
+ /**
611
+ * 为Page内置接口处理流程组件,如果无全局初始化接口请求场景,请使用Page组件
612
+ * ```
613
+ * 包括
614
+ * 1. loading显示效果
615
+ * 2. error显示效果
616
+ * 3. 正常接口数据渲染
617
+ * ```
618
+ * @param props
619
+ * @returns
620
+ */
621
+ export declare const PageWrapper: import("react").ForwardRefExoticComponent<PageWrapperProps & import("react").RefAttributes<PageWrapperRefApi>>;
622
+ export declare const usePageWrapper: () => {
623
+ onReload: () => void;
624
+ onRefresh: () => void;
625
+ };
625
626
  /**
626
627
  * ```
627
628
  * 1. 外部针对出现 iframe tab标题为未知页面的配置、或者想修改二级页面tab标题的,在main模块中设置