@authing/react-ui-components 2.4.60 → 3.0.0-rc.10

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 (144) hide show
  1. package/lib/index.d.ts +1806 -203
  2. package/lib/index.min.css +2 -1
  3. package/lib/index.min.js +1 -1
  4. package/lib/index.min.js.LICENSE.txt +34 -0
  5. package/lib/static/media/loading.4a67a5f3.svg +29 -0
  6. package/package.json +45 -18
  7. package/.eslintignore +0 -6
  8. package/.eslintrc.js +0 -7
  9. package/.prettierrc +0 -5
  10. package/.vscode/settings.json +0 -31
  11. package/config/antdReplacer.js +0 -51
  12. package/config/env.js +0 -106
  13. package/config/getHttpsConfig.js +0 -66
  14. package/config/jest/cssTransform.js +0 -14
  15. package/config/jest/fileTransform.js +0 -40
  16. package/config/modules.js +0 -134
  17. package/config/paths.js +0 -71
  18. package/config/pnpTs.js +0 -35
  19. package/config/webpack.config.js +0 -857
  20. package/config/webpackDevServer.config.js +0 -130
  21. package/public/favicon.ico +0 -0
  22. package/public/index.html +0 -43
  23. package/public/logo192.png +0 -0
  24. package/public/logo512.png +0 -0
  25. package/public/manifest.json +0 -25
  26. package/public/robots.txt +0 -3
  27. package/scripts/build.js +0 -212
  28. package/scripts/lib.js +0 -200
  29. package/scripts/start.js +0 -166
  30. package/scripts/test.js +0 -53
  31. package/src/common/AuthingDropdown/index.tsx +0 -52
  32. package/src/common/AuthingDropdown/style.less +0 -43
  33. package/src/common/AuthingTabs/index.tsx +0 -98
  34. package/src/common/AuthingTabs/style.less +0 -135
  35. package/src/common/CopyAbleText/index.tsx +0 -54
  36. package/src/common/CopyAbleText/style.less +0 -13
  37. package/src/common/VerifyCodeInput/index.tsx +0 -76
  38. package/src/common/VerifyCodeInput/style.less +0 -24
  39. package/src/components/AuthingGuard/AppMFALayout/index.tsx +0 -74
  40. package/src/components/AuthingGuard/AppMFALayout/style.less +0 -12
  41. package/src/components/AuthingGuard/CompleteUserInfoLayout/index.tsx +0 -29
  42. package/src/components/AuthingGuard/CompleteUserInfoLayout/style.less +0 -8
  43. package/src/components/AuthingGuard/Forms/ADLoginForm/index.tsx +0 -117
  44. package/src/components/AuthingGuard/Forms/Agreements/index.tsx +0 -81
  45. package/src/components/AuthingGuard/Forms/Agreements/style.less +0 -44
  46. package/src/components/AuthingGuard/Forms/CompleteUserInfoForm/index.tsx +0 -139
  47. package/src/components/AuthingGuard/Forms/EmailMfaVerifyForm/CheckEmailForm.tsx +0 -86
  48. package/src/components/AuthingGuard/Forms/EmailMfaVerifyForm/VerifyCodeForm.tsx +0 -116
  49. package/src/components/AuthingGuard/Forms/EmailMfaVerifyForm/index.tsx +0 -40
  50. package/src/components/AuthingGuard/Forms/EmailMfaVerifyForm/style.less +0 -0
  51. package/src/components/AuthingGuard/Forms/EmailRegisterForm/index.tsx +0 -181
  52. package/src/components/AuthingGuard/Forms/EmailRegisterForm/style.less +0 -0
  53. package/src/components/AuthingGuard/Forms/LdapLoginForm/index.tsx +0 -162
  54. package/src/components/AuthingGuard/Forms/LdapLoginForm/style.less +0 -0
  55. package/src/components/AuthingGuard/Forms/LoginFormFooter/index.tsx +0 -76
  56. package/src/components/AuthingGuard/Forms/LoginFormFooter/style.less +0 -6
  57. package/src/components/AuthingGuard/Forms/MfaResetCodeForm/Step1.tsx +0 -86
  58. package/src/components/AuthingGuard/Forms/MfaResetCodeForm/Step2.tsx +0 -53
  59. package/src/components/AuthingGuard/Forms/MfaResetCodeForm/index.tsx +0 -65
  60. package/src/components/AuthingGuard/Forms/MfaResetCodeForm/style.less +0 -20
  61. package/src/components/AuthingGuard/Forms/MfaVerifyForm/index.tsx +0 -105
  62. package/src/components/AuthingGuard/Forms/MfaVerifyForm/style.less +0 -12
  63. package/src/components/AuthingGuard/Forms/PasswordLoginForm/index.tsx +0 -261
  64. package/src/components/AuthingGuard/Forms/PhoneCodeLoginForm/index.tsx +0 -133
  65. package/src/components/AuthingGuard/Forms/PhoneRegisterForm/index.tsx +0 -202
  66. package/src/components/AuthingGuard/Forms/QrCodeLoginForm/index.tsx +0 -61
  67. package/src/components/AuthingGuard/Forms/QrCodeLoginForm/style.less +0 -14
  68. package/src/components/AuthingGuard/Forms/RegisterFormFooter/index.tsx +0 -56
  69. package/src/components/AuthingGuard/Forms/RegisterFormFooter/style.less +0 -0
  70. package/src/components/AuthingGuard/Forms/ResetPwdForm/Footer.tsx +0 -21
  71. package/src/components/AuthingGuard/Forms/ResetPwdForm/Step1.tsx +0 -86
  72. package/src/components/AuthingGuard/Forms/ResetPwdForm/Step2.tsx +0 -127
  73. package/src/components/AuthingGuard/Forms/ResetPwdForm/Step3.tsx +0 -141
  74. package/src/components/AuthingGuard/Forms/ResetPwdForm/Step4.tsx +0 -51
  75. package/src/components/AuthingGuard/Forms/ResetPwdForm/index.tsx +0 -96
  76. package/src/components/AuthingGuard/Forms/ResetPwdForm/style.less +0 -3
  77. package/src/components/AuthingGuard/Forms/SendPhoneCode/SendCodeBtn.tsx +0 -88
  78. package/src/components/AuthingGuard/Forms/SendPhoneCode/index.tsx +0 -50
  79. package/src/components/AuthingGuard/Forms/SendPhoneCode/style.less +0 -26
  80. package/src/components/AuthingGuard/Forms/SmsMfaVerifyForm/CheckPhoneForm.tsx +0 -86
  81. package/src/components/AuthingGuard/Forms/SmsMfaVerifyForm/VerifyCodeForm.tsx +0 -113
  82. package/src/components/AuthingGuard/Forms/SmsMfaVerifyForm/index.tsx +0 -40
  83. package/src/components/AuthingGuard/Forms/SmsMfaVerifyForm/style.less +0 -3
  84. package/src/components/AuthingGuard/Forms/SocialAndIdpLogin/index.tsx +0 -325
  85. package/src/components/AuthingGuard/Forms/SocialAndIdpLogin/style.less +0 -75
  86. package/src/components/AuthingGuard/Forms/UploadImage/index.tsx +0 -70
  87. package/src/components/AuthingGuard/Forms/index.ts +0 -13
  88. package/src/components/AuthingGuard/GuardLayout/index.tsx +0 -488
  89. package/src/components/AuthingGuard/GuardLayout/style.less +0 -111
  90. package/src/components/AuthingGuard/Header/index.tsx +0 -28
  91. package/src/components/AuthingGuard/Header/style.less +0 -64
  92. package/src/components/AuthingGuard/IconFont/iconfont.js +0 -74
  93. package/src/components/AuthingGuard/IconFont/index.tsx +0 -19
  94. package/src/components/AuthingGuard/IconFont/style.less +0 -6
  95. package/src/components/AuthingGuard/IconFont/svg.js +0 -2
  96. package/src/components/AuthingGuard/LoginLayout/index.tsx +0 -205
  97. package/src/components/AuthingGuard/LoginLayout/style.less +0 -0
  98. package/src/components/AuthingGuard/MfaLayout/Steps.ts +0 -4
  99. package/src/components/AuthingGuard/MfaLayout/index.tsx +0 -49
  100. package/src/components/AuthingGuard/MfaLayout/style.less +0 -3
  101. package/src/components/AuthingGuard/RegisterLayout/index.tsx +0 -89
  102. package/src/components/AuthingGuard/RegisterLayout/style.less +0 -0
  103. package/src/components/AuthingGuard/ResetPwdLayout/index.tsx +0 -20
  104. package/src/components/AuthingGuard/ToggleLang/index.tsx +0 -51
  105. package/src/components/AuthingGuard/api/appConfig.ts +0 -154
  106. package/src/components/AuthingGuard/api/http.ts +0 -88
  107. package/src/components/AuthingGuard/api/index.ts +0 -3
  108. package/src/components/AuthingGuard/api/sso.ts +0 -29
  109. package/src/components/AuthingGuard/api/userPoolConfig.ts +0 -112
  110. package/src/components/AuthingGuard/constants.ts +0 -107
  111. package/src/components/AuthingGuard/hooks/index.tsx +0 -70
  112. package/src/components/AuthingGuard/hooks/useScreenSize.tsx +0 -68
  113. package/src/components/AuthingGuard/index.tsx +0 -134
  114. package/src/components/AuthingGuard/locales/en/common.json +0 -185
  115. package/src/components/AuthingGuard/locales/en/index.ts +0 -6
  116. package/src/components/AuthingGuard/locales/en/login.json +0 -94
  117. package/src/components/AuthingGuard/locales/en/map.json +0 -4
  118. package/src/components/AuthingGuard/locales/en/user.json +0 -81
  119. package/src/components/AuthingGuard/locales/index.ts +0 -45
  120. package/src/components/AuthingGuard/locales/zh/common.json +0 -185
  121. package/src/components/AuthingGuard/locales/zh/index.ts +0 -6
  122. package/src/components/AuthingGuard/locales/zh/login.json +0 -94
  123. package/src/components/AuthingGuard/locales/zh/map.json +0 -4
  124. package/src/components/AuthingGuard/locales/zh/user.json +0 -81
  125. package/src/components/AuthingGuard/style.less +0 -104
  126. package/src/components/AuthingGuard/types/Forms.ts +0 -95
  127. package/src/components/AuthingGuard/types/GuardConfig.ts +0 -424
  128. package/src/components/AuthingGuard/types/GuardState.ts +0 -7
  129. package/src/components/AuthingGuard/types/Locales.ts +0 -12
  130. package/src/components/AuthingGuard/types/index.ts +0 -4
  131. package/src/components/index.ts +0 -7
  132. package/src/context/base.tsx +0 -28
  133. package/src/context/global/context.tsx +0 -39
  134. package/src/context/global/reducer.tsx +0 -56
  135. package/src/index.tsx +0 -142
  136. package/src/logo.svg +0 -7
  137. package/src/react-app-env.d.ts +0 -71
  138. package/src/reportWebVitals.ts +0 -15
  139. package/src/setupTests.ts +0 -5
  140. package/src/utils/clipboard.ts +0 -27
  141. package/src/utils/index.ts +0 -180
  142. package/src/utils/popupCenter.ts +0 -48
  143. package/tsconfig.json +0 -24
  144. package/yarn-error.log +0 -20371
