@next-bricks/nav 1.14.9 → 1.16.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.
Files changed (39) hide show
  1. package/dist/bricks.json +29 -22
  2. package/dist/chunks/2133.49a735c2.js.map +1 -1
  3. package/dist/chunks/884.18f6ab5d.js +2 -0
  4. package/dist/chunks/884.18f6ab5d.js.map +1 -0
  5. package/dist/chunks/eo-directory-tree-internal-node.9b27dad7.js +2 -0
  6. package/dist/chunks/eo-directory-tree-internal-node.9b27dad7.js.map +1 -0
  7. package/dist/chunks/eo-directory-tree-leaf.bfd0aeb0.js +2 -0
  8. package/dist/chunks/eo-directory-tree-leaf.bfd0aeb0.js.map +1 -0
  9. package/dist/chunks/eo-directory-tree.4eb89def.js +3 -0
  10. package/dist/chunks/eo-directory-tree.4eb89def.js.map +1 -0
  11. package/dist/chunks/launchpad-config.89accc46.js +3 -0
  12. package/dist/chunks/launchpad-config.89accc46.js.LICENSE.txt +5 -0
  13. package/dist/chunks/launchpad-config.89accc46.js.map +1 -0
  14. package/dist/chunks/{main.84bb7e92.js → main.2cb469ea.js} +2 -2
  15. package/dist/chunks/{main.84bb7e92.js.map → main.2cb469ea.js.map} +1 -1
  16. package/dist/examples.json +8 -8
  17. package/dist/index.ed279d5d.js +2 -0
  18. package/dist/{index.13d3a4bd.js.map → index.ed279d5d.js.map} +1 -1
  19. package/dist/manifest.json +144 -110
  20. package/dist/types.json +195 -71
  21. package/dist-types/directory-tree/DirectoryTreeContext.d.ts +3 -5
  22. package/dist-types/directory-tree/directory-tree-internal-node/index.d.ts +6 -1
  23. package/dist-types/directory-tree/directory-tree-leaf/index.d.ts +6 -1
  24. package/dist-types/directory-tree/index.d.ts +16 -3
  25. package/dist-types/launchpad-config/MenuGroup.d.ts +8 -2
  26. package/dist-types/launchpad-config/index.d.ts +17 -2
  27. package/package.json +2 -2
  28. package/dist/chunks/884.b3c85cf8.js +0 -2
  29. package/dist/chunks/884.b3c85cf8.js.map +0 -1
  30. package/dist/chunks/eo-directory-tree-internal-node.eb2044aa.js +0 -2
  31. package/dist/chunks/eo-directory-tree-internal-node.eb2044aa.js.map +0 -1
  32. package/dist/chunks/eo-directory-tree-leaf.8fc6c903.js +0 -2
  33. package/dist/chunks/eo-directory-tree-leaf.8fc6c903.js.map +0 -1
  34. package/dist/chunks/eo-directory-tree.875e9246.js +0 -2
  35. package/dist/chunks/eo-directory-tree.875e9246.js.map +0 -1
  36. package/dist/chunks/launchpad-config.044a21bf.js +0 -3
  37. package/dist/chunks/launchpad-config.044a21bf.js.map +0 -1
  38. package/dist/index.13d3a4bd.js +0 -2
  39. /package/dist/chunks/{launchpad-config.044a21bf.js.LICENSE.txt → eo-directory-tree.4eb89def.js.LICENSE.txt} +0 -0
@@ -40,16 +40,6 @@
40
40
  "description": "Launchpad 按钮构件",
41
41
  "insider": true
42
42
  },
