@authing/react-ui-components 3.0.2-beta.5 → 3.1.1-rc.1
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/.vscode/settings.json +1 -1
- package/LICENSE +21 -0
- package/config/env.js +26 -24
- package/config/paths.js +3 -3
- package/config/webpack.config.js +29 -7
- package/lib/index.d.ts +211 -1252
- package/lib/index.min.css +1 -2
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.LICENSE.txt +0 -32
- package/package.json +14 -20
- package/scripts/build.js +83 -79
- package/scripts/start.js +73 -69
- package/scripts/test.js +23 -19
- package/{components → src/common}/AuthingDropdown/index.tsx +1 -1
- package/{components → src/common}/AuthingDropdown/style.less +0 -0
- package/{components → src/common}/AuthingTabs/index.tsx +1 -1
- package/{components → src/common}/AuthingTabs/style.less +0 -0
- package/{components → src/common}/CopyAbleText/index.tsx +1 -1
- package/{components → src/common}/CopyAbleText/style.less +0 -0
- package/{components → src/common}/VerifyCodeInput/index.tsx +0 -0
- package/{components → src/common}/VerifyCodeInput/style.less +0 -0
- package/{components → src/components}/AuthingGuard/AppMFALayout/index.tsx +2 -2
- package/{components → src/components}/AuthingGuard/AppMFALayout/style.less +0 -0
- package/{components → src/components}/AuthingGuard/CompleteUserInfoLayout/index.tsx +1 -1
- package/{components → src/components}/AuthingGuard/CompleteUserInfoLayout/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/ADLoginForm/index.tsx +2 -2
- package/{components → src/components}/AuthingGuard/Forms/Agreements/index.tsx +1 -1
- package/{components → src/components}/AuthingGuard/Forms/Agreements/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/CompleteUserInfoForm/index.tsx +3 -3
- package/{components → src/components}/AuthingGuard/Forms/EmailMfaVerifyForm/CheckEmailForm.tsx +4 -2
- package/{components → src/components}/AuthingGuard/Forms/EmailMfaVerifyForm/VerifyCodeForm.tsx +2 -2
- package/{components → src/components}/AuthingGuard/Forms/EmailMfaVerifyForm/index.tsx +1 -1
- package/{components → src/components}/AuthingGuard/Forms/EmailMfaVerifyForm/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/EmailRegisterForm/index.tsx +2 -2
- package/{components → src/components}/AuthingGuard/Forms/EmailRegisterForm/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/LdapLoginForm/index.tsx +4 -9
- package/{components → src/components}/AuthingGuard/Forms/LdapLoginForm/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/LoginFormFooter/index.tsx +1 -1
- package/{components → src/components}/AuthingGuard/Forms/LoginFormFooter/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/MfaResetCodeForm/Step1.tsx +2 -2
- package/{components → src/components}/AuthingGuard/Forms/MfaResetCodeForm/Step2.tsx +1 -1
- package/{components → src/components}/AuthingGuard/Forms/MfaResetCodeForm/index.tsx +1 -1
- package/{components → src/components}/AuthingGuard/Forms/MfaResetCodeForm/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/MfaVerifyForm/index.tsx +2 -2
- package/{components → src/components}/AuthingGuard/Forms/MfaVerifyForm/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/PasswordLoginForm/index.tsx +3 -3
- package/{components → src/components}/AuthingGuard/Forms/PhoneCodeLoginForm/index.tsx +2 -2
- package/{components → src/components}/AuthingGuard/Forms/PhoneRegisterForm/index.tsx +2 -2
- package/{components → src/components}/AuthingGuard/Forms/QrCodeLoginForm/index.tsx +4 -2
- package/{components → src/components}/AuthingGuard/Forms/QrCodeLoginForm/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/RegisterFormFooter/index.tsx +1 -1
- package/{components → src/components}/AuthingGuard/Forms/RegisterFormFooter/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/Footer.tsx +1 -1
- package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/Step1.tsx +2 -2
- package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/Step2.tsx +2 -2
- package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/Step3.tsx +2 -2
- package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/Step4.tsx +1 -1
- package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/index.tsx +1 -1
- package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/SendPhoneCode/SendCodeBtn.tsx +0 -0
- package/{components → src/components}/AuthingGuard/Forms/SendPhoneCode/index.tsx +2 -2
- package/{components → src/components}/AuthingGuard/Forms/SendPhoneCode/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/SmsMfaVerifyForm/CheckPhoneForm.tsx +2 -2
- package/{components → src/components}/AuthingGuard/Forms/SmsMfaVerifyForm/VerifyCodeForm.tsx +2 -2
- package/{components → src/components}/AuthingGuard/Forms/SmsMfaVerifyForm/index.tsx +1 -1
- package/{components → src/components}/AuthingGuard/Forms/SmsMfaVerifyForm/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/SocialAndIdpLogin/index.tsx +7 -7
- package/{components → src/components}/AuthingGuard/Forms/SocialAndIdpLogin/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Forms/UploadImage/index.tsx +1 -1
- package/{components → src/components}/AuthingGuard/Forms/index.ts +0 -0
- package/{components → src/components}/AuthingGuard/GuardLayout/index.tsx +17 -3
- package/{components → src/components}/AuthingGuard/GuardLayout/style.less +0 -0
- package/{components → src/components}/AuthingGuard/Header/index.tsx +6 -3
- package/{components → src/components}/AuthingGuard/Header/style.less +23 -11
- package/{components → src/components}/AuthingGuard/IconFont/iconfont.js +0 -0
- package/{components → src/components}/AuthingGuard/IconFont/index.tsx +1 -1
- package/{components → src/components}/AuthingGuard/IconFont/style.less +0 -0
- package/{components → src/components}/AuthingGuard/IconFont/svg.js +0 -0
- package/{components → src/components}/AuthingGuard/LoginLayout/index.tsx +69 -25
- package/{components → src/components}/AuthingGuard/LoginLayout/style.less +0 -0
- package/{components → src/components}/AuthingGuard/MfaLayout/Steps.ts +0 -0
- package/{components → src/components}/AuthingGuard/MfaLayout/index.tsx +1 -1
- package/{components → src/components}/AuthingGuard/MfaLayout/style.less +0 -0
- package/{components → src/components}/AuthingGuard/RegisterLayout/index.tsx +2 -2
- package/{components → src/components}/AuthingGuard/RegisterLayout/style.less +0 -0
- package/{components → src/components}/AuthingGuard/ResetPwdLayout/index.tsx +1 -1
- package/{components → src/components}/AuthingGuard/ToggleLang/index.tsx +2 -2
- package/{components → src/components}/AuthingGuard/api/appConfig.ts +22 -14
- package/{components/_utils → src/components/AuthingGuard/api}/http.ts +33 -30
- package/{components → src/components}/AuthingGuard/api/index.ts +0 -0
- package/{components → src/components}/AuthingGuard/api/sso.ts +1 -1
- package/{components → src/components}/AuthingGuard/api/userPoolConfig.ts +3 -2
- package/{components → src/components}/AuthingGuard/constants.ts +2 -2
- package/{components → src/components}/AuthingGuard/hooks/index.tsx +0 -0
- package/{components → src/components}/AuthingGuard/hooks/useScreenSize.tsx +0 -0
- package/{components → src/components}/AuthingGuard/index.tsx +11 -3
- package/{components/_utils → src/components/AuthingGuard}/locales/en/common.json +26 -70
- package/{components/_utils → src/components/AuthingGuard}/locales/en/index.ts +0 -0
- package/{components/_utils → src/components/AuthingGuard}/locales/en/login.json +19 -21
- package/{components/_utils → src/components/AuthingGuard}/locales/en/map.json +0 -0
- package/{components/_utils → src/components/AuthingGuard}/locales/en/user.json +3 -4
- package/{components/_utils → src/components/AuthingGuard}/locales/index.ts +2 -2
- package/{components/_utils → src/components/AuthingGuard}/locales/zh/common.json +9 -53
- package/{components/_utils → src/components/AuthingGuard}/locales/zh/index.ts +0 -0
- package/{components/_utils → src/components/AuthingGuard}/locales/zh/login.json +4 -6
- package/{components/_utils → src/components/AuthingGuard}/locales/zh/map.json +0 -0
- package/{components/_utils → src/components/AuthingGuard}/locales/zh/user.json +1 -3
- package/{components → src/components}/AuthingGuard/style.less +5 -0
- package/{components → src/components}/AuthingGuard/types/Forms.ts +2 -1
- package/{components → src/components}/AuthingGuard/types/GuardConfig.ts +5 -1
- package/{components → src/components}/AuthingGuard/types/GuardState.ts +1 -1
- package/{components → src/components}/AuthingGuard/types/Locales.ts +0 -0
- package/{components → src/components}/AuthingGuard/types/index.ts +0 -0
- package/src/components/index.ts +7 -0
- package/{components → src}/context/base.tsx +0 -0
- package/{components → src}/context/global/context.tsx +0 -0
- package/{components → src}/context/global/reducer.tsx +2 -2
- package/src/index.tsx +142 -0
- package/{logo.svg → src/logo.svg} +0 -0
- package/{react-app-env.d.ts → src/react-app-env.d.ts} +0 -0
- package/{reportWebVitals.ts → src/reportWebVitals.ts} +0 -0
- package/{setupTests.ts → src/setupTests.ts} +0 -0
- package/{components/_utils → src/utils}/clipboard.ts +1 -1
- package/{components/_utils → src/utils}/index.ts +3 -149
- package/{components/_utils → src/utils}/popupCenter.ts +0 -0
- package/tsconfig.json +2 -8
- package/build/asset-manifest.json +0 -26
- package/build/favicon.ico +0 -0
- package/build/index.html +0 -1
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +0 -25
- package/build/robots.txt +0 -3
- package/build/static/css/2.51c07e65.chunk.css +0 -3
- package/build/static/css/2.51c07e65.chunk.css.map +0 -1
- package/build/static/css/main.779f221a.chunk.css +0 -2
- package/build/static/css/main.779f221a.chunk.css.map +0 -1
- package/build/static/js/2.bbae9fdb.chunk.js +0 -3
- package/build/static/js/2.bbae9fdb.chunk.js.LICENSE.txt +0 -102
- package/build/static/js/2.bbae9fdb.chunk.js.map +0 -1
- package/build/static/js/3.fd17f196.chunk.js +0 -2
- package/build/static/js/3.fd17f196.chunk.js.map +0 -1
- package/build/static/js/main.5f341531.chunk.js +0 -2
- package/build/static/js/main.5f341531.chunk.js.map +0 -1
- package/build/static/js/runtime-main.ef138021.js +0 -2
- package/build/static/js/runtime-main.ef138021.js.map +0 -1
- package/build/static/media/loading.4a67a5f3.svg +0 -29
- package/components/BindTotp/core/bindSuccess.tsx +0 -72
- package/components/BindTotp/core/securityCode.tsx +0 -108
- package/components/BindTotp/index.tsx +0 -134
- package/components/BindTotp/interface.ts +0 -30
- package/components/BindTotp/styles.less +0 -57
- package/components/ChangeLanguage/index.tsx +0 -35
- package/components/ChangePassword/core/firstLoginReset.tsx +0 -111
- package/components/ChangePassword/core/rotateReset.tsx +0 -114
- package/components/ChangePassword/index.tsx +0 -72
- package/components/CompleteInfo/core/completeInfo.tsx +0 -155
- package/components/CompleteInfo/index.tsx +0 -45
- package/components/CompleteInfo/interface.ts +0 -40
- package/components/CompleteInfo/styles.less +0 -7
- package/components/DownloadAuthenticator/index.tsx +0 -97
- package/components/DownloadAuthenticator/interface.ts +0 -22
- package/components/DownloadAuthenticator/styles.less +0 -52
- package/components/Error/index.tsx +0 -21
- package/components/Error/interface.ts +0 -9
- package/components/Error/styles.less +0 -12
- package/components/ForgetPassword/core/resetPassword.tsx +0 -162
- package/components/ForgetPassword/index.tsx +0 -78
- package/components/ForgetPassword/interface.ts +0 -32
- package/components/Guard/Guard.tsx +0 -295
- package/components/Guard/authClient.ts +0 -44
- package/components/Guard/config.ts +0 -19
- package/components/Guard/event.ts +0 -52
- package/components/Guard/index.tsx +0 -4
- package/components/Guard/module.ts +0 -20
- package/components/Guard/stateMachine.ts +0 -152
- package/components/Guard/styles.less +0 -461
- package/components/IconFont/iconfont.js +0 -74
- package/components/IconFont/index.tsx +0 -16
- package/components/IconFont/style.less +0 -6
- package/components/IconFont/svg.js +0 -2
- package/components/ImagePro/index.tsx +0 -53
- package/components/ImagePro/styles.less +0 -40
- package/components/InputNumber/index.tsx +0 -33
- package/components/Login/codemap.ts +0 -49
- package/components/Login/core/withAD.tsx +0 -9
- package/components/Login/core/withAppQrcode.tsx +0 -49
- package/components/Login/core/withLDAP.tsx +0 -146
- package/components/Login/core/withPassword/FormItemAccount.tsx +0 -42
- package/components/Login/core/withPassword/GraphicVerifyCode.tsx +0 -30
- package/components/Login/core/withPassword/InputAccount.tsx +0 -64
- package/components/Login/core/withPassword/index.tsx +0 -173
- package/components/Login/core/withPhonecode.tsx +0 -122
- package/components/Login/core/withWechatMiniQrcode.tsx +0 -60
- package/components/Login/core/withWechatmpQrcode.tsx +0 -53
- package/components/Login/index.tsx +0 -374
- package/components/Login/props.ts +0 -74
- package/components/Login/socialLogin/index.tsx +0 -407
- package/components/Login/socialLogin/style.less +0 -69
- package/components/Login/styles.less +0 -53
- package/components/MFA/VerifyCodeInput/VerifyCodeFormItem.tsx +0 -41
- package/components/MFA/VerifyCodeInput/index.tsx +0 -145
- package/components/MFA/VerifyCodeInput/style.less +0 -35
- package/components/MFA/codemap.ts +0 -24
- package/components/MFA/core/email.tsx +0 -203
- package/components/MFA/core/face.tsx +0 -297
- package/components/MFA/core/face_deps.tsx +0 -37
- package/components/MFA/core/sms.tsx +0 -203
- package/components/MFA/core/totp.tsx +0 -122
- package/components/MFA/index.tsx +0 -143
- package/components/MFA/mfaMethods/index.tsx +0 -88
- package/components/MFA/mfaMethods/style.less +0 -39
- package/components/MFA/props.ts +0 -51
- package/components/MFA/styles.less +0 -100
- package/components/NeedHelpView/core/describeQuestions.tsx +0 -245
- package/components/NeedHelpView/index.tsx +0 -47
- package/components/RecoveryCode/core/useCode.tsx +0 -71
- package/components/RecoveryCode/index.tsx +0 -27
- package/components/RecoveryCode/interface.ts +0 -31
- package/components/RecoveryCode/style.less +0 -13
- package/components/Register/codemap.ts +0 -12
- package/components/Register/components/Agreements/index.tsx +0 -81
- package/components/Register/components/Agreements/style.less +0 -44
- package/components/Register/core/WithEmail.tsx +0 -242
- package/components/Register/core/WithPhone.tsx +0 -184
- package/components/Register/index.tsx +0 -139
- package/components/Register/props.ts +0 -50
- package/components/SendCode/SendCodeBtn.tsx +0 -96
- package/components/SendCode/index.tsx +0 -94
- package/components/SendCode/style.less +0 -31
- package/components/ShieldSpin/index.tsx +0 -27
- package/components/ShieldSpin/loading.svg +0 -29
- package/components/SubmitButton/index.tsx +0 -50
- package/components/SubmitSuccess/index.tsx +0 -66
- package/components/SubmitSuccess/interface.ts +0 -17
- package/components/Type/index.ts +0 -52
- package/components/ValidatorRules/ValidatorFormItem.tsx +0 -139
- package/components/ValidatorRules/index.ts +0 -20
- package/components/_utils/GuardErrorCode.ts +0 -9
- package/components/_utils/config.ts +0 -116
- package/components/_utils/guradHttp.ts +0 -101
- package/components/_utils/hooks/index.ts +0 -64
- package/components/assets/images/error.png +0 -0
- package/components/context/module/context.tsx +0 -23
- package/components/index.ts +0 -12
- package/examples.tsx +0 -87
- package/index.js +0 -1
- package/lib/static/media/loading.4a67a5f3.svg +0 -29
- package/scripts/publish.js +0 -57
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export enum GuardModuleType {
|
|
2
|
-
ERROR = 'error',
|
|
3
|
-
LOGIN = 'login',
|
|
4
|
-
REGISTER = 'register',
|
|
5
|
-
MFA = 'mfa',
|
|
6
|
-
FORGET_PWD = 'forgetPassword',
|
|
7
|
-
CHANGE_PWD = 'changePassword',
|
|
8
|
-
DOWNLOAD_AT = 'downloadAT',
|
|
9
|
-
BIND_TOTP = 'bindTotp',
|
|
10
|
-
ANY_QUESTIONS = 'anyQuestions',
|
|
11
|
-
COMPLETE_INFO = 'completeInfo',
|
|
12
|
-
RECOVERY_CODE = 'recoveryCode',
|
|
13
|
-
SUBMIT_SUCCESS = 'submitSuccess',
|
|
14
|
-
}
|
|
15
|
-
export interface GuardModuleAction {
|
|
16
|
-
action: string
|
|
17
|
-
module?: GuardModuleType
|
|
18
|
-
message?: string
|
|
19
|
-
initData?: any
|
|
20
|
-
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { useEffect } from 'react'
|
|
2
|
-
import { GuardComponentConifg, GuardLocalConfig } from './config'
|
|
3
|
-
import { GuardModuleType } from './module'
|
|
4
|
-
const window: Window = require('global/window')
|
|
5
|
-
|
|
6
|
-
export interface ModuleState {
|
|
7
|
-
moduleName: GuardModuleType
|
|
8
|
-
initData?: any
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export enum ActionType {
|
|
12
|
-
ChangeModule = 'ChangeModule',
|
|
13
|
-
Back = 'Back',
|
|
14
|
-
Init = 'Init',
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface StateMachineLog {
|
|
18
|
-
action: ActionType
|
|
19
|
-
date: number
|
|
20
|
-
dataSource: ModuleState
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type ChangeModuleEvent = (
|
|
24
|
-
nextModelu: GuardModuleType,
|
|
25
|
-
initData?: any
|
|
26
|
-
) => void
|
|
27
|
-
|
|
28
|
-
let guardStateMachine: GuardStateMachine
|
|
29
|
-
|
|
30
|
-
export class GuardStateMachine {
|
|
31
|
-
// 计数器
|
|
32
|
-
private order: number = 0
|
|
33
|
-
|
|
34
|
-
// 总体的配置信息
|
|
35
|
-
private config: GuardComponentConifg = {}
|
|
36
|
-
|
|
37
|
-
// 历史记录
|
|
38
|
-
private moduleStateHistory: ModuleState[] = []
|
|
39
|
-
|
|
40
|
-
private changeMouleEvent: ChangeModuleEvent
|
|
41
|
-
|
|
42
|
-
// Log
|
|
43
|
-
private stateMachineLog: Record<number, StateMachineLog> = {}
|
|
44
|
-
|
|
45
|
-
constructor(changeMouleEvent: ChangeModuleEvent, initData: ModuleState) {
|
|
46
|
-
this.changeMouleEvent = changeMouleEvent
|
|
47
|
-
|
|
48
|
-
this.historyPush(initData, ActionType.Init)
|
|
49
|
-
}
|
|
50
|
-
globalWindow = (): Window | undefined =>
|
|
51
|
-
typeof window !== undefined ? window : undefined
|
|
52
|
-
|
|
53
|
-
next = (nextModelu: GuardModuleType, initData: any) => {
|
|
54
|
-
const moduleData: ModuleState = {
|
|
55
|
-
moduleName: nextModelu,
|
|
56
|
-
initData,
|
|
57
|
-
}
|
|
58
|
-
this.changeMouleEvent(nextModelu, initData)
|
|
59
|
-
|
|
60
|
-
this.historyPush(moduleData)
|
|
61
|
-
console.log('next Log', this.stateMachineLog)
|
|
62
|
-
console.log('next History', this.moduleStateHistory)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
back = (initData: any = {}) => {
|
|
66
|
-
if (this.moduleStateHistory.length <= 1) return
|
|
67
|
-
|
|
68
|
-
const backModule = this.moduleStateHistory[1]
|
|
69
|
-
this.changeMouleEvent(backModule.moduleName, {
|
|
70
|
-
...initData,
|
|
71
|
-
...backModule.initData,
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
this.moduleStateHistory.splice(0, 1)
|
|
75
|
-
console.log('back Log', this.stateMachineLog)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// 业务终点 Log 发送
|
|
79
|
-
end = () => {
|
|
80
|
-
console.log('业务终点 Log', this.stateMachineLog)
|
|
81
|
-
|
|
82
|
-
// TODO 请求
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
historyPush = (
|
|
86
|
-
data: ModuleState,
|
|
87
|
-
actionType: ActionType = ActionType.ChangeModule
|
|
88
|
-
) => {
|
|
89
|
-
this.moduleStateHistory.unshift(data)
|
|
90
|
-
|
|
91
|
-
this.stateMachineLog[this.order++] = {
|
|
92
|
-
action: actionType,
|
|
93
|
-
date: new Date().getTime(),
|
|
94
|
-
dataSource: data,
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (this.moduleStateHistory.length > 10)
|
|
98
|
-
this.moduleStateHistory.splice(10, this.moduleStateHistory.length - 10)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
historyBack = (data: ModuleState) => {
|
|
102
|
-
if (this.moduleStateHistory.length <= 1) return
|
|
103
|
-
|
|
104
|
-
this.moduleStateHistory.splice(0, 1)
|
|
105
|
-
|
|
106
|
-
this.stateMachineLog[this.order++] = {
|
|
107
|
-
action: ActionType.Back,
|
|
108
|
-
date: new Date().getTime(),
|
|
109
|
-
dataSource: data,
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
setConfig = (config: GuardLocalConfig) => {
|
|
114
|
-
this.config = config
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export const useHistoryHijack = (back?: () => void) => {
|
|
119
|
-
const next = (state: any = {}) => {
|
|
120
|
-
window?.history.pushState(state, '', window?.location.href)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
useEffect(() => {
|
|
124
|
-
const onPopstate = () => {
|
|
125
|
-
back?.()
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
back && window?.addEventListener('popstate', onPopstate)
|
|
129
|
-
|
|
130
|
-
return () => {
|
|
131
|
-
back && window.removeEventListener('popstate', onPopstate)
|
|
132
|
-
}
|
|
133
|
-
}, [back])
|
|
134
|
-
|
|
135
|
-
return [next]
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export const initGuardStateMachine = (
|
|
139
|
-
changeMouleEvent: ChangeModuleEvent,
|
|
140
|
-
initData: ModuleState
|
|
141
|
-
) => {
|
|
142
|
-
guardStateMachine = new GuardStateMachine(changeMouleEvent, initData)
|
|
143
|
-
return guardStateMachine
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export const getGuardStateMachine = () => {
|
|
147
|
-
if (!guardStateMachine) throw new Error('Please initialize GuardStateMachine')
|
|
148
|
-
|
|
149
|
-
return guardStateMachine
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export const useGuardStateMachine = () => getGuardStateMachine()
|
|
@@ -1,461 +0,0 @@
|
|
|
1
|
-
@import '~antd/lib/style/mixins/index.less';
|
|
2
|
-
|
|
3
|
-
*[class*='authing-'] {
|
|
4
|
-
@import '~antd/lib/style/core/global.less';
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.authing-g2-render-module {
|
|
8
|
-
--sidePadding: 38px;
|
|
9
|
-
--containerWidth: 456px;
|
|
10
|
-
}
|
|
11
|
-
.authing-g2-render-module-modal {
|
|
12
|
-
--containerWidth: 456px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@media only screen and (max-width: 450px) {
|
|
16
|
-
.authing-g2-render-module {
|
|
17
|
-
--sidePadding: 8px;
|
|
18
|
-
--containerWidth: 100%;
|
|
19
|
-
}
|
|
20
|
-
.authing-g2-render-module-modal {
|
|
21
|
-
--containerWidth: 100%;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// 侵入 core 的样式代码,guard view 皮肤
|
|
26
|
-
.g2-view-container {
|
|
27
|
-
font-family: sans-serif;
|
|
28
|
-
box-shadow: 0px 0px 60px rgba(84, 89, 104, 0.05);
|
|
29
|
-
background: #ffffff;
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
width: var(--containerWidth);
|
|
33
|
-
min-height: 610px;
|
|
34
|
-
box-sizing: border-box;
|
|
35
|
-
padding: 16px;
|
|
36
|
-
padding-bottom: 32px;
|
|
37
|
-
border-radius: 8px;
|
|
38
|
-
position: relative;
|
|
39
|
-
.none {
|
|
40
|
-
display: none;
|
|
41
|
-
}
|
|
42
|
-
.g2-view-back {
|
|
43
|
-
margin-top: 26px;
|
|
44
|
-
padding-left: 38px;
|
|
45
|
-
cursor: pointer;
|
|
46
|
-
font-size: 14px;
|
|
47
|
-
color: #878a95;
|
|
48
|
-
.g2-icon {
|
|
49
|
-
margin-right: 8px;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
.g2-view-header {
|
|
53
|
-
user-select: none;
|
|
54
|
-
padding: 44px var(--sidePadding) 0;
|
|
55
|
-
.icon {
|
|
56
|
-
width: 48px;
|
|
57
|
-
height: 48px;
|
|
58
|
-
border-radius: 4px;
|
|
59
|
-
margin-bottom: 8px;
|
|
60
|
-
}
|
|
61
|
-
.title {
|
|
62
|
-
font-weight: 600;
|
|
63
|
-
font-size: 24px;
|
|
64
|
-
white-space: nowrap;
|
|
65
|
-
overflow: hidden;
|
|
66
|
-
text-overflow: ellipsis;
|
|
67
|
-
}
|
|
68
|
-
.title-explain {
|
|
69
|
-
font-weight: 300;
|
|
70
|
-
font-size: 14px;
|
|
71
|
-
color: #545968;
|
|
72
|
-
}
|
|
73
|
-
margin-bottom: 24px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.g2-view-tabs {
|
|
77
|
-
padding: 0 var(--sidePadding);
|
|
78
|
-
|
|
79
|
-
.authing-ant-tabs-tab {
|
|
80
|
-
color: #878a95;
|
|
81
|
-
&:hover {
|
|
82
|
-
color: #282d3c;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.authing-g2-submit-button {
|
|
88
|
-
width: calc(100% - 4px);
|
|
89
|
-
border-radius: 4px;
|
|
90
|
-
height: 42px;
|
|
91
|
-
margin: 0 2px;
|
|
92
|
-
&.shaking {
|
|
93
|
-
animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
|
94
|
-
}
|
|
95
|
-
@keyframes shake {
|
|
96
|
-
10%,
|
|
97
|
-
90% {
|
|
98
|
-
transform: translate3d(-1px, 0, 0);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
20%,
|
|
102
|
-
80% {
|
|
103
|
-
transform: translate3d(2px, 0, 0);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
30%,
|
|
107
|
-
50%,
|
|
108
|
-
70% {
|
|
109
|
-
transform: translate3d(-4px, 0, 0);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
40%,
|
|
113
|
-
60% {
|
|
114
|
-
transform: translate3d(4px, 0, 0);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.authing-g2-button-group {
|
|
121
|
-
background: #eff2f6;
|
|
122
|
-
border-radius: 8px;
|
|
123
|
-
padding: 4px 2px;
|
|
124
|
-
margin-bottom: 16px;
|
|
125
|
-
width: fit-content;
|
|
126
|
-
|
|
127
|
-
.authing-ant-radio-button-wrapper {
|
|
128
|
-
margin: 0 2px;
|
|
129
|
-
border-radius: 8px;
|
|
130
|
-
color: #545968;
|
|
131
|
-
cursor: pointer;
|
|
132
|
-
border: none;
|
|
133
|
-
background: none;
|
|
134
|
-
height: auto;
|
|
135
|
-
&.authing-ant-radio-button-wrapper-checked {
|
|
136
|
-
color: #396aff;
|
|
137
|
-
background: #ffffff;
|
|
138
|
-
}
|
|
139
|
-
&:not(:first-child)::before {
|
|
140
|
-
display: none;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.authing-g2-input-form {
|
|
146
|
-
padding: 0 2px;
|
|
147
|
-
margin-bottom: 16px;
|
|
148
|
-
&.submit-form {
|
|
149
|
-
margin-top: 32px;
|
|
150
|
-
}
|
|
151
|
-
.label-title {
|
|
152
|
-
padding: 0 0 8px;
|
|
153
|
-
}
|
|
154
|
-
// .authing-ant-form-item-explain {
|
|
155
|
-
// // display: none;
|
|
156
|
-
// transition: 0.2s all;
|
|
157
|
-
// position: absolute;
|
|
158
|
-
// user-select: none;
|
|
159
|
-
// background: white;
|
|
160
|
-
// left: 10px;
|
|
161
|
-
// top: -15px;
|
|
162
|
-
// z-index: 100;
|
|
163
|
-
// padding: 4px 8px;
|
|
164
|
-
// border-radius: 4px;
|
|
165
|
-
// box-shadow: #eeeff1;
|
|
166
|
-
// }
|
|
167
|
-
}
|
|
168
|
-
.authing-g2-input-form {
|
|
169
|
-
.authing-g2-select {
|
|
170
|
-
border: 1px solid #f5f6f7;
|
|
171
|
-
border-color: #f5f6f7;
|
|
172
|
-
height: 46px;
|
|
173
|
-
border-radius: 4px;
|
|
174
|
-
.authing-ant-select-selector {
|
|
175
|
-
height: 100% !important;
|
|
176
|
-
border-color: #f5f6f7 !important;
|
|
177
|
-
background-color: #f5f6f7 !important;
|
|
178
|
-
.authing-ant-select-selection-item {
|
|
179
|
-
line-height: 42px;
|
|
180
|
-
}
|
|
181
|
-
&:hover {
|
|
182
|
-
border-color: #eeeff1 !important;
|
|
183
|
-
background-color: #eeeff1 !important;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.authing-g2-input {
|
|
190
|
-
border: 1px solid #f5f6f7;
|
|
191
|
-
height: 46px;
|
|
192
|
-
border-radius: 4px;
|
|
193
|
-
background: #f5f6f7;
|
|
194
|
-
|
|
195
|
-
&:hover {
|
|
196
|
-
background-color: #eeeff1;
|
|
197
|
-
}
|
|
198
|
-
&:focus {
|
|
199
|
-
background: #ffffff !important;
|
|
200
|
-
border-color: #618eff;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
input {
|
|
204
|
-
// 通过这个方式 hack 浏览器自动填充:
|
|
205
|
-
// 自动填充的浏览器可以说罪恶滔天,钉死在 mdn 的耻辱柱上:https://developer.mozilla.org/en-US/docs/Web/CSS/:autofill
|
|
206
|
-
// 下方的 focused 同样需要这样处理
|
|
207
|
-
height: 0;
|
|
208
|
-
background-color: #f5f6f7;
|
|
209
|
-
padding: 1em 0.5em !important;
|
|
210
|
-
background-clip: content-box !important;
|
|
211
|
-
&::placeholder,
|
|
212
|
-
&::-webkit-input-placeholder {
|
|
213
|
-
color: #a7a7a7;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// affix-wrapper 特殊处理 hover
|
|
218
|
-
&.authing-ant-input-affix-wrapper:hover {
|
|
219
|
-
border-color: #eeeff1;
|
|
220
|
-
background: #eeeff1;
|
|
221
|
-
border-color: #618eff;
|
|
222
|
-
|
|
223
|
-
.authing-ant-input {
|
|
224
|
-
background: #eeeff1;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// focus
|
|
229
|
-
&.authing-ant-input-affix-wrapper-focused {
|
|
230
|
-
background: #ffffff !important;
|
|
231
|
-
border-color: #618eff;
|
|
232
|
-
input {
|
|
233
|
-
height: 0;
|
|
234
|
-
padding: 1em 0.5em !important;
|
|
235
|
-
background-clip: content-box !important;
|
|
236
|
-
&::placeholder,
|
|
237
|
-
&::-webkit-input-placeholder {
|
|
238
|
-
color: #a7a7a7;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// 适配图形验证码
|
|
244
|
-
&.add-after {
|
|
245
|
-
border: none;
|
|
246
|
-
.authing-ant-input-group {
|
|
247
|
-
.authing-ant-input,
|
|
248
|
-
.authing-ant-input-group-addon {
|
|
249
|
-
border-radius: 4px;
|
|
250
|
-
height: 46px;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
// 适配数字输入框
|
|
256
|
-
&.authing-ant-input-number {
|
|
257
|
-
width: 100%;
|
|
258
|
-
input {
|
|
259
|
-
padding: 1.4em 0.5em !important;
|
|
260
|
-
}
|
|
261
|
-
.authing-ant-input-number-handler-wrap {
|
|
262
|
-
display: none;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
.g2-captcha-code-image {
|
|
266
|
-
min-width: 100px;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.g2-graphic-verify-code {
|
|
271
|
-
display: flex;
|
|
272
|
-
justify-content: space-between;
|
|
273
|
-
|
|
274
|
-
.authing-ant-input {
|
|
275
|
-
width: 55%;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.g2-captcha-code-image {
|
|
279
|
-
min-width: 100px;
|
|
280
|
-
border-radius: 4px;
|
|
281
|
-
border: 1px solid #eff2f6 !important;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
// input error 的情况
|
|
286
|
-
.authing-ant-form-item-has-error {
|
|
287
|
-
.authing-ant-input-affix-wrapper:hover {
|
|
288
|
-
border-color: #ff4d4f !important;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
// focus
|
|
292
|
-
.authing-ant-input-affix-wrapper-focused {
|
|
293
|
-
border-color: #ff4d4f !important;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.authing-g2-send-code {
|
|
298
|
-
color: #396aff;
|
|
299
|
-
cursor: pointer;
|
|
300
|
-
&.sending {
|
|
301
|
-
cursor: not-allowed;
|
|
302
|
-
filter: opacity(0.5);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.g2-tips-line {
|
|
307
|
-
display: flex;
|
|
308
|
-
font-size: 14px;
|
|
309
|
-
padding: 0 var(--sidePadding);
|
|
310
|
-
height: 22px;
|
|
311
|
-
.link-like {
|
|
312
|
-
color: #396aff;
|
|
313
|
-
cursor: pointer;
|
|
314
|
-
transition: all 0.3s;
|
|
315
|
-
&:hover {
|
|
316
|
-
color: #557fff;
|
|
317
|
-
}
|
|
318
|
-
&:active {
|
|
319
|
-
color: #254cd9;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
.gray {
|
|
323
|
-
color: #999;
|
|
324
|
-
}
|
|
325
|
-
.go-to-register {
|
|
326
|
-
margin-left: auto;
|
|
327
|
-
}
|
|
328
|
-
.back-to-login {
|
|
329
|
-
margin-left: auto;
|
|
330
|
-
}
|
|
331
|
-
.touch-tip {
|
|
332
|
-
color: #d4d6dc;
|
|
333
|
-
cursor: pointer;
|
|
334
|
-
&:hover {
|
|
335
|
-
color: #878a95;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
.g2-init-setting-loading {
|
|
340
|
-
width: var(--containerWidth);
|
|
341
|
-
min-height: 610px;
|
|
342
|
-
display: flex;
|
|
343
|
-
justify-content: center;
|
|
344
|
-
align-items: center;
|
|
345
|
-
box-shadow: 0px 0px 60px rgba(84, 89, 104, 0.05);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
.g2-questions {
|
|
349
|
-
.authing-ant-upload-list-picture-card-container {
|
|
350
|
-
height: 56px;
|
|
351
|
-
width: 56px;
|
|
352
|
-
|
|
353
|
-
.authing-ant-upload-list-item-list-type-picture-card {
|
|
354
|
-
padding: 4px;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
// authing-ant-upload authing-ant-upload-select
|
|
358
|
-
.authing-ant-upload-select-picture-card {
|
|
359
|
-
height: 56px;
|
|
360
|
-
width: 56px;
|
|
361
|
-
border: none;
|
|
362
|
-
background: #f5f6f7;
|
|
363
|
-
transition: 0.2s all;
|
|
364
|
-
&:hover {
|
|
365
|
-
background: #eeeff1;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
.g2-questions-send-success-page {
|
|
371
|
-
display: flex;
|
|
372
|
-
flex-direction: column;
|
|
373
|
-
justify-content: center;
|
|
374
|
-
align-items: center;
|
|
375
|
-
min-height: 610px;
|
|
376
|
-
.plate {
|
|
377
|
-
margin-bottom: 14px;
|
|
378
|
-
}
|
|
379
|
-
.title {
|
|
380
|
-
color: #282d3c;
|
|
381
|
-
font-weight: 500;
|
|
382
|
-
font-size: 16px;
|
|
383
|
-
margin-bottom: 10px;
|
|
384
|
-
}
|
|
385
|
-
.message {
|
|
386
|
-
font-size: 14px;
|
|
387
|
-
color: #545968;
|
|
388
|
-
margin-bottom: 32px;
|
|
389
|
-
text-align: center;
|
|
390
|
-
}
|
|
391
|
-
.timer-tip {
|
|
392
|
-
font-size: 14px;
|
|
393
|
-
color: #545968;
|
|
394
|
-
margin-top: 12px;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
.g2-change-language-container {
|
|
399
|
-
margin: auto 0 20px;
|
|
400
|
-
padding-top: 10px;
|
|
401
|
-
text-align: center;
|
|
402
|
-
.g2-change-language-button {
|
|
403
|
-
user-select: none;
|
|
404
|
-
font-size: 14px;
|
|
405
|
-
color: #878a95;
|
|
406
|
-
cursor: pointer;
|
|
407
|
-
margin: auto;
|
|
408
|
-
transition: 0.2s all;
|
|
409
|
-
&:hover {
|
|
410
|
-
color: #282d3c;
|
|
411
|
-
}
|
|
412
|
-
.g2-change-language-text {
|
|
413
|
-
margin-left: 5px;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
.authing-g2-render-module-modal {
|
|
418
|
-
width: var(--containerWidth);
|
|
419
|
-
.authing-ant-modal-content {
|
|
420
|
-
width: var(--containerWidth);
|
|
421
|
-
border-radius: 8px;
|
|
422
|
-
}
|
|
423
|
-
.authing-ant-modal-body {
|
|
424
|
-
padding: 0;
|
|
425
|
-
}
|
|
426
|
-
.authing-ant-modal-close {
|
|
427
|
-
left: 0;
|
|
428
|
-
border-radius: 4px;
|
|
429
|
-
transform: scale(0.5);
|
|
430
|
-
color: #d4d6dc;
|
|
431
|
-
transition: 0.2s all;
|
|
432
|
-
width: 56px;
|
|
433
|
-
height: 56px;
|
|
434
|
-
&:hover {
|
|
435
|
-
background: #eeeff1;
|
|
436
|
-
color: #878a95;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
.g2-modal-close {
|
|
440
|
-
font-size: 36px;
|
|
441
|
-
margin-top: 10px;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
.authing-ant-modal-footer {
|
|
445
|
-
display: none;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
.g2-send-code-input-col {
|
|
450
|
-
/* Chrome, Safari, Edge, Opera */
|
|
451
|
-
input::-webkit-outer-spin-button,
|
|
452
|
-
input::-webkit-inner-spin-button {
|
|
453
|
-
-webkit-appearance: none;
|
|
454
|
-
margin: 0;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
/* Firefox */
|
|
458
|
-
input[type='number'] {
|
|
459
|
-
-moz-appearance: textfield;
|
|
460
|
-
}
|
|
461
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/** eslint-disable */
|
|
2
|
-
/**
|
|
3
|
-
* !!!!!!!!!!!! 注意注意!!!!!!!!!!!!!
|
|
4
|
-
*
|
|
5
|
-
* 只要替换 svgStr 中的字符串即可,为了兼容 SSR!!!!!!
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import { svgStr } from './svg'
|
|
9
|
-
var init = function (a) {
|
|
10
|
-
var c,
|
|
11
|
-
t,
|
|
12
|
-
l,
|
|
13
|
-
e,
|
|
14
|
-
i,
|
|
15
|
-
o,
|
|
16
|
-
h = svgStr,
|
|
17
|
-
m = (m = document.getElementsByTagName('script'))[
|
|
18
|
-
m.length - 1
|
|
19
|
-
].getAttribute('data-injectcss')
|
|
20
|
-
if (m && !a.__iconfont__svg__cssinject__) {
|
|
21
|
-
a.__iconfont__svg__cssinject__ = !0
|
|
22
|
-
try {
|
|
23
|
-
document.write(
|
|
24
|
-
'<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>'
|
|
25
|
-
)
|
|
26
|
-
} catch (a) {
|
|
27
|
-
console && console.log(a)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function n() {
|
|
31
|
-
i || ((i = !0), l())
|
|
32
|
-
}
|
|
33
|
-
;(c = function () {
|
|
34
|
-
var a, c, t
|
|
35
|
-
;((t = document.createElement('div')).innerHTML = h),
|
|
36
|
-
(h = null),
|
|
37
|
-
(c = t.getElementsByTagName('svg')[0]) &&
|
|
38
|
-
(c.setAttribute('aria-hidden', 'true'),
|
|
39
|
-
(c.style.position = 'absolute'),
|
|
40
|
-
(c.style.width = 0),
|
|
41
|
-
(c.style.height = 0),
|
|
42
|
-
(c.style.overflow = 'hidden'),
|
|
43
|
-
(a = c),
|
|
44
|
-
(t = document.body).firstChild
|
|
45
|
-
? (c = t.firstChild).parentNode.insertBefore(a, c)
|
|
46
|
-
: t.appendChild(a))
|
|
47
|
-
}),
|
|
48
|
-
document.addEventListener
|
|
49
|
-
? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState)
|
|
50
|
-
? setTimeout(c, 0)
|
|
51
|
-
: ((t = function () {
|
|
52
|
-
document.removeEventListener('DOMContentLoaded', t, !1), c()
|
|
53
|
-
}),
|
|
54
|
-
document.addEventListener('DOMContentLoaded', t, !1))
|
|
55
|
-
: document.attachEvent &&
|
|
56
|
-
((l = c),
|
|
57
|
-
(e = a.document),
|
|
58
|
-
(i = !1),
|
|
59
|
-
(o = function () {
|
|
60
|
-
try {
|
|
61
|
-
e.documentElement.doScroll('left')
|
|
62
|
-
} catch (a) {
|
|
63
|
-
return void setTimeout(o, 50)
|
|
64
|
-
}
|
|
65
|
-
n()
|
|
66
|
-
})(),
|
|
67
|
-
(e.onreadystatechange = function () {
|
|
68
|
-
'complete' == e.readyState && ((e.onreadystatechange = null), n())
|
|
69
|
-
}))
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (typeof window !== 'undefined' && typeof window.document !== 'undefined') {
|
|
73
|
-
init(window)
|
|
74
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react'
|
|
2
|
-
import { getClassnames } from '../_utils'
|
|
3
|
-
import './iconfont'
|
|
4
|
-
import './style.less'
|
|
5
|
-
|
|
6
|
-
export const IconFont: FC<{
|
|
7
|
-
type: string
|
|
8
|
-
style?: React.CSSProperties
|
|
9
|
-
className?: string
|
|
10
|
-
}> = ({ type, style, className }) => {
|
|
11
|
-
return (
|
|
12
|
-
<svg style={{ ...style }} className={getClassnames(['g2-icon', className])}>
|
|
13
|
-
<use xlinkHref={`#${type}`}></use>
|
|
14
|
-
</svg>
|
|
15
|
-
)
|
|
16
|
-
}
|