@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,132 +0,0 @@
1
- import { LinkProps } from "@next-libs/basic-components";
2
- import { UpdatingElement, EventEmitter } from "@next-core/brick-kit";
3
- import { MappingValue } from "./BrickValueMapping";
4
- export type { MappingValue };
5
- export interface BrickValueMappingElementProps {
6
- value?: string | number;
7
- fields?: {
8
- value: string;
9
- };
10
- mapping?: Record<string | number, MappingValue>;
11
- showTagCircle?: boolean;
12
- dataSource?: Record<string, any>;
13
- triggerClickEvent?: boolean;
14
- isTextEllipsis?: boolean;
15
- link?: LinkProps;
16
- data?: any;
17
- }
18
- /**
19
- * @id presentational-bricks.brick-value-mapping
20
- * @name presentational-bricks.brick-value-mapping
21
- * @editor shared-editors.general-tag--editor
22
- * @docKind brick
23
- * @description 适用于将基本类型的数值转换成有意义的文本进行展示
24
- * @author ice
25
- * @slots
26
- * @history
27
- * 1.89.11:使用 `dataSource` 代替之前 `data`
28
- * 1.83.0:新增 `triggerClickEvent`, `link`, `data` 属性
29
- * 1.65.0:新增属性`shape`,支持大圆角
30
- * 1.52.0:新增特性,支持正则匹配
31
- * 1.48.0:新增特性,映射成 icon
32
- * @memo
33
- * ## 注意
34
- * > 如果需要区间的条件规则映射,比如大于、小于等,请使用[条件展示](developers/brick-book/brick/presentational-bricks.brick-conditional-display)
35
- *
36
- * ## LinkProps
37
- * ```typescript
38
- * interface LinkProps {
39
- * to?: string;
40
- * href?: string;
41
- * innerRef?: string;
42
- * replace?: boolean;
43
- * target?: string;
44
- * }
45
- * ```
46
- * ## 映射规则说明
47
- *
48
- * 映射支持正则匹配,匹配规则如下:
49
- *
50
- * 1. 首先以 `value` 为 key 来获取映射,若成功匹配则使用该规则来展示;若不成功,则走下一步
51
- * 2. 将 `映射规则` 中的 key 作为正则,来匹配 `value`, 使用成功匹配的第一个规则
52
- *
53
- * 例如
54
- *
55
- * ```typescript
56
- * // 以下将展示 `hi`
57
- * const mapping = { hello: { text: "hi" }, ".*": { text: "anything else" } };
58
- * const value = "hello";
59
- *
60
- * // 以下将展示 `anything else`
61
- * const mapping = {
62
- * www: { text: "world wide web" },
63
- * ".*": { text: "anything else" },
64
- * };
65
- * const value = "hello";
66
- * ```
67
- * @noInheritDoc
68
- */
69
- export declare class BrickValueMappingElement extends UpdatingElement implements BrickValueMappingElementProps {
70
- /**
71
- * @description 点击事件
72
- */
73
- valueMappingClick: EventEmitter<{
74
- data: any;
75
- value: string | number;
76
- }>;
77
- /**
78
- * @description 原始值
79
- * @group basic
80
- */
81
- value?: string | number;
82
- /**
83
- * @description [已废弃]字段映射, 跟 dataSource 一起使用来获得运行时 value
84
- * @deprecated
85
- * @group other
86
- */
87
- fields?: {
88
- value: string;
89
- };
90
- /**
91
- * @description 映射规则
92
- * @group basic
93
- */
94
- mapping: Record<string | number, MappingValue>;
95
- /**
96
- * @description 显示文字旁边的小圈圈,按照平台规范通常表示状态的标签可设置为 true
97
- * @group basic
98
- */
99
- showTagCircle?: boolean;
100
- /**
101
- * @description 替代 `data` 属性,click 事件时传出的数据
102
- * @group basic
103
- */
104
- dataSource?: Record<string, any>;
105
- /**
106
- * @default false
107
- * @description 是否触发点击事件
108
- * @group other
109
- */
110
- triggerClickEvent?: boolean;
111
- /**
112
- * @default false
113
- * @description 文案是否超出隐藏
114
- * @group other
115
- */
116
- isTextEllipsis?: boolean;
117
- /**
118
- * @description 配置跳转链接,在 `triggerClickEvent` 为 false 生效
119
- * @group other
120
- */
121
- link?: LinkProps;
122
- /**
123
- * @description [已废弃]可用于接收 useBrick 传递过来的数据
124
- * @deprecated
125
- * @group other
126
- */
127
- data?: any;
128
- connectedCallback(): void;
129
- disconnectedCallback(): void;
130
- handleClick: () => void;
131
- protected _render(): void;
132
- }
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- export interface ButtonWrapperProps {
3
- description: string;
4
- brick: string | any;
5
- properties: any;
6
- }
7
- export declare function ButtonWrapper(props: ButtonWrapperProps): React.ReactElement;
@@ -1,4 +0,0 @@
1
- export interface ButtonWrapperElementProps {
2
- description?: string;
3
- brick?: string;
4
- }
@@ -1,52 +0,0 @@
1
- import React from "react";
2
- import { MenuIcon } from "@next-core/brick-types";
3
- import { CardLayoutType, Color } from "./index";
4
- import { CardProps } from "antd/lib/card";
5
- interface CardItemProps {
6
- cardLayoutType?: CardLayoutType;
7
- cardTitle: string;
8
- cardSubtitle?: string;
9
- newDescription?: string;
10
- descriptionList?: string[] | string;
11
- topInformation?: string;
12
- hideDescCircle?: boolean;
13
- icon?: MenuIcon;
14
- iconStyle?: Record<string, any>;
15
- dataSource: Record<string, any>;
16
- url?: string;
17
- href?: string;
18
- showTag?: boolean;
19
- hideOperate?: boolean;
20
- tagText?: string;
21
- tagColor?: Color;
22
- tagTriangle?: boolean;
23
- iconColor?: Color;
24
- descMaxLine?: number;
25
- hasOperateSlot?: boolean;
26
- hasExtraOperateSlot?: boolean;
27
- hasBottomRightOperateSlot?: boolean;
28
- onlyOperateSlot?: boolean;
29
- iconSize?: string | number;
30
- iconOffsetX?: string | number;
31
- iconOffsetY?: string | number;
32
- iconOpacity?: number;
33
- target?: string;
34
- configProps?: CardProps;
35
- bordered?: boolean;
36
- hoverable?: boolean;
37
- showOperationAreaWhenHovering?: boolean;
38
- alwaysShowDescription?: boolean;
39
- descriptionDataType?: "list" | "section";
40
- disabled?: boolean;
41
- reverseBgColor?: boolean;
42
- imgSrc?: string;
43
- showImg?: boolean;
44
- imgSize?: number;
45
- shape?: "circle" | "square" | "round-square";
46
- useLinkBehavior?: boolean;
47
- disabledLink?: boolean;
48
- onClick?: () => void;
49
- useAfterDescriptionSlot?: boolean;
50
- }
51
- export declare function CardItem(props: CardItemProps): React.ReactElement;
52
- export {};
@@ -1,392 +0,0 @@
1
- import { UpdatingElement, EventEmitter } from "@next-core/brick-kit";
2
- import { MenuIcon } from "@next-core/brick-types";
3
- import { CardProps } from "antd/lib/card";
4
- export interface CardItemElementProps {
5
- cardLayoutType?: CardLayoutType;
6
- fields?: {
7
- cardTitle?: string;
8
- cardSubtitle?: string;
9
- newDescription?: string;
10
- topInformation?: string;
11
- descriptionList?: string;
12
- icon?: string;
13
- iconColor?: string;
14
- iconStyle?: string;
15
- iconSize?: string;
16
- iconOffsetX?: string;
17
- iconOffsetY?: string;
18
- iconOpacity?: string;
19
- disabled?: string;
20
- };
21
- dataSource?: Record<string, any>;
22
- urlTemplate?: string;
23
- cardTitle?: string;
24
- cardSubtitle?: string;
25
- newDescription?: string;
26
- topInformation?: string;
27
- descriptionList?: string[] | string | DescriptionItem[];
28
- descMaxLine?: number;
29
- hideDescCircle?: boolean;
30
- url?: string;
31
- href?: string;
32
- target?: string;
33
- icon?: MenuIcon;
34
- iconStyle?: Record<string, any>;
35
- iconColor?: Color;
36
- iconSize?: string | number;
37
- iconOffsetX?: string | number;
38
- iconOffsetY?: string | number;
39
- iconOpacity?: number;
40
- tagConfig?: {
41
- text: string;
42
- field?: string;
43
- value?: any;
44
- isNotEqual?: boolean;
45
- hideOperate?: boolean;
46
- color?: Color;
47
- triangle?: boolean;
48
- };
49
- configProps?: CardProps;
50
- showOperationAreaWhenHovering?: boolean;
51
- alwaysShowDescription?: boolean;
52
- descriptionDataType?: "list" | "section";
53
- disabled?: boolean;
54
- reverseBgColor?: boolean;
55
- imgSrc?: string;
56
- showImg?: boolean;
57
- imgSize?: number;
58
- shape?: "circle" | "square" | "round-square";
59
- }
60
- export declare type Color = "green" | "red" | "blue" | "orange" | "cyan" | "purple" | "geekblue" | "gray";
61
- export declare enum CardLayoutType {
62
- ICON_AS_BACKGROUND = "icon-as-background",
63
- ICON_SMALL_ALIGN_LEFT = "icon-small-align-left",
64
- ICON_ALIGN_RIGHT = "icon-align-right",
65
- ICON_ALIGN_LEFT = "icon-align-left",
66
- ICON_ALIGN_MIDDLE = "icon-align-middle",
67
- BLOCK_ICON_ALIGN_LEFT = "block-icon-align-left"
68
- }
69
- export interface DescriptionItem {
70
- label: string;
71
- field?: string;
72
- value?: string;
73
- }
74
- /**
75
- * @id presentational-bricks.card-item
76
- * @name presentational-bricks.card-item
77
- * @docKind brick
78
- * @description 通用卡片项
79
- * @author lynette
80
- * @slots
81
- * afterTitle: 标题后面的slot,通常搭配"presentational-bricks.brick-value-mapping"使用
82
- * afterSubtitle: 副标题后的slot,卡片类型 cardLayoutType 为 "icon-small-align-left" | "icon-align-left" "时可用
83
- * operate:操作区 slot,通常搭配"basic-bricks.general-button"使用。
84
- * topRightOperate:右上角操作区 slot,通常搭配"basic-bricks.general-custom-buttons"使用。卡片类型 cardLayoutType 为 "icon-as-background" | "icon-small-align-left" | "icon-align-left" | "icon-align-middle" | "block-icon-align-left"时可用。
85
- * bottomRightOperate:右下角操作区 slot,通常搭配"basic-bricks.general-custom-buttons"使用。卡片类型 cardLayoutType 为 "icon-as-background"(icon不设置) | "icon-small-align-left" | "icon-align-right" | "icon-align-left" 时可用。
86
- * afterDescription:描述列表后的slot,通常搭配"basic-bricks.brick-value-mapping"使用。卡片类型 cardLayoutType 为 "icon-as-background"(useAfterDescriptionSlot设置)时可用。
87
- * @history
88
- * 1.171.0: `cardLayoutType` 增加 "block-icon-align-left" 类型,新增属性 `showImg`,`imgSrc`,`tagConfig.color`,`tagConfig.triangle`
89
- * 1.160.0: `cardLayoutType` 增加 "icon-align-middle" 类型
90
- * 1.160.0: 新增属性`disabled`,`fields.disabled`
91
- * 1.150.0: 新增属性`alwaysShowDescription`
92
- * 1.135.0: 新增属性`showOperationAreaWhenHovering`
93
- * 1.94.0: 新增属性`href`
94
- * @memo
95
- * @noInheritDoc
96
- */
97
- export declare class CardItemElement extends UpdatingElement implements CardItemElementProps {
98
- /**
99
- * @required false
100
- * @default "icon-as-background"
101
- * @description 卡片布局类型,具体样式看 Demo
102
- * @group basic
103
- */
104
- cardLayoutType: CardLayoutType;
105
- /**
106
- * @required false
107
- * @description 字段映射, 跟 dataSource 一起使用来获得运行时 cardTitle、cardSubtitle、newDescription、topInformation、descriptionList、icon、iconColor、iconStyle、iconSize、iconOffsetX、iconOffsetY、iconOpacity、disabled
108
- * @group other
109
- */
110
- fields: {
111
- cardTitle?: string;
112
- cardSubtitle?: string;
113
- newDescription?: string;
114
- topInformation?: string;
115
- descriptionList?: string;
116
- icon?: string;
117
- iconColor?: string;
118
- iconStyle?: string;
119
- iconSize?: string;
120
- iconOffsetX?: string;
121
- iconOffsetY?: string;
122
- iconOpacity?: string;
123
- disabled?: string;
124
- };
125
- /**
126
- * @required true
127
- * @description 卡片信息数据源
128
- * @group basic
129
- */
130
- dataSource: Record<string, any>;
131
- /**
132
- * @required false
133
- * @description 卡片跳转 url,支持模版变量
134
- * @group basic
135
- */
136
- urlTemplate: string;
137
- /**
138
- * @detail
139
- * @description 点击的 card-item 触发的事件,tips:点击卡片会先判断事件监听器能否传播到 class="listContainer cardListContainer"元素,是则触发自身的\_handleClick 方法触发事件,否则不会触发事件。
140
- */
141
- cardItemClick: EventEmitter<any>;
142
- private _mountPoint;
143
- private hasOperateSlot;
144
- private hasExtraOperateSlot;
145
- private hasBottomRightOperateSlot;
146
- /**
147
- * @required false
148
- * @default false
149
- * @description 解决只有operateSlot时宽度不能占满
150
- * @group ui
151
- */
152
- private onlyOperateSlot;
153
- /**
154
- * @required false
155
- * @description 卡片 title
156
- * @group basic
157
- */
158
- cardTitle: string;
159
- /**
160
- * @required false
161
- * @description 卡片 副标题
162
- * @group basic
163
- */
164
- cardSubtitle: string;
165
- /**
166
- * @required false
167
- * @description 卡片 新的描述信息、存在时cardSubtitle、descriptionList属性不生效
168
- * @group basic
169
- */
170
- newDescription: string;
171
- /**
172
- * @required false
173
- * @description 卡片 顶部辅助信息
174
- * @group basic
175
- */
176
- topInformation: string;
177
- /**
178
- * @required false
179
- * @description 描述信息
180
- * @group basic
181
- */
182
- descriptionList: string[] | string | DescriptionItem[];
183
- /**
184
- * @required false
185
- * @default 3
186
- * @description 描述信息的最大行数,默认为 3 行,当信息比较少的时候可以设成 3 行以下。UI 规范建议 3 或者 3 以下。
187
- * @group ui
188
- */
189
- descMaxLine: number;
190
- /**
191
- * @required false
192
- * @description 描述信息为数组的时候,默认显示每个`<li>`前面的小圈圈,不需要的时候可以隐藏
193
- * @group ui
194
- */
195
- hideDescCircle: boolean;
196
- /**
197
- * @required false
198
- * @description 卡片跳转 url, url 优先于 urlTemplate 执行
199
- * @group basic
200
- */
201
- url: string;
202
- /**
203
- * @required false
204
- * @description 卡片跳转 href,优先于 url 执行
205
- * @group basic
206
- */
207
- href: string;
208
- /**
209
- * @required false
210
- * @description 卡片跳转 target,例如可以设置成 _blank
211
- * @group basic
212
- */
213
- target: string;
214
- /**
215
- * @required false
216
- * @description 卡片右下角的 icon, [详细配置](https://github.com/easyops-cn/next-core/blob/34a0808712ecaa925d0860d281ab23cf3bec7317/packages/brick-types/src/menu.ts#L104), 也可参照示例中的写法
217
- * @group basic
218
- */
219
- icon: MenuIcon;
220
- /**
221
- * @kind Record<string, any>
222
- * @required false
223
- * @description 卡片右下角的 icon 的样式,例如需要调整 opacity、right、bottom 的时候可以使用
224
- * @group ui
225
- */
226
- iconStyle: Record<string, any>;
227
- /**
228
- * @required false
229
- * @description 卡片类型为 "icon-small-align-left" | "icon-align-right" | "icon-align-left" 的时候可以设置 icon 的颜色
230
- * @group ui
231
- */
232
- iconColor: Color;
233
- /**
234
- * @kind string | number
235
- * @required false
236
- * @default 100px
237
- * @description 卡片类型为 "icon-as-background" 的时候可以设置 icon 的大小
238
- * @group ui
239
- */
240
- iconSize: string | number;
241
- /**
242
- * @kind string | number
243
- * @required false
244
- * @default 0
245
- * @description 卡片类型为 "icon-as-background" 的时候可以设置 icon 的 X 轴偏移量,向左为正数向右为负数
246
- * @group basic
247
- */
248
- iconOffsetX: string | number;
249
- /**
250
- * @kind string | number
251
- * @required false
252
- * @default 0
253
- * @description 卡片类型为 "icon-as-background" 的时候可以设置 icon 的 Y 轴偏移量,向上为正数向下为负数
254
- * @group basic
255
- */
256
- iconOffsetY: string | number;
257
- /**
258
- * @kind number
259
- * @required false
260
- * @default 0.45
261
- * @description 卡片类型为 "icon-as-background" 的时候可以设置 icon 的透明度
262
- * @group ui
263
- */
264
- iconOpacity: number;
265
- /**
266
- * @required false
267
- * @description 右上角 tag 标签
268
- * @group other
269
- */
270
- tagConfig: {
271
- text: string;
272
- field?: string;
273
- value?: any;
274
- isNotEqual?: boolean;
275
- hideOperate?: boolean;
276
- color?: Color;
277
- triangle?: boolean;
278
- };
279
- /**
280
- * @required false
281
- * @description 完全透传给 antd 的 Card 属性,详见:[antd卡片属性](https://ant.design/components/card-cn/#Card)
282
- * @group other
283
- */
284
- configProps: CardProps;
285
- /**
286
- * @required false
287
- * @default true
288
- * @description 卡片项是否显示外边框
289
- * @group ui
290
- */
291
- bordered: boolean;
292
- /**
293
- * @required false
294
- * @default false
295
- * @description 是否鼠标悬浮显示操作区
296
- * @group basic
297
- */
298
- showOperationAreaWhenHovering: boolean;
299
- /**
300
- * @required false
301
- * @default false
302
- * @description 是否总是总是展示描述区域
303
- * @group basic
304
- */
305
- alwaysShowDescription: boolean;
306
- /**
307
- * @required false
308
- * @default false
309
- * @description 指定描述区的显示形式,若descriptionList为数组时,应当指定为 `list`,若descriptionList为字符串时,应当指定为 `section`,单独使用卡片时无需设置该属性
310
- * @group basic
311
- */
312
- descriptionDataType: "list" | "section";
313
- /**
314
- * @required false
315
- * @default true
316
- * @description 卡片项是否hover浮起
317
- * @group ui
318
- */
319
- hoverable: boolean;
320
- /**
321
- * @required false
322
- * @default false
323
- * @description 禁用卡片,禁用的卡片不可点击跳转。操作区配置了 slot 的卡片,请按需配置子构件的属性,例如将按钮设置成 disabled 等。
324
- * @group basic
325
- */
326
- disabled: boolean;
327
- /**
328
- * @required false
329
- * @default false
330
- * @description 反转背景色,背景色为icon传入的颜色,icon为白色。
331
- * @group ui
332
- */
333
- reverseBgColor: boolean;
334
- /**
335
- * @required false
336
- * @description 图片图标的src
337
- * @group basic
338
- */
339
- imgSrc: string;
340
- /**
341
- * @required false
342
- * @default false
343
- * @description 是否显示图片,默认显示图标,设置显示图片后,可配置 `imgSrc` 属性
344
- * @group basic
345
- */
346
- showImg: boolean;
347
- /**
348
- * @required false
349
- * @description 图标是img时,可以设置 img 的大小,不设置时会铺满
350
- * @group basic
351
- */
352
- imgSize: number;
353
- /**
354
- * @default "circle"
355
- * @required false
356
- * @description 设置icon背景形状,仅在设置`bg`为true时有效
357
- * @group basic
358
- */
359
- shape: "circle" | "square" | "round-square";
360
- /**
361
- * @required true
362
- * @default true
363
- * @description 卡片是否使用a标签实现点击
364
- * @group basic
365
- */
366
- useLinkBehavior: boolean;
367
- /**
368
- * @required false
369
- * @default false
370
- * @description 卡片类型 cardLayoutType 为 "icon-as-background" 是否使用afterDescription插槽
371
- * @group basic
372
- */
373
- useAfterDescriptionSlot: boolean;
374
- constructor();
375
- private _handleClick;
376
- connectedCallback(): void;
377
- disconnectedCallback(): void;
378
- protected _render(): void;
379
- private _getOperateSlot;
380
- private _checkOperateSlot;
381
- private _getExtraOperateSlot;
382
- private _checkExtraOperateSlot;
383
- private _getBottomRightOperateSlot;
384
- private _checkBottomRightOperateSlot;
385
- getDescriptionList(descriptionList: any, dataSource: any): any[];
386
- initData(mutableProps: {
387
- url: string;
388
- cardTitle: string;
389
- descriptionList: string[] | string;
390
- icon: MenuIcon;
391
- }): void;
392
- }
@@ -1,19 +0,0 @@
1
- import React from "react";
2
- import "./brace/mode";
3
- import "./brace/theme";
4
- interface CodeEditorProps {
5
- theme: string;
6
- mode: string;
7
- setOptions?: Record<string, any>;
8
- editorProps?: Record<string, any>;
9
- editorStyle?: Record<string, any>;
10
- dataSource: any;
11
- configProps?: any;
12
- handleChange?: (value: any) => void;
13
- handleErrorChange?: (value: boolean) => void;
14
- handleBlur?: (value: any) => void;
15
- handleValidate?: (value: any) => void;
16
- required: boolean;
17
- }
18
- export declare function CodeEditor({ theme, mode, setOptions, editorProps, dataSource, configProps, handleChange, handleBlur, handleErrorChange, required, editorStyle }: CodeEditorProps): React.ReactElement;
19
- export {};
@@ -1,4 +0,0 @@
1
- import "brace/mode/json";
2
- import "brace/mode/yaml";
3
- import "brace/mode/text";
4
- import "brace/mode/sh";
@@ -1,3 +0,0 @@
1
- import "brace/theme/tomorrow";
2
- import "brace/theme/github";
3
- import "brace/theme/monokai";