@mintplayer/ng-bootstrap 13.1.17 → 13.1.21

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.
@@ -2376,7 +2376,9 @@ class BsNavbarNavComponent {
2376
2376
  //#endregion
2377
2377
  onWindowResize() {
2378
2378
  this.isResizing$.next(true);
2379
- this.windowWidth$.next(window.innerWidth);
2379
+ if (typeof window !== 'undefined') {
2380
+ this.windowWidth$.next(window.innerWidth);
2381
+ }
2380
2382
  }
2381
2383
  }
2382
2384
  BsNavbarNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarNavComponent, deps: [{ token: BsNavbarComponent }], target: i0.ɵɵFactoryTarget.Component });
@@ -2874,7 +2876,7 @@ class BsScrollspyComponent {
2874
2876
  }
2875
2877
  }
2876
2878
  scrollToCurrentInSpy() {
2877
- if (window && (window.innerWidth >= 768)) {
2879
+ if ((typeof window !== 'undefined') && (window.innerWidth >= 768)) {
2878
2880
  if (this.activeDirective) {
2879
2881
  const index = this.directives.toArray().findIndex((v, i) => v === this.activeDirective);
2880
2882
  const anchor = this.anchors.get(index);
@@ -2885,10 +2887,12 @@ class BsScrollspyComponent {
2885
2887
  }
2886
2888
  }
2887
2889
  scrollToHeader(directive) {
2888
- const header = directive.element.nativeElement;
2889
- const offsetY = this.scrollOffsetService.getScrollOffset()[1];
2890
- const y = header.getBoundingClientRect().top + window.scrollY - offsetY + 1;
2891
- window.scrollTo({ top: y, behavior: 'smooth' });
2890
+ if (typeof window !== 'undefined') {
2891
+ const header = directive.element.nativeElement;
2892
+ const offsetY = this.scrollOffsetService.getScrollOffset()[1];
2893
+ const y = header.getBoundingClientRect().top + window.scrollY - offsetY + 1;
2894
+ window.scrollTo({ top: y, behavior: 'smooth' });
2895
+ }
2892
2896
  }
2893
2897
  }
2894
2898
  BsScrollspyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, deps: [{ token: BsScrollOffsetService }, { token: DOCUMENT }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
@@ -2997,7 +3001,9 @@ class BsSelect2Component {
2997
3001
  this.focus();
2998
3002
  }
2999
3003
  onResize() {
3000
- this.hostWidth$.next(this.itemsBox.nativeElement.offsetWidth);
3004
+ if (typeof window !== 'undefined') {
3005
+ this.hostWidth$.next(this.itemsBox.nativeElement.offsetWidth);
3006
+ }
3001
3007
  }
3002
3008
  focus() {
3003
3009
  this.searchBox.nativeElement.focus();
@@ -3441,7 +3447,9 @@ class BsTypeaheadComponent {
3441
3447
  this.textbox.nativeElement.focus();
3442
3448
  }
3443
3449
  onResize() {
3444
- this.hostWidth$.next(this.textbox.nativeElement.offsetWidth);
3450
+ if (typeof window !== 'undefined') {
3451
+ this.hostWidth$.next(this.textbox.nativeElement.offsetWidth);
3452
+ }
3445
3453
  }
3446
3454
  }
3447
3455
  BsTypeaheadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });