diff --git a/components/table/nz-th.component.ts b/components/table/nz-th.component.ts
index 3798693f4de..64a0cb6c0a4 100644
--- a/components/table/nz-th.component.ts
+++ b/components/table/nz-th.component.ts
@@ -17,15 +17,13 @@ import {
OnInit,
Output,
SimpleChanges,
- ViewChild,
ViewEncapsulation
} from '@angular/core';
-import { Subject } from 'rxjs';
-import { takeUntil } from 'rxjs/operators';
import { InputBoolean, isNotNil } from 'ng-zorro-antd/core';
-import { NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown';
import { NzI18nInterface, NzI18nService } from 'ng-zorro-antd/i18n';
+import { Subject } from 'rxjs';
+import { takeUntil } from 'rxjs/operators';
/* tslint:disable-next-line:no-any */
export type NzThFilterType = Array<{ text: string; value: any; byDefault?: boolean }>;
@@ -69,7 +67,6 @@ export class NzThComponent implements OnChanges, OnInit, OnDestroy {
nzWidthChange$ = new Subject();
private destroy$ = new Subject();
private hasDefaultFilter = false;
- @ViewChild(NzDropdownMenuComponent, { static: false }) nzDropdownMenuComponent: NzDropdownMenuComponent;
/* tslint:disable-next-line:no-any */
@Input() nzSelections: Array<{ text: string; onSelect(...args: any[]): any }> = [];
@Input() nzChecked = false;
@@ -158,8 +155,8 @@ export class NzThComponent implements OnChanges, OnInit, OnDestroy {
}
hideDropDown(): void {
- this.nzDropdownMenuComponent.setVisibleStateWhen(false);
this.filterVisible = false;
+ this.search();
}
dropDownVisibleChange(value: boolean): void {
diff --git a/components/tabs/nz-tabs.module.ts b/components/tabs/nz-tabs.module.ts
index c1c579863da..b2f09f611ef 100644
--- a/components/tabs/nz-tabs.module.ts
+++ b/components/tabs/nz-tabs.module.ts
@@ -9,7 +9,7 @@ import { ObserversModule } from '@angular/cdk/observers';
import { PlatformModule } from '@angular/cdk/platform';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
-import { NzAddOnModule } from 'ng-zorro-antd/core';
+import { NzOutletModule } from 'ng-zorro-antd/core';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzTabBodyComponent } from './nz-tab-body.component';
@@ -42,6 +42,6 @@ import { NzTabSetComponent } from './nz-tabset.component';
NzTabBodyComponent,
NzTabLinkDirective
],
- imports: [CommonModule, ObserversModule, NzIconModule, NzAddOnModule, PlatformModule]
+ imports: [CommonModule, ObserversModule, NzIconModule, NzOutletModule, PlatformModule]
})
export class NzTabsModule {}
diff --git a/components/time-picker/nz-time-picker-panel.component.ts b/components/time-picker/nz-time-picker-panel.component.ts
index 1bd6a044756..107f80b9a8c 100644
--- a/components/time-picker/nz-time-picker-panel.component.ts
+++ b/components/time-picker/nz-time-picker-panel.component.ts
@@ -99,7 +99,7 @@ export class NzTimePickerPanelComponent implements ControlValueAccessor, OnInit,
@Input()
set nzDisabledHours(value: () => number[]) {
this._disabledHours = value;
- if (this._disabledHours) {
+ if (!!this._disabledHours) {
this.buildHours();
}
}
@@ -284,7 +284,7 @@ export class NzTimePickerPanelComponent implements ControlValueAccessor, OnInit,
this.time.setHours(hour.index, hour.disabled);
this.scrollToSelected(this.hourListElement.nativeElement, hour.index, 120, 'hour');
- if (this._disabledMinutes) {
+ if (!!this._disabledMinutes) {
this.buildMinutes();
}
if (this._disabledSeconds || this._disabledMinutes) {
@@ -295,7 +295,7 @@ export class NzTimePickerPanelComponent implements ControlValueAccessor, OnInit,
selectMinute(minute: { index: number; disabled: boolean }): void {
this.time.setMinutes(minute.index, minute.disabled);
this.scrollToSelected(this.minuteListElement.nativeElement, minute.index, 120, 'minute');
- if (this._disabledSeconds) {
+ if (!!this._disabledSeconds) {
this.buildSeconds();
}
}
@@ -307,13 +307,13 @@ export class NzTimePickerPanelComponent implements ControlValueAccessor, OnInit,
select12Hours(value: { index: number; value: string }): void {
this.time.selected12Hours = value.value;
- if (this._disabledHours) {
+ if (!!this._disabledHours) {
this.buildHours();
}
- if (this._disabledMinutes) {
+ if (!!this._disabledMinutes) {
this.buildMinutes();
}
- if (this._disabledSeconds) {
+ if (!!this._disabledSeconds) {
this.buildSeconds();
}
this.scrollToSelected(this.use12HoursListElement.nativeElement, value.index, 120, '12-hour');
diff --git a/components/timeline/nz-timeline.module.ts b/components/timeline/nz-timeline.module.ts
index bbc7bb3a8bc..1a956385b2c 100644
--- a/components/timeline/nz-timeline.module.ts
+++ b/components/timeline/nz-timeline.module.ts
@@ -8,7 +8,7 @@
import { PlatformModule } from '@angular/cdk/platform';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
-import { NzAddOnModule } from 'ng-zorro-antd/core';
+import { NzOutletModule } from 'ng-zorro-antd/core';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzTimelineItemComponent } from './nz-timeline-item.component';
@@ -17,6 +17,6 @@ import { NzTimelineComponent } from './nz-timeline.component';
@NgModule({
declarations: [NzTimelineItemComponent, NzTimelineComponent],
exports: [NzTimelineItemComponent, NzTimelineComponent],
- imports: [CommonModule, PlatformModule, NzIconModule, NzAddOnModule]
+ imports: [CommonModule, PlatformModule, NzIconModule, NzOutletModule]
})
export class NzTimelineModule {}
diff --git a/components/timeline/style/index.less b/components/timeline/style/index.less
index bcf74e90fed..808095403ac 100644
--- a/components/timeline/style/index.less
+++ b/components/timeline/style/index.less
@@ -17,7 +17,7 @@
&-item {
position: relative;
margin: 0;
- padding: 0 0 20px;
+ padding-bottom: @timeline-item-padding-bottom;
font-size: @font-size-base;
list-style: none;
@@ -168,8 +168,7 @@
text-align: right;
.@{timeline-prefix-cls}-rtl& {
- width: 100%;
- margin-right: 12px;
+ text-align: left;
}
}
}
@@ -195,6 +194,7 @@
.@{timeline-prefix-cls}-rtl& {
width: 100%;
margin-right: 18px;
+ text-align: right;
}
}
}
diff --git a/components/tooltip/nz-tooltip.module.ts b/components/tooltip/nz-tooltip.module.ts
index 616a2900725..45daee70c3c 100644
--- a/components/tooltip/nz-tooltip.module.ts
+++ b/components/tooltip/nz-tooltip.module.ts
@@ -10,8 +10,7 @@ import { OverlayModule } from '@angular/cdk/overlay';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
-import { NzAddOnModule, NzNoAnimationModule, NzOverlayModule } from 'ng-zorro-antd/core';
-
+import { NzNoAnimationModule, NzOutletModule, NzOverlayModule } from 'ng-zorro-antd/core';
// NOTE: the `t` is not uppercase in directives. Change this would however introduce breaking change.
import { NzToolTipComponent } from './nz-tooltip.component';
import { NzTooltipDirective } from './nz-tooltip.directive';
@@ -19,7 +18,7 @@ import { NzTooltipDirective } from './nz-tooltip.directive';
@NgModule({
declarations: [NzToolTipComponent, NzTooltipDirective],
exports: [NzToolTipComponent, NzTooltipDirective],
- imports: [CommonModule, OverlayModule, NzAddOnModule, NzOverlayModule, NzNoAnimationModule],
+ imports: [CommonModule, OverlayModule, NzOutletModule, NzOverlayModule, NzNoAnimationModule],
entryComponents: [NzToolTipComponent]
})
export class NzToolTipModule {}
diff --git a/components/transfer/style/index.less b/components/transfer/style/index.less
index cb2d3b05fa8..958c8d7793d 100644
--- a/components/transfer/style/index.less
+++ b/components/transfer/style/index.less
@@ -39,7 +39,8 @@
}
&-search {
- padding: 0 24px 0 @control-padding-horizontal-sm;
+ padding-right: 24px;
+ padding-left: @control-padding-horizontal-sm;
&-action {
position: absolute;
top: 12px;
diff --git a/components/tree-select/doc/index.en-US.md b/components/tree-select/doc/index.en-US.md
index 7cc8ff54002..bbff0e74c54 100755
--- a/components/tree-select/doc/index.en-US.md
+++ b/components/tree-select/doc/index.en-US.md
@@ -29,6 +29,7 @@ import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select';
| `[nzNotFoundContent]` | Specify content to show when no result matches. | `string` | - |
| `[nzDropdownMatchSelectWidth]` | Determine whether the dropdown menu and the select input are the same width | `boolean` | `true` | ✅ |
| `[nzDropdownStyle]` | To set the style of the dropdown menu | `object` | - |
+| `[nzDropdownClassName]` | classname of dropdown menu | `string` | - |
| `[nzMultiple]` | Support multiple or not, will be `true` when enable `nzCheckable`. | `boolean` | `false` |
| `[nzHideUnMatched]` | Hide unmatched nodes while searching | `boolean` | `false` | ✅ |
| `[nzSize]` | To set the size of the select input | `'large' \| 'small' \| 'default'` | `'default'` | ✅ |
diff --git a/components/tree-select/doc/index.zh-CN.md b/components/tree-select/doc/index.zh-CN.md
index 97ce9e50365..3f582c72539 100755
--- a/components/tree-select/doc/index.zh-CN.md
+++ b/components/tree-select/doc/index.zh-CN.md
@@ -29,6 +29,7 @@ import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select';
| `[nzNotFoundContent]` | 当下拉列表为空时显示的内容 | `string` | - |
| `[nzDropdownMatchSelectWidth]` | 下拉菜单和选择器同宽 | `boolean` | `true` | ✅ |
| `[nzDropdownStyle]` | 下拉菜单的样式 | `{ [key: string]: string; }` | - |
+| `[nzDropdownClassName]` | 下拉菜单的 className 属性 | `string` | - |
| `[nzMultiple]` | 支持多选(当设置 nzCheckable 时自动变为true) | `boolean` | `false` |
| `[nzHideUnMatched]` | 搜索隐藏未匹配的节点 | `boolean` | `false` | ✅ |
| `[nzSize]` | 选择框大小 | `'large' \| 'small' \| 'default'` | `'default'` | ✅ |
diff --git a/components/tree-select/nz-tree-select.component.html b/components/tree-select/nz-tree-select.component.html
index 8829453908e..68bfbf94b4a 100644
--- a/components/tree-select/nz-tree-select.component.html
+++ b/components/tree-select/nz-tree-select.component.html
@@ -25,7 +25,7 @@
(positionChange)="onPositionChange($event)"
>
{
const targetElement = overlayContainerElement.querySelector('.ant-select-dropdown') as HTMLElement;
expect(targetElement.style.height).toBe('120px');
}));
+ it('should dropdown classname work', fakeAsync(() => {
+ treeSelect.nativeElement.click();
+ fixture.detectChanges();
+ expect(treeSelectComponent.nzOpen).toBe(true);
+ flush();
+ const targetElement = overlayContainerElement.querySelector('.ant-select-dropdown') as HTMLElement;
+ expect(targetElement.classList).toContain('class1');
+ expect(targetElement.classList).toContain('class2');
+ }));
it('should click option close dropdown', fakeAsync(() => {
treeSelect.nativeElement.click();
fixture.detectChanges();
@@ -548,6 +557,7 @@ describe('tree-select component', () => {
[nzMultiple]="multiple"
[nzMaxTagCount]="maxTagCount"
[nzDropdownStyle]="{ height: '120px' }"
+ nzDropdownClassName="class1 class2"
>
`
diff --git a/components/tree/nz-tree.module.ts b/components/tree/nz-tree.module.ts
index af93818e6ce..bc5f12ab92d 100644
--- a/components/tree/nz-tree.module.ts
+++ b/components/tree/nz-tree.module.ts
@@ -9,14 +9,14 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
-import { NzAddOnModule, NzHighlightModule, NzNoAnimationModule } from 'ng-zorro-antd/core';
+import { NzHighlightModule, NzNoAnimationModule, NzOutletModule } from 'ng-zorro-antd/core';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzTreeNodeComponent } from './nz-tree-node.component';
import { NzTreeComponent } from './nz-tree.component';
@NgModule({
- imports: [CommonModule, NzAddOnModule, NzIconModule, NzNoAnimationModule, NzHighlightModule],
+ imports: [CommonModule, NzOutletModule, NzIconModule, NzNoAnimationModule, NzHighlightModule],
declarations: [NzTreeComponent, NzTreeNodeComponent],
exports: [NzTreeComponent, NzTreeNodeComponent]
})
diff --git a/package.json b/package.json
index ef4f694b725..f7038fce112 100644
--- a/package.json
+++ b/package.json
@@ -26,33 +26,33 @@
"integration": "npm run build:lib && bash ./integration-test.sh"
},
"dependencies": {
- "@angular/cdk": "^9.0.0-rc.7",
- "@ant-design/icons-angular": "^9.0.0-rc.5",
+ "@angular/cdk": "^9.0.0",
+ "@ant-design/icons-angular": "^9.0.0",
"date-fns": "^1.30.1"
},
"devDependencies": {
"tslib": "^1.10.0",
- "@angular-devkit/build-angular": "~0.900.0-rc.8",
- "@angular-devkit/build-ng-packagr": "~0.900.0-rc.8",
- "@angular-devkit/core": "~9.0.0-rc.4",
- "@angular-devkit/schematics": "~9.0.0-rc.8",
- "@angular/animations": "~9.0.0-rc.8",
- "@angular/cli": "~9.0.0-rc.8",
- "@angular/common": "~9.0.0-rc.8",
- "@angular/compiler": "~9.0.0-rc.8",
- "@angular/compiler-cli": "~9.0.0-rc.8",
- "@angular/core": "~9.0.0-rc.8",
- "@angular/forms": "~9.0.0-rc.8",
- "@angular/language-service": "~9.0.0-rc.8",
- "@angular/platform-browser": "~9.0.0-rc.8",
- "@angular/platform-browser-dynamic": "~9.0.0-rc.8",
- "@angular/platform-server": "~9.0.0-rc.8",
- "@angular/router": "~9.0.0-rc.8",
- "@angular/service-worker": "~9.0.0-rc.8",
+ "@angular-devkit/build-angular": "~0.900.0",
+ "@angular-devkit/build-ng-packagr": "~0.900.0",
+ "@angular-devkit/core": "^9.0.0",
+ "@angular-devkit/schematics": "^9.0.0",
+ "@angular/animations": "^9.0.0",
+ "@angular/cli": "^9.0.0",
+ "@angular/common": "^9.0.0",
+ "@angular/compiler": "^9.0.0",
+ "@angular/compiler-cli": "^9.0.0",
+ "@angular/core": "^9.0.0",
+ "@angular/forms": "^9.0.0",
+ "@angular/language-service": "^9.0.0",
+ "@angular/platform-browser": "^9.0.0",
+ "@angular/platform-browser-dynamic": "^9.0.0",
+ "@angular/platform-server": "^9.0.0",
+ "@angular/router": "^9.0.0",
+ "@angular/service-worker": "^9.0.0",
"@commitlint/cli": "^8.1.0",
"@commitlint/config-angular": "^8.1.0",
"@nguniversal/module-map-ngfactory-loader": "~9.0.0-next.6",
- "@schematics/angular": "~9.0.0-rc.8",
+ "@schematics/angular": "^9.0.1",
"@stackblitz/sdk": "^1.3.0",
"@types/fs-extra": "^8.0.0",
"@types/gulp": "^4.0.6",
@@ -62,7 +62,6 @@
"@types/node": "^12.11.1",
"@types/parse5": "^5.0.2",
"antd-theme-generator": "^1.1.7",
- "bundlesize": "^0.18.0",
"chalk": "^2.4.2",
"classlist.js": "^1.1.20150312",
"clean-css": "~4.2.1",
@@ -90,7 +89,7 @@
"marked": "^0.7.0",
"minimist": "^1.2.0",
"monaco-editor": "^0.17.1",
- "ng-packagr": "9.0.0-rc.4",
+ "ng-packagr": "9.0.0",
"ngx-color": "^4.0.0",
"node-prismjs": "^0.1.2",
"parse5": "^5.1.1",
@@ -107,7 +106,7 @@
"sitemap": "^4.1.1",
"ts-node": "~8.3.0",
"tslint": "~5.18.0",
- "typescript": "~3.6.4",
+ "typescript": "~3.7.4",
"yaml-front-matter": "^4.0.0",
"zone.js": "~0.10.2"
},
diff --git a/scripts/site/_site/doc/app/app.component.ts b/scripts/site/_site/doc/app/app.component.ts
index 1fb7578914a..7978082393e 100644
--- a/scripts/site/_site/doc/app/app.component.ts
+++ b/scripts/site/_site/doc/app/app.component.ts
@@ -1,16 +1,6 @@
import { Platform } from '@angular/cdk/platform';
import { DOCUMENT } from '@angular/common';
-import {
- AfterViewInit,
- Component,
- ElementRef,
- HostListener,
- Inject,
- NgZone,
- OnInit,
- Renderer2,
- ViewChild
-} from '@angular/core';
+import { AfterViewInit, Component, ElementRef, HostListener, Inject, NgZone, OnInit, Renderer2, ViewChild } from '@angular/core';
import { Meta, Title } from '@angular/platform-browser';
import { NavigationEnd, Router } from '@angular/router';
import { en_US, NzI18nService, zh_CN } from 'ng-zorro-antd/i18n';
@@ -33,7 +23,7 @@ interface DocPageMeta {
}
@Component({
- selector : 'app-root',
+ selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent implements OnInit, AfterViewInit {
@@ -58,7 +48,7 @@ export class AppComponent implements OnInit, AfterViewInit {
}
language = 'zh';
- oldVersionList = [ '0.5.x', '0.6.x', '0.7.x', '1.8.x', '7.5.x' ];
+ oldVersionList = ['0.5.x', '0.6.x', '0.7.x', '1.8.x', '7.5.x'];
currentVersion = VERSION.full;
@ViewChild('searchInput', { static: false }) searchInput: ElementRef;
@@ -82,8 +72,7 @@ export class AppComponent implements OnInit, AfterViewInit {
private renderer: Renderer2,
// tslint:disable-next-line:no-any
@Inject(DOCUMENT) private document: any
- ) {
- }
+ ) {}
navigateToPage(url: string): void {
if (url) {
@@ -114,7 +103,7 @@ export class AppComponent implements OnInit, AfterViewInit {
ngOnInit(): void {
this.routerList.components.forEach(group => {
- this.componentList = this.componentList.concat([ ...group.children ]);
+ this.componentList = this.componentList.concat([...group.children]);
});
this.router.events.subscribe(event => {
@@ -135,14 +124,14 @@ export class AppComponent implements OnInit, AfterViewInit {
}
this.isExperimental = this.router.url.search('experimental') !== -1;
this.language = this.router.url
- .split('/')[this.router.url.split('/').length - 1]
- .split('#')[0]
+ .split('/')
+ [this.router.url.split('/').length - 1].split('#')[0]
.split('?')[0];
this.appService.language$.next(this.language);
this.nzI18nService.setLocale(this.language === 'en' ? en_US : zh_CN);
this.updateDocMetaAndLocale();
if (this.docsearch) {
- this.docsearch!.algoliaOptions = { hitsPerPage: 5, facetFilters: [ `tags:${this.language}` ] };
+ this.docsearch!.algoliaOptions = { hitsPerPage: 5, facetFilters: [`tags:${this.language}`] };
}
if (environment.production && this.platform.isBrowser) {
@@ -175,7 +164,8 @@ export class AppComponent implements OnInit, AfterViewInit {
updateDocMetaAndLocale(): void {
if (this.platform.isBrowser) {
const isEn = this.language === 'en';
- const enDescription = 'An enterprise-class UI design language and Angular-based implementation with a set of high-quality Angular components, one of best Angular UI library for enterprises';
+ const enDescription =
+ 'An enterprise-class UI design language and Angular-based implementation with a set of high-quality Angular components, one of best Angular UI library for enterprises';
const zhDescription = 'Ant Design 的 Angular 实现,开发和服务于企业级后台产品,开箱即用的高质量 Angular 组件。';
const descriptionContent = isEn ? enDescription : zhDescription;
this.meta.updateTag({
@@ -202,11 +192,11 @@ export class AppComponent implements OnInit, AfterViewInit {
initDocsearch() {
this.loadScript('https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js').then(() => {
this.docsearch = docsearch({
- appId : 'BH4D9OD16A',
- apiKey : '9f7d9d6527ff52ec484e90bb1f256971',
- indexName : 'ng_zorro',
- inputSelector : '#search-box input',
- algoliaOptions: { hitsPerPage: 5, facetFilters: [ `tags:${this.language}` ] },
+ appId: 'BH4D9OD16A',
+ apiKey: '9f7d9d6527ff52ec484e90bb1f256971',
+ indexName: 'ng_zorro',
+ inputSelector: '#search-box input',
+ algoliaOptions: { hitsPerPage: 5, facetFilters: [`tags:${this.language}`] },
transformData(hits: any) {
// tslint:disable-line:no-any
hits.forEach((hit: any) => {
@@ -216,12 +206,12 @@ export class AppComponent implements OnInit, AfterViewInit {
});
return hits;
},
- debug : false
+ debug: false
});
});
}
- @HostListener('document:keyup.s', [ '$event' ])
+ @HostListener('document:keyup.s', ['$event'])
onKeyUp(event: KeyboardEvent) {
if (this.useDocsearch && this.searchInput && this.searchInput.nativeElement && event.target === document.body) {
this.searchInput.nativeElement.focus();
@@ -233,13 +223,13 @@ export class AppComponent implements OnInit, AfterViewInit {
initColor() {
if (!this.platform.isBrowser) {
- return
+ return;
}
const node = document.createElement('link');
node.rel = 'stylesheet/less';
node.type = 'text/css';
node.href = '/assets/color.less';
- document.getElementsByTagName('head')[ 0 ].appendChild(node);
+ document.getElementsByTagName('head')[0].appendChild(node);
}
lessLoaded = false;
@@ -316,7 +306,7 @@ export class AppComponent implements OnInit, AfterViewInit {
const hasLanguage = pathname.match(/(en|zh)(\/?)$/);
if (language === 'zh-cn' && !hasLanguage) {
this.nzI18nService.setLocale(zh_CN);
- this.router.navigate([ 'docs', 'introduce', 'zh' ]);
+ this.router.navigate(['docs', 'introduce', 'zh']);
}
}
}