@nocobase/plugin-client 1.6.0-alpha.17 → 1.6.0-alpha.18

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 (33) hide show
  1. package/dist/client/DesktopRoutesManager.d.ts +10 -0
  2. package/dist/client/MobileRoutesManager.d.ts +10 -0
  3. package/dist/client/index.js +1 -1
  4. package/dist/client/locale/index.d.ts +12 -0
  5. package/dist/client/routesTableSchema.d.ts +1242 -0
  6. package/dist/client/useTableBlockProps.d.ts +23 -0
  7. package/dist/client/utils.d.ts +10 -0
  8. package/dist/collections/desktopRoutes.d.ts +10 -0
  9. package/dist/collections/desktopRoutes.js +420 -0
  10. package/dist/collections/mobileRoutes.d.ts +10 -0
  11. package/dist/collections/mobileRoutes.js +368 -0
  12. package/dist/externalVersion.js +10 -4
  13. package/dist/locale/en-US.js +22 -1
  14. package/dist/locale/es-ES.js +22 -1
  15. package/dist/locale/fr-FR.js +22 -1
  16. package/dist/locale/ja-JP.js +22 -1
  17. package/dist/locale/ko-KR.js +22 -1
  18. package/dist/locale/pt-BR.js +22 -1
  19. package/dist/locale/ru-RU.js +22 -1
  20. package/dist/locale/tr-TR.js +22 -1
  21. package/dist/locale/uk-UA.js +22 -1
  22. package/dist/locale/zh-CN.js +22 -1
  23. package/dist/locale/zh-TW.js +22 -1
  24. package/dist/node_modules/cronstrue/package.json +1 -1
  25. package/dist/server/collections/desktopRoutes.d.ts +10 -0
  26. package/dist/server/collections/desktopRoutes.js +44 -0
  27. package/dist/server/collections/extendRoleField.d.ts +14 -0
  28. package/dist/server/collections/extendRoleField.js +44 -0
  29. package/dist/server/migrations/2024122912211-transform-menu-schema-to-routes.d.ts +14 -0
  30. package/dist/server/migrations/2024122912211-transform-menu-schema-to-routes.js +180 -0
  31. package/dist/server/server.d.ts +6 -0
  32. package/dist/server/server.js +78 -1
  33. package/package.json +2 -2
