@authing/react-ui-components 2.4.49 → 2.4.53

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.
@@ -4,70 +4,6 @@
4
4
  http://jedwatson.github.io/classnames
5
5
  */
6
6
 
7
- /*!**********************!*\
8
- !*** ./lib/index.js ***!
9
- \**********************/
10
-
11
- /*!**************************!*\
12
- !*** ./lib/JSEncrypt.js ***!
13
- \**************************/
14
-
15
- /*!**************************!*\
16
- !*** ./lib/version.json ***!
17
- \**************************/
18
-
19
- /*!*****************************!*\
20
- !*** ./lib/lib/jsbn/rng.js ***!
21
- \*****************************/
22
-
23
- /*!*****************************!*\
24
- !*** ./lib/lib/jsbn/rsa.js ***!
25
- \*****************************/
26
-
27
- /*!******************************!*\
28
- !*** ./lib/lib/jsbn/jsbn.js ***!
29
- \******************************/
30
-
31
- /*!******************************!*\
32
- !*** ./lib/lib/jsbn/util.js ***!
33
- \******************************/
34
-
35
- /*!*******************************!*\
36
- !*** ./lib/lib/asn1js/hex.js ***!
37
- \*******************************/
38
-
39
- /*!*******************************!*\
40
- !*** ./lib/lib/jsbn/prng4.js ***!
41
- \*******************************/
42
-
43
- /*!********************************!*\
44
- !*** ./lib/JSEncryptRSAKey.js ***!
45
- \********************************/
46
-
47
- /*!********************************!*\
48
- !*** ./lib/lib/asn1js/asn1.js ***!
49
- \********************************/
50
-
51
- /*!********************************!*\
52
- !*** ./lib/lib/jsbn/base64.js ***!
53
- \********************************/
54
-
55
- /*!*********************************!*\
56
- !*** ./lib/lib/asn1js/int10.js ***!
57
- \*********************************/
58
-
59
- /*!**********************************!*\
60
- !*** ./lib/lib/asn1js/base64.js ***!
61
- \**********************************/
62
-
63
- /*!************************************!*\
64
- !*** ./lib/lib/jsrsasign/yahoo.js ***!
65
- \************************************/
66
-
67
- /*!***************************************!*\
68
- !*** ./lib/lib/jsrsasign/asn1-1.0.js ***!
69
- \***************************************/
70
-
71
7
  /** @license React v16.13.1
72
8
  * react-is.production.min.js
73
9
  *
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@authing/react-ui-components",
3
- "version": "2.4.49",
3
+ "version": "2.4.53",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "dependencies": {
8
8
  "antd": "^4.8.0",
9
- "authing-js-sdk": "4.20.23",
9
+ "authing-js-sdk": "4.22.18",
10
10
  "qs": "^6.9.4"
11
11
  },
12
12
  "peerDependencies": {
@@ -185,5 +185,5 @@
185
185
  "webpack-manifest-plugin": "2.2.0",
186
186
  "workbox-webpack-plugin": "5.1.4"
187
187
  },
188
- "gitHead": "8bcbc1fbcd37197ff45a2b33a321a525fd295a81"
188
+ "gitHead": "9162c7339ae6fdb5189aa14146ec18550f8b37bd"
189
189
  }
@@ -7,6 +7,7 @@ import { UploadImage } from '../UploadImage'
7
7
  import { requestClient } from '../../api/http'
8
8
  import { CompleteUserInfoFormProps } from '../../types'
9
9
  import { useTranslation } from 'react-i18next'
10
+ import { i18n } from '../../locales'
10
11
 
11
12
  export const CompleteUserInfoForm: FC<CompleteUserInfoFormProps> = ({
12
13
  onSuccess,
@@ -101,13 +102,10 @@ export const CompleteUserInfoForm: FC<CompleteUserInfoFormProps> = ({
101
102
  const formFields = extendsFields.map((def) => {
102
103
  const key = `${def.type} ${def.type === 'internal' ? def.name : def.id}`
103
104
 
105
+ const label = i18n.language === 'zh-CN' ? def.label : def.name
106
+
104
107
  return (
105
- <Form.Item
106
- key={key}
107
- name={key}
108
- label={def.label}
109
- style={{ marginBottom: 8 }}
110
- >
108
+ <Form.Item key={key} name={key} label={label} style={{ marginBottom: 8 }}>
111
109
  {INPUT_MAP[def.inputType] || (
112
110
  <Input type={def.inputType} size="large" />
113
111
  )}
@@ -19,7 +19,7 @@ import { useTranslation } from 'react-i18next'
19
19
  export const RegisterLayout: FC = () => {
20
20
  const {
21
21
  state: {
22
- config: { registerMethods, extendsFields },
22
+ config: { registerMethods, extendsFields, loginMethods = [] },
23
23
  activeTabs,
24
24
  guardEvents,
25
25
  authClient,
@@ -54,10 +54,12 @@ export const RegisterLayout: FC = () => {
54
54
  }
55
55
  switch (t) {
56
56
  case RegisterMethods.Email:
57
- next[GuardScenes.Login] = LoginMethods.Password
57
+ loginMethods.includes(LoginMethods.Password) &&
58
+ (next[GuardScenes.Login] = LoginMethods.Password)
58
59
  break
59
60
  case RegisterMethods.Phone:
60
- next[GuardScenes.Login] = LoginMethods.PhoneCode
61
+ loginMethods.includes(LoginMethods.PhoneCode) &&
62
+ (next[GuardScenes.Login] = LoginMethods.PhoneCode)
61
63
  break
62
64
  default:
63
65
  break
@@ -163,7 +163,7 @@
163
163
  "bindEmailDoc": "You have not bound the mailbox yet, please enter the mailbox to bind",
164
164
  "copy": "Copy",
165
165
  "emailNotNull": "E-mail can not be empty",
166
- "setPassword": "set password",
166
+ "setPassword": "Set password",
167
167
  "passwordNotNull": "password can not be blank",
168
168
  "LDAPAccountNotNull": "LDAP account cannot be empty",
169
169
  "captchaCodeNotNull": "verification code must be filled",
@@ -180,5 +180,6 @@
180
180
  "copyFailed": "Copy Failed",
181
181
  "repeatPassword": "Please repeat the password",
182
182
  "phoneNotNull": "Mobile phone number cannot be empty",
183
- "networkError": "Network error, please retry"
184
- }
183
+ "networkError": "Network error, please retry",
184
+ "unBindEmaileDoc": "{{email}} has been bound to another account"
185
+ }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "inputAccount": "Enter {{text}}",
2
3
  "inputAdUsername": "Enter AD username",
3
4
  "accBind": "Account Binding",
4
5
  "accPwdLoginVerify": "Account login verification",
@@ -1,3 +1,5 @@
1
+ import { i18n } from 'src/components/AuthingGuard/locales'
2
+
1
3
  // https://juejin.im/post/6844903857290477582
2
4
  export const copyToClipboard = (str: string) => {
3
5
  const el = document.createElement('textarea') // 创建一个 <textarea> 元素
@@ -20,6 +22,6 @@ export const copyToClipboard = (str: string) => {
20
22
  document.getSelection()!.addRange(selected) // 恢复原来的选中
21
23
  }
22
24
  } catch (e) {
23
- console.warn('复制失败')
25
+ console.warn(i18n.t('common.copyFailed'))
24
26
  }
25
27
  }
@@ -1,6 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
- </profile>
6
- </component>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/react-components.iml" filepath="$PROJECT_DIR$/.idea/react-components.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/temp" />
6
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
7
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- </component>
12
- </module>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
5
- </component>
6
- </project>
@@ -1,25 +0,0 @@
1
- {
2
- "files": {
3
- "main.css": "/static/css/main.ee0e3901.chunk.css",
4
- "main.js": "/static/js/main.e5a9f524.chunk.js",
5
- "main.js.map": "/static/js/main.e5a9f524.chunk.js.map",
6
- "runtime-main.js": "/static/js/runtime-main.be57cc78.js",
7
- "runtime-main.js.map": "/static/js/runtime-main.be57cc78.js.map",
8
- "static/css/2.4c71a9fd.chunk.css": "/static/css/2.4c71a9fd.chunk.css",
9
- "static/js/2.d19cf3a9.chunk.js": "/static/js/2.d19cf3a9.chunk.js",
10
- "static/js/2.d19cf3a9.chunk.js.map": "/static/js/2.d19cf3a9.chunk.js.map",
11
- "static/js/3.1e47fbc9.chunk.js": "/static/js/3.1e47fbc9.chunk.js",
12
- "static/js/3.1e47fbc9.chunk.js.map": "/static/js/3.1e47fbc9.chunk.js.map",
13
- "index.html": "/index.html",
14
- "static/css/2.4c71a9fd.chunk.css.map": "/static/css/2.4c71a9fd.chunk.css.map",
15
- "static/css/main.ee0e3901.chunk.css.map": "/static/css/main.ee0e3901.chunk.css.map",
16
- "static/js/2.d19cf3a9.chunk.js.LICENSE.txt": "/static/js/2.d19cf3a9.chunk.js.LICENSE.txt"
17
- },
18
- "entrypoints": [
19
- "static/js/runtime-main.be57cc78.js",
20
- "static/css/2.4c71a9fd.chunk.css",
21
- "static/js/2.d19cf3a9.chunk.js",
22
- "static/css/main.ee0e3901.chunk.css",
23
- "static/js/main.e5a9f524.chunk.js"
24
- ]
25
- }
package/build/index.html DELETED
@@ -1 +0,0 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><link href="/static/css/2.4c71a9fd.chunk.css" rel="stylesheet"><link href="/static/css/main.ee0e3901.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,i,a=t[0],c=t[1],l=t[2],s=0,p=[];s<a.length;s++)i=a[s],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==o[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"1e47fbc9"}[e]+".chunk.js"}(e);var c=new Error;u=function(t){a.onerror=a.onload=null,clearTimeout(l);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,r[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var a=this["webpackJsonp@authing/react-ui-components"]=this["webpackJsonp@authing/react-ui-components"]||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var f=c;r()}([])</script><script src="/static/js/2.d19cf3a9.chunk.js"></script><script src="/static/js/main.e5a9f524.chunk.js"></script></body></html>