@next-bricks/nav 1.16.1 → 1.17.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 (85) hide show
  1. package/dist/bricks.json +21 -20
  2. package/dist/chunks/1477.2ae768b8.js +2 -0
  3. package/dist/chunks/1477.2ae768b8.js.map +1 -0
  4. package/dist/chunks/{1491.97fa1ded.js → 1491.5bd4248e.js} +3 -3
  5. package/dist/chunks/1491.5bd4248e.js.map +1 -0
  6. package/dist/chunks/2133.d6ec3359.js +2 -0
  7. package/dist/chunks/{2133.49a735c2.js.map → 2133.d6ec3359.js.map} +1 -1
  8. package/dist/chunks/{2252.ea991945.js → 2252.208774a8.js} +3 -3
  9. package/dist/chunks/{2252.ea991945.js.map → 2252.208774a8.js.map} +1 -1
  10. package/dist/chunks/{4837.129ff052.js → 4837.f51d340b.js} +2 -2
  11. package/dist/chunks/{4837.129ff052.js.map → 4837.f51d340b.js.map} +1 -1
  12. package/dist/chunks/6595.6d0368b4.js +2 -0
  13. package/dist/chunks/{6595.f55f1474.js.map → 6595.6d0368b4.js.map} +1 -1
  14. package/dist/chunks/{7218.5a7eb066.js → 7218.c7dcfb02.js} +2 -2
  15. package/dist/chunks/{7218.5a7eb066.js.map → 7218.c7dcfb02.js.map} +1 -1
  16. package/dist/chunks/{8518.cadb4ae4.js → 8518.ac8f53a7.js} +2 -2
  17. package/dist/chunks/{8518.cadb4ae4.js.map → 8518.ac8f53a7.js.map} +1 -1
  18. package/dist/chunks/{9149.5afa9dc4.js → 9149.f74e24da.js} +2 -2
  19. package/dist/chunks/{9149.5afa9dc4.js.map → 9149.f74e24da.js.map} +1 -1
  20. package/dist/chunks/easyops-navbar-alerts.59e43685.js +2 -0
  21. package/dist/chunks/{easyops-navbar-alerts.f058179c.js.map → easyops-navbar-alerts.59e43685.js.map} +1 -1
  22. package/dist/chunks/{eo-directory-tree.4eb89def.js → eo-directory-tree.6c753652.js} +3 -3
  23. package/dist/chunks/{eo-directory-tree.4eb89def.js.map → eo-directory-tree.6c753652.js.map} +1 -1
  24. package/dist/chunks/{eo-directory.173acb10.js → eo-directory.981564a4.js} +3 -3
  25. package/dist/chunks/{eo-directory.173acb10.js.map → eo-directory.981564a4.js.map} +1 -1
  26. package/dist/chunks/{eo-frame-breadcrumb.10dc9e7c.js → eo-frame-breadcrumb.43f2d2ef.js} +2 -2
  27. package/dist/chunks/{eo-frame-breadcrumb.10dc9e7c.js.map → eo-frame-breadcrumb.43f2d2ef.js.map} +1 -1
  28. package/dist/chunks/{eo-launchpad-button-v2.4f0d4076.js → eo-launchpad-button-v2.741943e0.js} +3 -3
  29. package/dist/chunks/{eo-launchpad-button-v2.4f0d4076.js.map → eo-launchpad-button-v2.741943e0.js.map} +1 -1
  30. package/dist/chunks/{eo-nav-menu.a17bd52a.js → eo-nav-menu.2c67b500.js} +2 -2
  31. package/dist/chunks/{eo-nav-menu.a17bd52a.js.map → eo-nav-menu.2c67b500.js.map} +1 -1
  32. package/dist/chunks/{eo-sidebar-menu-group.19c9b720.js → eo-sidebar-menu-group.bf48e0b6.js} +3 -3
  33. package/dist/chunks/{eo-sidebar-menu-group.19c9b720.js.map → eo-sidebar-menu-group.bf48e0b6.js.map} +1 -1
  34. package/dist/chunks/{eo-sidebar-menu-submenu.c0afedee.js → eo-sidebar-menu-submenu.a5a7b759.js} +3 -3
  35. package/dist/chunks/{eo-sidebar-menu-submenu.c0afedee.js.map → eo-sidebar-menu-submenu.a5a7b759.js.map} +1 -1
  36. package/dist/chunks/{eo-sidebar-menu.2e1bf36a.js → eo-sidebar-menu.823ac225.js} +2 -2
  37. package/dist/chunks/{eo-sidebar-menu.2e1bf36a.js.map → eo-sidebar-menu.823ac225.js.map} +1 -1
  38. package/dist/chunks/{eo-sidebar-sub-menu.3963d157.js → eo-sidebar-sub-menu.b40e39af.js} +3 -3
  39. package/dist/chunks/{eo-sidebar-sub-menu.3963d157.js.map → eo-sidebar-sub-menu.b40e39af.js.map} +1 -1
  40. package/dist/chunks/{eo-sidebar.cfbcaab8.js → eo-sidebar.facc5198.js} +3 -3
  41. package/dist/chunks/{eo-sidebar.cfbcaab8.js.map → eo-sidebar.facc5198.js.map} +1 -1
  42. package/dist/chunks/get-menu-config-tree.b334456f.js +2 -0
  43. package/dist/chunks/get-menu-config-tree.b334456f.js.map +1 -0
  44. package/dist/chunks/launchpad-config.e132d755.js +3 -0
  45. package/dist/chunks/launchpad-config.e132d755.js.map +1 -0
  46. package/dist/chunks/main.44f3e869.js +2 -0
  47. package/dist/chunks/main.44f3e869.js.map +1 -0
  48. package/dist/chunks/{nav-logo.ddf8ef91.js → nav-logo.69ab541c.js} +2 -2
  49. package/dist/chunks/{nav-logo.ddf8ef91.js.map → nav-logo.69ab541c.js.map} +1 -1
  50. package/dist/chunks/{poll-announce.10652f30.js → poll-announce.4f643769.js} +3 -3
  51. package/dist/chunks/{poll-announce.10652f30.js.map → poll-announce.4f643769.js.map} +1 -1
  52. package/dist/examples.json +3 -3
  53. package/dist/index.7404ba67.js +2 -0
  54. package/dist/index.7404ba67.js.map +1 -0
  55. package/dist/manifest.json +43 -33
  56. package/dist/types.json +406 -23
  57. package/dist-types/bootstrap.d.ts +1 -0
  58. package/dist-types/data-providers/get-menu-config-tree.d.ts +40 -0
  59. package/dist-types/data-providers/get-menu-config-tree.spec.d.ts +1 -0
  60. package/dist-types/launchpad-config/MenuGroup.d.ts +5 -2
  61. package/dist-types/launchpad-config/index.d.ts +11 -2
  62. package/package.json +3 -3
  63. package/dist/chunks/1491.97fa1ded.js.map +0 -1
  64. package/dist/chunks/2133.49a735c2.js +0 -2
  65. package/dist/chunks/6595.f55f1474.js +0 -2
  66. package/dist/chunks/884.18f6ab5d.js +0 -2
  67. package/dist/chunks/884.18f6ab5d.js.map +0 -1
  68. package/dist/chunks/easyops-navbar-alerts.f058179c.js +0 -2
  69. package/dist/chunks/launchpad-config.89accc46.js +0 -3
  70. package/dist/chunks/launchpad-config.89accc46.js.map +0 -1
  71. package/dist/chunks/main.2cb469ea.js +0 -2
  72. package/dist/chunks/main.2cb469ea.js.map +0 -1
  73. package/dist/index.0dbadda1.js +0 -2
  74. package/dist/index.0dbadda1.js.map +0 -1
  75. /package/dist/chunks/{1491.97fa1ded.js.LICENSE.txt → 1491.5bd4248e.js.LICENSE.txt} +0 -0
  76. /package/dist/chunks/{2252.ea991945.js.LICENSE.txt → 2252.208774a8.js.LICENSE.txt} +0 -0
  77. /package/dist/chunks/{eo-directory-tree.4eb89def.js.LICENSE.txt → eo-directory-tree.6c753652.js.LICENSE.txt} +0 -0
  78. /package/dist/chunks/{eo-directory.173acb10.js.LICENSE.txt → eo-directory.981564a4.js.LICENSE.txt} +0 -0
  79. /package/dist/chunks/{eo-launchpad-button-v2.4f0d4076.js.LICENSE.txt → eo-launchpad-button-v2.741943e0.js.LICENSE.txt} +0 -0
  80. /package/dist/chunks/{eo-sidebar-menu-group.19c9b720.js.LICENSE.txt → eo-sidebar-menu-group.bf48e0b6.js.LICENSE.txt} +0 -0
  81. /package/dist/chunks/{eo-sidebar-menu-submenu.c0afedee.js.LICENSE.txt → eo-sidebar-menu-submenu.a5a7b759.js.LICENSE.txt} +0 -0
  82. /package/dist/chunks/{eo-sidebar-sub-menu.3963d157.js.LICENSE.txt → eo-sidebar-sub-menu.b40e39af.js.LICENSE.txt} +0 -0
  83. /package/dist/chunks/{eo-sidebar.cfbcaab8.js.LICENSE.txt → eo-sidebar.facc5198.js.LICENSE.txt} +0 -0
  84. /package/dist/chunks/{launchpad-config.89accc46.js.LICENSE.txt → launchpad-config.e132d755.js.LICENSE.txt} +0 -0
  85. /package/dist/chunks/{poll-announce.10652f30.js.LICENSE.txt → poll-announce.4f643769.js.LICENSE.txt} +0 -0
