Skip to content

Commit

Permalink
feat(overlay): add missing component class suffix (#2622)
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
`NbPositionedContainer` renamed to `NbPositionedContainerComponent`.
  • Loading branch information
yggg authored Dec 16, 2020
1 parent 2cd2c78 commit 3e20fe4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ export interface NbRenderableContainer {
@Component({
template: '',
})
// @breaking-change @5.0.0 Rename to NbPositionedContainerComponent and enable ts lint
// tslint:disable-next-line
export class NbPositionedContainer {
export class NbPositionedContainerComponent {
@Input() position: NbPosition;

@HostBinding('class.nb-overlay-top')
Expand Down
4 changes: 2 additions & 2 deletions src/framework/theme/components/cdk/overlay/overlay.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { NbSharedModule } from '../../shared/shared.module';
import { NbA11yModule } from '../a11y/a11y.module';
import { NbCdkMappingModule } from './mapping';
import { NbPositionBuilderService } from './overlay-position';
import { NbOverlayContainerComponent, NbPositionedContainer } from './overlay-container';
import { NbOverlayContainerComponent, NbPositionedContainerComponent } from './overlay-container';
import { NbOverlayService } from './overlay-service';
import { NbCdkAdapterModule } from '../adapter/adapter.module';
import { NbPositionHelper } from './position-helper';
Expand All @@ -17,7 +17,7 @@ import { NbTriggerStrategyBuilderService } from './overlay-trigger';
NbSharedModule,
],
declarations: [
NbPositionedContainer,
NbPositionedContainerComponent,
NbOverlayContainerComponent,
],
exports: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { Component, Input } from '@angular/core';

import { NbMenuItem } from '../../components/menu/menu.service';
import { NbPositionedContainer, NbRenderableContainer } from '../cdk/overlay/overlay-container';
import { NbPositionedContainerComponent, NbRenderableContainer } from '../cdk/overlay/overlay-container';

/**
* Context menu component used as content within NbContextMenuDirective.
Expand All @@ -30,7 +30,7 @@ import { NbPositionedContainer, NbRenderableContainer } from '../cdk/overlay/ove
<nb-menu class="context-menu" [items]="context.items" [tag]="context.tag"></nb-menu>
`,
})
export class NbContextMenuComponent extends NbPositionedContainer implements NbRenderableContainer {
export class NbContextMenuComponent extends NbPositionedContainerComponent implements NbRenderableContainer {

@Input() items: NbMenuItem[] = [];
@Input() tag: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { Component, ComponentRef, ViewChild } from '@angular/core';

import { NbComponentPortal } from '../cdk/overlay/mapping';
import { NbOverlayContainerComponent, NbPositionedContainer } from '../cdk/overlay/overlay-container';
import { NbOverlayContainerComponent, NbPositionedContainerComponent } from '../cdk/overlay/overlay-container';


@Component({
Expand All @@ -16,7 +16,7 @@ import { NbOverlayContainerComponent, NbPositionedContainer } from '../cdk/overl
<nb-overlay-container></nb-overlay-container>
`,
})
export class NbDatepickerContainerComponent extends NbPositionedContainer {
export class NbDatepickerContainerComponent extends NbPositionedContainerComponent {

// TODO static must be false as of Angular 9.0.0, issues/1514
@ViewChild(NbOverlayContainerComponent, { static: true }) overlayContainer: NbOverlayContainerComponent;
Expand Down
4 changes: 2 additions & 2 deletions src/framework/theme/components/popover/popover.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { NbComponentPortal, NbTemplatePortal } from '../cdk/overlay/mapping';
import {
NbOverlayContainerComponent,
NbPositionedContainer,
NbPositionedContainerComponent,
NbRenderableContainer,
} from '../cdk/overlay/overlay-container';

Expand Down Expand Up @@ -47,7 +47,7 @@ import {
<nb-overlay-container></nb-overlay-container>
`,
})
export class NbPopoverComponent extends NbPositionedContainer implements NbRenderableContainer {
export class NbPopoverComponent extends NbPositionedContainerComponent implements NbRenderableContainer {
@ViewChild(NbOverlayContainerComponent) overlayContainer: NbOverlayContainerComponent;

@Input() content: any;
Expand Down

0 comments on commit 3e20fe4

Please sign in to comment.