diff --git a/lib/core/src/lib/toolbar/toolbar-divider.component.ts b/lib/core/src/lib/toolbar/toolbar-divider.component.ts index 36dee0cf9b2..7dd940b1003 100644 --- a/lib/core/src/lib/toolbar/toolbar-divider.component.ts +++ b/lib/core/src/lib/toolbar/toolbar-divider.component.ts @@ -19,17 +19,20 @@ import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/ @Component({ selector: 'adf-toolbar-divider', + standalone: true, template: '
', host: { class: 'adf-toolbar-divider' }, - styles: [` - .adf-toolbar-divider > div { - height: 24px; - width: 1px; - background: rgba(0, 0, 0, 0.26); - margin-left: 5px; - margin-right: 5px; - } - `], + styles: [ + ` + .adf-toolbar-divider > div { + height: 24px; + width: 1px; + background: rgba(0, 0, 0, 0.26); + margin-left: 5px; + margin-right: 5px; + } + ` + ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }) diff --git a/lib/core/src/lib/toolbar/toolbar-title.component.ts b/lib/core/src/lib/toolbar/toolbar-title.component.ts index d856b4a1270..7221e98fb43 100644 --- a/lib/core/src/lib/toolbar/toolbar-title.component.ts +++ b/lib/core/src/lib/toolbar/toolbar-title.component.ts @@ -19,6 +19,7 @@ import { Component } from '@angular/core'; @Component({ selector: 'adf-toolbar-title', + standalone: true, template: '', host: { class: 'adf-toolbar-title' } }) diff --git a/lib/core/src/lib/toolbar/toolbar.component.ts b/lib/core/src/lib/toolbar/toolbar.component.ts index 11c56e0e270..a209e606600 100644 --- a/lib/core/src/lib/toolbar/toolbar.component.ts +++ b/lib/core/src/lib/toolbar/toolbar.component.ts @@ -17,17 +17,21 @@ import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core'; import { ThemePalette } from '@angular/material/core'; +import { MatToolbarModule } from '@angular/material/toolbar'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; @Component({ selector: 'adf-toolbar', + standalone: true, templateUrl: './toolbar.component.html', styleUrls: ['./toolbar.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, + imports: [MatToolbarModule, TranslateModule, NgIf], host: { class: 'adf-toolbar' } }) export class ToolbarComponent { - /** Toolbar title. */ @Input() title: string = ''; @@ -35,5 +39,4 @@ export class ToolbarComponent { /** Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. */ @Input() color: ThemePalette; - } diff --git a/lib/core/src/lib/toolbar/toolbar.module.ts b/lib/core/src/lib/toolbar/toolbar.module.ts index a1ded955563..8d0c85814a4 100644 --- a/lib/core/src/lib/toolbar/toolbar.module.ts +++ b/lib/core/src/lib/toolbar/toolbar.module.ts @@ -15,30 +15,13 @@ * limitations under the License. */ -import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { TranslateModule } from '@ngx-translate/core'; -import { MaterialModule } from '../material.module'; - import { ToolbarDividerComponent } from './toolbar-divider.component'; import { ToolbarTitleComponent } from './toolbar-title.component'; import { ToolbarComponent } from './toolbar.component'; @NgModule({ - imports: [ - CommonModule, - MaterialModule, - TranslateModule - ], - declarations: [ - ToolbarComponent, - ToolbarTitleComponent, - ToolbarDividerComponent - ], - exports: [ - ToolbarComponent, - ToolbarTitleComponent, - ToolbarDividerComponent - ] + imports: [ToolbarComponent, ToolbarTitleComponent, ToolbarDividerComponent], + exports: [ToolbarComponent, ToolbarTitleComponent, ToolbarDividerComponent] }) export class ToolbarModule {}