@mintplayer/ng-bootstrap 13.4.1 → 13.4.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.
- package/esm2020/index.mjs +2 -1
- package/esm2020/lib/components/navbar/navbar-toggler/navbar-toggler.component.mjs +2 -2
- package/esm2020/lib/components/offcanvas/components/offcanvas/offcanvas.component.mjs +16 -14
- package/esm2020/lib/components/offcanvas/components/offcanvas-host/offcanvas-host.component.mjs +15 -15
- package/esm2020/lib/components/offcanvas/directives/offcanvas-close/offcanvas-close.directive.mjs +2 -2
- package/esm2020/lib/types/index.mjs +2 -0
- package/esm2020/lib/types/view-state.type.mjs +2 -0
- package/fesm2015/mintplayer-ng-bootstrap.mjs +30 -28
- package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/fesm2020/mintplayer-ng-bootstrap.mjs +30 -28
- package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/components/navbar/navbar-toggler/navbar-toggler.component.d.ts +5 -4
- package/lib/components/offcanvas/components/offcanvas/offcanvas.component.d.ts +7 -5
- package/lib/components/offcanvas/components/offcanvas-host/offcanvas-host.component.d.ts +6 -5
- package/lib/types/index.d.ts +1 -0
- package/lib/types/view-state.type.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3711,13 +3711,13 @@ class BsOffcanvasComponent {
|
|
|
3711
3711
|
//#region Size
|
|
3712
3712
|
this.size$ = new BehaviorSubject(null);
|
|
3713
3713
|
//#endregion
|
|
3714
|
-
//#region
|
|
3715
|
-
this.
|
|
3716
|
-
this.
|
|
3714
|
+
//#region State
|
|
3715
|
+
this.state$ = new BehaviorSubject('closed');
|
|
3716
|
+
this.stateChange = new EventEmitter();
|
|
3717
3717
|
//#endregion
|
|
3718
3718
|
this.backdropClick = new EventEmitter();
|
|
3719
3719
|
this.contentTemplate = contentTemplate;
|
|
3720
|
-
this.visibility$ = this.
|
|
3720
|
+
this.visibility$ = this.state$
|
|
3721
3721
|
.pipe(delayWhen((val, i) => val ? of(0) : interval(300)))
|
|
3722
3722
|
.pipe(map((val) => val ? 'visible' : 'hidden'));
|
|
3723
3723
|
this.position$
|
|
@@ -3745,8 +3745,10 @@ class BsOffcanvasComponent {
|
|
|
3745
3745
|
return null;
|
|
3746
3746
|
}
|
|
3747
3747
|
}));
|
|
3748
|
-
this.showBackdrop$ = combineLatest([this.hasBackdrop$, this.
|
|
3749
|
-
.pipe(map(([hasBackdrop,
|
|
3748
|
+
this.showBackdrop$ = combineLatest([this.hasBackdrop$, this.state$])
|
|
3749
|
+
.pipe(map(([hasBackdrop, state]) => hasBackdrop && (state === 'open')));
|
|
3750
|
+
this.show$ = this.state$
|
|
3751
|
+
.pipe(map((state) => state === 'open'));
|
|
3750
3752
|
}
|
|
3751
3753
|
set position(value) {
|
|
3752
3754
|
this.position$.next(value);
|
|
@@ -3760,11 +3762,11 @@ class BsOffcanvasComponent {
|
|
|
3760
3762
|
get size() {
|
|
3761
3763
|
return this.size$.value;
|
|
3762
3764
|
}
|
|
3763
|
-
set
|
|
3764
|
-
this.
|
|
3765
|
+
set state(value) {
|
|
3766
|
+
this.state$.next(value);
|
|
3765
3767
|
}
|
|
3766
|
-
get
|
|
3767
|
-
return this.
|
|
3768
|
+
get state() {
|
|
3769
|
+
return this.state$.value;
|
|
3768
3770
|
}
|
|
3769
3771
|
onBackdropClick(ev) {
|
|
3770
3772
|
console.log(1);
|
|
@@ -3775,7 +3777,7 @@ class BsOffcanvasComponent {
|
|
|
3775
3777
|
}
|
|
3776
3778
|
}
|
|
3777
3779
|
BsOffcanvasComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BsOffcanvasComponent, deps: [{ token: OFFCANVAS_CONTENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
3778
|
-
BsOffcanvasComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: BsOffcanvasComponent, selector: "bs-offcanvas-holder", inputs: { position: "position", size: "size",
|
|
3780
|
+
BsOffcanvasComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: BsOffcanvasComponent, selector: "bs-offcanvas-holder", inputs: { position: "position", size: "size", state: "state" }, outputs: { stateChange: "stateChange", backdropClick: "backdropClick" }, ngImport: i0, template: "<div [@fadeInOut]=\"{value: ':leave', params: {duration: '300ms'} }\" *ngIf=\"showBackdrop$ | async\">\n <div class=\"modal-backdrop show\" (click)=\"onBackdropClick($event)\"></div>\n</div>\n\n<div class=\"offcanvas overflow-hidden\"\n [class.show]=\"show$ | async\"\n [class.disable-transition]=\"disableTransition$ | async\"\n [class]=\"offcanvasClass$ | async\"\n [style.height.px]=\"height$ | async\"\n [style.width.px]=\"width$ | async\">\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n</div>", styles: [".offcanvas.oc-max-width{max-width:calc(100% - 40px)}.offcanvas.oc-max-height{max-height:calc(100% - 40px)}.modal-backdrop{z-index:1040}.offcanvas{visibility:unset}.offcanvas.disable-transition{transition:none}.offcanvas.offcanvas-top{height:auto;bottom:unset}.offcanvas.offcanvas-bottom{height:auto;top:unset}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe }, animations: [FadeInOutAnimation] });
|
|
3779
3781
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BsOffcanvasComponent, decorators: [{
|
|
3780
3782
|
type: Component,
|
|
3781
3783
|
args: [{ selector: 'bs-offcanvas-holder', animations: [FadeInOutAnimation], template: "<div [@fadeInOut]=\"{value: ':leave', params: {duration: '300ms'} }\" *ngIf=\"showBackdrop$ | async\">\n <div class=\"modal-backdrop show\" (click)=\"onBackdropClick($event)\"></div>\n</div>\n\n<div class=\"offcanvas overflow-hidden\"\n [class.show]=\"show$ | async\"\n [class.disable-transition]=\"disableTransition$ | async\"\n [class]=\"offcanvasClass$ | async\"\n [style.height.px]=\"height$ | async\"\n [style.width.px]=\"width$ | async\">\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n</div>", styles: [".offcanvas.oc-max-width{max-width:calc(100% - 40px)}.offcanvas.oc-max-height{max-height:calc(100% - 40px)}.modal-backdrop{z-index:1040}.offcanvas{visibility:unset}.offcanvas.disable-transition{transition:none}.offcanvas.offcanvas-top{height:auto;bottom:unset}.offcanvas.offcanvas-bottom{height:auto;top:unset}\n"] }]
|
|
@@ -3786,9 +3788,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
3786
3788
|
type: Input
|
|
3787
3789
|
}], size: [{
|
|
3788
3790
|
type: Input
|
|
3789
|
-
}],
|
|
3791
|
+
}], stateChange: [{
|
|
3790
3792
|
type: Output
|
|
3791
|
-
}],
|
|
3793
|
+
}], state: [{
|
|
3792
3794
|
type: Input
|
|
3793
3795
|
}], backdropClick: [{
|
|
3794
3796
|
type: Output
|
|
@@ -3802,20 +3804,20 @@ class BsOffcanvasHostComponent {
|
|
|
3802
3804
|
this.rootInjector = rootInjector;
|
|
3803
3805
|
this.portalFactory = portalFactory;
|
|
3804
3806
|
this.viewInited$ = new BehaviorSubject(false);
|
|
3805
|
-
this.
|
|
3807
|
+
this.state$ = new BehaviorSubject('closed');
|
|
3806
3808
|
this.size$ = new BehaviorSubject(null);
|
|
3807
3809
|
this.position$ = new BehaviorSubject('bottom');
|
|
3808
3810
|
this.hasBackdrop$ = new BehaviorSubject(false);
|
|
3809
3811
|
this.destroyed$ = new Subject();
|
|
3810
3812
|
this.backdropClick = new EventEmitter();
|
|
3811
|
-
//#region
|
|
3812
|
-
this.
|
|
3813
|
-
this.
|
|
3813
|
+
//#region State
|
|
3814
|
+
this.stateChange = new EventEmitter();
|
|
3815
|
+
this.state$
|
|
3814
3816
|
.pipe(takeUntil(this.destroyed$))
|
|
3815
|
-
.subscribe((
|
|
3817
|
+
.subscribe((state) => {
|
|
3816
3818
|
if (this.component) {
|
|
3817
|
-
this.
|
|
3818
|
-
this.component.instance.
|
|
3819
|
+
this.stateChange.emit(state);
|
|
3820
|
+
this.component.instance.state$.next(state);
|
|
3819
3821
|
}
|
|
3820
3822
|
});
|
|
3821
3823
|
combineLatest([this.position$, this.viewInited$])
|
|
@@ -3869,11 +3871,11 @@ class BsOffcanvasHostComponent {
|
|
|
3869
3871
|
ngOnDestroy() {
|
|
3870
3872
|
this.destroyed$.next(true);
|
|
3871
3873
|
}
|
|
3872
|
-
set
|
|
3873
|
-
this.
|
|
3874
|
+
set state(value) {
|
|
3875
|
+
this.state$.next(value);
|
|
3874
3876
|
}
|
|
3875
|
-
get
|
|
3876
|
-
return this.
|
|
3877
|
+
get state() {
|
|
3878
|
+
return this.state$.value;
|
|
3877
3879
|
}
|
|
3878
3880
|
//#endregion
|
|
3879
3881
|
//#region Position
|
|
@@ -3901,7 +3903,7 @@ class BsOffcanvasHostComponent {
|
|
|
3901
3903
|
}
|
|
3902
3904
|
}
|
|
3903
3905
|
BsOffcanvasHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BsOffcanvasHostComponent, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: PORTAL_FACTORY }], target: i0.ɵɵFactoryTarget.Component });
|
|
3904
|
-
BsOffcanvasHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: BsOffcanvasHostComponent, selector: "bs-offcanvas", inputs: {
|
|
3906
|
+
BsOffcanvasHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: BsOffcanvasHostComponent, selector: "bs-offcanvas", inputs: { state: "state", position: "position", size: "size", hasBackdrop: "hasBackdrop" }, outputs: { backdropClick: "backdropClick", stateChange: "stateChange" }, ngImport: i0, template: "", styles: [""] });
|
|
3905
3907
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BsOffcanvasHostComponent, decorators: [{
|
|
3906
3908
|
type: Component,
|
|
3907
3909
|
args: [{ selector: 'bs-offcanvas', template: "", styles: [""] }]
|
|
@@ -3910,9 +3912,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
3910
3912
|
args: [PORTAL_FACTORY]
|
|
3911
3913
|
}] }]; }, propDecorators: { backdropClick: [{
|
|
3912
3914
|
type: Output
|
|
3913
|
-
}],
|
|
3915
|
+
}], stateChange: [{
|
|
3914
3916
|
type: Output
|
|
3915
|
-
}],
|
|
3917
|
+
}], state: [{
|
|
3916
3918
|
type: Input
|
|
3917
3919
|
}], position: [{
|
|
3918
3920
|
type: Input
|
|
@@ -3941,7 +3943,7 @@ class BsOffcanvasCloseDirective {
|
|
|
3941
3943
|
this.offcanvas = offcanvas;
|
|
3942
3944
|
}
|
|
3943
3945
|
onClick() {
|
|
3944
|
-
this.offcanvas.
|
|
3946
|
+
this.offcanvas.state = 'closed';
|
|
3945
3947
|
}
|
|
3946
3948
|
}
|
|
3947
3949
|
BsOffcanvasCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BsOffcanvasCloseDirective, deps: [{ token: BsOffcanvasHostComponent }], target: i0.ɵɵFactoryTarget.Directive });
|