@acorex-platform/module-security-management-client 0.0.32 → 0.0.33

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.
Files changed (49) hide show
  1. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-device-sessions.mjs +579 -0
  2. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-device-sessions.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-identity-provider.mjs +326 -0
  4. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-identity-provider.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-policy.mjs +284 -0
  6. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-policy.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-profile.mjs +243 -0
  8. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-profile.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-role-permission.mjs +220 -0
  10. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-role-permission.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-roles.mjs +271 -0
  12. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-roles.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-user-role.mjs +221 -0
  14. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-user-role.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-users.mjs +562 -0
  16. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-users.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-acorex-platform-module-security-management-client-contracts-entity-catalog-CeqvAe30.mjs +102 -0
  18. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-acorex-platform-module-security-management-client-contracts-entity-catalog-CeqvAe30.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-device-sessions.entity-D5wMKRJ3.mjs +503 -0
  20. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-device-sessions.entity-D5wMKRJ3.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-identity-provider.entity-6LBD6MuU.mjs +250 -0
  22. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-identity-provider.entity-6LBD6MuU.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-policy.entity-CVsH_anF.mjs +208 -0
  24. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-policy.entity-CVsH_anF.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-profile.entity-B3m3wpcT.mjs +167 -0
  26. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-profile.entity-B3m3wpcT.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-role-permission.entity-DK99ir3U.mjs +144 -0
  28. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-role-permission.entity-DK99ir3U.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-roles.entity-B5PknTEu.mjs +195 -0
  30. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-roles.entity-B5PknTEu.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-user-role.entity-IHUWsgjf.mjs +145 -0
  32. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-user-role.entity-IHUWsgjf.mjs.map +1 -0
  33. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-users.entity-DmVp5gj1.mjs +486 -0
  34. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-users.entity-DmVp5gj1.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog.mjs +2 -0
  36. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog.mjs.map +1 -0
  37. package/fesm2022/acorex-platform-module-security-management-client-local-entities.mjs +36 -0
  38. package/fesm2022/acorex-platform-module-security-management-client-local-entities.mjs.map +1 -0
  39. package/package.json +41 -1
  40. package/types/acorex-platform-module-security-management-client-contracts-entities-device-sessions.d.ts +5 -0
  41. package/types/acorex-platform-module-security-management-client-contracts-entities-identity-provider.d.ts +5 -0
  42. package/types/acorex-platform-module-security-management-client-contracts-entities-policy.d.ts +5 -0
  43. package/types/acorex-platform-module-security-management-client-contracts-entities-profile.d.ts +5 -0
  44. package/types/acorex-platform-module-security-management-client-contracts-entities-role-permission.d.ts +5 -0
  45. package/types/acorex-platform-module-security-management-client-contracts-entities-roles.d.ts +5 -0
  46. package/types/acorex-platform-module-security-management-client-contracts-entities-user-role.d.ts +5 -0
  47. package/types/acorex-platform-module-security-management-client-contracts-entities-users.d.ts +5 -0
  48. package/types/acorex-platform-module-security-management-client-contracts-entity-catalog.d.ts +10 -0
  49. package/types/acorex-platform-module-security-management-client-local-entities.d.ts +12 -0
