@acorex-platform/module-report-management-client 0.0.15
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-contracts.mjs +221 -0
- package/fesm2022/acorex-platform-module-report-management-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-report-management-client-report-drill-popup.component-CvfwhlEp.mjs +59 -0
- package/fesm2022/acorex-platform-module-report-management-client-report-drill-popup.component-CvfwhlEp.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-report-management-client-report-runner-root-page.component-DgvoIHsK.mjs +504 -0
- package/fesm2022/acorex-platform-module-report-management-client-report-runner-root-page.component-DgvoIHsK.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-report-management-client.mjs +3586 -0
- package/fesm2022/acorex-platform-module-report-management-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-report-management-client-contracts.d.ts +554 -0
- package/types/acorex-platform-module-report-management-client.d.ts +849 -0
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
import { AXBadgeModule } from '@acorex/components/badge';
|
|
2
|
+
import { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
|
|
3
|
+
import { AXButtonModule } from '@acorex/components/button';
|
|
4
|
+
import * as i3 from '@acorex/components/decorators';
|
|
5
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
6
|
+
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
7
|
+
import { AXLoadingModule } from '@acorex/components/loading';
|
|
8
|
+
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
9
|
+
import { AXTabsModule } from '@acorex/components/tabs';
|
|
10
|
+
import * as i1$1 from '@acorex/core/translation';
|
|
11
|
+
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
|
12
|
+
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
13
|
+
import { AXPThemeLayoutBlockComponent, AXPThemeLayoutToolbarComponent, AXPThemeLayoutHeaderComponent, AXPThemeLayoutStartSideComponent, AXPStateMessageComponent } from '@acorex-platform/framework-client/layout/components';
|
|
14
|
+
import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase } from '@acorex-platform/framework-client/layout/views';
|
|
15
|
+
import { AXPLayoutThemeService } from '@acorex-platform/framework-client/themes/shared';
|
|
16
|
+
import { AXPCommandService } from '@acorex-platform/framework-client/runtime';
|
|
17
|
+
import * as i1 from '@angular/common';
|
|
18
|
+
import { CommonModule } from '@angular/common';
|
|
19
|
+
import * as i0 from '@angular/core';
|
|
20
|
+
import { inject, output, ViewEncapsulation, ChangeDetectionStrategy, Component, computed } from '@angular/core';
|
|
21
|
+
import { FormsModule } from '@angular/forms';
|
|
22
|
+
import { ActivatedRoute, NavigationEnd, RouterModule } from '@angular/router';
|
|
23
|
+
import { merge, filter, startWith, firstValueFrom } from 'rxjs';
|
|
24
|
+
import { AXPReportViewerService } from './acorex-platform-module-report-management-client.mjs';
|
|
25
|
+
import { AXTreeViewComponent } from '@acorex/components/tree-view';
|
|
26
|
+
import { AXPPageStatus } from '@acorex-platform/framework-shared/widget-core';
|
|
27
|
+
import { AXLocaleService } from '@acorex/core/locale';
|
|
28
|
+
import { AXPDeviceService } from '@acorex-platform/framework-client/core';
|
|
29
|
+
import { signalStore, withState, withComputed, withMethods, patchState, withHooks } from '@ngrx/signals';
|
|
30
|
+
import { isNil, isEmpty } from 'lodash';
|
|
31
|
+
import { RootConfig } from '@acorex-platform/module-report-management-client/contracts';
|
|
32
|
+
|
|
33
|
+
//#region ---- Imports ----
|
|
34
|
+
//#endregion
|
|
35
|
+
class AXPReportCategoriesTreeComponent {
|
|
36
|
+
constructor() {
|
|
37
|
+
//#region ---- Services & Dependencies ----
|
|
38
|
+
this.reportDefinitionService = inject(AXPReportViewerService);
|
|
39
|
+
this.multiLanguageResolver = inject(AXTranslationService);
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region ---- Output Events ----
|
|
42
|
+
/**
|
|
43
|
+
* Emitted when a category node is clicked
|
|
44
|
+
*/
|
|
45
|
+
this.categoryClick = output();
|
|
46
|
+
/**
|
|
47
|
+
* Emitted when a report node is clicked
|
|
48
|
+
*/
|
|
49
|
+
this.reportClick = output();
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region ---- Data Loading Methods ----
|
|
52
|
+
/**
|
|
53
|
+
* Provide lazy loading tree data with optimized queries
|
|
54
|
+
*
|
|
55
|
+
* Optimizations:
|
|
56
|
+
* 1. Uses childrenCount to determine expandability (no extra query)
|
|
57
|
+
* 2. Uses itemsCount to skip report queries when count = 0
|
|
58
|
+
* 3. Returns cached data on subsequent calls (via service layer)
|
|
59
|
+
* 4. Single API call per category includes all metadata
|
|
60
|
+
*
|
|
61
|
+
* Performance: Most navigation is instant (cached), only first visit queries API
|
|
62
|
+
*/
|
|
63
|
+
this.provideLazyTreeView = async (selectedItemId) => {
|
|
64
|
+
if (selectedItemId) {
|
|
65
|
+
// ✅ Load child categories (includes childrenCount & itemsCount metadata)
|
|
66
|
+
const categories = await this.reportDefinitionService.getCategories(selectedItemId);
|
|
67
|
+
const categoryItems = categories.map((item) => ({
|
|
68
|
+
id: item.id,
|
|
69
|
+
title: this.multiLanguageResolver.resolve(item.title),
|
|
70
|
+
childrenCount: item.childrenCount > 0 || (item.itemsCount ?? 0) > 0 ? 1 : 0,
|
|
71
|
+
item: item,
|
|
72
|
+
type: 'category',
|
|
73
|
+
expanded: false,
|
|
74
|
+
}));
|
|
75
|
+
// ✅ Load report definitions for this category
|
|
76
|
+
// Optimization: Service checks itemsCount before querying (skip if 0)
|
|
77
|
+
const definitions = await this.reportDefinitionService.getReportsByCategoryId(selectedItemId);
|
|
78
|
+
const definitionItems = definitions.map((item) => ({
|
|
79
|
+
id: item.id,
|
|
80
|
+
title: item.title,
|
|
81
|
+
childrenCount: 0,
|
|
82
|
+
item: item,
|
|
83
|
+
type: 'definition',
|
|
84
|
+
expanded: false,
|
|
85
|
+
}));
|
|
86
|
+
// ✅ Return categories first, then reports (sorted)
|
|
87
|
+
return [...categoryItems, ...definitionItems];
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
// ✅ Root level - load root categories only
|
|
91
|
+
const categories = await this.reportDefinitionService.getCategories();
|
|
92
|
+
return categories.map((item) => ({
|
|
93
|
+
id: item.id,
|
|
94
|
+
title: this.multiLanguageResolver.resolve(item.title),
|
|
95
|
+
childrenCount: item.childrenCount > 0 || (item.itemsCount ?? 0) > 0 ? 1 : 0,
|
|
96
|
+
item: item,
|
|
97
|
+
type: 'category',
|
|
98
|
+
expanded: false,
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region ---- Event Handlers ----
|
|
105
|
+
/**
|
|
106
|
+
* Handle tree node click events
|
|
107
|
+
*
|
|
108
|
+
* Emits appropriate event based on node type:
|
|
109
|
+
* - category → categoryClick
|
|
110
|
+
* - definition → reportClick
|
|
111
|
+
*/
|
|
112
|
+
handleNodeClick(event) {
|
|
113
|
+
const node = event.node;
|
|
114
|
+
if (node.type === 'category') {
|
|
115
|
+
this.categoryClick.emit(node.item);
|
|
116
|
+
}
|
|
117
|
+
else if (node.type === 'definition') {
|
|
118
|
+
this.reportClick.emit(node.item);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReportCategoriesTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
122
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPReportCategoriesTreeComponent, isStandalone: true, selector: "axp-report-categories-tree", outputs: { categoryClick: "categoryClick", reportClick: "reportClick" }, host: { classAttribute: "axp-report-categories-tree" }, ngImport: i0, template: "<ax-tree-view\n [selectMode]=\"'none'\"\n [dragBehavior]=\"'none'\"\n [showIcons]=\"false\"\n [showChildrenBadge]=\"false\"\n [nodeTemplate]=\"itemTemplate\"\n [titleField]=\"'title'\"\n [idField]=\"'id'\"\n [expandedField]=\"'expanded'\"\n [datasource]=\"provideLazyTreeView\"\n (onNodeClick)=\"handleNodeClick($event)\"\n>\n</ax-tree-view>\n\n<ng-template #itemTemplate let-node=\"node\">\n @let item = node;\n @if (item.type === 'category') {\n <ax-icon class=\"fas text-warning fa-folder\"></ax-icon>\n } @else {\n <ax-icon class=\"fas text-accent1 fa-file-chart-column\"></ax-icon>\n }\n {{ item.title }}\n</ng-template>\n", styles: [".axp-report-categories-tree{height:100%;width:100%}.axp-report-categories-tree .__tree-view .__item{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2)}.axp-report-categories-tree .__tree-view .__item .__icon{flex-shrink:0}.axp-report-categories-tree .__tree-view .__item .__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.axp-report-categories-tree .__tree-view .__item:hover{background-color:var(--color-gray-50, oklch(98.5% .002 247.839))}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXTreeViewComponent, selector: "ax-tree-view", inputs: ["datasource", "selectMode", "selectionBehavior", "dragArea", "dragBehavior", "showIcons", "showChildrenBadge", "expandedIcon", "collapsedIcon", "indentSize", "look", "nodeTemplate", "idField", "titleField", "tooltipField", "iconField", "expandedField", "selectedField", "indeterminateField", "disabledField", "hiddenField", "childrenField", "childrenCountField", "dataField", "inheritDisabled", "expandOnDoubleClick", "doubleClickDuration", "tooltipDelay", "controlledSelection", "selectedIds"], outputs: ["datasourceChange", "selectedIdsChange", "onBeforeDrop", "onNodeToggle", "onNodeSelect", "onNodeDoubleClick", "onNodeClick", "onSelectionChange", "onOrderChange", "onMoveChange", "onItemsChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
123
|
+
}
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReportCategoriesTreeComponent, decorators: [{
|
|
125
|
+
type: Component,
|
|
126
|
+
args: [{ selector: 'axp-report-categories-tree', standalone: true, imports: [AXDecoratorModule, AXTreeViewComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'axp-report-categories-tree' }, template: "<ax-tree-view\n [selectMode]=\"'none'\"\n [dragBehavior]=\"'none'\"\n [showIcons]=\"false\"\n [showChildrenBadge]=\"false\"\n [nodeTemplate]=\"itemTemplate\"\n [titleField]=\"'title'\"\n [idField]=\"'id'\"\n [expandedField]=\"'expanded'\"\n [datasource]=\"provideLazyTreeView\"\n (onNodeClick)=\"handleNodeClick($event)\"\n>\n</ax-tree-view>\n\n<ng-template #itemTemplate let-node=\"node\">\n @let item = node;\n @if (item.type === 'category') {\n <ax-icon class=\"fas text-warning fa-folder\"></ax-icon>\n } @else {\n <ax-icon class=\"fas text-accent1 fa-file-chart-column\"></ax-icon>\n }\n {{ item.title }}\n</ng-template>\n", styles: [".axp-report-categories-tree{height:100%;width:100%}.axp-report-categories-tree .__tree-view .__item{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2)}.axp-report-categories-tree .__tree-view .__item .__icon{flex-shrink:0}.axp-report-categories-tree .__tree-view .__item .__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.axp-report-categories-tree .__tree-view .__item:hover{background-color:var(--color-gray-50, oklch(98.5% .002 247.839))}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
127
|
+
}], propDecorators: { categoryClick: [{ type: i0.Output, args: ["categoryClick"] }], reportClick: [{ type: i0.Output, args: ["reportClick"] }] } });
|
|
128
|
+
|
|
129
|
+
const AXPReportRunnerRootViewModel = signalStore(withState(() => ({
|
|
130
|
+
activeCategory: undefined,
|
|
131
|
+
categories: [],
|
|
132
|
+
reports: [],
|
|
133
|
+
activeCategoriesPath: [],
|
|
134
|
+
//
|
|
135
|
+
searchExpression: null,
|
|
136
|
+
//
|
|
137
|
+
status: AXPPageStatus.Processing,
|
|
138
|
+
})), withComputed((store, deviceService = inject(AXPDeviceService)) => ({
|
|
139
|
+
searchResults: computed(() => []),
|
|
140
|
+
hasActiveCategory: computed(() => store.activeCategory() != null),
|
|
141
|
+
showSideMenu: computed(() => deviceService.isLarge()),
|
|
142
|
+
isSearching: computed(() => store.searchExpression() != null),
|
|
143
|
+
isBusy: computed(() => store.status() == AXPPageStatus.Processing),
|
|
144
|
+
isLoaded: computed(() => store.activeCategory() != null),
|
|
145
|
+
title: computed(() => store.activeCategory()?.title ?? `@${RootConfig.config.i18n}:report-runner.terms.page-title`),
|
|
146
|
+
description: computed(() => store.activeCategory()?.description ??
|
|
147
|
+
`@${RootConfig.config.i18n}:report-runner.components.report-runner.description`),
|
|
148
|
+
})), withMethods((store, reportDefinitionService = inject(AXPReportViewerService)) => ({
|
|
149
|
+
/**
|
|
150
|
+
* Load root categories
|
|
151
|
+
*
|
|
152
|
+
* Optimization: Service caches result, subsequent calls are instant
|
|
153
|
+
*/
|
|
154
|
+
async loadRootCategories() {
|
|
155
|
+
patchState(store, {
|
|
156
|
+
activeCategory: undefined,
|
|
157
|
+
reports: [],
|
|
158
|
+
activeCategoriesPath: [],
|
|
159
|
+
status: AXPPageStatus.Processing,
|
|
160
|
+
});
|
|
161
|
+
const categories = await reportDefinitionService.getCategories();
|
|
162
|
+
patchState(store, {
|
|
163
|
+
categories,
|
|
164
|
+
status: AXPPageStatus.Idle,
|
|
165
|
+
});
|
|
166
|
+
},
|
|
167
|
+
/**
|
|
168
|
+
* Get categories by parentId (cached by service)
|
|
169
|
+
*/
|
|
170
|
+
async getCategories(parentId) {
|
|
171
|
+
patchState(store, { status: AXPPageStatus.Processing });
|
|
172
|
+
const result = await reportDefinitionService.getCategories(parentId);
|
|
173
|
+
patchState(store, { status: AXPPageStatus.Idle });
|
|
174
|
+
return result;
|
|
175
|
+
},
|
|
176
|
+
/**
|
|
177
|
+
* Get reports for a category
|
|
178
|
+
*
|
|
179
|
+
* Optimization: Service checks itemsCount before querying
|
|
180
|
+
* - If itemsCount = 0, returns empty array (no API call)
|
|
181
|
+
* - If cached, returns instantly
|
|
182
|
+
*/
|
|
183
|
+
async getReports(categoryId) {
|
|
184
|
+
patchState(store, { status: AXPPageStatus.Processing });
|
|
185
|
+
const result = await reportDefinitionService.getReportsByCategoryId(categoryId);
|
|
186
|
+
patchState(store, { status: AXPPageStatus.Idle });
|
|
187
|
+
return result;
|
|
188
|
+
},
|
|
189
|
+
/**
|
|
190
|
+
* Set active category and load its data
|
|
191
|
+
*
|
|
192
|
+
* Optimization: All 3 queries benefit from caching
|
|
193
|
+
* - Categories: Cached from previous navigation
|
|
194
|
+
* - Reports: Skipped if itemsCount = 0
|
|
195
|
+
* - Path: Built from cached categories
|
|
196
|
+
*/
|
|
197
|
+
async setActiveCategory(category) {
|
|
198
|
+
patchState(store, {
|
|
199
|
+
status: AXPPageStatus.Processing,
|
|
200
|
+
activeCategory: category,
|
|
201
|
+
});
|
|
202
|
+
// ✅ Parallel loading for better performance
|
|
203
|
+
const [categories, reports, activeCategoriesPath] = await Promise.all([
|
|
204
|
+
reportDefinitionService.getCategories(category.id),
|
|
205
|
+
reportDefinitionService.getReportsByCategoryId(category.id),
|
|
206
|
+
reportDefinitionService.getCategoriesPathById(category.id),
|
|
207
|
+
]);
|
|
208
|
+
patchState(store, {
|
|
209
|
+
categories,
|
|
210
|
+
reports,
|
|
211
|
+
activeCategoriesPath,
|
|
212
|
+
status: AXPPageStatus.Idle,
|
|
213
|
+
});
|
|
214
|
+
},
|
|
215
|
+
/**
|
|
216
|
+
* Set active category by ID
|
|
217
|
+
*
|
|
218
|
+
* Optimization: getCategoryById uses O(1) cache lookup
|
|
219
|
+
*/
|
|
220
|
+
async setActiveCategoryById(id) {
|
|
221
|
+
patchState(store, { status: AXPPageStatus.Processing });
|
|
222
|
+
const category = await reportDefinitionService.getCategoryById(id);
|
|
223
|
+
if (category) {
|
|
224
|
+
patchState(store, { activeCategory: category });
|
|
225
|
+
// ✅ Parallel loading
|
|
226
|
+
const [categories, reports, activeCategoriesPath] = await Promise.all([
|
|
227
|
+
reportDefinitionService.getCategories(category.id),
|
|
228
|
+
reportDefinitionService.getReportsByCategoryId(category.id),
|
|
229
|
+
reportDefinitionService.getCategoriesPathById(category.id),
|
|
230
|
+
]);
|
|
231
|
+
patchState(store, {
|
|
232
|
+
categories,
|
|
233
|
+
reports,
|
|
234
|
+
activeCategoriesPath,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
patchState(store, { status: AXPPageStatus.Idle });
|
|
238
|
+
},
|
|
239
|
+
/**
|
|
240
|
+
* Search for reports (to be implemented)
|
|
241
|
+
*/
|
|
242
|
+
async search(expression) {
|
|
243
|
+
if (!isNil(expression) && !isEmpty(expression)) {
|
|
244
|
+
patchState(store, { searchExpression: expression });
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
patchState(store, { searchExpression: null });
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
/**
|
|
251
|
+
* Clear search
|
|
252
|
+
*/
|
|
253
|
+
clearSearch() {
|
|
254
|
+
patchState(store, { searchExpression: null });
|
|
255
|
+
},
|
|
256
|
+
})), withHooks((store, translationService = inject(AXTranslationService), localeService = inject(AXLocaleService)) => ({
|
|
257
|
+
async onInit() {
|
|
258
|
+
merge(translationService.langChanges$, localeService.profileChanged$).subscribe(async () => { });
|
|
259
|
+
//
|
|
260
|
+
await store.loadRootCategories();
|
|
261
|
+
},
|
|
262
|
+
onDestroy() { },
|
|
263
|
+
})));
|
|
264
|
+
|
|
265
|
+
class AXMReportRunnerRootPageComponent extends AXPPageLayoutBaseComponent {
|
|
266
|
+
constructor() {
|
|
267
|
+
super(...arguments);
|
|
268
|
+
this.vm = inject(AXPReportRunnerRootViewModel);
|
|
269
|
+
this.layoutService = inject(AXPLayoutThemeService);
|
|
270
|
+
this.activatedRoute = inject(ActivatedRoute);
|
|
271
|
+
this.unsubscribe = inject(AXUnsubscriber);
|
|
272
|
+
this.reportDefinitionService = inject(AXPReportViewerService);
|
|
273
|
+
this.commandService = inject(AXPCommandService);
|
|
274
|
+
this.multiLanguageResolver = inject(AXTranslationService);
|
|
275
|
+
this.baseRoutes = [this.sessionService.application?.name, 'report-management', 'reports'];
|
|
276
|
+
}
|
|
277
|
+
async ngOnInit() {
|
|
278
|
+
await super.ngOnInit();
|
|
279
|
+
//
|
|
280
|
+
this.router.events
|
|
281
|
+
.pipe(this.unsubscribe.takeUntilDestroy, filter((event) => event instanceof NavigationEnd), startWith(null))
|
|
282
|
+
.subscribe(async () => {
|
|
283
|
+
await this.loadFromRoute();
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
async loadFromRoute() {
|
|
287
|
+
const snapshot = this.activatedRoute.snapshot;
|
|
288
|
+
const segments = await firstValueFrom(this.activatedRoute.url);
|
|
289
|
+
let categoryId = segments[segments.length - 1]?.path ?? null;
|
|
290
|
+
if (categoryId) {
|
|
291
|
+
await this.vm.setActiveCategoryById(categoryId);
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
await this.vm.loadRootCategories();
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
//
|
|
298
|
+
let reportId = snapshot.queryParamMap.get('report') ?? null;
|
|
299
|
+
if (reportId) {
|
|
300
|
+
// Navigate directly to viewer instead of showing parameters
|
|
301
|
+
await this.navigateToViewer(reportId);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
//#region ---- Event Handlers ----
|
|
305
|
+
/**
|
|
306
|
+
* Handle category selection from tree
|
|
307
|
+
*/
|
|
308
|
+
async onCategoryClick(category) {
|
|
309
|
+
await this.navigateToCategory(category);
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Handle report selection from tree
|
|
313
|
+
*/
|
|
314
|
+
async onReportClick(report) {
|
|
315
|
+
await this.navigateToReport(report);
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Navigate directly to report viewer with the selected report
|
|
319
|
+
*/
|
|
320
|
+
async navigateToViewer(reportId) {
|
|
321
|
+
const baseViewerRoute = [this.sessionService.application?.name, 'report-management', 'viewer'];
|
|
322
|
+
await this.router.navigate(baseViewerRoute, {
|
|
323
|
+
queryParams: { reportId },
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
//#endregion
|
|
327
|
+
async navigateToCategory(category) {
|
|
328
|
+
// Find the path to this category
|
|
329
|
+
const path = await this.reportDefinitionService.getCategoriesPathById(category.id);
|
|
330
|
+
// Find the index of the target category in the path
|
|
331
|
+
let urlParts = [...this.baseRoutes];
|
|
332
|
+
for (const cat of path) {
|
|
333
|
+
urlParts.push(cat.id);
|
|
334
|
+
}
|
|
335
|
+
await this.router.navigate(urlParts);
|
|
336
|
+
}
|
|
337
|
+
async navigateToReport(report) {
|
|
338
|
+
// Navigate directly to viewer instead of showing parameters in runner
|
|
339
|
+
await this.navigateToViewer(report.id);
|
|
340
|
+
}
|
|
341
|
+
//#region ---- Page Configuration Overrides ----
|
|
342
|
+
async getPageBreadcrumbs() {
|
|
343
|
+
const path = this.vm.activeCategoriesPath();
|
|
344
|
+
const report = {
|
|
345
|
+
name: 'reports',
|
|
346
|
+
title: await this.translateService.translateAsync('@report-management:module.menus.root.title'),
|
|
347
|
+
command: {
|
|
348
|
+
name: 'navigate-to-reports-root',
|
|
349
|
+
},
|
|
350
|
+
};
|
|
351
|
+
if (!path || path.length === 0) {
|
|
352
|
+
return [report];
|
|
353
|
+
}
|
|
354
|
+
const breadcrumbs = [report];
|
|
355
|
+
let urlParts = [...this.baseRoutes];
|
|
356
|
+
for (const cat of path) {
|
|
357
|
+
urlParts = [...urlParts, cat.id];
|
|
358
|
+
breadcrumbs.push({
|
|
359
|
+
name: cat.id,
|
|
360
|
+
title: this.multiLanguageResolver.resolve(cat.title),
|
|
361
|
+
command: {
|
|
362
|
+
name: 'navigate-to-category',
|
|
363
|
+
options: {
|
|
364
|
+
category: cat,
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
return breadcrumbs;
|
|
370
|
+
}
|
|
371
|
+
async getSecondaryMenuItems() {
|
|
372
|
+
return [];
|
|
373
|
+
}
|
|
374
|
+
async getPageTitle() {
|
|
375
|
+
return this.multiLanguageResolver.resolve(this.vm.title() ?? '');
|
|
376
|
+
}
|
|
377
|
+
async getPageDescription() {
|
|
378
|
+
const d = this.multiLanguageResolver.resolve(this.vm.description() ?? '');
|
|
379
|
+
return d || null;
|
|
380
|
+
}
|
|
381
|
+
async getBackButton() {
|
|
382
|
+
const categoriesPath = this.vm.activeCategoriesPath();
|
|
383
|
+
if (!categoriesPath || categoriesPath.length === 0) {
|
|
384
|
+
// At root level, no back button
|
|
385
|
+
return null;
|
|
386
|
+
}
|
|
387
|
+
if (categoriesPath.length === 1) {
|
|
388
|
+
// At first level category, back to reports root
|
|
389
|
+
return {
|
|
390
|
+
title: await this.translateService.translateAsync('@report-management:module.menus.root.title'),
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
// At deeper level, back to parent category
|
|
394
|
+
const parentCategory = categoriesPath[categoriesPath.length - 2];
|
|
395
|
+
return {
|
|
396
|
+
title: this.multiLanguageResolver.resolve(parentCategory.title),
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
async onBackButtonClick() {
|
|
400
|
+
const categoriesPath = this.vm.activeCategoriesPath();
|
|
401
|
+
if (!categoriesPath || categoriesPath.length <= 1) {
|
|
402
|
+
// Navigate back to reports root
|
|
403
|
+
await this.router.navigate([...this.baseRoutes]);
|
|
404
|
+
}
|
|
405
|
+
else {
|
|
406
|
+
// Navigate to parent category
|
|
407
|
+
const parentCategoriesPath = categoriesPath.slice(0, -1);
|
|
408
|
+
let urlParts = [...this.baseRoutes];
|
|
409
|
+
for (const cat of parentCategoriesPath) {
|
|
410
|
+
urlParts.push(cat.id);
|
|
411
|
+
}
|
|
412
|
+
await this.router.navigate(urlParts);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
async execute(command) {
|
|
416
|
+
switch (command.name) {
|
|
417
|
+
case 'navigate-to-category':
|
|
418
|
+
await this.navigateToCategory(command.options?.['category']);
|
|
419
|
+
break;
|
|
420
|
+
case 'navigate-to-reports-root':
|
|
421
|
+
await this.router.navigate([...this.baseRoutes]);
|
|
422
|
+
break;
|
|
423
|
+
case 'create-report':
|
|
424
|
+
await this.commandService.execute('Entity:Create', {
|
|
425
|
+
__context__: {
|
|
426
|
+
entity: 'ReportManagement.Report',
|
|
427
|
+
data: { categoryId: this.vm.activeCategory()?.id ?? null },
|
|
428
|
+
entityInfo: {
|
|
429
|
+
name: 'Report',
|
|
430
|
+
module: 'ReportManagement',
|
|
431
|
+
title: '',
|
|
432
|
+
parentKey: '',
|
|
433
|
+
},
|
|
434
|
+
options: {},
|
|
435
|
+
},
|
|
436
|
+
});
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
async getPrimaryMenuItems() {
|
|
441
|
+
return [
|
|
442
|
+
// {
|
|
443
|
+
// title: '@general:actions.create.title',
|
|
444
|
+
// icon: 'fa-light fa-plus',
|
|
445
|
+
// color: 'primary',
|
|
446
|
+
// command: {
|
|
447
|
+
// name: 'create-report',
|
|
448
|
+
// },
|
|
449
|
+
// },
|
|
450
|
+
];
|
|
451
|
+
}
|
|
452
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMReportRunnerRootPageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
453
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMReportRunnerRootPageComponent, isStandalone: true, selector: "ng-component", host: { classAttribute: "axp-report-runner-root-page" }, providers: [
|
|
454
|
+
AXUnsubscriber,
|
|
455
|
+
AXPReportRunnerRootViewModel,
|
|
456
|
+
{
|
|
457
|
+
provide: AXPPageLayoutBase,
|
|
458
|
+
useExisting: AXMReportRunnerRootPageComponent,
|
|
459
|
+
},
|
|
460
|
+
], usesInheritance: true, ngImport: i0, template: "<axp-page-layout *translate=\"let t\">\n @if (vm.showSideMenu()) {\n <axp-layout-start-side>\n <axp-layout-header>\n <axp-layout-title>{{ t('@report-management:report-runner.terms.menu-title') | async }}</axp-layout-title>\n <axp-layout-toolbar>\n <!-- <ax-search-box\n [delayTime]=\"300\"\n [ngModel]=\"vm.searchExpression()\"\n (onValueChanged)=\"vm.search($event.value)\"\n [placeholder]=\"t('@report-management:report-runner.terms.search-placeholder') | async\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-search-box> -->\n </axp-layout-toolbar>\n </axp-layout-header>\n <axp-layout-content>\n <axp-report-categories-tree (categoryClick)=\"onCategoryClick($event)\" (reportClick)=\"onReportClick($event)\" />\n </axp-layout-content>\n </axp-layout-start-side>\n }\n\n <axp-page-content>\n <!-- Desktop and Mobile: Always show desktop template -->\n <ng-container *ngTemplateOutlet=\"desktop\"> </ng-container>\n </axp-page-content>\n\n <!-- Desktop: Grid-based browser for main content -->\n <ng-template #desktop>\n <div class=\"__reports-browser\">\n @if (vm.categories().length > 0) {\n <div class=\"__section\">\n <h3 class=\"__section-title\">{{ t('@report-management:reports.terms.categories') | async }}</h3>\n <div class=\"__items-grid\">\n @for (category of vm.categories(); track category.id) {\n <div class=\"__item __category\" (click)=\"navigateToCategory(category)\">\n <div class=\"__item-icon\">\n <ax-icon class=\"fa-solid fa-folder\"></ax-icon>\n </div>\n <div class=\"__item-content\">\n <div class=\"__item-title\">{{ category.title }}</div>\n @if (category.description) {\n <div class=\"__item-description\">{{ category.description }}</div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @if (vm.reports().length > 0) {\n <div class=\"__section\">\n <h3 class=\"__section-title\">{{ t('@report-management:reports.terms.reports') | async }}</h3>\n <div class=\"__items-grid\">\n @for (report of vm.reports(); track report.id) {\n <div class=\"__item __report\" (click)=\"navigateToReport(report)\">\n <div class=\"__item-icon\">\n <ax-icon class=\"fa-solid fa-file-chart-column\"></ax-icon>\n </div>\n <div class=\"__item-content\">\n <div class=\"__item-title\">{{ report.title }}</div>\n @if (report.description) {\n <div class=\"__item-description\">{{ report.description }}</div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @if (vm.categories().length === 0 && vm.reports().length === 0) {\n <axp-state-message\n icon=\"fa-light fa-folder-open\"\n [title]=\"'@report-management:report-runner.components.report-runner.empty-states.no-items-found.title'\"\n [description]=\"'@report-management:report-runner.components.report-runner.empty-states.no-items-found.description'\"\n >\n </axp-state-message>\n }\n </div>\n </ng-template>\n</axp-page-layout>\n", styles: ["@layer properties;.axp-report-runner-root-page axp-layout-start-side{height:100%;width:calc(var(--spacing, .25rem) * 80);border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px;background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest)}@media(width>=1920px){.axp-report-runner-root-page axp-layout-start-side{width:calc(var(--spacing, .25rem) * 96)}}.axp-report-runner-root-page axp-layout-start-side axp-layout-content{overflow-x:auto;padding-inline:calc(var(--spacing, .25rem) * 4)}.axp-report-runner-root-page .__reports-browser{padding:calc(var(--spacing, .25rem) * 3)}:where(.axp-report-runner-root-page .__reports-browser>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing, .25rem) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing, .25rem) * 8) * calc(1 - var(--tw-space-y-reverse)))}@media(width>=64rem){.axp-report-runner-root-page .__reports-browser{padding:calc(var(--spacing, .25rem) * 6)}}:where(.axp-report-runner-root-page .__reports-browser .__section>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing, .25rem) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing, .25rem) * 4) * calc(1 - var(--tw-space-y-reverse)))}.axp-report-runner-root-page .__reports-browser .__section .__section-title{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.axp-report-runner-root-page .__reports-browser .__section .__section-title ax-icon{color:rgba(var(--ax-sys-color-primary-surface))}.axp-report-runner-root-page .__reports-browser .__section .__items-grid{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:calc(var(--spacing, .25rem) * 4)}@media(width>=2560px){.axp-report-runner-root-page .__reports-browser .__section .__items-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}@media(width>=48rem){.axp-report-runner-root-page .__reports-browser .__section .__items-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(width>=80rem){.axp-report-runner-root-page .__reports-browser .__section .__items-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(width>=96rem){.axp-report-runner-root-page .__reports-browser .__section .__items-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item{cursor:pointer;border-radius:var(--radius-lg, .5rem);border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 4);transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s;background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest);display:flex;align-items:flex-start;gap:calc(var(--spacing, .25rem) * 3)}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:var(--color-lighter);color:var(--color-on-lighter);border-color:var(--color-border-lighter)}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item .__item-icon{display:flex;height:calc(var(--spacing, .25rem) * 10);width:calc(var(--spacing, .25rem) * 10);flex-shrink:0;align-items:center;justify-content:center;border-radius:.25rem;font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)))}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item .__item-content{min-width:0;flex:1}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item .__item-content .__item-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item .__item-content .__item-description{margin-top:var(--spacing, .25rem);overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));opacity:75%}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__category .__item-icon{background-color:rgba(var(--ax-sys-color-warning-surface))}@supports (color: color-mix(in lab,red,red)){.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__category .__item-icon{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-warning-surface)) 10%,transparent)}}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__category .__item-icon ax-icon{color:rgba(var(--ax-sys-color-warning-surface))}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__category:hover{border-color:rgba(var(--ax-sys-color-warning-surface));background-color:rgba(var(--ax-sys-color-warning-surface))}@supports (color: color-mix(in lab,red,red)){.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__category:hover{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-warning-surface)) 5%,transparent)}}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__report .__item-icon{background-color:rgba(var(--ax-sys-color-primary-surface))}@supports (color: color-mix(in lab,red,red)){.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__report .__item-icon{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-surface)) 10%,transparent)}}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__report .__item-icon ax-icon{color:rgba(var(--ax-sys-color-primary-surface))}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__report:hover{border-color:rgba(var(--ax-sys-color-primary-surface));background-color:rgba(var(--ax-sys-color-primary-surface))}@supports (color: color-mix(in lab,red,red)){.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__report:hover{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-surface)) 5%,transparent)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-space-y-reverse{syntax: \"*\"; inherits: false; initial-value: 0;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-duration{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-space-y-reverse: 0;--tw-font-weight: initial;--tw-duration: initial}}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type:
|
|
461
|
+
//
|
|
462
|
+
AXSearchBoxModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i1$1.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "component", type:
|
|
463
|
+
//
|
|
464
|
+
AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPThemeLayoutToolbarComponent, selector: "axp-layout-toolbar" }, { kind: "component", type: AXPThemeLayoutHeaderComponent, selector: "axp-layout-header" }, { kind: "component", type: AXPThemeLayoutStartSideComponent, selector: "axp-layout-page-start-side, axp-layout-start-side" }, { kind: "component", type:
|
|
465
|
+
//
|
|
466
|
+
AXPReportCategoriesTreeComponent, selector: "axp-report-categories-tree", outputs: ["categoryClick", "reportClick"] }, { 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 }); }
|
|
467
|
+
}
|
|
468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMReportRunnerRootPageComponent, decorators: [{
|
|
469
|
+
type: Component,
|
|
470
|
+
args: [{ standalone: true, imports: [
|
|
471
|
+
CommonModule,
|
|
472
|
+
FormsModule,
|
|
473
|
+
RouterModule,
|
|
474
|
+
//
|
|
475
|
+
AXSearchBoxModule,
|
|
476
|
+
AXDecoratorModule,
|
|
477
|
+
AXBreadcrumbsModule,
|
|
478
|
+
AXTranslationModule,
|
|
479
|
+
AXButtonModule,
|
|
480
|
+
AXTabsModule,
|
|
481
|
+
AXBadgeModule,
|
|
482
|
+
AXLoadingModule,
|
|
483
|
+
AXDropdownButtonModule,
|
|
484
|
+
//
|
|
485
|
+
AXPPageLayoutComponent,
|
|
486
|
+
AXPThemeLayoutBlockComponent,
|
|
487
|
+
AXPThemeLayoutToolbarComponent,
|
|
488
|
+
AXPThemeLayoutHeaderComponent,
|
|
489
|
+
AXPThemeLayoutStartSideComponent,
|
|
490
|
+
//
|
|
491
|
+
AXPReportCategoriesTreeComponent,
|
|
492
|
+
AXPStateMessageComponent,
|
|
493
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
494
|
+
AXUnsubscriber,
|
|
495
|
+
AXPReportRunnerRootViewModel,
|
|
496
|
+
{
|
|
497
|
+
provide: AXPPageLayoutBase,
|
|
498
|
+
useExisting: AXMReportRunnerRootPageComponent,
|
|
499
|
+
},
|
|
500
|
+
], host: { class: 'axp-report-runner-root-page' }, template: "<axp-page-layout *translate=\"let t\">\n @if (vm.showSideMenu()) {\n <axp-layout-start-side>\n <axp-layout-header>\n <axp-layout-title>{{ t('@report-management:report-runner.terms.menu-title') | async }}</axp-layout-title>\n <axp-layout-toolbar>\n <!-- <ax-search-box\n [delayTime]=\"300\"\n [ngModel]=\"vm.searchExpression()\"\n (onValueChanged)=\"vm.search($event.value)\"\n [placeholder]=\"t('@report-management:report-runner.terms.search-placeholder') | async\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-search-box> -->\n </axp-layout-toolbar>\n </axp-layout-header>\n <axp-layout-content>\n <axp-report-categories-tree (categoryClick)=\"onCategoryClick($event)\" (reportClick)=\"onReportClick($event)\" />\n </axp-layout-content>\n </axp-layout-start-side>\n }\n\n <axp-page-content>\n <!-- Desktop and Mobile: Always show desktop template -->\n <ng-container *ngTemplateOutlet=\"desktop\"> </ng-container>\n </axp-page-content>\n\n <!-- Desktop: Grid-based browser for main content -->\n <ng-template #desktop>\n <div class=\"__reports-browser\">\n @if (vm.categories().length > 0) {\n <div class=\"__section\">\n <h3 class=\"__section-title\">{{ t('@report-management:reports.terms.categories') | async }}</h3>\n <div class=\"__items-grid\">\n @for (category of vm.categories(); track category.id) {\n <div class=\"__item __category\" (click)=\"navigateToCategory(category)\">\n <div class=\"__item-icon\">\n <ax-icon class=\"fa-solid fa-folder\"></ax-icon>\n </div>\n <div class=\"__item-content\">\n <div class=\"__item-title\">{{ category.title }}</div>\n @if (category.description) {\n <div class=\"__item-description\">{{ category.description }}</div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @if (vm.reports().length > 0) {\n <div class=\"__section\">\n <h3 class=\"__section-title\">{{ t('@report-management:reports.terms.reports') | async }}</h3>\n <div class=\"__items-grid\">\n @for (report of vm.reports(); track report.id) {\n <div class=\"__item __report\" (click)=\"navigateToReport(report)\">\n <div class=\"__item-icon\">\n <ax-icon class=\"fa-solid fa-file-chart-column\"></ax-icon>\n </div>\n <div class=\"__item-content\">\n <div class=\"__item-title\">{{ report.title }}</div>\n @if (report.description) {\n <div class=\"__item-description\">{{ report.description }}</div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @if (vm.categories().length === 0 && vm.reports().length === 0) {\n <axp-state-message\n icon=\"fa-light fa-folder-open\"\n [title]=\"'@report-management:report-runner.components.report-runner.empty-states.no-items-found.title'\"\n [description]=\"'@report-management:report-runner.components.report-runner.empty-states.no-items-found.description'\"\n >\n </axp-state-message>\n }\n </div>\n </ng-template>\n</axp-page-layout>\n", styles: ["@layer properties;.axp-report-runner-root-page axp-layout-start-side{height:100%;width:calc(var(--spacing, .25rem) * 80);border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px;background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest)}@media(width>=1920px){.axp-report-runner-root-page axp-layout-start-side{width:calc(var(--spacing, .25rem) * 96)}}.axp-report-runner-root-page axp-layout-start-side axp-layout-content{overflow-x:auto;padding-inline:calc(var(--spacing, .25rem) * 4)}.axp-report-runner-root-page .__reports-browser{padding:calc(var(--spacing, .25rem) * 3)}:where(.axp-report-runner-root-page .__reports-browser>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing, .25rem) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing, .25rem) * 8) * calc(1 - var(--tw-space-y-reverse)))}@media(width>=64rem){.axp-report-runner-root-page .__reports-browser{padding:calc(var(--spacing, .25rem) * 6)}}:where(.axp-report-runner-root-page .__reports-browser .__section>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing, .25rem) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing, .25rem) * 4) * calc(1 - var(--tw-space-y-reverse)))}.axp-report-runner-root-page .__reports-browser .__section .__section-title{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.axp-report-runner-root-page .__reports-browser .__section .__section-title ax-icon{color:rgba(var(--ax-sys-color-primary-surface))}.axp-report-runner-root-page .__reports-browser .__section .__items-grid{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:calc(var(--spacing, .25rem) * 4)}@media(width>=2560px){.axp-report-runner-root-page .__reports-browser .__section .__items-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}@media(width>=48rem){.axp-report-runner-root-page .__reports-browser .__section .__items-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(width>=80rem){.axp-report-runner-root-page .__reports-browser .__section .__items-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(width>=96rem){.axp-report-runner-root-page .__reports-browser .__section .__items-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item{cursor:pointer;border-radius:var(--radius-lg, .5rem);border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 4);transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s;background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest);display:flex;align-items:flex-start;gap:calc(var(--spacing, .25rem) * 3)}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:var(--color-lighter);color:var(--color-on-lighter);border-color:var(--color-border-lighter)}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item .__item-icon{display:flex;height:calc(var(--spacing, .25rem) * 10);width:calc(var(--spacing, .25rem) * 10);flex-shrink:0;align-items:center;justify-content:center;border-radius:.25rem;font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)))}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item .__item-content{min-width:0;flex:1}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item .__item-content .__item-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item .__item-content .__item-description{margin-top:var(--spacing, .25rem);overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));opacity:75%}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__category .__item-icon{background-color:rgba(var(--ax-sys-color-warning-surface))}@supports (color: color-mix(in lab,red,red)){.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__category .__item-icon{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-warning-surface)) 10%,transparent)}}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__category .__item-icon ax-icon{color:rgba(var(--ax-sys-color-warning-surface))}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__category:hover{border-color:rgba(var(--ax-sys-color-warning-surface));background-color:rgba(var(--ax-sys-color-warning-surface))}@supports (color: color-mix(in lab,red,red)){.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__category:hover{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-warning-surface)) 5%,transparent)}}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__report .__item-icon{background-color:rgba(var(--ax-sys-color-primary-surface))}@supports (color: color-mix(in lab,red,red)){.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__report .__item-icon{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-surface)) 10%,transparent)}}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__report .__item-icon ax-icon{color:rgba(var(--ax-sys-color-primary-surface))}.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__report:hover{border-color:rgba(var(--ax-sys-color-primary-surface));background-color:rgba(var(--ax-sys-color-primary-surface))}@supports (color: color-mix(in lab,red,red)){.axp-report-runner-root-page .__reports-browser .__section .__items-grid .__item.__report:hover{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-surface)) 5%,transparent)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-space-y-reverse{syntax: \"*\"; inherits: false; initial-value: 0;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-duration{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-space-y-reverse: 0;--tw-font-weight: initial;--tw-duration: initial}}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
501
|
+
}] });
|
|
502
|
+
|
|
503
|
+
export { AXMReportRunnerRootPageComponent };
|
|
504
|
+
//# sourceMappingURL=acorex-platform-module-report-management-client-report-runner-root-page.component-DgvoIHsK.mjs.map
|