@@ -3,6 +3,16 @@
3
3
  "package": "@next-bricks/nav",
4
4
  "name": "nav",
5
5
  "bricks": [
6
+ {
7
+ "name": "eo-launchpad-button",
8
+ "properties": [],
9
+ "events": [],
10
+ "slots": [],
11
+ "methods": [],
12
+ "parts": [],
13
+ "description": "Launchpad 按钮构件",
14
+ "insider": true
15
+ },
6
16
  {
7
17
  "name": "eo-nav-menu",
8
18
  "properties": [
@@ -31,23 +41,13 @@
31
41
  "category": "navigation"
32
42
  },
33
43
  {
34
- "name": "eo-launchpad-button-v2",
35
- "properties": [],
36
- "events": [],
37
- "slots": [],
38
- "methods": [],
39
- "parts": [],
40
- "description": "构件 `eo-launchpad-button-v2`",
41
- "insider": true
42
- },
43
- {
44
- "name": "eo-launchpad-button",
44
+ "name": "nav.easyops-navbar-alerts",
45
45
  "properties": [],
46
46
  "events": [],
47
47
  "slots": [],
48
48
  "methods": [],
49
49
  "parts": [],
50
- "description": "Launchpad 按钮构件",
50
+ "description": "构件 `nav.easyops-navbar-alerts`",
51
51
  "insider": true
52
52
  },
53
53
  {
@@ -71,7 +71,12 @@
71
71
  },
72
72
  {
73
73
  "name": "urlTemplate",
74
- "description": "菜单项链接模板,例如可配置为 `/app/{{ id }}`。\n\n注:仅用于 variant: \"menu-config\"。",
74
+ "description": "菜单项 APP 类型的链接模板,例如可配置为 `/app/{{ id }}`。\n\n注:仅用于 variant: \"menu-config\"。",
75
+ "type": "string"
76
+ },
77
+ {
78
+ "name": "customUrlTemplate",
79
+ "description": "菜单项自定义类型的链接模板,例如可配置为 `/custom?url={{ __pathname }}`。\n\n注:仅用于 variant: \"menu-config\"。\n 外链菜单链接会设置为禁用。\n `__pathname` 是运行时变量,表示 url 解析后的 pathname。",
75
80
  "type": "string"
76
81
  }
77
82
  ],
@@ -89,16 +94,6 @@
89
94
  "description": "进行 Launchpad 配置。\n\n也可用于菜单自定义显示产品功能清单。",
90
95
  "insider": true
91
96
  },