@@ -0,0 +1,145 @@
1
+ import { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';
2
+ import { createAllQueryView, entityMasterCrudActions } from '@acorex-platform/framework-shared/entity';
3
+ import { R as RootConfig } from './acorex-platform-module-security-management-client-contracts-entity-catalog-acorex-platform-module-security-management-client-contracts-entity-catalog-CeqvAe30.mjs';
4
+
5
+ async function userRoleFactory() {
6
+ const i18n = RootConfig.config.i18n;
7
+ const entityDef = {
8
+ module: RootConfig.module.name,
9
+ name: RootConfig.entities.userRole.name,
10
+ title: RootConfig.entities.userRole.title,
11
+ icon: RootConfig.entities.userRole.icon,
12
+ formats: {
13
+ individual: RootConfig.entities.userRole.title,
14
+ plural: RootConfig.entities.userRole.titlePlural,
15
+ },
16
+ plugins: [{ name: 'history' }, { name: 'lock' }, { name: 'compare' }, { name: 'archive' }],
17
+ relatedEntities: [],
18
+ groups: [
19
+ {
20
+ id: 'basic-info',
21
+ title: `@general:terms.interface.basic-info`,
22
+ },
23
+ {
24
+ id: 'roles',
25
+ title: `@${i18n}:users.entities.user.fields.roles.title`,
26
+ },
27
+ ],
28
+ properties: [
29
+ {
30
+ name: 'id',
31
+ title: `@general:terms.common.id`,
32
+ groupId: 'basic-info',
33
+ schema: {
34
+ dataType: 'string',
35
+ visible: false,
36
+ nullable: false,
37
+ readonly: true,
38
+ unique: {
39
+ enabled: true,
40
+ },
41
+ },
42
+ },
43
+ {
44
+ name: 'userId',
45
+ title: `@${i18n}:user-roles.entities.user-role.fields.user.title`,
46
+ groupId: 'basic-info',
47
+ schema: {
48
+ dataType: 'string',
49
+ nullable: false,
50
+ interface: {
51
+ type: AXPWidgetsCatalog.text,
52
+ },
53
+ },
54
+ validations: [{ rule: 'required' }],
55
+ },
56
+ {
57
+ name: 'roleIds',
58
+ title: `@${i18n}:users.entities.user.fields.roles.title`,
59
+ groupId: 'roles',
60
+ schema: {
61
+ dataType: 'object',
62
+ interface: {
63
+ type: AXPWidgetsCatalog.lookup,
64
+ options: {
65
+ entity: 'SecurityManagement.Role',
66
+ multiple: true,
67
+ look: 'select',
68
+ expose: [
69
+ { source: 'id', target: 'rolesList.{id}' },
70
+ { source: 'title', target: 'rolesList.{title}' },
71
+ ],
72
+ },
73
+ },
74
+ },
75
+ validations: [{ rule: 'required' }],
76
+ },
77
+ ],
78
+ columns: [
79
+ { name: 'userId' },
80
+ { name: 'roleIds', options: { dataPath: 'rolesList' } },
81
+ ],
82
+ interfaces: {
83
+ master: {
84
+ create: {
85
+ sections: [
86
+ {
87
+ id: 'basic-info',
88
+ order: 1,
89
+ layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },
90
+ },
91
+ {
92
+ id: 'roles',
93
+ order: 2,
94
+ layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },
95
+ },
96
+ ],
97
+ properties: [
98
+ { name: 'userId', layout: { positions: { lg: { colSpan: 12 } } } },
99
+ { name: 'roleIds', layout: { positions: { lg: { colSpan: 12 } } } },
100
+ ],
101
+ },
102
+ update: {
103
+ sections: [
104
+ {
105
+ id: 'basic-info',
106
+ order: 1,
107
+ layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },
108
+ },
109
+ {
110
+ id: 'roles',
111
+ order: 2,
112
+ layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },
113
+ },
114
+ ],
115
+ properties: [
116
+ { name: 'userId', layout: { positions: { lg: { colSpan: 12 } } } },
117
+ { name: 'roleIds', layout: { positions: { lg: { colSpan: 12 } } } },
118
+ ],
119
+ },
120
+ single: {
121
+ title: '{{userId}}',
122
+ sections: [
123
+ {
124
+ id: 'basic-info',
125
+ order: 1,
126
+ layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },
127
+ },
128
+ ],
129
+ properties: [
130
+ { name: 'userId', layout: { positions: { lg: { colSpan: 12 } } } },
131
+ { name: 'roleIds', layout: { positions: { lg: { colSpan: 12 } } } },
132
+ ],
133
+ },
134
+ list: {
135
+ actions: [...entityMasterCrudActions()],
136
+ views: [createAllQueryView()],
137
+ },
138
+ },
139
+ },
140
+ };
141
+ return entityDef;
142
+ }
143
+
144
+ export { userRoleFactory };
145
+ //# sourceMappingURL=acorex-platform-module-security-management-client-contracts-entity-catalog-user-role.entity-IHUWsgjf.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-security-management-client-contracts-entity-catalog-user-role.entity-IHUWsgjf.mjs","sources":["../../../../libs/modules/security-management/contracts/src/entities/user-role/user-role.entity.ts"],"sourcesContent":["import { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';\nimport {\n AXPEntity,\n createAllQueryView,\n entityMasterCrudActions,\n} from '@acorex-platform/framework-shared/entity';\nimport { RootConfig } from '../../root-config';\n\nexport async function userRoleFactory(): Promise<AXPEntity | null> {\n const i18n = RootConfig.config.i18n;\n\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.userRole.name,\n title: RootConfig.entities.userRole.title,\n icon: RootConfig.entities.userRole.icon,\n formats: {\n individual: RootConfig.entities.userRole.title,\n plural: RootConfig.entities.userRole.titlePlural,\n },\n plugins: [{ name: 'history' }, { name: 'lock' }, { name: 'compare' }, { name: 'archive' }],\n relatedEntities: [],\n groups: [\n {\n id: 'basic-info',\n title: `@general:terms.interface.basic-info`,\n },\n {\n id: 'roles',\n title: `@${i18n}:users.entities.user.fields.roles.title`,\n },\n ],\n properties: [\n {\n name: 'id',\n title: `@general:terms.common.id`,\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n visible: false,\n nullable: false,\n readonly: true,\n unique: {\n enabled: true,\n },\n },\n },\n {\n name: 'userId',\n title: `@${i18n}:user-roles.entities.user-role.fields.user.title`,\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n nullable: false,\n interface: {\n type: AXPWidgetsCatalog.text,\n },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'roleIds',\n title: `@${i18n}:users.entities.user.fields.roles.title`,\n groupId: 'roles',\n schema: {\n dataType: 'object',\n interface: {\n type: AXPWidgetsCatalog.lookup,\n options: {\n entity: 'SecurityManagement.Role',\n multiple: true,\n look: 'select',\n expose: [\n { source: 'id', target: 'rolesList.{id}' },\n { source: 'title', target: 'rolesList.{title}' },\n ],\n },\n },\n },\n validations: [{ rule: 'required' }],\n },\n ],\n columns: [\n { name: 'userId' },\n { name: 'roleIds', options: { dataPath: 'rolesList' } },\n ],\n interfaces: {\n master: {\n create: {\n sections: [\n {\n id: 'basic-info',\n order: 1,\n layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },\n },\n {\n id: 'roles',\n order: 2,\n layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },\n },\n ],\n properties: [\n { name: 'userId', layout: { positions: { lg: { colSpan: 12 } } } },\n { name: 'roleIds', layout: { positions: { lg: { colSpan: 12 } } } },\n ],\n },\n update: {\n sections: [\n {\n id: 'basic-info',\n order: 1,\n layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },\n },\n {\n id: 'roles',\n order: 2,\n layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },\n },\n ],\n properties: [\n { name: 'userId', layout: { positions: { lg: { colSpan: 12 } } } },\n { name: 'roleIds', layout: { positions: { lg: { colSpan: 12 } } } },\n ],\n },\n single: {\n title: '{{userId}}',\n sections: [\n {\n id: 'basic-info',\n order: 1,\n layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },\n },\n ],\n properties: [\n { name: 'userId', layout: { positions: { lg: { colSpan: 12 } } } },\n { name: 'roleIds', layout: { positions: { lg: { colSpan: 12 } } } },\n ],\n },\n list: {\n actions: [...entityMasterCrudActions()],\n views: [createAllQueryView()],\n },\n },\n },\n };\n\n return entityDef;\n}\n"],"names":[],"mappings":";;;;AAQO,eAAe,eAAe,GAAA;AACnC,IAAA,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI;AAEnC,IAAA,MAAM,SAAS,GAAc;AAC3B,QAAA,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC9B,QAAA,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI;AACvC,QAAA,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK;AACzC,QAAA,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI;AACvC,QAAA,OAAO,EAAE;AACP,YAAA,UAAU,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK;AAC9C,YAAA,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW;AACjD,SAAA;QACD,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,C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E,YAAY;AAChB,4BAAA,KAAK,EAAE,CAAC;AACR,4BAAA,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE;AAC5D,yBAAA;AACF,qBAAA;AACD,oBAAA,UAAU,EAAE;AACV,wBAAA,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;AAClE,wBAAA,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;AACpE,qBAAA;AACF,iBAAA;AACD,gBAAA,IAAI,EAAE;AACJ,oBAAA,OAAO,EAAE,CAAC,GAAG,uBAAuB,EAAE,CAAC;AACvC,oBAAA,KAAK,EAAE,CAAC,kBAAkB,EAAE,CAAC;AAC9B,iBAAA;AACF,aAAA;AACF,SAAA;KACF;AAED,IAAA,OAAO,SAAS;AAClB;;;;"}
@@ -0,0 +1,486 @@
1
+ import { AXPWidgetsCatalog, AXPWidgetsList } from '@acorex-platform/framework-shared/core';
2
+ import { createAllQueryView, entityMasterCrudActions, AXPEntityCommandScope, entityMasterRecordActions } from '@acorex-platform/framework-shared/entity';
3
+ import { R as RootConfig } from './acorex-platform-module-security-management-client-contracts-entity-catalog-acorex-platform-module-security-management-client-contracts-entity-catalog-CeqvAe30.mjs';
4
+
5
+ /** Status provider key for `accessState` on SecurityManagement.User (transitions define editable paths in the status UI). */
6
+ const AXM_USER_ACCESS_STATE_DEFINITION_KEY = 'security-management.access-state.user';
7
+
8
+ /** Status provider key for persisted `effectiveState` on SecurityManagement.User (derived; read-only in UI). */
9
+ const AXM_USER_EFFECTIVE_STATE_DEFINITION_KEY = 'security-management.effective-state.user';
10
+
11
+ //#region ---- Security management server command keys ----
12
+ const AXMSecurityManagementServerCommands = {
13
+ SendPasswordResetEmail: 'SecurityManagement:Server:SendPasswordResetEmail',
14
+ CompletePasswordReset: 'SecurityManagement:Server:CompletePasswordReset',
15
+ ChangeOwnPassword: 'SecurityManagement:Server:ChangeOwnPassword',
16
+ };
17
+ /** Stable codes for self-service password change (client maps to i18n). */
18
+ const AXM_CHANGE_OWN_PASSWORD_ERROR_CODES = {
19
+ NotSignedIn: 'CHANGE_OWN_PASSWORD_NOT_SIGNED_IN',
20
+ IncorrectCurrent: 'CHANGE_OWN_PASSWORD_INCORRECT_CURRENT',
21
+ SameAsCurrent: 'CHANGE_OWN_PASSWORD_SAME_AS_CURRENT',
22
+ InvalidInput: 'CHANGE_OWN_PASSWORD_INVALID_INPUT',
23
+ };
24
+ /** Client/UI action key (confirm dialog → server send). */
25
+ const AXM_USER_SEND_PASSWORD_RESET_COMMAND = 'SecurityManagement:User:SendPasswordResetEmail';
26
+ //#endregion
27
+
28
+ const USER_ROLES_PAGE_COMPONENT_KEY = 'user-roles-page';
29
+
30
+ async function usersFactory() {
31
+ const entityDef = {
32
+ module: RootConfig.module.name,
33
+ name: RootConfig.entities.users.name,
34
+ title: RootConfig.entities.users.title,
35
+ icon: RootConfig.entities.users.icon,
36
+ formats: {
37
+ individual: RootConfig.entities.users.title,
38
+ plural: RootConfig.entities.users.titlePlural,
39
+ searchResult: {
40
+ title: '{{ displayName }}',
41
+ description: '{{ context.eval("lastSignInAt", { pipes: ["timeleft"] }) || "@security-management:users.entities.user.fields.last-sign-in-at.never" }}',
42
+ },
43
+ },
44
+ plugins: [
45
+ {
46
+ name: 'status',
47
+ options: {
48
+ definition: 'security-management.account-state.user',
49
+ field: 'accountState',
50
+ isPrimary: false,
51
+ groupId: 'user-account-access',
52
+ title: '@security-management:users.entities.user.fields.account-lifecycle.title',
53
+ showInCreate: false,
54
+ generate: { views: { enabled: false } },
55
+ },
56
+ },
57
+ {
58
+ name: 'status',
59
+ options: {
60
+ field: 'accessState',
61
+ definition: AXM_USER_ACCESS_STATE_DEFINITION_KEY,
62
+ isPrimary: false,
63
+ groupId: 'user-account-access',
64
+ title: '@security-management:users.entities.user.fields.access-state.title',
65
+ showInCreate: false,
66
+ // Platform-scoped sign-in gate: display-only on User detail (tenant must not change).
67
+ // Platform mutations should go through a dedicated ops path once client isPlatform is available.
68
+ readonly: true,
69
+ generate: { views: { enabled: false } },
70
+ },
71
+ },
72
+ {
73
+ name: 'status',
74
+ options: {
75
+ field: 'effectiveState',
76
+ definition: AXM_USER_EFFECTIVE_STATE_DEFINITION_KEY,
77
+ isPrimary: true,
78
+ groupId: 'user-account-access',
79
+ title: '@security-management:users.entities.user.fields.effective-state.title',
80
+ showInCreate: false,
81
+ readonly: true,
82
+ generate: { views: { enabled: true } },
83
+ },
84
+ },
85
+ { name: 'unique-fields', options: { fields: 'email', scope: 'global' } },
86
+ { name: 'history' },
87
+ { name: 'lock' },
88
+ { name: 'compare' },
89
+ { name: 'reports' },
90
+ ],
91
+ pages: [
92
+ {
93
+ componentKey: USER_ROLES_PAGE_COMPONENT_KEY,
94
+ title: '@security-management:users.entities.user.pages.roles.title',
95
+ icon: 'fa-light fa-user-tag',
96
+ layout: { order: 1, position: 'after' },
97
+ appearOn: { create: true, update: true },
98
+ },
99
+ ],
100
+ groups: [
101
+ {
102
+ id: 'basic-info',
103
+ title: '@general:terms.interface.basic-info',
104
+ },
105
+ {
106
+ id: 'avatar',
107
+ title: '@general:terms.common.avatar',
108
+ icon: 'fa-light fa-image',
109
+ },
110
+ {
111
+ id: 'user-account-access',
112
+ title: '@security-management:users.entities.user.groups.account-access',
113
+ },
114
+ ],
115
+ properties: [
116
+ {
117
+ name: 'username',
118
+ title: '@general:terms.contact.username',
119
+ groupId: 'basic-info',
120
+ options: {
121
+ filter: {
122
+ advance: {
123
+ enabled: true,
124
+ },
125
+ inline: {
126
+ enabled: true,
127
+ },
128
+ },
129
+ sort: {
130
+ enabled: true,
131
+ },
132
+ },
133
+ schema: {
134
+ dataType: 'string',
135
+ readonly: '{{ !!context.eval("id") }}',
136
+ interface: {
137
+ type: AXPWidgetsCatalog.text,
138
+ options: {},
139
+ },
140
+ },
141
+ validations: [
142
+ {
143
+ rule: 'required',
144
+ },
145
+ ],
146
+ },
147
+ {
148
+ name: 'displayName',
149
+ title: `@general:terms.common.display-name`,
150
+ groupId: 'basic-info',
151
+ options: {
152
+ sort: {
153
+ enabled: true,
154
+ },
155
+ filter: {
156
+ advance: {
157
+ enabled: true,
158
+ },
159
+ inline: {
160
+ enabled: true,
161
+ },
162
+ },
163
+ },
164
+ schema: {
165
+ dataType: 'string',
166
+ interface: {
167
+ type: AXPWidgetsCatalog.text,
168
+ },
169
+ },
170
+ validations: [
171
+ {
172
+ rule: 'required',
173
+ },
174
+ ],
175
+ },
176
+ {
177
+ name: 'email',
178
+ title: '@general:terms.communication.email',
179
+ groupId: 'basic-info',
180
+ options: {
181
+ filter: {
182
+ advance: { enabled: true },
183
+ inline: { enabled: true },
184
+ },
185
+ sort: { enabled: true },
186
+ },
187
+ schema: {
188
+ dataType: 'string',
189
+ interface: {
190
+ type: AXPWidgetsCatalog.text,
191
+ options: {},
192
+ },
193
+ },
194
+ validations: [{ rule: 'required' }],
195
+ },
196
+ {
197
+ name: 'rolesList',
198
+ title: '@security-management:users.entities.user.fields.roles.title',
199
+ groupId: 'basic-info',
200
+ schema: {
201
+ dataType: 'array',
202
+ /**
203
+ * Display-only Role snapshots. Not a stored FK — source of truth is
204
+ * scoped SecurityManagement.UserRole. Name must not end in Id/Ids so
205
+ * the query planner does not join Role from this User document.
206
+ */
207
+ readonly: true,
208
+ visible: false,
209
+ interface: {
210
+ type: AXPWidgetsList.Editors.LookupBox,
211
+ options: {
212
+ entity: `${RootConfig.module.name}.${RootConfig.entities.roles.name}`,
213
+ textField: 'title',
214
+ valueField: 'id',
215
+ multiple: true,
216
+ look: 'select',
217
+ },
218
+ },
219
+ },
220
+ },
221
+ {
222
+ name: 'homeTenantId',
223
+ title: '@security-management:users.entities.user.fields.home-tenant.title',
224
+ groupId: 'basic-info',
225
+ schema: {
226
+ dataType: 'string',
227
+ /** Stamped on create from session; not shown on User forms. */
228
+ readonly: true,
229
+ visible: false,
230
+ interface: {
231
+ type: AXPWidgetsCatalog.text,
232
+ options: {},
233
+ },
234
+ },
235
+ },
236
+ {
237
+ name: 'password',
238
+ title: '@security-management:users.entities.user.fields.password.title',
239
+ groupId: 'basic-info',
240
+ schema: {
241
+ dataType: 'string',
242
+ visible: false,
243
+ interface: {
244
+ type: AXPWidgetsCatalog.text,
245
+ },
246
+ },
247
+ },
248
+ {
249
+ name: 'avatar',
250
+ title: '@general:terms.common.avatar',
251
+ groupId: 'avatar',
252
+ schema: {
253
+ dataType: 'string',
254
+ nullable: true,
255
+ interface: {
256
+ type: AXPWidgetsList.Advanced.Image,
257
+ options: {
258
+ type: 'profile-photo',
259
+ },
260
+ },
261
+ },
262
+ },
263
+ {
264
+ name: 'pinCode',
265
+ title: '@security-management:users.entities.user.fields.pin-code.title',
266
+ groupId: 'basic-info',
267
+ schema: {
268
+ dataType: 'string',
269
+ readonly: true,
270
+ visible: false,
271
+ interface: {
272
+ type: AXPWidgetsCatalog.text,
273
+ },
274
+ },
275
+ },
276
+ {
277
+ name: 'passwordChangedAt',
278
+ title: '@security-management:users.entities.user.fields.password-changed-at.title',
279
+ groupId: 'user-account-access',
280
+ schema: {
281
+ dataType: 'date',
282
+ readonly: true,
283
+ visible: false,
284
+ nullable: true,
285
+ interface: {
286
+ type: AXPWidgetsCatalog.dateTime,
287
+ },
288
+ },
289
+ },
290
+ {
291
+ name: 'pinChangedAt',
292
+ title: '@security-management:users.entities.user.fields.pin-changed-at.title',
293
+ groupId: 'user-account-access',
294
+ schema: {
295
+ dataType: 'date',
296
+ readonly: true,
297
+ visible: false,
298
+ nullable: true,
299
+ interface: {
300
+ type: AXPWidgetsCatalog.dateTime,
301
+ },
302
+ },
303
+ },
304
+ {
305
+ name: 'lastSignInAt',
306
+ title: '@security-management:users.entities.user.fields.last-sign-in-at.title',
307
+ groupId: 'user-account-access',
308
+ schema: {
309
+ dataType: 'date',
310
+ readonly: true,
311
+ visible: false,
312
+ nullable: true,
313
+ interface: {
314
+ type: AXPWidgetsCatalog.dateTime,
315
+ },
316
+ },
317
+ },
318
+ {
319
+ name: 'passwordReset',
320
+ title: '@security-management:users.entities.user.fields.password-reset.title',
321
+ groupId: 'user-account-access',
322
+ schema: {
323
+ dataType: 'object',
324
+ readonly: true,
325
+ visible: false,
326
+ nullable: true,
327
+ interface: {
328
+ type: AXPWidgetsCatalog.text,
329
+ },
330
+ },
331
+ },
332
+ ],
333
+ columns: [
334
+ { name: 'username' },
335
+ { name: 'displayName' },
336
+ { name: 'email' },
337
+ { name: 'rolesList' },
338
+ { name: 'lastSignInAt', options: { visible: false } },
339
+ ],
340
+ interfaces: {
341
+ master: {
342
+ create: {
343
+ sections: [
344
+ {
345
+ id: 'basic-info',
346
+ order: 1,
347
+ layout: { positions: { lg: { colSpan: 8, colStart: 1 } } },
348
+ },
349
+ {
350
+ id: 'avatar',
351
+ order: 2,
352
+ layout: { positions: { lg: { colSpan: 4, colStart: 9 } } },
353
+ },
354
+ ],
355
+ properties: [
356
+ {
357
+ name: 'username',
358
+ layout: { positions: { lg: { colSpan: 6 } } },
359
+ },
360
+ {
361
+ name: 'displayName',
362
+ layout: { positions: { lg: { colSpan: 6 } } },
363
+ },
364
+ {
365
+ name: 'email',
366
+ layout: { positions: { lg: { colSpan: 12 } } },
367
+ },
368
+ {
369
+ name: 'avatar',
370
+ layout: {
371
+ label: { visible: false },
372
+ positions: { lg: { colSpan: 12, order: 1 } },
373
+ },
374
+ },
375
+ ],
376
+ },
377
+ update: {
378
+ sections: [
379
+ {
380
+ id: 'basic-info',
381
+ order: 1,
382
+ layout: { positions: { lg: { colSpan: 8, colStart: 1 } } },
383
+ },
384
+ {
385
+ id: 'avatar',
386
+ order: 2,
387
+ layout: { positions: { lg: { colSpan: 4, colStart: 9 } } },
388
+ },
389
+ {
390
+ id: 'user-account-access',
391
+ order: 3,
392
+ layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },
393
+ },
394
+ ],
395
+ properties: [
396
+ { name: 'username', layout: { positions: { lg: { colSpan: 6 } } } },
397
+ { name: 'displayName', layout: { positions: { lg: { colSpan: 6 } } } },
398
+ { name: 'email', layout: { positions: { lg: { colSpan: 6 } } } },
399
+ {
400
+ name: 'avatar',
401
+ layout: {
402
+ label: { visible: false },
403
+ positions: { lg: { colSpan: 12, order: 1 } },
404
+ },
405
+ },
406
+ { name: 'accountState', layout: { positions: { lg: { colSpan: 4 } } } },
407
+ { name: 'accessState', layout: { positions: { lg: { colSpan: 4 } } } },
408
+ { name: 'effectiveState', layout: { positions: { lg: { colSpan: 4 } } } },
409
+ ],
410
+ },
411
+ single: {
412
+ title: '{{ context.eval("displayName") ?? context.eval("username") }}',
413
+ description: '{{ context.eval("lastSignInAt", { pipes: ["timeleft"] }) || "@security-management:users.entities.user.fields.last-sign-in-at.never" }}',
414
+ sections: [
415
+ {
416
+ id: 'basic-info',
417
+ order: 1,
418
+ layout: { positions: { lg: { colSpan: 8, colStart: 1 } } },
419
+ },
420
+ {
421
+ id: 'avatar',
422
+ order: 2,
423
+ layout: { positions: { lg: { colSpan: 4, colStart: 9 } } },
424
+ },
425
+ {
426
+ id: 'user-account-access',
427
+ order: 3,
428
+ layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },
429
+ },
430
+ ],
431
+ properties: [
432
+ { name: 'username', layout: { positions: { lg: { colSpan: 6 } } } },
433
+ { name: 'displayName', layout: { positions: { lg: { colSpan: 6 } } } },
434
+ { name: 'email', layout: { positions: { lg: { colSpan: 6 } } } },
435
+ {
436
+ name: 'avatar',
437
+ layout: {
438
+ label: { visible: false },
439
+ positions: { lg: { colSpan: 12, order: 1 } },
440
+ },
441
+ },
442
+ { name: 'accountState', layout: { positions: { lg: { colSpan: 4 } } } },
443
+ { name: 'accessState', layout: { positions: { lg: { colSpan: 4 } } } },
444
+ { name: 'effectiveState', layout: { positions: { lg: { colSpan: 4 } } } },
445
+ ],
446
+ actions: [
447
+ {
448
+ title: '@security-management:users.entities.user.actions.send-password-reset.title',
449
+ icon: 'fa-light fa-envelope',
450
+ command: AXM_USER_SEND_PASSWORD_RESET_COMMAND,
451
+ priority: 'secondary',
452
+ type: 'view',
453
+ scope: AXPEntityCommandScope.Individual,
454
+ },
455
+ ...entityMasterRecordActions(),
456
+ ],
457
+ },
458
+ list: {
459
+ actions: [...entityMasterCrudActions()],
460
+ views: [
461
+ createAllQueryView({
462
+ sorts: [{ name: 'displayName', dir: 'asc' }],
463
+ }),
464
+ ],
465
+ },
466
+ card: {
467
+ enabled: true,
468
+ header: {
469
+ title: 'displayName',
470
+ description: '{{ context.eval("lastSignInAt", { pipes: ["timeleft"] }) || "@security-management:users.entities.user.fields.last-sign-in-at.never" }}',
471
+ avatar: 'avatar',
472
+ },
473
+ fields: [
474
+ { name: 'username', display: 'meta' },
475
+ { name: 'email', display: 'meta' },
476
+ { name: 'rolesList', display: 'simple' },
477
+ ],
478
+ },
479
+ },
480
+ },
481
+ };
482
+ return entityDef;
483
+ }
484
+
485
+ export { usersFactory };
486
+ //# sourceMappingURL=acorex-platform-module-security-management-client-contracts-entity-catalog-users.entity-DmVp5gj1.mjs.map