43
- {
44
- "name": "eo-launchpad-button-v2",
45
- "properties": [],
46
- "events": [],
47
- "slots": [],
48
- "methods": [],
49
- "parts": [],
50
- "description": "构件 `eo-launchpad-button-v2`",
51
- "insider": true
52
- },
53
43
  {
54
44
  "name": "nav.launchpad-config",
55
45
  "properties": [
@@ -62,6 +52,17 @@
62
52
  "name": "actions",
63
53
  "attribute": false,
64
54
  "type": "MenuAction[]"
55
+ },
56
+ {
57
+ "name": "variant",
58
+ "description": "",
59
+ "default": "\"launchpad-config\"",
60
+ "type": "\"launchpad-config\" | \"menu-config\""
61
+ },
62
+ {
63
+ "name": "urlTemplate",
64
+ "description": "菜单项链接模板,例如可配置为 `/app/{{ id }}`。\n\n注:仅用于 variant: \"menu-config\"。",
65
+ "type": "string"
65
66
  }
66
67
  ],
67
68
  "events": [
@@ -75,7 +76,7 @@
75
76
  "slots": [],
76
77
  "methods": [],
77
78
  "parts": [],
78
- "description": "构件 `nav.launchpad-config`",
79
+ "description": "进行 Launchpad 配置。\n\n也可用于菜单自定义显示产品功能清单。",
79
80
  "insider": true
80
81
  },
81
82
  {
@@ -88,6 +89,16 @@
88
89
  "description": "构件 `nav.easyops-navbar-alerts`",
89
90
  "insider": true
90
91
  },
