@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.
Files changed (143) hide show
  1. package/deploy/contract.yaml +81 -81
  2. package/dist/bricks.json +26 -26
  3. package/dist/index.5b6d32e5.js +10 -0
  4. package/dist/index.5b6d32e5.js.map +1 -0
  5. package/dist/stories.json +5 -0
  6. package/dist/types/basic-bricks/src/advance-list-container/AdvanceListContainer.d.ts +20 -0
  7. package/dist/types/basic-bricks/src/advance-list-container/index.d.ts +141 -0
  8. package/dist/types/basic-bricks/src/app-bar/AppBar/AppBar.d.ts +10 -0
  9. package/dist/types/basic-bricks/src/app-bar/AppBarBreadcrumb/AppBarBreadcrumb.d.ts +11 -0
  10. package/dist/types/basic-bricks/src/app-bar/AppBarTips/AppBarTips.d.ts +15 -0
  11. package/dist/types/basic-bricks/src/app-bar/AppDocumentLink/AppDocumentLink.d.ts +9 -0
  12. package/dist/types/basic-bricks/src/app-bar/AppSetting/AppSetting.d.ts +5 -0
  13. package/dist/types/basic-bricks/src/app-bar/Desktop/Desktop.d.ts +10 -0
  14. package/dist/types/basic-bricks/src/app-bar/DesktopApp/DesktopApp.d.ts +12 -0
  15. package/dist/types/basic-bricks/src/app-bar/DesktopCell/DesktopCell.d.ts +13 -0
  16. package/dist/types/basic-bricks/src/app-bar/DesktopCustom/DesktopCustom.d.ts +13 -0
  17. package/dist/types/basic-bricks/src/app-bar/DesktopDir/DesktopDir.d.ts +3 -0
  18. package/dist/types/basic-bricks/src/app-bar/DesktopDirContent/DesktopDirContent.d.ts +7 -0
  19. package/dist/types/basic-bricks/src/app-bar/DesktopDirContext.d.ts +16 -0
  20. package/dist/types/basic-bricks/src/app-bar/DesktopSlider/DesktopSlider.d.ts +10 -0
  21. package/dist/types/basic-bricks/src/app-bar/DesktopSlider/desktopCursor.d.ts +2 -0
  22. package/dist/types/basic-bricks/src/app-bar/FavoriteDesktopCell/FavoriteDesktopCell.d.ts +8 -0
  23. package/dist/types/basic-bricks/src/app-bar/Launchpad/Launchpad.d.ts +5 -0
  24. package/dist/types/basic-bricks/src/app-bar/LaunchpadButton/LaunchpadButton.d.ts +2 -0
  25. package/dist/types/basic-bricks/src/app-bar/LaunchpadPortal/LaunchpadPortal.d.ts +6 -0
  26. package/dist/types/basic-bricks/src/app-bar/LaunchpadService.d.ts +65 -0
  27. package/dist/types/basic-bricks/src/app-bar/LaunchpadSettingsContext.d.ts +7 -0
  28. package/dist/types/basic-bricks/src/app-bar/LaunchpadWrapper/LaunchpadWrapper.d.ts +6 -0
  29. package/dist/types/basic-bricks/src/app-bar/License-notification/LicenseNotification.d.ts +6 -0
  30. package/dist/types/basic-bricks/src/app-bar/MyDesktop/MyDesktop.d.ts +7 -0
  31. package/dist/types/basic-bricks/src/app-bar/SearchBar/SearchBar.d.ts +5 -0
  32. package/dist/types/basic-bricks/src/app-bar/index.d.ts +5 -0
  33. package/dist/types/basic-bricks/src/app-bar/interfaces.d.ts +4 -0
  34. package/dist/types/basic-bricks/src/app-bar/site-map/SiteMap.d.ts +20 -0
  35. package/dist/types/basic-bricks/src/app-bar/utils/getImageUrl.d.ts +2 -0
  36. package/dist/types/basic-bricks/src/app-bar-breadcrumb/AppbarBreadcrumb.d.ts +3 -0
  37. package/dist/types/basic-bricks/src/app-bar-breadcrumb/index.d.ts +33 -0
  38. package/dist/types/basic-bricks/src/app-bar-logo/AppBarLogo.d.ts +2 -0
  39. package/dist/types/basic-bricks/src/app-bar-logo/index.d.ts +19 -0
  40. package/dist/types/basic-bricks/src/app-bar-setting/AppBarSetting.d.ts +5 -0
  41. package/dist/types/basic-bricks/src/app-bar-setting/index.d.ts +24 -0
  42. package/dist/types/basic-bricks/src/app-bar-wrapper/AppBarWrapper.d.ts +6 -0
  43. package/dist/types/basic-bricks/src/app-bar-wrapper/index.d.ts +28 -0
  44. package/dist/types/basic-bricks/src/app-document-link/AppDocumentLink.d.ts +6 -0
  45. package/dist/types/basic-bricks/src/app-document-link/index.d.ts +31 -0
  46. package/dist/types/basic-bricks/src/brick-error/BrickError.d.ts +8 -0
  47. package/dist/types/basic-bricks/src/brick-error/index.d.ts +37 -0
  48. package/dist/types/basic-bricks/src/delete-confirm-modal/DeleteConfirmModal.d.ts +11 -0
  49. package/dist/types/basic-bricks/src/delete-confirm-modal/index.d.ts +35 -0
  50. package/dist/types/basic-bricks/src/easy-view/EasyView.d.ts +11 -0
  51. package/dist/types/basic-bricks/src/easy-view/index.d.ts +56 -0
  52. package/dist/types/basic-bricks/src/event-agent/index.d.ts +25 -0
  53. package/dist/types/basic-bricks/src/export-json-file/index.d.ts +51 -0
  54. package/dist/types/basic-bricks/src/flex-layout/index.d.ts +55 -0
  55. package/dist/types/basic-bricks/src/fold-brick/FoldBrick.d.ts +10 -0
  56. package/dist/types/basic-bricks/src/fold-brick/index.d.ts +28 -0
  57. package/dist/types/basic-bricks/src/fold-brick-v2/FoldBrickV2.d.ts +17 -0
  58. package/dist/types/basic-bricks/src/fold-brick-v2/index.d.ts +133 -0
  59. package/dist/types/basic-bricks/src/general-anchor/GeneralAnchor.d.ts +17 -0
  60. package/dist/types/basic-bricks/src/general-anchor/index.d.ts +91 -0
  61. package/dist/types/basic-bricks/src/general-button/GeneralButton.d.ts +38 -0
  62. package/dist/types/basic-bricks/src/general-button/index.d.ts +249 -0
  63. package/dist/types/basic-bricks/src/general-card/GeneralCard.d.ts +15 -0
  64. package/dist/types/basic-bricks/src/general-card/index.d.ts +120 -0
  65. package/dist/types/basic-bricks/src/general-custom-buttons/GeneralCustomButtons.d.ts +31 -0
  66. package/dist/types/basic-bricks/src/general-custom-buttons/index.d.ts +235 -0
  67. package/dist/types/basic-bricks/src/general-drawer/GeneralDrawer.d.ts +27 -0
  68. package/dist/types/basic-bricks/src/general-drawer/index.d.ts +191 -0
  69. package/dist/types/basic-bricks/src/general-heading/GeneralHeading.d.ts +9 -0
  70. package/dist/types/basic-bricks/src/general-heading/index.d.ts +43 -0
  71. package/dist/types/basic-bricks/src/general-hotkeys/index.d.ts +57 -0
  72. package/dist/types/basic-bricks/src/general-modal/GeneralModal.d.ts +33 -0
  73. package/dist/types/basic-bricks/src/general-modal/index.d.ts +330 -0
  74. package/dist/types/basic-bricks/src/general-notification/index.d.ts +131 -0
  75. package/dist/types/basic-bricks/src/general-popup/GeneralPopup.d.ts +21 -0
  76. package/dist/types/basic-bricks/src/general-popup/index.d.ts +95 -0
  77. package/dist/types/basic-bricks/src/general-text/GeneralText.d.ts +13 -0
  78. package/dist/types/basic-bricks/src/general-text/index.d.ts +81 -0
  79. package/dist/types/basic-bricks/src/general-timer/index.d.ts +70 -0
  80. package/dist/types/basic-bricks/src/general-title/GeneralTitle.d.ts +21 -0
  81. package/dist/types/basic-bricks/src/general-title/index.d.ts +129 -0
  82. package/dist/types/basic-bricks/src/grid-layout/index.d.ts +134 -0
  83. package/dist/types/basic-bricks/src/header-bar/HeaderBar.d.ts +6 -0
  84. package/dist/types/basic-bricks/src/header-bar/index.d.ts +46 -0
  85. package/dist/types/basic-bricks/src/home-redirect/index.d.ts +45 -0
  86. package/dist/types/basic-bricks/src/i18n/constants.d.ts +34 -0
  87. package/dist/types/basic-bricks/src/index-card/IndexCard.d.ts +7 -0
  88. package/dist/types/basic-bricks/src/index-card/index.d.ts +39 -0
  89. package/dist/types/basic-bricks/src/interfaces/general-card.d.ts +11 -0
  90. package/dist/types/basic-bricks/src/interfaces/index.d.ts +1 -0
  91. package/dist/types/basic-bricks/src/jsx.d.ts +172 -0
  92. package/dist/types/basic-bricks/src/launchpad-button/index.d.ts +18 -0
  93. package/dist/types/basic-bricks/src/list-container/ListContainer.d.ts +12 -0
  94. package/dist/types/basic-bricks/src/list-container/index.d.ts +71 -0
  95. package/dist/types/basic-bricks/src/loading-bar/LoadingBar.d.ts +2 -0
  96. package/dist/types/basic-bricks/src/loading-bar/index.d.ts +2 -0
  97. package/dist/types/basic-bricks/src/magic-brick/MagicBrick.d.ts +7 -0
  98. package/dist/types/basic-bricks/src/magic-brick/index.d.ts +36 -0
  99. package/dist/types/basic-bricks/src/menu-bar/AppMenu/AppMenu.d.ts +7 -0
  100. package/dist/types/basic-bricks/src/menu-bar/AppMenu/MenuTooltip/MenuTooltip.d.ts +7 -0
  101. package/dist/types/basic-bricks/src/menu-bar/AppSubMenu/AppSubMenu.d.ts +8 -0
  102. package/dist/types/basic-bricks/src/menu-bar/CollapseBar/CollapseBar.d.ts +6 -0
  103. package/dist/types/basic-bricks/src/menu-bar/LogoBar/LogoBar.d.ts +2 -0
  104. package/dist/types/basic-bricks/src/menu-bar/MenuBar/MenuBar.d.ts +7 -0
  105. package/dist/types/basic-bricks/src/menu-bar/index.d.ts +96 -0
  106. package/dist/types/basic-bricks/src/micro-app/BtnExitDashboardMode.d.ts +2 -0
  107. package/dist/types/basic-bricks/src/micro-app/MicroApp.d.ts +13 -0
  108. package/dist/types/basic-bricks/src/micro-app/index.d.ts +152 -0
  109. package/dist/types/basic-bricks/src/multiple-columns-card/MultipleColumnsCard.d.ts +7 -0
  110. package/dist/types/basic-bricks/src/multiple-columns-card/index.d.ts +38 -0
  111. package/dist/types/basic-bricks/src/page-error/PageError.d.ts +7 -0
  112. package/dist/types/basic-bricks/src/page-error/index.d.ts +4 -0
  113. package/dist/types/basic-bricks/src/page-not-found/PageNotFound.d.ts +6 -0
  114. package/dist/types/basic-bricks/src/page-not-found/index.d.ts +10 -0
  115. package/dist/types/basic-bricks/src/page-title/PageTitle.d.ts +8 -0
  116. package/dist/types/basic-bricks/src/page-title/index.d.ts +36 -0
  117. package/dist/types/basic-bricks/src/popover-container/PopoverContainer.d.ts +39 -0
  118. package/dist/types/basic-bricks/src/popover-container/index.d.ts +244 -0
  119. package/dist/types/basic-bricks/src/print-button/PrintButton.d.ts +10 -0
  120. package/dist/types/basic-bricks/src/print-button/index.d.ts +68 -0
  121. package/dist/types/basic-bricks/src/quick-visit-menu/FavouriteMenu.d.ts +3 -0
  122. package/dist/types/basic-bricks/src/quick-visit-menu/MenuTag.d.ts +14 -0
  123. package/dist/types/basic-bricks/src/quick-visit-menu/QuickVisitMenu.d.ts +34 -0
  124. package/dist/types/basic-bricks/src/quick-visit-menu/index.d.ts +92 -0
  125. package/dist/types/basic-bricks/src/redirect-to/index.d.ts +74 -0
  126. package/dist/types/basic-bricks/src/resizable-box/ResizableBox.d.ts +14 -0
  127. package/dist/types/basic-bricks/src/resizable-box/index.d.ts +38 -0
  128. package/dist/types/basic-bricks/src/script-brick/index.d.ts +91 -0
  129. package/dist/types/basic-bricks/src/shared/DeferredService.d.ts +10 -0
  130. package/dist/types/basic-bricks/src/sub-menu/SubMenu.d.ts +11 -0
  131. package/dist/types/basic-bricks/src/sub-menu/index.d.ts +49 -0
  132. package/dist/types/basic-bricks/src/sub-menu-filter/SubMenuFilter.d.ts +38 -0
  133. package/dist/types/basic-bricks/src/sub-menu-filter/index.d.ts +204 -0
  134. package/dist/types/basic-bricks/src/transform-agent/index.d.ts +54 -0
  135. package/dist/types/basic-bricks/src/utils.d.ts +1 -0
  136. package/dist/types/basic-bricks/src/virtual-list-container/VirtualListContainer.d.ts +16 -0
  137. package/dist/types/basic-bricks/src/virtual-list-container/index.d.ts +63 -0
  138. package/dist/types/presentational-bricks/src/brick-illustration/BrickIllustration.d.ts +14 -0
  139. package/dist/types/presentational-bricks/src/brick-illustration/index.d.ts +87 -0
  140. package/dist/types/presentational-bricks/src/brick-result/components/IllustrationWrapper.d.ts +16 -0
  141. package/package.json +5 -4
  142. package/dist/index.76908742.js +0 -10
  143. package/dist/index.76908742.js.map +0 -1
