@next-bricks/advanced 0.27.0 → 0.28.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/bricks.json +9 -9
- package/dist/chunks/{5672.275ba031.js → 5672.1350d4ab.js} +2 -2
- package/dist/chunks/5672.1350d4ab.js.map +1 -0
- package/dist/chunks/eo-tree.7aad12ee.js +2 -0
- package/dist/chunks/eo-tree.7aad12ee.js.map +1 -0
- package/dist/chunks/{main.02d9354d.js → main.f340bb78.js} +2 -2
- package/dist/chunks/{main.02d9354d.js.map → main.f340bb78.js.map} +1 -1
- package/dist/examples.json +6 -6
- package/dist/{index.39039d53.js → index.185af537.js} +2 -2
- package/dist/{index.39039d53.js.map → index.185af537.js.map} +1 -1
- package/dist/manifest.json +129 -124
- package/dist/types.json +179 -156
- package/dist-types/tree/index.d.ts +8 -1
- package/docs/eo-tree.md +35 -0
- package/package.json +2 -2
- package/dist/chunks/5672.275ba031.js.map +0 -1
- package/dist/chunks/eo-tree.c5f19f1e.js +0 -2
- package/dist/chunks/eo-tree.c5f19f1e.js.map +0 -1
package/dist/types.json
CHANGED
|
@@ -1,4 +1,160 @@
|
|
|
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": "save",
|
|
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": "cancel",
|
|
63
|
+
"detail": {
|
|
64
|
+
"annotation": {
|
|
65
|
+
"type": "keyword",
|
|
66
|
+
"value": "void"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"methods": [],
|
|
72
|
+
"types": [
|
|
73
|
+
{
|
|
74
|
+
"type": "interface",
|
|
75
|
+
"name": "Item",
|
|
76
|
+
"body": [
|
|
77
|
+
{
|
|
78
|
+
"type": "propertySignature",
|
|
79
|
+
"key": {
|
|
80
|
+
"type": "identifier",
|
|
81
|
+
"name": "position"
|
|
82
|
+
},
|
|
83
|
+
"annotation": {
|
|
84
|
+
"type": "reference",
|
|
85
|
+
"typeName": {
|
|
86
|
+
"type": "identifier",
|
|
87
|
+
"name": "Layout"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"computed": false
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"type": "propertySignature",
|
|
94
|
+
"key": {
|
|
95
|
+
"type": "identifier",
|
|
96
|
+
"name": "key"
|
|
97
|
+
},
|
|
98
|
+
"annotation": {
|
|
99
|
+
"type": "keyword",
|
|
100
|
+
"value": "string"
|
|
101
|
+
},
|
|
102
|
+
"computed": false
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "propertySignature",
|
|
106
|
+
"key": {
|
|
107
|
+
"type": "identifier",
|
|
108
|
+
"name": "title"
|
|
109
|
+
},
|
|
110
|
+
"annotation": {
|
|
111
|
+
"type": "keyword",
|
|
112
|
+
"value": "string"
|
|
113
|
+
},
|
|
114
|
+
"computed": false
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "propertySignature",
|
|
118
|
+
"key": {
|
|
119
|
+
"type": "identifier",
|
|
120
|
+
"name": "style"
|
|
121
|
+
},
|
|
122
|
+
"annotation": {
|
|
123
|
+
"type": "reference",
|
|
124
|
+
"typeName": {
|
|
125
|
+
"type": "qualifiedName",
|
|
126
|
+
"left": {
|
|
127
|
+
"type": "identifier",
|
|
128
|
+
"name": "React"
|
|
129
|
+
},
|
|
130
|
+
"right": {
|
|
131
|
+
"type": "identifier",
|
|
132
|
+
"name": "CSSProperties"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"optional": true,
|
|
137
|
+
"computed": false
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"type": "propertySignature",
|
|
141
|
+
"key": {
|
|
142
|
+
"type": "identifier",
|
|
143
|
+
"name": "useBrick"
|
|
144
|
+
},
|
|
145
|
+
"annotation": {
|
|
146
|
+
"type": "reference",
|
|
147
|
+
"typeName": {
|
|
148
|
+
"type": "identifier",
|
|
149
|
+
"name": "UseSingleBrickConf"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"computed": false
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
2
158
|
"eo-tree": {
|
|
3
159
|
"properties": [
|
|
4
160
|
{
|
|
@@ -143,6 +299,29 @@
|
|
|
143
299
|
}
|
|
144
300
|
}
|
|
145
301
|
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "titleSuffixBrick",
|
|
305
|
+
"annotation": {
|
|
306
|
+
"type": "typeLiteral",
|
|
307
|
+
"members": [
|
|
308
|
+
{
|
|
309
|
+
"type": "propertySignature",
|
|
310
|
+
"key": {
|
|
311
|
+
"type": "identifier",
|
|
312
|
+
"name": "useBrick"
|
|
313
|
+
},
|
|
314
|
+
"annotation": {
|
|
315
|
+
"type": "reference",
|
|
316
|
+
"typeName": {
|
|
317
|
+
"type": "identifier",
|
|
318
|
+
"name": "UseBrickConf"
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"computed": false
|
|
322
|
+
}
|
|
323
|
+
]
|
|
324
|
+
}
|
|
146
325
|
}
|
|
147
326
|
],
|
|
148
327
|
"events": [
|
|
@@ -699,162 +878,6 @@
|
|
|
699
878
|
],
|
|
700
879
|
"methods": []
|
|
701
880
|
},
|
|
702
|
-
"eo-workbench-layout": {
|
|
703
|
-
"properties": [
|
|
704
|
-
{
|
|
705
|
-
"name": "cardTitle",
|
|
706
|
-
"annotation": {
|
|
707
|
-
"type": "keyword",
|
|
708
|
-
"value": "string"
|
|
709
|
-
}
|
|
710
|
-
},
|
|
711
|
-
{
|
|
712
|
-
"name": "isEdit",
|
|
713
|
-
"annotation": {
|
|
714
|
-
"type": "keyword",
|
|
715
|
-
"value": "boolean"
|
|
716
|
-
}
|
|
717
|
-
},
|
|
718
|
-
{
|
|
719
|
-
"name": "layouts",
|
|
720
|
-
"annotation": {
|
|
721
|
-
"type": "array",
|
|
722
|
-
"elementType": {
|
|
723
|
-
"type": "reference",
|
|
724
|
-
"typeName": {
|
|
725
|
-
"type": "identifier",
|
|
726
|
-
"name": "Layout"
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
},
|
|
731
|
-
{
|
|
732
|
-
"name": "componentList",
|
|
733
|
-
"annotation": {
|
|
734
|
-
"type": "array",
|
|
735
|
-
"elementType": {
|
|
736
|
-
"type": "reference",
|
|
737
|
-
"typeName": {
|
|
738
|
-
"type": "identifier",
|
|
739
|
-
"name": "Item"
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
],
|
|
745
|
-
"events": [
|
|
746
|
-
{
|
|
747
|
-
"name": "save",
|
|
748
|
-
"detail": {
|
|
749
|
-
"annotation": {
|
|
750
|
-
"type": "array",
|
|
751
|
-
"elementType": {
|
|
752
|
-
"type": "reference",
|
|
753
|
-
"typeName": {
|
|
754
|
-
"type": "identifier",
|
|
755
|
-
"name": "Layout"
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
},
|
|
761
|
-
{
|
|
762
|
-
"name": "cancel",
|
|
763
|
-
"detail": {
|
|
764
|
-
"annotation": {
|
|
765
|
-
"type": "keyword",
|
|
766
|
-
"value": "void"
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
],
|
|
771
|
-
"methods": [],
|
|
772
|
-
"types": [
|
|
773
|
-
{
|
|
774
|
-
"type": "interface",
|
|
775
|
-
"name": "Item",
|
|
776
|
-
"body": [
|
|
777
|
-
{
|
|
778
|
-
"type": "propertySignature",
|
|
779
|
-
"key": {
|
|
780
|
-
"type": "identifier",
|
|
781
|
-
"name": "position"
|
|
782
|
-
},
|
|
783
|
-
"annotation": {
|
|
784
|
-
"type": "reference",
|
|
785
|
-
"typeName": {
|
|
786
|
-
"type": "identifier",
|
|
787
|
-
"name": "Layout"
|
|
788
|
-
}
|
|
789
|
-
},
|
|
790
|
-
"computed": false
|
|
791
|
-
},
|
|
792
|
-
{
|
|
793
|
-
"type": "propertySignature",
|
|
794
|
-
"key": {
|
|
795
|
-
"type": "identifier",
|
|
796
|
-
"name": "key"
|
|
797
|
-
},
|
|
798
|
-
"annotation": {
|
|
799
|
-
"type": "keyword",
|
|
800
|
-
"value": "string"
|
|
801
|
-
},
|
|
802
|
-
"computed": false
|
|
803
|
-
},
|
|
804
|
-
{
|
|
805
|
-
"type": "propertySignature",
|
|
806
|
-
"key": {
|
|
807
|
-
"type": "identifier",
|
|
808
|
-
"name": "title"
|
|
809
|
-
},
|
|
810
|
-
"annotation": {
|
|
811
|
-
"type": "keyword",
|
|
812
|
-
"value": "string"
|
|
813
|
-
},
|
|
814
|
-
"computed": false
|
|
815
|
-
},
|
|
816
|
-
{
|
|
817
|
-
"type": "propertySignature",
|
|
818
|
-
"key": {
|
|
819
|
-
"type": "identifier",
|
|
820
|
-
"name": "style"
|
|
821
|
-
},
|
|
822
|
-
"annotation": {
|
|
823
|
-
"type": "reference",
|
|
824
|
-
"typeName": {
|
|
825
|
-
"type": "qualifiedName",
|
|
826
|
-
"left": {
|
|
827
|
-
"type": "identifier",
|
|
828
|
-
"name": "React"
|
|
829
|
-
},
|
|
830
|
-
"right": {
|
|
831
|
-
"type": "identifier",
|
|
832
|
-
"name": "CSSProperties"
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
},
|
|
836
|
-
"optional": true,
|
|
837
|
-
"computed": false
|
|
838
|
-
},
|
|
839
|
-
{
|
|
840
|
-
"type": "propertySignature",
|
|
841
|
-
"key": {
|
|
842
|
-
"type": "identifier",
|
|
843
|
-
"name": "useBrick"
|
|
844
|
-
},
|
|
845
|
-
"annotation": {
|
|
846
|
-
"type": "reference",
|
|
847
|
-
"typeName": {
|
|
848
|
-
"type": "identifier",
|
|
849
|
-
"name": "UseSingleBrickConf"
|
|
850
|
-
}
|
|
851
|
-
},
|
|
852
|
-
"computed": false
|
|
853
|
-
}
|
|
854
|
-
]
|
|
855
|
-
}
|
|
856
|
-
]
|
|
857
|
-
},
|
|
858
881
|
"advanced.capture-snapshot": {
|
|
859
882
|
"type": "provider",
|
|
860
883
|
"params": [
|
|
@@ -3,6 +3,7 @@ import { ReactNextElement } from "@next-core/react-element";
|
|
|
3
3
|
import "@next-core/theme";
|
|
4
4
|
import type { TreeProps } from "antd";
|
|
5
5
|
import type { BasicDataNode } from "antd/es/tree";
|
|
6
|
+
import { UseBrickConf } from "@next-core/types";
|
|
6
7
|
export interface EoTreeProps {
|
|
7
8
|
dataSource?: TreeNode[];
|
|
8
9
|
checkable?: boolean;
|
|
@@ -16,6 +17,9 @@ export interface EoTreeProps {
|
|
|
16
17
|
};
|
|
17
18
|
switcherIcon?: "auto" | "chevron" | false;
|
|
18
19
|
allowDrop?: (info: AllowDropInfo) => boolean;
|
|
20
|
+
titleSuffixBrick?: {
|
|
21
|
+
useBrick: UseBrickConf;
|
|
22
|
+
};
|
|
19
23
|
}
|
|
20
24
|
export interface TreeNode extends BasicDataNode {
|
|
21
25
|
title: string;
|
|
@@ -65,6 +69,9 @@ export declare class EoTree extends ReactNextElement implements EoTreeProps {
|
|
|
65
69
|
} | undefined;
|
|
66
70
|
accessor switcherIcon: "auto" | "chevron" | false | undefined;
|
|
67
71
|
accessor allowDrop: ((info: AllowDropInfo) => boolean) | undefined;
|
|
72
|
+
accessor titleSuffixBrick: {
|
|
73
|
+
useBrick: UseBrickConf;
|
|
74
|
+
} | undefined;
|
|
68
75
|
render(): React.JSX.Element;
|
|
69
76
|
}
|
|
70
77
|
export interface EoTreeComponentProps extends EoTreeProps {
|
|
@@ -74,4 +81,4 @@ export interface EoTreeComponentProps extends EoTreeProps {
|
|
|
74
81
|
onDrop: TreeProps<TreeNode>["onDrop"];
|
|
75
82
|
allowDrop?: (info: AllowDropInfo) => boolean;
|
|
76
83
|
}
|
|
77
|
-
export declare function EoTreeComponent({ dataSource, shadowRoot, checkable, selectable, defaultExpandAll, showLine, expandedKeys, checkedKeys, nodeDraggable, switcherIcon, onCheck, onExpand, onDrop, allowDrop, }: EoTreeComponentProps): React.JSX.Element;
|
|
84
|
+
export declare function EoTreeComponent({ dataSource, shadowRoot, checkable, selectable, defaultExpandAll, showLine, expandedKeys, checkedKeys, nodeDraggable, switcherIcon, titleSuffixBrick, onCheck, onExpand, onDrop, allowDrop, }: EoTreeComponentProps): React.JSX.Element;
|
package/docs/eo-tree.md
CHANGED
|
@@ -58,3 +58,38 @@ events:
|
|
|
58
58
|
check.detail:
|
|
59
59
|
action: console.log
|
|
60
60
|
```
|
|
61
|
+
|
|
62
|
+
### titleSuffixBrick
|
|
63
|
+
|
|
64
|
+
```yaml preview
|
|
65
|
+
brick: eo-tree
|
|
66
|
+
properties:
|
|
67
|
+
defaultExpandAll: true
|
|
68
|
+
titleSuffixBrick:
|
|
69
|
+
useBrick:
|
|
70
|
+
brick: eo-link
|
|
71
|
+
properties:
|
|
72
|
+
icon:
|
|
73
|
+
lib: antd
|
|
74
|
+
icon: edit
|
|
75
|
+
theme: outlined
|
|
76
|
+
style:
|
|
77
|
+
margin-left: 5px
|
|
78
|
+
font-size: 12px
|
|
79
|
+
dataSource:
|
|
80
|
+
- title: parent 1
|
|
81
|
+
key: 0-0
|
|
82
|
+
children:
|
|
83
|
+
- title: parent 1-0
|
|
84
|
+
key: 0-0-0
|
|
85
|
+
children:
|
|
86
|
+
- title: leaf
|
|
87
|
+
key: 0-0-0-0
|
|
88
|
+
- title: leaf
|
|
89
|
+
key: 0-0-0-1
|
|
90
|
+
- title: parent 1-1
|
|
91
|
+
key: 0-0-1
|
|
92
|
+
children:
|
|
93
|
+
- title: sss
|
|
94
|
+
key: 0-0-1-0
|
|
95
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/advanced",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/basic",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"@next-bricks/form": "*",
|
|
43
43
|
"@next-bricks/icons": "*"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "c83ea4f5ed448818719fa8abc29eb2d6ffaba87a"
|
|
46
46
|
}
|