@authing/guard-shim-react 6.0.0-alpha.16 → 6.0.0-alpha.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/guard.min.js +4 -4
- package/dist/typings/src/CompleteInfo/businessRequest.d.ts +1 -1
- package/dist/typings/src/Guard/config.d.ts +1 -1
- package/dist/typings/src/Guard/core/hooks/useMultipleAccounts.d.ts +2 -2
- package/dist/typings/src/Guard/core/useAppendConfig.d.ts +1 -1
- package/dist/typings/src/Login/hooks/useLoginMultiple.d.ts +1 -1
- package/dist/typings/src/Type/application.d.ts +1 -1
- package/dist/typings/src/Type/index.d.ts +1 -2
- package/dist/typings/src/ValidatorRules/PasswordFormItem.d.ts +3 -1
- package/dist/typings/src/ValidatorRules/index.d.ts +1 -2
- package/dist/typings/src/_utils/context.d.ts +1 -1
- package/dist/typings/src/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/guard.min.js
CHANGED
|
@@ -19475,7 +19475,7 @@ TN.Provider;var sA=function(){return sA=Object.assign||function(e){for(var t,n=1
|
|
|
19475
19475
|
/**
|
|
19476
19476
|
* 多账号 状态
|
|
19477
19477
|
*/
|
|
19478
|
-
multipleInstance:{isMultipleAccount:!1,instance:void 0,referMultipleState:void 0,multipleAccountData:void 0,clearBackFillData:void 0},phoneRegex:null,defaultLanguageConfig:"zh-CN",tenantInstance:void 0,isForeignUserpool:!1},hA=Se.createContext(pA),mA=function(){var e=hA.Provider;return{Provider:function(t){var n=t.value,r=t.children;return Se.createElement(e,{value:uA(uA({},pA),n)},r)},Consumer:hA.Consumer}},gA=function(){return fA((function(){var e=hA.Provider;return{Provider:function(t){var n=t.value,r=t.children;return Se.createElement(e,{value:uA(uA({},pA),n)},r)},Consumer:hA.Consumer}}),[])},vA=Se.createContext({spin:!1,spinChange:function(){}}),yA=function(){var e=vA.Provider;return{GuardButtonProvider:function(t){var n=t.children,r=cA(Se.useState(!1),2),o=r[0],a=r[1];return Se.createElement(e,{value:{spin:o,spinChange:function(e){a(e)}}},n)}}},_A=function(){return dA(vA)},bA=function(){return dA(hA).publicConfig},wA=function(){return dA(hA).httpClient},MA=function(){return dA(hA).defaultMergedConfig},kA=function(){return dA(hA).appId},LA=function(){return dA(hA).tenantId};function SA(){return dA(hA).initData}var CA,EA,TA=function(){return dA(hA).currentModule},xA=function(){return dA(hA).events},DA=function(){var e=dA(hA);return{changeModule:e.changeModule,backModule:e.backModule,currentModule:e.currentModule}},YA=function(){return dA(hA).finallyConfig},PA=function(){return dA(hA).contextLoaded},OA=function(){return dA(hA).isAuthFlow},NA=function(){return dA(hA).guardPageConfig},AA=function(){return dA(hA).multipleInstance},IA=function(){return dA(hA).phoneRegex},jA=function(){return dA(hA).defaultLanguageConfig},RA=function(){return dA(hA).tenantInstance},HA=function(){var e=bA(),t=e.customSecurityEnabled,n=e.appRobotVerify,r=e.userpoolRobotVerify;return t?n:r},FA=function(){return dA(hA).isForeignUserpool},BA=
|
|
19478
|
+
multipleInstance:{isMultipleAccount:!1,instance:void 0,referMultipleState:void 0,multipleAccountData:void 0,clearBackFillData:void 0},phoneRegex:null,defaultLanguageConfig:"zh-CN",tenantInstance:void 0,isForeignUserpool:!1},hA=Se.createContext(pA),mA=function(){var e=hA.Provider;return{Provider:function(t){var n=t.value,r=t.children;return Se.createElement(e,{value:uA(uA({},pA),n)},r)},Consumer:hA.Consumer}},gA=function(){return fA((function(){var e=hA.Provider;return{Provider:function(t){var n=t.value,r=t.children;return Se.createElement(e,{value:uA(uA({},pA),n)},r)},Consumer:hA.Consumer}}),[])},vA=Se.createContext({spin:!1,spinChange:function(){}}),yA=function(){var e=vA.Provider;return{GuardButtonProvider:function(t){var n=t.children,r=cA(Se.useState(!1),2),o=r[0],a=r[1];return Se.createElement(e,{value:{spin:o,spinChange:function(e){a(e)}}},n)}}},_A=function(){return dA(vA)},bA=function(){return dA(hA).publicConfig},wA=function(){return dA(hA).httpClient},MA=function(){return dA(hA).defaultMergedConfig},kA=function(){return dA(hA).appId},LA=function(){return dA(hA).tenantId};function SA(){return dA(hA).initData}var CA,EA,TA=function(){return dA(hA).currentModule},xA=function(){return dA(hA).events},DA=function(){var e=dA(hA);return{changeModule:e.changeModule,backModule:e.backModule,currentModule:e.currentModule}},YA=function(){return dA(hA).finallyConfig},PA=function(){return dA(hA).contextLoaded},OA=function(){return dA(hA).isAuthFlow},NA=function(){return dA(hA).guardPageConfig},AA=function(){return dA(hA).multipleInstance},IA=function(){return dA(hA).phoneRegex},jA=function(){return dA(hA).defaultLanguageConfig},RA=function(){return dA(hA).tenantInstance},HA=function(){var e=bA(),t=e.customSecurityEnabled,n=e.appRobotVerify,r=e.userpoolRobotVerify;return t?n:r},FA=function(){return dA(hA).isForeignUserpool},BA=Se.useMemo,zA={"zh-CN":{label:"简体中文"},"zh-TW":{label:"繁體中文"},"en-US":{label:"English"},"ja-JP":{label:"日本語"}},WA=function(e){var t=e.langRange,n=void 0===t?["zh-CN","zh-TW","en-US","ja-JP"]:t,r=e.onLangChange,o=qe().i18n,a=NA(),i=BA((function(){var e;return null===(e=a.global)||void 0===e?void 0:e.showChangeLanguage}),[a]),s=BA((function(){return Object.keys(zA).includes(o.language)?o.language:Et(o.language)[0]||"en-US"}),[o.language]),l=BA((function(){return Se.createElement(Se.Fragment,null,Se.createElement("span",null,zA[s].label))}),[s]),u=BA((function(){return Object.keys(zA).filter((function(e){return n.includes(e)})).map((function(e){return{key:e,label:zA[e].label}}))}),[n]);if(!i||0===n.length)return null;var c={items:u,onClick:function(e){s!==e.key&&(o.changeLanguage(e.key),null==r||r(e.key))}},d=YA(),f=BA((function(){return"g2-change-language-text ".concat(d.mode)}),[d]);return Se.createElement("div",{className:"g2-change-language-container"},Se.createElement(RC,{menu:c,trigger:["click"],placement:"bottom",overlayClassName:"authing-g2-change-language-menu"},Se.createElement("span",{className:f},l,Se.createElement(lA,{type:"authing-arrow-down-s-fill",className:"down-fill-svg"}))))},UA=function(e,t){var n=void 0===t?{w:585,h:649}:t,r=n.w,o=n.h,a=Yc();if(a){var i=a.document,s=void 0!==a.screenLeft?a.screenLeft:a.screenX,l=void 0!==a.screenTop?a.screenTop:a.screenY,u=a.innerWidth?a.innerWidth:i.documentElement.clientWidth?i.documentElement.clientWidth:a.screen.width,c=a.innerHeight?a.innerHeight:i.documentElement.clientHeight?i.documentElement.clientHeight:a.screen.height,d=u/a.screen.availWidth,f=(u-r)/2/d+s,p=(c-o)/2/d+l,h=a.open(e,"_blank","\n toolbar=no,\n menubar=no,\n scrollbars=no,\n resizable=no,\n location=no,\n status=no\n width=".concat(r/d,", \n height=").concat(o/d,", \n top=").concat(p,", \n left=").concat(f,"\n "));
|
|
19479
19479
|
// Fixes dual-screen position Most browsers Firefox
|
|
19480
19480
|
null==h||h.focus()}},qA=function(e){var t,n=document.createElement("textarea");// 创建一个 <textarea> 元素
|
|
19481
19481
|
n.value=e,// 设置它的值为你想复制的字符串
|
|
@@ -19552,7 +19552,7 @@ l=l.filter((function(e){return!eI(eI([],XA(p),!1),XA(S),!1).includes(e.provider)
|
|
|
19552
19552
|
l=[],s=[]);var E=d&&(!(null==c?void 0:c.ssoPageComponentDisplay.socialLoginBtns)||!l.length)&&(!(null==c?void 0:c.ssoPageComponentDisplay.idpBtns)||!s.length);return[l,s,E]}},pI=(o(34203),Se.createContext(void 0)),hI=Se.useContext,mI=function(e){var t=e.children,n=e.client,r=pI.Provider;return Se.createElement(r,{value:{client:n}},t)},gI=function(){var e=hI(pI);return null==e?void 0:e.client};
|
|
19553
19553
|
// EXTERNAL MODULE: ./node_modules/moment/locale/zh-cn.js
|
|
19554
19554
|
// CONCATENATED MODULE: ./package.json
|
|
19555
|
-
const vI=JSON.parse('{"i8":"6.0.0-alpha.
|
|
19555
|
+
const vI=JSON.parse('{"i8":"6.0.0-alpha.17"}');// CONCATENATED MODULE: ./src/_utils/getVersion.ts
|
|
19556
19556
|
function yI(){return vI.i8}// CONCATENATED MODULE: ./src/Guard/authClient.ts
|
|
19557
19557
|
var _I,bI=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},wI=Se.useEffect,MI=Se.useMemo,kI=Se.useState,LI=yI(),SI=function(e,t){var n=t.appId,r=t.tenantId;if(e.options.appId!==n)throw new Error("AuthClientProvider 与 Guard AppId 初始化不同,请检查初始化时传入的 AppId 是否正确");if(r&&e.options.tenantId!==r)throw new Error("AuthClientProvider 与 Guard TenantId 初始化不同,请检查初始化时传入的 TenantId 是否正确");return!0},CI=function(){return function(){if(!_I)throw new Error("Please initialize GuardAuthClient");return _I}()},EI=function(){return EI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},EI.apply(this,arguments)},TI=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},xI=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};
|
|
19558
19558
|
/**
|
|
@@ -19889,7 +19889,7 @@ multipleInstance:Z,phoneRegex:oe,defaultLanguageConfig:A,tenantInstance:X,isFore
|
|
|
19889
19889
|
/** **当前租户应用** 下的租户信息获取和操作处理,将租户相关的处理收拢 */var oR=function(){return oR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},oR.apply(this,arguments)};Object.create;var aR;Object.create;// CONCATENATED MODULE: ./node_modules/react-use/esm/useAsyncFn.js
|
|
19890
19890
|
function iR(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={loading:!1});var r=(0,Se.useRef)(0),o=// CONCATENATED MODULE: ./node_modules/react-use/esm/useMountedState.js
|
|
19891
19891
|
function(){var e=(0,Se.useRef)(!1),t=(0,Se.useCallback)((function(){return e.current}),[]);return(0,Se.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),t}(),a=(0,Se.useState)(n),i=a[0],s=a[1],l=(0,Se.useCallback)((function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var a=++r.current;return i.loading||s((function(e){return oR(oR({},e),{loading:!0})})),e.apply(void 0,t).then((function(e){return o()&&a===r.current&&s({value:e,loading:!1}),e}),(function(e){return o()&&a===r.current&&s({error:e,loading:!1}),e}))}),t);return[i,l]}!function(e){e[e.OTP_MFA_CODE=1635]="OTP_MFA_CODE",e[e.APP_MFA_CODE=1636]="APP_MFA_CODE",e[e.INPUT_CAPTCHACODE=2e3]="INPUT_CAPTCHACODE",e[e.USER_EXISTENCE=2026]="USER_EXISTENCE",e[e.LOGIN_INVALID=2021]="LOGIN_INVALID",e[e.PASSWORD_ERROR=2333]="PASSWORD_ERROR",e[e.USER_NOT_EXIST=2004]="USER_NOT_EXIST",e[e.MULTIPLE_ERROR_LOCK=2057]="MULTIPLE_ERROR_LOCK",e[e.ACCOUNT_LOCK=2005]="ACCOUNT_LOCK"}(aR||(aR={}));// CONCATENATED MODULE: ./src/GuardButton/GuardButton.tsx
|
|
19892
|
-
var sR=function(){return sR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},sR.apply(this,arguments)},lR=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},uR=
|
|
19892
|
+
var sR=function(){return sR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},sR.apply(this,arguments)},lR=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},uR=Se.useMemo,cR=Se.useState,dR=function(e){var t=lR(cR(!1),2),n=t[0],r=t[1],o=e.type,a=uR((function(){var t=e.className;
|
|
19893
19893
|
// if ((isHover && type === 'primary') || props.loading) {
|
|
19894
19894
|
// className += ' authing-btn--icon'
|
|
19895
19895
|
// }
|
|
@@ -20811,6 +20811,6 @@ e.prototype.startWithRedirect=function(e){return void 0===e&&(e={}),eQ(this,void
|
|
|
20811
20811
|
/**
|
|
20812
20812
|
* 获取当前用户信息
|
|
20813
20813
|
*/
|
|
20814
|
-
e.prototype.trackSession=function(){return eQ(this,void 0,void 0,(function(){var e,t,n,r,o,a,i,s,l;return tQ(this,(function(u){switch(u.label){case 0:return[4/*yield*/,this.getAuthClient()];case 1:return e=u.sent(),(t=e.tokenProvider.getToken()||localStorage.getItem("idToken"))?[4/*yield*/,this.then()]:[2/*return*/,null];case 2:return n=u.sent(),
|
|
20814
|
+
e.prototype.trackSession=function(){return eQ(this,void 0,void 0,(function(){var e,t,n,r,o,a,i,s,l;return tQ(this,(function(u){switch(u.label){case 0:return[4/*yield*/,this.getAuthClient()];case 1:return e=u.sent(),(t=e.tokenProvider.getToken()||localStorage.getItem("idToken"))?[4/*yield*/,this.then()]:[2/*return*/,null];case 2:return n=u.sent(),[4/*yield*/,this.getRequestHost()];case 3:r=u.sent(),o={method:"GET",credentials:"include",headers:{"Content-Type":"application/json","x-authing-userpool-id":n.userPoolId,Authorization:t}},u.label=4;case 4:return u.trys.push([4,7,,8]),[4/*yield*/,fetch("".concat(r,"/api/v2/users/me"),o)];case 5:return[4/*yield*/,u.sent().text()];case 6:return a=u.sent(),i=JSON.parse(a),s=i.code,l=i.data,200===s?[2/*return*/,l]:[2/*return*/,null];case 7:return u.sent(),[2/*return*/,null];case 8:return[2/*return*/]}}))}))},e.prototype.logout=function(e){return void 0===e&&(e={}),eQ(this,void 0,void 0,(function(){var t,n,r,o,a,i,s;return tQ(this,(function(l){switch(l.label){case 0:return t="",n=e.redirectUri,r=e.quitCurrentDevice,[4/*yield*/,this.then()];case 1:o=l.sent().logoutRedirectUris,a=window.location.origin;try{t=n&&o.indexOf(n)>-1?n:o[0]||a}catch(e){t=a}return[4/*yield*/,this.getAuthClient()];case 2:i=l.sent(),l.label=3;case 3:return l.trys.push([3,8,9,11]),r?[4/*yield*/,i.logoutCurrent()]:[3/*break*/,5];case 4:return l.sent(),[3/*break*/,7];case 5:return[4/*yield*/,i.logout()];case 6:l.sent(),l.label=7;case 7:return[3/*break*/,11];case 8:return l.sent(),(s=i.tokenProvider.getToken()||localStorage.getItem("idToken"))&&(t=i.buildLogoutUrl({expert:!0,redirectUri:t,idToken:s})),[3/*break*/,11];case 9:return[4/*yield*/,this.clearLoginCache()];case 10:return l.sent(),window.location.href=t,[7/*endfinally*/];case 11:return[2/*return*/]}}))}))},e.prototype._render=function(){var t,n,r,o;return eQ(this,void 0,void 0,(function(){var a,i,s,l=this;return tQ(this,(function(u){switch(u.label){case 0:return a=Object.entries(NI).reduce((function(e,t){var n,r=nQ(t,2),o=r[0],a=r[1];return Object.assign({},e,((n={})[o]=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];
|
|
20815
20815
|
// TODO 返回最后一个执行函数的值,实际应该只让监听一次
|
|
20816
20816
|
return"close"===a&&l.hide(),null===(e=l.eventListeners[a].map((function(e){return e.apply(void 0,rQ([],nQ(t),!1))})).slice(-1)[0])||void 0===e||e},n))}),{}),[4/*yield*/,this.getAuthClient()];case 1:return i=u.sent(),this.options.config?[4/*yield*/,this.getRequestHost()]:[3/*break*/,3];case 2:s=u.sent(),this.options.config.host=s,u.label=3;case 3:return c={container:e.getGuardContainer(null===(t=this.options.config)||void 0===t?void 0:t.target),element:Se.createElement(pJ,XJ({},a,{appId:this.options.appId,tenantId:this.options.tenantId,config:XJ(XJ({},this.options.config),{style:null!==(o=null!==(n=this.options.style)&&void 0!==n?n:null===(r=this.options.config)||void 0===r?void 0:r.style)&&void 0!==o?o:{}}),facePlugin:this.options.facePlugin,appendConfig:this.options.appendConfig,visible:this.visible,authClient:i}))},d=c.container,f=c.element,(p=At.findIndex((function(e){return e===d})))>-1?At.splice(p,1,d):At.push(d),Ot.render(f,d),[2/*return*/]}var c,d,f,p}))}))},e.prototype.on=function(e,t){this.eventListeners[e].push(t)},e.prototype.show=function(){this.visible=!0,this._render()},e.prototype.hide=function(){this.visible=!1,this._render()},e.prototype.unmount=function(){var t,n,r,o=e.getGuardContainer(null===(t=this.options.config)||void 0===t?void 0:t.target);o&&(n=o,(r=At.find((function(e){return e===n})))&&Ot.unmountComponentAtNode(r))},e.prototype.getCurrentView=function(){var e,t;return{currentModule:null===(e=window.$$guard.viewContext)||void 0===e?void 0:e.currentModule,currentTab:null===(t=window.$$guard.viewContext)||void 0===t?void 0:t.currentTab}},e.prototype.changeView=function(e){var t;return eQ(this,void 0,void 0,(function(){var n,r,o;return tQ(this,(function(a){switch(a.label){case 0:return n="",r="","string"==typeof e?(o=e.split(":"),n=o[0],r=o[1]):(n=e.module,r=e.tab),window.$$guard.viewContext&&window.$$guard.viewContext.changeModule?[4/*yield*/,null===(t=window.$$guard.viewContext)||void 0===t?void 0:t.changeModule(n)]:[2/*return*/];case 1:return a.sent(),r?(requestIdleCallback((function(){var e;null===(e=window.$$guard.viewContext)||void 0===e||e.changeTab(r)})),[2/*return*/]):[2/*return*/]}}))}))},e.prototype.getAgreementsContext=function(){return window.$$guard.agreementsContext},e.prototype.checkAllAgreements=function(){var e=this.getAgreementsContext();null==e||e.checkAllAgreements()},e.prototype.unCheckAllAgreements=function(){var e=this.getAgreementsContext();null==e||e.unCheckAllAgreements()},e}()})();var i=a.RyY,s=a.pq3,l=a.mJU,u=a.m4P,c=a.G52,d=a.qKv,f=a.itr,p=a.btN,h=a.ntY,m=a.ph9,g=a.vQ2,v=a.KJ5,y=a.Vu5,_=a.NAz,b=a.BDx,w=a.Waj,M=a.BUF,k=a.vYO,L=a.$qm,S=a.Pd_,C=a.tiu,E=a.w_I,T=a.fMl,x=a.LIr,D=a.YYM,Y=a.ekm,P=a.lhk,O=a.B2n,N=a.Lpu,A=a.Z57,I=a.ws_,j=a.GeF,R=a.bGp,H=a.$fO,F=a.uVD,B=a.NwZ,z=a.l$v,W=a.zxL,U=a.sTE,q=a.tmF,V=a.Co1,$=a.pr1,G=a.ahU,K=a.E9p,J=a.w4o,Q=a.smJ,Z=a.IZ0,X=a.Du$,ee=a.lTb,te=a.XHV,ne=a.rvw,re=a.sto,oe=a.tvS,ae=a.ryf,ie=a.b3w,se=a.jKp,le=a.HMM,ue=a.J9Y,ce=a.VQY,de=a.cQw,fe=a.c5L,pe=a.lTK,he=a.vpZ,me=a.fHP,ge=a.YcH,ve=a.tYW,ye=a.ptM,_e=a.xbR,be=a.z9t,we=a.Oli,Me=a.XMn,ke=a.t19,Le=a.W13,Se=a.Tbq,Ce=a.bt1,Ee=a.gGH,Te=a.ga$,xe=a.mY8,De=a.oS3,Ye=a.EH5,Pe=a.Vx8,Oe=a.b1O,Ne=a.mNP,Ae=a.Wyl,Ie=a.w8P,je=a.tmK,Re=a.gMy,He=a.vfG,Fe=a.phO,Be=a.YdH,ze=a.TII,We=a.fG6,Ue=a.mzv,qe=a.zw_,Ve=a._ft,$e=a.nnr,Ge=a.WEB,Ke=a.UX2,Je=a.cki,Qe=a.lEu,Ze=a.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thLimit,g as ApplicationType,v as ArchivedUsersDocument,y as AssignRoleDocument,_ as AuthClientContext,b as AuthClientProvider,w as AuthenticationClient,M as AuthenticationTokenProvider,k as AuthorizeResourceDocument,L as AuthorizedResourcesDocument,S as AuthorizedTargetsDocument,C as BindEmailDocument,E as BindPhoneDocument,T as ChangeMfaDocument,x as ChangeModuleApiCodeMapping,D as CheckLoginStatusDocument,Y as CheckPasswordStrengthDocument,P as ChildrenNodesDocument,O as CodeAction,N as ConfigEmailTemplateDocument,A as CreateFunctionDocument,I as CreateGroupDocument,j as CreateOrgDocument,R as CreatePolicyDocument,H as CreateRoleDocument,F as CreateUserDocument,B as CreateUserWithCustomDataDocument,z as CreateUserpoolDocument,W as DeleteFunctionDocument,U as DeleteGroupsDocument,q as DeleteNodeDocument,V as DeleteOrgDocument,$ as DeletePoliciesDocument,G as DeletePolicyDocument,K as DeleteRoleDocument,J as DeleteRolesDocument,Q as DeleteUserDocument,Z as DeleteUserpoolDocument,X as DeleteUsersDocument,ee as DisableEmailTemplateDocument,te as DisbalePolicyAssignmentDocument,ne as EmailScene,re as EmailTemplateType,oe as EmailTemplatesDocument,ae as EnableEmailTemplateDocument,ie as EnablePolicyAssignmentDocument,se as ErrorCode,le as FindUserDocument,ue as FindUserWithCustomDataDocument,ce as FunctionDocument,de as FunctionsDocument,fe as GetUserDepartmentsDocument,pe as GetUserGroupsDocument,he as GetUserRolesDocument,me as GroupDocument,ge as GroupWithUsersDocument,ve as GroupWithUsersWithCustomDataDocument,ye as GroupsDocument,_e as Guard,be as GuardComponent,we as GuardEventsCamelToKebabMapping,Me as GuardHttp,ke as GuardMode,Le as GuardModuleType,Se as GuardPageSene,Ce as GuardPropsFilter,Ee as HIDE_SOCIALS,Te as HIDE_SOCIALS_SHOWIN_ENTERPRISE,xe as InputMethod,De as IsActionAllowedDocument,Ye as IsActionDeniedDocument,Pe as IsDomainAvaliableDocument,Oe as IsRootNodeDocument,Ne as IsUserExistsDocument,Ae as LanguageMap,Ie as ListGroupAuthorizedResourcesDocument,je as ListNodeByCodeAuthorizedResourcesDocument,Re as ListNodeByIdAuthorizedResourcesDocument,He as ListRoleAuthorizedResourcesDocument,Fe as ListUserAuthorizedResourcesDocument,Be as Logger,ze as LoginByEmailDocument,We as LoginByPhoneCodeDocument,Ue as LoginByPhonePasswordDocument,qe as LoginBySubAccountDocument,Ve as LoginByUsernameDocument,$e as LoginMethods,Ge as ManagementClient,Ke as ManagementTokenProvider,Je as MoveMembersDocument,Qe as MoveNodeDocument,Ze as MultipleTenant,Xe as NodeByCodeDocument,et as NodeByCodeWithMembersDocument,tt as NodeByIdDocument,nt as NodeByIdWithMembersDocument,rt as OIDCConnectionMode,ot as Operator,at as OrgDocument,it as OrgsDocument,st as PASSWORD_STRENGTH_TEXT_MAP,lt as PasswordSecurityLevel,ut as PasswordStrength,ct as PoliciesDocument,dt as PolicyAssignmentTargetType,ft as PolicyAssignmentsDocument,pt as PolicyDocument,ht as PolicyEffect,mt as PolicyWithAssignmentsDocument,gt as PreviewEmailDocument,vt as Protocol,yt as QiniuUptokenDocument,_t as QueryMfaDocument,bt as RefreshAccessTokenDocument,wt as RefreshTokenDocument,Mt as RefreshUserpoolSecretDocument,kt as RegisterByEmailDocument,Lt as RegisterByPhoneCodeDocument,St as RegisterByUsernameDocument,Ct as RegisterMethods,Et as RegisterSortMethods,Tt as RelayMethodEnum,xt as RemoveMemberDocument,Dt as RemovePolicyAssignmentsDocument,Yt as RemoveUdfDocument,Pt as RemoveUdvDocument,Ot as RemoveUserFromGroupDocument,Nt as RemoveWhitelistDocument,At as ResetPasswordByFirstLoginTokenDocument,It as ResetPasswordByForceResetTokenDocument,jt as ResetPasswordDocument,Rt as ResourceType,Ht as RevokeRoleDocument,Ft as RoleDocument,Bt as RoleWithUsersDocument,zt as RoleWithUsersWithCustomDataDocument,Wt as RolesDocument,Ut as RootNodeDocument,qt as SceneType,Vt as SearchNodesDocument,$t as SearchUserDocument,Gt as SearchUserWithCustomDataDocument,Kt as SendEmailDocument,Jt as SendFirstLoginVerifyEmailDocument,Qt as SetMainDepartmentDocument,Zt as SetUdfDocument,Xt as SetUdfValueBatchDocument,en as SetUdvBatchDocument,tn as SetUdvDocument,nn as SocialConnectionEvent,rn as SocialConnectionProvider,on as SortByEnum,an as SupportedAdminActionEnum,sn as SupportedUserActionEnum,ln as TemplateCodeDocument,un as UdfDataType,cn as UdfDocument,dn as UdfTargetType,fn as UdfValueBatchDocument,pn as UdvDocument,hn as UnbindEmailDocument,mn as UnbindPhoneDocument,gn as UpdateEmailDocument,vn as UpdateFunctionDocument,yn as UpdateGroupDocument,_n as UpdateNodeDocument,bn as UpdatePasswordDocument,wn as UpdatePhoneDocument,Mn as UpdatePolicyDocument,kn as UpdateRoleDocument,Ln as UpdateUserDocument,Sn as UpdateUserpoolDocument,Cn as UserBatchDocument,En as UserBatchWithCustomDataDocument,Tn as UserDocument,xn as UserStatus,Dn as UserWithCustomDataDocument,Yn as UserpoolDocument,Pn as UserpoolTypesDocument,On as UserpoolsDocument,Nn as UsersDocument,An as UsersWithCustomDataDocument,In as VALIDATE_PATTERN,jn as WhitelistDocument,Rn as WhitelistType,Hn as assembledRequestHost,Fn as copyToClipboard,Bn as corsVerification,zn as createGuardXContext,Wn as deepMerge,Un as errorCodeInterceptor,qn as faceErrorMessage,Vn as fallbackLng,$n as fieldRequiredRule,Gn as getAppendConfig,Kn as getCaptchaUrl,Jn as getClassnames,Qn as getCurrentLng,Zn as getDefaultG2Config,Xn as getDefaultGuardLocalConfig,er as getDeviceName,tr as getDocumentNode,nr as getFacePlugin,rr as getFlowHandle,or as getGuardHttp,ar as getHundreds,ir as getI18nLabel,sr as getLogger,lr as getLoginTypePipe,ur as getPageConfig,cr as getPasswordIdentify,dr as getPasswordValidate,fr as getPasswordValidateRules,pr as getPublicConfig,hr as getRequiredRules,mr as getSortLabels,gr as getSortTabs,vr as getSymbolTypeLength,yr as getUserRegisterParams,_r as getVersion,br as guardEventsFilter,wr as guardEventsHijacking,Mr as i18n,kr as initAppendConfig,Lr as initFacePlugin,Sr as initGuardHttp,Cr as initGuardI18n,Er as insertStyles,Tr as isAlipayBrowser,xr as isBaiduBrowser,Dr as isDingtalkBrowser,Yr as isDisabled,Pr as isEdgeBrowser,Or as isLarkBrowser,Nr as isMobile,Ar as isObject,Ir as isQQBrowser,jr as isQQBuiltInBrowser,Rr as isQtWebEngine,Hr as isSpecialBrowser,Fr as isWeChatBrowser,Br as isWeComeBrowser,zr as isWeWorkBuiltInBrowser,Wr as isWeiboBrowser,Ur as isXiaomiBrowser,qr as isoInfo,Vr as mailDesensitization,$r as parsePhone,Gr as phoneDesensitization,Kr as popupCenter,Jr as regexFromString,Qr as removeStyles,Zr as setPageConfig,Xr as setPublicConfig,eo as shoudGoToComplete,to as sleep,no as transformMethod,ro as transformSortMethod,oo as updateFlowHandle,ao as useAppId,io as useAppendConfig,so as useDebounce,lo as useFacePlugin,uo as useFetchConsoleConfig,co as useFlowHandle,fo as useGlobalAuthClient,po as useGuardAppId,ho as useGuardButtonContext,mo as useGuardButtonState,go as useGuardContextLoaded,vo as useGuardCurrentModule,yo as useGuardDefaultLanguage,_o as useGuardDefaultMergedConfig,bo as useGuardEvents,wo as useGuardFinallyConfig,Mo as useGuardHttp,ko as useGuardHttpClient,Lo as useGuardInitData,So as useGuardIsAuthFlow,Co as useGuardModule,Eo as useGuardMultipleInstance,To as useGuardPageConfig,xo as useGuardPhoneRegex,Do as useGuardPublicConfig,Yo as useGuardTenantId,Po as useGuardTenantProvider,Oo as useGuardView,No as useGuardXContext,Ao as useInitAppId,Io as useIsForeignUserpool,jo as useLogger,Ro as useMediaSize,Ho as useMergeDefaultConfig,Fo as useMethod,Bo as useMultipleTenant,zo as usePasswordErrorText,Wo as useRobotVerify,Uo as useShaking,qo as useUpdateFlowHandle,Vo as validate};
|
|
@@ -6,4 +6,4 @@ export declare enum CompleteInfoAuthFlowAction {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
8
8
|
export declare const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'] | string, content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
9
|
-
export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<
|
|
9
|
+
export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<import("../_utils/http").AuthingGuardResponse<any> | User | undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'shim-react';
|
|
2
|
-
import { GuardModuleType } from '
|
|
2
|
+
import { GuardModuleType } from './module';
|
|
3
3
|
import { ForgetPasswordConfig } from '../ForgetPassword/interface';
|
|
4
4
|
import { LoginConfig } from '../Login/interface';
|
|
5
5
|
import { RegisterConfig } from '../Register/interface';
|
|
@@ -249,7 +249,7 @@ declare class MultipleAccount {
|
|
|
249
249
|
setUserInfo: (user: Omit<User & {
|
|
250
250
|
id: string;
|
|
251
251
|
loginAccount?: string | undefined;
|
|
252
|
-
}, "tab" | "
|
|
252
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
253
253
|
setLoginWayByHttpData: (account: string, data: {
|
|
254
254
|
username?: string | undefined;
|
|
255
255
|
phone?: string | undefined;
|
|
@@ -292,7 +292,7 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
|
|
|
292
292
|
setUserInfo: (user: Omit<User & {
|
|
293
293
|
id: string;
|
|
294
294
|
loginAccount?: string | undefined;
|
|
295
|
-
}, "tab" | "
|
|
295
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
296
296
|
setLoginWayByHttpData: (account: string, data: {
|
|
297
297
|
username?: string | undefined;
|
|
298
298
|
phone?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GuardAppendConfig } from '
|
|
1
|
+
import { GuardAppendConfig } from '../../Type';
|
|
2
2
|
export declare const getGuardWindow: () => (Window & typeof globalThis) | undefined;
|
|
3
3
|
export declare const useGuardWindow: () => (Window & typeof globalThis) | undefined;
|
|
4
4
|
export declare const useInitGuardAppendConfig: (setForceUpdate: any, appId?: string, appendConfig?: GuardAppendConfig) => void;
|
|
@@ -35,7 +35,7 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
|
|
|
35
35
|
setUserInfo: (user: Omit<import("../../Guard/core/hooks/useMultipleAccounts").User & {
|
|
36
36
|
id: string;
|
|
37
37
|
loginAccount?: string | undefined;
|
|
38
|
-
}, "tab" | "
|
|
38
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
39
39
|
setLoginWayByHttpData: (account: string, data: {
|
|
40
40
|
username?: string | undefined;
|
|
41
41
|
phone?: string | undefined;
|
|
@@ -2,10 +2,9 @@ import { React } from 'shim-react';
|
|
|
2
2
|
import { AuthenticationClient, CommonMessage, User } from 'authing-js-sdk';
|
|
3
3
|
import { GuardModuleType } from '../Guard/module';
|
|
4
4
|
import { FacePlugin } from '../_utils/facePlugin/interface';
|
|
5
|
-
import { ApplicationConfig } from './application';
|
|
5
|
+
import { ApplicationConfig, Lang } from './application';
|
|
6
6
|
export * from './application';
|
|
7
7
|
export type { CommonMessage, User };
|
|
8
|
-
export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
|
|
9
8
|
export declare enum GuardMode {
|
|
10
9
|
Modal = "modal",
|
|
11
10
|
Normal = "normal"
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { React } from 'shim-react';
|
|
2
|
-
import {
|
|
2
|
+
import { FormItemProps } from 'shim-antd';
|
|
3
|
+
export interface PasswordFormItemProps extends FormItemProps {
|
|
4
|
+
}
|
|
3
5
|
export interface ExPasswordFormItemProps extends PasswordFormItemProps {
|
|
4
6
|
fieldRequiredRuleMessage?: string;
|
|
5
7
|
}
|
|
@@ -2,6 +2,7 @@ import { FormInstance } from 'shim-antd/lib/form';
|
|
|
2
2
|
import { Form, FormItemProps } from 'shim-antd';
|
|
3
3
|
import { PasswordFormItem } from './PasswordFormItem';
|
|
4
4
|
import { EmailFormItem, PhoneFormItem, UserNameFormItem, CustomNameFormItem } from './ValidatorFormItem';
|
|
5
|
+
export * from './PasswordFormItem';
|
|
5
6
|
export interface ValidatorFormItemProps extends FormItemProps {
|
|
6
7
|
form?: FormInstance;
|
|
7
8
|
checkRepeat?: boolean;
|
|
@@ -15,8 +16,6 @@ export interface ValidatorFormItemProps extends FormItemProps {
|
|
|
15
16
|
export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
|
|
16
17
|
method: 'email' | 'phone' | 'username' | string;
|
|
17
18
|
}
|
|
18
|
-
export interface PasswordFormItemProps extends FormItemProps {
|
|
19
|
-
}
|
|
20
19
|
export interface ICheckProps {
|
|
21
20
|
check: (values: any) => void;
|
|
22
21
|
}
|
|
@@ -121,7 +121,7 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
121
121
|
setUserInfo: (user: Omit<import("../Guard/core/hooks/useMultipleAccounts").User & {
|
|
122
122
|
id: string;
|
|
123
123
|
loginAccount?: string | undefined;
|
|
124
|
-
}, "tab" | "
|
|
124
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
125
125
|
setLoginWayByHttpData: (account: string, data: {
|
|
126
126
|
username?: string | undefined;
|
|
127
127
|
phone?: string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GuardOptions, GuardEventsKebabToCamelType, StartWithRedirectOptions, AuthenticationClient, JwtTokenStatus, User, Lang, LogoutParams, IChangeViewOptions } from './types';
|
|
2
2
|
export * from './types';
|
|
3
|
+
export * from './Guard';
|
|
3
4
|
export declare class Guard {
|
|
4
5
|
options: GuardOptions;
|
|
5
6
|
private visible;
|
package/package.json
CHANGED