From fad8409fa5016892bfa69723bba34788202632f8 Mon Sep 17 00:00:00 2001 From: Shlomi Assaf Date: Sun, 15 Mar 2020 07:56:23 +0200 Subject: [PATCH] fix(ngrid): allow runnig in ViewEngine mode (fixes #84) (#86) --- .../context-menu/src/lib/context-menu.module.ts | 7 ++++++- .../paginator/src/lib/table-paginator.module.ts | 2 ++ .../selection-column/src/lib/table-checkbox.module.ts | 2 ++ libs/ngrid-material/sort/src/lib/mat-sort.module.ts | 2 ++ libs/ngrid/detail-row/src/lib/table-detail-row.module.ts | 2 ++ libs/ngrid/drag/src/lib/table-drag.module.ts | 2 ++ 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/libs/ngrid-material/context-menu/src/lib/context-menu.module.ts b/libs/ngrid-material/context-menu/src/lib/context-menu.module.ts index 3d33b249d..2d9f98e58 100644 --- a/libs/ngrid-material/context-menu/src/lib/context-menu.module.ts +++ b/libs/ngrid-material/context-menu/src/lib/context-menu.module.ts @@ -33,7 +33,12 @@ import { MatExcelStyleHeaderMenu } from './header-context/styles/excel-style-hea ], exports: [ PblNgridMatHeaderContextMenuPlugin, - ] + ], + entryComponents: [ + // TODO: remove when ViewEngine is no longer supported by angular (V11 ???) + MatHeaderContextMenuTrigger, + MatExcelStyleHeaderMenu, + ], }) export class PblNgridContextMenuModule { constructor(@Optional() @SkipSelf() parentModule: PblNgridContextMenuModule, diff --git a/libs/ngrid-material/paginator/src/lib/table-paginator.module.ts b/libs/ngrid-material/paginator/src/lib/table-paginator.module.ts index 214258f98..666af8c11 100644 --- a/libs/ngrid-material/paginator/src/lib/table-paginator.module.ts +++ b/libs/ngrid-material/paginator/src/lib/table-paginator.module.ts @@ -14,6 +14,8 @@ import { PblPaginatorComponent } from './table-paginator.component'; imports: [ CommonModule, MatPaginatorModule, MatSelectModule, MatTooltipModule, MatButtonModule, PblNgridModule ], declarations: [ PblPaginatorComponent ], exports: [ PblPaginatorComponent ], + // TODO: remove when ViewEngine is no longer supported by angular (V11 ???) + entryComponents: [ PblPaginatorComponent, MatPaginator ] }) export class PblNgridPaginatorModule { constructor(cf: ComponentFactoryResolver, injector: Injector) { diff --git a/libs/ngrid-material/selection-column/src/lib/table-checkbox.module.ts b/libs/ngrid-material/selection-column/src/lib/table-checkbox.module.ts index 4acca31bd..b6a4b686f 100644 --- a/libs/ngrid-material/selection-column/src/lib/table-checkbox.module.ts +++ b/libs/ngrid-material/selection-column/src/lib/table-checkbox.module.ts @@ -10,5 +10,7 @@ import { PblNgridCheckboxComponent } from './table-checkbox.component'; imports: [ CommonModule, MatCheckboxModule, PblNgridModule ], declarations: [ PblNgridMatCheckboxSelectionDirective, PblNgridCheckboxComponent ], exports: [ PblNgridMatCheckboxSelectionDirective, PblNgridCheckboxComponent ], + // TODO: remove when ViewEngine is no longer supported by angular (V11 ???) + entryComponents: [ PblNgridCheckboxComponent ] }) export class PblNgridCheckboxModule { } diff --git a/libs/ngrid-material/sort/src/lib/mat-sort.module.ts b/libs/ngrid-material/sort/src/lib/mat-sort.module.ts index a2ca8bd4a..58d6d13bc 100644 --- a/libs/ngrid-material/sort/src/lib/mat-sort.module.ts +++ b/libs/ngrid-material/sort/src/lib/mat-sort.module.ts @@ -11,6 +11,8 @@ import { MatSortExtension } from './mat-sort-component-extension'; imports: [ CommonModule, MatButtonModule, MatSortModule, PblNgridModule ], declarations: [ PblNgridMatSortDirective ], exports: [ PblNgridMatSortDirective, MatSortModule ], + // TODO: remove when ViewEngine is no longer supported by angular (V11 ???) + entryComponents: [ MatSortHeader ], }) export class PblNgridMatSortModule { constructor(private registry: PblNgridRegistryService, cfr: ComponentFactoryResolver) { diff --git a/libs/ngrid/detail-row/src/lib/table-detail-row.module.ts b/libs/ngrid/detail-row/src/lib/table-detail-row.module.ts index e123b7ec1..f01e9862a 100644 --- a/libs/ngrid/detail-row/src/lib/table-detail-row.module.ts +++ b/libs/ngrid/detail-row/src/lib/table-detail-row.module.ts @@ -20,5 +20,7 @@ const DETAIL_ROW = [ imports: [ CommonModule, CdkTableModule, PblNgridModule, PblNgridTargetEventsModule ], declarations: [ DETAIL_ROW, PblNgridDefaultDetailRowParentComponent ], exports: [ DETAIL_ROW ], + // TODO: remove when ViewEngine is no longer supported by angular (V11 ???) + entryComponents: [ PblNgridDetailRowComponent, PblNgridDefaultDetailRowParentComponent ], }) export class PblNgridDetailRowModule { } diff --git a/libs/ngrid/drag/src/lib/table-drag.module.ts b/libs/ngrid/drag/src/lib/table-drag.module.ts index 6656252bf..045bcf6cb 100644 --- a/libs/ngrid/drag/src/lib/table-drag.module.ts +++ b/libs/ngrid/drag/src/lib/table-drag.module.ts @@ -37,6 +37,8 @@ import { DragPluginDefaultTemplatesComponent } from './default-settings.componen PblNgridAggregationContainerDirective, PblNgridDragResizeComponent, PblNgridCellResizerRefDirective, ], + // TODO: remove when ViewEngine is no longer supported by angular (V11 ???) + entryComponents: [ DragPluginDefaultTemplatesComponent ] }) export class PblNgridDragModule {