92
+ {
93
+ "name": "eo-launchpad-button-v2",
94
+ "properties": [],
95
+ "events": [],
96
+ "slots": [],
97
+ "methods": [],
98
+ "parts": [],
99
+ "description": "构件 `eo-launchpad-button-v2`",
100
+ "insider": true
101
+ },
91
102
  {
92
103
  "name": "eo-launchpad-quick-access",
93
104
  "properties": [
@@ -140,6 +151,33 @@
140
151
  "description": "launchpad 最近访问",
141
152
  "insider": true
142
153
  },
154
+ {
155
+ "name": "eo-frame-breadcrumb",
156
+ "properties": [
157
+ {
158
+ "name": "breadcrumb",
159
+ "description": "面包屑配置",
160
+ "attribute": false,
161
+ "type": "BreadcrumbItemConf[]"
162
+ },
163
+ {
164
+ "name": "noCurrentApp",
165
+ "description": "是否隐藏当前应用名称",
166
+ "type": "boolean"
167
+ },
168
+ {
169
+ "name": "menu",
170
+ "description": "菜单配置",
171
+ "attribute": false,
172
+ "type": "Menu"
173
+ }
174
+ ],
175
+ "events": [],
176
+ "slots": [],
177
+ "methods": [],
178
+ "parts": [],
179
+ "description": "面包屑"
180
+ },
143
181
  {
144
182
  "name": "eo-app-bar-wrapper",
145
183
  "alias": [
@@ -187,33 +225,6 @@
187
225
  "parts": [],
188
226
  "description": "应用顶部容器"
189
227
  },
190
- {
191
- "name": "eo-frame-breadcrumb",
192
- "properties": [
193
- {
194
- "name": "breadcrumb",
195
- "description": "面包屑配置",
196
- "attribute": false,
197
- "type": "BreadcrumbItemConf[]"
198
- },
199
- {
200
- "name": "noCurrentApp",
201
- "description": "是否隐藏当前应用名称",
202
- "type": "boolean"
203
- },
204
- {
205
- "name": "menu",
206
- "description": "菜单配置",
207
- "attribute": false,
208
- "type": "Menu"
209
- }
210
- ],
211
- "events": [],
212
- "slots": [],
213
- "methods": [],
214
- "parts": [],
215
- "description": "面包屑"
216
- },
217
228
  {
218
229
  "name": "eo-sidebar-menu-item",
219
230
  "properties": [
@@ -351,23 +362,6 @@
351
362
  "description": "侧栏菜单",
352
363
  "category": "navigation"
353
364
  },
354
- {
355
- "name": "eo-sidebar-sub-menu",
356
- "properties": [
357
- {
358
- "name": "menu",
359
- "description": "菜单项",
360
- "attribute": false,
361
- "type": "SidebarMenu"
362
- }
363
- ],
364
- "events": [],
365
- "slots": [],
366
- "methods": [],
367
- "parts": [],
368
- "description": "构件 `eo-sidebar-sub-menu`",
369
- "category": "navigation"
370
- },
371
365
  {
372
366
  "name": "eo-sidebar",
373
367
  "properties": [
@@ -419,68 +413,21 @@
419
413
  "category": "navigation"
420
414
  },
421
415
  {
422
- "name": "eo-directory",
416
+ "name": "eo-sidebar-sub-menu",
423
417
  "properties": [
424
418
  {
425
- "name": "position",
426
- "description": "设置定位方式:静态定位或固定定位。",
427
- "default": "\"fixed\"",
428
- "type": "\"static\" | \"fixed\""
429
- },
430
- {
431
- "name": "directoryTitle",
432
- "description": "目录标题",
433
- "type": "string"
434
- },
435
- {
436
- "name": "menuItems",
437
- "description": "菜单数据",
438
- "required": true,
439
- "default": "[]",
440
- "attribute": false,
441
- "type": "MenuItem[]"
442
- },
443
- {
444
- "name": "hideRightBorder",
445
- "description": "是否隐藏右边线",
446
- "default": "false",
447
- "type": "boolean"
448
- },
449
- {
450
- "name": "suffixBrick",
451
- "description": "后缀 useBrick",
452
- "attribute": false,
453
- "type": "{ useBrick: UseBrickConf }"
454
- },
455
- {
456
- "name": "defaultSelectedKeys",
457
- "description": "默认选中高亮的菜单项",
419
+ "name": "menu",
420
+ "description": "菜单项",
458
421
  "attribute": false,
459
- "type": "string[]"
460
- }
461
- ],
462
- "events": [
463
- {
464
- "name": "menu.item.click",
465
- "description": "菜单点击,groupKey 表示对应分组的key,data 表示对应菜单项",
466
- "detail": {
467
- "description": "{ groupKey: string, data: MenuChildrenItem }",
468
- "type": "MenuItemClickEventDetail"
469
- }
470
- },
471
- {
472
- "name": "suffix.icon.click",
473
- "description": "点击icon,detail为 对应菜单项或者是分组的key",
474
- "detail": {
475
- "description": "{ key: string }",
476
- "type": "{ key: string }"
477
- }
422
+ "type": "SidebarMenu"
478
423
  }
479
424
  ],
425
+ "events": [],
480
426
  "slots": [],
481
427
  "methods": [],
482
428
  "parts": [],
483
- "description": "目录"
429
+ "description": "构件 `eo-sidebar-sub-menu`",
430
+ "category": "navigation"
484
431
  },
485
432
  {
486
433
  "name": "eo-directory-tree",
@@ -497,6 +444,11 @@
497
444
  "description": "目录标题",
498
445
  "type": "string"
499
446
  },
447
+ {
448
+ "name": "internalNodeSelectable",
449
+ "description": "设置中间节点是否可选,默认只有叶子节点可选",
450
+ "type": "boolean"
451
+ },
500
452
  {
501
453
  "name": "searchable",
502
454
  "description": "可搜索",
@@ -517,7 +469,7 @@
517
469
  "name": "suffixBrick",
518
470
  "description": "后缀 useBrick",
519
471
  "attribute": false,
520
- "type": "{ useBrick: UseBrickConf }"
472
+ "type": "SuffixBrickConf"
521
473
  },
522
474
  {
523
475
  "name": "selectedKeys",
@@ -574,6 +526,70 @@
574
526
  "parts": [],
575
527
  "description": "目录树"
576
528
  },
529
+ {
530
+ "name": "eo-directory",
531
+ "properties": [
532
+ {
533
+ "name": "position",
534
+ "description": "设置定位方式:静态定位或固定定位。",
535
+ "default": "\"fixed\"",
536
+ "type": "\"static\" | \"fixed\""
537
+ },
538
+ {
539
+ "name": "directoryTitle",
540
+ "description": "目录标题",
541
+ "type": "string"
542
+ },
543
+ {
544
+ "name": "menuItems",
545
+ "description": "菜单数据",
546
+ "required": true,
547
+ "default": "[]",
548
+ "attribute": false,
549
+ "type": "MenuItem[]"
550
+ },
551
+ {
552
+ "name": "hideRightBorder",
553
+ "description": "是否隐藏右边线",
554
+ "default": "false",
555
+ "type": "boolean"
556
+ },
557
+ {
558
+ "name": "suffixBrick",
559
+ "description": "后缀 useBrick",
560
+ "attribute": false,
561
+ "type": "{ useBrick: UseBrickConf }"
562
+ },
563
+ {
564
+ "name": "defaultSelectedKeys",
565
+ "description": "默认选中高亮的菜单项",
566
+ "attribute": false,
567
+ "type": "string[]"
568
+ }
569
+ ],
570
+ "events": [
571
+ {
572
+ "name": "menu.item.click",
573
+ "description": "菜单点击,groupKey 表示对应分组的key,data 表示对应菜单项",
574
+ "detail": {
575
+ "description": "{ groupKey: string, data: MenuChildrenItem }",
576
+ "type": "MenuItemClickEventDetail"
577
+ }
578
+ },
579
+ {
580
+ "name": "suffix.icon.click",
581
+ "description": "点击icon,detail为 对应菜单项或者是分组的key",
582
+ "detail": {
583
+ "description": "{ key: string }",
584
+ "type": "{ key: string }"
585
+ }
586
+ }
587
+ ],
588
+ "slots": [],
589
+ "methods": [],
590
+ "parts": [],
591
+ "description": "目录"
592
+ },
577
593
  {
578
594
  "name": "eo-directory-tree-leaf",
579
595
  "properties": [
@@ -587,6 +603,15 @@
587
603
  "name": "selected",
588
604
  "description": "是否选中",
589
605
  "type": "boolean"
606
+ },
607
+ {
608
+ "name": "icon",
609
+ "attribute": false,
610
+ "type": "GeneralIconProps"
611
+ },
612
+ {
613
+ "name": "faded",
614
+ "type": "boolean"
590
615
  }
591
616
  ],
592
617
  "events": [
@@ -626,6 +651,15 @@
626
651
  "name": "selected",
627
652
  "description": "是否选中",
628
653
  "type": "boolean"
654
+ },
655
+ {
656
+ "name": "icon",
657
+ "attribute": false,
658
+ "type": "GeneralIconProps"
659
+ },
660
+ {
661
+ "name": "faded",
662
+ "type": "boolean"
629
663
  }
630
664
  ],
631
665
  "events": [
package/dist/types.json CHANGED
@@ -4,59 +4,6 @@
4
4
  "events": [],
5
5
  "methods": []
6
6
  },
7
- "eo-app-bar-wrapper": {
8
- "properties": [
9
- {
10
- "name": "isFixed",
11
- "annotation": {
12
- "type": "keyword",
13
- "value": "boolean"
14
- }
15
- },
16
- {
17
- "name": "position",
18
- "annotation": {
19
- "type": "union",
20
- "types": [
21
- {
22
- "type": "jsLiteral",
23
- "value": "static"
24
- },
25
- {
26
- "type": "jsLiteral",
27
- "value": "fixed"
28
- }
29
- ]
30
- }
31
- },
32
- {
33
- "name": "displayCenter",
34
- "annotation": {
35
- "type": "keyword",
36
- "value": "boolean"
37
- }
38
- },
39
- {
40
- "name": "extraAppBarContentStyle",
41
- "annotation": {
42
- "type": "reference",
43
- "typeName": {
44
- "type": "qualifiedName",
45
- "left": {
46
- "type": "identifier",
47
- "name": "React"
48
- },
49
- "right": {
50
- "type": "identifier",
51
- "name": "CSSProperties"
52
- }
53
- }
54
- }
55
- }
56
- ],
57
- "events": [],
58
- "methods": []
59
- },
60
7
  "eo-frame-breadcrumb": {
61
8
  "properties": [
62
9
  {
@@ -145,6 +92,59 @@
145
92
  }
146
93
  ]
147
94
  },
95
+ "eo-app-bar-wrapper": {
96
+ "properties": [
97
+ {
98
+ "name": "isFixed",
99
+ "annotation": {
100
+ "type": "keyword",
101
+ "value": "boolean"
102
+ }
103
+ },
104
+ {
105
+ "name": "position",
106
+ "annotation": {
107
+ "type": "union",
108
+ "types": [
109
+ {
110
+ "type": "jsLiteral",
111
+ "value": "static"
112
+ },
113
+ {
114
+ "type": "jsLiteral",
115
+ "value": "fixed"
116
+ }
117
+ ]
118
+ }
119
+ },
120
+ {
121
+ "name": "displayCenter",
122
+ "annotation": {
123
+ "type": "keyword",
124
+ "value": "boolean"
125
+ }
126
+ },
127
+ {
128
+ "name": "extraAppBarContentStyle",
129
+ "annotation": {
130
+ "type": "reference",
131
+ "typeName": {
132
+ "type": "qualifiedName",
133
+ "left": {
134
+ "type": "identifier",
135
+ "name": "React"
136
+ },
137
+ "right": {
138
+ "type": "identifier",
139
+ "name": "CSSProperties"
140
+ }
141
+ }
142
+ }
143
+ }
144
+ ],
145
+ "events": [],
146
+ "methods": []
147
+ },
148
148
  "eo-sidebar-menu-item": {
149
149
  "properties": [
150
150
  {
@@ -672,6 +672,23 @@
672
672
  "type": "keyword",
673
673
  "value": "boolean"
674
674
  }
675
+ },
676
+ {
677
+ "name": "icon",
678
+ "annotation": {
679
+ "type": "reference",
680
+ "typeName": {
681
+ "type": "identifier",
682
+ "name": "GeneralIconProps"
683
+ }
684
+ }
685
+ },
686
+ {
687
+ "name": "faded",
688
+ "annotation": {
689
+ "type": "keyword",
690
+ "value": "boolean"
691
+ }
675
692
  }
676
693
  ],
677
694
  "events": [
@@ -857,6 +874,23 @@
857
874
  "type": "keyword",
858
875
  "value": "boolean"
859
876
  }
877
+ },
878
+ {
879
+ "name": "icon",
880
+ "annotation": {
881
+ "type": "reference",
882
+ "typeName": {
883
+ "type": "identifier",
884
+ "name": "GeneralIconProps"
885
+ }
886
+ }
887
+ },
888
+ {
889
+ "name": "faded",
890
+ "annotation": {
891
+ "type": "keyword",
892
+ "value": "boolean"
893
+ }
860
894
  }
861
895
  ],
862
896
  "events": [
@@ -1003,6 +1037,13 @@
1003
1037
  "value": "string"
1004
1038
  }
1005
1039
  },
