@next-bricks/advanced 0.43.0 → 0.44.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.
package/dist/types.json CHANGED
@@ -1,4 +1,238 @@
1
1
  {
2
+ "eo-workbench-layout": {
3
+ "properties": [
4
+ {
5
+ "name": "cardTitle",
6
+ "annotation": {
7
+ "type": "keyword",
8
+ "value": "string"
9
+ }
10
+ },
11
+ {
12
+ "name": "isEdit",
13
+ "annotation": {
14
+ "type": "keyword",
15
+ "value": "boolean"
16
+ }
17
+ },
18
+ {
19
+ "name": "layouts",
20
+ "annotation": {
21
+ "type": "array",
22
+ "elementType": {
23
+ "type": "reference",
24
+ "typeName": {
25
+ "type": "identifier",
26
+ "name": "Layout"
27
+ }
28
+ }
29
+ }
30
+ },
31
+ {
32
+ "name": "componentList",
33
+ "annotation": {
34
+ "type": "array",
35
+ "elementType": {
36
+ "type": "reference",
37
+ "typeName": {
38
+ "type": "identifier",
39
+ "name": "Item"
40
+ }
41
+ }
42
+ }
43
+ }
44
+ ],
45
+ "events": [
46
+ {
47
+ "name": "change",
48
+ "detail": {
49
+ "annotation": {
50
+ "type": "array",
51
+ "elementType": {
52
+ "type": "reference",
53
+ "typeName": {
54
+ "type": "identifier",
55
+ "name": "Layout"
56
+ }
57
+ }
58
+ }
59
+ }
60
+ },
61
+ {
62
+ "name": "save",
63
+ "detail": {
64
+ "annotation": {
65
+ "type": "array",
66
+ "elementType": {
67
+ "type": "reference",
68
+ "typeName": {
69
+ "type": "identifier",
70
+ "name": "Layout"
71
+ }
72
+ }
73
+ }
74
+ }
75
+ },
76
+ {
77
+ "name": "cancel",
78
+ "detail": {
79
+ "annotation": {
80
+ "type": "keyword",
81
+ "value": "void"
82
+ }
83
+ }
84
+ },
85
+ {
86
+ "name": "action.click",
87
+ "detail": {
88
+ "annotation": {
89
+ "type": "typeLiteral",
90
+ "members": [
91
+ {
92
+ "type": "propertySignature",
93
+ "key": {
94
+ "type": "identifier",
95
+ "name": "action"
96
+ },
97
+ "annotation": {
98
+ "type": "reference",
99
+ "typeName": {
100
+ "type": "identifier",
101
+ "name": "SimpleAction"
102
+ }
103
+ },
104
+ "computed": false
105
+ },
106
+ {
107
+ "type": "propertySignature",
108
+ "key": {
109
+ "type": "identifier",
110
+ "name": "layouts"
111
+ },
112
+ "annotation": {
113
+ "type": "array",
114
+ "elementType": {
115
+ "type": "reference",
116
+ "typeName": {
117
+ "type": "identifier",
118
+ "name": "Layout"
119
+ }
120
+ }
121
+ },
122
+ "computed": false
123
+ }
124
+ ]
125
+ }
126
+ }
127
+ }
128
+ ],
129
+ "methods": [
130
+ {
131
+ "name": "setLayouts",
132
+ "params": [
133
+ {
134
+ "name": "layouts",
135
+ "annotation": {
136
+ "type": "array",
137
+ "elementType": {
138
+ "type": "reference",
139
+ "typeName": {
140
+ "type": "identifier",
141
+ "name": "Layout"
142
+ }
143
+ }
144
+ }
145
+ }
146
+ ],
147
+ "returns": {}
148
+ }
149
+ ],
150
+ "types": [
151
+ {
152
+ "type": "interface",
153
+ "name": "Item",
154
+ "body": [
155
+ {
156
+ "type": "propertySignature",
157
+ "key": {
158
+ "type": "identifier",
159
+ "name": "position"
160
+ },
161
+ "annotation": {
162
+ "type": "reference",
163
+ "typeName": {
164
+ "type": "identifier",
165
+ "name": "Layout"
166
+ }
167
+ },
168
+ "computed": false
169
+ },
170
+ {
171
+ "type": "propertySignature",
172
+ "key": {
173
+ "type": "identifier",
174
+ "name": "key"
175
+ },
176
+ "annotation": {
177
+ "type": "keyword",
178
+ "value": "string"
179
+ },
180
+ "computed": false
181
+ },
182
+ {
183
+ "type": "propertySignature",
184
+ "key": {
185
+ "type": "identifier",
186
+ "name": "title"
187
+ },
188
+ "annotation": {
189
+ "type": "keyword",
190
+ "value": "string"
191
+ },
192
+ "computed": false
193
+ },
194
+ {
195
+ "type": "propertySignature",
196
+ "key": {
197
+ "type": "identifier",
198
+ "name": "style"
199
+ },
200
+ "annotation": {
201
+ "type": "reference",
202
+ "typeName": {
203
+ "type": "qualifiedName",
204
+ "left": {
205
+ "type": "identifier",
206
+ "name": "React"
207
+ },
208
+ "right": {
209
+ "type": "identifier",
210
+ "name": "CSSProperties"
211
+ }
212
+ }
213
+ },
214
+ "optional": true,
215
+ "computed": false
216
+ },
217
+ {
218
+ "type": "propertySignature",
219
+ "key": {
220
+ "type": "identifier",
221
+ "name": "useBrick"
222
+ },
223
+ "annotation": {
224
+ "type": "reference",
225
+ "typeName": {
226
+ "type": "identifier",
227
+ "name": "UseSingleBrickConf"
228
+ }
229
+ },
230
+ "computed": false
231
+ }
232
+ ]
233
+ }
234
+ ]
235
+ },
2
236
  "eo-cascader": {
3
237
  "properties": [
4
238
  {
@@ -275,240 +509,6 @@
275
509
  ],
276
510
  "methods": []
277
511
  },
278
- "eo-workbench-layout": {
279
- "properties": [
280
- {
281
- "name": "cardTitle",
282
- "annotation": {
283
- "type": "keyword",
284
- "value": "string"
285
- }
286
- },
287
- {
288
- "name": "isEdit",
289
- "annotation": {
290
- "type": "keyword",
291
- "value": "boolean"
292
- }
293
- },
294
- {
295
- "name": "layouts",
296
- "annotation": {
297
- "type": "array",
298
- "elementType": {
299
- "type": "reference",
300
- "typeName": {
301
- "type": "identifier",
302
- "name": "Layout"
303
- }
304
- }
305
- }
306
- },
307
- {
308
- "name": "componentList",
309
- "annotation": {
310
- "type": "array",
311
- "elementType": {
312
- "type": "reference",
313
- "typeName": {
314
- "type": "identifier",
315
- "name": "Item"
316
- }
317
- }
318
- }
319
- }
320
- ],
321
- "events": [
322
- {
323
- "name": "change",
324
- "detail": {
325
- "annotation": {
326
- "type": "array",
327
- "elementType": {
328
- "type": "reference",
329
- "typeName": {
330
- "type": "identifier",
331
- "name": "Layout"
332
- }
333
- }
334
- }
335
- }
336
- },
337
- {
338
- "name": "save",
339
- "detail": {
340
- "annotation": {
341
- "type": "array",
342
- "elementType": {
343
- "type": "reference",
344
- "typeName": {
345
- "type": "identifier",
346
- "name": "Layout"
347
- }
348
- }
349
- }
350
- }
351
- },
352
- {
353
- "name": "cancel",
354
- "detail": {
355
- "annotation": {
356
- "type": "keyword",
357
- "value": "void"
358
- }
359
- }
360
- },
361
- {
362
- "name": "action.click",
363
- "detail": {
364
- "annotation": {
365
- "type": "typeLiteral",
366
- "members": [
367
- {
368
- "type": "propertySignature",
369
- "key": {
370
- "type": "identifier",
371
- "name": "action"
372
- },
373
- "annotation": {
374
- "type": "reference",
375
- "typeName": {
376
- "type": "identifier",
377
- "name": "SimpleAction"
378
- }
379
- },
380
- "computed": false
381
- },
382
- {
383
- "type": "propertySignature",
384
- "key": {
385
- "type": "identifier",
386
- "name": "layouts"
387
- },
388
- "annotation": {
389
- "type": "array",
390
- "elementType": {
391
- "type": "reference",
392
- "typeName": {
393
- "type": "identifier",
394
- "name": "Layout"
395
- }
396
- }
397
- },
398
- "computed": false
399
- }
400
- ]
401
- }
402
- }
403
- }
404
- ],
405
- "methods": [
406
- {
407
- "name": "setLayouts",
408
- "params": [
409
- {
410
- "name": "layouts",
411
- "annotation": {
412
- "type": "array",
413
- "elementType": {
414
- "type": "reference",
415
- "typeName": {
416
- "type": "identifier",
417
- "name": "Layout"
418
- }
419
- }
420
- }
421
- }
422
- ],
423
- "returns": {}
424
- }
425
- ],
426
- "types": [
427
- {
428
- "type": "interface",
429
- "name": "Item",
430
- "body": [
431
- {
432
- "type": "propertySignature",
433
- "key": {
434
- "type": "identifier",
435
- "name": "position"
436
- },
437
- "annotation": {
438
- "type": "reference",
439
- "typeName": {
440
- "type": "identifier",
441
- "name": "Layout"
442
- }
443
- },
444
- "computed": false
445
- },
446
- {
447
- "type": "propertySignature",
448
- "key": {
449
- "type": "identifier",
450
- "name": "key"
451
- },
452
- "annotation": {
453
- "type": "keyword",
454
- "value": "string"
455
- },
456
- "computed": false
457
- },
458
- {
459
- "type": "propertySignature",
460
- "key": {
461
- "type": "identifier",
462
- "name": "title"
463
- },
464
- "annotation": {
465
- "type": "keyword",
466
- "value": "string"
467
- },
468
- "computed": false
469
- },
470
- {
471
- "type": "propertySignature",
472
- "key": {
473
- "type": "identifier",
474
- "name": "style"
475
- },
476
- "annotation": {
477
- "type": "reference",
478
- "typeName": {
479
- "type": "qualifiedName",
480
- "left": {
481
- "type": "identifier",
482
- "name": "React"
483
- },
484
- "right": {
485
- "type": "identifier",
486
- "name": "CSSProperties"
487
- }
488
- }
489
- },
490
- "optional": true,
491
- "computed": false
492
- },
493
- {
494
- "type": "propertySignature",
495
- "key": {
496
- "type": "identifier",
497
- "name": "useBrick"
498
- },
499
- "annotation": {
500
- "type": "reference",
501
- "typeName": {
502
- "type": "identifier",
503
- "name": "UseSingleBrickConf"
504
- }
505
- },
506
- "computed": false
507
- }
508
- ]
509
- }
510
- ]
511
- },
512
512
  "eo-tree": {
513
513
  "properties": [
514
514
  {
@@ -956,6 +956,26 @@
956
956
  }
957
957
  ]
958
958
  },
959
+ "eo-text-tooltip": {
960
+ "properties": [
961
+ {
962
+ "name": "label",
963
+ "annotation": {
964
+ "type": "keyword",
965
+ "value": "string"
966
+ }
967
+ },
968
+ {
969
+ "name": "lineClamp",
970
+ "annotation": {
971
+ "type": "keyword",
972
+ "value": "number"
973
+ }
974
+ }
975
+ ],
976
+ "events": [],
977
+ "methods": []
978
+ },
959
979
  "eo-tree-select": {
960
980
  "properties": [
961
981
  {
@@ -1296,26 +1316,6 @@
1296
1316
  ],
1297
1317
  "methods": []
1298
1318
  },
1299
- "eo-text-tooltip": {
1300
- "properties": [
1301
- {
1302
- "name": "label",
1303
- "annotation": {
1304
- "type": "keyword",
1305
- "value": "string"
1306
- }
1307
- },
1308
- {
1309
- "name": "lineClamp",
1310
- "annotation": {
1311
- "type": "keyword",
1312
- "value": "number"
1313
- }
1314
- }
1315
- ],
1316
- "events": [],
1317
- "methods": []
1318
- },
1319
1319
  "advanced.pdf-viewer": {
1320
1320
  "properties": [
1321
1321
  {
@@ -1512,7 +1512,7 @@
1512
1512
  "type": "reference",
1513
1513
  "typeName": {
1514
1514
  "type": "identifier",
1515
- "name": "Layout"
1515
+ "name": "ExtraLayout"
1516
1516
  }
1517
1517
  }
1518
1518
  }
@@ -1574,7 +1574,7 @@
1574
1574
  "type": "reference",
1575
1575
  "typeName": {
1576
1576
  "type": "identifier",
1577
- "name": "Layout"
1577
+ "name": "ExtraLayout"
1578
1578
  }
1579
1579
  }
1580
1580
  }
@@ -1589,7 +1589,7 @@
1589
1589
  "type": "reference",
1590
1590
  "typeName": {
1591
1591
  "type": "identifier",
1592
- "name": "Layout"
1592
+ "name": "ExtraLayout"
1593
1593
  }
1594
1594
  }
1595
1595
  }
