@abpjs/identity 2.4.0 → 2.7.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 CHANGED
@@ -1,6 +1,56 @@
1
1
  import { ABP, RestService } from '@abpjs/core';
2
2
  import React from 'react';
3
3
 
4
+ /**
5
+ * Component keys for the Identity module.
6
+ * These keys are used for component replacement/customization.
7
+ * @since 2.7.0
8
+ */
9
+ declare const eIdentityComponents: {
10
+ /**
11
+ * Key for the Roles component.
12
+ * Use this to replace the default RolesComponent with a custom implementation.
13
+ */
14
+ readonly Roles: "Identity.RolesComponent";
15
+ /**
16
+ * Key for the Users component.
17
+ * Use this to replace the default UsersComponent with a custom implementation.
18
+ */
19
+ readonly Users: "Identity.UsersComponent";
20
+ };
21
+ /**
22
+ * Type for identity component key values
23
+ */
24
+ type IdentityComponentKey = (typeof eIdentityComponents)[keyof typeof eIdentityComponents];
25
+
26
+ /**
27
+ * Route names for the Identity module.
28
+ * These are used for navigation menu items and breadcrumbs.
29
+ * @since 2.7.0
30
+ */
31
+ declare const eIdentityRouteNames: {
32
+ /**
33
+ * Administration menu item name.
34
+ */
35
+ readonly Administration: "AbpUiNavigation::Menu:Administration";
36
+ /**
37
+ * Identity Management menu item name.
38
+ */
39
+ readonly IdentityManagement: "AbpIdentity::Menu:IdentityManagement";
40
+ /**
41
+ * Roles menu item name.
42
+ */
43
+ readonly Roles: "AbpIdentity::Roles";
44
+ /**
45
+ * Users menu item name.
46
+ */
47
+ readonly Users: "AbpIdentity::Users";
48
+ };
49
+ /**
50
+ * Type for identity route name values
51
+ */
52
+ type IdentityRouteNameKey = (typeof eIdentityRouteNames)[keyof typeof eIdentityRouteNames];
53
+
4
54
  /**
5
55
  * Identity namespace containing all types related to identity management.
6
56
  * Translated from @abp/ng.identity Identity namespace.
@@ -581,6 +631,9 @@ interface RolesComponentProps {
581
631
  * ```
582
632
  */
583
633
  declare function RolesComponent({ onRoleCreated, onRoleUpdated, onRoleDeleted, onVisiblePermissionChange, }: RolesComponentProps): React.ReactElement;
634
+ declare namespace RolesComponent {
635
+ var componentKey: "Identity.RolesComponent";
636
+ }
584
637
 
585
638
  /**
586
639
  * Password rule type for validation display
@@ -614,6 +667,9 @@ interface UsersComponentProps {
614
667
  onVisiblePermissionChange?: (visible: boolean) => void;
615
668
  }
616
669
  declare function UsersComponent({ onUserCreated, onUserUpdated, onUserDeleted, passwordRulesArr, requiredPasswordLength, onVisiblePermissionChange, }: UsersComponentProps): React.ReactElement;
670
+ declare namespace UsersComponent {
671
+ var componentKey: "Identity.UsersComponent";
672
+ }
617
673
 
618
674
  /**
619
675
  * Route paths for the identity module.
@@ -649,4 +705,4 @@ declare const IDENTITY_POLICIES: {
649
705
  readonly ROLES_DELETE: "AbpIdentity.Roles.Delete";
650
706
  };
651
707
 
652
- export { IDENTITY_POLICIES, IDENTITY_ROUTE_PATHS, Identity, IdentityService, IdentityStateService, type PasswordRule, type RoleOperationResult, RolesComponent, type RolesComponentProps, type SortOrder, type UseIdentityReturn, type UseRolesReturn, type UseUsersReturn, type UserOperationResult, UsersComponent, type UsersComponentProps, useIdentity, useRoles, useUsers };
708
+ export { IDENTITY_POLICIES, IDENTITY_ROUTE_PATHS, Identity, type IdentityComponentKey, type IdentityRouteNameKey, IdentityService, IdentityStateService, type PasswordRule, type RoleOperationResult, RolesComponent, type RolesComponentProps, type SortOrder, type UseIdentityReturn, type UseRolesReturn, type UseUsersReturn, type UserOperationResult, UsersComponent, type UsersComponentProps, eIdentityComponents, eIdentityRouteNames, useIdentity, useRoles, useUsers };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,56 @@
1
1
  import { ABP, RestService } from '@abpjs/core';
2
2
  import React from 'react';
3
3
 
4
+ /**
5
+ * Component keys for the Identity module.
6
+ * These keys are used for component replacement/customization.
7
+ * @since 2.7.0
8
+ */
9
+ declare const eIdentityComponents: {
10
+ /**
11
+ * Key for the Roles component.
12
+ * Use this to replace the default RolesComponent with a custom implementation.
13
+ */
14
+ readonly Roles: "Identity.RolesComponent";
15
+ /**
16
+ * Key for the Users component.
17
+ * Use this to replace the default UsersComponent with a custom implementation.
18
+ */
19
+ readonly Users: "Identity.UsersComponent";
20
+ };
21
+ /**
22
+ * Type for identity component key values
23
+ */
24
+ type IdentityComponentKey = (typeof eIdentityComponents)[keyof typeof eIdentityComponents];
25
+
26
+ /**
27
+ * Route names for the Identity module.
28
+ * These are used for navigation menu items and breadcrumbs.
29
+ * @since 2.7.0
30
+ */
31
+ declare const eIdentityRouteNames: {
32
+ /**
33
+ * Administration menu item name.
34
+ */
35
+ readonly Administration: "AbpUiNavigation::Menu:Administration";
36
+ /**
37
+ * Identity Management menu item name.
38
+ */
39
+ readonly IdentityManagement: "AbpIdentity::Menu:IdentityManagement";
40
+ /**
41
+ * Roles menu item name.
42
+ */
43
+ readonly Roles: "AbpIdentity::Roles";
44
+ /**
45
+ * Users menu item name.
46
+ */
47
+ readonly Users: "AbpIdentity::Users";
48
+ };
49
+ /**
50
+ * Type for identity route name values
51
+ */
52
+ type IdentityRouteNameKey = (typeof eIdentityRouteNames)[keyof typeof eIdentityRouteNames];
53
+
4
54
  /**
5
55
  * Identity namespace containing all types related to identity management.
6
56
  * Translated from @abp/ng.identity Identity namespace.
@@ -581,6 +631,9 @@ interface RolesComponentProps {
581
631
  * ```
582
632
  */
