Skip to content

Updating to ng20.1 #16048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,960 changes: 1,019 additions & 941 deletions package-lock.json

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^20.0.0",
"@angular/common": "^20.0.0",
"@angular/compiler": "^20.0.0",
"@angular/core": "^20.0.0",
"@angular/elements": "^20.0.0",
"@angular/forms": "^20.0.0",
"@angular/platform-browser": "^20.0.0",
"@angular/platform-browser-dynamic": "^20.0.0",
"@angular/platform-server": "^20.0.0",
"@angular/router": "^20.0.0",
"@angular/ssr": "^20.0.0",
"@angular/animations": "^20.1.0",
"@angular/common": "^20.1.0",
"@angular/compiler": "^20.1.0",
"@angular/core": "^20.1.0",
"@angular/elements": "^20.1.0",
"@angular/forms": "^20.1.0",
"@angular/platform-browser": "^20.1.0",
"@angular/platform-browser-dynamic": "^20.1.0",
"@angular/platform-server": "^20.1.0",
"@angular/router": "^20.1.0",
"@angular/ssr": "^20.1.0",
"@igniteui/material-icons-extended": "^3.1.0",
"@lit-labs/ssr-dom-shim": "^1.3.0",
"@types/source-map": "0.5.2",
Expand All @@ -82,16 +82,16 @@
"zone.js": "~0.15.0"
},
"devDependencies": {
"@angular-devkit/schematics": "^20.0.0",
"@angular-eslint/builder": "^19.6.0",
"@angular-eslint/eslint-plugin": "^19.6.0",
"@angular-eslint/eslint-plugin-template": "^19.6.0",
"@angular-eslint/schematics": "^19.6.0",
"@angular-eslint/template-parser": "^19.6.0",
"@angular/build": "^20.0.0",
"@angular/cli": "^20.0.0",
"@angular/compiler-cli": "^20.0.0",
"@angular/language-service": "^20.0.0",
"@angular-devkit/schematics": "^20.1.0",
"@angular-eslint/builder": "^20.1.1",
"@angular-eslint/eslint-plugin": "^20.1.1",
"@angular-eslint/eslint-plugin-template": "^20.1.1",
"@angular-eslint/schematics": "^20.1.1",
"@angular-eslint/template-parser": "^20.1.1",
"@angular/build": "^20.1.0",
"@angular/cli": "^20.1.0",
"@angular/compiler-cli": "^20.1.0",
"@angular/language-service": "^20.1.0",
"@angularclass/hmr": "^3.0.0",
"@microsoft/signalr": "^7.0.12",
"@types/estree": "^1.0.0",
Expand All @@ -102,11 +102,11 @@
"@types/node": "^20.17.6",
"@types/sass-true": "^6.0.2",
"@types/webpack-env": "^1.18.3",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"@typescript-eslint/eslint-plugin": "^8.33.1",
"@typescript-eslint/parser": "^8.33.1",
"autoprefixer": "^10.4.16",
"del": "^6.0.0",
"eslint": "^9.15.0",
"eslint": "^9.28.0",
"fs-extra": "^11.3.0",
"globby": "^13.2.2",
"gulp": "^5.0.0",
Expand Down
6 changes: 4 additions & 2 deletions projects/bundle-test/src/app/form/form.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { Component, inject } from '@angular/core';
import { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import {
IGX_INPUT_GROUP_DIRECTIVES,
Expand All @@ -22,9 +22,11 @@ import {
styleUrls: ['./form.component.scss']
})
export class FormComponent {
private fb = inject(FormBuilder);

public form: FormGroup;

constructor(private fb: FormBuilder) {
constructor() {
this.form = this.fb.group({
'radio': [2, Validators.required],
'checkbox': [false, Validators.required],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChangeDetectorRef, Component, QueryList, TemplateRef, ViewChildren } from '@angular/core';
import { ChangeDetectorRef, Component, QueryList, TemplateRef, ViewChildren, inject } from '@angular/core';
import { Subject } from 'rxjs';
import { TemplateRefWrapper } from './template-ref-wrapper';

Expand All @@ -13,6 +13,8 @@ type TemplateFunction = (arg: any) => TemplateResult;
imports: []
})
export class TemplateWrapperComponent {
private cdr = inject(ChangeDetectorRef);


public templateFunctions: TemplateFunction[] = [];
public templateRendered = new Subject<HTMLElement>();
Expand All @@ -25,8 +27,6 @@ export class TemplateWrapperComponent {
*/
@ViewChildren(TemplateRef)
public templateRefs: QueryList<TemplateRef<any>>;

constructor(private cdr: ChangeDetectorRef) { }

protected litRender(container: HTMLElement, templateFunc: (arg: any) => TemplateResult, arg: any) {
const part = render(templateFunc(arg), container);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ActionType, BroadcastIconsChangeMessage, IgxIconBroadcastService, SvgIcon, } from './icon.broadcast.service';
import { Component, SecurityContext } from '@angular/core';
import { Component, SecurityContext, inject } from '@angular/core';
import { IconMeta, IgxIconService } from 'igniteui-angular';
import { wait } from 'igniteui-angular/src/lib/test-utils/ui-interactions.spec';

Expand Down Expand Up @@ -111,5 +111,6 @@ describe('Icon broadcast service', () => {
providers: [IgxIconBroadcastService, IgxIconService]
})
export class BroadcastServiceComponent {
constructor(public iconBroadcast: IgxIconBroadcastService, public iconService: IgxIconService) {}
iconBroadcast = inject(IgxIconBroadcastService);
iconService = inject(IgxIconService);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Injectable, Optional } from '@angular/core';
import { Injectable, inject } from '@angular/core';
import { PlatformUtil } from '../../../igniteui-angular/src/lib/core/utils';
import { IgxIconService } from '../../../igniteui-angular/src/lib/icon/icon.service';
import { IconMeta } from '../../../igniteui-angular/src/lib/icon/public_api';
Expand Down Expand Up @@ -26,12 +26,12 @@ export interface BroadcastIconsChangeMessage {
/** @hidden @internal **/
@Injectable()
export class IgxIconBroadcastService {
protected _iconService = inject(IgxIconService);
private _platformUtil = inject(PlatformUtil, { optional: true });

private iconBroadcastChannel: BroadcastChannel | null;

constructor(
protected _iconService: IgxIconService,
@Optional() private _platformUtil: PlatformUtil
) {
constructor() {
if (this._platformUtil?.isBrowser) {
this.create();

Expand Down
23 changes: 16 additions & 7 deletions projects/igniteui-angular-elements/src/lib/state.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, EnvironmentInjector, EventEmitter, Inject, Injector, Output, ViewContainerRef } from '@angular/core';
import { Component, EnvironmentInjector, EventEmitter, Injector, Output, ViewContainerRef, inject } from '@angular/core';
import { IPinningConfig, GridType, IGX_GRID_BASE} from '../../../igniteui-angular/src/lib/grids/common/grid.interface';
import { IFilteringExpressionsTree } from '../../../igniteui-angular/src/lib/data-operations/filtering-expressions-tree';
import { IPagingState } from '../../../igniteui-angular/src/lib/data-operations/paging-state.interface';
Expand Down Expand Up @@ -50,14 +50,23 @@ export interface IGridStateInfo {
standalone: true
})
export class IgxGridStateComponent extends IgxGridStateBaseDirective {
protected override viewRef: ViewContainerRef;
protected override envInjector: EnvironmentInjector;
protected override injector: Injector;


constructor() {
const grid = inject<GridType>(IGX_GRID_BASE);
const viewRef = inject(ViewContainerRef);
const envInjector = inject(EnvironmentInjector);
const injector = inject(Injector);

constructor(
@Inject(IGX_GRID_BASE) grid: GridType,
protected override viewRef: ViewContainerRef, protected override envInjector: EnvironmentInjector,
protected override injector: Injector,
) {
super(grid, viewRef, envInjector, injector);
}

this.viewRef = viewRef;
this.envInjector = envInjector;
this.injector = injector;
}

/**
* Restores grid features' state based on the IGridStateInfo object passed as an argument.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
AfterContentInit, AfterViewInit, ChangeDetectorRef, Component, ContentChildren, EventEmitter,
HostBinding, Input, OnDestroy, Output, QueryList, booleanAttribute
} from '@angular/core';
import { AfterContentInit, AfterViewInit, ChangeDetectorRef, Component, ContentChildren, EventEmitter, HostBinding, Input, OnDestroy, Output, QueryList, booleanAttribute, inject } from '@angular/core';
import { fromEvent, Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { ACCORDION_NAVIGATION_KEYS } from '../core/utils';
Expand Down Expand Up @@ -55,6 +52,8 @@ let NEXT_ID = 0;
standalone: true
})
export class IgxAccordionComponent implements AfterContentInit, AfterViewInit, OnDestroy {
private cdr = inject(ChangeDetectorRef);

/**
* Get/Set the `id` of the accordion component.
* Default value is `"igx-accordion-0"`;
Expand Down Expand Up @@ -216,8 +215,6 @@ export class IgxAccordionComponent implements AfterContentInit, AfterViewInit, O
private _enabledPanels!: IgxExpansionPanelComponent[];
private _singleBranchExpand = false;

constructor(private cdr: ChangeDetectorRef) { }

/** @hidden @internal **/
public ngAfterContentInit(): void {
this.updatePanelsAnimation();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
import {
Component,
Directive,
HostBinding,
Input,
Renderer2,
ViewContainerRef,
ContentChildren,
QueryList,
ViewChild,
TemplateRef,
AfterContentInit,
ChangeDetectorRef,
AfterViewInit,
ElementRef,
booleanAttribute
} from '@angular/core';
import { Component, Directive, HostBinding, Input, Renderer2, ViewContainerRef, ContentChildren, QueryList, ViewChild, TemplateRef, AfterContentInit, ChangeDetectorRef, AfterViewInit, ElementRef, booleanAttribute, inject } from '@angular/core';
import { ActionStripResourceStringsEN, IActionStripResourceStrings } from '../core/i18n/action-strip-resources';
import { IgxDropDownComponent } from '../drop-down/drop-down.component';
import { CloseScrollStrategy, OverlaySettings } from '../services/public_api';
Expand All @@ -35,7 +19,7 @@
standalone: true
})
export class IgxActionStripMenuItemDirective {
constructor(public templateRef: TemplateRef<any>) {}
templateRef = inject<TemplateRef<any>>(TemplateRef);

Check failure on line 22 in projects/igniteui-angular/src/lib/action-strip/action-strip.component.ts

View workflow job for this annotation

GitHub Actions / run-tests (22.x)

Missing accessibility modifier on class property templateRef

Check failure on line 22 in projects/igniteui-angular/src/lib/action-strip/action-strip.component.ts

View workflow job for this annotation

GitHub Actions / run-tests (20.x)

Missing accessibility modifier on class property templateRef
}

/* blazorElement */
Expand Down Expand Up @@ -86,6 +70,11 @@
providers: [{ provide: IgxActionStripToken, useExisting: IgxActionStripComponent }]
})
export class IgxActionStripComponent implements IgxActionStripToken, AfterContentInit, AfterViewInit {
private _viewContainer = inject(ViewContainerRef);
private renderer = inject(Renderer2);
protected el = inject(ElementRef);
cdr = inject(ChangeDetectorRef);

Check failure on line 76 in projects/igniteui-angular/src/lib/action-strip/action-strip.component.ts

View workflow job for this annotation

GitHub Actions / run-tests (22.x)

Missing accessibility modifier on class property cdr

Check failure on line 76 in projects/igniteui-angular/src/lib/action-strip/action-strip.component.ts

View workflow job for this annotation

GitHub Actions / run-tests (20.x)

Missing accessibility modifier on class property cdr


/* blazorSuppress */
/**
Expand Down Expand Up @@ -191,14 +180,6 @@
private _resourceStrings = getCurrentResourceStrings(ActionStripResourceStringsEN);
private _originalParent!: HTMLElement;

constructor(
private _viewContainer: ViewContainerRef,
private renderer: Renderer2,
protected el: ElementRef,
/** @hidden @internal **/
public cdr: ChangeDetectorRef,
) { }

/**
* Menu Items list.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IgxGridActionButtonComponent } from './grid-action-button.component';
import { Directive, Input, AfterViewInit, QueryList, ViewChildren, IterableDiffers, booleanAttribute } from '@angular/core';
import { Directive, Input, AfterViewInit, QueryList, ViewChildren, IterableDiffers, booleanAttribute, inject } from '@angular/core';
import { IgxActionStripComponent } from '../action-strip.component';
import { IgxRowDirective } from '../../grids/row.directive';
import { IgxIconService } from '../../icon/icon.service';
Expand All @@ -14,6 +14,9 @@ import { IgxIconService } from '../../icon/icon.service';
standalone: true
})
export class IgxGridActionsBaseDirective implements AfterViewInit {
protected iconService = inject(IgxIconService);
protected differs = inject(IterableDiffers);

/** @hidden @internal **/
@ViewChildren(IgxGridActionButtonComponent)
public buttons: QueryList<IgxGridActionButtonComponent>;
Expand Down Expand Up @@ -51,9 +54,6 @@ export class IgxGridActionsBaseDirective implements AfterViewInit {
return this.isRow(this.strip?.context) && !this.strip.context.inEditMode;
}

constructor(protected iconService: IgxIconService,
protected differs: IterableDiffers) { }

/**
* @hidden
* @internal
Expand Down
14 changes: 3 additions & 11 deletions projects/igniteui-angular/src/lib/avatar/avatar.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import { NgTemplateOutlet } from '@angular/common';
import {
Component,
ElementRef,
HostBinding,
Input,
OnInit,
TemplateRef,
ViewChild
} from '@angular/core';
import { Component, ElementRef, HostBinding, Input, OnInit, TemplateRef, ViewChild, inject } from '@angular/core';

import { normalizeURI } from '../core/utils';
import { IgxIconComponent } from '../icon/icon.component';
Expand Down Expand Up @@ -56,6 +48,8 @@ export type IgxAvatarType = (typeof IgxAvatarType)[keyof typeof IgxAvatarType];
imports: [IgxIconComponent, NgTemplateOutlet]
})
export class IgxAvatarComponent implements OnInit {
elementRef = inject(ElementRef);

/**
* Returns the `aria-label` attribute of the avatar.
*
Expand Down Expand Up @@ -332,8 +326,6 @@ export class IgxAvatarComponent implements OnInit {
}
}

constructor(public elementRef: ElementRef) { }

/**
* Returns the css url of the image.
*
Expand Down
15 changes: 3 additions & 12 deletions projects/igniteui-angular/src/lib/banner/banner.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
import {
Component,
ContentChild,
ElementRef,
EventEmitter,
HostBinding,
Input,
Output,
ViewChild
} from '@angular/core';
import { Component, ContentChild, ElementRef, EventEmitter, HostBinding, Input, Output, ViewChild, inject } from '@angular/core';

import { IgxIconComponent } from '../icon/icon.component';
import { IToggleView } from '../core/navigation';
Expand Down Expand Up @@ -51,6 +42,8 @@ export interface BannerCancelEventArgs extends BannerEventArgs, CancelableEventA
imports: [IgxExpansionPanelComponent, IgxExpansionPanelBodyComponent, IgxButtonDirective, IgxRippleDirective]
})
export class IgxBannerComponent implements IToggleView {
elementRef = inject<ElementRef<HTMLElement>>(ElementRef);

/**
* @hidden
*/
Expand Down Expand Up @@ -237,8 +230,6 @@ export class IgxBannerComponent implements IToggleView {
private _animationSettings: ToggleAnimationSettings;
private _resourceStrings = getCurrentResourceStrings(BannerResourceStringsEN);

constructor(public elementRef: ElementRef<HTMLElement>) { }

/**
* Opens the banner
*
Expand Down
Loading