@authing/react-ui-components 3.1.13-rc.1 → 3.1.13-rc.4

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
@@ -1489,19 +1489,21 @@ declare module '@authing/react-ui-components/components/Guard/GuardModule/stateM
1489
1489
  declare module '@authing/react-ui-components/components/Guard/authClient' {
1490
1490
  import { AuthenticationClient } from 'authing-js-sdk';
1491
1491
  import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
1492
+ let authClient: AuthenticationClient;
1492
1493
  export const initGuardAuthClient: (config: GuardLocalConfig, appId: string, tenantId?: string | undefined) => AuthenticationClient;
1493
1494
  export const useInitGuardAuthClient: (props: {
1494
1495
  config?: GuardLocalConfig | undefined;
1495
- appId: string;
1496
+ appId?: string | undefined;
1497
+ authClient?: AuthenticationClient | undefined;
1496
1498
  setError?: any;
1497
1499
  tenantId?: string | undefined;
1498
1500
  }) => AuthenticationClient | undefined;
1499
1501
  export const getGuardAuthClient: () => AuthenticationClient;
1500
1502
  export const useGuardAuthClient: () => AuthenticationClient;
1503
+ export {};
1501
1504
 
1502
1505
  }
1503
1506
  declare module '@authing/react-ui-components/components/Guard/config' {
1504
- import { AuthenticationClient } from 'authing-js-sdk';
1505
1507
  import { ReactNode } from 'react';
1506
1508
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
1507
1509
  import { LoginConfig } from '@authing/react-ui-components/components/Login/interface';
@@ -1527,7 +1529,6 @@ declare module '@authing/react-ui-components/components/Guard/config' {
1527
1529
  */
1528
1530
  openEventsMapping?: boolean;
1529
1531
  _qrCodeScanOptions?: Record<QrCodeScanType, QrCodeScanOptions>;
1530
- authClient?: AuthenticationClient;
1531
1532
  }
1532
1533
  export const getDefaultGuardLocalConfig: () => GuardLocalConfig;
1533
1534
 
@@ -1550,7 +1551,6 @@ declare module '@authing/react-ui-components/components/Guard/core/renderContext
1550
1551
  export const RenderContext: React.FC<{
1551
1552
  guardProps: GuardProps;
1552
1553
  initState: ModuleState;
1553
- forceUpdate: number;
1554
1554
  }>;
1555
1555
 
1556
1556
  }
@@ -1568,10 +1568,10 @@ declare module '@authing/react-ui-components/components/Guard/core/renderModule'
1568
1568
 
1569
1569
  }
1570
1570
  declare module '@authing/react-ui-components/components/Guard/core/useAppendConfig' {
1571
- import { GuardProps } from '@authing/react-ui-components/components/index';
1571
+ import { GuardAppendConfig } from '@authing/react-ui-components/components/index';
1572
1572
  export const getGuardWindow: () => (Window & typeof globalThis) | undefined;
1573
1573
  export const useGuardWindow: () => (Window & typeof globalThis) | undefined;
1574
- export const useInitGuardAppendConfig: (guardProps: GuardProps, setForceUpdate: any) => void;
1574
+ export const useInitGuardAppendConfig: (appId?: string | undefined, appendConfig?: GuardAppendConfig | undefined) => void;
1575
1575
 
1576
1576
  }
