@nocobase/plugin-acl 2.1.0-beta.22 → 2.1.0-beta.23

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.
@@ -6,5 +6,9 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
-
10
- "use strict";(self.webpackChunk_nocobase_plugin_acl=self.webpackChunk_nocobase_plugin_acl||[]).push([["627"],{726:function(n,e,u){u.r(e),u.d(e,{default:function(){return l}});var c=u(155),t=u.n(c);function l(){return t().createElement("div",null,"App Info Demo Route")}}}]);
9
+ import React from 'react';
10
+ /**
11
+ * v2 右上角 UI Editor 开关。
12
+ */
13
+ export declare const DesignableSwitch: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<unknown>>;
14
+ export default DesignableSwitch;
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client-v2"),require("@formily/core"),require("react"),require("antd"),require("@formily/react"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-acl",["@nocobase/client-v2","@formily/core","react","antd","@formily/react","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-acl"]=t(require("@nocobase/client-v2"),require("@formily/core"),require("react"),require("antd"),require("@formily/react"),require("@nocobase/flow-engine")):e["@nocobase/plugin-acl"]=t(e["@nocobase/client-v2"],e["@formily/core"],e.react,e.antd,e["@formily/react"],e["@nocobase/flow-engine"])}(self,function(e,t,n,r,o,i){return function(){"use strict";var c,a,u,l={452:function(e){e.exports=t},230:function(e){e.exports=o},485:function(t){t.exports=e},694:function(e){e.exports=i},59:function(e){e.exports=r},155:function(e){e.exports=n}},f={};function p(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={exports:{}};return l[e](n,n.exports,p),n.exports}p.m=l,p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,{a:t}),t},p.d=function(e,t){for(var n in t)p.o(t,n)&&!p.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},p.f={},p.e=function(e){return Promise.all(Object.keys(p.f).reduce(function(t,n){return p.f[n](e,t),t},[]))},p.u=function(e){return""+e+"."+({139:"929bc11d582ef7d4",193:"3245b23f17b4c9f8",366:"069b6cf12cfb9a67",627:"ce101823deb86dd6"})[e]+".js"},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s={},p.l=function(e,t,n,r){if(s[e])return void s[e].push(t);if(void 0!==n)for(var o,i,c=document.getElementsByTagName("script"),a=0;a<c.length;a++){var u=c[a];if(u.getAttribute("src")==e||u.getAttribute("data-rspack")=="@nocobase/plugin-acl:"+n){o=u;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,p.nc&&o.setAttribute("nonce",p.nc),o.setAttribute("data-rspack","@nocobase/plugin-acl:"+n),o.src=e),s[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(f);var r=s[e];if(delete s[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},p.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.g.importScripts&&(d=p.g.location+"");var s,d,b=p.g.document;if(!d&&b&&(b.currentScript&&"SCRIPT"===b.currentScript.tagName.toUpperCase()&&(d=b.currentScript.src),!d)){var h=b.getElementsByTagName("script");if(h.length)for(var v=h.length-1;v>-1&&(!d||!/^http(s?):/.test(d));)d=h[v--].src}if(!d)throw Error("Automatic publicPath is not supported in this browser");p.p=d.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c={889:0},p.f.j=function(e,t){var n=p.o(c,e)?c[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=c[e]=[t,r]});t.push(n[2]=r);var o=p.p+p.u(e),i=Error();p.l(o,function(t){if(p.o(c,e)&&(0!==(n=c[e])&&(c[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},a=function(e,t){var n,r,o=t[0],i=t[1],a=t[2],u=0;if(o.some(function(e){return 0!==c[e]})){for(n in i)p.o(i,n)&&(p.m[n]=i[n]);a&&a(p)}for(e&&e(t);u<o.length;u++)r=o[u],p.o(c,r)&&c[r]&&c[r][0](),c[r]=0},(u=self.webpackChunk_nocobase_plugin_acl=self.webpackChunk_nocobase_plugin_acl||[]).forEach(a.bind(null,0)),u.push=a.bind(null,u.push.bind(u));var y={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src&&(e=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!e){var n=window.__webpack_public_path__||"";n&&("/"!==n.charAt(n.length-1)&&(n+="/"),e=n+"static/plugins/@nocobase/plugin-acl/dist/client-v2/")}if(!e){if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var r=window.location.pathname||"/",o=r.indexOf("/v2/");e=o>=0?r.slice(0,o+1):"/"}e&&(e=e.replace(/\/v2\/?$/,"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-acl/dist/client-v2/"}p.p=e}(),!function(){p.r(y),p.d(y,{default:function(){return a}});var e=p(485);function t(e,t,n,r,o,i,c){try{var a=e[i](c),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,o)}function n(e,t,r){return(n=c()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i}).apply(null,arguments)}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e){var t="function"==typeof Map?new Map:void 0;return(i=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,i)}function i(){return n(e,arguments,r(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),o(i,e)})(e)}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}var a=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function i(){var e,t;if(!(this instanceof i))throw TypeError("Cannot call a class as a function");return e=i,t=arguments,e=r(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,c()?Reflect.construct(e,t||[],r(this).constructor):e.apply(this,t))}return i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),e&&o(i,e),n=[{key:"load",value:function(){var e;return(e=function(){var e;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(c,"next",{value:u(0)}),a(c,"throw",{value:u(1)}),a(c,"return",{value:u(2)}),"function"==typeof Symbol&&a(c,Symbol.iterator,{value:function(){return this}}),c;function u(a){return function(u){var l=[a,u];if(n)throw TypeError("Generator is already executing.");for(;c&&(c=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:this.flowEngine.flowSettings.registerComponentLoaders({DemoFlowSettingsLazyField:function(){return p.e("193").then(p.bind(p,296))}}),this.router.add("acl-v2.homepage",{path:"/v2-demo/",componentLoader:function(){return p.e("366").then(p.bind(p,173))}}),this.router.add("acl-v2.app-info",{path:"/v2-demo/app-info",componentLoader:function(){return p.e("627").then(p.bind(p,726))}}),this.router.add("acl-v2.flow-settings-component-loader",{path:"/v2-demo/flow-settings-component-loader",componentLoader:function(){return p.e("139").then(p.bind(p,870))}}),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.app.apiClient.request({url:"app:getInfo"})];case 2:return console.log("[client-v2 demo plugin] /api/app:getInfo",null==(e=t.sent())?void 0:e.data),[3,4];case 3:return console.error("[client-v2 demo plugin] failed to request /api/app:getInfo",t.sent()),[3,4];case 4:return[2]}})},function(){var n=this,r=arguments;return new Promise(function(o,i){var c=e.apply(n,r);function a(e){t(c,o,i,a,u,"next",e)}function u(e){t(c,o,i,a,u,"throw",e)}a(void 0)})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(i.prototype,n),i}(i(e.Plugin))}(),y}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client-v2")):"function"==typeof define&&define.amd?define("@nocobase/plugin-acl",["@nocobase/client-v2"],t):"object"==typeof exports?exports["@nocobase/plugin-acl"]=t(require("@nocobase/client-v2")):e["@nocobase/plugin-acl"]=t(e["@nocobase/client-v2"])}(self,function(e){return function(){"use strict";var t={485:function(t){t.exports=e}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.g.importScripts&&(r=o.g.location+"");var r,i=o.g.document;if(!r&&i&&(i.currentScript&&"SCRIPT"===i.currentScript.tagName.toUpperCase()&&(r=i.currentScript.src),!r)){var l=i.getElementsByTagName("script");if(l.length)for(var s=l.length-1;s>-1&&(!r||!/^http(s?):/.test(r));)r=l[s--].src}if(!r)throw Error("Automatic publicPath is not supported in this browser");o.p=r.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");var u={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src&&(e=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!e){var n=window.__webpack_public_path__||"";n&&("/"!==n.charAt(n.length-1)&&(n+="/"),e=n+"static/plugins/@nocobase/plugin-acl/dist/client-v2/")}if(!e){if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var r=window.location.pathname||"/",i=r.indexOf("/v2/");e=i>=0?r.slice(0,i+1):"/"}e&&(e=e.replace(/\/v2\/?$/,"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-acl/dist/client-v2/"}o.p=e}(),!function(){o.r(u),o.d(u,{default:function(){return P}});var e=o(485),t={"en-US":JSON.parse('{"Allow roles union":"Allow roles union","Allow users to use role union, which means they can use permissions from all their roles simultaneously, or switch between individual roles.":"Allow users to use role union, which means they can use permissions from all their roles simultaneously, or switch between individual roles.","Data sources":"Data sources","Desktop menu":"Desktop menu","Do not use role union. Users need to switch between their roles individually.":"Do not use role union. Users need to switch between their roles individually.","Force users to use only role union. They cannot switch between individual roles.":"Force users to use only role union. They cannot switch between individual roles.","Full permissions":"Full permissions","General":"General","Independent roles":"Independent roles","New role":"New role","Permissions":"Permissions","Please select role mode":"Please select role mode","Plugin settings":"Plugin settings","Role mode":"Role mode","Role mode doc":"https://docs.nocobase.com/handbook/acl/manual","Roles & Permissions":"Roles & Permissions","Roles union only":"Roles union only","Saved successfully":"Saved successfully","The current user has no roles. Please try another account.":"The current user has no roles. Please try another account.","The user role does not exist. Please try signing in again":"The user role does not exist. Please try signing in again"}'),"zh-CN":JSON.parse('{"Allow roles union":"允许角色并集","Allow users to use role union, which means they can use permissions from all their roles simultaneously, or switch between individual roles.":"允许用户使用角色并集,即可以同时使用自己拥有的所有角色的权限,也允许用户逐个切换自己的角色。","Data sources":"数据源","Desktop menu":"桌面端菜单","Do not use role union. Users need to switch between their roles individually.":"不使用角色并集,用户需要逐个切换自己拥有的角色。","Force users to use only role union. They cannot switch between individual roles.":"强制用户仅能使用角色并集,不能逐个切换角色。","Full permissions":"全部权限","General":"通用","Independent roles":"独立角色","New role":"新建角色","Permissions":"权限","Please select role mode":"请选择角色模式","Plugin settings":"插件设置","Role mode":"角色模式","Role mode doc":"https://docs-cn.nocobase.com/handbook/acl/manual","Roles & Permissions":"角色和权限","Roles union only":"仅角色并集","Saved successfully":"保存成功","The current user has no roles. Please try another account.":"当前用户没有角色,请使用其他账号。","The user role does not exist. Please try signing in again":"用户角色不存在,请尝试重新登录。"}')};function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function r(e,t,n,o,r,i,l){try{var s=e[i](l),u=s.value}catch(e){n(e);return}s.done?t(u):Promise.resolve(u).then(o,r)}function i(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var l=e.apply(t,n);function s(e){r(l,o,i,s,u,"next",e)}function u(e){r(l,o,i,s,u,"throw",e)}s(void 0)})}}function l(e,t,n){return t=h(t),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,m()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n))}function s(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function a(e,t,n){return(a=m()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&y(r,n.prototype),r}).apply(null,arguments)}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t){if(e){if("string"==typeof e)return n(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if("Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o)return Array.from(o);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return n(e,t)}}function v(e){var t="function"==typeof Map?new Map:void 0;return(v=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,n)}function n(){return a(e,arguments,h(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,e)})(e)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}function w(e,t){var n,o,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(l,"next",{value:u(0)}),s(l,"throw",{value:u(1)}),s(l,"return",{value:u(2)}),"function"==typeof Symbol&&s(l,Symbol.iterator,{value:function(){return this}}),l;function u(s){return function(u){var a=[s,u];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,a[0]&&(i=0)),i;)try{if(n=1,o&&(r=2&a[0]?o.return:a[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,o=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=(r=i.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],o=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}var g=function(e){function t(){var e;return s(this,t),e=l(this,t,arguments),f(e,"section","preferences"),f(e,"sort",300),f(e,"label","Switch role"),e}return d(t,e),p(t,[{key:"prepare",value:function(){return i(function(){var e,t,o,r,i,l,s,u;return w(this,function(a){return i=Array.isArray(null==(e=this.context.user)?void 0:e.roles)?this.context.user.roles:[],l=null==(o=this.context.acl)||null==(t=o.data)?void 0:t.roleMode,s=this.context.api.auth.role,u=function(e){if(Array.isArray(e))return n(e)}(i)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||b(i)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),"allow-use-union"===l&&u.unshift({name:"__union__",title:this.context.t("Full permissions",{ns:"@nocobase/plugin-acl"})}),this.options=u.map(function(e){return{value:e.name,label:e.title||e.name}}),this.value=s||(null==(r=this.options[0])?void 0:r.value),this.ready=this.options.length>1&&"only-use-union"!==l,[2]})}).call(this)}},{key:"onChange",value:function(e){return i(function(){return w(this,function(t){switch(t.label){case 0:return this.context.api.auth.setRole(e),[4,this.context.api.resource("users").setDefaultRole({values:{roleName:e}})];case 1:return t.sent(),window.location.reload(),[2]}})}).call(this)}}]),t}(e.UserCenterSelectItemModel);f(g,"itemId","switch-role");var P=function(n){function o(){return s(this,o),l(this,o,arguments)}return d(o,n),p(o,[{key:"load",value:function(){return i(function(){var n;return w(this,function(o){return n=this,Object.entries(t).forEach(function(e){var t,o=function(e){if(Array.isArray(e))return e}(e)||function(e){var t,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var r=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(t=o.next()).done)&&(r.push(t.value),2!==r.length);i=!0);}catch(e){l=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(l)throw n}}return r}}(e)||b(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=o[0],i=o[1];n.app.i18n.addResources(r,(null==(t=n.options)?void 0:t.packageName)||"@nocobase/plugin-acl",i)}),this.app.use(e.ACLRolesCheckProvider),this.app.flowEngine.registerModels({UIEditorTopbarActionModel:e.UIEditorTopbarActionModel,SwitchRoleItemModel:g}),[2]})}).call(this)}}]),o}(v(e.Plugin))}(),u}()});
@@ -0,0 +1,54 @@
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 const aclLocaleResources: {
10
+ 'en-US': {
11
+ "Allow roles union": string;
12
+ "Allow users to use role union, which means they can use permissions from all their roles simultaneously, or switch between individual roles.": string;
13
+ "Data sources": string;
14
+ "Desktop menu": string;
15
+ "Do not use role union. Users need to switch between their roles individually.": string;
16
+ "Force users to use only role union. They cannot switch between individual roles.": string;
17
+ "Full permissions": string;
18
+ General: string;
19
+ "Independent roles": string;
20
+ "New role": string;
21
+ Permissions: string;
22
+ "Please select role mode": string;
23
+ "Plugin settings": string;
24
+ "Role mode": string;
25
+ "Role mode doc": string;
26
+ "Roles & Permissions": string;
27
+ "Roles union only": string;
28
+ "Saved successfully": string;
29
+ "The current user has no roles. Please try another account.": string;
30
+ "The user role does not exist. Please try signing in again": string;
31
+ };
32
+ 'zh-CN': {
33
+ "Allow roles union": string;
34
+ "Allow users to use role union, which means they can use permissions from all their roles simultaneously, or switch between individual roles.": string;
35
+ "Data sources": string;
36
+ "Desktop menu": string;
37
+ "Do not use role union. Users need to switch between their roles individually.": string;
38
+ "Force users to use only role union. They cannot switch between individual roles.": string;
39
+ "Full permissions": string;
40
+ General: string;
41
+ "Independent roles": string;
42
+ "New role": string;
43
+ Permissions: string;
44
+ "Please select role mode": string;
45
+ "Plugin settings": string;
46
+ "Role mode": string;
47
+ "Role mode doc": string;
48
+ "Roles & Permissions": string;
49
+ "Roles union only": string;
50
+ "Saved successfully": string;
51
+ "The current user has no roles. Please try another account.": string;
52
+ "The user role does not exist. Please try signing in again": string;
53
+ };
54
+ };
@@ -1,3 +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
+ */
1
9
  import { Plugin } from '@nocobase/client-v2';
2
10
  export declare class PluginAclClientV2 extends Plugin {
3
11
  load(): Promise<void>;
@@ -8,7 +8,7 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.1.0-beta.22",
11
+ "@nocobase/client": "2.1.0-beta.23",
12
12
  "antd": "5.24.2",
13
13
  "react": "18.2.0",
14
14
  "react-i18next": "11.18.6",
@@ -17,16 +17,16 @@ module.exports = {
17
17
  "@formily/react": "2.3.7",
18
18
  "@ant-design/icons": "5.6.1",
19
19
  "lodash": "4.18.1",
20
- "@nocobase/utils": "2.1.0-beta.22",
21
- "@nocobase/client-v2": "2.1.0-beta.22",
22
- "@nocobase/actions": "2.1.0-beta.22",
23
- "@nocobase/cache": "2.1.0-beta.22",
24
- "@nocobase/database": "2.1.0-beta.22",
25
- "@nocobase/server": "2.1.0-beta.22",
26
- "@nocobase/acl": "2.1.0-beta.22",
27
- "@nocobase/test": "2.1.0-beta.22",
20
+ "@nocobase/utils": "2.1.0-beta.23",
21
+ "@nocobase/client-v2": "2.1.0-beta.23",
22
+ "@nocobase/actions": "2.1.0-beta.23",
23
+ "@nocobase/cache": "2.1.0-beta.23",
24
+ "@nocobase/database": "2.1.0-beta.23",
25
+ "@nocobase/server": "2.1.0-beta.23",
26
+ "@nocobase/acl": "2.1.0-beta.23",
27
+ "@nocobase/test": "2.1.0-beta.23",
28
28
  "@formily/core": "2.3.7",
29
29
  "@formily/antd-v5": "1.2.3",
30
30
  "antd-style": "3.7.1",
31
- "@nocobase/flow-engine": "2.1.0-beta.22"
31
+ "@nocobase/flow-engine": "2.1.0-beta.23"
32
32
  };
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "description": "Based on roles, resources, and actions, access control can precisely manage interface configuration permissions, data operation permissions, menu access permissions, and plugin permissions.",
7
7
  "description.ru-RU": "На основе ролей, ресурсов и действий система контроля доступа может точно управлять разрешениями на изменение интерфейса, работу с данными, доступ к меню и разрешениями для подключаемых модулей.",
8
8
  "description.zh-CN": "基于角色、资源和操作的权限控制,可以精确控制界面配置权限、数据操作权限、菜单访问权限、插件权限。",
9
- "version": "2.1.0-beta.22",
9
+ "version": "2.1.0-beta.23",
10
10
  "license": "Apache-2.0",
11
11
  "main": "./dist/server/index.js",
12
12
  "homepage": "https://docs.nocobase.com/handbook/acl",
@@ -46,5 +46,5 @@
46
46
  "url": "git+https://github.com/nocobase/nocobase.git",
47
47
  "directory": "packages/plugins/acl"
48
48
  },
49
- "gitHead": "53ad02861ed8e813103f59659804417118c85b4c"
49
+ "gitHead": "bb4c0d3551bf9eff505b63756dd24a0813231f16"
50
50
  }
@@ -1,10 +0,0 @@
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
- "use strict";(self.webpackChunk_nocobase_plugin_acl=self.webpackChunk_nocobase_plugin_acl||[]).push([["139"],{870:function(e,n,t){t.r(n),t.d(n,{default:function(){return u}});var o=t(452),r=t(230),c=t(694),l=t(155),a=t.n(l),i=(0,r.createSchemaField)();function u(){var e=(0,c.useFlowEngineContext)().app,n=a().useMemo(function(){return(0,o.createForm)()},[]);return a().createElement("div",null,a().createElement("div",null,"Flow Settings Component Loader Demo Route"),a().createElement(r.FormProvider,{form:n},a().createElement(i,{schema:{type:"object",properties:{demo:{type:"void","x-component":"DemoFlowSettingsLazyField"}}},components:e.flowEngine.flowSettings.components})))}}}]);
@@ -1,10 +0,0 @@
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
- "use strict";(self.webpackChunk_nocobase_plugin_acl=self.webpackChunk_nocobase_plugin_acl||[]).push([["193"],{296:function(e,n,u){u.r(n),u.d(n,{default:function(){return a}});var l=u(155),t=u.n(l);function a(){return t().createElement("div",null,"Demo Flow Settings Lazy Field Loaded")}}}]);
@@ -1,10 +0,0 @@
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
- "use strict";(self.webpackChunk_nocobase_plugin_acl=self.webpackChunk_nocobase_plugin_acl||[]).push([["366"],{173:function(e,t,n){n.r(t),n.d(t,{default:function(){return a}});var o=n(155),u=n.n(o),r=n(59),l=n(694);function a(){var e=(0,l.useFlowContext)();return u().createElement(u().Fragment,null,u().createElement("div",null,"Demo Homepage Route",u().createElement(r.Button,{onClick:function(){return e.router.navigate("app-info")}},"Go to demo route")),u().createElement("div",null,"Demo flow settings page",u().createElement(r.Button,{onClick:function(){return e.router.navigate("flow-settings-component-loader")}},"Go to demo route")))}}}]);