package/config/modules.js DELETED
@@ -1,134 +0,0 @@
1
- 'use strict';
2
-
3
- const fs = require('fs');
4
- const path = require('path');
5
- const paths = require('./paths');
6
- const chalk = require('react-dev-utils/chalk');
7
- const resolve = require('resolve');
8
-
9
- /**
10
- * Get additional module paths based on the baseUrl of a compilerOptions object.
11
- *
12
- * @param {Object} options
13
- */
14
- function getAdditionalModulePaths(options = {}) {
15
- const baseUrl = options.baseUrl;
16
-
17
- if (!baseUrl) {
18
- return '';
19
- }
20
-
21
- const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
22
-
23
- // We don't need to do anything if `baseUrl` is set to `node_modules`. This is
24
- // the default behavior.
25
- if (path.relative(paths.appNodeModules, baseUrlResolved) === '') {
26
- return null;
27
- }
28
-
29
- // Allow the user set the `baseUrl` to `appSrc`.
30
- if (path.relative(paths.appSrc, baseUrlResolved) === '') {
31
- return [paths.appSrc];
32
- }
33
-
34
- // If the path is equal to the root directory we ignore it here.
35
- // We don't want to allow importing from the root directly as source files are
36
- // not transpiled outside of `src`. We do allow importing them with the
37
- // absolute path (e.g. `src/Components/Button.js`) but we set that up with
38
- // an alias.
39
- if (path.relative(paths.appPath, baseUrlResolved) === '') {
40
- return null;
41
- }
42
-
43
- // Otherwise, throw an error.
44
- throw new Error(
45
- chalk.red.bold(
46
- "Your project's `baseUrl` can only be set to `src` or `node_modules`." +
47
- ' Create React App does not support other values at this time.'
48
- )
49
- );
50
- }
51
-
52
- /**
53
- * Get webpack aliases based on the baseUrl of a compilerOptions object.
54
- *
55
- * @param {*} options
56
- */
57
- function getWebpackAliases(options = {}) {
58
- const baseUrl = options.baseUrl;
59
-
60
- if (!baseUrl) {
61
- return {};
62
- }
63
-
64
- const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
65
-
66
- if (path.relative(paths.appPath, baseUrlResolved) === '') {
67
- return {
68
- src: paths.appSrc,
69
- };
70
- }
71
- }
72
-
73
- /**
74
- * Get jest aliases based on the baseUrl of a compilerOptions object.
75
- *
76
- * @param {*} options
77
- */
78
- function getJestAliases(options = {}) {
79
- const baseUrl = options.baseUrl;
80
-
81
- if (!baseUrl) {
82
- return {};
83
- }
84
-
85
- const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
86
-
87
- if (path.relative(paths.appPath, baseUrlResolved) === '') {
88
- return {
89
- '^src/(.*)$': '<rootDir>/src/$1',
90
- };
91
- }
92
- }
93
-
94
- function getModules() {
95
- // Check if TypeScript is setup
96
- const hasTsConfig = fs.existsSync(paths.appTsConfig);
97
- const hasJsConfig = fs.existsSync(paths.appJsConfig);
98
-
99
- if (hasTsConfig && hasJsConfig) {
100
- throw new Error(
101
- 'You have both a tsconfig.json and a jsconfig.json. If you are using TypeScript please remove your jsconfig.json file.'
102
- );
103
- }
104
-
105
- let config;
106
-
107
- // If there's a tsconfig.json we assume it's a
108
- // TypeScript project and set up the config
109
- // based on tsconfig.json
110
- if (hasTsConfig) {
111
- const ts = require(resolve.sync('typescript', {
112
- basedir: paths.appNodeModules,
113
- }));
114
- config = ts.readConfigFile(paths.appTsConfig, ts.sys.readFile).config;
115
- // Otherwise we'll check if there is jsconfig.json
116
- // for non TS projects.
117
- } else if (hasJsConfig) {
118
- config = require(paths.appJsConfig);
119
- }
120
-
121
- config = config || {};
122
- const options = config.compilerOptions || {};
123
-
124
- const additionalModulePaths = getAdditionalModulePaths(options);
125
-
126
- return {
127
- additionalModulePaths: additionalModulePaths,
128
- webpackAliases: getWebpackAliases(options),
129
- jestAliases: getJestAliases(options),
130
- hasTsConfig,
131
- };
132
- }
133
-
134
- module.exports = getModules();
package/config/paths.js DELETED
@@ -1,71 +0,0 @@
1
- const path = require('path')
2
- const fs = require('fs')
3
- const getPublicUrlOrPath = require('react-dev-utils/getPublicUrlOrPath')
4
-
5
- // Make sure any symlinks in the project folder are resolved:
6
- // https://github.com/facebook/create-react-app/issues/637
7
- const appDirectory = fs.realpathSync(process.cwd())
8
- const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath)
9
-
10
- // We use `PUBLIC_URL` environment variable or "homepage" field to infer
11
- // "public path" at which the app is served.
12
- // webpack needs to know it to put the right <script> hrefs into HTML even in
13
- // single-page apps that may serve index.html for nested URLs like /todos/42.
14
- // We can't use a relative path in HTML because we don't want to load something
15
- // like /todos/42/static/js/bundle.7289d.js. We have to know the root.
16
- const publicUrlOrPath = getPublicUrlOrPath(
17
- process.env.NODE_ENV === 'development',
18
- require(resolveApp('package.json')).homepage,
19
- process.env.PUBLIC_URL
20
- )
21
-
22
- const moduleFileExtensions = [
23
- 'web.mjs',
24
- 'mjs',
25
- 'web.js',
26
- 'js',
27
- 'web.ts',
28
- 'ts',
29
- 'web.tsx',
30
- 'tsx',
31
- 'json',
32
- 'web.jsx',
33
- 'jsx',
34
- ]
35
-
36
- // Resolve file paths in the same order as webpack
37
- const resolveModule = (resolveFn, filePath) => {
38
- const extension = moduleFileExtensions.find((extension) =>
39
- fs.existsSync(resolveFn(`${filePath}.${extension}`))
40
- )
41
-
42
- if (extension) {
43
- return resolveFn(`${filePath}.${extension}`)
44
- }
45
-
46
- return resolveFn(`${filePath}.js`)
47
- }
48
-
49
- // config after eject: we're in ./config/
50
- module.exports = {
51
- dotenv: resolveApp('.env'),
52
- appPath: resolveApp('.'),
53
- appBuild: resolveApp('build'),
54
- appPublic: resolveApp('public'),
55
- appHtml: resolveApp('public/index.html'),
56
- appIndexJs: resolveModule(resolveApp, 'src/index'),
57
- appPackageJson: resolveApp('package.json'),
58
- appSrc: resolveApp('src'),
59
- appTsConfig: resolveApp('tsconfig.json'),
60
- appJsConfig: resolveApp('jsconfig.json'),
61
- yarnLockFile: resolveApp('yarn.lock'),
62
- testsSetup: resolveModule(resolveApp, 'src/setupTests'),
63
- proxySetup: resolveApp('src/setupProxy.js'),
64
- appNodeModules: resolveApp('node_modules'),
65
- swSrc: resolveModule(resolveApp, 'src/service-worker'),
66
- componentsIndexJs: resolveApp('src/components/index'),
67
- libBuild: resolveApp('lib'),
68
- publicUrlOrPath,
69
- }
70
-
71
- module.exports.moduleFileExtensions = moduleFileExtensions
package/config/pnpTs.js DELETED
@@ -1,35 +0,0 @@
1
- 'use strict';
2
-
3
- const { resolveModuleName } = require('ts-pnp');
4
-
5
- exports.resolveModuleName = (
6
- typescript,
7
- moduleName,
8
- containingFile,
9
- compilerOptions,
10
- resolutionHost
11
- ) => {
12
- return resolveModuleName(
13
- moduleName,
14
- containingFile,
15
- compilerOptions,
16
- resolutionHost,
17
- typescript.resolveModuleName
18
- );
19
- };
20
-
21
- exports.resolveTypeReferenceDirective = (
22
- typescript,
23
- moduleName,
24
- containingFile,
25
- compilerOptions,
26
- resolutionHost
27
- ) => {
28
- return resolveModuleName(
29
- moduleName,
30
- containingFile,
31
- compilerOptions,
32
- resolutionHost,
33
- typescript.resolveTypeReferenceDirective
34
- );
35
- };