@next-bricks/presentational-bricks 1.337.0 → 1.337.2

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 (211) hide show
  1. package/deploy/contract.yaml +108 -108
  2. package/dist/bricks.json +22 -22
  3. package/dist/index.afcbac66.js +2 -0
  4. package/dist/index.afcbac66.js.map +1 -0
  5. package/package.json +3 -3
  6. package/dist/index.81d05616.js +0 -2
  7. package/dist/index.81d05616.js.map +0 -1
  8. package/dist/types/agent-status/AgentStatus.d.ts +0 -7
  9. package/dist/types/agent-status/index.d.ts +0 -59
  10. package/dist/types/avatar-upload/AvatarUpload.d.ts +0 -10
  11. package/dist/types/avatar-upload/index.d.ts +0 -51
  12. package/dist/types/banner-display-card-list/BannerDisplayCardList.d.ts +0 -15
  13. package/dist/types/banner-display-card-list/index.d.ts +0 -25
  14. package/dist/types/basic-icon/BasicIcon.d.ts +0 -17
  15. package/dist/types/basic-icon/index.d.ts +0 -96
  16. package/dist/types/basic-progress/BasicProgress.d.ts +0 -36
  17. package/dist/types/basic-progress/index.d.ts +0 -122
  18. package/dist/types/brick-alert/BrickAlert.d.ts +0 -21
  19. package/dist/types/brick-alert/index.d.ts +0 -204
  20. package/dist/types/brick-alert-level/BrickAlertLevel.d.ts +0 -7
  21. package/dist/types/brick-alert-level/index.d.ts +0 -48
  22. package/dist/types/brick-alert-number/BrickAlertNumber.d.ts +0 -6
  23. package/dist/types/brick-alert-number/index.d.ts +0 -27
  24. package/dist/types/brick-alert-status/BrickAlertStatus.d.ts +0 -8
  25. package/dist/types/brick-alert-status/index.d.ts +0 -68
  26. package/dist/types/brick-alert-value/BrickAlertValue.d.ts +0 -7
  27. package/dist/types/brick-alert-value/index.d.ts +0 -28
  28. package/dist/types/brick-button/BrickButton.d.ts +0 -11
  29. package/dist/types/brick-button/index.d.ts +0 -2
  30. package/dist/types/brick-calendar/index.d.ts +0 -141
  31. package/dist/types/brick-cluster-type/BrickClusterType.d.ts +0 -8
  32. package/dist/types/brick-cluster-type/index.d.ts +0 -63
  33. package/dist/types/brick-code-display/BrickCodeDisplay.d.ts +0 -13
  34. package/dist/types/brick-code-display/index.d.ts +0 -2
  35. package/dist/types/brick-collapse-card/BrickCollapseCard.d.ts +0 -25
  36. package/dist/types/brick-collapse-card/index.d.ts +0 -175
  37. package/dist/types/brick-collection-instance-execution/BrickCollectionInstanceExecution.d.ts +0 -7
  38. package/dist/types/brick-collection-instance-execution/index.d.ts +0 -2
  39. package/dist/types/brick-conditional-display/BrickConditionalDisplay.d.ts +0 -19
  40. package/dist/types/brick-conditional-display/index.d.ts +0 -99
  41. package/dist/types/brick-delete-confirm/BrickDeleteConfirm.d.ts +0 -21
  42. package/dist/types/brick-delete-confirm/index.d.ts +0 -2
  43. package/dist/types/brick-descriptions/BrickDescriptions.d.ts +0 -22
  44. package/dist/types/brick-descriptions/index.d.ts +0 -192
  45. package/dist/types/brick-display-structs/BrickDisplayStructs.d.ts +0 -9
  46. package/dist/types/brick-display-structs/index.d.ts +0 -66
  47. package/dist/types/brick-divider/BrickDivider.d.ts +0 -12
  48. package/dist/types/brick-divider/index.d.ts +0 -76
  49. package/dist/types/brick-form/BrickForm.d.ts +0 -73
  50. package/dist/types/brick-form/components/brick-checkbox/BrickCheckbox.d.ts +0 -11
  51. package/dist/types/brick-form/components/brick-date-picker/BrickDatePicker.d.ts +0 -9
  52. package/dist/types/brick-form/components/brick-input/BrickInput.d.ts +0 -15
  53. package/dist/types/brick-form/components/brick-input-number/BrickInputNumber.d.ts +0 -9
  54. package/dist/types/brick-form/components/brick-instance-selector/BrickInstanceSelector.d.ts +0 -13
  55. package/dist/types/brick-form/components/brick-radio/BrickRadio.d.ts +0 -12
  56. package/dist/types/brick-form/components/brick-select/BrickSelect.d.ts +0 -18
  57. package/dist/types/brick-form/components/brick-switch/BrickSwitch.d.ts +0 -14
  58. package/dist/types/brick-form/components/brick-time-picker/BrickTimePicker.d.ts +0 -8
  59. package/dist/types/brick-form/components/wrapper-form-item/WrapperFormItem.d.ts +0 -10
  60. package/dist/types/brick-form/index.d.ts +0 -12
  61. package/dist/types/brick-form/interfaces/brick-component.d.ts +0 -5
  62. package/dist/types/brick-form/interfaces/index.d.ts +0 -1
  63. package/dist/types/brick-form/processor/handleChange.d.ts +0 -1
  64. package/dist/types/brick-form/processor/index.d.ts +0 -1
  65. package/dist/types/brick-general-search/BrickGeneralSearch.d.ts +0 -28
  66. package/dist/types/brick-general-search/index.d.ts +0 -233
  67. package/dist/types/brick-humanize-time/BrickHumanizeTime.d.ts +0 -16
  68. package/dist/types/brick-humanize-time/index.d.ts +0 -101
  69. package/dist/types/brick-illustration/BrickIllustration.d.ts +0 -14
  70. package/dist/types/brick-illustration/index.d.ts +0 -87
  71. package/dist/types/brick-input/BrickInput.d.ts +0 -11
  72. package/dist/types/brick-input/index.d.ts +0 -73
  73. package/dist/types/brick-link/BrickLink.d.ts +0 -21
  74. package/dist/types/brick-link/index.d.ts +0 -208
  75. package/dist/types/brick-list/BrickList.d.ts +0 -20
  76. package/dist/types/brick-list/index.d.ts +0 -6
  77. package/dist/types/brick-placeholder/BrickPlaceholder.d.ts +0 -6
  78. package/dist/types/brick-placeholder/index.d.ts +0 -59
  79. package/dist/types/brick-quick-entries/BrickQuickEntries.d.ts +0 -16
  80. package/dist/types/brick-quick-entries/index.d.ts +0 -153
  81. package/dist/types/brick-rate/BrickRate.d.ts +0 -11
  82. package/dist/types/brick-rate/index.d.ts +0 -99
  83. package/dist/types/brick-result/BrickResult.d.ts +0 -21
  84. package/dist/types/brick-result/components/IllustrationWrapper.d.ts +0 -16
  85. package/dist/types/brick-result/index.d.ts +0 -77
  86. package/dist/types/brick-table/BrickTable.d.ts +0 -57
  87. package/dist/types/brick-table/brickTableHelper.d.ts +0 -6
  88. package/dist/types/brick-table/index.d.ts +0 -828
  89. package/dist/types/brick-tag/BrickTag.d.ts +0 -35
  90. package/dist/types/brick-tag/index.d.ts +0 -194
  91. package/dist/types/brick-timeline/BrickTimeline.d.ts +0 -16
  92. package/dist/types/brick-timeline/TimelineCard.d.ts +0 -15
  93. package/dist/types/brick-timeline/index.d.ts +0 -119
  94. package/dist/types/brick-timeline/processor.d.ts +0 -5
  95. package/dist/types/brick-tree/BrickTree.d.ts +0 -67
  96. package/dist/types/brick-tree/index.d.ts +0 -325
  97. package/dist/types/brick-user/BrickUser.d.ts +0 -15
  98. package/dist/types/brick-user/index.d.ts +0 -130
  99. package/dist/types/brick-user-group/BrickUserGroup.d.ts +0 -12
  100. package/dist/types/brick-user-group/index.d.ts +0 -61
  101. package/dist/types/brick-utils/index.d.ts +0 -44
  102. package/dist/types/brick-value-mapping/BrickValueMapping.d.ts +0 -24
  103. package/dist/types/brick-value-mapping/index.d.ts +0 -132
  104. package/dist/types/button-wrapper/ButtonWrapper.d.ts +0 -7
  105. package/dist/types/button-wrapper/index.d.ts +0 -4
  106. package/dist/types/card-item/CardItem.d.ts +0 -52
  107. package/dist/types/card-item/index.d.ts +0 -392
  108. package/dist/types/code-editor/CodeEditor.d.ts +0 -19
  109. package/dist/types/code-editor/brace/mode.d.ts +0 -4
  110. package/dist/types/code-editor/brace/theme.d.ts +0 -3
  111. package/dist/types/code-editor/index.d.ts +0 -118
  112. package/dist/types/collapse-info-list/CollapseInfoList.d.ts +0 -19
  113. package/dist/types/collapse-info-list/index.d.ts +0 -53
  114. package/dist/types/collapsible-card-item/CollapsibleCardItem.d.ts +0 -19
  115. package/dist/types/collapsible-card-item/index.d.ts +0 -165
  116. package/dist/types/copyable-text/CopyableText.d.ts +0 -12
  117. package/dist/types/copyable-text/index.d.ts +0 -73
  118. package/dist/types/cost-time/CostTime.d.ts +0 -9
  119. package/dist/types/cost-time/i18n/constants.d.ts +0 -20
  120. package/dist/types/cost-time/index.d.ts +0 -73
  121. package/dist/types/crontab-display/CrontabDisplay.d.ts +0 -5
  122. package/dist/types/crontab-display/index.d.ts +0 -47
  123. package/dist/types/datetime-selector/DatetimeSelector.d.ts +0 -19
  124. package/dist/types/datetime-selector/index.d.ts +0 -167
  125. package/dist/types/datetime-selector/processor.d.ts +0 -16
  126. package/dist/types/digital-number/DigitalNumber.d.ts +0 -21
  127. package/dist/types/digital-number/index.d.ts +0 -101
  128. package/dist/types/dropdown-button/DropdownButton.d.ts +0 -17
  129. package/dist/types/dropdown-button/index.d.ts +0 -106
  130. package/dist/types/dropdown-select/DropdownSelect.d.ts +0 -37
  131. package/dist/types/dropdown-select/index.d.ts +0 -231
  132. package/dist/types/dynamic-content/index.d.ts +0 -35
  133. package/dist/types/dynamic-grid-container/DynamicGridContainer.d.ts +0 -9
  134. package/dist/types/dynamic-grid-container/index.d.ts +0 -47
  135. package/dist/types/entry-card-item/EntryCardItem.d.ts +0 -20
  136. package/dist/types/entry-card-item/index.d.ts +0 -146
  137. package/dist/types/general-badge/index.d.ts +0 -95
  138. package/dist/types/general-carousel/GeneralCarousel.d.ts +0 -28
  139. package/dist/types/general-carousel/index.d.ts +0 -197
  140. package/dist/types/general-iframe/index.d.ts +0 -62
  141. package/dist/types/general-image/GeneralImage.d.ts +0 -14
  142. package/dist/types/general-image/index.d.ts +0 -124
  143. package/dist/types/general-label/GeneralLabel.d.ts +0 -12
  144. package/dist/types/general-label/index.d.ts +0 -79
  145. package/dist/types/general-list/GeneralList.d.ts +0 -8
  146. package/dist/types/general-list/index.d.ts +0 -59
  147. package/dist/types/general-pagination/GeneralPagination.d.ts +0 -12
  148. package/dist/types/general-pagination/index.d.ts +0 -108
  149. package/dist/types/general-preview-image/GeneralPreviewImage.d.ts +0 -9
  150. package/dist/types/general-preview-image/components/Image.d.ts +0 -35
  151. package/dist/types/general-preview-image/components/Operations.d.ts +0 -20
  152. package/dist/types/general-preview-image/components/Preview.d.ts +0 -24
  153. package/dist/types/general-preview-image/components/PreviewGroup.d.ts +0 -40
  154. package/dist/types/general-preview-image/components/getFixScaleEleTransPosition.d.ts +0 -16
  155. package/dist/types/general-preview-image/components/hooks/useImageTransform.d.ts +0 -23
  156. package/dist/types/general-preview-image/components/previewConfig.d.ts +0 -8
  157. package/dist/types/general-preview-image/index.d.ts +0 -75
  158. package/dist/types/general-slider/GeneralSlider.d.ts +0 -18
  159. package/dist/types/general-slider/index.d.ts +0 -118
  160. package/dist/types/general-tooltip/GeneralTooltip.d.ts +0 -19
  161. package/dist/types/general-tooltip/index.d.ts +0 -117
  162. package/dist/types/general-transfer/GeneralTransfer.d.ts +0 -19
  163. package/dist/types/general-transfer/index.d.ts +0 -160
  164. package/dist/types/general-video/GeneralVideo.d.ts +0 -11
  165. package/dist/types/general-video/index.d.ts +0 -51
  166. package/dist/types/i18n/constants.d.ts +0 -51
  167. package/dist/types/info-display-card-list/InfoDisplayCardList.d.ts +0 -27
  168. package/dist/types/info-display-card-list/index.d.ts +0 -148
  169. package/dist/types/interfaces/brick-collapse-card.d.ts +0 -4
  170. package/dist/types/interfaces/brick-result.d.ts +0 -27
  171. package/dist/types/interfaces/brick-tag.d.ts +0 -35
  172. package/dist/types/interfaces/brick-tree.d.ts +0 -5
  173. package/dist/types/interfaces/common.d.ts +0 -15
  174. package/dist/types/interfaces/dropdown-select.d.ts +0 -7
  175. package/dist/types/interfaces/index.d.ts +0 -2
  176. package/dist/types/jsx.d.ts +0 -315
  177. package/dist/types/log-display/LogDisplay.d.ts +0 -8
  178. package/dist/types/log-display/index.d.ts +0 -54
  179. package/dist/types/markdown-display/MarkdownDisplay.d.ts +0 -17
  180. package/dist/types/markdown-display/SyntaxHighlighter.d.ts +0 -13
  181. package/dist/types/markdown-display/index.d.ts +0 -88
  182. package/dist/types/markdown-editor/MarkdownEditor.d.ts +0 -23
  183. package/dist/types/markdown-editor/index.d.ts +0 -154
  184. package/dist/types/modal-confirm/ModalConfirm.d.ts +0 -30
  185. package/dist/types/modal-confirm/index.d.ts +0 -231
  186. package/dist/types/qrcode-download/index.d.ts +0 -77
  187. package/dist/types/qrcode-download/utils.d.ts +0 -6
  188. package/dist/types/rank-table/RankTable.d.ts +0 -21
  189. package/dist/types/rank-table/RankTableHelper.d.ts +0 -14
  190. package/dist/types/rank-table/index.d.ts +0 -215
  191. package/dist/types/single-field-edit/SingleFieldEdit.d.ts +0 -22
  192. package/dist/types/single-field-edit/index.d.ts +0 -148
  193. package/dist/types/statistic-card/StatisticCard.d.ts +0 -15
  194. package/dist/types/statistic-card/index.d.ts +0 -130
  195. package/dist/types/table-transfer/TableTransfer.d.ts +0 -32
  196. package/dist/types/table-transfer/TableTransferHelper.d.ts +0 -14
  197. package/dist/types/table-transfer/index.d.ts +0 -123
  198. package/dist/types/template-breadcrumb/index.d.ts +0 -67
  199. package/dist/types/text-collapse/TextCollapse.d.ts +0 -7
  200. package/dist/types/text-collapse/index.d.ts +0 -33
  201. package/dist/types/tree-transfer/TreeTransfer.d.ts +0 -18
  202. package/dist/types/tree-transfer/index.d.ts +0 -96
  203. package/dist/types/tree-transfer/treeShuttleBox/TreeShuttleBox.d.ts +0 -19
  204. package/dist/types/tree-transfer/treeShuttleBox/TreeShuttleBoxLeft.d.ts +0 -10
  205. package/dist/types/tree-transfer/treeShuttleBox/TreeShuttleBoxRight.d.ts +0 -9
  206. package/dist/types/tree-transfer/treeShuttleBox/TreeShuttleButton.d.ts +0 -7
  207. package/dist/types/tree-transfer/treeShuttleBox/index.d.ts +0 -3
  208. package/dist/types/tree-transfer/treeShuttleBox/interfaceType.d.ts +0 -14
  209. package/dist/types/tree-transfer/treeShuttleBox/tool.d.ts +0 -67
  210. package/dist/types/tree-transfer/treeShuttleBox/useTreeContext.d.ts +0 -35
  211. package/dist/types/tree-transfer/treeShuttleBox/useTreeShuttle.d.ts +0 -31
