@authing/react-ui-components 4.0.0-rc.2 → 4.0.0-rc.3

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.
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig } from '..';
3
+ import { BackFillMultipleState, StoreInstance } from '../Guard/core/hooks/useMultipleAccounts';
3
4
  import { ModuleState } from '../Guard/GuardModule/stateMachine';
4
5
  import { ApplicationConfig } from '../Type/application';
5
6
  import { GuardHttp } from './guardHttp';
@@ -18,6 +19,29 @@ export interface IGuardContext {
18
19
  isAuthFlow: boolean;
19
20
  contextLoaded: boolean;
20
21
  guardPageConfig: Partial<GuardPageConfig>;
22
+ multipleInstance: {
23
+ /**
24
+ * 多账号相关
25
+ */
26
+ isMultipleAccount: boolean;
27
+ /**
28
+ * when: 多账号页面跳转进入登录页面
29
+ * 携带的回填数据信息
30
+ */
31
+ multipleAccountData?: BackFillMultipleState;
32
+ /**
33
+ * 多账号 store 实例
34
+ */
35
+ instance?: StoreInstance;
36
+ /**
37
+ * 切换多账号 isMultipleAccount 状态
38
+ */
39
+ referMultipleState?: (type: 'login' | 'multiple') => void;
40
+ /**
41
+ * 清空回填数据
42
+ */
43
+ clearBackFillData?: () => void;
44
+ };
21
45
  }
22
46
  export declare const createGuardXContext: () => {
23
47
  Provider: React.FC<{
@@ -55,3 +79,61 @@ export declare const useGuardFinallyConfig: () => GuardLocalConfig;
55
79
  export declare const useGuardContextLoaded: () => boolean;
56
80
  export declare const useGuardIsAuthFlow: () => boolean;
57
81
  export declare const useGuardPageConfig: () => Partial<GuardPageConfig>;
82
+ /**
83
+ * 多账号登录 store 实例
84
+ */
85
+ export declare const useGuardMultipleInstance: () => {
86
+ /**
87
+ * 多账号相关
88
+ */
89
+ isMultipleAccount: boolean;
90
+ /**
91
+ * when: 多账号页面跳转进入登录页面
92
+ * 携带的回填数据信息
93
+ */
94
+ multipleAccountData?: BackFillMultipleState | undefined;
95
+ /**
96
+ * 多账号 store 实例
97
+ */
98
+ instance?: {
99
+ initStore: (appId: string, options: {
100
+ serverSideLoginMethods: import("../Guard/core/hooks/useMultipleAccounts").LoginWay[];
101
+ isInternationSms: boolean;
102
+ }) => void;
103
+ setLoginWay: (tab: "input" | "qrcode", way: import("../Guard/core/hooks/useMultipleAccounts").LoginWay, id?: string | undefined, internation?: {
104
+ phoneCountryCode: string;
105
+ areaCode: string;
106
+ } | undefined) => void;
107
+ setUserInfo: (user: Pick<import("../Guard/core/hooks/useMultipleAccounts").User & {
108
+ id: string;
109
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
110
+ setLoginWayByHttpData: (account: string, data: {
111
+ username?: string | undefined;
112
+ phone?: string | undefined;
113
+ email?: string | undefined;
114
+ }) => void;
115
+ setLoginWayByLDAPData: (account: string, data: {
116
+ name?: string | undefined;
117
+ phone?: string | undefined;
118
+ email?: string | undefined;
119
+ }) => void;
120
+ getMemoUser: (excludeWays?: import("../Guard/core/hooks/useMultipleAccounts").LoginWay[]) => import("../Login/multipleAccounts/panel").SelectOptions[];
121
+ getMemoSingleUser: (id: string) => {
122
+ way: import("../Guard/core/hooks/useMultipleAccounts").LoginWay;
123
+ account: string;
124
+ } | undefined;
125
+ delUserById: (id: string) => string;
126
+ getMemberState: () => boolean;
127
+ getFirstBackFillData: () => BackFillMultipleState | undefined;
128
+ getOriginAccount: () => string;
129
+ getOriginWay: () => string;
130
+ } | undefined;
131
+ /**
132
+ * 切换多账号 isMultipleAccount 状态
133
+ */
134
+ referMultipleState?: ((type: 'login' | 'multiple') => void) | undefined;
135
+ /**
136
+ * 清空回填数据
137
+ */
138
+ clearBackFillData?: (() => void) | undefined;
139
+ };
@@ -1,2 +1,2 @@
1
- declare const _default: "4.0.0-rc.2";
1
+ declare const _default: "4.0.0-rc.3";
2
2
  export default _default;