583
633
  declare function RolesComponent({ onRoleCreated, onRoleUpdated, onRoleDeleted, onVisiblePermissionChange, }: RolesComponentProps): React.ReactElement;
634
+ declare namespace RolesComponent {
635
+ var componentKey: "Identity.RolesComponent";
636
+ }
584
637
 
585
638
  /**
586
639
  * Password rule type for validation display
@@ -614,6 +667,9 @@ interface UsersComponentProps {
614
667
  onVisiblePermissionChange?: (visible: boolean) => void;
615
668
  }
616
669
  declare function UsersComponent({ onUserCreated, onUserUpdated, onUserDeleted, passwordRulesArr, requiredPasswordLength, onVisiblePermissionChange, }: UsersComponentProps): React.ReactElement;
670
+ declare namespace UsersComponent {
671
+ var componentKey: "Identity.UsersComponent";
672
+ }
617
673
 
618
674
  /**
619
675
  * Route paths for the identity module.
@@ -649,4 +705,4 @@ declare const IDENTITY_POLICIES: {
649
705
  readonly ROLES_DELETE: "AbpIdentity.Roles.Delete";
650
706
  };
651
707
 
652
- export { IDENTITY_POLICIES, IDENTITY_ROUTE_PATHS, Identity, IdentityService, IdentityStateService, type PasswordRule, type RoleOperationResult, RolesComponent, type RolesComponentProps, type SortOrder, type UseIdentityReturn, type UseRolesReturn, type UseUsersReturn, type UserOperationResult, UsersComponent, type UsersComponentProps, useIdentity, useRoles, useUsers };
708
+ export { IDENTITY_POLICIES, IDENTITY_ROUTE_PATHS, Identity, type IdentityComponentKey, type IdentityRouteNameKey, IdentityService, IdentityStateService, type PasswordRule, type RoleOperationResult, RolesComponent, type RolesComponentProps, type SortOrder, type UseIdentityReturn, type UseRolesReturn, type UseUsersReturn, type UserOperationResult, UsersComponent, type UsersComponentProps, eIdentityComponents, eIdentityRouteNames, useIdentity, useRoles, useUsers };
package/dist/index.js CHANGED
@@ -26,12 +26,48 @@ __export(index_exports, {
26
26
  IdentityStateService: () => IdentityStateService,
27
27
  RolesComponent: () => RolesComponent,
28
28
  UsersComponent: () => UsersComponent,
29
+ eIdentityComponents: () => eIdentityComponents,
30
+ eIdentityRouteNames: () => eIdentityRouteNames,
29
31
  useIdentity: () => useIdentity,
30
32
  useRoles: () => useRoles,
31
33
  useUsers: () => useUsers
32
34
  });
33
35
  module.exports = __toCommonJS(index_exports);
34
36
 
37
+ // src/enums/components.ts
38
+ var eIdentityComponents = {
39
+ /**
40
+ * Key for the Roles component.
41
+ * Use this to replace the default RolesComponent with a custom implementation.
42
+ */
43
+ Roles: "Identity.RolesComponent",
44
+ /**
45
+ * Key for the Users component.
46
+ * Use this to replace the default UsersComponent with a custom implementation.
47
+ */
48
+ Users: "Identity.UsersComponent"
49
+ };
50
+
51
+ // src/enums/route-names.ts
52
+ var eIdentityRouteNames = {
53
+ /**
54
+ * Administration menu item name.
55
+ */
56
+ Administration: "AbpUiNavigation::Menu:Administration",
57
+ /**
58
+ * Identity Management menu item name.
59
+ */
60
+ IdentityManagement: "AbpIdentity::Menu:IdentityManagement",
61
+ /**
62
+ * Roles menu item name.
63
+ */
64
+ Roles: "AbpIdentity::Roles",
65
+ /**
66
+ * Users menu item name.
67
+ */
68
+ Users: "AbpIdentity::Users"
69
+ };
70
+
35
71
  // src/services/identity.service.ts
