@authing/react-ui-components 2.4.54-alpha.0 → 2.4.55-alpha.2
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/build/asset-manifest.json +18 -18
- package/build/index.html +1 -1
- package/build/static/css/{2.40c24d2f.chunk.css → 2.e5f4a1ca.chunk.css} +2 -2
- package/build/static/css/2.e5f4a1ca.chunk.css.map +1 -0
- package/build/static/css/main.4dd73333.chunk.css +2 -0
- package/build/static/css/main.4dd73333.chunk.css.map +1 -0
- package/build/static/js/2.b28e1968.chunk.js +3 -0
- package/build/static/js/2.b28e1968.chunk.js.LICENSE.txt +70 -0
- package/build/static/js/2.b28e1968.chunk.js.map +1 -0
- package/build/static/js/{3.edcab7cd.chunk.js → 3.584da164.chunk.js} +2 -2
- package/build/static/js/{3.edcab7cd.chunk.js.map → 3.584da164.chunk.js.map} +1 -1
- package/build/static/js/main.eeb41586.chunk.js +2 -0
- package/build/static/js/main.eeb41586.chunk.js.map +1 -0
- package/build/static/js/{runtime-main.1b4b9135.js → runtime-main.6174f3e9.js} +2 -2
- package/build/static/js/{runtime-main.1b4b9135.js.map → runtime-main.6174f3e9.js.map} +1 -1
- package/lib/index.min.css +1 -2
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.LICENSE.txt +0 -64
- package/package.json +3 -5
- package/src/common/AuthingDropdown/index.tsx +20 -58
- package/src/common/AuthingDropdown/style.less +8 -33
- package/src/components/AuthingGuard/AppMFALayout/index.tsx +15 -30
- package/src/components/AuthingGuard/Forms/QrCodeLoginForm/index.tsx +3 -1
- package/src/components/AuthingGuard/GuardLayout/index.tsx +16 -32
- package/src/components/AuthingGuard/GuardLayout/style.less +0 -4
- package/src/components/AuthingGuard/Header/index.tsx +5 -2
- package/src/components/AuthingGuard/Header/style.less +23 -11
- package/src/components/AuthingGuard/IconFont/iconfont.js +74 -1
- package/src/components/AuthingGuard/LoginLayout/index.tsx +53 -22
- package/src/components/AuthingGuard/api/appConfig.ts +3 -2
- package/src/components/AuthingGuard/api/http.ts +32 -9
- package/src/components/AuthingGuard/constants.ts +2 -0
- package/src/components/AuthingGuard/hooks/index.tsx +0 -37
- package/src/components/AuthingGuard/index.tsx +8 -3
- package/src/components/AuthingGuard/locales/en/common.json +1 -2
- package/src/components/AuthingGuard/locales/en/login.json +1 -1
- package/src/components/AuthingGuard/locales/zh/common.json +1 -16
- package/src/components/AuthingGuard/types/Forms.ts +1 -2
- package/src/components/AuthingGuard/types/GuardConfig.ts +2 -1
- package/src/context/global/reducer.tsx +0 -4
- package/src/index.tsx +16 -28
- package/src/utils/index.ts +0 -23
- package/yarn-error.log +19616 -0
- package/build/static/css/2.40c24d2f.chunk.css.map +0 -1
- package/build/static/css/main.ee0e3901.chunk.css +0 -2
- package/build/static/css/main.ee0e3901.chunk.css.map +0 -1
- package/build/static/js/2.354276b9.chunk.js +0 -3
- package/build/static/js/2.354276b9.chunk.js.LICENSE.txt +0 -156
- package/build/static/js/2.354276b9.chunk.js.map +0 -1
- package/build/static/js/main.6c028b56.chunk.js +0 -2
- package/build/static/js/main.6c028b56.chunk.js.map +0 -1
- package/lib/index.d.ts +0 -1374
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/AppDownload.tsx +0 -198
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/BindSuccess.tsx +0 -48
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/CopyIcon.tsx +0 -52
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/InputSaftyCode.tsx +0 -25
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/SaveSecretKey.tsx +0 -34
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/ScanQrcode.tsx +0 -44
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/index.tsx +0 -40
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/styles.less +0 -454
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/MobileSteps/index.tsx +0 -49
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/MobileSteps/style.less +0 -10
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/UserMfa/index.tsx +0 -361
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/UserMfa/style.less +0 -12
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/VerifyTotpForm.tsx +0 -120
- package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/index.tsx +0 -35
package/src/index.tsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Button } from 'antd'
|
|
2
2
|
import React, { useState } from 'react'
|
|
3
3
|
import ReactDOM from 'react-dom'
|
|
4
|
-
import {
|
|
4
|
+
import { Lang } from './components'
|
|
5
5
|
import { AuthingGuard } from './components/AuthingGuard'
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
GuardMode,
|
|
9
9
|
// LoginMethods,
|
|
10
10
|
UserConfig,
|
|
11
11
|
// LoginMethods,
|
|
@@ -20,10 +20,9 @@ const App = () => {
|
|
|
20
20
|
const [title, setTitle] = useState('标题')
|
|
21
21
|
|
|
22
22
|
const config: UserConfig = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
//
|
|
26
|
-
apiHost: 'http://ycavpj-demo.authing.localhost:3000',
|
|
23
|
+
mode: GuardMode.Modal,
|
|
24
|
+
appHost: 'https://core.dev2.authing-inc.co',
|
|
25
|
+
// apiHost: 'http://console.authing.localhost:3000',
|
|
27
26
|
// apiHost: 'http://192.168.50.57:3000',
|
|
28
27
|
// loginMethods: Object.values(LoginMethods),
|
|
29
28
|
// logo:
|
|
@@ -55,16 +54,6 @@ const App = () => {
|
|
|
55
54
|
// `,
|
|
56
55
|
// // autoRegister: true,
|
|
57
56
|
// socialConnections: [SocialConnections.AppleWeb],
|
|
58
|
-
passwordLoginMethods: ['username-password'],
|
|
59
|
-
localesConfig: {
|
|
60
|
-
defaultLang: 'en-US',
|
|
61
|
-
isShowChange: true,
|
|
62
|
-
onChange: (value) => {
|
|
63
|
-
console.log('...........')
|
|
64
|
-
console.log(value)
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
lang: lang,
|
|
68
57
|
}
|
|
69
58
|
|
|
70
59
|
const [visible, setVisible] = useState(false)
|
|
@@ -73,10 +62,10 @@ const App = () => {
|
|
|
73
62
|
// setTimeout(() => setVisible(true), 3000)
|
|
74
63
|
// }, [])
|
|
75
64
|
|
|
76
|
-
initAuthClient({
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
})
|
|
65
|
+
// initAuthClient({
|
|
66
|
+
// appId: '60c02a89a9e0431e271d9ff0',
|
|
67
|
+
// // appHost: 'http://console.authing.localhost:3000',
|
|
68
|
+
// })
|
|
80
69
|
|
|
81
70
|
return (
|
|
82
71
|
// eslint-disable-next-line react/jsx-no-undef
|
|
@@ -111,10 +100,7 @@ const App = () => {
|
|
|
111
100
|
></input>
|
|
112
101
|
<AuthingGuard
|
|
113
102
|
onLoad={(v) => console.log(v)}
|
|
114
|
-
|
|
115
|
-
console.log('>>>>>>>>>>', ev)
|
|
116
|
-
}}
|
|
117
|
-
// visible={visible}
|
|
103
|
+
visible={visible}
|
|
118
104
|
// onLoginTabChange={(v) => console.log(v)}
|
|
119
105
|
// onRegisterTabChange={(v) => console.log(v)}
|
|
120
106
|
// onClose={() => {
|
|
@@ -123,12 +109,14 @@ const App = () => {
|
|
|
123
109
|
// setVisible(true)
|
|
124
110
|
// }, 2000)
|
|
125
111
|
// }}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
112
|
+
onClose={() => {
|
|
113
|
+
setVisible(false)
|
|
114
|
+
}}
|
|
129
115
|
// onLoad={(a) => console.log(a, '加载完成')}
|
|
130
116
|
// onPwdResetError={(e) => console.log(e)}
|
|
131
|
-
appId="
|
|
117
|
+
appId="619c7976cd38c13a2222464f"
|
|
118
|
+
tenantId="619c864928b15c6421d12e35"
|
|
119
|
+
// appId="5fd877fb0ba0421962eced94"
|
|
132
120
|
config={config}
|
|
133
121
|
/>
|
|
134
122
|
</>
|
package/src/utils/index.ts
CHANGED
|
@@ -178,26 +178,3 @@ export const getUserRegisterParams = () => {
|
|
|
178
178
|
|
|
179
179
|
export const isWechatBrowser = () =>
|
|
180
180
|
/MicroMessenger/i.test(navigator?.userAgent)
|
|
181
|
-
|
|
182
|
-
export const getOS = () => {
|
|
183
|
-
var userAgent = window.navigator.userAgent,
|
|
184
|
-
platform = window.navigator.platform,
|
|
185
|
-
macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'],
|
|
186
|
-
windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'],
|
|
187
|
-
iosPlatforms = ['iPhone', 'iPad', 'iPod'],
|
|
188
|
-
os = null
|
|
189
|
-
|
|
190
|
-
if (macosPlatforms.indexOf(platform) !== -1) {
|
|
191
|
-
os = 'Mac OS'
|
|
192
|
-
} else if (iosPlatforms.indexOf(platform) !== -1) {
|
|
193
|
-
os = 'iOS'
|
|
194
|
-
} else if (windowsPlatforms.indexOf(platform) !== -1) {
|
|
195
|
-
os = 'Windows'
|
|
196
|
-
} else if (/Android/.test(userAgent)) {
|
|
197
|
-
os = 'Android'
|
|
198
|
-
} else if (!os && /Linux/.test(platform)) {
|
|
199
|
-
os = 'Linux'
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
return os
|
|
203
|
-
}
|