@zoyafng/guard-shim-react18 4.5.51-hb.0
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/README.md +3 -0
- package/dist/guard.min.css +2 -0
- package/dist/guard.min.js +28627 -0
- package/dist/typings/example.d.ts +1 -0
- package/dist/typings/shim-antd4/index.d.ts +9 -0
- package/dist/typings/shim-react16/index.d.ts +8 -0
- package/dist/typings/shim-react18/index.d.ts +8 -0
- package/dist/typings/src/AuthClientProvider/AuthClientProvider.d.ts +6 -0
- package/dist/typings/src/AuthClientProvider/context.d.ts +6 -0
- package/dist/typings/src/AuthClientProvider/index.d.ts +1 -0
- package/dist/typings/src/Back/index.d.ts +12 -0
- package/dist/typings/src/BindTotp/businessRequest.d.ts +5 -0
- package/dist/typings/src/BindTotp/core/bindSuccess.d.ts +6 -0
- package/dist/typings/src/BindTotp/core/securityCode.d.ts +8 -0
- package/dist/typings/src/BindTotp/index.d.ts +3 -0
- package/dist/typings/src/BindTotp/interface.d.ts +20 -0
- package/dist/typings/src/ChangeLanguage/index.d.ts +9 -0
- package/dist/typings/src/ChangePassword/businessRequest.d.ts +10 -0
- package/dist/typings/src/ChangePassword/core/PasswordNotSafeReset.d.ts +6 -0
- package/dist/typings/src/ChangePassword/core/SendPhoneCode.d.ts +5 -0
- package/dist/typings/src/ChangePassword/core/completePassword.d.ts +2 -0
- package/dist/typings/src/ChangePassword/core/firstLoginReset.d.ts +6 -0
- package/dist/typings/src/ChangePassword/core/resetPassword.d.ts +1 -0
- package/dist/typings/src/ChangePassword/core/rotateReset.d.ts +6 -0
- package/dist/typings/src/ChangePassword/index.d.ts +12 -0
- package/dist/typings/src/CompleteInfo/businessRequest.d.ts +8 -0
- package/dist/typings/src/CompleteInfo/core/completeInfo.d.ts +12 -0
- package/dist/typings/src/CompleteInfo/index.d.ts +11 -0
- package/dist/typings/src/CompleteInfo/interface.d.ts +103 -0
- package/dist/typings/src/CompleteInfo/utils.d.ts +24 -0
- package/dist/typings/src/CopyAbleText/index.d.ts +5 -0
- package/dist/typings/src/DownloadAuthenticator/index.d.ts +3 -0
- package/dist/typings/src/DownloadAuthenticator/interface.d.ts +12 -0
- package/dist/typings/src/Error/index.d.ts +6 -0
- package/dist/typings/src/Error/interface.d.ts +8 -0
- package/dist/typings/src/ForgetPassword/InputPassword/index.d.ts +3 -0
- package/dist/typings/src/ForgetPassword/core/inputIdentify.d.ts +7 -0
- package/dist/typings/src/ForgetPassword/core/resetPassword.d.ts +16 -0
- package/dist/typings/src/ForgetPassword/index.d.ts +2 -0
- package/dist/typings/src/ForgetPassword/interface.d.ts +19 -0
- package/dist/typings/src/Guard/Guard.d.ts +10 -0
- package/dist/typings/src/Guard/GuardModule/stateMachine.d.ts +38 -0
- package/dist/typings/src/Guard/authClient.d.ts +12 -0
- package/dist/typings/src/Guard/config.d.ts +18 -0
- package/dist/typings/src/Guard/core/hooks/useAgreements.d.ts +14 -0
- package/dist/typings/src/Guard/core/hooks/useDeviceId.d.ts +1 -0
- package/dist/typings/src/Guard/core/hooks/useGuardView.d.ts +7 -0
- package/dist/typings/src/Guard/core/hooks/useMultipleAccounts.d.ts +332 -0
- package/dist/typings/src/Guard/core/index.d.ts +7 -0
- package/dist/typings/src/Guard/core/renderContext.d.ts +8 -0
- package/dist/typings/src/Guard/core/renderModule.d.ts +12 -0
- package/dist/typings/src/Guard/core/useAppendConfig.d.ts +4 -0
- package/dist/typings/src/Guard/core/usePlugin.d.ts +3 -0
- package/dist/typings/src/Guard/event.d.ts +72 -0
- package/dist/typings/src/Guard/index.d.ts +4 -0
- package/dist/typings/src/Guard/module.d.ts +44 -0
- package/dist/typings/src/Guard/sso.d.ts +19 -0
- package/dist/typings/src/GuardButton/GuardButton.d.ts +6 -0
- package/dist/typings/src/GuardButton/index.d.ts +1 -0
- package/dist/typings/src/GuardFace/index.d.ts +16 -0
- package/dist/typings/src/GuardSelect/index.d.ts +30 -0
- package/dist/typings/src/IconFont/iconfont.d.ts +1 -0
- package/dist/typings/src/IconFont/index.d.ts +8 -0
- package/dist/typings/src/IconFont/useGuardIconfont.d.ts +1 -0
- package/dist/typings/src/IdentityBinding/IdentityBinding.d.ts +5 -0
- package/dist/typings/src/IdentityBinding/businessRequest.d.ts +36 -0
- package/dist/typings/src/IdentityBinding/index.d.ts +2 -0
- package/dist/typings/src/IdentityBinding/interface.d.ts +27 -0
- package/dist/typings/src/IdentityBindingAsk/IdentityBindingAsk.d.ts +3 -0
- package/dist/typings/src/IdentityBindingAsk/index.d.ts +2 -0
- package/dist/typings/src/IdentityBindingAsk/interface.d.ts +21 -0
- package/dist/typings/src/ImagePro/index.d.ts +15 -0
- package/dist/typings/src/InputNumber/index.d.ts +5 -0
- package/dist/typings/src/InputPassword/index.d.ts +1 -0
- package/dist/typings/src/Invitation/Application/index.d.ts +2 -0
- package/dist/typings/src/Invitation/AuthenticationBind/index.d.ts +2 -0
- package/dist/typings/src/Invitation/Complete/index.d.ts +2 -0
- package/dist/typings/src/Invitation/Error/index.d.ts +2 -0
- package/dist/typings/src/Invitation/Success/index.d.ts +1 -0
- package/dist/typings/src/Invitation/interface.d.ts +66 -0
- package/dist/typings/src/LazyloadImage/index.d.ts +12 -0
- package/dist/typings/src/Login/codemap.d.ts +2 -0
- package/dist/typings/src/Login/core/withAD.d.ts +20 -0
- package/dist/typings/src/Login/core/withAppQrcode.d.ts +8 -0
- package/dist/typings/src/Login/core/withAuthingOtpPush/BeforeLogin.d.ts +17 -0
- package/dist/typings/src/Login/core/withAuthingOtpPush/HowBindClient.d.ts +1 -0
- package/dist/typings/src/Login/core/withAuthingOtpPush/HowGetAppLoginUrl.d.ts +1 -0
- package/dist/typings/src/Login/core/withAuthingOtpPush/HowUsePushLogin.d.ts +1 -0
- package/dist/typings/src/Login/core/withAuthingOtpPush/PendingLogin.d.ts +6 -0
- package/dist/typings/src/Login/core/withAuthingOtpPush/PushLoginGuideModal.d.ts +2 -0
- package/dist/typings/src/Login/core/withAuthingOtpPush/PushLoginGuideSelector.d.ts +8 -0
- package/dist/typings/src/Login/core/withAuthingOtpPush/index.d.ts +2 -0
- package/dist/typings/src/Login/core/withAuthingOtpPush/types.d.ts +29 -0
- package/dist/typings/src/Login/core/withDingTalkQrcode.d.ts +1 -0
- package/dist/typings/src/Login/core/withLDAP.d.ts +22 -0
- package/dist/typings/src/Login/core/withPassword/FormItemAccount.d.ts +6 -0
- package/dist/typings/src/Login/core/withPassword/GraphicVerifyCode.d.ts +7 -0
- package/dist/typings/src/Login/core/withPassword/InputAccount.d.ts +7 -0
- package/dist/typings/src/Login/core/withPassword/index.d.ts +28 -0
- package/dist/typings/src/Login/core/withVerifyCode/FormItemIdentify.d.ts +11 -0
- package/dist/typings/src/Login/core/withVerifyCode/InputInternationPhone.d.ts +7 -0
- package/dist/typings/src/Login/core/withVerifyCode/VirtualDropdown.d.ts +12 -0
- package/dist/typings/src/Login/core/withVerifyCode/index.d.ts +7 -0
- package/dist/typings/src/Login/core/withVerifyCode/inputIdentify.d.ts +7 -0
- package/dist/typings/src/Login/core/withWeComQrcode.d.ts +1 -0
- package/dist/typings/src/Login/core/withWechatMiniQrcode.d.ts +10 -0
- package/dist/typings/src/Login/core/withWechatmpQrcode.d.ts +13 -0
- package/dist/typings/src/Login/core/withZjQrcode.d.ts +11 -0
- package/dist/typings/src/Login/hooks/useLoginMultiple.d.ts +69 -0
- package/dist/typings/src/Login/index.d.ts +5 -0
- package/dist/typings/src/Login/interface.d.ts +45 -0
- package/dist/typings/src/Login/multipleAccounts/index.d.ts +22 -0
- package/dist/typings/src/Login/multipleAccounts/panel.d.ts +46 -0
- package/dist/typings/src/Login/resetAccountName/businessRequest.d.ts +6 -0
- package/dist/typings/src/Login/resetAccountName/index.d.ts +3 -0
- package/dist/typings/src/Login/socialLogin/IdpButton/index.d.ts +5 -0
- package/dist/typings/src/Login/socialLogin/PasskeyButton/index.d.ts +6 -0
- package/dist/typings/src/Login/socialLogin/index.d.ts +18 -0
- package/dist/typings/src/Login/socialLogin/postMessage.d.ts +3 -0
- package/dist/typings/src/MFA/VerifyCodeInput/VerifyCodeFormItem.d.ts +8 -0
- package/dist/typings/src/MFA/VerifyCodeInput/index.d.ts +14 -0
- package/dist/typings/src/MFA/businessRequest.d.ts +67 -0
- package/dist/typings/src/MFA/codemap.d.ts +2 -0
- package/dist/typings/src/MFA/context.d.ts +7 -0
- package/dist/typings/src/MFA/core/email.d.ts +23 -0
- package/dist/typings/src/MFA/core/face.d.ts +1 -0
- package/dist/typings/src/MFA/core/face_deps.d.ts +11 -0
- package/dist/typings/src/MFA/core/passkey.d.ts +16 -0
- package/dist/typings/src/MFA/core/sms.d.ts +30 -0
- package/dist/typings/src/MFA/core/totp.d.ts +20 -0
- package/dist/typings/src/MFA/index.d.ts +3 -0
- package/dist/typings/src/MFA/interface.d.ts +44 -0
- package/dist/typings/src/MFA/mfaMethods/index.d.ts +8 -0
- package/dist/typings/src/Message/index.d.ts +9 -0
- package/dist/typings/src/NeedHelpView/core/describeQuestions.d.ts +7 -0
- package/dist/typings/src/NeedHelpView/index.d.ts +1 -0
- package/dist/typings/src/NewSubmitSuccess/index.d.ts +2 -0
- package/dist/typings/src/NewSubmitSuccess/interface.d.ts +19 -0
- package/dist/typings/src/Qrcode/UiQrCode.d.ts +52 -0
- package/dist/typings/src/Qrcode/WorkQrCode.d.ts +44 -0
- package/dist/typings/src/Qrcode/hooks/useImage.d.ts +4 -0
- package/dist/typings/src/Qrcode/hooks/usePostQrCode.d.ts +73 -0
- package/dist/typings/src/Qrcode/hooks/usePreQrCode.d.ts +39 -0
- package/dist/typings/src/Qrcode/hooks/useStatus.d.ts +8 -0
- package/dist/typings/src/Qrcode/index.d.ts +11 -0
- package/dist/typings/src/RecoveryCode/businessRequest.d.ts +5 -0
- package/dist/typings/src/RecoveryCode/core/saveCode.d.ts +5 -0
- package/dist/typings/src/RecoveryCode/core/useCode.d.ts +7 -0
- package/dist/typings/src/RecoveryCode/index.d.ts +5 -0
- package/dist/typings/src/RecoveryCode/interface.d.ts +8 -0
- package/dist/typings/src/Register/codemap.d.ts +2 -0
- package/dist/typings/src/Register/components/AccountType/index.d.ts +3 -0
- package/dist/typings/src/Register/components/Agreements/index.d.ts +11 -0
- package/dist/typings/src/Register/core/WithCode.d.ts +17 -0
- package/dist/typings/src/Register/core/WithEmail.d.ts +13 -0
- package/dist/typings/src/Register/core/WithEmailCode.d.ts +14 -0
- package/dist/typings/src/Register/core/WithPhone.d.ts +13 -0
- package/dist/typings/src/Register/index.d.ts +2 -0
- package/dist/typings/src/Register/interface.d.ts +25 -0
- package/dist/typings/src/Register/utils.d.ts +1 -0
- package/dist/typings/src/SelectAccount/index.d.ts +2 -0
- package/dist/typings/src/SelectAccount2Login/index.d.ts +2 -0
- package/dist/typings/src/SelfUnlock/core/selfUnlock.d.ts +8 -0
- package/dist/typings/src/SelfUnlock/index.d.ts +2 -0
- package/dist/typings/src/SelfUnlock/interface.d.ts +15 -0
- package/dist/typings/src/SendCode/SendCodeBtn.d.ts +10 -0
- package/dist/typings/src/SendCode/SendCodeByEmail.d.ts +16 -0
- package/dist/typings/src/SendCode/SendCodeByPhone.d.ts +19 -0
- package/dist/typings/src/SendCode/index.d.ts +9 -0
- package/dist/typings/src/ShieldSpin/index.d.ts +9 -0
- package/dist/typings/src/SingleComponent/SingleComponent.d.ts +2 -0
- package/dist/typings/src/SingleComponent/index.d.ts +3 -0
- package/dist/typings/src/SubmitButton/index.d.ts +10 -0
- package/dist/typings/src/SubmitSuccess/index.d.ts +2 -0
- package/dist/typings/src/SubmitSuccess/interface.d.ts +17 -0
- package/dist/typings/src/TenantPortalSelect/CreateButton/index.d.ts +4 -0
- package/dist/typings/src/TenantPortalSelect/InputEmailCode/index.d.ts +8 -0
- package/dist/typings/src/TenantPortalSelect/JoinButton/index.d.ts +4 -0
- package/dist/typings/src/TenantPortalSelect/businessRequest.d.ts +6 -0
- package/dist/typings/src/TenantPortalSelect/core/CreateTenant.d.ts +4 -0
- package/dist/typings/src/TenantPortalSelect/core/JoinTenant.d.ts +4 -0
- package/dist/typings/src/TenantPortalSelect/index.d.ts +2 -0
- package/dist/typings/src/TenantPortalSelect/interface.d.ts +56 -0
- package/dist/typings/src/Type/application.d.ts +450 -0
- package/dist/typings/src/Type/index.d.ts +92 -0
- package/dist/typings/src/UploadImage/index.d.ts +5 -0
- package/dist/typings/src/ValidatorRules/CheckRules.d.ts +3 -0
- package/dist/typings/src/ValidatorRules/PasswordFormItem.d.ts +8 -0
- package/dist/typings/src/ValidatorRules/ValidatorFormItem.d.ts +8 -0
- package/dist/typings/src/ValidatorRules/index.d.ts +33 -0
- package/dist/typings/src/ValidatorRules/useCheckRepeat.d.ts +1 -0
- package/dist/typings/src/VerifyCodeInput/index.d.ts +10 -0
- package/dist/typings/src/_utils/GuardErrorCode.d.ts +12 -0
- package/dist/typings/src/_utils/appendConfig.d.ts +4 -0
- package/dist/typings/src/_utils/clipboard.d.ts +1 -0
- package/dist/typings/src/_utils/compute.d.ts +22 -0
- package/dist/typings/src/_utils/config/index.d.ts +112 -0
- package/dist/typings/src/_utils/context.d.ts +170 -0
- package/dist/typings/src/_utils/corsVerification.d.ts +1 -0
- package/dist/typings/src/_utils/countryList.d.ts +7 -0
- package/dist/typings/src/_utils/errorFace.d.ts +12 -0
- package/dist/typings/src/_utils/facePlugin/index.d.ts +4 -0
- package/dist/typings/src/_utils/facePlugin/interface.d.ts +5 -0
- package/dist/typings/src/_utils/flowHandleStorage.d.ts +4 -0
- package/dist/typings/src/_utils/getCaptchaUrl.d.ts +1 -0
- package/dist/typings/src/_utils/getVersion.d.ts +1 -0
- package/dist/typings/src/_utils/guardDocument.d.ts +3 -0
- package/dist/typings/src/_utils/guardHttp.d.ts +28 -0
- package/dist/typings/src/_utils/hooks/index.d.ts +49 -0
- package/dist/typings/src/_utils/http.d.ts +33 -0
- package/dist/typings/src/_utils/index.d.ts +103 -0
- package/dist/typings/src/_utils/initAppId.d.ts +7 -0
- package/dist/typings/src/_utils/locales/en-us/index.d.ts +4 -0
- package/dist/typings/src/_utils/locales/index.d.ts +9 -0
- package/dist/typings/src/_utils/locales/ja-jp/index.d.ts +4 -0
- package/dist/typings/src/_utils/locales/zh-cn/index.d.ts +4 -0
- package/dist/typings/src/_utils/locales/zh-tw/index.d.ts +4 -0
- package/dist/typings/src/_utils/logger/index.d.ts +15 -0
- package/dist/typings/src/_utils/logger/interface.d.ts +5 -0
- package/dist/typings/src/_utils/passkey.d.ts +3 -0
- package/dist/typings/src/_utils/popupCenter.d.ts +9 -0
- package/dist/typings/src/_utils/responseManagement/index.d.ts +4 -0
- package/dist/typings/src/_utils/responseManagement/interface.d.ts +29 -0
- package/dist/typings/src/_utils/tenant.d.ts +19 -0
- package/dist/typings/src/_utils/useErrorText.d.ts +5 -0
- package/dist/typings/src/index.d.ts +6 -0
- package/package.json +21 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
export type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
|
|
2
|
+
import { MFAType } from '../MFA/interface';
|
|
3
|
+
import { PasswordStrength } from '../_utils';
|
|
4
|
+
export * from 'authing-js-sdk';
|
|
5
|
+
export declare enum LoginMethods {
|
|
6
|
+
LDAP = "ldap",
|
|
7
|
+
AppQr = "app-qrcode",
|
|
8
|
+
Password = "password",
|
|
9
|
+
PhoneCode = "phone-code",
|
|
10
|
+
EmailCode = "email-code",// 这是前端单独加的,后端只会返回 phone-code
|
|
11
|
+
WxMinQr = "wechat-miniprogram-qrcode",// 对应社会化登录的 wechat:miniprogram:qrconnect(小程序扫码登录)
|
|
12
|
+
AD = "ad",// 对应企业身份源的 Windows AD 登录
|
|
13
|
+
WechatMpQrcode = "wechatmp-qrcode",// 微信扫码关注登录
|
|
14
|
+
AuthingOtpPush = "authing-otp-push",// App 扫码登录
|
|
15
|
+
WechatworkCorpQrconnect = "wechatwork-corp-qrconnect",// 微信企业扫码关注登录
|
|
16
|
+
WECHATWORKQRCONNECTOFAUTHINGAGENCY = "wechatwork-authing-agency-qrcode",// 代开发形式的以 authing 作为内部应用
|
|
17
|
+
WECHATWORKAGENCYQRCONNECT = "wechatwork-agency-qrcode",// 代开发形式的内部应用
|
|
18
|
+
DingTalkQrcode = "dingtalk-qrcode",//钉钉扫码
|
|
19
|
+
Passkey = "passkey",// passkey
|
|
20
|
+
ZJZWFWQrcode = "zjzwfw-qrcode"
|
|
21
|
+
}
|
|
22
|
+
export declare enum OIDCConnectionMode {
|
|
23
|
+
FRONT_CHANNEL = "FRONT_CHANNEL",
|
|
24
|
+
BACK_CHANNEL = "BACK_CHANNEL"
|
|
25
|
+
}
|
|
26
|
+
export declare enum SocialConnectionProvider {
|
|
27
|
+
ALIPAY = "alipay",
|
|
28
|
+
GOOGLE = "google",
|
|
29
|
+
WECHATPC = "wechat:pc",
|
|
30
|
+
WECHATMP = "wechat:webpage-authorization",
|
|
31
|
+
WECHAT_MINIPROGRAM = "wechat:miniprogram:default",
|
|
32
|
+
WECHAT_MINIPROGRAM_QRCODE = "wechat:miniprogram:qrconnect",
|
|
33
|
+
WECHAT_MINIPROGRAM_APPLAUNCH = "wechat:miniprogram:app-launch",
|
|
34
|
+
WECHATMOBILE = "wechat:mobile",
|
|
35
|
+
GITHUB = "github",
|
|
36
|
+
QQ = "qq",
|
|
37
|
+
WECHATWORK_ADDRESS_BOOK = "wechatwork:addressbook",
|
|
38
|
+
WECHATWORK_CORP_QRCONNECT = "wechatwork:corp:qrconnect",
|
|
39
|
+
WECHATWORK_SERVICEPROVIDER_QRCONNECT = "wechatwork:service-provider:qrconnect",
|
|
40
|
+
WECHATWORK_QRCONNECT_OF_AUTHING_AGENCY = "wechatwork:qrconnect:of:authing:agency",// 代开发形式的以 authing 作为内部应用
|
|
41
|
+
WECHATWORK_AGENCY_QRCONNECT = "wechatwork:agency:qrconnect",// 代开发形式的内部应用
|
|
42
|
+
DINGTALK = "dingtalk",
|
|
43
|
+
WEIBO = "weibo",
|
|
44
|
+
APPLE = "apple",
|
|
45
|
+
APPLE_WEB = "apple:web",
|
|
46
|
+
LARK_PUBLIC = "lark-public",
|
|
47
|
+
LARK_INTERNAL = "lark-internal",
|
|
48
|
+
BAIDU = "baidu",
|
|
49
|
+
LINKEDIN = "linkedin",
|
|
50
|
+
SLACK = "slack",
|
|
51
|
+
YIDUN = "yidun",
|
|
52
|
+
QINGCLOUD = "qingcloud",
|
|
53
|
+
FACEBOOK = "facebook"
|
|
54
|
+
}
|
|
55
|
+
export declare enum Protocol {
|
|
56
|
+
AD = "ad",
|
|
57
|
+
CAS = "cas",
|
|
58
|
+
LDAP = "ldap",
|
|
59
|
+
OIDC = "oidc",
|
|
60
|
+
SAML = "saml",
|
|
61
|
+
OAUTH = "oauth",
|
|
62
|
+
AZURE_AD = "azure-ad",
|
|
63
|
+
AD_KERBEROS = "ad-kerberos"
|
|
64
|
+
}
|
|
65
|
+
export interface IOAuthConnectionConfig {
|
|
66
|
+
authEndPoint: string;
|
|
67
|
+
tokenEndPoint: string;
|
|
68
|
+
scope: string;
|
|
69
|
+
clientId: string;
|
|
70
|
+
clientSecret: string;
|
|
71
|
+
authUrlTemplate: string;
|
|
72
|
+
codeToTokenScript: string;
|
|
73
|
+
tokenToUserInfoScript: string;
|
|
74
|
+
tokenToUserInfoScriptFuncId: string;
|
|
75
|
+
codeToTokenScriptFuncId: string;
|
|
76
|
+
authUrl?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface IAzureAdConnectionConfig {
|
|
79
|
+
microsoftAzureAdDomain: string;
|
|
80
|
+
clientId: string;
|
|
81
|
+
syncUserProfileOnLogin: string;
|
|
82
|
+
emailVerifiedDefault: boolean;
|
|
83
|
+
authorizationUrl: string;
|
|
84
|
+
callbackUrl: string;
|
|
85
|
+
}
|
|
86
|
+
export interface ISamlConnectionConfig {
|
|
87
|
+
signInEndPoint: string;
|
|
88
|
+
samlRequest?: string;
|
|
89
|
+
samlIdpCert: string;
|
|
90
|
+
samlSpCert: string;
|
|
91
|
+
samlSpKey: string;
|
|
92
|
+
signOutEndPoint: string;
|
|
93
|
+
signSamlRequest: boolean;
|
|
94
|
+
signatureAlgorithm: string;
|
|
95
|
+
digestAlgorithm: string;
|
|
96
|
+
protocolBinding: string;
|
|
97
|
+
}
|
|
98
|
+
export interface ICasConnectionConfig {
|
|
99
|
+
casConnectionLoginUrl: string;
|
|
100
|
+
}
|
|
101
|
+
export interface SocialConnectionItem {
|
|
102
|
+
id: string;
|
|
103
|
+
embedded: boolean;
|
|
104
|
+
name: string;
|
|
105
|
+
name_en: string;
|
|
106
|
+
displayName: string;
|
|
107
|
+
logo: string;
|
|
108
|
+
description: string;
|
|
109
|
+
identifier: string;
|
|
110
|
+
provider: SocialConnectionProvider;
|
|
111
|
+
authorizationUrl: string;
|
|
112
|
+
tooltip: Record<Lang, string>;
|
|
113
|
+
}
|
|
114
|
+
export declare enum RegisterMethods {
|
|
115
|
+
Email = "email",
|
|
116
|
+
Phone = "phone",
|
|
117
|
+
EmailCode = "emailCode"
|
|
118
|
+
}
|
|
119
|
+
export declare enum RegisterSortMethods {
|
|
120
|
+
Email = "email-password",
|
|
121
|
+
Phone = "phone-code",
|
|
122
|
+
EmailCode = "email-code"
|
|
123
|
+
}
|
|
124
|
+
export interface QrCodeItem {
|
|
125
|
+
id: string;
|
|
126
|
+
title: string;
|
|
127
|
+
isDefault?: boolean;
|
|
128
|
+
type?: LoginMethods;
|
|
129
|
+
QRConfig?: {
|
|
130
|
+
corpId: string;
|
|
131
|
+
agentId: string;
|
|
132
|
+
redirectUrl: string;
|
|
133
|
+
identifier: string;
|
|
134
|
+
clientId?: string;
|
|
135
|
+
authorizationUrl?: string;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
export type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
|
|
139
|
+
export interface OidcClientMetadata {
|
|
140
|
+
grant_types: string[];
|
|
141
|
+
client_id: string;
|
|
142
|
+
redirect_uris: string[];
|
|
143
|
+
scope: string;
|
|
144
|
+
response_types: ResponseType[];
|
|
145
|
+
}
|
|
146
|
+
export interface OIDCConnectionConfig {
|
|
147
|
+
issuerUrl: string;
|
|
148
|
+
authorizationEdpoint: string;
|
|
149
|
+
responseType: string;
|
|
150
|
+
mode: OIDCConnectionMode;
|
|
151
|
+
clientId: string;
|
|
152
|
+
clientSecret: string;
|
|
153
|
+
scopes: string;
|
|
154
|
+
redirectUri: string;
|
|
155
|
+
}
|
|
156
|
+
export interface InternalExtendsField {
|
|
157
|
+
type: 'internal';
|
|
158
|
+
name: string;
|
|
159
|
+
label: string;
|
|
160
|
+
inputType: string;
|
|
161
|
+
required: boolean;
|
|
162
|
+
validateRules: any[];
|
|
163
|
+
}
|
|
164
|
+
export interface UserExtendsField {
|
|
165
|
+
type: 'user';
|
|
166
|
+
id: string;
|
|
167
|
+
name: string;
|
|
168
|
+
label: string;
|
|
169
|
+
inputType: string;
|
|
170
|
+
required: boolean;
|
|
171
|
+
validateRules: any[];
|
|
172
|
+
}
|
|
173
|
+
export type ExtendsField = InternalExtendsField | UserExtendsField;
|
|
174
|
+
export interface ApplicationPasswordTabConfig {
|
|
175
|
+
enabledLoginMethods?: PasswordLoginMethods[];
|
|
176
|
+
validRegisterMethods?: string[];
|
|
177
|
+
validLoginMethods?: string[];
|
|
178
|
+
}
|
|
179
|
+
export interface ApplicationVerifyCodeTabConfig {
|
|
180
|
+
enabledLoginMethods: VerifyLoginMethods[];
|
|
181
|
+
validRegisterMethods?: string[];
|
|
182
|
+
validLoginMethods?: string[];
|
|
183
|
+
}
|
|
184
|
+
export interface Agreement {
|
|
185
|
+
id: number;
|
|
186
|
+
title: string;
|
|
187
|
+
required: boolean;
|
|
188
|
+
lang: Lang;
|
|
189
|
+
availableAt?: number;
|
|
190
|
+
}
|
|
191
|
+
export type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
|
|
192
|
+
export type VerifyLoginMethods = 'email-code' | 'phone-code';
|
|
193
|
+
export type ComplateFiledsPlace = 'register' | 'login';
|
|
194
|
+
export interface TabFieldsI18nItem {
|
|
195
|
+
key: string;
|
|
196
|
+
label: string;
|
|
197
|
+
labelEn: string;
|
|
198
|
+
i18n: {
|
|
199
|
+
[propName in Lang]?: string;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
interface LoginTypeI18nProps {
|
|
203
|
+
tab: {
|
|
204
|
+
default: string;
|
|
205
|
+
i18n: {
|
|
206
|
+
[propName: string]: string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
interface I18nLang {
|
|
211
|
+
default: string;
|
|
212
|
+
i18n: {
|
|
213
|
+
[lang: string]: {
|
|
214
|
+
value: string;
|
|
215
|
+
enabled: boolean;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
export interface ApplicationConfig {
|
|
220
|
+
id: string;
|
|
221
|
+
allowedOrigins: string[];
|
|
222
|
+
corsWhitelist: string[];
|
|
223
|
+
cdnBase: string;
|
|
224
|
+
userPoolId: string;
|
|
225
|
+
rootUserPoolId: string;
|
|
226
|
+
publicKey: string;
|
|
227
|
+
internationalSmsConfig?: {
|
|
228
|
+
enabled: boolean;
|
|
229
|
+
defaultISOType: string;
|
|
230
|
+
};
|
|
231
|
+
css: string;
|
|
232
|
+
customLoading?: string;
|
|
233
|
+
name: string;
|
|
234
|
+
logo: string;
|
|
235
|
+
description?: string;
|
|
236
|
+
deviceFuncEnabled?: boolean;
|
|
237
|
+
redirectUris: string[];
|
|
238
|
+
registerDisabled: boolean;
|
|
239
|
+
mergeAdAndAccountPasswordLogin: boolean;
|
|
240
|
+
registerTabs: {
|
|
241
|
+
list: string[];
|
|
242
|
+
default: string;
|
|
243
|
+
title: {
|
|
244
|
+
[x: string]: string;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
registerTabsConfig: {
|
|
248
|
+
list: string[];
|
|
249
|
+
default: string;
|
|
250
|
+
title: {
|
|
251
|
+
[x: string]: string;
|
|
252
|
+
};
|
|
253
|
+
registerTypeConfig: {
|
|
254
|
+
emailRegisterType?: RegisterMethods[];
|
|
255
|
+
phoneRegisterType?: RegisterMethods[];
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
resetPwdCustomLogo?: string;
|
|
259
|
+
qrcodeTabsSettings: QrcodeTabsSettings;
|
|
260
|
+
qrCodeSortConfig: {
|
|
261
|
+
loginMethodsSort?: string[];
|
|
262
|
+
};
|
|
263
|
+
loginTabs: {
|
|
264
|
+
list: string[];
|
|
265
|
+
default: string;
|
|
266
|
+
defaultV2?: string;
|
|
267
|
+
title: {
|
|
268
|
+
[x: string]: string;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
socialConnections: SocialConnectionItem[];
|
|
272
|
+
complateFiledsPlace: ComplateFiledsPlace[];
|
|
273
|
+
extendsFieldsEnabled: boolean;
|
|
274
|
+
extendsFields: ExtendsField[];
|
|
275
|
+
extendsFieldsI18n?: {
|
|
276
|
+
[key: string]: Record<Lang, {
|
|
277
|
+
enabled: boolean;
|
|
278
|
+
value: string;
|
|
279
|
+
}>;
|
|
280
|
+
};
|
|
281
|
+
identifier: string;
|
|
282
|
+
requestHostname: string;
|
|
283
|
+
identityProviders: {
|
|
284
|
+
identifier: string;
|
|
285
|
+
protocol: Protocol;
|
|
286
|
+
displayName: string;
|
|
287
|
+
logo: string;
|
|
288
|
+
id: string;
|
|
289
|
+
config: ISamlConnectionConfig | OIDCConnectionConfig | ICasConnectionConfig | IAzureAdConnectionConfig | IOAuthConnectionConfig;
|
|
290
|
+
/** 是否开启内嵌模式 */
|
|
291
|
+
embedded?: boolean;
|
|
292
|
+
tags?: string[];
|
|
293
|
+
tagsStatus?: boolean;
|
|
294
|
+
}[];
|
|
295
|
+
ssoPageComponentDisplay: {
|
|
296
|
+
autoRegisterThenLoginHintInfo: boolean;
|
|
297
|
+
forgetPasswordBtn: boolean;
|
|
298
|
+
idpBtns: boolean;
|
|
299
|
+
loginBtn: boolean;
|
|
300
|
+
loginByPhoneCodeTab: boolean;
|
|
301
|
+
loginByUserPasswordTab: boolean;
|
|
302
|
+
loginMethodNav: boolean;
|
|
303
|
+
phoneCodeInput: boolean;
|
|
304
|
+
registerBtn: boolean;
|
|
305
|
+
registerByEmailTab: boolean;
|
|
306
|
+
registerByPhoneTab: boolean;
|
|
307
|
+
registerMethodNav: boolean;
|
|
308
|
+
socialLoginBtns: boolean;
|
|
309
|
+
userPasswordInput: boolean;
|
|
310
|
+
wxMpScanTab: boolean;
|
|
311
|
+
loginMethodsI18nDisplaySettings: {
|
|
312
|
+
password?: LoginTypeI18nProps;
|
|
313
|
+
verifyCode?: LoginTypeI18nProps;
|
|
314
|
+
ad?: LoginTypeI18nProps;
|
|
315
|
+
ldap?: LoginTypeI18nProps;
|
|
316
|
+
};
|
|
317
|
+
idpLayout?: {
|
|
318
|
+
maxConns: number;
|
|
319
|
+
topLastUsed: boolean;
|
|
320
|
+
customMoreI18n: I18nLang;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
protocol: Protocol;
|
|
324
|
+
oidcConfig: OidcClientMetadata;
|
|
325
|
+
passwordTabConfig: ApplicationPasswordTabConfig;
|
|
326
|
+
verifyCodeTabConfig?: ApplicationVerifyCodeTabConfig;
|
|
327
|
+
agreementEnabled: boolean;
|
|
328
|
+
agreements: Agreement[];
|
|
329
|
+
customPasswordStrength: any;
|
|
330
|
+
passwordStrength: PasswordStrength;
|
|
331
|
+
verifyCodeLength: number;
|
|
332
|
+
websocket: string;
|
|
333
|
+
welcomeMessage: any;
|
|
334
|
+
skipComplateFileds: boolean;
|
|
335
|
+
selfUnlockStrategy: 'captcha' | 'password-captcha';
|
|
336
|
+
defaultLanguageConfig: Lang;
|
|
337
|
+
/**
|
|
338
|
+
* 是否开启账号切换
|
|
339
|
+
*/
|
|
340
|
+
enableLoginAccountSwitch: boolean;
|
|
341
|
+
/**
|
|
342
|
+
* 是否开启注册密码补全
|
|
343
|
+
*/
|
|
344
|
+
enableCompletePassword: boolean;
|
|
345
|
+
/** 是否开启手机密码注册手机号验证 */
|
|
346
|
+
enabledPPRegisterValid?: boolean;
|
|
347
|
+
/** 是否开启邮箱密码注册验证 */
|
|
348
|
+
enabledMailPwdRegisterValid?: boolean;
|
|
349
|
+
/** 是否开启邮箱域名匹配登录 */
|
|
350
|
+
enabledMatchEmailDomain?: boolean;
|
|
351
|
+
/** 注册是否开启账号类型选择 */
|
|
352
|
+
enableAccountTypeSelect?: boolean;
|
|
353
|
+
/**
|
|
354
|
+
* 登录注册排序
|
|
355
|
+
*/
|
|
356
|
+
tabMethodsSortConfig: {
|
|
357
|
+
loginMethodsSort: string[];
|
|
358
|
+
};
|
|
359
|
+
tabMethodsFields: TabFieldsI18nItem[];
|
|
360
|
+
regexRules?: {
|
|
361
|
+
key: string;
|
|
362
|
+
appLevel: string;
|
|
363
|
+
userpoolLevel: string;
|
|
364
|
+
}[];
|
|
365
|
+
/** 是否为租户控制台应用 */
|
|
366
|
+
isTenantConsole?: boolean;
|
|
367
|
+
/** 是否默认为租户应用面板应用 */
|
|
368
|
+
isTenantDefault?: boolean;
|
|
369
|
+
/** 租户详情 */
|
|
370
|
+
tenantInfo?: Record<string, any>;
|
|
371
|
+
/** mfa 相关 */
|
|
372
|
+
mfa: {
|
|
373
|
+
faceScore: number;
|
|
374
|
+
};
|
|
375
|
+
authingOtpPushTabConfig: {
|
|
376
|
+
enabledLoginMethods: Array<string> | null;
|
|
377
|
+
validLoginMethods: Array<string> | null;
|
|
378
|
+
validRegisterMethods: Array<string> | null;
|
|
379
|
+
};
|
|
380
|
+
/** 是否开启自定义安全规则 */
|
|
381
|
+
customSecurityEnabled: boolean;
|
|
382
|
+
/** 应用的人机验证策略,始终开启、不开启、设置条件触发 */
|
|
383
|
+
appRobotVerify: 'always_enable' | 'disable' | 'condition_set';
|
|
384
|
+
/** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */
|
|
385
|
+
userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set';
|
|
386
|
+
/** 加入租户校验企业邮箱 */
|
|
387
|
+
enableVerifyDomainInJoinTenant: boolean;
|
|
388
|
+
passkeyEnabled: boolean;
|
|
389
|
+
defaultAppId: string;
|
|
390
|
+
enableCreateTenant: boolean;
|
|
391
|
+
enableJoinTenant: boolean;
|
|
392
|
+
mfaBindConfigs?: {
|
|
393
|
+
mfa: MFAType;
|
|
394
|
+
changeable: boolean;
|
|
395
|
+
}[];
|
|
396
|
+
/** 注册阶段短信安全配置 */
|
|
397
|
+
registerSmsConfig?: {
|
|
398
|
+
robot: {
|
|
399
|
+
switch: 'OFF' | 'ON' | 'CONDON';
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
/** 登录阶段短信安全配置 */
|
|
403
|
+
loginSmsConfig?: {
|
|
404
|
+
robot: {
|
|
405
|
+
switch: 'OFF' | 'ON' | 'CONDON';
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
forgetPasswordSmsConfig?: {
|
|
409
|
+
robot: {
|
|
410
|
+
switch: 'OFF' | 'ON' | 'CONDON';
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
/** 注册阶段邮件安全配置 */
|
|
414
|
+
registerEmailConfig?: {
|
|
415
|
+
robot: {
|
|
416
|
+
switch: 'OFF' | 'ON' | 'CONDON';
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
/** 登录阶段邮件安全配置 */
|
|
420
|
+
loginEmailConfig?: {
|
|
421
|
+
robot: {
|
|
422
|
+
switch: 'OFF' | 'ON' | 'CONDON';
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
forgetPasswordEmailConfig?: {
|
|
426
|
+
robot: {
|
|
427
|
+
switch: 'OFF' | 'ON' | 'CONDON';
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
/** 特殊浏览器匹配字符串 */
|
|
431
|
+
specialBrowserSymbols?: string[];
|
|
432
|
+
resetPwdTipsConfig?: {
|
|
433
|
+
title: I18nLang;
|
|
434
|
+
desc: I18nLang;
|
|
435
|
+
};
|
|
436
|
+
noticePwdTipsConfig?: {
|
|
437
|
+
title: I18nLang;
|
|
438
|
+
desc: I18nLang;
|
|
439
|
+
};
|
|
440
|
+
noticePwdCustomLogo?: string;
|
|
441
|
+
/**
|
|
442
|
+
* 开启延迟校验用户是否存在功能
|
|
443
|
+
*/
|
|
444
|
+
closeCheckSendUser?: boolean;
|
|
445
|
+
resetPwdLinkCustomLogo?: string;
|
|
446
|
+
resetPwdLinkTipsConfig?: {
|
|
447
|
+
title: I18nLang;
|
|
448
|
+
desc: I18nLang;
|
|
449
|
+
};
|
|
450
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { React } from 'shim-react';
|
|
2
|
+
import { AuthenticationClient, CommonMessage, User } from 'authing-js-sdk';
|
|
3
|
+
import { GuardModuleType } from '../Guard/module';
|
|
4
|
+
import { FacePlugin } from '../_utils/facePlugin/interface';
|
|
5
|
+
import { ApplicationConfig, Lang } from './application';
|
|
6
|
+
export * from './application';
|
|
7
|
+
export type { CommonMessage, User };
|
|
8
|
+
export declare enum GuardMode {
|
|
9
|
+
Modal = "modal",
|
|
10
|
+
Normal = "normal"
|
|
11
|
+
}
|
|
12
|
+
export interface IG2FCProps extends IG2Events {
|
|
13
|
+
appId?: string;
|
|
14
|
+
tenantId?: string;
|
|
15
|
+
deviceId?: string;
|
|
16
|
+
config?: Partial<IG2Config>;
|
|
17
|
+
visible?: boolean;
|
|
18
|
+
initData?: any;
|
|
19
|
+
appendConfig?: GuardAppendConfig;
|
|
20
|
+
facePlugin?: FacePlugin;
|
|
21
|
+
authClient?: AuthenticationClient;
|
|
22
|
+
}
|
|
23
|
+
export interface GuardAppendConfig {
|
|
24
|
+
internalRequest?: boolean;
|
|
25
|
+
singleComponent?: boolean;
|
|
26
|
+
unAuthFlow?: boolean;
|
|
27
|
+
publicConfig?: ApplicationConfig;
|
|
28
|
+
pageConfig?: GuardPageConfig;
|
|
29
|
+
}
|
|
30
|
+
export interface IG2FCViewProps extends IG2FCProps {
|
|
31
|
+
config: IG2Config;
|
|
32
|
+
}
|
|
33
|
+
export interface IG2Config {
|
|
34
|
+
title?: string;
|
|
35
|
+
logo?: string;
|
|
36
|
+
lang?: string;
|
|
37
|
+
langRange?: Lang[];
|
|
38
|
+
host: string;
|
|
39
|
+
isHost?: boolean;
|
|
40
|
+
mode: GuardMode;
|
|
41
|
+
clickCloseable: boolean;
|
|
42
|
+
escCloseable: boolean;
|
|
43
|
+
userpool?: string;
|
|
44
|
+
contentCss?: string;
|
|
45
|
+
target?: HTMLElement | string;
|
|
46
|
+
style?: React.CSSProperties;
|
|
47
|
+
__internalRequest__?: boolean;
|
|
48
|
+
__singleComponent__?: boolean;
|
|
49
|
+
__unAuthFlow__?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface IG2Events {
|
|
52
|
+
onLoad?: (authClient: AuthenticationClient) => void;
|
|
53
|
+
onLoadError?: (error: any) => void;
|
|
54
|
+
onClose?: () => void;
|
|
55
|
+
onLangChange?: (lang: Lang) => void;
|
|
56
|
+
__changeModule?: (moduleName: GuardModuleType, initData?: any) => void;
|
|
57
|
+
}
|
|
58
|
+
export declare const getDefaultG2Config: () => IG2Config;
|
|
59
|
+
export declare const LanguageMap: any;
|
|
60
|
+
export declare enum InputMethod {
|
|
61
|
+
EmailCode = "email-code",
|
|
62
|
+
PhoneCode = "phone-code"
|
|
63
|
+
}
|
|
64
|
+
export declare enum GuardPageSene {
|
|
65
|
+
Global = "global"
|
|
66
|
+
}
|
|
67
|
+
export interface GuardPageConfig {
|
|
68
|
+
[GuardPageSene.Global]: {
|
|
69
|
+
showChangeLanguage: boolean;
|
|
70
|
+
defaultLanguage: Lang | 'browser';
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export declare enum EmailScene {
|
|
74
|
+
WELCOME_EMAIL = "WELCOME_EMAIL",
|
|
75
|
+
FIRST_CREATED_USER = "FIRST_CREATED_USER",
|
|
76
|
+
REGISTER_VERIFY_CODE = "REGISTER_VERIFY_CODE",
|
|
77
|
+
LOGIN_VERIFY_CODE = "LOGIN_VERIFY_CODE",
|
|
78
|
+
MFA_VERIFY_CODE = "MFA_VERIFY_CODE",
|
|
79
|
+
INFORMATION_COMPLETION_VERIFY_CODE = "INFORMATION_COMPLETION_VERIFY_CODE",
|
|
80
|
+
FIRST_EMAIL_LOGIN_VERIFY = "FIRST_EMAIL_LOGIN_VERIFY",
|
|
81
|
+
CONSOLE_CONDUCTED_VERIFY = "CONSOLE_CONDUCTED_VERIFY",
|
|
82
|
+
RESET_PASSWORD_VERIFY_CODE = "RESET_PASSWORD_VERIFY_CODE",
|
|
83
|
+
EMAIL_BIND_VERIFY_CODE = "EMAIL_BIND_VERIFY_CODE",
|
|
84
|
+
EMAIL_UNBIND_VERIFY_CODE = "EMAIL_UNBIND_VERIFY_CODE",
|
|
85
|
+
SELF_UNLOCKING_VERIFY_CODE = "SELF_UNLOCKING_VERIFY_CODE",
|
|
86
|
+
VERIFY_CODE = "VERIFY_CODE"
|
|
87
|
+
}
|
|
88
|
+
export declare enum ForcedModifyPwdCycleUnit {
|
|
89
|
+
Day = "DAY",
|
|
90
|
+
Month = "MONTH",
|
|
91
|
+
Year = "YEAR"
|
|
92
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FormItemProps } from 'shim-antd';
|
|
2
|
+
import { React } from 'shim-react';
|
|
3
|
+
export interface PasswordFormItemProps extends FormItemProps {
|
|
4
|
+
}
|
|
5
|
+
export interface ExPasswordFormItemProps extends PasswordFormItemProps {
|
|
6
|
+
fieldRequiredRuleMessage?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const PasswordFormItem: React.FC<ExPasswordFormItemProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { React } from 'shim-react';
|
|
2
|
+
import { ValidatorFormItemProps } from '.';
|
|
3
|
+
export declare const EmailFormItem: React.FC<ValidatorFormItemProps>;
|
|
4
|
+
export declare const PhoneFormItem: React.FC<ValidatorFormItemProps>;
|
|
5
|
+
export declare const UserNameFormItem: React.FC<ValidatorFormItemProps>;
|
|
6
|
+
export declare const CustomNameFormItem: React.FC<ValidatorFormItemProps & {
|
|
7
|
+
method: string;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FormInstance } from 'shim-antd/lib/form';
|
|
2
|
+
import { Form, FormItemProps } from 'shim-antd';
|
|
3
|
+
import { PasswordFormItem } from './PasswordFormItem';
|
|
4
|
+
import { EmailFormItem, PhoneFormItem, UserNameFormItem, CustomNameFormItem } from './ValidatorFormItem';
|
|
5
|
+
export * from './PasswordFormItem';
|
|
6
|
+
export * from './ValidatorFormItem';
|
|
7
|
+
export * from './useCheckRepeat';
|
|
8
|
+
export interface ValidatorFormItemProps extends FormItemProps {
|
|
9
|
+
form?: FormInstance;
|
|
10
|
+
checkRepeat?: boolean;
|
|
11
|
+
checkExist?: boolean;
|
|
12
|
+
areaCode?: string;
|
|
13
|
+
/**
|
|
14
|
+
* 控制内部FormItem组件关于pattern的校验规则
|
|
15
|
+
*/
|
|
16
|
+
isCheckPattern?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
|
|
19
|
+
method: 'email' | 'phone' | 'username' | string;
|
|
20
|
+
}
|
|
21
|
+
export interface ICheckProps {
|
|
22
|
+
check: (values: any) => void;
|
|
23
|
+
}
|
|
24
|
+
type InternalFormItemType = typeof Form.Item;
|
|
25
|
+
interface FormItemInterface extends InternalFormItemType {
|
|
26
|
+
Password: typeof PasswordFormItem;
|
|
27
|
+
Email: typeof EmailFormItem;
|
|
28
|
+
Phone: typeof PhoneFormItem;
|
|
29
|
+
UserName: typeof UserNameFormItem;
|
|
30
|
+
CustomName: typeof CustomNameFormItem;
|
|
31
|
+
}
|
|
32
|
+
declare const CustomFormItem: FormItemInterface;
|
|
33
|
+
export default CustomFormItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useCheckRepeat: (checkFn: (value: any, resolve: (value: unknown) => void, reject: (reason?: any) => void) => void) => (_: any, value: any) => Promise<unknown>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { React } from 'shim-react';
|
|
2
|
+
import './style.less';
|
|
3
|
+
interface VerifyCodeInputProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
verifyCode: string[];
|
|
5
|
+
setVerifyCode: (code: string[]) => void;
|
|
6
|
+
length?: number;
|
|
7
|
+
onEnter?: Function;
|
|
8
|
+
}
|
|
9
|
+
export declare const VerifyCodeInput: React.FC<VerifyCodeInputProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum ErrorCode {
|
|
2
|
+
OTP_MFA_CODE = 1635,
|
|
3
|
+
APP_MFA_CODE = 1636,
|
|
4
|
+
INPUT_CAPTCHACODE = 2000,
|
|
5
|
+
USER_EXISTENCE = 2026,
|
|
6
|
+
LOGIN_INVALID = 2021,
|
|
7
|
+
PASSWORD_ERROR = 2333,
|
|
8
|
+
USER_NOT_EXIST = 2004,
|
|
9
|
+
MULTIPLE_ERROR_LOCK = 2057,
|
|
10
|
+
SELECT_ACCOUNT_2_LOGIN = 2930,
|
|
11
|
+
ACCOUNT_LOCK = 2005
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const copyToClipboard: (str: string) => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RegisterSortMethods } from '../Type';
|
|
2
|
+
export declare const assembledRequestHost: (requestHostname: string, configHost: string) => string;
|
|
3
|
+
export declare const getHundreds: (num: number) => number;
|
|
4
|
+
export declare const transformSortMethod: (method: RegisterSortMethods | string) => string;
|
|
5
|
+
export declare const isWeChatBrowser: () => boolean | null;
|
|
6
|
+
export declare const isLarkBrowser: () => boolean | null;
|
|
7
|
+
export declare const isQtWebEngine: () => boolean | null;
|
|
8
|
+
export declare const isXiaomiBrowser: () => boolean | null;
|
|
9
|
+
export declare const isDingtalkBrowser: () => boolean | null;
|
|
10
|
+
export declare const isQQBrowser: () => boolean | null;
|
|
11
|
+
export declare const isQQBuiltInBrowser: () => boolean | null;
|
|
12
|
+
export declare const isWeWorkBuiltInBrowser: () => boolean | null;
|
|
13
|
+
export declare const isEdgeBrowser: () => boolean;
|
|
14
|
+
export declare const isWeiboBrowser: () => boolean | null;
|
|
15
|
+
export declare const isAlipayBrowser: () => boolean | null;
|
|
16
|
+
export declare const isBaiduBrowser: () => boolean | null;
|
|
17
|
+
export declare const isWeComeBrowser: () => boolean | null;
|
|
18
|
+
export declare const isMobile: () => RegExpMatchArray | null | undefined;
|
|
19
|
+
export declare const isWebview: () => boolean | null;
|
|
20
|
+
export declare const isLenovoNetdisk: () => boolean | null;
|
|
21
|
+
export declare const computeIsSpecialBrowser: (specialBrowserSymbol?: string[]) => boolean;
|
|
22
|
+
export declare const getPhoneInLoginPageContext: () => any;
|