@acorex/connectivity 21.0.0-next.5 → 21.0.0-next.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{acorex-connectivity-api-execute.command-SGNBLcOi.mjs → acorex-connectivity-api-execute.command-CiBl7z_H.mjs} +6 -6
- package/fesm2022/acorex-connectivity-api-execute.command-CiBl7z_H.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-api.mjs +190 -188
- package/fesm2022/acorex-connectivity-api.mjs.map +1 -1
- package/fesm2022/acorex-connectivity-mock-acorex-connectivity-mock-D2T8rLl4.mjs +78673 -0
- package/fesm2022/acorex-connectivity-mock-acorex-connectivity-mock-D2T8rLl4.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-assign-to-manager.activity-DcsMxP4h.mjs +288 -0
- package/fesm2022/acorex-connectivity-mock-assign-to-manager.activity-DcsMxP4h.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-category-metadata-inheritance.query-CWRL1dTa.mjs +198 -0
- package/fesm2022/acorex-connectivity-mock-category-metadata-inheritance.query-CWRL1dTa.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-category-with-items.query-Dsxj98tX.mjs → acorex-connectivity-mock-category-with-items.query-Cj6FWu7S.mjs} +4 -4
- package/fesm2022/acorex-connectivity-mock-category-with-items.query-Cj6FWu7S.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-chat-generate-image.command-ihYQR4Wt.mjs +108 -0
- package/fesm2022/acorex-connectivity-mock-chat-generate-image.command-ihYQR4Wt.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-chat-synthesize-speech.command-HWKR08gj.mjs +130 -0
- package/fesm2022/acorex-connectivity-mock-chat-synthesize-speech.command-HWKR08gj.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-chat-transcribe-speech.command-BrFX59uP.mjs +110 -0
- package/fesm2022/acorex-connectivity-mock-chat-transcribe-speech.command-BrFX59uP.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-check-permission.activity-vr3OHtjC.mjs +45 -0
- package/fesm2022/acorex-connectivity-mock-check-permission.activity-vr3OHtjC.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-complete-signature-process.activity-BO-IFsHT.mjs +56 -0
- package/fesm2022/acorex-connectivity-mock-complete-signature-process.activity-BO-IFsHT.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-contact-core.module-5TLCGWOR.mjs +968 -0
- package/fesm2022/acorex-connectivity-mock-contact-core.module-5TLCGWOR.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-content-management.module-GQdqKsPB.mjs +16 -0
- package/fesm2022/acorex-connectivity-mock-content-management.module-GQdqKsPB.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-distribution-record.command-DRiDwlqN.mjs → acorex-connectivity-mock-distribution-record.activity-DuNluOzA.mjs} +18 -6
- package/fesm2022/acorex-connectivity-mock-distribution-record.activity-DuNluOzA.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-entity-create.activity-Ca19tIj4.mjs +60 -0
- package/fesm2022/acorex-connectivity-mock-entity-create.activity-Ca19tIj4.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-entity-delete.activity-ErEN1c24.mjs +60 -0
- package/fesm2022/acorex-connectivity-mock-entity-delete.activity-ErEN1c24.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-entity-read.activity-1fJW8gVe.mjs +67 -0
- package/fesm2022/acorex-connectivity-mock-entity-read.activity-1fJW8gVe.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-entity-update.activity-06HTKiQQ.mjs +68 -0
- package/fesm2022/acorex-connectivity-mock-entity-update.activity-06HTKiQQ.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-extract-document-text.command-nGfUTSf6.mjs +64 -0
- package/fesm2022/acorex-connectivity-mock-extract-document-text.command-nGfUTSf6.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-get-application-versions-chart-data.query-C3eQfF0A.mjs → acorex-connectivity-mock-get-application-versions-chart-data.query-DwVuYuKx.mjs} +4 -4
- package/fesm2022/acorex-connectivity-mock-get-application-versions-chart-data.query-DwVuYuKx.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-get-application-versions-timeline.query-CLzDz9ob.mjs → acorex-connectivity-mock-get-application-versions-timeline.query-sFKYynZA.mjs} +4 -4
- package/fesm2022/acorex-connectivity-mock-get-application-versions-timeline.query-sFKYynZA.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-current-session-user.activity-CsmxwXsM.mjs +39 -0
- package/fesm2022/acorex-connectivity-mock-get-current-session-user.activity-CsmxwXsM.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-current-user-manager.activity-C1mj2bgB.mjs +69 -0
- package/fesm2022/acorex-connectivity-mock-get-current-user-manager.activity-C1mj2bgB.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-employee-list.query-DifHwuqH.mjs +213 -0
- package/fesm2022/acorex-connectivity-mock-get-employee-list.query-DifHwuqH.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-location-list.query-bMjkZnzq.mjs +209 -0
- package/fesm2022/acorex-connectivity-mock-get-location-list.query-bMjkZnzq.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-product-chart-data.query-D7DBzLT-.mjs +186 -0
- package/fesm2022/acorex-connectivity-mock-get-product-chart-data.query-D7DBzLT-.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-get-product-list.query-ChtYlSTt.mjs → acorex-connectivity-mock-get-product-list.query-f-mTj4ah.mjs} +107 -11
- package/fesm2022/acorex-connectivity-mock-get-product-list.query-f-mTj4ah.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-product-pdf-data.query-Co1V52c4.mjs +192 -0
- package/fesm2022/acorex-connectivity-mock-get-product-pdf-data.query-Co1V52c4.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-get-subscriptions-chart-data.query-HxX_bCT8.mjs → acorex-connectivity-mock-get-subscriptions-chart-data.query-BQT5a_hn.mjs} +5 -5
- package/fesm2022/acorex-connectivity-mock-get-subscriptions-chart-data.query-BQT5a_hn.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-get-subscriptions-timeline.query-dp08JqLP.mjs → acorex-connectivity-mock-get-subscriptions-timeline.query-D4qfDfeV.mjs} +91 -13
- package/fesm2022/acorex-connectivity-mock-get-subscriptions-timeline.query-D4qfDfeV.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-get-tenant-application-access.query-IATTXcAV.mjs → acorex-connectivity-mock-get-tenant-application-access.query-n1_Azada.mjs} +91 -13
- package/fesm2022/acorex-connectivity-mock-get-tenant-application-access.query-n1_Azada.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-get-tenant-registration-chart-data.query-DlXi4Rcg.mjs → acorex-connectivity-mock-get-tenant-registration-chart-data.query-Cg4ykZU2.mjs} +5 -5
- package/fesm2022/acorex-connectivity-mock-get-tenant-registration-chart-data.query-Cg4ykZU2.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-get-tenant-registration-timeline.query-hskw8Ioa.mjs → acorex-connectivity-mock-get-tenant-registration-timeline.query-0sCBtdbp.mjs} +91 -13
- package/fesm2022/acorex-connectivity-mock-get-tenant-registration-timeline.query-0sCBtdbp.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-get-tenant-user-distribution.query-Bs5U5tze.mjs → acorex-connectivity-mock-get-tenant-user-distribution.query-rD811gtM.mjs} +91 -13
- package/fesm2022/acorex-connectivity-mock-get-tenant-user-distribution.query-rD811gtM.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-if.activity-DvzuhItL.mjs +35 -0
- package/fesm2022/acorex-connectivity-mock-if.activity-DvzuhItL.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-notification-management-email-send.command-DAQfIWoD.mjs +73 -0
- package/fesm2022/acorex-connectivity-mock-notification-management-email-send.command-DAQfIWoD.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-notify-signers.activity-Dg0sKGip.mjs +49 -0
- package/fesm2022/acorex-connectivity-mock-notify-signers.activity-Dg0sKGip.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-request-signature.activity-CoRT_H2u.mjs +60 -0
- package/fesm2022/acorex-connectivity-mock-request-signature.activity-CoRT_H2u.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-sample.command-CkH5bmEs.mjs → acorex-connectivity-mock-sample.command-CJmDL4pL.mjs} +4 -4
- package/fesm2022/acorex-connectivity-mock-sample.command-CJmDL4pL.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-structured-text-completion.command-l31pjl9-.mjs +38 -0
- package/fesm2022/acorex-connectivity-mock-structured-text-completion.command-l31pjl9-.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-user-roles-for-list-column.query-Ch--rL7K.mjs +30 -0
- package/fesm2022/acorex-connectivity-mock-user-roles-for-list-column.query-Ch--rL7K.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-validate-all-signatures.activity-JuHjNFFS.mjs +61 -0
- package/fesm2022/acorex-connectivity-mock-validate-all-signatures.activity-JuHjNFFS.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock.mjs +2 -49588
- package/fesm2022/acorex-connectivity-mock.mjs.map +1 -1
- package/fesm2022/acorex-connectivity-utils.mjs +7 -7
- package/fesm2022/acorex-connectivity-utils.mjs.map +1 -1
- package/fesm2022/acorex-connectivity.mjs.map +1 -1
- package/package.json +8 -7
- package/{api/index.d.ts → types/acorex-connectivity-api.d.ts} +13 -60
- package/types/acorex-connectivity-mock.d.ts +4133 -0
- package/fesm2022/acorex-connectivity-api-execute.command-SGNBLcOi.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-category-with-items.query-Dsxj98tX.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-distribution-record.command-DRiDwlqN.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-get-application-versions-chart-data.query-C3eQfF0A.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-get-application-versions-timeline.query-CLzDz9ob.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-get-product-chart-data.query-DDVVFeYN.mjs +0 -97
- package/fesm2022/acorex-connectivity-mock-get-product-chart-data.query-DDVVFeYN.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-get-product-list.query-ChtYlSTt.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-get-subscriptions-chart-data.query-HxX_bCT8.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-get-subscriptions-timeline.query-dp08JqLP.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-get-tenant-application-access.query-IATTXcAV.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-get-tenant-registration-chart-data.query-DlXi4Rcg.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-get-tenant-registration-timeline.query-hskw8Ioa.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-get-tenant-user-distribution.query-Bs5U5tze.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-sample.command-CkH5bmEs.mjs.map +0 -1
- package/mock/index.d.ts +0 -2557
- /package/{utils/index.d.ts → types/acorex-connectivity-utils.d.ts} +0 -0
- /package/{index.d.ts → types/acorex-connectivity.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AXPReportViewerService } from '@acorex/modules/report-management';
|
|
2
2
|
import { AXP_ROOT_CONFIG_TOKEN } from '@acorex/platform/common';
|
|
3
3
|
import { HttpClient } from '@angular/common/http';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
@@ -8,7 +8,7 @@ import { firstValueFrom } from 'rxjs';
|
|
|
8
8
|
class AXCReportExecuteCommand {
|
|
9
9
|
constructor() {
|
|
10
10
|
this.http = inject(HttpClient);
|
|
11
|
-
this.reportDefinitionService = inject(
|
|
11
|
+
this.reportDefinitionService = inject(AXPReportViewerService);
|
|
12
12
|
this.configs = inject(AXP_ROOT_CONFIG_TOKEN);
|
|
13
13
|
this.baseUrl = this.configs.baseUrl;
|
|
14
14
|
}
|
|
@@ -81,10 +81,10 @@ class AXCReportExecuteCommand {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
85
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
84
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCReportExecuteCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
85
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCReportExecuteCommand, providedIn: 'root' }); }
|
|
86
86
|
}
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCReportExecuteCommand, decorators: [{
|
|
88
88
|
type: Injectable,
|
|
89
89
|
args: [{
|
|
90
90
|
providedIn: 'root',
|
|
@@ -92,4 +92,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
92
92
|
}] });
|
|
93
93
|
|
|
94
94
|
export { AXCReportExecuteCommand };
|
|
95
|
-
//# sourceMappingURL=acorex-connectivity-api-execute.command-
|
|
95
|
+
//# sourceMappingURL=acorex-connectivity-api-execute.command-CiBl7z_H.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-connectivity-api-execute.command-CiBl7z_H.mjs","sources":["../../../../libs/connectivity/api/src/lib/report-management/execute.command.ts"],"sourcesContent":["import {\n AXPExecutionReportCommand,\n AXPExecutionReportCommandResult,\n AXPExecutionReportResult,\n AXPLayoutExecutionContext,\n AXPReportViewerService,\n AXPReportLayoutDefinition,\n} from '@acorex/modules/report-management';\nimport { AXP_ROOT_CONFIG_TOKEN } from '@acorex/platform/common';\nimport { HttpClient } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { AXPExecuteReportDto } from './report-management-api.providers';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXCReportExecuteCommand implements AXPExecutionReportCommand {\n private readonly http = inject(HttpClient);\n private readonly reportDefinitionService = inject(AXPReportViewerService);\n private readonly configs = inject(AXP_ROOT_CONFIG_TOKEN);\n private readonly baseUrl = this.configs.baseUrl;\n\n //#region ---- Command Implementation ----\n\n async execute(context: AXPLayoutExecutionContext) {\n try {\n const { reportId, layoutId, filters: parameters } = context;\n\n // Get the report definition to find the layout\n const reportDefinition = await this.reportDefinitionService.getReportById(reportId);\n if (!reportDefinition) {\n throw new Error(`Report with ID ${reportId} not found`);\n }\n\n // Find the specific layout\n const layoutDefinition = reportDefinition.layouts.find((l: AXPReportLayoutDefinition) => l.id === layoutId);\n if (!layoutDefinition) {\n throw new Error(`Layout with ID ${layoutId} not found in report ${reportId}`);\n }\n\n // Call the Execute API endpoint\n const url = `${this.baseUrl}/v1/global/Report-Management/report/Execute`;\n const body = {\n reportId,\n parameters,\n };\n\n const executeResult: AXPExecuteReportDto = await firstValueFrom(this.http.post<AXPExecuteReportDto>(url, body));\n\n // Convert ExecuteReportDto to AXPExecutionReportResult format\n let executionResult: AXPExecutionReportResult;\n\n if (executeResult.type === 'table') {\n executionResult = {\n type: 'table',\n items: executeResult.items,\n total: executeResult.totalCount,\n };\n } else if (executeResult.type === 'chart') {\n executionResult = {\n type: 'chart',\n data: executeResult.items[0] || {},\n };\n } else if (executeResult.type === 'cards') {\n executionResult = {\n type: 'cards',\n items: executeResult.items,\n };\n } else {\n executionResult = {\n type: 'custom',\n data: executeResult.items,\n };\n }\n\n // Return the combined layout configuration and data\n return {\n success: true,\n data: {\n ...layoutDefinition.layout,\n data: executionResult,\n },\n };\n } catch (error) {\n console.error('Error executing report:', error);\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n return {\n success: false,\n message: {\n type: 'error' as const,\n text: `Failed to execute report: ${errorMessage}`,\n },\n };\n }\n }\n\n //#endregion\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AXP_ROOT_CONFIG_TOKEN, AXPFilterOperatorMiddlewareService, AXPFileStorageService, AXPFileStorageStatus } from '@acorex/platform/common';
|
|
2
|
+
import { computeEntityAggregates, AXPEntityStorageService } from '@acorex/platform/layout/entity';
|
|
2
3
|
import * as i1 from '@angular/common/http';
|
|
3
4
|
import { HttpParams, HttpClient, HttpHeaders } from '@angular/common/http';
|
|
4
5
|
import * as i0 from '@angular/core';
|
|
@@ -7,7 +8,6 @@ import { kebabCase } from 'lodash-es';
|
|
|
7
8
|
import { firstValueFrom, catchError, of, BehaviorSubject, tap, filter, take, switchMap } from 'rxjs';
|
|
8
9
|
import * as i2 from '@acorex/platform/auth';
|
|
9
10
|
import { AXPAuthStrategy, AXPSessionService, JwtUtil, TimeUtil, PkceUtil, AXPAuthModule, AXP_TENANT_LOADER, AXP_APPLICATION_LOADER, AXP_PERMISSION_LOADER, AXP_FEATURE_LOADER } from '@acorex/platform/auth';
|
|
10
|
-
import { AXPEntityStorageService } from '@acorex/platform/layout/entity';
|
|
11
11
|
import { AXP_USER_AVATAR_PROVIDER } from '@acorex/platform/layout/components';
|
|
12
12
|
import { STRATEGY_CONFIG_TOKEN } from '@acorex/platform/layout/widgets';
|
|
13
13
|
import * as i1$1 from 'angular-oauth2-oidc';
|
|
@@ -18,7 +18,7 @@ import { AXMUsersEntityService } from '@acorex/modules/security-management';
|
|
|
18
18
|
import { AXPDataGenerator } from '@acorex/platform/core';
|
|
19
19
|
import { AXCUtilsModule, AXCExternalAuthorizationService } from '@acorex/connectivity/utils';
|
|
20
20
|
import { AXPRuntimeModule, provideCommandSetups } from '@acorex/platform/runtime';
|
|
21
|
-
import {
|
|
21
|
+
import { AXPReportViewerService } from '@acorex/modules/report-management';
|
|
22
22
|
|
|
23
23
|
class AXCApiEntityStorageService {
|
|
24
24
|
constructor(http) {
|
|
@@ -29,6 +29,9 @@ class AXCApiEntityStorageService {
|
|
|
29
29
|
// API routing constants
|
|
30
30
|
this.API_VERSION = 'v1';
|
|
31
31
|
this.DEFAULT_AREA = 'global';
|
|
32
|
+
this.defaultQueryAllPageSize = 500;
|
|
33
|
+
this.defaultQueryAllMaxRows = 100_000;
|
|
34
|
+
this.defaultAggregateMaxRows = 50_000;
|
|
32
35
|
}
|
|
33
36
|
get dbName() {
|
|
34
37
|
return 'ACoreXPlatform';
|
|
@@ -79,7 +82,7 @@ class AXCApiEntityStorageService {
|
|
|
79
82
|
async deleteOne(entityName, id) {
|
|
80
83
|
const routeElement = await this.getConfigEntity(entityName);
|
|
81
84
|
const url = `${this.mainUrl}/${routeElement.version}/${routeElement.area}/${routeElement.module}/${routeElement.entity}/${id}`;
|
|
82
|
-
firstValueFrom(this.http.delete(url));
|
|
85
|
+
await firstValueFrom(this.http.delete(url));
|
|
83
86
|
}
|
|
84
87
|
async insertOne(entityName, entityItem) {
|
|
85
88
|
const routeElement = await this.getConfigEntity(entityName);
|
|
@@ -91,7 +94,9 @@ class AXCApiEntityStorageService {
|
|
|
91
94
|
}
|
|
92
95
|
async query(entityName, request) {
|
|
93
96
|
const routeElement = await this.getConfigEntity(entityName);
|
|
94
|
-
let httpParams = new HttpParams()
|
|
97
|
+
let httpParams = new HttpParams()
|
|
98
|
+
.set('Skip', String(request.skip ?? 0))
|
|
99
|
+
.set('Take', String(request.take ?? 0));
|
|
95
100
|
if (request?.sort && request?.sort.length > 0) {
|
|
96
101
|
const sortParam = request?.sort.map((sort) => `${sort.field}:${sort.dir}`).join(',');
|
|
97
102
|
httpParams = httpParams.set('$orderby', sortParam);
|
|
@@ -140,10 +145,91 @@ class AXCApiEntityStorageService {
|
|
|
140
145
|
};
|
|
141
146
|
});
|
|
142
147
|
}
|
|
143
|
-
|
|
144
|
-
|
|
148
|
+
async count(entityName, request) {
|
|
149
|
+
const page = await this.query(entityName, { ...request, skip: 0, take: 1 });
|
|
150
|
+
return page.total;
|
|
151
|
+
}
|
|
152
|
+
async queryAll(entityName, request, options) {
|
|
153
|
+
const pageSize = options?.pageSize ?? this.defaultQueryAllPageSize;
|
|
154
|
+
const maxRows = options?.maxRows ?? this.defaultQueryAllMaxRows;
|
|
155
|
+
const items = [];
|
|
156
|
+
let skip = 0;
|
|
157
|
+
let total = 0;
|
|
158
|
+
while (items.length < maxRows) {
|
|
159
|
+
const take = Math.min(pageSize, maxRows - items.length);
|
|
160
|
+
const page = await this.query(entityName, {
|
|
161
|
+
filter: request.filter,
|
|
162
|
+
sort: request.sort,
|
|
163
|
+
skip,
|
|
164
|
+
take,
|
|
165
|
+
});
|
|
166
|
+
total = page.total;
|
|
167
|
+
if (!page.items?.length) {
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
items.push(...page.items);
|
|
171
|
+
skip += page.items.length;
|
|
172
|
+
if (page.items.length < take || skip >= total) {
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
items,
|
|
178
|
+
total,
|
|
179
|
+
truncated: total > items.length,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
async getMany(entityName, ids) {
|
|
183
|
+
return Promise.all(ids.map(async (id) => {
|
|
184
|
+
try {
|
|
185
|
+
const row = await this.getOne(entityName, id);
|
|
186
|
+
return row ?? null;
|
|
187
|
+
}
|
|
188
|
+
catch {
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
}));
|
|
192
|
+
}
|
|
193
|
+
async exists(entityName, id) {
|
|
194
|
+
try {
|
|
195
|
+
await this.getOne(entityName, id);
|
|
196
|
+
return true;
|
|
197
|
+
}
|
|
198
|
+
catch {
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
async upsertOne(entityName, entity, options) {
|
|
203
|
+
const id = entity?.id;
|
|
204
|
+
if (id) {
|
|
205
|
+
try {
|
|
206
|
+
const existing = await this.getOne(entityName, id);
|
|
207
|
+
if (existing != null) {
|
|
208
|
+
const merge = options?.merge !== false;
|
|
209
|
+
const next = merge
|
|
210
|
+
? { ...existing, ...entity }
|
|
211
|
+
: { ...entity };
|
|
212
|
+
const { id: _omit, ...patch } = next;
|
|
213
|
+
await this.updateOne(entityName, id, patch);
|
|
214
|
+
return id;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
catch {
|
|
218
|
+
/* create when GET fails (e.g. 404) */
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return this.insertOne(entityName, entity);
|
|
222
|
+
}
|
|
223
|
+
async aggregate(entityName, request, options) {
|
|
224
|
+
const maxRows = options?.maxRows ?? this.defaultAggregateMaxRows;
|
|
225
|
+
const pageSize = options?.pageSize ?? this.defaultQueryAllPageSize;
|
|
226
|
+
const { items } = await this.queryAll(entityName, request, { maxRows, pageSize });
|
|
227
|
+
return { rows: computeEntityAggregates(items, request) };
|
|
228
|
+
}
|
|
229
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCApiEntityStorageService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
230
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCApiEntityStorageService }); }
|
|
145
231
|
}
|
|
146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
232
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCApiEntityStorageService, decorators: [{
|
|
147
233
|
type: Injectable
|
|
148
234
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
149
235
|
|
|
@@ -290,10 +376,10 @@ class AXCFileStorageApiService extends AXPFileStorageService {
|
|
|
290
376
|
// Silently fail in fallback mode
|
|
291
377
|
}
|
|
292
378
|
}
|
|
293
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
294
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
379
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCFileStorageApiService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
380
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCFileStorageApiService }); }
|
|
295
381
|
}
|
|
296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCFileStorageApiService, decorators: [{
|
|
297
383
|
type: Injectable
|
|
298
384
|
}] });
|
|
299
385
|
|
|
@@ -343,10 +429,10 @@ class AXMOidcApplicationLoader {
|
|
|
343
429
|
// features: item.features || [],
|
|
344
430
|
};
|
|
345
431
|
}
|
|
346
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
347
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
432
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOidcApplicationLoader, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
433
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOidcApplicationLoader }); }
|
|
348
434
|
}
|
|
349
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOidcApplicationLoader, decorators: [{
|
|
350
436
|
type: Injectable
|
|
351
437
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
352
438
|
|
|
@@ -386,10 +472,10 @@ class AXMConfigurationService {
|
|
|
386
472
|
switchMap(() => of(this.applicationConfig)));
|
|
387
473
|
}
|
|
388
474
|
}
|
|
389
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
390
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
475
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMConfigurationService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
476
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMConfigurationService, providedIn: 'root' }); }
|
|
391
477
|
}
|
|
392
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMConfigurationService, decorators: [{
|
|
393
479
|
type: Injectable,
|
|
394
480
|
args: [{
|
|
395
481
|
providedIn: 'root',
|
|
@@ -762,10 +848,10 @@ class AXCAPIOidcStrategy extends AXPAuthStrategy {
|
|
|
762
848
|
get name() {
|
|
763
849
|
return 'oidc';
|
|
764
850
|
}
|
|
765
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
766
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
851
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCAPIOidcStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
852
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCAPIOidcStrategy }); }
|
|
767
853
|
}
|
|
768
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
854
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCAPIOidcStrategy, decorators: [{
|
|
769
855
|
type: Injectable
|
|
770
856
|
}] });
|
|
771
857
|
|
|
@@ -791,10 +877,10 @@ class AXMOidcPermissionLoader {
|
|
|
791
877
|
const truePolicies = Object.keys(policies).filter((key) => policies[key] === true);
|
|
792
878
|
return truePolicies;
|
|
793
879
|
}
|
|
794
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
795
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
880
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOidcPermissionLoader, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
881
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOidcPermissionLoader }); }
|
|
796
882
|
}
|
|
797
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOidcPermissionLoader, decorators: [{
|
|
798
884
|
type: Injectable
|
|
799
885
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
800
886
|
|
|
@@ -821,10 +907,10 @@ class AXMOidcTenantLoader {
|
|
|
821
907
|
// Add other fields and defaults as needed, and handle the logo if applicable
|
|
822
908
|
};
|
|
823
909
|
}
|
|
824
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
825
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
910
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOidcTenantLoader, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
911
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOidcTenantLoader }); }
|
|
826
912
|
}
|
|
827
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOidcTenantLoader, decorators: [{
|
|
828
914
|
type: Injectable
|
|
829
915
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
830
916
|
|
|
@@ -866,15 +952,24 @@ class AXCApiUserAvatarProvider {
|
|
|
866
952
|
}
|
|
867
953
|
}
|
|
868
954
|
|
|
955
|
+
//#region ---- Imports ----
|
|
869
956
|
//#endregion
|
|
870
|
-
|
|
871
|
-
|
|
957
|
+
/**
|
|
958
|
+
* API-based Report Viewer Service
|
|
959
|
+
* Extends the base service to override data loading methods with API calls
|
|
960
|
+
*/
|
|
961
|
+
class AXCReportViewerApiService extends AXPReportViewerService {
|
|
872
962
|
constructor() {
|
|
963
|
+
super(...arguments);
|
|
873
964
|
this.http = inject(HttpClient);
|
|
874
965
|
this.configs = inject(AXP_ROOT_CONFIG_TOKEN);
|
|
875
966
|
this.baseUrl = this.configs.baseUrl;
|
|
876
967
|
}
|
|
877
|
-
|
|
968
|
+
//#region ---- Override: Category Loading ----
|
|
969
|
+
/**
|
|
970
|
+
* Override: Load categories from API instead of entity service
|
|
971
|
+
*/
|
|
972
|
+
async loadCategories(parentId) {
|
|
878
973
|
try {
|
|
879
974
|
let url;
|
|
880
975
|
if (parentId) {
|
|
@@ -898,50 +993,12 @@ class AXCReportCategoryApiProvider {
|
|
|
898
993
|
return [];
|
|
899
994
|
}
|
|
900
995
|
}
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
// Fallback: search in all categories
|
|
908
|
-
const allUrl = `${this.baseUrl}/v1/global/report-management/category`;
|
|
909
|
-
const params = { Skip: 0, Take: 1000 };
|
|
910
|
-
const allResponse = await firstValueFrom(this.http.get(allUrl, { params }));
|
|
911
|
-
const all = allResponse.items ?? [];
|
|
912
|
-
const found = all.find((c) => c.id === id);
|
|
913
|
-
return found ? this.mapApiCategoryToReportCategory(found) : undefined;
|
|
914
|
-
}
|
|
915
|
-
return this.mapApiCategoryToReportCategory(apiItem);
|
|
916
|
-
}
|
|
917
|
-
catch (error) {
|
|
918
|
-
console.error('Error fetching report category by ID:', error);
|
|
919
|
-
return undefined;
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
mapApiCategoryToReportCategory(apiItem) {
|
|
923
|
-
return {
|
|
924
|
-
id: apiItem.id,
|
|
925
|
-
title: apiItem.title,
|
|
926
|
-
description: apiItem.description || undefined,
|
|
927
|
-
parentId: apiItem.reportCategoryParentId || undefined,
|
|
928
|
-
childrenCount: apiItem.folderCount ?? 0,
|
|
929
|
-
itemsCount: apiItem.itemCount ?? 0,
|
|
930
|
-
};
|
|
931
|
-
}
|
|
932
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportCategoryApiProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
933
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportCategoryApiProvider }); }
|
|
934
|
-
}
|
|
935
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportCategoryApiProvider, decorators: [{
|
|
936
|
-
type: Injectable
|
|
937
|
-
}] });
|
|
938
|
-
class AXCReportDefinitionApiProvider {
|
|
939
|
-
constructor() {
|
|
940
|
-
this.http = inject(HttpClient);
|
|
941
|
-
this.configs = inject(AXP_ROOT_CONFIG_TOKEN);
|
|
942
|
-
this.baseUrl = this.configs.baseUrl;
|
|
943
|
-
}
|
|
944
|
-
async getList(categoryId) {
|
|
996
|
+
//#endregion
|
|
997
|
+
//#region ---- Override: Report Loading ----
|
|
998
|
+
/**
|
|
999
|
+
* Override: Load reports from API instead of entity service
|
|
1000
|
+
*/
|
|
1001
|
+
async loadReports(categoryId) {
|
|
945
1002
|
try {
|
|
946
1003
|
const url = `${this.baseUrl}/v1/global/report-management/category/${categoryId}`;
|
|
947
1004
|
const response = await firstValueFrom(this.http.get(url));
|
|
@@ -966,7 +1023,10 @@ class AXCReportDefinitionApiProvider {
|
|
|
966
1023
|
return [];
|
|
967
1024
|
}
|
|
968
1025
|
}
|
|
969
|
-
|
|
1026
|
+
/**
|
|
1027
|
+
* Override: Load single report from API instead of entity service
|
|
1028
|
+
*/
|
|
1029
|
+
async loadReport(id) {
|
|
970
1030
|
try {
|
|
971
1031
|
const url = `${this.baseUrl}/v1/global/report-management/report/${id}`;
|
|
972
1032
|
const response = await firstValueFrom(this.http.get(url));
|
|
@@ -977,6 +1037,33 @@ class AXCReportDefinitionApiProvider {
|
|
|
977
1037
|
return undefined;
|
|
978
1038
|
}
|
|
979
1039
|
}
|
|
1040
|
+
//#endregion
|
|
1041
|
+
//#region ---- Override: Report Execution ----
|
|
1042
|
+
/**
|
|
1043
|
+
* Override: Execute report with given context
|
|
1044
|
+
* Implements report execution logic for API environment
|
|
1045
|
+
* TODO: Implement API call to execute report
|
|
1046
|
+
*/
|
|
1047
|
+
async executeReport(context) {
|
|
1048
|
+
// TODO: Implement API call to execute report
|
|
1049
|
+
// Example:
|
|
1050
|
+
// const url = `${this.baseUrl}/v1/global/report-management/report/${context.reportId}/execute`;
|
|
1051
|
+
// const response = await firstValueFrom(this.http.post<AXPExecutionReportCommandResult>(url, context));
|
|
1052
|
+
// return response;
|
|
1053
|
+
throw new Error('executeReport API implementation is not yet implemented');
|
|
1054
|
+
}
|
|
1055
|
+
//#endregion
|
|
1056
|
+
//#region ---- Private: Mapping Methods ----
|
|
1057
|
+
mapApiCategoryToReportCategory(apiItem) {
|
|
1058
|
+
return {
|
|
1059
|
+
id: apiItem.id,
|
|
1060
|
+
title: apiItem.title,
|
|
1061
|
+
description: apiItem.description || undefined,
|
|
1062
|
+
parentId: apiItem.reportCategoryParentId || undefined,
|
|
1063
|
+
childrenCount: apiItem.folderCount ?? 0,
|
|
1064
|
+
itemsCount: apiItem.itemCount ?? 0,
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
980
1067
|
mapApiReportDefinitionItemToReportDefinition(apiItem) {
|
|
981
1068
|
return {
|
|
982
1069
|
id: apiItem.id,
|
|
@@ -1019,52 +1106,47 @@ class AXCReportDefinitionApiProvider {
|
|
|
1019
1106
|
defaultLayoutId: apiResponse.defaultLayoutId,
|
|
1020
1107
|
};
|
|
1021
1108
|
}
|
|
1022
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1023
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCReportViewerApiService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1110
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCReportViewerApiService, providedIn: 'root' }); }
|
|
1024
1111
|
}
|
|
1025
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1026
|
-
type: Injectable
|
|
1112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCReportViewerApiService, decorators: [{
|
|
1113
|
+
type: Injectable,
|
|
1114
|
+
args: [{
|
|
1115
|
+
providedIn: 'root',
|
|
1116
|
+
}]
|
|
1027
1117
|
}] });
|
|
1028
|
-
//#endregion
|
|
1029
|
-
//#region ---- Provider Exports ----
|
|
1030
|
-
const AXC_REPORT_CATEGORY_API_PROVIDER = {
|
|
1031
|
-
provide: AXP_REPORT_CATEGORY_PROVIDER,
|
|
1032
|
-
useClass: AXCReportCategoryApiProvider,
|
|
1033
|
-
multi: true,
|
|
1034
|
-
};
|
|
1035
|
-
const AXC_REPORT_DEFINITION_API_PROVIDER = {
|
|
1036
|
-
provide: AXP_REPORT_DEFINITION_PROVIDER,
|
|
1037
|
-
useClass: AXCReportDefinitionApiProvider,
|
|
1038
|
-
multi: true,
|
|
1039
|
-
};
|
|
1040
1118
|
|
|
1041
1119
|
class AXCReportManagementApiModule {
|
|
1042
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1043
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1044
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1045
|
-
|
|
1046
|
-
|
|
1120
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCReportManagementApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1121
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXCReportManagementApiModule, imports: [AXPRuntimeModule] }); }
|
|
1122
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCReportManagementApiModule, providers: [
|
|
1123
|
+
{
|
|
1124
|
+
provide: AXPReportViewerService,
|
|
1125
|
+
useClass: AXCReportViewerApiService,
|
|
1126
|
+
},
|
|
1047
1127
|
provideCommandSetups([
|
|
1048
1128
|
{
|
|
1049
1129
|
key: 'ReportManagement.Report:Execute',
|
|
1050
|
-
command: () => import('./acorex-connectivity-api-execute.command-
|
|
1130
|
+
command: () => import('./acorex-connectivity-api-execute.command-CiBl7z_H.mjs').then((c) => c.AXCReportExecuteCommand),
|
|
1051
1131
|
}
|
|
1052
1132
|
]),
|
|
1053
1133
|
], imports: [AXPRuntimeModule] }); }
|
|
1054
1134
|
}
|
|
1055
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCReportManagementApiModule, decorators: [{
|
|
1056
1136
|
type: NgModule,
|
|
1057
1137
|
args: [{
|
|
1058
1138
|
imports: [AXPRuntimeModule],
|
|
1059
1139
|
exports: [],
|
|
1060
1140
|
declarations: [],
|
|
1061
1141
|
providers: [
|
|
1062
|
-
|
|
1063
|
-
|
|
1142
|
+
{
|
|
1143
|
+
provide: AXPReportViewerService,
|
|
1144
|
+
useClass: AXCReportViewerApiService,
|
|
1145
|
+
},
|
|
1064
1146
|
provideCommandSetups([
|
|
1065
1147
|
{
|
|
1066
1148
|
key: 'ReportManagement.Report:Execute',
|
|
1067
|
-
command: () => import('./acorex-connectivity-api-execute.command-
|
|
1149
|
+
command: () => import('./acorex-connectivity-api-execute.command-CiBl7z_H.mjs').then((c) => c.AXCReportExecuteCommand),
|
|
1068
1150
|
}
|
|
1069
1151
|
]),
|
|
1070
1152
|
],
|
|
@@ -1072,10 +1154,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1072
1154
|
}] });
|
|
1073
1155
|
|
|
1074
1156
|
class AXCApiModule {
|
|
1075
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1076
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1157
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1158
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXCApiModule, imports: [i1$1.OAuthModule, i2.AXPAuthModule, AXCUtilsModule,
|
|
1077
1159
|
AXCReportManagementApiModule] }); }
|
|
1078
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1160
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCApiModule, providers: [
|
|
1079
1161
|
{
|
|
1080
1162
|
provide: AXPEntityStorageService,
|
|
1081
1163
|
useClass: AXCApiEntityStorageService,
|
|
@@ -1118,7 +1200,7 @@ class AXCApiModule {
|
|
|
1118
1200
|
AXCUtilsModule,
|
|
1119
1201
|
AXCReportManagementApiModule] }); }
|
|
1120
1202
|
}
|
|
1121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCApiModule, decorators: [{
|
|
1122
1204
|
type: NgModule,
|
|
1123
1205
|
args: [{
|
|
1124
1206
|
imports: [
|
|
@@ -1433,99 +1515,19 @@ class APIGoogleStrategy extends AXPAuthStrategy {
|
|
|
1433
1515
|
console.error('Authentication error:', error);
|
|
1434
1516
|
throw error;
|
|
1435
1517
|
}
|
|
1436
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1437
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1518
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: APIGoogleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1519
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: APIGoogleStrategy }); }
|
|
1438
1520
|
}
|
|
1439
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1521
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: APIGoogleStrategy, decorators: [{
|
|
1440
1522
|
type: Injectable
|
|
1441
1523
|
}], ctorParameters: () => [] });
|
|
1442
1524
|
|
|
1443
|
-
//#region ----
|
|
1444
|
-
//#endregion
|
|
1445
|
-
//#region ---- API Providers ----
|
|
1446
|
-
class AXCSystemInsightReportCategoryApiProvider {
|
|
1447
|
-
constructor() {
|
|
1448
|
-
this.http = inject(HttpClient);
|
|
1449
|
-
}
|
|
1450
|
-
async getList(parentId) {
|
|
1451
|
-
try {
|
|
1452
|
-
// Call API to get report categories
|
|
1453
|
-
const params = {};
|
|
1454
|
-
if (parentId) {
|
|
1455
|
-
params.parentId = parentId;
|
|
1456
|
-
}
|
|
1457
|
-
const response = await firstValueFrom(this.http.get('/api/system-insight/report-categories', { params }));
|
|
1458
|
-
return response;
|
|
1459
|
-
}
|
|
1460
|
-
catch (error) {
|
|
1461
|
-
console.error('Failed to fetch system insight report categories from API:', error);
|
|
1462
|
-
return [];
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
async getById(id) {
|
|
1466
|
-
try {
|
|
1467
|
-
const response = await firstValueFrom(this.http.get(`/api/system-insight/report-categories/${id}`));
|
|
1468
|
-
return response;
|
|
1469
|
-
}
|
|
1470
|
-
catch (error) {
|
|
1471
|
-
console.error(`Failed to fetch system insight report category ${id} from API:`, error);
|
|
1472
|
-
return undefined;
|
|
1473
|
-
}
|
|
1474
|
-
}
|
|
1475
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportCategoryApiProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1476
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportCategoryApiProvider }); }
|
|
1477
|
-
}
|
|
1478
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportCategoryApiProvider, decorators: [{
|
|
1479
|
-
type: Injectable
|
|
1480
|
-
}] });
|
|
1481
|
-
class AXCSystemInsightReportDefinitionApiProvider {
|
|
1482
|
-
constructor() {
|
|
1483
|
-
this.http = inject(HttpClient);
|
|
1484
|
-
}
|
|
1485
|
-
async getList(categoryId) {
|
|
1486
|
-
try {
|
|
1487
|
-
const response = await firstValueFrom(this.http.get(`/api/system-insight/report-definitions`, {
|
|
1488
|
-
params: { categoryId }
|
|
1489
|
-
}));
|
|
1490
|
-
return response;
|
|
1491
|
-
}
|
|
1492
|
-
catch (error) {
|
|
1493
|
-
console.error(`Failed to fetch system insight report definitions for category ${categoryId} from API:`, error);
|
|
1494
|
-
return [];
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
|
-
async getById(id) {
|
|
1498
|
-
try {
|
|
1499
|
-
const response = await firstValueFrom(this.http.get(`/api/system-insight/report-definitions/${id}`));
|
|
1500
|
-
return response;
|
|
1501
|
-
}
|
|
1502
|
-
catch (error) {
|
|
1503
|
-
console.error(`Failed to fetch system insight report definition ${id} from API:`, error);
|
|
1504
|
-
return undefined;
|
|
1505
|
-
}
|
|
1506
|
-
}
|
|
1507
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportDefinitionApiProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1508
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportDefinitionApiProvider }); }
|
|
1509
|
-
}
|
|
1510
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportDefinitionApiProvider, decorators: [{
|
|
1511
|
-
type: Injectable
|
|
1512
|
-
}] });
|
|
1525
|
+
//#region ---- Execute Report DTO ----
|
|
1513
1526
|
//#endregion
|
|
1514
|
-
//#region ---- Provider Exports ----
|
|
1515
|
-
const AXC_SYSTEM_INSIGHT_REPORT_CATEGORY_API_PROVIDER = {
|
|
1516
|
-
provide: AXP_REPORT_CATEGORY_PROVIDER,
|
|
1517
|
-
useClass: AXCSystemInsightReportCategoryApiProvider,
|
|
1518
|
-
multi: true,
|
|
1519
|
-
};
|
|
1520
|
-
const AXC_SYSTEM_INSIGHT_REPORT_DEFINITION_API_PROVIDER = {
|
|
1521
|
-
provide: AXP_REPORT_DEFINITION_PROVIDER,
|
|
1522
|
-
useClass: AXCSystemInsightReportDefinitionApiProvider,
|
|
1523
|
-
multi: true,
|
|
1524
|
-
};
|
|
1525
1527
|
|
|
1526
1528
|
/**
|
|
1527
1529
|
* Generated bundle index. Do not edit.
|
|
1528
1530
|
*/
|
|
1529
1531
|
|
|
1530
|
-
export { APIGoogleStrategy, AXCAPIOidcStrategy, AXCApiEntityStorageService, AXCApiModule, AXCApiUserAvatarProvider,
|
|
1532
|
+
export { APIGoogleStrategy, AXCAPIOidcStrategy, AXCApiEntityStorageService, AXCApiModule, AXCApiUserAvatarProvider, AXCReportManagementApiModule, AXMConfigurationService, AXMOidcApplicationLoader, AXMOidcFeatureLoader, AXMOidcPermissionLoader, AXMOidcTenantLoader };
|
|
1531
1533
|
//# sourceMappingURL=acorex-connectivity-api.mjs.map
|