@nocobase/plugin-client 1.6.0-beta.1 → 1.6.0-beta.10
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/client/ClearCache.d.ts +10 -0
- package/dist/client/DesktopRoutesManager.d.ts +10 -0
- package/dist/client/MobileRoutesManager.d.ts +10 -0
- package/dist/client/RestartApplication.d.ts +10 -0
- package/dist/client/index.js +1 -1
- package/dist/client/locale/index.d.ts +12 -0
- package/dist/client/routesTableSchema.d.ts +1242 -0
- package/dist/client/useTableBlockProps.d.ts +23 -0
- package/dist/client/utils.d.ts +10 -0
- package/dist/collections/desktopRoutes.d.ts +10 -0
- package/dist/collections/desktopRoutes.js +419 -0
- package/dist/collections/mobileRoutes.d.ts +10 -0
- package/dist/collections/mobileRoutes.js +368 -0
- package/dist/externalVersion.js +11 -4
- package/dist/locale/en-US.js +26 -1
- package/dist/locale/es-ES.js +22 -1
- package/dist/locale/fr-FR.js +22 -1
- package/dist/locale/ja-JP.js +22 -1
- package/dist/locale/ko-KR.js +22 -1
- package/dist/locale/pt-BR.js +22 -1
- package/dist/locale/ru-RU.js +22 -1
- package/dist/locale/tr-TR.js +22 -1
- package/dist/locale/uk-UA.js +22 -1
- package/dist/locale/zh-CN.js +31 -2
- package/dist/locale/zh-TW.js +23 -1
- package/dist/node_modules/cronstrue/package.json +1 -1
- package/dist/server/collections/desktopRoutes.d.ts +10 -0
- package/dist/server/collections/desktopRoutes.js +44 -0
- package/dist/server/collections/extendRoleField.d.ts +14 -0
- package/dist/server/collections/extendRoleField.js +44 -0
- package/dist/server/migrations/2024122912211-transform-menu-schema-to-routes.d.ts +18 -0
- package/dist/server/migrations/2024122912211-transform-menu-schema-to-routes.js +193 -0
- package/dist/server/migrations/202502071837-fix-permissions.d.ts +17 -0
- package/dist/server/migrations/202502071837-fix-permissions.js +85 -0
- package/dist/server/server.d.ts +7 -0
- package/dist/server/server.js +118 -5
- package/package.json +3 -2
package/dist/locale/tr-TR.js
CHANGED
|
@@ -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
|
};
|
package/dist/locale/uk-UA.js
CHANGED
|
@@ -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
|
};
|
package/dist/locale/zh-CN.js
CHANGED
|
@@ -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",
|
|
@@ -908,7 +909,7 @@ module.exports = {
|
|
|
908
909
|
"Data source": "\u6570\u636E\u6E90",
|
|
909
910
|
DataSource: "\u6570\u636E\u6E90",
|
|
910
911
|
"Data model": "\u6570\u636E\u6A21\u578B",
|
|
911
|
-
Security: "\
|
|
912
|
+
Security: "\u5B89\u5168\u6027",
|
|
912
913
|
Action: "\u64CD\u4F5C",
|
|
913
914
|
System: "\u7CFB\u7EDF\u7BA1\u7406",
|
|
914
915
|
Other: "\u5176\u4ED6",
|
|
@@ -1058,5 +1059,33 @@ module.exports = {
|
|
|
1058
1059
|
Associate: "\u5173\u8054",
|
|
1059
1060
|
"Please add or select record": "\u8BF7\u6DFB\u52A0\u6216\u9009\u62E9\u6570\u636E",
|
|
1060
1061
|
"No data": "\u6682\u65E0\u6570\u636E",
|
|
1061
|
-
"Fields can only be used correctly if they are defined with an interface.": "\u53EA\u6709\u5B57\u6BB5\u8BBE\u7F6E\u4E86interface\u5B57\u6BB5\u624D\u80FD\u6B63\u5E38\u4F7F\u7528"
|
|
1062
|
+
"Fields can only be used correctly if they are defined with an interface.": "\u53EA\u6709\u5B57\u6BB5\u8BBE\u7F6E\u4E86interface\u5B57\u6BB5\u624D\u80FD\u6B63\u5E38\u4F7F\u7528",
|
|
1063
|
+
"Unauthenticated. Please sign in to continue.": "\u672A\u8BA4\u8BC1\u3002\u8BF7\u767B\u5F55\u4EE5\u7EE7\u7EED\u3002",
|
|
1064
|
+
"User not found. Please sign in again to continue.": "\u65E0\u6CD5\u627E\u5230\u7528\u6237\u4FE1\u606F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u4EE5\u7EE7\u7EED\u3002",
|
|
1065
|
+
"Your session has expired. Please sign in again.": "\u60A8\u7684\u4F1A\u8BDD\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u3002",
|
|
1066
|
+
"User password changed, please signin again.": "\u7528\u6237\u5BC6\u7801\u5DF2\u66F4\u6539\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u3002",
|
|
1067
|
+
"Show file name": "\u663E\u793A\u6587\u4EF6\u540D",
|
|
1068
|
+
Outlined: "\u7EBF\u6846\u98CE\u683C",
|
|
1069
|
+
Filled: "\u5B9E\u5E95\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"
|
|
1062
1091
|
};
|
package/dist/locale/zh-TW.js
CHANGED
|
@@ -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",
|
|
@@ -897,5 +898,26 @@ module.exports = {
|
|
|
897
898
|
"Parent object": "\u4E0A\u7D1A\u7269\u4EF6",
|
|
898
899
|
"Ellipsis overflow content": "\u7701\u7565\u8D85\u51FA\u9577\u5EA6\u7684\u5167\u5BB9",
|
|
899
900
|
"Hide column": "\u96B1\u85CF\u5217",
|
|
900
|
-
"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
|
+
"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",
|
|
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"
|
|
901
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-02-
|
|
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-02-24T06:52:51.698Z"}
|
|
@@ -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,18 @@
|
|
|
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;
|
|
15
|
+
export declare function getIds(desktopRoutes: any[], menuUiSchemas: any[]): {
|
|
16
|
+
needRemoveIds: any[];
|
|
17
|
+
needAddIds: any[];
|
|
18
|
+
};
|
|
@@ -0,0 +1,193 @@
|
|
|
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
|
+
getIds: () => getIds,
|
|
31
|
+
schemaToRoutes: () => schemaToRoutes
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(transform_menu_schema_to_routes_exports);
|
|
34
|
+
var import_server = require("@nocobase/server");
|
|
35
|
+
class transform_menu_schema_to_routes_default extends import_server.Migration {
|
|
36
|
+
appVersion = "<1.6.0";
|
|
37
|
+
async up() {
|
|
38
|
+
const uiSchemas = this.db.getRepository("uiSchemas");
|
|
39
|
+
const desktopRoutes = this.db.getRepository("desktopRoutes");
|
|
40
|
+
const count = await desktopRoutes.count();
|
|
41
|
+
if (count > 0) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const mobileRoutes = this.db.getRepository("mobileRoutes");
|
|
45
|
+
const rolesRepository = this.db.getRepository("roles");
|
|
46
|
+
const menuSchema = await uiSchemas.getJsonSchema("nocobase-admin-menu");
|
|
47
|
+
const routes = await schemaToRoutes(menuSchema, uiSchemas);
|
|
48
|
+
try {
|
|
49
|
+
await this.db.sequelize.transaction(async (transaction) => {
|
|
50
|
+
var _a;
|
|
51
|
+
if (routes.length > 0) {
|
|
52
|
+
await desktopRoutes.createMany({
|
|
53
|
+
records: routes,
|
|
54
|
+
transaction
|
|
55
|
+
});
|
|
56
|
+
const roles = await rolesRepository.find({
|
|
57
|
+
appends: ["menuUiSchemas"],
|
|
58
|
+
transaction
|
|
59
|
+
});
|
|
60
|
+
const allDesktopRoutes = await desktopRoutes.find({ transaction });
|
|
61
|
+
for (const role of roles) {
|
|
62
|
+
const menuUiSchemas = role.menuUiSchemas || [];
|
|
63
|
+
const { needRemoveIds, needAddIds } = getIds(allDesktopRoutes, menuUiSchemas);
|
|
64
|
+
if (needRemoveIds.length > 0) {
|
|
65
|
+
await this.db.getRepository("roles.desktopRoutes", role.name).remove({
|
|
66
|
+
tk: needRemoveIds,
|
|
67
|
+
transaction
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (needAddIds.length > 0) {
|
|
71
|
+
await this.db.getRepository("roles.desktopRoutes", role.name).add({
|
|
72
|
+
tk: needAddIds,
|
|
73
|
+
transaction
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (mobileRoutes) {
|
|
79
|
+
const allMobileRoutes = await mobileRoutes.find({
|
|
80
|
+
transaction
|
|
81
|
+
});
|
|
82
|
+
for (const item of allMobileRoutes || []) {
|
|
83
|
+
if (item.type !== "page") {
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
const mobileRouteSchema = await uiSchemas.getJsonSchema(item.schemaUid);
|
|
87
|
+
const enableTabs = !!((_a = mobileRouteSchema == null ? void 0 : mobileRouteSchema["x-component-props"]) == null ? void 0 : _a.displayTabs);
|
|
88
|
+
await mobileRoutes.update({
|
|
89
|
+
filterByTk: item.id,
|
|
90
|
+
values: {
|
|
91
|
+
enableTabs
|
|
92
|
+
},
|
|
93
|
+
transaction
|
|
94
|
+
});
|
|
95
|
+
await mobileRoutes.update({
|
|
96
|
+
filter: {
|
|
97
|
+
parentId: item.id
|
|
98
|
+
},
|
|
99
|
+
values: {
|
|
100
|
+
hidden: !enableTabs
|
|
101
|
+
},
|
|
102
|
+
transaction
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
} catch (error) {
|
|
108
|
+
console.error("Migration failed:", error);
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
async function schemaToRoutes(schema, uiSchemas) {
|
|
114
|
+
const schemaKeys = Object.keys(schema.properties || {});
|
|
115
|
+
if (schemaKeys.length === 0) {
|
|
116
|
+
return [];
|
|
117
|
+
}
|
|
118
|
+
const result = schemaKeys.map(async (key) => {
|
|
119
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
120
|
+
const item = schema.properties[key];
|
|
121
|
+
if (item["x-component"] === "Menu.SubMenu") {
|
|
122
|
+
return {
|
|
123
|
+
type: "group",
|
|
124
|
+
title: item.title,
|
|
125
|
+
icon: (_a = item["x-component-props"]) == null ? void 0 : _a.icon,
|
|
126
|
+
schemaUid: item["x-uid"],
|
|
127
|
+
hideInMenu: false,
|
|
128
|
+
children: await schemaToRoutes(item, uiSchemas)
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
if (item["x-component"] === "Menu.Item") {
|
|
132
|
+
const menuSchema = await uiSchemas.getProperties(item["x-uid"]);
|
|
133
|
+
const pageSchema = (_b = menuSchema == null ? void 0 : menuSchema.properties) == null ? void 0 : _b.page;
|
|
134
|
+
const enableTabs = (_c = pageSchema == null ? void 0 : pageSchema["x-component-props"]) == null ? void 0 : _c.enablePageTabs;
|
|
135
|
+
const enableHeader = !((_d = pageSchema == null ? void 0 : pageSchema["x-component-props"]) == null ? void 0 : _d.disablePageHeader);
|
|
136
|
+
const displayTitle = !((_e = pageSchema == null ? void 0 : pageSchema["x-component-props"]) == null ? void 0 : _e.hidePageTitle);
|
|
137
|
+
return {
|
|
138
|
+
type: "page",
|
|
139
|
+
title: item.title,
|
|
140
|
+
icon: (_f = item["x-component-props"]) == null ? void 0 : _f.icon,
|
|
141
|
+
schemaUid: pageSchema == null ? void 0 : pageSchema["x-uid"],
|
|
142
|
+
menuSchemaUid: item["x-uid"],
|
|
143
|
+
hideInMenu: false,
|
|
144
|
+
enableTabs,
|
|
145
|
+
enableHeader,
|
|
146
|
+
displayTitle,
|
|
147
|
+
children: (await schemaToRoutes(pageSchema, uiSchemas)).map((item2) => ({ ...item2, hidden: !enableTabs }))
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
if (item["x-component"] === "Menu.URL") {
|
|
151
|
+
return {
|
|
152
|
+
type: "link",
|
|
153
|
+
title: item.title,
|
|
154
|
+
icon: (_g = item["x-component-props"]) == null ? void 0 : _g.icon,
|
|
155
|
+
options: {
|
|
156
|
+
href: (_h = item["x-component-props"]) == null ? void 0 : _h.href,
|
|
157
|
+
params: (_i = item["x-component-props"]) == null ? void 0 : _i.params
|
|
158
|
+
},
|
|
159
|
+
schemaUid: item["x-uid"],
|
|
160
|
+
hideInMenu: false
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
type: "tabs",
|
|
165
|
+
title: item.title,
|
|
166
|
+
icon: (_j = item["x-component-props"]) == null ? void 0 : _j.icon,
|
|
167
|
+
schemaUid: item["x-uid"],
|
|
168
|
+
tabSchemaName: key,
|
|
169
|
+
hideInMenu: false
|
|
170
|
+
};
|
|
171
|
+
});
|
|
172
|
+
return Promise.all(result);
|
|
173
|
+
}
|
|
174
|
+
function getIds(desktopRoutes, menuUiSchemas) {
|
|
175
|
+
const uidList = menuUiSchemas.map((item) => item["x-uid"]);
|
|
176
|
+
const needRemoveIds = desktopRoutes.filter((item) => {
|
|
177
|
+
if (item.type === "tabs") {
|
|
178
|
+
const page = desktopRoutes.find((route) => (route == null ? void 0 : route.id) === (item == null ? void 0 : item.parentId));
|
|
179
|
+
return !uidList.includes(page == null ? void 0 : page.menuSchemaUid);
|
|
180
|
+
}
|
|
181
|
+
if (item.type === "page") {
|
|
182
|
+
return !uidList.includes(item == null ? void 0 : item.menuSchemaUid);
|
|
183
|
+
}
|
|
184
|
+
return !uidList.includes(item == null ? void 0 : item.schemaUid);
|
|
185
|
+
}).map((item) => item == null ? void 0 : item.id);
|
|
186
|
+
const needAddIds = desktopRoutes.map((item) => item == null ? void 0 : item.id).filter((id) => !needRemoveIds.includes(id));
|
|
187
|
+
return { needRemoveIds, needAddIds };
|
|
188
|
+
}
|
|
189
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
190
|
+
0 && (module.exports = {
|
|
191
|
+
getIds,
|
|
192
|
+
schemaToRoutes
|
|
193
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
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 getIds(desktopRoutes: any[], menuUiSchemas: any[]): {
|
|
15
|
+
needRemoveIds: any[];
|
|
16
|
+
needAddIds: any[];
|
|
17
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
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 fix_permissions_exports = {};
|
|
28
|
+
__export(fix_permissions_exports, {
|
|
29
|
+
default: () => fix_permissions_default,
|
|
30
|
+
getIds: () => getIds
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(fix_permissions_exports);
|
|
33
|
+
var import_server = require("@nocobase/server");
|
|
34
|
+
class fix_permissions_default extends import_server.Migration {
|
|
35
|
+
appVersion = "<1.6.0";
|
|
36
|
+
async up() {
|
|
37
|
+
const desktopRoutes = this.db.getRepository("desktopRoutes");
|
|
38
|
+
const count = await desktopRoutes.count();
|
|
39
|
+
if (!count) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const rolesRepository = this.db.getRepository("roles");
|
|
43
|
+
try {
|
|
44
|
+
await this.db.sequelize.transaction(async (transaction) => {
|
|
45
|
+
const roles = await rolesRepository.find({
|
|
46
|
+
appends: ["menuUiSchemas"],
|
|
47
|
+
transaction
|
|
48
|
+
});
|
|
49
|
+
const allDesktopRoutes = await desktopRoutes.find({ transaction });
|
|
50
|
+
for (const role of roles) {
|
|
51
|
+
const menuUiSchemas = role.menuUiSchemas || [];
|
|
52
|
+
const { needAddIds } = getIds(allDesktopRoutes, menuUiSchemas);
|
|
53
|
+
if (needAddIds.length > 0) {
|
|
54
|
+
await this.db.getRepository("roles.desktopRoutes", role.name).add({
|
|
55
|
+
tk: needAddIds,
|
|
56
|
+
transaction
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error("Migration failed:", error);
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function getIds(desktopRoutes, menuUiSchemas) {
|
|
68
|
+
const uidList = menuUiSchemas.map((item) => item["x-uid"]);
|
|
69
|
+
const needRemoveIds = desktopRoutes.filter((item) => {
|
|
70
|
+
if (item.type === "tabs") {
|
|
71
|
+
const page = desktopRoutes.find((route) => (route == null ? void 0 : route.id) === (item == null ? void 0 : item.parentId));
|
|
72
|
+
return !uidList.includes(page == null ? void 0 : page.menuSchemaUid);
|
|
73
|
+
}
|
|
74
|
+
if (item.type === "page") {
|
|
75
|
+
return !uidList.includes(item == null ? void 0 : item.menuSchemaUid);
|
|
76
|
+
}
|
|
77
|
+
return !uidList.includes(item == null ? void 0 : item.schemaUid);
|
|
78
|
+
}).map((item) => item == null ? void 0 : item.id);
|
|
79
|
+
const needAddIds = desktopRoutes.map((item) => item == null ? void 0 : item.id).filter((id) => !needRemoveIds.includes(id));
|
|
80
|
+
return { needRemoveIds, needAddIds };
|
|
81
|
+
}
|
|
82
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
83
|
+
0 && (module.exports = {
|
|
84
|
+
getIds
|
|
85
|
+
});
|
package/dist/server/server.d.ts
CHANGED
|
@@ -11,5 +11,12 @@ 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;
|
|
20
|
+
registerLocalizationSource(): void;
|
|
14
21
|
}
|
|
15
22
|
export default PluginClientServer;
|