@abpjs/account 2.1.0 → 2.4.0
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.
|
@@ -24,6 +24,18 @@ export interface AuthWrapperProps {
|
|
|
24
24
|
* @default true (from ABP settings or if not configured)
|
|
25
25
|
*/
|
|
26
26
|
enableLocalLogin?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether multi-tenancy is enabled.
|
|
29
|
+
* When true, the tenant box will be displayed (if rendered).
|
|
30
|
+
* This corresponds to Angular's isMultiTenancyEnabled$ observable.
|
|
31
|
+
*
|
|
32
|
+
* In ABP, this is read from ConfigState.getDeep('multiTenancy.isEnabled').
|
|
33
|
+
* This prop allows overriding the default behavior.
|
|
34
|
+
*
|
|
35
|
+
* @since 2.4.0
|
|
36
|
+
* @default true (multi-tenancy enabled by default)
|
|
37
|
+
*/
|
|
38
|
+
isMultiTenancyEnabled?: boolean;
|
|
27
39
|
}
|
|
28
40
|
/**
|
|
29
41
|
* AuthWrapper - Authentication wrapper component
|
|
@@ -37,14 +49,16 @@ export interface AuthWrapperProps {
|
|
|
37
49
|
*
|
|
38
50
|
* @since 1.1.0
|
|
39
51
|
* @since 2.0.0 - Added enableLocalLogin prop to control local login visibility
|
|
52
|
+
* @since 2.4.0 - Added isMultiTenancyEnabled prop (equivalent to Angular's isMultiTenancyEnabled$)
|
|
40
53
|
*
|
|
41
54
|
* @example
|
|
42
55
|
* ```tsx
|
|
43
56
|
* <AuthWrapper
|
|
44
57
|
* mainContent={<LoginForm />}
|
|
45
58
|
* cancelContent={<Link to="/register">Create account</Link>}
|
|
59
|
+
* isMultiTenancyEnabled={true}
|
|
46
60
|
* />
|
|
47
61
|
* ```
|
|
48
62
|
*/
|
|
49
|
-
export declare function AuthWrapper({ children, mainContent, cancelContent, enableLocalLogin, }: AuthWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export declare function AuthWrapper({ children, mainContent, cancelContent, enableLocalLogin, isMultiTenancyEnabled, }: AuthWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
50
64
|
export default AuthWrapper;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @abpjs/account
|
|
3
3
|
* ABP Framework Account module for React
|
|
4
|
-
* Translated from @abp/ng.account v2.
|
|
4
|
+
* Translated from @abp/ng.account v2.4.0
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Changes in v2.4.0:
|
|
7
|
+
* - AuthWrapperComponent: Added isMultiTenancyEnabled prop (equivalent to Angular's isMultiTenancyEnabled$)
|
|
8
|
+
* - AccountService: Added apiName property for REST API configuration
|
|
9
|
+
* - Dependency updates to @abp/ng.theme.shared v2.4.0 and @abp/ng.account.config v2.4.0
|
|
10
|
+
*
|
|
11
|
+
* Changes in v2.2.0:
|
|
12
|
+
* - Dependency updates to @abp/ng.theme.shared v2.2.0 and @abp/ng.account.config v2.2.0
|
|
13
|
+
* - No functional code changes
|
|
14
|
+
*
|
|
15
|
+
* @version 2.4.0
|
|
7
16
|
* @since 2.0.0 - Added Account namespace with component interface types
|
|
8
17
|
* @since 2.0.0 - Added isSelfRegistrationEnabled support in Login/Register components
|
|
9
18
|
* @since 2.0.0 - Added enableLocalLogin support in AuthWrapper component
|
|
10
19
|
* @since 2.0.0 - Removed deprecated ACCOUNT_ROUTES (use AccountProvider instead)
|
|
11
20
|
* @since 2.0.0 - TenantBoxComponent and AccountService now publicly exported
|
|
12
21
|
* @since 2.1.0 - Version bump only (dependency updates to @abp/ng.theme.shared v2.1.0)
|
|
22
|
+
* @since 2.4.0 - AuthWrapper: isMultiTenancyEnabled prop; AccountService: apiName property
|
|
13
23
|
*/
|
|
14
24
|
export * from './models';
|
|
15
25
|
export * from './services';
|
package/dist/index.js
CHANGED
|
@@ -45,6 +45,13 @@ module.exports = __toCommonJS(index_exports);
|
|
|
45
45
|
var AccountService = class {
|
|
46
46
|
constructor(rest) {
|
|
47
47
|
this.rest = rest;
|
|
48
|
+
/**
|
|
49
|
+
* The API name used for REST requests.
|
|
50
|
+
* This corresponds to the key in the environment.apis configuration.
|
|
51
|
+
*
|
|
52
|
+
* @since 2.4.0
|
|
53
|
+
*/
|
|
54
|
+
this.apiName = "default";
|
|
48
55
|
}
|
|
49
56
|
/**
|
|
50
57
|
* Find a tenant by name
|
|
@@ -238,7 +245,8 @@ function AuthWrapper({
|
|
|
238
245
|
children,
|
|
239
246
|
mainContent,
|
|
240
247
|
cancelContent,
|
|
241
|
-
enableLocalLogin
|
|
248
|
+
enableLocalLogin,
|
|
249
|
+
isMultiTenancyEnabled = true
|
|
242
250
|
}) {
|
|
243
251
|
const { t } = (0, import_core4.useLocalization)();
|
|
244
252
|
const localLoginSetting = (0, import_core4.useSetting)(ENABLE_LOCAL_LOGIN_SETTING);
|
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
var AccountService = class {
|
|
3
3
|
constructor(rest) {
|
|
4
4
|
this.rest = rest;
|
|
5
|
+
/**
|
|
6
|
+
* The API name used for REST requests.
|
|
7
|
+
* This corresponds to the key in the environment.apis configuration.
|
|
8
|
+
*
|
|
9
|
+
* @since 2.4.0
|
|
10
|
+
*/
|
|
11
|
+
this.apiName = "default";
|
|
5
12
|
}
|
|
6
13
|
/**
|
|
7
14
|
* Find a tenant by name
|
|
@@ -195,7 +202,8 @@ function AuthWrapper({
|
|
|
195
202
|
children,
|
|
196
203
|
mainContent,
|
|
197
204
|
cancelContent,
|
|
198
|
-
enableLocalLogin
|
|
205
|
+
enableLocalLogin,
|
|
206
|
+
isMultiTenancyEnabled = true
|
|
199
207
|
}) {
|
|
200
208
|
const { t } = useLocalization();
|
|
201
209
|
const localLoginSetting = useSetting2(ENABLE_LOCAL_LOGIN_SETTING);
|
|
@@ -7,9 +7,17 @@ import type { RegisterRequest, RegisterResponse, TenantIdResponse } from '../mod
|
|
|
7
7
|
* Provides methods for tenant lookup and user registration.
|
|
8
8
|
*
|
|
9
9
|
* @since 0.9.0
|
|
10
|
+
* @since 2.4.0 - Added apiName property
|
|
10
11
|
*/
|
|
11
12
|
export declare class AccountService {
|
|
12
13
|
private rest;
|
|
14
|
+
/**
|
|
15
|
+
* The API name used for REST requests.
|
|
16
|
+
* This corresponds to the key in the environment.apis configuration.
|
|
17
|
+
*
|
|
18
|
+
* @since 2.4.0
|
|
19
|
+
*/
|
|
20
|
+
apiName: string;
|
|
13
21
|
constructor(rest: RestService);
|
|
14
22
|
/**
|
|
15
23
|
* Find a tenant by name
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abpjs/account",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "ABP Framework Account module for React - Translation of @abp/ng.account",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"react-redux": "^9.0.0",
|
|
54
54
|
"zod": "^3.22.0",
|
|
55
55
|
"react-icons": "^5.0.0",
|
|
56
|
-
"@abpjs/core": "2.
|
|
57
|
-
"@abpjs/theme-shared": "2.
|
|
56
|
+
"@abpjs/core": "2.4.0",
|
|
57
|
+
"@abpjs/theme-shared": "2.4.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@abp/ng.account": "2.
|
|
60
|
+
"@abp/ng.account": "2.4.0",
|
|
61
61
|
"@reduxjs/toolkit": "^2.0.0",
|
|
62
62
|
"@testing-library/jest-dom": "^6.4.0",
|
|
63
63
|
"@testing-library/react": "^14.2.0",
|