@@ -0,0 +1,191 @@
1
+ import { UpdatingElement, EventEmitter } from "@next-core/brick-kit";
2
+ import { DrawerProps } from "antd/lib/drawer";
3
+ export interface GeneralDrawerElementProps {
4
+ width?: number | string;
5
+ bodyStyle?: Record<string, any>;
6
+ drawerStyle?: Record<string, any>;
7
+ headerStyle?: Record<string, any>;
8
+ configProps?: DrawerProps;
9
+ }
10
+ export interface OpenCloseOption {
11
+ noEvent?: boolean;
12
+ }
13
+ /**
14
+ * 文字和图标只会显示其中一个,优先显示图标,文字最多显示4个字符。
15
+ */
16
+ export interface ICustomSwitchConfig {
17
+ openText?: string;
18
+ openIcon?: any;
19
+ closeText?: string;
20
+ closeIcon?: any;
21
+ top?: string;
22
+ }
23
+ /**
24
+ * @id basic-bricks.general-drawer
25
+ * @name basic-bricks.general-drawer
26
+ * @docKind brick
27
+ * @description 提供插槽以展示其他构件
28
+ * @author ice
29
+ * @slots
30
+ * headerLeft:标题左侧插槽位,当设置 `customTitle` 属性时,该插槽无效
31
+ * headerRight:标题右侧插槽位,当使用该插槽时,应设置 `closable` 为 false
32
+ * content:内容插槽位
33
+ * footer:底部插槽位,仅当 `hasFooter` 为真时,该插槽才会存在
34
+ * @history
35
+ * 1.60.0:`open` 和 `close` 方法新增 `noEvent` 选项
36
+ * 1.34.0:新增插槽 `headerLeft`, `headerRight` 和 `footer`,新增 `general.drawer.open` 事件
37
+ * 1.30.0:新增 `bodyStyle` 和 `drawerStyle` 配置
38
+ * @memo
39
+ * ### OpenCloseOption
40
+
41
+ * | property | type | required | default | description |
42
+ * | -------- | --------- | -------- | ------- | ----------- |
43
+ * | noEvent | `boolean` | - | - | 不触发事件 |
44
+ * @noInheritDoc
45
+ */
46
+ export declare class GeneralDrawerElement extends UpdatingElement implements GeneralDrawerElementProps {
47
+ private _mountPoint;
48
+ private isVisible;
49
+ /**
50
+ * @kind string
51
+ * @required false
52
+ * @default -
53
+ * @description 标题
54
+ * @group basic
55
+ */
56
+ customTitle: string;
57
+ /**
58
+ * @kind boolean
59
+ * @required false
60
+ * @default -
61
+ * @description 点击蒙层是否允许关闭
62
+ * @group basic
63
+ */
64
+ maskClosable: boolean;
65
+ /**
66
+ * @kind number
67
+ * @required false
68
+ * @default -
69
+ * @description 宽度
70
+ * @group basic
71
+ */
72
+ width: number | string;
73
+ /**
74
+ * @kind boolean
75
+ * @required false
76
+ * @default -
77
+ * @description 是否显示右上角的关闭按钮
78
+ * @group basic
79
+ */
80
+ closable: boolean;
81
+ /**
82
+ * @kind boolean
83
+ * @required false
84
+ * @default false
85
+ * @description 是否提供 `footer` 插槽
86
+ * @group basic
87
+ */
88
+ hasFooter: boolean;
89
+ /**
90
+ * @kind boolean
91
+ * @required false
92
+ * @default -
93
+ * @description 是否显示loading效果
94
+ * @group ui
95
+ */
96
+ loading: boolean;
97
+ /**
98
+ * @kind boolean
99
+ * @required false
100
+ * @default true
101
+ * @description 是否展示遮罩
102
+ * @group ui
103
+ */
104
+ mask: boolean;
105
+ /**
106
+ * @kind Record<string, any>
107
+ * @required false
108
+ * @default -
109
+ * @description 可用于设置 Drawer 内容部分的样式
110
+ * @group ui
111
+ */
112
+ bodyStyle: Record<string, any>;
113
+ /**
114
+ * @kind Record<string, any>
115
+ * @required false
116
+ * @default -
117
+ * @description 用于设置 Drawer 弹出层的样式
118
+ * @group ui
119
+ */
120
+ drawerStyle: Record<string, any>;
121
+ /**
122
+ * @kind Record<string, any>
123
+ * @required false
124
+ * @default -
125
+ * @description 用于设置 Drawer 头部的样式
126
+ * @group ui
127
+ */
128
+ headerStyle: Record<string, any>;
129
+ /**
130
+ * @default false
131
+ * @required false
132
+ * @description 是否浮层样式,如果设为true,则抽屉边缘会有外边距,圆角和阴影
133
+ * @group ui
134
+ */
135
+ isFloat: boolean;
136
+ /**
137
+ * @kind object
138
+ * @required false
139
+ * @default -
140
+ * @description 完全透传给 antd 的 Drawer 属性,详见:[https://ant.design/components/drawer-cn/#API](https://ant.design/components/drawer-cn/#API)
141
+ * @group other
142
+ */
143
+ configProps: DrawerProps;
144
+ hasOuterSwitch: boolean;
145
+ useBigOuterSwitch: boolean;
146
+ customSwitchConfig: ICustomSwitchConfig;
147
+ /**
148
+ * @kind boolean
149
+ * @required false
150
+ * @default -
151
+ * @description 打开抽屉时内容区是否自动滚动到顶部
152
+ * @group other
153
+ */
154
+ scrollToTopWhenOpen: boolean;
155
+ /**
156
+ * @description 是否可堆叠,开启后每次打开抽屉会将新的抽屉置于上层(zIndex ++)。注意:仅初始设置有效。
157
+ */
158
+ stackable: boolean;
159
+ private _stack;
160
+ constructor();
161
+ connectedCallback(): void;
162
+ listenOnClose(): void;
163
+ disconnectedCallback(): void;
164
+ protected _render(): void;
165
+ /**
166
+ *
167
+ * @detail
168
+ * @description 构件打开时所发出的事件, 事件数据为空
169
+ */
170
+ drawerOpen: EventEmitter<Record<string, any>>;
171
+ /**
172
+ *
173
+ * @description 显示抽屉构件
174
+ */
175
+ open(option?: OpenCloseOption): void;
176
+ /**
177
+ * @description 抽屉内部内容上下滚动
178
+ */
179
+ bodyScroll(top: number): void;
180
+ /**
181
+ *
182
+ * @detail
183
+ * @description 构件关闭时所发出的事件, 事件数据为空
184
+ */
185
+ drawerClose: EventEmitter<Record<string, any>>;
186
+ /**
187
+ *
188
+ * @description 显示抽屉构件
189
+ */
190
+ close(option?: OpenCloseOption): void;
191
+ }
@@ -0,0 +1,9 @@
1
+ import React, { CSSProperties } from "react";
2
+ declare type headType = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
3
+ interface GeneralHeaderProps {
4
+ text: string;
5
+ type?: headType;
6
+ customStyle?: CSSProperties;
7
+ }
8
+ export declare function GeneralHeading(props: GeneralHeaderProps): React.ReactElement;
9
+ export {};
@@ -0,0 +1,43 @@
1
+ import { CSSProperties } from "react";
2
+ import { UpdatingElement } from "@next-core/brick-kit";
3
+ export interface GeneralHeadingElementProps {
4
+ text?: string;
5
+ type?: headType;
6
+ customStyle?: CSSProperties;
7
+ }
8
+ declare type headType = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
9
+ /**
10
+ * @id basic-bricks.general-heading
11
+ * @author MJmajiong
12
+ * @history
13
+ * 1.x.0: 新增构件 `basic-bricks.general-heading`
14
+ * @docKind brick
15
+ * @noInheritDoc
16
+ */
17
+ export declare class GeneralHeadingElement extends UpdatingElement implements GeneralHeadingElementProps {
18
+ /**
19
+ * @default ''
20
+ * @required true
21
+ * @description 字体文本
22
+ * @group basic
23
+ */
24
+ text: string;
25
+ /**
26
+ * @default h1
27
+ * @required true
28
+ * @description 标题类型 h1-h6
29
+ * @group basic
30
+ */
31
+ type: headType;
32
+ /**
33
+ * @default 使用自定义样式,将会覆盖默认样式
34
+ * @required false
35
+ * @description 自定义样式
36
+ * @group ui
37
+ */
38
+ customStyle: CSSProperties;
39
+ connectedCallback(): void;
40
+ disconnectedCallback(): void;
41
+ protected _render(): void;
42
+ }
43
+ export {};
@@ -0,0 +1,57 @@
1
+ import { UpdatingElement } from "@next-core/brick-kit";
2
+ export interface GeneralHotkeysElementProps {
3
+ hotkeysConfig?: HotkeysConfig[];
4
+ disabled?: boolean;
5
+ }
6
+ interface HotkeysConfig {
7
+ key: string;
8
+ eventName: string;
9
+ }
10
+ /**
11
+ * @id basic-bricks.general-hotkeys
12
+ * @name basic-bricks.general-hotkeys
13
+ * @docKind brick
14
+ * @description 可配置通用快捷键以及相关事件名
15
+ * @author lynette
16
+ * @slots
17
+ * @history
18
+ * 1.66.0:新增构件 `basic-bricks.general-hotkeys`
19
+ * @memo
20
+ * ### Supported Keys
21
+
22
+ * HotKeys 构件可以识别以下修饰符,方便配置:`⇧`, `shift`, `option`, `⌥`, `alt`, `ctrl`, `control`, `command`和 `⌘`.
23
+
24
+ * 以下特殊键可用于配置快捷键:`backspace`, `tab`, `clear`, `enter`, `return`, `esc`, `escape`, `space`, `up`, `down`, `left`, `right`, `home`, `end`, `pageup`, `pagedown`, `del`, `delete` , `f1` 到 `f19`.
25
+
26
+ * 其中:
27
+
28
+ * - `⌘` Command()
29
+ * - `⌃` Control
30
+ * - `⌥` Option(alt)
31
+ * - `⇧` Shift
32
+ * - `⇪` Caps Lock(Capital)
33
+ * - `↩︎` return/Enter space
34
+ * @noInheritDoc
35
+ */
36
+ export declare class GeneralHotkeysElement extends UpdatingElement implements GeneralHotkeysElementProps {
37
+ /**
38
+ * @kind {key: string,eventName: string}[]
39
+ * @required false
40
+ * @default -
41
+ * @description 快捷键配置,支持的 keys 列表如下
42
+ * @group basic
43
+ */
44
+ hotkeysConfig: HotkeysConfig[];
45
+ /**
46
+ * @kind boolean
47
+ * @required false
48
+ * @default false
49
+ * @group basic
50
+ * @description 是否禁用
51
+ */
52
+ disabled: boolean;
53
+ connectedCallback(): void;
54
+ disconnectedCallback(): void;
55
+ protected _render(): void;
56
+ }
57
+ export {};
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ import { ModalProps } from "antd/lib/modal";
3
+ import { MenuIcon } from "@next-core/brick-types";
4
+ import type { ModalStack } from "@next-core/brick-kit";
5
+ export declare type positionType = "left" | "center" | "right";
6
+ declare type SrcIcon = {
7
+ imgSrc?: string;
8
+ imgStyle?: React.CSSProperties;
9
+ };
10
+ interface GeneralModalProps {
11
+ visible: boolean;
12
+ configProps?: ModalProps;
13
+ modalTitle: string;
14
+ hideCancelButton?: boolean;
15
+ enableFooterSlot?: boolean;
16
+ titleAlign?: string;
17
+ titleIcon?: MenuIcon | SrcIcon;
18
+ fullscreen?: boolean;
19
+ okDisabled?: boolean;
20
+ confirmLoading?: boolean;
21
+ footerPosition?: positionType;
22
+ isHiddenBodyPadding?: boolean;
23
+ isHiddenHeaderBorder?: boolean;
24
+ isHiddenFooterColor?: boolean;
25
+ isHiddenModalTitle?: boolean;
26
+ isHiddenModalFooter?: boolean;
27
+ isShowCustomHeader?: boolean;
28
+ stack: ModalStack;
29
+ stackable?: boolean;
30
+ onAfterClose?: () => void;
31
+ }
32
+ export declare function GeneralModal(props: GeneralModalProps): React.ReactElement;
33
+ export {};
@@ -0,0 +1,330 @@
1
+ import { ModalProps } from "antd/lib/modal";
2
+ import { UpdatingElement, EventEmitter } from "@next-core/brick-kit";
3
+ import { positionType } from "./GeneralModal";
4
+ import { MenuIcon } from "@next-core/brick-types";
5
+ import { ButtonType } from "antd/lib/button";
6
+ export interface GeneralModalElementProps {
7
+ modalTitle?: string;
8
+ titleIcon?: MenuIcon;
9
+ titleAlign?: string;
10
+ dataSource?: Record<string, any>;
11
+ width?: string | number;
12
+ configProps?: ModalProps;
13
+ fields?: {
14
+ modalTitle: string;
15
+ };
16
+ enableFooterSlot?: boolean;
17
+ footerPosition?: positionType;
18
+ isHiddenBodyPadding?: boolean;
19
+ isHiddenHeaderBorder?: boolean;
20
+ isHiddenModalTitle?: boolean;
21
+ isHiddenModalFooter?: boolean;
22
+ isShowCustomHeader?: boolean;
23
+ stackable?: boolean;
24
+ okText?: string;
25
+ okType?: ButtonType;
26
+ okDisabled?: boolean;
27
+ confirmLoading?: boolean;
28
+ cancelText?: string;
29
+ hideCancelButton?: boolean;
30
+ closeWhenOk?: boolean;
31
+ closeWhenCancel?: boolean;
32
+ maskClosable?: boolean;
33
+ fullscreen?: boolean;
34
+ }
35
+ export interface OpenCloseOption {
36
+ noEvent?: boolean;
37
+ }
38
+ /**
39
+ * @id basic-bricks.general-modal
40
+ * @name basic-bricks.general-modal
41
+ * @docKind brick
42
+ * @description 提供插槽以展示其他构件,注意与表单通用模态框 (forms.general-modal) 的不同
43
+ * @groupI18N
44
+ * {
45
+ * "buttonAndInteract": {"en": "Button/Interact", "zh": "按钮及交互"}
46
+ * }
47
+ * @author ice
48
+ * @slots
49
+ * content:模态框里面的内容
50
+ * headerExtra:模态框头部标题后面的内容
51
+ * @history
52
+ * 1.26.0:新增 `modal.close` 事件
53
+ * 1.34.0:新增 `width` 属性
54
+ * 1.37.0:新增 `okText`, `cancelText` 属性, 新增 `modal.open` 事件
55
+ * 1.53.0:新增 `hideCancelButton` 属性
56
+ * 1.60.0:`open` 和 `close` 方法新增 `noEvent` 选项
57
+ * 1.61.0:新增 `enableFooterSlot` 属性
58
+ * 1.88.0:新增 `titleAlign` 和 `titleIcon` 属性
59
+ * @memo
60
+ * ### OpenCloseOption
61
+
62
+ * | property | type | required | default | description |
63
+ * | -------- | --------- | -------- | ------- | ----------- |
64
+ * | noEvent | `boolean` | - | - | 不触发事件 |
65
+ * @noInheritDoc
66
+ */
67
+ export declare class GeneralModalElement extends UpdatingElement implements GeneralModalElementProps {
68
+ /**
69
+ * @kind string
70
+ * @required false
71
+ * @default -
72
+ * @description 模态框标题
73
+ * @group basic
74
+ */
75
+ modalTitle: string;
76
+ /**
77
+ * @kind MenuIcon
78
+ * @required false
79
+ * @default -
80
+ * @description 标题图标
81
+ * @group basic
82
+ */
83
+ titleIcon?: MenuIcon;
84
+ /**
85
+ * @required false
86
+ * @default -
87
+ * @description 标题对齐方式
88
+ * @group basic
89
+ */
90
+ titleAlign?: string;
91
+ /**
92
+ * @kind Record<string, any>
93
+ * @required false
94
+ * @default -
95
+ * @description 数据来源
96
+ * @group basic
97
+ */
98
+ dataSource: Record<string, any>;
99
+ /**
100
+ * @kind string | number
101
+ * @required false
102
+ * @default -
103
+ * @description 模态框宽度
104
+ * @group ui
105
+ */
106
+ width: string | number;
107
+ /**
108
+ * @kind boolean
109
+ * @required false
110
+ * @default false
111
+ * @description 是否启用 footer 插槽
112
+ * @group ui
113
+ */
114
+ enableFooterSlot: boolean;
115
+ /**
116
+ * @kind string
117
+ * @required false
118
+ * @default right
119
+ * @description 按钮的位置 left | center | right
120
+ * @group ui
121
+ */
122
+ footerPosition: positionType;
123
+ /**
124
+ * @kind boolean
125
+ * @required false
126
+ * @default true
127
+ * @description 是否需要隐藏弹窗内容的padding
128
+ * @group ui
129
+ */
130
+ isHiddenBodyPadding: boolean;
131
+ /**
132
+ * @kind boolean
133
+ * @required false
134
+ * @default true
135
+ * @description 是否需要隐藏弹窗头部的分割线
136
+ * @group ui
137
+ */
138
+ isHiddenHeaderBorder: boolean;
139
+ /**
140
+ * @kind boolean
141
+ * @required false
142
+ * @default true
143
+ * @description 是否需要隐藏弹窗的title
144
+ * @group ui
145
+ */
146
+ isHiddenModalTitle: boolean;
147
+ /**
148
+ * @kind boolean
149
+ * @required false
150
+ * @default true
151
+ * @description 是否需要隐藏弹窗的footer
152
+ * @group ui
153
+ */
154
+ isHiddenModalFooter: boolean;
155
+ /**
156
+ * @kind boolean
157
+ * @required false
158
+ * @default true
159
+ * @description 是否需要显示自定义顶部header
160
+ * @group ui
161
+ */
162
+ isShowCustomHeader: boolean;
163
+ /**
164
+ * @kind boolean
165
+ * @required false
166
+ * @default true
167
+ * @description 是否需要隐藏底部特殊的颜色
168
+ * @group ui
169
+ */
170
+ isHiddenFooterColor: boolean;
171
+ /**
172
+ * @default false
173
+ * @description 全屏模式
174
+ * @group ui
175
+ */
176
+ fullscreen?: boolean;
177
+ /**
178
+ * @kind string
179
+ * @required false
180
+ * @default 确认
181
+ * @description 确认按钮文字
182
+ * @group buttonAndInteract
183
+ */
184
+ okText: string;
185
+ /**
186
+ * @kind ButtonType
187
+ * @required false
188
+ * @default primary
189
+ * @description 模态框确认按钮类型 ButtonType("link" | "default" | "primary" | "ghost" | "dashed" | "danger")
190
+ * @group buttonAndInteract
191
+ */
192
+ okType: ButtonType;
193
+ /**
194
+ * @kind boolean
195
+ * @required false
196
+ * @default false
197
+ * @description 是否禁用确认按钮
198
+ * @group buttonAndInteract
199
+ */
200
+ okDisabled: boolean;
201
+ /**
202
+ * @kind boolean
203
+ * @required false
204
+ * @default true
205
+ * @description 点击确定时,是否立即关闭模态框,如果设为`false`,则需要自行关闭。
206
+ * @group basic
207
+ */
208
+ closeWhenOk: boolean;
209
+ /**
210
+ * @kind boolean
211
+ * @required false
212
+ * @default false
213
+ * @description 确定按钮 loading
214
+ * @group buttonAndInteract
215
+ */
216
+ confirmLoading: boolean;
217
+ /**
218
+ * @kind string
219
+ * @required false
220
+ * @default 取消
221
+ * @description 取消按钮文字
222
+ * @group buttonAndInteract
223
+ */
224
+ cancelText: string;
225
+ /**
226
+ * @kind boolean
227
+ * @required false
228
+ * @default false
229
+ * @description 是否隐藏取消按钮
230
+ * @group buttonAndInteract
231
+ */
232
+ hideCancelButton: boolean;
233
+ /**
234
+ * @kind boolean
235
+ * @required false
236
+ * @default true
237
+ * @description 点击取消时,是否立即关闭模态框,如果设为`false`,则需要自行关闭。
238
+ * @group buttonAndInteract
239
+ */
240
+ closeWhenCancel: boolean;
241
+ /**
242
+ * @kind boolean
243
+ * @required false
244
+ * @default true
245
+ * @description 是否点击背景关闭模态框
246
+ * @group buttonAndInteract
247
+ */
248
+ maskClosable: boolean;
249
+ /**
250
+ * @kind object
251
+ * @required false
252
+ * @default -
253
+ * @description 完全透传给 antd 的 Modal 属性,详见 [文档](https://ant.design/components/modal-cn#API)
254
+ * @group other
255
+ */
256
+ configProps: ModalProps;
257
+ /**
258
+ * @kind {modalTitle: string}
259
+ * @deprecated true
260
+ * @required false
261
+ * @default -
262
+ * @description `已废弃` 字段映射, 跟 dataSource 一起使用来获得运行时 modalTitle
263
+ * @group other
264
+ */
265
+ fields: {
266
+ modalTitle: string;
267
+ };
268
+ /**
269
+ * @description 是否可堆叠,开启后每次打开抽屉会将新的抽屉置于上层(zIndex ++)。注意:仅初始设置有效。
270
+ */
271
+ stackable: boolean;
272
+ private _stack;
273
+ private _mountPoint;
274
+ private isVisible;
275
+ private modalProps;
276
+ constructor();
277
+ connectedCallback(): void;
278
+ handleAfterClose: () => void;
279
+ listenOnClose(): void;
280
+ disconnectedCallback(): void;
281
+ private initData;
282
+ protected _render(): void;
283
+ /**
284
+ *
285
+ * @description 弹出模态框
286
+ */
287
+ open(option?: OpenCloseOption): void;
288
+ /**
289
+ * @params option?: OpenCloseOption
290
+ * @description 打开 modal 时发出该事件
291
+ */
292
+ openModal: EventEmitter<Record<string, any>>;
293
+ /**
294
+ * @params `option?: OpenCloseOption`
295
+ * @description 关闭模态框
296
+ */
297
+ close(option?: OpenCloseOption): void;
298
+ /**
299
+ * @detail -
300
+ * @description 关闭 modal 时发出该事件
301
+ */
302
+ closeModal: EventEmitter<Record<string, any>>;
303
+ /**
304
+ * @detail -
305
+ * @description 当 modal 完全关闭后发出该事件
306
+ */
307
+ afterCloseModel: EventEmitter;
308
+ /**
309
+ * @detail `Record<string, any>`
310
+ * @deprecated 请使用`modal.cancel`代替
311
+ * @description 当点击 modal 自带的取消按钮时发出该事件,detail来源为当前的dataSource属性值
312
+ */
313
+ generalModalCancel: EventEmitter<Record<string, any>>;
314
+ /**
315
+ * @detail `Record<string, any>`
316
+ * @description 当点击 modal 自带的取消按钮时发出该事件,detail来源为当前的dataSource属性值
317
+ */
318
+ modalCancel: EventEmitter;
319
+ /**
320
+ * @detail `Record<string, any>`
321
+ * @deprecated 请使用`modal.confirm`代替
322
+ * @description 当点击 modal 自带的确认按钮时发出该事件,detail来源为当前的dataSource属性值
323
+ */
324
+ generalModalConfirm: EventEmitter;
325
+ /**
326
+ * @detail `Record<string, any>`
327
+ * @description 当点击 modal 自带的确认按钮时发出该事件,detail来源为当前的dataSource属性值
328
+ */
329
+ modalConfirm: EventEmitter;
330
+ }