@abpjs/identity-pro 2.9.0 → 3.0.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.mjs CHANGED
@@ -1,3 +1,104 @@
1
+ // src/config/enums/policy-names.ts
2
+ var eIdentityPolicyNames = {
3
+ IdentityManagement: "AbpIdentity.Roles || AbpIdentity.Users || AbpIdentity.ClaimTypes || AbpIdentity.OrganizationUnits",
4
+ Roles: "AbpIdentity.Roles",
5
+ Users: "AbpIdentity.Users",
6
+ ClaimTypes: "AbpIdentity.ClaimTypes",
7
+ OrganizationUnits: "AbpIdentity.OrganizationUnits"
8
+ };
9
+
10
+ // src/config/enums/route-names.ts
11
+ var eIdentityRouteNames = {
12
+ IdentityManagement: "AbpIdentity::Menu:IdentityManagement",
13
+ Roles: "AbpIdentity::Roles",
14
+ Users: "AbpIdentity::Users",
15
+ ClaimTypes: "AbpIdentity::ClaimTypes",
16
+ OrganizationUnits: "AbpIdentity::OrganizationUnits"
17
+ };
18
+
19
+ // src/config/enums/setting-tab-names.ts
20
+ var eIdentitySettingTabNames = {
21
+ IdentityManagement: "AbpIdentity::Menu:IdentityManagement"
22
+ };
23
+
24
+ // src/config/providers/route.provider.ts
25
+ import { getRoutesService, eLayoutType } from "@abpjs/core";
26
+ function configureRoutes(routes) {
27
+ return () => {
28
+ routes.add([
29
+ {
30
+ path: "/identity",
31
+ name: eIdentityRouteNames.IdentityManagement,
32
+ requiredPolicy: eIdentityPolicyNames.IdentityManagement,
33
+ layout: eLayoutType.application,
34
+ iconClass: "fas fa-id-card-o",
35
+ order: 1,
36
+ children: [
37
+ {
38
+ path: "/identity/roles",
39
+ name: eIdentityRouteNames.Roles,
40
+ requiredPolicy: eIdentityPolicyNames.Roles,
41
+ order: 1
42
+ },
43
+ {
44
+ path: "/identity/users",
45
+ name: eIdentityRouteNames.Users,
46
+ requiredPolicy: eIdentityPolicyNames.Users,
47
+ order: 2
48
+ },
49
+ {
50
+ path: "/identity/claim-types",
51
+ name: eIdentityRouteNames.ClaimTypes,
52
+ requiredPolicy: eIdentityPolicyNames.ClaimTypes,
53
+ order: 3
54
+ },
55
+ {
56
+ path: "/identity/organization-units",
57
+ name: eIdentityRouteNames.OrganizationUnits,
58
+ requiredPolicy: eIdentityPolicyNames.OrganizationUnits,
59
+ order: 4
60
+ }
61
+ ]
62
+ }
63
+ ]);
64
+ };
65
+ }
66
+ function initializeIdentityRoutes() {
67
+ const routes = getRoutesService();
68
+ return configureRoutes(routes);
69
+ }
70
+ var IDENTITY_ROUTE_PROVIDERS = {
71
+ configureRoutes
72
+ };
73
+
74
+ // src/config/providers/setting-tab.provider.ts
75
+ import { getSettingTabsService } from "@abpjs/core";
76
+ var IDENTITY_SETTING_TAB_CONFIG = {
77
+ name: eIdentitySettingTabNames.IdentityManagement,
78
+ requiredPolicy: "AbpIdentity.SettingManagement",
79
+ order: 1
80
+ };
81
+ var IdentitySettingsPlaceholder = () => null;
82
+ function configureSettingTabs(settingTabs, component = IdentitySettingsPlaceholder) {
83
+ return () => {
84
+ settingTabs.add([
85
+ {
86
+ name: IDENTITY_SETTING_TAB_CONFIG.name,
87
+ requiredPolicy: IDENTITY_SETTING_TAB_CONFIG.requiredPolicy,
88
+ order: IDENTITY_SETTING_TAB_CONFIG.order,
89
+ component
90
+ }
91
+ ]);
92
+ };
93
+ }
94
+ function initializeIdentitySettingTabs(component) {
95
+ const settingTabs = getSettingTabsService();
96
+ return configureSettingTabs(settingTabs, component);
97
+ }
98
+ var IDENTITY_SETTING_TAB_PROVIDERS = {
99
+ configureSettingTabs
100
+ };
101
+
1
102
  // src/models/identity.ts
