diff --git a/libs/feature/dataviz/src/lib/figure/figure-container/figure-container.component.stories.ts b/libs/feature/dataviz/src/lib/figure/figure-container/figure-container.component.stories.ts index 913ce743d2..08b9cef6ca 100644 --- a/libs/feature/dataviz/src/lib/figure/figure-container/figure-container.component.stories.ts +++ b/libs/feature/dataviz/src/lib/figure/figure-container/figure-container.component.stories.ts @@ -13,6 +13,8 @@ import { UiDatavizModule, } from '@geonetwork-ui/ui/dataviz' import { importProvidersFrom } from '@angular/core' +import { TRANSLATE_DEFAULT_CONFIG } from '@geonetwork-ui/util/i18n' +import { TranslateModule } from '@ngx-translate/core' export default { title: 'Dataviz/FigureContainerComponent', @@ -22,7 +24,10 @@ export default { imports: [UiDatavizModule], }), applicationConfig({ - providers: [importProvidersFrom(BrowserAnimationsModule)], + providers: [ + importProvidersFrom(BrowserAnimationsModule), + importProvidersFrom(TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG)), + ], }), componentWrapperDecorator( (story) => ` diff --git a/libs/feature/dataviz/src/lib/table-view/table-view.component.stories.ts b/libs/feature/dataviz/src/lib/table-view/table-view.component.stories.ts index f77ba78d1e..78feec5feb 100644 --- a/libs/feature/dataviz/src/lib/table-view/table-view.component.stories.ts +++ b/libs/feature/dataviz/src/lib/table-view/table-view.component.stories.ts @@ -11,16 +11,13 @@ import { } from '@storybook/angular' import { TableViewComponent } from './table-view.component' import { TableComponent, UiDatavizModule } from '@geonetwork-ui/ui/dataviz' -import { LoadingMaskComponent } from '@geonetwork-ui/ui/widgets' import { importProvidersFrom } from '@angular/core' -import { MatProgressSpinner } from '@angular/material/progress-spinner' export default { title: 'Smart/Dataviz/TableView', component: TableViewComponent, decorators: [ moduleMetadata({ - declarations: [LoadingMaskComponent, MatProgressSpinner], imports: [ TableComponent, TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG), diff --git a/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.stories.ts b/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.stories.ts index 35702801fa..6a82644224 100644 --- a/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.stories.ts +++ b/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.stories.ts @@ -12,7 +12,6 @@ import { UtilI18nModule, } from '@geonetwork-ui/util/i18n' import { UtilSharedModule } from '@geonetwork-ui/util/shared' -import { ThumbnailComponent } from '@geonetwork-ui/ui/elements' import { OrganisationPreviewComponent } from './organisation-preview.component' import { BrowserAnimationsModule } from '@angular/platform-browser/animations' import { importProvidersFrom } from '@angular/core' @@ -28,7 +27,6 @@ export default { ], }), moduleMetadata({ - declarations: [ThumbnailComponent], imports: [ UtilI18nModule, UtilSharedModule, diff --git a/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.stories.ts b/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.stories.ts index 62adb35991..9dd32b8639 100644 --- a/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.stories.ts +++ b/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.stories.ts @@ -10,14 +10,12 @@ import { UtilI18nModule, } from '@geonetwork-ui/util/i18n' import { OrganisationsFilterComponent } from './organisations-filter.component' -import { DropdownSelectorComponent } from '@geonetwork-ui/ui/inputs' export default { title: 'Catalog/OrganisationsFilterComponent', component: OrganisationsFilterComponent, decorators: [ moduleMetadata({ - declarations: [DropdownSelectorComponent], imports: [ UtilI18nModule, TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG), diff --git a/libs/ui/dataviz/src/lib/figure/figure.component.stories.ts b/libs/ui/dataviz/src/lib/figure/figure.component.stories.ts index 0f701413c2..6e805a5eb6 100644 --- a/libs/ui/dataviz/src/lib/figure/figure.component.stories.ts +++ b/libs/ui/dataviz/src/lib/figure/figure.component.stories.ts @@ -9,6 +9,8 @@ import { FigureComponent } from './figure.component' import { BrowserAnimationsModule } from '@angular/platform-browser/animations' import { UiDatavizModule } from '../ui-dataviz.module' import { importProvidersFrom } from '@angular/core' +import { TranslateModule } from '@ngx-translate/core' +import { TRANSLATE_DEFAULT_CONFIG } from '@geonetwork-ui/util/i18n' export default { title: 'Dataviz/FigureComponent', @@ -18,7 +20,10 @@ export default { imports: [UiDatavizModule], }), applicationConfig({ - providers: [importProvidersFrom(BrowserAnimationsModule)], + providers: [ + importProvidersFrom(BrowserAnimationsModule), + importProvidersFrom(TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG)), + ], }), componentWrapperDecorator( (story) => ` diff --git a/libs/ui/elements/src/lib/api-card/api-card.component.stories.ts b/libs/ui/elements/src/lib/api-card/api-card.component.stories.ts index afcd18a5f5..61d1442b05 100644 --- a/libs/ui/elements/src/lib/api-card/api-card.component.stories.ts +++ b/libs/ui/elements/src/lib/api-card/api-card.component.stories.ts @@ -12,14 +12,12 @@ import { } from '@storybook/angular' import { ApiCardComponent } from './api-card.component' import { MatTooltipModule } from '@angular/material/tooltip' -import { CopyTextButtonComponent } from '@geonetwork-ui/ui/libs/copy-text-button' export default { title: 'Elements/ApiCardComponent', component: ApiCardComponent, decorators: [ moduleMetadata({ - declarations: [CopyTextButtonComponent], imports: [ UtilI18nModule, TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG), diff --git a/libs/ui/elements/src/lib/metadata-info/linkify.directive.stories.ts b/libs/ui/elements/src/lib/metadata-info/linkify.directive.stories.ts index 2d55fd76ce..d6e4484bfd 100644 --- a/libs/ui/elements/src/lib/metadata-info/linkify.directive.stories.ts +++ b/libs/ui/elements/src/lib/metadata-info/linkify.directive.stories.ts @@ -5,7 +5,7 @@ export default { title: 'Elements/GnUiLinkifyDirective', decorators: [ moduleMetadata({ - declarations: [GnUiLinkifyDirective], + imports: [GnUiLinkifyDirective], }), ], } as Meta diff --git a/libs/ui/elements/src/lib/metadata-info/metadata-info.component.stories.ts b/libs/ui/elements/src/lib/metadata-info/metadata-info.component.stories.ts index 9c9a2032f3..9846fc6863 100644 --- a/libs/ui/elements/src/lib/metadata-info/metadata-info.component.stories.ts +++ b/libs/ui/elements/src/lib/metadata-info/metadata-info.component.stories.ts @@ -11,7 +11,6 @@ import { } from '@storybook/angular' import { MetadataInfoComponent } from './metadata-info.component' import { UtilSharedModule } from '@geonetwork-ui/util/shared' -import { ContentGhostComponent } from '../content-ghost/content-ghost.component' import { datasetRecordsFixture } from '@geonetwork-ui/common/fixtures' import { DatasetRecord } from '@geonetwork-ui/common/domain/model/record' @@ -20,7 +19,6 @@ export default { component: MetadataInfoComponent, decorators: [ moduleMetadata({ - declarations: [ContentGhostComponent], imports: [ UtilI18nModule, TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG), 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 5ebc30f32d..65ff37a4b8 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 @@ -7,11 +7,7 @@ import { UtilI18nModule, } from '@geonetwork-ui/util/i18n' import { TranslateModule } from '@ngx-translate/core' -import { MetadataQualityItemComponent } from '../metadata-quality-item/metadata-quality-item.component' -import { - PopoverComponent, - ProgressBarComponent, -} from '@geonetwork-ui/ui/widgets' +import { PopoverComponent } from '@geonetwork-ui/ui/widgets' import { CatalogRecord } from '@geonetwork-ui/common/domain/model/record' export default { @@ -19,7 +15,6 @@ export default { component: MetadataQualityComponent, decorators: [ moduleMetadata({ - declarations: [ProgressBarComponent, MetadataQualityItemComponent], imports: [ CommonModule, UtilI18nModule, diff --git a/libs/ui/elements/src/lib/related-record-card/related-record-card.component.stories.ts b/libs/ui/elements/src/lib/related-record-card/related-record-card.component.stories.ts index c5cea47095..c01f9d3331 100644 --- a/libs/ui/elements/src/lib/related-record-card/related-record-card.component.stories.ts +++ b/libs/ui/elements/src/lib/related-record-card/related-record-card.component.stories.ts @@ -15,7 +15,6 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations' import { RouterModule } from '@angular/router' import { APP_BASE_HREF } from '@angular/common' import { importProvidersFrom } from '@angular/core' -import { ThumbnailComponent } from '../thumbnail/thumbnail.component' import { MatTooltipModule } from '@angular/material/tooltip' import { UtilSharedModule } from '@geonetwork-ui/util/shared' import { datasetRecordsFixture } from '@geonetwork-ui/common/fixtures' @@ -26,7 +25,6 @@ export default { component: RelatedRecordCardComponent, decorators: [ moduleMetadata({ - declarations: [ThumbnailComponent], imports: [ RouterModule, UtilI18nModule, diff --git a/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.stories.ts b/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.stories.ts index b35d7975d8..3b9b03fa66 100644 --- a/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.stories.ts +++ b/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.stories.ts @@ -15,14 +15,12 @@ import { TimeSincePipe } from './time-since.pipe' import { HttpClientModule } from '@angular/common/http' import { importProvidersFrom } from '@angular/core' import { ButtonComponent, TextAreaComponent } from '@geonetwork-ui/ui/inputs' -import { SpinningLoaderComponent } from '@geonetwork-ui/ui/widgets' export default { title: 'Elements/UserFeedbackItemComponent', component: UserFeedbackItemComponent, decorators: [ moduleMetadata({ - declarations: [UserFeedbackItemComponent, SpinningLoaderComponent], imports: [ CommonModule, UtilI18nModule, diff --git a/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.stories.ts b/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.stories.ts index 6c8f19c727..a71d587ed0 100644 --- a/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.stories.ts +++ b/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.stories.ts @@ -1,15 +1,27 @@ -import { Meta, moduleMetadata, StoryObj } from '@storybook/angular' +import { + applicationConfig, + Meta, + moduleMetadata, + StoryObj, +} from '@storybook/angular' import { SwitchToggleComponent } from './switch-toggle.component' -import { MatButtonToggleModule } from '@angular/material/button-toggle' -import { CommonModule } from '@angular/common' +import { importProvidersFrom } from '@angular/core' +import { TranslateModule } from '@ngx-translate/core' +import { TRANSLATE_DEFAULT_CONFIG } from '@geonetwork-ui/util/i18n' +import { HttpClientModule } from '@angular/common/http' export default { title: 'Inputs/SwitchToggle', component: SwitchToggleComponent, decorators: [ moduleMetadata({ - declarations: [], - imports: [SwitchToggleComponent, MatButtonToggleModule, CommonModule], + imports: [SwitchToggleComponent], + }), + applicationConfig({ + providers: [ + importProvidersFrom(TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG)), + importProvidersFrom(HttpClientModule), + ], }), ], } as Meta diff --git a/libs/ui/search/src/lib/record-preview-card/record-preview-card.component.stories.ts b/libs/ui/search/src/lib/record-preview-card/record-preview-card.component.stories.ts index 9c6f6cebe9..29be08ce46 100644 --- a/libs/ui/search/src/lib/record-preview-card/record-preview-card.component.stories.ts +++ b/libs/ui/search/src/lib/record-preview-card/record-preview-card.component.stories.ts @@ -5,7 +5,6 @@ import { StoryObj, } from '@storybook/angular' import { RecordPreviewCardComponent } from './record-preview-card.component' -import { ThumbnailComponent } from '@geonetwork-ui/ui/elements' import { importProvidersFrom } from '@angular/core' import { HttpClientModule } from '@angular/common/http' import { UiDatavizModule } from '@geonetwork-ui/ui/dataviz' @@ -19,7 +18,6 @@ export default { component: RecordPreviewCardComponent, decorators: [ moduleMetadata({ - declarations: [ThumbnailComponent], imports: [UiDatavizModule, UtilSharedModule], }), applicationConfig({ diff --git a/libs/ui/search/src/lib/record-preview-list/record-preview-list.component.stories.ts b/libs/ui/search/src/lib/record-preview-list/record-preview-list.component.stories.ts index 9d2fcf4432..c46c779f89 100644 --- a/libs/ui/search/src/lib/record-preview-list/record-preview-list.component.stories.ts +++ b/libs/ui/search/src/lib/record-preview-list/record-preview-list.component.stories.ts @@ -1,6 +1,5 @@ import { Meta, moduleMetadata, StoryObj } from '@storybook/angular' import { RecordPreviewListComponent } from './record-preview-list.component' -import { ThumbnailComponent } from '@geonetwork-ui/ui/elements' import { UtilSharedModule } from '@geonetwork-ui/util/shared' import { TranslateModule } from '@ngx-translate/core' import { TRANSLATE_DEFAULT_CONFIG } from '@geonetwork-ui/util/i18n' @@ -13,7 +12,6 @@ export default { component: RecordPreviewListComponent, decorators: [ moduleMetadata({ - declarations: [ThumbnailComponent], imports: [ TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG), UtilSharedModule, diff --git a/libs/ui/search/src/lib/record-preview-text/record-preview-text.component.stories.ts b/libs/ui/search/src/lib/record-preview-text/record-preview-text.component.stories.ts index 3af7c4b1f4..b4eb1cf2bf 100644 --- a/libs/ui/search/src/lib/record-preview-text/record-preview-text.component.stories.ts +++ b/libs/ui/search/src/lib/record-preview-text/record-preview-text.component.stories.ts @@ -5,7 +5,6 @@ import { StoryObj, } from '@storybook/angular' import { RecordPreviewTextComponent } from './record-preview-text.component' -import { ThumbnailComponent } from '@geonetwork-ui/ui/elements' import { UtilSharedModule } from '@geonetwork-ui/util/shared' import { importProvidersFrom } from '@angular/core' import { RecordPreviewTitleComponent } from '../record-preview-title/record-preview-title.component' @@ -22,7 +21,6 @@ export default { component: RecordPreviewTextComponent, decorators: [ moduleMetadata({ - declarations: [ThumbnailComponent], imports: [ TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG), UtilSharedModule, diff --git a/libs/ui/search/src/lib/record-preview-title/record-preview-title.component.stories.ts b/libs/ui/search/src/lib/record-preview-title/record-preview-title.component.stories.ts index 5ec91fe49f..e8cc5ccf55 100644 --- a/libs/ui/search/src/lib/record-preview-title/record-preview-title.component.stories.ts +++ b/libs/ui/search/src/lib/record-preview-title/record-preview-title.component.stories.ts @@ -1,6 +1,5 @@ import { Meta, moduleMetadata, StoryObj } from '@storybook/angular' import { RecordPreviewTitleComponent } from './record-preview-title.component' -import { ThumbnailComponent } from '@geonetwork-ui/ui/elements' import { UtilSharedModule } from '@geonetwork-ui/util/shared' import { TranslateModule } from '@ngx-translate/core' import { TRANSLATE_DEFAULT_CONFIG } from '@geonetwork-ui/util/i18n' @@ -13,7 +12,6 @@ export default { component: RecordPreviewTitleComponent, decorators: [ moduleMetadata({ - declarations: [ThumbnailComponent], imports: [ TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG), UtilSharedModule,