@next-bricks/nav 1.4.0 → 1.6.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 +10 -2
- package/dist/chunks/4282.e2e1d3ac.js +3 -0
- package/dist/chunks/4282.e2e1d3ac.js.map +1 -0
- package/dist/chunks/{4504.bf55ef18.js → 4504.0a34e5c5.js} +2 -2
- package/dist/chunks/{4504.bf55ef18.js.map → 4504.0a34e5c5.js.map} +1 -1
- package/dist/chunks/{9102.b3a5fd52.js → 9102.1a6633c8.js} +3 -3
- package/dist/chunks/{9102.b3a5fd52.js.map → 9102.1a6633c8.js.map} +1 -1
- package/dist/chunks/{easyops-navbar-alerts.4dcfd2a2.js → easyops-navbar-alerts.8ce7a30f.js} +2 -2
- package/dist/chunks/{easyops-navbar-alerts.4dcfd2a2.js.map → easyops-navbar-alerts.8ce7a30f.js.map} +1 -1
- package/dist/chunks/eo-directory-tree-internal-node.97782b3e.js +2 -0
- package/dist/chunks/eo-directory-tree-internal-node.97782b3e.js.map +1 -0
- package/dist/chunks/eo-directory-tree-leaf.b2fbb3a4.js +2 -0
- package/dist/chunks/eo-directory-tree-leaf.b2fbb3a4.js.map +1 -0
- package/dist/chunks/eo-directory-tree.3d795d83.js +2 -0
- package/dist/chunks/eo-directory-tree.3d795d83.js.map +1 -0
- package/dist/chunks/eo-directory.cf79852a.js +3 -0
- package/dist/chunks/eo-directory.cf79852a.js.map +1 -0
- package/dist/chunks/{eo-frame-breadcrumb.beaa823c.js → eo-frame-breadcrumb.e04ed276.js} +2 -2
- package/dist/chunks/{eo-frame-breadcrumb.beaa823c.js.map → eo-frame-breadcrumb.e04ed276.js.map} +1 -1
- package/dist/chunks/{eo-sidebar.2882735c.js → eo-sidebar.46731c6b.js} +3 -3
- package/dist/chunks/{eo-sidebar.2882735c.js.map → eo-sidebar.46731c6b.js.map} +1 -1
- package/dist/chunks/main.d3eb252a.js +2 -0
- package/dist/chunks/main.d3eb252a.js.map +1 -0
- package/dist/examples.json +9 -0
- package/dist/index.7c6a0940.js +2 -0
- package/dist/index.7c6a0940.js.map +1 -0
- package/dist/manifest.json +157 -0
- package/dist/types.json +410 -0
- package/dist-types/bootstrap.d.ts +3 -0
- package/dist-types/directory/index.d.ts +17 -0
- package/dist-types/directory-tree/DirectoryTreeContext.d.ts +20 -0
- package/dist-types/directory-tree/Tree.d.ts +7 -0
- package/dist-types/directory-tree/constants.d.ts +1 -0
- package/dist-types/directory-tree/directory-tree-internal-node/index.d.ts +32 -0
- package/dist-types/directory-tree/directory-tree-internal-node/index.spec.d.ts +1 -0
- package/dist-types/directory-tree/directory-tree-leaf/index.d.ts +32 -0
- package/dist-types/directory-tree/directory-tree-leaf/index.spec.d.ts +1 -0
- package/dist-types/directory-tree/index.d.ts +89 -0
- package/dist-types/directory-tree/index.spec.d.ts +1 -0
- package/dist-types/directory-tree/utils.d.ts +6 -0
- package/docs/eo-directory-tree-internal-node.md +48 -0
- package/docs/eo-directory-tree-leaf.md +24 -0
- package/docs/eo-directory-tree.md +80 -0
- package/package.json +2 -2
- package/dist/chunks/622.2c4c4691.js +0 -3
- package/dist/chunks/622.2c4c4691.js.map +0 -1
- package/dist/chunks/eo-directory.795fc002.js +0 -3
- package/dist/chunks/eo-directory.795fc002.js.map +0 -1
- package/dist/chunks/main.ac44054c.js +0 -2
- package/dist/chunks/main.ac44054c.js.map +0 -1
- package/dist/index.605511d2.js +0 -2
- package/dist/index.605511d2.js.map +0 -1
- /package/dist/chunks/{622.2c4c4691.js.LICENSE.txt → 4282.e2e1d3ac.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{9102.b3a5fd52.js.LICENSE.txt → 9102.1a6633c8.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-directory.795fc002.js.LICENSE.txt → eo-directory.cf79852a.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-sidebar.2882735c.js.LICENSE.txt → eo-sidebar.46731c6b.js.LICENSE.txt} +0 -0
package/dist/types.json
CHANGED
|
@@ -251,6 +251,22 @@
|
|
|
251
251
|
},
|
|
252
252
|
"eo-directory": {
|
|
253
253
|
"properties": [
|
|
254
|
+
{
|
|
255
|
+
"name": "position",
|
|
256
|
+
"annotation": {
|
|
257
|
+
"type": "union",
|
|
258
|
+
"types": [
|
|
259
|
+
{
|
|
260
|
+
"type": "jsLiteral",
|
|
261
|
+
"value": "static"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"type": "jsLiteral",
|
|
265
|
+
"value": "fixed"
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
},
|
|
254
270
|
{
|
|
255
271
|
"name": "directoryTitle",
|
|
256
272
|
"annotation": {
|
|
@@ -271,6 +287,29 @@
|
|
|
271
287
|
}
|
|
272
288
|
}
|
|
273
289
|
},
|
|
290
|
+
{
|
|
291
|
+
"name": "suffixBrick",
|
|
292
|
+
"annotation": {
|
|
293
|
+
"type": "typeLiteral",
|
|
294
|
+
"members": [
|
|
295
|
+
{
|
|
296
|
+
"type": "propertySignature",
|
|
297
|
+
"key": {
|
|
298
|
+
"type": "identifier",
|
|
299
|
+
"name": "useBrick"
|
|
300
|
+
},
|
|
301
|
+
"annotation": {
|
|
302
|
+
"type": "reference",
|
|
303
|
+
"typeName": {
|
|
304
|
+
"type": "identifier",
|
|
305
|
+
"name": "UseBrickConf"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"computed": false
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
},
|
|
274
313
|
{
|
|
275
314
|
"name": "defaultSelectedKeys",
|
|
276
315
|
"annotation": {
|
|
@@ -581,6 +620,36 @@
|
|
|
581
620
|
"events": [],
|
|
582
621
|
"methods": []
|
|
583
622
|
},
|
|
623
|
+
"eo-directory-tree-internal-node": {
|
|
624
|
+
"properties": [
|
|
625
|
+
{
|
|
626
|
+
"name": "depth",
|
|
627
|
+
"annotation": {
|
|
628
|
+
"type": "keyword",
|
|
629
|
+
"value": "number"
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"name": "expanded",
|
|
634
|
+
"annotation": {
|
|
635
|
+
"type": "keyword",
|
|
636
|
+
"value": "boolean"
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
],
|
|
640
|
+
"events": [
|
|
641
|
+
{
|
|
642
|
+
"name": "expand",
|
|
643
|
+
"detail": {
|
|
644
|
+
"annotation": {
|
|
645
|
+
"type": "keyword",
|
|
646
|
+
"value": "boolean"
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
],
|
|
651
|
+
"methods": []
|
|
652
|
+
},
|
|
584
653
|
"eo-sidebar-menu-group": {
|
|
585
654
|
"properties": [
|
|
586
655
|
{
|
|
@@ -727,6 +796,36 @@
|
|
|
727
796
|
}
|
|
728
797
|
]
|
|
729
798
|
},
|
|
799
|
+
"eo-directory-tree-leaf": {
|
|
800
|
+
"properties": [
|
|
801
|
+
{
|
|
802
|
+
"name": "depth",
|
|
803
|
+
"annotation": {
|
|
804
|
+
"type": "keyword",
|
|
805
|
+
"value": "number"
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"name": "selected",
|
|
810
|
+
"annotation": {
|
|
811
|
+
"type": "keyword",
|
|
812
|
+
"value": "boolean"
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
],
|
|
816
|
+
"events": [
|
|
817
|
+
{
|
|
818
|
+
"name": "select",
|
|
819
|
+
"detail": {
|
|
820
|
+
"annotation": {
|
|
821
|
+
"type": "keyword",
|
|
822
|
+
"value": "void"
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
],
|
|
827
|
+
"methods": []
|
|
828
|
+
},
|
|
730
829
|
"eo-launchpad-quick-access": {
|
|
731
830
|
"properties": [
|
|
732
831
|
{
|
|
@@ -740,6 +839,317 @@
|
|
|
740
839
|
"events": [],
|
|
741
840
|
"methods": []
|
|
742
841
|
},
|
|
842
|
+
"eo-directory-tree": {
|
|
843
|
+
"properties": [
|
|
844
|
+
{
|
|
845
|
+
"name": "data",
|
|
846
|
+
"annotation": {
|
|
847
|
+
"type": "array",
|
|
848
|
+
"elementType": {
|
|
849
|
+
"type": "reference",
|
|
850
|
+
"typeName": {
|
|
851
|
+
"type": "identifier",
|
|
852
|
+
"name": "TreeItem"
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"name": "directoryTitle",
|
|
859
|
+
"annotation": {
|
|
860
|
+
"type": "keyword",
|
|
861
|
+
"value": "string"
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"name": "searchable",
|
|
866
|
+
"annotation": {
|
|
867
|
+
"type": "keyword",
|
|
868
|
+
"value": "boolean"
|
|
869
|
+
}
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
"name": "placeholder",
|
|
873
|
+
"annotation": {
|
|
874
|
+
"type": "keyword",
|
|
875
|
+
"value": "string"
|
|
876
|
+
}
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"name": "searchFields",
|
|
880
|
+
"annotation": {
|
|
881
|
+
"type": "array",
|
|
882
|
+
"elementType": {
|
|
883
|
+
"type": "parenthesizedType",
|
|
884
|
+
"annotation": {
|
|
885
|
+
"type": "union",
|
|
886
|
+
"types": [
|
|
887
|
+
{
|
|
888
|
+
"type": "keyword",
|
|
889
|
+
"value": "string"
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"type": "array",
|
|
893
|
+
"elementType": {
|
|
894
|
+
"type": "keyword",
|
|
895
|
+
"value": "string"
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
]
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
"name": "suffixBrick",
|
|
905
|
+
"annotation": {
|
|
906
|
+
"type": "typeLiteral",
|
|
907
|
+
"members": [
|
|
908
|
+
{
|
|
909
|
+
"type": "propertySignature",
|
|
910
|
+
"key": {
|
|
911
|
+
"type": "identifier",
|
|
912
|
+
"name": "useBrick"
|
|
913
|
+
},
|
|
914
|
+
"annotation": {
|
|
915
|
+
"type": "reference",
|
|
916
|
+
"typeName": {
|
|
917
|
+
"type": "identifier",
|
|
918
|
+
"name": "UseBrickConf"
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
"computed": false
|
|
922
|
+
}
|
|
923
|
+
]
|
|
924
|
+
}
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"name": "selectedKeys",
|
|
928
|
+
"annotation": {
|
|
929
|
+
"type": "array",
|
|
930
|
+
"elementType": {
|
|
931
|
+
"type": "keyword",
|
|
932
|
+
"value": "string"
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
"name": "expandedKeys",
|
|
938
|
+
"annotation": {
|
|
939
|
+
"type": "array",
|
|
940
|
+
"elementType": {
|
|
941
|
+
"type": "keyword",
|
|
942
|
+
"value": "string"
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
],
|
|
947
|
+
"events": [
|
|
948
|
+
{
|
|
949
|
+
"name": "expand",
|
|
950
|
+
"detail": {
|
|
951
|
+
"annotation": {
|
|
952
|
+
"type": "typeLiteral",
|
|
953
|
+
"members": [
|
|
954
|
+
{
|
|
955
|
+
"type": "propertySignature",
|
|
956
|
+
"key": {
|
|
957
|
+
"type": "identifier",
|
|
958
|
+
"name": "keys"
|
|
959
|
+
},
|
|
960
|
+
"annotation": {
|
|
961
|
+
"type": "array",
|
|
962
|
+
"elementType": {
|
|
963
|
+
"type": "keyword",
|
|
964
|
+
"value": "string"
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
"computed": false
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"type": "propertySignature",
|
|
971
|
+
"key": {
|
|
972
|
+
"type": "identifier",
|
|
973
|
+
"name": "node"
|
|
974
|
+
},
|
|
975
|
+
"annotation": {
|
|
976
|
+
"type": "reference",
|
|
977
|
+
"typeName": {
|
|
978
|
+
"type": "identifier",
|
|
979
|
+
"name": "NodeData"
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
"computed": false
|
|
983
|
+
}
|
|
984
|
+
]
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
"name": "select",
|
|
990
|
+
"detail": {
|
|
991
|
+
"annotation": {
|
|
992
|
+
"type": "typeLiteral",
|
|
993
|
+
"members": [
|
|
994
|
+
{
|
|
995
|
+
"type": "propertySignature",
|
|
996
|
+
"key": {
|
|
997
|
+
"type": "identifier",
|
|
998
|
+
"name": "keys"
|
|
999
|
+
},
|
|
1000
|
+
"annotation": {
|
|
1001
|
+
"type": "array",
|
|
1002
|
+
"elementType": {
|
|
1003
|
+
"type": "keyword",
|
|
1004
|
+
"value": "string"
|
|
1005
|
+
}
|
|
1006
|
+
},
|
|
1007
|
+
"computed": false
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
"type": "propertySignature",
|
|
1011
|
+
"key": {
|
|
1012
|
+
"type": "identifier",
|
|
1013
|
+
"name": "node"
|
|
1014
|
+
},
|
|
1015
|
+
"annotation": {
|
|
1016
|
+
"type": "reference",
|
|
1017
|
+
"typeName": {
|
|
1018
|
+
"type": "identifier",
|
|
1019
|
+
"name": "NodeData"
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
"computed": false
|
|
1023
|
+
}
|
|
1024
|
+
]
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
],
|
|
1029
|
+
"methods": [
|
|
1030
|
+
{
|
|
1031
|
+
"name": "expandAll",
|
|
1032
|
+
"params": [],
|
|
1033
|
+
"returns": {}
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
"name": "collapseAll",
|
|
1037
|
+
"params": [],
|
|
1038
|
+
"returns": {}
|
|
1039
|
+
}
|
|
1040
|
+
],
|
|
1041
|
+
"types": [
|
|
1042
|
+
{
|
|
1043
|
+
"type": "interface",
|
|
1044
|
+
"name": "TreeItem",
|
|
1045
|
+
"body": [
|
|
1046
|
+
{
|
|
1047
|
+
"type": "propertySignature",
|
|
1048
|
+
"key": {
|
|
1049
|
+
"type": "identifier",
|
|
1050
|
+
"name": "key"
|
|
1051
|
+
},
|
|
1052
|
+
"annotation": {
|
|
1053
|
+
"type": "keyword",
|
|
1054
|
+
"value": "string"
|
|
1055
|
+
},
|
|
1056
|
+
"computed": false
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
"type": "propertySignature",
|
|
1060
|
+
"key": {
|
|
1061
|
+
"type": "identifier",
|
|
1062
|
+
"name": "title"
|
|
1063
|
+
},
|
|
1064
|
+
"annotation": {
|
|
1065
|
+
"type": "keyword",
|
|
1066
|
+
"value": "string"
|
|
1067
|
+
},
|
|
1068
|
+
"computed": false
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"type": "propertySignature",
|
|
1072
|
+
"key": {
|
|
1073
|
+
"type": "identifier",
|
|
1074
|
+
"name": "children"
|
|
1075
|
+
},
|
|
1076
|
+
"annotation": {
|
|
1077
|
+
"type": "array",
|
|
1078
|
+
"elementType": {
|
|
1079
|
+
"type": "reference",
|
|
1080
|
+
"typeName": {
|
|
1081
|
+
"type": "identifier",
|
|
1082
|
+
"name": "TreeItem"
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
"optional": true,
|
|
1087
|
+
"computed": false
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
"type": "indexSignature",
|
|
1091
|
+
"parameter": {
|
|
1092
|
+
"type": "identifier",
|
|
1093
|
+
"name": "key",
|
|
1094
|
+
"annotation": {
|
|
1095
|
+
"type": "keyword",
|
|
1096
|
+
"value": "string"
|
|
1097
|
+
}
|
|
1098
|
+
},
|
|
1099
|
+
"annotation": {
|
|
1100
|
+
"type": "keyword",
|
|
1101
|
+
"value": "any"
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
]
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"type": "interface",
|
|
1108
|
+
"name": "NodeData",
|
|
1109
|
+
"body": [
|
|
1110
|
+
{
|
|
1111
|
+
"type": "propertySignature",
|
|
1112
|
+
"key": {
|
|
1113
|
+
"type": "identifier",
|
|
1114
|
+
"name": "depth"
|
|
1115
|
+
},
|
|
1116
|
+
"annotation": {
|
|
1117
|
+
"type": "keyword",
|
|
1118
|
+
"value": "number"
|
|
1119
|
+
},
|
|
1120
|
+
"computed": false
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
"type": "propertySignature",
|
|
1124
|
+
"key": {
|
|
1125
|
+
"type": "identifier",
|
|
1126
|
+
"name": "index"
|
|
1127
|
+
},
|
|
1128
|
+
"annotation": {
|
|
1129
|
+
"type": "keyword",
|
|
1130
|
+
"value": "number"
|
|
1131
|
+
},
|
|
1132
|
+
"computed": false
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
"type": "propertySignature",
|
|
1136
|
+
"key": {
|
|
1137
|
+
"type": "identifier",
|
|
1138
|
+
"name": "data"
|
|
1139
|
+
},
|
|
1140
|
+
"annotation": {
|
|
1141
|
+
"type": "reference",
|
|
1142
|
+
"typeName": {
|
|
1143
|
+
"type": "identifier",
|
|
1144
|
+
"name": "TreeItem"
|
|
1145
|
+
}
|
|
1146
|
+
},
|
|
1147
|
+
"computed": false
|
|
1148
|
+
}
|
|
1149
|
+
]
|
|
1150
|
+
}
|
|
1151
|
+
]
|
|
1152
|
+
},
|
|
743
1153
|
"nav.launchpad-config": {
|
|
744
1154
|
"properties": [
|
|
745
1155
|
{
|
|
@@ -15,3 +15,6 @@ import "./sidebar/sidebar-menu/index.js";
|
|
|
15
15
|
import "./sidebar/index.js";
|
|
16
16
|
import "./sidebar-sub-menu/index.js";
|
|
17
17
|
import "./directory/index.js";
|
|
18
|
+
import "./directory-tree/index.js";
|
|
19
|
+
import "./directory-tree/directory-tree-leaf/index.js";
|
|
20
|
+
import "./directory-tree/directory-tree-internal-node/index.js";
|
|
@@ -2,11 +2,18 @@ import React from "react";
|
|
|
2
2
|
import { ReactNextElement } from "@next-core/react-element";
|
|
3
3
|
import "@next-core/theme";
|
|
4
4
|
import type { GeneralIconProps } from "@next-bricks/icons/general-icon";
|
|
5
|
+
import { UseBrickConf } from "@next-core/types";
|
|
5
6
|
/**
|
|
6
7
|
* 目录
|
|
7
8
|
*/
|
|
8
9
|
export declare class EoDirectory extends ReactNextElement implements EoDirectoryProps {
|
|
9
10
|
#private;
|
|
11
|
+
/**
|
|
12
|
+
* 设置定位方式:静态定位或固定定位。
|
|
13
|
+
*
|
|
14
|
+
* @default "fixed"
|
|
15
|
+
*/
|
|
16
|
+
accessor position: "static" | "fixed";
|
|
10
17
|
/**
|
|
11
18
|
* 目录标题
|
|
12
19
|
*/
|
|
@@ -17,6 +24,12 @@ export declare class EoDirectory extends ReactNextElement implements EoDirectory
|
|
|
17
24
|
* @required
|
|
18
25
|
*/
|
|
19
26
|
accessor menuItems: MenuItem[];
|
|
27
|
+
/**
|
|
28
|
+
* 后缀 useBrick
|
|
29
|
+
*/
|
|
30
|
+
accessor suffixBrick: {
|
|
31
|
+
useBrick: UseBrickConf;
|
|
32
|
+
} | undefined;
|
|
20
33
|
/**
|
|
21
34
|
* 默认选中高亮的菜单项
|
|
22
35
|
*/
|
|
@@ -24,6 +37,10 @@ export declare class EoDirectory extends ReactNextElement implements EoDirectory
|
|
|
24
37
|
render(): React.JSX.Element;
|
|
25
38
|
}
|
|
26
39
|
export interface EoDirectoryProps {
|
|
40
|
+
position?: "static" | "fixed";
|
|
41
|
+
suffixBrick?: {
|
|
42
|
+
useBrick: UseBrickConf;
|
|
43
|
+
};
|
|
27
44
|
directoryTitle: string | undefined;
|
|
28
45
|
menuItems: MenuItem[];
|
|
29
46
|
menuItemClick?: (data: MenuItemClickEventDetail) => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UseBrickConf } from "@next-core/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { NodeData } from ".";
|
|
4
|
+
export interface ContextOfDirectoryTree {
|
|
5
|
+
expandedKeysSet: Set<string>;
|
|
6
|
+
selectedKeysSet: Set<string>;
|
|
7
|
+
onExpand: (data: {
|
|
8
|
+
keys: string[];
|
|
9
|
+
node: NodeData;
|
|
10
|
+
}) => void;
|
|
11
|
+
onSelect: (data: {
|
|
12
|
+
keys: string[];
|
|
13
|
+
node: NodeData;
|
|
14
|
+
}) => void;
|
|
15
|
+
suffixBrick?: {
|
|
16
|
+
useBrick: UseBrickConf;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare const DirectoryTreeContext: React.Context<ContextOfDirectoryTree>;
|
|
20
|
+
export declare const useDirectoryTreeContext: () => ContextOfDirectoryTree;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const IndentSize = 10;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import "@next-core/theme";
|
|
4
|
+
export interface EoDirectoryTreeInternalNodeProps {
|
|
5
|
+
depth: number;
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface EoDirectoryTreeInternalNodeEvents {
|
|
9
|
+
expand: CustomEvent<boolean>;
|
|
10
|
+
}
|
|
11
|
+
export interface EoDirectoryTreeInternalNodeEventsMap {
|
|
12
|
+
onExpand: "expand";
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 目录树节点节点
|
|
16
|
+
*/
|
|
17
|
+
export declare class EoDirectoryTreeInternalNode extends ReactNextElement {
|
|
18
|
+
#private;
|
|
19
|
+
/**
|
|
20
|
+
* 深度
|
|
21
|
+
*/
|
|
22
|
+
accessor depth: number;
|
|
23
|
+
/**
|
|
24
|
+
* 是否展开
|
|
25
|
+
*/
|
|
26
|
+
accessor expanded: boolean | undefined;
|
|
27
|
+
render(): React.JSX.Element;
|
|
28
|
+
}
|
|
29
|
+
export interface EoDirectoryTreeInternalNodeComponentProps extends EoDirectoryTreeInternalNodeProps {
|
|
30
|
+
onExpand: () => void;
|
|
31
|
+
}
|
|
32
|
+
export declare function EoDirectoryTreeInternalNodeComponent(props: EoDirectoryTreeInternalNodeComponentProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import ".";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import "@next-core/theme";
|
|
4
|
+
export interface EoDirectoryTreeLeafProps {
|
|
5
|
+
depth: number;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface EoDirectoryTreeLeafEvents {
|
|
9
|
+
select: CustomEvent<void>;
|
|
10
|
+
}
|
|
11
|
+
export interface EoDirectoryTreeLeafEventsMap {
|
|
12
|
+
onSelect: "select";
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 目录树叶子节点
|
|
16
|
+
*/
|
|
17
|
+
export declare class EoDirectoryTreeLeaf extends ReactNextElement {
|
|
18
|
+
#private;
|
|
19
|
+
/**
|
|
20
|
+
* 深度
|
|
21
|
+
*/
|
|
22
|
+
accessor depth: number;
|
|
23
|
+
/**
|
|
24
|
+
* 是否选中
|
|
25
|
+
*/
|
|
26
|
+
accessor selected: boolean | undefined;
|
|
27
|
+
render(): React.JSX.Element;
|
|
28
|
+
}
|
|
29
|
+
export interface EoDirectoryTreeLeafComponentProps extends EoDirectoryTreeLeafProps {
|
|
30
|
+
onSelect: () => void;
|
|
31
|
+
}
|
|
32
|
+
export declare function EoDirectoryTreeLeafComponent(props: EoDirectoryTreeLeafComponentProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import ".";
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import "@next-core/theme";
|
|
4
|
+
import { UseBrickConf } from "@next-core/types";
|
|
5
|
+
export interface TreeItem {
|
|
6
|
+
key: string;
|
|
7
|
+
title: string;
|
|
8
|
+
children?: TreeItem[];
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export interface NodeData {
|
|
12
|
+
depth: number;
|
|
13
|
+
index: number;
|
|
14
|
+
data: TreeItem;
|
|
15
|
+
}
|
|
16
|
+
export interface EoDirectoryTreeProps {
|
|
17
|
+
data: TreeItem[];
|
|
18
|
+
directoryTitle?: string;
|
|
19
|
+
searchable?: boolean;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
selectedKeys?: string[];
|
|
22
|
+
expandedKeys?: string[];
|
|
23
|
+
searchFields?: (string | string[])[];
|
|
24
|
+
suffixBrick?: {
|
|
25
|
+
useBrick: UseBrickConf;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 目录树
|
|
30
|
+
*/
|
|
31
|
+
export declare class EoDirectoryTree extends ReactNextElement {
|
|
32
|
+
#private;
|
|
33
|
+
/**
|
|
34
|
+
* 数据源
|
|
35
|
+
*/
|
|
36
|
+
accessor data: TreeItem[];
|
|
37
|
+
/**
|
|
38
|
+
* 目录标题
|
|
39
|
+
*/
|
|
40
|
+
accessor directoryTitle: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* 可搜索
|
|
43
|
+
*/
|
|
44
|
+
accessor searchable: boolean | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* 搜索占位说明
|
|
47
|
+
*/
|
|
48
|
+
accessor placeholder: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* 除了 title 以外,额外的搜索字段
|
|
51
|
+
*/
|
|
52
|
+
accessor searchFields: (string | string[])[] | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* 后缀 useBrick
|
|
55
|
+
*/
|
|
56
|
+
accessor suffixBrick: {
|
|
57
|
+
useBrick: UseBrickConf;
|
|
58
|
+
} | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* 选中的 keys
|
|
61
|
+
*/
|
|
62
|
+
accessor selectedKeys: string[] | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* 展开的 keys
|
|
65
|
+
*/
|
|
66
|
+
accessor expandedKeys: string[] | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* 展开全部
|
|
69
|
+
*/
|
|
70
|
+
expandAll(): void;
|
|
71
|
+
/**
|
|
72
|
+
* 收起全部
|
|
73
|
+
*/
|
|
74
|
+
collapseAll(): void;
|
|
75
|
+
render(): React.JSX.Element;
|
|
76
|
+
}
|
|
77
|
+
interface EoDirectoryTreeComponentProps extends EoDirectoryTreeProps {
|
|
78
|
+
element: EoDirectoryTree;
|
|
79
|
+
onExpand: (data: {
|
|
80
|
+
keys: string[];
|
|
81
|
+
node: NodeData;
|
|
82
|
+
}) => void;
|
|
83
|
+
onSelect: (data: {
|
|
84
|
+
keys: string[];
|
|
85
|
+
node: NodeData;
|
|
86
|
+
}) => void;
|
|
87
|
+
}
|
|
88
|
+
export declare function EoDirectoryTreeComponent(props: EoDirectoryTreeComponentProps): React.JSX.Element;
|
|
89
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./";
|