@authing/react-ui-components 4.0.9-tn.2 → 4.0.9-tn.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/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import { BackFillMultipleState, StoreInstance } from '../Guard/core/hooks/useMul
|
|
|
4
4
|
import { ModuleState } from '../Guard/GuardModule/stateMachine';
|
|
5
5
|
import { ApplicationConfig } from '../Type/application';
|
|
6
6
|
import { GuardHttp } from './guardHttp';
|
|
7
|
+
import { MultipleTenant } from './tenant';
|
|
7
8
|
export interface IGuardContext {
|
|
8
9
|
finallyConfig: GuardLocalConfig;
|
|
9
10
|
defaultMergedConfig: GuardLocalConfig;
|
|
@@ -42,6 +43,8 @@ export interface IGuardContext {
|
|
|
42
43
|
*/
|
|
43
44
|
clearBackFillData?: () => void;
|
|
44
45
|
};
|
|
46
|
+
/** 租户信息获取和操作处理相关 */
|
|
47
|
+
tenantInstance?: MultipleTenant;
|
|
45
48
|
}
|
|
46
49
|
export declare const createGuardXContext: () => {
|
|
47
50
|
Provider: React.FC<{
|
|
@@ -137,3 +140,5 @@ export declare const useGuardMultipleInstance: () => {
|
|
|
137
140
|
*/
|
|
138
141
|
clearBackFillData?: (() => void) | undefined;
|
|
139
142
|
};
|
|
143
|
+
/** 用来操作和获取租户相关的内容 */
|
|
144
|
+
export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ApplicationConfig } from '../Type';
|
|
2
|
+
/** **当前租户应用** 下的租户信息获取和操作处理,将租户相关的处理收拢 */
|
|
3
|
+
export declare class MultipleTenant {
|
|
4
|
+
private $config;
|
|
5
|
+
private $tenantId;
|
|
6
|
+
constructor(tenantId: string, config: ApplicationConfig);
|
|
7
|
+
/** 获取租户ID */
|
|
8
|
+
getCurrentTenantId: () => string | null;
|
|
9
|
+
/** 获取租户详情 */
|
|
10
|
+
getCurrentTenantInfo: () => Record<string, any> | undefined;
|
|
11
|
+
/**是否为【租户控制台】 */
|
|
12
|
+
isTenantConsole: () => boolean | undefined;
|
|
13
|
+
/** 是否为租户【单点登录】 */
|
|
14
|
+
isTenantSSO: () => boolean | undefined;
|
|
15
|
+
/** 是否为租户【单点登录面板】 */
|
|
16
|
+
isTenantSSOLaunchPad: () => boolean | undefined;
|
|
17
|
+
}
|
|
18
|
+
/** 初始化多租户实例 */
|
|
19
|
+
export declare const useMultipleTenant: (tenantId: string, publicConfig: ApplicationConfig) => MultipleTenant | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.0.9-tn.
|
|
1
|
+
declare const _default: "4.0.9-tn.4";
|
|
2
2
|
export default _default;
|