@next-bricks/basic-bricks 1.258.12 → 1.259.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 +81 -81
- package/dist/bricks.json +26 -26
- package/dist/index.5b6d32e5.js +10 -0
- package/dist/index.5b6d32e5.js.map +1 -0
- package/dist/stories.json +5 -0
- package/dist/types/basic-bricks/src/advance-list-container/AdvanceListContainer.d.ts +20 -0
- package/dist/types/basic-bricks/src/advance-list-container/index.d.ts +141 -0
- package/dist/types/basic-bricks/src/app-bar/AppBar/AppBar.d.ts +10 -0
- package/dist/types/basic-bricks/src/app-bar/AppBarBreadcrumb/AppBarBreadcrumb.d.ts +11 -0
- package/dist/types/basic-bricks/src/app-bar/AppBarTips/AppBarTips.d.ts +15 -0
- package/dist/types/basic-bricks/src/app-bar/AppDocumentLink/AppDocumentLink.d.ts +9 -0
- package/dist/types/basic-bricks/src/app-bar/AppSetting/AppSetting.d.ts +5 -0
- package/dist/types/basic-bricks/src/app-bar/Desktop/Desktop.d.ts +10 -0
- package/dist/types/basic-bricks/src/app-bar/DesktopApp/DesktopApp.d.ts +12 -0
- package/dist/types/basic-bricks/src/app-bar/DesktopCell/DesktopCell.d.ts +13 -0
- package/dist/types/basic-bricks/src/app-bar/DesktopCustom/DesktopCustom.d.ts +13 -0
- package/dist/types/basic-bricks/src/app-bar/DesktopDir/DesktopDir.d.ts +3 -0
- package/dist/types/basic-bricks/src/app-bar/DesktopDirContent/DesktopDirContent.d.ts +7 -0
- package/dist/types/basic-bricks/src/app-bar/DesktopDirContext.d.ts +16 -0
- package/dist/types/basic-bricks/src/app-bar/DesktopSlider/DesktopSlider.d.ts +10 -0
- package/dist/types/basic-bricks/src/app-bar/DesktopSlider/desktopCursor.d.ts +2 -0
- package/dist/types/basic-bricks/src/app-bar/FavoriteDesktopCell/FavoriteDesktopCell.d.ts +8 -0
- package/dist/types/basic-bricks/src/app-bar/Launchpad/Launchpad.d.ts +5 -0
- package/dist/types/basic-bricks/src/app-bar/LaunchpadButton/LaunchpadButton.d.ts +2 -0
- package/dist/types/basic-bricks/src/app-bar/LaunchpadPortal/LaunchpadPortal.d.ts +6 -0
- package/dist/types/basic-bricks/src/app-bar/LaunchpadService.d.ts +65 -0
- package/dist/types/basic-bricks/src/app-bar/LaunchpadSettingsContext.d.ts +7 -0
- package/dist/types/basic-bricks/src/app-bar/LaunchpadWrapper/LaunchpadWrapper.d.ts +6 -0
- package/dist/types/basic-bricks/src/app-bar/License-notification/LicenseNotification.d.ts +6 -0
- package/dist/types/basic-bricks/src/app-bar/MyDesktop/MyDesktop.d.ts +7 -0
- package/dist/types/basic-bricks/src/app-bar/SearchBar/SearchBar.d.ts +5 -0
- package/dist/types/basic-bricks/src/app-bar/index.d.ts +5 -0
- package/dist/types/basic-bricks/src/app-bar/interfaces.d.ts +4 -0
- package/dist/types/basic-bricks/src/app-bar/site-map/SiteMap.d.ts +20 -0
- package/dist/types/basic-bricks/src/app-bar/utils/getImageUrl.d.ts +2 -0
- package/dist/types/basic-bricks/src/app-bar-breadcrumb/AppbarBreadcrumb.d.ts +3 -0
- package/dist/types/basic-bricks/src/app-bar-breadcrumb/index.d.ts +33 -0
- package/dist/types/basic-bricks/src/app-bar-logo/AppBarLogo.d.ts +2 -0
- package/dist/types/basic-bricks/src/app-bar-logo/index.d.ts +19 -0
- package/dist/types/basic-bricks/src/app-bar-setting/AppBarSetting.d.ts +5 -0
- package/dist/types/basic-bricks/src/app-bar-setting/index.d.ts +24 -0
- package/dist/types/basic-bricks/src/app-bar-wrapper/AppBarWrapper.d.ts +6 -0
- package/dist/types/basic-bricks/src/app-bar-wrapper/index.d.ts +28 -0
- package/dist/types/basic-bricks/src/app-document-link/AppDocumentLink.d.ts +6 -0
- package/dist/types/basic-bricks/src/app-document-link/index.d.ts +31 -0
- package/dist/types/basic-bricks/src/brick-error/BrickError.d.ts +8 -0
- package/dist/types/basic-bricks/src/brick-error/index.d.ts +37 -0
- package/dist/types/basic-bricks/src/delete-confirm-modal/DeleteConfirmModal.d.ts +11 -0
- package/dist/types/basic-bricks/src/delete-confirm-modal/index.d.ts +35 -0
- package/dist/types/basic-bricks/src/easy-view/EasyView.d.ts +11 -0
- package/dist/types/basic-bricks/src/easy-view/index.d.ts +56 -0
- package/dist/types/basic-bricks/src/event-agent/index.d.ts +25 -0
- package/dist/types/basic-bricks/src/export-json-file/index.d.ts +51 -0
- package/dist/types/basic-bricks/src/flex-layout/index.d.ts +55 -0
- package/dist/types/basic-bricks/src/fold-brick/FoldBrick.d.ts +10 -0
- package/dist/types/basic-bricks/src/fold-brick/index.d.ts +28 -0
- package/dist/types/basic-bricks/src/fold-brick-v2/FoldBrickV2.d.ts +17 -0
- package/dist/types/basic-bricks/src/fold-brick-v2/index.d.ts +133 -0
- package/dist/types/basic-bricks/src/general-anchor/GeneralAnchor.d.ts +17 -0
- package/dist/types/basic-bricks/src/general-anchor/index.d.ts +91 -0
- package/dist/types/basic-bricks/src/general-button/GeneralButton.d.ts +38 -0
- package/dist/types/basic-bricks/src/general-button/index.d.ts +249 -0
- package/dist/types/basic-bricks/src/general-card/GeneralCard.d.ts +15 -0
- package/dist/types/basic-bricks/src/general-card/index.d.ts +120 -0
- package/dist/types/basic-bricks/src/general-custom-buttons/GeneralCustomButtons.d.ts +31 -0
- package/dist/types/basic-bricks/src/general-custom-buttons/index.d.ts +235 -0
- package/dist/types/basic-bricks/src/general-drawer/GeneralDrawer.d.ts +27 -0
- package/dist/types/basic-bricks/src/general-drawer/index.d.ts +191 -0
- package/dist/types/basic-bricks/src/general-heading/GeneralHeading.d.ts +9 -0
- package/dist/types/basic-bricks/src/general-heading/index.d.ts +43 -0
- package/dist/types/basic-bricks/src/general-hotkeys/index.d.ts +57 -0
- package/dist/types/basic-bricks/src/general-modal/GeneralModal.d.ts +33 -0
- package/dist/types/basic-bricks/src/general-modal/index.d.ts +330 -0
- package/dist/types/basic-bricks/src/general-notification/index.d.ts +131 -0
- package/dist/types/basic-bricks/src/general-popup/GeneralPopup.d.ts +21 -0
- package/dist/types/basic-bricks/src/general-popup/index.d.ts +95 -0
- package/dist/types/basic-bricks/src/general-text/GeneralText.d.ts +13 -0
- package/dist/types/basic-bricks/src/general-text/index.d.ts +81 -0
- package/dist/types/basic-bricks/src/general-timer/index.d.ts +70 -0
- package/dist/types/basic-bricks/src/general-title/GeneralTitle.d.ts +21 -0
- package/dist/types/basic-bricks/src/general-title/index.d.ts +129 -0
- package/dist/types/basic-bricks/src/grid-layout/index.d.ts +134 -0
- package/dist/types/basic-bricks/src/header-bar/HeaderBar.d.ts +6 -0
- package/dist/types/basic-bricks/src/header-bar/index.d.ts +46 -0
- package/dist/types/basic-bricks/src/home-redirect/index.d.ts +45 -0
- package/dist/types/basic-bricks/src/i18n/constants.d.ts +34 -0
- package/dist/types/basic-bricks/src/index-card/IndexCard.d.ts +7 -0
- package/dist/types/basic-bricks/src/index-card/index.d.ts +39 -0
- package/dist/types/basic-bricks/src/interfaces/general-card.d.ts +11 -0
- package/dist/types/basic-bricks/src/interfaces/index.d.ts +1 -0
- package/dist/types/basic-bricks/src/jsx.d.ts +172 -0
- package/dist/types/basic-bricks/src/launchpad-button/index.d.ts +18 -0
- package/dist/types/basic-bricks/src/list-container/ListContainer.d.ts +12 -0
- package/dist/types/basic-bricks/src/list-container/index.d.ts +71 -0
- package/dist/types/basic-bricks/src/loading-bar/LoadingBar.d.ts +2 -0
- package/dist/types/basic-bricks/src/loading-bar/index.d.ts +2 -0
- package/dist/types/basic-bricks/src/magic-brick/MagicBrick.d.ts +7 -0
- package/dist/types/basic-bricks/src/magic-brick/index.d.ts +36 -0
- package/dist/types/basic-bricks/src/menu-bar/AppMenu/AppMenu.d.ts +7 -0
- package/dist/types/basic-bricks/src/menu-bar/AppMenu/MenuTooltip/MenuTooltip.d.ts +7 -0
- package/dist/types/basic-bricks/src/menu-bar/AppSubMenu/AppSubMenu.d.ts +8 -0
- package/dist/types/basic-bricks/src/menu-bar/CollapseBar/CollapseBar.d.ts +6 -0
- package/dist/types/basic-bricks/src/menu-bar/LogoBar/LogoBar.d.ts +2 -0
- package/dist/types/basic-bricks/src/menu-bar/MenuBar/MenuBar.d.ts +7 -0
- package/dist/types/basic-bricks/src/menu-bar/index.d.ts +96 -0
- package/dist/types/basic-bricks/src/micro-app/BtnExitDashboardMode.d.ts +2 -0
- package/dist/types/basic-bricks/src/micro-app/MicroApp.d.ts +13 -0
- package/dist/types/basic-bricks/src/micro-app/index.d.ts +152 -0
- package/dist/types/basic-bricks/src/multiple-columns-card/MultipleColumnsCard.d.ts +7 -0
- package/dist/types/basic-bricks/src/multiple-columns-card/index.d.ts +38 -0
- package/dist/types/basic-bricks/src/page-error/PageError.d.ts +7 -0
- package/dist/types/basic-bricks/src/page-error/index.d.ts +4 -0
- package/dist/types/basic-bricks/src/page-not-found/PageNotFound.d.ts +6 -0
- package/dist/types/basic-bricks/src/page-not-found/index.d.ts +10 -0
- package/dist/types/basic-bricks/src/page-title/PageTitle.d.ts +8 -0
- package/dist/types/basic-bricks/src/page-title/index.d.ts +36 -0
- package/dist/types/basic-bricks/src/popover-container/PopoverContainer.d.ts +39 -0
- package/dist/types/basic-bricks/src/popover-container/index.d.ts +244 -0
- package/dist/types/basic-bricks/src/print-button/PrintButton.d.ts +10 -0
- package/dist/types/basic-bricks/src/print-button/index.d.ts +68 -0
- package/dist/types/basic-bricks/src/quick-visit-menu/FavouriteMenu.d.ts +3 -0
- package/dist/types/basic-bricks/src/quick-visit-menu/MenuTag.d.ts +14 -0
- package/dist/types/basic-bricks/src/quick-visit-menu/QuickVisitMenu.d.ts +34 -0
- package/dist/types/basic-bricks/src/quick-visit-menu/index.d.ts +92 -0
- package/dist/types/basic-bricks/src/redirect-to/index.d.ts +74 -0
- package/dist/types/basic-bricks/src/resizable-box/ResizableBox.d.ts +14 -0
- package/dist/types/basic-bricks/src/resizable-box/index.d.ts +38 -0
- package/dist/types/basic-bricks/src/script-brick/index.d.ts +91 -0
- package/dist/types/basic-bricks/src/shared/DeferredService.d.ts +10 -0
- package/dist/types/basic-bricks/src/sub-menu/SubMenu.d.ts +11 -0
- package/dist/types/basic-bricks/src/sub-menu/index.d.ts +49 -0
- package/dist/types/basic-bricks/src/sub-menu-filter/SubMenuFilter.d.ts +38 -0
- package/dist/types/basic-bricks/src/sub-menu-filter/index.d.ts +204 -0
- package/dist/types/basic-bricks/src/transform-agent/index.d.ts +54 -0
- package/dist/types/basic-bricks/src/utils.d.ts +1 -0
- package/dist/types/basic-bricks/src/virtual-list-container/VirtualListContainer.d.ts +16 -0
- package/dist/types/basic-bricks/src/virtual-list-container/index.d.ts +63 -0
- package/dist/types/presentational-bricks/src/brick-illustration/BrickIllustration.d.ts +14 -0
- package/dist/types/presentational-bricks/src/brick-illustration/index.d.ts +87 -0
- package/dist/types/presentational-bricks/src/brick-result/components/IllustrationWrapper.d.ts +16 -0
- package/package.json +5 -4
- package/dist/index.76908742.js +0 -10
- package/dist/index.76908742.js.map +0 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
import { UpdatingElement, EventEmitter } from "@next-core/brick-kit";
|
|
3
|
+
import { NotificationPlacement } from "antd/lib/notification";
|
|
4
|
+
import { NotificationApi } from "antd/es/notification";
|
|
5
|
+
import type { UseBrickConf, MenuIcon } from "@next-core/brick-types";
|
|
6
|
+
export interface GeneralNotificationElementProps {
|
|
7
|
+
message?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
descriptionBrick?: DescriptionBrickprops;
|
|
10
|
+
btnBrick?: BtnBrickprops;
|
|
11
|
+
icon?: MenuIcon | string;
|
|
12
|
+
iconStyle?: CSSProperties;
|
|
13
|
+
placement?: NotificationPlacement;
|
|
14
|
+
duration?: number;
|
|
15
|
+
key?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @id basic-bricks.general-notification
|
|
19
|
+
* @name basic-bricks.general-notification
|
|
20
|
+
* @docKind brick
|
|
21
|
+
* @description 普通的 notification
|
|
22
|
+
* @author Alex
|
|
23
|
+
* @slots
|
|
24
|
+
* @history
|
|
25
|
+
* 1.62.0:新增构件 `basic-bricks.general-notification`
|
|
26
|
+
* @memo
|
|
27
|
+
* @noInheritDoc
|
|
28
|
+
*/
|
|
29
|
+
interface DescriptionBrickprops {
|
|
30
|
+
useBrick: UseBrickConf;
|
|
31
|
+
}
|
|
32
|
+
interface BtnBrickprops {
|
|
33
|
+
useBrick: UseBrickConf;
|
|
34
|
+
}
|
|
35
|
+
export declare class GeneralNotificationElement extends UpdatingElement implements GeneralNotificationElementProps {
|
|
36
|
+
/**
|
|
37
|
+
* @kind string
|
|
38
|
+
* @required true
|
|
39
|
+
* @default -
|
|
40
|
+
* @description 通知提醒标题,必选
|
|
41
|
+
* @group basic
|
|
42
|
+
*/
|
|
43
|
+
message: string;
|
|
44
|
+
/**
|
|
45
|
+
* @kind string
|
|
46
|
+
* @required true
|
|
47
|
+
* @default -
|
|
48
|
+
* @description 通知提醒内容,必选
|
|
49
|
+
* @group basic
|
|
50
|
+
*/
|
|
51
|
+
description: string;
|
|
52
|
+
/**
|
|
53
|
+
* @kind DescriptionBrickprops
|
|
54
|
+
* @required false
|
|
55
|
+
* @default -
|
|
56
|
+
* @description 自定义通知提醒内容
|
|
57
|
+
* @group basic
|
|
58
|
+
*/
|
|
59
|
+
descriptionBrick: DescriptionBrickprops;
|
|
60
|
+
/**
|
|
61
|
+
* @kind BtnBrickprops
|
|
62
|
+
* @required false
|
|
63
|
+
* @default -
|
|
64
|
+
* @description 自定义通知提醒按钮
|
|
65
|
+
* @group basic
|
|
66
|
+
*/
|
|
67
|
+
btnBrick: BtnBrickprops;
|
|
68
|
+
/**
|
|
69
|
+
* @kind string
|
|
70
|
+
* @required false
|
|
71
|
+
* @default -
|
|
72
|
+
* @description 当前通知唯一标志
|
|
73
|
+
* @group basic
|
|
74
|
+
*/
|
|
75
|
+
key: string;
|
|
76
|
+
/**
|
|
77
|
+
* @kind MenuIcon | string
|
|
78
|
+
* @required false
|
|
79
|
+
* @default -
|
|
80
|
+
* @description icon
|
|
81
|
+
*/
|
|
82
|
+
icon: MenuIcon | string;
|
|
83
|
+
/**
|
|
84
|
+
* @kind `topLeft` `topRight` `bottomLeft` `bottomRight`
|
|
85
|
+
* @required false
|
|
86
|
+
* @default topRight
|
|
87
|
+
* @description 弹出位置,可选
|
|
88
|
+
* @group ui
|
|
89
|
+
*/
|
|
90
|
+
placement: NotificationPlacement;
|
|
91
|
+
/**
|
|
92
|
+
* @kind number
|
|
93
|
+
* @required false
|
|
94
|
+
* @default 4.5
|
|
95
|
+
* @description 默认 4.5 秒后自动关闭,配置为 null 则不自动关闭
|
|
96
|
+
* @group basic
|
|
97
|
+
*/
|
|
98
|
+
duration: number;
|
|
99
|
+
/**
|
|
100
|
+
* @required false
|
|
101
|
+
* @default -
|
|
102
|
+
* @description icon css 样式
|
|
103
|
+
* @group ui
|
|
104
|
+
*/
|
|
105
|
+
iconStyle: CSSProperties;
|
|
106
|
+
connectedCallback(): void;
|
|
107
|
+
disconnectedCallback(): void;
|
|
108
|
+
handleClose: () => void;
|
|
109
|
+
handleClick: () => void;
|
|
110
|
+
/**
|
|
111
|
+
* @detail -
|
|
112
|
+
* @description 点击通知时触发的回调函数
|
|
113
|
+
*/
|
|
114
|
+
clickEvent: EventEmitter<Record<string, any>>;
|
|
115
|
+
/**
|
|
116
|
+
* @detail -
|
|
117
|
+
* @description 点击默认关闭按钮时触发的回调函数
|
|
118
|
+
*/
|
|
119
|
+
closeEvent: EventEmitter<Record<string, any>>;
|
|
120
|
+
renderIcon: () => JSX.Element;
|
|
121
|
+
renderDescription: () => string | JSX.Element;
|
|
122
|
+
renderBtn: () => JSX.Element;
|
|
123
|
+
/**
|
|
124
|
+
*
|
|
125
|
+
* @params `success` | `error` | `info` | `warning` | `warn` | `open`
|
|
126
|
+
* @description 显示通知栏,默认为`open`
|
|
127
|
+
*/
|
|
128
|
+
open(mtd: keyof Omit<NotificationApi, "config" | "close" | "destroy">, key?: string): void;
|
|
129
|
+
protected _render(): void;
|
|
130
|
+
}
|
|
131
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare enum OpenDirection {
|
|
3
|
+
LeftTop = "leftTop",
|
|
4
|
+
LeftBottom = "leftBottom",
|
|
5
|
+
RightTop = "rightTop",
|
|
6
|
+
RightBottom = "rightBottom",
|
|
7
|
+
Center = "center"
|
|
8
|
+
}
|
|
9
|
+
export interface GeneralPopupProps {
|
|
10
|
+
popupId?: string;
|
|
11
|
+
visible: boolean;
|
|
12
|
+
popupTitle?: string;
|
|
13
|
+
popupWidth?: React.CSSProperties["width"];
|
|
14
|
+
popupHeight?: React.CSSProperties["height"];
|
|
15
|
+
closePopup?: () => void;
|
|
16
|
+
dragHeaderStyle?: Record<string, any>;
|
|
17
|
+
dragWrapperStyle?: Record<string, any>;
|
|
18
|
+
openDirection?: OpenDirection;
|
|
19
|
+
resize?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function GeneralPopup({ popupId, popupTitle, popupWidth, popupHeight, visible, dragHeaderStyle, dragWrapperStyle, openDirection, closePopup, resize, }: GeneralPopupProps): React.ReactElement;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { UpdatingElement } from "@next-core/brick-kit";
|
|
3
|
+
import { OpenDirection } from "./GeneralPopup";
|
|
4
|
+
export interface GeneralPopupElementProps {
|
|
5
|
+
popupId?: string;
|
|
6
|
+
popupWidth?: React.CSSProperties["width"];
|
|
7
|
+
popupHeight?: React.CSSProperties["height"];
|
|
8
|
+
popupTitle?: string;
|
|
9
|
+
openDirection?: OpenDirection;
|
|
10
|
+
isVisible?: boolean;
|
|
11
|
+
dragHeaderStyle?: Record<string, any>;
|
|
12
|
+
dragWrapperStyle?: Record<string, any>;
|
|
13
|
+
resize?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @id basic-bricks.general-popup
|
|
17
|
+
* @author SheRunFeng
|
|
18
|
+
* @history
|
|
19
|
+
* 1.x.0: 新增构件 `basic-bricks.general-popup`
|
|
20
|
+
* @docKind brick
|
|
21
|
+
* @noInheritDoc
|
|
22
|
+
*/
|
|
23
|
+
export declare class GeneralPopupElement extends UpdatingElement implements GeneralPopupElementProps {
|
|
24
|
+
/**
|
|
25
|
+
* @default -
|
|
26
|
+
* @required false
|
|
27
|
+
* @description 浮层Id, 如果有设置浮层id, 会开启位置记录功能
|
|
28
|
+
*/
|
|
29
|
+
popupId: string;
|
|
30
|
+
/**
|
|
31
|
+
* @default 500
|
|
32
|
+
* @required false
|
|
33
|
+
* @description 弹窗宽度
|
|
34
|
+
*/
|
|
35
|
+
popupWidth: React.CSSProperties["width"];
|
|
36
|
+
/**
|
|
37
|
+
* @default -
|
|
38
|
+
* @required false
|
|
39
|
+
* @description 弹窗高度
|
|
40
|
+
*/
|
|
41
|
+
popupHeight: React.CSSProperties["height"];
|
|
42
|
+
/**
|
|
43
|
+
* @default -
|
|
44
|
+
* @required false
|
|
45
|
+
* @description 弹窗标题
|
|
46
|
+
*/
|
|
47
|
+
popupTitle: string;
|
|
48
|
+
/**
|
|
49
|
+
* @default center
|
|
50
|
+
* @required false
|
|
51
|
+
* @description 弹窗打开位置
|
|
52
|
+
*/
|
|
53
|
+
openDirection: OpenDirection;
|
|
54
|
+
/**
|
|
55
|
+
* @kind boolean
|
|
56
|
+
* @required -
|
|
57
|
+
* @default false
|
|
58
|
+
* @description 是否显示模态框
|
|
59
|
+
* @group advanced
|
|
60
|
+
*/
|
|
61
|
+
isVisible: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* @required false
|
|
64
|
+
* @default -
|
|
65
|
+
* @description 用于设置 popup head的样式
|
|
66
|
+
* @group ui
|
|
67
|
+
*/
|
|
68
|
+
dragHeaderStyle: Record<string, any>;
|
|
69
|
+
/**
|
|
70
|
+
* @required false
|
|
71
|
+
* @default -
|
|
72
|
+
* @description 用于设置 popup wrapper的样式
|
|
73
|
+
* @group ui
|
|
74
|
+
*/
|
|
75
|
+
dragWrapperStyle: Record<string, any>;
|
|
76
|
+
/**
|
|
77
|
+
* @description 是否可调整尺寸
|
|
78
|
+
* @group ui
|
|
79
|
+
*/
|
|
80
|
+
resize?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* @description 显示弹窗
|
|
83
|
+
*/
|
|
84
|
+
open(): void;
|
|
85
|
+
/**
|
|
86
|
+
* @description 关闭弹窗
|
|
87
|
+
*/
|
|
88
|
+
close(): void;
|
|
89
|
+
closePopup: () => void;
|
|
90
|
+
private _shadowRoot;
|
|
91
|
+
constructor();
|
|
92
|
+
connectedCallback(): void;
|
|
93
|
+
disconnectedCallback(): void;
|
|
94
|
+
protected _render(): void;
|
|
95
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
2
|
+
interface GeneralTextProps {
|
|
3
|
+
text: string;
|
|
4
|
+
color?: CSSProperties["color"];
|
|
5
|
+
fontSize?: CSSProperties["fontSize"];
|
|
6
|
+
fontWeight?: CSSProperties["fontWeight"];
|
|
7
|
+
lineHeight?: CSSProperties["lineHeight"];
|
|
8
|
+
display?: CSSProperties["display"];
|
|
9
|
+
textAlign?: CSSProperties["textAlign"];
|
|
10
|
+
customStyle?: CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
export declare function GeneralText(props: GeneralTextProps): React.ReactElement;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
import { UpdatingElement } from "@next-core/brick-kit";
|
|
3
|
+
export interface GeneralTextElementProps {
|
|
4
|
+
text?: string;
|
|
5
|
+
fontSize?: CSSProperties["fontSize"];
|
|
6
|
+
fontWeight?: CSSProperties["fontWeight"];
|
|
7
|
+
color?: CSSProperties["color"];
|
|
8
|
+
lineHeight?: CSSProperties["lineHeight"];
|
|
9
|
+
textAlign?: CSSProperties["textAlign"];
|
|
10
|
+
display?: CSSProperties["display"];
|
|
11
|
+
customStyle?: CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @id basic-bricks.general-text
|
|
15
|
+
* @author SailorShe
|
|
16
|
+
* @history
|
|
17
|
+
* 1.x.0: 新增构件 `basic-bricks.general-text`
|
|
18
|
+
* @docKind brick
|
|
19
|
+
* @noInheritDoc
|
|
20
|
+
*/
|
|
21
|
+
export declare class GeneralTextElement extends UpdatingElement implements GeneralTextElementProps {
|
|
22
|
+
/**
|
|
23
|
+
* @default ''
|
|
24
|
+
* @required false
|
|
25
|
+
* @description 字体文本
|
|
26
|
+
* @group basic
|
|
27
|
+
*/
|
|
28
|
+
text: string;
|
|
29
|
+
/**
|
|
30
|
+
* @default 14px
|
|
31
|
+
* @required false
|
|
32
|
+
* @description 字体大小
|
|
33
|
+
* @group basic
|
|
34
|
+
*/
|
|
35
|
+
fontSize: CSSProperties["fontSize"];
|
|
36
|
+
/**
|
|
37
|
+
* @default normal
|
|
38
|
+
* @required false
|
|
39
|
+
* @description 字体粗细
|
|
40
|
+
* @group basic
|
|
41
|
+
*/
|
|
42
|
+
fontWeight: CSSProperties["fontWeight"];
|
|
43
|
+
/**
|
|
44
|
+
* @default black
|
|
45
|
+
* @required false
|
|
46
|
+
* @description 字体颜色
|
|
47
|
+
* @group basic
|
|
48
|
+
*/
|
|
49
|
+
color: CSSProperties["color"];
|
|
50
|
+
/**
|
|
51
|
+
* @default 14px
|
|
52
|
+
* @required false
|
|
53
|
+
* @description 字体行高
|
|
54
|
+
* @group basic
|
|
55
|
+
*/
|
|
56
|
+
lineHeight: CSSProperties["lineHeight"];
|
|
57
|
+
/**
|
|
58
|
+
* @default left
|
|
59
|
+
* @required false
|
|
60
|
+
* @description 字体对齐方式
|
|
61
|
+
* @group basic
|
|
62
|
+
*/
|
|
63
|
+
textAlign: CSSProperties["textAlign"];
|
|
64
|
+
/**
|
|
65
|
+
* @default inline
|
|
66
|
+
* @required false
|
|
67
|
+
* @description 显示类型, 在文字构件中常用inline inline-block block,其余类型请查看[相关文档](https://developer.mozilla.org/zh-CN/docs/Web/CSS/display)
|
|
68
|
+
* @group basic
|
|
69
|
+
*/
|
|
70
|
+
display: CSSProperties["display"];
|
|
71
|
+
/**
|
|
72
|
+
* @default 使用自定义样式,将会覆盖默认样式
|
|
73
|
+
* @required false
|
|
74
|
+
* @description 自定义样式
|
|
75
|
+
* @group ui
|
|
76
|
+
*/
|
|
77
|
+
customStyle: CSSProperties;
|
|
78
|
+
connectedCallback(): void;
|
|
79
|
+
disconnectedCallback(): void;
|
|
80
|
+
protected _render(): void;
|
|
81
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { UpdatingElement, EventEmitter } from "@next-core/brick-kit";
|
|
2
|
+
export interface GeneralTimerElementProps {
|
|
3
|
+
eventName?: string;
|
|
4
|
+
interval?: number;
|
|
5
|
+
isInterval?: boolean;
|
|
6
|
+
dataSource?: any;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @id basic-bricks.general-timer
|
|
10
|
+
* @name basic-bricks.general-timer
|
|
11
|
+
* @docKind brick
|
|
12
|
+
* @description 启动一个定时发出指定事件的定时器
|
|
13
|
+
* @author cyril
|
|
14
|
+
* @slots
|
|
15
|
+
* @history
|
|
16
|
+
* 1.67.2:新增构件 `basic-bricks.general-timer`
|
|
17
|
+
* @memo
|
|
18
|
+
* @noInheritDoc
|
|
19
|
+
*/
|
|
20
|
+
export declare class GeneralTimerElement extends UpdatingElement implements GeneralTimerElementProps {
|
|
21
|
+
/**
|
|
22
|
+
* @kind string
|
|
23
|
+
* @required false
|
|
24
|
+
* @default general-timer.timing-event
|
|
25
|
+
* @description 定时抛出的事件
|
|
26
|
+
* @group basic
|
|
27
|
+
*/
|
|
28
|
+
eventName: string;
|
|
29
|
+
/**
|
|
30
|
+
* @kind number
|
|
31
|
+
* @required false
|
|
32
|
+
* @default 60000
|
|
33
|
+
* @description 定时间隔(单位:ms)
|
|
34
|
+
* @group basic
|
|
35
|
+
*/
|
|
36
|
+
interval: number;
|
|
37
|
+
/**
|
|
38
|
+
* @default true
|
|
39
|
+
* @required
|
|
40
|
+
* @description 是否开启定时间隔
|
|
41
|
+
*/
|
|
42
|
+
isInterval: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* @kind any
|
|
45
|
+
* @required false
|
|
46
|
+
* @default -
|
|
47
|
+
* @description 抛出事件的数据
|
|
48
|
+
* @group basic
|
|
49
|
+
*/
|
|
50
|
+
dataSource: any;
|
|
51
|
+
private _intervalId;
|
|
52
|
+
private _stopped;
|
|
53
|
+
private defaultEventName;
|
|
54
|
+
private defaultInterval;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @description 停止timer
|
|
58
|
+
*/
|
|
59
|
+
stopTimer(): void;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @description 重启timer
|
|
63
|
+
*/
|
|
64
|
+
reStartTimer(): void;
|
|
65
|
+
timeChangeEvent: EventEmitter;
|
|
66
|
+
connectedCallback(): void;
|
|
67
|
+
disconnectedCallback(): void;
|
|
68
|
+
private startTimeout;
|
|
69
|
+
protected _render(): void;
|
|
70
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { UseBrickConf } from "@next-core/brick-types";
|
|
3
|
+
interface GeneralTitleProps {
|
|
4
|
+
mainTitle: string;
|
|
5
|
+
subTitle?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
target?: string;
|
|
9
|
+
titleSuffixBrick?: {
|
|
10
|
+
useBrick: UseBrickConf;
|
|
11
|
+
};
|
|
12
|
+
descPrefixBrick?: {
|
|
13
|
+
useBrick: UseBrickConf;
|
|
14
|
+
};
|
|
15
|
+
dataSource?: Record<string, any>;
|
|
16
|
+
descSuffixBrick?: {
|
|
17
|
+
useBrick: UseBrickConf;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare function GeneralTitle(props: GeneralTitleProps): React.ReactElement;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { UpdatingElement } from "@next-core/brick-kit";
|
|
2
|
+
import { UseBrickConf } from "@next-core/brick-types";
|
|
3
|
+
export interface GeneralTitleElementProps {
|
|
4
|
+
mainTitle?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
subTitle?: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
target?: string;
|
|
9
|
+
descPrefixBrick?: {
|
|
10
|
+
useBrick: UseBrickConf;
|
|
11
|
+
};
|
|
12
|
+
titleSuffixBrick?: {
|
|
13
|
+
useBrick: UseBrickConf;
|
|
14
|
+
};
|
|
15
|
+
descSuffixBrick?: {
|
|
16
|
+
useBrick: UseBrickConf;
|
|
17
|
+
};
|
|
18
|
+
dataSource?: Record<string, any>;
|
|
19
|
+
fields?: {
|
|
20
|
+
mainTitle?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
subTitle?: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @id basic-bricks.general-title
|
|
27
|
+
* @author astrid
|
|
28
|
+
* @slots
|
|
29
|
+
* @history
|
|
30
|
+
* 1.139.0: 新增构件 `basic-bricks.general-title`
|
|
31
|
+
* @docKind brick
|
|
32
|
+
* @noInheritDoc
|
|
33
|
+
*/
|
|
34
|
+
export declare class GeneralTitleElement extends UpdatingElement implements GeneralTitleElementProps {
|
|
35
|
+
/**
|
|
36
|
+
* @kind `string`
|
|
37
|
+
* @required true
|
|
38
|
+
* @default
|
|
39
|
+
* @description 标题
|
|
40
|
+
* @group basic
|
|
41
|
+
*/
|
|
42
|
+
mainTitle: string;
|
|
43
|
+
/**
|
|
44
|
+
* @kind `string`
|
|
45
|
+
* @required false
|
|
46
|
+
* @default
|
|
47
|
+
* @description 描述
|
|
48
|
+
* @group basic
|
|
49
|
+
*/
|
|
50
|
+
description: string;
|
|
51
|
+
/**
|
|
52
|
+
* @kind `string`
|
|
53
|
+
* @required
|
|
54
|
+
* @default
|
|
55
|
+
* @description 副标题
|
|
56
|
+
* @group basic
|
|
57
|
+
*/
|
|
58
|
+
subTitle: string;
|
|
59
|
+
/**
|
|
60
|
+
* @kind `string`
|
|
61
|
+
* @required false
|
|
62
|
+
* @default
|
|
63
|
+
* @description 链接,点击标题时跳转
|
|
64
|
+
* @group basic
|
|
65
|
+
*/
|
|
66
|
+
url: string;
|
|
67
|
+
/**
|
|
68
|
+
* @kind `string`
|
|
69
|
+
* @required false
|
|
70
|
+
* @default
|
|
71
|
+
* @description title跳转 target,例如可以设置成 _blank
|
|
72
|
+
* @group basic
|
|
73
|
+
*/
|
|
74
|
+
target: string;
|
|
75
|
+
/**
|
|
76
|
+
* @kind `{useBrick: UseBrickConf }`
|
|
77
|
+
* @required false
|
|
78
|
+
* @default
|
|
79
|
+
* @description 可以在描述前添加前缀
|
|
80
|
+
* @group other
|
|
81
|
+
*/
|
|
82
|
+
descPrefixBrick: {
|
|
83
|
+
useBrick: UseBrickConf;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* @kind `{useBrick: UseBrickConf }
|
|
87
|
+
* @required false
|
|
88
|
+
* @default
|
|
89
|
+
* @description 可以在标题后添加后缀
|
|
90
|
+
* @group other
|
|
91
|
+
*/
|
|
92
|
+
titleSuffixBrick: {
|
|
93
|
+
useBrick: UseBrickConf;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* @kind `{useBrick: UseBrickConf }`
|
|
97
|
+
* @required false
|
|
98
|
+
* @default
|
|
99
|
+
* @description 可以在描述后面添加后缀
|
|
100
|
+
* @group other
|
|
101
|
+
*/
|
|
102
|
+
descSuffixBrick: {
|
|
103
|
+
useBrick: UseBrickConf;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* @kind ` Record<string, any>`
|
|
107
|
+
* @required false
|
|
108
|
+
* @default
|
|
109
|
+
* @description 数据源
|
|
110
|
+
* @group other
|
|
111
|
+
*/
|
|
112
|
+
dataSource: Record<string, any>;
|
|
113
|
+
/**
|
|
114
|
+
* @kind ` {mainTitle?: string; subTitle?: string; description?: string;}`
|
|
115
|
+
* @required false
|
|
116
|
+
* @default
|
|
117
|
+
* @description 字段映射, 跟 dataSource 一起使用来获得运行时 mainTitle、 description
|
|
118
|
+
* @group other
|
|
119
|
+
*/
|
|
120
|
+
fields: {
|
|
121
|
+
mainTitle?: string;
|
|
122
|
+
description?: string;
|
|
123
|
+
subTitle?: string;
|
|
124
|
+
};
|
|
125
|
+
private initData;
|
|
126
|
+
connectedCallback(): void;
|
|
127
|
+
disconnectedCallback(): void;
|
|
128
|
+
protected _render(): void;
|
|
129
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { UpdatingElement } from "@next-core/brick-kit";
|
|
2
|
+
export interface GridLayoutElementProps {
|
|
3
|
+
columns?: number;
|
|
4
|
+
columnSpan?: number;
|
|
5
|
+
rows?: number;
|
|
6
|
+
rowSpan?: number;
|
|
7
|
+
templateColumns?: string;
|
|
8
|
+
responsive?: ResponsiveSettings;
|
|
9
|
+
gap?: string;
|
|
10
|
+
showGridBorder?: boolean;
|
|
11
|
+
gridBorderColor?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ResponsiveSettings {
|
|
14
|
+
large?: GridSettings;
|
|
15
|
+
medium?: GridSettings;
|
|
16
|
+
small?: GridSettings;
|
|
17
|
+
xSmall?: GridSettings;
|
|
18
|
+
}
|
|
19
|
+
export interface GridSettings {
|
|
20
|
+
columns?: number;
|
|
21
|
+
rows?: number;
|
|
22
|
+
templateColumns?: string;
|
|
23
|
+
columnSpan?: number;
|
|
24
|
+
rowSpan?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @id basic-bricks.grid-layout
|
|
28
|
+
* @name basic-bricks.grid-layout
|
|
29
|
+
* @docKind brick
|
|
30
|
+
* @description 提供多行多列的响应式网格布局
|
|
31
|
+
* @author steve
|
|
32
|
+
* @slots
|
|
33
|
+
* @history
|
|
34
|
+
* @memo
|
|
35
|
+
* ### 响应式布局说明
|
|
36
|
+
|
|
37
|
+
*Bootstrap 等 UI 框架是移动优先的设计,它们的响应式为默认匹配小屏幕,并由小到大适配。而 EasyOps 平台以 PC 优先,并由大到小适配。这里我们针对常见桌面显示器大小,分为以下五档(屏幕宽度):
|
|
38
|
+
|
|
39
|
+
* - `xSmall`:<= 1024px (老式投影仪)
|
|
40
|
+
* - `small`:<= 1280px (13 寸笔记本)
|
|
41
|
+
* - `medium`:<= 1600px (中等显示器)
|
|
42
|
+
* - `large`:<= 1920px (大号显示器)
|
|
43
|
+
* - 其它:超大显示器
|
|
44
|
+
|
|
45
|
+
* 例如以下设置:
|
|
46
|
+
|
|
47
|
+
*```json
|
|
48
|
+
*{
|
|
49
|
+
* "columns": 3,
|
|
50
|
+
* "responsive": {
|
|
51
|
+
* "medium": {
|
|
52
|
+
* "columns": 2
|
|
53
|
+
* },
|
|
54
|
+
* "small": {
|
|
55
|
+
* "columns": 1
|
|
56
|
+
* }
|
|
57
|
+
* }
|
|
58
|
+
*}
|
|
59
|
+
*```
|
|
60
|
+
|
|
61
|
+
*在 `> 1600px` 的屏幕上时将显示为三列,`<= 1600px && > 1280px` 时显示两列,更小的屏幕显示为一列。
|
|
62
|
+
*/
|
|
63
|
+
export declare class GridLayoutElement extends UpdatingElement implements GridLayoutElementProps {
|
|
64
|
+
private _mountPoint;
|
|
65
|
+
private _sizeMatch;
|
|
66
|
+
private _mediaMatchListeners;
|
|
67
|
+
/**
|
|
68
|
+
* @kind number
|
|
69
|
+
* @default -
|
|
70
|
+
* @description 网格布局列数(各列等宽)
|
|
71
|
+
* @group basic
|
|
72
|
+
*/
|
|
73
|
+
columns?: number;
|
|
74
|
+
/**
|
|
75
|
+
* @kind number
|
|
76
|
+
* @default auto
|
|
77
|
+
* @description 自己在父级网格中所占列数
|
|
78
|
+
* @group basic
|
|
79
|
+
*/
|
|
80
|
+
columnSpan?: number;
|
|
81
|
+
/**
|
|
82
|
+
* @kind number
|
|
83
|
+
* @default 1
|
|
84
|
+
* @description 网格布局行数,通常不需设置,各行高度由内容决定。设置为 > 1 时,各行高度相同。
|
|
85
|
+
* @group basic
|
|
86
|
+
*/
|
|
87
|
+
rows?: number;
|
|
88
|
+
/**
|
|
89
|
+
* @kind number
|
|
90
|
+
* @default 1
|
|
91
|
+
* @description 自己在父级网格中所占行数
|
|
92
|
+
* @group basic
|
|
93
|
+
*/
|
|
94
|
+
rowSpan?: number;
|
|
95
|
+
/**
|
|
96
|
+
* @kind string
|
|
97
|
+
* @default -
|
|
98
|
+
* @description 网格布局模板列,即 CSS 的 gridTemplateColumns,优先于 `columns`。
|
|
99
|
+
* @group basic
|
|
100
|
+
*/
|
|
101
|
+
templateColumns?: string;
|
|
102
|
+
/**
|
|
103
|
+
* @kind ResponsiveSettings
|
|
104
|
+
* @default 1
|
|
105
|
+
* @description 响应式布局设置
|
|
106
|
+
* @group basic
|
|
107
|
+
*/
|
|
108
|
+
responsive?: ResponsiveSettings;
|
|
109
|
+
/**
|
|
110
|
+
* @kind string
|
|
111
|
+
* @default "var(--page-card-gap)"
|
|
112
|
+
* @description 子元素之间的间距
|
|
113
|
+
* @group basic
|
|
114
|
+
*/
|
|
115
|
+
gap: string;
|
|
116
|
+
/**
|
|
117
|
+
* @kind Boolean
|
|
118
|
+
* @default false
|
|
119
|
+
* @description 网格布局边框
|
|
120
|
+
* @group basic
|
|
121
|
+
*/
|
|
122
|
+
showGridBorder: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* @kind string
|
|
125
|
+
* @default #454547
|
|
126
|
+
* @description 网格布局边框颜色
|
|
127
|
+
*/
|
|
128
|
+
gridBorderColor: string;
|
|
129
|
+
constructor();
|
|
130
|
+
connectedCallback(): void;
|
|
131
|
+
disconnectedCallback(): void;
|
|
132
|
+
private _clearMediaMatchListeners;
|
|
133
|
+
protected _render(): void;
|
|
134
|
+
}
|