@leanix/components 0.3.62 → 0.3.63

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.
@@ -10,7 +10,7 @@ import { __decorate } from 'tslib';
10
10
  import { escape, trimEnd, sortBy, get, isEqual, toLower, some, padCharsStart, toString, toNumber, isNaN as isNaN$1, includes, last, findIndex, filter as filter$1, isObject, find, uniqueId } from 'lodash/fp';
11
11
  import * as i6 from 'rxjs';
12
12
  import { BehaviorSubject, timer, Subject, combineLatest, merge, concat, fromEvent, Observable, ReplaySubject, of } from 'rxjs';
13
- import { skipWhile, map, switchMap, startWith, pairwise, filter, take, debounceTime, skip, withLatestFrom, distinctUntilChanged, takeUntil, first, delay, mapTo, tap } from 'rxjs/operators';
13
+ import { skipWhile, map, switchMap, startWith, pairwise, filter, take, debounceTime, skip, withLatestFrom, distinctUntilChanged, takeUntil, delay, tap } from 'rxjs/operators';
14
14
  import * as i1$2 from '@ngx-translate/core';
15
15
  import { TranslatePipe, TranslateModule } from '@ngx-translate/core';
16
16
  import * as i1$3 from '@angular/platform-browser';
@@ -1965,15 +1965,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
1965
1965
  function executeOnNextTick(fn) {
1966
1966
  Promise.resolve(null).then(() => fn());
1967
1967
  }
1968
- /**
1969
- *
1970
- * Returns the first value emitted by an observable. Can be removed when we are able to use RxJS7.
1971
- * https://github.com/leanix/leanix-pathfinder-web/pull/5988/#discussion_r633645224
1972
- *
1973
- */
1974
- function firstValueFrom(observable) {
1975
- return observable.pipe(first()).toPromise();
1976
- }
1977
1968
  function getCssVariable(cssVariableName) {
1978
1969
  return getComputedStyle(document.documentElement).getPropertyValue(cssVariableName);
1979
1970
  }
@@ -2673,8 +2664,8 @@ class CdkOptionsSubDropdownComponent {
2673
2664
  showByMouse() {
2674
2665
  const mouseEnterTrigger$ = fromEvent(this.trigger.elementRef.nativeElement, 'mouseenter');
2675
2666
  const mouseLeaveTrigger$ = fromEvent(this.trigger.elementRef.nativeElement, 'mouseleave');
2676
- const showOnEnterMouse$ = mouseEnterTrigger$.pipe(mapTo(true));
2677
- const hideOnLeaveMouse$ = mouseLeaveTrigger$.pipe(mapTo(false));
2667
+ const showOnEnterMouse$ = mouseEnterTrigger$.pipe(map(() => true));
2668
+ const hideOnLeaveMouse$ = mouseLeaveTrigger$.pipe(map(() => false));
2678
2669
  // react to trigger mouse leave events, and mouse enter events in the sub-dropdown. We'll use a 300ms
2679
2670
  // debounce, so that while navigating from the trigger to the sub-dropdown, all the intermediate events
2680
2671
  // are ignored.
@@ -3676,11 +3667,11 @@ class InputComponent {
3676
3667
  this.ngControl = ngControl;
3677
3668
  this.error = false;
3678
3669
  this.disabled = false;
3679
- this.destory$ = new Subject();
3670
+ this.destroyed$ = new Subject();
3680
3671
  }
3681
3672
  ngOnInit() {
3682
3673
  if (this.ngControl) {
3683
- this.ngControl.statusChanges?.pipe(startWith(null), takeUntil(this.destory$)).subscribe(() => this.updateStatus());
3674
+ this.ngControl.statusChanges?.pipe(startWith(null), takeUntil(this.destroyed$)).subscribe(() => this.updateStatus());
3684
3675
  }
3685
3676
  }
3686
3677
  updateStatus() {
@@ -3688,7 +3679,7 @@ class InputComponent {
3688
3679
  this.disabled = !!this.ngControl?.disabled;
3689
3680
  }
3690
3681
  ngOnDestroy() {
3691
- this.destory$.next();
3682
+ this.destroyed$.next();
3692
3683
  }
3693
3684
  }
3694
3685
  InputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: InputComponent, deps: [{ token: i2$1.NgControl, optional: true }], target: i0.ɵɵFactoryTarget.Component });
@@ -4058,7 +4049,7 @@ class MultiSelectComponent extends BaseSelectDirective {
4058
4049
  if (cursorPosition <= -1 && keyCode === BACKSPACE) {
4059
4050
  return KeyboardSelectAction.EXECUTE;
4060
4051
  }
4061
- return undefined;
4052
+ return null;
4062
4053
  }
4063
4054
  get dropdownTmpl() {
4064
4055
  return this.explicitDropdown || this.implicitDropdown;
@@ -5087,7 +5078,7 @@ class SingleSelectComponent extends BaseSelectDirective {
5087
5078
  if (cursorPosition <= -1 && keyCode === BACKSPACE) {
5088
5079
  return KeyboardSelectAction.EXECUTE;
5089
5080
  }
5090
- return undefined;
5081
+ return null;
5091
5082
  }
5092
5083
  get selectedOptionTmpl() {
5093
5084
  return this.explicitSelectedOption || this.implicitSelectedOption;
@@ -6014,7 +6005,7 @@ class ModalComponent {
6014
6005
  }
6015
6006
  ngAfterViewInit() {
6016
6007
  if (this.open) {
6017
- timer()
6008
+ timer(0)
6018
6009
  .pipe(takeUntil(this.destroyed$))
6019
6010
  .subscribe(() => this.openModal());
6020
6011
  }