@authing/react-ui-components 3.1.13-rc.1 → 3.1.13-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.
- package/LICENSE +21 -0
- package/lib/index.d.ts +70 -16
- package/lib/index.min.js +1 -1
- package/package.json +7 -6
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
|
|
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 {
|
|
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: (
|
|
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' {
|
|
@@ -1593,6 +1593,50 @@ declare module '@authing/react-ui-components/components/Guard/event' {
|
|
|
1593
1593
|
}
|
|
1594
1594
|
export const guardEventsFilter: (props: any, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
1595
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
|
+
}
|
|
1596
1640
|
|
|
1597
1641
|
}
|
|
1598
1642
|
declare module '@authing/react-ui-components/components/Guard/index' {
|
|
@@ -2569,13 +2613,14 @@ declare module '@authing/react-ui-components/components/Type/index' {
|
|
|
2569
2613
|
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
|
|
2570
2614
|
import { FacePlugin } from '@authing/react-ui-components/components/_utils/facePlugin/interface';
|
|
2571
2615
|
export interface IG2FCProps extends IG2Events {
|
|
2572
|
-
appId
|
|
2616
|
+
appId?: string;
|
|
2573
2617
|
tenantId?: string;
|
|
2574
2618
|
config?: Partial<IG2Config>;
|
|
2575
2619
|
visible?: boolean;
|
|
2576
2620
|
initData?: any;
|
|
2577
2621
|
appendConfig?: GuardAppendConfig;
|
|
2578
2622
|
facePlugin?: FacePlugin;
|
|
2623
|
+
authClient?: AuthenticationClient;
|
|
2579
2624
|
}
|
|
2580
2625
|
export interface GuardAppendConfig {
|
|
2581
2626
|
internalRequest?: boolean;
|
|
@@ -2590,8 +2635,8 @@ declare module '@authing/react-ui-components/components/Type/index' {
|
|
|
2590
2635
|
export interface IG2Config {
|
|
2591
2636
|
title?: string;
|
|
2592
2637
|
logo?: string;
|
|
2593
|
-
lang:
|
|
2594
|
-
langRange:
|
|
2638
|
+
lang: string;
|
|
2639
|
+
langRange: string[];
|
|
2595
2640
|
host: string;
|
|
2596
2641
|
isHost?: boolean;
|
|
2597
2642
|
mode: GuardMode;
|
|
@@ -2727,7 +2772,7 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
|
|
|
2727
2772
|
export const getPublicConfig: (appId: string) => ApplicationConfig;
|
|
2728
2773
|
export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
|
|
2729
2774
|
export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
|
|
2730
|
-
export const useMergePublicConfig: (appId
|
|
2775
|
+
export const useMergePublicConfig: (appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
|
|
2731
2776
|
host: string;
|
|
2732
2777
|
isSSO?: boolean | undefined;
|
|
2733
2778
|
defaultScenes?: import("@authing/react-ui-components/components/index").GuardModuleType | undefined;
|
|
@@ -2736,7 +2781,6 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
|
|
|
2736
2781
|
loadingComponent?: import("react").ReactNode;
|
|
2737
2782
|
openEventsMapping?: boolean | undefined;
|
|
2738
2783
|
_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
2784
|
disableRegister?: boolean | undefined;
|
|
2741
2785
|
registerMethods?: RegisterMethods[] | undefined;
|
|
2742
2786
|
defaultRegisterMethod?: RegisterMethods | undefined;
|
|
@@ -2746,8 +2790,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
|
|
|
2746
2790
|
registerContext?: any;
|
|
2747
2791
|
title?: string | undefined;
|
|
2748
2792
|
logo?: string | undefined;
|
|
2749
|
-
lang:
|
|
2750
|
-
langRange:
|
|
2793
|
+
lang: string;
|
|
2794
|
+
langRange: string[];
|
|
2751
2795
|
isHost?: boolean | undefined;
|
|
2752
2796
|
mode: import("@authing/react-ui-components/components/index").GuardMode;
|
|
2753
2797
|
clickCloseable: boolean;
|
|
@@ -2814,7 +2858,7 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
|
|
|
2814
2858
|
export const getPageConfig: (appId: string) => GuardPageConfig;
|
|
2815
2859
|
export const setPageConfig: (appId: string, config: GuardPageConfig) => GuardPageConfig;
|
|
2816
2860
|
export const requestGuardPageConfig: (appId: string, httpClient: GuardHttp) => Promise<GuardPageConfig>;
|
|
2817
|
-
export const useGuardPageConfig: (appId
|
|
2861
|
+
export const useGuardPageConfig: (appId?: string | undefined, httpClient?: GuardHttp | undefined, serError?: any) => GuardPageConfig | undefined;
|
|
2818
2862
|
|
|
2819
2863
|
}
|
|
2820
2864
|
declare module '@authing/react-ui-components/components/_utils/context' {
|
|
@@ -3095,6 +3139,16 @@ declare module '@authing/react-ui-components/components/_utils/index' {
|
|
|
3095
3139
|
export const GuardPropsFilter: (pre: GuardProps, current: GuardProps) => boolean;
|
|
3096
3140
|
export const getDocumentNode: (node: Node & ParentNode) => Document;
|
|
3097
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
|
+
|
|
3098
3152
|
}
|
|
3099
3153
|
declare module '@authing/react-ui-components/components/_utils/locales/en/index' {
|
|
3100
3154
|
import common from '@authing/react-ui-components/components/_utils/locales/en/common/index';
|
|
@@ -3108,7 +3162,7 @@ declare module '@authing/react-ui-components/components/_utils/locales/index' {
|
|
|
3108
3162
|
import i18n from 'i18next';
|
|
3109
3163
|
import { LocalesConfig, Lang } from '@authing/react-ui-components/components/AuthingGuard/types/index';
|
|
3110
3164
|
export const changeLang: (lang: Lang) => void;
|
|
3111
|
-
const initI18n: (localesConfig?: LocalesConfig, lang?:
|
|
3165
|
+
const initI18n: (localesConfig?: LocalesConfig, lang?: string | undefined) => void;
|
|
3112
3166
|
export { i18n, initI18n };
|
|
3113
3167
|
|
|
3114
3168
|
}
|
|
@@ -3277,7 +3331,7 @@ declare module '@authing/react-ui-components/components/version/index' {
|
|
|
3277
3331
|
|
|
3278
3332
|
}
|
|
3279
3333
|
declare module '@authing/react-ui-components/components/version/version' {
|
|
3280
|
-
const _default: "3.1.13-rc.
|
|
3334
|
+
const _default: "3.1.13-rc.10";
|
|
3281
3335
|
export default _default;
|
|
3282
3336
|
|
|
3283
3337
|
}
|