bways-report 0.2.4 → 0.2.6
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/README.md +5 -0
- package/esm2022/lib/core/config/bways-report-config.mjs +12 -1
- package/esm2022/lib/core/models/index.mjs +2 -2
- package/esm2022/lib/core/models/report-menu.model.mjs +2 -0
- package/esm2022/lib/core/tokens/reporting-config.token.mjs +1 -1
- package/esm2022/lib/core/utils/report-menu.util.mjs +101 -0
- package/esm2022/lib/features/designer/components/dialogs/report-saved-dialog.component.mjs +44 -13
- package/esm2022/lib/features/designer/components/menu-selector/report-menu-selector.component.mjs +247 -0
- package/esm2022/lib/features/designer/designer.component.mjs +8 -3
- package/esm2022/lib/features/designer/rpt-report-designer.component.mjs +9 -3
- package/esm2022/lib/features/designer/services/designer-config.service.mjs +3 -1
- package/esm2022/lib/features/embed/bways-report-builder.component.mjs +2 -2
- package/esm2022/lib/features/routing/components/routed-report-designer.component.mjs +2 -2
- package/esm2022/lib/provide-reporting.mjs +4 -1
- package/fesm2022/bways-report.mjs +413 -18
- package/fesm2022/bways-report.mjs.map +1 -1
- package/lib/core/config/bways-report-config.d.ts +4 -0
- package/lib/core/models/index.d.ts +1 -0
- package/lib/core/models/report-menu.model.d.ts +45 -0
- package/lib/core/tokens/reporting-config.token.d.ts +2 -0
- package/lib/core/utils/report-menu.util.d.ts +12 -0
- package/lib/features/designer/components/dialogs/report-saved-dialog.component.d.ts +12 -0
- package/lib/features/designer/components/menu-selector/report-menu-selector.component.d.ts +49 -0
- package/lib/features/designer/designer.component.d.ts +5 -1
- package/lib/features/designer/rpt-report-designer.component.d.ts +4 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { Injectable, InjectionToken, inject, Injector, signal, computed, runInIn
|
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { Validators, FormControl, FormGroup, ReactiveFormsModule, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
5
5
|
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
-
import { isObservable, throwError, of, map as map$1, catchError as catchError$1, forkJoin, merge, EMPTY, defer, take, timeout as timeout$1, finalize as finalize$1, tap as tap$1, switchMap } from 'rxjs';
|
|
6
|
+
import { isObservable, throwError, of, map as map$1, catchError as catchError$1, forkJoin, merge, EMPTY, defer, take, timeout as timeout$1, finalize as finalize$1, throwIfEmpty, tap as tap$1, switchMap } from 'rxjs';
|
|
7
7
|
import { timeout, map, catchError, tap, finalize, shareReplay } from 'rxjs/operators';
|
|
8
8
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
9
9
|
import * as i1$1 from '@angular/common';
|
|
@@ -56,6 +56,16 @@ const PALETTE_CATEGORY_MAP = {
|
|
|
56
56
|
* Validates supplied endpoints and maps friendly names to internal IDs.
|
|
57
57
|
*/
|
|
58
58
|
function normalizeBwaysConfig(config) {
|
|
59
|
+
if (config.menu != null) {
|
|
60
|
+
if (config.menu.format !== undefined && config.menu.format !== 'tree' && config.menu.format !== 'erp')
|
|
61
|
+
throw new Error('menu.format must be tree or erp.');
|
|
62
|
+
if (typeof config.menu.load !== 'function')
|
|
63
|
+
throw new Error('menu.load must return an Observable menu tree.');
|
|
64
|
+
if (config.menu.contextKey !== undefined && typeof config.menu.contextKey !== 'function')
|
|
65
|
+
throw new Error('menu.contextKey must be a function.');
|
|
66
|
+
if (config.menu.timeoutMs !== undefined && (!Number.isFinite(config.menu.timeoutMs) || config.menu.timeoutMs <= 0))
|
|
67
|
+
throw new Error('menu.timeoutMs must be positive.');
|
|
68
|
+
}
|
|
59
69
|
// Capabilities are optional; validate only URLs the host supplies.
|
|
60
70
|
for (const key of ['spEndpoint', 'tablesEndpoint', 'executeEndpoint', 'lookupEndpoint', 'reportsEndpoint', 'apisEndpoint']) {
|
|
61
71
|
if (config[key] !== undefined && (typeof config[key] !== 'string' || !config[key]?.trim())) {
|
|
@@ -96,6 +106,7 @@ function normalizeBwaysConfig(config) {
|
|
|
96
106
|
? cleanUrl(config.executeEndpoint.replace(/\/execute\/?$/, '/lookup'))
|
|
97
107
|
: null;
|
|
98
108
|
return {
|
|
109
|
+
menu: config.menu ?? null,
|
|
99
110
|
spEndpoint: config.spEndpoint ? cleanUrl(config.spEndpoint) : '',
|
|
100
111
|
tablesEndpoint: config.tablesEndpoint ? cleanUrl(config.tablesEndpoint) : '',
|
|
101
112
|
executeEndpoint: config.executeEndpoint ? cleanUrl(config.executeEndpoint) : '',
|
|
@@ -11134,6 +11145,8 @@ class DesignerConfigService {
|
|
|
11134
11145
|
}
|
|
11135
11146
|
if (config.lookupTimeoutMs !== undefined && config.executionTimeoutMs === undefined && this.inherited?.executionTimeoutMs === undefined)
|
|
11136
11147
|
result.executionTimeoutMs = normalized.executionTimeoutMs;
|
|
11148
|
+
if (config.menu !== undefined)
|
|
11149
|
+
result.menu = normalized.menu;
|
|
11137
11150
|
if (config.components !== undefined)
|
|
11138
11151
|
result.allowedCategories = normalized.allowedCategories;
|
|
11139
11152
|
return result;
|
|
@@ -11546,6 +11559,344 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
11546
11559
|
type: Injectable
|
|
11547
11560
|
}] });
|
|
11548
11561
|
|
|
11562
|
+
/** Validate host data once per load; never mutate the host tree or silently omit bad branches. */
|
|
11563
|
+
function indexReportMenus(nodes) {
|
|
11564
|
+
if (!Array.isArray(nodes))
|
|
11565
|
+
throw new Error('The menu loader must return a menu array.');
|
|
11566
|
+
const rows = [];
|
|
11567
|
+
const ids = new Set();
|
|
11568
|
+
const ancestors = new Set();
|
|
11569
|
+
const visit = (items, path, parentId) => {
|
|
11570
|
+
if (path.length > 100)
|
|
11571
|
+
throw new Error('The menu hierarchy exceeds 100 levels.');
|
|
11572
|
+
for (const item of items) {
|
|
11573
|
+
if (!item || typeof item !== 'object' || ancestors.has(item))
|
|
11574
|
+
throw new Error('The menu hierarchy contains a cycle or invalid node.');
|
|
11575
|
+
if (typeof item.id !== 'string' || !item.id.trim() || ids.has(item.id))
|
|
11576
|
+
throw new Error('Menu IDs must be non-empty unique strings.');
|
|
11577
|
+
if (typeof item.caption !== 'string' || !item.caption.trim() || typeof item.selectable !== 'boolean')
|
|
11578
|
+
throw new Error('Each menu needs a caption and selectable flag.');
|
|
11579
|
+
if (item.children !== undefined && !Array.isArray(item.children))
|
|
11580
|
+
throw new Error('Menu children must be an array.');
|
|
11581
|
+
for (const key of ['moduleNo', 'menuKey', 'parentKey']) {
|
|
11582
|
+
if (item[key] !== undefined && typeof item[key] !== 'string')
|
|
11583
|
+
throw new Error('Normalize menu identifiers to strings.');
|
|
11584
|
+
}
|
|
11585
|
+
if (item.selectable && !item.menuKey?.trim())
|
|
11586
|
+
throw new Error('Selectable menus need a menuKey.');
|
|
11587
|
+
ids.add(item.id);
|
|
11588
|
+
ancestors.add(item);
|
|
11589
|
+
const nextPath = [...path, item.caption];
|
|
11590
|
+
rows.push({ node: item, path: nextPath, depth: path.length, parentId });
|
|
11591
|
+
visit(item.children ?? [], nextPath, item.id);
|
|
11592
|
+
ancestors.delete(item);
|
|
11593
|
+
}
|
|
11594
|
+
};
|
|
11595
|
+
visit(nodes, []);
|
|
11596
|
+
return rows;
|
|
11597
|
+
}
|
|
11598
|
+
function reportMenuSelection(row) {
|
|
11599
|
+
return { targetId: row.node.id, menuKey: row.node.menuKey, menuCaption: row.node.caption,
|
|
11600
|
+
moduleNo: row.node.moduleNo, parentKey: row.node.parentKey, path: [...row.path] };
|
|
11601
|
+
}
|
|
11602
|
+
/** Opt-in ERP compatibility boundary. Generic tree users keep their own selection rules. */
|
|
11603
|
+
function normalizeReportMenuTree(nodes, format = 'tree') {
|
|
11604
|
+
if (!Array.isArray(nodes))
|
|
11605
|
+
throw new Error('The menu loader must return a menu array.');
|
|
11606
|
+
if (format === 'tree')
|
|
11607
|
+
return nodes;
|
|
11608
|
+
const ancestors = new Set();
|
|
11609
|
+
const identifier = (value, field) => {
|
|
11610
|
+
if (value == null)
|
|
11611
|
+
return undefined;
|
|
11612
|
+
if ((typeof value !== 'string' && typeof value !== 'number') ||
|
|
11613
|
+
(typeof value === 'number' && !Number.isSafeInteger(value)) || !String(value).trim()) {
|
|
11614
|
+
throw new Error('Invalid ERP menu identifier: ' + field + '. Use strings for large or zero-prefixed keys.');
|
|
11615
|
+
}
|
|
11616
|
+
return String(value);
|
|
11617
|
+
};
|
|
11618
|
+
const caption = (value, fallback) => {
|
|
11619
|
+
if (value == null || value === '')
|
|
11620
|
+
return fallback;
|
|
11621
|
+
if (typeof value !== 'string')
|
|
11622
|
+
throw new Error('ERP menu captions must be strings.');
|
|
11623
|
+
return value.trim() || fallback;
|
|
11624
|
+
};
|
|
11625
|
+
const mapNode = (item, inheritedModule, parentKey, depth) => {
|
|
11626
|
+
if (depth > 100)
|
|
11627
|
+
throw new Error('The menu hierarchy exceeds 100 levels.');
|
|
11628
|
+
if (!item || typeof item !== 'object' || ancestors.has(item))
|
|
11629
|
+
throw new Error('The ERP menu hierarchy contains a cycle or invalid node.');
|
|
11630
|
+
if (String(item.IS_MENU_SOURCE) === '2')
|
|
11631
|
+
return null;
|
|
11632
|
+
if (item.subItems !== undefined && !Array.isArray(item.subItems))
|
|
11633
|
+
throw new Error('ERP subItems must be an array.');
|
|
11634
|
+
const moduleNo = identifier(item.MODULE_NO, 'MODULE_NO') ?? inheritedModule;
|
|
11635
|
+
if (moduleNo === undefined)
|
|
11636
|
+
throw new Error('ERP modules require MODULE_NO.');
|
|
11637
|
+
if (inheritedModule !== undefined && moduleNo !== inheritedModule)
|
|
11638
|
+
throw new Error('An ERP menu belongs to a different module than its parent.');
|
|
11639
|
+
const menuKey = identifier(item.MENU_KEY, 'MENU_KEY');
|
|
11640
|
+
if (depth > 0 && menuKey === undefined)
|
|
11641
|
+
throw new Error('ERP menu items require MENU_KEY.');
|
|
11642
|
+
const parent = identifier(item.PARENT, 'PARENT') ?? parentKey;
|
|
11643
|
+
const group = depth === 0 || !!item.subItems?.length;
|
|
11644
|
+
ancestors.add(item);
|
|
11645
|
+
const children = (item.subItems ?? [])
|
|
11646
|
+
.map(child => mapNode(child, moduleNo, menuKey, depth + 1))
|
|
11647
|
+
.filter((child) => child !== null);
|
|
11648
|
+
ancestors.delete(item);
|
|
11649
|
+
// Excluded descendants never turn their original group into a destination.
|
|
11650
|
+
if (item.subItems?.length && !children.length)
|
|
11651
|
+
return null;
|
|
11652
|
+
return {
|
|
11653
|
+
id: JSON.stringify([moduleNo, parent ?? '', menuKey ?? 'module']),
|
|
11654
|
+
caption: caption(item.MENU_CAPTION ?? item.MODULE_NAME, menuKey ?? moduleNo),
|
|
11655
|
+
moduleNo, menuKey, parentKey: parent, selectable: !group && menuKey !== undefined, children,
|
|
11656
|
+
};
|
|
11657
|
+
};
|
|
11658
|
+
return nodes
|
|
11659
|
+
.map(item => mapNode(item, undefined, undefined, 0))
|
|
11660
|
+
.filter((item) => item !== null);
|
|
11661
|
+
}
|
|
11662
|
+
|
|
11663
|
+
let nextMenuId = 0;
|
|
11664
|
+
class ReportMenuSelectorComponent {
|
|
11665
|
+
config = input.required();
|
|
11666
|
+
value = input(null);
|
|
11667
|
+
disabled = input(false);
|
|
11668
|
+
selectionChange = output();
|
|
11669
|
+
validityChange = output();
|
|
11670
|
+
selection = signal(null);
|
|
11671
|
+
open = signal(false);
|
|
11672
|
+
loading = signal(false);
|
|
11673
|
+
loaded = signal(false);
|
|
11674
|
+
error = signal('');
|
|
11675
|
+
query = signal('');
|
|
11676
|
+
rows = signal([]);
|
|
11677
|
+
expanded = signal(new Set());
|
|
11678
|
+
active = signal(0);
|
|
11679
|
+
panelId = 'rpt-menu-tree-' + ++nextMenuId;
|
|
11680
|
+
trigger = viewChild('trigger');
|
|
11681
|
+
search = viewChild('search');
|
|
11682
|
+
list = viewChild('list');
|
|
11683
|
+
element = inject((ElementRef));
|
|
11684
|
+
scrollStrategy = inject(ReportOverlayService).scrollStrategy(() => this.element.nativeElement);
|
|
11685
|
+
width = signal(280);
|
|
11686
|
+
positions = [
|
|
11687
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },
|
|
11688
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },
|
|
11689
|
+
];
|
|
11690
|
+
request;
|
|
11691
|
+
generation = 0;
|
|
11692
|
+
context;
|
|
11693
|
+
valid = computed(() => {
|
|
11694
|
+
const selected = this.selection();
|
|
11695
|
+
if (!selected)
|
|
11696
|
+
return !this.config().required;
|
|
11697
|
+
return this.loaded() && !this.loading() && !this.error() && this.rows().some(row => row.node.id === selected.targetId && row.node.selectable);
|
|
11698
|
+
});
|
|
11699
|
+
unavailable = computed(() => !!this.selection() && this.loaded() && !this.loading() && !this.valid());
|
|
11700
|
+
visible = computed(() => {
|
|
11701
|
+
const rows = this.rows();
|
|
11702
|
+
const term = this.query().trim().toLocaleLowerCase();
|
|
11703
|
+
if (term) {
|
|
11704
|
+
const included = new Set();
|
|
11705
|
+
const byId = new Map(rows.map(row => [row.node.id, row]));
|
|
11706
|
+
for (const row of rows)
|
|
11707
|
+
if (row.node.caption.toLocaleLowerCase().includes(term) || row.node.menuKey?.toLocaleLowerCase().includes(term)) {
|
|
11708
|
+
let current = row;
|
|
11709
|
+
while (current && !included.has(current.node.id)) {
|
|
11710
|
+
included.add(current.node.id);
|
|
11711
|
+
current = current.parentId ? byId.get(current.parentId) : undefined;
|
|
11712
|
+
}
|
|
11713
|
+
}
|
|
11714
|
+
return rows.filter(row => included.has(row.node.id));
|
|
11715
|
+
}
|
|
11716
|
+
const visible = new Set();
|
|
11717
|
+
return rows.filter(row => {
|
|
11718
|
+
const show = !row.parentId || (visible.has(row.parentId) && this.expanded().has(row.parentId));
|
|
11719
|
+
if (show)
|
|
11720
|
+
visible.add(row.node.id);
|
|
11721
|
+
return show;
|
|
11722
|
+
});
|
|
11723
|
+
});
|
|
11724
|
+
constructor() {
|
|
11725
|
+
effect(() => { const value = this.value(); untracked(() => { this.selection.set(value); if (value && !this.loaded() && !this.loading())
|
|
11726
|
+
this.reload(); }); }, { allowSignalWrites: true });
|
|
11727
|
+
effect(() => {
|
|
11728
|
+
const config = this.config();
|
|
11729
|
+
const key = config.contextKey?.() ?? '';
|
|
11730
|
+
untracked(() => {
|
|
11731
|
+
const changed = this.context !== undefined && (this.context.config !== config || this.context.key !== key);
|
|
11732
|
+
this.context = { config, key };
|
|
11733
|
+
if (!changed)
|
|
11734
|
+
return;
|
|
11735
|
+
++this.generation;
|
|
11736
|
+
this.request?.unsubscribe();
|
|
11737
|
+
this.rows.set([]);
|
|
11738
|
+
this.loaded.set(false);
|
|
11739
|
+
this.error.set('');
|
|
11740
|
+
this.loading.set(false);
|
|
11741
|
+
this.expanded.set(new Set());
|
|
11742
|
+
if (this.selection()) {
|
|
11743
|
+
this.selection.set(null);
|
|
11744
|
+
this.selectionChange.emit(null);
|
|
11745
|
+
}
|
|
11746
|
+
if (this.open())
|
|
11747
|
+
this.reload();
|
|
11748
|
+
});
|
|
11749
|
+
}, { allowSignalWrites: true });
|
|
11750
|
+
effect(() => { const valid = this.valid(); untracked(() => this.validityChange.emit(valid)); }, { allowSignalWrites: true });
|
|
11751
|
+
effect(() => { if (this.disabled())
|
|
11752
|
+
untracked(() => this.close(false)); }, { allowSignalWrites: true });
|
|
11753
|
+
inject(DestroyRef).onDestroy(() => { ++this.generation; this.request?.unsubscribe(); });
|
|
11754
|
+
}
|
|
11755
|
+
toggle() {
|
|
11756
|
+
if (this.disabled())
|
|
11757
|
+
return;
|
|
11758
|
+
if (this.open()) {
|
|
11759
|
+
this.close();
|
|
11760
|
+
return;
|
|
11761
|
+
}
|
|
11762
|
+
this.width.set(Math.min(Math.max(this.element.nativeElement.getBoundingClientRect().width, 260), this.element.nativeElement.ownerDocument.documentElement.clientWidth - 16));
|
|
11763
|
+
this.open.set(true);
|
|
11764
|
+
if (!this.loaded() && !this.loading())
|
|
11765
|
+
this.reload();
|
|
11766
|
+
}
|
|
11767
|
+
attached() { queueMicrotask(() => { if (this.open())
|
|
11768
|
+
this.search()?.nativeElement.focus(); }); }
|
|
11769
|
+
close(focus = true) { const wasOpen = this.open(); this.open.set(false); if (focus && wasOpen)
|
|
11770
|
+
this.trigger()?.nativeElement.focus(); }
|
|
11771
|
+
reload() {
|
|
11772
|
+
if (this.disabled())
|
|
11773
|
+
return;
|
|
11774
|
+
const generation = ++this.generation;
|
|
11775
|
+
this.request?.unsubscribe();
|
|
11776
|
+
this.loading.set(true);
|
|
11777
|
+
this.loaded.set(false);
|
|
11778
|
+
this.error.set('');
|
|
11779
|
+
this.rows.set([]);
|
|
11780
|
+
this.active.set(0);
|
|
11781
|
+
const config = this.config();
|
|
11782
|
+
this.request = defer(() => config.load()).pipe(take(1), throwIfEmpty(() => new Error('The menu loader completed without returning a tree.')), timeout$1({ first: this.config().timeoutMs ?? 30000 }), finalize$1(() => { if (generation === this.generation)
|
|
11783
|
+
this.loading.set(false); })).subscribe({
|
|
11784
|
+
next: nodes => {
|
|
11785
|
+
if (generation !== this.generation)
|
|
11786
|
+
return;
|
|
11787
|
+
try {
|
|
11788
|
+
const rows = indexReportMenus(normalizeReportMenuTree(nodes, config.format));
|
|
11789
|
+
this.rows.set(rows);
|
|
11790
|
+
this.loaded.set(true);
|
|
11791
|
+
const selected = this.selection();
|
|
11792
|
+
const match = selected && rows.find(row => row.node.id === selected.targetId && row.node.selectable);
|
|
11793
|
+
if (match) {
|
|
11794
|
+
const value = reportMenuSelection(match);
|
|
11795
|
+
this.selection.set(value);
|
|
11796
|
+
this.selectionChange.emit(value);
|
|
11797
|
+
}
|
|
11798
|
+
}
|
|
11799
|
+
catch (error) {
|
|
11800
|
+
this.error.set(error instanceof Error ? error.message : 'Invalid menu data.');
|
|
11801
|
+
}
|
|
11802
|
+
},
|
|
11803
|
+
error: () => { if (generation === this.generation)
|
|
11804
|
+
this.error.set('Could not load menus. Check the current context and retry.'); },
|
|
11805
|
+
});
|
|
11806
|
+
}
|
|
11807
|
+
choose(row) {
|
|
11808
|
+
if (this.disabled() || this.loading())
|
|
11809
|
+
return;
|
|
11810
|
+
if (!row.node.selectable) {
|
|
11811
|
+
this.expand(row);
|
|
11812
|
+
return;
|
|
11813
|
+
}
|
|
11814
|
+
const selected = reportMenuSelection(row);
|
|
11815
|
+
this.selection.set(selected);
|
|
11816
|
+
this.selectionChange.emit(selected);
|
|
11817
|
+
this.close();
|
|
11818
|
+
}
|
|
11819
|
+
clear() { if (this.disabled())
|
|
11820
|
+
return; this.selection.set(null); this.selectionChange.emit(null); }
|
|
11821
|
+
isExpanded(row) { return !!this.query().trim() || this.expanded().has(row.node.id); }
|
|
11822
|
+
expand(row) {
|
|
11823
|
+
if (!row.node.children?.length || this.query().trim())
|
|
11824
|
+
return;
|
|
11825
|
+
const next = new Set(this.expanded());
|
|
11826
|
+
if (next.has(row.node.id))
|
|
11827
|
+
next.delete(row.node.id);
|
|
11828
|
+
else
|
|
11829
|
+
next.add(row.node.id);
|
|
11830
|
+
this.expanded.set(next);
|
|
11831
|
+
}
|
|
11832
|
+
onQuery(value) { this.query.set(value); this.active.set(0); }
|
|
11833
|
+
triggerKey(event) {
|
|
11834
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
11835
|
+
event.preventDefault();
|
|
11836
|
+
if (!this.open())
|
|
11837
|
+
this.toggle();
|
|
11838
|
+
else
|
|
11839
|
+
this.list()?.nativeElement.focus();
|
|
11840
|
+
}
|
|
11841
|
+
}
|
|
11842
|
+
key(event) {
|
|
11843
|
+
if (event.key === 'Escape') {
|
|
11844
|
+
event.preventDefault();
|
|
11845
|
+
event.stopPropagation();
|
|
11846
|
+
this.close();
|
|
11847
|
+
return;
|
|
11848
|
+
}
|
|
11849
|
+
if (event.key === 'Tab') {
|
|
11850
|
+
this.close();
|
|
11851
|
+
return;
|
|
11852
|
+
}
|
|
11853
|
+
const rows = this.visible();
|
|
11854
|
+
const row = rows[this.active()];
|
|
11855
|
+
if (!row)
|
|
11856
|
+
return;
|
|
11857
|
+
let index = this.active();
|
|
11858
|
+
if (event.key === 'ArrowDown')
|
|
11859
|
+
index = Math.min(index + (event.target === this.search()?.nativeElement ? 0 : 1), rows.length - 1);
|
|
11860
|
+
else if (event.key === 'ArrowUp')
|
|
11861
|
+
index = Math.max(index - 1, 0);
|
|
11862
|
+
else if (event.target === this.search()?.nativeElement)
|
|
11863
|
+
return;
|
|
11864
|
+
else if (event.key === 'Home')
|
|
11865
|
+
index = 0;
|
|
11866
|
+
else if (event.key === 'End')
|
|
11867
|
+
index = rows.length - 1;
|
|
11868
|
+
else if (event.key === 'Enter' || event.key === ' ') {
|
|
11869
|
+
event.preventDefault();
|
|
11870
|
+
this.choose(row);
|
|
11871
|
+
return;
|
|
11872
|
+
}
|
|
11873
|
+
else if (event.key === 'ArrowRight') {
|
|
11874
|
+
if (!this.isExpanded(row))
|
|
11875
|
+
this.expand(row);
|
|
11876
|
+
else if (row.node.children?.length)
|
|
11877
|
+
index = Math.min(index + 1, rows.length - 1);
|
|
11878
|
+
}
|
|
11879
|
+
else if (event.key === 'ArrowLeft') {
|
|
11880
|
+
if (row.node.children?.length && this.isExpanded(row) && !this.query())
|
|
11881
|
+
this.expand(row);
|
|
11882
|
+
else if (row.parentId)
|
|
11883
|
+
index = Math.max(rows.findIndex(candidate => candidate.node.id === row.parentId), 0);
|
|
11884
|
+
}
|
|
11885
|
+
else
|
|
11886
|
+
return;
|
|
11887
|
+
event.preventDefault();
|
|
11888
|
+
this.active.set(index);
|
|
11889
|
+
this.list()?.nativeElement.focus();
|
|
11890
|
+
this.list()?.nativeElement.querySelectorAll('[role="treeitem"]')[index]?.scrollIntoView({ block: 'nearest' });
|
|
11891
|
+
}
|
|
11892
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ReportMenuSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11893
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ReportMenuSelectorComponent, isStandalone: true, selector: "rpt-report-menu-selector", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectionChange: "selectionChange", validityChange: "validityChange" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "search", first: true, predicate: ["search"], descendants: true, isSignal: true }, { propertyName: "list", first: true, predicate: ["list"], descendants: true, isSignal: true }], ngImport: i0, template: "<div cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\n <div class=\"rpt-menu-controls\">\n <button #trigger type=\"button\" class=\"rpt-menu-trigger\" [disabled]=\"disabled()\" aria-label=\"Menu destination\"\n aria-haspopup=\"tree\" [attr.aria-expanded]=\"open()\" [attr.aria-controls]=\"panelId\" (click)=\"toggle()\" (keydown)=\"triggerKey($event)\">\n <span>{{ selection()?.menuCaption || 'Select menu?' }}</span><span aria-hidden=\"true\">?</span>\n </button>\n @if (selection()) { <button type=\"button\" class=\"rpt-menu-clear\" [disabled]=\"disabled()\" (click)=\"clear()\" aria-label=\"Clear menu destination\">?</button> }\n </div>\n @if (selection()) { <p class=\"rpt-menu-path\">{{ selection()!.path.join(' ? ') }}</p> }\n @if (unavailable()) { <p class=\"rpt-menu-error\" role=\"alert\">This menu destination is unavailable. Select another menu or clear it.</p> }\n</div>\n<ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"origin\" [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\" [cdkConnectedOverlayWidth]=\"width()\" [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayViewportMargin]=\"8\" [cdkConnectedOverlayPush]=\"true\" [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n (overlayOutsideClick)=\"close(false)\" (attach)=\"attached()\" (detach)=\"close(false)\">\n <div class=\"rpt-menu-panel\" (keydown)=\"key($event)\">\n <div class=\"rpt-menu-tools\">\n <input #search type=\"search\" class=\"rpt-menu-search\" aria-label=\"Search menu destinations\" placeholder=\"Search menus?\"\n [ngModel]=\"query()\" (ngModelChange)=\"onQuery($event)\" [ngModelOptions]=\"{standalone:true}\" />\n <button type=\"button\" class=\"rpt-menu-refresh\" [disabled]=\"loading()\" (click)=\"reload()\">Refresh</button>\n </div>\n @if (loading()) { <p role=\"status\">Loading menus?</p> }\n @if (error()) { <div class=\"rpt-menu-error\" role=\"alert\">{{ error() }} <button type=\"button\" class=\"rpt-menu-refresh\" (click)=\"reload()\">Retry</button></div> }\n <div #list class=\"rpt-menu-tree\" role=\"tree\" aria-label=\"Menu destinations\" tabindex=\"0\" [attr.aria-busy]=\"loading()\"\n [attr.aria-activedescendant]=\"visible().length ? panelId + '-row-' + active() : null\">\n @for (row of visible(); track row.node.id; let i = $index) {\n <div role=\"treeitem\" [id]=\"panelId + '-row-' + i\" [attr.aria-level]=\"row.depth + 1\"\n [attr.aria-expanded]=\"row.node.children?.length ? isExpanded(row) : null\"\n [attr.aria-selected]=\"row.node.selectable ? selection()?.targetId === row.node.id : null\"\n class=\"rpt-menu-row\" [class.rpt-menu-active]=\"active() === i\" [class.rpt-menu-selected]=\"selection()?.targetId === row.node.id\"\n [style.padding-left.px]=\"10 + row.depth * 16\" (click)=\"active.set(i); choose(row)\">\n @if (row.node.children?.length) {\n <button type=\"button\" class=\"rpt-menu-expand\" tabindex=\"-1\" [attr.aria-label]=\"(isExpanded(row) ? 'Collapse ' : 'Expand ') + row.node.caption\"\n (click)=\"$event.stopPropagation(); active.set(i); expand(row)\">{{ isExpanded(row) ? '?' : '?' }}</button>\n } @else { <span class=\"rpt-menu-leaf\" aria-hidden=\"true\">{{ row.node.selectable ? '?' : '?' }}</span> }\n <span>{{ row.node.caption }}</span>\n </div>\n }\n </div>\n @if (loaded() && !loading() && !visible().length) { <p role=\"status\">{{ query() ? 'No matching menus.' : 'No menus available.' }}</p> }\n </div>\n</ng-template>\n", styles: [":host{display:block;min-width:0;font:inherit;color:inherit}*{box-sizing:border-box}.rpt-menu-controls{display:flex;gap:4px}.rpt-menu-trigger,.rpt-menu-clear,.rpt-menu-refresh,.rpt-menu-expand{font:inherit;margin:0;min-height:32px;width:auto;border:1px solid #cbd5e1;border-radius:5px;background:#fff;color:#334155;cursor:pointer;letter-spacing:normal;text-transform:none;box-shadow:none}.rpt-menu-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;padding:7px 10px;text-align:left}.rpt-menu-trigger span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rpt-menu-clear{padding:0 9px;flex:none}.rpt-menu-path{font-size:12px;line-height:1.5;color:#64748b;overflow-wrap:anywhere;margin:6px 0}.rpt-menu-panel{display:flex;flex-direction:column;max-height:min(340px,60dvh);width:100%;min-width:0;overflow:hidden;background:#fff;color:#334155;font:13px/1.45 var(--rpt-font-family,Arial,sans-serif);border:1px solid #cbd5e1;border-radius:7px;box-shadow:0 8px 24px #0f172a26}.rpt-menu-tools{display:flex;gap:6px;padding:8px;border-bottom:1px solid #e2e8f0;flex:none}.rpt-menu-search{font:inherit;color:inherit;background:#fff;border:1px solid #cbd5e1;border-radius:4px;width:100%;min-width:0;padding:6px 8px;height:32px;margin:0}.rpt-menu-refresh{flex:none;padding:4px 8px;font-size:12px}.rpt-menu-tree{overflow:auto;min-height:0;overscroll-behavior:contain;padding:4px 0}.rpt-menu-row{display:flex;gap:6px;align-items:center;min-height:34px;padding:4px 10px;cursor:pointer;overflow-wrap:anywhere}.rpt-menu-row>span:last-child{min-width:0}.rpt-menu-row:hover,.rpt-menu-active{background:#f1f5f9}.rpt-menu-selected{background:#eff6ff;color:#1d4ed8}.rpt-menu-expand{border:0;padding:0;width:22px;min-height:24px;flex:none;background:transparent}.rpt-menu-leaf{width:22px;flex:none;text-align:center}.rpt-menu-error{color:#b91c1c;font-size:12px;padding:6px 0;margin:0}.rpt-menu-panel>p,.rpt-menu-panel>.rpt-menu-error{padding:10px;margin:0}:is(button,input,[role=tree]):focus-visible{outline:2px solid #2563eb;outline-offset:2px}button:disabled{opacity:.55;cursor:default}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11894
|
+
}
|
|
11895
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ReportMenuSelectorComponent, decorators: [{
|
|
11896
|
+
type: Component,
|
|
11897
|
+
args: [{ selector: 'rpt-report-menu-selector', standalone: true, imports: [FormsModule, OverlayModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\n <div class=\"rpt-menu-controls\">\n <button #trigger type=\"button\" class=\"rpt-menu-trigger\" [disabled]=\"disabled()\" aria-label=\"Menu destination\"\n aria-haspopup=\"tree\" [attr.aria-expanded]=\"open()\" [attr.aria-controls]=\"panelId\" (click)=\"toggle()\" (keydown)=\"triggerKey($event)\">\n <span>{{ selection()?.menuCaption || 'Select menu?' }}</span><span aria-hidden=\"true\">?</span>\n </button>\n @if (selection()) { <button type=\"button\" class=\"rpt-menu-clear\" [disabled]=\"disabled()\" (click)=\"clear()\" aria-label=\"Clear menu destination\">?</button> }\n </div>\n @if (selection()) { <p class=\"rpt-menu-path\">{{ selection()!.path.join(' ? ') }}</p> }\n @if (unavailable()) { <p class=\"rpt-menu-error\" role=\"alert\">This menu destination is unavailable. Select another menu or clear it.</p> }\n</div>\n<ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"origin\" [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\" [cdkConnectedOverlayWidth]=\"width()\" [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayViewportMargin]=\"8\" [cdkConnectedOverlayPush]=\"true\" [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n (overlayOutsideClick)=\"close(false)\" (attach)=\"attached()\" (detach)=\"close(false)\">\n <div class=\"rpt-menu-panel\" (keydown)=\"key($event)\">\n <div class=\"rpt-menu-tools\">\n <input #search type=\"search\" class=\"rpt-menu-search\" aria-label=\"Search menu destinations\" placeholder=\"Search menus?\"\n [ngModel]=\"query()\" (ngModelChange)=\"onQuery($event)\" [ngModelOptions]=\"{standalone:true}\" />\n <button type=\"button\" class=\"rpt-menu-refresh\" [disabled]=\"loading()\" (click)=\"reload()\">Refresh</button>\n </div>\n @if (loading()) { <p role=\"status\">Loading menus?</p> }\n @if (error()) { <div class=\"rpt-menu-error\" role=\"alert\">{{ error() }} <button type=\"button\" class=\"rpt-menu-refresh\" (click)=\"reload()\">Retry</button></div> }\n <div #list class=\"rpt-menu-tree\" role=\"tree\" aria-label=\"Menu destinations\" tabindex=\"0\" [attr.aria-busy]=\"loading()\"\n [attr.aria-activedescendant]=\"visible().length ? panelId + '-row-' + active() : null\">\n @for (row of visible(); track row.node.id; let i = $index) {\n <div role=\"treeitem\" [id]=\"panelId + '-row-' + i\" [attr.aria-level]=\"row.depth + 1\"\n [attr.aria-expanded]=\"row.node.children?.length ? isExpanded(row) : null\"\n [attr.aria-selected]=\"row.node.selectable ? selection()?.targetId === row.node.id : null\"\n class=\"rpt-menu-row\" [class.rpt-menu-active]=\"active() === i\" [class.rpt-menu-selected]=\"selection()?.targetId === row.node.id\"\n [style.padding-left.px]=\"10 + row.depth * 16\" (click)=\"active.set(i); choose(row)\">\n @if (row.node.children?.length) {\n <button type=\"button\" class=\"rpt-menu-expand\" tabindex=\"-1\" [attr.aria-label]=\"(isExpanded(row) ? 'Collapse ' : 'Expand ') + row.node.caption\"\n (click)=\"$event.stopPropagation(); active.set(i); expand(row)\">{{ isExpanded(row) ? '?' : '?' }}</button>\n } @else { <span class=\"rpt-menu-leaf\" aria-hidden=\"true\">{{ row.node.selectable ? '?' : '?' }}</span> }\n <span>{{ row.node.caption }}</span>\n </div>\n }\n </div>\n @if (loaded() && !loading() && !visible().length) { <p role=\"status\">{{ query() ? 'No matching menus.' : 'No menus available.' }}</p> }\n </div>\n</ng-template>\n", styles: [":host{display:block;min-width:0;font:inherit;color:inherit}*{box-sizing:border-box}.rpt-menu-controls{display:flex;gap:4px}.rpt-menu-trigger,.rpt-menu-clear,.rpt-menu-refresh,.rpt-menu-expand{font:inherit;margin:0;min-height:32px;width:auto;border:1px solid #cbd5e1;border-radius:5px;background:#fff;color:#334155;cursor:pointer;letter-spacing:normal;text-transform:none;box-shadow:none}.rpt-menu-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;padding:7px 10px;text-align:left}.rpt-menu-trigger span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rpt-menu-clear{padding:0 9px;flex:none}.rpt-menu-path{font-size:12px;line-height:1.5;color:#64748b;overflow-wrap:anywhere;margin:6px 0}.rpt-menu-panel{display:flex;flex-direction:column;max-height:min(340px,60dvh);width:100%;min-width:0;overflow:hidden;background:#fff;color:#334155;font:13px/1.45 var(--rpt-font-family,Arial,sans-serif);border:1px solid #cbd5e1;border-radius:7px;box-shadow:0 8px 24px #0f172a26}.rpt-menu-tools{display:flex;gap:6px;padding:8px;border-bottom:1px solid #e2e8f0;flex:none}.rpt-menu-search{font:inherit;color:inherit;background:#fff;border:1px solid #cbd5e1;border-radius:4px;width:100%;min-width:0;padding:6px 8px;height:32px;margin:0}.rpt-menu-refresh{flex:none;padding:4px 8px;font-size:12px}.rpt-menu-tree{overflow:auto;min-height:0;overscroll-behavior:contain;padding:4px 0}.rpt-menu-row{display:flex;gap:6px;align-items:center;min-height:34px;padding:4px 10px;cursor:pointer;overflow-wrap:anywhere}.rpt-menu-row>span:last-child{min-width:0}.rpt-menu-row:hover,.rpt-menu-active{background:#f1f5f9}.rpt-menu-selected{background:#eff6ff;color:#1d4ed8}.rpt-menu-expand{border:0;padding:0;width:22px;min-height:24px;flex:none;background:transparent}.rpt-menu-leaf{width:22px;flex:none;text-align:center}.rpt-menu-error{color:#b91c1c;font-size:12px;padding:6px 0;margin:0}.rpt-menu-panel>p,.rpt-menu-panel>.rpt-menu-error{padding:10px;margin:0}:is(button,input,[role=tree]):focus-visible{outline:2px solid #2563eb;outline-offset:2px}button:disabled{opacity:.55;cursor:default}\n"] }]
|
|
11898
|
+
}], ctorParameters: () => [] });
|
|
11899
|
+
|
|
11549
11900
|
/**
|
|
11550
11901
|
* ReportStoreService manages application-wide cached report states,
|
|
11551
11902
|
* listing, and reactive access via Angular signals.
|
|
@@ -11831,6 +12182,11 @@ class ReportSavedDialogComponent {
|
|
|
11831
12182
|
reportingConfig = inject(REPORTING_CONFIG, { optional: true });
|
|
11832
12183
|
idCheck;
|
|
11833
12184
|
customSlug = !!this.data.report.slug;
|
|
12185
|
+
menuSelector = viewChild(ReportMenuSelectorComponent);
|
|
12186
|
+
menuConfig = computed(() => this.reportingConfig?.menu ?? null);
|
|
12187
|
+
menuSelection = signal(this.data.menuSelection ?? null);
|
|
12188
|
+
menuValid = signal(!(this.reportingConfig?.menu?.required || this.data.menuSelection));
|
|
12189
|
+
menuContext() { return this.menuConfig()?.contextKey?.() ?? ''; }
|
|
11834
12190
|
report = this.data.report;
|
|
11835
12191
|
baseRoute = signal(this.data.routeBase || this.reportingConfig?.routeBase || 'reports');
|
|
11836
12192
|
reportId = signal(this.report.id);
|
|
@@ -11949,8 +12305,11 @@ class ReportSavedDialogComponent {
|
|
|
11949
12305
|
return;
|
|
11950
12306
|
this.attempted.set(true);
|
|
11951
12307
|
this.saveError.set(null);
|
|
11952
|
-
if (this.idError() || this.nameError() || this.slugError())
|
|
12308
|
+
if (this.idError() || this.nameError() || this.slugError() || (this.menuConfig() && !(this.menuSelector()?.valid() ?? this.menuValid())))
|
|
11953
12309
|
return;
|
|
12310
|
+
const menuSelection = this.menuConfig() ? this.menuSelection() : undefined;
|
|
12311
|
+
const menuContext = this.menuContext();
|
|
12312
|
+
const menuConfig = this.menuConfig();
|
|
11954
12313
|
const reviewed = {
|
|
11955
12314
|
...this.report, id: this.reportId().trim(),
|
|
11956
12315
|
name: this.name().trim(), slug: this.slug().trim(),
|
|
@@ -11969,7 +12328,7 @@ class ReportSavedDialogComponent {
|
|
|
11969
12328
|
next: status => {
|
|
11970
12329
|
this.isCheckingId.set(false);
|
|
11971
12330
|
this.isPreparingSave.set(false);
|
|
11972
|
-
if (this.reportId().trim() !== reviewed.id || this.store.getStorageContextKey() !== contextKey) {
|
|
12331
|
+
if (this.reportId().trim() !== reviewed.id || this.store.getStorageContextKey() !== contextKey || this.menuContext() !== menuContext || this.menuConfig() !== menuConfig) {
|
|
11973
12332
|
this.idStatus.set('error');
|
|
11974
12333
|
this.idMessage.set('Reporting context changed. Review the details and save again.');
|
|
11975
12334
|
return;
|
|
@@ -11978,12 +12337,12 @@ class ReportSavedDialogComponent {
|
|
|
11978
12337
|
this.idStatus.set(this.idChanged() ? 'duplicate' : 'current');
|
|
11979
12338
|
this.idMessage.set('This report ID already exists. Confirm the update or cancel.');
|
|
11980
12339
|
this.updateConfirmation.set({ report: reviewed, action, expectedVersion: status.version,
|
|
11981
|
-
existingName: status.name || reviewed.id, contextKey });
|
|
12340
|
+
existingName: status.name || reviewed.id, contextKey, menuSelection, menuContext, menuConfig });
|
|
11982
12341
|
}
|
|
11983
12342
|
else {
|
|
11984
12343
|
this.idStatus.set('available');
|
|
11985
12344
|
this.idMessage.set('This report ID is available.');
|
|
11986
|
-
this.persist(reviewed, action, { createOnly: true });
|
|
12345
|
+
this.persist(reviewed, action, { createOnly: true }, menuSelection);
|
|
11987
12346
|
}
|
|
11988
12347
|
},
|
|
11989
12348
|
error: error => {
|
|
@@ -12001,13 +12360,13 @@ class ReportSavedDialogComponent {
|
|
|
12001
12360
|
if (!confirmation || this.isSaving() || this.isCheckingId())
|
|
12002
12361
|
return;
|
|
12003
12362
|
this.updateConfirmation.set(null);
|
|
12004
|
-
if (this.reportId().trim() !== confirmation.report.id || this.store.getStorageContextKey() !== confirmation.contextKey) {
|
|
12363
|
+
if (this.reportId().trim() !== confirmation.report.id || this.store.getStorageContextKey() !== confirmation.contextKey || this.menuContext() !== confirmation.menuContext || this.menuConfig() !== confirmation.menuConfig) {
|
|
12005
12364
|
this.saveError.set('Reporting context changed. Review the details and save again.');
|
|
12006
12365
|
return;
|
|
12007
12366
|
}
|
|
12008
|
-
this.persist(confirmation.report, confirmation.action, { expectedVersion: confirmation.expectedVersion });
|
|
12367
|
+
this.persist(confirmation.report, confirmation.action, { expectedVersion: confirmation.expectedVersion }, confirmation.menuSelection);
|
|
12009
12368
|
}
|
|
12010
|
-
persist(report, action, options) {
|
|
12369
|
+
persist(report, action, options, menuSelection) {
|
|
12011
12370
|
this.isSaving.set(true);
|
|
12012
12371
|
const previousDisableClose = this.dialogRef.disableClose;
|
|
12013
12372
|
this.dialogRef.disableClose = true;
|
|
@@ -12015,7 +12374,7 @@ class ReportSavedDialogComponent {
|
|
|
12015
12374
|
this.isSaving.set(false);
|
|
12016
12375
|
this.dialogRef.disableClose = previousDisableClose;
|
|
12017
12376
|
})).subscribe({
|
|
12018
|
-
next: saved => this.dialogRef.close({ action, report: saved }),
|
|
12377
|
+
next: saved => this.dialogRef.close({ action, report: saved, ...(menuSelection !== undefined ? { menuSelection } : {}) }),
|
|
12019
12378
|
error: error => {
|
|
12020
12379
|
this.saveError.set(error?.message || 'The report could not be saved. Please try again.');
|
|
12021
12380
|
if (/already exists/i.test(error?.message || '')) {
|
|
@@ -12033,7 +12392,7 @@ class ReportSavedDialogComponent {
|
|
|
12033
12392
|
this.save('open_live_page');
|
|
12034
12393
|
}
|
|
12035
12394
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ReportSavedDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12036
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ReportSavedDialogComponent, isStandalone: true, selector: "rpt-report-saved-dialog", ngImport: i0, template: `
|
|
12395
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ReportSavedDialogComponent, isStandalone: true, selector: "rpt-report-saved-dialog", viewQueries: [{ propertyName: "menuSelector", first: true, predicate: ReportMenuSelectorComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
12037
12396
|
<div class="rpt-dialog-shell" [attr.aria-busy]="isSaving() || isCheckingId()">
|
|
12038
12397
|
<!-- Review before the only persistence request -->
|
|
12039
12398
|
<div class="rpt-dialog-header" [attr.inert]="updateConfirmation() ? '' : null">
|
|
@@ -12182,6 +12541,17 @@ class ReportSavedDialogComponent {
|
|
|
12182
12541
|
[ngModelOptions]="{standalone: true}" [disabled]="isSaving()" />
|
|
12183
12542
|
</div>
|
|
12184
12543
|
|
|
12544
|
+
@if (menuConfig(); as menu) {
|
|
12545
|
+
<div class="rpt-form-group">
|
|
12546
|
+
<span class="rpt-label">Menu destination{{ menu.required ? ' *' : '' }}</span>
|
|
12547
|
+
<rpt-report-menu-selector [config]="menu" [value]="menuSelection()"
|
|
12548
|
+
[disabled]="isSaving() || isCheckingId() || !!updateConfirmation()"
|
|
12549
|
+
(selectionChange)="menuSelection.set($event)" (validityChange)="menuValid.set($event)" />
|
|
12550
|
+
<span class="rpt-help-text">Select the destination for review. Menu storage and route activation are managed by your application.</span>
|
|
12551
|
+
@if (attempted() && !menuValid()) { <p class="rpt-field-error" role="alert">Choose an available menu destination{{ menu.required ? '.' : ' or clear the selection.' }}</p> }
|
|
12552
|
+
</div>
|
|
12553
|
+
}
|
|
12554
|
+
|
|
12185
12555
|
<!-- Menu Group -->
|
|
12186
12556
|
<div class="rpt-form-group">
|
|
12187
12557
|
<label class="rpt-label" for="rpt-dlg-group">Menu Group</label>
|
|
@@ -12330,11 +12700,11 @@ class ReportSavedDialogComponent {
|
|
|
12330
12700
|
</div>
|
|
12331
12701
|
}
|
|
12332
12702
|
</div>
|
|
12333
|
-
`, isInline: true, styles: ["@keyframes rptSpin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.rpt-spin{display:inline-block;animation:rptSpin 1s linear infinite}@keyframes rptOverlayIn{0%{opacity:0}to{opacity:1}}@keyframes rptCardIn{0%{opacity:0;transform:scale(.96) translateY(6px)}to{opacity:1;transform:scale(1) translateY(0)}}.rpt-id-actions{display:flex;align-items:center;gap:6px;margin-top:4px}.rpt-id-action-btn{display:inline-flex;align-items:center;gap:5px;height:25px;padding:0 9px;font-size:.7rem;font-weight:500;color:#334155;background:#fff;border:1px solid #cbd5e1;border-radius:5px;cursor:pointer;transition:all .15s ease;box-sizing:border-box;white-space:nowrap;font-family:inherit;line-height:1}.rpt-id-action-btn:hover:not(:disabled){background:#f1f5f9;color:#0f172a;border-color:#94a3b8;box-shadow:0 1px 2px #0f172a0d}.rpt-id-action-btn:active:not(:disabled){background:#e2e8f0}.rpt-id-action-btn:disabled{opacity:.5;cursor:not-allowed}.rpt-id-action-btn.is-checking{color:#2563eb;border-color:#93c5fd;background:#eff6ff}.rpt-id-status{display:inline-flex;align-items:center;gap:5px;font-size:.72rem;line-height:1.3;margin:4px 0 0;padding:3px 8px;border-radius:5px;transition:all .15s ease;width:fit-content;max-width:100%;box-sizing:border-box}.rpt-id-status:empty{display:none}.rpt-status-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.rpt-id-status-success{color:#15803d;background:#f0fdf4;border:1px solid #bbf7d0}.rpt-id-status-warning{color:#b45309;background:#fffbeb;border:1px solid #fef3c7}.rpt-id-status-error{color:#b91c1c;background:#fef2f2;border:1px solid #fecaca}.rpt-id-status-checking{color:#1d4ed8;background:#eff6ff;border:1px solid #dbeafe}.rpt-update-overlay{position:absolute;inset:0;z-index:50;background:#0f172a73;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;animation:rptOverlayIn .16s cubic-bezier(.16,1,.3,1) forwards}.rpt-update-card{box-sizing:border-box;width:min(440px,100%);max-height:94%;background:#fff;border-radius:10px;box-shadow:0 20px 45px -8px #0f172a52,0 0 0 1px #0f172a14;border:1px solid #e2e8f0;overflow:hidden;display:flex;flex-direction:column;animation:rptCardIn .18s cubic-bezier(.16,1,.3,1) forwards}.rpt-update-card-header{display:flex;align-items:center;gap:12px;padding:12px 16px;background:#fffbeb;border-bottom:1px solid #fef3c7;flex-shrink:0}.rpt-update-icon-badge{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;background:#fef3c7;border:1px solid #fde68a;color:#b45309;flex-shrink:0}.rpt-update-header-info{flex:1;min-width:0}.rpt-update-title{margin:0;font-size:.925rem;font-weight:700;color:#92400e;line-height:1.25}.rpt-update-subtitle{font-size:.7rem;color:#b45309;margin-top:1px;display:block}.rpt-update-card-body{padding:14px 16px;display:flex;flex-direction:column;gap:11px;overflow-y:auto;box-sizing:border-box}.rpt-update-prompt{margin:0;font-size:.8rem;line-height:1.45;color:#334155}.rpt-conflict-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:7px;padding:9px 12px;display:flex;flex-direction:column;gap:7px}.rpt-conflict-row{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:.735rem}.rpt-conflict-label{color:#64748b;font-weight:500;flex-shrink:0}.rpt-conflict-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.72rem;background:#e2e8f0;color:#0f172a;padding:2px 6px;border-radius:4px;font-weight:600}.rpt-conflict-name{font-weight:600;color:#0f172a;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rpt-conflict-badge{font-size:.68rem;font-weight:600;padding:1px 7px;border-radius:9999px;background:#e0f2fe;color:#0369a1;border:1px solid #bae6fd}.rpt-overwrite-notice{display:flex;align-items:flex-start;gap:7px;font-size:.715rem;color:#b45309;background:#fffbeb;border:1px solid #fef3c7;padding:7px 10px;border-radius:6px;line-height:1.35}.rpt-overwrite-notice rpt-icon{flex-shrink:0;margin-top:1px}.rpt-update-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:10px 16px;background:#f8fafc;border-top:1px solid #e2e8f0;flex-shrink:0}.rpt-btn-confirm-save{background:linear-gradient(135deg,#2563eb,#1d4ed8);color:#fff;box-shadow:0 1px 2px #2563eb33}.rpt-btn-confirm-save:hover{background:linear-gradient(135deg,#1d4ed8,#1e40af);box-shadow:0 2px 4px #2563eb40}#rpt-dlg-id-error:empty,#rpt-dlg-id-status:empty{display:none}.rpt-dialog-footer,.rpt-footer-actions{flex-wrap:wrap;gap:8px}.rpt-btn,.rpt-dialog-close{min-height:36px}@media (max-width: 640px){.rpt-btn,.rpt-dialog-close{min-height:44px;min-width:44px}.rpt-footer-left{width:100%}}.rpt-field-error{color:#b91c1c;font-size:.8rem;margin:4px 0}button:disabled{opacity:.6;cursor:wait}textarea.rpt-input{resize:vertical;min-height:56px}.rpt-footer-left{min-width:0;padding-right:12px}:host{display:flex;width:100%;min-width:0;min-height:0;max-height:inherit;align-items:center;justify-content:center;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);color:#0f172a;box-sizing:border-box}.rpt-dialog-shell{position:relative;display:flex;flex-direction:column;width:100%;max-width:100%;min-height:0;max-height:min(540px,calc(100vh - 32px));max-height:min(540px,calc(100dvh - 32px));background:#fff;border-radius:10px;box-shadow:0 20px 40px -12px #0f172a47,0 0 0 1px #0f172a14;overflow:hidden;box-sizing:border-box;animation:rptDialogIn .18s cubic-bezier(.16,1,.3,1) forwards}@keyframes rptDialogIn{0%{opacity:0;transform:scale(.97) translateY(4px)}to{opacity:1;transform:scale(1) translateY(0)}}.rpt-dialog-header{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:1px solid #e2e8f0;background:#f8fafc;flex-shrink:0;box-sizing:border-box}.rpt-header-left{display:flex;align-items:center;gap:10px}.rpt-review-icon-badge{display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:#dbeafe;border:1px solid #a7f3d0;color:#1d4ed8;flex-shrink:0}.rpt-dialog-title{margin:0;font-size:.925rem;font-weight:700;color:#0f172a;line-height:1.25}.rpt-dialog-subtitle{margin:1px 0 0;font-size:.725rem;color:#64748b;line-height:1.2}.rpt-dialog-close{background:transparent;border:none;color:#94a3b8;cursor:pointer;padding:4px;border-radius:5px;display:flex;align-items:center;justify-content:center;transition:all .12s ease}.rpt-dialog-close:hover{background:#e2e8f0;color:#0f172a}.rpt-dialog-body{display:grid;grid-template-columns:280px minmax(0,1fr);grid-template-rows:minmax(0,1fr);flex:1;min-height:0;min-width:0;overflow:hidden;box-sizing:border-box}@media (max-width: 780px){.rpt-dialog-body{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;overflow-y:auto;overscroll-behavior:contain}}.rpt-settings-column{display:flex;flex-direction:column;gap:9px;padding:12px 14px;background:#f8fafc;border-right:1px solid #e2e8f0;overflow-y:auto;min-height:0;overscroll-behavior:contain;box-sizing:border-box}.rpt-section-header{font-size:.675rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#475569;margin-bottom:1px}.rpt-form-group{display:flex;flex-direction:column;gap:3px}.rpt-label{font-size:.725rem;font-weight:600;color:#334155}.rpt-input{width:100%;box-sizing:border-box;height:28px;padding:4px 8px;font-size:.775rem;border:1px solid #cbd5e1;border-radius:5px;background:#fff;color:#0f172a;outline:none;transition:all .12s ease}.rpt-input:focus{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb24}.rpt-slug-input-wrapper{display:flex;align-items:center;background:#fff;border:1px solid #cbd5e1;border-radius:5px;height:28px;overflow:hidden;box-sizing:border-box;transition:all .12s ease}.rpt-slug-input-wrapper:focus-within{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb24}.rpt-slug-prefix{padding:0 0 0 8px;font-size:.725rem;color:#64748b;background:transparent;-webkit-user-select:none;user-select:none;line-height:28px}.rpt-slug-field{border:none!important;padding-left:2px!important;box-shadow:none!important;height:100%!important}.rpt-help-text{font-size:.65rem;color:#64748b;line-height:1.2}.rpt-publish-card{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 10px;background:#fff;border:1px solid #e2e8f0;border-radius:6px;box-sizing:border-box}.rpt-publish-text{display:flex;flex-direction:column;gap:1px}.rpt-publish-title{font-size:.75rem;font-weight:600;color:#0f172a}.rpt-publish-desc{font-size:.65rem;color:#64748b;line-height:1.2}.rpt-switch{position:relative;display:inline-block;width:32px;height:18px;flex-shrink:0}.rpt-switch input{opacity:0;width:0;height:0}.rpt-slider{position:absolute;cursor:pointer;inset:0;background-color:#cbd5e1;transition:.18s;border-radius:9999px}.rpt-slider:before{position:absolute;content:\"\";height:14px;width:14px;left:2px;bottom:2px;background-color:#fff;transition:.18s;border-radius:50%}input:checked+.rpt-slider{background-color:#2563eb}input:checked+.rpt-slider:before{transform:translate(14px)}.rpt-share-card{padding:6px 9px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:6px;box-sizing:border-box}.rpt-share-url-row{display:flex;align-items:center;gap:6px;overflow:hidden}.rpt-share-label{font-size:.675rem;font-weight:600;color:#1e40af;flex-shrink:0}.rpt-share-code{flex:1;font-size:.6875rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;color:#1e3a8a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rpt-btn-copy{display:inline-flex;align-items:center;gap:3px;padding:2px 6px;background:#fff;border:1px solid #93c5fd;border-radius:4px;font-size:.65rem;font-weight:600;color:#2563eb;cursor:pointer;flex-shrink:0;transition:all .12s ease;height:20px}.rpt-btn-copy:hover{background:#dbeafe}.rpt-preview-column{display:flex;flex-direction:column;background:#fff;overflow:hidden;min-width:0;box-sizing:border-box}.rpt-preview-header{display:flex;align-items:center;justify-content:space-between;padding:8px 14px;border-bottom:1px solid #e2e8f0;background:#fff;flex-shrink:0;box-sizing:border-box}.rpt-preview-badge{display:flex;align-items:center;gap:6px;font-size:.725rem;font-weight:600;color:#0f172a}.rpt-live-dot{width:6px;height:6px;border-radius:50%;background:#10b981;box-shadow:0 0 0 2px #10b98133}.rpt-preview-hint{font-size:.675rem;color:#64748b}.rpt-preview-runtime-wrapper{flex:1;min-height:0;overscroll-behavior:contain;overflow-y:auto;overflow-x:hidden;padding:10px 12px;background:#f8fafc;box-sizing:border-box}.rpt-preview-runtime-wrapper::-webkit-scrollbar,.rpt-settings-column::-webkit-scrollbar{width:5px}.rpt-preview-runtime-wrapper::-webkit-scrollbar-thumb,.rpt-settings-column::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:9999px}.rpt-preview-runtime-wrapper::-webkit-scrollbar-thumb:hover,.rpt-settings-column::-webkit-scrollbar-thumb:hover{background:#94a3b8}.rpt-preview-card-frame{background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 1px 3px #0f172a0a;padding:10px;min-height:100%;box-sizing:border-box;overflow-x:hidden}@media (max-width: 780px){.rpt-settings-column{overflow-y:visible}.rpt-preview-runtime-wrapper{flex:none;max-height:320px}.rpt-preview-hint{display:none}}.rpt-dialog-footer{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;padding:8px 16px;background:#f8fafc;border-top:1px solid #e2e8f0;flex-shrink:0;box-sizing:border-box}.rpt-saved-pill{display:inline-flex;align-items:center;gap:4px;font-size:.7rem;font-weight:600;color:#15803d;background:#dcfce7;padding:2px 7px;border-radius:9999px}.rpt-footer-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-left:auto}.rpt-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 13px;font-size:.75rem;font-weight:600;border-radius:6px;cursor:pointer;transition:all .12s ease;border:1px solid transparent;box-sizing:border-box;line-height:1.4}.rpt-btn-secondary{background:#fff;border-color:#cbd5e1;color:#334155}.rpt-btn-secondary:hover{background:#f1f5f9;color:#0f172a;border-color:#94a3b8}.rpt-btn-primary{background:linear-gradient(135deg,#2563eb,#1d4ed8);color:#fff;box-shadow:0 1px 2px #2563eb33}.rpt-btn-primary:hover{background:linear-gradient(135deg,#1d4ed8,#1e40af);box-shadow:0 2px 4px #2563eb40}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "component", type: ReportRuntimeComponent, selector: "rpt-report-runtime, rpt-runtime", inputs: ["reportId", "report", "resultData"], outputs: ["resetRequested", "execute", "executed", "exportRequested", "printRequested", "customActionTriggered", "gridStateChange", "columnDefsChange", "selectionChange", "selectionChanged", "rowActionTriggered", "drilldownRequested"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12703
|
+
`, isInline: true, styles: ["@keyframes rptSpin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.rpt-spin{display:inline-block;animation:rptSpin 1s linear infinite}@keyframes rptOverlayIn{0%{opacity:0}to{opacity:1}}@keyframes rptCardIn{0%{opacity:0;transform:scale(.96) translateY(6px)}to{opacity:1;transform:scale(1) translateY(0)}}.rpt-id-actions{display:flex;align-items:center;gap:6px;margin-top:4px}.rpt-id-action-btn{display:inline-flex;align-items:center;gap:5px;height:25px;padding:0 9px;font-size:.7rem;font-weight:500;color:#334155;background:#fff;border:1px solid #cbd5e1;border-radius:5px;cursor:pointer;transition:all .15s ease;box-sizing:border-box;white-space:nowrap;font-family:inherit;line-height:1}.rpt-id-action-btn:hover:not(:disabled){background:#f1f5f9;color:#0f172a;border-color:#94a3b8;box-shadow:0 1px 2px #0f172a0d}.rpt-id-action-btn:active:not(:disabled){background:#e2e8f0}.rpt-id-action-btn:disabled{opacity:.5;cursor:not-allowed}.rpt-id-action-btn.is-checking{color:#2563eb;border-color:#93c5fd;background:#eff6ff}.rpt-id-status{display:inline-flex;align-items:center;gap:5px;font-size:.72rem;line-height:1.3;margin:4px 0 0;padding:3px 8px;border-radius:5px;transition:all .15s ease;width:fit-content;max-width:100%;box-sizing:border-box}.rpt-id-status:empty{display:none}.rpt-status-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.rpt-id-status-success{color:#15803d;background:#f0fdf4;border:1px solid #bbf7d0}.rpt-id-status-warning{color:#b45309;background:#fffbeb;border:1px solid #fef3c7}.rpt-id-status-error{color:#b91c1c;background:#fef2f2;border:1px solid #fecaca}.rpt-id-status-checking{color:#1d4ed8;background:#eff6ff;border:1px solid #dbeafe}.rpt-update-overlay{position:absolute;inset:0;z-index:50;background:#0f172a73;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;animation:rptOverlayIn .16s cubic-bezier(.16,1,.3,1) forwards}.rpt-update-card{box-sizing:border-box;width:min(440px,100%);max-height:94%;background:#fff;border-radius:10px;box-shadow:0 20px 45px -8px #0f172a52,0 0 0 1px #0f172a14;border:1px solid #e2e8f0;overflow:hidden;display:flex;flex-direction:column;animation:rptCardIn .18s cubic-bezier(.16,1,.3,1) forwards}.rpt-update-card-header{display:flex;align-items:center;gap:12px;padding:12px 16px;background:#fffbeb;border-bottom:1px solid #fef3c7;flex-shrink:0}.rpt-update-icon-badge{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;background:#fef3c7;border:1px solid #fde68a;color:#b45309;flex-shrink:0}.rpt-update-header-info{flex:1;min-width:0}.rpt-update-title{margin:0;font-size:.925rem;font-weight:700;color:#92400e;line-height:1.25}.rpt-update-subtitle{font-size:.7rem;color:#b45309;margin-top:1px;display:block}.rpt-update-card-body{padding:14px 16px;display:flex;flex-direction:column;gap:11px;overflow-y:auto;box-sizing:border-box}.rpt-update-prompt{margin:0;font-size:.8rem;line-height:1.45;color:#334155}.rpt-conflict-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:7px;padding:9px 12px;display:flex;flex-direction:column;gap:7px}.rpt-conflict-row{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:.735rem}.rpt-conflict-label{color:#64748b;font-weight:500;flex-shrink:0}.rpt-conflict-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.72rem;background:#e2e8f0;color:#0f172a;padding:2px 6px;border-radius:4px;font-weight:600}.rpt-conflict-name{font-weight:600;color:#0f172a;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rpt-conflict-badge{font-size:.68rem;font-weight:600;padding:1px 7px;border-radius:9999px;background:#e0f2fe;color:#0369a1;border:1px solid #bae6fd}.rpt-overwrite-notice{display:flex;align-items:flex-start;gap:7px;font-size:.715rem;color:#b45309;background:#fffbeb;border:1px solid #fef3c7;padding:7px 10px;border-radius:6px;line-height:1.35}.rpt-overwrite-notice rpt-icon{flex-shrink:0;margin-top:1px}.rpt-update-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:10px 16px;background:#f8fafc;border-top:1px solid #e2e8f0;flex-shrink:0}.rpt-btn-confirm-save{background:linear-gradient(135deg,#2563eb,#1d4ed8);color:#fff;box-shadow:0 1px 2px #2563eb33}.rpt-btn-confirm-save:hover{background:linear-gradient(135deg,#1d4ed8,#1e40af);box-shadow:0 2px 4px #2563eb40}#rpt-dlg-id-error:empty,#rpt-dlg-id-status:empty{display:none}.rpt-dialog-footer,.rpt-footer-actions{flex-wrap:wrap;gap:8px}.rpt-btn,.rpt-dialog-close{min-height:36px}@media (max-width: 640px){.rpt-btn,.rpt-dialog-close{min-height:44px;min-width:44px}.rpt-footer-left{width:100%}}.rpt-field-error{color:#b91c1c;font-size:.8rem;margin:4px 0}button:disabled{opacity:.6;cursor:wait}textarea.rpt-input{resize:vertical;min-height:56px}.rpt-footer-left{min-width:0;padding-right:12px}:host{display:flex;width:100%;min-width:0;min-height:0;max-height:inherit;align-items:center;justify-content:center;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);color:#0f172a;box-sizing:border-box}.rpt-dialog-shell{position:relative;display:flex;flex-direction:column;width:100%;max-width:100%;min-height:0;max-height:min(540px,calc(100vh - 32px));max-height:min(540px,calc(100dvh - 32px));background:#fff;border-radius:10px;box-shadow:0 20px 40px -12px #0f172a47,0 0 0 1px #0f172a14;overflow:hidden;box-sizing:border-box;animation:rptDialogIn .18s cubic-bezier(.16,1,.3,1) forwards}@keyframes rptDialogIn{0%{opacity:0;transform:scale(.97) translateY(4px)}to{opacity:1;transform:scale(1) translateY(0)}}.rpt-dialog-header{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:1px solid #e2e8f0;background:#f8fafc;flex-shrink:0;box-sizing:border-box}.rpt-header-left{display:flex;align-items:center;gap:10px}.rpt-review-icon-badge{display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:#dbeafe;border:1px solid #a7f3d0;color:#1d4ed8;flex-shrink:0}.rpt-dialog-title{margin:0;font-size:.925rem;font-weight:700;color:#0f172a;line-height:1.25}.rpt-dialog-subtitle{margin:1px 0 0;font-size:.725rem;color:#64748b;line-height:1.2}.rpt-dialog-close{background:transparent;border:none;color:#94a3b8;cursor:pointer;padding:4px;border-radius:5px;display:flex;align-items:center;justify-content:center;transition:all .12s ease}.rpt-dialog-close:hover{background:#e2e8f0;color:#0f172a}.rpt-dialog-body{display:grid;grid-template-columns:280px minmax(0,1fr);grid-template-rows:minmax(0,1fr);flex:1;min-height:0;min-width:0;overflow:hidden;box-sizing:border-box}@media (max-width: 780px){.rpt-dialog-body{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;overflow-y:auto;overscroll-behavior:contain}}.rpt-settings-column{display:flex;flex-direction:column;gap:9px;padding:12px 14px;background:#f8fafc;border-right:1px solid #e2e8f0;overflow-y:auto;min-height:0;overscroll-behavior:contain;box-sizing:border-box}.rpt-section-header{font-size:.675rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#475569;margin-bottom:1px}.rpt-form-group{display:flex;flex-direction:column;gap:3px}.rpt-label{font-size:.725rem;font-weight:600;color:#334155}.rpt-input{width:100%;box-sizing:border-box;height:28px;padding:4px 8px;font-size:.775rem;border:1px solid #cbd5e1;border-radius:5px;background:#fff;color:#0f172a;outline:none;transition:all .12s ease}.rpt-input:focus{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb24}.rpt-slug-input-wrapper{display:flex;align-items:center;background:#fff;border:1px solid #cbd5e1;border-radius:5px;height:28px;overflow:hidden;box-sizing:border-box;transition:all .12s ease}.rpt-slug-input-wrapper:focus-within{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb24}.rpt-slug-prefix{padding:0 0 0 8px;font-size:.725rem;color:#64748b;background:transparent;-webkit-user-select:none;user-select:none;line-height:28px}.rpt-slug-field{border:none!important;padding-left:2px!important;box-shadow:none!important;height:100%!important}.rpt-help-text{font-size:.65rem;color:#64748b;line-height:1.2}.rpt-publish-card{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 10px;background:#fff;border:1px solid #e2e8f0;border-radius:6px;box-sizing:border-box}.rpt-publish-text{display:flex;flex-direction:column;gap:1px}.rpt-publish-title{font-size:.75rem;font-weight:600;color:#0f172a}.rpt-publish-desc{font-size:.65rem;color:#64748b;line-height:1.2}.rpt-switch{position:relative;display:inline-block;width:32px;height:18px;flex-shrink:0}.rpt-switch input{opacity:0;width:0;height:0}.rpt-slider{position:absolute;cursor:pointer;inset:0;background-color:#cbd5e1;transition:.18s;border-radius:9999px}.rpt-slider:before{position:absolute;content:\"\";height:14px;width:14px;left:2px;bottom:2px;background-color:#fff;transition:.18s;border-radius:50%}input:checked+.rpt-slider{background-color:#2563eb}input:checked+.rpt-slider:before{transform:translate(14px)}.rpt-share-card{padding:6px 9px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:6px;box-sizing:border-box}.rpt-share-url-row{display:flex;align-items:center;gap:6px;overflow:hidden}.rpt-share-label{font-size:.675rem;font-weight:600;color:#1e40af;flex-shrink:0}.rpt-share-code{flex:1;font-size:.6875rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;color:#1e3a8a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rpt-btn-copy{display:inline-flex;align-items:center;gap:3px;padding:2px 6px;background:#fff;border:1px solid #93c5fd;border-radius:4px;font-size:.65rem;font-weight:600;color:#2563eb;cursor:pointer;flex-shrink:0;transition:all .12s ease;height:20px}.rpt-btn-copy:hover{background:#dbeafe}.rpt-preview-column{display:flex;flex-direction:column;background:#fff;overflow:hidden;min-width:0;box-sizing:border-box}.rpt-preview-header{display:flex;align-items:center;justify-content:space-between;padding:8px 14px;border-bottom:1px solid #e2e8f0;background:#fff;flex-shrink:0;box-sizing:border-box}.rpt-preview-badge{display:flex;align-items:center;gap:6px;font-size:.725rem;font-weight:600;color:#0f172a}.rpt-live-dot{width:6px;height:6px;border-radius:50%;background:#10b981;box-shadow:0 0 0 2px #10b98133}.rpt-preview-hint{font-size:.675rem;color:#64748b}.rpt-preview-runtime-wrapper{flex:1;min-height:0;overscroll-behavior:contain;overflow-y:auto;overflow-x:hidden;padding:10px 12px;background:#f8fafc;box-sizing:border-box}.rpt-preview-runtime-wrapper::-webkit-scrollbar,.rpt-settings-column::-webkit-scrollbar{width:5px}.rpt-preview-runtime-wrapper::-webkit-scrollbar-thumb,.rpt-settings-column::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:9999px}.rpt-preview-runtime-wrapper::-webkit-scrollbar-thumb:hover,.rpt-settings-column::-webkit-scrollbar-thumb:hover{background:#94a3b8}.rpt-preview-card-frame{background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 1px 3px #0f172a0a;padding:10px;min-height:100%;box-sizing:border-box;overflow-x:hidden}@media (max-width: 780px){.rpt-settings-column{overflow-y:visible}.rpt-preview-runtime-wrapper{flex:none;max-height:320px}.rpt-preview-hint{display:none}}.rpt-dialog-footer{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;padding:8px 16px;background:#f8fafc;border-top:1px solid #e2e8f0;flex-shrink:0;box-sizing:border-box}.rpt-saved-pill{display:inline-flex;align-items:center;gap:4px;font-size:.7rem;font-weight:600;color:#15803d;background:#dcfce7;padding:2px 7px;border-radius:9999px}.rpt-footer-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-left:auto}.rpt-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 13px;font-size:.75rem;font-weight:600;border-radius:6px;cursor:pointer;transition:all .12s ease;border:1px solid transparent;box-sizing:border-box;line-height:1.4}.rpt-btn-secondary{background:#fff;border-color:#cbd5e1;color:#334155}.rpt-btn-secondary:hover{background:#f1f5f9;color:#0f172a;border-color:#94a3b8}.rpt-btn-primary{background:linear-gradient(135deg,#2563eb,#1d4ed8);color:#fff;box-shadow:0 1px 2px #2563eb33}.rpt-btn-primary:hover{background:linear-gradient(135deg,#1d4ed8,#1e40af);box-shadow:0 2px 4px #2563eb40}\n"], dependencies: [{ kind: "component", type: ReportMenuSelectorComponent, selector: "rpt-report-menu-selector", inputs: ["config", "value", "disabled"], outputs: ["selectionChange", "validityChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "component", type: ReportRuntimeComponent, selector: "rpt-report-runtime, rpt-runtime", inputs: ["reportId", "report", "resultData"], outputs: ["resetRequested", "execute", "executed", "exportRequested", "printRequested", "customActionTriggered", "gridStateChange", "columnDefsChange", "selectionChange", "selectionChanged", "rowActionTriggered", "drilldownRequested"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12334
12704
|
}
|
|
12335
12705
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ReportSavedDialogComponent, decorators: [{
|
|
12336
12706
|
type: Component,
|
|
12337
|
-
args: [{ selector: 'rpt-report-saved-dialog', standalone: true, imports: [CommonModule, FormsModule, A11yModule, CdkScrollable, ReportRuntimeComponent, RptIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
12707
|
+
args: [{ selector: 'rpt-report-saved-dialog', standalone: true, imports: [ReportMenuSelectorComponent, CommonModule, FormsModule, A11yModule, CdkScrollable, ReportRuntimeComponent, RptIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
12338
12708
|
<div class="rpt-dialog-shell" [attr.aria-busy]="isSaving() || isCheckingId()">
|
|
12339
12709
|
<!-- Review before the only persistence request -->
|
|
12340
12710
|
<div class="rpt-dialog-header" [attr.inert]="updateConfirmation() ? '' : null">
|
|
@@ -12483,6 +12853,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
12483
12853
|
[ngModelOptions]="{standalone: true}" [disabled]="isSaving()" />
|
|
12484
12854
|
</div>
|
|
12485
12855
|
|
|
12856
|
+
@if (menuConfig(); as menu) {
|
|
12857
|
+
<div class="rpt-form-group">
|
|
12858
|
+
<span class="rpt-label">Menu destination{{ menu.required ? ' *' : '' }}</span>
|
|
12859
|
+
<rpt-report-menu-selector [config]="menu" [value]="menuSelection()"
|
|
12860
|
+
[disabled]="isSaving() || isCheckingId() || !!updateConfirmation()"
|
|
12861
|
+
(selectionChange)="menuSelection.set($event)" (validityChange)="menuValid.set($event)" />
|
|
12862
|
+
<span class="rpt-help-text">Select the destination for review. Menu storage and route activation are managed by your application.</span>
|
|
12863
|
+
@if (attempted() && !menuValid()) { <p class="rpt-field-error" role="alert">Choose an available menu destination{{ menu.required ? '.' : ' or clear the selection.' }}</p> }
|
|
12864
|
+
</div>
|
|
12865
|
+
}
|
|
12866
|
+
|
|
12486
12867
|
<!-- Menu Group -->
|
|
12487
12868
|
<div class="rpt-form-group">
|
|
12488
12869
|
<label class="rpt-label" for="rpt-dlg-group">Menu Group</label>
|
|
@@ -18620,6 +19001,9 @@ class DesignerComponent {
|
|
|
18620
19001
|
definition = input(undefined, { alias: 'initialReport' });
|
|
18621
19002
|
/** Emitted when the user saves the report */
|
|
18622
19003
|
reportSaved = output({ alias: 'save' });
|
|
19004
|
+
/** Review-only menu selection, independently supplied and returned by the host. */
|
|
19005
|
+
menuSelection = input(null);
|
|
19006
|
+
menuSelectionChange = output();
|
|
18623
19007
|
/** Emitted whenever the report definition changes in the visual designer */
|
|
18624
19008
|
definitionChanged = output({ alias: 'definitionChange' });
|
|
18625
19009
|
currentDefinition = this.designerState.definition;
|
|
@@ -18796,7 +19180,7 @@ class DesignerComponent {
|
|
|
18796
19180
|
const routeBase = this.reportingConfig?.routeBase || 'reports';
|
|
18797
19181
|
const dialogRef = this.dialog.open(ReportSavedDialogComponent, {
|
|
18798
19182
|
injector: this.injector,
|
|
18799
|
-
data: { report: this.currentDefinition(), routeBase },
|
|
19183
|
+
data: { report: this.currentDefinition(), routeBase, menuSelection: this.menuSelection() },
|
|
18800
19184
|
width: 'min(860px, calc(100vw - 32px))', maxWidth: '860px', maxHeight: 'calc(100dvh - 32px)',
|
|
18801
19185
|
panelClass: 'rpt-dialog-panel', backdropClass: 'rpt-dialog-backdrop', disableClose: false,
|
|
18802
19186
|
ariaLabelledBy: 'dialog-title', autoFocus: '#rpt-dlg-id',
|
|
@@ -18810,6 +19194,8 @@ class DesignerComponent {
|
|
|
18810
19194
|
return;
|
|
18811
19195
|
this.designerState.updateReportSettings(result.report);
|
|
18812
19196
|
this.designerState.markSaved();
|
|
19197
|
+
if (result.menuSelection !== undefined)
|
|
19198
|
+
this.menuSelectionChange.emit(result.menuSelection);
|
|
18813
19199
|
this.reportSaved.emit(result.report);
|
|
18814
19200
|
this.showToast('Report saved successfully');
|
|
18815
19201
|
if (result.action === 'open_live_page') {
|
|
@@ -18924,7 +19310,7 @@ class DesignerComponent {
|
|
|
18924
19310
|
setTimeout(() => this.saveMessage.set(null), 3000);
|
|
18925
19311
|
}
|
|
18926
19312
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18927
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DesignerComponent, isStandalone: true, selector: "rpt-designer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: false, transformFunction: null }, apiUrl: { classPropertyName: "apiUrl", publicName: "apiUrl", isSignal: false, isRequired: false, transformFunction: null }, reportId: { classPropertyName: "reportId", publicName: "reportId", isSignal: true, isRequired: false, transformFunction: null }, loadSavedReportOnInit: { classPropertyName: "loadSavedReportOnInit", publicName: "loadSavedReportOnInit", isSignal: true, isRequired: false, transformFunction: null }, definition: { classPropertyName: "definition", publicName: "initialReport", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { reportSaved: "save", definitionChanged: "definitionChange" }, host: { listeners: { "window:resize": "onResize()", "window:keydown": "onKeyDown($event)" } }, providers: [DesignerFormContextService, DesignerStateService, ...DESIGNER_ENDPOINT_PROVIDERS], ngImport: i0, template: `
|
|
19313
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DesignerComponent, isStandalone: true, selector: "rpt-designer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: false, transformFunction: null }, apiUrl: { classPropertyName: "apiUrl", publicName: "apiUrl", isSignal: false, isRequired: false, transformFunction: null }, reportId: { classPropertyName: "reportId", publicName: "reportId", isSignal: true, isRequired: false, transformFunction: null }, loadSavedReportOnInit: { classPropertyName: "loadSavedReportOnInit", publicName: "loadSavedReportOnInit", isSignal: true, isRequired: false, transformFunction: null }, definition: { classPropertyName: "definition", publicName: "initialReport", isSignal: true, isRequired: false, transformFunction: null }, menuSelection: { classPropertyName: "menuSelection", publicName: "menuSelection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { reportSaved: "save", menuSelectionChange: "menuSelectionChange", definitionChanged: "definitionChange" }, host: { listeners: { "window:resize": "onResize()", "window:keydown": "onKeyDown($event)" } }, providers: [DesignerFormContextService, DesignerStateService, ...DESIGNER_ENDPOINT_PROVIDERS], ngImport: i0, template: `
|
|
18928
19314
|
<div class="designer-shell">
|
|
18929
19315
|
@if (loadError()) { <div role="alert">{{ loadError() }} <button type="button" (click)="retryLoad()">Retry</button></div> }
|
|
18930
19316
|
<!-- Top Actions Toolbar with Sidebar Controls -->
|
|
@@ -19388,6 +19774,8 @@ class RptReportDesignerComponent {
|
|
|
19388
19774
|
closeLabel = input('Back');
|
|
19389
19775
|
/** Emitted when user saves the report */
|
|
19390
19776
|
saved = output();
|
|
19777
|
+
menuSelection = input(null);
|
|
19778
|
+
menuSelectionChange = output();
|
|
19391
19779
|
/** Emitted when user clicks the close button */
|
|
19392
19780
|
closed = output();
|
|
19393
19781
|
/** Emitted whenever the designer definition changes */
|
|
@@ -19402,7 +19790,7 @@ class RptReportDesignerComponent {
|
|
|
19402
19790
|
this.closed.emit();
|
|
19403
19791
|
}
|
|
19404
19792
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptReportDesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19405
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptReportDesignerComponent, isStandalone: true, selector: "rpt-report-designer, rpt-designer-view", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, apiUrl: { classPropertyName: "apiUrl", publicName: "apiUrl", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, loadSavedReportOnInit: { classPropertyName: "loadSavedReportOnInit", publicName: "loadSavedReportOnInit", isSignal: true, isRequired: false, transformFunction: null }, report: { classPropertyName: "report", publicName: "report", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { saved: "saved", closed: "closed", definitionChange: "definitionChange" }, ngImport: i0, template: `
|
|
19793
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptReportDesignerComponent, isStandalone: true, selector: "rpt-report-designer, rpt-designer-view", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, apiUrl: { classPropertyName: "apiUrl", publicName: "apiUrl", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, loadSavedReportOnInit: { classPropertyName: "loadSavedReportOnInit", publicName: "loadSavedReportOnInit", isSignal: true, isRequired: false, transformFunction: null }, report: { classPropertyName: "report", publicName: "report", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, menuSelection: { classPropertyName: "menuSelection", publicName: "menuSelection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { saved: "saved", menuSelectionChange: "menuSelectionChange", closed: "closed", definitionChange: "definitionChange" }, ngImport: i0, template: `
|
|
19406
19794
|
<div class="rpt-designer-facade">
|
|
19407
19795
|
@if (showCloseButton()) {
|
|
19408
19796
|
<div class="rpt-facade-top-bar">
|
|
@@ -19425,12 +19813,14 @@ class RptReportDesignerComponent {
|
|
|
19425
19813
|
[reportId]="id()"
|
|
19426
19814
|
[loadSavedReportOnInit]="loadSavedReportOnInit()"
|
|
19427
19815
|
[initialReport]="report()"
|
|
19816
|
+
[menuSelection]="menuSelection()"
|
|
19817
|
+
(menuSelectionChange)="menuSelectionChange.emit($event)"
|
|
19428
19818
|
(save)="onSave($event)"
|
|
19429
19819
|
(definitionChange)="onDefinitionChange($event)"
|
|
19430
19820
|
/>
|
|
19431
19821
|
</div>
|
|
19432
19822
|
</div>
|
|
19433
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;width:100%;height:100%;box-sizing:border-box}.rpt-designer-facade{flex:1;min-height:0;display:flex;flex-direction:column;width:100%;height:100%;position:relative;background:#f8fafc;overflow:hidden}.rpt-facade-top-bar{flex-shrink:0;display:flex;align-items:center;padding:8px 16px;background:#fff;border-bottom:1px solid #e2e8f0;z-index:20}.rpt-btn-close{display:inline-flex;align-items:center;gap:6px;background:#f1f5f9;color:#334155;border:1px solid #cbd5e1;padding:6px 12px;border-radius:6px;font-size:.825rem;font-weight:500;cursor:pointer;transition:all .15s ease}.rpt-btn-close:hover{background:#e2e8f0;color:#0f172a}.rpt-designer-wrapper{flex:1;min-height:0;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DesignerComponent, selector: "rpt-designer", inputs: ["config", "apiUrl", "reportId", "loadSavedReportOnInit", "initialReport"], outputs: ["save", "definitionChange"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
19823
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;width:100%;height:100%;box-sizing:border-box}.rpt-designer-facade{flex:1;min-height:0;display:flex;flex-direction:column;width:100%;height:100%;position:relative;background:#f8fafc;overflow:hidden}.rpt-facade-top-bar{flex-shrink:0;display:flex;align-items:center;padding:8px 16px;background:#fff;border-bottom:1px solid #e2e8f0;z-index:20}.rpt-btn-close{display:inline-flex;align-items:center;gap:6px;background:#f1f5f9;color:#334155;border:1px solid #cbd5e1;padding:6px 12px;border-radius:6px;font-size:.825rem;font-weight:500;cursor:pointer;transition:all .15s ease}.rpt-btn-close:hover{background:#e2e8f0;color:#0f172a}.rpt-designer-wrapper{flex:1;min-height:0;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DesignerComponent, selector: "rpt-designer", inputs: ["config", "apiUrl", "reportId", "loadSavedReportOnInit", "initialReport", "menuSelection"], outputs: ["save", "menuSelectionChange", "definitionChange"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
19434
19824
|
}
|
|
19435
19825
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptReportDesignerComponent, decorators: [{
|
|
19436
19826
|
type: Component,
|
|
@@ -19457,6 +19847,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
19457
19847
|
[reportId]="id()"
|
|
19458
19848
|
[loadSavedReportOnInit]="loadSavedReportOnInit()"
|
|
19459
19849
|
[initialReport]="report()"
|
|
19850
|
+
[menuSelection]="menuSelection()"
|
|
19851
|
+
(menuSelectionChange)="menuSelectionChange.emit($event)"
|
|
19460
19852
|
(save)="onSave($event)"
|
|
19461
19853
|
(definitionChange)="onDefinitionChange($event)"
|
|
19462
19854
|
/>
|
|
@@ -19824,7 +20216,7 @@ class RoutedReportDesignerComponent {
|
|
|
19824
20216
|
/>
|
|
19825
20217
|
}
|
|
19826
20218
|
</div>
|
|
19827
|
-
`, isInline: true, styles: [":host{display:flex;flex:1;flex-direction:column;height:100%;min-height:0;min-width:0}.rpt-routed-designer-host{display:flex;flex-direction:column;height:100%;flex:1;min-height:0;box-sizing:border-box}.rpt-routed-designer-bar{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:6px 16px;background:var(--rpt-surface-bg, #ffffff);border-bottom:1px solid var(--rpt-border-color, #e2e8f0)}.rpt-saved-pill{display:inline-flex;align-items:center;gap:5px;font-size:.8125rem;color:#166534;background:#dcfce7;padding:3px 10px;border-radius:9999px;font-weight:500;animation:rptFadeInOut 2.5s ease-in-out forwards}@keyframes rptFadeInOut{0%{opacity:0;transform:translateY(-4px)}15%{opacity:1;transform:translateY(0)}85%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}.rpt-routed-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;height:300px;color:var(--rpt-text-muted, #64748b)}.rpt-spinner{width:36px;height:36px;border:3px solid var(--rpt-border-color, #e2e8f0);border-top-color:var(--rpt-primary, #2563eb);border-radius:50%;animation:rpt-spin .8s linear infinite;margin-bottom:12px}@keyframes rpt-spin{to{transform:rotate(360deg)}}.rpt-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:6px 12px;font-size:.8125rem;font-weight:500;border-radius:var(--rpt-radius-md, 6px);cursor:pointer;border:1px solid transparent;background:transparent;color:var(--rpt-text-muted, #64748b);transition:all .15s ease}.rpt-btn:hover{color:var(--rpt-text-color, #1e293b);background:var(--rpt-bg-subtle, #f1f5f9)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DesignerComponent, selector: "rpt-designer", inputs: ["config", "apiUrl", "reportId", "loadSavedReportOnInit", "initialReport"], outputs: ["save", "definitionChange"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
20219
|
+
`, isInline: true, styles: [":host{display:flex;flex:1;flex-direction:column;height:100%;min-height:0;min-width:0}.rpt-routed-designer-host{display:flex;flex-direction:column;height:100%;flex:1;min-height:0;box-sizing:border-box}.rpt-routed-designer-bar{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:6px 16px;background:var(--rpt-surface-bg, #ffffff);border-bottom:1px solid var(--rpt-border-color, #e2e8f0)}.rpt-saved-pill{display:inline-flex;align-items:center;gap:5px;font-size:.8125rem;color:#166534;background:#dcfce7;padding:3px 10px;border-radius:9999px;font-weight:500;animation:rptFadeInOut 2.5s ease-in-out forwards}@keyframes rptFadeInOut{0%{opacity:0;transform:translateY(-4px)}15%{opacity:1;transform:translateY(0)}85%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}.rpt-routed-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;height:300px;color:var(--rpt-text-muted, #64748b)}.rpt-spinner{width:36px;height:36px;border:3px solid var(--rpt-border-color, #e2e8f0);border-top-color:var(--rpt-primary, #2563eb);border-radius:50%;animation:rpt-spin .8s linear infinite;margin-bottom:12px}@keyframes rpt-spin{to{transform:rotate(360deg)}}.rpt-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:6px 12px;font-size:.8125rem;font-weight:500;border-radius:var(--rpt-radius-md, 6px);cursor:pointer;border:1px solid transparent;background:transparent;color:var(--rpt-text-muted, #64748b);transition:all .15s ease}.rpt-btn:hover{color:var(--rpt-text-color, #1e293b);background:var(--rpt-bg-subtle, #f1f5f9)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DesignerComponent, selector: "rpt-designer", inputs: ["config", "apiUrl", "reportId", "loadSavedReportOnInit", "initialReport", "menuSelection"], outputs: ["save", "menuSelectionChange", "definitionChange"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
19828
20220
|
}
|
|
19829
20221
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RoutedReportDesignerComponent, decorators: [{
|
|
19830
20222
|
type: Component,
|
|
@@ -20166,7 +20558,7 @@ class BwaysReportBuilderComponent {
|
|
|
20166
20558
|
}
|
|
20167
20559
|
</div>
|
|
20168
20560
|
</div>
|
|
20169
|
-
`, isInline: true, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif)}.rpt-builder-container{min-height:0;display:flex;flex-direction:column;position:relative;overflow:hidden;background:#f8fafc;box-sizing:border-box}.rpt-builder-header{display:flex;align-items:center;justify-content:space-between;padding:8px 16px;background:#fff;border-bottom:1px solid #e2e8f0;z-index:10;flex-shrink:0}.rpt-header-left{display:flex;align-items:center;gap:10px}.rpt-header-label{font-size:.8125rem;font-weight:600;color:#475569}.rpt-select-wrapper{position:relative;display:inline-flex;align-items:center}.rpt-report-select{appearance:none;-webkit-appearance:none;padding:5px 28px 5px 12px;font-size:.8125rem;font-weight:500;color:#0f172a;background:#f8fafc;border:1px solid #cbd5e1;border-radius:6px;outline:none;cursor:pointer;min-width:220px;transition:all .15s ease}.rpt-report-select:focus{background:#fff;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.rpt-select-arrow{position:absolute;right:10px;pointer-events:none;color:#64748b}.rpt-btn-new-report{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;background:#eff6ff;border:1px solid #bfdbfe;color:#2563eb;border-radius:6px;font-size:.8125rem;font-weight:600;cursor:pointer;transition:all .15s ease}.rpt-btn-new-report:hover{background:#dbeafe;border-color:#93c5fd}.rpt-header-right{display:flex;align-items:center;gap:12px}.rpt-save-status{display:inline-flex;align-items:center;gap:5px;font-size:.75rem;font-weight:600;color:#16a34a;background:#f0fdf4;padding:3px 8px;border-radius:9999px;border:1px solid #bbf7d0;animation:rpt-status-fade .2s ease}@keyframes rpt-status-fade{0%{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:translateY(0)}}.rpt-builder-designer-area{flex:1;min-height:0;width:100%;height:100%;overflow:hidden;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DesignerComponent, selector: "rpt-designer", inputs: ["config", "apiUrl", "reportId", "loadSavedReportOnInit", "initialReport"], outputs: ["save", "definitionChange"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
20561
|
+
`, isInline: true, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif)}.rpt-builder-container{min-height:0;display:flex;flex-direction:column;position:relative;overflow:hidden;background:#f8fafc;box-sizing:border-box}.rpt-builder-header{display:flex;align-items:center;justify-content:space-between;padding:8px 16px;background:#fff;border-bottom:1px solid #e2e8f0;z-index:10;flex-shrink:0}.rpt-header-left{display:flex;align-items:center;gap:10px}.rpt-header-label{font-size:.8125rem;font-weight:600;color:#475569}.rpt-select-wrapper{position:relative;display:inline-flex;align-items:center}.rpt-report-select{appearance:none;-webkit-appearance:none;padding:5px 28px 5px 12px;font-size:.8125rem;font-weight:500;color:#0f172a;background:#f8fafc;border:1px solid #cbd5e1;border-radius:6px;outline:none;cursor:pointer;min-width:220px;transition:all .15s ease}.rpt-report-select:focus{background:#fff;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.rpt-select-arrow{position:absolute;right:10px;pointer-events:none;color:#64748b}.rpt-btn-new-report{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;background:#eff6ff;border:1px solid #bfdbfe;color:#2563eb;border-radius:6px;font-size:.8125rem;font-weight:600;cursor:pointer;transition:all .15s ease}.rpt-btn-new-report:hover{background:#dbeafe;border-color:#93c5fd}.rpt-header-right{display:flex;align-items:center;gap:12px}.rpt-save-status{display:inline-flex;align-items:center;gap:5px;font-size:.75rem;font-weight:600;color:#16a34a;background:#f0fdf4;padding:3px 8px;border-radius:9999px;border:1px solid #bbf7d0;animation:rpt-status-fade .2s ease}@keyframes rpt-status-fade{0%{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:translateY(0)}}.rpt-builder-designer-area{flex:1;min-height:0;width:100%;height:100%;overflow:hidden;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DesignerComponent, selector: "rpt-designer", inputs: ["config", "apiUrl", "reportId", "loadSavedReportOnInit", "initialReport", "menuSelection"], outputs: ["save", "menuSelectionChange", "definitionChange"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
20170
20562
|
}
|
|
20171
20563
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BwaysReportBuilderComponent, decorators: [{
|
|
20172
20564
|
type: Component,
|
|
@@ -21111,6 +21503,7 @@ function provideBwaysReportFromSimpleConfig(config) {
|
|
|
21111
21503
|
allowedCategories: normalized.allowedCategories,
|
|
21112
21504
|
autoParameter: normalized.autoParameter,
|
|
21113
21505
|
routeBase: normalized.routeBase,
|
|
21506
|
+
menu: normalized.menu,
|
|
21114
21507
|
};
|
|
21115
21508
|
const providers = [
|
|
21116
21509
|
// Builtin component registration
|
|
@@ -21186,6 +21579,8 @@ function provideBwaysReportFromSimpleConfig(config) {
|
|
|
21186
21579
|
* Original advanced config path — unchanged behavior.
|
|
21187
21580
|
*/
|
|
21188
21581
|
function provideBwaysReportFromOptions(options, features) {
|
|
21582
|
+
if (options.menu != null)
|
|
21583
|
+
normalizeBwaysConfig({ menu: options.menu });
|
|
21189
21584
|
const config = { ...DEFAULT_CONFIG, ...options };
|
|
21190
21585
|
for (const feature of features) {
|
|
21191
21586
|
if (feature.ɵconfig) {
|