From aecc2a30d1c44272f777afd26a41f2d0edd52b30 Mon Sep 17 00:00:00 2001 From: Damyan Petev Date: Wed, 8 Jan 2025 16:56:56 +0200 Subject: [PATCH 1/2] fix(*): unused standalone imports cleanup --- .../src/lib/action-strip/action-strip.component.ts | 2 -- .../grid-actions/grid-action-button.component.ts | 3 +-- .../src/lib/calendar/calendar.component.ts | 4 ++-- .../lib/calendar/month-picker/month-picker.component.ts | 3 +-- .../src/lib/calendar/months-view/months-view.component.ts | 4 ++-- .../filtering/excel-style/excel-style-header.component.ts | 3 +-- .../pivot-row-dimension-header-group.component.ts | 3 +-- .../pivot-grid/pivot-row-dimension-mrl-row.component.ts | 7 ++----- .../grids/pivot-grid/pivot-row-header-group.component.ts | 3 +-- .../toolbar/grid-toolbar-advanced-filtering.component.ts | 4 ++-- .../lib/grids/toolbar/grid-toolbar-exporter.component.ts | 4 ++-- projects/igniteui-angular/src/lib/icon/icon.component.ts | 1 - .../src/lib/paginator/paginator.component.ts | 6 ++---- 13 files changed, 17 insertions(+), 30 deletions(-) diff --git a/projects/igniteui-angular/src/lib/action-strip/action-strip.component.ts b/projects/igniteui-angular/src/lib/action-strip/action-strip.component.ts index 5c407a0f3f0..d4a2a56f4eb 100644 --- a/projects/igniteui-angular/src/lib/action-strip/action-strip.component.ts +++ b/projects/igniteui-angular/src/lib/action-strip/action-strip.component.ts @@ -24,7 +24,6 @@ import { IgxIconComponent } from '../icon/icon.component'; import { IgxDropDownItemNavigationDirective } from '../drop-down/drop-down-navigation.directive'; import { IgxToggleActionDirective } from '../directives/toggle/toggle.directive'; import { IgxRippleDirective } from '../directives/ripple/ripple.directive'; -import { IgxButtonDirective } from '../directives/button/button.directive'; import { NgIf, NgFor, NgTemplateOutlet } from '@angular/common'; import { getCurrentResourceStrings } from '../core/i18n/resources'; import { IgxIconButtonDirective } from '../directives/button/icon-button.directive'; @@ -77,7 +76,6 @@ export class IgxActionStripMenuItemDirective { NgIf, NgFor, NgTemplateOutlet, - IgxButtonDirective, IgxIconButtonDirective, IgxRippleDirective, IgxToggleActionDirective, diff --git a/projects/igniteui-angular/src/lib/action-strip/grid-actions/grid-action-button.component.ts b/projects/igniteui-angular/src/lib/action-strip/grid-actions/grid-action-button.component.ts index a9fda2f4c33..545b9065410 100644 --- a/projects/igniteui-angular/src/lib/action-strip/grid-actions/grid-action-button.component.ts +++ b/projects/igniteui-angular/src/lib/action-strip/grid-actions/grid-action-button.component.ts @@ -1,7 +1,6 @@ import { Component, Input, TemplateRef, ViewChild, Output, EventEmitter, ElementRef, booleanAttribute } from '@angular/core'; import { IgxIconComponent } from '../../icon/icon.component'; import { IgxRippleDirective } from '../../directives/ripple/ripple.directive'; -import { IgxButtonDirective } from '../../directives/button/button.directive'; import { NgIf } from '@angular/common'; import { IgxIconButtonDirective } from '../../directives/button/icon-button.directive'; @@ -11,7 +10,7 @@ import { IgxIconButtonDirective } from '../../directives/button/icon-button.dire @Component({ selector: 'igx-grid-action-button', templateUrl: 'grid-action-button.component.html', - imports: [NgIf, IgxButtonDirective, IgxRippleDirective, IgxIconComponent, IgxIconButtonDirective] + imports: [NgIf, IgxRippleDirective, IgxIconComponent, IgxIconButtonDirective] }) export class IgxGridActionButtonComponent { diff --git a/projects/igniteui-angular/src/lib/calendar/calendar.component.ts b/projects/igniteui-angular/src/lib/calendar/calendar.component.ts index 9cf4c8c54a8..b7f21eaa3dc 100644 --- a/projects/igniteui-angular/src/lib/calendar/calendar.component.ts +++ b/projects/igniteui-angular/src/lib/calendar/calendar.component.ts @@ -13,7 +13,7 @@ import { booleanAttribute, HostListener, } from '@angular/core'; -import { NgIf, NgTemplateOutlet, NgStyle, NgFor, DatePipe } from '@angular/common'; +import { NgIf, NgTemplateOutlet, NgFor, DatePipe } from '@angular/common'; import { NG_VALUE_ACCESSOR } from '@angular/forms'; import { @@ -71,7 +71,7 @@ let NEXT_ID = 0; ], selector: 'igx-calendar', templateUrl: 'calendar.component.html', - imports: [NgIf, NgTemplateOutlet, IgxCalendarScrollPageDirective, NgStyle, IgxIconComponent, NgFor, IgxDaysViewComponent, IgxMonthsViewComponent, IgxYearsViewComponent, DatePipe, IgxMonthViewSlotsCalendar, IgxGetViewDateCalendar] + imports: [NgIf, NgTemplateOutlet, IgxCalendarScrollPageDirective, IgxIconComponent, NgFor, IgxDaysViewComponent, IgxMonthsViewComponent, IgxYearsViewComponent, DatePipe, IgxMonthViewSlotsCalendar, IgxGetViewDateCalendar] }) export class IgxCalendarComponent extends IgxCalendarBaseDirective implements AfterViewInit, OnDestroy { /** diff --git a/projects/igniteui-angular/src/lib/calendar/month-picker/month-picker.component.ts b/projects/igniteui-angular/src/lib/calendar/month-picker/month-picker.component.ts index 94b847b09de..6c3e4691c49 100644 --- a/projects/igniteui-angular/src/lib/calendar/month-picker/month-picker.component.ts +++ b/projects/igniteui-angular/src/lib/calendar/month-picker/month-picker.component.ts @@ -9,7 +9,7 @@ import { OnDestroy, OnInit, } from "@angular/core"; -import { NgIf, NgStyle, NgTemplateOutlet, DatePipe } from "@angular/common"; +import { NgIf, NgTemplateOutlet, DatePipe } from "@angular/common"; import { NG_VALUE_ACCESSOR } from "@angular/forms"; import { IgxMonthsViewComponent } from "../months-view/months-view.component"; @@ -39,7 +39,6 @@ let NEXT_ID = 0; templateUrl: "month-picker.component.html", imports: [ NgIf, - NgStyle, NgTemplateOutlet, DatePipe, IgxIconComponent, diff --git a/projects/igniteui-angular/src/lib/calendar/months-view/months-view.component.ts b/projects/igniteui-angular/src/lib/calendar/months-view/months-view.component.ts index 1520fbbf8b3..8323a1f79c3 100644 --- a/projects/igniteui-angular/src/lib/calendar/months-view/months-view.component.ts +++ b/projects/igniteui-angular/src/lib/calendar/months-view/months-view.component.ts @@ -7,7 +7,7 @@ import { Inject, } from "@angular/core"; import { IgxCalendarMonthDirective } from "../calendar.directives"; -import { NgFor, TitleCasePipe, DatePipe } from "@angular/common"; +import { NgFor, TitleCasePipe } from "@angular/common"; import { IgxCalendarViewDirective, DAY_INTERVAL_TOKEN, @@ -33,7 +33,7 @@ let NEXT_ID = 0; ], selector: "igx-months-view", templateUrl: "months-view.component.html", - imports: [NgFor, IgxCalendarMonthDirective, TitleCasePipe, DatePipe] + imports: [NgFor, IgxCalendarMonthDirective, TitleCasePipe] }) export class IgxMonthsViewComponent extends IgxCalendarViewDirective implements ControlValueAccessor { #standalone = true; diff --git a/projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-header.component.ts b/projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-header.component.ts index 572e0a71cdd..f56b1831acd 100644 --- a/projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-header.component.ts +++ b/projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-header.component.ts @@ -1,7 +1,6 @@ import { Component, Input, booleanAttribute } from '@angular/core'; import { BaseFilteringComponent } from './base-filtering.component'; import { IgxIconComponent } from '../../../icon/icon.component'; -import { IgxButtonDirective } from '../../../directives/button/button.directive'; import { NgIf, NgClass } from '@angular/common'; import { IgxIconButtonDirective } from '../../../directives/button/icon-button.directive'; @@ -11,7 +10,7 @@ import { IgxIconButtonDirective } from '../../../directives/button/icon-button.d @Component({ selector: 'igx-excel-style-header', templateUrl: './excel-style-header.component.html', - imports: [NgIf, IgxButtonDirective, NgClass, IgxIconComponent, IgxIconButtonDirective] + imports: [NgIf, NgClass, IgxIconComponent, IgxIconButtonDirective] }) export class IgxExcelStyleHeaderComponent { /** diff --git a/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-row-dimension-header-group.component.ts b/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-row-dimension-header-group.component.ts index 94b75dfc1e0..d6c31e60447 100644 --- a/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-row-dimension-header-group.component.ts +++ b/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-row-dimension-header-group.component.ts @@ -9,7 +9,6 @@ import { IPivotDimension, PivotRowHeaderGroupType } from './pivot-grid.interface import { IgxPivotRowDimensionHeaderComponent } from './pivot-row-dimension-header.component'; import { IgxHeaderGroupStylePipe } from '../headers/pipes'; import { IgxPivotResizeHandleDirective } from '../resizing/pivot-grid/pivot-resize-handle.directive'; -import { IgxGridFilteringCellComponent } from '../filtering/base/grid-filtering-cell.component'; import { IgxColumnMovingDropDirective } from '../moving/moving.drop.directive'; import { IgxColumnMovingDragDirective } from '../moving/moving.drag.directive'; import { NgIf, NgClass, NgStyle } from '@angular/common'; @@ -23,7 +22,7 @@ import { IMultiRowLayoutNode } from '../common/types'; changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-pivot-row-dimension-header-group', templateUrl: './pivot-row-dimension-header-group.component.html', - imports: [IgxIconComponent, NgIf, IgxPivotRowDimensionHeaderComponent, NgClass, NgStyle, IgxColumnMovingDragDirective, IgxColumnMovingDropDirective, IgxGridFilteringCellComponent, IgxPivotResizeHandleDirective, IgxHeaderGroupStylePipe] + imports: [IgxIconComponent, NgIf, IgxPivotRowDimensionHeaderComponent, NgClass, NgStyle, IgxColumnMovingDragDirective, IgxColumnMovingDropDirective, IgxPivotResizeHandleDirective, IgxHeaderGroupStylePipe] }) export class IgxPivotRowDimensionHeaderGroupComponent extends IgxGridHeaderGroupComponent implements PivotRowHeaderGroupType { diff --git a/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-row-dimension-mrl-row.component.ts b/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-row-dimension-mrl-row.component.ts index a380f708432..9e8c61468b2 100644 --- a/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-row-dimension-mrl-row.component.ts +++ b/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-row-dimension-mrl-row.component.ts @@ -15,9 +15,7 @@ import { import { IGX_GRID_BASE, PivotGridType } from '../common/grid.interface'; import { IgxGridHeaderRowComponent } from '../headers/grid-header-row.component'; import { IPivotDimension, IPivotDimensionData, IPivotGridRecord } from './pivot-grid.interface'; -import { IgxHeaderGroupWidthPipe, IgxHeaderGroupStylePipe } from '../headers/pipes'; -import { IgxIconComponent } from '../../icon/icon.component'; -import { NgClass, NgFor, NgStyle } from '@angular/common'; +import { NgFor } from '@angular/common'; import { IgxPivotRowDimensionContentComponent } from './pivot-row-dimension-content.component'; import { IgxPivotGridHorizontalRowCellMerging } from './pivot-grid.pipes'; @@ -33,8 +31,7 @@ import { IgxPivotGridHorizontalRowCellMerging } from './pivot-grid.pipes'; changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-pivot-row-dimension-mrl-row', templateUrl: './pivot-row-dimension-mrl-row.component.html', - imports: [NgClass, NgStyle, NgFor, IgxIconComponent, IgxHeaderGroupWidthPipe, IgxHeaderGroupStylePipe, - IgxPivotRowDimensionContentComponent, IgxPivotGridHorizontalRowCellMerging] + imports: [NgFor, IgxPivotRowDimensionContentComponent, IgxPivotGridHorizontalRowCellMerging] }) export class IgxPivotRowDimensionMrlRowComponent extends IgxGridHeaderRowComponent { diff --git a/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-row-header-group.component.ts b/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-row-header-group.component.ts index eba34336798..e804570aed4 100644 --- a/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-row-header-group.component.ts +++ b/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-row-header-group.component.ts @@ -8,7 +8,6 @@ import { IPivotDimension, PivotRowHeaderGroupType } from './pivot-grid.interface import { IgxPivotRowDimensionHeaderComponent } from './pivot-row-dimension-header.component'; import { IgxHeaderGroupStylePipe } from '../headers/pipes'; import { IgxPivotResizeHandleDirective } from '../resizing/pivot-grid/pivot-resize-handle.directive'; -import { IgxGridFilteringCellComponent } from '../filtering/base/grid-filtering-cell.component'; import { IgxColumnMovingDropDirective } from '../moving/moving.drop.directive'; import { IgxColumnMovingDragDirective } from '../moving/moving.drag.directive'; import { NgIf, NgClass, NgStyle } from '@angular/common'; @@ -22,7 +21,7 @@ import { SortingDirection } from '../../data-operations/sorting-strategy'; changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-pivot-row-header-group', templateUrl: './pivot-row-dimension-header-group.component.html', - imports: [IgxIconComponent, NgIf, IgxPivotRowDimensionHeaderComponent, NgClass, NgStyle, IgxColumnMovingDragDirective, IgxColumnMovingDropDirective, IgxGridFilteringCellComponent, IgxPivotResizeHandleDirective, IgxHeaderGroupStylePipe] + imports: [IgxIconComponent, NgIf, IgxPivotRowDimensionHeaderComponent, NgClass, NgStyle, IgxColumnMovingDragDirective, IgxColumnMovingDropDirective, IgxPivotResizeHandleDirective, IgxHeaderGroupStylePipe] }) export class IgxPivotRowHeaderGroupComponent extends IgxGridHeaderGroupComponent implements PivotRowHeaderGroupType { diff --git a/projects/igniteui-angular/src/lib/grids/toolbar/grid-toolbar-advanced-filtering.component.ts b/projects/igniteui-angular/src/lib/grids/toolbar/grid-toolbar-advanced-filtering.component.ts index f1f0c18a054..d71142f1442 100644 --- a/projects/igniteui-angular/src/lib/grids/toolbar/grid-toolbar-advanced-filtering.component.ts +++ b/projects/igniteui-angular/src/lib/grids/toolbar/grid-toolbar-advanced-filtering.component.ts @@ -2,7 +2,7 @@ import { AfterViewInit, Component, Inject, Input } from '@angular/core'; import { IgxToolbarToken } from './token'; import { OverlaySettings } from '../../services/overlay/utilities'; import { IgxIconComponent } from '../../icon/icon.component'; -import { NgClass, NgIf } from '@angular/common'; +import { NgIf } from '@angular/common'; import { IgxRippleDirective } from '../../directives/ripple/ripple.directive'; import { IgxButtonDirective } from '../../directives/button/button.directive'; import { FilteringExpressionsTree, IFilteringExpressionsTree } from '../../data-operations/filtering-expressions-tree'; @@ -30,7 +30,7 @@ import { IFilteringExpression } from '../../data-operations/filtering-expression @Component({ selector: 'igx-grid-toolbar-advanced-filtering', templateUrl: './grid-toolbar-advanced-filtering.component.html', - imports: [IgxButtonDirective, IgxRippleDirective, NgClass, IgxIconComponent, NgIf] + imports: [IgxButtonDirective, IgxRippleDirective, IgxIconComponent, NgIf] }) export class IgxGridToolbarAdvancedFilteringComponent implements AfterViewInit { protected numberOfColumns: number; diff --git a/projects/igniteui-angular/src/lib/grids/toolbar/grid-toolbar-exporter.component.ts b/projects/igniteui-angular/src/lib/grids/toolbar/grid-toolbar-exporter.component.ts index 129d76c7d4d..fd6255e398e 100644 --- a/projects/igniteui-angular/src/lib/grids/toolbar/grid-toolbar-exporter.component.ts +++ b/projects/igniteui-angular/src/lib/grids/toolbar/grid-toolbar-exporter.component.ts @@ -13,7 +13,7 @@ import { import { IgxToggleDirective } from '../../directives/toggle/toggle.directive'; import { GridType } from '../common/grid.interface'; import { IgxToolbarToken } from './token'; -import { NgIf, NgTemplateOutlet } from '@angular/common'; +import { NgIf } from '@angular/common'; import { IgxIconComponent } from '../../icon/icon.component'; import { IgxRippleDirective } from '../../directives/ripple/ripple.directive'; import { IgxButtonDirective } from '../../directives/button/button.directive'; @@ -51,7 +51,7 @@ export interface IgxExporterEvent { @Component({ selector: 'igx-grid-toolbar-exporter', templateUrl: './grid-toolbar-exporter.component.html', - imports: [IgxButtonDirective, IgxRippleDirective, IgxIconComponent, NgIf, IgxToggleDirective, IgxExcelTextDirective, NgTemplateOutlet, IgxCSVTextDirective] + imports: [IgxButtonDirective, IgxRippleDirective, IgxIconComponent, NgIf, IgxToggleDirective, IgxExcelTextDirective, IgxCSVTextDirective] }) export class IgxGridToolbarExporterComponent extends BaseToolbarDirective { diff --git a/projects/igniteui-angular/src/lib/icon/icon.component.ts b/projects/igniteui-angular/src/lib/icon/icon.component.ts index 928424fa13a..8186a6d85eb 100644 --- a/projects/igniteui-angular/src/lib/icon/icon.component.ts +++ b/projects/igniteui-angular/src/lib/icon/icon.component.ts @@ -41,7 +41,6 @@ import { NgIf, NgTemplateOutlet } from "@angular/common"; @Component({ selector: "igx-icon", templateUrl: "icon.component.html", - imports: [NgTemplateOutlet, NgIf] }) export class IgxIconComponent implements OnInit, OnChanges, OnDestroy { private _iconRef: IconReference; diff --git a/projects/igniteui-angular/src/lib/paginator/paginator.component.ts b/projects/igniteui-angular/src/lib/paginator/paginator.component.ts index 9214a7d6761..18974d73170 100644 --- a/projects/igniteui-angular/src/lib/paginator/paginator.component.ts +++ b/projects/igniteui-angular/src/lib/paginator/paginator.component.ts @@ -3,12 +3,10 @@ import { IPageCancellableEventArgs, IPageEventArgs } from './paginator-interface import { IPaginatorResourceStrings, PaginatorResourceStringsEN } from '../core/i18n/paginator-resources'; import { OverlaySettings } from '../services/overlay/utilities'; import { IgxSelectItemComponent } from '../select/select-item.component'; -import { IgxLabelDirective } from '../directives/label/label.directive'; import { FormsModule } from '@angular/forms'; import { IgxSelectComponent } from '../select/select.component'; import { IgxIconComponent } from '../icon/icon.component'; import { IgxRippleDirective } from '../directives/ripple/ripple.directive'; -import { IgxButtonDirective } from '../directives/button/button.directive'; import { NgIf, NgFor } from '@angular/common'; import { getCurrentResourceStrings } from '../core/i18n/resources'; import { IgxIconButtonDirective } from '../directives/button/icon-button.directive'; @@ -359,7 +357,7 @@ export class IgxPaginatorComponent implements IgxPaginatorToken { @Component({ selector: 'igx-page-size', templateUrl: 'page-size-selector.component.html', - imports: [IgxSelectComponent, FormsModule, IgxLabelDirective, NgFor, IgxSelectItemComponent] + imports: [IgxSelectComponent, FormsModule, NgFor, IgxSelectItemComponent] }) export class IgxPageSizeSelectorComponent { /** @@ -376,7 +374,7 @@ export class IgxPageSizeSelectorComponent { @Component({ selector: 'igx-page-nav', templateUrl: 'pager.component.html', - imports: [IgxButtonDirective, IgxRippleDirective, IgxIconComponent, IgxIconButtonDirective] + imports: [IgxRippleDirective, IgxIconComponent, IgxIconButtonDirective] }) export class IgxPageNavigationComponent { /** From 2b29cce1c0cee2fb4b7ab5f1534159e0c75dab5d Mon Sep 17 00:00:00 2001 From: Damyan Petev Date: Wed, 8 Jan 2025 17:29:14 +0200 Subject: [PATCH 2/2] build(*): set all extended diagnostics to error --- tsconfig.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tsconfig.json b/tsconfig.json index 12e1d561ff1..81f0eda5bfa 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -46,6 +46,9 @@ "angularCompilerOptions": { "generateDeepReexports": true, "strictTemplates": true, + "extendedDiagnostics": { + "defaultCategory": "error" + }, "strictInjectionParameters": true, "strictInputAccessModifiers": true, }