@next-bricks/presentational-bricks 1.336.9 → 1.337.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 (229) hide show
  1. package/deploy/contract.yaml +107 -107
  2. package/dist/bricks.json +24 -24
  3. package/dist/index.81d05616.js +2 -0
  4. package/dist/index.81d05616.js.map +1 -0
  5. package/dist/lazy-bricks/brick-code-display.dd92.c95ef472.js.map +1 -1
  6. package/dist/lazy-bricks/brick-collapse-card.dd92.bb147e78.js.map +1 -1
  7. package/dist/lazy-bricks/{brick-placeholder.dd92.4ee6a7c8.js → brick-placeholder.dd92.1993ac10.js} +1 -1
  8. package/dist/lazy-bricks/brick-placeholder.dd92.1993ac10.js.map +1 -0
  9. package/dist/lazy-bricks/card-item.dd92.c1f35ec9.js.map +1 -1
  10. package/dist/lazy-bricks/{code-editor.dd92.1ac9cb6d.js → code-editor.dd92.16ca0239.js} +1 -1
  11. package/dist/lazy-bricks/{code-editor.dd92.1ac9cb6d.js.map → code-editor.dd92.16ca0239.js.map} +1 -1
  12. package/dist/lazy-bricks/{crontab-display.dd92.9404f865.js → crontab-display.dd92.402e3370.js} +1 -1
  13. package/dist/lazy-bricks/crontab-display.dd92.402e3370.js.map +1 -0
  14. package/dist/lazy-bricks/qrcode-download.dd92.061d823b.js.map +1 -1
  15. package/dist/lazy-bricks/single-field-edit.dd92.a7492a59.js.map +1 -1
  16. package/dist/lazy-bricks/{~bricks-use-form-and-markdown.dd92.6c55a936.js → ~bricks-use-form-and-markdown.dd92.bb4a9cfe.js} +1 -1
  17. package/dist/lazy-bricks/{~bricks-use-form-and-markdown.dd92.6c55a936.js.map → ~bricks-use-form-and-markdown.dd92.bb4a9cfe.js.map} +1 -1
  18. package/dist/lazy-bricks/{~bricks-use-html-to-react.dd92.9af0577d.js → ~bricks-use-html-to-react.dd92.a7ad9c3a.js} +1 -1
  19. package/dist/lazy-bricks/{~bricks-use-html-to-react.dd92.9af0577d.js.map → ~bricks-use-html-to-react.dd92.a7ad9c3a.js.map} +1 -1
  20. package/dist/stories.json +6 -214
  21. package/dist/types/agent-status/AgentStatus.d.ts +7 -0
  22. package/dist/types/agent-status/index.d.ts +59 -0
  23. package/dist/types/avatar-upload/AvatarUpload.d.ts +10 -0
  24. package/dist/types/avatar-upload/index.d.ts +51 -0
  25. package/dist/types/banner-display-card-list/BannerDisplayCardList.d.ts +15 -0
  26. package/dist/types/banner-display-card-list/index.d.ts +25 -0
  27. package/dist/types/basic-icon/BasicIcon.d.ts +17 -0
  28. package/dist/types/basic-icon/index.d.ts +96 -0
  29. package/dist/types/basic-progress/BasicProgress.d.ts +36 -0
  30. package/dist/types/basic-progress/index.d.ts +122 -0
  31. package/dist/types/brick-alert/BrickAlert.d.ts +21 -0
  32. package/dist/types/brick-alert/index.d.ts +204 -0
  33. package/dist/types/brick-alert-level/BrickAlertLevel.d.ts +7 -0
  34. package/dist/types/brick-alert-level/index.d.ts +48 -0
  35. package/dist/types/brick-alert-number/BrickAlertNumber.d.ts +6 -0
  36. package/dist/types/brick-alert-number/index.d.ts +27 -0
  37. package/dist/types/brick-alert-status/BrickAlertStatus.d.ts +8 -0
  38. package/dist/types/brick-alert-status/index.d.ts +68 -0
  39. package/dist/types/brick-alert-value/BrickAlertValue.d.ts +7 -0
  40. package/dist/types/brick-alert-value/index.d.ts +28 -0
  41. package/dist/types/brick-button/BrickButton.d.ts +11 -0
  42. package/dist/types/brick-button/index.d.ts +2 -0
  43. package/dist/types/brick-calendar/index.d.ts +141 -0
  44. package/dist/types/brick-cluster-type/BrickClusterType.d.ts +8 -0
  45. package/dist/types/brick-cluster-type/index.d.ts +63 -0
  46. package/dist/types/brick-code-display/BrickCodeDisplay.d.ts +13 -0
  47. package/dist/types/brick-code-display/index.d.ts +2 -0
  48. package/dist/types/brick-collapse-card/BrickCollapseCard.d.ts +25 -0
  49. package/dist/types/brick-collapse-card/index.d.ts +175 -0
  50. package/dist/types/brick-collection-instance-execution/BrickCollectionInstanceExecution.d.ts +7 -0
  51. package/dist/types/brick-collection-instance-execution/index.d.ts +2 -0
  52. package/dist/types/brick-conditional-display/BrickConditionalDisplay.d.ts +19 -0
  53. package/dist/types/brick-conditional-display/index.d.ts +99 -0
  54. package/dist/types/brick-delete-confirm/BrickDeleteConfirm.d.ts +21 -0
  55. package/dist/types/brick-delete-confirm/index.d.ts +2 -0
  56. package/dist/types/brick-descriptions/BrickDescriptions.d.ts +22 -0
  57. package/dist/types/brick-descriptions/index.d.ts +192 -0
  58. package/dist/types/brick-display-structs/BrickDisplayStructs.d.ts +9 -0
  59. package/dist/types/brick-display-structs/index.d.ts +66 -0
  60. package/dist/types/brick-divider/BrickDivider.d.ts +12 -0
  61. package/dist/types/brick-divider/index.d.ts +76 -0
  62. package/dist/types/brick-form/BrickForm.d.ts +73 -0
  63. package/dist/types/brick-form/components/brick-checkbox/BrickCheckbox.d.ts +11 -0
  64. package/dist/types/brick-form/components/brick-date-picker/BrickDatePicker.d.ts +9 -0
  65. package/dist/types/brick-form/components/brick-input/BrickInput.d.ts +15 -0
  66. package/dist/types/brick-form/components/brick-input-number/BrickInputNumber.d.ts +9 -0
  67. package/dist/types/brick-form/components/brick-instance-selector/BrickInstanceSelector.d.ts +13 -0
  68. package/dist/types/brick-form/components/brick-radio/BrickRadio.d.ts +12 -0
  69. package/dist/types/brick-form/components/brick-select/BrickSelect.d.ts +18 -0
  70. package/dist/types/brick-form/components/brick-switch/BrickSwitch.d.ts +14 -0
  71. package/dist/types/brick-form/components/brick-time-picker/BrickTimePicker.d.ts +8 -0
  72. package/dist/types/brick-form/components/wrapper-form-item/WrapperFormItem.d.ts +10 -0
  73. package/dist/types/brick-form/index.d.ts +12 -0
  74. package/dist/types/brick-form/interfaces/brick-component.d.ts +5 -0
  75. package/dist/types/brick-form/interfaces/index.d.ts +1 -0
  76. package/dist/types/brick-form/processor/handleChange.d.ts +1 -0
  77. package/dist/types/brick-form/processor/index.d.ts +1 -0
  78. package/dist/types/brick-general-search/BrickGeneralSearch.d.ts +28 -0
  79. package/dist/types/brick-general-search/index.d.ts +233 -0
  80. package/dist/types/brick-humanize-time/BrickHumanizeTime.d.ts +16 -0
  81. package/dist/types/brick-humanize-time/index.d.ts +101 -0
  82. package/dist/types/brick-illustration/BrickIllustration.d.ts +14 -0
  83. package/dist/types/brick-illustration/index.d.ts +87 -0
  84. package/dist/types/brick-input/BrickInput.d.ts +11 -0
  85. package/dist/types/brick-input/index.d.ts +73 -0
  86. package/dist/types/brick-link/BrickLink.d.ts +21 -0
  87. package/dist/types/brick-link/index.d.ts +208 -0
  88. package/dist/types/brick-list/BrickList.d.ts +20 -0
  89. package/dist/types/brick-list/index.d.ts +6 -0
  90. package/dist/types/brick-placeholder/BrickPlaceholder.d.ts +6 -0
  91. package/dist/types/brick-placeholder/index.d.ts +59 -0
  92. package/dist/types/brick-quick-entries/BrickQuickEntries.d.ts +16 -0
  93. package/dist/types/brick-quick-entries/index.d.ts +153 -0
  94. package/dist/types/brick-rate/BrickRate.d.ts +11 -0
  95. package/dist/types/brick-rate/index.d.ts +99 -0
  96. package/dist/types/brick-result/BrickResult.d.ts +21 -0
  97. package/dist/types/brick-result/components/IllustrationWrapper.d.ts +16 -0
  98. package/dist/types/brick-result/index.d.ts +77 -0
  99. package/dist/types/brick-table/BrickTable.d.ts +57 -0
  100. package/dist/types/brick-table/brickTableHelper.d.ts +6 -0
  101. package/dist/types/brick-table/index.d.ts +828 -0
  102. package/dist/types/brick-tag/BrickTag.d.ts +35 -0
  103. package/dist/types/brick-tag/index.d.ts +194 -0
  104. package/dist/types/brick-timeline/BrickTimeline.d.ts +16 -0
  105. package/dist/types/brick-timeline/TimelineCard.d.ts +15 -0
  106. package/dist/types/brick-timeline/index.d.ts +119 -0
  107. package/dist/types/brick-timeline/processor.d.ts +5 -0
  108. package/dist/types/brick-tree/BrickTree.d.ts +67 -0
  109. package/dist/types/brick-tree/index.d.ts +325 -0
  110. package/dist/types/brick-user/BrickUser.d.ts +15 -0
  111. package/dist/types/brick-user/index.d.ts +130 -0
  112. package/dist/types/brick-user-group/BrickUserGroup.d.ts +12 -0
  113. package/dist/types/brick-user-group/index.d.ts +61 -0
  114. package/dist/types/brick-utils/index.d.ts +44 -0
  115. package/dist/types/brick-value-mapping/BrickValueMapping.d.ts +24 -0
  116. package/dist/types/brick-value-mapping/index.d.ts +132 -0
  117. package/dist/types/button-wrapper/ButtonWrapper.d.ts +7 -0
  118. package/dist/types/button-wrapper/index.d.ts +4 -0
  119. package/dist/types/card-item/CardItem.d.ts +52 -0
  120. package/dist/types/card-item/index.d.ts +392 -0
  121. package/dist/types/code-editor/CodeEditor.d.ts +19 -0
  122. package/dist/types/code-editor/brace/mode.d.ts +4 -0
  123. package/dist/types/code-editor/brace/theme.d.ts +3 -0
  124. package/dist/types/code-editor/index.d.ts +118 -0
  125. package/dist/types/collapse-info-list/CollapseInfoList.d.ts +19 -0
  126. package/dist/types/collapse-info-list/index.d.ts +53 -0
  127. package/dist/types/collapsible-card-item/CollapsibleCardItem.d.ts +19 -0
  128. package/dist/types/collapsible-card-item/index.d.ts +165 -0
  129. package/dist/types/copyable-text/CopyableText.d.ts +12 -0
  130. package/dist/types/copyable-text/index.d.ts +73 -0
  131. package/dist/types/cost-time/CostTime.d.ts +9 -0
  132. package/dist/types/cost-time/i18n/constants.d.ts +20 -0
  133. package/dist/types/cost-time/index.d.ts +73 -0
  134. package/dist/types/crontab-display/CrontabDisplay.d.ts +5 -0
  135. package/dist/types/crontab-display/index.d.ts +47 -0
  136. package/dist/types/datetime-selector/DatetimeSelector.d.ts +19 -0
  137. package/dist/types/datetime-selector/index.d.ts +167 -0
  138. package/dist/types/datetime-selector/processor.d.ts +16 -0
  139. package/dist/types/digital-number/DigitalNumber.d.ts +21 -0
  140. package/dist/types/digital-number/index.d.ts +101 -0
  141. package/dist/types/dropdown-button/DropdownButton.d.ts +17 -0
  142. package/dist/types/dropdown-button/index.d.ts +106 -0
  143. package/dist/types/dropdown-select/DropdownSelect.d.ts +37 -0
  144. package/dist/types/dropdown-select/index.d.ts +231 -0
  145. package/dist/types/dynamic-content/index.d.ts +35 -0
  146. package/dist/types/dynamic-grid-container/DynamicGridContainer.d.ts +9 -0
  147. package/dist/types/dynamic-grid-container/index.d.ts +47 -0
  148. package/dist/types/entry-card-item/EntryCardItem.d.ts +20 -0
  149. package/dist/types/entry-card-item/index.d.ts +146 -0
  150. package/dist/types/general-badge/index.d.ts +95 -0
  151. package/dist/types/general-carousel/GeneralCarousel.d.ts +28 -0
  152. package/dist/types/general-carousel/index.d.ts +197 -0
  153. package/dist/types/general-iframe/index.d.ts +62 -0
  154. package/dist/types/general-image/GeneralImage.d.ts +14 -0
  155. package/dist/types/general-image/index.d.ts +124 -0
  156. package/dist/types/general-label/GeneralLabel.d.ts +12 -0
  157. package/dist/types/general-label/index.d.ts +79 -0
  158. package/dist/types/general-list/GeneralList.d.ts +8 -0
  159. package/dist/types/general-list/index.d.ts +59 -0
  160. package/dist/types/general-pagination/GeneralPagination.d.ts +12 -0
  161. package/dist/types/general-pagination/index.d.ts +108 -0
  162. package/dist/types/general-preview-image/GeneralPreviewImage.d.ts +9 -0
  163. package/dist/types/general-preview-image/components/Image.d.ts +35 -0
  164. package/dist/types/general-preview-image/components/Operations.d.ts +20 -0
  165. package/dist/types/general-preview-image/components/Preview.d.ts +24 -0
  166. package/dist/types/general-preview-image/components/PreviewGroup.d.ts +40 -0
  167. package/dist/types/general-preview-image/components/getFixScaleEleTransPosition.d.ts +16 -0
  168. package/dist/types/general-preview-image/components/hooks/useImageTransform.d.ts +23 -0
  169. package/dist/types/general-preview-image/components/previewConfig.d.ts +8 -0
  170. package/dist/types/general-preview-image/index.d.ts +75 -0
  171. package/dist/types/general-slider/GeneralSlider.d.ts +18 -0
  172. package/dist/types/general-slider/index.d.ts +118 -0
  173. package/dist/types/general-tooltip/GeneralTooltip.d.ts +19 -0
  174. package/dist/types/general-tooltip/index.d.ts +117 -0
  175. package/dist/types/general-transfer/GeneralTransfer.d.ts +19 -0
  176. package/dist/types/general-transfer/index.d.ts +160 -0
  177. package/dist/types/general-video/GeneralVideo.d.ts +11 -0
  178. package/dist/types/general-video/index.d.ts +51 -0
  179. package/dist/types/i18n/constants.d.ts +51 -0
  180. package/dist/types/info-display-card-list/InfoDisplayCardList.d.ts +27 -0
  181. package/dist/types/info-display-card-list/index.d.ts +148 -0
  182. package/dist/types/interfaces/brick-collapse-card.d.ts +4 -0
  183. package/dist/types/interfaces/brick-result.d.ts +27 -0
  184. package/dist/types/interfaces/brick-tag.d.ts +35 -0
  185. package/dist/types/interfaces/brick-tree.d.ts +5 -0
  186. package/dist/types/interfaces/common.d.ts +15 -0
  187. package/dist/types/interfaces/dropdown-select.d.ts +7 -0
  188. package/dist/types/interfaces/index.d.ts +2 -0
  189. package/dist/types/jsx.d.ts +315 -0
  190. package/dist/types/log-display/LogDisplay.d.ts +8 -0
  191. package/dist/types/log-display/index.d.ts +54 -0
  192. package/dist/types/markdown-display/MarkdownDisplay.d.ts +17 -0
  193. package/dist/types/markdown-display/SyntaxHighlighter.d.ts +13 -0
  194. package/dist/types/markdown-display/index.d.ts +88 -0
  195. package/dist/types/markdown-editor/MarkdownEditor.d.ts +23 -0
  196. package/dist/types/markdown-editor/index.d.ts +154 -0
  197. package/dist/types/modal-confirm/ModalConfirm.d.ts +30 -0
  198. package/dist/types/modal-confirm/index.d.ts +231 -0
  199. package/dist/types/qrcode-download/index.d.ts +77 -0
  200. package/dist/types/qrcode-download/utils.d.ts +6 -0
  201. package/dist/types/rank-table/RankTable.d.ts +21 -0
  202. package/dist/types/rank-table/RankTableHelper.d.ts +14 -0
  203. package/dist/types/rank-table/index.d.ts +215 -0
  204. package/dist/types/single-field-edit/SingleFieldEdit.d.ts +22 -0
  205. package/dist/types/single-field-edit/index.d.ts +148 -0
  206. package/dist/types/statistic-card/StatisticCard.d.ts +15 -0
  207. package/dist/types/statistic-card/index.d.ts +130 -0
  208. package/dist/types/table-transfer/TableTransfer.d.ts +32 -0
  209. package/dist/types/table-transfer/TableTransferHelper.d.ts +14 -0
  210. package/dist/types/table-transfer/index.d.ts +123 -0
  211. package/dist/types/template-breadcrumb/index.d.ts +67 -0
  212. package/dist/types/text-collapse/TextCollapse.d.ts +7 -0
  213. package/dist/types/text-collapse/index.d.ts +33 -0
  214. package/dist/types/tree-transfer/TreeTransfer.d.ts +18 -0
  215. package/dist/types/tree-transfer/index.d.ts +96 -0
  216. package/dist/types/tree-transfer/treeShuttleBox/TreeShuttleBox.d.ts +19 -0
  217. package/dist/types/tree-transfer/treeShuttleBox/TreeShuttleBoxLeft.d.ts +10 -0
  218. package/dist/types/tree-transfer/treeShuttleBox/TreeShuttleBoxRight.d.ts +9 -0
  219. package/dist/types/tree-transfer/treeShuttleBox/TreeShuttleButton.d.ts +7 -0
  220. package/dist/types/tree-transfer/treeShuttleBox/index.d.ts +3 -0
  221. package/dist/types/tree-transfer/treeShuttleBox/interfaceType.d.ts +14 -0
  222. package/dist/types/tree-transfer/treeShuttleBox/tool.d.ts +67 -0
  223. package/dist/types/tree-transfer/treeShuttleBox/useTreeContext.d.ts +35 -0
  224. package/dist/types/tree-transfer/treeShuttleBox/useTreeShuttle.d.ts +31 -0
  225. package/package.json +5 -4
  226. package/dist/index.46f26be5.js +0 -2
  227. package/dist/index.46f26be5.js.map +0 -1
  228. package/dist/lazy-bricks/brick-placeholder.dd92.4ee6a7c8.js.map +0 -1
  229. package/dist/lazy-bricks/crontab-display.dd92.9404f865.js.map +0 -1