@@ -7,3 +7,25 @@ export type WorkbenchComponent = {
7
7
  style?: React.CSSProperties;
8
8
  useBrick: UseSingleBrickConf;
9
9
  };
10
+ /**
11
+ * 卡片相关配置
12
+ */
13
+ export type CardStyleConfig = {
14
+ cardWidth?: number;
15
+ showMoreIcon?: boolean;
16
+ cardBorderStyle?: string;
17
+ cardTitleFontSize?: number;
18
+ cardBorderWidth?: number;
19
+ cardBorderRadius?: number;
20
+ cardTitleColor?: string;
21
+ cardBorderColor?: string;
22
+ cardData?: any;
23
+ cardTitle?: string;
24
+ moreIconLink?: string;
25
+ cardBackground?: string;
26
+ cardBgType?: string;
27
+ timeRange?: Record<string, any>;
28
+ isCreatedBySystemAdmin?: boolean;
29
+ type?: string;
30
+ };
31
+ export type ExtraLayout = Layout & CardStyleConfig;
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
- import { WorkbenchComponent } from "../interfaces";
2
+ import { WorkbenchComponent, ExtraLayout } from "../interfaces";
3
3
  export interface DroppableComponentLayoutItemProps {
4
4
  component: WorkbenchComponent;
5
+ layout?: ExtraLayout;
5
6
  isEdit?: boolean;
6
7
  onDrop?(component: WorkbenchComponent): void;
7
8
  onDelete?(): void;
@@ -4,11 +4,12 @@ import { UseSingleBrickConf } from "@next-core/types";
4
4
  import { Layout } from "react-grid-layout";
5
5
  import "@next-core/theme";
6
6
  import { SimpleAction } from "@next-bricks/basic/actions";
7
- import { WorkbenchComponent } from "../interfaces";
7
+ import { WorkbenchComponent, ExtraLayout, CardStyleConfig } from "../interfaces";
8
8
  import "./styles.css";
9
+ export declare const defaultCardConfig: CardStyleConfig;
9
10
  export interface EoWorkbenchLayoutV2Props {
10
11
  cardTitle?: string;
11
- layouts?: Layout[];
12
+ layouts?: ExtraLayout[];
12
13
  toolbarBricks?: {
13
14
  useBrick: UseSingleBrickConf[];
14
15
  };
@@ -17,13 +18,13 @@ export interface EoWorkbenchLayoutV2Props {
17
18
  showSettingButton?: boolean;
18
19
  }
19
20
  export interface EoWorkbenchLayoutV2ComponentRef {
20
- setLayouts(layouts: Layout[]): void;
21
+ setLayouts(layouts: ExtraLayout[]): void;
21
22
  }
22
23
  export interface EoWorkbenchLayoutV2ComponentProps extends EoWorkbenchLayoutV2Props {
23
- onChange?: (layout: Layout[]) => void;
24
- onSave?: (layout: Layout[]) => void;
24
+ onChange?: (layout: ExtraLayout[]) => void;
25
+ onSave?: (layout: ExtraLayout[]) => void;
25
26
  onCancel?: () => void;
26
- onActionClick?: (action: SimpleAction, layouts: Layout[]) => void;
27
+ onActionClick?: (action: SimpleAction, layouts: ExtraLayout[]) => void;
27
28
  onSetting?: () => void;
28
29
  }
29
30
  export declare const EoWorkbenchLayoutComponent: React.ForwardRefExoticComponent<EoWorkbenchLayoutV2ComponentProps & React.RefAttributes<EoWorkbenchLayoutV2ComponentRef>>;
@@ -34,7 +35,7 @@ export declare class EoWorkbenchLayoutV2 extends ReactNextElement {
34
35
  #private;
35
36
  accessor cardTitle: string | undefined;
36
37
  accessor isEdit: boolean | undefined;
37
- accessor layouts: Layout[] | undefined;
38
+ accessor layouts: ExtraLayout[] | undefined;
38
39
  accessor toolbarBricks: {
39
40
  useBrick: UseSingleBrickConf[];
40
41
  } | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/advanced",
3
- "version": "0.43.0",
3
+ "version": "0.44.0",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/advanced",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,5 +45,5 @@
45
45
  "@next-bricks/icons": "*",
46
46
  "@next-bricks/markdown": "*"
47
47
  },
48
- "gitHead": "6d031d35aacd2f57a07f46d7da681080de2dd44a"
48
+ "gitHead": "c36af5616816dea02b4a874664597c46c2a2bd57"
49
49
  }