@dangl/angular-ava 1.5.2-beta0087 → 1.5.2-beta0090

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.
@@ -19,7 +19,7 @@ import * as i6 from '@angular/material/input';
19
19
  import { MatInputModule } from '@angular/material/input';
20
20
  import * as i4 from '@angular/material/tooltip';
21
21
  import { MatTooltipModule } from '@angular/material/tooltip';
22
- import { BehaviorSubject, map, distinctUntilChanged, ReplaySubject, of, Subject, takeUntil, combineLatestWith, take, switchMap, debounceTime, tap, filter, combineLatest, fromEvent } from 'rxjs';
22
+ import { BehaviorSubject, map, distinctUntilChanged, ReplaySubject, of, Subject, takeUntil, combineLatestWith, take, switchMap, debounceTime, tap, filter, combineLatest, startWith, pairwise, fromEvent } from 'rxjs';
23
23
  import * as i1 from '@angular/material/checkbox';
24
24
  import { MatCheckboxModule } from '@angular/material/checkbox';
25
25
  import * as i1$1 from '@angular/material/table';
@@ -39,12 +39,12 @@ var ModeViewType;
39
39
 
40
40
  // This file is automatically generated as part of the build process
41
41
  const version = {
42
- version: "1.5.2-beta0087",
43
- commitInfo: "Branch.develop.Sha.ccc8e6b84a5827563a4d760876abc6dd021ae00a",
44
- commitDate: "2026-04-26",
45
- commitHash: "ccc8e6b84a5827563a4d760876abc6dd021ae00a",
46
- informationalVersion: "1.5.2-beta.87+Branch.develop.Sha.ccc8e6b84a5827563a4d760876abc6dd021ae00a",
47
- buildDateUtc: new Date(Date.UTC(2026, 3, 26, 19, 4, 8))
42
+ version: "1.5.2-beta0090",
43
+ commitInfo: "Branch.develop.Sha.b71fb671fd137af437fcc84bd1ac47531dc4249a",
44
+ commitDate: "2026-04-27",
45
+ commitHash: "b71fb671fd137af437fcc84bd1ac47531dc4249a",
46
+ informationalVersion: "1.5.2-beta.90+Branch.develop.Sha.b71fb671fd137af437fcc84bd1ac47531dc4249a",
47
+ buildDateUtc: new Date(Date.UTC(2026, 3, 27, 14, 29, 37))
48
48
  };
49
49
 
50
50
  class TreeHoverTooltipService {
@@ -2388,6 +2388,11 @@ class AvaTreeComponent {
2388
2388
  * actually focussing them, e.g. for further processing.
2389
2389
  */
2390
2390
  this.selectedElementsChanged = output();
2391
+ /**
2392
+ * This is emitted in tree view mode when a top-level element's expansion state changes.
2393
+ * The event contains the element id and whether it is now expanded or collapsed.
2394
+ */
2395
+ this.topLevelExpansionChanged = output();
2391
2396
  this.avaTreeWrapper = viewChild.required('avaTreeWrapper');
2392
2397
  this.avaMainWrapper = viewChild.required('avaMainWrapper');
2393
2398
  this.avaTreeFilterInput = viewChild.required('avaTreeFilterInput');
@@ -2548,6 +2553,21 @@ class AvaTreeComponent {
2548
2553
  this.expandParentGroupService.setExpansionState(s);
2549
2554
  }
2550
2555
  });
2556
+ toObservable(this.expandParentGroupService.getExpansionState())
2557
+ .pipe(startWith({}), pairwise(), takeUntil(this.$destroy))
2558
+ .subscribe(([prev, curr]) => {
2559
+ if (this.modeview() !== ModeViewType.Tree) {
2560
+ return;
2561
+ }
2562
+ const topLevelIds = new Set((this.serviceSpecification()?.elements ?? []).map((e) => e.id));
2563
+ for (const id of topLevelIds) {
2564
+ const wasExpanded = !!prev[id];
2565
+ const isExpanded = !!curr[id];
2566
+ if (wasExpanded !== isExpanded) {
2567
+ this.topLevelExpansionChanged.emit({ elementId: id, isExpanded });
2568
+ }
2569
+ }
2570
+ });
2551
2571
  });
2552
2572
  }
2553
2573
  ngAfterViewInit() {
@@ -2676,6 +2696,18 @@ class AvaTreeComponent {
2676
2696
  });
2677
2697
  }
2678
2698
  }