@@ -1,99 +0,0 @@
1
- import { UpdatingElement } from "@next-core/brick-kit";
2
- import { DisplayType, RuleProps } from "./BrickConditionalDisplay";
3
- export type { RuleProps, DisplayType };
4
- export interface BrickConditionalDisplayElementProps {
5
- rules?: RuleProps[];
6
- fields?: {
7
- value: string;
8
- };
9
- dataSource?: DataType;
10
- type?: DisplayType;
11
- }
12
- export declare type DataType = string | number | Record<string, any>;
13
- export declare enum ConditionOperator {
14
- eq = "$eq",
15
- ne = "$ne",
16
- gt = "$gt",
17
- gte = "$gte",
18
- lt = "$lt",
19
- lte = "$lte"
20
- }
21
- export declare enum LogicalOperator {
22
- and = "$and",
23
- or = "$or"
24
- }
25
- export declare type ConditionType = boolean | number | string | Record<string | ConditionOperator, any> | LogicalCondition;
26
- export interface LogicalCondition extends Record<string | LogicalOperator, ConditionType[]> {
27
- }
28
- /**
29
- * @id presentational-bricks.brick-conditional-display
30
- * @name presentational-bricks.brick-conditional-display
31
- * @docKind brick
32
- * @description 按不同条件渲染,比如告警数为0是绿色,大于1时显示黄色
33
- * @author cyril
34
- * @slots
35
- * @history
36
- * @memo
37
- * 这个构件的配置相对复杂,适用于区间的条件规则,比如大于、小于等,如果是一些明确的值映射,请使用[基本数值映射](developers/brick-book/brick/presentational-bricks.brick-value-mapping)
38
- * ```typescript
39
- * enum ConditionOperator {
40
- * eq = "$eq",
41
- * ne = "$ne",
42
- * gt = "$gt",
43
- * gte = "$gte",
44
- * lt = "$lt",
45
- * lte = "$lte",
46
- * }
47
- *
48
- * enum LogicalOperator {
49
- * and = "$and",
50
- * or = "$or",
51
- * }
52
- *
53
- * type ConditionType =
54
- * | boolean
55
- * | number
56
- * | string
57
- * | Record<string | ConditionOperator, any>
58
- * | LogicalCondition;
59
- *
60
- * interface LogicalCondition
61
- * extends Record<string | LogicalOperator, ConditionType[]> {}
62
- * ```
63
- *
64
- * @noInheritDoc
65
- */
66
- export declare class BrickConditionalDisplayElement extends UpdatingElement implements BrickConditionalDisplayElementProps {
67
- /**
68
- * @required false
69
- * @description 展示规则, 具体请查看[Mongodb条件操作符](https://www.mongodb.com/docs/manual/reference/operator/query/)
70
- * @group basic
71
- */
72
- rules: RuleProps[];
73
- /**
74
- * @required false
75
- * @description [已废弃]显示的字段值,支持通过 path 指定
76
- * @deprecated
77
- * @group other
78
- */
79
- fields: {
80
- value: string;
81
- };
82
- /**
83
- * @required true
84
- * @description 数据
85
- * @group basic
86
- */
87
- dataSource: DataType;
88
- /**
89
- * @kind "default" | "label"
90
- * @required false
91
- * @default "label"
92
- * @description 展示类型,label 表示通过标签的风格展示相关内容,default 表示默认的风格展示(display: block)
93
- * @group basic
94
- */
95
- type: DisplayType;
96
- connectedCallback(): void;
97
- disconnectedCallback(): void;
98
- protected _render(): void;
99
- }
@@ -1,21 +0,0 @@
1
- import React from "react";
2
- import { ButtonProps } from "antd/lib/button";
3
- export interface LegacyBrickDeleteConfirmProps {
4
- deleteName: string;
5
- originBtnProps?: ButtonProps;
6
- onDelete: () => void;
7
- className?: any;
8
- visible?: boolean;
9
- loading: boolean;
10
- handleCancel?: () => void;
11
- }
12
- export interface CardBodyProps {
13
- name: string;
14
- content: string;
15
- handleChange: (value: string) => void;
16
- }
17
- export interface CardBodyState {
18
- value: string;
19
- }
20
- export declare function CardBody(props: CardBodyProps): React.ReactElement;
21
- export declare function BrickDeleteConfirm(props: LegacyBrickDeleteConfirmProps): React.ReactElement;
@@ -1,2 +0,0 @@
1
- export interface BrickDeleteConfirmElementProps {
2
- }
@@ -1,22 +0,0 @@
1
- import React from "react";
2
- import { DescriptionsProps } from "antd/lib/descriptions";
3
- import { UseBrickConf } from "@next-core/brick-types";
4
- import { BrickDescriptionsItemProps } from "./index";
5
- export interface BrickDescriptionsProps {
6
- configProps?: DescriptionsProps;
7
- itemList: BrickDescriptionsItemProps[];
8
- itemIdBrickMap?: Record<string, {
9
- useBrick: UseBrickConf;
10
- }>;
11
- dataSource?: any;
12
- descriptionTitle?: string;
13
- column?: number;
14
- size?: "default" | "middle" | "small";
15
- bordered?: boolean;
16
- layout?: "horizontal" | "vertical";
17
- hideGroups?: string[] | string;
18
- extraBrick?: {
19
- useBrick: UseBrickConf;
20
- };
21
- }
22
- export declare function BrickDescriptions(props: BrickDescriptionsProps): React.ReactElement;
@@ -1,192 +0,0 @@
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
- }
@@ -1,9 +0,0 @@
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 {};
@@ -1,66 +0,0 @@
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
- }
@@ -1,12 +0,0 @@
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 {};
@@ -1,76 +0,0 @@
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
- }
@@ -1,73 +0,0 @@
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 {};
@@ -1,11 +0,0 @@
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;
@@ -1,9 +0,0 @@
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;
@@ -1,15 +0,0 @@
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;
@@ -1,9 +0,0 @@
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;
@@ -1,13 +0,0 @@
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;
@@ -1,12 +0,0 @@
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;
@@ -1,18 +0,0 @@
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;