@@ -50,6 +50,7 @@ module.exports = {
50
50
  Logo: "Logo",
51
51
  "Add menu item": "Men\xFCye \xF6\u011Fe ekle",
52
52
  Page: "Sayfa",
53
+ Tab: "Sekme",
53
54
  Name: "Ad\u0131",
54
55
  Icon: "\u0130kon",
55
56
  Group: "Grup",
@@ -591,5 +592,25 @@ module.exports = {
591
592
  "Parent object": "\xDCst nesne",
592
593
  "Ellipsis overflow content": "\xDC\xE7 nokta ile ta\u015Fan i\xE7erik",
593
594
  "Hide column": "S\xFCtunu gizle",
594
- "In configuration mode, the entire column becomes transparent. In non-configuration mode, the entire column will be hidden. Even if the entire column is hidden, its configured default values and other settings will still take effect.": "Yap\u0131land\u0131rma modunda, t\xFCm s\xFCtun tamamen saydaml\u0131k al\u0131r. Yap\u0131land\u0131rma modu olmayan durumda, t\xFCm s\xFCtun gizlenir. Tamamen s\xFCtun gizlendi\u011Finde bile, yap\u0131land\u0131r\u0131lm\u0131\u015F varsay\u0131lan de\u011Ferleri ve di\u011Fer ayarlar\u0131 h\xE2l\xE2 etkin olur."
595
+ "In configuration mode, the entire column becomes transparent. In non-configuration mode, the entire column will be hidden. Even if the entire column is hidden, its configured default values and other settings will still take effect.": "Yap\u0131land\u0131rma modunda, t\xFCm s\xFCtun tamamen saydaml\u0131k al\u0131r. Yap\u0131land\u0131rma modu olmayan durumda, t\xFCm s\xFCtun gizlenir. Tamamen s\xFCtun gizlendi\u011Finde bile, yap\u0131land\u0131r\u0131lm\u0131\u015F varsay\u0131lan de\u011Ferleri ve di\u011Fer ayarlar\u0131 h\xE2l\xE2 etkin olur.",
596
+ "Desktop routes": "Masa\xFCst\xFC rotalar",
597
+ "Route permissions": "Rota izinleri",
598
+ "New routes are allowed to be accessed by default": "Yeni rotalar varsay\u0131lan olarak eri\u015Filebilir",
599
+ "Route name": "Rota ad\u0131",
600
+ "Mobile routes": "Mobil rotalar",
601
+ "Show in menu": "Men\xFCde g\xF6ster",
602
+ "Hide in menu": "Men\xFCde gizle",
603
+ Path: "Yol",
604
+ Type: "Tip",
605
+ Access: "Eri\u015Fim",
606
+ Routes: "Rotalar",
607
+ "Add child route": "Alt rota ekle",
608
+ "Delete routes": "Rotalar\u0131 sil",
609
+ "Delete route": "Rota sil",
610
+ "Are you sure you want to hide these routes in menu?": "Bu rotalar\u0131 men\xFCde gizlemek istedi\u011Finizden emin misiniz?",
611
+ "Are you sure you want to show these routes in menu?": "Bu rotalar\u0131 men\xFCde g\xF6stermek istedi\u011Finizden emin misiniz?",
612
+ "Are you sure you want to hide this menu?": "Bu men\xFCy\xFC gizlemek istedi\u011Finizden emin misiniz?",
613
+ "After hiding, this menu will no longer appear in the menu bar. To show it again, you need to go to the route management page to configure it.": "Gizlendikten sonra, bu men\xFC art\u0131k men\xFC \xE7ubu\u011Funda g\xF6r\xFCnmeyecektir. Tekrar g\xF6r\xFCnt\xFClemek i\xE7in, y\xF6nlendirme y\xF6netimi sayfas\u0131na gidip onu yap\u0131land\u0131rman\u0131z gerekecektir.",
614
+ "If selected, the page will display Tab pages.": "Se\xE7ildi\u011Finde, sayfa Tab sayfalar\u0131n\u0131 g\xF6r\xFCnt\xFCleyecektir.",
615
+ "If selected, the route will be displayed in the menu.": "Se\xE7ildi\u011Finde, yol men\xFCde g\xF6r\xFCnt\xFClenecektir."
595
616
  };
@@ -50,6 +50,7 @@ module.exports = {
50
50
  Logo: "\u041B\u043E\u0433\u043E\u0442\u0438\u043F",
51
51
  "Add menu item": "\u0414\u043E\u0434\u0430\u0442\u0438 \u0435\u043B\u0435\u043C\u0435\u043D\u0442 \u043C\u0435\u043D\u044E",
52
52
  Page: "\u0421\u0442\u043E\u0440\u0456\u043D\u043A\u0430",
53
+ Tab: "\u0422\u0430\u0431",
53
54
  Name: "\u0406\u043C'\u044F",
54
55
  Icon: "\u0406\u043A\u043E\u043D\u043A\u0430",
55
56
  Group: "\u0413\u0440\u0443\u043F\u0430",
@@ -807,5 +808,25 @@ module.exports = {
807
808
  "Parent object": "\u0411\u0430\u0442\u044C\u043A\u0456\u0432\u0441\u044C\u043A\u0438\u0439 \u043E\u0431'\u0454\u043A\u0442",
808
809
  "Ellipsis overflow content": "\u0412\u043C\u0456\u0441\u0442 \u0437 \u0431\u0430\u0433\u0430\u0442\u043E\u043A\u0440\u0430\u043F\u043A\u043E\u044E \u043F\u0440\u0438 \u043F\u0435\u0440\u0435\u043F\u043E\u0432\u043D\u0435\u043D\u043D\u0456",
809
810
  "Hide column": "\u0421\u0445\u043E\u0432\u0430\u0442\u0438 \u0441\u0442\u043E\u0432\u043F\u0435\u0446\u044C",
810
- "In configuration mode, the entire column becomes transparent. In non-configuration mode, the entire column will be hidden. Even if the entire column is hidden, its configured default values and other settings will still take effect.": "\u0412 \u0440\u0435\u0436\u0438\u043C\u0456 \u043A\u043E\u043D\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u0457 \u0432\u0441\u044F \u043A\u043E\u043B\u043E\u043D\u043A\u0430 \u0441\u0442\u0430\u0454 \u043F\u0440\u043E\u0437\u043E\u0440\u043E\u044E. \u0412 \u0440\u0435\u0436\u0438\u043C\u0456 \u043D\u0435 \u043A\u043E\u043D\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u0457 \u0432\u0441\u044F \u043A\u043E\u043B\u043E\u043D\u043A\u0430 \u0431\u0443\u0434\u0435 \u043F\u0440\u0438\u0445\u043E\u0432\u0430\u043D\u0430. \u042F\u043A\u0449\u043E \u0432\u0441\u044F \u043A\u043E\u043B\u043E\u043D\u043A\u0430 \u0431\u0443\u0434\u0435 \u043F\u0440\u0438\u0445\u043E\u0432\u0430\u043D\u0430, \u0457\u0457 \u043D\u0430\u043B\u0430\u0448\u0442\u043E\u0432\u0430\u043D\u0456 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C \u0456 \u0456\u043D\u0448\u0456 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F \u0432\u0441\u0435 \u043E\u0434\u043D\u043E \u0431\u0443\u0434\u0443\u0442\u044C \u0434\u0456\u044F\u0442\u0438."
811
+ "In configuration mode, the entire column becomes transparent. In non-configuration mode, the entire column will be hidden. Even if the entire column is hidden, its configured default values and other settings will still take effect.": "\u0412 \u0440\u0435\u0436\u0438\u043C\u0456 \u043A\u043E\u043D\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u0457 \u0432\u0441\u044F \u043A\u043E\u043B\u043E\u043D\u043A\u0430 \u0441\u0442\u0430\u0454 \u043F\u0440\u043E\u0437\u043E\u0440\u043E\u044E. \u0412 \u0440\u0435\u0436\u0438\u043C\u0456 \u043D\u0435 \u043A\u043E\u043D\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u0457 \u0432\u0441\u044F \u043A\u043E\u043B\u043E\u043D\u043A\u0430 \u0431\u0443\u0434\u0435 \u043F\u0440\u0438\u0445\u043E\u0432\u0430\u043D\u0430. \u042F\u043A\u0449\u043E \u0432\u0441\u044F \u043A\u043E\u043B\u043E\u043D\u043A\u0430 \u0431\u0443\u0434\u0435 \u043F\u0440\u0438\u0445\u043E\u0432\u0430\u043D\u0430, \u0457\u0457 \u043D\u0430\u043B\u0430\u0448\u0442\u043E\u0432\u0430\u043D\u0456 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C \u0456 \u0456\u043D\u0448\u0456 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F \u0432\u0441\u0435 \u043E\u0434\u043D\u043E \u0431\u0443\u0434\u0443\u0442\u044C \u0434\u0456\u044F\u0442\u0438.",
812
+ "Desktop routes": "\u041C\u0430\u0440\u0448\u0440\u0443\u0442\u0438 \u0440\u043E\u0431\u043E\u0447\u043E\u0433\u043E \u0441\u0442\u043E\u043B\u0443",
813
+ "Route permissions": "\u041F\u0440\u0430\u0432\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u0443 \u0434\u043E \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u0456\u0432",
814
+ "New routes are allowed to be accessed by default": "\u041D\u043E\u0432\u0456 \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u0438 \u0434\u043E\u0437\u0432\u043E\u043B\u0435\u043D\u0456 \u0434\u043E\u0441\u0442\u0443\u043F\u0430\u0442\u0438\u0441\u044F \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C",
815
+ "Route name": "\u0406\u043C'\u044F \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u0443",
816
+ "Mobile routes": "\u041C\u043E\u0431\u0456\u043B\u044C\u043D\u0456 \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u0438",
817
+ "Show in menu": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u0432 \u043C\u0435\u043D\u044E",
818
+ "Hide in menu": "\u0421\u0445\u043E\u0432\u0430\u0442\u0438 \u0432 \u043C\u0435\u043D\u044E",
819
+ Path: "\u0428\u043B\u044F\u0445",
820
+ Type: "\u0422\u0438\u043F",
821
+ Access: "\u0414\u043E\u0441\u0442\u0443\u043F",
822
+ Routes: "\u041C\u0430\u0440\u0448\u0440\u0443\u0442\u0438",
823
+ "Add child route": "\u0414\u043E\u0434\u0430\u0442\u0438 \u0434\u043E\u0447\u0456\u0440\u043D\u0456\u0439 \u043C\u0430\u0440\u0448\u0440\u0443\u0442",
824
+ "Delete routes": "\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u0438",
825
+ "Delete route": "\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043C\u0430\u0440\u0448\u0440\u0443\u0442",
826
+ "Are you sure you want to hide these routes in menu?": "\u0412\u0438 \u0432\u043F\u0435\u0432\u043D\u0435\u043D\u0456, \u0449\u043E \u0445\u043E\u0447\u0435\u0442\u0435 \u043F\u0440\u0438\u0445\u043E\u0432\u0430\u0442\u0438 \u0446\u0456 \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u0438 \u0432 \u043C\u0435\u043D\u044E?",
827
+ "Are you sure you want to show these routes in menu?": "\u0412\u0438 \u0432\u043F\u0435\u0432\u043D\u0435\u043D\u0456, \u0449\u043E \u0445\u043E\u0447\u0435\u0442\u0435 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u0446\u0456 \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u0438 \u0432 \u043C\u0435\u043D\u044E?",
828
+ "Are you sure you want to hide this menu?": "\u0412\u0438 \u0432\u043F\u0435\u0432\u043D\u0435\u043D\u0456, \u0449\u043E \u0445\u043E\u0447\u0435\u0442\u0435 \u043F\u0440\u0438\u0445\u043E\u0432\u0430\u0442\u0438 \u0446\u0435 \u043C\u0435\u043D\u044E?",
829
+ "After hiding, this menu will no longer appear in the menu bar. To show it again, you need to go to the route management page to configure it.": "\u041F\u0456\u0441\u043B\u044F \u043F\u0440\u0438\u0445\u043E\u0432\u0443\u0432\u0430\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043C\u0435\u043D\u044E \u0432\u0456\u043D \u0431\u0456\u043B\u044C\u0448\u0435 \u043D\u0435 \u0437'\u044F\u0432\u0438\u0442\u044C\u0441\u044F \u0432 \u043C\u0435\u043D\u044E. \u0429\u043E\u0431 \u0437\u043D\u043E\u0432\u0443 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u0439\u043E\u0433\u043E, \u0432\u0430\u043C \u043F\u043E\u0442\u0440\u0456\u0431\u043D\u043E \u043F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0443 \u043A\u0435\u0440\u0443\u0432\u0430\u043D\u043D\u044F \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u043C\u0438 \u0456 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u0442\u0438 \u0439\u043E\u0433\u043E.",
830
+ "If selected, the page will display Tab pages.": "\u042F\u043A\u0449\u043E \u0432\u0438\u0431\u0440\u0430\u043D\u043E, \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430 \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0437\u0438\u0442\u044C \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0438 \u0437 \u0432\u043A\u043B\u0430\u0434\u043A\u0430\u043C\u0438.",
831
+ "If selected, the route will be displayed in the menu.": "\u042F\u043A\u0449\u043E \u0432\u0438\u0431\u0440\u0430\u043D\u043E, \u043C\u0430\u0440\u0448\u0440\u0443\u0442 \u0431\u0443\u0434\u0435 \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439 \u0432 \u043C\u0435\u043D\u044E."
811
832
  };
@@ -58,6 +58,7 @@ module.exports = {
58
58
  Logo: "Logo",
59
59
  "Add menu item": "\u6DFB\u52A0\u83DC\u5355\u9879",
60
60
  Page: "\u9875\u9762",
61
+ Tab: "\u6807\u7B7E",
61
62
  Name: "\u540D\u79F0",
62
63
  Icon: "\u56FE\u6807",
63
64
  Group: "\u5206\u7EC4",
@@ -1066,5 +1067,25 @@ module.exports = {
1066
1067
  "Show file name": "\u663E\u793A\u6587\u4EF6\u540D",
1067
1068
  Outlined: "\u7EBF\u6846\u98CE\u683C",
1068
1069
  Filled: "\u5B9E\u5E95\u98CE\u683C",
1069
- "Two tone": "\u53CC\u8272\u98CE\u683C"
1070
+ "Two tone": "\u53CC\u8272\u98CE\u683C",
1071
+ "Desktop routes": "\u684C\u9762\u7AEF\u8DEF\u7531",
1072
+ "Route permissions": "\u8DEF\u7531\u6743\u9650",
1073
+ "New routes are allowed to be accessed by default": "\u65B0\u8DEF\u7531\u9ED8\u8BA4\u5141\u8BB8\u8BBF\u95EE",
1074
+ "Route name": "\u8DEF\u7531\u540D\u79F0",
1075
+ "Mobile routes": "\u79FB\u52A8\u7AEF\u8DEF\u7531",
1076
+ "Show in menu": "\u5728\u83DC\u5355\u4E2D\u663E\u793A",
1077
+ "Hide in menu": "\u5728\u83DC\u5355\u4E2D\u9690\u85CF",
1078
+ Path: "\u8DEF\u5F84",
1079
+ Type: "\u7C7B\u578B",
1080
+ Access: "\u8BBF\u95EE",
1081
+ Routes: "\u8DEF\u7531",
1082
+ "Add child route": "\u6DFB\u52A0\u5B50\u8DEF\u7531",
1083
+ "Delete routes": "\u5220\u9664\u8DEF\u7531",
1084
+ "Delete route": "\u5220\u9664\u8DEF\u7531",
1085
+ "Are you sure you want to hide these routes in menu?": "\u4F60\u786E\u5B9A\u8981\u5728\u83DC\u5355\u4E2D\u9690\u85CF\u8FD9\u4E9B\u8DEF\u7531\u5417\uFF1F",
1086
+ "Are you sure you want to show these routes in menu?": "\u4F60\u786E\u5B9A\u8981\u5728\u83DC\u5355\u4E2D\u663E\u793A\u8FD9\u4E9B\u8DEF\u7531\u5417\uFF1F",
1087
+ "Are you sure you want to hide this menu?": "\u4F60\u786E\u5B9A\u8981\u9690\u85CF\u8FD9\u4E2A\u83DC\u5355\u5417\uFF1F",
1088
+ "After hiding, this menu will no longer appear in the menu bar. To show it again, you need to go to the route management page to configure it.": "\u9690\u85CF\u540E\uFF0C\u8FD9\u4E2A\u83DC\u5355\u5C06\u4E0D\u518D\u51FA\u73B0\u5728\u83DC\u5355\u680F\u4E2D\u3002\u8981\u518D\u6B21\u663E\u793A\u5B83\uFF0C\u4F60\u9700\u8981\u5230\u8DEF\u7531\u7BA1\u7406\u9875\u9762\u8FDB\u884C\u8BBE\u7F6E\u3002",
1089
+ "If selected, the page will display Tab pages.": "\u5982\u679C\u9009\u4E2D\uFF0C\u8BE5\u9875\u9762\u5C06\u663E\u793A\u6807\u7B7E\u9875\u3002",
1090
+ "If selected, the route will be displayed in the menu.": "\u5982\u679C\u9009\u4E2D\uFF0C\u8BE5\u8DEF\u7531\u5C06\u663E\u793A\u5728\u83DC\u5355\u4E2D\u3002"
1070
1091
  };
@@ -58,6 +58,7 @@ module.exports = {
58
58
  Logo: "Logo",
59
59
  "Add menu item": "\u65B0\u589E\u9078\u55AE\u9805\u76EE",
60
60
  Page: "\u9801\u9762",
61
+ Tab: "\u6A19\u7C64",
61
62
  Name: "\u540D\u7A31",
62
63
  Icon: "\u5716\u793A",
63
64
  Group: "\u7FA4\u7D44",
@@ -898,5 +899,25 @@ module.exports = {
898
899
  "Ellipsis overflow content": "\u7701\u7565\u8D85\u51FA\u9577\u5EA6\u7684\u5167\u5BB9",
899
900
  "Hide column": "\u96B1\u85CF\u5217",
900
901
  "In configuration mode, the entire column becomes transparent. In non-configuration mode, the entire column will be hidden. Even if the entire column is hidden, its configured default values and other settings will still take effect.": "\u5728\u914D\u7F6E\u6A21\u5F0F\u4E0B\uFF0C\u6574\u500B\u5217\u6703\u8B8A\u70BA\u900F\u660E\u8272\u3002\u5728\u975E\u914D\u7F6E\u6A21\u5F0F\u4E0B\uFF0C\u6574\u500B\u5217\u5C07\u88AB\u96B1\u85CF\u3002\u5373\u4F7F\u6574\u500B\u5217\u88AB\u96B1\u85CF\u4E86\uFF0C\u5176\u914D\u7F6E\u7684\u9ED8\u8A8D\u503C\u548C\u5176\u4ED6\u8A2D\u7F6E\u4ECD\u7136\u6709\u6548\u3002",
901
- "Show file name": "\u663E\u793A\u6587\u4EF6\u540D"
902
+ "Show file name": "\u663E\u793A\u6587\u4EF6\u540D",
903
+ "Desktop routes": "\u684C\u9762\u7AEF\u8DEF\u7531",
904
+ "Route permissions": "\u8DEF\u7531\u6B0A\u9650",
905
+ "New routes are allowed to be accessed by default": "\u65B0\u8DEF\u7531\u9ED8\u8A8D\u5141\u8A31\u8A2A\u554F",
906
+ "Route name": "\u8DEF\u7531\u540D\u7A31",
907
+ "Mobile routes": "\u79FB\u52D5\u7AEF\u8DEF\u7531",
908
+ "Show in menu": "\u5728\u83DC\u55AE\u4E2D\u986F\u793A",
909
+ "Hide in menu": "\u5728\u83DC\u55AE\u4E2D\u96B1\u85CF",
910
+ Path: "\u8DEF\u5F91",
911
+ Type: "\u985E\u578B",
912
+ Access: "\u8A2A\u554F",
913
+ Routes: "\u8DEF\u7531",
914
+ "Add child route": "\u6DFB\u52A0\u5B50\u8DEF\u7531",
915
+ "Delete routes": "\u522A\u9664\u8DEF\u7531",
916
+ "Delete route": "\u522A\u9664\u8DEF\u7531",
917
+ "Are you sure you want to hide these routes in menu?": "\u4F60\u78BA\u5B9A\u8981\u5728\u83DC\u55AE\u4E2D\u96B1\u85CF\u9019\u4E9B\u8DEF\u7531\u55CE\uFF1F",
918
+ "Are you sure you want to show these routes in menu?": "\u4F60\u78BA\u5B9A\u8981\u5728\u83DC\u55AE\u4E2D\u986F\u793A\u9019\u4E9B\u8DEF\u7531\u55CE\uFF1F",
919
+ "Are you sure you want to hide this menu?": "\u4F60\u78BA\u5B9A\u8981\u96B1\u85CF\u9019\u500B\u83DC\u55AE\u55CE\uFF1F",
920
+ "After hiding, this menu will no longer appear in the menu bar. To show it again, you need to go to the route management page to configure it.": "\u96B1\u85CF\u5F8C\uFF0C\u9019\u500B\u83DC\u55AE\u5C07\u4E0D\u518D\u51FA\u73FE\u5728\u83DC\u55AE\u6B04\u4E2D\u3002\u8981\u518D\u6B21\u986F\u793A\u5B83\uFF0C\u4F60\u9700\u8981\u5230\u8DEF\u7531\u7BA1\u7406\u9801\u9762\u9032\u884C\u8A2D\u7F6E\u3002",
921
+ "If selected, the page will display Tab pages.": "\u5982\u679C\u9078\u4E2D\uFF0C\u8A72\u9801\u9762\u5C07\u986F\u793A\u6A19\u7C64\u9801\u3002",
922
+ "If selected, the route will be displayed in the menu.": "\u5982\u679C\u9078\u4E2D\uFF0C\u8A72\u8DEF\u7531\u5C07\u986F\u793A\u5728\u83DC\u55AE\u4E2D\u3002"
902
923
  };
@@ -1 +1 @@
1
- {"name":"cronstrue","title":"cRonstrue","version":"2.47.0","description":"Convert cron expressions into human readable descriptions","author":"Brady Holt","license":"MIT","bugs":{"url":"https://github.com/bradymholt/cronstrue/issues"},"homepage":"https://github.com/bradymholt/cronstrue","keywords":["cron","cronjob","crontab","schedule","parser","cron expression","cron description","pretty cron","cron for humans","cron translated","cron english","cron schedule","cron english","cron schedule"],"main":"dist/cronstrue.js","bin":{"cronstrue":"bin/cli.js"},"typings":"dist/cronstrue.d.ts","files":["dist/","locales/","i18n.js","i18n.d.ts"],"repository":{"type":"git","url":"git+https://github.com/bradymholt/cronstrue.git"},"publishConfig":{"access":"public"},"prettier":{"printWidth":120},"devDependencies":{"@types/chai":"^4.2.11","@types/mocha":"^8.0.0","chai":"^4.2.0","handlebars":"^4.7.6","marked":"^4.0.10","mocha":"^10.1.0","pixl-xml":"^1.0.13","prettier":"^2.1.1","terser-webpack-plugin":"^5.3.1","ts-loader":"^9.2.6","ts-node":"^10.5.0","typescript":"^4.6.2","webpack":"^5.69.1","webpack-cli":"^4.9.2","xml2js":"^0.5.0"},"scripts":{"start":"npm run build","build":"npx tsc -p ./src --emitDeclarationOnly","test":"npx mocha --reporter spec --require ts-node/register \"./test/**/*.ts\"","prepublishOnly":"rm -rf ./dist && ./node_modules/webpack-cli/bin/cli.js && git add -A"},"dependencies":{},"_lastModified":"2025-01-19T13:17:49.227Z"}
1
+ {"name":"cronstrue","title":"cRonstrue","version":"2.47.0","description":"Convert cron expressions into human readable descriptions","author":"Brady Holt","license":"MIT","bugs":{"url":"https://github.com/bradymholt/cronstrue/issues"},"homepage":"https://github.com/bradymholt/cronstrue","keywords":["cron","cronjob","crontab","schedule","parser","cron expression","cron description","pretty cron","cron for humans","cron translated","cron english","cron schedule","cron english","cron schedule"],"main":"dist/cronstrue.js","bin":{"cronstrue":"bin/cli.js"},"typings":"dist/cronstrue.d.ts","files":["dist/","locales/","i18n.js","i18n.d.ts"],"repository":{"type":"git","url":"git+https://github.com/bradymholt/cronstrue.git"},"publishConfig":{"access":"public"},"prettier":{"printWidth":120},"devDependencies":{"@types/chai":"^4.2.11","@types/mocha":"^8.0.0","chai":"^4.2.0","handlebars":"^4.7.6","marked":"^4.0.10","mocha":"^10.1.0","pixl-xml":"^1.0.13","prettier":"^2.1.1","terser-webpack-plugin":"^5.3.1","ts-loader":"^9.2.6","ts-node":"^10.5.0","typescript":"^4.6.2","webpack":"^5.69.1","webpack-cli":"^4.9.2","xml2js":"^0.5.0"},"scripts":{"start":"npm run build","build":"npx tsc -p ./src --emitDeclarationOnly","test":"npx mocha --reporter spec --require ts-node/register \"./test/**/*.ts\"","prepublishOnly":"rm -rf ./dist && ./node_modules/webpack-cli/bin/cli.js && git add -A"},"dependencies":{},"_lastModified":"2025-01-24T06:40:55.879Z"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: import("@nocobase/database").CollectionOptions;
10
+ export default _default;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+ var desktopRoutes_exports = {};
38
+ __export(desktopRoutes_exports, {
39
+ default: () => desktopRoutes_default
40
+ });
41
+ module.exports = __toCommonJS(desktopRoutes_exports);
42
+ var import_database = require("@nocobase/database");
43
+ var import_desktopRoutes = __toESM(require("../../collections/desktopRoutes"));
44
+ var desktopRoutes_default = (0, import_database.defineCollection)(import_desktopRoutes.default);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ collectionOptions: import("@nocobase/database").CollectionOptions;
11
+ mergeOptions: import("deepmerge").Options;
12
+ extend: boolean;
13
+ };
14
+ export default _default;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var extendRoleField_exports = {};
28
+ __export(extendRoleField_exports, {
29
+ default: () => extendRoleField_default
30
+ });
31
+ module.exports = __toCommonJS(extendRoleField_exports);
32
+ var import_database = require("@nocobase/database");
33
+ var extendRoleField_default = (0, import_database.extendCollection)({
34
+ name: "roles",
35
+ fields: [
36
+ {
37
+ type: "belongsToMany",
38
+ name: "desktopRoutes",
39
+ target: "desktopRoutes",
40
+ through: "rolesDesktopRoutes",
41
+ onDelete: "CASCADE"
42
+ }
43
+ ]
44
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { Migration } from '@nocobase/server';
10
+ export default class extends Migration {
11
+ appVersion: string;
12
+ up(): Promise<void>;
13
+ }
14
+ export declare function schemaToRoutes(schema: any, uiSchemas: any): any;
@@ -0,0 +1,180 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var transform_menu_schema_to_routes_exports = {};
28
+ __export(transform_menu_schema_to_routes_exports, {
29
+ default: () => transform_menu_schema_to_routes_default,
30
+ schemaToRoutes: () => schemaToRoutes
31
+ });
32
+ module.exports = __toCommonJS(transform_menu_schema_to_routes_exports);
33
+ var import_server = require("@nocobase/server");
34
+ class transform_menu_schema_to_routes_default extends import_server.Migration {
35
+ appVersion = "<1.6.0";
36
+ async up() {
37
+ const uiSchemas = this.db.getRepository("uiSchemas");
38
+ const desktopRoutes = this.db.getRepository("desktopRoutes");
39
+ const mobileRoutes = this.db.getRepository("mobileRoutes");
40
+ const rolesRepository = this.db.getRepository("roles");
41
+ const menuSchema = await uiSchemas.getJsonSchema("nocobase-admin-menu");
42
+ const routes = await schemaToRoutes(menuSchema, uiSchemas);
43
+ try {
44
+ await this.db.sequelize.transaction(async (transaction) => {
45
+ var _a;
46
+ if (routes.length > 0) {
47
+ await desktopRoutes.createMany({
48
+ records: routes,
49
+ transaction
50
+ });
51
+ const roles = await rolesRepository.find({
52
+ appends: ["desktopRoutes", "menuUiSchemas"],
53
+ transaction
54
+ });
55
+ for (const role of roles) {
56
+ const menuUiSchemas = role.menuUiSchemas || [];
57
+ const desktopRoutes2 = role.desktopRoutes || [];
58
+ const needRemoveIds = getNeedRemoveIds(desktopRoutes2, menuUiSchemas);
59
+ if (needRemoveIds.length === 0) {
60
+ continue;
61
+ }
62
+ await this.db.getRepository("roles.desktopRoutes", role.name).remove({
63
+ tk: needRemoveIds,
64
+ transaction
65
+ });
66
+ }
67
+ }
68
+ if (mobileRoutes) {
69
+ const allMobileRoutes = await mobileRoutes.find({
70
+ transaction
71
+ });
72
+ for (const item of allMobileRoutes || []) {
73
+ if (item.type !== "page") {
74
+ continue;
75
+ }
76
+ const mobileRouteSchema = await uiSchemas.getJsonSchema(item.schemaUid);
77
+ const enableTabs = !!((_a = mobileRouteSchema == null ? void 0 : mobileRouteSchema["x-component-props"]) == null ? void 0 : _a.displayTabs);
78
+ await mobileRoutes.update({
79
+ filterByTk: item.id,
80
+ values: {
81
+ enableTabs
82
+ },
83
+ transaction
84
+ });
85
+ await mobileRoutes.update({
86
+ filter: {
87
+ parentId: item.id
88
+ },
89
+ values: {
90
+ hidden: !enableTabs
91
+ },
92
+ transaction
93
+ });
94
+ }
95
+ }
96
+ });
97
+ } catch (error) {
98
+ console.error("Migration failed:", error);
99
+ throw error;
100
+ }
101
+ }
102
+ }
103
+ async function schemaToRoutes(schema, uiSchemas) {
104
+ const schemaKeys = Object.keys(schema.properties || {});
105
+ if (schemaKeys.length === 0) {
106
+ return [];
107
+ }
108
+ const result = schemaKeys.map(async (key) => {
109
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
110
+ const item = schema.properties[key];
111
+ if (item["x-component"] === "Menu.SubMenu") {
112
+ return {
113
+ type: "group",
114
+ title: item.title,
115
+ icon: (_a = item["x-component-props"]) == null ? void 0 : _a.icon,
116
+ schemaUid: item["x-uid"],
117
+ hideInMenu: false,
118
+ children: await schemaToRoutes(item, uiSchemas)
119
+ };
120
+ }
121
+ if (item["x-component"] === "Menu.Item") {
122
+ const menuSchema = await uiSchemas.getProperties(item["x-uid"]);
123
+ const pageSchema = (_b = menuSchema == null ? void 0 : menuSchema.properties) == null ? void 0 : _b.page;
124
+ const enableTabs = (_c = pageSchema == null ? void 0 : pageSchema["x-component-props"]) == null ? void 0 : _c.enablePageTabs;
125
+ const enableHeader = !((_d = pageSchema == null ? void 0 : pageSchema["x-component-props"]) == null ? void 0 : _d.disablePageHeader);
126
+ const displayTitle = !((_e = pageSchema == null ? void 0 : pageSchema["x-component-props"]) == null ? void 0 : _e.hidePageTitle);
127
+ return {
128
+ type: "page",
129
+ title: item.title,
130
+ icon: (_f = item["x-component-props"]) == null ? void 0 : _f.icon,
131
+ schemaUid: pageSchema == null ? void 0 : pageSchema["x-uid"],
132
+ menuSchemaUid: item["x-uid"],
133
+ hideInMenu: false,
134
+ enableTabs,
135
+ enableHeader,
136
+ displayTitle,
137
+ children: (await schemaToRoutes(pageSchema, uiSchemas)).map((item2) => ({ ...item2, hidden: !enableTabs }))
138
+ };
139
+ }
140
+ if (item["x-component"] === "Menu.URL") {
141
+ return {
142
+ type: "link",
143
+ title: item.title,
144
+ icon: (_g = item["x-component-props"]) == null ? void 0 : _g.icon,
145
+ options: {
146
+ href: (_h = item["x-component-props"]) == null ? void 0 : _h.href,
147
+ params: (_i = item["x-component-props"]) == null ? void 0 : _i.params
148
+ },
149
+ schemaUid: item["x-uid"],
150
+ hideInMenu: false
151
+ };
152
+ }
153
+ return {
154
+ type: "tabs",
155
+ title: item.title || '{{t("Unnamed")}}',
156
+ icon: (_j = item["x-component-props"]) == null ? void 0 : _j.icon,
157
+ schemaUid: item["x-uid"],
158
+ tabSchemaName: key,
159
+ hideInMenu: false
160
+ };
161
+ });
162
+ return Promise.all(result);
163
+ }
164
+ function getNeedRemoveIds(desktopRoutes, menuUiSchemas) {
165
+ const uidList = menuUiSchemas.map((item) => item["x-uid"]);
166
+ return desktopRoutes.filter((item) => {
167
+ if (item.type === "tabs") {
168
+ const page = desktopRoutes.find((route) => (route == null ? void 0 : route.id) === (item == null ? void 0 : item.parentId));
169
+ return !uidList.includes(page == null ? void 0 : page.menuSchemaUid);
170
+ }
171
+ if (item.type === "page") {
172
+ return !uidList.includes(item == null ? void 0 : item.menuSchemaUid);
173
+ }
174
+ return !uidList.includes(item == null ? void 0 : item.schemaUid);
175
+ }).map((item) => item == null ? void 0 : item.id);
176
+ }
177
+ // Annotate the CommonJS export names for ESM import in node:
178
+ 0 && (module.exports = {
179
+ schemaToRoutes
180
+ });
@@ -11,5 +11,11 @@ export declare class PluginClientServer extends Plugin {
11
11
  beforeLoad(): Promise<void>;
12
12
  install(): Promise<void>;
13
13
  load(): Promise<void>;
14
+ setACL(): void;
15
+ /**
16
+ * used to implement: roles with permission (allowNewMenu is true) can directly access the newly created menu
17
+ */
18
+ bindNewMenuToRoles(): void;
19
+ registerActionHandlers(): void;
14
20
  }
15
21
  export default PluginClientServer;
@@ -106,7 +106,7 @@ class PluginClientServer extends import_server.Plugin {
106
106
  var _a, _b;
107
107
  const SystemSetting = ctx.db.getRepository("systemSettings");
108
108
  const systemSetting = await SystemSetting.findOne();
109
- const enabledLanguages = systemSetting.get("enabledLanguages") || [];
109
+ const enabledLanguages = (systemSetting == null ? void 0 : systemSetting.get("enabledLanguages")) || [];
110
110
  const currentUser = ctx.state.currentUser;
111
111
  let lang = (enabledLanguages == null ? void 0 : enabledLanguages[0]) || process.env.APP_LANG || "en-US";
112
112
  if (enabledLanguages.includes(currentUser == null ? void 0 : currentUser.appLang)) {
@@ -157,6 +157,83 @@ class PluginClientServer extends import_server.Plugin {
157
157
  }
158
158
  });
159
159
  this.app.auditManager.registerActions(["app:restart", "app:refresh", "app:clearCache"]);
160
+ this.registerActionHandlers();
161
+ this.bindNewMenuToRoles();
162
+ this.setACL();
163
+ this.app.db.on("desktopRoutes.afterUpdate", async (instance, { transaction }) => {
164
+ if (instance.changed("enableTabs")) {
165
+ const repository = this.app.db.getRepository("desktopRoutes");
166
+ await repository.update({
167
+ filter: {
168
+ parentId: instance.id
169
+ },
170
+ values: {
171
+ hidden: !instance.enableTabs
172
+ },
173
+ transaction
174
+ });
175
+ }
176
+ });
177
+ }
178
+ setACL() {
179
+ this.app.acl.registerSnippet({
180
+ name: `ui.desktopRoutes`,
181
+ actions: ["desktopRoutes:create", "desktopRoutes:update", "desktopRoutes:move", "desktopRoutes:destroy"]
182
+ });
183
+ this.app.acl.registerSnippet({
184
+ name: `pm.desktopRoutes`,
185
+ actions: ["desktopRoutes:list", "roles.desktopRoutes:*"]
186
+ });
187
+ this.app.acl.allow("desktopRoutes", "listAccessible", "loggedIn");
188
+ }
189
+ /**
190
+ * used to implement: roles with permission (allowNewMenu is true) can directly access the newly created menu
191
+ */
192
+ bindNewMenuToRoles() {
193
+ this.app.db.on("roles.beforeCreate", async (instance) => {
194
+ instance.set(
195
+ "allowNewMenu",
196
+ instance.allowNewMenu === void 0 ? ["admin", "member"].includes(instance.name) : !!instance.allowNewMenu
197
+ );
198
+ });
199
+ this.app.db.on("desktopRoutes.afterCreate", async (instance, { transaction }) => {
200
+ const addNewMenuRoles = await this.app.db.getRepository("roles").find({
201
+ filter: {
202
+ allowNewMenu: true
203
+ },
204
+ transaction
205
+ });
206
+ await this.app.db.getRepository("desktopRoutes.roles", instance.id).add({
207
+ tk: addNewMenuRoles.map((role) => role.name),
208
+ transaction
209
+ });
210
+ });
211
+ }
212
+ registerActionHandlers() {
213
+ this.app.resourceManager.registerActionHandler("desktopRoutes:listAccessible", async (ctx, next) => {
214
+ const desktopRoutesRepository = ctx.db.getRepository("desktopRoutes");
215
+ const rolesRepository = ctx.db.getRepository("roles");
216
+ if (ctx.state.currentRole === "root") {
217
+ ctx.body = await desktopRoutesRepository.find({
218
+ tree: true,
219
+ ...ctx.query
220
+ });
221
+ return await next();
222
+ }
223
+ const role = await rolesRepository.findOne({
224
+ filterByTk: ctx.state.currentRole,
225
+ appends: ["desktopRoutes"]
226
+ });
227
+ const desktopRoutesId = role.get("desktopRoutes").filter((item) => !item.hidden).map((item) => item.id);
228
+ ctx.body = await desktopRoutesRepository.find({
229
+ tree: true,
230
+ ...ctx.query,
231
+ filter: {
232
+ id: desktopRoutesId
233
+ }
234
+ });
235
+ await next();
236
+ });
160
237
  }
161
238
  }
162
239
  var server_default = PluginClientServer;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "WEB 客户端",
5
5
  "description": "Provides a client interface for the NocoBase server",
6
6
  "description.zh-CN": "为 NocoBase 服务端提供客户端界面",
7
- "version": "1.6.0-alpha.17",
7
+ "version": "1.6.0-alpha.18",
8
8
  "main": "./dist/server/index.js",
9
9
  "license": "AGPL-3.0",
10
10
  "devDependencies": {
@@ -20,5 +20,5 @@
20
20
  "@nocobase/test": "1.x",
21
21
  "@nocobase/utils": "1.x"
22
22
  },
23
- "gitHead": "7212bf5f8f59bc3fcfa1e62387c60665112310fb"
23
+ "gitHead": "db361bebe9ed4a5ca19fc14183fe4576443568ef"
24
24
  }