2
103
  var Identity;
3
104
  ((Identity2) => {
@@ -102,14 +203,20 @@ var eIdentityComponents = {
102
203
  OrganizationRoles: "Identity.OrganizationRolesComponent"
103
204
  };
104
205
 
105
- // src/enums/route-names.ts
106
- var eIdentityRouteNames = {
107
- Administration: "AbpUiNavigation::Menu:Administration",
108
- IdentityManagement: "AbpIdentity::Menu:IdentityManagement",
109
- Roles: "AbpIdentity::Roles",
110
- Users: "AbpIdentity::Users",
111
- ClaimTypes: "AbpIdentity::ClaimTypes",
112
- OrganizationUnits: "AbpIdentity::OrganizationUnits"
206
+ // src/guards/extensions.guard.ts
207
+ async function identityExtensionsGuard() {
208
+ return true;
209
+ }
210
+ function useIdentityExtensionsGuard() {
211
+ return {
212
+ isLoaded: true,
213
+ loading: false
214
+ };
215
+ }
216
+ var IdentityExtensionsGuard = class {
217
+ canActivate() {
218
+ return identityExtensionsGuard();
219
+ }
113
220
  };
114
221
 
115
222
  // src/services/identity.service.ts
@@ -306,18 +413,40 @@ var IdentityService = class {
306
413
  body
307
414
  });
308
415
  }
416
+ /**
417
+ * Get assignable roles for users
418
+ * @since 3.0.0
419
+ * @returns Promise with roles that can be assigned to users
420
+ */
421
+ getUserAssingableRoles() {
422
+ return this.rest.request({
423
+ method: "GET",
424
+ url: "/api/identity/users/assignable-roles"
425
+ });
426
+ }
309
427
  // ========================
310
428
  // Pro: Claim Type Operations
311
429
  // ========================
312
430
  /**
313
- * Get all claim type names for dropdowns
314
- * Pro feature since 0.7.2
315
- * @returns Promise with claim type names
431
+ * Get claim types available for roles
432
+ * @since 3.0.0
433
+ * @returns Promise with claim type names for roles
316
434
  */
317
- getClaimTypeNames() {
435
+ getRolesClaimTypes() {
318
436
  return this.rest.request({
319
437
  method: "GET",
320
- url: "/api/identity/claim-types/all"
438
+ url: "/api/identity/roles/available-claim-types"
439
+ });
440
+ }
441
+ /**
442
+ * Get claim types available for users
443
+ * @since 3.0.0
444
+ * @returns Promise with claim type names for users
445
+ */
446
+ getUsersClaimTypes() {
447
+ return this.rest.request({
448
+ method: "GET",
449
+ url: "/api/identity/users/available-claim-types"
321
450
  });
322
451
  }
323
452
  /**
@@ -423,7 +552,6 @@ var IdentityStateService = class {
423
552
  this._usersTotalCount = 0;
424
553
  this._claimTypes = [];
425
554
  this._claimTypesTotalCount = 0;
426
- this._claimTypeNames = [];
427
555
  this.identityService = new IdentityService(restService);
428
556
  }
429
557
  // ========================
@@ -465,12 +593,6 @@ var IdentityStateService = class {
465
593
  getClaimTypesTotalCount() {
466
594
  return this._claimTypesTotalCount;
467
595
  }
468
- /**
469
- * Get the claim type names
470
- */
471
- getClaimTypeNames() {
472
- return this._claimTypeNames;
473
- }
474
596
  // ========================
475
597
  // Role Dispatch Methods (v2.0.0)
476
598
  // ========================
@@ -585,16 +707,6 @@ var IdentityStateService = class {
585
707
  await this.dispatchGetClaimTypes();
586
708
  return result;
587
709
  }
588
- /**
589
- * Dispatch get claim type names action
590
- * @returns Promise resolving to the claim type names
591
- * @since 2.0.0
592
- */
593
- async dispatchGetClaimTypeNames() {
594
- const result = await this.identityService.getClaimTypeNames();
595
- this._claimTypeNames = result || [];
596
- return result;
597
- }
598
710
  // ========================
599
711
  // User Dispatch Methods (v2.0.0)
600
712
  // ========================
@@ -1218,16 +1330,31 @@ function useClaims() {
1218
1330
  return { success: false, error: errorMessage };
1219
1331
  }
1220
1332
  }, [service]);
