@nocobase/plugin-users 3.0.0-alpha.4 → 3.0.0-alpha.5
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.
|
@@ -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
|
+
"use strict";(self.webpackChunk_nocobase_plugin_users_client_v2=self.webpackChunk_nocobase_plugin_users_client_v2||[]).push([["786"],{241:function(e,t,n){n.r(t),n.d(t,{SignOutItemModel:function(){return l}});var r=n(485);function o(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){n(e);return}u.done?t(c):Promise.resolve(c).then(r,o)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}var l=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,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=a(t),i(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(t,r||[],a(this).constructor):t.apply(this,r)),"section","danger"),i(e,"sort",1e3),i(e,"label","Sign out"),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&u(n,e),t=[{key:"onClick",value:function(){var e;return(e=function(){var e,t,n,o,i,a;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:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:c(0)}),u(a,"throw",{value:c(1)}),u(a,"return",{value:c(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function c(u){return function(c){var l=[u,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=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(u){switch(u.label){case 0:return n=(0,r.getCurrentV2RedirectPath)(this.context.app,window.location),o=(0,r.resolveUnauthenticatedSignInRoute)(this.context.app,window.location.pathname),[4,this.context.api.auth.signOut()];case 1:if(i=u.sent(),"/signin"!==o)return(0,r.redirectToV2Signin)(this.context.app,n,{replace:!0,signInRoutePath:o}),[2];if(a=(0,r.resolveV2SigninRedirect)(null==i||null==(t=i.data)||null==(e=t.data)?void 0:e.redirect,this.context.app))return window.location.replace(a),[2];return(0,r.redirectToV2Signin)(this.context.app,n,{replace:!0}),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function u(e){o(a,r,i,u,c,"next",e)}function c(e){o(a,r,i,u,c,"throw",e)}u(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)}}(n.prototype,t),n}(r.UserCenterActionItemModel);i(l,"itemId","sign-out"),t.default=l}}]);
|
package/dist/client-v2/index.js
CHANGED
|
@@ -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("ahooks"),require("@emotion/css"),require("@nocobase/plugin-acl/client-v2"),require("@nocobase/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-users/client-v2",["ahooks","@emotion/css","@nocobase/plugin-acl/client-v2","@nocobase/client-v2","react","antd","@ant-design/icons","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-users/client-v2"]=t(require("ahooks"),require("@emotion/css"),require("@nocobase/plugin-acl/client-v2"),require("@nocobase/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine")):e["@nocobase/plugin-users/client-v2"]=t(e.ahooks,e["@emotion/css"],e["@nocobase/plugin-acl/client-v2"],e["@nocobase/client-v2"],e.react,e.antd,e["@ant-design/icons"],e["@nocobase/flow-engine"])}(self,function(e,t,n,r,o,i,u,a){return function(){"use strict";var c,s,l,f,p,d={667:function(e,t,n){n.d(t,{X:function(){return p}});var r=n(485),o=n(762),i=n.n(o);function u(e,t,n,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){n(e);return}a.done?t(c):Promise.resolve(c).then(r,o)}function a(e,t,n){return(a=f()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&s(o,n.prototype),o}).apply(null,arguments)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t="function"==typeof Map?new Map:void 0;return(l=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,c(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,e)})(e)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}var p=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,n,o,i,u;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=c(t),o=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,f()?Reflect.construct(t,n||[],c(this).constructor):t.apply(this,n)),i="passwordValidators",u=new Map,i in o?Object.defineProperty(o,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):o[i]=u,e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&s(r,e),t=[{key:"registerPasswordValidator",value:function(e,t){this.passwordValidators.set(e,t)}},{key:"unregisterPasswordValidator",value:function(e){this.passwordValidators.delete(e)}},{key:"getPasswordValidators",value:function(){return Array.from(this.passwordValidators.values())}},{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:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(u,"next",{value:c(0)}),a(u,"throw",{value:c(1)}),a(u,"return",{value:c(2)}),"function"==typeof Symbol&&a(u,Symbol.iterator,{value:function(){return this}}),u;function c(a){return function(c){var s=[a,c];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}}(this,function(t){return this.pluginSettingsManager.has("users-permissions")||this.pluginSettingsManager.addMenuItem({key:"users-permissions",title:this.t("Users & Permissions"),isPinned:!0,sort:200,icon:"TeamOutlined",showTabs:!0}),this.pluginSettingsManager.addPageTabItem({menuKey:"users-permissions",key:"users",title:this.t("Users"),icon:"UserOutlined",aclSnippet:"pm.users",sort:2,componentLoader:function(){return Promise.all([n.e("564"),n.e("917")]).then(n.bind(n,924))}}),this.pluginSettingsManager.setPluginSettingsLink("users","users-permissions.users"),null==(e=this.app.pm.get(i()))||e.rolesManager.add("users",{title:String(this.t("Users")),sort:10,componentLoader:function(){return Promise.all([n.e("564"),n.e("521")]).then(n.bind(n,240))}}),this.app.flowEngine.registerModelLoaders({EditProfileItemModel:{extends:"UserCenterItemModel",loader:function(){return n.e("784").then(n.bind(n,467))}},UserPasswordFieldModel:{extends:"PasswordFieldModel",loader:function(){return n.e("569").then(n.bind(n,552))}},UserRolesSelectFieldModel:{extends:"RecordSelectFieldModel",loader:function(){return n.e("143").then(n.bind(n,466))}},ChangePasswordItemModel:{extends:"UserCenterItemModel",loader:function(){return n.e("862").then(n.bind(n,381))}},CurrentUserSummaryItemModel:{extends:"UserCenterItemModel",loader:function(){return n.e("587").then(n.bind(n,638))}},SignOutItemModel:{extends:"UserCenterItemModel",loader:function(){return n.e("786").then(n.bind(n,241))}}}),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,c,"next",e)}function c(e){u(i,r,o,a,c,"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)}}(r.prototype,t),r}(l(r.Plugin));t.A=p},488:function(e,t,n){n.d(t,{CU:function(){return i},MZ:function(){return c},kj:function(){return a},nK:function(){return u}});var r=n(694);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var i="@nocobase/plugin-users";function u(){return{t:a()}}function a(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,o({ns:[i,"users","client"]},n))}}function c(e,t){return(0,r.tExpr)(e,o({ns:[i,"users","client"]},t))}},375:function(e){e.exports=u},477:function(e){e.exports=t},485:function(e){e.exports=r},694:function(e){e.exports=a},762:function(e){e.exports=n},625:function(t){t.exports=e},59:function(e){e.exports=i},155:function(e){e.exports=o}},b={};function g(e){var t=b[e];if(void 0!==t)return t.exports;var n=b[e]={exports:{}};return d[e](n,n.exports,g),n.exports}g.m=d,g.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return g.d(t,{a:t}),t},g.d=function(e,t){for(var n in t)g.o(t,n)&&!g.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},g.f={},g.e=function(e){return Promise.all(Object.keys(g.f).reduce(function(t,n){return g.f[n](e,t),t},[]))},g.u=function(e){return""+e+"."+({143:"8fc4573e64ec8c3f",521:"5f0b4118bfc47f22",564:"ccb0fa75945b6395",569:"07f16da700ba0ba6",587:"a15f1f5b0dbbf4d5",784:"25ee62a1613da5a6",786:"ca0dea7bc67662c3",862:"2aac0dea47472edf",917:"e302fd311c0845a3"})[e]+".js"},g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),g.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},v={},g.l=function(e,t,n,r){if(v[e])return void v[e].push(t);if(void 0!==n)for(var o,i,u=document.getElementsByTagName("script"),a=0;a<u.length;a++){var c=u[a];if(c.getAttribute("src")==e||c.getAttribute("data-rspack")=="@nocobase/plugin-users/client-v2:"+n){o=c;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,g.nc&&o.setAttribute("nonce",g.nc),o.setAttribute("data-rspack","@nocobase/plugin-users/client-v2:"+n),o.src=e),v[e]=[t];var s=function(t,n){o.onerror=o.onload=null,clearTimeout(l);var r=v[e];if(delete v[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},l=setTimeout(s.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=s.bind(null,o.onerror),o.onload=s.bind(null,o.onload),i&&document.head.appendChild(o)},g.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},g.g.importScripts&&(h=g.g.location+"");var v,h,y=g.g.document;if(!h&&y&&(y.currentScript&&"SCRIPT"===y.currentScript.tagName.toUpperCase()&&(h=y.currentScript.src),!h)){var m=y.getElementsByTagName("script");if(m.length)for(var w=m.length-1;w>-1&&(!h||!/^http(s?):/.test(h));)h=m[w--].src}if(!h)throw Error("Automatic publicPath is not supported in this browser");g.p=h.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c={889:0},g.f.j=function(e,t){var n=g.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=g.p+g.u(e),i=Error();g.l(o,function(t){if(g.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)}},s=function(e,t){var n,r,o=t[0],i=t[1],u=t[2],a=0;if(o.some(function(e){return 0!==c[e]})){for(n in i)g.o(i,n)&&(g.m[n]=i[n]);u&&u(g)}for(e&&e(t);a<o.length;a++)r=o[a],g.o(c,r)&&c[r]&&c[r][0](),c[r]=0},(l=self.webpackChunk_nocobase_plugin_users_client_v2=self.webpackChunk_nocobase_plugin_users_client_v2||[]).forEach(s.bind(null,0)),l.push=s.bind(null,l.push.bind(l));var _={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-users/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-users/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 u=window.location.pathname||"/",a=u.indexOf(i);e=a>=0?u.slice(0,a+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-users/dist/client-v2/"}g.p=e}(),g.r(_),g.d(_,{NAMESPACE:function(){return p.CU},PluginUsersClientV2:function(){return f.X},default:function(){return f.A},tExpr:function(){return p.MZ},useT:function(){return p.kj},useUsersTranslation:function(){return p.nK}}),f=g(667),p=g(488),_}()});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ahooks"),require("@emotion/css"),require("@nocobase/plugin-acl/client-v2"),require("@nocobase/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-users/client-v2",["ahooks","@emotion/css","@nocobase/plugin-acl/client-v2","@nocobase/client-v2","react","antd","@ant-design/icons","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-users/client-v2"]=t(require("ahooks"),require("@emotion/css"),require("@nocobase/plugin-acl/client-v2"),require("@nocobase/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine")):e["@nocobase/plugin-users/client-v2"]=t(e.ahooks,e["@emotion/css"],e["@nocobase/plugin-acl/client-v2"],e["@nocobase/client-v2"],e.react,e.antd,e["@ant-design/icons"],e["@nocobase/flow-engine"])}(self,function(e,t,n,r,o,i,u,a){return function(){"use strict";var c,s,l,f,p,d={667:function(e,t,n){n.d(t,{X:function(){return p}});var r=n(485),o=n(762),i=n.n(o);function u(e,t,n,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){n(e);return}a.done?t(c):Promise.resolve(c).then(r,o)}function a(e,t,n){return(a=f()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&s(o,n.prototype),o}).apply(null,arguments)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t="function"==typeof Map?new Map:void 0;return(l=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,c(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,e)})(e)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}var p=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,n,o,i,u;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=c(t),o=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,f()?Reflect.construct(t,n||[],c(this).constructor):t.apply(this,n)),i="passwordValidators",u=new Map,i in o?Object.defineProperty(o,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):o[i]=u,e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&s(r,e),t=[{key:"registerPasswordValidator",value:function(e,t){this.passwordValidators.set(e,t)}},{key:"unregisterPasswordValidator",value:function(e){this.passwordValidators.delete(e)}},{key:"getPasswordValidators",value:function(){return Array.from(this.passwordValidators.values())}},{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:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(u,"next",{value:c(0)}),a(u,"throw",{value:c(1)}),a(u,"return",{value:c(2)}),"function"==typeof Symbol&&a(u,Symbol.iterator,{value:function(){return this}}),u;function c(a){return function(c){var s=[a,c];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}}(this,function(t){return this.pluginSettingsManager.has("users-permissions")||this.pluginSettingsManager.addMenuItem({key:"users-permissions",title:this.t("Users & Permissions"),isPinned:!0,sort:200,icon:"TeamOutlined",showTabs:!0}),this.pluginSettingsManager.addPageTabItem({menuKey:"users-permissions",key:"users",title:this.t("Users"),icon:"UserOutlined",aclSnippet:"pm.users",sort:2,componentLoader:function(){return Promise.all([n.e("564"),n.e("917")]).then(n.bind(n,924))}}),this.pluginSettingsManager.setPluginSettingsLink("users","users-permissions.users"),null==(e=this.app.pm.get(i()))||e.rolesManager.add("users",{title:String(this.t("Users")),sort:10,componentLoader:function(){return Promise.all([n.e("564"),n.e("521")]).then(n.bind(n,240))}}),this.app.flowEngine.registerModelLoaders({EditProfileItemModel:{extends:"UserCenterItemModel",loader:function(){return n.e("784").then(n.bind(n,467))}},UserPasswordFieldModel:{extends:"PasswordFieldModel",loader:function(){return n.e("569").then(n.bind(n,552))}},UserRolesSelectFieldModel:{extends:"RecordSelectFieldModel",loader:function(){return n.e("143").then(n.bind(n,466))}},ChangePasswordItemModel:{extends:"UserCenterItemModel",loader:function(){return n.e("862").then(n.bind(n,381))}},CurrentUserSummaryItemModel:{extends:"UserCenterItemModel",loader:function(){return n.e("587").then(n.bind(n,638))}},SignOutItemModel:{extends:"UserCenterItemModel",loader:function(){return n.e("786").then(n.bind(n,241))}}}),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,c,"next",e)}function c(e){u(i,r,o,a,c,"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)}}(r.prototype,t),r}(l(r.Plugin));t.A=p},488:function(e,t,n){n.d(t,{CU:function(){return i},MZ:function(){return c},kj:function(){return a},nK:function(){return u}});var r=n(694);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var i="@nocobase/plugin-users";function u(){return{t:a()}}function a(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,o({ns:[i,"users","client"]},n))}}function c(e,t){return(0,r.tExpr)(e,o({ns:[i,"users","client"]},t))}},375:function(e){e.exports=u},477:function(e){e.exports=t},485:function(e){e.exports=r},694:function(e){e.exports=a},762:function(e){e.exports=n},625:function(t){t.exports=e},59:function(e){e.exports=i},155:function(e){e.exports=o}},b={};function g(e){var t=b[e];if(void 0!==t)return t.exports;var n=b[e]={exports:{}};return d[e](n,n.exports,g),n.exports}g.m=d,g.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return g.d(t,{a:t}),t},g.d=function(e,t){for(var n in t)g.o(t,n)&&!g.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},g.f={},g.e=function(e){return Promise.all(Object.keys(g.f).reduce(function(t,n){return g.f[n](e,t),t},[]))},g.u=function(e){return""+e+"."+({143:"8fc4573e64ec8c3f",521:"5f0b4118bfc47f22",564:"ccb0fa75945b6395",569:"07f16da700ba0ba6",587:"a15f1f5b0dbbf4d5",784:"25ee62a1613da5a6",786:"358e82b5f80088d8",862:"2aac0dea47472edf",917:"e302fd311c0845a3"})[e]+".js"},g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),g.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},v={},g.l=function(e,t,n,r){if(v[e])return void v[e].push(t);if(void 0!==n)for(var o,i,u=document.getElementsByTagName("script"),a=0;a<u.length;a++){var c=u[a];if(c.getAttribute("src")==e||c.getAttribute("data-rspack")=="@nocobase/plugin-users/client-v2:"+n){o=c;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,g.nc&&o.setAttribute("nonce",g.nc),o.setAttribute("data-rspack","@nocobase/plugin-users/client-v2:"+n),o.src=e),v[e]=[t];var s=function(t,n){o.onerror=o.onload=null,clearTimeout(l);var r=v[e];if(delete v[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},l=setTimeout(s.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=s.bind(null,o.onerror),o.onload=s.bind(null,o.onload),i&&document.head.appendChild(o)},g.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},g.g.importScripts&&(h=g.g.location+"");var v,h,y=g.g.document;if(!h&&y&&(y.currentScript&&"SCRIPT"===y.currentScript.tagName.toUpperCase()&&(h=y.currentScript.src),!h)){var m=y.getElementsByTagName("script");if(m.length)for(var w=m.length-1;w>-1&&(!h||!/^http(s?):/.test(h));)h=m[w--].src}if(!h)throw Error("Automatic publicPath is not supported in this browser");g.p=h.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c={889:0},g.f.j=function(e,t){var n=g.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=g.p+g.u(e),i=Error();g.l(o,function(t){if(g.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)}},s=function(e,t){var n,r,o=t[0],i=t[1],u=t[2],a=0;if(o.some(function(e){return 0!==c[e]})){for(n in i)g.o(i,n)&&(g.m[n]=i[n]);u&&u(g)}for(e&&e(t);a<o.length;a++)r=o[a],g.o(c,r)&&c[r]&&c[r][0](),c[r]=0},(l=self.webpackChunk_nocobase_plugin_users_client_v2=self.webpackChunk_nocobase_plugin_users_client_v2||[]).forEach(s.bind(null,0)),l.push=s.bind(null,l.push.bind(l));var _={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-users/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-users/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 u=window.location.pathname||"/",a=u.indexOf(i);e=a>=0?u.slice(0,a+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-users/dist/client-v2/"}g.p=e}(),g.r(_),g.d(_,{NAMESPACE:function(){return p.CU},PluginUsersClientV2:function(){return f.X},default:function(){return f.A},tExpr:function(){return p.MZ},useT:function(){return p.kj},useUsersTranslation:function(){return p.nK}}),f=g(667),p=g(488),_}()});
|
package/dist/externalVersion.js
CHANGED
|
@@ -13,22 +13,22 @@ module.exports = {
|
|
|
13
13
|
"react-i18next": "11.18.6",
|
|
14
14
|
"react-router-dom": "6.30.1",
|
|
15
15
|
"react": "18.2.0",
|
|
16
|
-
"@nocobase/client": "3.0.0-alpha.
|
|
16
|
+
"@nocobase/client": "3.0.0-alpha.5",
|
|
17
17
|
"antd": "5.24.2",
|
|
18
18
|
"@formily/core": "2.3.7",
|
|
19
|
-
"@nocobase/plugin-acl": "3.0.0-alpha.
|
|
19
|
+
"@nocobase/plugin-acl": "3.0.0-alpha.5",
|
|
20
20
|
"@emotion/css": "11.13.0",
|
|
21
|
-
"@nocobase/utils": "3.0.0-alpha.
|
|
22
|
-
"@nocobase/flow-engine": "3.0.0-alpha.
|
|
23
|
-
"@nocobase/client-v2": "3.0.0-alpha.
|
|
24
|
-
"@nocobase/database": "3.0.0-alpha.
|
|
25
|
-
"@nocobase/server": "3.0.0-alpha.
|
|
26
|
-
"@nocobase/plugin-user-data-sync": "3.0.0-alpha.
|
|
27
|
-
"@nocobase/plugin-ui-schema-storage": "3.0.0-alpha.
|
|
28
|
-
"@nocobase/logger": "3.0.0-alpha.
|
|
21
|
+
"@nocobase/utils": "3.0.0-alpha.5",
|
|
22
|
+
"@nocobase/flow-engine": "3.0.0-alpha.5",
|
|
23
|
+
"@nocobase/client-v2": "3.0.0-alpha.5",
|
|
24
|
+
"@nocobase/database": "3.0.0-alpha.5",
|
|
25
|
+
"@nocobase/server": "3.0.0-alpha.5",
|
|
26
|
+
"@nocobase/plugin-user-data-sync": "3.0.0-alpha.5",
|
|
27
|
+
"@nocobase/plugin-ui-schema-storage": "3.0.0-alpha.5",
|
|
28
|
+
"@nocobase/logger": "3.0.0-alpha.5",
|
|
29
29
|
"lodash": "4.18.1",
|
|
30
30
|
"ahooks": "3.7.8",
|
|
31
31
|
"@ant-design/icons": "5.6.1",
|
|
32
|
-
"@nocobase/actions": "3.0.0-alpha.
|
|
32
|
+
"@nocobase/actions": "3.0.0-alpha.5",
|
|
33
33
|
"sequelize": "6.35.2"
|
|
34
34
|
};
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "Provides basic user model, as well as created by and updated by fields.",
|
|
7
7
|
"description.ru-RU": "Предоставляет базовую модель пользователя, а также поля кем, когда «создано» и «обновлено».",
|
|
8
8
|
"description.zh-CN": "提供了基础的用户模型,以及创建人和最后更新人字段。",
|
|
9
|
-
"version": "3.0.0-alpha.
|
|
9
|
+
"version": "3.0.0-alpha.5",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "./dist/server/index.js",
|
|
12
12
|
"homepage": "https://docs.nocobase.com/handbook/users",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@nocobase/test": "2.x",
|
|
32
32
|
"@nocobase/utils": "2.x"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "82c7ed1cdb2f247c190582e34ee37f154cac0968",
|
|
35
35
|
"keywords": [
|
|
36
36
|
"Users & permissions"
|
|
37
37
|
]
|
|
@@ -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_users_client_v2=self.webpackChunk_nocobase_plugin_users_client_v2||[]).push([["786"],{241:function(e,t,n){n.r(t),n.d(t,{SignOutItemModel:function(){return l}});var r=n(485);function o(e,t,n,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){n(e);return}c.done?t(a):Promise.resolve(a).then(r,o)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}var l=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,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=u(t),i(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,a()?Reflect.construct(t,r||[],u(this).constructor):t.apply(this,r)),"section","danger"),i(e,"sort",1e3),i(e,"label","Sign out"),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&c(n,e),t=[{key:"onClick",value:function(){var e;return(e=function(){var e,t,n,o;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:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(u,"next",{value:a(0)}),c(u,"throw",{value:a(1)}),c(u,"return",{value:a(2)}),"function"==typeof Symbol&&c(u,Symbol.iterator,{value:function(){return this}}),u;function a(c){return function(a){var l=[c,a];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=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(i){switch(i.label){case 0:return[4,this.context.api.auth.signOut()];case 1:if(n=i.sent(),o=(0,r.resolveV2SigninRedirect)(null==n||null==(t=n.data)||null==(e=t.data)?void 0:e.redirect,this.context.app))return window.location.replace(o),[2];return(0,r.redirectToV2Signin)(this.context.app,(0,r.getCurrentV2RedirectPath)(this.context.app,window.location),{replace:!0}),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,i){var u=e.apply(t,n);function c(e){o(u,r,i,c,a,"next",e)}function a(e){o(u,r,i,c,a,"throw",e)}c(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)}}(n.prototype,t),n}(r.UserCenterActionItemModel);i(l,"itemId","sign-out"),t.default=l}}]);
|