1040
+ {
1041
+ "name": "internalNodeSelectable",
1042
+ "annotation": {
1043
+ "type": "keyword",
1044
+ "value": "boolean"
1045
+ }
1046
+ },
1006
1047
  {
1007
1048
  "name": "searchable",
1008
1049
  "annotation": {
@@ -1045,24 +1086,11 @@
1045
1086
  {
1046
1087
  "name": "suffixBrick",
1047
1088
  "annotation": {
1048
- "type": "typeLiteral",
1049
- "members": [
1050
- {
1051
- "type": "propertySignature",
1052
- "key": {
1053
- "type": "identifier",
1054
- "name": "useBrick"
1055
- },
1056
- "annotation": {
1057
- "type": "reference",
1058
- "typeName": {
1059
- "type": "identifier",
1060
- "name": "UseBrickConf"
1061
- }
1062
- },
1063
- "computed": false
1064
- }
1065
- ]
1089
+ "type": "reference",
1090
+ "typeName": {
1091
+ "type": "identifier",
1092
+ "name": "SuffixBrickConf"
1093
+ }
1066
1094
  }
1067
1095
  },
1068
1096
  {
@@ -1214,6 +1242,35 @@
1214
1242
  },
1215
1243
  "computed": false
1216
1244
  },
1245
+ {
1246
+ "type": "propertySignature",
1247
+ "key": {
1248
+ "type": "identifier",
1249
+ "name": "icon"
1250
+ },
1251
+ "annotation": {
1252
+ "type": "reference",
1253
+ "typeName": {
1254
+ "type": "identifier",
1255
+ "name": "GeneralIconProps"
1256
+ }
1257
+ },
1258
+ "optional": true,
1259
+ "computed": false
1260
+ },
1261
+ {
1262
+ "type": "propertySignature",
1263
+ "key": {
1264
+ "type": "identifier",
1265
+ "name": "faded"
1266
+ },
1267
+ "annotation": {
1268
+ "type": "keyword",
1269
+ "value": "boolean"
1270
+ },
1271
+ "optional": true,
1272
+ "computed": false
1273
+ },
1217
1274
  {
1218
1275
  "type": "propertySignature",
1219
1276
  "key": {
@@ -1250,6 +1307,50 @@
1250
1307
  }
1251
1308
  ]
1252
1309
  },