1577
1577
  declare module '@authing/react-ui-components/components/Guard/core/usePlugin' {
@@ -2569,13 +2569,14 @@ declare module '@authing/react-ui-components/components/Type/index' {
2569
2569
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
2570
2570
  import { FacePlugin } from '@authing/react-ui-components/components/_utils/facePlugin/interface';
2571
2571
  export interface IG2FCProps extends IG2Events {
2572
- appId: string;
2572
+ appId?: string;
2573
2573
  tenantId?: string;
2574
2574
  config?: Partial<IG2Config>;
2575
2575
  visible?: boolean;
2576
2576
  initData?: any;
2577
2577
  appendConfig?: GuardAppendConfig;
2578
2578
  facePlugin?: FacePlugin;
2579
+ authClient?: AuthenticationClient;
2579
2580
  }
2580
2581
  export interface GuardAppendConfig {
2581
2582
  internalRequest?: boolean;
@@ -2590,8 +2591,8 @@ declare module '@authing/react-ui-components/components/Type/index' {
2590
2591
  export interface IG2Config {
2591
2592
  title?: string;
2592
2593
  logo?: string;
2593
- lang: Lang;
2594
- langRange: Lang[];
2594
+ lang: string;
2595
+ langRange: string[];
2595
2596
  host: string;
2596
2597
  isHost?: boolean;
2597
2598
  mode: GuardMode;
@@ -2727,7 +2728,7 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2727
2728
  export const getPublicConfig: (appId: string) => ApplicationConfig;
2728
2729
  export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
2729
2730
  export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
2730
- export const useMergePublicConfig: (appId: string, forceUpdate: number, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, serError?: any) => {
2731
+ export const useMergePublicConfig: (appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
2731
2732
  host: string;
2732
2733
  isSSO?: boolean | undefined;
2733
2734
  defaultScenes?: import("@authing/react-ui-components/components/index").GuardModuleType | undefined;
@@ -2736,7 +2737,6 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2736
2737
  loadingComponent?: import("react").ReactNode;
2737
2738
  openEventsMapping?: boolean | undefined;
2738
2739
  _qrCodeScanOptions?: Record<import("@authing/react-ui-components/components/Guard/config").QrCodeScanType, import("../../Guard/config").QrCodeScanOptions> | undefined;
2739
- authClient?: import("authing-js-sdk").AuthenticationClient | undefined;
2740
2740
  disableRegister?: boolean | undefined;
2741
2741
  registerMethods?: RegisterMethods[] | undefined;
2742
2742
  defaultRegisterMethod?: RegisterMethods | undefined;
@@ -2746,8 +2746,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2746
2746
  registerContext?: any;
2747
2747
  title?: string | undefined;
2748
2748
  logo?: string | undefined;
2749
- lang: import("@authing/react-ui-components/components/index").Lang;
2750
- langRange: import("@authing/react-ui-components/components/index").Lang[];
2749
+ lang: string;
2750
+ langRange: string[];
2751
2751
  isHost?: boolean | undefined;
2752
2752
  mode: import("@authing/react-ui-components/components/index").GuardMode;
2753
2753
  clickCloseable: boolean;
@@ -2814,7 +2814,7 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2814
2814
  export const getPageConfig: (appId: string) => GuardPageConfig;
2815
2815
  export const setPageConfig: (appId: string, config: GuardPageConfig) => GuardPageConfig;
2816
2816
  export const requestGuardPageConfig: (appId: string, httpClient: GuardHttp) => Promise<GuardPageConfig>;
2817
- export const useGuardPageConfig: (appId: string, forceUpdate: number, httpClient?: GuardHttp | undefined, serError?: any) => GuardPageConfig | undefined;
2817
+ export const useGuardPageConfig: (appId?: string | undefined, httpClient?: GuardHttp | undefined, serError?: any) => GuardPageConfig | undefined;
2818
2818
 
2819
2819
  }
2820
2820
  declare module '@authing/react-ui-components/components/_utils/context' {
@@ -3095,6 +3095,16 @@ declare module '@authing/react-ui-components/components/_utils/index' {
3095
3095
  export const GuardPropsFilter: (pre: GuardProps, current: GuardProps) => boolean;
3096
3096
  export const getDocumentNode: (node: Node & ParentNode) => Document;
3097
3097
 
3098
+ }
3099
+ declare module '@authing/react-ui-components/components/_utils/initAppId' {
3100
+ import { AuthenticationClient } from 'authing-js-sdk';
3101
+ export interface UseInitAppidProps {
3102
+ propsAppid?: string;
3103
+ propsAuthClient?: AuthenticationClient;
3104
+ setError?: any;
3105
+ }
3106
+ export const useInitAppId: (propsAppid?: string | undefined, propsAuthClient?: AuthenticationClient | undefined, setError?: any) => string | undefined;
3107
+
3098
3108
  }
3099
3109
  declare module '@authing/react-ui-components/components/_utils/locales/en/index' {
3100
3110
  import common from '@authing/react-ui-components/components/_utils/locales/en/common/index';
@@ -3108,7 +3118,7 @@ declare module '@authing/react-ui-components/components/_utils/locales/index' {
3108
3118
  import i18n from 'i18next';
3109
3119
  import { LocalesConfig, Lang } from '@authing/react-ui-components/components/AuthingGuard/types/index';
3110
3120
  export const changeLang: (lang: Lang) => void;
3111
- const initI18n: (localesConfig?: LocalesConfig, lang?: "zh-CN" | "en-US" | undefined) => void;
3121
+ const initI18n: (localesConfig?: LocalesConfig, lang?: string | undefined) => void;
3112
3122
  export { i18n, initI18n };
3113
3123
 
3114
3124
  }
@@ -3277,7 +3287,7 @@ declare module '@authing/react-ui-components/components/version/index' {
3277
3287
 
3278
3288
  }
3279
3289
  declare module '@authing/react-ui-components/components/version/version' {
3280
- const _default: "3.1.13-rc.1";
3290
+ const _default: "3.1.13-rc.4";
3281
3291
  export default _default;
3282
3292
 
3283
3293
  }