@acorex/connectivity 20.6.0-next.10 → 20.6.0-next.11
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 +33 -1
- package/fesm2022/{acorex-connectivity-api-execute.command-BwXw_Kn7.mjs → acorex-connectivity-api-execute.command-CQt_HF1B.mjs} +13 -4
- package/fesm2022/acorex-connectivity-api-execute.command-CQt_HF1B.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-api.mjs +95 -5
- package/fesm2022/acorex-connectivity-api.mjs.map +1 -1
- package/fesm2022/{acorex-connectivity-mock-category-with-items.query-NY9J0cQ0.mjs → acorex-connectivity-mock-category-with-items.query-Dsxj98tX.mjs} +2 -2
- package/fesm2022/acorex-connectivity-mock-category-with-items.query-Dsxj98tX.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-distribution-record.command-B-Xviv6G.mjs → acorex-connectivity-mock-distribution-record.command-DRiDwlqN.mjs} +12 -3
- package/fesm2022/acorex-connectivity-mock-distribution-record.command-DRiDwlqN.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-sample.command-BkxMgq1C.mjs → acorex-connectivity-mock-sample.command-CkH5bmEs.mjs} +4 -1
- package/fesm2022/acorex-connectivity-mock-sample.command-CkH5bmEs.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock.mjs +13106 -8585
- package/fesm2022/acorex-connectivity-mock.mjs.map +1 -1
- package/mock/index.d.ts +1019 -42
- package/package.json +6 -6
- package/fesm2022/acorex-connectivity-api-execute.command-BwXw_Kn7.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-category-with-items.query-NY9J0cQ0.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-distribution-record.command-B-Xviv6G.mjs.map +0 -1
- package/fesm2022/acorex-connectivity-mock-sample.command-BkxMgq1C.mjs.map +0 -1
package/api/index.d.ts
CHANGED
|
@@ -243,6 +243,31 @@ declare class APIGoogleStrategy extends AXPAuthStrategy {
|
|
|
243
243
|
static ɵprov: i0.ɵɵInjectableDeclaration<APIGoogleStrategy>;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
+
declare class AXCSystemInsightReportCategoryApiProvider implements AXPReportCategoryProvider {
|
|
247
|
+
private http;
|
|
248
|
+
getList(parentId?: string): Promise<AXPReportCategory[]>;
|
|
249
|
+
getById(id: string): Promise<AXPReportCategory | undefined>;
|
|
250
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXCSystemInsightReportCategoryApiProvider, never>;
|
|
251
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXCSystemInsightReportCategoryApiProvider>;
|
|
252
|
+
}
|
|
253
|
+
declare class AXCSystemInsightReportDefinitionApiProvider implements AXPReportDefinitionProvider {
|
|
254
|
+
private http;
|
|
255
|
+
getList(categoryId: string): Promise<AXPReportDefinition[]>;
|
|
256
|
+
getById(id: string): Promise<AXPReportDefinition | undefined>;
|
|
257
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXCSystemInsightReportDefinitionApiProvider, never>;
|
|
258
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXCSystemInsightReportDefinitionApiProvider>;
|
|
259
|
+
}
|
|
260
|
+
declare const AXC_SYSTEM_INSIGHT_REPORT_CATEGORY_API_PROVIDER: {
|
|
261
|
+
provide: i0.InjectionToken<_acorex_modules_report_management.AXPReportCategoryProviderToken[]>;
|
|
262
|
+
useClass: typeof AXCSystemInsightReportCategoryApiProvider;
|
|
263
|
+
multi: boolean;
|
|
264
|
+
};
|
|
265
|
+
declare const AXC_SYSTEM_INSIGHT_REPORT_DEFINITION_API_PROVIDER: {
|
|
266
|
+
provide: i0.InjectionToken<_acorex_modules_report_management.AXPReportDefinitionProviderToken[]>;
|
|
267
|
+
useClass: typeof AXCSystemInsightReportDefinitionApiProvider;
|
|
268
|
+
multi: boolean;
|
|
269
|
+
};
|
|
270
|
+
|
|
246
271
|
/**
|
|
247
272
|
* Execute Report DTO - Response from report execution API
|
|
248
273
|
*/
|
|
@@ -396,6 +421,13 @@ declare class AXCReportCategoryApiProvider implements AXPReportCategoryProvider
|
|
|
396
421
|
private readonly dataService;
|
|
397
422
|
getList(parentId?: string): Promise<AXPReportCategory[]>;
|
|
398
423
|
getById(id: string): Promise<AXPReportCategory | undefined>;
|
|
424
|
+
/**
|
|
425
|
+
* Map API category to report category with optimized count properties
|
|
426
|
+
*
|
|
427
|
+
* Performance: Uses direct counts from API instead of boolean flags
|
|
428
|
+
* - childrenCount: Number of child categories (folderCount)
|
|
429
|
+
* - itemsCount: Number of direct reports (itemCount)
|
|
430
|
+
*/
|
|
399
431
|
private mapApiCategoryToReportCategory;
|
|
400
432
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXCReportCategoryApiProvider, never>;
|
|
401
433
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXCReportCategoryApiProvider>;
|
|
@@ -430,5 +462,5 @@ declare const AXC_REPORT_DEFINITION_API_PROVIDER: {
|
|
|
430
462
|
multi: boolean;
|
|
431
463
|
};
|
|
432
464
|
|
|
433
|
-
export { APIGoogleStrategy, AXCAPIOidcStrategy, AXCApiEntityStorageService, AXCApiModule, AXCApiUserAvatarProvider, AXCReportCategoryApiProvider, AXCReportDefinitionApiProvider, AXCReportManagementApiModule, AXCReportManagementDataService, AXC_REPORT_CATEGORY_API_PROVIDER, AXC_REPORT_DEFINITION_API_PROVIDER, AXMConfigurationService, AXMOidcApplicationLoader, AXMOidcFeatureLoader, AXMOidcPermissionLoader, AXMOidcTenantLoader };
|
|
465
|
+
export { APIGoogleStrategy, AXCAPIOidcStrategy, AXCApiEntityStorageService, AXCApiModule, AXCApiUserAvatarProvider, AXCReportCategoryApiProvider, AXCReportDefinitionApiProvider, AXCReportManagementApiModule, AXCReportManagementDataService, AXCSystemInsightReportCategoryApiProvider, AXCSystemInsightReportDefinitionApiProvider, AXC_REPORT_CATEGORY_API_PROVIDER, AXC_REPORT_DEFINITION_API_PROVIDER, AXC_SYSTEM_INSIGHT_REPORT_CATEGORY_API_PROVIDER, AXC_SYSTEM_INSIGHT_REPORT_DEFINITION_API_PROVIDER, AXMConfigurationService, AXMOidcApplicationLoader, AXMOidcFeatureLoader, AXMOidcPermissionLoader, AXMOidcTenantLoader };
|
|
434
466
|
export type { AXCReportCategoryApiItem, AXCReportCategoryApiResponse, AXCReportDefinitionApiItem, AXCReportDefinitionApiResponse, AXCReportLayoutDefinition, AXCReportParameter, AXCReportParameterGroup, AXPExecuteReportDto, AXPOAuthExternalCredentials, AXPUserPassCredentials, ApplicationConfiguration, Auth, Culture, IAuthenticationDataModel, Language, Localization, NameValue, Resource };
|
|
@@ -62,14 +62,23 @@ class AXCReportExecuteCommand {
|
|
|
62
62
|
}
|
|
63
63
|
// Return the combined layout configuration and data
|
|
64
64
|
return {
|
|
65
|
-
|
|
66
|
-
data:
|
|
65
|
+
success: true,
|
|
66
|
+
data: {
|
|
67
|
+
...layoutDefinition.layout,
|
|
68
|
+
data: executionResult,
|
|
69
|
+
},
|
|
67
70
|
};
|
|
68
71
|
}
|
|
69
72
|
catch (error) {
|
|
70
73
|
console.error('Error executing report:', error);
|
|
71
74
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
72
|
-
|
|
75
|
+
return {
|
|
76
|
+
success: false,
|
|
77
|
+
message: {
|
|
78
|
+
type: 'error',
|
|
79
|
+
text: `Failed to execute report: ${errorMessage}`,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
73
82
|
}
|
|
74
83
|
}
|
|
75
84
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportExecuteCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -83,4 +92,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
83
92
|
}] });
|
|
84
93
|
|
|
85
94
|
export { AXCReportExecuteCommand };
|
|
86
|
-
//# sourceMappingURL=acorex-connectivity-api-execute.command-
|
|
95
|
+
//# sourceMappingURL=acorex-connectivity-api-execute.command-CQt_HF1B.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-connectivity-api-execute.command-CQt_HF1B.mjs","sources":["../tmp-esm2022/api/lib/report-management/execute.command.js"],"sourcesContent":["import { AXPReportDefinitionService, } 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 * as i0 from \"@angular/core\";\nexport class AXCReportExecuteCommand {\n constructor() {\n this.http = inject(HttpClient);\n this.reportDefinitionService = inject(AXPReportDefinitionService);\n this.configs = inject(AXP_ROOT_CONFIG_TOKEN);\n this.baseUrl = this.configs.baseUrl;\n }\n //#region ---- Command Implementation ----\n async execute(context) {\n try {\n const { reportId, layoutId, parameters } = context;\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 // Find the specific layout\n const layoutDefinition = reportDefinition.layouts.find((l) => l.id === layoutId);\n if (!layoutDefinition) {\n throw new Error(`Layout with ID ${layoutId} not found in report ${reportId}`);\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 const executeResult = await firstValueFrom(this.http.post(url, body));\n // Convert ExecuteReportDto to AXPExecutionReportResult format\n let executionResult;\n if (executeResult.type === 'table') {\n executionResult = {\n type: 'table',\n items: executeResult.items,\n total: executeResult.totalCount,\n };\n }\n else if (executeResult.type === 'chart') {\n executionResult = {\n type: 'chart',\n data: executeResult.items[0] || {},\n };\n }\n else if (executeResult.type === 'cards') {\n executionResult = {\n type: 'cards',\n items: executeResult.items,\n };\n }\n else {\n executionResult = {\n type: 'custom',\n data: executeResult.items,\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 }\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',\n text: `Failed to execute report: ${errorMessage}`,\n },\n };\n }\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.3.12\", ngImport: i0, type: AXCReportExecuteCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"20.3.12\", ngImport: i0, type: AXCReportExecuteCommand, providedIn: 'root' }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.3.12\", ngImport: i0, type: AXCReportExecuteCommand, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhlY3V0ZS5jb21tYW5kLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb25uZWN0aXZpdHkvYXBpL3NyYy9saWIvcmVwb3J0LW1hbmFnZW1lbnQvZXhlY3V0ZS5jb21tYW5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFLTCwwQkFBMEIsR0FFM0IsTUFBTSxtQ0FBbUMsQ0FBQztBQUMzQyxPQUFPLEVBQUUscUJBQXFCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUNoRSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDbEQsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDbkQsT0FBTyxFQUFFLGNBQWMsRUFBRSxN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AE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC;AAC3L,IAAI,SAAS,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,qBAAqB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;AAClK;AACA,EAAE,CAAC,wBAAwB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE,UAAU,EAAE,CAAC;AAClI,YAAY,IAAI,EAAE,UAAU;AAC5B,YAAY,IAAI,EAAE,CAAC;AACnB,oBAAoB,UAAU,EAAE,MAAM;AACtC,iBAAiB;AACjB,SAAS,CAAC,EAAE,CAAC;;;;"}
|
|
@@ -1067,14 +1067,21 @@ class AXCReportCategoryApiProvider {
|
|
|
1067
1067
|
return undefined;
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
1070
|
+
/**
|
|
1071
|
+
* Map API category to report category with optimized count properties
|
|
1072
|
+
*
|
|
1073
|
+
* Performance: Uses direct counts from API instead of boolean flags
|
|
1074
|
+
* - childrenCount: Number of child categories (folderCount)
|
|
1075
|
+
* - itemsCount: Number of direct reports (itemCount)
|
|
1076
|
+
*/
|
|
1070
1077
|
mapApiCategoryToReportCategory(apiItem) {
|
|
1071
1078
|
return {
|
|
1072
1079
|
id: apiItem.id,
|
|
1073
1080
|
title: apiItem.title,
|
|
1074
1081
|
description: apiItem.description || undefined,
|
|
1075
1082
|
parentId: apiItem.reportCategoryParentId || undefined,
|
|
1076
|
-
|
|
1077
|
-
|
|
1083
|
+
childrenCount: apiItem.folderCount ?? 0, // Direct child categories
|
|
1084
|
+
itemsCount: apiItem.itemCount ?? 0, // Direct reports in this category
|
|
1078
1085
|
};
|
|
1079
1086
|
}
|
|
1080
1087
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCReportCategoryApiProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -1196,7 +1203,7 @@ class AXCReportManagementApiModule {
|
|
|
1196
1203
|
provideCommandSetups([
|
|
1197
1204
|
{
|
|
1198
1205
|
key: 'ReportManagement.Report:Execute',
|
|
1199
|
-
command: () => import('./acorex-connectivity-api-execute.command-
|
|
1206
|
+
command: () => import('./acorex-connectivity-api-execute.command-CQt_HF1B.mjs').then((c) => c.AXCReportExecuteCommand),
|
|
1200
1207
|
},
|
|
1201
1208
|
]),
|
|
1202
1209
|
], imports: [AXPRuntimeModule] }); }
|
|
@@ -1214,7 +1221,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1214
1221
|
provideCommandSetups([
|
|
1215
1222
|
{
|
|
1216
1223
|
key: 'ReportManagement.Report:Execute',
|
|
1217
|
-
command: () => import('./acorex-connectivity-api-execute.command-
|
|
1224
|
+
command: () => import('./acorex-connectivity-api-execute.command-CQt_HF1B.mjs').then((c) => c.AXCReportExecuteCommand),
|
|
1218
1225
|
},
|
|
1219
1226
|
]),
|
|
1220
1227
|
],
|
|
@@ -1590,9 +1597,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1590
1597
|
type: Injectable
|
|
1591
1598
|
}], ctorParameters: () => [] });
|
|
1592
1599
|
|
|
1600
|
+
//#region ---- Imports ----
|
|
1601
|
+
//#endregion
|
|
1602
|
+
//#region ---- API Providers ----
|
|
1603
|
+
class AXCSystemInsightReportCategoryApiProvider {
|
|
1604
|
+
constructor() {
|
|
1605
|
+
this.http = inject(HttpClient);
|
|
1606
|
+
}
|
|
1607
|
+
async getList(parentId) {
|
|
1608
|
+
try {
|
|
1609
|
+
// Call API to get report categories
|
|
1610
|
+
const params = {};
|
|
1611
|
+
if (parentId) {
|
|
1612
|
+
params.parentId = parentId;
|
|
1613
|
+
}
|
|
1614
|
+
const response = await firstValueFrom(this.http.get('/api/system-insight/report-categories', { params }));
|
|
1615
|
+
return response;
|
|
1616
|
+
}
|
|
1617
|
+
catch (error) {
|
|
1618
|
+
console.error('Failed to fetch system insight report categories from API:', error);
|
|
1619
|
+
return [];
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
async getById(id) {
|
|
1623
|
+
try {
|
|
1624
|
+
const response = await firstValueFrom(this.http.get(`/api/system-insight/report-categories/${id}`));
|
|
1625
|
+
return response;
|
|
1626
|
+
}
|
|
1627
|
+
catch (error) {
|
|
1628
|
+
console.error(`Failed to fetch system insight report category ${id} from API:`, error);
|
|
1629
|
+
return undefined;
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportCategoryApiProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1633
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportCategoryApiProvider }); }
|
|
1634
|
+
}
|
|
1635
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportCategoryApiProvider, decorators: [{
|
|
1636
|
+
type: Injectable
|
|
1637
|
+
}] });
|
|
1638
|
+
class AXCSystemInsightReportDefinitionApiProvider {
|
|
1639
|
+
constructor() {
|
|
1640
|
+
this.http = inject(HttpClient);
|
|
1641
|
+
}
|
|
1642
|
+
async getList(categoryId) {
|
|
1643
|
+
try {
|
|
1644
|
+
const response = await firstValueFrom(this.http.get(`/api/system-insight/report-definitions`, {
|
|
1645
|
+
params: { categoryId }
|
|
1646
|
+
}));
|
|
1647
|
+
return response;
|
|
1648
|
+
}
|
|
1649
|
+
catch (error) {
|
|
1650
|
+
console.error(`Failed to fetch system insight report definitions for category ${categoryId} from API:`, error);
|
|
1651
|
+
return [];
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
async getById(id) {
|
|
1655
|
+
try {
|
|
1656
|
+
const response = await firstValueFrom(this.http.get(`/api/system-insight/report-definitions/${id}`));
|
|
1657
|
+
return response;
|
|
1658
|
+
}
|
|
1659
|
+
catch (error) {
|
|
1660
|
+
console.error(`Failed to fetch system insight report definition ${id} from API:`, error);
|
|
1661
|
+
return undefined;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportDefinitionApiProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1665
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportDefinitionApiProvider }); }
|
|
1666
|
+
}
|
|
1667
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXCSystemInsightReportDefinitionApiProvider, decorators: [{
|
|
1668
|
+
type: Injectable
|
|
1669
|
+
}] });
|
|
1670
|
+
//#endregion
|
|
1671
|
+
//#region ---- Provider Exports ----
|
|
1672
|
+
const AXC_SYSTEM_INSIGHT_REPORT_CATEGORY_API_PROVIDER = {
|
|
1673
|
+
provide: AXP_REPORT_CATEGORY_PROVIDER,
|
|
1674
|
+
useClass: AXCSystemInsightReportCategoryApiProvider,
|
|
1675
|
+
multi: true,
|
|
1676
|
+
};
|
|
1677
|
+
const AXC_SYSTEM_INSIGHT_REPORT_DEFINITION_API_PROVIDER = {
|
|
1678
|
+
provide: AXP_REPORT_DEFINITION_PROVIDER,
|
|
1679
|
+
useClass: AXCSystemInsightReportDefinitionApiProvider,
|
|
1680
|
+
multi: true,
|
|
1681
|
+
};
|
|
1682
|
+
|
|
1593
1683
|
/**
|
|
1594
1684
|
* Generated bundle index. Do not edit.
|
|
1595
1685
|
*/
|
|
1596
1686
|
|
|
1597
|
-
export { APIGoogleStrategy, AXCAPIOidcStrategy, AXCApiEntityStorageService, AXCApiModule, AXCApiUserAvatarProvider, AXCReportCategoryApiProvider, AXCReportDefinitionApiProvider, AXCReportManagementApiModule, AXCReportManagementDataService, AXC_REPORT_CATEGORY_API_PROVIDER, AXC_REPORT_DEFINITION_API_PROVIDER, AXMConfigurationService, AXMOidcApplicationLoader, AXMOidcFeatureLoader, AXMOidcPermissionLoader, AXMOidcTenantLoader };
|
|
1687
|
+
export { APIGoogleStrategy, AXCAPIOidcStrategy, AXCApiEntityStorageService, AXCApiModule, AXCApiUserAvatarProvider, AXCReportCategoryApiProvider, AXCReportDefinitionApiProvider, AXCReportManagementApiModule, AXCReportManagementDataService, AXCSystemInsightReportCategoryApiProvider, AXCSystemInsightReportDefinitionApiProvider, AXC_REPORT_CATEGORY_API_PROVIDER, AXC_REPORT_DEFINITION_API_PROVIDER, AXC_SYSTEM_INSIGHT_REPORT_CATEGORY_API_PROVIDER, AXC_SYSTEM_INSIGHT_REPORT_DEFINITION_API_PROVIDER, AXMConfigurationService, AXMOidcApplicationLoader, AXMOidcFeatureLoader, AXMOidcPermissionLoader, AXMOidcTenantLoader };
|
|
1598
1688
|
//# sourceMappingURL=acorex-connectivity-api.mjs.map
|