92
- {
93
- "name": "nav.easyops-navbar-alerts",
94
- "properties": [],
95
- "events": [],
96
- "slots": [],
97
- "methods": [],
98
- "parts": [],
99
- "description": "构件 `nav.easyops-navbar-alerts`",
100
- "insider": true
101
- },
102
97
  {
103
98
  "name": "eo-launchpad-quick-access",
104
99
  "properties": [
@@ -346,6 +341,16 @@
346
341
  "description": "侧栏菜单子菜单",
347
342
  "category": "navigation"
348
343
  },
344
+ {
345
+ "name": "eo-launchpad-button-v2",
346
+ "properties": [],
347
+ "events": [],
348
+ "slots": [],
349
+ "methods": [],
350
+ "parts": [],
351
+ "description": "构件 `eo-launchpad-button-v2`",
352
+ "insider": true
353
+ },
349
354
  {
350
355
  "name": "eo-sidebar-menu",
351
356
  "properties": [
@@ -684,6 +689,15 @@
684
689
  "parts": [],
685
690
  "description": "目录树节点节点"
686
691
  },
692
+ {
693
+ "name": "nav.nav-logo",
694
+ "properties": [],
695
+ "events": [],
696
+ "slots": [],
697
+ "methods": [],
698
+ "parts": [],
699
+ "description": "导航栏图标"
700
+ },
687
701
  {
688
702
  "name": "nav.poll-announce",
689
703
  "properties": [
@@ -719,16 +733,12 @@
719
733
  "methods": [],
720
734
  "parts": [],
721
735
  "description": "轮询获取通知消息并展示。\n\n 从 v2 构件 `nav-legacy.poll-announce` 迁移而来"
722
- },
723
- {
724
- "name": "nav.nav-logo",
725
- "properties": [],
726
- "events": [],
727
- "slots": [],
728
- "methods": [],
729
- "parts": [],
730
- "description": "导航栏图标"
731
736
  }
732
737
  ],
733
- "providers": []
738
+ "providers": [
739
+ {
740
+ "name": "nav.get-menu-config-tree",
741
+ "description": "构造用于菜单自定义的树形结构数据。"
742
+ }
743
+ ]
734
744
  }
package/dist/types.json CHANGED
@@ -564,6 +564,382 @@
564
564
  "events": [],
565
565
  "methods": []
566
566
  },
