@authing/react-ui-components 3.1.15-rc.0 → 3.1.15

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Authing
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/lib/index.d.ts CHANGED
@@ -445,7 +445,6 @@ declare module '@authing/react-ui-components/components/AuthingGuard/api/appConf
445
445
  defaultISOType: string;
446
446
  };
447
447
  css: string;
448
- customLoading?: string;
449
448
  name: string;
450
449
  logo: string;
451
450
  description?: string;
@@ -1178,7 +1177,6 @@ declare module '@authing/react-ui-components/components/ChangePassword/core/rota
1178
1177
  /// <reference types="react" />
1179
1178
  interface RotateResetProps {
1180
1179
  onReset: any;
1181
- onFinishCallBack?: any;
1182
1180
  }
1183
1181
  export const RotateReset: (props: RotateResetProps) => JSX.Element;
1184
1182
  export {};
@@ -1192,7 +1190,6 @@ declare module '@authing/react-ui-components/components/ChangePassword/index' {
1192
1190
  }>;
1193
1191
  export const GuardFirstLoginPasswordResetView: React.FC;
1194
1192
  export const GuardForcedPasswordResetView: React.FC;
1195
- export const GuardNoticePasswordResetView: React.FC;
1196
1193
 
1197
1194
  }
1198
1195
  declare module '@authing/react-ui-components/components/CompleteInfo/businessRequest' {
@@ -1492,19 +1489,21 @@ declare module '@authing/react-ui-components/components/Guard/GuardModule/stateM
1492
1489
  declare module '@authing/react-ui-components/components/Guard/authClient' {
1493
1490
  import { AuthenticationClient } from 'authing-js-sdk';
1494
1491
  import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
1492
+ let authClient: AuthenticationClient;
1495
1493
  export const initGuardAuthClient: (config: GuardLocalConfig, appId: string, tenantId?: string | undefined) => AuthenticationClient;
1496
1494
  export const useInitGuardAuthClient: (props: {
1497
1495
  config?: GuardLocalConfig | undefined;
1498
- appId: string;
1496
+ appId?: string | undefined;
1497
+ authClient?: AuthenticationClient | undefined;
1499
1498
  setError?: any;
1500
1499
  tenantId?: string | undefined;
1501
1500
  }) => AuthenticationClient | undefined;
1502
1501
  export const getGuardAuthClient: () => AuthenticationClient;
1503
1502
  export const useGuardAuthClient: () => AuthenticationClient;
1503
+ export {};
1504
1504
 
1505
1505
  }
1506
1506
  declare module '@authing/react-ui-components/components/Guard/config' {
1507
- import { AuthenticationClient } from 'authing-js-sdk';
1508
1507
  import { ReactNode } from 'react';
1509
1508
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
1510
1509
  import { LoginConfig } from '@authing/react-ui-components/components/Login/interface';
@@ -1530,7 +1529,6 @@ declare module '@authing/react-ui-components/components/Guard/config' {
1530
1529
  */
1531
1530
  openEventsMapping?: boolean;
1532
1531
  _qrCodeScanOptions?: Record<QrCodeScanType, QrCodeScanOptions>;
1533
- authClient?: AuthenticationClient;
1534
1532
  }
1535
1533
  export const getDefaultGuardLocalConfig: () => GuardLocalConfig;
1536
1534
 
@@ -1553,7 +1551,6 @@ declare module '@authing/react-ui-components/components/Guard/core/renderContext
1553
1551
  export const RenderContext: React.FC<{
1554
1552
  guardProps: GuardProps;
1555
1553
  initState: ModuleState;
1556
- forceUpdate: number;
1557
1554
  }>;
1558
1555
 
1559
1556
  }
@@ -1571,10 +1568,10 @@ declare module '@authing/react-ui-components/components/Guard/core/renderModule'
1571
1568
 
1572
1569
  }