1221
- const fetchClaimTypeNames = useCallback4(async () => {
1333
+ const fetchRolesClaimTypes = useCallback4(async () => {
1334
+ setIsLoading(true);
1335
+ setError(null);
1336
+ try {
1337
+ const response = await service.getRolesClaimTypes();
1338
+ setClaimTypeNames(response || []);
1339
+ setIsLoading(false);
1340
+ return { success: true };
1341
+ } catch (err) {
1342
+ const errorMessage = err instanceof Error ? err.message : "Failed to fetch role claim types";
1343
+ setError(errorMessage);
1344
+ setIsLoading(false);
1345
+ return { success: false, error: errorMessage };
1346
+ }
1347
+ }, [service]);
1348
+ const fetchUsersClaimTypes = useCallback4(async () => {
1222
1349
  setIsLoading(true);
1223
1350
  setError(null);
1224
1351
  try {
1225
- const response = await service.getClaimTypeNames();
1352
+ const response = await service.getUsersClaimTypes();
1226
1353
  setClaimTypeNames(response || []);
1227
1354
  setIsLoading(false);
1228
1355
  return { success: true };
1229
1356
  } catch (err) {
1230
- const errorMessage = err instanceof Error ? err.message : "Failed to fetch claim type names";
1357
+ const errorMessage = err instanceof Error ? err.message : "Failed to fetch user claim types";
1231
1358
  setError(errorMessage);
1232
1359
  setIsLoading(false);
1233
1360
  return { success: false, error: errorMessage };
@@ -1349,7 +1476,8 @@ function useClaims() {
1349
1476
  sortKey,
1350
1477
  sortOrder,
1351
1478
  fetchClaimTypes,
1352
- fetchClaimTypeNames,
1479
+ fetchRolesClaimTypes,
1480
+ fetchUsersClaimTypes,
1353
1481
  getClaimTypeById,
1354
1482
  createClaimType,
1355
1483
  updateClaimType,
@@ -1366,7 +1494,7 @@ function useClaims() {
1366
1494
  // src/components/Roles/RolesComponent.tsx
1367
1495
  import { useEffect, useState as useState4, useCallback as useCallback5 } from "react";
1368
1496
  import { useLocalization } from "@abpjs/core";
1369
- import { Modal, useConfirmation, Toaster, Alert, Button, Checkbox, FormField } from "@abpjs/theme-shared";
1497
+ import { Modal, useConfirmation, Confirmation, Alert, Button, Checkbox, FormField } from "@abpjs/theme-shared";
1370
1498
  import { PermissionManagementModal } from "@abpjs/permission-management";
1371
1499
  import {
1372
1500
  Box,
@@ -1449,7 +1577,7 @@ function RolesComponent({
1449
1577
  t("AbpIdentity::RoleDeletionConfirmationMessage", name),
1450
1578
  t("AbpIdentity::AreYouSure")
1451
1579
  );
1452
- if (status === Toaster.Status.confirm) {
1580
+ if (status === Confirmation.Status.confirm) {
1453
1581
  const result = await deleteRole(id);
1454
1582
  if (result.success) {
1455
1583
  onRoleDeleted?.(id);
@@ -1605,7 +1733,7 @@ function RolesComponent({
1605
1733
  // src/components/Users/UsersComponent.tsx
1606
1734
  import { useEffect as useEffect2, useState as useState5, useCallback as useCallback6, useMemo as useMemo5 } from "react";
1607
1735
  import { useLocalization as useLocalization2 } from "@abpjs/core";
1608
- import { Modal as Modal2, useConfirmation as useConfirmation2, Toaster as Toaster2, Alert as Alert2, Button as Button2, Checkbox as Checkbox2, FormField as FormField2 } from "@abpjs/theme-shared";
1736
+ import { Modal as Modal2, useConfirmation as useConfirmation2, Confirmation as Confirmation2, Alert as Alert2, Button as Button2, Checkbox as Checkbox2, FormField as FormField2 } from "@abpjs/theme-shared";
1609
1737
  import { PermissionManagementModal as PermissionManagementModal2 } from "@abpjs/permission-management";
1610
1738
  import {
1611
1739
  Box as Box2,
@@ -1718,7 +1846,7 @@ function UsersComponent({
1718
1846
  t("AbpIdentity::UserDeletionConfirmationMessage", userName),
1719
1847
  t("AbpIdentity::AreYouSure")
1720
1848
  );
1721
- if (status === Toaster2.Status.confirm) {
1849
+ if (status === Confirmation2.Status.confirm) {
1722
1850
  const result = await deleteUser(id);
1723
1851
  if (result.success) {
1724
1852
  onUserDeleted?.(id);
@@ -2007,7 +2135,7 @@ function UsersComponent({
2007
2135
  // src/components/Claims/ClaimsComponent.tsx
2008
2136
  import { useEffect as useEffect3, useState as useState6, useCallback as useCallback7 } from "react";
2009
2137
  import { useLocalization as useLocalization3 } from "@abpjs/core";
2010
- import { Modal as Modal3, useConfirmation as useConfirmation3, Toaster as Toaster3, Alert as Alert3, Button as Button3, FormField as FormField3 } from "@abpjs/theme-shared";
2138
+ import { Modal as Modal3, useConfirmation as useConfirmation3, Confirmation as Confirmation3, Alert as Alert3, Button as Button3, FormField as FormField3 } from "@abpjs/theme-shared";
2011
2139
  import {
2012
2140
  Box as Box3,
2013
2141
  Flex as Flex3,
@@ -2108,7 +2236,7 @@ function ClaimsComponent({
2108
2236
  t("AbpIdentity::ClaimTypeDeletionConfirmationMessage", name) || `Are you sure you want to delete the claim type '${name}'?`,
2109
2237
  t("AbpIdentity::AreYouSure")
2110
2238
  );
2111
- if (status === Toaster3.Status.confirm) {
2239
+ if (status === Confirmation3.Status.confirm) {
2112
2240
  const result = await deleteClaimType(id);
2113
2241
  if (result.success) {
2114
2242
  onClaimTypeDeleted?.(id);
@@ -2300,7 +2428,8 @@ function ClaimModal({
2300
2428
  const { t } = useLocalization4();
2301
2429
  const {
2302
2430
  claimTypeNames,
2303
- fetchClaimTypeNames,
2431
+ fetchRolesClaimTypes,
2432
+ fetchUsersClaimTypes,
2304
2433
  getClaims,
2305
2434
  updateClaims,
2306
2435
  isLoading
@@ -2311,10 +2440,14 @@ function ClaimModal({
2311
2440
  const [isSaving, setIsSaving] = useState7(false);
2312
2441
  const initModal = useCallback8(async () => {
2313
2442
  if (!visible || !subjectId) return;
2314
- await fetchClaimTypeNames();
2443
+ if (subjectType === "roles") {
2444
+ await fetchRolesClaimTypes();
2445
+ } else {
2446
+ await fetchUsersClaimTypes();
2447
+ }
2315
2448
  const claims = await getClaims(subjectId, subjectType);
2316
2449
  setSubjectClaims(claims);
2317
- }, [visible, subjectId, subjectType, fetchClaimTypeNames, getClaims]);
2450
+ }, [visible, subjectId, subjectType, fetchRolesClaimTypes, fetchUsersClaimTypes, getClaims]);
2318
2451
  useEffect4(() => {
2319
2452
  if (visible) {
2320
2453
  initModal();
@@ -2456,7 +2589,7 @@ function ClaimModal({
2456
2589
  }
2457
2590
 
2458
2591
  // src/constants/routes.ts
2459
- import { eLayoutType } from "@abpjs/core";
2592
+ import { eLayoutType as eLayoutType2 } from "@abpjs/core";
2460
2593
  var IDENTITY_ROUTES = {
2461
2594
  routes: [
2462
2595
  {
@@ -2470,7 +2603,7 @@ var IDENTITY_ROUTES = {
2470
2603
  path: "identity",
2471
2604
  order: 1,
2472
2605
  parentName: "AbpUiNavigation::Menu:Administration",
2473
- layout: eLayoutType.application,
2606
+ layout: eLayoutType2.application,
2474
2607
  children: [
2475
2608
  {
2476
2609
  path: "roles",
@@ -2515,6 +2648,208 @@ var IDENTITY_POLICIES = {
2515
2648
  ROLES_DELETE: "AbpIdentity.Roles.Delete"
2516
2649
  };
2517
2650
 
2651
+ // src/tokens/extensions.token.ts
2652
+ var DEFAULT_CLAIMS_ENTITY_ACTIONS = [
2653
+ {
2654
+ text: "AbpIdentity::Edit",
2655
+ permission: "AbpIdentity.ClaimTypes.Update",
2656
+ icon: "fa fa-pencil"
2657
+ },
2658
+ {
2659
+ text: "AbpIdentity::Delete",
2660
+ permission: "AbpIdentity.ClaimTypes.Delete",
2661
+ icon: "fa fa-trash"
2662
+ }
2663
+ ];
2664
+ var DEFAULT_ROLES_ENTITY_ACTIONS = [
2665
+ {
2666
+ text: "AbpIdentity::Edit",
2667
+ permission: "AbpIdentity.Roles.Update",
2668
+ icon: "fa fa-pencil"
2669
+ },
2670
+ {
2671
+ text: "AbpIdentity::Claims",
2672
+ permission: "AbpIdentity.Roles.Update",
2673
+ icon: "fa fa-list"
2674
+ },
2675
+ {
2676
+ text: "AbpIdentity::Permissions",
2677
+ permission: "AbpIdentity.Roles.ManagePermissions",
2678
+ icon: "fa fa-lock"
2679
+ },
2680
+ {
2681
+ text: "AbpIdentity::Delete",
2682
+ permission: "AbpIdentity.Roles.Delete",
2683
+ icon: "fa fa-trash"
2684
+ }
2685
+ ];
2686
+ var DEFAULT_USERS_ENTITY_ACTIONS = [
2687
+ {
2688
+ text: "AbpIdentity::Edit",
2689
+ permission: "AbpIdentity.Users.Update",
2690
+ icon: "fa fa-pencil"
2691
+ },
2692
+ {
2693
+ text: "AbpIdentity::Claims",
2694
+ permission: "AbpIdentity.Users.Update",
2695
+ icon: "fa fa-list"
2696
+ },
2697
+ {
2698
+ text: "AbpIdentity::Permissions",
2699
+ permission: "AbpIdentity.Users.ManagePermissions",
2700
+ icon: "fa fa-lock"
2701
+ },
2702
+ {
2703
+ text: "AbpIdentity::SetPassword",
2704
+ permission: "AbpIdentity.Users.Update",
2705
+ icon: "fa fa-key"
2706
+ },
2707
+ {
2708
+ text: "AbpIdentity::Unlock",
2709
+ permission: "AbpIdentity.Users.Update",
2710
+ icon: "fa fa-unlock"
2711
+ },
2712
+ {
2713
+ text: "AbpIdentity::Delete",
2714
+ permission: "AbpIdentity.Users.Delete",
2715
+ icon: "fa fa-trash"
2716
+ }
2717
+ ];
2718
+ var DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS = [
2719
+ {
2720
+ text: "AbpIdentity::Delete",
2721
+ permission: "AbpIdentity.OrganizationUnits.ManageMembers",
2722
+ icon: "fa fa-trash"
2723
+ }
2724
+ ];
2725
+ var DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS = [
2726
+ {
2727
+ text: "AbpIdentity::Delete",
2728
+ permission: "AbpIdentity.OrganizationUnits.ManageRoles",
2729
+ icon: "fa fa-trash"
2730
+ }
2731
+ ];
2732
+ var DEFAULT_IDENTITY_ENTITY_ACTIONS = {
2733
+ "Identity.ClaimsComponent": DEFAULT_CLAIMS_ENTITY_ACTIONS,
2734
+ "Identity.RolesComponent": DEFAULT_ROLES_ENTITY_ACTIONS,
2735
+ "Identity.UsersComponent": DEFAULT_USERS_ENTITY_ACTIONS,
2736
+ "Identity.OrganizationMembersComponent": DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS,
2737
+ "Identity.OrganizationRolesComponent": DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS
2738
+ };
2739
+ var DEFAULT_CLAIMS_TOOLBAR_ACTIONS = [
2740
+ {
2741
+ text: "AbpIdentity::NewClaimType",
2742
+ permission: "AbpIdentity.ClaimTypes.Create",
2743
+ icon: "fa fa-plus"
2744
+ }
2745
+ ];
2746
+ var DEFAULT_ROLES_TOOLBAR_ACTIONS = [
2747
+ {
2748
+ text: "AbpIdentity::NewRole",
2749
+ permission: "AbpIdentity.Roles.Create",
2750
+ icon: "fa fa-plus"
2751
+ }
2752
+ ];
2753
+ var DEFAULT_USERS_TOOLBAR_ACTIONS = [
2754
+ {
2755
+ text: "AbpIdentity::NewUser",
2756
+ permission: "AbpIdentity.Users.Create",
2757
+ icon: "fa fa-plus"
2758
+ }
2759
+ ];
2760
+ var DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS = [
2761
+ {
2762
+ text: "AbpIdentity::NewOrganizationUnit",
2763
+ permission: "AbpIdentity.OrganizationUnits.Create",
2764
+ icon: "fa fa-plus"
2765
+ }
2766
+ ];
2767
+ var DEFAULT_IDENTITY_TOOLBAR_ACTIONS = {
2768
+ "Identity.ClaimsComponent": DEFAULT_CLAIMS_TOOLBAR_ACTIONS,
2769
+ "Identity.RolesComponent": DEFAULT_ROLES_TOOLBAR_ACTIONS,
2770
+ "Identity.UsersComponent": DEFAULT_USERS_TOOLBAR_ACTIONS,
2771
+ "Identity.OrganizationUnitsComponent": DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS
2772
+ };
2773
+ var DEFAULT_CLAIMS_ENTITY_PROPS = [
2774
+ { type: "string", name: "name", displayName: "AbpIdentity::DisplayName:ClaimName", sortable: true },
2775
+ { type: "string", name: "valueType", displayName: "AbpIdentity::DisplayName:ClaimValueType", sortable: true },
2776
+ { type: "string", name: "regex", displayName: "AbpIdentity::DisplayName:Regex", sortable: false },
2777
+ { type: "boolean", name: "required", displayName: "AbpIdentity::DisplayName:Required", sortable: false }
2778
+ ];
2779
+ var DEFAULT_ROLES_ENTITY_PROPS = [
2780
+ { type: "string", name: "name", displayName: "AbpIdentity::RoleName", sortable: true }
2781
+ ];
2782
+ var DEFAULT_USERS_ENTITY_PROPS = [
2783
+ { type: "string", name: "userName", displayName: "AbpIdentity::UserName", sortable: true },
2784
+ { type: "string", name: "email", displayName: "AbpIdentity::EmailAddress", sortable: true },
2785
+ { type: "string", name: "phoneNumber", displayName: "AbpIdentity::PhoneNumber", sortable: false }
2786
+ ];
2787
+ var DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS = [
2788
+ { type: "string", name: "userName", displayName: "AbpIdentity::UserName", sortable: true },
2789
+ { type: "string", name: "email", displayName: "AbpIdentity::EmailAddress", sortable: true }
2790
+ ];
2791
+ var DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS = [
2792
+ { type: "string", name: "name", displayName: "AbpIdentity::RoleName", sortable: true }
2793
+ ];
2794
+ var DEFAULT_IDENTITY_ENTITY_PROPS = {
2795
+ "Identity.ClaimsComponent": DEFAULT_CLAIMS_ENTITY_PROPS,
2796
+ "Identity.RolesComponent": DEFAULT_ROLES_ENTITY_PROPS,
2797
+ "Identity.UsersComponent": DEFAULT_USERS_ENTITY_PROPS,
2798
+ "Identity.OrganizationMembersComponent": DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS,
2799
+ "Identity.OrganizationRolesComponent": DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS
2800
+ };
2801
+ var DEFAULT_CLAIMS_CREATE_FORM_PROPS = [
2802
+ { type: "string", name: "name", displayName: "AbpIdentity::DisplayName:ClaimName" },
2803
+ { type: "select", name: "valueType", displayName: "AbpIdentity::DisplayName:ClaimValueType" },
2804
+ { type: "string", name: "regex", displayName: "AbpIdentity::DisplayName:Regex" },
2805
+ { type: "string", name: "regexDescription", displayName: "AbpIdentity::DisplayName:RegexDescription" },
2806
+ { type: "boolean", name: "required", displayName: "AbpIdentity::DisplayName:Required" },
2807
+ { type: "string", name: "description", displayName: "AbpIdentity::DisplayName:Description" }
2808
+ ];
2809
+ var DEFAULT_CLAIMS_EDIT_FORM_PROPS = [
2810
+ ...DEFAULT_CLAIMS_CREATE_FORM_PROPS
2811
+ ];
2812
+ var DEFAULT_ROLES_CREATE_FORM_PROPS = [
2813
+ { type: "string", name: "name", displayName: "AbpIdentity::RoleName" },
2814
+ { type: "boolean", name: "isDefault", displayName: "AbpIdentity::DisplayName:IsDefault" },
2815
+ { type: "boolean", name: "isPublic", displayName: "AbpIdentity::DisplayName:IsPublic" }
2816
+ ];
2817
+ var DEFAULT_ROLES_EDIT_FORM_PROPS = [
2818
+ ...DEFAULT_ROLES_CREATE_FORM_PROPS
2819
+ ];
2820
+ var DEFAULT_USERS_CREATE_FORM_PROPS = [
2821
+ { type: "string", name: "userName", displayName: "AbpIdentity::UserName" },
2822
+ { type: "string", name: "name", displayName: "AbpIdentity::DisplayName:Name" },
2823
+ { type: "string", name: "surname", displayName: "AbpIdentity::DisplayName:Surname" },
2824
+ { type: "email", name: "email", displayName: "AbpIdentity::EmailAddress" },
2825
+ { type: "string", name: "phoneNumber", displayName: "AbpIdentity::PhoneNumber" },
2826
+ { type: "password", name: "password", displayName: "AbpIdentity::Password" },
2827
+ { type: "boolean", name: "lockoutEnabled", displayName: "AbpIdentity::DisplayName:LockoutEnabled" }
2828
+ ];
2829
+ var DEFAULT_USERS_EDIT_FORM_PROPS = [
2830
+ { type: "string", name: "userName", displayName: "AbpIdentity::UserName" },
2831
+ { type: "string", name: "name", displayName: "AbpIdentity::DisplayName:Name" },
2832
+ { type: "string", name: "surname", displayName: "AbpIdentity::DisplayName:Surname" },
2833
+ { type: "email", name: "email", displayName: "AbpIdentity::EmailAddress" },
2834
+ { type: "string", name: "phoneNumber", displayName: "AbpIdentity::PhoneNumber" },
2835
+ { type: "boolean", name: "lockoutEnabled", displayName: "AbpIdentity::DisplayName:LockoutEnabled" }
2836
+ ];
2837
+ var DEFAULT_IDENTITY_CREATE_FORM_PROPS = {
2838
+ "Identity.ClaimsComponent": DEFAULT_CLAIMS_CREATE_FORM_PROPS,
2839
+ "Identity.RolesComponent": DEFAULT_ROLES_CREATE_FORM_PROPS,
2840
+ "Identity.UsersComponent": DEFAULT_USERS_CREATE_FORM_PROPS
2841
+ };
2842
+ var DEFAULT_IDENTITY_EDIT_FORM_PROPS = {
2843
+ "Identity.ClaimsComponent": DEFAULT_CLAIMS_EDIT_FORM_PROPS,
2844
+ "Identity.RolesComponent": DEFAULT_ROLES_EDIT_FORM_PROPS,
2845
+ "Identity.UsersComponent": DEFAULT_USERS_EDIT_FORM_PROPS
2846
+ };
2847
+ var IDENTITY_ENTITY_ACTION_CONTRIBUTORS = /* @__PURE__ */ Symbol("IDENTITY_ENTITY_ACTION_CONTRIBUTORS");
2848
+ var IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS = /* @__PURE__ */ Symbol("IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS");
2849
+ var IDENTITY_ENTITY_PROP_CONTRIBUTORS = /* @__PURE__ */ Symbol("IDENTITY_ENTITY_PROP_CONTRIBUTORS");
2850
+ var IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS = /* @__PURE__ */ Symbol("IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS");
2851
+ var IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS = /* @__PURE__ */ Symbol("IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS");
2852
+
2518
2853
  // src/utils/tree-adapter.ts
2519
2854
  function createTreeNode(entity, nameResolver) {
2520
2855
  const resolvedName = nameResolver ? nameResolver(entity) : entity.displayName || entity.name || "";
@@ -2698,16 +3033,52 @@ var TreeAdapter = class {
2698
3033
  export {
2699
3034
  ClaimModal,
2700
3035
  ClaimsComponent,
3036
+ DEFAULT_CLAIMS_CREATE_FORM_PROPS,
3037
+ DEFAULT_CLAIMS_EDIT_FORM_PROPS,
3038
+ DEFAULT_CLAIMS_ENTITY_ACTIONS,
3039
+ DEFAULT_CLAIMS_ENTITY_PROPS,
3040
+ DEFAULT_CLAIMS_TOOLBAR_ACTIONS,
3041
+ DEFAULT_IDENTITY_CREATE_FORM_PROPS,
3042
+ DEFAULT_IDENTITY_EDIT_FORM_PROPS,
3043
+ DEFAULT_IDENTITY_ENTITY_ACTIONS,
3044
+ DEFAULT_IDENTITY_ENTITY_PROPS,
3045
+ DEFAULT_IDENTITY_TOOLBAR_ACTIONS,
3046
+ DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS,
3047
+ DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS,
3048
+ DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS,
3049
+ DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS,
3050
+ DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS,
3051
+ DEFAULT_ROLES_CREATE_FORM_PROPS,
3052
+ DEFAULT_ROLES_EDIT_FORM_PROPS,
3053
+ DEFAULT_ROLES_ENTITY_ACTIONS,
3054
+ DEFAULT_ROLES_ENTITY_PROPS,
3055
+ DEFAULT_ROLES_TOOLBAR_ACTIONS,
3056
+ DEFAULT_USERS_CREATE_FORM_PROPS,
3057
+ DEFAULT_USERS_EDIT_FORM_PROPS,
3058
+ DEFAULT_USERS_ENTITY_ACTIONS,
3059
+ DEFAULT_USERS_ENTITY_PROPS,
3060
+ DEFAULT_USERS_TOOLBAR_ACTIONS,
3061
+ IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS,
3062
+ IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS,
3063
+ IDENTITY_ENTITY_ACTION_CONTRIBUTORS,
3064
+ IDENTITY_ENTITY_PROP_CONTRIBUTORS,
2701
3065
  IDENTITY_POLICIES,
2702
3066
  IDENTITY_ROUTES,
2703
3067
  IDENTITY_ROUTE_PATHS,
3068
+ IDENTITY_ROUTE_PROVIDERS,
3069
+ IDENTITY_SETTING_TAB_CONFIG,
3070
+ IDENTITY_SETTING_TAB_PROVIDERS,
3071
+ IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS,
2704
3072
  Identity,
3073
+ IdentityExtensionsGuard,
2705
3074
  IdentityService,
2706
3075
  IdentityStateService,
2707
3076
  OrganizationUnitService,
2708
3077
  RolesComponent,
2709
3078
  TreeAdapter,
2710
3079
  UsersComponent,
3080
+ configureRoutes,
3081
+ configureSettingTabs,
2711
3082
  createGetOrganizationUnitInput,
2712
3083
  createOrganizationUnitCreateDto,
2713
3084
  createOrganizationUnitCreateOrUpdateDtoBase,
@@ -2718,9 +3089,15 @@ export {
2718
3089
  createOrganizationUnitWithDetailsDto,
2719
3090
  createTreeNode,
2720
3091
  eIdentityComponents,
3092
+ eIdentityPolicyNames,
2721
3093
  eIdentityRouteNames,
3094
+ eIdentitySettingTabNames,
3095
+ identityExtensionsGuard,
3096
+ initializeIdentityRoutes,
3097
+ initializeIdentitySettingTabs,
2722
3098
  useClaims,
2723
3099
  useIdentity,
3100
+ useIdentityExtensionsGuard,
2724
3101
  useRoles,
2725
3102
  useUsers
2726
3103
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abpjs/identity-pro",
3
- "version": "2.9.0",
3
+ "version": "3.0.0",
4
4
  "description": "ABP Framework identity pro components for React - translated from @volo/abp.ng.identity",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -27,12 +27,12 @@
27
27
  "@chakra-ui/react": "^3.2.0",
28
28
  "@emotion/react": "^11.11.0",
29
29
  "react-icons": "^5.3.0",
30
- "@abpjs/core": "2.9.0",
31
- "@abpjs/theme-shared": "2.9.0",
32
- "@abpjs/permission-management": "2.9.0"
30
+ "@abpjs/core": "3.0.0",
31
+ "@abpjs/theme-shared": "3.0.0",
32
+ "@abpjs/permission-management": "3.0.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@volo/abp.ng.identity": "2.9.0",
35
+ "@volo/abp.ng.identity": "3.0.0",
36
36
  "@testing-library/jest-dom": "^6.9.1",
37
37
  "@testing-library/react": "^14.0.0",
38
38
  "@testing-library/user-event": "^14.6.1",