@next-bricks/presentational-bricks 1.338.1 → 1.339.1

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 (90) hide show
  1. package/deploy/contract.yaml +123 -123
  2. package/dist/bricks.json +30 -30
  3. package/dist/index.8e5be25b.js +2 -0
  4. package/dist/index.8e5be25b.js.map +1 -0
  5. package/dist/stories.json +27 -27
  6. package/dist-types/agent-status/index.d.ts +24 -0
  7. package/dist-types/avatar-upload/index.d.ts +21 -0
  8. package/dist-types/banner-display-card-list/index.d.ts +16 -0
  9. package/dist-types/basic-icon/index.d.ts +37 -0
  10. package/dist-types/basic-progress/index.d.ts +55 -0
  11. package/dist-types/bootstrap.d.ts +78 -0
  12. package/dist-types/brick-alert/index.d.ts +38 -0
  13. package/dist-types/brick-alert-level/index.d.ts +13 -0
  14. package/dist-types/brick-alert-number/index.d.ts +7 -0
  15. package/dist-types/brick-alert-status/index.d.ts +17 -0
  16. package/dist-types/brick-alert-value/index.d.ts +9 -0
  17. package/dist-types/brick-button/index.d.ts +11 -0
  18. package/dist-types/brick-calendar/index.d.ts +49 -0
  19. package/dist-types/brick-cluster-type/index.d.ts +17 -0
  20. package/dist-types/brick-code-display/index.d.ts +15 -0
  21. package/dist-types/brick-collapse-card/index.d.ts +46 -0
  22. package/dist-types/brick-conditional-display/index.d.ts +51 -0
  23. package/dist-types/brick-delete-confirm/index.d.ts +15 -0
  24. package/dist-types/brick-descriptions/index.d.ts +83 -0
  25. package/dist-types/brick-display-structs/index.d.ts +20 -0
  26. package/dist-types/brick-divider/index.d.ts +22 -0
  27. package/dist-types/brick-form/index.d.ts +95 -0
  28. package/dist-types/brick-general-search/index.d.ts +73 -0
  29. package/dist-types/brick-humanize-time/index.d.ts +32 -0
  30. package/dist-types/brick-illustration/index.d.ts +45 -0
  31. package/dist-types/brick-input/index.d.ts +25 -0
  32. package/dist-types/brick-link/index.d.ts +53 -0
  33. package/dist-types/brick-list/index.d.ts +40 -0
  34. package/dist-types/brick-placeholder/index.d.ts +15 -0
  35. package/dist-types/brick-quick-entries/index.d.ts +53 -0
  36. package/dist-types/brick-rate/index.d.ts +33 -0
  37. package/dist-types/brick-result/index.d.ts +62 -0
  38. package/dist-types/brick-table/index.d.ts +313 -0
  39. package/dist-types/brick-tag/index.d.ts +125 -0
  40. package/dist-types/brick-timeline/index.d.ts +54 -0
  41. package/dist-types/brick-tree/index.d.ts +175 -0
  42. package/dist-types/brick-user/index.d.ts +29 -0
  43. package/dist-types/brick-user-group/index.d.ts +19 -0
  44. package/dist-types/brick-utils/index.d.ts +9 -0
  45. package/dist-types/brick-value-mapping/index.d.ts +71 -0
  46. package/dist-types/button-wrapper/index.d.ts +11 -0
  47. package/dist-types/card-item/index.d.ts +169 -0
  48. package/dist-types/code-editor/index.d.ts +45 -0
  49. package/dist-types/collapse-info-list/index.d.ts +27 -0
  50. package/dist-types/collapsible-card-item/index.d.ts +60 -0
  51. package/dist-types/copyable-text/index.d.ts +25 -0
  52. package/dist-types/cost-time/index.d.ts +30 -0
  53. package/dist-types/crontab-display/index.d.ts +11 -0
  54. package/dist-types/datetime-selector/index.d.ts +63 -0
  55. package/dist-types/digital-number/index.d.ts +33 -0
  56. package/dist-types/dropdown-button/index.d.ts +33 -0
  57. package/dist-types/dropdown-select/index.d.ts +80 -0
  58. package/dist-types/dynamic-content/index.d.ts +9 -0
  59. package/dist-types/dynamic-grid-container/index.d.ts +23 -0
  60. package/dist-types/entry-card-item/index.d.ts +62 -0
  61. package/dist-types/general-badge/index.d.ts +29 -0
  62. package/dist-types/general-carousel/index.d.ts +84 -0
  63. package/dist-types/general-image/index.d.ts +55 -0
  64. package/dist-types/general-label/index.d.ts +29 -0
  65. package/dist-types/general-list/index.d.ts +13 -0
  66. package/dist-types/general-pagination/index.d.ts +35 -0
  67. package/dist-types/general-preview-image/index.d.ts +23 -0
  68. package/dist-types/general-slider/index.d.ts +53 -0
  69. package/dist-types/general-tooltip/index.d.ts +80 -0
  70. package/dist-types/general-transfer/index.d.ts +44 -0
  71. package/dist-types/general-video/index.d.ts +13 -0
  72. package/dist-types/index.d.ts +78 -0
  73. package/dist-types/info-display-card-list/index.d.ts +50 -0
  74. package/dist-types/interfaces/common.d.ts +18 -0
  75. package/dist-types/jsx.d.ts +949 -0
  76. package/dist-types/log-display/index.d.ts +16 -0
  77. package/dist-types/markdown-display/index.d.ts +40 -0
  78. package/dist-types/markdown-editor/index.d.ts +53 -0
  79. package/dist-types/modal-confirm/index.d.ts +82 -0
  80. package/dist-types/qrcode-download/index.d.ts +25 -0
  81. package/dist-types/rank-table/index.d.ts +99 -0
  82. package/dist-types/single-field-edit/index.d.ts +53 -0
  83. package/dist-types/statistic-card/index.d.ts +45 -0
  84. package/dist-types/table-transfer/index.d.ts +46 -0
  85. package/dist-types/template-breadcrumb/index.d.ts +7 -0
  86. package/dist-types/text-collapse/index.d.ts +9 -0
  87. package/dist-types/tree-transfer/index.d.ts +33 -0
  88. package/package.json +3 -4
  89. package/dist/index.200a8d2c.js +0 -2
  90. package/dist/index.200a8d2c.js.map +0 -1
