From b917e621cc25d387a395c6c83f8a783ec7f4b821 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Wed, 11 Oct 2023 17:05:44 +0200 Subject: [PATCH] fix(admin-ui): Make ExtensionHostComponent work with new extension APIs The new APIs require standalone components. --- .../components/extension-host/extension-host.component.ts | 3 +++ packages/admin-ui/src/lib/core/src/shared/shared.module.ts | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/admin-ui/src/lib/core/src/shared/components/extension-host/extension-host.component.ts b/packages/admin-ui/src/lib/core/src/shared/components/extension-host/extension-host.component.ts index f4f7e4ed74..ffabc06563 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/extension-host/extension-host.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/extension-host/extension-host.component.ts @@ -9,6 +9,7 @@ import { } from '@angular/core'; import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'; import { ActivatedRoute } from '@angular/router'; +import { SharedModule } from '../../shared.module'; import { ExtensionHostConfig } from './extension-host-config'; import { ExtensionHostService } from './extension-host.service'; @@ -22,6 +23,8 @@ import { ExtensionHostService } from './extension-host.service'; templateUrl: './extension-host.component.html', styleUrls: ['./extension-host.component.scss'], changeDetection: ChangeDetectionStrategy.Default, + standalone: true, + imports: [SharedModule], providers: [ExtensionHostService], }) export class ExtensionHostComponent implements OnInit, AfterViewInit, OnDestroy { diff --git a/packages/admin-ui/src/lib/core/src/shared/shared.module.ts b/packages/admin-ui/src/lib/core/src/shared/shared.module.ts index 5f03fd28de..9ca91622c4 100644 --- a/packages/admin-ui/src/lib/core/src/shared/shared.module.ts +++ b/packages/admin-ui/src/lib/core/src/shared/shared.module.ts @@ -59,7 +59,6 @@ import { DropdownComponent } from './components/dropdown/dropdown.component'; import { EditNoteDialogComponent } from './components/edit-note-dialog/edit-note-dialog.component'; import { EmptyPlaceholderComponent } from './components/empty-placeholder/empty-placeholder.component'; import { EntityInfoComponent } from './components/entity-info/entity-info.component'; -import { ExtensionHostComponent } from './components/extension-host/extension-host.component'; import { FacetValueChipComponent } from './components/facet-value-chip/facet-value-chip.component'; import { FacetValueSelectorComponent } from './components/facet-value-selector/facet-value-selector.component'; import { FocalPointControlComponent } from './components/focal-point-control/focal-point-control.component'; @@ -249,7 +248,6 @@ const DECLARATIONS = [ ChannelAssignmentControlComponent, ChannelLabelPipe, IfDefaultChannelActiveDirective, - ExtensionHostComponent, CustomFieldLabelPipe, CustomFieldDescriptionPipe, FocalPointControlComponent,