@abpjs/identity 0.7.6 → 0.9.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.
- package/dist/index.d.mts +11 -6
- package/dist/index.d.ts +11 -6
- package/dist/index.js +38 -34
- package/dist/index.mjs +38 -34
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -82,10 +82,11 @@ declare class IdentityService {
|
|
|
82
82
|
private rest;
|
|
83
83
|
constructor(rest: RestService);
|
|
84
84
|
/**
|
|
85
|
-
* Get all roles
|
|
85
|
+
* Get all roles with optional pagination/filtering (v0.9.0)
|
|
86
|
+
* @param params - Optional query parameters for pagination and filtering
|
|
86
87
|
* @returns Promise with paginated role response
|
|
87
88
|
*/
|
|
88
|
-
getRoles(): Promise<Identity.RoleResponse>;
|
|
89
|
+
getRoles(params?: ABP.PageQueryParams): Promise<Identity.RoleResponse>;
|
|
89
90
|
/**
|
|
90
91
|
* Get a role by ID
|
|
91
92
|
* @param id - The role ID
|
|
@@ -171,8 +172,8 @@ interface UseRolesReturn {
|
|
|
171
172
|
isLoading: boolean;
|
|
172
173
|
/** Error message if any */
|
|
173
174
|
error: string | null;
|
|
174
|
-
/** Fetch all roles */
|
|
175
|
-
fetchRoles: () => Promise<RoleOperationResult>;
|
|
175
|
+
/** Fetch all roles with optional pagination/filtering (v0.9.0) */
|
|
176
|
+
fetchRoles: (params?: ABP.PageQueryParams) => Promise<RoleOperationResult>;
|
|
176
177
|
/** Get a role by ID and set it as selected */
|
|
177
178
|
getRoleById: (id: string) => Promise<RoleOperationResult>;
|
|
178
179
|
/** Create a new role */
|
|
@@ -419,13 +420,17 @@ interface UsersComponentProps {
|
|
|
419
420
|
declare function UsersComponent({ onUserCreated, onUserUpdated, onUserDeleted, }: UsersComponentProps): React.ReactElement;
|
|
420
421
|
|
|
421
422
|
/**
|
|
422
|
-
* Identity module routes configuration.
|
|
423
|
+
* Identity module routes configuration (v0.9.0 format).
|
|
423
424
|
* Translated from @abp/ng.identity IDENTITY_ROUTES.
|
|
424
425
|
*
|
|
425
426
|
* These routes define the navigation structure for the identity module
|
|
426
427
|
* within the ABP Framework application.
|
|
428
|
+
*
|
|
429
|
+
* In v0.9.0, the format changed from `ABP.FullRoute[]` to `{ routes: ABP.FullRoute[] }`
|
|
427
430
|
*/
|
|
428
|
-
declare const IDENTITY_ROUTES:
|
|
431
|
+
declare const IDENTITY_ROUTES: {
|
|
432
|
+
routes: ABP.FullRoute[];
|
|
433
|
+
};
|
|
429
434
|
/**
|
|
430
435
|
* Route paths for the identity module.
|
|
431
436
|
* Use these constants for programmatic navigation.
|
package/dist/index.d.ts
CHANGED
|
@@ -82,10 +82,11 @@ declare class IdentityService {
|
|
|
82
82
|
private rest;
|
|
83
83
|
constructor(rest: RestService);
|
|
84
84
|
/**
|
|
85
|
-
* Get all roles
|
|
85
|
+
* Get all roles with optional pagination/filtering (v0.9.0)
|
|
86
|
+
* @param params - Optional query parameters for pagination and filtering
|
|
86
87
|
* @returns Promise with paginated role response
|
|
87
88
|
*/
|
|
88
|
-
getRoles(): Promise<Identity.RoleResponse>;
|
|
89
|
+
getRoles(params?: ABP.PageQueryParams): Promise<Identity.RoleResponse>;
|
|
89
90
|
/**
|
|
90
91
|
* Get a role by ID
|
|
91
92
|
* @param id - The role ID
|
|
@@ -171,8 +172,8 @@ interface UseRolesReturn {
|
|
|
171
172
|
isLoading: boolean;
|
|
172
173
|
/** Error message if any */
|
|
173
174
|
error: string | null;
|
|
174
|
-
/** Fetch all roles */
|
|
175
|
-
fetchRoles: () => Promise<RoleOperationResult>;
|
|
175
|
+
/** Fetch all roles with optional pagination/filtering (v0.9.0) */
|
|
176
|
+
fetchRoles: (params?: ABP.PageQueryParams) => Promise<RoleOperationResult>;
|
|
176
177
|
/** Get a role by ID and set it as selected */
|
|
177
178
|
getRoleById: (id: string) => Promise<RoleOperationResult>;
|
|
178
179
|
/** Create a new role */
|
|
@@ -419,13 +420,17 @@ interface UsersComponentProps {
|
|
|
419
420
|
declare function UsersComponent({ onUserCreated, onUserUpdated, onUserDeleted, }: UsersComponentProps): React.ReactElement;
|
|
420
421
|
|
|
421
422
|
/**
|
|
422
|
-
* Identity module routes configuration.
|
|
423
|
+
* Identity module routes configuration (v0.9.0 format).
|
|
423
424
|
* Translated from @abp/ng.identity IDENTITY_ROUTES.
|
|
424
425
|
*
|
|
425
426
|
* These routes define the navigation structure for the identity module
|
|
426
427
|
* within the ABP Framework application.
|
|
428
|
+
*
|
|
429
|
+
* In v0.9.0, the format changed from `ABP.FullRoute[]` to `{ routes: ABP.FullRoute[] }`
|
|
427
430
|
*/
|
|
428
|
-
declare const IDENTITY_ROUTES:
|
|
431
|
+
declare const IDENTITY_ROUTES: {
|
|
432
|
+
routes: ABP.FullRoute[];
|
|
433
|
+
};
|
|
429
434
|
/**
|
|
430
435
|
* Route paths for the identity module.
|
|
431
436
|
* Use these constants for programmatic navigation.
|
package/dist/index.js
CHANGED
|
@@ -41,13 +41,15 @@ var IdentityService = class {
|
|
|
41
41
|
// Role Operations
|
|
42
42
|
// ========================
|
|
43
43
|
/**
|
|
44
|
-
* Get all roles
|
|
44
|
+
* Get all roles with optional pagination/filtering (v0.9.0)
|
|
45
|
+
* @param params - Optional query parameters for pagination and filtering
|
|
45
46
|
* @returns Promise with paginated role response
|
|
46
47
|
*/
|
|
47
|
-
getRoles() {
|
|
48
|
+
getRoles(params = {}) {
|
|
48
49
|
return this.rest.request({
|
|
49
50
|
method: "GET",
|
|
50
|
-
url: "/api/identity/roles"
|
|
51
|
+
url: "/api/identity/roles",
|
|
52
|
+
params
|
|
51
53
|
});
|
|
52
54
|
}
|
|
53
55
|
/**
|
|
@@ -183,11 +185,11 @@ function useRoles() {
|
|
|
183
185
|
const [selectedRole, setSelectedRole] = (0, import_react.useState)(null);
|
|
184
186
|
const [isLoading, setIsLoading] = (0, import_react.useState)(false);
|
|
185
187
|
const [error, setError] = (0, import_react.useState)(null);
|
|
186
|
-
const fetchRoles = (0, import_react.useCallback)(async () => {
|
|
188
|
+
const fetchRoles = (0, import_react.useCallback)(async (params) => {
|
|
187
189
|
setIsLoading(true);
|
|
188
190
|
setError(null);
|
|
189
191
|
try {
|
|
190
|
-
const response = await service.getRoles();
|
|
192
|
+
const response = await service.getRoles(params);
|
|
191
193
|
setRoles(response.items || []);
|
|
192
194
|
setTotalCount(response.totalCount || 0);
|
|
193
195
|
setIsLoading(false);
|
|
@@ -1092,35 +1094,37 @@ function UsersComponent({
|
|
|
1092
1094
|
|
|
1093
1095
|
// src/constants/routes.ts
|
|
1094
1096
|
var import_core5 = require("@abpjs/core");
|
|
1095
|
-
var IDENTITY_ROUTES =
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1097
|
+
var IDENTITY_ROUTES = {
|
|
1098
|
+
routes: [
|
|
1099
|
+
{
|
|
1100
|
+
name: "AbpUiNavigation::Menu:Administration",
|
|
1101
|
+
path: "",
|
|
1102
|
+
order: 1,
|
|
1103
|
+
wrapper: true
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
name: "AbpIdentity::Menu:IdentityManagement",
|
|
1107
|
+
path: "identity",
|
|
1108
|
+
order: 1,
|
|
1109
|
+
parentName: "AbpUiNavigation::Menu:Administration",
|
|
1110
|
+
layout: import_core5.eLayoutType.application,
|
|
1111
|
+
children: [
|
|
1112
|
+
{
|
|
1113
|
+
path: "roles",
|
|
1114
|
+
name: "AbpIdentity::Roles",
|
|
1115
|
+
order: 2,
|
|
1116
|
+
requiredPolicy: "AbpIdentity.Roles"
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
path: "users",
|
|
1120
|
+
name: "AbpIdentity::Users",
|
|
1121
|
+
order: 1,
|
|
1122
|
+
requiredPolicy: "AbpIdentity.Users"
|
|
1123
|
+
}
|
|
1124
|
+
]
|
|
1125
|
+
}
|
|
1126
|
+
]
|
|
1127
|
+
};
|
|
1124
1128
|
var IDENTITY_ROUTE_PATHS = {
|
|
1125
1129
|
/** Base path for identity module */
|
|
1126
1130
|
BASE: "/identity",
|
package/dist/index.mjs
CHANGED
|
@@ -7,13 +7,15 @@ var IdentityService = class {
|
|
|
7
7
|
// Role Operations
|
|
8
8
|
// ========================
|
|
9
9
|
/**
|
|
10
|
-
* Get all roles
|
|
10
|
+
* Get all roles with optional pagination/filtering (v0.9.0)
|
|
11
|
+
* @param params - Optional query parameters for pagination and filtering
|
|
11
12
|
* @returns Promise with paginated role response
|
|
12
13
|
*/
|
|
13
|
-
getRoles() {
|
|
14
|
+
getRoles(params = {}) {
|
|
14
15
|
return this.rest.request({
|
|
15
16
|
method: "GET",
|
|
16
|
-
url: "/api/identity/roles"
|
|
17
|
+
url: "/api/identity/roles",
|
|
18
|
+
params
|
|
17
19
|
});
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
@@ -149,11 +151,11 @@ function useRoles() {
|
|
|
149
151
|
const [selectedRole, setSelectedRole] = useState(null);
|
|
150
152
|
const [isLoading, setIsLoading] = useState(false);
|
|
151
153
|
const [error, setError] = useState(null);
|
|
152
|
-
const fetchRoles = useCallback(async () => {
|
|
154
|
+
const fetchRoles = useCallback(async (params) => {
|
|
153
155
|
setIsLoading(true);
|
|
154
156
|
setError(null);
|
|
155
157
|
try {
|
|
156
|
-
const response = await service.getRoles();
|
|
158
|
+
const response = await service.getRoles(params);
|
|
157
159
|
setRoles(response.items || []);
|
|
158
160
|
setTotalCount(response.totalCount || 0);
|
|
159
161
|
setIsLoading(false);
|
|
@@ -1078,35 +1080,37 @@ function UsersComponent({
|
|
|
1078
1080
|
|
|
1079
1081
|
// src/constants/routes.ts
|
|
1080
1082
|
import { eLayoutType } from "@abpjs/core";
|
|
1081
|
-
var IDENTITY_ROUTES =
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1083
|
+
var IDENTITY_ROUTES = {
|
|
1084
|
+
routes: [
|
|
1085
|
+
{
|
|
1086
|
+
name: "AbpUiNavigation::Menu:Administration",
|
|
1087
|
+
path: "",
|
|
1088
|
+
order: 1,
|
|
1089
|
+
wrapper: true
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
name: "AbpIdentity::Menu:IdentityManagement",
|
|
1093
|
+
path: "identity",
|
|
1094
|
+
order: 1,
|
|
1095
|
+
parentName: "AbpUiNavigation::Menu:Administration",
|
|
1096
|
+
layout: eLayoutType.application,
|
|
1097
|
+
children: [
|
|
1098
|
+
{
|
|
1099
|
+
path: "roles",
|
|
1100
|
+
name: "AbpIdentity::Roles",
|
|
1101
|
+
order: 2,
|
|
1102
|
+
requiredPolicy: "AbpIdentity.Roles"
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
path: "users",
|
|
1106
|
+
name: "AbpIdentity::Users",
|
|
1107
|
+
order: 1,
|
|
1108
|
+
requiredPolicy: "AbpIdentity.Users"
|
|
1109
|
+
}
|
|
1110
|
+
]
|
|
1111
|
+
}
|
|
1112
|
+
]
|
|
1113
|
+
};
|
|
1110
1114
|
var IDENTITY_ROUTE_PATHS = {
|
|
1111
1115
|
/** Base path for identity module */
|
|
1112
1116
|
BASE: "/identity",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abpjs/identity",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "ABP Framework identity components for React - translated from @abp/ng.identity",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@chakra-ui/react": "^3.2.0",
|
|
27
27
|
"@emotion/react": "^11.11.0",
|
|
28
|
-
"@abpjs/core": "0.
|
|
29
|
-
"@abpjs/
|
|
30
|
-
"@abpjs/
|
|
28
|
+
"@abpjs/core": "0.9.0",
|
|
29
|
+
"@abpjs/permission-management": "0.9.0",
|
|
30
|
+
"@abpjs/theme-shared": "0.9.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@abp/ng.identity": "0.
|
|
33
|
+
"@abp/ng.identity": "0.9.0",
|
|
34
34
|
"@testing-library/jest-dom": "^6.9.1",
|
|
35
35
|
"@testing-library/react": "^14.0.0",
|
|
36
36
|
"@testing-library/user-event": "^14.6.1",
|