@nocobase/plugin-multi-portal 2.2.0-alpha.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/LICENSE.txt +107 -0
- package/README.md +14 -0
- package/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/index.d.ts +9 -0
- package/dist/client/index.js +10 -0
- package/dist/client/locale.d.ts +10 -0
- package/dist/client/models/index.d.ts +11 -0
- package/dist/client/plugin.d.ts +13 -0
- package/dist/client-v2/354.ead3e96143164cd5.js +10 -0
- package/dist/client-v2/499.ef2ff0c022687485.js +10 -0
- package/dist/client-v2/778.23ba409a924ee34a.js +10 -0
- package/dist/client-v2/845.f2b0ce44ae4be707.js +10 -0
- package/dist/client-v2/entryActions/PortalEntryActionModel.d.ts +52 -0
- package/dist/client-v2/entryActions/portalEntryActionStore.d.ts +36 -0
- package/dist/client-v2/entryActions/registerPortalEntryActions.d.ts +10 -0
- package/dist/client-v2/entryActions/types.d.ts +41 -0
- package/dist/client-v2/entryActions/url.d.ts +10 -0
- package/dist/client-v2/index.d.ts +9 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/client-v2/layoutRegistration.d.ts +38 -0
- package/dist/client-v2/locale.d.ts +13 -0
- package/dist/client-v2/models/MultiPortalBlockModel.d.ts +13 -0
- package/dist/client-v2/models/MultiPortalMobilePageModels.d.ts +34 -0
- package/dist/client-v2/pages/MultiPortalsPage.d.ts +80 -0
- package/dist/client-v2/permissions/MultiPortalPermissionsTab.d.ts +21 -0
- package/dist/client-v2/permissions/multiPortalPermissions.d.ts +12 -0
- package/dist/client-v2/plugin.d.ts +13 -0
- package/dist/client-v2/routeRepositoryScope.d.ts +11 -0
- package/dist/client-v2/routeUrl.d.ts +18 -0
- package/dist/externalVersion.js +25 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +48 -0
- package/dist/locale/en-US.json +82 -0
- package/dist/locale/zh-CN.json +82 -0
- package/dist/node_modules/tar/dist/commonjs/create.d.ts +3 -0
- package/dist/node_modules/tar/dist/commonjs/create.js +82 -0
- package/dist/node_modules/tar/dist/commonjs/cwd-error.d.ts +8 -0
- package/dist/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
- package/dist/node_modules/tar/dist/commonjs/extract.d.ts +3 -0
- package/dist/node_modules/tar/dist/commonjs/extract.js +88 -0
- package/dist/node_modules/tar/dist/commonjs/get-write-flag.d.ts +2 -0
- package/dist/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
- package/dist/node_modules/tar/dist/commonjs/header.d.ts +53 -0
- package/dist/node_modules/tar/dist/commonjs/header.js +312 -0
- package/dist/node_modules/tar/dist/commonjs/index.d.ts +20 -0
- package/dist/node_modules/tar/dist/commonjs/index.js +64 -0
- package/dist/node_modules/tar/dist/commonjs/index.min.js +1 -0
- package/dist/node_modules/tar/dist/commonjs/large-numbers.d.ts +3 -0
- package/dist/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
- package/dist/node_modules/tar/dist/commonjs/list.d.ts +7 -0
- package/dist/node_modules/tar/dist/commonjs/list.js +145 -0
- package/dist/node_modules/tar/dist/commonjs/make-command.d.ts +49 -0
- package/dist/node_modules/tar/dist/commonjs/make-command.js +52 -0
- package/dist/node_modules/tar/dist/commonjs/mkdir.d.ts +25 -0
- package/dist/node_modules/tar/dist/commonjs/mkdir.js +187 -0
- package/dist/node_modules/tar/dist/commonjs/mode-fix.d.ts +2 -0
- package/dist/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
- package/dist/node_modules/tar/dist/commonjs/normalize-unicode.d.ts +2 -0
- package/dist/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
- package/dist/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +2 -0
- package/dist/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
- package/dist/node_modules/tar/dist/commonjs/options.d.ts +596 -0
- package/dist/node_modules/tar/dist/commonjs/options.js +66 -0
- package/dist/node_modules/tar/dist/commonjs/pack.d.ts +105 -0
- package/dist/node_modules/tar/dist/commonjs/pack.js +545 -0
- package/dist/node_modules/tar/dist/commonjs/package.json +3 -0
- package/dist/node_modules/tar/dist/commonjs/parse.d.ts +85 -0
- package/dist/node_modules/tar/dist/commonjs/parse.js +610 -0
- package/dist/node_modules/tar/dist/commonjs/path-reservations.d.ts +11 -0
- package/dist/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
- package/dist/node_modules/tar/dist/commonjs/pax.d.ts +26 -0
- package/dist/node_modules/tar/dist/commonjs/pax.js +158 -0
- package/dist/node_modules/tar/dist/commonjs/process-umask.d.ts +2 -0
- package/dist/node_modules/tar/dist/commonjs/process-umask.js +7 -0
- package/dist/node_modules/tar/dist/commonjs/read-entry.d.ts +36 -0
- package/dist/node_modules/tar/dist/commonjs/read-entry.js +136 -0
- package/dist/node_modules/tar/dist/commonjs/replace.d.ts +2 -0
- package/dist/node_modules/tar/dist/commonjs/replace.js +227 -0
- package/dist/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +2 -0
- package/dist/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
- package/dist/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts +2 -0
- package/dist/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
- package/dist/node_modules/tar/dist/commonjs/symlink-error.d.ts +9 -0
- package/dist/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
- package/dist/node_modules/tar/dist/commonjs/types.d.ts +7 -0
- package/dist/node_modules/tar/dist/commonjs/types.js +50 -0
- package/dist/node_modules/tar/dist/commonjs/unpack.d.ts +101 -0
- package/dist/node_modules/tar/dist/commonjs/unpack.js +932 -0
- package/dist/node_modules/tar/dist/commonjs/update.d.ts +2 -0
- package/dist/node_modules/tar/dist/commonjs/update.js +33 -0
- package/dist/node_modules/tar/dist/commonjs/warn-method.d.ts +24 -0
- package/dist/node_modules/tar/dist/commonjs/warn-method.js +31 -0
- package/dist/node_modules/tar/dist/commonjs/winchars.d.ts +3 -0
- package/dist/node_modules/tar/dist/commonjs/winchars.js +14 -0
- package/dist/node_modules/tar/dist/commonjs/write-entry.d.ts +129 -0
- package/dist/node_modules/tar/dist/commonjs/write-entry.js +698 -0
- package/dist/node_modules/tar/dist/esm/create.d.ts +3 -0
- package/dist/node_modules/tar/dist/esm/create.js +76 -0
- package/dist/node_modules/tar/dist/esm/cwd-error.d.ts +8 -0
- package/dist/node_modules/tar/dist/esm/cwd-error.js +14 -0
- package/dist/node_modules/tar/dist/esm/extract.d.ts +3 -0
- package/dist/node_modules/tar/dist/esm/extract.js +49 -0
- package/dist/node_modules/tar/dist/esm/get-write-flag.d.ts +2 -0
- package/dist/node_modules/tar/dist/esm/get-write-flag.js +26 -0
- package/dist/node_modules/tar/dist/esm/header.d.ts +53 -0
- package/dist/node_modules/tar/dist/esm/header.js +275 -0
- package/dist/node_modules/tar/dist/esm/index.d.ts +20 -0
- package/dist/node_modules/tar/dist/esm/index.js +20 -0
- package/dist/node_modules/tar/dist/esm/index.min.js +4 -0
- package/dist/node_modules/tar/dist/esm/large-numbers.d.ts +3 -0
- package/dist/node_modules/tar/dist/esm/large-numbers.js +94 -0
- package/dist/node_modules/tar/dist/esm/list.d.ts +7 -0
- package/dist/node_modules/tar/dist/esm/list.js +105 -0
- package/dist/node_modules/tar/dist/esm/make-command.d.ts +49 -0
- package/dist/node_modules/tar/dist/esm/make-command.js +48 -0
- package/dist/node_modules/tar/dist/esm/mkdir.d.ts +25 -0
- package/dist/node_modules/tar/dist/esm/mkdir.js +179 -0
- package/dist/node_modules/tar/dist/esm/mode-fix.d.ts +2 -0
- package/dist/node_modules/tar/dist/esm/mode-fix.js +25 -0
- package/dist/node_modules/tar/dist/esm/normalize-unicode.d.ts +2 -0
- package/dist/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
- package/dist/node_modules/tar/dist/esm/normalize-windows-path.d.ts +2 -0
- package/dist/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
- package/dist/node_modules/tar/dist/esm/options.d.ts +596 -0
- package/dist/node_modules/tar/dist/esm/options.js +54 -0
- package/dist/node_modules/tar/dist/esm/pack.d.ts +105 -0
- package/dist/node_modules/tar/dist/esm/pack.js +503 -0
- package/dist/node_modules/tar/dist/esm/package.json +3 -0
- package/dist/node_modules/tar/dist/esm/parse.d.ts +85 -0
- package/dist/node_modules/tar/dist/esm/parse.js +606 -0
- package/dist/node_modules/tar/dist/esm/path-reservations.d.ts +11 -0
- package/dist/node_modules/tar/dist/esm/path-reservations.js +166 -0
- package/dist/node_modules/tar/dist/esm/pax.d.ts +26 -0
- package/dist/node_modules/tar/dist/esm/pax.js +154 -0
- package/dist/node_modules/tar/dist/esm/process-umask.d.ts +2 -0
- package/dist/node_modules/tar/dist/esm/process-umask.js +3 -0
- package/dist/node_modules/tar/dist/esm/read-entry.d.ts +36 -0
- package/dist/node_modules/tar/dist/esm/read-entry.js +132 -0
- package/dist/node_modules/tar/dist/esm/replace.d.ts +2 -0
- package/dist/node_modules/tar/dist/esm/replace.js +221 -0
- package/dist/node_modules/tar/dist/esm/strip-absolute-path.d.ts +2 -0
- package/dist/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
- package/dist/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts +2 -0
- package/dist/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
- package/dist/node_modules/tar/dist/esm/symlink-error.d.ts +9 -0
- package/dist/node_modules/tar/dist/esm/symlink-error.js +15 -0
- package/dist/node_modules/tar/dist/esm/types.d.ts +7 -0
- package/dist/node_modules/tar/dist/esm/types.js +45 -0
- package/dist/node_modules/tar/dist/esm/unpack.d.ts +101 -0
- package/dist/node_modules/tar/dist/esm/unpack.js +891 -0
- package/dist/node_modules/tar/dist/esm/update.d.ts +2 -0
- package/dist/node_modules/tar/dist/esm/update.js +30 -0
- package/dist/node_modules/tar/dist/esm/warn-method.d.ts +24 -0
- package/dist/node_modules/tar/dist/esm/warn-method.js +27 -0
- package/dist/node_modules/tar/dist/esm/winchars.d.ts +3 -0
- package/dist/node_modules/tar/dist/esm/winchars.js +9 -0
- package/dist/node_modules/tar/dist/esm/write-entry.d.ts +129 -0
- package/dist/node_modules/tar/dist/esm/write-entry.js +656 -0
- package/dist/node_modules/tar/node_modules/chownr/dist/commonjs/index.d.ts +3 -0
- package/dist/node_modules/tar/node_modules/chownr/dist/commonjs/index.js +93 -0
- package/dist/node_modules/tar/node_modules/chownr/dist/commonjs/package.json +3 -0
- package/dist/node_modules/tar/node_modules/chownr/dist/esm/index.d.ts +3 -0
- package/dist/node_modules/tar/node_modules/chownr/dist/esm/index.js +85 -0
- package/dist/node_modules/tar/node_modules/chownr/dist/esm/package.json +3 -0
- package/dist/node_modules/tar/node_modules/chownr/package.json +69 -0
- package/dist/node_modules/tar/node_modules/minipass/dist/commonjs/index.d.ts +549 -0
- package/dist/node_modules/tar/node_modules/minipass/dist/commonjs/index.js +1028 -0
- package/dist/node_modules/tar/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/dist/node_modules/tar/node_modules/minipass/dist/esm/index.d.ts +549 -0
- package/dist/node_modules/tar/node_modules/minipass/dist/esm/index.js +1018 -0
- package/dist/node_modules/tar/node_modules/minipass/dist/esm/package.json +3 -0
- package/dist/node_modules/tar/node_modules/minipass/package.json +82 -0
- package/dist/node_modules/tar/node_modules/minizlib/dist/commonjs/constants.d.ts +2 -0
- package/dist/node_modules/tar/node_modules/minizlib/dist/commonjs/constants.js +123 -0
- package/dist/node_modules/tar/node_modules/minizlib/dist/commonjs/index.d.ts +99 -0
- package/dist/node_modules/tar/node_modules/minizlib/dist/commonjs/index.js +416 -0
- package/dist/node_modules/tar/node_modules/minizlib/dist/commonjs/package.json +3 -0
- package/dist/node_modules/tar/node_modules/minizlib/dist/esm/constants.d.ts +2 -0
- package/dist/node_modules/tar/node_modules/minizlib/dist/esm/constants.js +117 -0
- package/dist/node_modules/tar/node_modules/minizlib/dist/esm/index.d.ts +99 -0
- package/dist/node_modules/tar/node_modules/minizlib/dist/esm/index.js +363 -0
- package/dist/node_modules/tar/node_modules/minizlib/dist/esm/package.json +3 -0
- package/dist/node_modules/tar/node_modules/minizlib/package.json +80 -0
- package/dist/node_modules/tar/node_modules/yallist/dist/commonjs/index.d.ts +39 -0
- package/dist/node_modules/tar/node_modules/yallist/dist/commonjs/index.js +384 -0
- package/dist/node_modules/tar/node_modules/yallist/dist/commonjs/package.json +3 -0
- package/dist/node_modules/tar/node_modules/yallist/dist/esm/index.d.ts +39 -0
- package/dist/node_modules/tar/node_modules/yallist/dist/esm/index.js +379 -0
- package/dist/node_modules/tar/node_modules/yallist/dist/esm/package.json +3 -0
- package/dist/node_modules/tar/node_modules/yallist/package.json +68 -0
- package/dist/node_modules/tar/package.json +1 -0
- package/dist/server/collections/desktopRoutes.d.ts +14 -0
- package/dist/server/collections/desktopRoutes.js +48 -0
- package/dist/server/collections/extendRoleField.d.ts +14 -0
- package/dist/server/collections/extendRoleField.js +51 -0
- package/dist/server/collections/multiPortals.d.ts +10 -0
- package/dist/server/collections/multiPortals.js +128 -0
- package/dist/server/collections/rolesMultiPortalDesktopRoutes.d.ts +10 -0
- package/dist/server/collections/rolesMultiPortalDesktopRoutes.js +76 -0
- package/dist/server/collections/rolesMultiPortalRoutePolicies.d.ts +10 -0
- package/dist/server/collections/rolesMultiPortalRoutePolicies.js +73 -0
- package/dist/server/collections/rolesMultiPortals.d.ts +10 -0
- package/dist/server/collections/rolesMultiPortals.js +68 -0
- package/dist/server/ensureDefaultRoleMultiPortalAccess.d.ts +11 -0
- package/dist/server/ensureDefaultRoleMultiPortalAccess.js +70 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +42 -0
- package/dist/server/migrations/20260723105200-drop-ui-layout-foreign-key-constraint.d.ts +13 -0
- package/dist/server/migrations/20260723105200-drop-ui-layout-foreign-key-constraint.js +104 -0
- package/dist/server/plugin.d.ts +63 -0
- package/dist/server/plugin.js +2130 -0
- package/package.json +34 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -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
|
+
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ahooks"),require("@nocobase/client-v2"),require("@nocobase/plugin-ui-layout/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("antd-style"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-multi-portal/client-v2",["ahooks","@nocobase/client-v2","@nocobase/plugin-ui-layout/client-v2","react","antd","@ant-design/icons","antd-style","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-multi-portal/client-v2"]=t(require("ahooks"),require("@nocobase/client-v2"),require("@nocobase/plugin-ui-layout/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("antd-style"),require("@nocobase/flow-engine")):e["@nocobase/plugin-multi-portal/client-v2"]=t(e.ahooks,e["@nocobase/client-v2"],e["@nocobase/plugin-ui-layout/client-v2"],e.react,e.antd,e["@ant-design/icons"],e["antd-style"],e["@nocobase/flow-engine"])}(self,function(e,t,r,n,o,i,a,l){return function(){"use strict";var u,c,s,f={337:function(e,t,r){r.d(t,{G:function(){return u}});var n=r(694);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e){var t=e||{};return{apps:Array.isArray(t.apps)?t.apps:[],portals:Array.isArray(t.portals)?t.portals:[]}}var a=function(){var e;function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");o(this,"app",void 0),o(this,"payload",void 0),o(this,"loading",void 0),o(this,"revision",void 0),o(this,"loaded",void 0),o(this,"request",void 0),o(this,"requestId",void 0),this.app=e,this.payload=i(null),this.loading=!1,this.revision=0,this.loaded=!1,this.requestId=0,(0,n.define)(this,{payload:n.observable.ref,loading:n.observable.ref,revision:n.observable.ref})}return e=[{key:"load",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.app.apiClient;return this.loaded&&!this.request?Promise.resolve(this.payload):this.requestPortals(e)}},{key:"reload",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.app.apiClient;return this.requestPortals(e,{force:!0,invalidateEntryActions:!0})}},{key:"requestPortals",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.request||r.force){var n,o=++this.requestId;this.loading=!0,this.request=((null==(n=e.silent)?void 0:n.call(e))||e).request({url:"app:getPortals",skipNotify:!0}).then(function(e){var n,a,l,u=i(null!=(n=null==e||null==(a=e.data)?void 0:a.data)?n:null==e?void 0:e.data);return o===t.requestId&&(t.payload=u,t.loaded=!0,t.revision+=1,r.invalidateEntryActions&&(null==(l=t.app.entryActionManager)||l.invalidate())),u}).catch(function(e){throw e}).finally(function(){o===t.requestId&&(t.loading=!1,t.request=void 0)})}return this.request}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,e),t}(),l=new WeakMap;function u(e){var t=l.get(e);return t||(t=new a(e),l.set(e,t)),t}},143:function(e,t,r){r.d(t,{Dj:function(){return l},kj:function(){return a},MZ:function(){return u}});var n=r(694),o=JSON.parse('{"UU":"@nocobase/plugin-multi-portal"}');function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function a(){var e=(0,n.useFlowEngine)();return function(t,r){return e.context.t(t,i({ns:[o.UU,"client"]},r))}}function l(e){return i({ns:[o.UU,"client"]},e)}function u(e){return(0,n.tExpr)(e,{ns:[o.UU,"client"]})}},133:function(e,t,r){function n(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){r(e);return}l.done?t(u):Promise.resolve(u).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise(function(o,i){var a=e.apply(t,r);function l(e){n(a,o,i,l,u,"next",e)}function u(e){n(a,o,i,l,u,"throw",e)}l(void 0)})}}function i(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(a,"next",{value:u(0)}),l(a,"throw",{value:u(1)}),l(a,"return",{value:u(2)}),"function"==typeof Symbol&&l(a,Symbol.iterator,{value:function(){return this}}),a;function u(l){return function(u){var c=[l,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}r.d(t,{Cp:function(){return c},gl:function(){return d},wj:function(){return u}});var a=Symbol("multiPortalRouteRepositoryState"),l="portal:";function u(e){return"".concat(l).concat(e)}function c(e){return e.startsWith(l)&&e.slice(l.length)||void 0}function s(e){var t;return(null==(t=e.scopeStack[e.scopeStack.length-1])?void 0:t.scope)||{cacheKey:"admin-layout-model",kind:"layout",uid:"admin-layout-model"}}function f(e){return e.getAPIClient()}function p(e,t,r){return o(function(){var n,o,a,l;return i(this,function(i){switch(i.label){case 0:return o=(r.refreshRequestIds.get(t.cacheKey)||0)+1,r.refreshRequestIds.set(t.cacheKey,o),[4,f(e).request({url:"/desktopRoutes:listAccessible",params:{tree:!0,sort:"sort",portal:t.uid}})];case 1:return l=Array.isArray(null==(a=i.sent())||null==(n=a.data)?void 0:n.data)?a.data.data:[],r.refreshRequestIds.get(t.cacheKey)===o&&e.setRoutes(l,t.cacheKey),[2,l]}})})()}function d(e,t){if(e&&(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"){if(e[a]){e[a].portalUids=t;return}var r={loadingPromises:new Map,originalActivateLayout:e.activateLayout.bind(e),originalCreateRoute:e.createRoute.bind(e),originalEnsureAccessibleLoaded:e.ensureAccessibleLoaded.bind(e),originalRefreshAccessible:e.refreshAccessible.bind(e),portalUids:t,refreshRequestIds:new Map,scopeStack:[]};e[a]=r,e.activateLayout=function(e){var t,n,o,i,a,l,s=(t="string"==typeof(i=null==e?void 0:e.uid)&&i.trim()?i:"admin-layout-model",n=r.portalUids,o=c(t)||t,new Set(n().filter(function(e){return"string"==typeof e&&e.trim()})).has(o)?{cacheKey:u(o),kind:"portal",uid:o}:{cacheKey:t,kind:"layout",uid:t}),f=Symbol("multi-portal-route-scope"),p=r.originalActivateLayout((a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},e),l=l={uid:s.cacheKey},Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(l)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(l,e))}),a));return r.scopeStack.push({deactivate:p,scope:s,token:f}),function(){var e=r.scopeStack.findIndex(function(e){return e.token===f});e>=0&&r.scopeStack.splice(e,1),p()}},e.refreshAccessible=function(){return o(function(){var t;return i(this,function(n){return"portal"!==(t=s(r)).kind?[2,r.originalRefreshAccessible()]:[2,p(e,t,r)]})})()},e.ensureAccessibleLoaded=function(){return o(function(){var t,n,o;return i(this,function(i){return"portal"!==(t=s(r)).kind?[2,r.originalEnsureAccessibleLoaded()]:e.isAccessibleLoaded()?[2,e.listAccessible()]:(n=r.loadingPromises.get(t.cacheKey))?[2,n]:(o=p(e,t,r).finally(function(){r.loadingPromises.get(t.cacheKey)===o&&r.loadingPromises.delete(t.cacheKey)}),r.loadingPromises.set(t.cacheKey,o),[2,o])})})()},e.createRoute=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(function(){var o,a,l,u;return i(this,function(i){switch(i.label){case 0:if("portal"!==(o=s(r)).kind)return[2,r.originalCreateRoute(t,n)];return l=void 0===(a=n.refreshAfterMutation)||a,[4,f(e).resource("desktopRoutes").create({values:t,portal:o.uid})];case 1:if(u=i.sent(),!l)return[3,3];return[4,e.refreshAccessible()];case 2:i.sent(),i.label=3;case 3:return[2,u]}})})()}}}},756:function(e,t,r){r.d(t,{u:function(){return d}});var n=r(485);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var i={"no-code":"/v",ai:"/x"},a=Object.values(i),l=function(e){var t=null==e?void 0:e.trim();return t&&"/"!==t?"/".concat(t.replace(/^\/+/,"")):"/"},u=function(e){var t=l(e).replace(/\/+$/,"");return""===t||"/"===t?"":t},c=function(e,t){var r=u(e),n=l(t);return!r||n===r||n.startsWith("".concat(r,"/"))?n:"".concat(r).concat(n)};function s(e){return"ai"===e?"ai":"no-code"}function f(e,t){var r=u(e),n=i[s(t)];if(!r)return n;var o=r.match(/^(.*)\/(?:v|x)\/apps\/([^/]+)$/);if(o){var l=o[1]||"";return"".concat(l).concat(n,"/apps/").concat(o[2])}return a.some(function(e){return r.endsWith(e)})?r.replace(/\/(?:v|x)$/,n):"".concat(r).concat(n)}function p(e,t,r){var n=l(e),i=!0,c=!1,p=void 0;try{for(var d,y=[f(t,r),f(t,"ai"===s(r)?"no-code":"ai")].concat(function(e){if(Array.isArray(e))return o(e)}(a)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e){if(e){if("string"==typeof e)return o(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,void 0)}}(a)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[Symbol.iterator]();!(i=(d=y.next()).done);i=!0){var b=d.value;n=function(e,t){var r=u(t),n=l(e);return r?n===r?"/":n.startsWith("".concat(r,"/"))?n.slice(r.length)||"/":n:n}(n,b)}}catch(e){c=!0,p=e}finally{try{i||null==y.return||y.return()}finally{if(c)throw p}}return n}function d(e,t,r){var o,i,a,s,d=t.trim();if(/^[a-z][a-z\d+\-.]*:\/\//i.test(d)||d.startsWith("//"))return d;var y=(null==e||null==(i=e.router)||null==(o=i.getBasename)?void 0:o.call(i))||(null==e||null==(a=e.router)?void 0:a.basename);if(y){var b="function"==typeof(null==e?void 0:e.getPublicPath)?(0,n.getV2EffectiveBasePath)({getPublicPath:e.getPublicPath,router:{getBasename:function(){var t,r,n;return(null==(r=e.router)||null==(t=r.getBasename)?void 0:t.call(r))||(null==(n=e.router)?void 0:n.basename)}}}):y;return c(f(b,r),p(d,b,r))}if(null==e?void 0:e.getRouteUrl){var v,h,g=e.getRouteUrl(d),m=(v=l(g))===(h=l(d))?"":v.endsWith(h)?u(v.slice(0,-h.length)):void 0;return void 0!==m?c(f(m,r),p(d,m,r)):l(g)}var w=null==e||null==(s=e.getPublicPath)?void 0:s.call(e);return c(f(w,r),p(d,w,r))}},375:function(e){e.exports=i},485:function(e){e.exports=t},694:function(e){e.exports=l},69:function(e){e.exports=r},625:function(t){t.exports=e},59:function(e){e.exports=o},235:function(e){e.exports=a},155:function(e){e.exports=n}},p={};function d(e){var t=p[e];if(void 0!==t)return t.exports;var r=p[e]={exports:{}};return f[e](r,r.exports,d),r.exports}d.m=f,d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},d.d=function(e,t){for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.f={},d.e=function(e){return Promise.all(Object.keys(d.f).reduce(function(t,r){return d.f[r](e,t),t},[]))},d.u=function(e){return""+e+"."+({354:"ead3e96143164cd5",499:"ef2ff0c022687485",778:"23ba409a924ee34a",845:"f2b0ce44ae4be707"})[e]+".js"},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},y={},d.l=function(e,t,r,n){if(y[e])return void y[e].push(t);if(void 0!==r)for(var o,i,a=document.getElementsByTagName("script"),l=0;l<a.length;l++){var u=a[l];if(u.getAttribute("src")==e||u.getAttribute("data-rspack")=="@nocobase/plugin-multi-portal/client-v2:"+r){o=u;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,d.nc&&o.setAttribute("nonce",d.nc),o.setAttribute("data-rspack","@nocobase/plugin-multi-portal/client-v2:"+r),o.src=e),y[e]=[t];var c=function(t,r){o.onerror=o.onload=null,clearTimeout(s);var n=y[e];if(delete y[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(function(e){return e(r)}),t)return t(r)},s=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.bind(null,o.onload),i&&document.head.appendChild(o)},d.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.g.importScripts&&(b=d.g.location+"");var y,b,v=d.g.document;if(!b&&v&&(v.currentScript&&"SCRIPT"===v.currentScript.tagName.toUpperCase()&&(b=v.currentScript.src),!b)){var h=v.getElementsByTagName("script");if(h.length)for(var g=h.length-1;g>-1&&(!b||!/^http(s?):/.test(b));)b=h[g--].src}if(!b)throw Error("Automatic publicPath is not supported in this browser");d.p=b.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),u={889:0},d.f.j=function(e,t){var r=d.o(u,e)?u[e]:void 0;if(0!==r)if(r)t.push(r[2]);else{var n=new Promise(function(t,n){r=u[e]=[t,n]});t.push(r[2]=n);var o=d.p+d.u(e),i=Error();d.l(o,function(t){if(d.o(u,e)&&(0!==(r=u[e])&&(u[e]=void 0),r)){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",i.name="ChunkLoadError",i.type=n,i.request=o,r[1](i)}},"chunk-"+e,e)}},c=function(e,t){var r,n,o=t[0],i=t[1],a=t[2],l=0;if(o.some(function(e){return 0!==u[e]})){for(r in i)d.o(i,r)&&(d.m[r]=i[r]);a&&a(d)}for(e&&e(t);l<o.length;l++)n=o[l],d.o(u,n)&&u[n]&&u[n][0](),u[n]=0},(s=self.webpackChunk_nocobase_plugin_multi_portal_client_v2=self.webpackChunk_nocobase_plugin_multi_portal_client_v2||[]).forEach(c.bind(null,0)),s.push=c.bind(null,s.push.bind(s));var m={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var r=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");r.indexOf("/static/plugins/@nocobase/plugin-multi-portal/dist/client-v2/")>=0&&(e=r.replace(/\/[^\/]+$/,"/"))}if(!e){var n=window.__webpack_public_path__||"";n&&("/"!==n.charAt(n.length-1)&&(n+="/"),e=n+"static/plugins/@nocobase/plugin-multi-portal/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var a=window.location.pathname||"/",l=a.indexOf(i);e=l>=0?a.slice(0,l+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-multi-portal/dist/client-v2/"}d.p=e}(),!function(){d.r(m),d.d(m,{default:function(){return X}});var e,t=d(485),r=d(337);function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){r(e);return}l.done?t(u):Promise.resolve(u).then(n,o)}function i(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return n(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return n(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var a=["action-panel","app-switcher"],l="desktop",u="mobile",c="main";function s(e){return!!e&&(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"}function f(e){return"string"==typeof e&&e?e:null}function p(e){var t=f(e);return!!t&&t.toLowerCase().includes(u)}function y(e){return e.title||e.routePath}function b(e){var t=new Set;return e.filter(function(e){return!t.has(e)&&(t.add(e),!0)})}function v(e,t,r){return e===c?r("Main application"):(null==t?void 0:t.title)||e}var h=d(133);function g(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){r(e);return}l.done?t(u):Promise.resolve(u).then(n,o)}function w(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){g(i,n,o,a,l,"next",e)}function l(e){g(i,n,o,a,l,"throw",e)}a(void 0)})}}function P(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(a,"next",{value:u(0)}),l(a,"throw",{value:u(1)}),l(a,"return",{value:u(2)}),"function"==typeof Symbol&&l(a,Symbol.iterator,{value:function(){return this}}),a;function u(l){return function(u){var c=[l,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var S=(P(e={},"desktop",{layoutModelClass:"AdminLayoutModel"}),P(e,"mobile",{layoutModelClass:"MultiPortalMobileLayoutModel",rootPageModelClass:"MultiPortalMobileRootPageModel",childPageModelClass:"MultiPortalMobileChildPageModel"}),e),k=d(625),j=d(59),M=d(235),x=d(155),A=d.n(x),E=d(143),_=d(756);function T(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){r(e);return}l.done?t(u):Promise.resolve(u).then(n,o)}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}var R=j.Typography.Text;function L(e){var t=e.controlHeightLG+e.paddingSM+e.paddingXXS,r=e.paddingLG-e.paddingXXS;return{avatarSize:t,cardHeight:t+2*r,gridMinColumnWidth:9*e.controlHeightLG,iconSize:e.fontSizeHeading3+e.marginXXS,paddingBlock:r}}var B=(0,M.createStyles)(function(e){var t=e.token;return{portalItem:{"&:hover":{background:t.colorBgTextHover,borderColor:t.colorBorder,boxShadow:t.boxShadowTertiary,color:t.colorText,transform:"translateY(-".concat(t.lineWidth,"px)")},"&:focus-visible":{outline:"".concat(t.controlOutlineWidth,"px solid ").concat(t.colorPrimaryBorder),outlineOffset:t.controlOutlineWidth},".ant-typography":{color:"inherit"}}}});function N(e){var t;return(null==(t=e.title)?void 0:t.trim())||e.uid}function D(e){var r,n,o,i,a=e.record,l=e.token,u=L(l),c=null==(i=a.icon)?void 0:i.trim(),s={alignItems:"center",background:l.colorFillTertiary,borderRadius:l.borderRadiusLG,color:l.colorText,display:"flex",flex:"0 0 ".concat(u.avatarSize,"px"),fontSize:l.fontSizeHeading3,height:u.avatarSize,justifyContent:"center",lineHeight:1,width:u.avatarSize};if(c)return A().createElement(j.Avatar,{shape:"square",size:u.avatarSize,style:s,icon:null},A().createElement(t.Icon,{type:c,"aria-hidden":!0,style:{color:l.colorPrimary,fontSize:u.iconSize}}));var f=(r=[{background:l.colorPrimaryBg,color:l.colorPrimary},{background:l.colorSuccessBg,color:l.colorSuccess},{background:l.colorWarningBg,color:l.colorWarning},{background:l.colorErrorBg,color:l.colorError},{background:l.colorInfoBg,color:l.colorInfo}])[function(e,t){var r=0,n=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u=a.value;r=(31*r+u.charCodeAt(0))%0x7fffffff}}catch(e){o=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw i}}return Math.abs(r)%t}("".concat(a.uid,":").concat(a.title||""),r.length)];return A().createElement(j.Avatar,{"aria-hidden":!0,shape:"square",size:u.avatarSize,style:(n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},s),o=o={background:f.background,color:f.color,fontWeight:l.fontWeightStrong},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n)},(N(a).trim()[0]||"P").toUpperCase())}function W(e){var t=e.model,r=j.theme.useToken().token,n=B().styles,o=(0,x.useMemo)(function(){return L(r)},[r]),i=t.context.app,a=t.translate,l=(0,k.useRequest)(function(){var e;return(e=function(){var e,t,r;return function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(a,"next",{value:u(0)}),l(a,"throw",{value:u(1)}),l(a,"return",{value:u(2)}),"function"==typeof Symbol&&l(a,Symbol.iterator,{value:function(){return this}}),a;function u(l){return function(u){var c=[l,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(n){switch(n.label){case 0:return[4,null==i||null==(e=i.apiClient)?void 0:e.request({url:"multiPortals:listAccessible",method:"get",skipNotify:!0})];case 1:return[2,Array.isArray(null==(r=n.sent())||null==(t=r.data)?void 0:t.data)?r.data.data:[]]}})},function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){T(i,n,o,a,l,"next",e)}function l(e){T(i,n,o,a,l,"throw",e)}a(void 0)})})()}),u=l.data,c=l.error,s=l.loading,f=null!=u?u:[],p=(0,x.useMemo)(function(){return{display:"grid",gap:r.marginSM,gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, ".concat(o.gridMinColumnWidth,"px), 1fr))")}},[o.gridMinColumnWidth,r.marginSM]),d=(0,x.useMemo)(function(){return{alignItems:"center",background:r.colorBgContainer,border:"".concat(r.lineWidth,"px solid ").concat(r.colorBorderSecondary),borderRadius:r.borderRadiusLG,boxSizing:"border-box",color:r.colorText,display:"flex",gap:r.marginSM,height:o.cardHeight,padding:"".concat(o.paddingBlock,"px ").concat(r.paddingLG,"px"),textDecoration:"none",transition:"background ".concat(r.motionDurationMid,", border-color ").concat(r.motionDurationMid,", box-shadow ").concat(r.motionDurationMid,", transform ").concat(r.motionDurationMid)}},[o.cardHeight,o.paddingBlock,r.borderRadiusLG,r.colorBgContainer,r.colorBorderSecondary,r.colorText,r.lineWidth,r.marginSM,r.motionDurationMid,r.paddingLG]);return c?A().createElement(j.Alert,{type:"warning",message:a("Failed to load portals"),showIcon:!0}):s?A().createElement("div",{style:{minHeight:o.cardHeight}}):0===f.length?A().createElement(j.Empty,{image:j.Empty.PRESENTED_IMAGE_SIMPLE,description:a("No portals")}):A().createElement("div",{"data-testid":"multi-portal-block-grid",style:p},f.map(function(e){var t=N(e);return A().createElement("a",{key:e.uid,href:(0,_.u)(i,e.routePath,e.portalType),target:"_blank",rel:"noopener noreferrer","data-testid":"multi-portal-block-card",className:n.portalItem,style:d},A().createElement(D,{record:e,token:r}),A().createElement(R,{strong:!0,ellipsis:!0,style:{flex:1,fontSize:r.fontSizeLG,lineHeight:r.lineHeightLG,marginBottom:0,minWidth:0},title:t},t))}))}var z=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return e=r,t=arguments,e=C(e),function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,I()?Reflect.construct(e,t||[],C(this).constructor):e.apply(this,t))}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&q(r,e),t=[{key:"renderComponent",value:function(){return A().createElement(W,{model:this})}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,t),r}(t.BlockModel);function U(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){r(e);return}l.done?t(u):Promise.resolve(u).then(n,o)}function G(e,t,r){return(G=F()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&K(o,r.prototype),o}).apply(null,arguments)}z.define({label:(0,E.MZ)("Portals"),hide:!0,createModelOptions:{use:"MultiPortalBlockModel",stepParams:{cardSettings:{titleDescription:{title:(0,E.MZ)("Portals")}}}},sort:600});function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function K(e,t){return(K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $(e){var t="function"==typeof Map?new Map:void 0;return($=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return G(e,arguments,H(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),K(r,e)})(e)}function F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(F=function(){return!!e})()}var X=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=H(e),function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,F()?Reflect.construct(e,t||[],H(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&K(n,e),t=[{key:"load",value:function(){var e;return(e=function(){var e,t;return function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(a,"next",{value:u(0)}),l(a,"throw",{value:u(1)}),l(a,"return",{value:u(2)}),"function"==typeof Symbol&&l(a,Symbol.iterator,{value:function(){return this}}),a;function u(l){return function(u){var c=[l,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(n){switch(n.label){case 0:var g;return e=this,t=String(this.t("Portal manager")),this.app.flowEngine.registerModels({MultiPortalBlockModel:z}),this.app.flowEngine.registerModelLoaders({MultiPortalMobileLayoutModel:{loader:function(){return d.e("354").then(d.bind(d,833))}},MultiPortalMobileRootPageModel:{loader:function(){return d.e("354").then(d.bind(d,833))}},MultiPortalMobileChildPageModel:{loader:function(){return d.e("354").then(d.bind(d,833))}},MultiPortalMobileRootPageTabModel:{loader:function(){return d.e("354").then(d.bind(d,833))}},MultiPortalMobileChildPageTabModel:{loader:function(){return d.e("354").then(d.bind(d,833))}}}),this.app.entryActionManager&&this.app.flowEngine.registerModelLoaders({PortalEntryActionModel:{loader:function(){return d.e("499").then(d.bind(d,918))}}}),this.pluginSettingsManager.addMenuItem({key:"multi-portal",title:t,icon:"PartitionOutlined",aclSnippet:"pm.multi-portal",showTabs:!0}),this.pluginSettingsManager.addPageTabItem({menuKey:"multi-portal",key:"index",title:t,aclSnippet:"pm.multi-portal",componentLoader:function(){return d.e("845").then(d.bind(d,924))}}),!function(e,t){var r,n=e.pm;if(null==n?void 0:n.get){var o=n.get("acl")||n.get("@nocobase/plugin-acl");(null==o||null==(r=o.settingsUI)?void 0:r.addPermissionsTab)&&o.settingsUI.addPermissionsTab({key:"multi-portals",label:String(t("Portals")),sort:22,componentLoader:function(){return d.e("778").then(d.bind(d,177))}})}}(this.app,function(t){return e.t(t)}),!function(e,t){if(e.entryActionManager){var n=(0,r.G)(e),d=!0,h=!1,g=void 0;try{for(var m,w=a[Symbol.iterator]();!(d=(m=w.next()).done);d=!0){var P=m.value;e.entryActionManager.register("multi-portal:portals:".concat(P),{scope:P,sort:200,provider:function(e){return(function(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function l(e){o(a,n,i,l,u,"next",e)}function u(e){o(a,n,i,l,u,"throw",e)}l(void 0)})}})(function(){var r,o,a,d,h,g,m,w;return function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(a,"next",{value:u(0)}),l(a,"throw",{value:u(1)}),l(a,"return",{value:u(2)}),"function"==typeof Symbol&&l(a,Symbol.iterator,{value:function(){return this}}),a;function u(l){return function(u){var c=[l,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(P){switch(P.label){case 0:return[4,n.load()];case 1:var O;if(r=P.sent(),(a=(o=function(e){var t=function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;if(!s(t)||o.has(t))return n;o.add(t);var i=s(t)?t:null;return i&&(n.push(i),e(i.layoutContext,n,o),e(null==(r=i.model)?void 0:r.context,n,o)),n}(e),r=!0,n=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var c,d=i.value,y=f(null==(c=d.layout)?void 0:c.layoutType);if(y)return y}}catch(e){n=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(n)throw o}}if(t.some(function(e){var t,r,n;return!0===e.isMobileLayout||(null==(t=e.inputArgs)?void 0:t.isMobileLayout)===!0||(null==(n=e.view)||null==(r=n.inputArgs)?void 0:r.isMobileLayout)===!0}))return u;var b=!0,v=!1,h=void 0;try{for(var g,m=t[Symbol.iterator]();!(b=(g=m.next()).done);b=!0){var w=g.value,P=function(e){var t=[null==e?void 0:e.layoutModelClass,null==e?void 0:e.rootPageModelClass,null==e?void 0:e.childPageModelClass];return t.some(p)?u:t.some(f)?l:null}(w.layout);if(P)return P}}catch(e){v=!0,h=e}finally{try{b||null==m.return||m.return()}finally{if(v)throw h}}return t.some(function(e){var t,r,n;return!1===e.isMobileLayout||(null==(t=e.inputArgs)?void 0:t.isMobileLayout)===!1||(null==(n=e.view)||null==(r=n.inputArgs)?void 0:r.isMobileLayout)===!1})?l:null}(e))?r.portals.filter(function(e){return e.layout===o}):r.portals).length<=1)return[2,[]];return d=new Map(r.apps.map(function(e){return[e.name,e]})),h=function(e){var t=new Map,r=!0,n=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value,u=y(l);t.set(u,(t.get(u)||0)+1)}}catch(e){n=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(n)throw o}}return t}(a),O=r.apps,g=O.length>0||b(a.map(function(e){return e.appName})).length>1,m=function(e,r){var n=g||(h.get(y(e))||0)>1?function(e,t,r){var n=y(e),o=v(e.appName,t,r);return o?"".concat(o," / ").concat(n):n}(e,r,t):y(e),o=function(e,t,r){var n=y(e),o=v(e.appName,t,r);return o?"".concat(o," / ").concat(n):n}(e,r,t);return function(e,t,r,n){var o=y(e);return{key:"multi-portal:portal:".concat(e.appName,":").concat(e.uid||e.routePath),label:o,createModelOptions:{use:"PortalEntryActionModel",props:{title:r,icon:e.icon||"PartitionOutlined",entryPortalTitle:r,entryPortalTargetTitle:n,entryPortal:e,entryPortalApp:t}}}}(e,r,n,o)},w=g?(function(e,t){var r=b(t.map(function(e){return e.appName})),n=e.map(function(e){return e.name});return b(i(r.includes(c)?[c]:[]).concat(i(n),i(r)))})(r.apps,a).map(function(e){var r=d.get(e),n=a.filter(function(t){return t.appName===e});return n.length?{key:"multi-portal:app:".concat(e),label:v(e,r,t),children:n.map(function(e){return m(e,r)})}:null}).filter(function(e){return!!e}):a.map(function(e){return m(e,d.get(e.appName))}),[2,w.length?[{key:"multi-portal:portals",label:t("Portals"),children:w}]:[]]}})})()}})}}catch(e){h=!0,g=e}finally{try{d||null==w.return||w.return()}finally{if(h)throw g}}}}(this.app,function(t){return String(e.t(t))}),[4,(g=this.app,w(function(){var e,t;return O(this,function(r){switch(r.label){case 0:var n;return r.trys.push([0,2,,3]),[4,(n=g.apiClient,w(function(){var e,t,r;return O(this,function(o){switch(o.label){case 0:return[4,n.request({url:"multiPortals:listEnabled",method:"get",skipNotify:!0})];case 1:return[2,Array.isArray(r=null==(t=o.sent())||null==(e=t.data)?void 0:e.data)?r:[]]}})})())];case 1:return e=r.sent(),[3,3];case 2:return console.warn("[NocoBase] plugin-multi-portal failed to load portals.",r.sent()),[2];case 3:return t=function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u=a.value,c=function(e){if(!e.enabled)return null;var t,r,n,o=S[(null==(n=e.uiLayout)?void 0:n.layoutType)||""];return o?(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){P(e,t,r[t])})}return e}({routeName:e.portalName,routePath:e.routePath,uid:e.uid},o),r=r={authCheck:e.authCheck},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t):null}(u);if(!(!c||e.hasLayout(c.routeName)))try{e.registerLayout(c),r.push(u.uid)}catch(e){console.warn("[NocoBase] plugin-multi-portal failed to register portal '".concat(c.routeName,"'."),e)}}}catch(e){o=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw i}}return r}(g.layoutManager,e),(0,h.gl)(function(e){if(null==(t=e.context)?void 0:t.routeRepository)return e.context.routeRepository;var t,r,n=null==(r=e.flowEngine)?void 0:r.context;if(n&&(void 0===n?"undefined":n&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)=="object"&&"routeRepository"in n)return n.routeRepository}(g),function(){return t}),[2]}})})())];case 1:return n.sent(),[2]}})},function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){U(i,n,o,a,l,"next",e)}function l(e){U(i,n,o,a,l,"throw",e)}a(void 0)})}).call(this)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(n.prototype,t),n}($(t.Plugin))}(),m}()});
|
|
@@ -0,0 +1,38 @@
|
|
|
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 type { Application, LayoutRegisterOptions } from '@nocobase/client-v2';
|
|
10
|
+
import { getMultiPortalRouteScopeCacheKey } from './routeRepositoryScope';
|
|
11
|
+
export { getMultiPortalRouteScopeCacheKey };
|
|
12
|
+
export type MultiPortalRuntimeRecord = {
|
|
13
|
+
uid: string;
|
|
14
|
+
title?: string;
|
|
15
|
+
portalName: string;
|
|
16
|
+
routePath: string;
|
|
17
|
+
authCheck: boolean;
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
uiLayout?: {
|
|
20
|
+
layoutType?: string;
|
|
21
|
+
routeName?: string;
|
|
22
|
+
routePath?: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
type MultiPortalRegistrationApp = {
|
|
26
|
+
apiClient: Pick<Application['apiClient'], 'request'>;
|
|
27
|
+
context?: {
|
|
28
|
+
routeRepository?: unknown;
|
|
29
|
+
};
|
|
30
|
+
flowEngine?: {
|
|
31
|
+
context?: unknown;
|
|
32
|
+
};
|
|
33
|
+
layoutManager: Pick<Application['layoutManager'], 'hasLayout' | 'registerLayout'>;
|
|
34
|
+
};
|
|
35
|
+
export declare function toMultiPortalLayoutRegisterOptions(record: MultiPortalRuntimeRecord): LayoutRegisterOptions | null;
|
|
36
|
+
export declare function fetchMultiPortals(apiClient: MultiPortalRegistrationApp['apiClient']): Promise<MultiPortalRuntimeRecord[]>;
|
|
37
|
+
export declare function registerMultiPortalRecords(layoutManager: MultiPortalRegistrationApp['layoutManager'], records: MultiPortalRuntimeRecord[]): string[];
|
|
38
|
+
export declare function registerMultiPortalsFromApi(app: MultiPortalRegistrationApp): Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
export declare function useT(): (key: string, options?: Record<string, unknown>) => string;
|
|
10
|
+
export declare function getTOptions(options?: Record<string, unknown>): {
|
|
11
|
+
ns: string[];
|
|
12
|
+
};
|
|
13
|
+
export declare function tExpr(key: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
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 { BlockModel } from '@nocobase/client-v2';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export declare class MultiPortalBlockModel extends BlockModel {
|
|
12
|
+
renderComponent(): React.JSX.Element;
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { ChildPageTabModel, RootPageTabModel } from '@nocobase/client-v2';
|
|
10
|
+
import { MobileChildPageModel, MobileLayoutModel, MobileRootPageModel } from '@nocobase/plugin-ui-layout/client-v2';
|
|
11
|
+
export declare class MultiPortalMobileLayoutModel extends MobileLayoutModel {
|
|
12
|
+
get layout(): {
|
|
13
|
+
uid: string;
|
|
14
|
+
rootRouteName: string;
|
|
15
|
+
routeName: string;
|
|
16
|
+
routePath: string;
|
|
17
|
+
layoutModelClass: string;
|
|
18
|
+
rootPageModelClass: string;
|
|
19
|
+
childPageModelClass: string;
|
|
20
|
+
authCheck: boolean;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare class MultiPortalMobileRootPageModel extends MobileRootPageModel {
|
|
24
|
+
constructor(options: ConstructorParameters<typeof MobileRootPageModel>[0]);
|
|
25
|
+
}
|
|
26
|
+
export declare class MultiPortalMobileChildPageModel extends MobileChildPageModel {
|
|
27
|
+
constructor(options: ConstructorParameters<typeof MobileChildPageModel>[0]);
|
|
28
|
+
}
|
|
29
|
+
export declare class MultiPortalMobileRootPageTabModel extends RootPageTabModel {
|
|
30
|
+
save(): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export declare class MultiPortalMobileChildPageTabModel extends ChildPageTabModel {
|
|
33
|
+
onInit(options: ConstructorParameters<typeof ChildPageTabModel>[0]): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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 React from 'react';
|
|
10
|
+
type MultiPortalPrimaryKey = string;
|
|
11
|
+
type PortalSourceStorage = 'nocobase' | 'git';
|
|
12
|
+
type MultiPortalGitOptions = {
|
|
13
|
+
branch?: string;
|
|
14
|
+
path?: string;
|
|
15
|
+
repo?: string;
|
|
16
|
+
};
|
|
17
|
+
type MultiPortalOptions = {
|
|
18
|
+
git?: MultiPortalGitOptions;
|
|
19
|
+
sourceStorage?: PortalSourceStorage;
|
|
20
|
+
};
|
|
21
|
+
export type MultiPortalRecord = MultiPortalFormValues & {
|
|
22
|
+
defaultPortal?: boolean;
|
|
23
|
+
uiLayout?: {
|
|
24
|
+
layoutType?: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
uid?: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type MultiPortalFormValues = {
|
|
30
|
+
title: string;
|
|
31
|
+
uid: string;
|
|
32
|
+
portalType: string;
|
|
33
|
+
portalName: string;
|
|
34
|
+
routePath: string;
|
|
35
|
+
uiLayoutUid?: string | null;
|
|
36
|
+
icon?: string | null;
|
|
37
|
+
enabled: boolean;
|
|
38
|
+
options?: MultiPortalOptions;
|
|
39
|
+
};
|
|
40
|
+
type MultiPortalListBody = {
|
|
41
|
+
data?: MultiPortalRecord[];
|
|
42
|
+
meta?: {
|
|
43
|
+
count?: number;
|
|
44
|
+
page?: number;
|
|
45
|
+
pageSize?: number;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export type MultiPortalResource = {
|
|
49
|
+
create: (params: {
|
|
50
|
+
values: MultiPortalFormValues;
|
|
51
|
+
}) => Promise<unknown>;
|
|
52
|
+
update: (params: {
|
|
53
|
+
filterByTk: MultiPortalPrimaryKey;
|
|
54
|
+
values: MultiPortalFormValues;
|
|
55
|
+
}) => Promise<unknown>;
|
|
56
|
+
destroy: (params: {
|
|
57
|
+
filterByTk: MultiPortalPrimaryKey | MultiPortalPrimaryKey[];
|
|
58
|
+
}) => Promise<unknown>;
|
|
59
|
+
list: (params: Record<string, unknown>) => Promise<{
|
|
60
|
+
data?: MultiPortalListBody;
|
|
61
|
+
}>;
|
|
62
|
+
};
|
|
63
|
+
export declare function createMultiPortal(args: {
|
|
64
|
+
resource: MultiPortalResource;
|
|
65
|
+
values: MultiPortalFormValues;
|
|
66
|
+
onSubmitted: () => void;
|
|
67
|
+
}): Promise<void>;
|
|
68
|
+
export declare function updateMultiPortal(args: {
|
|
69
|
+
resource: MultiPortalResource;
|
|
70
|
+
filterByTk: MultiPortalPrimaryKey;
|
|
71
|
+
values: MultiPortalFormValues;
|
|
72
|
+
onSubmitted: () => void;
|
|
73
|
+
}): Promise<void>;
|
|
74
|
+
export declare function deleteMultiPortals(args: {
|
|
75
|
+
resource: MultiPortalResource;
|
|
76
|
+
filterByTk: MultiPortalPrimaryKey | MultiPortalPrimaryKey[];
|
|
77
|
+
onDeleted: () => void;
|
|
78
|
+
}): Promise<void>;
|
|
79
|
+
declare const MultiPortalsPage: React.FC;
|
|
80
|
+
export default MultiPortalsPage;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 React from 'react';
|
|
10
|
+
interface Role {
|
|
11
|
+
name: string;
|
|
12
|
+
title: string;
|
|
13
|
+
allowNewMultiPortal?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface PermissionTabProps {
|
|
16
|
+
activeKey: string;
|
|
17
|
+
activeRole: Role | null;
|
|
18
|
+
onRoleChange?: (role: Role | null) => void;
|
|
19
|
+
}
|
|
20
|
+
export default function MultiPortalPermissionsTab(props: PermissionTabProps): React.JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
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 type { Application } from '@nocobase/client-v2';
|
|
10
|
+
type Translate = (key: string) => unknown;
|
|
11
|
+
export declare function registerMultiPortalPermissionsTab(app: Application, t: Translate): void;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
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 { Plugin } from '@nocobase/client-v2';
|
|
10
|
+
export declare class PluginMultiPortalClientV2 extends Plugin {
|
|
11
|
+
load(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export default PluginMultiPortalClientV2;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
export declare function getMultiPortalRouteScopeCacheKey(portalUid: string): string;
|
|
10
|
+
export declare function getMultiPortalUidFromRouteScopeCacheKey(cacheKey: string): string;
|
|
11
|
+
export declare function installMultiPortalRouteRepositoryScope(routeRepository: unknown, portalUids: () => string[]): void;
|
|
@@ -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
|
+
export type MultiPortalAppLike = {
|
|
10
|
+
router?: {
|
|
11
|
+
basename?: string;
|
|
12
|
+
getBasename?: () => string | undefined;
|
|
13
|
+
};
|
|
14
|
+
getPublicPath?: () => string;
|
|
15
|
+
getRouteUrl?: (pathname: string) => string;
|
|
16
|
+
};
|
|
17
|
+
export type MultiPortalType = 'no-code' | 'ai';
|
|
18
|
+
export declare function getMultiPortalRouteUrl(app: MultiPortalAppLike | undefined, routePath: string, portalType?: string | null): string;
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
module.exports = {
|
|
11
|
+
"@nocobase/flow-engine": "2.2.0-alpha.10",
|
|
12
|
+
"@nocobase/client": "2.2.0-alpha.10",
|
|
13
|
+
"@nocobase/client-v2": "2.2.0-alpha.10",
|
|
14
|
+
"@nocobase/database": "2.2.0-alpha.10",
|
|
15
|
+
"@nocobase/server": "2.2.0-alpha.10",
|
|
16
|
+
"@nocobase/resourcer": "2.2.0-alpha.10",
|
|
17
|
+
"@nocobase/utils": "2.2.0-alpha.10",
|
|
18
|
+
"antd": "5.24.2",
|
|
19
|
+
"ahooks": "3.7.8",
|
|
20
|
+
"antd-style": "3.7.1",
|
|
21
|
+
"react": "18.2.0",
|
|
22
|
+
"@nocobase/plugin-ui-layout": "2.2.0-alpha.10",
|
|
23
|
+
"@ant-design/icons": "5.6.1",
|
|
24
|
+
"sequelize": "6.35.2"
|
|
25
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -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
|
+
export * from './server';
|
|
10
|
+
export { default } from './server';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
30
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
+
mod
|
|
36
|
+
));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
+
var src_exports = {};
|
|
39
|
+
__export(src_exports, {
|
|
40
|
+
default: () => import_server.default
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(src_exports);
|
|
43
|
+
__reExport(src_exports, require("./server"), module.exports);
|
|
44
|
+
var import_server = __toESM(require("./server"));
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
...require("./server")
|
|
48
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Access path": "Access path",
|
|
3
|
+
"Actions": "Actions",
|
|
4
|
+
"Add Multi-portal": "Add portal",
|
|
5
|
+
"Add portal": "Add portal",
|
|
6
|
+
"Allow access": "Allow access",
|
|
7
|
+
"Allow access to {{portal}}": "Allow access to {{portal}}",
|
|
8
|
+
"Access path cannot be /": "Access path cannot be /",
|
|
9
|
+
"Access path cannot contain empty path segments": "Access path cannot contain empty path segments",
|
|
10
|
+
"Access path cannot contain query or hash": "Access path cannot contain query or hash",
|
|
11
|
+
"Access path cannot contain wildcard": "Access path cannot contain wildcard",
|
|
12
|
+
"Access path can only contain letters, numbers, hyphens, underscores, and slashes": "Access path can only contain letters, numbers, hyphens, underscores, and slashes",
|
|
13
|
+
"Access path must start with /": "Access path must start with /",
|
|
14
|
+
"AI portal": "AI portal",
|
|
15
|
+
"Are you sure you want to delete it?": "Are you sure you want to delete it?",
|
|
16
|
+
"Are you sure you want to delete the selected Multi-portal records?": "Are you sure you want to delete the selected portal records?",
|
|
17
|
+
"Cancel": "Cancel",
|
|
18
|
+
"Delete": "Delete",
|
|
19
|
+
"Delete Multi-portal": "Delete portal",
|
|
20
|
+
"Delete portal": "Delete portal",
|
|
21
|
+
"Desktop": "Desktop",
|
|
22
|
+
"Portal type": "Portal type",
|
|
23
|
+
"Edit": "Edit",
|
|
24
|
+
"Edit Multi-portal": "Edit portal",
|
|
25
|
+
"Edit portal": "Edit portal",
|
|
26
|
+
"Enabled": "Enabled",
|
|
27
|
+
"Configure": "Configure",
|
|
28
|
+
"Configure routes permissions for {{portal}}": "Configure routes permissions for {{portal}}",
|
|
29
|
+
"Custom portals": "Portals",
|
|
30
|
+
"Failed to load routes": "Failed to load routes",
|
|
31
|
+
"Layout": "Layout",
|
|
32
|
+
"Main application": "Main",
|
|
33
|
+
"Routes permissions": "Routes permissions",
|
|
34
|
+
"Multi-portal": "Portal manager",
|
|
35
|
+
"Mobile": "Mobile",
|
|
36
|
+
"New portals are allowed to be accessed by default": "New portals are allowed to be accessed by default",
|
|
37
|
+
"New routes are allowed to be accessed by default": "New routes are allowed to be accessed by default",
|
|
38
|
+
"Must start with /. For example: /portal.": "Must start with /. For example: /portal.",
|
|
39
|
+
"No matching routes": "No matching routes",
|
|
40
|
+
"No portals": "No portals",
|
|
41
|
+
"No routes": "No routes",
|
|
42
|
+
"Failed to load portals": "Failed to load portals",
|
|
43
|
+
"Failed to save portal": "Failed to save portal",
|
|
44
|
+
"Create with AI Agent and code. Users can request changes in natural language. Path: /x/<name>": "Create with AI Agent and code. Users can request changes in natural language. Path: /x/<name>",
|
|
45
|
+
"Create with visual configuration. AI can help adjust the configuration. Path: /v/<name>": "Create with visual configuration. AI can help adjust the configuration. Path: /v/<name>",
|
|
46
|
+
"Directory inside the Git repository for this portal. Leave empty for the root.": "Directory inside the Git repository for this portal. Leave empty for the root.",
|
|
47
|
+
"Git": "Git",
|
|
48
|
+
"Git branch": "Git branch",
|
|
49
|
+
"Git path": "Git path",
|
|
50
|
+
"Git repository URL": "Git repository URL",
|
|
51
|
+
"Icon": "Icon",
|
|
52
|
+
"Manage portal source code in a Git repository.": "Manage portal source code in a Git repository.",
|
|
53
|
+
"Manage portal source code in NocoBase.": "Manage portal source code in NocoBase.",
|
|
54
|
+
"NocoBase": "NocoBase",
|
|
55
|
+
"Portal": "Portal",
|
|
56
|
+
"No-code portal": "No-code portal",
|
|
57
|
+
"Portal manager": "Portal manager",
|
|
58
|
+
"Portal name": "Portal name",
|
|
59
|
+
"Portal name can only contain lowercase letters, numbers, hyphens, and underscores": "Portal name can only contain lowercase letters, numbers, hyphens, and underscores",
|
|
60
|
+
"Portals": "Portals",
|
|
61
|
+
"Refresh": "Refresh",
|
|
62
|
+
"Route name cannot contain dots": "Route name cannot contain dots",
|
|
63
|
+
"Route name can only contain letters, numbers, hyphens, and underscores": "Route name can only contain letters, numbers, hyphens, and underscores",
|
|
64
|
+
"Route name": "Route name",
|
|
65
|
+
"Allow access to {{route}}": "Allow access to {{route}}",
|
|
66
|
+
"Saved successfully": "Saved successfully",
|
|
67
|
+
"Search routes": "Search routes",
|
|
68
|
+
"Select a role to configure permissions": "Select a role to configure permissions",
|
|
69
|
+
"Source storage": "Source storage",
|
|
70
|
+
"Submit": "Submit",
|
|
71
|
+
"Target portal": "Target portal",
|
|
72
|
+
"The corresponding portal directory will also be deleted.": "The corresponding portal directory will also be deleted.",
|
|
73
|
+
"This entry is currently unavailable. Please check the application status.": "This entry is currently unavailable. Please check the application status.",
|
|
74
|
+
"This entry is no longer available. Please remove this button.": "This entry is no longer available. Please remove this button.",
|
|
75
|
+
"Title": "Title",
|
|
76
|
+
"Title field is required": "Title field is required",
|
|
77
|
+
"The field value is required": "The field value is required",
|
|
78
|
+
"UID": "UID",
|
|
79
|
+
"Updated successfully": "Updated successfully",
|
|
80
|
+
"View": "View",
|
|
81
|
+
"When disabled, this portal will not be registered or accessible.": "When disabled, this portal will not be registered or accessible."
|
|
82
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Access path": "访问路径",
|
|
3
|
+
"Actions": "操作",
|
|
4
|
+
"Add Multi-portal": "新增 Portal",
|
|
5
|
+
"Add portal": "新增 Portal",
|
|
6
|
+
"Allow access": "允许访问",
|
|
7
|
+
"Allow access to {{portal}}": "允许访问 {{portal}}",
|
|
8
|
+
"Access path cannot be /": "访问路径不能是 /",
|
|
9
|
+
"Access path cannot contain empty path segments": "访问路径不能包含空路径片段",
|
|
10
|
+
"Access path cannot contain query or hash": "访问路径不能包含查询参数或哈希",
|
|
11
|
+
"Access path cannot contain wildcard": "访问路径不能包含通配符",
|
|
12
|
+
"Access path can only contain letters, numbers, hyphens, underscores, and slashes": "访问路径只能包含英文字母、数字、连字符、下划线和斜杠",
|
|
13
|
+
"Access path must start with /": "访问路径必须以 / 开头",
|
|
14
|
+
"AI portal": "AI Portal",
|
|
15
|
+
"Are you sure you want to delete it?": "确定要删除吗?",
|
|
16
|
+
"Are you sure you want to delete the selected Multi-portal records?": "确定要删除选中的 Portal 记录吗?",
|
|
17
|
+
"Cancel": "取消",
|
|
18
|
+
"Delete": "删除",
|
|
19
|
+
"Delete Multi-portal": "删除 Portal",
|
|
20
|
+
"Delete portal": "删除 Portal",
|
|
21
|
+
"Desktop": "桌面端",
|
|
22
|
+
"Portal type": "Portal 类型",
|
|
23
|
+
"Edit": "编辑",
|
|
24
|
+
"Edit Multi-portal": "编辑 Portal",
|
|
25
|
+
"Edit portal": "编辑 Portal",
|
|
26
|
+
"Enabled": "启用",
|
|
27
|
+
"Configure": "配置",
|
|
28
|
+
"Configure routes permissions for {{portal}}": "配置 {{portal}} 的路由权限",
|
|
29
|
+
"Custom portals": "Portal",
|
|
30
|
+
"Failed to load routes": "加载路由失败",
|
|
31
|
+
"Layout": "布局",
|
|
32
|
+
"Main application": "主应用",
|
|
33
|
+
"Routes permissions": "路由权限",
|
|
34
|
+
"Multi-portal": "Portal 管理",
|
|
35
|
+
"Mobile": "移动端",
|
|
36
|
+
"New portals are allowed to be accessed by default": "新建 Portal 默认允许访问",
|
|
37
|
+
"New routes are allowed to be accessed by default": "新建路由默认允许访问",
|
|
38
|
+
"Must start with /. For example: /portal.": "必须以 / 开头,例如 /portal。",
|
|
39
|
+
"No matching routes": "无匹配路由",
|
|
40
|
+
"No portals": "暂无 Portal",
|
|
41
|
+
"No routes": "暂无路由",
|
|
42
|
+
"Failed to load portals": "加载 Portal 失败",
|
|
43
|
+
"Failed to save portal": "保存 Portal 失败",
|
|
44
|
+
"Create with AI Agent and code. Users can request changes in natural language. Path: /x/<name>": "通过 AI Agent 和代码创建,可用自然语言提出修改要求。访问路径:/x/<name>",
|
|
45
|
+
"Create with visual configuration. AI can help adjust the configuration. Path: /v/<name>": "通过可视化配置创建,AI 可以协助调整配置。访问路径:/v/<name>",
|
|
46
|
+
"Directory inside the Git repository for this portal. Leave empty for the root.": "该 Portal 在 Git 仓库内的目录,留空表示仓库根目录。",
|
|
47
|
+
"Git": "Git",
|
|
48
|
+
"Git branch": "Git 分支",
|
|
49
|
+
"Git path": "Git 路径",
|
|
50
|
+
"Git repository URL": "Git 仓库 URL",
|
|
51
|
+
"Icon": "图标",
|
|
52
|
+
"Manage portal source code in a Git repository.": "在 Git 仓库中管理 Portal 源码。",
|
|
53
|
+
"Manage portal source code in NocoBase.": "在 NocoBase 中管理 Portal 源码。",
|
|
54
|
+
"NocoBase": "NocoBase",
|
|
55
|
+
"Portal": "Portal",
|
|
56
|
+
"No-code portal": "无代码 Portal",
|
|
57
|
+
"Portal manager": "Portal 管理",
|
|
58
|
+
"Portal name": "Portal 名称",
|
|
59
|
+
"Portal name can only contain lowercase letters, numbers, hyphens, and underscores": "Portal 名称只能包含小写英文字母、数字、连字符和下划线",
|
|
60
|
+
"Portals": "Portal",
|
|
61
|
+
"Refresh": "刷新",
|
|
62
|
+
"Route name cannot contain dots": "路由名称不能包含点号",
|
|
63
|
+
"Route name can only contain letters, numbers, hyphens, and underscores": "路由名称只能包含英文字母、数字、连字符和下划线",
|
|
64
|
+
"Route name": "路由名称",
|
|
65
|
+
"Allow access to {{route}}": "允许访问 {{route}}",
|
|
66
|
+
"Saved successfully": "保存成功",
|
|
67
|
+
"Search routes": "搜索路由",
|
|
68
|
+
"Select a role to configure permissions": "请选择角色后配置权限",
|
|
69
|
+
"Source storage": "源码存储",
|
|
70
|
+
"Submit": "提交",
|
|
71
|
+
"Target portal": "目标 Portal",
|
|
72
|
+
"The corresponding portal directory will also be deleted.": "对应的 Portal 目录也会被删除。",
|
|
73
|
+
"This entry is currently unavailable. Please check the application status.": "当前不可用,请检查应用状态。",
|
|
74
|
+
"This entry is no longer available. Please remove this button.": "该入口当前不可用,请移除此按钮。",
|
|
75
|
+
"Title": "标题",
|
|
76
|
+
"Title field is required": "标题字段为必填项",
|
|
77
|
+
"The field value is required": "字段值为必填项",
|
|
78
|
+
"UID": "UID",
|
|
79
|
+
"Updated successfully": "更新成功",
|
|
80
|
+
"View": "查看",
|
|
81
|
+
"When disabled, this portal will not be registered or accessible.": "关闭后,该 Portal 将不会注册,也无法访问。"
|
|
82
|
+
}
|