2699
+ /**
2700
+ * Programmatically select an element in the tree from outside the component.
2701
+ * You can pass either an IElementDto instance or a string id.
2702
+ */
2703
+ selectElement(elementOrId) {
2704
+ if (typeof elementOrId === 'string') {
2705
+ this.selectElementById(elementOrId);
2706
+ }
2707
+ else {
2708
+ this.selectElementService.setClickElement(elementOrId);
2709
+ }
2710
+ }
2679
2711
  selectElementById(id) {
2680
2712
  this.flatElementsService.getOneElementById(id).subscribe((e) => {
2681
2713
  if (e) {
@@ -2684,7 +2716,7 @@ class AvaTreeComponent {
2684
2716
  });
2685
2717
  }
2686
2718
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AvaTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2687
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: AvaTreeComponent, isStandalone: true, selector: "ava-tree", inputs: { project: { classPropertyName: "project", publicName: "project", isSignal: true, isRequired: true, transformFunction: null }, expansionstate: { classPropertyName: "expansionstate", publicName: "expansionstate", isSignal: true, isRequired: false, transformFunction: null }, selectednodeid: { classPropertyName: "selectednodeid", publicName: "selectednodeid", isSignal: true, isRequired: false, transformFunction: null }, modeview: { classPropertyName: "modeview", publicName: "modeview", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectClick: "selectClick", selectDblClick: "selectDblClick", contextMenuEvent: "contextMenuEvent", selectedElementsChanged: "selectedElementsChanged" }, providers: [
2719
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: AvaTreeComponent, isStandalone: true, selector: "ava-tree", inputs: { project: { classPropertyName: "project", publicName: "project", isSignal: true, isRequired: true, transformFunction: null }, expansionstate: { classPropertyName: "expansionstate", publicName: "expansionstate", isSignal: true, isRequired: false, transformFunction: null }, selectednodeid: { classPropertyName: "selectednodeid", publicName: "selectednodeid", isSignal: true, isRequired: false, transformFunction: null }, modeview: { classPropertyName: "modeview", publicName: "modeview", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectClick: "selectClick", selectDblClick: "selectDblClick", contextMenuEvent: "contextMenuEvent", selectedElementsChanged: "selectedElementsChanged", topLevelExpansionChanged: "topLevelExpansionChanged" }, providers: [
2688
2720
  FlatElementsService,
2689
2721
  SelectElementService,
2690
2722
  TreeNodeSelectionService,
@@ -2726,7 +2758,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
2726
2758
  }], listStructureComponent: [{
2727
2759
  type: ViewChild,
2728
2760
  args: [ListStructureComponent]
2729
- }], project: [{ type: i0.Input, args: [{ isSignal: true, alias: "project", required: true }] }], expansionstate: [{ type: i0.Input, args: [{ isSignal: true, alias: "expansionstate", required: false }] }], selectednodeid: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectednodeid", required: false }] }], modeview: [{ type: i0.Input, args: [{ isSignal: true, alias: "modeview", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], selectClick: [{ type: i0.Output, args: ["selectClick"] }], selectDblClick: [{ type: i0.Output, args: ["selectDblClick"] }], contextMenuEvent: [{ type: i0.Output, args: ["contextMenuEvent"] }], selectedElementsChanged: [{ type: i0.Output, args: ["selectedElementsChanged"] }], avaTreeWrapper: [{ type: i0.ViewChild, args: ['avaTreeWrapper', { isSignal: true }] }], avaMainWrapper: [{ type: i0.ViewChild, args: ['avaMainWrapper', { isSignal: true }] }], avaTreeFilterInput: [{ type: i0.ViewChild, args: ['avaTreeFilterInput', { isSignal: true }] }] } });
2761
+ }], project: [{ type: i0.Input, args: [{ isSignal: true, alias: "project", required: true }] }], expansionstate: [{ type: i0.Input, args: [{ isSignal: true, alias: "expansionstate", required: false }] }], selectednodeid: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectednodeid", required: false }] }], modeview: [{ type: i0.Input, args: [{ isSignal: true, alias: "modeview", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], selectClick: [{ type: i0.Output, args: ["selectClick"] }], selectDblClick: [{ type: i0.Output, args: ["selectDblClick"] }], contextMenuEvent: [{ type: i0.Output, args: ["contextMenuEvent"] }], selectedElementsChanged: [{ type: i0.Output, args: ["selectedElementsChanged"] }], topLevelExpansionChanged: [{ type: i0.Output, args: ["topLevelExpansionChanged"] }], avaTreeWrapper: [{ type: i0.ViewChild, args: ['avaTreeWrapper', { isSignal: true }] }], avaMainWrapper: [{ type: i0.ViewChild, args: ['avaMainWrapper', { isSignal: true }] }], avaTreeFilterInput: [{ type: i0.ViewChild, args: ['avaTreeFilterInput', { isSignal: true }] }] } });
2730
2762
 
2731
2763
  const ALIGNMENT_OPTIONS = {
2732
2764
  previousInvoiceAlignment: 'right'