36
72
  var IdentityService = class {
37
73
  constructor(rest) {
@@ -874,6 +910,7 @@ function RolesComponent({
874
910
  )
875
911
  ] });
876
912
  }
913
+ RolesComponent.componentKey = eIdentityComponents.Roles;
877
914
 
878
915
  // src/components/Users/UsersComponent.tsx
879
916
  var import_react6 = require("react");
@@ -1292,6 +1329,7 @@ function UsersComponent({
1292
1329
  )
1293
1330
  ] });
1294
1331
  }
1332
+ UsersComponent.componentKey = eIdentityComponents.Users;
1295
1333
 
1296
1334
  // src/constants/routes.ts
1297
1335
  var IDENTITY_ROUTE_PATHS = {
@@ -1328,6 +1366,8 @@ var IDENTITY_POLICIES = {
1328
1366
  IdentityStateService,
1329
1367
  RolesComponent,
1330
1368
  UsersComponent,
1369
+ eIdentityComponents,
1370
+ eIdentityRouteNames,
1331
1371
  useIdentity,
1332
1372
  useRoles,
1333
1373
  useUsers
package/dist/index.mjs CHANGED
@@ -1,3 +1,37 @@
1
+ // src/enums/components.ts
2
+ var eIdentityComponents = {
3
+ /**
4
+ * Key for the Roles component.
5
+ * Use this to replace the default RolesComponent with a custom implementation.
6
+ */
7
+ Roles: "Identity.RolesComponent",
8
+ /**
9
+ * Key for the Users component.
10
+ * Use this to replace the default UsersComponent with a custom implementation.
11
+ */
12
+ Users: "Identity.UsersComponent"
13
+ };
14
+
15
+ // src/enums/route-names.ts
16
+ var eIdentityRouteNames = {
17
+ /**
18
+ * Administration menu item name.
19
+ */
20
+ Administration: "AbpUiNavigation::Menu:Administration",
21
+ /**
22
+ * Identity Management menu item name.
23
+ */
24
+ IdentityManagement: "AbpIdentity::Menu:IdentityManagement",
25
+ /**
26
+ * Roles menu item name.
27
+ */
28
+ Roles: "AbpIdentity::Roles",
29
+ /**
30
+ * Users menu item name.
31
+ */
32
+ Users: "AbpIdentity::Users"
33
+ };
34
+
1
35
  // src/services/identity.service.ts
2
36
  var IdentityService = class {
3
37
  constructor(rest) {
@@ -849,6 +883,7 @@ function RolesComponent({
849
883
  )
850
884
  ] });
851
885
  }
886
+ RolesComponent.componentKey = eIdentityComponents.Roles;
852
887
 
853
888
  // src/components/Users/UsersComponent.tsx
854
889
  import { useEffect as useEffect2, useState as useState4, useCallback as useCallback5, useMemo as useMemo4 } from "react";
@@ -1278,6 +1313,7 @@ function UsersComponent({
1278
1313
  )
1279
1314
  ] });
1280
1315
  }
1316
+ UsersComponent.componentKey = eIdentityComponents.Users;
1281
1317
 
1282
1318
  // src/constants/routes.ts
1283
1319
  var IDENTITY_ROUTE_PATHS = {
@@ -1313,6 +1349,8 @@ export {
1313
1349
  IdentityStateService,
1314
1350
  RolesComponent,
1315
1351
  UsersComponent,
1352
+ eIdentityComponents,
1353
+ eIdentityRouteNames,
1316
1354
  useIdentity,
1317
1355
  useRoles,
1318
1356
  useUsers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abpjs/identity",
3
- "version": "2.4.0",
3
+ "version": "2.7.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": "2.4.0",
29
- "@abpjs/permission-management": "2.4.0",
30
- "@abpjs/theme-shared": "2.4.0"
28
+ "@abpjs/theme-shared": "2.7.0",
29
+ "@abpjs/core": "2.7.0",
30
+ "@abpjs/permission-management": "2.7.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@abp/ng.identity": "2.4.0",
33
+ "@abp/ng.identity": "2.7.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",