From 2cadb2374d0fa270fd0e1b8930861a9eddbf727b Mon Sep 17 00:00:00 2001 From: Guillaume Date: Wed, 31 Jul 2024 17:53:10 +0200 Subject: [PATCH] fix Olivia --- .../lib/metadata-quality/metadata-quality.component.spec.ts | 2 +- .../metadata-quality/metadata-quality.component.stories.ts | 2 +- libs/ui/widgets/src/lib/popover/popover.component.spec.ts | 2 +- libs/ui/widgets/src/lib/popover/popover.component.stories.ts | 5 ++++- libs/ui/widgets/src/lib/popover/popover.component.ts | 3 +++ libs/ui/widgets/src/lib/ui-widgets.module.ts | 3 --- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.spec.ts b/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.spec.ts index 154c05e852..2b226cfd04 100644 --- a/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.spec.ts +++ b/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.spec.ts @@ -40,7 +40,6 @@ describe('MetadataQualityComponent', () => { MetadataQualityComponent, MetadataQualityItemComponent, ProgressBarComponent, - PopoverComponent, ], imports: [ UtilSharedModule, @@ -48,6 +47,7 @@ describe('MetadataQualityComponent', () => { MatIconModule, UtilI18nModule, TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG), + PopoverComponent, ], }).compileComponents() }) diff --git a/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.stories.ts b/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.stories.ts index 8caca4af5e..bb1b28d85f 100644 --- a/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.stories.ts +++ b/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.stories.ts @@ -19,7 +19,6 @@ export default { moduleMetadata({ declarations: [ ProgressBarComponent, - PopoverComponent, MetadataQualityItemComponent, ], imports: [ @@ -27,6 +26,7 @@ export default { MatIconModule, UtilI18nModule, TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG), + PopoverComponent, ], }), ], diff --git a/libs/ui/widgets/src/lib/popover/popover.component.spec.ts b/libs/ui/widgets/src/lib/popover/popover.component.spec.ts index 96bce57218..5ad2ac6433 100644 --- a/libs/ui/widgets/src/lib/popover/popover.component.spec.ts +++ b/libs/ui/widgets/src/lib/popover/popover.component.spec.ts @@ -8,7 +8,7 @@ describe('PopoverComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [PopoverComponent], + imports: [PopoverComponent], }).compileComponents() }) diff --git a/libs/ui/widgets/src/lib/popover/popover.component.stories.ts b/libs/ui/widgets/src/lib/popover/popover.component.stories.ts index f58285920a..2bc1ad80c1 100644 --- a/libs/ui/widgets/src/lib/popover/popover.component.stories.ts +++ b/libs/ui/widgets/src/lib/popover/popover.component.stories.ts @@ -1,13 +1,16 @@ import { Meta, Story } from '@storybook/angular' import { PopoverComponent } from './popover.component' import { moduleMetadata } from '@storybook/angular' +import { CommonModule } from '@angular/common' export default { title: 'Widgets/Popover', component: PopoverComponent, decorators: [ moduleMetadata({ - declarations: [PopoverComponent], + imports: [ + CommonModule + ], }), ], argTypes: { diff --git a/libs/ui/widgets/src/lib/popover/popover.component.ts b/libs/ui/widgets/src/lib/popover/popover.component.ts index b26c4ec9f7..a167101c03 100644 --- a/libs/ui/widgets/src/lib/popover/popover.component.ts +++ b/libs/ui/widgets/src/lib/popover/popover.component.ts @@ -1,3 +1,4 @@ +import { CommonModule } from '@angular/common' import { Component, AfterViewInit, @@ -18,6 +19,8 @@ import tippy, { Instance } from 'tippy.js' selector: 'gn-ui-popover', templateUrl: './popover.component.html', styleUrls: ['./popover.component.css'], + standalone: true, + imports: [CommonModule], }) export class PopoverComponent implements AfterViewInit, OnChanges, OnDestroy { @ViewChild('popoverContent', { static: false }) popoverContent: ElementRef diff --git a/libs/ui/widgets/src/lib/ui-widgets.module.ts b/libs/ui/widgets/src/lib/ui-widgets.module.ts index e08499fbfa..726025db7c 100644 --- a/libs/ui/widgets/src/lib/ui-widgets.module.ts +++ b/libs/ui/widgets/src/lib/ui-widgets.module.ts @@ -12,13 +12,11 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner' import { MatIconModule } from '@angular/material/icon' import { SpinningLoaderComponent } from './spinning-loader/spinning-loader.component' import { CommonModule } from '@angular/common' -import { PopoverComponent } from './popover/popover.component' @NgModule({ declarations: [ ColorScaleComponent, ProgressBarComponent, - PopoverComponent, StepBarComponent, LoadingMaskComponent, SpinningLoaderComponent, @@ -35,7 +33,6 @@ import { PopoverComponent } from './popover/popover.component' MatIconModule, ], exports: [ - PopoverComponent, ProgressBarComponent, StepBarComponent, LoadingMaskComponent,