Skip to content

Commit

Permalink
chore: bump angular to v19 (#8905)
Browse files Browse the repository at this point in the history
* chore: bump angular to v19

* chore: remove ngx-quicklink

* test: fix ci issue

* chore: remove universal doc

* docs: update readme
  • Loading branch information
Laffery authored Dec 5, 2024
1 parent 2bddb8c commit a65a32f
Show file tree
Hide file tree
Showing 1,142 changed files with 5,306 additions and 6,328 deletions.
24 changes: 2 additions & 22 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,28 +67,8 @@ module.exports = {
default: 'array-simple'
}
],
'@typescript-eslint/ban-types': [
'error',
{
types: {
Object: {
message: 'Use {} instead.'
},
String: {
message: 'Use string instead.'
},
Number: {
message: 'Use number instead.'
},
Boolean: {
message: 'Use boolean instead.'
},
Function: {
message: 'Use specific callable interface instead.'
}
}
}
],
'@typescript-eslint/no-unsafe-function-type': 'error',
'@typescript-eslint/no-wrapper-object-types': 'error',
'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/explicit-member-accessibility': [
'off',
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ Set the dir attribute on the document body or html tag.
Or use Angular CDK bidi module for bi-directional.

```typescript
import {BidiModule} from '@angular/cdk/bidi';
import { BidiModule } from '@angular/cdk/bidi';
```

Super thanks to [@saeedrahimi](https://github.com/saeedrahimi) [@hdm91](https://github.com/hdm91) [@HDaghash](https://github.com/HDaghash) [@hmdnikoo](https://github.com/hmdnikoo) for contributing this!
Expand Down
2 changes: 1 addition & 1 deletion README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ NG-ZORRO

## 🖥 支持环境

- Angular `^18.0.0` [![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/ng-zorro-antd)
- Angular `^19.0.0` [![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/ng-zorro-antd)
- 支持服务端渲染
- 现代浏览器,[浏览器支持](https://angular.cn/reference/versions#browser-support)
- [Electron](http://electron.atom.io/)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ English | [简体中文](README-zh_CN.md)

## 🖥 Environment Support

* Angular `^18.0.0` [![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/ng-zorro-antd)
* Angular `^19.0.0` [![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/ng-zorro-antd)
* Server-side Rendering
* Modern browsers including the following [specific versions](https://angular.dev/reference/versions#browser-support)
* [Electron](http://electron.atom.io/)
Expand Down
24 changes: 2 additions & 22 deletions components/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,8 @@ module.exports = {
'@angular-eslint/no-input-rename': 'off',
'prefer-const': 'off',
'max-len': 'off',
'@typescript-eslint/ban-types': [
'off',
{
types: {
Object: {
message: 'Use {} instead.'
},
String: {
message: 'Use string instead.'
},
Number: {
message: 'Use number instead.'
},
Boolean: {
message: 'Use boolean instead.'
},
Function: {
message: 'Use specific callable interface instead.'
}
}
}
]
'@typescript-eslint/no-unsafe-function-type': 'error',
'@typescript-eslint/no-wrapper-object-types': 'error',
}
},
{
Expand Down
1 change: 0 additions & 1 deletion components/affix/affix.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const NZ_AFFIX_DEFAULT_SCROLL_TIME = 20;
@Component({
selector: 'nz-affix',
exportAs: 'nzAffix',
standalone: true,
imports: [BidiModule, PlatformModule],
template: `
<div #fixedEl>
Expand Down
19 changes: 6 additions & 13 deletions components/affix/affix.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { NzScrollService } from 'ng-zorro-antd/core/services';
import { NzSafeAny } from 'ng-zorro-antd/core/types';

import { NzAffixComponent } from './affix.component';
import { NzAffixModule } from './affix.module';

interface Offset {
top: number;
Expand Down Expand Up @@ -48,15 +47,13 @@ describe('affix', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [NzAffixModule],
declarations: [TestAffixComponent],
providers: [
{
provide: NzScrollService,
useClass: NzScrollService
}
]
}).compileComponents();
});

fixture = TestBed.createComponent(TestAffixComponent);
context = fixture.componentInstance;
Expand Down Expand Up @@ -466,10 +463,6 @@ describe('affix-extra', () => {
let dl: DebugElement;

beforeEach(() => {
TestBed.configureTestingModule({
imports: [NzAffixModule],
declarations: [TestAffixComponent]
}).compileComponents();
fixture = TestBed.createComponent(TestAffixComponent);
context = fixture.componentInstance;
dl = fixture.debugElement;
Expand Down Expand Up @@ -515,10 +508,6 @@ describe('affix RTL', () => {
let dl: DebugElement;

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [BidiModule, NzAffixModule],
declarations: [TestAffixRtlComponent]
}).compileComponents();
fixture = TestBed.createComponent(TestAffixRtlComponent);
context = fixture.componentInstance;
dl = fixture.debugElement;
Expand All @@ -544,7 +533,9 @@ describe('affix RTL', () => {
fixture.destroy();
}));
});

@Component({
imports: [NzAffixComponent],
template: `
<nz-affix id="affix" [nzTarget]="fakeTarget" [nzOffsetTop]="newOffset" [nzOffsetBottom]="newOffsetBottom">
<button id="content">Affix Button</button>
Expand All @@ -560,6 +551,7 @@ class TestAffixComponent {
}

@Component({
imports: [NzAffixComponent, BidiModule],
template: `
<div [dir]="direction">
<nz-affix id="affix" [nzTarget]="fakeTarget" [nzOffsetTop]="newOffset" [nzOffsetBottom]="newOffsetBottom">
Expand All @@ -583,6 +575,7 @@ class MockDirectionality {
value = 'ltr';
change = new Subject();
}

describe('NzAffixComponent', () => {
let component: NzAffixComponent;
let fixture: ComponentFixture<NzAffixComponent>;
Expand All @@ -601,7 +594,7 @@ describe('NzAffixComponent', () => {
{ provide: Directionality, useClass: MockDirectionality },
{ provide: Platform, useValue: { isBrowser: true } }
]
}).compileComponents();
});

fixture = TestBed.createComponent(NzAffixComponent);
component = fixture.componentInstance;
Expand Down
1 change: 0 additions & 1 deletion components/affix/demo/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { NzAffixModule } from 'ng-zorro-antd/affix';
import { NzButtonModule } from 'ng-zorro-antd/button';

@Component({
standalone: true,
selector: 'nz-demo-affix-basic',
imports: [NzAffixModule, NzButtonModule],
template: `
Expand Down
1 change: 0 additions & 1 deletion components/affix/demo/on-change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { NzAffixModule } from 'ng-zorro-antd/affix';
import { NzButtonModule } from 'ng-zorro-antd/button';

@Component({
standalone: true,
selector: 'nz-demo-affix-on-change',
imports: [NzAffixModule, NzButtonModule],
template: `
Expand Down
1 change: 0 additions & 1 deletion components/affix/demo/target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { NzAffixModule } from 'ng-zorro-antd/affix';
import { NzButtonModule } from 'ng-zorro-antd/button';

@Component({
standalone: true,
selector: 'nz-demo-affix-target',
imports: [NzAffixModule, NzButtonModule],
template: `
Expand Down
1 change: 0 additions & 1 deletion components/alert/alert.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'alert';
selector: 'nz-alert',
exportAs: 'nzAlert',
animations: [slideAlertMotion],
standalone: true,
imports: [NzIconModule, NzOutletModule],
template: `
@if (!closed) {
Expand Down
25 changes: 10 additions & 15 deletions components/alert/alert.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,20 @@ import { BidiModule, Dir, Direction } from '@angular/cdk/bidi';
import { ChangeDetectorRef, Component, DebugElement, TemplateRef, ViewChild } from '@angular/core';
import { ComponentFixture, fakeAsync, TestBed, tick, waitForAsync } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { provideNoopAnimations } from '@angular/platform-browser/animations';
import { Subject } from 'rxjs';

import { NzConfigService } from 'ng-zorro-antd/core/config';
import { NzIconTestModule } from 'ng-zorro-antd/icon/testing';
import { provideNzIconsTesting } from 'ng-zorro-antd/icon/testing';

import { NzAlertComponent } from './alert.component';
import { NzAlertModule } from './alert.module';

describe('alert', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [BidiModule, NzAlertModule, NoopAnimationsModule, NzIconTestModule],
declarations: [
NzDemoTestBasicComponent,
NzDemoTestBannerComponent,
NzTestAlertRtlComponent,
NzTestAlertCustomIconComponent
]
providers: [provideNoopAnimations(), provideNzIconsTesting()]
});
TestBed.compileComponents();
}));

describe('basic alert', () => {
Expand Down Expand Up @@ -158,7 +151,7 @@ describe('alert', () => {
});

@Component({
// eslint-disable-next-line
imports: [NzAlertModule],
selector: 'nz-test-basic-alert',
template: `
<ng-template #template>template</ng-template>
Expand Down Expand Up @@ -191,11 +184,13 @@ export class NzDemoTestBasicComponent {
}

@Component({
template: ` <nz-alert nzBanner></nz-alert> `
imports: [NzAlertModule],
template: `<nz-alert nzBanner></nz-alert>`
})
export class NzDemoTestBannerComponent {}

@Component({
imports: [NzDemoTestBasicComponent, BidiModule],
template: `
<div [dir]="direction">
<nz-test-basic-alert></nz-test-basic-alert>
Expand All @@ -208,6 +203,7 @@ export class NzTestAlertRtlComponent {
}

@Component({
imports: [NzAlertModule],
template: `
<nz-alert
nzType="success"
Expand Down Expand Up @@ -238,16 +234,15 @@ describe('NzAlertComponent', () => {
});

TestBed.configureTestingModule({
imports: [NoopAnimationsModule],
providers: [
NzAlertComponent,
provideNoopAnimations(),
{ provide: NzConfigService, useValue: nzConfigServiceSpy },
{
provide: ChangeDetectorRef,
useValue: jasmine.createSpyObj('ChangeDetectorRef', ['markForCheck', 'detectChanges'])
}
]
}).compileComponents();
});

fixture = TestBed.createComponent(NzAlertComponent);
component = fixture.componentInstance;
Expand Down
1 change: 0 additions & 1 deletion components/alert/demo/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzSpaceModule } from 'ng-zorro-antd/space';

@Component({
standalone: true,
selector: 'nz-demo-alert-action',
imports: [NzAlertModule, NzButtonModule, NzSpaceModule],
template: `
Expand Down
1 change: 0 additions & 1 deletion components/alert/demo/banner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component } from '@angular/core';
import { NzAlertModule } from 'ng-zorro-antd/alert';

@Component({
standalone: true,
selector: 'nz-demo-alert-banner',
imports: [NzAlertModule],
template: `
Expand Down
1 change: 0 additions & 1 deletion components/alert/demo/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component } from '@angular/core';
import { NzAlertModule } from 'ng-zorro-antd/alert';

@Component({
standalone: true,
selector: 'nz-demo-alert-basic',
imports: [NzAlertModule],
template: ` <nz-alert nzType="success" nzMessage="Success Text"></nz-alert> `
Expand Down
1 change: 0 additions & 1 deletion components/alert/demo/closable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component } from '@angular/core';
import { NzAlertModule } from 'ng-zorro-antd/alert';

@Component({
standalone: true,
selector: 'nz-demo-alert-closable',
imports: [NzAlertModule],
template: `
Expand Down
1 change: 0 additions & 1 deletion components/alert/demo/close-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component } from '@angular/core';
import { NzAlertModule } from 'ng-zorro-antd/alert';

@Component({
standalone: true,
selector: 'nz-demo-alert-close-text',
imports: [NzAlertModule],
template: ` <nz-alert nzType="info" nzMessage="Info Text" nzCloseText="Close Now"></nz-alert> `
Expand Down
1 change: 0 additions & 1 deletion components/alert/demo/custom-icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component } from '@angular/core';
import { NzAlertModule } from 'ng-zorro-antd/alert';

@Component({
standalone: true,
selector: 'nz-demo-alert-custom-icon',
imports: [NzAlertModule],
template: `
Expand Down
1 change: 0 additions & 1 deletion components/alert/demo/description.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component } from '@angular/core';
import { NzAlertModule } from 'ng-zorro-antd/alert';

@Component({
standalone: true,
selector: 'nz-demo-alert-description',
imports: [NzAlertModule],
template: `
Expand Down
1 change: 0 additions & 1 deletion components/alert/demo/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component } from '@angular/core';
import { NzAlertModule } from 'ng-zorro-antd/alert';

@Component({
standalone: true,
selector: 'nz-demo-alert-icon',
imports: [NzAlertModule],
template: `
Expand Down
1 change: 0 additions & 1 deletion components/alert/demo/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component } from '@angular/core';
import { NzAlertModule } from 'ng-zorro-antd/alert';

@Component({
standalone: true,
selector: 'nz-demo-alert-style',
imports: [NzAlertModule],
template: `
Expand Down
1 change: 0 additions & 1 deletion components/anchor/anchor-link.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { NzAnchorComponent } from './anchor.component';
selector: 'nz-link',
exportAs: 'nzLink',
preserveWhitespaces: false,
standalone: true,
imports: [NgTemplateOutlet],
template: `
<a
Expand Down
1 change: 0 additions & 1 deletion components/anchor/anchor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: t
selector: 'nz-anchor',
exportAs: 'nzAnchor',
preserveWhitespaces: false,
standalone: true,
imports: [NgTemplateOutlet, NzAffixModule],
template: `
@if (nzAffix) {
Expand Down
Loading

0 comments on commit a65a32f

Please sign in to comment.