1310
+ {
1311
+ "type": "interface",
1312
+ "name": "SuffixBrickConf",
1313
+ "body": [
1314
+ {
1315
+ "type": "propertySignature",
1316
+ "key": {
1317
+ "type": "identifier",
1318
+ "name": "when"
1319
+ },
1320
+ "annotation": {
1321
+ "type": "union",
1322
+ "types": [
1323
+ {
1324
+ "type": "jsLiteral",
1325
+ "value": "always"
1326
+ },
1327
+ {
1328
+ "type": "jsLiteral",
1329
+ "value": "hover"
1330
+ }
1331
+ ]
1332
+ },
1333
+ "optional": true,
1334
+ "computed": false,
1335
+ "description": ""
1336
+ },
1337
+ {
1338
+ "type": "propertySignature",
1339
+ "key": {
1340
+ "type": "identifier",
1341
+ "name": "useBrick"
1342
+ },
1343
+ "annotation": {
1344
+ "type": "reference",
1345
+ "typeName": {
1346
+ "type": "identifier",
1347
+ "name": "UseBrickConf"
1348
+ }
1349
+ },
1350
+ "computed": false
1351
+ }
1352
+ ]
1353
+ },
1253
1354
  {
1254
1355
  "type": "interface",
1255
1356
  "name": "NodeData",
@@ -1324,6 +1425,29 @@
1324
1425
  }