@@ -0,0 +1,192 @@
1
+ import React from "react";
2
+ import { UpdatingElement } from "@next-core/brick-kit";
3
+ import { UseBrickConf } from "@next-core/brick-types";
4
+ import { DescriptionsProps } from "antd/lib/descriptions";
5
+ import { DescriptionsItemProps } from "antd/lib/descriptions/Item";
6
+ export interface BrickDescriptionsElementProps {
7
+ descriptionTitle?: string;
8
+ descriptionList?: DescriptionListProps[];
9
+ itemList?: BrickDescriptionsItemProps[];
10
+ itemIdBrickMap?: Record<string, {
11
+ useBrick: UseBrickConf;
12
+ }>;
13
+ column?: number;
14
+ layout?: LayoutType;
15
+ bordered?: boolean;
16
+ size?: SizeType;
17
+ configProps?: DescriptionsProps;
18
+ hideGroups?: string[] | string;
19
+ dataSource?: Record<string, any>;
20
+ }
21
+ export interface BrickDescriptionsItemProps extends Partial<DescriptionsItemProps> {
22
+ /**
23
+ * 内容
24
+ */
25
+ text: string;
26
+ id?: string;
27
+ /**
28
+ * 所属分组
29
+ */
30
+ group?: string;
31
+ /**
32
+ * 该 item 的 text 取自 dataSource 的哪个字段
33
+ */
34
+ field?: string;
35
+ /**
36
+ * 支持为某项自定义展示构件 [#UseBrickConf](#usebrickconf)
37
+ */
38
+ useBrick?: UseBrickConf;
39
+ /**
40
+ * [已废弃]自定义该 item 的展示构件
41
+ */
42
+ component?: {
43
+ brick?: string;
44
+ properties?: any;
45
+ };
46
+ }
47
+ export interface DescriptionListProps {
48
+ itemList: BrickDescriptionsItemProps[];
49
+ descriptionTitle: string;
50
+ configProps?: DescriptionsProps;
51
+ column?: number;
52
+ size?: SizeType;
53
+ bordered?: boolean;
54
+ layout?: LayoutType;
55
+ hideGroups?: string[] | string;
56
+ extraBrick?: {
57
+ useBrick: UseBrickConf;
58
+ };
59
+ }
60
+ export declare type LayoutType = "horizontal" | "vertical";
61
+ export declare type SizeType = "default" | "middle" | "small";
62
+ /**
63
+ * @id presentational-bricks.brick-descriptions
64
+ * @name presentational-bricks.brick-descriptions
65
+ * @docKind brick
66
+ * @description 常用于概要信息的描述,2~3列
67
+ * @author lynette
68
+ * @slots
69
+ * @history
70
+ * 1.59.0:新增属性:`descriptionTitle`、`column`、`size`、`bordered`、`layout`
71
+ * @memo
72
+ * ### UseBrickConf
73
+ *
74
+ * | property | type | required | default | description |
75
+ * | ------------- | -------------- | -------- | ------- | -------------------------------------------------- |
76
+ * | brick | string | true | - | 构件名称 |
77
+ * | properties | object | - | - | 构件属性 |
78
+ * | events | BrickEventsMap | - | - | 事件 |
79
+ * | transform | string\|object | - | - | 属性数据转换 |
80
+ * | transformFrom | string | - | - | 属性数据转换来自数据源的哪个字段,不填则为整个数据 |
81
+ * @noInheritDoc
82
+ */
83
+ export declare class BrickDescriptionsElement extends UpdatingElement implements BrickDescriptionsElementProps {
84
+ /**
85
+ * @kind string
86
+ * @required false
87
+ * @default -
88
+ * @description 描述列表的标题,显示在最顶部
89
+ * @group basic
90
+ */
91
+ descriptionTitle: string;
92
+ /**
93
+ * @kind any[]
94
+ * @required false
95
+ * @default -
96
+ * @description 多个描述列表时的数据入口
97
+ * @group basic
98
+ */
99
+ descriptionList: DescriptionListProps[];
100
+ /**
101
+ * @kind BrickDescriptionsItemProps[]
102
+ * @required false
103
+ * @default -
104
+ * @description 描述列表项,扩展自 ant-design DescriptionItem 相关配置项,额外扩展项如下,其他项查阅:[DescriptionItem](https://ant.design/components/descriptions-cn/#DescriptionItem)
105
+ * @group basic
106
+ */
107
+ itemList: BrickDescriptionsItemProps[];
108
+ /**
109
+ * @required false
110
+ * @default -
111
+ * @description 列表项的 id 与对应构件配置的 map。一般在 itemList 属性需要动态生成,且希望自定义列的构件(itemList.useBrick)时使用。
112
+ * @group advanced
113
+ */
114
+ itemIdBrickMap: Record<string, {
115
+ useBrick: UseBrickConf;
116
+ }>;
117
+ /**
118
+ * @kind boolean
119
+ * @required false
120
+ * @default true
121
+ * @description 是否显示卡片
122
+ * @group basic
123
+ */
124
+ showCard: boolean;
125
+ /**
126
+ * @kind number|object
127
+ * @required false
128
+ * @default 3
129
+ * @description 一行的 DescriptionItems 数量,可以写成像素值或支持响应式的对象写法 { xs: 8, sm: 16, md: 24}
130
+ * @group basic
131
+ */
132
+ column: number;
133
+ /**
134
+ * @kind LayoutType
135
+ * @required false
136
+ * @default horizontal
137
+ * @description 描述布局
138
+ * @enums "horizontal"|"vertical"
139
+ * @group ui
140
+ */
141
+ layout: LayoutType;
142
+ /**
143
+ * @kind boolean
144
+ * @required false
145
+ * @default false
146
+ * @description 是否展示边框
147
+ * @group ui
148
+ */
149
+ bordered: boolean;
150
+ /**
151
+ * @kind SizeType
152
+ * @required false
153
+ * @default -
154
+ * @description 设置列表的大小。可以设置为 middle 、small, 或不填(只有设置 bordered={true} 生效)
155
+ * @enums "default"|"middle"|"small"
156
+ * @group ui
157
+ */
158
+ size: SizeType;
159
+ /**
160
+ * @kind DescriptionsProps
161
+ * @required false
162
+ * @default -
163
+ * @description ant-design 相关配置项,具体查阅:[Descriptions](https://ant.design/components/descriptions-cn/#Descriptions)
164
+ */
165
+ configProps: DescriptionsProps;
166
+ /**
167
+ * @kind string[] | string
168
+ * @required false
169
+ * @default -
170
+ * @description 设置需要隐藏的描述列表项。请先在 itemList 中定义列表项所属 group
171
+ */
172
+ hideGroups: string[] | string;
173
+ /**
174
+ * @required false
175
+ * @description 描述列表的操作区域构件配置,显示在右上方
176
+ */
177
+ extraBrick?: {
178
+ useBrick: UseBrickConf;
179
+ };
180
+ /**
181
+ * @kind Record<string, any>
182
+ * @required false
183
+ * @default -
184
+ * @deprecated
185
+ * @description [已废弃]数据来源,通常来源于后台
186
+ */
187
+ dataSource: Record<string, any>;
188
+ connectedCallback(): void;
189
+ disconnectedCallback(): void;
190
+ protected _getBrickDescriptionsNode(): React.ReactElement;
191
+ protected _render(): void;
192
+ }
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { FieldToDisplay } from "./index";
3
+ interface BrickDisplayStructsProps {
4
+ value: any;
5
+ displayType: "stringify" | FieldToDisplay;
6
+ emptyText: string;
7
+ }
8
+ export declare function BrickDisplayStructs(props: BrickDisplayStructsProps): React.ReactElement;
9
+ export {};
@@ -0,0 +1,66 @@
1
+ import { UpdatingElement } from "@next-core/brick-kit";
2
+ export interface BrickDisplayStructsElementProps {
3
+ dataSource?: Record<string, any>;
4
+ fields?: {
5
+ value: string;
6
+ };
7
+ value?: any;
8
+ displayType?: "stringify" | FieldToDisplay;
9
+ }
10
+ export interface FieldToDisplay {
11
+ field?: string;
12
+ separator: string;
13
+ }
14
+ /**
15
+ * @id presentational-bricks.brick-display-structs
16
+ * @name presentational-bricks.brick-display-structs
17
+ * @docKind brick
18
+ * @description 可将结构体(数组)数据以字符串的形式展示,或只展示其中的一个字段
19
+ * @author ice
20
+ * @slots
21
+ * @history
22
+ * @memo
23
+ * @noInheritDoc
24
+ */
25
+ export declare class BrickDisplayStructsElement extends UpdatingElement implements BrickDisplayStructsElementProps {
26
+ connectedCallback(): void;
27
+ disconnectedCallback(): void;
28
+ protected _render(): void;
29
+ /**
30
+ * @kind Record<string, any>
31
+ * @required false
32
+ * @default -
33
+ * @description [已废弃]数据来源
34
+ */
35
+ dataSource: Record<string, any>;
36
+ /**
37
+ * @kind { value: string }
38
+ * @required false
39
+ * @default -
40
+ * @description 字[已废弃]段映射, 跟 dataSource 一起使用来获得运行时 value
41
+ */
42
+ fields: {
43
+ value: string;
44
+ };
45
+ /**
46
+ * @kind 结构体或数组
47
+ * @required false
48
+ * @default -
49
+ * @description 要展示的值
50
+ */
51
+ value: any;
52
+ /**
53
+ * @kind 'stringify' | FieldToDisplay
54
+ * @required true
55
+ * @default -
56
+ * @description 展示类型, 定义类型如下
57
+ */
58
+ displayType: "stringify" | FieldToDisplay;
59
+ /**
60
+ * @kind string
61
+ * @required false
62
+ * @default -
63
+ * @description 空文案
64
+ */
65
+ emptyText: string;
66
+ }
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ interface BrickDividerProps {
3
+ type?: "horizontal" | "vertical" | "radiation";
4
+ dashed?: boolean;
5
+ dividerStyle?: React.CSSProperties;
6
+ dividerTitle?: string;
7
+ orientation?: "center" | "left" | "right";
8
+ plain?: boolean;
9
+ proportion?: number[];
10
+ }
11
+ export declare function BrickDivider(props: BrickDividerProps): React.ReactElement;
12
+ export {};
@@ -0,0 +1,76 @@
1
+ import React from "react";
2
+ import { UpdatingElement } from "@next-core/brick-kit";
3
+ export interface BrickDividerElementProps {
4
+ dividerTitle?: string;
5
+ type?: "horizontal" | "vertical" | "radiation";
6
+ dashed?: boolean;
7
+ dividerStyle?: React.CSSProperties;
8
+ orientation?: "center" | "left" | "right";
9
+ plain?: boolean;
10
+ proportion?: number[];
11
+ }
12
+ /**
13
+ * @id presentational-bricks.brick-divider
14
+ * @name presentational-bricks.brick-divider
15
+ * @docKind brick
16
+ * @description 分割线
17
+ * @author dophi
18
+ * @slots
19
+ * @history
20
+ * 1.60.0:新属性 `dividerTitle` 和 `orientation`
21
+ * 1.204.0: 新属性 `plain` 和 `type`增加`radiation`
22
+ * @memo
23
+ * @noInheritDoc
24
+ */
25
+ export declare class BrickDividerElement extends UpdatingElement implements BrickDividerElementProps {
26
+ /**
27
+ * @required false
28
+ * @description 标题
29
+ * @group basic
30
+ */
31
+ dividerTitle: string;
32
+ /**
33
+ * @required false
34
+ * @default "horizontal"
35
+ * @description 水平|垂直|放射类型,注意`radiation`是个特殊的类型,该样式是特定的
36
+ * @group basic
37
+ */
38
+ type: "horizontal" | "vertical" | "radiation";
39
+ /**
40
+ * @required false
41
+ * @default false
42
+ * @description 是否虚线
43
+ * @group basic
44
+ */
45
+ dashed: boolean;
46
+ /**
47
+ * @required false
48
+ * @description 分割线自定义样式
49
+ * @group basic
50
+ */
51
+ dividerStyle: React.CSSProperties;
52
+ /**
53
+ * @kind "center" | "left" | "right"
54
+ * @required false
55
+ * @default "center"
56
+ * @description 标题位置
57
+ * @group basic
58
+ */
59
+ orientation: "center" | "left" | "right";
60
+ /**
61
+ * @required false
62
+ * @default false
63
+ * @description 文字是否显示为普通正文样式
64
+ * @group ui
65
+ */
66
+ plain: boolean;
67
+ /**
68
+ * @required false
69
+ * @description 当用于数值显示的情况,eg: 如果要展示"1/3",那么传入就是[1,3], 该字段只适配于 type 为 `radiation`
70
+ * @group basic
71
+ */
72
+ proportion: number[];
73
+ connectedCallback(): void;
74
+ disconnectedCallback(): void;
75
+ protected _render(): void;
76
+ }
@@ -0,0 +1,73 @@
1
+ import React from "react";
2
+ import { WithTranslation } from "react-i18next";
3
+ import { FormComponentProps, ValidationRule } from "@ant-design/compatible/lib/form";
4
+ import { FormLayout } from "@ant-design/compatible/lib/form/Form";
5
+ import { ColProps } from "antd/lib/grid";
6
+ import { SearchInCmdb } from "./components/brick-select/BrickSelect";
7
+ import { SwitchMap } from "./components/brick-switch/BrickSwitch";
8
+ import { BrickOptionProps } from "./interfaces";
9
+ import { CustomColumn } from "../brick-table/index";
10
+ export interface FieldDefinition {
11
+ field: string;
12
+ label: string;
13
+ fieldPath: string;
14
+ component: string;
15
+ isRequire?: boolean;
16
+ valuePropName?: string;
17
+ properties?: any;
18
+ defaultValue?: boolean | string | number;
19
+ hideFromField?: string;
20
+ optionList?: string[] | BrickOptionProps[];
21
+ emitChangeEvent?: string;
22
+ emitCustomEvent?: string;
23
+ dataSource?: {
24
+ resolveName: string;
25
+ path?: string;
26
+ useIdField?: string;
27
+ useTextField?: string;
28
+ };
29
+ searchInCmdb?: SearchInCmdb;
30
+ switchMap?: SwitchMap;
31
+ instanceList?: {
32
+ query?: Record<string, any>;
33
+ columns: CustomColumn[];
34
+ };
35
+ computeDefaultValue?: {
36
+ target: string;
37
+ method: string;
38
+ args: any;
39
+ };
40
+ rules: ValidationRule & flags[];
41
+ configProps: Record<string, any>;
42
+ }
43
+ declare type flags = any;
44
+ export interface LegacyBrickFormProps extends WithTranslation, FormComponentProps {
45
+ contractName?: string;
46
+ fields: FieldDefinition[];
47
+ showCancel?: boolean;
48
+ cancelText?: string;
49
+ showConfirm?: boolean;
50
+ confirmText?: string;
51
+ layout?: FormLayout;
52
+ labelCol?: ColProps;
53
+ wrapperCol?: ColProps;
54
+ tailFormBtnLayout?: Record<"wrapperCol", ColProps>;
55
+ onSubmit?(data: Record<string, any>): void;
56
+ onCancel?(): void;
57
+ onBrickFormRef: any;
58
+ showCard: boolean;
59
+ onFieldChange: (value: any, field: string) => void;
60
+ dispatchCustomEvent: (field: FieldDefinition, detail: any) => void;
61
+ }
62
+ export declare class LegacyBrickForm extends React.Component<LegacyBrickFormProps> {
63
+ static formItemComp: Record<string, any>;
64
+ constructor(props: LegacyBrickFormProps);
65
+ componentDidMount(): void;
66
+ componentWillUnmount(): void;
67
+ dispatchCustomEvent(field: FieldDefinition): (query: any) => void;
68
+ render(): React.ReactNode;
69
+ handleSubmit(e: React.FormEvent): void;
70
+ handleFieldChange(value: any, field: string): void;
71
+ }
72
+ export declare const BrickForm: React.ComponentType<Omit<import("react-i18next").Subtract<import("@ant-design/compatible/lib/_util/types").Omit<LegacyBrickFormProps, "form">, import("react-i18next").WithTranslationProps>, keyof WithTranslation<N, undefined>> & import("react-i18next").WithTranslationProps>;
73
+ export {};
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { BrickOptionProps } from "../../interfaces";
3
+ import { CheckboxGroupProps } from "antd/lib/checkbox";
4
+ export interface LegacyBrickCheckboxProps {
5
+ configProps?: CheckboxGroupProps;
6
+ optionList: BrickOptionProps[];
7
+ onChange: Function;
8
+ value?: string[];
9
+ }
10
+ export declare function LegacyBrickCheckbox(props: LegacyBrickCheckboxProps): React.ReactElement;
11
+ export declare const BrickCheckbox: (props: import("../wrapper-form-item/WrapperFormItem").WrapperFormItemProps) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { DatePickerProps, MonthPickerProps, RangePickerProps, WeekPickerProps } from "antd/lib/date-picker/interface";
3
+ export interface LegacyBrickDatePickerProps {
4
+ componentType?: "DatePicker" | "MonthPicker" | "RangePicker" | "WeekPicker";
5
+ configProps?: DatePickerProps | MonthPickerProps | RangePickerProps | WeekPickerProps;
6
+ onChange: Function;
7
+ }
8
+ export declare function LegacyBrickDatePicker({ componentType, configProps, onChange }: LegacyBrickDatePickerProps): React.ReactElement;
9
+ export declare const BrickDatePicker: (props: import("../wrapper-form-item/WrapperFormItem").WrapperFormItemProps) => JSX.Element;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { InputProps } from "antd/lib/input";
3
+ export declare enum LegacyBrickInputType {
4
+ Input = "Input",
5
+ Password = "Password",
6
+ TextArea = "TextArea"
7
+ }
8
+ export interface LegacyBrickInputProps {
9
+ configProps?: InputProps;
10
+ type?: LegacyBrickInputType;
11
+ onChange: Function;
12
+ value?: string;
13
+ }
14
+ export declare function LegacyBrickInput({ configProps, onChange, value, type }: LegacyBrickInputProps): React.ReactElement;
15
+ export declare const BrickInput: (props: import("../wrapper-form-item/WrapperFormItem").WrapperFormItemProps) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { InputNumberProps } from "antd/lib/input-number";
3
+ export interface LegacyBrickInputNumberProps {
4
+ configProps?: InputNumberProps;
5
+ onChange: Function;
6
+ value?: number;
7
+ }
8
+ export declare function LegacyBrickInputNumber(props: LegacyBrickInputNumberProps): React.ReactElement;
9
+ export declare const BrickInputNumber: (props: import("../wrapper-form-item/WrapperFormItem").WrapperFormItemProps) => JSX.Element;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { CustomColumn } from "../../../brick-table/index";
3
+ export interface BrickInstanceSelectProps {
4
+ optionList: Record<string, any>[];
5
+ instanceList: {
6
+ query?: Record<string, any>;
7
+ columns: CustomColumn[];
8
+ };
9
+ onChange: (value: any) => void;
10
+ dispatchCustomEvent: (query: any) => void;
11
+ }
12
+ export declare function InstanceSelector(props: BrickInstanceSelectProps): React.ReactElement;
13
+ export declare const BrickInstanceSelector: (props: import("../wrapper-form-item/WrapperFormItem").WrapperFormItemProps) => JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { RadioProps, RadioGroupProps } from "antd/lib/radio/interface";
3
+ import { BrickOptionProps } from "../../interfaces";
4
+ export interface LegacyBrickRadioProps {
5
+ componentType?: "Button" | "Radio";
6
+ configProps?: RadioProps | RadioGroupProps;
7
+ optionList?: BrickOptionProps[];
8
+ onChange: Function;
9
+ value?: string;
10
+ }
11
+ export declare function LegacyBrickRadio({ componentType, configProps, optionList, onChange, value }: LegacyBrickRadioProps): React.ReactElement;
12
+ export declare const BrickRadio: (props: import("../wrapper-form-item/WrapperFormItem").WrapperFormItemProps) => JSX.Element;
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { BrickOptionProps } from "../../interfaces";
3
+ import { SelectProps } from "antd/lib/select";
4
+ export interface SearchInCmdb {
5
+ objectId: string;
6
+ pageSize: number;
7
+ attrFieldToSearch: string;
8
+ attrFieldToDisplay: string;
9
+ }
10
+ export interface LegacyBrickSelectProps {
11
+ configProps?: SelectProps;
12
+ optionList: BrickOptionProps[];
13
+ onChange: (value: string[]) => void;
14
+ value?: string | string[];
15
+ searchInCmdb?: SearchInCmdb;
16
+ }
17
+ export declare function LegacyBrickSelect({ configProps, optionList, onChange, value, searchInCmdb, }: LegacyBrickSelectProps): React.ReactElement;
18
+ export declare const BrickSelect: (props: import("../wrapper-form-item/WrapperFormItem").WrapperFormItemProps) => JSX.Element;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { SwitchProps } from "antd/lib/switch";
3
+ export interface SwitchMap {
4
+ truthy: any;
5
+ falsy: any;
6
+ }
7
+ export interface LegacyBrickSwitchProps {
8
+ configProps?: SwitchProps;
9
+ onChange: Function;
10
+ checked?: boolean | string;
11
+ switchMap?: SwitchMap;
12
+ }
13
+ export declare function LegacyBrickSwitch({ configProps, onChange, checked, switchMap }: LegacyBrickSwitchProps): React.ReactElement;
14
+ export declare const BrickSwitch: (props: import("../wrapper-form-item/WrapperFormItem").WrapperFormItemProps) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { TimePickerProps } from "antd/lib/time-picker";
3
+ export interface LegacyBrickTimePickerProps {
4
+ configProps?: TimePickerProps;
5
+ onChange: Function;
6
+ }
7
+ export declare function LegacyBrickTimePicker({ configProps, onChange }: LegacyBrickTimePickerProps): React.ReactElement;
8
+ export declare const BrickTimePicker: (props: import("../wrapper-form-item/WrapperFormItem").WrapperFormItemProps) => JSX.Element;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { FormComponentProps } from "@ant-design/compatible/lib/form";
3
+ import { FieldDefinition } from "../../BrickForm";
4
+ import { BrickOptionProps } from "../../interfaces";
5
+ export interface WrapperFormItemProps extends FieldDefinition, FormComponentProps {
6
+ allFields: FieldDefinition[];
7
+ optionList: string[] & BrickOptionProps[];
8
+ onFieldChange: (value: any, field: string) => void;
9
+ }
10
+ export declare function WrapperFormItem(WrapperComponent: any): (props: WrapperFormItemProps) => JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { FormLayout } from "@ant-design/compatible/lib/form/Form";
2
+ import { LegacyBrickFormProps } from "./BrickForm";
3
+ export interface BrickFormElementProps {
4
+ contractName?: string;
5
+ fields?: LegacyBrickFormProps["fields"];
6
+ cancelText?: string;
7
+ confirmText?: string;
8
+ tailFormBtnLayout?: LegacyBrickFormProps["tailFormBtnLayout"];
9
+ layout?: FormLayout;
10
+ labelCol?: LegacyBrickFormProps["labelCol"];
11
+ wrapperCol?: LegacyBrickFormProps["wrapperCol"];
12
+ }
@@ -0,0 +1,5 @@
1
+ export interface BrickOptionProps {
2
+ text: string;
3
+ value?: string;
4
+ id: string;
5
+ }
@@ -0,0 +1 @@
1
+ export * from "./brick-component";
@@ -0,0 +1 @@
1
+ export declare function handleChange(e: any, callback: Function): void;
@@ -0,0 +1 @@
1
+ export * from "./handleChange";
@@ -0,0 +1,28 @@
1
+ import React from "react";
2
+ import { Input } from "antd";
3
+ import { Size, Shape } from "./index";
4
+ interface TestGeneralSearchProps {
5
+ onUpdate: (value: string) => void;
6
+ onChange: (value: string) => void;
7
+ query: string;
8
+ size: Size;
9
+ shape: Shape;
10
+ placeholder: string;
11
+ inputStyle?: any;
12
+ buttonStyle?: any;
13
+ disableAutofocus?: boolean;
14
+ debounceTime?: number;
15
+ searchTypeEnabled?: boolean;
16
+ searchType?: "all" | "ip";
17
+ onSearchTypeChange?: (value: string) => void;
18
+ searchBoxStyleType?: "defalut" | "round";
19
+ allowClear?: boolean;
20
+ bordered?: boolean;
21
+ onBlur?: (value: string) => void;
22
+ customSearchTypeOptions?: {
23
+ label: string;
24
+ value: string;
25
+ }[];
26
+ }
27
+ export declare const BrickGeneralSearch: React.ForwardRefExoticComponent<TestGeneralSearchProps & React.RefAttributes<Input>>;
28
+ export {};