567
+ "nav.get-menu-config-tree": {
568
+ "type": "provider",
569
+ "params": [
570
+ {
571
+ "name": "menuList",
572
+ "annotation": {
573
+ "type": "array",
574
+ "elementType": {
575
+ "type": "reference",
576
+ "typeName": {
577
+ "type": "identifier",
578
+ "name": "MenuRawData"
579
+ }
580
+ }
581
+ }
582
+ }
583
+ ],
584
+ "returns": {
585
+ "annotation": {
586
+ "type": "reference",
587
+ "typeName": {
588
+ "type": "identifier",
589
+ "name": "Promise"
590
+ },
591
+ "typeParameters": {
592
+ "type": "typeParameterInstantiation",
593
+ "params": [
594
+ {
595
+ "type": "array",
596
+ "elementType": {
597
+ "type": "reference",
598
+ "typeName": {
599
+ "type": "identifier",
600
+ "name": "TreeNode"
601
+ }
602
+ }
603
+ }
604
+ ]
605
+ }
606
+ }
607
+ },
608
+ "types": [
609
+ {
610
+ "type": "interface",
611
+ "name": "MenuRawData",
612
+ "body": [
613
+ {
614
+ "type": "propertySignature",
615
+ "key": {
616
+ "type": "identifier",
617
+ "name": "menuId"
618
+ },
619
+ "annotation": {
620
+ "type": "keyword",
621
+ "value": "string"
622
+ },
623
+ "computed": false
624
+ },
625
+ {
626
+ "type": "propertySignature",
627
+ "key": {
628
+ "type": "identifier",
629
+ "name": "title"
630
+ },
631
+ "annotation": {
632
+ "type": "keyword",
633
+ "value": "string"
634
+ },
635
+ "computed": false
636
+ },
637
+ {
638
+ "type": "propertySignature",
639
+ "key": {
640
+ "type": "identifier",
641
+ "name": "icon"
642
+ },
643
+ "annotation": {
644
+ "type": "keyword",
645
+ "value": "unknown"
646
+ },
647
+ "optional": true,
648
+ "computed": false
649
+ },
650
+ {
651
+ "type": "propertySignature",
652
+ "key": {
653
+ "type": "identifier",
654
+ "name": "type"
655
+ },
656
+ "annotation": {
657
+ "type": "union",
658
+ "types": [
659
+ {
660
+ "type": "jsLiteral",
661
+ "value": "main"
662
+ },
663
+ {
664
+ "type": "jsLiteral",
665
+ "value": "inject"
666
+ }
667
+ ]
668
+ },
669
+ "optional": true,
670
+ "computed": false
671
+ },
672
+ {
673
+ "type": "propertySignature",
674
+ "key": {
675
+ "type": "identifier",
676
+ "name": "injectMenuGroupId"
677
+ },
678
+ "annotation": {
679
+ "type": "keyword",
680
+ "value": "string"
681
+ },
682
+ "optional": true,
683
+ "computed": false
684
+ },
685
+ {
686
+ "type": "propertySignature",
687
+ "key": {
688
+ "type": "identifier",
689
+ "name": "dynamicItems"
690
+ },
691
+ "annotation": {
692
+ "type": "keyword",
693
+ "value": "boolean"
694
+ },
695
+ "optional": true,
696
+ "computed": false
697
+ },
698
+ {
699
+ "type": "propertySignature",
700
+ "key": {
701
+ "type": "identifier",
702
+ "name": "itemsResolve"
703
+ },
704
+ "annotation": {
705
+ "type": "keyword",
706
+ "value": "unknown"
707
+ },
708
+ "optional": true,
709
+ "computed": false
710
+ },
711
+ {
712
+ "type": "propertySignature",
713
+ "key": {
714
+ "type": "identifier",
715
+ "name": "items"
716
+ },
717
+ "annotation": {
718
+ "type": "array",
719
+ "elementType": {
720
+ "type": "reference",
721
+ "typeName": {
722
+ "type": "identifier",
723
+ "name": "MenuItemRawData"
724
+ }
725
+ }
726
+ },
727
+ "optional": true,
728
+ "computed": false
729
+ }
730
+ ]
731
+ },
732
+ {
733
+ "type": "interface",
734
+ "name": "MenuItemRawData",
735
+ "body": [
736
+ {
737
+ "type": "propertySignature",
738
+ "key": {
739
+ "type": "identifier",
740
+ "name": "text"
741
+ },
742
+ "annotation": {
743
+ "type": "keyword",
744
+ "value": "string"
745
+ },
746
+ "computed": false,
747
+ "description": "菜单项文本。"
748
+ },
749
+ {
750
+ "type": "propertySignature",
751
+ "key": {
752
+ "type": "identifier",
753
+ "name": "icon"
754
+ },
755
+ "annotation": {
756
+ "type": "keyword",
757
+ "value": "unknown"
758
+ },
759
+ "optional": true,
760
+ "computed": false
761
+ },
762
+ {
763
+ "type": "propertySignature",
764
+ "key": {
765
+ "type": "identifier",
766
+ "name": "sort"
767
+ },
768
+ "annotation": {
769
+ "type": "keyword",
770
+ "value": "number"
771
+ },
772
+ "optional": true,
773
+ "computed": false
774
+ },
775
+ {
776
+ "type": "propertySignature",
777
+ "key": {
778
+ "type": "identifier",
779
+ "name": "groupId"
780
+ },
781
+ "annotation": {
782
+ "type": "keyword",
783
+ "value": "string"
784
+ },
785
+ "optional": true,
786
+ "computed": false
787
+ },
788
+ {
789
+ "type": "propertySignature",
790
+ "key": {
791
+ "type": "identifier",
792
+ "name": "hidden"
793
+ },
794
+ "annotation": {
795
+ "type": "keyword",
796
+ "value": "boolean"
797
+ },
798
+ "optional": true,
799
+ "computed": false
800
+ },
801
+ {
802
+ "type": "propertySignature",
803
+ "key": {
804
+ "type": "identifier",
805
+ "name": "children"
806
+ },
807
+ "annotation": {
808
+ "type": "array",
809
+ "elementType": {
810
+ "type": "reference",
811
+ "typeName": {
812
+ "type": "identifier",
813
+ "name": "MenuItemRawData"
814
+ }
815
+ }
816
+ },
817
+ "optional": true,
818
+ "computed": false
819
+ }
820
+ ]
821
+ },
822
+ {
823
+ "type": "interface",
824
+ "name": "TreeNode",
825
+ "body": [
826
+ {
827
+ "type": "propertySignature",
828
+ "key": {
829
+ "type": "identifier",
830
+ "name": "key"
831
+ },
832
+ "annotation": {
833
+ "type": "keyword",
834
+ "value": "string"
835
+ },
836
+ "computed": false
837
+ },
838
+ {
839
+ "type": "propertySignature",
840
+ "key": {
841
+ "type": "identifier",
842
+ "name": "title"
843
+ },
844
+ "annotation": {
845
+ "type": "keyword",
846
+ "value": "string"
847
+ },
848
+ "computed": false
849
+ },
850
+ {
851
+ "type": "propertySignature",
852
+ "key": {
853
+ "type": "identifier",
854
+ "name": "icon"
855
+ },
856
+ "annotation": {
857
+ "type": "keyword",
858
+ "value": "unknown"
859
+ },
860
+ "optional": true,
861
+ "computed": false
862
+ },
863
+ {
864
+ "type": "propertySignature",
865
+ "key": {
866
+ "type": "identifier",
867
+ "name": "faded"
868
+ },
869
+ "annotation": {
870
+ "type": "keyword",
871
+ "value": "unknown"
872
+ },
873
+ "optional": true,
874
+ "computed": false
875
+ },
876
+ {
877
+ "type": "propertySignature",
878
+ "key": {
879
+ "type": "identifier",
880
+ "name": "children"
881
+ },
882
+ "annotation": {
883
+ "type": "array",
884
+ "elementType": {
885
+ "type": "reference",
886
+ "typeName": {
887
+ "type": "identifier",
888
+ "name": "TreeNode"
889
+ }
890
+ }
891
+ },
892
+ "optional": true,
893
+ "computed": false
894
+ },
895
+ {
896
+ "type": "propertySignature",
897
+ "key": {
898
+ "type": "identifier",
899
+ "name": "data"
900
+ },
901
+ "annotation": {
902
+ "type": "union",
903
+ "types": [
904
+ {
905
+ "type": "reference",
906
+ "typeName": {
907
+ "type": "identifier",
908
+ "name": "MenuRawData"
909
+ }
910
+ },
911
+ {
912
+ "type": "reference",
913
+ "typeName": {
914
+ "type": "identifier",
915
+ "name": "MenuItemRawData"
916
+ }
917
+ }
918
+ ]
919
+ },
920
+ "computed": false
921
+ },
922
+ {
923
+ "type": "propertySignature",
924
+ "key": {
925
+ "type": "identifier",
926
+ "name": "__keys"
927
+ },
928
+ "annotation": {
929
+ "type": "array",
930
+ "elementType": {
931
+ "type": "keyword",
932
+ "value": "string"
933
+ }
934
+ },
935
+ "optional": true,
936
+ "computed": false,
937
+ "description": "第一个节点额外返回 __keys,包含所有节点的 key"
938
+ }
939
+ ]
940
+ }
941
+ ]
942
+ },
567
943
  "eo-search-launchpad": {
568
944
  "properties": [
569
945
  {
@@ -992,29 +1368,6 @@
992
1368
  }
993
1369
  ]
994
1370
  },
