@authing/react-ui-components 3.1.31-rc.1 → 3.1.31-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/lib/index.d.ts +9 -574
- package/lib/index.min.css +1 -1
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.LICENSE.txt +0 -9
- package/package.json +3 -4
package/lib/index.d.ts
CHANGED
|
@@ -521,6 +521,7 @@ declare module '@authing/react-ui-components/components/AuthingGuard/api/appConf
|
|
|
521
521
|
websocket: string;
|
|
522
522
|
welcomeMessage: any;
|
|
523
523
|
skipComplateFileds: boolean;
|
|
524
|
+
selfUnlockStrategy: 'captcha' | 'password-captcha';
|
|
524
525
|
}
|
|
525
526
|
export const fetchAppConfig: (appId: string) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingResponse<ApplicationConfig>>;
|
|
526
527
|
|
|
@@ -1574,293 +1575,6 @@ declare module '@authing/react-ui-components/components/Guard/config' {
|
|
|
1574
1575
|
}
|
|
1575
1576
|
export const getDefaultGuardLocalConfig: () => GuardLocalConfig;
|
|
1576
1577
|
|
|
1577
|
-
}
|
|
1578
|
-
declare module '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts' {
|
|
1579
|
-
import { SelectOptions } from '@authing/react-ui-components/components/Login/multipleAccounts/panel';
|
|
1580
|
-
export const QR_CODE_WAY: LoginWay[];
|
|
1581
|
-
/**
|
|
1582
|
-
* 登录时所有支持的登录列表(前端定义列表)
|
|
1583
|
-
*/
|
|
1584
|
-
export type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap';
|
|
1585
|
-
/**
|
|
1586
|
-
* when: 多账号页面跳转进入登录页面
|
|
1587
|
-
* 携带的回填数据信息
|
|
1588
|
-
*/
|
|
1589
|
-
export interface BackFillMultipleState extends Omit<User, 'id' | 'name' | 'nickname' | 'username' | 'phone' | 'email' | 'photo' | '_updateTime'> {
|
|
1590
|
-
/**
|
|
1591
|
-
* 回填的账号名称 邮箱/用户名/手机
|
|
1592
|
-
*/
|
|
1593
|
-
account: string;
|
|
1594
|
-
}
|
|
1595
|
-
/**
|
|
1596
|
-
* Store instance
|
|
1597
|
-
*/
|
|
1598
|
-
export type StoreInstance = ReturnType<MultipleAccount['getStore']>;
|
|
1599
|
-
/**
|
|
1600
|
-
* 当前 userId 对应的类型
|
|
1601
|
-
*/
|
|
1602
|
-
export interface CurrentStore {
|
|
1603
|
-
[id: string]: User;
|
|
1604
|
-
}
|
|
1605
|
-
export interface User {
|
|
1606
|
-
/**
|
|
1607
|
-
* userId
|
|
1608
|
-
*/
|
|
1609
|
-
id: string;
|
|
1610
|
-
/**
|
|
1611
|
-
* Tab 栏状态
|
|
1612
|
-
*/
|
|
1613
|
-
tab: 'input' | 'qrcode';
|
|
1614
|
-
/**
|
|
1615
|
-
* 登录方式
|
|
1616
|
-
*/
|
|
1617
|
-
way: LoginWay;
|
|
1618
|
-
/**
|
|
1619
|
-
* 姓名
|
|
1620
|
-
*/
|
|
1621
|
-
name?: string | null;
|
|
1622
|
-
/**
|
|
1623
|
-
* 昵称
|
|
1624
|
-
*/
|
|
1625
|
-
nickname?: string | null;
|
|
1626
|
-
/**
|
|
1627
|
-
* 用户名
|
|
1628
|
-
*/
|
|
1629
|
-
username?: string | null;
|
|
1630
|
-
/**
|
|
1631
|
-
* 手机号
|
|
1632
|
-
*/
|
|
1633
|
-
phone?: string | null;
|
|
1634
|
-
/**
|
|
1635
|
-
* 邮箱
|
|
1636
|
-
*/
|
|
1637
|
-
email?: string | null;
|
|
1638
|
-
/**
|
|
1639
|
-
* 头像
|
|
1640
|
-
*/
|
|
1641
|
-
photo?: string | null;
|
|
1642
|
-
/**
|
|
1643
|
-
* qrCodeId 对应的ID
|
|
1644
|
-
*/
|
|
1645
|
-
qrCodeId?: string;
|
|
1646
|
-
/**
|
|
1647
|
-
* 国际化短信区号
|
|
1648
|
-
*/
|
|
1649
|
-
phoneCountryCode?: string;
|
|
1650
|
-
/**
|
|
1651
|
-
* 国际化短信选择框回填
|
|
1652
|
-
*/
|
|
1653
|
-
areaCode?: string;
|
|
1654
|
-
/**
|
|
1655
|
-
* 登录时间
|
|
1656
|
-
*/
|
|
1657
|
-
_updateTime?: string;
|
|
1658
|
-
}
|
|
1659
|
-
class MultipleAccount {
|
|
1660
|
-
/**
|
|
1661
|
-
* 原始的 localStore 值
|
|
1662
|
-
*/
|
|
1663
|
-
private originStore;
|
|
1664
|
-
/**
|
|
1665
|
-
* 当前 AppId Store
|
|
1666
|
-
*/
|
|
1667
|
-
private currentStore;
|
|
1668
|
-
/**
|
|
1669
|
-
* 单账号直接回填
|
|
1670
|
-
*/
|
|
1671
|
-
private firstBackFillData?;
|
|
1672
|
-
/**
|
|
1673
|
-
* server 返回支持的登录方式
|
|
1674
|
-
*/
|
|
1675
|
-
private serverSideLoginMethods;
|
|
1676
|
-
/**
|
|
1677
|
-
* 是否显示多账号登录页面
|
|
1678
|
-
* true 存在
|
|
1679
|
-
*/
|
|
1680
|
-
private memberState;
|
|
1681
|
-
/**
|
|
1682
|
-
* 二维码登录时的ID
|
|
1683
|
-
*/
|
|
1684
|
-
private qrCodeId?;
|
|
1685
|
-
/**
|
|
1686
|
-
* 国际化短信前缀 区号
|
|
1687
|
-
*/
|
|
1688
|
-
private phoneCountryCode?;
|
|
1689
|
-
/**
|
|
1690
|
-
* 国际化短信前缀 选中地区编号
|
|
1691
|
-
*/
|
|
1692
|
-
private areaCode?;
|
|
1693
|
-
private tabStatus?;
|
|
1694
|
-
/**
|
|
1695
|
-
* 当前登录二级状态
|
|
1696
|
-
*/
|
|
1697
|
-
private loginWay?;
|
|
1698
|
-
private appId;
|
|
1699
|
-
/**
|
|
1700
|
-
* 是否开启国际化短信
|
|
1701
|
-
*/
|
|
1702
|
-
private isInternationSms?;
|
|
1703
|
-
constructor();
|
|
1704
|
-
/**
|
|
1705
|
-
* 页面首次加载时初始化 Store
|
|
1706
|
-
* 从 LocalStore 中拿值 放到这里来
|
|
1707
|
-
*/
|
|
1708
|
-
private initStore;
|
|
1709
|
-
/**
|
|
1710
|
-
* 初始化记住账号相关信息
|
|
1711
|
-
* @param normalCount
|
|
1712
|
-
* @returns
|
|
1713
|
-
*/
|
|
1714
|
-
private initMemberState;
|
|
1715
|
-
/**
|
|
1716
|
-
* 获取当前ID下有效账号个数
|
|
1717
|
-
* @returns qrCount 有效的二维码登录个数 normalCount 有效的账号登录方式
|
|
1718
|
-
*/
|
|
1719
|
-
private memberStateCount;
|
|
1720
|
-
/**
|
|
1721
|
-
* 初始化第一次的数据 TODO: 逻辑有点脏 待整理
|
|
1722
|
-
*/
|
|
1723
|
-
private initBackfillData;
|
|
1724
|
-
/**
|
|
1725
|
-
* 根据前端存储的登录方式返回后端映射方式
|
|
1726
|
-
* @param front
|
|
1727
|
-
*/
|
|
1728
|
-
private getServerLoginMethodByFront;
|
|
1729
|
-
/**
|
|
1730
|
-
* 当前 Store DONE
|
|
1731
|
-
*/
|
|
1732
|
-
private getCurrentStore;
|
|
1733
|
-
/**
|
|
1734
|
-
* 国际化短信过滤
|
|
1735
|
-
* true 表示通过 需要保留
|
|
1736
|
-
* false 表示不通过 需要过滤
|
|
1737
|
-
*/
|
|
1738
|
-
private validateInternationSms;
|
|
1739
|
-
/**
|
|
1740
|
-
* 校验有效的登录方式账号
|
|
1741
|
-
* @param user
|
|
1742
|
-
* @param serverSideLoginMethods
|
|
1743
|
-
* @returns
|
|
1744
|
-
*/
|
|
1745
|
-
private validateMethod;
|
|
1746
|
-
/**
|
|
1747
|
-
*
|
|
1748
|
-
* @param tab 一级Tab状态
|
|
1749
|
-
* @param way 二级Tab状态
|
|
1750
|
-
* @param id 二维码登录时 记录对应的二维码 ID
|
|
1751
|
-
*/
|
|
1752
|
-
private setLoginWay;
|
|
1753
|
-
/**
|
|
1754
|
-
* 设置/更新 store 内的用户信息
|
|
1755
|
-
*/
|
|
1756
|
-
private setUserInfo;
|
|
1757
|
-
/**
|
|
1758
|
-
* 持久化保存
|
|
1759
|
-
*/
|
|
1760
|
-
private saveStore;
|
|
1761
|
-
/**
|
|
1762
|
-
* 根据登录的 account 判断本次登录的方式
|
|
1763
|
-
* @param account 登录输入的账号
|
|
1764
|
-
* @param param1 登录成功返回的相关信息 用户名/手机号/邮箱
|
|
1765
|
-
* @returns
|
|
1766
|
-
*/
|
|
1767
|
-
private setLoginWayByHttpData;
|
|
1768
|
-
/**
|
|
1769
|
-
* 根据用户 ID 删除 localStorage 中当前用户 ID
|
|
1770
|
-
*/
|
|
1771
|
-
private delUserById;
|
|
1772
|
-
/**
|
|
1773
|
-
* 获得多账号登录页面的所有用户列表
|
|
1774
|
-
* @param excludeWays
|
|
1775
|
-
*/
|
|
1776
|
-
private getMemoUser;
|
|
1777
|
-
/**
|
|
1778
|
-
* 根据 id 获得当前已登录的用户信息
|
|
1779
|
-
* @param userId
|
|
1780
|
-
* @returns User / undefined
|
|
1781
|
-
*/
|
|
1782
|
-
private getMemoSingleUser;
|
|
1783
|
-
/**
|
|
1784
|
-
* 该方法仅仅需要回填账号的登录方式,其他都不计入
|
|
1785
|
-
* 当用户名/手机号/邮箱/AD/LDAP 相同时,根据登录顺序匹配不同的账号
|
|
1786
|
-
* 根据记住的用户登录方式获取对应的登录账户名
|
|
1787
|
-
* @param way
|
|
1788
|
-
* @param user
|
|
1789
|
-
* @returns
|
|
1790
|
-
*/
|
|
1791
|
-
private getAccountByWay;
|
|
1792
|
-
private _mappingUser;
|
|
1793
|
-
/**
|
|
1794
|
-
* 外部暴露方法
|
|
1795
|
-
*/
|
|
1796
|
-
getStore: () => {
|
|
1797
|
-
initStore: (appId: string, options: {
|
|
1798
|
-
serverSideLoginMethods: LoginWay[];
|
|
1799
|
-
isInternationSms: boolean;
|
|
1800
|
-
}) => void;
|
|
1801
|
-
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string | undefined, internation?: {
|
|
1802
|
-
phoneCountryCode: string;
|
|
1803
|
-
areaCode: string;
|
|
1804
|
-
} | undefined) => void;
|
|
1805
|
-
setUserInfo: (user: Pick<User & {
|
|
1806
|
-
id: string;
|
|
1807
|
-
}, "email" | "username" | "phone" | "id" | "nickname" | "photo" | "name" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
1808
|
-
setLoginWayByHttpData: (account: string, data: {
|
|
1809
|
-
username?: string | undefined;
|
|
1810
|
-
phone?: string | undefined;
|
|
1811
|
-
email?: string | undefined;
|
|
1812
|
-
}) => void;
|
|
1813
|
-
getMemoUser: (excludeWays?: LoginWay[]) => SelectOptions[];
|
|
1814
|
-
getMemoSingleUser: (id: string) => {
|
|
1815
|
-
way: LoginWay;
|
|
1816
|
-
account: string;
|
|
1817
|
-
} | undefined;
|
|
1818
|
-
delUserById: (id: string) => string;
|
|
1819
|
-
getMemberState: () => boolean;
|
|
1820
|
-
getFirstBackFillData: () => BackFillMultipleState | undefined;
|
|
1821
|
-
};
|
|
1822
|
-
}
|
|
1823
|
-
/**
|
|
1824
|
-
* MultipleAccounts 相关 Hook
|
|
1825
|
-
* Finally Config 类型过滤
|
|
1826
|
-
*/
|
|
1827
|
-
const useMultipleAccounts: ({ appId, finallyConfig }: {
|
|
1828
|
-
appId?: string | undefined;
|
|
1829
|
-
finallyConfig?: any;
|
|
1830
|
-
}) => {
|
|
1831
|
-
instance: {
|
|
1832
|
-
initStore: (appId: string, options: {
|
|
1833
|
-
serverSideLoginMethods: LoginWay[];
|
|
1834
|
-
isInternationSms: boolean;
|
|
1835
|
-
}) => void;
|
|
1836
|
-
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string | undefined, internation?: {
|
|
1837
|
-
phoneCountryCode: string;
|
|
1838
|
-
areaCode: string;
|
|
1839
|
-
} | undefined) => void;
|
|
1840
|
-
setUserInfo: (user: Pick<User & {
|
|
1841
|
-
id: string;
|
|
1842
|
-
}, "email" | "username" | "phone" | "id" | "nickname" | "photo" | "name" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
1843
|
-
setLoginWayByHttpData: (account: string, data: {
|
|
1844
|
-
username?: string | undefined;
|
|
1845
|
-
phone?: string | undefined;
|
|
1846
|
-
email?: string | undefined;
|
|
1847
|
-
}) => void;
|
|
1848
|
-
getMemoUser: (excludeWays?: LoginWay[]) => SelectOptions[];
|
|
1849
|
-
getMemoSingleUser: (id: string) => {
|
|
1850
|
-
way: LoginWay;
|
|
1851
|
-
account: string;
|
|
1852
|
-
} | undefined;
|
|
1853
|
-
delUserById: (id: string) => string;
|
|
1854
|
-
getMemberState: () => boolean;
|
|
1855
|
-
getFirstBackFillData: () => BackFillMultipleState | undefined;
|
|
1856
|
-
} | undefined;
|
|
1857
|
-
isMultipleAccount: boolean;
|
|
1858
|
-
referMultipleState: (type: 'login' | 'multiple', data?: BackFillMultipleState | undefined) => void;
|
|
1859
|
-
multipleAccountData: BackFillMultipleState | undefined;
|
|
1860
|
-
clearBackFillData: () => void;
|
|
1861
|
-
};
|
|
1862
|
-
export default useMultipleAccounts;
|
|
1863
|
-
|
|
1864
1578
|
}
|
|
1865
1579
|
declare module '@authing/react-ui-components/components/Guard/core/index' {
|
|
1866
1580
|
/// <reference types="react" />
|
|
@@ -1920,32 +1634,7 @@ declare module '@authing/react-ui-components/components/Guard/event' {
|
|
|
1920
1634
|
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
|
|
1921
1635
|
onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
|
|
1922
1636
|
}
|
|
1923
|
-
export const guardEventsFilter: (props: any,
|
|
1924
|
-
initStore: (appId: string, options: {
|
|
1925
|
-
serverSideLoginMethods: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay[];
|
|
1926
|
-
isInternationSms: boolean;
|
|
1927
|
-
}) => void;
|
|
1928
|
-
setLoginWay: (tab: "input" | "qrcode", way: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay, id?: string | undefined, internation?: {
|
|
1929
|
-
phoneCountryCode: string;
|
|
1930
|
-
areaCode: string;
|
|
1931
|
-
} | undefined) => void;
|
|
1932
|
-
setUserInfo: (user: Pick<import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").User & {
|
|
1933
|
-
id: string;
|
|
1934
|
-
}, "email" | "username" | "phone" | "id" | "nickname" | "photo" | "name" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
1935
|
-
setLoginWayByHttpData: (account: string, data: {
|
|
1936
|
-
username?: string | undefined;
|
|
1937
|
-
phone?: string | undefined;
|
|
1938
|
-
email?: string | undefined;
|
|
1939
|
-
}) => void;
|
|
1940
|
-
getMemoUser: (excludeWays?: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay[]) => import("../Login/multipleAccounts/panel").SelectOptions[];
|
|
1941
|
-
getMemoSingleUser: (id: string) => {
|
|
1942
|
-
way: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay;
|
|
1943
|
-
account: string;
|
|
1944
|
-
} | undefined;
|
|
1945
|
-
delUserById: (id: string) => string;
|
|
1946
|
-
getMemberState: () => boolean;
|
|
1947
|
-
getFirstBackFillData: () => import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").BackFillMultipleState | undefined;
|
|
1948
|
-
} | undefined, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
1637
|
+
export const guardEventsFilter: (props: any, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
1949
1638
|
export const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
1950
1639
|
export const GuardEventsCamelToKebabMapping: {
|
|
1951
1640
|
readonly onLoad: "load";
|
|
@@ -2237,7 +1926,6 @@ declare module '@authing/react-ui-components/components/Login/codemap' {
|
|
|
2237
1926
|
declare module '@authing/react-ui-components/components/Login/core/withAD' {
|
|
2238
1927
|
/// <reference types="react" />
|
|
2239
1928
|
import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2240
|
-
import { BackFillMultipleState, StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2241
1929
|
interface LoginWithADProps {
|
|
2242
1930
|
publicKey: string;
|
|
2243
1931
|
autoRegister?: boolean;
|
|
@@ -2245,14 +1933,6 @@ declare module '@authing/react-ui-components/components/Login/core/withAD' {
|
|
|
2245
1933
|
onLoginFailed: any;
|
|
2246
1934
|
onBeforeLogin: any;
|
|
2247
1935
|
agreements: Agreement[];
|
|
2248
|
-
/**
|
|
2249
|
-
* 回填的数据
|
|
2250
|
-
*/
|
|
2251
|
-
backfillData?: BackFillMultipleState;
|
|
2252
|
-
/**
|
|
2253
|
-
* 根据输入的账号 & 返回获得对应的登录方法
|
|
2254
|
-
*/
|
|
2255
|
-
multipleInstance?: StoreInstance;
|
|
2256
1936
|
}
|
|
2257
1937
|
export const LoginWithAD: (props: LoginWithADProps) => JSX.Element;
|
|
2258
1938
|
export {};
|
|
@@ -2260,12 +1940,10 @@ declare module '@authing/react-ui-components/components/Login/core/withAD' {
|
|
|
2260
1940
|
}
|
|
2261
1941
|
declare module '@authing/react-ui-components/components/Login/core/withAppQrcode' {
|
|
2262
1942
|
/// <reference types="react" />
|
|
2263
|
-
import { StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2264
1943
|
interface LoginWithAppQrcodeProps {
|
|
2265
1944
|
onLoginSuccess: any;
|
|
2266
1945
|
canLoop: boolean;
|
|
2267
1946
|
qrCodeScanOptions: any;
|
|
2268
|
-
multipleInstance?: StoreInstance;
|
|
2269
1947
|
}
|
|
2270
1948
|
export const LoginWithAppQrcode: (props: LoginWithAppQrcodeProps) => JSX.Element;
|
|
2271
1949
|
export {};
|
|
@@ -2274,7 +1952,6 @@ declare module '@authing/react-ui-components/components/Login/core/withAppQrcode
|
|
|
2274
1952
|
declare module '@authing/react-ui-components/components/Login/core/withLDAP' {
|
|
2275
1953
|
/// <reference types="react" />
|
|
2276
1954
|
import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2277
|
-
import { BackFillMultipleState, StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2278
1955
|
interface LoginWithLDAPProps {
|
|
2279
1956
|
publicKey: string;
|
|
2280
1957
|
autoRegister?: boolean;
|
|
@@ -2283,14 +1960,6 @@ declare module '@authing/react-ui-components/components/Login/core/withLDAP' {
|
|
|
2283
1960
|
onLoginFailed: any;
|
|
2284
1961
|
onBeforeLogin: any;
|
|
2285
1962
|
agreements: Agreement[];
|
|
2286
|
-
/**
|
|
2287
|
-
* 根据输入的账号 & 返回获得对应的登录方法
|
|
2288
|
-
*/
|
|
2289
|
-
multipleInstance?: StoreInstance;
|
|
2290
|
-
/**
|
|
2291
|
-
* 多账号回填的数据
|
|
2292
|
-
*/
|
|
2293
|
-
backfillData?: BackFillMultipleState;
|
|
2294
1963
|
}
|
|
2295
1964
|
export const LoginWithLDAP: (props: LoginWithLDAPProps) => JSX.Element;
|
|
2296
1965
|
export {};
|
|
@@ -2331,7 +2000,6 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
|
|
|
2331
2000
|
import { Agreement, PasswordLoginMethods } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2332
2001
|
import { LoginMethods } from '@authing/react-ui-components/components/index';
|
|
2333
2002
|
import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
|
|
2334
|
-
import { BackFillMultipleState, StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2335
2003
|
interface LoginWithPasswordProps {
|
|
2336
2004
|
publicKey: string;
|
|
2337
2005
|
autoRegister?: boolean;
|
|
@@ -2345,14 +2013,6 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
|
|
|
2345
2013
|
loginWay?: LoginMethods;
|
|
2346
2014
|
submitButText?: string;
|
|
2347
2015
|
saveIdentify?: (type: LoginMethods, identity: string) => void;
|
|
2348
|
-
/**
|
|
2349
|
-
* 根据输入的账号 & 返回获得对应的登录方法
|
|
2350
|
-
*/
|
|
2351
|
-
multipleInstance?: StoreInstance;
|
|
2352
|
-
/**
|
|
2353
|
-
* 多账号回填的数据
|
|
2354
|
-
*/
|
|
2355
|
-
backfillData?: BackFillMultipleState;
|
|
2356
2016
|
}
|
|
2357
2017
|
export const LoginWithPassword: (props: LoginWithPasswordProps) => JSX.Element;
|
|
2358
2018
|
export {};
|
|
@@ -2386,10 +2046,6 @@ declare module '@authing/react-ui-components/components/Login/core/withVerifyCod
|
|
|
2386
2046
|
import React, { FC } from 'react';
|
|
2387
2047
|
import './styles.less';
|
|
2388
2048
|
export interface VirtualDropdownProps {
|
|
2389
|
-
/**
|
|
2390
|
-
* 回填的国际化区号
|
|
2391
|
-
*/
|
|
2392
|
-
regionCode?: string;
|
|
2393
2049
|
value?: string;
|
|
2394
2050
|
onChange?: (value: string) => void;
|
|
2395
2051
|
style?: React.CSSProperties;
|
|
@@ -2400,8 +2056,7 @@ declare module '@authing/react-ui-components/components/Login/core/withVerifyCod
|
|
|
2400
2056
|
declare module '@authing/react-ui-components/components/Login/core/withVerifyCode/index' {
|
|
2401
2057
|
/// <reference types="react" />
|
|
2402
2058
|
import './styles.less';
|
|
2403
|
-
const LoginWithVerifyCode: (props: any) => JSX.Element;
|
|
2404
|
-
export { LoginWithVerifyCode };
|
|
2059
|
+
export const LoginWithVerifyCode: (props: any) => JSX.Element;
|
|
2405
2060
|
|
|
2406
2061
|
}
|
|
2407
2062
|
declare module '@authing/react-ui-components/components/Login/core/withVerifyCode/inputIdentify' {
|
|
@@ -2416,13 +2071,10 @@ declare module '@authing/react-ui-components/components/Login/core/withVerifyCod
|
|
|
2416
2071
|
}
|
|
2417
2072
|
declare module '@authing/react-ui-components/components/Login/core/withWechatMiniQrcode' {
|
|
2418
2073
|
/// <reference types="react" />
|
|
2419
|
-
import { StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2420
2074
|
interface LoginWithWechatMiniQrcodeProps {
|
|
2421
2075
|
onLoginSuccess: any;
|
|
2422
2076
|
canLoop: boolean;
|
|
2423
2077
|
qrCodeScanOptions: any;
|
|
2424
|
-
id: string;
|
|
2425
|
-
multipleInstance?: StoreInstance;
|
|
2426
2078
|
}
|
|
2427
2079
|
export const LoginWithWechatMiniQrcode: (props: LoginWithWechatMiniQrcodeProps) => JSX.Element;
|
|
2428
2080
|
export {};
|
|
@@ -2430,78 +2082,14 @@ declare module '@authing/react-ui-components/components/Login/core/withWechatMin
|
|
|
2430
2082
|
}
|
|
2431
2083
|
declare module '@authing/react-ui-components/components/Login/core/withWechatmpQrcode' {
|
|
2432
2084
|
/// <reference types="react" />
|
|
2433
|
-
import { StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2434
2085
|
interface LoginWithWechatmpQrcodeProps {
|
|
2435
2086
|
onLoginSuccess: any;
|
|
2436
2087
|
canLoop: boolean;
|
|
2437
2088
|
qrCodeScanOptions: any;
|
|
2438
|
-
id: string;
|
|
2439
|
-
/**
|
|
2440
|
-
* 多账号存储实例
|
|
2441
|
-
*/
|
|
2442
|
-
multipleInstance?: StoreInstance;
|
|
2443
2089
|
}
|
|
2444
2090
|
export const LoginWithWechatmpQrcode: (props: LoginWithWechatmpQrcodeProps) => JSX.Element;
|
|
2445
2091
|
export {};
|
|
2446
2092
|
|
|
2447
|
-
}
|
|
2448
|
-
declare module '@authing/react-ui-components/components/Login/hooks/useLoginMultiple' {
|
|
2449
|
-
/// <reference types="react" />
|
|
2450
|
-
import { FormInstance } from 'antd/lib/form';
|
|
2451
|
-
import { BackFillMultipleState, LoginWay } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2452
|
-
/**
|
|
2453
|
-
* 多账号登录下 账户 & 登录方式自动回填
|
|
2454
|
-
* TODO: HOOK 参数有时间整理成为对象,开始没有想到有这么多
|
|
2455
|
-
* 调用地方 core 中需要回填的两个登录方式
|
|
2456
|
-
*/
|
|
2457
|
-
function useLoginMultipleBackFill(options: {
|
|
2458
|
-
form: FormInstance<any>;
|
|
2459
|
-
way: LoginWay;
|
|
2460
|
-
formKey: string;
|
|
2461
|
-
backfillData?: BackFillMultipleState;
|
|
2462
|
-
isOnlyInternationSms?: boolean;
|
|
2463
|
-
setAreaCode?: React.Dispatch<React.SetStateAction<string>>;
|
|
2464
|
-
cancelBackfill?: boolean;
|
|
2465
|
-
}): void;
|
|
2466
|
-
/**
|
|
2467
|
-
* 多账号统一状态管理
|
|
2468
|
-
* @param setLoginWay
|
|
2469
|
-
* @returns
|
|
2470
|
-
*/
|
|
2471
|
-
function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
|
|
2472
|
-
isMultipleAccount: boolean;
|
|
2473
|
-
multipleInstance: {
|
|
2474
|
-
initStore: (appId: string, options: {
|
|
2475
|
-
serverSideLoginMethods: LoginWay[];
|
|
2476
|
-
isInternationSms: boolean;
|
|
2477
|
-
}) => void;
|
|
2478
|
-
setLoginWay: (tab: "input" | "qrcode", way: LoginWay, id?: string | undefined, internation?: {
|
|
2479
|
-
phoneCountryCode: string;
|
|
2480
|
-
areaCode: string;
|
|
2481
|
-
} | undefined) => void;
|
|
2482
|
-
setUserInfo: (user: Pick<import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").User & {
|
|
2483
|
-
id: string;
|
|
2484
|
-
}, "email" | "username" | "phone" | "id" | "nickname" | "photo" | "name" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
2485
|
-
setLoginWayByHttpData: (account: string, data: {
|
|
2486
|
-
username?: string | undefined;
|
|
2487
|
-
phone?: string | undefined;
|
|
2488
|
-
email?: string | undefined;
|
|
2489
|
-
}) => void;
|
|
2490
|
-
getMemoUser: (excludeWays?: LoginWay[]) => import("@authing/react-ui-components/components/Login/multipleAccounts/panel").SelectOptions[];
|
|
2491
|
-
getMemoSingleUser: (id: string) => {
|
|
2492
|
-
way: LoginWay;
|
|
2493
|
-
account: string;
|
|
2494
|
-
} | undefined;
|
|
2495
|
-
delUserById: (id: string) => string;
|
|
2496
|
-
getMemberState: () => boolean;
|
|
2497
|
-
getFirstBackFillData: () => BackFillMultipleState | undefined;
|
|
2498
|
-
} | undefined;
|
|
2499
|
-
referMultipleState: ((type: "login" | "multiple") => void) | undefined;
|
|
2500
|
-
backfillData: BackFillMultipleState | undefined;
|
|
2501
|
-
defaultQrWay: string | undefined;
|
|
2502
|
-
};
|
|
2503
|
-
export { useLoginMultipleBackFill, useLoginMultiple };
|
|
2504
|
-
|
|
2505
2093
|
}
|
|
2506
2094
|
declare module '@authing/react-ui-components/components/Login/index' {
|
|
2507
2095
|
/// <reference types="react" />
|
|
@@ -2550,79 +2138,6 @@ declare module '@authing/react-ui-components/components/Login/interface' {
|
|
|
2550
2138
|
}
|
|
2551
2139
|
export const getDefaultLoginConfig: () => LoginConfig;
|
|
2552
2140
|
|
|
2553
|
-
}
|
|
2554
|
-
declare module '@authing/react-ui-components/components/Login/multipleAccounts/index' {
|
|
2555
|
-
import React from 'react';
|
|
2556
|
-
import { LoginWay, StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2557
|
-
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
|
|
2558
|
-
interface MultipleAccountsProps {
|
|
2559
|
-
/**
|
|
2560
|
-
* 多账号存储实例
|
|
2561
|
-
*/
|
|
2562
|
-
multipleInstance?: StoreInstance;
|
|
2563
|
-
/**
|
|
2564
|
-
* 切换 Guard 方法
|
|
2565
|
-
*/
|
|
2566
|
-
changeModule?: (moduleName: GuardModuleType, initData?: any) => Promise<void>;
|
|
2567
|
-
/**
|
|
2568
|
-
* 切换多账号状态
|
|
2569
|
-
*/
|
|
2570
|
-
referMultipleState?: (type: 'login' | 'multiple', data?: {
|
|
2571
|
-
account: string;
|
|
2572
|
-
way: LoginWay;
|
|
2573
|
-
}) => void;
|
|
2574
|
-
}
|
|
2575
|
-
const MultipleAccounts: React.NamedExoticComponent<MultipleAccountsProps>;
|
|
2576
|
-
export { MultipleAccounts };
|
|
2577
|
-
|
|
2578
|
-
}
|
|
2579
|
-
declare module '@authing/react-ui-components/components/Login/multipleAccounts/panel' {
|
|
2580
|
-
import React from 'react';
|
|
2581
|
-
import './style.less';
|
|
2582
|
-
interface SelectPanelProps {
|
|
2583
|
-
lists: SelectOptions[];
|
|
2584
|
-
/**
|
|
2585
|
-
* 点击删除
|
|
2586
|
-
*/
|
|
2587
|
-
handleDel: (id: string) => void;
|
|
2588
|
-
/**
|
|
2589
|
-
* 点击 li
|
|
2590
|
-
*/
|
|
2591
|
-
onClick: (id: string) => void;
|
|
2592
|
-
}
|
|
2593
|
-
export interface SelectOptions {
|
|
2594
|
-
/**
|
|
2595
|
-
* 头像
|
|
2596
|
-
*/
|
|
2597
|
-
photo?: string;
|
|
2598
|
-
/**
|
|
2599
|
-
* 标题
|
|
2600
|
-
*/
|
|
2601
|
-
title?: string;
|
|
2602
|
-
/**
|
|
2603
|
-
* 描述
|
|
2604
|
-
*/
|
|
2605
|
-
description?: string;
|
|
2606
|
-
/**
|
|
2607
|
-
* 用户 ID 唯一标识符
|
|
2608
|
-
*/
|
|
2609
|
-
id: string | 'other';
|
|
2610
|
-
/**
|
|
2611
|
-
* 显示操作栏 default: true
|
|
2612
|
-
*/
|
|
2613
|
-
operation?: boolean;
|
|
2614
|
-
/**
|
|
2615
|
-
* 登录时间
|
|
2616
|
-
*/
|
|
2617
|
-
_updateTime: number;
|
|
2618
|
-
/**
|
|
2619
|
-
* 替代图片元素
|
|
2620
|
-
*/
|
|
2621
|
-
element?: React.ReactElement;
|
|
2622
|
-
}
|
|
2623
|
-
const SelectPanel: React.FC<SelectPanelProps>;
|
|
2624
|
-
export { SelectPanel };
|
|
2625
|
-
|
|
2626
2141
|
}
|
|
2627
2142
|
declare module '@authing/react-ui-components/components/Login/socialLogin/IdpButton/index' {
|
|
2628
2143
|
/// <reference types="react" />
|
|
@@ -2634,7 +2149,6 @@ declare module '@authing/react-ui-components/components/Login/socialLogin/index'
|
|
|
2634
2149
|
import { ApplicationConfig, SocialConnectionItem } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2635
2150
|
import './style.less';
|
|
2636
2151
|
import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/index';
|
|
2637
|
-
import { StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2638
2152
|
export interface SocialLoginProps {
|
|
2639
2153
|
appId: string;
|
|
2640
2154
|
config: GuardLocalConfig;
|
|
@@ -2642,10 +2156,6 @@ declare module '@authing/react-ui-components/components/Login/socialLogin/index'
|
|
|
2642
2156
|
onLoginSuccess: any;
|
|
2643
2157
|
enterpriseConnectionObjs: ApplicationConfig['identityProviders'];
|
|
2644
2158
|
socialConnectionObjs: SocialConnectionItem[];
|
|
2645
|
-
/**
|
|
2646
|
-
* 根据输入的账号 & 返回获得对应的登录方法
|
|
2647
|
-
*/
|
|
2648
|
-
multipleInstance?: StoreInstance;
|
|
2649
2159
|
}
|
|
2650
2160
|
export const SocialLogin: React.FC<SocialLoginProps>;
|
|
2651
2161
|
|
|
@@ -3341,7 +2851,10 @@ declare module '@authing/react-ui-components/components/ValidatorRules/index' {
|
|
|
3341
2851
|
checkRepeat?: boolean;
|
|
3342
2852
|
checkExist?: boolean;
|
|
3343
2853
|
areaCode?: string;
|
|
3344
|
-
|
|
2854
|
+
/**
|
|
2855
|
+
* 控制内部FormItem组件关于pattern的校验规则
|
|
2856
|
+
*/
|
|
2857
|
+
isCheckPattern?: boolean;
|
|
3345
2858
|
}
|
|
3346
2859
|
export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
|
|
3347
2860
|
method: 'email' | 'phone' | 'username';
|
|
@@ -3506,7 +3019,6 @@ declare module '@authing/react-ui-components/components/_utils/context' {
|
|
|
3506
3019
|
import React from 'react';
|
|
3507
3020
|
import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig } from '@authing/react-ui-components/components/index';
|
|
3508
3021
|
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
3509
|
-
import { BackFillMultipleState, StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
3510
3022
|
import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
|
|
3511
3023
|
import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
|
|
3512
3024
|
export interface IGuardContext {
|
|
@@ -3524,29 +3036,6 @@ declare module '@authing/react-ui-components/components/_utils/context' {
|
|
|
3524
3036
|
isAuthFlow: boolean;
|
|
3525
3037
|
contextLoaded: boolean;
|
|
3526
3038
|
guardPageConfig: Partial<GuardPageConfig>;
|
|
3527
|
-
multipleInstance: {
|
|
3528
|
-
/**
|
|
3529
|
-
* 多账号相关
|
|
3530
|
-
*/
|
|
3531
|
-
isMultipleAccount: boolean;
|
|
3532
|
-
/**
|
|
3533
|
-
* when: 多账号页面跳转进入登录页面
|
|
3534
|
-
* 携带的回填数据信息
|
|
3535
|
-
*/
|
|
3536
|
-
multipleAccountData?: BackFillMultipleState;
|
|
3537
|
-
/**
|
|
3538
|
-
* 多账号 store 实例
|
|
3539
|
-
*/
|
|
3540
|
-
instance?: StoreInstance;
|
|
3541
|
-
/**
|
|
3542
|
-
* 切换多账号 isMultipleAccount 状态
|
|
3543
|
-
*/
|
|
3544
|
-
referMultipleState?: (type: 'login' | 'multiple') => void;
|
|
3545
|
-
/**
|
|
3546
|
-
* 清空回填数据
|
|
3547
|
-
*/
|
|
3548
|
-
clearBackFillData?: () => void;
|
|
3549
|
-
};
|
|
3550
3039
|
}
|
|
3551
3040
|
export const createGuardXContext: () => {
|
|
3552
3041
|
Provider: React.FC<{
|
|
@@ -3584,60 +3073,6 @@ declare module '@authing/react-ui-components/components/_utils/context' {
|
|
|
3584
3073
|
export const useGuardContextLoaded: () => boolean;
|
|
3585
3074
|
export const useGuardIsAuthFlow: () => boolean;
|
|
3586
3075
|
export const useGuardPageConfig: () => Partial<GuardPageConfig>;
|
|
3587
|
-
/**
|
|
3588
|
-
* 多账号登录 store 实例
|
|
3589
|
-
*/
|
|
3590
|
-
export const useGuardMultipleInstance: () => {
|
|
3591
|
-
/**
|
|
3592
|
-
* 多账号相关
|
|
3593
|
-
*/
|
|
3594
|
-
isMultipleAccount: boolean;
|
|
3595
|
-
/**
|
|
3596
|
-
* when: 多账号页面跳转进入登录页面
|
|
3597
|
-
* 携带的回填数据信息
|
|
3598
|
-
*/
|
|
3599
|
-
multipleAccountData?: BackFillMultipleState | undefined;
|
|
3600
|
-
/**
|
|
3601
|
-
* 多账号 store 实例
|
|
3602
|
-
*/
|
|
3603
|
-
instance?: {
|
|
3604
|
-
initStore: (appId: string, options: {
|
|
3605
|
-
serverSideLoginMethods: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay[];
|
|
3606
|
-
isInternationSms: boolean;
|
|
3607
|
-
}) => void;
|
|
3608
|
-
setLoginWay: (tab: "input" | "qrcode", way: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay, id?: string | undefined, internation?: {
|
|
3609
|
-
phoneCountryCode: string;
|
|
3610
|
-
areaCode: string;
|
|
3611
|
-
} | undefined) => void;
|
|
3612
|
-
setUserInfo: (user: Pick<import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").User & {
|
|
3613
|
-
id: string;
|
|
3614
|
-
}, "email" | "username" | "phone" | "id" | "nickname" | "photo" | "name" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
3615
|
-
setLoginWayByHttpData: (account: string, data: {
|
|
3616
|
-
username?: string | undefined;
|
|
3617
|
-
phone?: string | undefined;
|
|
3618
|
-
email?: string | undefined;
|
|
3619
|
-
}) => void;
|
|
3620
|
-
getMemoUser: (excludeWays?: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay[]) => import("../Login/multipleAccounts/panel").SelectOptions[];
|
|
3621
|
-
getMemoSingleUser: (id: string) => {
|
|
3622
|
-
way: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay;
|
|
3623
|
-
account: string;
|
|
3624
|
-
} | undefined;
|
|
3625
|
-
delUserById: (id: string) => string;
|
|
3626
|
-
getMemberState: () => boolean;
|
|
3627
|
-
getFirstBackFillData: () => BackFillMultipleState | undefined;
|
|
3628
|
-
} | undefined;
|
|
3629
|
-
/**
|
|
3630
|
-
* 切换多账号 isMultipleAccount 状态
|
|
3631
|
-
*/
|
|
3632
|
-
referMultipleState?: ((type: 'login' | 'multiple') => void) | undefined;
|
|
3633
|
-
/**
|
|
3634
|
-
* 清空回填数据
|
|
3635
|
-
*/
|
|
3636
|
-
clearBackFillData?: (() => void) | undefined;
|
|
3637
|
-
};
|
|
3638
|
-
/**
|
|
3639
|
-
* 登录页面状态
|
|
3640
|
-
// */
|
|
3641
3076
|
|
|
3642
3077
|
}
|
|
3643
3078
|
declare module '@authing/react-ui-components/components/_utils/corsVerification' {
|
|
@@ -3778,7 +3213,7 @@ declare module '@authing/react-ui-components/components/_utils/http' {
|
|
|
3778
3213
|
import { AxiosRequestConfig } from 'axios';
|
|
3779
3214
|
export const requestClient: {
|
|
3780
3215
|
(input: RequestInfo, init?: RequestInit | undefined): Promise<any>;
|
|
3781
|
-
get<T>(path: string, query?: Record<string, any>, init?: AxiosRequestConfig
|
|
3216
|
+
get<T>(path: string, query?: Record<string, any>, init?: AxiosRequestConfig | undefined): Promise<AuthingResponse<T>>;
|
|
3782
3217
|
post<T_1>(path: string, data: any, config?: {
|
|
3783
3218
|
headers: any;
|
|
3784
3219
|
} | undefined): Promise<AuthingResponse<T_1>>;
|
|
@@ -4102,7 +3537,7 @@ declare module '@authing/react-ui-components/components/version/index' {
|
|
|
4102
3537
|
|
|
4103
3538
|
}
|
|
4104
3539
|
declare module '@authing/react-ui-components/components/version/version' {
|
|
4105
|
-
const _default: "3.1.31-rc.
|
|
3540
|
+
const _default: "3.1.31-rc.4";
|
|
4106
3541
|
export default _default;
|
|
4107
3542
|
|
|
4108
3543
|
}
|