1573
1570
  declare module '@authing/react-ui-components/components/Guard/core/useAppendConfig' {
1574
- import { GuardProps } from '@authing/react-ui-components/components/index';
1571
+ import { GuardAppendConfig } from '@authing/react-ui-components/components/index';
1575
1572
  export const getGuardWindow: () => (Window & typeof globalThis) | undefined;
1576
1573
  export const useGuardWindow: () => (Window & typeof globalThis) | undefined;
1577
- export const useInitGuardAppendConfig: (guardProps: GuardProps, setForceUpdate: any) => void;
1574
+ export const useInitGuardAppendConfig: (appId?: string | undefined, appendConfig?: GuardAppendConfig | undefined) => void;
1578
1575
 
1579
1576
  }
1580
1577
  declare module '@authing/react-ui-components/components/Guard/core/usePlugin' {
@@ -1596,6 +1593,50 @@ declare module '@authing/react-ui-components/components/Guard/event' {
1596
1593
  }
1597
1594
  export const guardEventsFilter: (props: any, openEventsMapping?: boolean | undefined) => GuardEvents;
1598
1595
  export const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean | undefined) => GuardEvents;
1596
+ export const GuardEventsCamelToKebabMapping: {
1597
+ readonly onLoad: "load";
1598
+ readonly onLoadError: "load-error";
1599
+ readonly onLogin: "login";
1600
+ readonly onBeforeLogin: "before-login";
1601
+ readonly onLoginError: "login-error";
1602
+ readonly onRegister: "register";
1603
+ readonly onBeforeRegister: "before-register";
1604
+ readonly onRegisterError: "register-error";
1605
+ readonly onPwdEmailSend: "pwd-email-send";
1606
+ readonly onPwdEmailSendError: "pwd-email-send-error";
1607
+ readonly onPwdPhoneSend: "pwd-phone-send";
1608
+ readonly onPwdPhoneSendError: "pwd-phone-send-error";
1609
+ readonly onPwdReset: "pwd-reset";
1610
+ readonly onPwdResetError: "pwd-reset-error";
1611
+ readonly onClose: "close";
1612
+ readonly onLoginTabChange: "login-tab-change";
1613
+ readonly onRegisterTabChange: "register-tab-change";
1614
+ readonly onRegisterInfoCompleted: "register-info-completed";
1615
+ readonly onRegisterInfoCompletedError: "register-info-completed-error";
1616
+ readonly onLangChange: "lang-change";
1617
+ };
1618
+ export interface GuardEventsKebabToCamelType {
1619
+ load: GuardEvents['onLoad'];
1620
+ 'load-error': GuardEvents['onLoadError'];
1621
+ 'before-login': GuardEvents['onBeforeLogin'];
1622
+ login: GuardEvents['onLogin'];
1623
+ 'login-error': GuardEvents['onLoginError'];
1624
+ 'before-register': GuardEvents['onBeforeRegister'];
1625
+ register: GuardEvents['onRegister'];
1626
+ 'register-error': GuardEvents['onRegisterError'];
1627
+ 'pwd-email-send': GuardEvents['onPwdEmailSend'];
1628
+ 'pwd-email-send-error': GuardEvents['onPwdEmailSendError'];
1629
+ 'pwd-phone-send': GuardEvents['onPwdPhoneSend'];
1630
+ 'pwd-phone-send-error': GuardEvents['onPwdPhoneSendError'];
1631
+ 'pwd-reset': GuardEvents['onPwdReset'];
1632
+ 'pwd-reset-error': GuardEvents['onPwdResetError'];
1633
+ close: GuardEvents['onClose'];
1634
+ 'login-tab-change': GuardEvents['onLoginTabChange'];
1635
+ 'register-tab-change': GuardEvents['onRegisterTabChange'];
1636
+ 'register-info-completed': GuardEvents['onRegisterInfoCompleted'];
1637
+ 'register-info-completed-error': GuardEvents['onRegisterInfoCompletedError'];
1638
+ 'lang-change': GuardEvents['onLangChange'];
1639
+ }
1599
1640
 
1600
1641
  }
