From 28778f7a51e41d2e26ba7a6b126c1252dff38298 Mon Sep 17 00:00:00 2001 From: Sergey Andrievskiy Date: Mon, 29 Apr 2019 14:24:54 +0200 Subject: [PATCH] feat: remove fields scheduled to be removed in 4.0 (#1439) BREAKING CHANGE: Popover: 'nbPopoverMode' input removed. Use 'nbPopoverTrigger' instead. NbPopoverDirective 'mode' property removed. Use 'trigger' instead. NbSelectComponent 'selectionChange' removed. Use nb-select (selected) binding to track selection change and to track option click. --- .../components/popover/popover.directive.ts | 15 --------------- .../theme/components/select/select.component.ts | 16 ++-------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/src/framework/theme/components/popover/popover.directive.ts b/src/framework/theme/components/popover/popover.directive.ts index 3952803927..a2239c969c 100644 --- a/src/framework/theme/components/popover/popover.directive.ts +++ b/src/framework/theme/components/popover/popover.directive.ts @@ -143,21 +143,6 @@ export class NbPopoverDirective implements NbDynamicOverlayController, OnChanges @Input('nbPopoverAdjustment') adjustment: NbAdjustment = NbAdjustment.CLOCKWISE; - /** - * Deprecated, use `trigger` - * @deprecated - * @breaking-change 4.0.0 - * */ - @Input('nbPopoverMode') - set mode(mode) { - console.warn(`Popover 'nbPopoverMode' input is deprecated and will be removed as of 4.0.0. - Use 'nbPopoverTrigger' instead.`); - this.trigger = mode; - } - get mode() { - return this.trigger; - } - /** * Describes when the container will be shown. * Available options: `click`, `hover`, `hint`, `focus` and `noop` diff --git a/src/framework/theme/components/select/select.component.ts b/src/framework/theme/components/select/select.component.ts index 6d1d7c2baf..41116ae898 100644 --- a/src/framework/theme/components/select/select.component.ts +++ b/src/framework/theme/components/select/select.component.ts @@ -25,7 +25,7 @@ import { ViewChild, } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; -import { merge, Observable, Subject } from 'rxjs'; +import { merge } from 'rxjs'; import { startWith, switchMap, takeWhile, filter } from 'rxjs/operators'; import { @@ -551,15 +551,6 @@ export class NbSelectComponent implements AfterViewInit, AfterContentInit, On */ overlayPosition: NbPosition = '' as NbPosition; - protected selectionChange$: Subject> = new Subject(); - /** - * Stream of events that will fire when one of the options is clicked. - * @deprecated - * Use nb-select (selected) binding to track selection change and to track option click. - * @breaking-change 4.0.0 - **/ - readonly selectionChange: Observable> = this.selectionChange$.asObservable(); - protected ref: NbOverlayRef; protected triggerStrategy: NbTriggerStrategy; @@ -858,10 +849,7 @@ export class NbSelectComponent implements AfterViewInit, AfterContentInit, On }), takeWhile(() => this.alive), ) - .subscribe((clickedOption: NbOptionComponent) => { - this.handleOptionClick(clickedOption); - this.selectionChange$.next(clickedOption); - }); + .subscribe((clickedOption: NbOptionComponent) => this.handleOptionClick(clickedOption)); } protected subscribeOnOverlayKeys(): void {