1325
1426
  }
1326
1427
  }
1428
+ },
1429
+ {
1430
+ "name": "variant",
1431
+ "annotation": {
1432
+ "type": "union",
1433
+ "types": [
1434
+ {
1435
+ "type": "jsLiteral",
1436
+ "value": "launchpad-config"
1437
+ },
1438
+ {
1439
+ "type": "jsLiteral",
1440
+ "value": "menu-config"
1441
+ }
1442
+ ]
1443
+ }
1444
+ },
1445
+ {
1446
+ "name": "urlTemplate",
1447
+ "annotation": {
1448
+ "type": "keyword",
1449
+ "value": "string"
1450
+ }
1327
1451
  }
1328
1452
  ],
1329
1453
  "events": [
@@ -1,9 +1,9 @@
1
- import { UseBrickConf } from "@next-core/types";
2
1
  import React from "react";
3
- import { NodeData } from ".";
2
+ import type { NodeData, SuffixBrickConf } from ".";
4
3
  export interface ContextOfDirectoryTree {
5
4
  expandedKeysSet: Set<string>;
6
5
  selectedKeysSet: Set<string>;
6
+ internalNodeSelectable?: boolean;
7
7
  onExpand: (data: {
8
8
  keys: string[];
9
9
  node: NodeData;
@@ -12,9 +12,7 @@ export interface ContextOfDirectoryTree {
12
12
  keys: string[];
13
13
  node: NodeData;
14
14
  }) => void;
15
- suffixBrick?: {
16
- useBrick: UseBrickConf;
17
- };
15
+ suffixBrick?: SuffixBrickConf;
18
16
  }
19
17
  export declare const DirectoryTreeContext: React.Context<ContextOfDirectoryTree>;
20
18
  export declare const useDirectoryTreeContext: () => ContextOfDirectoryTree;