@acorex/connectivity 21.0.0-next.2 → 21.0.0-next.21
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/api/index.d.ts +6 -65
- package/fesm2022/{acorex-connectivity-api-execute.command-CQt_HF1B.mjs → acorex-connectivity-api-execute.command-Di850KiF.mjs} +7 -7
- package/fesm2022/acorex-connectivity-api-execute.command-Di850KiF.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-api.mjs +128 -206
- package/fesm2022/acorex-connectivity-api.mjs.map +1 -1
- package/fesm2022/acorex-connectivity-mock-assign-to-manager.command-T6-ao4e9.mjs +66 -0
- package/fesm2022/acorex-connectivity-mock-assign-to-manager.command-T6-ao4e9.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-category-with-items.query-Dsxj98tX.mjs → acorex-connectivity-mock-category-with-items.query-KB7GIYeb.mjs} +4 -4
- package/fesm2022/{acorex-connectivity-mock-category-with-items.query-Dsxj98tX.mjs.map → acorex-connectivity-mock-category-with-items.query-KB7GIYeb.mjs.map} +1 -1
- package/fesm2022/acorex-connectivity-mock-check-permission.command-C-AZTcHP.mjs +53 -0
- package/fesm2022/acorex-connectivity-mock-check-permission.command-C-AZTcHP.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-complete-signature-process.command-CHci1rOa.mjs +80 -0
- package/fesm2022/acorex-connectivity-mock-complete-signature-process.command-CHci1rOa.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-distribution-record.command-DRiDwlqN.mjs → acorex-connectivity-mock-distribution-record.command-DMoZvago.mjs} +4 -4
- package/fesm2022/{acorex-connectivity-mock-distribution-record.command-DRiDwlqN.mjs.map → acorex-connectivity-mock-distribution-record.command-DMoZvago.mjs.map} +1 -1
- package/fesm2022/acorex-connectivity-mock-get-application-versions-chart-data.query-B1TrIBvU.mjs +115 -0
- package/fesm2022/acorex-connectivity-mock-get-application-versions-chart-data.query-B1TrIBvU.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-application-versions-timeline.query-CvNjA4OH.mjs +163 -0
- package/fesm2022/acorex-connectivity-mock-get-application-versions-timeline.query-CvNjA4OH.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-employee-list.query--f2M5RgC.mjs +213 -0
- package/fesm2022/acorex-connectivity-mock-get-employee-list.query--f2M5RgC.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-location-list.query-Cz55arFF.mjs +209 -0
- package/fesm2022/acorex-connectivity-mock-get-location-list.query-Cz55arFF.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-product-chart-data.query-C7v7D4ep.mjs +186 -0
- package/fesm2022/acorex-connectivity-mock-get-product-chart-data.query-C7v7D4ep.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-product-list.query-DTj8RYwR.mjs +246 -0
- package/fesm2022/acorex-connectivity-mock-get-product-list.query-DTj8RYwR.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-product-pdf-data.query-DdLhRbP5.mjs +192 -0
- package/fesm2022/acorex-connectivity-mock-get-product-pdf-data.query-DdLhRbP5.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-subscriptions-chart-data.query-ybmzmVl5.mjs +56 -0
- package/fesm2022/acorex-connectivity-mock-get-subscriptions-chart-data.query-ybmzmVl5.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-subscriptions-timeline.query-kciEUx7d.mjs +246 -0
- package/fesm2022/acorex-connectivity-mock-get-subscriptions-timeline.query-kciEUx7d.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-tenant-application-access.query-BDfrwf5Z.mjs +258 -0
- package/fesm2022/acorex-connectivity-mock-get-tenant-application-access.query-BDfrwf5Z.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-tenant-registration-chart-data.query-BD4T2loB.mjs +56 -0
- package/fesm2022/acorex-connectivity-mock-get-tenant-registration-chart-data.query-BD4T2loB.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-tenant-registration-timeline.query-CMJ8W3Ns.mjs +294 -0
- package/fesm2022/acorex-connectivity-mock-get-tenant-registration-timeline.query-CMJ8W3Ns.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-get-tenant-user-distribution.query-C-gCUjbX.mjs +212 -0
- package/fesm2022/acorex-connectivity-mock-get-tenant-user-distribution.query-C-gCUjbX.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-notify-signers.command-DLMsWjWQ.mjs +69 -0
- package/fesm2022/acorex-connectivity-mock-notify-signers.command-DLMsWjWQ.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock-request-signature.command-JNkj9-Yz.mjs +72 -0
- package/fesm2022/acorex-connectivity-mock-request-signature.command-JNkj9-Yz.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-sample.command-CkH5bmEs.mjs → acorex-connectivity-mock-sample.command-CyrjdvEA.mjs} +4 -4
- package/fesm2022/{acorex-connectivity-mock-sample.command-CkH5bmEs.mjs.map → acorex-connectivity-mock-sample.command-CyrjdvEA.mjs.map} +1 -1
- package/fesm2022/acorex-connectivity-mock-validate-all-signatures.command-xKr94NrA.mjs +81 -0
- package/fesm2022/acorex-connectivity-mock-validate-all-signatures.command-xKr94NrA.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock.mjs +63874 -45210
- 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/mock/index.d.ts +986 -1839
- package/package.json +6 -6
- package/fesm2022/acorex-connectivity-api-execute.command-CQt_HF1B.mjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AXP_ROOT_CONFIG_TOKEN, AXPFilterOperatorMiddlewareService, AXPFileStorageService, AXPFileStorageStatus } from '@acorex/platform/common';
|
|
2
|
-
import { AXPEntityResolver, AXPEntityStorageService } from '@acorex/platform/layout/entity';
|
|
3
2
|
import * as i1 from '@angular/common/http';
|
|
4
3
|
import { HttpParams, HttpClient, HttpHeaders } from '@angular/common/http';
|
|
5
4
|
import * as i0 from '@angular/core';
|
|
6
5
|
import { inject, Injectable, NgModule } from '@angular/core';
|
|
7
6
|
import { kebabCase } from 'lodash-es';
|
|
8
|
-
import { firstValueFrom, catchError, of,
|
|
7
|
+
import { firstValueFrom, catchError, of, BehaviorSubject, tap, filter, take, switchMap } from 'rxjs';
|
|
9
8
|
import * as i2 from '@acorex/platform/auth';
|
|
10
9
|
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,14 +18,13 @@ 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) {
|
|
25
25
|
this.http = http;
|
|
26
26
|
this.configs = inject(AXP_ROOT_CONFIG_TOKEN);
|
|
27
27
|
this.filterService = inject(AXPFilterOperatorMiddlewareService);
|
|
28
|
-
this.entityResolver = inject(AXPEntityResolver);
|
|
29
28
|
this.mainUrl = this.configs.baseUrl;
|
|
30
29
|
// API routing constants
|
|
31
30
|
this.API_VERSION = 'v1';
|
|
@@ -141,10 +140,10 @@ class AXCApiEntityStorageService {
|
|
|
141
140
|
};
|
|
142
141
|
});
|
|
143
142
|
}
|
|
144
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
145
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
143
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCApiEntityStorageService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
144
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCApiEntityStorageService }); }
|
|
146
145
|
}
|
|
147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCApiEntityStorageService, decorators: [{
|
|
148
147
|
type: Injectable
|
|
149
148
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
150
149
|
|
|
@@ -291,10 +290,10 @@ class AXCFileStorageApiService extends AXPFileStorageService {
|
|
|
291
290
|
// Silently fail in fallback mode
|
|
292
291
|
}
|
|
293
292
|
}
|
|
294
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
295
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
293
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCFileStorageApiService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
294
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCFileStorageApiService }); }
|
|
296
295
|
}
|
|
297
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
296
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCFileStorageApiService, decorators: [{
|
|
298
297
|
type: Injectable
|
|
299
298
|
}] });
|
|
300
299
|
|
|
@@ -305,10 +304,9 @@ class AXMOidcApplicationLoader {
|
|
|
305
304
|
this.apiGetApps = `${this.configs.baseUrl}/applications/applications-for-current-tenant`;
|
|
306
305
|
this.apiSetApp = `${this.configs.baseUrl}/SetApplication`;
|
|
307
306
|
}
|
|
308
|
-
getList() {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
}));
|
|
307
|
+
async getList(context) {
|
|
308
|
+
const response = await firstValueFrom(this.http.get(this.apiGetApps));
|
|
309
|
+
return response.items.map((item) => this.mapToAXPApplication(item));
|
|
312
310
|
}
|
|
313
311
|
set(application) {
|
|
314
312
|
return Promise.resolve();
|
|
@@ -335,14 +333,20 @@ class AXMOidcApplicationLoader {
|
|
|
335
333
|
version: item.version || '1.0.0',
|
|
336
334
|
description: item.description,
|
|
337
335
|
logo: item.logo, // Assuming logo is of type AXPLogoConfig or undefined
|
|
338
|
-
|
|
336
|
+
edition: item.edition
|
|
337
|
+
? {
|
|
338
|
+
id: item.edition.id,
|
|
339
|
+
title: item.edition.title,
|
|
340
|
+
description: item.edition.description,
|
|
341
|
+
}
|
|
342
|
+
: undefined,
|
|
339
343
|
// features: item.features || [],
|
|
340
344
|
};
|
|
341
345
|
}
|
|
342
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
343
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
346
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMOidcApplicationLoader, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
347
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMOidcApplicationLoader }); }
|
|
344
348
|
}
|
|
345
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMOidcApplicationLoader, decorators: [{
|
|
346
350
|
type: Injectable
|
|
347
351
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
348
352
|
|
|
@@ -382,10 +386,10 @@ class AXMConfigurationService {
|
|
|
382
386
|
switchMap(() => of(this.applicationConfig)));
|
|
383
387
|
}
|
|
384
388
|
}
|
|
385
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
386
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
389
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMConfigurationService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
390
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMConfigurationService, providedIn: 'root' }); }
|
|
387
391
|
}
|
|
388
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMConfigurationService, decorators: [{
|
|
389
393
|
type: Injectable,
|
|
390
394
|
args: [{
|
|
391
395
|
providedIn: 'root',
|
|
@@ -407,8 +411,8 @@ class AXMOidcFeatureLoader {
|
|
|
407
411
|
}
|
|
408
412
|
];
|
|
409
413
|
}
|
|
410
|
-
getList() {
|
|
411
|
-
return
|
|
414
|
+
async getList(context) {
|
|
415
|
+
return this.list;
|
|
412
416
|
}
|
|
413
417
|
}
|
|
414
418
|
|
|
@@ -758,10 +762,10 @@ class AXCAPIOidcStrategy extends AXPAuthStrategy {
|
|
|
758
762
|
get name() {
|
|
759
763
|
return 'oidc';
|
|
760
764
|
}
|
|
761
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
762
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
765
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCAPIOidcStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
766
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCAPIOidcStrategy }); }
|
|
763
767
|
}
|
|
764
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
768
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCAPIOidcStrategy, decorators: [{
|
|
765
769
|
type: Injectable
|
|
766
770
|
}] });
|
|
767
771
|
|
|
@@ -771,25 +775,26 @@ class AXMOidcPermissionLoader {
|
|
|
771
775
|
this.configs = inject(AXP_ROOT_CONFIG_TOKEN);
|
|
772
776
|
this.apiGetConfig = `${this.configs.baseUrl}/abp/application-configuration`;
|
|
773
777
|
}
|
|
774
|
-
getList(context) {
|
|
775
|
-
|
|
778
|
+
async getList(context) {
|
|
779
|
+
const response = await firstValueFrom(this.http.get(this.apiGetConfig));
|
|
780
|
+
return this.mapTo(response);
|
|
776
781
|
// if (context.user == null)
|
|
777
|
-
// return
|
|
782
|
+
// return [];
|
|
778
783
|
// else if (context.user.name.toLowerCase() == 'admin')
|
|
779
|
-
// return
|
|
784
|
+
// return ['axp.admin.console', 'asc.admin.message', 'asc.admin.settings', 'asc.admin.gliding', 'asc.user.gliding'];
|
|
780
785
|
// else
|
|
781
|
-
// return
|
|
782
|
-
// return
|
|
786
|
+
// return ['asc.user.gliding'];
|
|
787
|
+
// return ['axp.admin.console', 'asc.admin.message', 'asc.admin.settings', 'asc.admin.gliding', 'asc.user.gliding'];
|
|
783
788
|
}
|
|
784
789
|
mapTo(jsonObj) {
|
|
785
790
|
const policies = jsonObj.auth.grantedPolicies;
|
|
786
791
|
const truePolicies = Object.keys(policies).filter((key) => policies[key] === true);
|
|
787
792
|
return truePolicies;
|
|
788
793
|
}
|
|
789
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
790
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
794
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMOidcPermissionLoader, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
795
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMOidcPermissionLoader }); }
|
|
791
796
|
}
|
|
792
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
797
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMOidcPermissionLoader, decorators: [{
|
|
793
798
|
type: Injectable
|
|
794
799
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
795
800
|
|
|
@@ -799,10 +804,11 @@ class AXMOidcTenantLoader {
|
|
|
799
804
|
this.configs = inject(AXP_ROOT_CONFIG_TOKEN);
|
|
800
805
|
this.apiGetTenants = `${this.configs.baseUrl}/tenants/available-for-user`;
|
|
801
806
|
}
|
|
802
|
-
getList() {
|
|
803
|
-
|
|
807
|
+
async getList(context) {
|
|
808
|
+
const response = await firstValueFrom(this.http.get(this.apiGetTenants));
|
|
809
|
+
return response.items.map((item) => {
|
|
804
810
|
return this.mapToAXPTenant(item);
|
|
805
|
-
})
|
|
811
|
+
});
|
|
806
812
|
}
|
|
807
813
|
async set(tenant) {
|
|
808
814
|
return Promise.resolve();
|
|
@@ -815,10 +821,10 @@ class AXMOidcTenantLoader {
|
|
|
815
821
|
// Add other fields and defaults as needed, and handle the logo if applicable
|
|
816
822
|
};
|
|
817
823
|
}
|
|
818
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
819
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
824
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMOidcTenantLoader, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
825
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMOidcTenantLoader }); }
|
|
820
826
|
}
|
|
821
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
827
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMOidcTenantLoader, decorators: [{
|
|
822
828
|
type: Injectable
|
|
823
829
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
824
830
|
|
|
@@ -840,7 +846,7 @@ class AXCApiUserAvatarProvider {
|
|
|
840
846
|
firstName: firstName || '',
|
|
841
847
|
lastName: lastName || '',
|
|
842
848
|
status: 'online',
|
|
843
|
-
avatarUrl: currentUser.avatar ||
|
|
849
|
+
avatarUrl: currentUser.avatar || AXPDataGenerator.avatar(),
|
|
844
850
|
};
|
|
845
851
|
}
|
|
846
852
|
// Use entity service for other users
|
|
@@ -855,20 +861,29 @@ class AXCApiUserAvatarProvider {
|
|
|
855
861
|
firstName: firstName || '',
|
|
856
862
|
lastName: lastName || '',
|
|
857
863
|
status: 'online',
|
|
858
|
-
avatarUrl:
|
|
864
|
+
avatarUrl: AXPDataGenerator.avatar(),
|
|
859
865
|
};
|
|
860
866
|
}
|
|
861
867
|
}
|
|
862
868
|
|
|
869
|
+
//#region ---- Imports ----
|
|
863
870
|
//#endregion
|
|
864
|
-
|
|
865
|
-
|
|
871
|
+
/**
|
|
872
|
+
* API-based Report Viewer Service
|
|
873
|
+
* Extends the base service to override data loading methods with API calls
|
|
874
|
+
*/
|
|
875
|
+
class AXCReportViewerApiService extends AXPReportViewerService {
|
|
866
876
|
constructor() {
|
|
877
|
+
super(...arguments);
|
|
867
878
|
this.http = inject(HttpClient);
|
|
868
879
|
this.configs = inject(AXP_ROOT_CONFIG_TOKEN);
|
|
869
880
|
this.baseUrl = this.configs.baseUrl;
|
|
870
881
|
}
|
|
871
|
-
|
|
882
|
+
//#region ---- Override: Category Loading ----
|
|
883
|
+
/**
|
|
884
|
+
* Override: Load categories from API instead of entity service
|
|
885
|
+
*/
|
|
886
|
+
async loadCategories(parentId) {
|
|
872
887
|
try {
|
|
873
888
|
let url;
|
|
874
889
|
if (parentId) {
|
|
@@ -892,50 +907,12 @@ class AXCReportCategoryApiProvider {
|
|
|
892
907
|
return [];
|
|
893
908
|
}
|
|
894
909
|
}
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
// Fallback: search in all categories
|
|
902
|
-
const allUrl = `${this.baseUrl}/v1/global/report-management/category`;
|
|
903
|
-
const params = { Skip: 0, Take: 1000 };
|
|
904
|
-
const allResponse = await firstValueFrom(this.http.get(allUrl, { params }));
|
|
905
|
-
const all = allResponse.items ?? [];
|
|
906
|
-
const found = all.find((c) => c.id === id);
|
|
907
|
-
return found ? this.mapApiCategoryToReportCategory(found) : undefined;
|
|
908
|
-
}
|
|
909
|
-
return this.mapApiCategoryToReportCategory(apiItem);
|
|
910
|
-
}
|
|
911
|
-
catch (error) {
|
|
912
|
-
console.error('Error fetching report category by ID:', error);
|
|
913
|
-
return undefined;
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
mapApiCategoryToReportCategory(apiItem) {
|
|
917
|
-
return {
|
|
918
|
-
id: apiItem.id,
|
|
919
|
-
title: apiItem.title,
|
|
920
|
-
description: apiItem.description || undefined,
|
|
921
|
-
parentId: apiItem.reportCategoryParentId || undefined,
|
|
922
|
-
childrenCount: apiItem.folderCount ?? 0,
|
|
923
|
-
itemsCount: apiItem.itemCount ?? 0,
|
|
924
|
-
};
|
|
925
|
-
}
|
|
926
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportCategoryApiProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
927
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportCategoryApiProvider }); }
|
|
928
|
-
}
|
|
929
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportCategoryApiProvider, decorators: [{
|
|
930
|
-
type: Injectable
|
|
931
|
-
}] });
|
|
932
|
-
class AXCReportDefinitionApiProvider {
|
|
933
|
-
constructor() {
|
|
934
|
-
this.http = inject(HttpClient);
|
|
935
|
-
this.configs = inject(AXP_ROOT_CONFIG_TOKEN);
|
|
936
|
-
this.baseUrl = this.configs.baseUrl;
|
|
937
|
-
}
|
|
938
|
-
async getList(categoryId) {
|
|
910
|
+
//#endregion
|
|
911
|
+
//#region ---- Override: Report Loading ----
|
|
912
|
+
/**
|
|
913
|
+
* Override: Load reports from API instead of entity service
|
|
914
|
+
*/
|
|
915
|
+
async loadReports(categoryId) {
|
|
939
916
|
try {
|
|
940
917
|
const url = `${this.baseUrl}/v1/global/report-management/category/${categoryId}`;
|
|
941
918
|
const response = await firstValueFrom(this.http.get(url));
|
|
@@ -960,7 +937,10 @@ class AXCReportDefinitionApiProvider {
|
|
|
960
937
|
return [];
|
|
961
938
|
}
|
|
962
939
|
}
|
|
963
|
-
|
|
940
|
+
/**
|
|
941
|
+
* Override: Load single report from API instead of entity service
|
|
942
|
+
*/
|
|
943
|
+
async loadReport(id) {
|
|
964
944
|
try {
|
|
965
945
|
const url = `${this.baseUrl}/v1/global/report-management/report/${id}`;
|
|
966
946
|
const response = await firstValueFrom(this.http.get(url));
|
|
@@ -971,6 +951,33 @@ class AXCReportDefinitionApiProvider {
|
|
|
971
951
|
return undefined;
|
|
972
952
|
}
|
|
973
953
|
}
|
|
954
|
+
//#endregion
|
|
955
|
+
//#region ---- Override: Report Execution ----
|
|
956
|
+
/**
|
|
957
|
+
* Override: Execute report with given context
|
|
958
|
+
* Implements report execution logic for API environment
|
|
959
|
+
* TODO: Implement API call to execute report
|
|
960
|
+
*/
|
|
961
|
+
async executeReport(context) {
|
|
962
|
+
// TODO: Implement API call to execute report
|
|
963
|
+
// Example:
|
|
964
|
+
// const url = `${this.baseUrl}/v1/global/report-management/report/${context.reportId}/execute`;
|
|
965
|
+
// const response = await firstValueFrom(this.http.post<AXPExecutionReportCommandResult>(url, context));
|
|
966
|
+
// return response;
|
|
967
|
+
throw new Error('executeReport API implementation is not yet implemented');
|
|
968
|
+
}
|
|
969
|
+
//#endregion
|
|
970
|
+
//#region ---- Private: Mapping Methods ----
|
|
971
|
+
mapApiCategoryToReportCategory(apiItem) {
|
|
972
|
+
return {
|
|
973
|
+
id: apiItem.id,
|
|
974
|
+
title: apiItem.title,
|
|
975
|
+
description: apiItem.description || undefined,
|
|
976
|
+
parentId: apiItem.reportCategoryParentId || undefined,
|
|
977
|
+
childrenCount: apiItem.folderCount ?? 0,
|
|
978
|
+
itemsCount: apiItem.itemCount ?? 0,
|
|
979
|
+
};
|
|
980
|
+
}
|
|
974
981
|
mapApiReportDefinitionItemToReportDefinition(apiItem) {
|
|
975
982
|
return {
|
|
976
983
|
id: apiItem.id,
|
|
@@ -1013,52 +1020,47 @@ class AXCReportDefinitionApiProvider {
|
|
|
1013
1020
|
defaultLayoutId: apiResponse.defaultLayoutId,
|
|
1014
1021
|
};
|
|
1015
1022
|
}
|
|
1016
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1017
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1023
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCReportViewerApiService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1024
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCReportViewerApiService, providedIn: 'root' }); }
|
|
1018
1025
|
}
|
|
1019
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1020
|
-
type: Injectable
|
|
1026
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCReportViewerApiService, decorators: [{
|
|
1027
|
+
type: Injectable,
|
|
1028
|
+
args: [{
|
|
1029
|
+
providedIn: 'root',
|
|
1030
|
+
}]
|
|
1021
1031
|
}] });
|
|
1022
|
-
//#endregion
|
|
1023
|
-
//#region ---- Provider Exports ----
|
|
1024
|
-
const AXC_REPORT_CATEGORY_API_PROVIDER = {
|
|
1025
|
-
provide: AXP_REPORT_CATEGORY_PROVIDER,
|
|
1026
|
-
useClass: AXCReportCategoryApiProvider,
|
|
1027
|
-
multi: true,
|
|
1028
|
-
};
|
|
1029
|
-
const AXC_REPORT_DEFINITION_API_PROVIDER = {
|
|
1030
|
-
provide: AXP_REPORT_DEFINITION_PROVIDER,
|
|
1031
|
-
useClass: AXCReportDefinitionApiProvider,
|
|
1032
|
-
multi: true,
|
|
1033
|
-
};
|
|
1034
1032
|
|
|
1035
1033
|
class AXCReportManagementApiModule {
|
|
1036
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1037
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
1038
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
1039
|
-
|
|
1040
|
-
|
|
1034
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCReportManagementApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1035
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXCReportManagementApiModule, imports: [AXPRuntimeModule] }); }
|
|
1036
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCReportManagementApiModule, providers: [
|
|
1037
|
+
{
|
|
1038
|
+
provide: AXPReportViewerService,
|
|
1039
|
+
useClass: AXCReportViewerApiService,
|
|
1040
|
+
},
|
|
1041
1041
|
provideCommandSetups([
|
|
1042
1042
|
{
|
|
1043
1043
|
key: 'ReportManagement.Report:Execute',
|
|
1044
|
-
command: () => import('./acorex-connectivity-api-execute.command-
|
|
1044
|
+
command: () => import('./acorex-connectivity-api-execute.command-Di850KiF.mjs').then((c) => c.AXCReportExecuteCommand),
|
|
1045
1045
|
}
|
|
1046
1046
|
]),
|
|
1047
1047
|
], imports: [AXPRuntimeModule] }); }
|
|
1048
1048
|
}
|
|
1049
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1049
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCReportManagementApiModule, decorators: [{
|
|
1050
1050
|
type: NgModule,
|
|
1051
1051
|
args: [{
|
|
1052
1052
|
imports: [AXPRuntimeModule],
|
|
1053
1053
|
exports: [],
|
|
1054
1054
|
declarations: [],
|
|
1055
1055
|
providers: [
|
|
1056
|
-
|
|
1057
|
-
|
|
1056
|
+
{
|
|
1057
|
+
provide: AXPReportViewerService,
|
|
1058
|
+
useClass: AXCReportViewerApiService,
|
|
1059
|
+
},
|
|
1058
1060
|
provideCommandSetups([
|
|
1059
1061
|
{
|
|
1060
1062
|
key: 'ReportManagement.Report:Execute',
|
|
1061
|
-
command: () => import('./acorex-connectivity-api-execute.command-
|
|
1063
|
+
command: () => import('./acorex-connectivity-api-execute.command-Di850KiF.mjs').then((c) => c.AXCReportExecuteCommand),
|
|
1062
1064
|
}
|
|
1063
1065
|
]),
|
|
1064
1066
|
],
|
|
@@ -1066,10 +1068,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1066
1068
|
}] });
|
|
1067
1069
|
|
|
1068
1070
|
class AXCApiModule {
|
|
1069
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1070
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
1071
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1072
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXCApiModule, imports: [i1$1.OAuthModule, i2.AXPAuthModule, AXCUtilsModule,
|
|
1071
1073
|
AXCReportManagementApiModule] }); }
|
|
1072
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
1074
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCApiModule, providers: [
|
|
1073
1075
|
{
|
|
1074
1076
|
provide: AXPEntityStorageService,
|
|
1075
1077
|
useClass: AXCApiEntityStorageService,
|
|
@@ -1112,7 +1114,7 @@ class AXCApiModule {
|
|
|
1112
1114
|
AXCUtilsModule,
|
|
1113
1115
|
AXCReportManagementApiModule] }); }
|
|
1114
1116
|
}
|
|
1115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXCApiModule, decorators: [{
|
|
1116
1118
|
type: NgModule,
|
|
1117
1119
|
args: [{
|
|
1118
1120
|
imports: [
|
|
@@ -1427,99 +1429,19 @@ class APIGoogleStrategy extends AXPAuthStrategy {
|
|
|
1427
1429
|
console.error('Authentication error:', error);
|
|
1428
1430
|
throw error;
|
|
1429
1431
|
}
|
|
1430
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1431
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1432
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: APIGoogleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1433
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: APIGoogleStrategy }); }
|
|
1432
1434
|
}
|
|
1433
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: APIGoogleStrategy, decorators: [{
|
|
1434
1436
|
type: Injectable
|
|
1435
1437
|
}], ctorParameters: () => [] });
|
|
1436
1438
|
|
|
1437
|
-
//#region ----
|
|
1438
|
-
//#endregion
|
|
1439
|
-
//#region ---- API Providers ----
|
|
1440
|
-
class AXCSystemInsightReportCategoryApiProvider {
|
|
1441
|
-
constructor() {
|
|
1442
|
-
this.http = inject(HttpClient);
|
|
1443
|
-
}
|
|
1444
|
-
async getList(parentId) {
|
|
1445
|
-
try {
|
|
1446
|
-
// Call API to get report categories
|
|
1447
|
-
const params = {};
|
|
1448
|
-
if (parentId) {
|
|
1449
|
-
params.parentId = parentId;
|
|
1450
|
-
}
|
|
1451
|
-
const response = await firstValueFrom(this.http.get('/api/system-insight/report-categories', { params }));
|
|
1452
|
-
return response;
|
|
1453
|
-
}
|
|
1454
|
-
catch (error) {
|
|
1455
|
-
console.error('Failed to fetch system insight report categories from API:', error);
|
|
1456
|
-
return [];
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
async getById(id) {
|
|
1460
|
-
try {
|
|
1461
|
-
const response = await firstValueFrom(this.http.get(`/api/system-insight/report-categories/${id}`));
|
|
1462
|
-
return response;
|
|
1463
|
-
}
|
|
1464
|
-
catch (error) {
|
|
1465
|
-
console.error(`Failed to fetch system insight report category ${id} from API:`, error);
|
|
1466
|
-
return undefined;
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportCategoryApiProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1470
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportCategoryApiProvider }); }
|
|
1471
|
-
}
|
|
1472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportCategoryApiProvider, decorators: [{
|
|
1473
|
-
type: Injectable
|
|
1474
|
-
}] });
|
|
1475
|
-
class AXCSystemInsightReportDefinitionApiProvider {
|
|
1476
|
-
constructor() {
|
|
1477
|
-
this.http = inject(HttpClient);
|
|
1478
|
-
}
|
|
1479
|
-
async getList(categoryId) {
|
|
1480
|
-
try {
|
|
1481
|
-
const response = await firstValueFrom(this.http.get(`/api/system-insight/report-definitions`, {
|
|
1482
|
-
params: { categoryId }
|
|
1483
|
-
}));
|
|
1484
|
-
return response;
|
|
1485
|
-
}
|
|
1486
|
-
catch (error) {
|
|
1487
|
-
console.error(`Failed to fetch system insight report definitions for category ${categoryId} from API:`, error);
|
|
1488
|
-
return [];
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
|
-
async getById(id) {
|
|
1492
|
-
try {
|
|
1493
|
-
const response = await firstValueFrom(this.http.get(`/api/system-insight/report-definitions/${id}`));
|
|
1494
|
-
return response;
|
|
1495
|
-
}
|
|
1496
|
-
catch (error) {
|
|
1497
|
-
console.error(`Failed to fetch system insight report definition ${id} from API:`, error);
|
|
1498
|
-
return undefined;
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1501
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportDefinitionApiProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1502
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportDefinitionApiProvider }); }
|
|
1503
|
-
}
|
|
1504
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportDefinitionApiProvider, decorators: [{
|
|
1505
|
-
type: Injectable
|
|
1506
|
-
}] });
|
|
1439
|
+
//#region ---- Execute Report DTO ----
|
|
1507
1440
|
//#endregion
|
|
1508
|
-
//#region ---- Provider Exports ----
|
|
1509
|
-
const AXC_SYSTEM_INSIGHT_REPORT_CATEGORY_API_PROVIDER = {
|
|
1510
|
-
provide: AXP_REPORT_CATEGORY_PROVIDER,
|
|
1511
|
-
useClass: AXCSystemInsightReportCategoryApiProvider,
|
|
1512
|
-
multi: true,
|
|
1513
|
-
};
|
|
1514
|
-
const AXC_SYSTEM_INSIGHT_REPORT_DEFINITION_API_PROVIDER = {
|
|
1515
|
-
provide: AXP_REPORT_DEFINITION_PROVIDER,
|
|
1516
|
-
useClass: AXCSystemInsightReportDefinitionApiProvider,
|
|
1517
|
-
multi: true,
|
|
1518
|
-
};
|
|
1519
1441
|
|
|
1520
1442
|
/**
|
|
1521
1443
|
* Generated bundle index. Do not edit.
|
|
1522
1444
|
*/
|
|
1523
1445
|
|
|
1524
|
-
export { APIGoogleStrategy, AXCAPIOidcStrategy, AXCApiEntityStorageService, AXCApiModule, AXCApiUserAvatarProvider,
|
|
1446
|
+
export { APIGoogleStrategy, AXCAPIOidcStrategy, AXCApiEntityStorageService, AXCApiModule, AXCApiUserAvatarProvider, AXCReportManagementApiModule, AXMConfigurationService, AXMOidcApplicationLoader, AXMOidcFeatureLoader, AXMOidcPermissionLoader, AXMOidcTenantLoader };
|
|
1525
1447
|
//# sourceMappingURL=acorex-connectivity-api.mjs.map
|