@acorex/connectivity 21.0.0-next.3 → 21.0.0-next.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 (95) hide show
  1. package/fesm2022/{acorex-connectivity-api-execute.command-SGNBLcOi.mjs → acorex-connectivity-api-execute.command-CiBl7z_H.mjs} +6 -6
  2. package/fesm2022/acorex-connectivity-api-execute.command-CiBl7z_H.mjs.map +1 -0
  3. package/fesm2022/acorex-connectivity-api.mjs +101 -185
  4. package/fesm2022/acorex-connectivity-api.mjs.map +1 -1
  5. package/fesm2022/acorex-connectivity-mock-acorex-connectivity-mock-BpUUTZOi.mjs +65873 -0
  6. package/fesm2022/acorex-connectivity-mock-acorex-connectivity-mock-BpUUTZOi.mjs.map +1 -0
  7. package/fesm2022/acorex-connectivity-mock-assign-to-manager.activity-DTPM1eU1.mjs +79 -0
  8. package/fesm2022/acorex-connectivity-mock-assign-to-manager.activity-DTPM1eU1.mjs.map +1 -0
  9. package/fesm2022/acorex-connectivity-mock-category-metadata-inheritance.query-CWRL1dTa.mjs +198 -0
  10. package/fesm2022/acorex-connectivity-mock-category-metadata-inheritance.query-CWRL1dTa.mjs.map +1 -0
  11. package/fesm2022/{acorex-connectivity-mock-category-with-items.query-Dsxj98tX.mjs → acorex-connectivity-mock-category-with-items.query-Cj6FWu7S.mjs} +4 -4
  12. package/fesm2022/acorex-connectivity-mock-category-with-items.query-Cj6FWu7S.mjs.map +1 -0
  13. package/fesm2022/acorex-connectivity-mock-chat-generate-image.command-BA0r4IMn.mjs +114 -0
  14. package/fesm2022/acorex-connectivity-mock-chat-generate-image.command-BA0r4IMn.mjs.map +1 -0
  15. package/fesm2022/acorex-connectivity-mock-chat-synthesize-speech.command-B5-8a7SC.mjs +130 -0
  16. package/fesm2022/acorex-connectivity-mock-chat-synthesize-speech.command-B5-8a7SC.mjs.map +1 -0
  17. package/fesm2022/acorex-connectivity-mock-chat-transcribe-speech.command-BGzXvTnh.mjs +110 -0
  18. package/fesm2022/acorex-connectivity-mock-chat-transcribe-speech.command-BGzXvTnh.mjs.map +1 -0
  19. package/fesm2022/acorex-connectivity-mock-check-permission.activity-vr3OHtjC.mjs +45 -0
  20. package/fesm2022/acorex-connectivity-mock-check-permission.activity-vr3OHtjC.mjs.map +1 -0
  21. package/fesm2022/acorex-connectivity-mock-complete-signature-process.activity-BO-IFsHT.mjs +56 -0
  22. package/fesm2022/acorex-connectivity-mock-complete-signature-process.activity-BO-IFsHT.mjs.map +1 -0
  23. package/fesm2022/acorex-connectivity-mock-contact-core.module-5TLCGWOR.mjs +968 -0
  24. package/fesm2022/acorex-connectivity-mock-contact-core.module-5TLCGWOR.mjs.map +1 -0
  25. package/fesm2022/acorex-connectivity-mock-content-management.module-GQdqKsPB.mjs +16 -0
  26. package/fesm2022/acorex-connectivity-mock-content-management.module-GQdqKsPB.mjs.map +1 -0
  27. package/fesm2022/{acorex-connectivity-mock-distribution-record.command-DRiDwlqN.mjs → acorex-connectivity-mock-distribution-record.activity-DuNluOzA.mjs} +18 -6
  28. package/fesm2022/acorex-connectivity-mock-distribution-record.activity-DuNluOzA.mjs.map +1 -0
  29. package/fesm2022/acorex-connectivity-mock-entity-create.activity-Ca19tIj4.mjs +60 -0
  30. package/fesm2022/acorex-connectivity-mock-entity-create.activity-Ca19tIj4.mjs.map +1 -0
  31. package/fesm2022/acorex-connectivity-mock-entity-delete.activity-ErEN1c24.mjs +60 -0
  32. package/fesm2022/acorex-connectivity-mock-entity-delete.activity-ErEN1c24.mjs.map +1 -0
  33. package/fesm2022/acorex-connectivity-mock-entity-read.activity-1fJW8gVe.mjs +67 -0
  34. package/fesm2022/acorex-connectivity-mock-entity-read.activity-1fJW8gVe.mjs.map +1 -0
  35. package/fesm2022/acorex-connectivity-mock-entity-update.activity-D0hyBha-.mjs +70 -0
  36. package/fesm2022/acorex-connectivity-mock-entity-update.activity-D0hyBha-.mjs.map +1 -0
  37. package/fesm2022/acorex-connectivity-mock-extract-document-text.command-nGfUTSf6.mjs +64 -0
  38. package/fesm2022/acorex-connectivity-mock-extract-document-text.command-nGfUTSf6.mjs.map +1 -0
  39. package/fesm2022/acorex-connectivity-mock-get-application-versions-chart-data.query-DwVuYuKx.mjs +115 -0
  40. package/fesm2022/acorex-connectivity-mock-get-application-versions-chart-data.query-DwVuYuKx.mjs.map +1 -0
  41. package/fesm2022/acorex-connectivity-mock-get-application-versions-timeline.query-sFKYynZA.mjs +163 -0
  42. package/fesm2022/acorex-connectivity-mock-get-application-versions-timeline.query-sFKYynZA.mjs.map +1 -0
  43. package/fesm2022/acorex-connectivity-mock-get-current-session-user.activity-C6S4ZJgp.mjs +35 -0
  44. package/fesm2022/acorex-connectivity-mock-get-current-session-user.activity-C6S4ZJgp.mjs.map +1 -0
  45. package/fesm2022/acorex-connectivity-mock-get-current-user-manager.activity-C1mj2bgB.mjs +69 -0
  46. package/fesm2022/acorex-connectivity-mock-get-current-user-manager.activity-C1mj2bgB.mjs.map +1 -0
  47. package/fesm2022/acorex-connectivity-mock-get-employee-list.query-DifHwuqH.mjs +213 -0
  48. package/fesm2022/acorex-connectivity-mock-get-employee-list.query-DifHwuqH.mjs.map +1 -0
  49. package/fesm2022/acorex-connectivity-mock-get-location-list.query-bMjkZnzq.mjs +209 -0
  50. package/fesm2022/acorex-connectivity-mock-get-location-list.query-bMjkZnzq.mjs.map +1 -0
  51. package/fesm2022/acorex-connectivity-mock-get-product-chart-data.query-D7DBzLT-.mjs +186 -0
  52. package/fesm2022/acorex-connectivity-mock-get-product-chart-data.query-D7DBzLT-.mjs.map +1 -0
  53. package/fesm2022/acorex-connectivity-mock-get-product-list.query-B06aC73T.mjs +251 -0
  54. package/fesm2022/acorex-connectivity-mock-get-product-list.query-B06aC73T.mjs.map +1 -0
  55. package/fesm2022/acorex-connectivity-mock-get-product-pdf-data.query-CM7bsjl7.mjs +192 -0
  56. package/fesm2022/acorex-connectivity-mock-get-product-pdf-data.query-CM7bsjl7.mjs.map +1 -0
  57. package/fesm2022/acorex-connectivity-mock-get-subscriptions-chart-data.query-BQT5a_hn.mjs +56 -0
  58. package/fesm2022/acorex-connectivity-mock-get-subscriptions-chart-data.query-BQT5a_hn.mjs.map +1 -0
  59. package/fesm2022/acorex-connectivity-mock-get-subscriptions-timeline.query-D4qfDfeV.mjs +246 -0
  60. package/fesm2022/acorex-connectivity-mock-get-subscriptions-timeline.query-D4qfDfeV.mjs.map +1 -0
  61. package/fesm2022/acorex-connectivity-mock-get-tenant-application-access.query-n1_Azada.mjs +258 -0
  62. package/fesm2022/acorex-connectivity-mock-get-tenant-application-access.query-n1_Azada.mjs.map +1 -0
  63. package/fesm2022/acorex-connectivity-mock-get-tenant-registration-chart-data.query-Cg4ykZU2.mjs +56 -0
  64. package/fesm2022/acorex-connectivity-mock-get-tenant-registration-chart-data.query-Cg4ykZU2.mjs.map +1 -0
  65. package/fesm2022/acorex-connectivity-mock-get-tenant-registration-timeline.query-0sCBtdbp.mjs +294 -0
  66. package/fesm2022/acorex-connectivity-mock-get-tenant-registration-timeline.query-0sCBtdbp.mjs.map +1 -0
  67. package/fesm2022/acorex-connectivity-mock-get-tenant-user-distribution.query-rD811gtM.mjs +212 -0
  68. package/fesm2022/acorex-connectivity-mock-get-tenant-user-distribution.query-rD811gtM.mjs.map +1 -0
  69. package/fesm2022/acorex-connectivity-mock-if.activity-DvzuhItL.mjs +35 -0
  70. package/fesm2022/acorex-connectivity-mock-if.activity-DvzuhItL.mjs.map +1 -0
  71. package/fesm2022/acorex-connectivity-mock-notify-signers.activity-Dg0sKGip.mjs +49 -0
  72. package/fesm2022/acorex-connectivity-mock-notify-signers.activity-Dg0sKGip.mjs.map +1 -0
  73. package/fesm2022/acorex-connectivity-mock-request-signature.activity-CoRT_H2u.mjs +60 -0
  74. package/fesm2022/acorex-connectivity-mock-request-signature.activity-CoRT_H2u.mjs.map +1 -0
  75. package/fesm2022/{acorex-connectivity-mock-sample.command-CkH5bmEs.mjs → acorex-connectivity-mock-sample.command-CJmDL4pL.mjs} +4 -4
  76. package/fesm2022/acorex-connectivity-mock-sample.command-CJmDL4pL.mjs.map +1 -0
  77. package/fesm2022/acorex-connectivity-mock-structured-text-completion.command-l31pjl9-.mjs +38 -0
  78. package/fesm2022/acorex-connectivity-mock-structured-text-completion.command-l31pjl9-.mjs.map +1 -0
  79. package/fesm2022/acorex-connectivity-mock-validate-all-signatures.activity-JuHjNFFS.mjs +61 -0
  80. package/fesm2022/acorex-connectivity-mock-validate-all-signatures.activity-JuHjNFFS.mjs.map +1 -0
  81. package/fesm2022/acorex-connectivity-mock.mjs +1 -51504
  82. package/fesm2022/acorex-connectivity-mock.mjs.map +1 -1
  83. package/fesm2022/acorex-connectivity-utils.mjs +7 -7
  84. package/fesm2022/acorex-connectivity-utils.mjs.map +1 -1
  85. package/fesm2022/acorex-connectivity.mjs.map +1 -1
  86. package/package.json +8 -7
  87. package/{api/index.d.ts → types/acorex-connectivity-api.d.ts} +1 -59
  88. package/types/acorex-connectivity-mock.d.ts +3951 -0
  89. package/fesm2022/acorex-connectivity-api-execute.command-SGNBLcOi.mjs.map +0 -1
  90. package/fesm2022/acorex-connectivity-mock-category-with-items.query-Dsxj98tX.mjs.map +0 -1
  91. package/fesm2022/acorex-connectivity-mock-distribution-record.command-DRiDwlqN.mjs.map +0 -1
  92. package/fesm2022/acorex-connectivity-mock-sample.command-CkH5bmEs.mjs.map +0 -1
  93. package/mock/index.d.ts +0 -2775
  94. /package/{utils/index.d.ts → types/acorex-connectivity-utils.d.ts} +0 -0
  95. /package/{index.d.ts → types/acorex-connectivity.d.ts} +0 -0
