Skip to content

Commit

Permalink
chore: rename PolymorpheusOutletDirective -> PolymorpheusOutlet
Browse files Browse the repository at this point in the history
  • Loading branch information
v.potekhin committed Dec 5, 2023
1 parent e7efc50 commit 5ae5a9e
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions projects/demo/src/app/modules/comboBox/comboBox.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Input,
Output,
} from '@angular/core';
import {PolymorpheusContent, PolymorpheusOutletDirective} from '@tinkoff/ng-polymorpheus';
import {PolymorpheusContent, PolymorpheusOutlet} from '@tinkoff/ng-polymorpheus';

import {InputComponent} from '../input/input.component';
import {ContextWithActive} from '../interfaces';
Expand All @@ -15,7 +15,7 @@ import {MenuComponent} from '../menu/menu.component';
@Component({
standalone: true,
selector: 'app-combo-box',
imports: [CommonModule, InputComponent, MenuComponent, PolymorpheusOutletDirective],
imports: [CommonModule, InputComponent, MenuComponent, PolymorpheusOutlet],
templateUrl: './comboBox.template.html',
styleUrls: ['./comboBox.style.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/app/modules/input/input.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import {
Output,
} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {PolymorpheusContent, PolymorpheusOutletDirective} from '@tinkoff/ng-polymorpheus';
import {PolymorpheusContent, PolymorpheusOutlet} from '@tinkoff/ng-polymorpheus';

@Component({
standalone: true,
selector: 'app-input',
imports: [FormsModule, PolymorpheusOutletDirective],
imports: [FormsModule, PolymorpheusOutlet],
templateUrl: './input.template.html',
styleUrls: ['./input.style.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/app/modules/menu/menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import {
Input,
Output,
} from '@angular/core';
import {PolymorpheusContent, PolymorpheusOutletDirective} from '@tinkoff/ng-polymorpheus';
import {PolymorpheusContent, PolymorpheusOutlet} from '@tinkoff/ng-polymorpheus';

import {ContextWithActive} from '../interfaces';

@Component({
standalone: true,
selector: 'app-menu',
imports: [CommonModule, PolymorpheusOutletDirective],
imports: [CommonModule, PolymorpheusOutlet],
templateUrl: './menu.template.html',
styleUrls: ['./menu.style.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/app/modules/starWars/starWars.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {CommonModule} from '@angular/common';
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {PolymorpheusOutletDirective} from '@tinkoff/ng-polymorpheus';
import {PolymorpheusOutlet} from '@tinkoff/ng-polymorpheus';

import {ComboBoxComponent} from '../comboBox/comboBox.component';
import {ben, jedi, luke, sith, vader, yoda} from '../constants';
Expand All @@ -14,7 +14,7 @@ interface StarWarsChar {
@Component({
standalone: true,
selector: 'app-star-wars',
imports: [CommonModule, PolymorpheusOutletDirective, ComboBoxComponent],
imports: [CommonModule, PolymorpheusOutlet, ComboBoxComponent],
templateUrl: './starWars.template.html',
styleUrls: ['./starWars.style.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {PolymorpheusOutletDirective} from '@tinkoff/ng-polymorpheus';
import {PolymorpheusOutlet} from '@tinkoff/ng-polymorpheus';
import {HighlightModule} from 'ngx-highlightjs';

import {ComboBoxComponent} from '../comboBox/comboBox.component';
Expand All @@ -11,7 +11,7 @@ import {StarWarsDemoComponent} from './starWarsDemo.component';
imports: [
CommonModule,
HighlightModule,
PolymorpheusOutletDirective,
PolymorpheusOutlet,
ComboBoxComponent,
TabsComponent,
],
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/app/modules/tab/tab.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {ChangeDetectionStrategy, Component, Inject} from '@angular/core';
import {
POLYMORPHEUS_CONTEXT,
PolymorpheusContent,
PolymorpheusOutletDirective,
PolymorpheusOutlet,
PolymorpheusTemplate,
} from '@tinkoff/ng-polymorpheus';

Expand All @@ -12,7 +12,7 @@ import {ContextWithActive, CustomTab} from '../interfaces';
@Component({
standalone: true,
selector: 'app-tab',
imports: [CommonModule, PolymorpheusOutletDirective],
imports: [CommonModule, PolymorpheusOutlet],
templateUrl: './tab.template.html',
styleUrls: ['./tab.style.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/app/modules/tabs/tabs.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import {
Input,
Output,
} from '@angular/core';
import {PolymorpheusContent, PolymorpheusOutletDirective} from '@tinkoff/ng-polymorpheus';
import {PolymorpheusContent, PolymorpheusOutlet} from '@tinkoff/ng-polymorpheus';

import {ContextWithActive} from '../interfaces';

@Component({
standalone: true,
selector: 'app-tabs',
imports: [CommonModule, PolymorpheusOutletDirective],
imports: [CommonModule, PolymorpheusOutlet],
templateUrl: './tabs.template.html',
styleUrls: ['./tabs.style.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/app/modules/tabsDemo/tabsDemo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ChangeDetectionStrategy, Component} from '@angular/core';
import {
PolymorpheusComponent,
PolymorpheusContent,
PolymorpheusOutletDirective,
PolymorpheusOutlet,
} from '@tinkoff/ng-polymorpheus';
import {HighlightModule} from 'ngx-highlightjs';

Expand All @@ -24,7 +24,7 @@ import * as html from '../tabs/tabs.template.html?raw';
selector: 'app-tabs-demo',
imports: [
HighlightModule,
PolymorpheusOutletDirective,
PolymorpheusOutlet,
MenuComponent,
TabsComponent,
TabComponent,
Expand Down
4 changes: 2 additions & 2 deletions projects/ng-polymorpheus/src/directives/outlet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {PolymorpheusTemplate} from './template';
selector: '[polymorpheusOutlet]',
standalone: true,
})
export class PolymorpheusOutletDirective<C> implements OnChanges, DoCheck {
export class PolymorpheusOutlet<C> implements OnChanges, DoCheck {
private c?: ComponentRef<unknown>;

@Input('polymorpheusOutlet')
Expand All @@ -45,7 +45,7 @@ export class PolymorpheusOutletDirective<C> implements OnChanges, DoCheck {
}

static ngTemplateContextGuard<T>(
_dir: PolymorpheusOutletDirective<T>,
_dir: PolymorpheusOutlet<T>,
_ctx: any,
): _ctx is PolymorpheusContext<T extends PolymorpheusPrimitive ? T : never> {
return true;
Expand Down
4 changes: 2 additions & 2 deletions projects/ng-polymorpheus/src/tests/outlet.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
ViewChild,
} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {PolymorpheusOutletDirective} from '@tinkoff/ng-polymorpheus';
import {PolymorpheusOutlet} from '@tinkoff/ng-polymorpheus';

import {PolymorpheusComponent} from '../classes/component';
import {PolymorpheusTemplate} from '../directives/template';
Expand Down Expand Up @@ -112,7 +112,7 @@ describe('PolymorpheusOutlet', () => {
await TestBed.configureTestingModule({
imports: [
CommonModule,
PolymorpheusOutletDirective,
PolymorpheusOutlet,
PolymorpheusTemplate,
ComponentModule,
],
Expand Down
4 changes: 2 additions & 2 deletions projects/ng-polymorpheus/src/tests/template.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {CommonModule} from '@angular/common';
import {Component} from '@angular/core';
import {TestBed} from '@angular/core/testing';
import {
PolymorpheusOutletDirective,
PolymorpheusOutlet,
PolymorpheusTemplate,
} from '@tinkoff/ng-polymorpheus';

Expand Down Expand Up @@ -32,7 +32,7 @@ describe('PolymorpheusTemplate', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [CommonModule, PolymorpheusOutletDirective, PolymorpheusTemplate],
imports: [CommonModule, PolymorpheusOutlet, PolymorpheusTemplate],
declarations: [TestComponent],
teardown: {destroyAfterEach: false},
}).compileComponents();
Expand Down

0 comments on commit 5ae5a9e

Please sign in to comment.