@next-bricks/basic-bricks 1.259.2 → 1.260.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/deploy/contract.yaml +87 -87
- package/dist/bricks.json +23 -23
- package/dist/{index.1cf56fba.js → index.de9dd936.js} +2 -2
- package/dist/{index.1cf56fba.js.map → index.de9dd936.js.map} +1 -1
- package/dist-types/advance-list-container/index.d.ts +51 -0
- package/dist-types/app-bar/index.d.ts +15 -0
- package/dist-types/app-bar-breadcrumb/index.d.ts +13 -0
- package/dist-types/app-bar-setting/index.d.ts +12 -0
- package/dist-types/app-bar-wrapper/index.d.ts +14 -0
- package/dist-types/app-document-link/index.d.ts +14 -0
- package/dist-types/bootstrap.d.ts +44 -0
- package/dist-types/brick-error/index.d.ts +13 -0
- package/dist-types/delete-confirm-modal/index.d.ts +13 -0
- package/dist-types/easy-view/index.d.ts +20 -0
- package/dist-types/export-json-file/index.d.ts +20 -0
- package/dist-types/flex-layout/index.d.ts +17 -0
- package/dist-types/fold-brick/index.d.ts +15 -0
- package/dist-types/fold-brick-v2/index.d.ts +39 -0
- package/dist-types/general-anchor/index.d.ts +38 -0
- package/dist-types/general-button/index.d.ts +92 -0
- package/dist-types/general-card/index.d.ts +29 -0
- package/dist-types/general-custom-buttons/index.d.ts +147 -0
- package/dist-types/general-drawer/index.d.ts +60 -0
- package/dist-types/general-heading/index.d.ts +14 -0
- package/dist-types/general-hotkeys/index.d.ts +14 -0
- package/dist-types/general-modal/index.d.ts +95 -0
- package/dist-types/general-notification/index.d.ts +51 -0
- package/dist-types/general-popup/index.d.ts +36 -0
- package/dist-types/general-text/index.d.ts +23 -0
- package/dist-types/general-timer/index.d.ts +23 -0
- package/dist-types/general-title/index.d.ts +37 -0
- package/dist-types/header-bar/index.d.ts +17 -0
- package/dist-types/index-card/index.d.ts +9 -0
- package/dist-types/index.d.ts +44 -0
- package/dist-types/interfaces/general-card.d.ts +11 -0
- package/dist-types/interfaces/index.d.ts +1 -0
- package/dist-types/jsx.d.ts +469 -0
- package/dist-types/list-container/index.d.ts +21 -0
- package/dist-types/magic-brick/index.d.ts +9 -0
- package/dist-types/menu-bar/index.d.ts +15 -0
- package/dist-types/micro-app/index.d.ts +48 -0
- package/dist-types/multiple-columns-card/index.d.ts +9 -0
- package/dist-types/page-error/index.d.ts +9 -0
- package/dist-types/page-not-found/index.d.ts +7 -0
- package/dist-types/page-title/index.d.ts +9 -0
- package/dist-types/popover-container/index.d.ts +87 -0
- package/dist-types/print-button/index.d.ts +17 -0
- package/dist-types/quick-visit-menu/index.d.ts +41 -0
- package/dist-types/resizable-box/index.d.ts +28 -0
- package/dist-types/script-brick/index.d.ts +29 -0
- package/dist-types/sub-menu/index.d.ts +14 -0
- package/dist-types/sub-menu-filter/index.d.ts +63 -0
- package/dist-types/virtual-list-container/index.d.ts +40 -0
- package/package.json +11 -3
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { UseBrickConf } from "@next-core/brick-types";
|
|
2
|
+
|
|
3
|
+
export interface itemData {
|
|
4
|
+
list: Record<string, any>[];
|
|
5
|
+
page_size?: number | string;
|
|
6
|
+
page?: number | string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface AdvanceListContainerProps {
|
|
10
|
+
data: {
|
|
11
|
+
list: Record<string, any>[];
|
|
12
|
+
page_size?: number | string;
|
|
13
|
+
page?: number | string;
|
|
14
|
+
};
|
|
15
|
+
titleBrick: { useBrick: UseBrickConf };
|
|
16
|
+
suffixBrick?: { useBrick: UseBrickConf };
|
|
17
|
+
itemClick?: () => void;
|
|
18
|
+
selectable?: boolean;
|
|
19
|
+
defaultActiveIndex?: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface AdvanceListContainerPropsInterface {
|
|
23
|
+
data?: AdvanceListContainerProps["data"];
|
|
24
|
+
titleBrick?: AdvanceListContainerProps["titleBrick"];
|
|
25
|
+
suffixBrick?: AdvanceListContainerProps["suffixBrick"];
|
|
26
|
+
showCard?: boolean;
|
|
27
|
+
defaultActiveIndex?: number;
|
|
28
|
+
notTriggerClickEventWhenInit?: boolean;
|
|
29
|
+
selectable?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface AdvanceListContainerEvents {
|
|
33
|
+
"item.click": CustomEvent<{
|
|
34
|
+
item: any;
|
|
35
|
+
index: number;
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface AdvanceListContainerEventsMap {
|
|
40
|
+
onItemClick: "item.click";
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export declare class AdvanceListContainerElement extends HTMLElement {
|
|
44
|
+
data: AdvanceListContainerProps1["data"] | undefined;
|
|
45
|
+
titleBrick: AdvanceListContainerProps["titleBrick"] | undefined;
|
|
46
|
+
suffixBrick: AdvanceListContainerProps["suffixBrick"] | undefined;
|
|
47
|
+
showCard: boolean | undefined;
|
|
48
|
+
defaultActiveIndex: number | undefined;
|
|
49
|
+
notTriggerClickEventWhenInit: boolean | undefined;
|
|
50
|
+
selectable: boolean | undefined;
|
|
51
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BreadcrumbItemConf } from "@next-core/brick-types";
|
|
2
|
+
|
|
3
|
+
export interface AppBarProps {
|
|
4
|
+
pageTitle?: string;
|
|
5
|
+
documentId?: string;
|
|
6
|
+
noCurrentApp?: boolean;
|
|
7
|
+
breadcrumb?: BreadcrumbItemConf[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare class AppBarElement extends HTMLElement {
|
|
11
|
+
pageTitle: string | undefined;
|
|
12
|
+
documentId: string | undefined;
|
|
13
|
+
noCurrentApp: boolean | undefined;
|
|
14
|
+
breadcrumb: BreadcrumbItemConf[] | undefined;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BreadcrumbItemConf, SidebarMenu } from "@next-core/brick-types";
|
|
2
|
+
|
|
3
|
+
export interface AppbarBreadcrumbProps {
|
|
4
|
+
breadcrumb?: BreadcrumbItemConf[];
|
|
5
|
+
noCurrentApp?: boolean;
|
|
6
|
+
menu?: Partial<SidebarMenu>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export declare class AppbarBreadcrumbElement extends HTMLElement {
|
|
10
|
+
breadcrumb: BreadcrumbItemConf[] | undefined;
|
|
11
|
+
noCurrentApp: boolean | undefined;
|
|
12
|
+
menu: Partial<SidebarMenu> | undefined;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
|
|
4
|
+
export interface AppBarSettingProps {
|
|
5
|
+
usernameStyle?: React.CSSProperties;
|
|
6
|
+
dropdownIconStyle?: React.CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export declare class AppBarSettingElement extends HTMLElement {
|
|
10
|
+
usernameStyle: React.CSSProperties | undefined;
|
|
11
|
+
dropdownIconStyle: React.CSSProperties | undefined;
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
|
|
4
|
+
export interface AppBarWrapperProps {
|
|
5
|
+
isFixed?: boolean;
|
|
6
|
+
displayCenter?: boolean;
|
|
7
|
+
extraAppBarContentStyle?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare class AppBarWrapperElement extends HTMLElement {
|
|
11
|
+
isFixed: boolean | undefined;
|
|
12
|
+
displayCenter: boolean | undefined;
|
|
13
|
+
extraAppBarContentStyle: React.CSSProperties | undefined;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
|
|
4
|
+
export interface AppBarDocumentLinkProps {
|
|
5
|
+
iconStyle?: React.CSSProperties;
|
|
6
|
+
buttonStyle?: React.CSSProperties;
|
|
7
|
+
isInNavbar?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare class AppBarDocumentLinkElement extends HTMLElement {
|
|
11
|
+
iconStyle: React.CSSProperties | undefined;
|
|
12
|
+
buttonStyle: React.CSSProperties | undefined;
|
|
13
|
+
isInNavbar: boolean | undefined;
|
|
14
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import "./advance-list-container/index.js";
|
|
2
|
+
import "./app-bar/index.js";
|
|
3
|
+
import "./app-bar-breadcrumb/index.js";
|
|
4
|
+
import "./app-bar-setting/index.js";
|
|
5
|
+
import "./app-bar-wrapper/index.js";
|
|
6
|
+
import "./app-document-link/index.js";
|
|
7
|
+
import "./brick-error/index.js";
|
|
8
|
+
import "./delete-confirm-modal/index.js";
|
|
9
|
+
import "./easy-view/index.js";
|
|
10
|
+
import "./export-json-file/index.js";
|
|
11
|
+
import "./flex-layout/index.js";
|
|
12
|
+
import "./fold-brick/index.js";
|
|
13
|
+
import "./fold-brick-v2/index.js";
|
|
14
|
+
import "./general-anchor/index.js";
|
|
15
|
+
import "./general-button/index.js";
|
|
16
|
+
import "./general-card/index.js";
|
|
17
|
+
import "./general-custom-buttons/index.js";
|
|
18
|
+
import "./general-drawer/index.js";
|
|
19
|
+
import "./general-heading/index.js";
|
|
20
|
+
import "./general-hotkeys/index.js";
|
|
21
|
+
import "./general-modal/index.js";
|
|
22
|
+
import "./general-notification/index.js";
|
|
23
|
+
import "./general-popup/index.js";
|
|
24
|
+
import "./general-text/index.js";
|
|
25
|
+
import "./general-timer/index.js";
|
|
26
|
+
import "./general-title/index.js";
|
|
27
|
+
import "./header-bar/index.js";
|
|
28
|
+
import "./index-card/index.js";
|
|
29
|
+
import "./list-container/index.js";
|
|
30
|
+
import "./magic-brick/index.js";
|
|
31
|
+
import "./menu-bar/index.js";
|
|
32
|
+
import "./micro-app/index.js";
|
|
33
|
+
import "./multiple-columns-card/index.js";
|
|
34
|
+
import "./page-error/index.js";
|
|
35
|
+
import "./page-not-found/index.js";
|
|
36
|
+
import "./page-title/index.js";
|
|
37
|
+
import "./popover-container/index.js";
|
|
38
|
+
import "./print-button/index.js";
|
|
39
|
+
import "./quick-visit-menu/index.js";
|
|
40
|
+
import "./resizable-box/index.js";
|
|
41
|
+
import "./script-brick/index.js";
|
|
42
|
+
import "./sub-menu/index.js";
|
|
43
|
+
import "./sub-menu-filter/index.js";
|
|
44
|
+
import "./virtual-list-container/index.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface BrickErrorProps {
|
|
2
|
+
errorType?: string;
|
|
3
|
+
errorMessage?: string;
|
|
4
|
+
brickName?: string;
|
|
5
|
+
isLegacyTemplate?: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export declare class BrickErrorElement extends HTMLElement {
|
|
9
|
+
errorType: string | undefined;
|
|
10
|
+
errorMessage: string | undefined;
|
|
11
|
+
brickName: string | undefined;
|
|
12
|
+
isLegacyTemplate: boolean | undefined;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface DeleteConfirmModalProps {
|
|
2
|
+
eventName?: string;
|
|
3
|
+
message?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
data?: any;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export declare class DeleteConfirmModalElement extends HTMLElement {
|
|
9
|
+
eventName: string | undefined;
|
|
10
|
+
message: string | undefined;
|
|
11
|
+
title: string;
|
|
12
|
+
data: any | undefined;
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
|
|
4
|
+
export interface EasyViewProps {
|
|
5
|
+
gridAreas?: Record<string, (string | number)[]>;
|
|
6
|
+
gridTemplateAreas?: string[][];
|
|
7
|
+
gridTemplateColumns?: string | string[];
|
|
8
|
+
gridTemplateRows?: string | string[];
|
|
9
|
+
containerStyle?: React.CSSProperties;
|
|
10
|
+
styleByAreas?: Record<string, React.CSSProperties>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export declare class EasyViewElement extends HTMLElement {
|
|
14
|
+
gridAreas: Record<string, (string | number)[]> | undefined;
|
|
15
|
+
gridTemplateAreas: string[][] | undefined;
|
|
16
|
+
gridTemplateColumns: string | string[] | undefined;
|
|
17
|
+
gridTemplateRows: string | string[] | undefined;
|
|
18
|
+
containerStyle: React.CSSProperties | undefined;
|
|
19
|
+
styleByAreas: Record<string, React.CSSProperties> | undefined;
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ExportJsonFileProps {
|
|
2
|
+
fileName?: string;
|
|
3
|
+
data?: any;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface ExportJsonFileEvents {
|
|
7
|
+
"json-file.export.success": CustomEvent<void>;
|
|
8
|
+
"json-file.export.failed": CustomEvent<void>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface ExportJsonFileEventsMap {
|
|
12
|
+
onJsonFileExportSuccess: "json-file.export.success";
|
|
13
|
+
onJsonFileExportFailed: "json-file.export.failed";
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export declare class ExportJsonFileElement extends HTMLElement {
|
|
17
|
+
fileName: string | undefined;
|
|
18
|
+
data: any | undefined;
|
|
19
|
+
export(event: CustomEvent): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface FlexLayoutProps {
|
|
2
|
+
flexDirection?: string;
|
|
3
|
+
justifyContent?: string;
|
|
4
|
+
alignItems?: string;
|
|
5
|
+
alignContent?: string;
|
|
6
|
+
flexWrap?: string;
|
|
7
|
+
gap?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare class FlexLayoutElement extends HTMLElement {
|
|
11
|
+
flexDirection: string | undefined;
|
|
12
|
+
justifyContent: string | undefined;
|
|
13
|
+
alignItems: string | undefined;
|
|
14
|
+
alignContent: string | undefined;
|
|
15
|
+
flexWrap: string | undefined;
|
|
16
|
+
gap: string | undefined;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { UseBrickConf } from "@next-core/brick-types";
|
|
2
|
+
|
|
3
|
+
export interface FoldBrickProps {
|
|
4
|
+
useBrick?: UseBrickConf;
|
|
5
|
+
foldName?: string;
|
|
6
|
+
foldStyle?: Record<string, string>;
|
|
7
|
+
defaultShow?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare class FoldBrickElement extends HTMLElement {
|
|
11
|
+
useBrick: UseBrickConf | undefined;
|
|
12
|
+
foldName: string | undefined;
|
|
13
|
+
foldStyle: Record<string, string> | undefined;
|
|
14
|
+
defaultShow: boolean | undefined;
|
|
15
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { MenuIcon } from "@next-core/brick-types";
|
|
2
|
+
|
|
3
|
+
export interface FoldBrickV2Props {
|
|
4
|
+
foldName?: string;
|
|
5
|
+
defaultShow?: boolean;
|
|
6
|
+
type?: "normal" | "primary";
|
|
7
|
+
isShowFoldIcon?: boolean;
|
|
8
|
+
foldStyle?: Record<string, string>;
|
|
9
|
+
showDivider?: boolean;
|
|
10
|
+
dividerOrientation?: "left" | "right" | "center";
|
|
11
|
+
dividerDashed?: boolean;
|
|
12
|
+
show?: boolean;
|
|
13
|
+
hideFoldName?: boolean;
|
|
14
|
+
foldIcon?: MenuIcon;
|
|
15
|
+
foldIconStyle?: any;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface FoldBrickV2Events {
|
|
19
|
+
"fold.change": CustomEvent<boolean>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface FoldBrickV2EventsMap {
|
|
23
|
+
onFoldChange: "fold.change";
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export declare class FoldBrickV2Element extends HTMLElement {
|
|
27
|
+
foldName: string | undefined;
|
|
28
|
+
defaultShow: boolean | undefined;
|
|
29
|
+
type: "normal" | "primary" | undefined;
|
|
30
|
+
isShowFoldIcon: boolean | undefined;
|
|
31
|
+
foldStyle: Record<string, string> | undefined;
|
|
32
|
+
showDivider: boolean | undefined;
|
|
33
|
+
dividerOrientation: "left" | "right" | "center" | undefined;
|
|
34
|
+
dividerDashed: boolean | undefined;
|
|
35
|
+
show: boolean | undefined;
|
|
36
|
+
hideFoldName: boolean | undefined;
|
|
37
|
+
foldIcon: MenuIcon | undefined;
|
|
38
|
+
foldIconStyle: any | undefined;
|
|
39
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AnchorProps } from "antd";
|
|
2
|
+
import type { UseBrickConf } from "@next-core/brick-types";
|
|
3
|
+
|
|
4
|
+
export interface AnchorListType extends AnchorLinkProps {
|
|
5
|
+
/* 其他参数请参考 https://ant.design/components/anchor-cn/#Link-Props */
|
|
6
|
+
title: string;
|
|
7
|
+
href: string;
|
|
8
|
+
target?: string;
|
|
9
|
+
children?: AnchorListType[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface GeneralAnchorProps {
|
|
13
|
+
anchorList?: AnchorListType[];
|
|
14
|
+
configProps?: AnchorProps;
|
|
15
|
+
type?: "default" | "radio";
|
|
16
|
+
extraBrick?: { useBrick: UseBrickConf };
|
|
17
|
+
disabledJump?: boolean;
|
|
18
|
+
initOffset?: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface GeneralAnchorEvents {
|
|
22
|
+
"anchor.click": CustomEvent<Record<string, any>>;
|
|
23
|
+
"anchor.change": CustomEvent<Record<string, any>>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface GeneralAnchorEventsMap {
|
|
27
|
+
onAnchorClick: "anchor.click";
|
|
28
|
+
onAnchorChange: "anchor.change";
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export declare class GeneralAnchorElement extends HTMLElement {
|
|
32
|
+
anchorList: AnchorListType[] | undefined;
|
|
33
|
+
configProps: AnchorProps | undefined;
|
|
34
|
+
type: "default" | "radio" | undefined;
|
|
35
|
+
extraBrick: { useBrick: UseBrickConf } | undefined;
|
|
36
|
+
disabledJump: boolean | undefined;
|
|
37
|
+
initOffset: number | undefined;
|
|
38
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ButtonProps } from "antd/lib/button";
|
|
3
|
+
import type React from "react";
|
|
4
|
+
|
|
5
|
+
export declare type ButtonType = typeof ButtonTypes[number];
|
|
6
|
+
|
|
7
|
+
export interface TooltipConfig {
|
|
8
|
+
/**
|
|
9
|
+
* 气泡框位置,可选 `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom`
|
|
10
|
+
*/
|
|
11
|
+
placement?: TooltipPlacement;
|
|
12
|
+
/**
|
|
13
|
+
* 箭头是否指向目标元素中心
|
|
14
|
+
*/
|
|
15
|
+
arrowPointAtCenter?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 卡片样式
|
|
18
|
+
*/
|
|
19
|
+
overlayStyle?: React.CSSProperties;
|
|
20
|
+
/**
|
|
21
|
+
* 卡片内容区域的样式对象
|
|
22
|
+
*/
|
|
23
|
+
overlayInnerStyle?: React.CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type TooltipPlacement =
|
|
27
|
+
| "top"
|
|
28
|
+
| "left"
|
|
29
|
+
| "right"
|
|
30
|
+
| "bottom"
|
|
31
|
+
| "topLeft"
|
|
32
|
+
| "topRight"
|
|
33
|
+
| "bottomLeft"
|
|
34
|
+
| "bottomRight"
|
|
35
|
+
| "leftTop"
|
|
36
|
+
| "leftBottom"
|
|
37
|
+
| "rightTop"
|
|
38
|
+
| "rightBottom";
|
|
39
|
+
|
|
40
|
+
export interface GeneralButtonProps {
|
|
41
|
+
buttonName?: string;
|
|
42
|
+
buttonIcon?: any;
|
|
43
|
+
buttonType?: ButtonType;
|
|
44
|
+
tooltip?: string;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
disabledTooltip?: string;
|
|
47
|
+
tooltipConfig?: TooltipConfig;
|
|
48
|
+
buttonUrl?: string;
|
|
49
|
+
buttonHref?: string;
|
|
50
|
+
target?: string;
|
|
51
|
+
dataSource?: Record<string, any>;
|
|
52
|
+
disableAfterClick?: boolean;
|
|
53
|
+
buttonProps?: ButtonProps & { icon?: string };
|
|
54
|
+
loading?: boolean;
|
|
55
|
+
buttonDanger?: boolean;
|
|
56
|
+
buttonShape?: "circle" | "round";
|
|
57
|
+
buttonSize?: "xs" | "small" | "large";
|
|
58
|
+
fadedText?: boolean;
|
|
59
|
+
buttonStyle?: React.CSSProperties;
|
|
60
|
+
detail?: Record<string, any>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface GeneralButtonEvents {
|
|
64
|
+
"general.button.click": CustomEvent<Record<string, any>>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface GeneralButtonEventsMap {
|
|
68
|
+
onGeneralButtonClick: "general.button.click";
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export declare class GeneralButtonElement extends HTMLElement {
|
|
72
|
+
buttonName: string | undefined;
|
|
73
|
+
buttonIcon: any | undefined;
|
|
74
|
+
buttonType: ButtonType | undefined;
|
|
75
|
+
tooltip: string | undefined;
|
|
76
|
+
disabled: boolean | undefined;
|
|
77
|
+
disabledTooltip: string | undefined;
|
|
78
|
+
tooltipConfig: TooltipConfig | undefined;
|
|
79
|
+
buttonUrl: string | undefined;
|
|
80
|
+
buttonHref: string | undefined;
|
|
81
|
+
target: string | undefined;
|
|
82
|
+
dataSource: Record<string, any> | undefined;
|
|
83
|
+
disableAfterClick: boolean | undefined;
|
|
84
|
+
buttonProps: (ButtonProps & { icon?: string }) | undefined;
|
|
85
|
+
loading: boolean | undefined;
|
|
86
|
+
buttonDanger: boolean | undefined;
|
|
87
|
+
buttonShape: "circle" | "round" | undefined;
|
|
88
|
+
buttonSize: "xs" | "small" | "large" | undefined;
|
|
89
|
+
fadedText: boolean | undefined;
|
|
90
|
+
buttonStyle: React.CSSProperties | undefined;
|
|
91
|
+
detail: Record<string, any> | undefined;
|
|
92
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { CardProps } from "antd/lib/card";
|
|
3
|
+
import type { OperationButton } from "../interfaces/index.js";
|
|
4
|
+
|
|
5
|
+
export interface GeneralCardProps {
|
|
6
|
+
cardTitle?: string;
|
|
7
|
+
fillVertical?: boolean;
|
|
8
|
+
verticalCenter?: boolean;
|
|
9
|
+
compactMode?: boolean;
|
|
10
|
+
hasExtraSlot?: boolean;
|
|
11
|
+
hasFooter?: boolean;
|
|
12
|
+
isFixedFooter?: boolean;
|
|
13
|
+
operationButtons?: OperationButton[];
|
|
14
|
+
configProps?: CardProps;
|
|
15
|
+
cardContentWrapperStyle?: React.CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare class GeneralCardElement extends HTMLElement {
|
|
19
|
+
cardTitle: string | undefined;
|
|
20
|
+
fillVertical: boolean | undefined;
|
|
21
|
+
verticalCenter: boolean | undefined;
|
|
22
|
+
compactMode: boolean | undefined;
|
|
23
|
+
hasExtraSlot: boolean | undefined;
|
|
24
|
+
hasFooter: boolean | undefined;
|
|
25
|
+
isFixedFooter: boolean | undefined;
|
|
26
|
+
operationButtons: OperationButton[] | undefined;
|
|
27
|
+
configProps: CardProps | undefined;
|
|
28
|
+
cardContentWrapperStyle: React.CSSProperties | undefined;
|
|
29
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { MenuIcon } from "@next-core/brick-types";
|
|
3
|
+
import { ButtonType, ButtonShape, ButtonSize } from "antd/lib/button";
|
|
4
|
+
import { TooltipPlacement } from "antd/lib/tooltip";
|
|
5
|
+
import type React from "react";
|
|
6
|
+
|
|
7
|
+
export interface CustomButton {
|
|
8
|
+
/**
|
|
9
|
+
* 是否收纳成下拉框
|
|
10
|
+
*/
|
|
11
|
+
isDropdown?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* 菜单项分割线,只用在弹出菜单内
|
|
14
|
+
*/
|
|
15
|
+
isDivider?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 按钮名
|
|
18
|
+
*/
|
|
19
|
+
text: string;
|
|
20
|
+
/**
|
|
21
|
+
* 按钮 icon,支持[icon图标库](/next/developers/icon),可直接复制图标图标的配置(antd、fa 及 easyops 三种库都支持),也可只取 icon 字段的值(仅支持 antd 库)。配置{ "lib": "antd", "icon": "edit" }与 "edit"等价
|
|
22
|
+
*/
|
|
23
|
+
icon?: MenuIcon | string;
|
|
24
|
+
/**
|
|
25
|
+
* 按钮点击事件名
|
|
26
|
+
*/
|
|
27
|
+
eventName: string;
|
|
28
|
+
/**
|
|
29
|
+
* 按钮字体颜色
|
|
30
|
+
*/
|
|
31
|
+
color?: string;
|
|
32
|
+
/**
|
|
33
|
+
* 按钮 ID, updateButton 时使用
|
|
34
|
+
*/
|
|
35
|
+
id?: string;
|
|
36
|
+
/**
|
|
37
|
+
* 是否禁用
|
|
38
|
+
*/
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* 是否隐藏
|
|
42
|
+
*/
|
|
43
|
+
hide?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* 样式类型
|
|
46
|
+
*/
|
|
47
|
+
buttonType?: ButtonType | "icon";
|
|
48
|
+
/**
|
|
49
|
+
* 形状类型
|
|
50
|
+
*/
|
|
51
|
+
buttonShape?: ButtonShape;
|
|
52
|
+
/**
|
|
53
|
+
* 点击跳转的地址,一般站内链接使用此属性
|
|
54
|
+
*/
|
|
55
|
+
buttonUrl?: string;
|
|
56
|
+
/**
|
|
57
|
+
* 点击跳转的地址,一般站外链接使用此属性
|
|
58
|
+
*/
|
|
59
|
+
buttonHref?: string;
|
|
60
|
+
/**
|
|
61
|
+
* 按钮大小
|
|
62
|
+
*/
|
|
63
|
+
buttonSize?: ButtonSize;
|
|
64
|
+
/**
|
|
65
|
+
* 相当于 a 链接的 target 属性,buttonUrl 或 buttonHref 存在时生效
|
|
66
|
+
*/
|
|
67
|
+
urlTarget?: string;
|
|
68
|
+
/**
|
|
69
|
+
* 按钮简单的文字提示气泡框
|
|
70
|
+
*/
|
|
71
|
+
tooltip?: string;
|
|
72
|
+
/**
|
|
73
|
+
* 禁用按钮的 tooltip
|
|
74
|
+
*/
|
|
75
|
+
disabledTooltip?: string;
|
|
76
|
+
/**
|
|
77
|
+
* tooltip 位置
|
|
78
|
+
*/
|
|
79
|
+
tooltipPlacement?: TooltipPlacement;
|
|
80
|
+
/**
|
|
81
|
+
* 设置按钮载入状态
|
|
82
|
+
*/
|
|
83
|
+
loading?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* 用于测试时定位的 ID
|
|
86
|
+
*/
|
|
87
|
+
testId?: string;
|
|
88
|
+
/**
|
|
89
|
+
* 是否显示为危险样式
|
|
90
|
+
*/
|
|
91
|
+
danger?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* 每个事件的数据源
|
|
94
|
+
*/
|
|
95
|
+
dataSource?: any;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type DropdownPlacement =
|
|
99
|
+
| "bottomRight"
|
|
100
|
+
| "topLeft"
|
|
101
|
+
| "topCenter"
|
|
102
|
+
| "topRight"
|
|
103
|
+
| "bottomLeft"
|
|
104
|
+
| "bottomCenter";
|
|
105
|
+
|
|
106
|
+
export interface GeneralCustomButtonsProps {
|
|
107
|
+
customButtons?: CustomButton[];
|
|
108
|
+
alignment?: "start" | "center" | "end" | "stretch";
|
|
109
|
+
dataSource?: any;
|
|
110
|
+
disableAfterClick?: boolean;
|
|
111
|
+
isMoreButton?: boolean;
|
|
112
|
+
useButtonDataSource?: boolean;
|
|
113
|
+
moreBtnIcon?: MenuIcon | string;
|
|
114
|
+
moreButtonType?: ButtonType;
|
|
115
|
+
moreButtonShape?: "circle" | "no" | "rectangle" | "icon";
|
|
116
|
+
dropdownBtnText?: string;
|
|
117
|
+
dropdownBtnType?: "default" | "link";
|
|
118
|
+
dropdownBtnIcon?: MenuIcon | string;
|
|
119
|
+
dropdownPlacement?: DropdownPlacement;
|
|
120
|
+
moreButtonStyle?: React.CSSProperties;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface GeneralCustomButtonsEvents {
|
|
124
|
+
"buttons.visible.change": CustomEvent<boolean>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface GeneralCustomButtonsEventsMap {
|
|
128
|
+
onButtonsVisibleChange: "buttons.visible.change";
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export declare class GeneralCustomButtonsElement extends HTMLElement {
|
|
132
|
+
customButtons: CustomButton[] | undefined;
|
|
133
|
+
alignment: "start" | "center" | "end" | "stretch" | undefined;
|
|
134
|
+
dataSource: any | undefined;
|
|
135
|
+
disableAfterClick: boolean | undefined;
|
|
136
|
+
isMoreButton: boolean | undefined;
|
|
137
|
+
useButtonDataSource: boolean | undefined;
|
|
138
|
+
moreBtnIcon: MenuIcon | string | undefined;
|
|
139
|
+
moreButtonType: ButtonType | undefined;
|
|
140
|
+
moreButtonShape: "circle" | "no" | "rectangle" | "icon" | undefined;
|
|
141
|
+
dropdownBtnText: string | undefined;
|
|
142
|
+
dropdownBtnType: "default" | "link" | undefined;
|
|
143
|
+
dropdownBtnIcon: MenuIcon | string | undefined;
|
|
144
|
+
dropdownPlacement: DropdownPlacement | undefined;
|
|
145
|
+
moreButtonStyle: React.CSSProperties | undefined;
|
|
146
|
+
updateButton(id: string, btn: Partial<CustomButton>): void;
|
|
147
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { DrawerProps } from "antd/lib/drawer";
|
|
2
|
+
|
|
3
|
+
export interface ICustomSwitchConfig {
|
|
4
|
+
openText?: string;
|
|
5
|
+
openIcon?: any;
|
|
6
|
+
closeText?: string;
|
|
7
|
+
closeIcon?: any;
|
|
8
|
+
top?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface OpenCloseOption {
|
|
12
|
+
noEvent?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface GeneralDrawerProps {
|
|
16
|
+
customTitle?: string;
|
|
17
|
+
maskClosable?: boolean;
|
|
18
|
+
width?: number | string;
|
|
19
|
+
closable?: boolean;
|
|
20
|
+
hasFooter?: boolean;
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
mask?: boolean;
|
|
23
|
+
bodyStyle?: Record<string, any>;
|
|
24
|
+
drawerStyle?: Record<string, any>;
|
|
25
|
+
headerStyle?: Record<string, any>;
|
|
26
|
+
isFloat?: boolean;
|
|
27
|
+
configProps?: DrawerProps;
|
|
28
|
+
scrollToTopWhenOpen?: boolean;
|
|
29
|
+
stackable?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface GeneralDrawerEvents {
|
|
33
|
+
"general.drawer.open": CustomEvent<Record<string, any>>;
|
|
34
|
+
"general.drawer.close": CustomEvent<Record<string, any>>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface GeneralDrawerEventsMap {
|
|
38
|
+
onGeneralDrawerOpen: "general.drawer.open";
|
|
39
|
+
onGeneralDrawerClose: "general.drawer.close";
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export declare class GeneralDrawerElement extends HTMLElement {
|
|
43
|
+
customTitle: string | undefined;
|
|
44
|
+
maskClosable: boolean | undefined;
|
|
45
|
+
width: number | string | undefined;
|
|
46
|
+
closable: boolean | undefined;
|
|
47
|
+
hasFooter: boolean | undefined;
|
|
48
|
+
loading: boolean | undefined;
|
|
49
|
+
mask: boolean | undefined;
|
|
50
|
+
bodyStyle: Record<string, any> | undefined;
|
|
51
|
+
drawerStyle: Record<string, any> | undefined;
|
|
52
|
+
headerStyle: Record<string, any> | undefined;
|
|
53
|
+
isFloat: boolean | undefined;
|
|
54
|
+
configProps: DrawerProps | undefined;
|
|
55
|
+
scrollToTopWhenOpen: boolean | undefined;
|
|
56
|
+
stackable: boolean | undefined;
|
|
57
|
+
open(option?: OpenCloseOption): void;
|
|
58
|
+
bodyScroll(top: number): void;
|
|
59
|
+
close(option?: OpenCloseOption): void;
|
|
60
|
+
}
|