995
- "eo-launchpad-quick-access": {
996
- "properties": [
997
- {
998
- "name": "readonly",
999
- "annotation": {
1000
- "type": "keyword",
1001
- "value": "boolean"
1002
- }
1003
- },
1004
- {
1005
- "name": "target",
1006
- "annotation": {
1007
- "type": "reference",
1008
- "typeName": {
1009
- "type": "identifier",
1010
- "name": "Target"
1011
- }
1012
- }
1013
- }
1014
- ],
1015
- "events": [],
1016
- "methods": []
1017
- },
1018
1371
  "eo-directory-tree": {
1019
1372
  "properties": [
1020
1373
  {
@@ -1448,6 +1801,13 @@
1448
1801
  "type": "keyword",
1449
1802
  "value": "string"
1450
1803
  }
1804
+ },
1805
+ {
1806
+ "name": "customUrlTemplate",
1807
+ "annotation": {
1808
+ "type": "keyword",
1809
+ "value": "string"
1810
+ }
1451
1811
  }
1452
1812
  ],
1453
1813
  "events": [
@@ -2021,6 +2381,29 @@
2021
2381
  "events": [],
2022
2382
  "methods": []
2023
2383
  },
2384
+ "eo-launchpad-quick-access": {
2385
+ "properties": [
2386
+ {
2387
+ "name": "readonly",
2388
+ "annotation": {
2389
+ "type": "keyword",
2390
+ "value": "boolean"
2391
+ }
2392
+ },
2393
+ {
2394
+ "name": "target",
2395
+ "annotation": {
2396
+ "type": "reference",
2397
+ "typeName": {
2398
+ "type": "identifier",
2399
+ "name": "Target"
2400
+ }
2401
+ }
2402
+ }
2403
+ ],
2404
+ "events": [],
2405
+ "methods": []
2406
+ },
2024
2407
  "eo-launchpad-button-v2": {
2025
2408
  "properties": [],
2026
2409
  "events": [],
@@ -20,3 +20,4 @@ import "./directory-tree/directory-tree-leaf/index.js";
20
20
  import "./directory-tree/directory-tree-internal-node/index.js";
21
21
  import "./nav-logo/index.js";
22
22
  import "./poll-announce/index.js";
23
+ import "./data-providers/get-menu-config-tree.js";
@@ -0,0 +1,40 @@
1
+ /** 原始菜单数据。 */
2
+ export interface MenuRawData {
3
+ menuId: string;
4
+ title: string;
5
+ icon?: unknown;
6
+ type?: "main" | "inject";
7
+ injectMenuGroupId?: string;
8
+ dynamicItems?: boolean;
9
+ itemsResolve?: unknown;
10
+ items?: MenuItemRawData[];
11
+ }
12
+ /** 原始菜单项数据。 */
13
+ export type MenuItemRawData = {
14
+ /** 菜单项文本。 */
15
+ text: string;
16
+ icon?: unknown;
17
+ sort?: number;
18
+ groupId?: string;
19
+ hidden?: boolean;
20
+ children?: MenuItemRawData[];
21
+ };
22
+ export interface TitleDataSource {
23
+ objectId: string;
24
+ instanceId: string;
25
+ attributeId?: string;
26
+ }
27
+ export interface TreeNode {
28
+ key: string;
29
+ title: string;
30
+ icon?: unknown;
31
+ faded?: unknown;
32
+ children?: TreeNode[];
33
+ data: MenuRawData | MenuItemRawData;
34
+ /** 第一个节点额外返回 __keys,包含所有节点的 key */
35
+ __keys?: string[];
36
+ }
37
+ /**
38
+ * 构造用于菜单自定义的树形结构数据。
39
+ */
40
+ export declare function getMenuConfigTree(menuList: MenuRawData[]): Promise<TreeNode[]>;
@@ -5,21 +5,24 @@ export interface MenuGroupProps {
5
5
  actions?: MenuAction[];
6
6
  variant?: "launchpad-config" | "menu-config";
7
7
  urlTemplate?: string;
8
+ customUrlTemplate?: string;
8
9
  onActionClick?: (detail: MenuActionEventDetail) => void;
9
10
  }
10
- export declare function MenuGroup({ data, actions, variant, urlTemplate, onActionClick, }: MenuGroupProps): React.JSX.Element;
11
+ export declare function MenuGroup({ data, actions, variant, urlTemplate, customUrlTemplate, onActionClick, }: MenuGroupProps): React.JSX.Element;
11
12
  export interface MenuItemProps {
12
13
  data: ConfigMenuItemNormal;
13
14
  actions?: MenuAction[];
14
15
  variant?: "launchpad-config" | "menu-config";
15
16
  urlTemplate?: string;
17
+ customUrlTemplate?: string;
16
18
  onActionClick?: (detail: MenuActionEventDetail) => void;
17
19
  }
18
- export declare function MenuItem({ data, actions, variant, urlTemplate, onActionClick, }: MenuItemProps): React.JSX.Element;
20
+ export declare function MenuItem({ data, actions, variant, urlTemplate, customUrlTemplate, onActionClick, }: MenuItemProps): React.JSX.Element;
19
21
  export interface MenuItemFolderProps {
20
22
  data: ConfigMenuItemDir;
21
23
  actions?: MenuAction[];
22
24
  variant?: "launchpad-config" | "menu-config";
23
25
  urlTemplate?: string;
26
+ customUrlTemplate?: string;
24
27
  onActionClick?: (detail: MenuActionEventDetail) => void;
25
28
  }
@@ -18,11 +18,19 @@ export declare class LaunchpadConfig extends ReactNextElement implements Launchp
18
18
  */
19
19
  accessor variant: "launchpad-config" | "menu-config" | undefined;
20
20
  /**
21
- * 菜单项链接模板,例如可配置为 `/app/{{ id }}`。
21
+ * 菜单项 APP 类型的链接模板,例如可配置为 `/app/{{ id }}`。
22
22
  *
23
23
  * 注:仅用于 variant: "menu-config"。
24
24
  */
25
25
  accessor urlTemplate: string | undefined;
26
+ /**
27
+ * 菜单项自定义类型的链接模板,例如可配置为 `/custom?url={{ __pathname }}`。
28
+ *
29
+ * 注:仅用于 variant: "menu-config"。
30
+ * 外链菜单链接会设置为禁用。
31
+ * `__pathname` 是运行时变量,表示 url 解析后的 pathname。
32
+ */
33
+ accessor customUrlTemplate: string | undefined;
26
34
  render(): React.JSX.Element;
27
35
  }
28
36
  export interface LaunchpadConfigProps {
@@ -30,6 +38,7 @@ export interface LaunchpadConfigProps {
30
38
  actions?: MenuAction[];
31
39
  variant?: "launchpad-config" | "menu-config";
32
40
  urlTemplate?: string;
41
+ customUrlTemplate?: string;
33
42
  onActionClick?: (detail: MenuActionEventDetail) => void;
34
43
  }
35
- export declare function LaunchpadConfigComponent({ menuGroups, actions, variant, urlTemplate, onActionClick, }: LaunchpadConfigProps): React.JSX.Element;
44
+ export declare function LaunchpadConfigComponent({ menuGroups, actions, variant, urlTemplate, customUrlTemplate, onActionClick, }: LaunchpadConfigProps): React.JSX.Element;