@@ -0,0 +1,62 @@
1
+ import type React from "react";
2
+
3
+ export enum BrickResultStatus {
4
+ Success = "success",
5
+ Error = "error",
6
+ Info = "info",
7
+ Warning = "warning",
8
+ E404 = "404",
9
+ E403 = "403",
10
+ E500 = "500",
11
+ }
12
+
13
+ export enum EmptyResultStatus {
14
+ BrowserTooOld = "browser-too-old",
15
+ Empty = "empty",
16
+ NoData = "no-data",
17
+ NoHistoryVersion = "no-history-version",
18
+ NoVisitRecord = "no-visit-record",
19
+ SearchEmpty = "search-empty",
20
+ WelcomeToCreate = "welcome-to-create",
21
+ }
22
+
23
+ export type IllustrationsStatus = "illustrations";
24
+
25
+ export interface IllustrationsConfig {
26
+ imageStyle?: CSSProperties;
27
+ name?: string;
28
+ category?: string;
29
+ size?: IconSize;
30
+ }
31
+
32
+ export enum IconSize {
33
+ Small = "small",
34
+ Middle = "middle",
35
+ Large = "large",
36
+ XLarge = "xlarge",
37
+ Unset = "unset",
38
+ }
39
+
40
+ export interface BrickResultProps {
41
+ status?: BrickResultStatus | EmptyResultStatus | IllustrationsStatus;
42
+ customTitle?: string;
43
+ subTitle?: string;
44
+ icon?: string;
45
+ illustrationsConfig?: IllustrationsConfig;
46
+ useNewIllustration?: boolean;
47
+ emptyResultSize?: IconSize;
48
+ }
49
+
50
+ export declare class BrickResultElement extends HTMLElement {
51
+ status:
52
+ | BrickResultStatus
53
+ | EmptyResultStatus
54
+ | IllustrationsStatus
55
+ | undefined;
56
+ customTitle: string | undefined;
57
+ subTitle: string | undefined;
58
+ icon: string | undefined;
59
+ illustrationsConfig: IllustrationsConfig | undefined;
60
+ useNewIllustration: boolean | undefined;
61
+ emptyResultSize: IconSize | undefined;
62
+ }
@@ -0,0 +1,313 @@
1
+ import type React from "react";
2
+ import type { TablePaginationConfig, TableProps } from "antd/lib/table";
3
+ import type {
4
+ ExpandableConfig,
5
+ RowSelectionType,
6
+ TableRowSelection,
7
+ } from "antd/lib/table/interface";
8
+ import type {
9
+ MenuIcon,
10
+ UseBrickConf,
11
+ BrickEventsMap,
12
+ } from "@next-core/brick-types";
13
+ import type { SizeType } from "antd/lib/config-provider/SizeContext";
14
+ import type { ColumnProps } from "antd/lib/table";
15
+ import type { BrickWrapperConfig } from "../interfaces/common.js";
16
+
17
+ export interface BrickTableFields {
18
+ dataSource?: string; // 指定 dataSource 从哪里来,默认为列表接口返回格式是{list:[],page:1,pageSize:10,total:20},即默认取自 list
19
+ total?: string; // 指定 total 从哪里来,默认为列表接口返回格式是{list:[],page:1,pageSize:10,total:20},即默认取自 total
20
+ rowKey?: string; // 指定每一行的 key,不指定则默认为 index
21
+ page?: string; // 指定请求后台 page 参数 path
22
+ pageSize?: string; // 指定请求后台 pageSize 参数 path
23
+ ascend?: string | number; // 指定 ascend 排序对应字段,例如有些后台对应为 1 ,有些对应为 "asc"。这里默认为 "ascend"。
24
+ descend?: string | number; // 指定 descend 排序对应字段,例如有些后台对应为 0 ,有些对应为 "desc"。这里默认为 "descend"。
25
+ }
26
+
27
+ export interface RowDisabledProps {
28
+ field: string;
29
+ value: any;
30
+ operator:
31
+ | "$eq"
32
+ | "$ne"
33
+ | "$lt"
34
+ | "$lte"
35
+ | "$gt"
36
+ | "$gte"
37
+ | "$isEqual"
38
+ | "$notEqual"
39
+ | "$in"
40
+ | "$nin"
41
+ | "$exists";
42
+ }
43
+
44
+ export interface CustomColumn extends ColumnProps<Record<string, any>> {
45
+ /**
46
+ * 支持为某列自定义展示构件
47
+ */
48
+ useBrick?: UseBrickConf;
49
+ /**
50
+ * 字段的值展示时的后缀
51
+ */
52
+ valueSuffix?: string;
53
+ /**
54
+ * 支持为某列的表头自定义展示构件,可通过 DATA.title 获取标题文本
55
+ */
56
+ headerBrick?: {
57
+ useBrick: UseBrickConf;
58
+ };
59
+ /**
60
+ * 在渲染自定义构件的场景下额外设置单元格的状态样式, `dataIndex` 表示取哪一列的字段值作为判断数据,不填的话默认取当前列的字段,`mapping` 表示判断的条件,条件被成功匹配时用当前的样式。目前仅支持单元格 `leftBorderColor` 属性的设置
61
+ */
62
+ cellStatus?: CellStatusProps;
63
+ /**
64
+ * 设置列的每个单元格样式
65
+ */
66
+ cellStyle?: React.CSSProperties;
67
+ /**
68
+ * [已废弃]支持为某列的标题自定义展示构件,可通过 DATA.title 获取标题文本
69
+ */
70
+ titleUseBrick?: UseBrickConf;
71
+ /**
72
+ * [已废弃]支持为某列自定义展示构件
73
+ */
74
+ component?: CustomColumnComponent;
75
+ /**
76
+ * 单元格内元素的垂直对齐方式
77
+ */
78
+ verticalAlign?: "top" | "bottom";
79
+ /**
80
+ * 每条记录的控制列合并的值的 key
81
+ */
82
+ colSpanKey?: string;
83
+ /**
84
+ * 每条记录的控制行合并的值的 key
85
+ */
86
+ rowSpanKey?: string;
87
+ /**
88
+ * 自定义筛选菜单
89
+ */
90
+ filterDropdownBrick?: {
91
+ useBrick: UseBrickConf;
92
+ };
93
+ /**
94
+ * 自定义筛选图标
95
+ */
96
+ customFilterIcon?: MenuIcon;
97
+ }
98
+
99
+ export interface CellStatusProps {
100
+ dataIndex?: string;
101
+ mapping: Array<{
102
+ leftBorderColor: string;
103
+ value: any;
104
+ }>;
105
+ }
106
+
107
+ export interface CustomColumnComponent {
108
+ /** 构件名称 */
109
+ brick: string | any;
110
+ /** 字段值、列表项和 index 对应所用构件的属性的 key */
111
+ fields?: {
112
+ value?: string;
113
+ item?: string;
114
+ index?: string;
115
+ };
116
+ /** 构件属性 */
117
+ properties?: Record<string, any>;
118
+ /** 事件 */
119
+ events?: BrickEventsMap;
120
+ }
121
+
122
+ export interface TableDragInfo {
123
+ order: "asc" | "desc";
124
+ dragData: Record<string, any>;
125
+ anchorData: Record<string, any>;
126
+ }
127
+
128
+ export interface BrickTableProps {
129
+ showCard?: boolean;
130
+ rowSelection?: false | TableRowSelection<any>;
131
+ rowKey?: string;
132
+ hiddenColumns?: Array<string | number>;
133
+ showSelectInfo?: boolean;
134
+ filters?: Record<string, string[]>;
135
+ configProps?: any;
136
+ sort?: string;
137
+ order?: string | number;
138
+ rowDisabledConfig?: RowDisabledProps | RowDisabledProps[];
139
+ expandable?: ExpandableConfig<Record<string, unknown>> | false;
140
+ expandedRowBrick?: {
141
+ useBrick?: UseBrickConf;
142
+ };
143
+ emptyUseBrick?: {
144
+ useBrick?: UseBrickConf;
145
+ };
146
+ expandIcon?: {
147
+ collapsedIcon: MenuIcon;
148
+ expandedIcon: MenuIcon;
149
+ };
150
+ expandIconAsCell?: boolean;
151
+ expandIconColumnIndex?: number;
152
+ expandRowByClick?: boolean;
153
+ optimizedColumns?: Array<string | number>;
154
+ wrapperConfig?: BrickWrapperConfig;
155
+ stripEmptyExpandableChildren?: boolean;
156
+ defaultExpandAllRows?: boolean;
157
+ expandedRowKeys?: string[];
158
+ selectAllChildren?: boolean;
159
+ defaultSelectAll?: boolean;
160
+ ellipsisInfo?: boolean;
161
+ childrenColumnName?: string;
162
+ sortable?: boolean;
163
+ frontSearch?: boolean;
164
+ frontSearchQuery?: string;
165
+ exactSearch?: boolean;
166
+ frontSearchFilterKeys?: string[];
167
+ page?: number;
168
+ pageSize?: number;
169
+ scrollConfigs?: TableProps<unknown>["scroll"];
170
+ qField?: string;
171
+ tableDraggable?: boolean;
172
+ acceptType?: string;
173
+ zebraPattern?: boolean;
174
+ storeCheckedByUrl?: boolean;
175
+ extraRows?: Record<string, unknown>[];
176
+ draggable?: boolean;
177
+ autoSelectParentWhenAllChildrenSelected?: boolean;
178
+ thTransparent?: boolean;
179
+ showHeader?: boolean;
180
+ pagination?: false | TablePaginationConfig;
181
+ size?: SizeType | "x-small";
182
+ type?: RowSelectionType;
183
+ shouldUpdateUrlParams?: boolean;
184
+ shouldRenderWhenUrlParamsUpdate?: boolean;
185
+ selectedRowKeys?: React.Key[];
186
+ showHeaderExpandAll?: boolean;
187
+ columnKeyBrickMap?: Record<string, { useBrick: UseBrickConf }>;
188
+ columns?: CustomColumn[];
189
+ dataSource?: Record<string, any>[];
190
+ fields?: any;
191
+ processedDataSource?: any;
192
+ processConfigProps?: any;
193
+ processedColumns?: any;
194
+ selectUpdateEventName?: string;
195
+ selectUpdateEventDetailKeys?: string[];
196
+ selectUpdateEventDetailField?: string;
197
+ selectUpdateEventDetailExtra?: any;
198
+ }
199
+
200
+ export interface BrickTableEvents {
201
+ "page.update": CustomEvent<Record<string, number>>;
202
+ "filter.update": CustomEvent<Record<string, number>>;
203
+ "select.update": CustomEvent<Record<string, any>[]>;
204
+ "select.row.keys.update": CustomEvent<string[]>;
205
+ "sort.update": CustomEvent<{
206
+ sort: string;
207
+ order: string | number;
208
+ }>;
209
+ "row.expand": CustomEvent<{
210
+ expanded: boolean;
211
+ record: Record<string, any>;
212
+ }>;
213
+ "expand.rows.change": CustomEvent<{
214
+ expandedRows: React.Key[];
215
+ }>;
216
+ "row.drag": CustomEvent<{
217
+ data: Record<string, any>[];
218
+ info: TableDragInfo;
219
+ }>;
220
+ "column.filters.update": CustomEvent<Record<string, string[]>>;
221
+ }
222
+
223
+ export interface BrickTableEventsMap {
224
+ onPageUpdate: "page.update";
225
+ onFilterUpdate: "filter.update";
226
+ onSelectUpdate: "select.update";
227
+ onSelectRowKeysUpdate: "select.row.keys.update";
228
+ onSortUpdate: "sort.update";
229
+ onRowExpand: "row.expand";
230
+ onExpandRowsChange: "expand.rows.change";
231
+ onRowDrag: "row.drag";
232
+ onColumnFiltersUpdate: "column.filters.update";
233
+ }
234
+
235
+ export declare class BrickTableElement extends HTMLElement {
236
+ showCard: boolean | undefined;
237
+ rowSelection: false | TableRowSelection<any> | undefined;
238
+ rowKey: string | undefined;
239
+ hiddenColumns: Array<string | number> | undefined;
240
+ showSelectInfo: boolean | undefined;
241
+ filters: Record<string, string[]> | undefined;
242
+ configProps: any | undefined;
243
+ sort: string | undefined;
244
+ order: string | number | undefined;
245
+ rowDisabledConfig: RowDisabledProps | RowDisabledProps[] | undefined;
246
+ expandable: ExpandableConfig<Record<string, unknown>> | false | undefined;
247
+ expandedRowBrick:
248
+ | {
249
+ useBrick?: UseBrickConf;
250
+ }
251
+ | undefined;
252
+ emptyUseBrick:
253
+ | {
254
+ useBrick?: UseBrickConf;
255
+ }
256
+ | undefined;
257
+ expandIcon:
258
+ | {
259
+ collapsedIcon: MenuIcon;
260
+ expandedIcon: MenuIcon;
261
+ }
262
+ | undefined;
263
+ expandIconAsCell: boolean | undefined;
264
+ expandIconColumnIndex: number | undefined;
265
+ expandRowByClick: boolean | undefined;
266
+ optimizedColumns: Array<string | number> | undefined;
267
+ wrapperConfig: BrickWrapperConfig | undefined;
268
+ stripEmptyExpandableChildren: boolean | undefined;
269
+ defaultExpandAllRows: boolean | undefined;
270
+ expandedRowKeys: string[] | undefined;
271
+ selectAllChildren: boolean | undefined;
272
+ defaultSelectAll: boolean | undefined;
273
+ ellipsisInfo: boolean | undefined;
274
+ childrenColumnName: string | undefined;
275
+ sortable: boolean | undefined;
276
+ frontSearch: boolean | undefined;
277
+ frontSearchQuery: string | undefined;
278
+ exactSearch: boolean | undefined;
279
+ frontSearchFilterKeys: string[] | undefined;
280
+ page: number | undefined;
281
+ pageSize: number | undefined;
282
+ scrollConfigs: TableProps<unknown>["scroll"] | undefined;
283
+ qField: string | undefined;
284
+ tableDraggable: boolean | undefined;
285
+ acceptType: string | undefined;
286
+ zebraPattern: boolean | undefined;
287
+ storeCheckedByUrl: boolean | undefined;
288
+ extraRows: Record<string, unknown>[] | undefined;
289
+ draggable: boolean;
290
+ autoSelectParentWhenAllChildrenSelected: boolean | undefined;
291
+ thTransparent: boolean | undefined;
292
+ showHeader: boolean | undefined;
293
+ pagination: false | TablePaginationConfig | undefined;
294
+ size: SizeType | "x-small" | undefined;
295
+ type: RowSelectionType | undefined;
296
+ shouldUpdateUrlParams: boolean | undefined;
297
+ shouldRenderWhenUrlParamsUpdate: boolean | undefined;
298
+ selectedRowKeys: React.Key[] | undefined;
299
+ showHeaderExpandAll: boolean | undefined;
300
+ columnKeyBrickMap: Record<string, { useBrick: UseBrickConf }> | undefined;
301
+ columns: CustomColumn[] | undefined;
302
+ dataSource: Record<string, any>[] | undefined;
303
+ fields: any | undefined;
304
+ processedDataSource: any | undefined;
305
+ processConfigProps: any | undefined;
306
+ processedColumns: any | undefined;
307
+ selectUpdateEventName: string | undefined;
308
+ selectUpdateEventDetailKeys: string[] | undefined;
309
+ selectUpdateEventDetailField: string | undefined;
310
+ selectUpdateEventDetailExtra: any | undefined;
311
+ filterSourceData(event: CustomEvent): void;
312
+ expandAll(): void;
313
+ }
@@ -0,0 +1,125 @@
1
+ import React from "react";
2
+ import type { TooltipProps } from "antd";
3
+ import type { UseBrickConf } from "@next-core/brick-types";
4
+ import type React from "react";
5
+ import type { MenuIcon } from "@next-core/brick-types";
6
+
7
+ export type TagListType = {
8
+ key: string;
9
+ label: string;
10
+ tooltip?: string;
11
+ icon?: string | MenuIcon;
12
+ checked?: boolean;
13
+ color?: string | Color;
14
+ disabled?: boolean;
15
+ disabledTooltip?: string;
16
+ };
17
+
18
+ export enum Color {
19
+ green = "green",
20
+ red = "red",
21
+ blue = "blue",
22
+ orange = "orange",
23
+ cyan = "cyan",
24
+ purple = "purple",
25
+ geekblue = "geekblue",
26
+ gray = "gray",
27
+ yellow = "yellow",
28
+ "green-inverse" = "green-inverse",
29
+ "red-inverse" = "red-inverse",
30
+ "blue-inverse" = "blue-inverse",
31
+ "orange-inverse" = "orange-inverse",
32
+ "cyan-inverse" = "cyan-inverse",
33
+ "purple-inverse" = "purple-inverse",
34
+ "geekblue-inverse" = "geekblue-inverse",
35
+ "gray-inverse" = "gray-inverse",
36
+ "yellow-inverse" = "yellow-inverse",
37
+ }
38
+
39
+ export enum TagTypeProps {
40
+ Tag = "Tag",
41
+ CheckableTag = "CheckableTag",
42
+ }
43
+
44
+ export interface BrickTagProps {
45
+ label?: string;
46
+ tagList?: TagListType[] | string[];
47
+ showTagCircle?: boolean;
48
+ showCard?: boolean;
49
+ color?: string | Color;
50
+ multipleCheck?: boolean;
51
+ dataSource?: Record<string, any>;
52
+ closable?: boolean;
53
+ componentType?: TagTypeProps;
54
+ default?: string | string[];
55
+ cancelable?: boolean;
56
+ configProps?: Record<string, any>;
57
+ disabledTooltip?: string;
58
+ tooltipProps?: TooltipProps;
59
+ fields?: {
60
+ label: string;
61
+ key: string;
62
+ icon?: string;
63
+ tagList?: string;
64
+ };
65
+ textEllipsis?: boolean;
66
+ tagStyle?: React.CSSProperties;
67
+ tagCheckedStyle?: React.CSSProperties;
68
+ tagHoverStyle?: React.CSSProperties;
69
+ afterBrick?: {
70
+ useBrick: UseBrickConf;
71
+ data: unknown;
72
+ };
73
+ }
74
+
75
+ export interface BrickTagEvents {
76
+ "checked.update": CustomEvent<string[]>;
77
+ "checked.update.v2": CustomEvent<{ label: string; key: string }[]>;
78
+ "tag.close": CustomEvent<{
79
+ current: Record<string, any>;
80
+ tagList: Record<string, any>[];
81
+ }>;
82
+ "tag.click": CustomEvent<TagListType>;
83
+ }
84
+
85
+ export interface BrickTagEventsMap {
86
+ onCheckedUpdate: "checked.update";
87
+ onCheckedUpdateV2: "checked.update.v2";
88
+ onTagClose: "tag.close";
89
+ onTagClick: "tag.click";
90
+ }
91
+
92
+ export declare class BrickTagElement extends HTMLElement {
93
+ label: string | undefined;
94
+ tagList: TagListType[] | string[] | undefined;
95
+ showTagCircle: boolean | undefined;
96
+ showCard: boolean | undefined;
97
+ color: string | Color | undefined;
98
+ multipleCheck: boolean | undefined;
99
+ dataSource: Record<string, any> | undefined;
100
+ closable: boolean | undefined;
101
+ componentType: TagTypeProps | undefined;
102
+ default: string | string[] | undefined;
103
+ cancelable: boolean | undefined;
104
+ configProps: Record<string, any> | undefined;
105
+ disabledTooltip: string | undefined;
106
+ tooltipProps: TooltipProps | undefined;
107
+ fields:
108
+ | {
109
+ label: string;
110
+ key: string;
111
+ icon?: string;
112
+ tagList?: string;
113
+ }
114
+ | undefined;
115
+ textEllipsis: boolean | undefined;
116
+ tagStyle: React.CSSProperties | undefined;
117
+ tagCheckedStyle: React.CSSProperties | undefined;
118
+ tagHoverStyle: React.CSSProperties | undefined;
119
+ afterBrick:
120
+ | {
121
+ useBrick: UseBrickConf;
122
+ data: unknown;
123
+ }
124
+ | undefined;
125
+ }
@@ -0,0 +1,54 @@
1
+ import type { UseBrickConf } from "@next-core/brick-types";
2
+
3
+ export interface BrickTimelineProps {
4
+ itemList: ItemProps[];
5
+ useBrick?: UseBrickConf;
6
+ statusMap?: Record<string, StatusColor>;
7
+ type?: "base" | "extension";
8
+ timeType?: TimeType;
9
+ showCard?: boolean;
10
+ mode?: "left" | "right" | "alternate";
11
+ onClick?: (data: ItemProps) => void;
12
+ }
13
+
14
+ export type ItemProps = TimelineItem | Record<string, any>;
15
+
16
+ export interface TimelineItem {
17
+ title: string;
18
+ description: string;
19
+ time: string | number;
20
+ status: string;
21
+ link: string;
22
+ }
23
+
24
+ export type StatusColor = "green" | "red" | "gray" | "blue";
25
+
26
+ export type TimeType = "second" | "default";
27
+
28
+ export interface BrickTimelinePropsInterface {
29
+ itemList?: BrickTimelineProps["itemList"];
30
+ useBrick?: UseBrickConf;
31
+ statusMap?: BrickTimelineProps["statusMap"];
32
+ type?: BrickTimelineProps["type"];
33
+ timeType?: BrickTimelineProps["timeType"];
34
+ showCard?: boolean;
35
+ mode?: BrickTimelineProps["mode"];
36
+ }
37
+
38
+ export interface BrickTimelineEvents {
39
+ "item.click": CustomEvent<ItemProps>;
40
+ }
41
+
42
+ export interface BrickTimelineEventsMap {
43
+ onItemClick: "item.click";
44
+ }
45
+
46
+ export declare class BrickTimelineElement extends HTMLElement {
47
+ itemList: BrickTimelinePropsInterface["itemList"] | undefined;
48
+ useBrick: UseBrickConf | undefined;
49
+ statusMap: BrickTimelinePropsInterface["statusMap"] | undefined;
50
+ type: BrickTimelinePropsInterface["type"] | undefined;
51
+ timeType: BrickTimelinePropsInterface["timeType"] | undefined;
52
+ showCard: boolean | undefined;
53
+ mode: BrickTimelinePropsInterface["mode"] | undefined;
54
+ }