@@ -0,0 +1,163 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Injectable } from '@angular/core';
3
+ import { AXPEntityService } from '@acorex/platform/layout/entity';
4
+ import { RootConfig } from '@acorex/modules/application-management';
5
+
6
+ //#endregion
7
+ class GetApplicationVersionsTimelineQuery {
8
+ constructor() {
9
+ this.entityService = inject(AXPEntityService);
10
+ this.appVersionService = this.entityService
11
+ .withEntity(`${RootConfig.module.name}.${RootConfig.entities.appVersion.name}`)
12
+ .data();
13
+ }
14
+ async fetch(input) {
15
+ // Get all app versions from storage
16
+ const allVersionsResult = await this.appVersionService.query({
17
+ skip: 0,
18
+ take: 10000, // Get all versions for aggregation
19
+ filter: input.filters && input.filters.length > 0
20
+ ? {
21
+ logic: input.logic || 'and',
22
+ filters: input.filters,
23
+ }
24
+ : undefined,
25
+ });
26
+ let allVersions = allVersionsResult.items;
27
+ // Apply date range filter if provided
28
+ if (input.filters) {
29
+ for (const filter of input.filters) {
30
+ if (filter.field === 'dateRange' && filter.value) {
31
+ allVersions = this.applyDateRangeFilter(allVersions, filter.value);
32
+ }
33
+ if (filter.field === 'versionNumber' && filter.value) {
34
+ allVersions = this.applyVersionNumberFilter(allVersions, filter.value);
35
+ }
36
+ }
37
+ }
38
+ // Group versions by time period (month/quarter/year)
39
+ const periodGroups = new Map();
40
+ for (const version of allVersions) {
41
+ const publishDate = new Date(version.publishDate);
42
+ const year = publishDate.getFullYear();
43
+ const month = publishDate.getMonth() + 1;
44
+ const quarter = Math.ceil(month / 3);
45
+ const monthName = publishDate.toLocaleString('en-US', { month: 'long' });
46
+ const quarterName = `Q${quarter}`;
47
+ const periodKey = `${year}-${String(month).padStart(2, '0')}`;
48
+ if (!periodGroups.has(periodKey)) {
49
+ periodGroups.set(periodKey, []);
50
+ }
51
+ periodGroups.get(periodKey).push(version);
52
+ }
53
+ // Create timeline results
54
+ const timelineResults = [];
55
+ for (const version of allVersions) {
56
+ const publishDate = new Date(version.publishDate);
57
+ const year = publishDate.getFullYear();
58
+ const month = publishDate.getMonth() + 1;
59
+ const quarter = Math.ceil(month / 3);
60
+ const monthName = publishDate.toLocaleString('en-US', { month: 'long' });
61
+ const quarterName = `Q${quarter}`;
62
+ const periodKey = `${year}-${String(month).padStart(2, '0')}`;
63
+ const versionsInPeriod = periodGroups.get(periodKey)?.length || 0;
64
+ timelineResults.push({
65
+ versionNumber: version.versionNumber,
66
+ publishDate: version.publishDate,
67
+ publishDateObj: publishDate,
68
+ year,
69
+ month: monthName,
70
+ monthNumber: month,
71
+ quarter: quarterName,
72
+ versionCount: versionsInPeriod,
73
+ });
74
+ }
75
+ // Apply sorting if provided
76
+ if (input.sort && input.sort.length > 0) {
77
+ timelineResults.sort((a, b) => {
78
+ for (const sortField of input.sort) {
79
+ const field = sortField.field;
80
+ const aValue = a[field];
81
+ const bValue = b[field];
82
+ const dir = sortField.dir === 'asc' ? 1 : -1;
83
+ // Handle undefined values
84
+ if (aValue === undefined && bValue === undefined)
85
+ continue;
86
+ if (aValue === undefined)
87
+ return 1 * dir;
88
+ if (bValue === undefined)
89
+ return -1 * dir;
90
+ // Handle date comparison
91
+ if (field === 'publishDateObj') {
92
+ const aDate = a.publishDateObj.getTime();
93
+ const bDate = b.publishDateObj.getTime();
94
+ if (aDate < bDate)
95
+ return -1 * dir;
96
+ if (aDate > bDate)
97
+ return 1 * dir;
98
+ continue;
99
+ }
100
+ if (aValue < bValue)
101
+ return -1 * dir;
102
+ if (aValue > bValue)
103
+ return 1 * dir;
104
+ }
105
+ return 0;
106
+ });
107
+ }
108
+ else {
109
+ // Default sort by publish date descending (newest first)
110
+ timelineResults.sort((a, b) => {
111
+ return b.publishDateObj.getTime() - a.publishDateObj.getTime();
112
+ });
113
+ }
114
+ // Apply pagination
115
+ const skip = input.skip || 0;
116
+ const take = input.take || 10;
117
+ const total = timelineResults.length;
118
+ const items = timelineResults.slice(skip, skip + take);
119
+ return {
120
+ items,
121
+ total,
122
+ };
123
+ }
124
+ //#region ---- Custom Filter Handlers ----
125
+ /**
126
+ * Apply date range filter to versions
127
+ */
128
+ applyDateRangeFilter(versions, dateRange) {
129
+ if (!dateRange || !dateRange.start || !dateRange.end) {
130
+ return versions;
131
+ }
132
+ const startDate = new Date(dateRange.start);
133
+ const endDate = new Date(dateRange.end);
134
+ endDate.setHours(23, 59, 59, 999); // Include the entire end date
135
+ return versions.filter((version) => {
136
+ const publishDate = new Date(version.publishDate);
137
+ return publishDate >= startDate && publishDate <= endDate;
138
+ });
139
+ }
140
+ /**
141
+ * Apply version number filter to versions
142
+ */
143
+ applyVersionNumberFilter(versions, versionNumber) {
144
+ if (!versionNumber) {
145
+ return versions;
146
+ }
147
+ const searchTerm = versionNumber.toLowerCase().trim();
148
+ return versions.filter((version) => {
149
+ return version.versionNumber.toLowerCase().includes(searchTerm);
150
+ });
151
+ }
152
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetApplicationVersionsTimelineQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
153
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetApplicationVersionsTimelineQuery, providedIn: 'root' }); }
154
+ }
155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetApplicationVersionsTimelineQuery, decorators: [{
156
+ type: Injectable,
157
+ args: [{
158
+ providedIn: 'root',
159
+ }]
160
+ }] });
161
+
162
+ export { GetApplicationVersionsTimelineQuery };
163
+ //# sourceMappingURL=acorex-connectivity-mock-get-application-versions-timeline.query-sFKYynZA.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-connectivity-mock-get-application-versions-timeline.query-sFKYynZA.mjs","sources":["../../../../libs/connectivity/mock/src/lib/application-management/reports/get-application-versions-timeline.query.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { AXPQuery } from '@acorex/platform/runtime';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXMAppVersionEntityModel } from '@acorex/modules/application-management';\nimport { RootConfig } from '@acorex/modules/application-management';\n\n//#region ---- Query Input/Output Types ----\n\nexport interface GetApplicationVersionsTimelineQueryInput {\n skip?: number;\n take?: number;\n sort?: Array<{ field: string; dir: 'asc' | 'desc' }>;\n filters?: Array<{\n field: string;\n operator: { type: string };\n value: any;\n }>;\n logic?: 'and' | 'or';\n}\n\nexport interface ApplicationVersionTimelineResult {\n versionNumber: string;\n publishDate: string;\n publishDateObj: Date;\n year: number;\n month: string;\n monthNumber: number;\n quarter: string;\n versionCount: number;\n}\n\nexport interface GetApplicationVersionsTimelineQueryResult {\n items: ApplicationVersionTimelineResult[];\n total: number;\n}\n\n//#endregion\n\n@Injectable({\n providedIn: 'root',\n})\nexport class GetApplicationVersionsTimelineQuery\n implements AXPQuery<GetApplicationVersionsTimelineQueryInput, GetApplicationVersionsTimelineQueryResult> {\n\n\n private readonly entityService = inject(AXPEntityService);\n private appVersionService = this.entityService\n .withEntity(`${RootConfig.module.name}.${RootConfig.entities.appVersion.name}`)\n .data<string, AXMAppVersionEntityModel>();\n\n async fetch(input: GetApplicationVersionsTimelineQueryInput): Promise<GetApplicationVersionsTimelineQueryResult> {\n // Get all app versions from storage\n const allVersionsResult = await this.appVersionService.query({\n skip: 0,\n take: 10000, // Get all versions for aggregation\n filter:\n input.filters && input.filters.length > 0\n ? ({\n logic: input.logic || 'and',\n filters: input.filters,\n } as any)\n : undefined,\n });\n\n let allVersions = allVersionsResult.items;\n\n // Apply date range filter if provided\n if (input.filters) {\n for (const filter of input.filters) {\n if (filter.field === 'dateRange' && filter.value) {\n allVersions = this.applyDateRangeFilter(allVersions, filter.value);\n }\n if (filter.field === 'versionNumber' && filter.value) {\n allVersions = this.applyVersionNumberFilter(allVersions, filter.value);\n }\n }\n }\n\n // Group versions by time period (month/quarter/year)\n const periodGroups = new Map<string, AXMAppVersionEntityModel[]>();\n\n for (const version of allVersions) {\n const publishDate = new Date(version.publishDate);\n const year = publishDate.getFullYear();\n const month = publishDate.getMonth() + 1;\n const quarter = Math.ceil(month / 3);\n const monthName = publishDate.toLocaleString('en-US', { month: 'long' });\n const quarterName = `Q${quarter}`;\n const periodKey = `${year}-${String(month).padStart(2, '0')}`;\n\n if (!periodGroups.has(periodKey)) {\n periodGroups.set(periodKey, []);\n }\n\n periodGroups.get(periodKey)!.push(version);\n }\n\n // Create timeline results\n const timelineResults: ApplicationVersionTimelineResult[] = [];\n\n for (const version of allVersions) {\n const publishDate = new Date(version.publishDate);\n const year = publishDate.getFullYear();\n const month = publishDate.getMonth() + 1;\n const quarter = Math.ceil(month / 3);\n const monthName = publishDate.toLocaleString('en-US', { month: 'long' });\n const quarterName = `Q${quarter}`;\n const periodKey = `${year}-${String(month).padStart(2, '0')}`;\n\n const versionsInPeriod = periodGroups.get(periodKey)?.length || 0;\n\n timelineResults.push({\n versionNumber: version.versionNumber,\n publishDate: version.publishDate,\n publishDateObj: publishDate,\n year,\n month: monthName,\n monthNumber: month,\n quarter: quarterName,\n versionCount: versionsInPeriod,\n });\n }\n\n // Apply sorting if provided\n if (input.sort && input.sort.length > 0) {\n timelineResults.sort((a, b) => {\n for (const sortField of input.sort!) {\n const field = sortField.field as keyof ApplicationVersionTimelineResult;\n const aValue = a[field];\n const bValue = b[field];\n const dir = sortField.dir === 'asc' ? 1 : -1;\n\n // Handle undefined values\n if (aValue === undefined && bValue === undefined) continue;\n if (aValue === undefined) return 1 * dir;\n if (bValue === undefined) return -1 * dir;\n\n // Handle date comparison\n if (field === 'publishDateObj') {\n const aDate = a.publishDateObj.getTime();\n const bDate = b.publishDateObj.getTime();\n if (aDate < bDate) return -1 * dir;\n if (aDate > bDate) return 1 * dir;\n continue;\n }\n\n if (aValue < bValue) return -1 * dir;\n if (aValue > bValue) return 1 * dir;\n }\n return 0;\n });\n } else {\n // Default sort by publish date descending (newest first)\n timelineResults.sort((a, b) => {\n return b.publishDateObj.getTime() - a.publishDateObj.getTime();\n });\n }\n\n // Apply pagination\n const skip = input.skip || 0;\n const take = input.take || 10;\n const total = timelineResults.length;\n const items = timelineResults.slice(skip, skip + take);\n\n return {\n items,\n total,\n };\n }\n\n //#region ---- Custom Filter Handlers ----\n\n /**\n * Apply date range filter to versions\n */\n private applyDateRangeFilter(versions: AXMAppVersionEntityModel[], dateRange: any): AXMAppVersionEntityModel[] {\n if (!dateRange || !dateRange.start || !dateRange.end) {\n return versions;\n }\n\n const startDate = new Date(dateRange.start);\n const endDate = new Date(dateRange.end);\n endDate.setHours(23, 59, 59, 999); // Include the entire end date\n\n return versions.filter((version) => {\n const publishDate = new Date(version.publishDate);\n return publishDate >= startDate && publishDate <= endDate;\n });\n }\n\n /**\n * Apply version number filter to versions\n */\n private applyVersionNumberFilter(\n versions: AXMAppVersionEntityModel[],\n versionNumber: string\n ): AXMAppVersionEntityModel[] {\n if (!versionNumber) {\n return versions;\n }\n\n const searchTerm = versionNumber.toLowerCase().trim();\n\n return versions.filter((version) => {\n return version.versionNumber.toLowerCase().includes(searchTerm);\n });\n }\n\n //#endregion\n}\n\n"],"names":[],"mappings":";;;;;AAoCA;MAKa,mCAAmC,CAAA;AAHhD,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;QACjD,IAAA,CAAA,iBAAiB,GAAG,IAAI,CAAC;AAC9B,aAAA,UAAU,CAAC,CAAA,EAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAA,CAAA,EAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE;AAC7E,aAAA,IAAI,EAAoC;AAiK5C,IAAA;IA/JC,MAAM,KAAK,CAAC,KAA+C,EAAA;;QAEzD,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC;AAC3D,YAAA,IAAI,EAAE,CAAC;YACP,IAAI,EAAE,KAAK;YACX,MAAM,EACJ,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG;AACtC,kBAAG;AACD,oBAAA,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK;oBAC3B,OAAO,EAAE,KAAK,CAAC,OAAO;AACf;AACT,kBAAE,SAAS;AAChB,SAAA,CAAC;AAEF,QAAA,IAAI,WAAW,GAAG,iBAAiB,CAAC,KAAK;;AAGzC,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C,aAAa,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC;AACjE,QAAA,CAAC,CAAC;IACJ;8GArKW,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mCAAmC,cAFlC,MAAM,EAAA,CAAA,CAAA;;2FAEP,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAH/C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;;;"}
@@ -0,0 +1,35 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Injectable } from '@angular/core';
3
+ import { AXPSessionService } from '@acorex/platform/auth';
4
+
5
+ /**
6
+ * Returns the platform user id of the current session (workflow initiator when run in UI).
7
+ *
8
+ * Activity Type: workflow-activity:get-current-session-user
9
+ */
10
+ class GetCurrentSessionUserActivity {
11
+ constructor() {
12
+ this.sessionService = inject(AXPSessionService);
13
+ }
14
+ async execute() {
15
+ const userId = this.sessionService.user?.id ?? null;
16
+ return {
17
+ success: true,
18
+ data: { userId },
19
+ metadata: {
20
+ outcome: 'Done',
21
+ },
22
+ };
23
+ }
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetCurrentSessionUserActivity, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
25
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetCurrentSessionUserActivity, providedIn: 'root' }); }
26
+ }
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetCurrentSessionUserActivity, decorators: [{
28
+ type: Injectable,
29
+ args: [{
30
+ providedIn: 'root',
31
+ }]
32
+ }] });
33
+
34
+ export { GetCurrentSessionUserActivity };
35
+ //# sourceMappingURL=acorex-connectivity-mock-get-current-session-user.activity-C6S4ZJgp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-connectivity-mock-get-current-session-user.activity-C6S4ZJgp.mjs","sources":["../../../../libs/connectivity/mock/src/lib/workflow-management/activities/get-current-session-user.activity.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { AXPExecuteCommandResult } from '@acorex/platform/core';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { AXPSessionService } from '@acorex/platform/auth';\n\nexport interface GetCurrentSessionUserOutput {\n userId: string | null;\n}\n\n/**\n * Returns the platform user id of the current session (workflow initiator when run in UI).\n *\n * Activity Type: workflow-activity:get-current-session-user\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class GetCurrentSessionUserActivity\n implements AXPCommand<Record<string, never>, GetCurrentSessionUserOutput>\n{\n private readonly sessionService = inject(AXPSessionService);\n\n async execute(): Promise<AXPExecuteCommandResult<GetCurrentSessionUserOutput>> {\n const userId = this.sessionService.user?.id ?? null;\n return {\n success: true,\n data: { userId },\n metadata: {\n outcome: 'Done',\n },\n };\n }\n}\n"],"names":[],"mappings":";;;;AASA;;;;AAIG;MAIU,6BAA6B,CAAA;AAH1C,IAAA,WAAA,GAAA;AAMmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAY5D,IAAA;AAVC,IAAA,MAAM,OAAO,GAAA;QACX,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,IAAI,IAAI;QACnD,OAAO;AACL,YAAA,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,EAAE,MAAM,EAAE;AAChB,YAAA,QAAQ,EAAE;AACR,gBAAA,OAAO,EAAE,MAAM;AAChB,aAAA;SACF;IACH;8GAdW,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA7B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6BAA6B,cAF5B,MAAM,EAAA,CAAA,CAAA;;2FAEP,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAHzC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;;;"}
@@ -0,0 +1,69 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Injectable } from '@angular/core';
3
+ import { AXPEntityStorageService } from '@acorex/platform/layout/entity';
4
+ import { AXPSessionService } from '@acorex/platform/auth';
5
+
6
+ const EMPLOYEE_ENTITY = 'HumanCapitalManagement.Employee';
7
+ /**
8
+ * Get Current User Manager Activity (Backend - Mock)
9
+ *
10
+ * Resolves the manager of the current user (Employee → managerId → manager's userId).
11
+ * Use when assigning a review task to the current user's manager (e.g. questionnaire review)
12
+ * without a leave request or other ref entity.
13
+ *
14
+ * Execution Mode: backend
15
+ * Activity Type: workflow-activity:get-current-user-manager
16
+ */
17
+ class GetCurrentUserManagerActivity {
18
+ constructor() {
19
+ this.entityStorage = inject(AXPEntityStorageService);
20
+ this.sessionService = inject(AXPSessionService);
21
+ }
22
+ async execute() {
23
+ let managerId = null;
24
+ const userId = this.sessionService.user?.id;
25
+ if (userId) {
26
+ try {
27
+ const result = await this.entityStorage.query(EMPLOYEE_ENTITY, {
28
+ skip: 0,
29
+ take: 1,
30
+ filter: {
31
+ field: 'userId',
32
+ operator: { type: 'equal' },
33
+ value: userId,
34
+ },
35
+ });
36
+ const employees = result.items;
37
+ const employee = employees?.[0];
38
+ const managerEmployeeId = employee?.managerId;
39
+ if (managerEmployeeId) {
40
+ const managerEmp = (await this.entityStorage.getOne(EMPLOYEE_ENTITY, managerEmployeeId));
41
+ managerId = managerEmp?.userId ?? managerEmployeeId;
42
+ }
43
+ }
44
+ catch {
45
+ // keep managerId null
46
+ }
47
+ }
48
+ return {
49
+ success: true,
50
+ data: {
51
+ managerId,
52
+ },
53
+ metadata: {
54
+ outcome: 'Done',
55
+ },
56
+ };
57
+ }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetCurrentUserManagerActivity, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
59
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetCurrentUserManagerActivity, providedIn: 'root' }); }
60
+ }
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetCurrentUserManagerActivity, decorators: [{
62
+ type: Injectable,
63
+ args: [{
64
+ providedIn: 'root',
65
+ }]
66
+ }] });
67
+
68
+ export { GetCurrentUserManagerActivity };
69
+ //# sourceMappingURL=acorex-connectivity-mock-get-current-user-manager.activity-C1mj2bgB.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-connectivity-mock-get-current-user-manager.activity-C1mj2bgB.mjs","sources":["../../../../libs/connectivity/mock/src/lib/workflow-management/activities/get-current-user-manager.activity.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { AXPExecuteCommandResult } from '@acorex/platform/core';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { AXPEntityStorageService } from '@acorex/platform/layout/entity';\nimport { AXPSessionService } from '@acorex/platform/auth';\n\nconst EMPLOYEE_ENTITY = 'HumanCapitalManagement.Employee';\n\nexport interface GetCurrentUserManagerOutput {\n managerId: string | null;\n}\n\n/**\n * Get Current User Manager Activity (Backend - Mock)\n *\n * Resolves the manager of the current user (Employee → managerId → manager's userId).\n * Use when assigning a review task to the current user's manager (e.g. questionnaire review)\n * without a leave request or other ref entity.\n *\n * Execution Mode: backend\n * Activity Type: workflow-activity:get-current-user-manager\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class GetCurrentUserManagerActivity implements AXPCommand<Record<string, never>, GetCurrentUserManagerOutput> {\n private readonly entityStorage = inject(AXPEntityStorageService);\n private readonly sessionService = inject(AXPSessionService);\n\n async execute(): Promise<AXPExecuteCommandResult<GetCurrentUserManagerOutput>> {\n let managerId: string | null = null;\n const userId = this.sessionService.user?.id;\n\n if (userId) {\n try {\n const result = await this.entityStorage.query(EMPLOYEE_ENTITY, {\n skip: 0,\n take: 1,\n filter: {\n field: 'userId',\n operator: { type: 'equal' },\n value: userId,\n },\n });\n const employees = result.items as { id: string; managerId?: string | null }[] | undefined;\n const employee = employees?.[0];\n const managerEmployeeId = employee?.managerId;\n\n if (managerEmployeeId) {\n const managerEmp = (await this.entityStorage.getOne(EMPLOYEE_ENTITY, managerEmployeeId)) as {\n userId?: string;\n } | null;\n managerId = managerEmp?.userId ?? managerEmployeeId;\n }\n } catch {\n // keep managerId null\n }\n }\n\n return {\n success: true,\n data: {\n managerId,\n },\n metadata: {\n outcome: 'Done',\n },\n };\n }\n}\n"],"names":[],"mappings":";;;;;AAMA,MAAM,eAAe,GAAG,iCAAiC;AAMzD;;;;;;;;;AASG;MAIU,6BAA6B,CAAA;AAH1C,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC/C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AA0C5D,IAAA;AAxCC,IAAA,MAAM,OAAO,GAAA;QACX,IAAI,SAAS,GAAkB,IAAI;QACnC,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE;QAE3C,IAAI,MAAM,EAAE;AACV,YAAA,IAAI;gBACF,MA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AA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;;;"}
@@ -0,0 +1,213 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Injectable } from '@angular/core';
3
+ import { AXPEntityService } from '@acorex/platform/layout/entity';
4
+ import { RootConfig } from '@acorex/modules/human-capital-management';
5
+
6
+ //#endregion
7
+ class GetEmployeeListQuery {
8
+ constructor() {
9
+ this.entityService = inject(AXPEntityService);
10
+ this.employeeService = this.entityService
11
+ .withEntity(`${RootConfig.module.name}.${RootConfig.entities.employee.name}`)
12
+ .data();
13
+ }
14
+ async fetch(input) {
15
+ // Extract employee-specific filters from AXPFilterClause format
16
+ const extractedFilters = this.extractEmployeeFilters(input.filters);
17
+ // Separate custom filters from entity filters
18
+ const entityFilters = [];
19
+ if (extractedFilters && extractedFilters.length > 0) {
20
+ for (const filter of extractedFilters) {
21
+ entityFilters.push(filter);
22
+ }
23
+ }
24
+ // Get all employees from storage with entity filters
25
+ const allEmployeesResult = await this.employeeService.query({
26
+ skip: 0,
27
+ take: 10000, // Get all employees for aggregation
28
+ filter: entityFilters.length > 0
29
+ ? {
30
+ logic: input.logic || 'and',
31
+ filters: entityFilters,
32
+ }
33
+ : undefined,
34
+ });
35
+ const allEmployees = allEmployeesResult.items;
36
+ // Group employees by department and team
37
+ const departmentGroups = new Map();
38
+ for (const employee of allEmployees) {
39
+ // Get department from position (assuming position has departmentId)
40
+ const departmentId = employee.position?.departmentId || employee.departmentId || 'unknown';
41
+ const departmentTitle = employee.position?.department?.title || 'Unknown Department';
42
+ // Get team from team memberships (assuming employee has teamId or teamMemberships)
43
+ const teamId = employee.teamId || employee.teamMemberships?.[0]?.teamId || undefined;
44
+ const teamTitle = employee.team?.title || employee.teamMemberships?.[0]?.team?.title || undefined;
45
+ const teamKey = teamId || 'no-team';
46
+ if (!departmentGroups.has(departmentId)) {
47
+ departmentGroups.set(departmentId, new Map());
48
+ }
49
+ const teamMap = departmentGroups.get(departmentId);
50
+ if (!teamMap.has(teamKey)) {
51
+ teamMap.set(teamKey, []);
52
+ }
53
+ teamMap.get(teamKey).push(employee);
54
+ }
55
+ // Aggregate data by department and team
56
+ const aggregatedResults = [];
57
+ for (const [departmentId, teamMap] of departmentGroups.entries()) {
58
+ const firstEmployee = Array.from(teamMap.values())[0]?.[0];
59
+ const departmentTitle = firstEmployee?.position?.department?.title || 'Unknown Department';
60
+ for (const [teamKey, employees] of teamMap.entries()) {
61
+ const teamId = teamKey !== 'no-team' ? teamKey : undefined;
62
+ const teamTitle = teamKey !== 'no-team' ? employees[0]?.team?.title || employees[0]?.teamMemberships?.[0]?.team?.title : undefined;
63
+ // Calculate average experience (years since hire date)
64
+ const now = new Date();
65
+ const experiences = employees
66
+ .map((emp) => {
67
+ if (!emp.hireDate)
68
+ return 0;
69
+ const hireDate = new Date(emp.hireDate);
70
+ const diffTime = Math.abs(now.getTime() - hireDate.getTime());
71
+ return diffTime / (1000 * 60 * 60 * 24 * 365.25); // Convert to years
72
+ })
73
+ .filter((exp) => exp > 0);
74
+ const averageExperience = experiences.length > 0 ? experiences.reduce((sum, exp) => sum + exp, 0) / experiences.length : 0;
75
+ // Get unique employment types
76
+ const employmentTypeSet = new Set();
77
+ for (const employee of employees) {
78
+ if (employee.employmentType?.title) {
79
+ employmentTypeSet.add(employee.employmentType.title);
80
+ }
81
+ }
82
+ const employmentTypes = Array.from(employmentTypeSet).join(', ') || 'N/A';
83
+ aggregatedResults.push({
84
+ departmentId,
85
+ departmentTitle,
86
+ teamId,
87
+ teamTitle,
88
+ employeeCount: employees.length,
89
+ employmentTypes,
90
+ averageExperience: Number(averageExperience.toFixed(2)),
91
+ totalEmployees: employees.length,
92
+ });
93
+ }
94
+ }
95
+ // Apply sorting if provided
96
+ if (input.sort && input.sort.length > 0) {
97
+ aggregatedResults.sort((a, b) => {
98
+ for (const sortField of input.sort) {
99
+ const field = sortField.field;
100
+ const aValue = a[field];
101
+ const bValue = b[field];
102
+ const dir = sortField.dir === 'asc' ? 1 : -1;
103
+ // Handle undefined values
104
+ if (aValue === undefined && bValue === undefined)
105
+ continue;
106
+ if (aValue === undefined)
107
+ return 1 * dir;
108
+ if (bValue === undefined)
109
+ return -1 * dir;
110
+ if (aValue < bValue)
111
+ return -1 * dir;
112
+ if (aValue > bValue)
113
+ return 1 * dir;
114
+ }
115
+ return 0;
116
+ });
117
+ }
118
+ // Apply pagination
119
+ const skip = input.skip || 0;
120
+ const take = input.take || 10;
121
+ const total = aggregatedResults.length;
122
+ const items = aggregatedResults.slice(skip, skip + take);
123
+ return {
124
+ items,
125
+ total,
126
+ };
127
+ }
128
+ //#region ---- Filter Extraction ----
129
+ /**
130
+ * Extract employee-specific filters from AXPFilterClause format
131
+ * Maps report parameter paths to employee entity field names
132
+ */
133
+ extractEmployeeFilters(parameters) {
134
+ const filters = [];
135
+ const paramsAny = parameters;
136
+ if (!paramsAny?.filters || !Array.isArray(paramsAny.filters)) {
137
+ return filters;
138
+ }
139
+ for (const filter of paramsAny.filters) {
140
+ if (!filter?.field || filter?.value === undefined || filter?.value === null) {
141
+ continue;
142
+ }
143
+ const field = filter.field;
144
+ const value = filter.value;
145
+ const operator = filter.operator || { type: 'equal' };
146
+ // Handle employee-specific field mappings
147
+ if (field === 'department') {
148
+ // Department filter - can be array of IDs or single ID
149
+ if (Array.isArray(value) && value.length > 0) {
150
+ filters.push({
151
+ field: 'position.departmentId', // Assuming position has departmentId
152
+ operator: { type: 'in' },
153
+ value: value,
154
+ });
155
+ }
156
+ else if (value) {
157
+ filters.push({
158
+ field: 'position.departmentId',
159
+ operator: { type: 'equal' },
160
+ value: value,
161
+ });
162
+ }
163
+ }
164
+ else if (field === 'team') {
165
+ // Team filter - can be array of IDs or single ID
166
+ if (Array.isArray(value) && value.length > 0) {
167
+ filters.push({
168
+ field: 'teamId', // Assuming employee has teamId or teamMemberships
169
+ operator: { type: 'in' },
170
+ value: value,
171
+ });
172
+ }
173
+ else if (value) {
174
+ filters.push({
175
+ field: 'teamId',
176
+ operator: { type: 'equal' },
177
+ value: value,
178
+ });
179
+ }
180
+ }
181
+ else if (field === 'employmentType') {
182
+ // Employment type filter - skip 'all' value
183
+ if (value && value !== 'all') {
184
+ filters.push({
185
+ field: 'employmentTypeId',
186
+ operator: { type: 'equal' },
187
+ value: value,
188
+ });
189
+ }
190
+ }
191
+ else {
192
+ // Direct field mapping
193
+ filters.push({
194
+ field: field,
195
+ operator: operator,
196
+ value: value,
197
+ });
198
+ }
199
+ }
200
+ return filters;
201
+ }
202
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetEmployeeListQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
203
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetEmployeeListQuery, providedIn: 'root' }); }
204
+ }
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: GetEmployeeListQuery, decorators: [{
206
+ type: Injectable,
207
+ args: [{
208
+ providedIn: 'root',
209
+ }]
210
+ }] });
211
+
212
+ export { GetEmployeeListQuery };
213
+ //# sourceMappingURL=acorex-connectivity-mock-get-employee-list.query-DifHwuqH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-connectivity-mock-get-employee-list.query-DifHwuqH.mjs","sources":["../../../../libs/connectivity/mock/src/lib/report-management/samples/get-employee-list.query.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { AXPQuery } from '@acorex/platform/runtime';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXMHumanCapitalManagementEmployeeEntityModel } from '@acorex/modules/human-capital-management';\nimport { RootConfig as HumanCapitalRootConfig } from '@acorex/modules/human-capital-management';\nimport { RootConfig as OrganizationRootConfig } from '@acorex/modules/organization-management';\n\n//#region ---- Query Input/Output Types ----\n\nexport interface GetEmployeeListQueryInput {\n skip?: number;\n take?: number;\n sort?: Array<{ field: string; dir: 'asc' | 'desc' }>;\n filters?: Array<{\n field: string;\n operator: { type: string };\n value: any;\n }>;\n logic?: 'and' | 'or';\n}\n\nexport interface EmployeeByDepartmentResult {\n departmentId: string;\n departmentTitle: string;\n teamId?: string;\n teamTitle?: string;\n employeeCount: number;\n employmentTypes: string;\n averageExperience: number;\n totalEmployees: number;\n}\n\nexport interface GetEmployeeListQueryResult {\n items: EmployeeByDepartmentResult[];\n total: number;\n}\n\n//#endregion\n\n@Injectable({\n providedIn: 'root',\n})\nexport class GetEmployeeListQuery implements AXPQuery<GetEmployeeListQueryInput, GetEmployeeListQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n private employeeService = this.entityService\n .withEntity(`${HumanCapitalRootConfig.module.name}.${HumanCapitalRootConfig.entities.employee.name}`)\n .data<string, AXMHumanCapitalManagementEmployeeEntityModel>();\n\n async fetch(input: GetEmployeeListQueryInput | any): Promise<GetEmployeeListQueryResult> {\n // Extract employee-specific filters from AXPFilterClause format\n const extractedFilters = this.extractEmployeeFilters(input.filters);\n\n // Separate custom filters from entity filters\n const entityFilters: GetEmployeeListQueryInput['filters'] = [];\n\n if (extractedFilters && extractedFilters.length > 0) {\n for (const filter of extractedFilters) {\n entityFilters.push(filter);\n }\n }\n\n // Get all employees from storage with entity filters\n const allEmployeesResult = await this.employeeService.query({\n skip: 0,\n take: 10000, // Get all employees for aggregation\n filter:\n entityFilters.length > 0\n ? ({\n logic: input.logic || 'and',\n filters: entityFilters,\n } as any)\n : undefined,\n });\n\n const allEmployees = allEmployeesResult.items;\n\n // Group employees by department and team\n const departmentGroups = new Map<string, Map<string, AXMHumanCapitalManagementEmployeeEntityModel[]>>();\n\n for (const employee of allEmployees) {\n // Get department from position (assuming position has departmentId)\n const departmentId = (employee as any).position?.departmentId || (employee as any).departmentId || 'unknown';\n const departmentTitle = (employee as any).position?.department?.title || 'Unknown Department';\n\n // Get team from team memberships (assuming employee has teamId or teamMemberships)\n const teamId = (employee as any).teamId || (employee as any).teamMemberships?.[0]?.teamId || undefined;\n const teamTitle = (employee as any).team?.title || (employee as any).teamMemberships?.[0]?.team?.title || undefined;\n\n const teamKey = teamId || 'no-team';\n\n if (!departmentGroups.has(departmentId)) {\n departmentGroups.set(departmentId, new Map());\n }\n\n const teamMap = departmentGroups.get(departmentId)!;\n if (!teamMap.has(teamKey)) {\n teamMap.set(teamKey, []);\n }\n\n teamMap.get(teamKey)!.push(employee);\n }\n\n // Aggregate data by department and team\n const aggregatedResults: EmployeeByDepartmentResult[] = [];\n\n for (const [departmentId, teamMap] of departmentGroups.entries()) {\n const firstEmployee = Array.from(teamMap.values())[0]?.[0];\n const departmentTitle = (firstEmployee as any)?.position?.department?.title || 'Unknown Department';\n\n for (const [teamKey, employees] of teamMap.entries()) {\n const teamId = teamKey !== 'no-team' ? teamKey : undefined;\n const teamTitle =\n teamKey !== 'no-team' ? (employees[0] as any)?.team?.title || (employees[0] as any)?.teamMemberships?.[0]?.team?.title : undefined;\n\n // Calculate average experience (years since hire date)\n const now = new Date();\n const experiences = employees\n .map((emp) => {\n if (!emp.hireDate) return 0;\n const hireDate = new Date(emp.hireDate);\n const diffTime = Math.abs(now.getTime() - hireDate.getTime());\n return diffTime / (1000 * 60 * 60 * 24 * 365.25); // Convert to years\n })\n .filter((exp) => exp > 0);\n\n const averageExperience = experiences.length > 0 ? experiences.reduce((sum, exp) => sum + exp, 0) / experiences.length : 0;\n\n // Get unique employment types\n const employmentTypeSet = new Set<string>();\n for (const employee of employees) {\n if ((employee as any).employmentType?.title) {\n employmentTypeSet.add((employee as any).employmentType.title);\n }\n }\n const employmentTypes = Array.from(employmentTypeSet).join(', ') || 'N/A';\n\n aggregatedResults.push({\n departmentId,\n departmentTitle,\n teamId,\n teamTitle,\n employeeCount: employees.length,\n employmentTypes,\n averageExperience: Number(averageExperience.toFixed(2)),\n totalEmployees: employees.length,\n });\n }\n }\n\n // Apply sorting if provided\n if (input.sort && input.sort.length > 0) {\n aggregatedResults.sort((a, b) => {\n for (const sortField of input.sort!) {\n const field = sortField.field as keyof EmployeeByDepartmentResult;\n const aValue = a[field];\n const bValue = b[field];\n const dir = sortField.dir === 'asc' ? 1 : -1;\n\n // Handle undefined values\n if (aValue === undefined && bValue === undefined) continue;\n if (aValue === undefined) return 1 * dir;\n if (bValue === undefined) return -1 * dir;\n\n if (aValue < bValue) return -1 * dir;\n if (aValue > bValue) return 1 * dir;\n }\n return 0;\n });\n }\n\n // Apply pagination\n const skip = input.skip || 0;\n const take = input.take || 10;\n const total = aggregatedResults.length;\n const items = aggregatedResults.slice(skip, skip + take);\n\n return {\n items,\n total,\n };\n }\n\n //#region ---- Filter Extraction ----\n\n /**\n * Extract employee-specific filters from AXPFilterClause format\n * Maps report parameter paths to employee entity field names\n */\n private extractEmployeeFilters(parameters: any): GetEmployeeListQueryInput['filters'] {\n const filters: GetEmployeeListQueryInput['filters'] = [];\n const paramsAny = parameters as any;\n\n if (!paramsAny?.filters || !Array.isArray(paramsAny.filters)) {\n return filters;\n }\n\n for (const filter of paramsAny.filters) {\n if (!filter?.field || filter?.value === undefined || filter?.value === null) {\n continue;\n }\n\n const field = filter.field;\n const value = filter.value;\n const operator = filter.operator || { type: 'equal' };\n\n // Handle employee-specific field mappings\n if (field === 'department') {\n // Department filter - can be array of IDs or single ID\n if (Array.isArray(value) && value.length > 0) {\n filters.push({\n field: 'position.departmentId', // Assuming position has departmentId\n operator: { type: 'in' },\n value: value,\n });\n } else if (value) {\n filters.push({\n field: 'position.departmentId',\n operator: { type: 'equal' },\n value: value,\n });\n }\n } else if (field === 'team') {\n // Team filter - can be array of IDs or single ID\n if (Array.isArray(value) && value.length > 0) {\n filters.push({\n field: 'teamId', // Assuming employee has teamId or teamMemberships\n operator: { type: 'in' },\n value: value,\n });\n } else if (value) {\n filters.push({\n field: 'teamId',\n operator: { type: 'equal' },\n value: value,\n });\n }\n } else if (field === 'employmentType') {\n // Employment type filter - skip 'all' value\n if (value && value !== 'all') {\n filters.push({\n field: 'employmentTypeId',\n operator: { type: 'equal' },\n value: value,\n });\n }\n } else {\n // Direct field mapping\n filters.push({\n field: field,\n operator: operator,\n value: value,\n });\n }\n }\n\n return filters;\n }\n\n //#endregion\n}\n"],"names":["HumanCapitalRootConfig"],"mappings":";;;;;AAqCA;MAKa,oBAAoB,CAAA;AAHjC,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;QACjD,IAAA,CAAA,eAAe,GAAG,IAAI,CAAC;AAC5B,aAAA,UAAU,CAAC,CAAA,EAAGA,UAAsB,CAAC,MAAM,CAAC,IAAI,CAAA,CAAA,EAAIA,UAAsB,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE;AACnG,aAAA,IAAI,EAAwD;AAqNhE,IAAA;IAnNC,MAAM,KAAK,CAAC,KAAsC,EAAA;;QAEhD,MAAM,gBAAgB,GAAG,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,OAAO,CAAC;;QAGnE,MAAM,aAAa,GAAyC,EAAE;QAE9D,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE;AACnD,YAAA,KAAK,MAAM,MAAM,IAAI,gBAAgB,EAAE;AACrC,gBAAA,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC;YAC5B;QACF;;QAGA,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;AAC1D,YAAA,IAAI,EAAE,CAAC;YACP,IAAI,EAAE,KAAK;AACX,YAAA,MAAM,EACJ,aAAa,CAAC,MAAM,GAAG;AACrB,kBAAG;AACC,oBAAA,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK;AAC3B,oBAAA,OAAO,EAAE,aAAa;AACf;AACX,kBAAE,SAAS;AAChB,SAAA,CAAC;AAEF,QAAA,MAAM,YAAY,GAAG,kBAAkB,CAAC,KAAK;;AAG7C,QAAA,MAAM,g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