@mintplayer/ng-bootstrap 13.3.1 → 13.3.2

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.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Component, ContentChildren, NgModule, Input, Injectable, Pipe, EventEmitter, Output, Directive, HostBinding, InjectionToken, Inject, HostListener, Injector, ViewChild, Host, SkipSelf, forwardRef, PLATFORM_ID, ContentChild, ViewChildren, Optional, TemplateRef } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
- import { CommonModule, DOCUMENT } from '@angular/common';
4
+ import { CommonModule, DOCUMENT, isPlatformServer } from '@angular/common';
5
5
  import { SlideUpDownAnimation, FadeInOutAnimation, CarouselSlideAnimation, ColorTransitionAnimation } from '@mintplayer/ng-animations';
6
6
  import { Subject, BehaviorSubject, map, takeUntil, filter, take, Observable, combineLatest, debounceTime } from 'rxjs';
7
7
  import { map as map$1, takeUntil as takeUntil$1, take as take$1 } from 'rxjs/operators';
@@ -3130,31 +3130,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
3130
3130
  }] }]; } });
3131
3131
 
3132
3132
  class NavbarContentDirective {
3133
- constructor(element) {
3133
+ constructor(element, platformId) {
3134
3134
  this.element = element;
3135
+ this.platformId = platformId;
3135
3136
  this.initialPadding = 0;
3136
- this.resizeObserver = new ResizeObserver((entries) => {
3137
- let height = entries[0].contentRect.height;
3138
- this.element.nativeElement.style.paddingTop = (this.initialPadding + height) + 'px';
3139
- });
3137
+ if (!isPlatformServer(platformId)) {
3138
+ this.resizeObserver = new ResizeObserver((entries) => {
3139
+ const height = entries[0].contentRect.height;
3140
+ this.element.nativeElement.style.paddingTop = (this.initialPadding + height) + 'px';
3141
+ });
3142
+ }
3143
+ else {
3144
+ this.resizeObserver = null;
3145
+ }
3140
3146
  }
3141
3147
  ngAfterViewInit() {
3142
- let p = parseInt(this.element.nativeElement.style.paddingTop.replace(/px$/, ''));
3143
- this.initialPadding = isNaN(p) ? 0 : p;
3144
- this.resizeObserver.observe(this.navbar.nav.nativeElement);
3148
+ const pt = parseInt(this.element.nativeElement.style.paddingTop.replace(/px$/, ''));
3149
+ this.initialPadding = isNaN(pt) ? 0 : pt;
3150
+ if (this.resizeObserver) {
3151
+ this.resizeObserver.observe(this.navbar.nav.nativeElement);
3152
+ }
3145
3153
  }
3146
3154
  ngOnDestroy() {
3147
- this.resizeObserver.unobserve(this.navbar.nav.nativeElement);
3155
+ if (this.resizeObserver) {
3156
+ this.resizeObserver.unobserve(this.navbar.nav.nativeElement);
3157
+ }
3148
3158
  }
3149
3159
  }
3150
- NavbarContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: NavbarContentDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
3160
+ NavbarContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: NavbarContentDirective, deps: [{ token: i0.ElementRef }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Directive });
3151
3161
  NavbarContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: NavbarContentDirective, selector: "[navbarContent]", inputs: { navbar: ["navbarContent", "navbar"] }, ngImport: i0 });
3152
3162
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: NavbarContentDirective, decorators: [{
3153
3163
  type: Directive,
3154
3164
  args: [{
3155
3165
  selector: '[navbarContent]'
3156
3166
  }]
3157
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { navbar: [{
3167
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
3168
+ type: Inject,
3169
+ args: [PLATFORM_ID]
3170
+ }] }]; }, propDecorators: { navbar: [{
3158
3171
  type: Input,
3159
3172
  args: ['navbarContent']
3160
3173
  }] } });