@acorex-platform/module-person-core-client 0.0.15

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.
@@ -0,0 +1,296 @@
1
+ import { AXPEntityAction, AXPQueryFilter, AXPEntity, AXPEntityModel } from '@acorex-platform/framework-shared/entity';
2
+ import { AXPMultiLanguageString, AXPAddressData } from '@acorex-platform/framework-shared/core';
3
+
4
+ declare const AXMPersonCoreMenuKeys: {
5
+ readonly Root: "person-core";
6
+ readonly Persons: "person-core.persons";
7
+ readonly PersonRelationships: "person-core.person-relationships";
8
+ readonly EducationLevels: "person-core.education-levels";
9
+ readonly Genders: "person-core.genders";
10
+ readonly MaritalStatuses: "person-core.marital-statuses";
11
+ readonly PersonTitles: "person-core.person-titles";
12
+ readonly PersonIdentifierTypes: "person-core.person-identifier-types";
13
+ readonly Religions: "person-core.religions";
14
+ readonly ContactRoles: "person-core.contact-roles";
15
+ };
16
+
17
+ declare const AXMPersonCorePermissionKeys: {
18
+ readonly PersonCore: {
19
+ readonly Person: {
20
+ readonly Management: "PersonCore:Permission:Person.Management";
21
+ };
22
+ readonly EducationLevel: {
23
+ readonly Management: "PersonCore:Permission:EducationLevel.Management";
24
+ };
25
+ readonly Gender: {
26
+ readonly Management: "PersonCore:Permission:Gender.Management";
27
+ };
28
+ readonly MaritalStatus: {
29
+ readonly Management: "PersonCore:Permission:MaritalStatus.Management";
30
+ };
31
+ readonly PersonTitle: {
32
+ readonly Management: "PersonCore:Permission:PersonTitle.Management";
33
+ };
34
+ readonly PersonIdentifierType: {
35
+ readonly Management: "PersonCore:Permission:PersonIdentifierType.Management";
36
+ };
37
+ readonly PersonRelationship: {
38
+ readonly Management: "PersonCore:Permission:PersonRelationship.Management";
39
+ };
40
+ readonly Religion: {
41
+ readonly Management: "PersonCore:Permission:Religion.Management";
42
+ };
43
+ readonly ContactRole: {
44
+ readonly Management: "PersonCore:Permission:ContactRole.Management";
45
+ };
46
+ };
47
+ };
48
+
49
+ /**
50
+ * Filters ContactAssignment rows for the current row context (Party record, or Party merge-detail under Customer).
51
+ */
52
+ declare function contactAssignmentPartyConditions(partyIdContextPath?: string): AXPQueryFilter[];
53
+ /**
54
+ * Actions for ContactAssignment when shown from Party/Customer/Supplier.
55
+ * Create menu: assign existing person or create new person with party prefilled.
56
+ */
57
+ declare function contactAssignmentDetailsCrudActionsForPartyContext(partyIdContextPath?: string): AXPEntityAction[];
58
+
59
+ /** Resolves party display title from host/process data (plain string or multi-language object). */
60
+ declare function resolveContactAssignmentPartyDisplayTitle(locale: string, ...candidates: unknown[]): string;
61
+ /** Builds a person snapshot for nested ContactAssignment display fields. */
62
+ declare function buildContactAssignmentPersonSnapshot(personRow: Record<string, unknown>, personId: string): {
63
+ id: string;
64
+ fullName?: string;
65
+ phones?: unknown;
66
+ emails?: unknown;
67
+ };
68
+ /** Resolves partyId and display title from command process/host payload. */
69
+ declare function resolveContactAssignmentPartyContext(processData: Record<string, unknown>, locale: string): {
70
+ partyId: string;
71
+ partyTitle: string;
72
+ };
73
+
74
+ /**
75
+ * Create action with submenu for Person Relationship entity (master list).
76
+ */
77
+ declare function personRelationshipMasterCreateAction(): AXPEntityAction;
78
+ /**
79
+ * Create action with submenu for Person Relationship when shown as related entity (e.g. in Person details).
80
+ * Injects fromPersonId from parent context.
81
+ */
82
+ declare function personRelationshipDetailsCreateActions(parentId: string): AXPEntityAction[];
83
+
84
+ declare const RootConfig: {
85
+ readonly config: {
86
+ i18n: string;
87
+ module: string;
88
+ };
89
+ readonly module: {
90
+ readonly name: string;
91
+ readonly title: `@${string}:module.title`;
92
+ readonly icon: "fa-light fa-user";
93
+ };
94
+ readonly entities: {
95
+ readonly person: {
96
+ readonly name: "Person";
97
+ readonly title: `@${string}:persons.entities.person.title`;
98
+ readonly titlePlural: `@${string}:persons.entities.person.plural`;
99
+ readonly icon: "fa-light fa-user";
100
+ };
101
+ readonly educationLevel: {
102
+ readonly name: "EducationLevel";
103
+ readonly title: `@${string}:education-levels.entities.education-level.title`;
104
+ readonly titlePlural: `@${string}:education-levels.entities.education-level.plural`;
105
+ readonly icon: "fa-light fa-graduation-cap";
106
+ };
107
+ readonly gender: {
108
+ readonly name: "Gender";
109
+ readonly title: `@${string}:genders.entities.gender.title`;
110
+ readonly titlePlural: `@${string}:genders.entities.gender.plural`;
111
+ readonly icon: "fa-light fa-venus-mars";
112
+ };
113
+ readonly maritalStatus: {
114
+ readonly name: "MaritalStatus";
115
+ readonly title: `@${string}:marital-statuses.entities.marital-status.title`;
116
+ readonly titlePlural: `@${string}:marital-statuses.entities.marital-status.plural`;
117
+ readonly icon: "fa-light fa-ring";
118
+ };
119
+ readonly personTitle: {
120
+ readonly name: "PersonTitle";
121
+ readonly title: `@${string}:person-titles.entities.person-title.title`;
122
+ readonly titlePlural: `@${string}:person-titles.entities.person-title.plural`;
123
+ readonly icon: "fa-light fa-user-tie";
124
+ };
125
+ readonly personIdentifierType: {
126
+ readonly name: "PersonIdentifierType";
127
+ readonly title: `@${string}:person-identifier-types.entities.person-identifier-type.title`;
128
+ readonly titlePlural: `@${string}:person-identifier-types.entities.person-identifier-type.plural`;
129
+ readonly icon: "fa-light fa-id-card";
130
+ };
131
+ readonly religion: {
132
+ readonly name: "Religion";
133
+ readonly title: `@${string}:religions.entities.religion.title`;
134
+ readonly titlePlural: `@${string}:religions.entities.religion.plural`;
135
+ readonly icon: "fa-light fa-place-of-worship";
136
+ };
137
+ readonly contactRole: {
138
+ readonly name: "ContactRole";
139
+ readonly title: `@${string}:contact-roles.entities.contact-role.title`;
140
+ readonly titlePlural: `@${string}:contact-roles.entities.contact-role.plural`;
141
+ readonly icon: "fa-light fa-user-tag";
142
+ };
143
+ readonly personRelationship: {
144
+ readonly name: "PersonRelationship";
145
+ readonly title: `@${string}:person-relationships.entities.person-relationship.title`;
146
+ readonly titlePlural: `@${string}:person-relationships.entities.person-relationship.plural`;
147
+ readonly icon: "fa-light fa-link";
148
+ };
149
+ readonly contactAssignment: {
150
+ readonly name: "ContactAssignment";
151
+ readonly title: `@${string}:contact-assignments.entities.contact-assignment.title`;
152
+ readonly titlePlural: `@${string}:contact-assignments.entities.contact-assignment.plural`;
153
+ readonly icon: "fa-light fa-address-book";
154
+ };
155
+ };
156
+ };
157
+
158
+ declare function contactAssignmentFactory(): Promise<AXPEntity>;
159
+
160
+ interface AXMPersonCoreContactAssignmentEntityModel extends AXPEntityModel<string> {
161
+ partyId: string;
162
+ personId: string;
163
+ roleId: string;
164
+ party?: {
165
+ id: string;
166
+ title: AXPMultiLanguageString;
167
+ };
168
+ person?: {
169
+ id: string;
170
+ fullName?: string;
171
+ phones?: unknown[];
172
+ emails?: unknown[];
173
+ };
174
+ role?: {
175
+ id: string;
176
+ title: AXPMultiLanguageString;
177
+ };
178
+ }
179
+
180
+ declare function contactRoleFactory(): Promise<AXPEntity>;
181
+
182
+ interface AXMPersonCoreContactRoleEntityModel {
183
+ id: string;
184
+ name: string;
185
+ title: AXPMultiLanguageString;
186
+ description?: AXPMultiLanguageString | null;
187
+ }
188
+
189
+ declare function educationLevelFactory(): Promise<AXPEntity>;
190
+
191
+ interface AXMPersonCoreEducationLevelEntityModel {
192
+ id: string;
193
+ title: AXPMultiLanguageString;
194
+ description?: AXPMultiLanguageString | null;
195
+ }
196
+
197
+ declare function genderFactory(): Promise<AXPEntity>;
198
+
199
+ interface AXMPersonCoreGenderEntityModel {
200
+ id: string;
201
+ title: AXPMultiLanguageString;
202
+ description?: AXPMultiLanguageString | null;
203
+ }
204
+
205
+ declare function maritalStatusFactory(): Promise<AXPEntity>;
206
+
207
+ interface AXMPersonCoreMaritalStatusEntityModel {
208
+ id: string;
209
+ title: AXPMultiLanguageString;
210
+ description?: AXPMultiLanguageString | null;
211
+ }
212
+
213
+ declare function personFactory(): Promise<AXPEntity>;
214
+
215
+ interface AXMPersonCorePersonEntityModel extends AXPEntityModel<string> {
216
+ firstName: string;
217
+ lastName: string;
218
+ /** Computed: firstName + " " + lastName (from computed-property plugin) */
219
+ fullName?: string;
220
+ personTitleId?: string;
221
+ personTitle?: {
222
+ id: string;
223
+ title: AXPMultiLanguageString;
224
+ };
225
+ birthDate?: string;
226
+ image?: string;
227
+ signature?: string;
228
+ genderId?: string;
229
+ gender?: {
230
+ id: string;
231
+ title: AXPMultiLanguageString;
232
+ };
233
+ identityNumber?: string;
234
+ maritalStatusId?: string;
235
+ maritalStatus?: {
236
+ id: string;
237
+ title: AXPMultiLanguageString;
238
+ };
239
+ educationLevelId?: string;
240
+ educationLevel?: {
241
+ id: string;
242
+ title: AXPMultiLanguageString;
243
+ };
244
+ phones?: Array<{
245
+ value: string;
246
+ }>;
247
+ emails?: Array<{
248
+ value: string;
249
+ }>;
250
+ addresses?: AXPAddressData[];
251
+ userId?: string;
252
+ }
253
+
254
+ declare function personIdentifierTypeFactory(): Promise<AXPEntity>;
255
+
256
+ interface AXMPersonCorePersonIdentifierTypeEntityModel {
257
+ id: string;
258
+ title: AXPMultiLanguageString;
259
+ description?: AXPMultiLanguageString | null;
260
+ scope: 'global' | 'national' | 'regional';
261
+ formatRegex?: string | null;
262
+ minLength?: number | null;
263
+ maxLength?: number | null;
264
+ isUnique: boolean;
265
+ }
266
+
267
+ declare function personRelationshipFactory(): Promise<AXPEntity | null>;
268
+
269
+ interface AXMPersonCorePersonRelationshipEntityModel extends AXPEntityModel<string> {
270
+ fromPersonId: string;
271
+ toPersonId: string;
272
+ typeId: string;
273
+ notes?: string;
274
+ meta?: Record<string, unknown>;
275
+ createdAt: Date;
276
+ updatedAt: Date;
277
+ }
278
+
279
+ declare function personTitleFactory(): Promise<AXPEntity>;
280
+
281
+ interface AXMPersonCorePersonTitleEntityModel {
282
+ id: string;
283
+ title: AXPMultiLanguageString;
284
+ description?: AXPMultiLanguageString | null;
285
+ }
286
+
287
+ declare function religionFactory(): Promise<AXPEntity>;
288
+
289
+ interface AXMPersonCoreReligionEntityModel {
290
+ id: string;
291
+ title: AXPMultiLanguageString;
292
+ description?: AXPMultiLanguageString | null;
293
+ }
294
+
295
+ export { AXMPersonCoreMenuKeys, AXMPersonCorePermissionKeys, RootConfig, buildContactAssignmentPersonSnapshot, contactAssignmentDetailsCrudActionsForPartyContext, contactAssignmentFactory, contactAssignmentPartyConditions, contactRoleFactory, educationLevelFactory, genderFactory, maritalStatusFactory, personFactory, personIdentifierTypeFactory, personRelationshipDetailsCreateActions, personRelationshipFactory, personRelationshipMasterCreateAction, personTitleFactory, religionFactory, resolveContactAssignmentPartyContext, resolveContactAssignmentPartyDisplayTitle };
296
+ export type { AXMPersonCoreContactAssignmentEntityModel, AXMPersonCoreContactRoleEntityModel, AXMPersonCoreEducationLevelEntityModel, AXMPersonCoreGenderEntityModel, AXMPersonCoreMaritalStatusEntityModel, AXMPersonCorePersonEntityModel, AXMPersonCorePersonIdentifierTypeEntityModel, AXMPersonCorePersonRelationshipEntityModel, AXMPersonCorePersonTitleEntityModel, AXMPersonCoreReligionEntityModel };
@@ -0,0 +1,32 @@
1
+ import * as i0 from '@angular/core';
2
+ import { AXPEntity } from '@acorex-platform/framework-shared/entity';
3
+ import { AXPEntityDefinitionLoader, AXPEntityPreloadEntity } from '@acorex-platform/framework-client/layout/entity';
4
+ import { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';
5
+ import { AXPPermissionDefinitionProvider, AXPPermissionDefinitionProviderContext } from '@acorex-platform/framework-client/auth';
6
+
7
+ declare class AXMPersonCoreModule {
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMPersonCoreModule, never>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXMPersonCoreModule, never, never, never>;
10
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXMPersonCoreModule>;
11
+ }
12
+
13
+ declare class AXMPersonCoreEntityProvider implements AXPEntityDefinitionLoader {
14
+ preload(): AXPEntityPreloadEntity[];
15
+ get(moduleName: string, entityName: string): Promise<AXPEntity | null>;
16
+ list(): Promise<{
17
+ name: string;
18
+ module: string;
19
+ }[]>;
20
+ }
21
+
22
+ declare class AXMPersonCoreMenuProvider implements AXPMenuProvider {
23
+ private readonly entityService;
24
+ provide(context: AXPMenuProviderContext): Promise<void>;
25
+ }
26
+
27
+ declare class AXMPersonCorePermissionDefinitionProvider implements AXPPermissionDefinitionProvider {
28
+ private readonly translationService;
29
+ define(context: AXPPermissionDefinitionProviderContext): Promise<void>;
30
+ }
31
+
32
+ export { AXMPersonCoreEntityProvider, AXMPersonCoreMenuProvider, AXMPersonCoreModule, AXMPersonCorePermissionDefinitionProvider };