1601
1642
  declare module '@authing/react-ui-components/components/Guard/index' {
@@ -1613,7 +1654,6 @@ declare module '@authing/react-ui-components/components/Guard/module' {
1613
1654
  MFA = "mfa",
1614
1655
  FORGET_PWD = "forgetPassword",
1615
1656
  FORCED_PASSWORD_RESET = "forcedPasswordReset",
1616
- NOTICE_PASSWORD_RESET = "noticePasswordReset",
1617
1657
  FIRST_LOGIN_PASSWORD = "firstLoginPassword",
1618
1658
  DOWNLOAD_AT = "downloadAT",
1619
1659
  BIND_TOTP = "bindTotp",
@@ -2463,9 +2503,9 @@ declare module '@authing/react-ui-components/components/SendCode/SendCodeBtn' {
2463
2503
  }
2464
2504
  declare module '@authing/react-ui-components/components/SendCode/SendCodeByEmail' {
2465
2505
  import { FC } from 'react';
2506
+ import { EmailScene } from 'authing-js-sdk';
2466
2507
  import './style.less';
2467
2508
  import { InputProps } from 'antd/lib/input';
2468
- import { EmailScene } from '@authing/react-ui-components/components/Type/index';
2469
2509
  export interface SendCodeByEmailProps extends InputProps {
2470
2510
  data: string;
2471
2511
  form?: any;
@@ -2535,7 +2575,6 @@ declare module '@authing/react-ui-components/components/SubmitButton/index' {
2535
2575
  text?: string;
2536
2576
  className?: string;
2537
2577
  onClick?: any;
2538
- disabled?: boolean;
2539
2578
  }
2540
2579
  const _default: React.ForwardRefExoticComponent<SubmitButtonProps & React.RefAttributes<unknown>>;
2541
2580
  export default _default;
@@ -2574,13 +2613,14 @@ declare module '@authing/react-ui-components/components/Type/index' {
2574
2613
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
2575
2614
  import { FacePlugin } from '@authing/react-ui-components/components/_utils/facePlugin/interface';
2576
2615
  export interface IG2FCProps extends IG2Events {
2577
- appId: string;
2616
+ appId?: string;
2578
2617
  tenantId?: string;
2579
2618
  config?: Partial<IG2Config>;
2580
2619
  visible?: boolean;
2581
2620
  initData?: any;
2582
2621
  appendConfig?: GuardAppendConfig;
2583
2622
  facePlugin?: FacePlugin;
2623
+ authClient?: AuthenticationClient;
2584
2624
  }
2585
2625
  export interface GuardAppendConfig {
2586
2626
  internalRequest?: boolean;
@@ -2630,19 +2670,6 @@ declare module '@authing/react-ui-components/components/Type/index' {
2630
2670
  showChangeLanguage: boolean;
2631
2671
  };
2632
2672
  }
2633
- export enum EmailScene {
2634
- WELCOME_EMAIL = "WELCOME_EMAIL",
2635
- FIRST_CREATED_USER = "FIRST_CREATED_USER",
2636
- REGISTER_VERIFY_CODE = "REGISTER_VERIFY_CODE",
2637
- LOGIN_VERIFY_CODE = "LOGIN_VERIFY_CODE",
2638
- MFA_VERIFY_CODE = "MFA_VERIFY_CODE",
2639
- INFORMATION_COMPLETION_VERIFY_CODE = "INFORMATION_COMPLETION_VERIFY_CODE",
2640
- FIRST_EMAIL_LOGIN_VERIFY = "FIRST_EMAIL_LOGIN_VERIFY",
2641
- CONSOLE_CONDUCTED_VERIFY = "CONSOLE_CONDUCTED_VERIFY",
2642
- RESET_PASSWORD_VERIFY_CODE = "RESET_PASSWORD_VERIFY_CODE",
2643
- EMAIL_BIND_VERIFY_CODE = "EMAIL_BIND_VERIFY_CODE",
2644
- EMAIL_UNBIND_VERIFY_CODE = "EMAIL_UNBIND_VERIFY_CODE"
2645
- }
2646
2673
 
2647
2674
  }
2648
2675
  declare module '@authing/react-ui-components/components/ValidatorRules/PasswordFormItem' {
@@ -2671,7 +2698,6 @@ declare module '@authing/react-ui-components/components/ValidatorRules/index' {
2671
2698
  form?: FormInstance;
2672
2699
  checkRepeat?: boolean;
2673
2700
  areaCode?: string;
2674
- isCheckI18nSms?: boolean;
2675
2701
  }
2676
2702
  export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
2677
2703
  form?: FormInstance;
@@ -2746,7 +2772,7 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2746
2772
  export const getPublicConfig: (appId: string) => ApplicationConfig;
2747
2773
  export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
2748
2774
  export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
2749
- export const useMergePublicConfig: (appId: string, forceUpdate: number, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, serError?: any) => {
2775
+ export const useMergePublicConfig: (appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
2750
2776
  host: string;
2751
2777
  isSSO?: boolean | undefined;
2752
2778
  defaultScenes?: import("@authing/react-ui-components/components/index").GuardModuleType | undefined;
@@ -2755,7 +2781,6 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2755
2781
  loadingComponent?: import("react").ReactNode;
2756
2782
  openEventsMapping?: boolean | undefined;
2757
2783
  _qrCodeScanOptions?: Record<import("@authing/react-ui-components/components/Guard/config").QrCodeScanType, import("../../Guard/config").QrCodeScanOptions> | undefined;
2758
- authClient?: import("authing-js-sdk").AuthenticationClient | undefined;
2759
2784
  disableRegister?: boolean | undefined;
2760
2785
  registerMethods?: RegisterMethods[] | undefined;
2761
2786
  defaultRegisterMethod?: RegisterMethods | undefined;
@@ -2833,7 +2858,7 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2833
2858
  export const getPageConfig: (appId: string) => GuardPageConfig;
2834
2859
  export const setPageConfig: (appId: string, config: GuardPageConfig) => GuardPageConfig;
2835
2860
  export const requestGuardPageConfig: (appId: string, httpClient: GuardHttp) => Promise<GuardPageConfig>;
2836
- export const useGuardPageConfig: (appId: string, forceUpdate: number, httpClient?: GuardHttp | undefined, serError?: any) => GuardPageConfig | undefined;
2861
+ export const useGuardPageConfig: (appId?: string | undefined, httpClient?: GuardHttp | undefined, serError?: any) => GuardPageConfig | undefined;
2837
2862
 
2838
2863
  }
2839
2864
  declare module '@authing/react-ui-components/components/_utils/context' {
@@ -3089,8 +3114,6 @@ declare module '@authing/react-ui-components/components/_utils/index' {
3089
3114
  export const isXiaomiBrowser: () => boolean | null;
3090
3115
  export const isDingtalkBrowser: () => boolean | null;
3091
3116
  export const isQQBrowser: () => boolean | null;
3092
- export const isQQBuiltInBrowser: () => boolean | null;
3093
- export const isWeWorkBuiltInBrowser: () => boolean | null;
3094
3117
  export const isSpecialBrowser: () => boolean | null;
3095
3118
  export const assembledAppHost: (identifier: string, host: string) => string;
3096
3119
  export const assembledRequestHost: (requestHostname: string, configHost: string) => string;
@@ -3116,6 +3139,16 @@ declare module '@authing/react-ui-components/components/_utils/index' {
3116
3139
  export const GuardPropsFilter: (pre: GuardProps, current: GuardProps) => boolean;
3117
3140
  export const getDocumentNode: (node: Node & ParentNode) => Document;
3118
3141
 
3142
+ }
3143
+ declare module '@authing/react-ui-components/components/_utils/initAppId' {
3144
+ import { AuthenticationClient } from 'authing-js-sdk';
3145
+ export interface UseInitAppidProps {
3146
+ propsAppid?: string;
3147
+ propsAuthClient?: AuthenticationClient;
3148
+ setError?: any;
3149
+ }
3150
+ export const useInitAppId: (propsAppid?: string | undefined, propsAuthClient?: AuthenticationClient | undefined, setError?: any) => string | undefined;
3151
+
3119
3152
  }
3120
3153
  declare module '@authing/react-ui-components/components/_utils/locales/en/index' {
3121
3154
  import common from '@authing/react-ui-components/components/_utils/locales/en/common/index';
@@ -3298,7 +3331,7 @@ declare module '@authing/react-ui-components/components/version/index' {
3298
3331
 
3299
3332
  }
3300
3333
  declare module '@authing/react-ui-components/components/version/version' {
3301
- const _default: "3.1.15-rc.0";
3334
+ const _default: "3.1.15";
3302
3335
  export default _default;
3303
3336
 
3304
3337
  }