@acorex-platform/module-report-management-client 1.0.2 → 2.0.0-beta.1
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-platform-module-report-management-client-acorex-platform-module-report-management-client-eSjEqt5D.mjs → acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-DKnaOM7_.mjs} +36 -53
- package/fesm2022/acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-DKnaOM7_.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-report-category.mjs +0 -14
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-report-category.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-report-generation-request.mjs +2 -16
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-report-generation-request.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-report.mjs +179 -25
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-report.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-report-management-client-contracts-entity-catalog-acorex-platform-module-report-management-client-contracts-entity-catalog-CboBAIna.mjs → acorex-platform-module-report-management-client-contracts-entity-catalog-acorex-platform-module-report-management-client-contracts-entity-catalog-CSABQXeE.mjs} +4 -20
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-acorex-platform-module-report-management-client-contracts-entity-catalog-CSABQXeE.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-report-management-client-contracts-entity-catalog-report-category.entity-BQFdNXAm.mjs → acorex-platform-module-report-management-client-contracts-entity-catalog-report-category.entity-GPDKYKW_.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-report-management-client-contracts-entity-catalog-report-category.entity-BQFdNXAm.mjs.map → acorex-platform-module-report-management-client-contracts-entity-catalog-report-category.entity-GPDKYKW_.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-report-management-client-contracts-entity-catalog-report-generation-request.entity-D381cWLE.mjs → acorex-platform-module-report-management-client-contracts-entity-catalog-report-generation-request.entity-B3cCnjKO.mjs} +4 -4
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-report-generation-request.entity-B3cCnjKO.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-report.entity-B_BWJu1a.mjs +292 -0
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-report.entity-B_BWJu1a.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog.mjs +1 -1
- package/fesm2022/acorex-platform-module-report-management-client-contracts.mjs +1866 -25
- package/fesm2022/acorex-platform-module-report-management-client-contracts.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-report-management-client-entity-reports-page-component.provider-CaxletoS.mjs → acorex-platform-module-report-management-client-entity-reports-page-component.provider-BqgxvuLq.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-report-management-client-entity-reports-page-component.provider-CaxletoS.mjs.map → acorex-platform-module-report-management-client-entity-reports-page-component.provider-BqgxvuLq.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-report-management-client-entity-reports-page.component-CK5bCQhm.mjs → acorex-platform-module-report-management-client-entity-reports-page.component-D9AfxSeN.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-report-management-client-entity-reports-page.component-CK5bCQhm.mjs.map → acorex-platform-module-report-management-client-entity-reports-page.component-D9AfxSeN.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-report-management-client-local-entities.mjs +0 -2
- package/fesm2022/acorex-platform-module-report-management-client-local-entities.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-report-management-client-report-definition-access.service-DUpwky68.mjs +67 -0
- package/fesm2022/acorex-platform-module-report-management-client-report-definition-access.service-DUpwky68.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-report-management-client-report-filter-page.component-C8XSGSdz.mjs +255 -0
- package/fesm2022/acorex-platform-module-report-management-client-report-filter-page.component-C8XSGSdz.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-report-management-client-report-layout-page-component.provider-BfBckWsh.mjs +28 -0
- package/fesm2022/acorex-platform-module-report-management-client-report-layout-page-component.provider-BfBckWsh.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-report-management-client-report-layout-page.component-DFmdGIY9.mjs +876 -0
- package/fesm2022/acorex-platform-module-report-management-client-report-layout-page.component-DFmdGIY9.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-report-management-client-report-layout-switcher.util-C3OVIaEz.mjs → acorex-platform-module-report-management-client-report-layout-switcher.util-DRG-8RcA.mjs} +258 -41
- package/fesm2022/acorex-platform-module-report-management-client-report-layout-switcher.util-DRG-8RcA.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-report-management-client-report-popup-viewer.component-CKE8NG5T.mjs → acorex-platform-module-report-management-client-report-popup-viewer.component-BVI1z7F3.mjs} +6 -6
- package/fesm2022/{acorex-platform-module-report-management-client-report-popup-viewer.component-CKE8NG5T.mjs.map → acorex-platform-module-report-management-client-report-popup-viewer.component-BVI1z7F3.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-report-management-client-report-viewer-page.component-CPlbhBa_.mjs → acorex-platform-module-report-management-client-report-viewer-page.component-CPHO4vlQ.mjs} +84 -26
- package/fesm2022/acorex-platform-module-report-management-client-report-viewer-page.component-CPHO4vlQ.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-report-management-client.mjs +1 -1
- package/i18n/en-AU/report-management.json +260 -35
- package/i18n/en-US/report-management.json +260 -35
- package/i18n/fa-IR/report-management.json +260 -35
- package/package.json +2 -9
- package/types/acorex-platform-module-report-management-client-contracts.d.ts +395 -109
- package/types/acorex-platform-module-report-management-client.d.ts +5 -5
- package/fesm2022/acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-eSjEqt5D.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-query-snapshot-policy.mjs +0 -157
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-query-snapshot-policy.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-query-snapshot.mjs +0 -197
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-query-snapshot.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-acorex-platform-module-report-management-client-contracts-entity-catalog-CboBAIna.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-query-snapshot-policy.entity-BUY06Dz0.mjs +0 -97
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-query-snapshot-policy.entity-BUY06Dz0.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-query-snapshot.entity-CnnX3xZt.mjs +0 -137
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-query-snapshot.entity-CnnX3xZt.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-report-generation-request.entity-D381cWLE.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-report.entity-Bwui0M8X.mjs +0 -124
- package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-report.entity-Bwui0M8X.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-report-management-client-report-layout-switcher.util-C3OVIaEz.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-report-management-client-report-viewer-page.component-CPlbhBa_.mjs.map +0 -1
- package/types/acorex-platform-module-report-management-client-contracts-entities-query-snapshot-policy.d.ts +0 -5
- package/types/acorex-platform-module-report-management-client-contracts-entities-query-snapshot.d.ts +0 -5
|
@@ -5,30 +5,32 @@ import { AXDonutChartComponent } from '@acorex/charts/donut-chart';
|
|
|
5
5
|
import { AXLineChartComponent } from '@acorex/charts/line-chart';
|
|
6
6
|
import * as i4 from '@acorex/core/translation';
|
|
7
7
|
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
|
8
|
-
import * as
|
|
8
|
+
import * as i1$3 from '@acorex-platform/framework-client/layout/widget-core';
|
|
9
9
|
import { AXPWidgetRegistryService, AXPWidgetCoreModule } from '@acorex-platform/framework-client/layout/widget-core';
|
|
10
10
|
import { AXPStateMessageComponent, AXPTextCommandColumnComponent } from '@acorex-platform/framework-client/layout/components';
|
|
11
|
-
import * as
|
|
11
|
+
import * as i1 from '@angular/common';
|
|
12
12
|
import { CommonModule } from '@angular/common';
|
|
13
13
|
import * as i0 from '@angular/core';
|
|
14
14
|
import { inject, Injectable, computed, effect, untracked, signal, ChangeDetectionStrategy, Component, ViewEncapsulation, viewChild } from '@angular/core';
|
|
15
|
-
import { r as resolveReportFilterDefaultValue, c as convertContextDataToFilterClause, b as collectReportParameterDefaults, A as AXPReportViewerService, d as queryResultToChartSeries, e as AXLineChartReportMapper, f as AXPieChartReportMapper, g as AXBarChartReportMapper, q as queryResultToPdfSource } from './acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-
|
|
15
|
+
import { r as resolveReportFilterDefaultValue, c as convertContextDataToFilterClause, b as collectReportParameterDefaults, A as AXPReportViewerService, d as queryResultToChartSeries, e as AXLineChartReportMapper, f as AXPieChartReportMapper, g as AXBarChartReportMapper, q as queryResultToPdfSource } from './acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-DKnaOM7_.mjs';
|
|
16
|
+
import { AXPPlatformScope, AXPWidgetsList, runtimeQueryPayloadData, runtimeCommandPayloadData, runtimeQueryCollectionData, getSystemActions, resolveMultiLanguageString } from '@acorex-platform/framework-shared/core';
|
|
17
|
+
import { AXPQueryService, AXPCommandService, AXPCommandExecutor } from '@acorex-platform/framework-client/runtime';
|
|
18
|
+
import * as i1$1 from '@acorex/components/button';
|
|
16
19
|
import { AXButtonModule } from '@acorex/components/button';
|
|
20
|
+
import * as i2 from '@acorex/components/decorators';
|
|
17
21
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
18
22
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
19
|
-
import
|
|
20
|
-
import * as i1 from '@acorex/components/data-table';
|
|
23
|
+
import * as i1$2 from '@acorex/components/data-table';
|
|
21
24
|
import { AXDataTableModule } from '@acorex/components/data-table';
|
|
22
25
|
import { AXLoadingModule } from '@acorex/components/loading';
|
|
23
26
|
import { moveItemInArray } from '@angular/cdk/drag-drop';
|
|
24
27
|
import { AXLocaleService } from '@acorex/core/locale';
|
|
25
28
|
import { AXPSettingsService, commandMessageTextForError, AXP_USER_NOTIFICATION_SERVICE, AXPCommonSettings } from '@acorex-platform/framework-client/common';
|
|
26
|
-
import { AXPQueryService, AXPCommandService } from '@acorex-platform/framework-client/runtime';
|
|
27
29
|
import { Subscription } from 'rxjs';
|
|
28
30
|
import { signalStore, withState, withComputed, withMethods, patchState, withHooks } from '@ngrx/signals';
|
|
29
31
|
import { AXPInAppInboxConnectorService } from '@acorex-platform/module-communication-management-client';
|
|
30
32
|
import { set } from 'lodash';
|
|
31
|
-
import { buildReportGenerationNotificationCorrelationId, AXMReportManagementQueryKeys, AXMReportManagementCommandKeys } from '@acorex-platform/module-report-management-client/contracts';
|
|
33
|
+
import { buildReportGenerationNotificationCorrelationId, AXMReportManagementQueryKeys, AXMReportManagementCommandKeys, applyReportParameterBindings } from '@acorex-platform/module-report-management-client/contracts';
|
|
32
34
|
import { AXDataSource } from '@acorex/cdk/common';
|
|
33
35
|
import { AXPExpressionEvaluatorService, applySystemActionDefault } from '@acorex-platform/framework-client/core';
|
|
34
36
|
import { get } from 'lodash-es';
|
|
@@ -358,6 +360,9 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
358
360
|
inlineGenerationWatchActive: false,
|
|
359
361
|
parametersReadonly: false,
|
|
360
362
|
selectedLayoutIds: [],
|
|
363
|
+
lastExportSnapshot: null,
|
|
364
|
+
exportTemplates: [],
|
|
365
|
+
selectedExportTemplateId: null,
|
|
361
366
|
})), withComputed((store, widgetRegistryService = inject(AXPWidgetRegistryService)) => ({
|
|
362
367
|
//#region ---- Layout Management ----
|
|
363
368
|
availableLayouts: computed(() => {
|
|
@@ -649,6 +654,7 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
649
654
|
patchState(store, {
|
|
650
655
|
error: commandMessageTextForError(result?.message?.text) ||
|
|
651
656
|
'@report-management:report-generation.errors.freeze-not-found',
|
|
657
|
+
lastExportSnapshot: null,
|
|
652
658
|
});
|
|
653
659
|
return;
|
|
654
660
|
}
|
|
@@ -670,6 +676,7 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
670
676
|
if (!report) {
|
|
671
677
|
patchState(store, {
|
|
672
678
|
error: '@report-management:report-viewer.messages.error.failed-to-load',
|
|
679
|
+
lastExportSnapshot: null,
|
|
673
680
|
});
|
|
674
681
|
return;
|
|
675
682
|
}
|
|
@@ -700,6 +707,7 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
700
707
|
error: error instanceof Error
|
|
701
708
|
? error.message
|
|
702
709
|
: '@report-management:report-generation.errors.freeze-not-found',
|
|
710
|
+
lastExportSnapshot: null,
|
|
703
711
|
});
|
|
704
712
|
}
|
|
705
713
|
finally {
|
|
@@ -944,6 +952,13 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
944
952
|
}
|
|
945
953
|
const skip = query?.skip ?? 0;
|
|
946
954
|
const take = query?.take ?? collection.items.length;
|
|
955
|
+
patchState(store, {
|
|
956
|
+
lastExportSnapshot: {
|
|
957
|
+
items: collection.items,
|
|
958
|
+
parameters: { ...(freeze?.parameters ?? store.filterContext()) },
|
|
959
|
+
frozen: true,
|
|
960
|
+
},
|
|
961
|
+
});
|
|
947
962
|
return {
|
|
948
963
|
...source.result,
|
|
949
964
|
success: true,
|
|
@@ -972,7 +987,7 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
972
987
|
});
|
|
973
988
|
return null;
|
|
974
989
|
}
|
|
975
|
-
const filterClause = convertContextDataToFilterClause(store.filterContext());
|
|
990
|
+
const filterClause = applyReportParameterBindings(convertContextDataToFilterClause(store.filterContext()), dataSource.inputs);
|
|
976
991
|
const runtimeSort = query?.sort?.length
|
|
977
992
|
? query.sort.map((s) => ({
|
|
978
993
|
name: s.field,
|
|
@@ -1000,9 +1015,20 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
1000
1015
|
patchState(store, {
|
|
1001
1016
|
error: commandMessageTextForError(queryResult?.message?.text) ||
|
|
1002
1017
|
'@report-management:report-viewer.messages.error.failed-to-execute',
|
|
1018
|
+
lastExportSnapshot: null,
|
|
1003
1019
|
});
|
|
1004
1020
|
return null;
|
|
1005
1021
|
}
|
|
1022
|
+
const collection = runtimeQueryCollectionData(queryResult);
|
|
1023
|
+
if (collection) {
|
|
1024
|
+
patchState(store, {
|
|
1025
|
+
lastExportSnapshot: {
|
|
1026
|
+
items: collection.items,
|
|
1027
|
+
parameters: { ...(store.lastAppliedFilterContext() ?? store.filterContext()) },
|
|
1028
|
+
frozen: false,
|
|
1029
|
+
},
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1006
1032
|
return queryResult;
|
|
1007
1033
|
}
|
|
1008
1034
|
catch (error) {
|
|
@@ -1012,6 +1038,7 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
1012
1038
|
: '@report-management:report-viewer.messages.error.failed-to-execute';
|
|
1013
1039
|
patchState(store, {
|
|
1014
1040
|
error: message,
|
|
1041
|
+
lastExportSnapshot: null,
|
|
1015
1042
|
});
|
|
1016
1043
|
console.error('Error executing report:', error);
|
|
1017
1044
|
return null;
|
|
@@ -1052,6 +1079,10 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
1052
1079
|
allowFetchData: false,
|
|
1053
1080
|
hasBeenExecuted: false,
|
|
1054
1081
|
executionRequestId: 0,
|
|
1082
|
+
lastAppliedFilterContext: null,
|
|
1083
|
+
lastExportSnapshot: null,
|
|
1084
|
+
exportTemplates: [],
|
|
1085
|
+
selectedExportTemplateId: null,
|
|
1055
1086
|
reportUserSettings: userSettings,
|
|
1056
1087
|
runId: null,
|
|
1057
1088
|
frozen: false,
|
|
@@ -1067,6 +1098,9 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
1067
1098
|
catch (error) {
|
|
1068
1099
|
patchState(store, {
|
|
1069
1100
|
error: '@report-management:report-viewer.messages.error.failed-to-load',
|
|
1101
|
+
lastExportSnapshot: null,
|
|
1102
|
+
exportTemplates: [],
|
|
1103
|
+
selectedExportTemplateId: null,
|
|
1070
1104
|
});
|
|
1071
1105
|
console.error('Error loading report:', error);
|
|
1072
1106
|
}
|
|
@@ -1086,6 +1120,7 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
1086
1120
|
if (layout) {
|
|
1087
1121
|
patchState(store, {
|
|
1088
1122
|
currentLayout: layout,
|
|
1123
|
+
lastExportSnapshot: null,
|
|
1089
1124
|
reportUserSettings: {
|
|
1090
1125
|
...(store.reportUserSettings() ?? {}),
|
|
1091
1126
|
activeLayoutId: layoutId,
|
|
@@ -1199,6 +1234,7 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
1199
1234
|
patchState(store, {
|
|
1200
1235
|
filterContext: { ...store.filterContext(), ...context },
|
|
1201
1236
|
shouldExecuteReport: false, // Reset execution flag when filters change
|
|
1237
|
+
lastExportSnapshot: null,
|
|
1202
1238
|
});
|
|
1203
1239
|
},
|
|
1204
1240
|
clearFilters() {
|
|
@@ -1208,6 +1244,7 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
1208
1244
|
filterContext: collectReportParameterDefaults(store.reportDefinition()?.parameterGroups),
|
|
1209
1245
|
lastAppliedFilterContext: null, // Reset applied filters when clearing
|
|
1210
1246
|
hasBeenExecuted: false, // Reset execution state when clearing filters
|
|
1247
|
+
lastExportSnapshot: null,
|
|
1211
1248
|
});
|
|
1212
1249
|
},
|
|
1213
1250
|
resetFilters() {
|
|
@@ -1217,20 +1254,44 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
1217
1254
|
},
|
|
1218
1255
|
//#endregion
|
|
1219
1256
|
//#region ---- Export Management ----
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1257
|
+
exportParameters() {
|
|
1258
|
+
return { ...(store.filterContext() ?? {}) };
|
|
1259
|
+
},
|
|
1260
|
+
async loadExportTemplates() {
|
|
1261
|
+
const reportId = store.reportDefinition()?.id;
|
|
1262
|
+
if (!reportId) {
|
|
1263
|
+
patchState(store, { exportTemplates: [], selectedExportTemplateId: null });
|
|
1224
1264
|
return;
|
|
1225
1265
|
}
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1266
|
+
const result = await commandService.executeRemote(AXMReportManagementCommandKeys.Export.ListTemplates, { reportId });
|
|
1267
|
+
const items = result?.success ? (runtimeCommandPayloadData(result)?.items ?? []) : [];
|
|
1268
|
+
const selected = items.find((item) => item.id === store.selectedExportTemplateId())?.id ??
|
|
1269
|
+
items[0]?.id ??
|
|
1270
|
+
null;
|
|
1271
|
+
patchState(store, { exportTemplates: items, selectedExportTemplateId: selected });
|
|
1272
|
+
},
|
|
1273
|
+
selectExportTemplate(templateId) {
|
|
1274
|
+
patchState(store, { selectedExportTemplateId: templateId });
|
|
1275
|
+
},
|
|
1276
|
+
async cloneExportTemplate() {
|
|
1277
|
+
const reportId = store.reportDefinition()?.id;
|
|
1278
|
+
if (!reportId) {
|
|
1279
|
+
return;
|
|
1233
1280
|
}
|
|
1281
|
+
const result = await commandService.executeRemote(AXMReportManagementCommandKeys.Export.Clone, {
|
|
1282
|
+
reportId,
|
|
1283
|
+
templateId: store.selectedExportTemplateId() ?? undefined,
|
|
1284
|
+
});
|
|
1285
|
+
const definition = result?.success ? runtimeCommandPayloadData(result)?.definition : null;
|
|
1286
|
+
const listed = await commandService.executeRemote(AXMReportManagementCommandKeys.Export.ListTemplates, { reportId });
|
|
1287
|
+
const items = listed?.success ? (runtimeCommandPayloadData(listed)?.items ?? []) : [];
|
|
1288
|
+
patchState(store, {
|
|
1289
|
+
exportTemplates: items,
|
|
1290
|
+
selectedExportTemplateId: definition?.id ?? items[0]?.id ?? null,
|
|
1291
|
+
});
|
|
1292
|
+
},
|
|
1293
|
+
async exportReport(_format) {
|
|
1294
|
+
return;
|
|
1234
1295
|
},
|
|
1235
1296
|
//#endregion
|
|
1236
1297
|
//#region ---- Utility Methods ----
|
|
@@ -1248,6 +1309,7 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
1248
1309
|
allowFetchData: false,
|
|
1249
1310
|
shouldExecuteReport: false,
|
|
1250
1311
|
executionRequestId: 0,
|
|
1312
|
+
lastExportSnapshot: null,
|
|
1251
1313
|
});
|
|
1252
1314
|
},
|
|
1253
1315
|
cancel() {
|
|
@@ -1255,6 +1317,7 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
1255
1317
|
status: AXPPageStatus.Idle,
|
|
1256
1318
|
hasBeenExecuted: false,
|
|
1257
1319
|
error: null,
|
|
1320
|
+
lastExportSnapshot: null,
|
|
1258
1321
|
});
|
|
1259
1322
|
//TODO: Cancel the report execution
|
|
1260
1323
|
},
|
|
@@ -1267,6 +1330,9 @@ const AXPReportViewerViewModel = signalStore(withState(() => ({
|
|
|
1267
1330
|
shouldExecuteReport: false,
|
|
1268
1331
|
executionRequestId: 0,
|
|
1269
1332
|
lastAppliedFilterContext: null,
|
|
1333
|
+
lastExportSnapshot: null,
|
|
1334
|
+
exportTemplates: [],
|
|
1335
|
+
selectedExportTemplateId: null,
|
|
1270
1336
|
hasBeenExecuted: false,
|
|
1271
1337
|
status: AXPPageStatus.Idle,
|
|
1272
1338
|
error: null,
|
|
@@ -1515,7 +1581,7 @@ class AXPReportChartViewComponent {
|
|
|
1515
1581
|
return !!(this.chartOptions() && this.dataMapping());
|
|
1516
1582
|
}
|
|
1517
1583
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPReportChartViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1518
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPReportChartViewComponent, isStandalone: true, selector: "axp-report-chart-view", host: { classAttribute: "axp-report-chart-view w-full h-full flex flex-col" }, ngImport: i0, template: "<ng-container *translate=\"let t\">\n @if (vm.status() === AXPPageStatus.Processing) {\n <!-- Loading State -->\n <div class=\"__loading flex flex-col items-center justify-center h-full gap-6 p-8\">\n <div class=\"spinner spin w-10 h-10\"></div>\n <div class=\"__loading-text text-sm opacity-70\">\n {{ t('@report-management:report-viewer.components.chart.messages.loading') | async }}\n </div>\n </div>\n } @else if (vm.status() === AXPPageStatus.Error) {\n <!-- Error State -->\n <axp-state-message\n mode=\"error\"\n icon=\"fa-light fa-exclamation-triangle\"\n [title]=\"'@report-management:report-viewer.messages.error.fetch-title'\"\n [description]=\"vm.error() || '@report-management:report-viewer.messages.error.fetch-description'\"\n >\n </axp-state-message>\n } @else if (isChartReady() && showNoDataState()) {\n <!-- No Data State -->\n <axp-state-message\n icon=\"fa-light fa-chart-pie\"\n [title]=\"'@report-management:report-viewer.components.chart.empty-states.no-data.title'\"\n [description]=\"'@report-management:report-viewer.components.chart.empty-states.no-data.description'\"\n >\n </axp-state-message>\n } @else if (isChartReady()) {\n <!-- Chart Content -->\n <section\n class=\"__chart-container overflow-auto md:overflow-hidden rounded-2xl border h-full flex flex-col\"\n >\n @if (chartLayout()?.header) {\n <header\n class=\"__chart-header p-4 md:p-6 border-b flex flex-col sm:flex-row gap-2 sm:items-center sm:justify-between\"\n >\n <h3 class=\"__chart-title text-base md:text-lg font-semibold truncate\">\n {{ chartLayout()?.header?.title }}\n </h3>\n @if (chartLayout()?.header?.showDate) {\n <div class=\"__chart-date text-xs md:text-sm opacity-70 font-medium flex-shrink-0\">\n {{ '@general:common.date.today' | translate | async }}\n </div>\n }\n </header>\n }\n\n <div class=\"__chart-body flex min-h-0 flex-1 flex-col p-3 md:p-6\">\n @switch (chartType()) {\n @case ('bar') {\n <!-- ----- Bar chart with side legend ----- -->\n <div class=\"__chart-wrapper flex h-full min-h-0 w-full flex-col items-center gap-4 lg:flex-row lg:gap-6\">\n <div\n class=\"__chart-content flex h-full min-h-[250px] w-full flex-1 items-center justify-center overflow-hidden md:min-h-[300px]\"\n >\n <ax-bar-chart #barChart [data]=\"barChartData()\" [options]=\"barChartOptions()\"></ax-bar-chart>\n </div>\n @if (hasBarChartData()) {\n <div class=\"__chart-legend w-fit flex-shrink-0\">\n <ax-chart-legend [options]=\"legendOptions()\" [chart]=\"barChart\"></ax-chart-legend>\n </div>\n }\n </div>\n }\n @case ('doughnut') {\n <!-- ----- Donut in a square box; vertical legend on the right (same as bar) ----- -->\n <div class=\"__chart-wrapper flex h-full min-h-0 w-full flex-col items-center gap-4 lg:flex-row lg:gap-6\">\n <div\n class=\"__chart-content flex h-full min-h-[250px] w-full flex-1 items-center justify-center overflow-hidden md:min-h-[300px]\"\n >\n <div\n class=\"__chart-radial relative aspect-square h-full max-h-full w-auto max-w-full min-h-64 min-w-64 overflow-hidden\"\n >\n <ax-donut-chart\n #donutChart\n [data]=\"donutChartData()\"\n [options]=\"donutChartOptions()\"\n ></ax-donut-chart>\n </div>\n </div>\n @if (hasDonutChartData()) {\n <div class=\"__chart-legend w-fit flex-shrink-0\">\n <ax-chart-legend [options]=\"legendOptions()\" [chart]=\"donutChart\"></ax-chart-legend>\n </div>\n }\n </div>\n }\n @default {\n <!-- ----- Line chart with side legend ----- -->\n <div class=\"__chart-wrapper flex h-full min-h-0 w-full flex-col items-center gap-4 lg:flex-row lg:gap-6\">\n <div\n class=\"__chart-content flex h-full min-h-[250px] w-full flex-1 items-center justify-center overflow-hidden md:min-h-[300px]\"\n >\n <ax-line-chart #lineChart [data]=\"lineChartData()\" [options]=\"lineChartOptions()\"></ax-line-chart>\n </div>\n @if (hasLineChartData()) {\n <div class=\"__chart-legend w-fit flex-shrink-0\">\n <ax-chart-legend [options]=\"legendOptions()\" [chart]=\"lineChart\"></ax-chart-legend>\n </div>\n }\n </div>\n }\n }\n </div>\n\n @if (chartLayout()?.footer) {\n <footer class=\"__chart-footer p-4 md:p-6 border-t\">\n @if (chartLayout()?.footer?.customHtml) {\n <div [innerHTML]=\"$safeNavigationMigration(chartLayout()?.footer?.customHtml)\"></div>\n }\n </footer>\n }\n </section>\n } @else {\n <!-- No Configuration State -->\n <axp-state-message\n icon=\"fa-light fa-chart-line\"\n [title]=\"'@report-management:report-viewer.components.chart.empty-states.no-config.title'\"\n [description]=\"'@report-management:report-viewer.components.chart.empty-states.no-config.description'\"\n >\n </axp-state-message>\n }\n</ng-container>\n", styles: [":host ::ng-deep .__chart-radial ax-donut-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .__chart-radial ax-donut-chart .ax-donut-chart{min-height:0!important;height:100%!important;width:100%!important}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:100%}:host ::ng-deep .ax-chart-legend{height:auto;max-height:none}\n/*! tailwindcss v4.3.
|
|
1584
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPReportChartViewComponent, isStandalone: true, selector: "axp-report-chart-view", host: { classAttribute: "axp-report-chart-view w-full h-full flex flex-col" }, ngImport: i0, template: "<ng-container *translate=\"let t\">\n @if (vm.status() === AXPPageStatus.Processing) {\n <!-- Loading State -->\n <div class=\"__loading flex flex-col items-center justify-center h-full gap-6 p-8\">\n <div class=\"spinner spin w-10 h-10\"></div>\n <div class=\"__loading-text text-sm opacity-70\">\n {{ t('@report-management:report-viewer.components.chart.messages.loading') | async }}\n </div>\n </div>\n } @else if (vm.status() === AXPPageStatus.Error) {\n <!-- Error State -->\n <axp-state-message\n mode=\"error\"\n icon=\"fa-light fa-exclamation-triangle\"\n [title]=\"'@report-management:report-viewer.messages.error.fetch-title'\"\n [description]=\"vm.error() || '@report-management:report-viewer.messages.error.fetch-description'\"\n >\n </axp-state-message>\n } @else if (isChartReady() && showNoDataState()) {\n <!-- No Data State -->\n <axp-state-message\n icon=\"fa-light fa-chart-pie\"\n [title]=\"'@report-management:report-viewer.components.chart.empty-states.no-data.title'\"\n [description]=\"'@report-management:report-viewer.components.chart.empty-states.no-data.description'\"\n >\n </axp-state-message>\n } @else if (isChartReady()) {\n <!-- Chart Content -->\n <section\n class=\"__chart-container overflow-auto md:overflow-hidden rounded-2xl border h-full flex flex-col\"\n >\n @if (chartLayout()?.header) {\n <header\n class=\"__chart-header p-4 md:p-6 border-b flex flex-col sm:flex-row gap-2 sm:items-center sm:justify-between\"\n >\n <h3 class=\"__chart-title text-base md:text-lg font-semibold truncate\">\n {{ chartLayout()?.header?.title }}\n </h3>\n @if (chartLayout()?.header?.showDate) {\n <div class=\"__chart-date text-xs md:text-sm opacity-70 font-medium flex-shrink-0\">\n {{ '@general:common.date.today' | translate | async }}\n </div>\n }\n </header>\n }\n\n <div class=\"__chart-body flex min-h-0 flex-1 flex-col p-3 md:p-6\">\n @switch (chartType()) {\n @case ('bar') {\n <!-- ----- Bar chart with side legend ----- -->\n <div class=\"__chart-wrapper flex h-full min-h-0 w-full flex-col items-center gap-4 lg:flex-row lg:gap-6\">\n <div\n class=\"__chart-content flex h-full min-h-[250px] w-full flex-1 items-center justify-center overflow-hidden md:min-h-[300px]\"\n >\n <ax-bar-chart #barChart [data]=\"barChartData()\" [options]=\"barChartOptions()\"></ax-bar-chart>\n </div>\n @if (hasBarChartData()) {\n <div class=\"__chart-legend w-fit flex-shrink-0\">\n <ax-chart-legend [options]=\"legendOptions()\" [chart]=\"barChart\"></ax-chart-legend>\n </div>\n }\n </div>\n }\n @case ('doughnut') {\n <!-- ----- Donut in a square box; vertical legend on the right (same as bar) ----- -->\n <div class=\"__chart-wrapper flex h-full min-h-0 w-full flex-col items-center gap-4 lg:flex-row lg:gap-6\">\n <div\n class=\"__chart-content flex h-full min-h-[250px] w-full flex-1 items-center justify-center overflow-hidden md:min-h-[300px]\"\n >\n <div\n class=\"__chart-radial relative aspect-square h-full max-h-full w-auto max-w-full min-h-64 min-w-64 overflow-hidden\"\n >\n <ax-donut-chart\n #donutChart\n [data]=\"donutChartData()\"\n [options]=\"donutChartOptions()\"\n ></ax-donut-chart>\n </div>\n </div>\n @if (hasDonutChartData()) {\n <div class=\"__chart-legend w-fit flex-shrink-0\">\n <ax-chart-legend [options]=\"legendOptions()\" [chart]=\"donutChart\"></ax-chart-legend>\n </div>\n }\n </div>\n }\n @default {\n <!-- ----- Line chart with side legend ----- -->\n <div class=\"__chart-wrapper flex h-full min-h-0 w-full flex-col items-center gap-4 lg:flex-row lg:gap-6\">\n <div\n class=\"__chart-content flex h-full min-h-[250px] w-full flex-1 items-center justify-center overflow-hidden md:min-h-[300px]\"\n >\n <ax-line-chart #lineChart [data]=\"lineChartData()\" [options]=\"lineChartOptions()\"></ax-line-chart>\n </div>\n @if (hasLineChartData()) {\n <div class=\"__chart-legend w-fit flex-shrink-0\">\n <ax-chart-legend [options]=\"legendOptions()\" [chart]=\"lineChart\"></ax-chart-legend>\n </div>\n }\n </div>\n }\n }\n </div>\n\n @if (chartLayout()?.footer) {\n <footer class=\"__chart-footer p-4 md:p-6 border-t\">\n @if (chartLayout()?.footer?.customHtml) {\n <div [innerHTML]=\"$safeNavigationMigration(chartLayout()?.footer?.customHtml)\"></div>\n }\n </footer>\n }\n </section>\n } @else {\n <!-- No Configuration State -->\n <axp-state-message\n icon=\"fa-light fa-chart-line\"\n [title]=\"'@report-management:report-viewer.components.chart.empty-states.no-config.title'\"\n [description]=\"'@report-management:report-viewer.components.chart.empty-states.no-config.description'\"\n >\n </axp-state-message>\n }\n</ng-container>\n", styles: [":host ::ng-deep .__chart-radial ax-donut-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .__chart-radial ax-donut-chart .ax-donut-chart{min-height:0!important;height:100%!important;width:100%!important}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:100%}:host ::ng-deep .ax-chart-legend{height:auto;max-height:none}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i4.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: AXBarChartComponent, selector: "ax-bar-chart", inputs: ["data", "options"], outputs: ["barClick"] }, { kind: "component", type: AXDonutChartComponent, selector: "ax-donut-chart", inputs: ["data", "options"], outputs: ["segmentClick", "segmentHover"] }, { kind: "component", type: AXLineChartComponent, selector: "ax-line-chart", inputs: ["data", "options"], outputs: ["pointClick"] }, { kind: "component", type: AXChartLegendComponent, selector: "ax-chart-legend", inputs: ["chart", "options"], outputs: ["itemClick", "itemMouseEnter", "itemMouseLeave"] }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "titleParams", "descriptionParams", "look"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1519
1585
|
}
|
|
1520
1586
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPReportChartViewComponent, decorators: [{
|
|
1521
1587
|
type: Component,
|
|
@@ -1530,7 +1596,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1530
1596
|
AXPStateMessageComponent,
|
|
1531
1597
|
], host: {
|
|
1532
1598
|
class: 'axp-report-chart-view w-full h-full flex flex-col',
|
|
1533
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *translate=\"let t\">\n @if (vm.status() === AXPPageStatus.Processing) {\n <!-- Loading State -->\n <div class=\"__loading flex flex-col items-center justify-center h-full gap-6 p-8\">\n <div class=\"spinner spin w-10 h-10\"></div>\n <div class=\"__loading-text text-sm opacity-70\">\n {{ t('@report-management:report-viewer.components.chart.messages.loading') | async }}\n </div>\n </div>\n } @else if (vm.status() === AXPPageStatus.Error) {\n <!-- Error State -->\n <axp-state-message\n mode=\"error\"\n icon=\"fa-light fa-exclamation-triangle\"\n [title]=\"'@report-management:report-viewer.messages.error.fetch-title'\"\n [description]=\"vm.error() || '@report-management:report-viewer.messages.error.fetch-description'\"\n >\n </axp-state-message>\n } @else if (isChartReady() && showNoDataState()) {\n <!-- No Data State -->\n <axp-state-message\n icon=\"fa-light fa-chart-pie\"\n [title]=\"'@report-management:report-viewer.components.chart.empty-states.no-data.title'\"\n [description]=\"'@report-management:report-viewer.components.chart.empty-states.no-data.description'\"\n >\n </axp-state-message>\n } @else if (isChartReady()) {\n <!-- Chart Content -->\n <section\n class=\"__chart-container overflow-auto md:overflow-hidden rounded-2xl border h-full flex flex-col\"\n >\n @if (chartLayout()?.header) {\n <header\n class=\"__chart-header p-4 md:p-6 border-b flex flex-col sm:flex-row gap-2 sm:items-center sm:justify-between\"\n >\n <h3 class=\"__chart-title text-base md:text-lg font-semibold truncate\">\n {{ chartLayout()?.header?.title }}\n </h3>\n @if (chartLayout()?.header?.showDate) {\n <div class=\"__chart-date text-xs md:text-sm opacity-70 font-medium flex-shrink-0\">\n {{ '@general:common.date.today' | translate | async }}\n </div>\n }\n </header>\n }\n\n <div class=\"__chart-body flex min-h-0 flex-1 flex-col p-3 md:p-6\">\n @switch (chartType()) {\n @case ('bar') {\n <!-- ----- Bar chart with side legend ----- -->\n <div class=\"__chart-wrapper flex h-full min-h-0 w-full flex-col items-center gap-4 lg:flex-row lg:gap-6\">\n <div\n class=\"__chart-content flex h-full min-h-[250px] w-full flex-1 items-center justify-center overflow-hidden md:min-h-[300px]\"\n >\n <ax-bar-chart #barChart [data]=\"barChartData()\" [options]=\"barChartOptions()\"></ax-bar-chart>\n </div>\n @if (hasBarChartData()) {\n <div class=\"__chart-legend w-fit flex-shrink-0\">\n <ax-chart-legend [options]=\"legendOptions()\" [chart]=\"barChart\"></ax-chart-legend>\n </div>\n }\n </div>\n }\n @case ('doughnut') {\n <!-- ----- Donut in a square box; vertical legend on the right (same as bar) ----- -->\n <div class=\"__chart-wrapper flex h-full min-h-0 w-full flex-col items-center gap-4 lg:flex-row lg:gap-6\">\n <div\n class=\"__chart-content flex h-full min-h-[250px] w-full flex-1 items-center justify-center overflow-hidden md:min-h-[300px]\"\n >\n <div\n class=\"__chart-radial relative aspect-square h-full max-h-full w-auto max-w-full min-h-64 min-w-64 overflow-hidden\"\n >\n <ax-donut-chart\n #donutChart\n [data]=\"donutChartData()\"\n [options]=\"donutChartOptions()\"\n ></ax-donut-chart>\n </div>\n </div>\n @if (hasDonutChartData()) {\n <div class=\"__chart-legend w-fit flex-shrink-0\">\n <ax-chart-legend [options]=\"legendOptions()\" [chart]=\"donutChart\"></ax-chart-legend>\n </div>\n }\n </div>\n }\n @default {\n <!-- ----- Line chart with side legend ----- -->\n <div class=\"__chart-wrapper flex h-full min-h-0 w-full flex-col items-center gap-4 lg:flex-row lg:gap-6\">\n <div\n class=\"__chart-content flex h-full min-h-[250px] w-full flex-1 items-center justify-center overflow-hidden md:min-h-[300px]\"\n >\n <ax-line-chart #lineChart [data]=\"lineChartData()\" [options]=\"lineChartOptions()\"></ax-line-chart>\n </div>\n @if (hasLineChartData()) {\n <div class=\"__chart-legend w-fit flex-shrink-0\">\n <ax-chart-legend [options]=\"legendOptions()\" [chart]=\"lineChart\"></ax-chart-legend>\n </div>\n }\n </div>\n }\n }\n </div>\n\n @if (chartLayout()?.footer) {\n <footer class=\"__chart-footer p-4 md:p-6 border-t\">\n @if (chartLayout()?.footer?.customHtml) {\n <div [innerHTML]=\"$safeNavigationMigration(chartLayout()?.footer?.customHtml)\"></div>\n }\n </footer>\n }\n </section>\n } @else {\n <!-- No Configuration State -->\n <axp-state-message\n icon=\"fa-light fa-chart-line\"\n [title]=\"'@report-management:report-viewer.components.chart.empty-states.no-config.title'\"\n [description]=\"'@report-management:report-viewer.components.chart.empty-states.no-config.description'\"\n >\n </axp-state-message>\n }\n</ng-container>\n", styles: [":host ::ng-deep .__chart-radial ax-donut-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .__chart-radial ax-donut-chart .ax-donut-chart{min-height:0!important;height:100%!important;width:100%!important}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:100%}:host ::ng-deep .ax-chart-legend{height:auto;max-height:none}\n/*! tailwindcss v4.3.
|
|
1599
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *translate=\"let t\">\n @if (vm.status() === AXPPageStatus.Processing) {\n <!-- Loading State -->\n <div class=\"__loading flex flex-col items-center justify-center h-full gap-6 p-8\">\n <div class=\"spinner spin w-10 h-10\"></div>\n <div class=\"__loading-text text-sm opacity-70\">\n {{ t('@report-management:report-viewer.components.chart.messages.loading') | async }}\n </div>\n </div>\n } @else if (vm.status() === AXPPageStatus.Error) {\n <!-- Error State -->\n <axp-state-message\n mode=\"error\"\n icon=\"fa-light fa-exclamation-triangle\"\n [title]=\"'@report-management:report-viewer.messages.error.fetch-title'\"\n [description]=\"vm.error() || '@report-management:report-viewer.messages.error.fetch-description'\"\n >\n </axp-state-message>\n } @else if (isChartReady() && showNoDataState()) {\n <!-- No Data State -->\n <axp-state-message\n icon=\"fa-light fa-chart-pie\"\n [title]=\"'@report-management:report-viewer.components.chart.empty-states.no-data.title'\"\n [description]=\"'@report-management:report-viewer.components.chart.empty-states.no-data.description'\"\n >\n </axp-state-message>\n } @else if (isChartReady()) {\n <!-- Chart Content -->\n <section\n class=\"__chart-container overflow-auto md:overflow-hidden rounded-2xl border h-full flex flex-col\"\n >\n @if (chartLayout()?.header) {\n <header\n class=\"__chart-header p-4 md:p-6 border-b flex flex-col sm:flex-row gap-2 sm:items-center sm:justify-between\"\n >\n <h3 class=\"__chart-title text-base md:text-lg font-semibold truncate\">\n {{ chartLayout()?.header?.title }}\n </h3>\n @if (chartLayout()?.header?.showDate) {\n <div class=\"__chart-date text-xs md:text-sm opacity-70 font-medium flex-shrink-0\">\n {{ '@general:common.date.today' | translate | async }}\n </div>\n }\n </header>\n }\n\n <div class=\"__chart-body flex min-h-0 flex-1 flex-col p-3 md:p-6\">\n @switch (chartType()) {\n @case ('bar') {\n <!-- ----- Bar chart with side legend ----- -->\n <div class=\"__chart-wrapper flex h-full min-h-0 w-full flex-col items-center gap-4 lg:flex-row lg:gap-6\">\n <div\n class=\"__chart-content flex h-full min-h-[250px] w-full flex-1 items-center justify-center overflow-hidden md:min-h-[300px]\"\n >\n <ax-bar-chart #barChart [data]=\"barChartData()\" [options]=\"barChartOptions()\"></ax-bar-chart>\n </div>\n @if (hasBarChartData()) {\n <div class=\"__chart-legend w-fit flex-shrink-0\">\n <ax-chart-legend [options]=\"legendOptions()\" [chart]=\"barChart\"></ax-chart-legend>\n </div>\n }\n </div>\n }\n @case ('doughnut') {\n <!-- ----- Donut in a square box; vertical legend on the right (same as bar) ----- -->\n <div class=\"__chart-wrapper flex h-full min-h-0 w-full flex-col items-center gap-4 lg:flex-row lg:gap-6\">\n <div\n class=\"__chart-content flex h-full min-h-[250px] w-full flex-1 items-center justify-center overflow-hidden md:min-h-[300px]\"\n >\n <div\n class=\"__chart-radial relative aspect-square h-full max-h-full w-auto max-w-full min-h-64 min-w-64 overflow-hidden\"\n >\n <ax-donut-chart\n #donutChart\n [data]=\"donutChartData()\"\n [options]=\"donutChartOptions()\"\n ></ax-donut-chart>\n </div>\n </div>\n @if (hasDonutChartData()) {\n <div class=\"__chart-legend w-fit flex-shrink-0\">\n <ax-chart-legend [options]=\"legendOptions()\" [chart]=\"donutChart\"></ax-chart-legend>\n </div>\n }\n </div>\n }\n @default {\n <!-- ----- Line chart with side legend ----- -->\n <div class=\"__chart-wrapper flex h-full min-h-0 w-full flex-col items-center gap-4 lg:flex-row lg:gap-6\">\n <div\n class=\"__chart-content flex h-full min-h-[250px] w-full flex-1 items-center justify-center overflow-hidden md:min-h-[300px]\"\n >\n <ax-line-chart #lineChart [data]=\"lineChartData()\" [options]=\"lineChartOptions()\"></ax-line-chart>\n </div>\n @if (hasLineChartData()) {\n <div class=\"__chart-legend w-fit flex-shrink-0\">\n <ax-chart-legend [options]=\"legendOptions()\" [chart]=\"lineChart\"></ax-chart-legend>\n </div>\n }\n </div>\n }\n }\n </div>\n\n @if (chartLayout()?.footer) {\n <footer class=\"__chart-footer p-4 md:p-6 border-t\">\n @if (chartLayout()?.footer?.customHtml) {\n <div [innerHTML]=\"$safeNavigationMigration(chartLayout()?.footer?.customHtml)\"></div>\n }\n </footer>\n }\n </section>\n } @else {\n <!-- No Configuration State -->\n <axp-state-message\n icon=\"fa-light fa-chart-line\"\n [title]=\"'@report-management:report-viewer.components.chart.empty-states.no-config.title'\"\n [description]=\"'@report-management:report-viewer.components.chart.empty-states.no-config.description'\"\n >\n </axp-state-message>\n }\n</ng-container>\n", styles: [":host ::ng-deep .__chart-radial ax-donut-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .__chart-radial ax-donut-chart .ax-donut-chart{min-height:0!important;height:100%!important;width:100%!important}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:100%}:host ::ng-deep .ax-chart-legend{height:auto;max-height:none}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"] }]
|
|
1534
1600
|
}] });
|
|
1535
1601
|
//#region ----- Series color helpers -----
|
|
1536
1602
|
function applySeriesColors(items, seriesColors) {
|
|
@@ -1549,6 +1615,8 @@ class AXPReportPdfViewComponent {
|
|
|
1549
1615
|
this.vm = inject(AXPReportViewerViewModel);
|
|
1550
1616
|
this.AXPPageStatus = AXPPageStatus;
|
|
1551
1617
|
this.sanitizer = inject(DomSanitizer);
|
|
1618
|
+
this.commands = inject(AXPCommandExecutor);
|
|
1619
|
+
this.RENDER_PDF_COMMAND = 'DocumentOutput.StimulsoftTemplate:RenderPdf';
|
|
1552
1620
|
//#endregion
|
|
1553
1621
|
//#region ---- Computed Properties ----
|
|
1554
1622
|
/**
|
|
@@ -1659,32 +1727,34 @@ class AXPReportPdfViewComponent {
|
|
|
1659
1727
|
*/
|
|
1660
1728
|
this.pdfData = signal(null, /* @ts-ignore */
|
|
1661
1729
|
...(ngDevMode ? [{ debugName: "pdfData" }] : /* istanbul ignore next */ []));
|
|
1730
|
+
this.rendering = signal(false, /* @ts-ignore */
|
|
1731
|
+
...(ngDevMode ? [{ debugName: "rendering" }] : /* istanbul ignore next */ []));
|
|
1732
|
+
this.renderError = signal(null, /* @ts-ignore */
|
|
1733
|
+
...(ngDevMode ? [{ debugName: "renderError" }] : /* istanbul ignore next */ []));
|
|
1662
1734
|
/**
|
|
1663
1735
|
* Fullscreen state
|
|
1664
1736
|
*/
|
|
1665
1737
|
this.isFullscreen = signal(false, /* @ts-ignore */
|
|
1666
1738
|
...(ngDevMode ? [{ debugName: "isFullscreen" }] : /* istanbul ignore next */ []));
|
|
1739
|
+
this.loadToken = 0;
|
|
1740
|
+
this.handledExecutionRequestId = 0;
|
|
1667
1741
|
//#endregion
|
|
1668
1742
|
//#region ---- Effects ----
|
|
1669
1743
|
/**
|
|
1670
1744
|
* Effect to fetch PDF data when conditions are met
|
|
1671
1745
|
*/
|
|
1672
1746
|
this.#fetchData = effect(() => {
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
}
|
|
1678
|
-
const pdfResult = queryResultToPdfSource(result);
|
|
1679
|
-
this.pdfData.set(pdfResult);
|
|
1680
|
-
if (pdfResult) {
|
|
1681
|
-
const options = this.pdfOptions();
|
|
1682
|
-
if (options.defaultZoom) {
|
|
1683
|
-
this.currentZoom.set(options.defaultZoom);
|
|
1684
|
-
}
|
|
1685
|
-
}
|
|
1686
|
-
});
|
|
1747
|
+
const requestId = this.vm.executionRequestId();
|
|
1748
|
+
const layout = this.pdfLayout();
|
|
1749
|
+
if (!layout || requestId <= this.handledExecutionRequestId || !this.vm.allowFetchData()) {
|
|
1750
|
+
return;
|
|
1687
1751
|
}
|
|
1752
|
+
const templateId = layout.stimulsoftTemplateId?.trim() ?? '';
|
|
1753
|
+
const sourceName = this.boundSourceName();
|
|
1754
|
+
untracked(() => {
|
|
1755
|
+
this.handledExecutionRequestId = requestId;
|
|
1756
|
+
void this.loadPdf(templateId, sourceName);
|
|
1757
|
+
});
|
|
1688
1758
|
}, /* @ts-ignore */
|
|
1689
1759
|
...(ngDevMode ? [{ debugName: "#fetchData" }] : /* istanbul ignore next */ []));
|
|
1690
1760
|
}
|
|
@@ -1699,6 +1769,63 @@ class AXPReportPdfViewComponent {
|
|
|
1699
1769
|
/**
|
|
1700
1770
|
* Handle download PDF
|
|
1701
1771
|
*/
|
|
1772
|
+
hasPdf() {
|
|
1773
|
+
return this.pdfData() != null;
|
|
1774
|
+
}
|
|
1775
|
+
boundSourceName() {
|
|
1776
|
+
const named = this.pdfLayout()?.stimulsoftDataSourceName?.trim();
|
|
1777
|
+
if (named) {
|
|
1778
|
+
return named;
|
|
1779
|
+
}
|
|
1780
|
+
const dataSource = this.vm.currentLayout()?.dataSource;
|
|
1781
|
+
return dataSource?.type === 'query' ? dataSource.name.trim() : '';
|
|
1782
|
+
}
|
|
1783
|
+
async loadPdf(templateId, sourceName) {
|
|
1784
|
+
const token = ++this.loadToken;
|
|
1785
|
+
this.rendering.set(true);
|
|
1786
|
+
this.renderError.set(null);
|
|
1787
|
+
this.pdfData.set(null);
|
|
1788
|
+
try {
|
|
1789
|
+
const result = await this.vm.fetchData();
|
|
1790
|
+
if (token !== this.loadToken || !result) {
|
|
1791
|
+
return;
|
|
1792
|
+
}
|
|
1793
|
+
if (templateId && sourceName) {
|
|
1794
|
+
const rows = (runtimeQueryCollectionData(result)?.items ?? []);
|
|
1795
|
+
const rendered = await this.commands.execute(this.RENDER_PDF_COMMAND, {
|
|
1796
|
+
templateId,
|
|
1797
|
+
sourceName,
|
|
1798
|
+
rows,
|
|
1799
|
+
});
|
|
1800
|
+
if (token !== this.loadToken) {
|
|
1801
|
+
return;
|
|
1802
|
+
}
|
|
1803
|
+
if (rendered?.success && rendered.kind === 'object' && rendered.data?.base64) {
|
|
1804
|
+
this.pdfData.set({ base64: rendered.data.base64, filename: rendered.data.filename || 'report.pdf' });
|
|
1805
|
+
const options = this.pdfOptions();
|
|
1806
|
+
if (options.defaultZoom) {
|
|
1807
|
+
this.currentZoom.set(options.defaultZoom);
|
|
1808
|
+
}
|
|
1809
|
+
return;
|
|
1810
|
+
}
|
|
1811
|
+
this.renderError.set('@report-management:report-viewer.messages.error.failed-to-execute');
|
|
1812
|
+
return;
|
|
1813
|
+
}
|
|
1814
|
+
const pdfResult = queryResultToPdfSource(result);
|
|
1815
|
+
this.pdfData.set(pdfResult);
|
|
1816
|
+
if (pdfResult) {
|
|
1817
|
+
const options = this.pdfOptions();
|
|
1818
|
+
if (options.defaultZoom) {
|
|
1819
|
+
this.currentZoom.set(options.defaultZoom);
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
finally {
|
|
1824
|
+
if (token === this.loadToken) {
|
|
1825
|
+
this.rendering.set(false);
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1702
1829
|
downloadPdf() {
|
|
1703
1830
|
const pdfData = this.pdfData();
|
|
1704
1831
|
if (!pdfData) {
|
|
@@ -1810,7 +1937,7 @@ class AXPReportPdfViewComponent {
|
|
|
1810
1937
|
this.isFullscreen.set(!isFullscreen);
|
|
1811
1938
|
}
|
|
1812
1939
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPReportPdfViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1813
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPReportPdfViewComponent, isStandalone: true, selector: "axp-report-pdf-view", host: { classAttribute: "axp-report-pdf-view w-full h-full flex flex-col" }, ngImport: i0, template: "<ng-container *translate=\"let t\">\n @if (vm.status() === AXPPageStatus.Processing) {\n <!-- Loading
|
|
1940
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPReportPdfViewComponent, isStandalone: true, selector: "axp-report-pdf-view", host: { classAttribute: "axp-report-pdf-view w-full h-full flex flex-col" }, ngImport: i0, template: "<ng-container *translate=\"let t\">\n @if (vm.status() === AXPPageStatus.Processing || rendering()) {\n <!-- ----- Loading indicator while the PDF is rendered ----- -->\n <div class=\"__loading flex flex-col items-center justify-center h-full gap-6 p-8\">\n <div class=\"spinner spin w-10 h-10\"></div>\n <div class=\"__loading-text text-sm opacity-70\">\n {{ t('@report-management:report-viewer.components.pdf.messages.loading') | async }}\n </div>\n </div>\n } @else if (vm.status() === AXPPageStatus.Error || renderError()) {\n <!-- ----- Error when the report or the designed PDF cannot be rendered ----- -->\n <axp-state-message mode=\"error\" icon=\"fa-light fa-exclamation-triangle\"\n [title]=\"'@report-management:report-viewer.messages.error.fetch-title'\"\n [description]=\"renderError() || vm.error() || '@report-management:report-viewer.messages.error.fetch-description'\">\n </axp-state-message>\n } @else if (isPdfReady()) {\n <!-- ----- Download the PDF rendered from the Stimulsoft design ----- -->\n @if (showDownloadButton()) {\n <div class=\"__pdf-toolbar flex justify-end p-2\">\n <ax-button look=\"outline\" color=\"primary\"\n [text]=\"t('@report-management:report-viewer.actions.download.title') | async\"\n (onClick)=\"downloadPdf()\">\n <ax-prefix>\n <ax-icon class=\"fa-light fa-download\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n }\n <embed class=\"__pdf-embed w-full flex-1 min-h-0\" [src]=\"pdfSource()\" type=\"application/pdf\" />\n } @else {\n <!-- ----- Empty state when this layout has no PDF ----- -->\n <axp-state-message icon=\"fa-light fa-file-pdf\"\n [title]=\"'@report-management:report-viewer.components.pdf.empty-states.no-data.title'\"\n [description]=\"'@report-management:report-viewer.components.pdf.empty-states.no-data.description'\">\n </axp-state-message>\n }\n</ng-container>\n", styles: [".axp-report-pdf-view .__loading{min-height:400px}.axp-report-pdf-view .__pdf-container{background:var(--ax-color-background)}.axp-report-pdf-view .__pdf-container.__fullscreen{position:fixed;z-index:9999;inset:0;border-radius:0}.axp-report-pdf-view .__pdf-toolbar{background:var(--ax-color-surface)}.axp-report-pdf-view .__pdf-body{background:var(--ax-color-background-secondary)}.axp-report-pdf-view .__pdf-wrapper{min-height:400px}.axp-report-pdf-view .__pdf-embed{--tw-border-style: none;border-style:none;box-shadow:0 2px 8px #0000001a;transition:width .3s ease,height .3s ease}.axp-report-pdf-view .__zoom-level{-webkit-user-select:none;user-select:none}@media(max-width:640px){.axp-report-pdf-view .__zoom-controls{margin-top:calc(var(--spacing, .25rem) * 2);width:100%;justify-content:center;margin-left:0}}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i4.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "titleParams", "descriptionParams", "look"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1814
1941
|
}
|
|
1815
1942
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPReportPdfViewComponent, decorators: [{
|
|
1816
1943
|
type: Component,
|
|
@@ -1823,9 +1950,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1823
1950
|
AXPStateMessageComponent,
|
|
1824
1951
|
], host: {
|
|
1825
1952
|
class: 'axp-report-pdf-view w-full h-full flex flex-col',
|
|
1826
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-container *translate=\"let t\">\n @if (vm.status() === AXPPageStatus.Processing) {\n <!-- Loading
|
|
1953
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-container *translate=\"let t\">\n @if (vm.status() === AXPPageStatus.Processing || rendering()) {\n <!-- ----- Loading indicator while the PDF is rendered ----- -->\n <div class=\"__loading flex flex-col items-center justify-center h-full gap-6 p-8\">\n <div class=\"spinner spin w-10 h-10\"></div>\n <div class=\"__loading-text text-sm opacity-70\">\n {{ t('@report-management:report-viewer.components.pdf.messages.loading') | async }}\n </div>\n </div>\n } @else if (vm.status() === AXPPageStatus.Error || renderError()) {\n <!-- ----- Error when the report or the designed PDF cannot be rendered ----- -->\n <axp-state-message mode=\"error\" icon=\"fa-light fa-exclamation-triangle\"\n [title]=\"'@report-management:report-viewer.messages.error.fetch-title'\"\n [description]=\"renderError() || vm.error() || '@report-management:report-viewer.messages.error.fetch-description'\">\n </axp-state-message>\n } @else if (isPdfReady()) {\n <!-- ----- Download the PDF rendered from the Stimulsoft design ----- -->\n @if (showDownloadButton()) {\n <div class=\"__pdf-toolbar flex justify-end p-2\">\n <ax-button look=\"outline\" color=\"primary\"\n [text]=\"t('@report-management:report-viewer.actions.download.title') | async\"\n (onClick)=\"downloadPdf()\">\n <ax-prefix>\n <ax-icon class=\"fa-light fa-download\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n }\n <embed class=\"__pdf-embed w-full flex-1 min-h-0\" [src]=\"pdfSource()\" type=\"application/pdf\" />\n } @else {\n <!-- ----- Empty state when this layout has no PDF ----- -->\n <axp-state-message icon=\"fa-light fa-file-pdf\"\n [title]=\"'@report-management:report-viewer.components.pdf.empty-states.no-data.title'\"\n [description]=\"'@report-management:report-viewer.components.pdf.empty-states.no-data.description'\">\n </axp-state-message>\n }\n</ng-container>\n", styles: [".axp-report-pdf-view .__loading{min-height:400px}.axp-report-pdf-view .__pdf-container{background:var(--ax-color-background)}.axp-report-pdf-view .__pdf-container.__fullscreen{position:fixed;z-index:9999;inset:0;border-radius:0}.axp-report-pdf-view .__pdf-toolbar{background:var(--ax-color-surface)}.axp-report-pdf-view .__pdf-body{background:var(--ax-color-background-secondary)}.axp-report-pdf-view .__pdf-wrapper{min-height:400px}.axp-report-pdf-view .__pdf-embed{--tw-border-style: none;border-style:none;box-shadow:0 2px 8px #0000001a;transition:width .3s ease,height .3s ease}.axp-report-pdf-view .__zoom-level{-webkit-user-select:none;user-select:none}@media(max-width:640px){.axp-report-pdf-view .__zoom-controls{margin-top:calc(var(--spacing, .25rem) * 2);width:100%;justify-content:center;margin-left:0}}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"] }]
|
|
1827
1954
|
}] });
|
|
1828
1955
|
|
|
1956
|
+
//#region ---- Report result hierarchy ----
|
|
1957
|
+
const TREE_FETCH_TAKE = 1000;
|
|
1958
|
+
function reportTreeFetchTake() {
|
|
1959
|
+
return TREE_FETCH_TAKE;
|
|
1960
|
+
}
|
|
1961
|
+
/** Parent id when the grid is loading children of an expanded row. */
|
|
1962
|
+
function readHierarchyParentId(filter, parentField) {
|
|
1963
|
+
return findParentEqual(asFilterNode(filter), parentField);
|
|
1964
|
+
}
|
|
1965
|
+
function sliceHierarchyRows(rows, hierarchy, parentId, skip, take) {
|
|
1966
|
+
const parentField = hierarchy.parentField;
|
|
1967
|
+
const keyField = hierarchy.keyField?.trim() || 'id';
|
|
1968
|
+
const matched = parentId
|
|
1969
|
+
? rows.filter((row) => text(row[parentField]) === parentId)
|
|
1970
|
+
: rows.filter((row) => text(row[parentField]) === '');
|
|
1971
|
+
const page = matched.slice(skip, skip + take).map((row) => ({
|
|
1972
|
+
...row,
|
|
1973
|
+
hasChild: rowHasChildren(rows, parentField, text(row[keyField])),
|
|
1974
|
+
}));
|
|
1975
|
+
return { items: page, total: matched.length };
|
|
1976
|
+
}
|
|
1977
|
+
function rowHasChildren(rows, parentField, key) {
|
|
1978
|
+
if (!key) {
|
|
1979
|
+
return false;
|
|
1980
|
+
}
|
|
1981
|
+
return rows.some((row) => text(row[parentField]) === key);
|
|
1982
|
+
}
|
|
1983
|
+
function findParentEqual(filter, parentField) {
|
|
1984
|
+
if (!filter) {
|
|
1985
|
+
return undefined;
|
|
1986
|
+
}
|
|
1987
|
+
if (filter.field === parentField && filter.operator?.type === 'equal' && filter.value != null && filter.value !== '') {
|
|
1988
|
+
return String(filter.value);
|
|
1989
|
+
}
|
|
1990
|
+
for (const child of filter.filters ?? []) {
|
|
1991
|
+
const found = findParentEqual(child, parentField);
|
|
1992
|
+
if (found) {
|
|
1993
|
+
return found;
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
return undefined;
|
|
1997
|
+
}
|
|
1998
|
+
function asFilterNode(filter) {
|
|
1999
|
+
if (!filter || typeof filter !== 'object') {
|
|
2000
|
+
return undefined;
|
|
2001
|
+
}
|
|
2002
|
+
return filter;
|
|
2003
|
+
}
|
|
2004
|
+
function text(value) {
|
|
2005
|
+
if (value == null) {
|
|
2006
|
+
return '';
|
|
2007
|
+
}
|
|
2008
|
+
return String(value).trim();
|
|
2009
|
+
}
|
|
2010
|
+
//#endregion
|
|
2011
|
+
|
|
1829
2012
|
class AXPReportTableViewComponent {
|
|
1830
2013
|
constructor() {
|
|
1831
2014
|
//#region ---- Dependencies ----
|
|
@@ -1844,6 +2027,8 @@ class AXPReportTableViewComponent {
|
|
|
1844
2027
|
...(ngDevMode ? [{ debugName: "tableSummary" }] : /* istanbul ignore next */ []));
|
|
1845
2028
|
this.handledExecutionRequestId = 0;
|
|
1846
2029
|
this.lastDataSourcePreferencesKey = null;
|
|
2030
|
+
this.hierarchyRows = null;
|
|
2031
|
+
this.hierarchyCacheKey = '';
|
|
1847
2032
|
//#endregion
|
|
1848
2033
|
//#region ---- Effects ----
|
|
1849
2034
|
this.#resetExecutionHandler = effect(() => {
|
|
@@ -1851,6 +2036,8 @@ class AXPReportTableViewComponent {
|
|
|
1851
2036
|
untracked(() => {
|
|
1852
2037
|
this.handledExecutionRequestId = 0;
|
|
1853
2038
|
this.lastDataSourcePreferencesKey = null;
|
|
2039
|
+
this.hierarchyRows = null;
|
|
2040
|
+
this.hierarchyCacheKey = '';
|
|
1854
2041
|
void reportId;
|
|
1855
2042
|
});
|
|
1856
2043
|
}, /* @ts-ignore */
|
|
@@ -1925,8 +2112,13 @@ class AXPReportTableViewComponent {
|
|
|
1925
2112
|
load: async (e) => {
|
|
1926
2113
|
if (!this.vm.allowFetchData()) {
|
|
1927
2114
|
this.tableSummary.set(null);
|
|
2115
|
+
this.hierarchyRows = null;
|
|
1928
2116
|
return { items: [], total: 0 };
|
|
1929
2117
|
}
|
|
2118
|
+
const hierarchy = this.layout()?.options?.hierarchy;
|
|
2119
|
+
if (hierarchy?.parentField) {
|
|
2120
|
+
return this.loadHierarchyPage(e, hierarchy);
|
|
2121
|
+
}
|
|
1930
2122
|
const result = await this.vm.fetchData(e);
|
|
1931
2123
|
const page = runtimeQueryCollectionData(result);
|
|
1932
2124
|
if (!page) {
|
|
@@ -1948,6 +2140,11 @@ class AXPReportTableViewComponent {
|
|
|
1948
2140
|
return this.layout().options?.pagination !== false;
|
|
1949
2141
|
}, /* @ts-ignore */
|
|
1950
2142
|
...(ngDevMode ? [{ debugName: "paginationEnabled" }] : /* istanbul ignore next */ []));
|
|
2143
|
+
this.hierarchyParentField = computed(() => {
|
|
2144
|
+
const parentField = this.layout()?.options?.hierarchy?.parentField?.trim();
|
|
2145
|
+
return parentField || undefined;
|
|
2146
|
+
}, /* @ts-ignore */
|
|
2147
|
+
...(ngDevMode ? [{ debugName: "hierarchyParentField" }] : /* istanbul ignore next */ []));
|
|
1951
2148
|
this.hasReportFooterSummary = computed(() => {
|
|
1952
2149
|
return ((this.layout().summary?.some((s) => s.displayIn === 'reportFooter') ?? false) &&
|
|
1953
2150
|
this.tableSummary() !== null);
|
|
@@ -2147,6 +2344,26 @@ class AXPReportTableViewComponent {
|
|
|
2147
2344
|
}
|
|
2148
2345
|
return count;
|
|
2149
2346
|
}
|
|
2347
|
+
async loadHierarchyPage(query, hierarchy) {
|
|
2348
|
+
const cacheKey = `${this.vm.executionRequestId()}:${JSON.stringify(query.sort ?? [])}`;
|
|
2349
|
+
const parentId = readHierarchyParentId(query.filter, hierarchy.parentField);
|
|
2350
|
+
if (this.hierarchyCacheKey !== cacheKey || !this.hierarchyRows) {
|
|
2351
|
+
const result = await this.vm.fetchData({ ...query, skip: 0, take: reportTreeFetchTake() });
|
|
2352
|
+
const page = runtimeQueryCollectionData(result);
|
|
2353
|
+
if (!page) {
|
|
2354
|
+
this.tableSummary.set(null);
|
|
2355
|
+
this.hierarchyRows = [];
|
|
2356
|
+
this.hierarchyCacheKey = cacheKey;
|
|
2357
|
+
return { items: [], total: 0 };
|
|
2358
|
+
}
|
|
2359
|
+
this.tableSummary.set(page.aggregateRows?.[0] ?? null);
|
|
2360
|
+
this.hierarchyRows = (page.items ?? []);
|
|
2361
|
+
this.hierarchyCacheKey = cacheKey;
|
|
2362
|
+
}
|
|
2363
|
+
const skip = query.skip ?? 0;
|
|
2364
|
+
const take = query.take ?? this.hierarchyRows.length;
|
|
2365
|
+
return sliceHierarchyRows(this.hierarchyRows, hierarchy, parentId, skip, take);
|
|
2366
|
+
}
|
|
2150
2367
|
applySortToDataSource(sorts) {
|
|
2151
2368
|
const sortOptions = sorts.map((s) => ({ field: s.name, dir: s.dir }));
|
|
2152
2369
|
this.dataSource.sort(...sortOptions);
|
|
@@ -2174,7 +2391,7 @@ class AXPReportTableViewComponent {
|
|
|
2174
2391
|
};
|
|
2175
2392
|
}
|
|
2176
2393
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPReportTableViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2177
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPReportTableViewComponent, isStandalone: true, selector: "axp-report-table-view", host: { classAttribute: "axp-report-table-view flex flex-col flex-1 min-h-0 h-full w-full" }, viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-data-table\n #grid\n [dataSource]=\"dataSource\"\n [paging]=\"paginationEnabled()\"\n [showFooter]=\"hasReportFooterSummary()\"\n [allowReordering]=\"true\"\n (onRowDbClick)=\"handleDbRowClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\"\n (onColumnsOrderChanged)=\"onColumnsOrderChanged($event)\"\n (onPageChanged)=\"onPageChanged($event)\"\n class=\"flex-1 min-h-0 h-full\"\n>\n @if (vm.showRowIndexColumn()) {\n <ax-index-column\n [caption]=\"('@general:terms.common.row-number' | translate | async)!\"\n fixed=\"start\"\n [width]=\"'80px'\"\n [padZero]=\"false\"\n ></ax-index-column>\n }\n @if (vm.canSelectRows()) {\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n }\n @for (column of columns(); track column.field) {\n @if (column.visible) {\n <ng-template #footerCell>\n <div\n class=\"w-full truncate\"\n [class.text-start]=\"column.align === 'left'\"\n [class.text-center]=\"column.align === 'center'\"\n [class.text-end]=\"column.align === 'right'\"\n >\n @if (isFirstVisibleColumn(column.field) && hasReportFooterSummary()) {\n <span class=\"font-medium\">\n {{ '@report-management:report-viewer.components.table.footer-total' | translate | async }}\n </span>\n } @else if (getSummaryDisplayValue(column.field); as summaryValue) {\n <span>{{ summaryValue }}</span>\n }\n </div>\n </ng-template>\n @if (column.isGroupByDrillLink && column.drillDisplayField) {\n <axp-text-command-column\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [textField]=\"column.drillDisplayField\"\n [columnFixed]=\"column.pin\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n (commandClick)=\"handleGroupByDrill(column.drillDisplayField, $event.data)\"\n ></axp-text-command-column>\n } @else {\n <axp-widget-column-renderer\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [node]=\"column.widget!\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [columnFixed]=\"column.pin\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n ></axp-widget-column-renderer>\n }\n }\n }\n @if (hasPrimaryRowAction()) {\n <ax-command-column\n fixed=\"end\"\n [width]=\"primaryRowAction().length * 70 + 'px'\"\n [items]=\"primaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-command-column>\n }\n @if (hasSecondaryRowAction()) {\n <ax-dropdown-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n [items]=\"secondaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-dropdown-command-column>\n }\n</ax-data-table>\n", styles: ["axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table{height:100%}axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table tbody tr.empty-row{height:100%!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i1.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "hasChildrenField", "rowDetailsTemplate", "rowCssClass", "cellCssClass", "highlightText", "look", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i1.AXRowIndexColumnComponent, selector: "ax-index-column", inputs: ["width", "caption", "fixed", "footerTemplate", "padZero"] }, { kind: "component", type: i1.AXRowSelectColumnComponent, selector: "ax-select-column", inputs: ["width", "caption", "fixed", "advanceSelect"] }, { kind: "component", type: i1.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i1.AXRowDropdownCommandColumnComponent, selector: "ax-dropdown-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "emptyStateTemplate", "emptyStateText", "items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type:
|
|
2394
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPReportTableViewComponent, isStandalone: true, selector: "axp-report-table-view", host: { classAttribute: "axp-report-table-view flex flex-col flex-1 min-h-0 h-full w-full" }, viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-data-table\n #grid\n [dataSource]=\"dataSource\"\n [parentField]=\"hierarchyParentField()\"\n [paging]=\"paginationEnabled()\"\n [showFooter]=\"hasReportFooterSummary()\"\n [allowReordering]=\"true\"\n (onRowDbClick)=\"handleDbRowClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\"\n (onColumnsOrderChanged)=\"onColumnsOrderChanged($event)\"\n (onPageChanged)=\"onPageChanged($event)\"\n class=\"flex-1 min-h-0 h-full\"\n>\n @if (vm.showRowIndexColumn()) {\n <ax-index-column\n [caption]=\"('@general:terms.common.row-number' | translate | async)!\"\n fixed=\"start\"\n [width]=\"'80px'\"\n [padZero]=\"false\"\n ></ax-index-column>\n }\n @if (vm.canSelectRows()) {\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n }\n @for (column of columns(); track column.field) {\n @if (column.visible) {\n <ng-template #footerCell>\n <div\n class=\"w-full truncate\"\n [class.text-start]=\"column.align === 'left'\"\n [class.text-center]=\"column.align === 'center'\"\n [class.text-end]=\"column.align === 'right'\"\n >\n @if (isFirstVisibleColumn(column.field) && hasReportFooterSummary()) {\n <span class=\"font-medium\">\n {{ '@report-management:report-viewer.components.table.footer-total' | translate | async }}\n </span>\n } @else if (getSummaryDisplayValue(column.field); as summaryValue) {\n <span>{{ summaryValue }}</span>\n }\n </div>\n </ng-template>\n @if (column.isGroupByDrillLink && column.drillDisplayField) {\n <axp-text-command-column\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [textField]=\"column.drillDisplayField\"\n [columnFixed]=\"column.pin\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n (commandClick)=\"handleGroupByDrill(column.drillDisplayField, $event.data)\"\n ></axp-text-command-column>\n } @else {\n <axp-widget-column-renderer\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [node]=\"column.widget!\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [columnFixed]=\"column.pin\"\n [expandHandler]=\"!!hierarchyParentField() && isFirstVisibleColumn(column.field)\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n ></axp-widget-column-renderer>\n }\n }\n }\n @if (hasPrimaryRowAction()) {\n <ax-command-column\n fixed=\"end\"\n [width]=\"primaryRowAction().length * 70 + 'px'\"\n [items]=\"primaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-command-column>\n }\n @if (hasSecondaryRowAction()) {\n <ax-dropdown-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n [items]=\"secondaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-dropdown-command-column>\n }\n</ax-data-table>\n", styles: ["axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table{height:100%}axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table tbody tr.empty-row{height:100%!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i1$2.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "hasChildrenField", "rowDetailsTemplate", "rowCssClass", "cellCssClass", "highlightText", "look", "autoFitMaxWidth", "constrainColumnsToWrapper", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowPointerDown", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i1$2.AXRowIndexColumnComponent, selector: "ax-index-column", inputs: ["width", "caption", "fixed", "footerTemplate", "padZero", "zeroPadLength"] }, { kind: "component", type: i1$2.AXRowSelectColumnComponent, selector: "ax-select-column", inputs: ["width", "caption", "fixed", "advanceSelect"] }, { kind: "component", type: i1$2.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i1$2.AXRowDropdownCommandColumnComponent, selector: "ax-dropdown-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "emptyStateTemplate", "emptyStateText", "items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i1$3.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "autoFitMaxWidth", "columnKey", "node", "footerTemplate", "expandHandler", "sortEnabled", "headerSortDirection", "headerSortPriority", "columnFixed", "cellTemplate", "headerTemplate"], outputs: ["sortToggle"] }, { kind: "component", type: AXPTextCommandColumnComponent, selector: "axp-text-command-column", inputs: ["caption", "textField", "customWidth", "columnFixed", "footerTemplate", "sortEnabled", "headerSortDirection", "headerSortPriority", "disabled", "emptyDisplay"], outputs: ["commandClick", "sortToggle"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2178
2395
|
}
|
|
2179
2396
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPReportTableViewComponent, decorators: [{
|
|
2180
2397
|
type: Component,
|
|
@@ -2188,7 +2405,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
2188
2405
|
AXPTextCommandColumnComponent,
|
|
2189
2406
|
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
2190
2407
|
class: 'axp-report-table-view flex flex-col flex-1 min-h-0 h-full w-full',
|
|
2191
|
-
}, template: "<ax-data-table\n #grid\n [dataSource]=\"dataSource\"\n [paging]=\"paginationEnabled()\"\n [showFooter]=\"hasReportFooterSummary()\"\n [allowReordering]=\"true\"\n (onRowDbClick)=\"handleDbRowClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\"\n (onColumnsOrderChanged)=\"onColumnsOrderChanged($event)\"\n (onPageChanged)=\"onPageChanged($event)\"\n class=\"flex-1 min-h-0 h-full\"\n>\n @if (vm.showRowIndexColumn()) {\n <ax-index-column\n [caption]=\"('@general:terms.common.row-number' | translate | async)!\"\n fixed=\"start\"\n [width]=\"'80px'\"\n [padZero]=\"false\"\n ></ax-index-column>\n }\n @if (vm.canSelectRows()) {\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n }\n @for (column of columns(); track column.field) {\n @if (column.visible) {\n <ng-template #footerCell>\n <div\n class=\"w-full truncate\"\n [class.text-start]=\"column.align === 'left'\"\n [class.text-center]=\"column.align === 'center'\"\n [class.text-end]=\"column.align === 'right'\"\n >\n @if (isFirstVisibleColumn(column.field) && hasReportFooterSummary()) {\n <span class=\"font-medium\">\n {{ '@report-management:report-viewer.components.table.footer-total' | translate | async }}\n </span>\n } @else if (getSummaryDisplayValue(column.field); as summaryValue) {\n <span>{{ summaryValue }}</span>\n }\n </div>\n </ng-template>\n @if (column.isGroupByDrillLink && column.drillDisplayField) {\n <axp-text-command-column\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [textField]=\"column.drillDisplayField\"\n [columnFixed]=\"column.pin\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n (commandClick)=\"handleGroupByDrill(column.drillDisplayField, $event.data)\"\n ></axp-text-command-column>\n } @else {\n <axp-widget-column-renderer\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [node]=\"column.widget!\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [columnFixed]=\"column.pin\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n ></axp-widget-column-renderer>\n }\n }\n }\n @if (hasPrimaryRowAction()) {\n <ax-command-column\n fixed=\"end\"\n [width]=\"primaryRowAction().length * 70 + 'px'\"\n [items]=\"primaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-command-column>\n }\n @if (hasSecondaryRowAction()) {\n <ax-dropdown-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n [items]=\"secondaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-dropdown-command-column>\n }\n</ax-data-table>\n", styles: ["axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table{height:100%}axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table tbody tr.empty-row{height:100%!important}\n"] }]
|
|
2408
|
+
}, template: "<ax-data-table\n #grid\n [dataSource]=\"dataSource\"\n [parentField]=\"hierarchyParentField()\"\n [paging]=\"paginationEnabled()\"\n [showFooter]=\"hasReportFooterSummary()\"\n [allowReordering]=\"true\"\n (onRowDbClick)=\"handleDbRowClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\"\n (onColumnsOrderChanged)=\"onColumnsOrderChanged($event)\"\n (onPageChanged)=\"onPageChanged($event)\"\n class=\"flex-1 min-h-0 h-full\"\n>\n @if (vm.showRowIndexColumn()) {\n <ax-index-column\n [caption]=\"('@general:terms.common.row-number' | translate | async)!\"\n fixed=\"start\"\n [width]=\"'80px'\"\n [padZero]=\"false\"\n ></ax-index-column>\n }\n @if (vm.canSelectRows()) {\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n }\n @for (column of columns(); track column.field) {\n @if (column.visible) {\n <ng-template #footerCell>\n <div\n class=\"w-full truncate\"\n [class.text-start]=\"column.align === 'left'\"\n [class.text-center]=\"column.align === 'center'\"\n [class.text-end]=\"column.align === 'right'\"\n >\n @if (isFirstVisibleColumn(column.field) && hasReportFooterSummary()) {\n <span class=\"font-medium\">\n {{ '@report-management:report-viewer.components.table.footer-total' | translate | async }}\n </span>\n } @else if (getSummaryDisplayValue(column.field); as summaryValue) {\n <span>{{ summaryValue }}</span>\n }\n </div>\n </ng-template>\n @if (column.isGroupByDrillLink && column.drillDisplayField) {\n <axp-text-command-column\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [textField]=\"column.drillDisplayField\"\n [columnFixed]=\"column.pin\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n (commandClick)=\"handleGroupByDrill(column.drillDisplayField, $event.data)\"\n ></axp-text-command-column>\n } @else {\n <axp-widget-column-renderer\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [node]=\"column.widget!\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [columnFixed]=\"column.pin\"\n [expandHandler]=\"!!hierarchyParentField() && isFirstVisibleColumn(column.field)\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n ></axp-widget-column-renderer>\n }\n }\n }\n @if (hasPrimaryRowAction()) {\n <ax-command-column\n fixed=\"end\"\n [width]=\"primaryRowAction().length * 70 + 'px'\"\n [items]=\"primaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-command-column>\n }\n @if (hasSecondaryRowAction()) {\n <ax-dropdown-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n [items]=\"secondaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-dropdown-command-column>\n }\n</ax-data-table>\n", styles: ["axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table{height:100%}axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table tbody tr.empty-row{height:100%!important}\n"] }]
|
|
2192
2409
|
}], propDecorators: { grid: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }] } });
|
|
2193
2410
|
|
|
2194
2411
|
//#region ----- Imports -----
|
|
@@ -2262,5 +2479,5 @@ function stripIconStylePrefix(icon) {
|
|
|
2262
2479
|
}
|
|
2263
2480
|
//#endregion
|
|
2264
2481
|
|
|
2265
|
-
export {
|
|
2266
|
-
//# sourceMappingURL=acorex-platform-module-report-management-client-report-layout-switcher.util-
|
|
2482
|
+
export { AXPReportPdfViewComponent as A, AXPReportViewerViewModel as a, reportLayoutTitleKey as b, reportLayoutGlyph as c, AXPReportTableViewComponent as d, AXPReportChartViewComponent as e, isDistinctLayoutTitle as i, reportLayoutPageIcon as r };
|
|
2483
|
+
//# sourceMappingURL=acorex-platform-module-report-management-client-report-layout-switcher.util-DRG-8RcA.mjs.map
|