@quadrel-enterprise-ui/framework 21.12.16 → 21.12.17

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.
@@ -3,7 +3,7 @@ import { Directive, InjectionToken, inject, ElementRef, HostBinding, Input, View
3
3
  import { Dialog, DialogRef, DIALOG_DATA, DialogModule } from '@angular/cdk/dialog';
4
4
  import { quadrelIcons } from '@quadrel-enterprise-ui/icons';
5
5
  export { quadrelIconNames } from '@quadrel-enterprise-ui/icons';
6
- import { BehaviorSubject, pairwise, fromEvent, combineLatest, concat, map as map$1, Subject, throwError, of, ReplaySubject, merge, isObservable, NEVER, Observable, EMPTY, shareReplay, distinctUntilChanged as distinctUntilChanged$1, debounce, timer, switchMap as switchMap$1, asyncScheduler, Subscription, startWith as startWith$1, filter as filter$1, debounceTime as debounceTime$1, firstValueFrom, take as take$1, tap as tap$1, from, delay, defer, throwIfEmpty, EmptyError, queueScheduler, concatMap as concatMap$1, exhaustMap, takeUntil as takeUntil$1, finalize, forkJoin, delayWhen, combineLatestWith, withLatestFrom as withLatestFrom$1, async } from 'rxjs';
6
+ import { BehaviorSubject, pairwise, fromEvent, combineLatest, concat, map as map$1, Subject, throwError, of, ReplaySubject, merge, isObservable, NEVER, Observable, EMPTY, shareReplay, distinctUntilChanged as distinctUntilChanged$1, debounce, timer, switchMap as switchMap$1, asyncScheduler, Subscription, startWith as startWith$1, filter as filter$1, debounceTime as debounceTime$1, firstValueFrom, take as take$1, tap as tap$1, from, delay, defer, throwIfEmpty, EmptyError, finalize, queueScheduler, concatMap as concatMap$1, exhaustMap, takeUntil as takeUntil$1, forkJoin, delayWhen, combineLatestWith, withLatestFrom as withLatestFrom$1, async } from 'rxjs';
7
7
  import { map, startWith, take, debounceTime, filter, catchError, distinctUntilChanged, switchMap, concatMap, skip, throttleTime, tap, takeUntil, auditTime, withLatestFrom, first, observeOn, pairwise as pairwise$1, mergeMap } from 'rxjs/operators';
8
8
  import { v4 } from 'uuid';
9
9
  import * as i2 from '@ngx-translate/core';
@@ -30668,7 +30668,9 @@ class QdTreeRowExpanderService {
30668
30668
  destroyRef = inject(DestroyRef);
30669
30669
  init(treeId, rowService) {
30670
30670
  this.trees.set(treeId, { treeRows: [], rowService });
30671
- rowService.treeRow$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(tree => {
30671
+ rowService.treeRow$
30672
+ .pipe(finalize(() => this.forgetTree(treeId, rowService)), takeUntilDestroyed(this.destroyRef))
30673
+ .subscribe(tree => {
30672
30674
  if (tree)
30673
30675
  this.trees.get(treeId).treeRows = tree;
30674
30676
  });
@@ -30713,6 +30715,10 @@ class QdTreeRowExpanderService {
30713
30715
  });
30714
30716
  tree.rowService?.updateRows(JSON.parse(JSON.stringify(tree.treeRows)));
30715
30717
  }
30718
+ forgetTree(treeId, rowService) {
30719
+ if (this.trees.get(treeId)?.rowService === rowService)
30720
+ this.trees.delete(treeId);
30721
+ }
30716
30722
  expand(row) {
30717
30723
  if (!row || !row.nestedRows || !row.nestedRows.length)
30718
30724
  return;
@@ -30762,12 +30768,16 @@ const RESERVED_ROW_PROPERTIES = ['uid', 'nestedRows', 'expanded', 'full'];
30762
30768
  class QdTreeRowsService {
30763
30769
  groupService = inject(QdTreeGroupService);
30764
30770
  expanderService = inject(QdTreeRowExpanderService, { optional: true });
30771
+ _destroyRef = inject(DestroyRef);
30765
30772
  config;
30766
30773
  treeRowSubject = new BehaviorSubject(null);
30767
30774
  treeRow$ = this.treeRowSubject.asObservable();
30768
30775
  get groupColumn() {
30769
30776
  return this.groupService.groupColumn;
30770
30777
  }
30778
+ constructor() {
30779
+ this._destroyRef.onDestroy(() => this.treeRowSubject.complete());
30780
+ }
30771
30781
  initializeRows(data) {
30772
30782
  const rows = structuredClone(data);
30773
30783
  let treeRows = this.splitRowsByTree(rows);
@@ -30903,7 +30913,7 @@ class QdTreeRowsService {
30903
30913
  }
30904
30914
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTreeRowsService, decorators: [{
30905
30915
  type: Injectable
30906
- }] });
30916
+ }], ctorParameters: () => [] });
30907
30917
 
30908
30918
  class QdTreeRowActionsSecondaryMenuComponent {
30909
30919
  tableStoreService = inject(QdTableStoreService);