@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.
Files changed (66) hide show
  1. package/build/asset-manifest.json +18 -18
  2. package/build/index.html +1 -1
  3. package/build/static/css/{2.40c24d2f.chunk.css → 2.e5f4a1ca.chunk.css} +2 -2
  4. package/build/static/css/2.e5f4a1ca.chunk.css.map +1 -0
  5. package/build/static/css/main.4dd73333.chunk.css +2 -0
  6. package/build/static/css/main.4dd73333.chunk.css.map +1 -0
  7. package/build/static/js/2.b28e1968.chunk.js +3 -0
  8. package/build/static/js/2.b28e1968.chunk.js.LICENSE.txt +70 -0
  9. package/build/static/js/2.b28e1968.chunk.js.map +1 -0
  10. package/build/static/js/{3.edcab7cd.chunk.js → 3.584da164.chunk.js} +2 -2
  11. package/build/static/js/{3.edcab7cd.chunk.js.map → 3.584da164.chunk.js.map} +1 -1
  12. package/build/static/js/main.eeb41586.chunk.js +2 -0
  13. package/build/static/js/main.eeb41586.chunk.js.map +1 -0
  14. package/build/static/js/{runtime-main.1b4b9135.js → runtime-main.6174f3e9.js} +2 -2
  15. package/build/static/js/{runtime-main.1b4b9135.js.map → runtime-main.6174f3e9.js.map} +1 -1
  16. package/lib/index.min.css +1 -2
  17. package/lib/index.min.js +1 -1
  18. package/lib/index.min.js.LICENSE.txt +0 -64
  19. package/package.json +3 -5
  20. package/src/common/AuthingDropdown/index.tsx +20 -58
  21. package/src/common/AuthingDropdown/style.less +8 -33
  22. package/src/components/AuthingGuard/AppMFALayout/index.tsx +15 -30
  23. package/src/components/AuthingGuard/Forms/QrCodeLoginForm/index.tsx +3 -1
  24. package/src/components/AuthingGuard/GuardLayout/index.tsx +16 -32
  25. package/src/components/AuthingGuard/GuardLayout/style.less +0 -4
  26. package/src/components/AuthingGuard/Header/index.tsx +5 -2
  27. package/src/components/AuthingGuard/Header/style.less +23 -11
  28. package/src/components/AuthingGuard/IconFont/iconfont.js +74 -1
  29. package/src/components/AuthingGuard/LoginLayout/index.tsx +53 -22
  30. package/src/components/AuthingGuard/api/appConfig.ts +3 -2
  31. package/src/components/AuthingGuard/api/http.ts +32 -9
  32. package/src/components/AuthingGuard/constants.ts +2 -0
  33. package/src/components/AuthingGuard/hooks/index.tsx +0 -37
  34. package/src/components/AuthingGuard/index.tsx +8 -3
  35. package/src/components/AuthingGuard/locales/en/common.json +1 -2
  36. package/src/components/AuthingGuard/locales/en/login.json +1 -1
  37. package/src/components/AuthingGuard/locales/zh/common.json +1 -16
  38. package/src/components/AuthingGuard/types/Forms.ts +1 -2
  39. package/src/components/AuthingGuard/types/GuardConfig.ts +2 -1
  40. package/src/context/global/reducer.tsx +0 -4
  41. package/src/index.tsx +16 -28
  42. package/src/utils/index.ts +0 -23
  43. package/yarn-error.log +19616 -0
  44. package/build/static/css/2.40c24d2f.chunk.css.map +0 -1
  45. package/build/static/css/main.ee0e3901.chunk.css +0 -2
  46. package/build/static/css/main.ee0e3901.chunk.css.map +0 -1
  47. package/build/static/js/2.354276b9.chunk.js +0 -3
  48. package/build/static/js/2.354276b9.chunk.js.LICENSE.txt +0 -156
  49. package/build/static/js/2.354276b9.chunk.js.map +0 -1
  50. package/build/static/js/main.6c028b56.chunk.js +0 -2
  51. package/build/static/js/main.6c028b56.chunk.js.map +0 -1
  52. package/lib/index.d.ts +0 -1374
  53. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/AppDownload.tsx +0 -198
  54. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/BindSuccess.tsx +0 -48
  55. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/CopyIcon.tsx +0 -52
  56. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/InputSaftyCode.tsx +0 -25
  57. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/SaveSecretKey.tsx +0 -34
  58. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/ScanQrcode.tsx +0 -44
  59. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/index.tsx +0 -40
  60. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/styles.less +0 -454
  61. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/MobileSteps/index.tsx +0 -49
  62. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/MobileSteps/style.less +0 -10
  63. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/UserMfa/index.tsx +0 -361
  64. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/UserMfa/style.less +0 -12
  65. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/VerifyTotpForm.tsx +0 -120
  66. 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 { initAuthClient, Lang } from './components'
4
+ import { Lang } from './components'
5
5
  import { AuthingGuard } from './components/AuthingGuard'
6
6
 
7
7
  import {
8
- // GuardMode,
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
- title,
24
- // mode: GuardMode.Modal,
25
- // appHost: 'https://sample-sso.authing.cn',
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
- appId: '6163d71a51cbde723b35f019',
78
- appHost: 'http://ycavpj-demo.authing.localhost:3000',
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
- onLogin={(ev) => {
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
- // onClose={() => {
127
- // setVisible(false)
128
- // }}
112
+ onClose={() => {
113
+ setVisible(false)
114
+ }}
129
115
  // onLoad={(a) => console.log(a, '加载完成')}
130
116
  // onPwdResetError={(e) => console.log(e)}
131
- appId="6163d71a51cbde723b35f019"
117
+ appId="619c7976cd38c13a2222464f"
118
+ tenantId="619c864928b15c6421d12e35"
119
+ // appId="5fd877fb0ba0421962eced94"
132
120
  config={config}
133
121
  />
134
122
  </>
@@ -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
- }