Skip to content

Commit

Permalink
chore: merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Jun 16, 2019
2 parents 3bda636 + c02ae7c commit e038f25
Show file tree
Hide file tree
Showing 335 changed files with 3,318 additions and 1,153 deletions.
60 changes: 60 additions & 0 deletions .github/nz-boot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
assignOwner:
Affix: cipchk
Alert: vthinkxie
Anchor: cipchk
AutoComplete: hsuanxyz
Avatar: hsuanxyz
BackTop: cipchk
Badge: hsuanxyz
Breadcrumb: wendzhue
Button: vthinkxie
Empty: wendzhue
Calendar: wenqi73
Card: vthinkxie
Carousel: wendzhue
Cascader: wendzhue
Comment: hsuanxyz
Checkbox: vthinkxie
Collapse: vthinkxie
DatePicker: wenqi73
Divider: vthinkxie
Descriptions: wendzhue
Drawer: hsuanxyz
Dropdown: vthinkxie
Form: vthinkxie
Grid: vthinkxie
Icon: wendzhue
Input: vthinkxie
InputNumber: vthinkxie
Layout: vthinkxie
List: cipchk
Mention: hsuanxyz
Menu: vthinkxie
Message: wendzhue
Modal: hsuanxyz
Notification: wendzhue
PageHeader: hsuanxyz
Pagination: vthinkxie
Popconfirm: wendzhue
Popover: wendzhue
Progress: wendzhue
Radio: vthinkxie
Rate: wendzhue
Select: vthinkxie
Slider: wendzhue
Spin: vthinkxie
Statistic: wendzhue
Steps: hsuanxyz
Skeleton: wenqi73
Switch: vthinkxie
Table: vthinkxie
Tabs: vthinkxie
Tag: hsuanxyz
TimePicker: wenqi73
Timeline: wendzhue
Tooltip: wendzhue
Transfer: cipchk
Tree: simplejason
TreeSelect: hsuanxyz
Typography: hsuanxyz
Upload: cipchk
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ yarn.lock

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ before_install:
- sh -e /etc/init.d/xvfb start

before_script:
- export NG_CLI_ANALYTICS=ci
- npm install -g @angular/cli
- npm install -g karma

Expand Down
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
# [7.5.0](https://github.com/NG-ZORRO/ng-zorro-antd/compare/7.4.1...7.5.0) (2019-06-05)


### Bug Fixes

* **cascader:** fix reset trigger redraw ([#3481](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3481)) ([7c0e30c](https://github.com/NG-ZORRO/ng-zorro-antd/commit/7c0e30c)), closes [#3480](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3480)
* **date-picker:** replace DatePipe with formatDate function ([#3500](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3500)) ([19ad7fd](https://github.com/NG-ZORRO/ng-zorro-antd/commit/19ad7fd)), closes [#3487](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3487)
* **layout:** fix width type ([#3525](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3525)) ([fd803bd](https://github.com/NG-ZORRO/ng-zorro-antd/commit/fd803bd))
* **select:** display error when in tag and search mode ([#3442](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3442)) ([a05f5a5](https://github.com/NG-ZORRO/ng-zorro-antd/commit/a05f5a5)), closes [#3424](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3424)


### Features

* **button:** support link type ([#3503](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3503)) ([050f141](https://github.com/NG-ZORRO/ng-zorro-antd/commit/050f141)), closes [#3479](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3479)
* **carousel:** support custom strategies ([#3501](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3501)) ([a53a43a](https://github.com/NG-ZORRO/ng-zorro-antd/commit/a53a43a))
* **descriptions:** add component ([#3327](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3327)) ([11bf89e](https://github.com/NG-ZORRO/ng-zorro-antd/commit/11bf89e)), closes [#2847](https://github.com/NG-ZORRO/ng-zorro-antd/issues/2847)
* **drawer:** support pressing ESC to close drawer ([#3488](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3488)) ([2928f84](https://github.com/NG-ZORRO/ng-zorro-antd/commit/2928f84))
* **dropdown:** support customize icons ([#3517](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3517)) ([4329b51](https://github.com/NG-ZORRO/ng-zorro-antd/commit/4329b51))



## [7.4.1](https://github.com/NG-ZORRO/ng-zorro-antd/compare/7.4.0...7.4.1) (2019-05-21)

### Bug Fixes

* **build:** unable to build in production when importing secondary module ([#3266](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3266))

# [7.4.0](https://github.com/NG-ZORRO/ng-zorro-antd/compare/7.3.3...7.4.0) (2019-05-19)

### Bug Fixes

* **breadcrumb:** fix input boolean and router event not caught error ([#3185](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3185)) ([fd43ec5](https://github.com/NG-ZORRO/ng-zorro-antd/commit/fd43ec5)), closes [#3186](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3186)
* **carousel:** fix carousel in entry components ([#3367](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3367)) ([9d495fc](https://github.com/NG-ZORRO/ng-zorro-antd/commit/9d495fc))
* **cascader,checkbox,switch,tooltip:** fix memory leak problem ([#3416](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3416)) ([c63849f](https://github.com/NG-ZORRO/ng-zorro-antd/commit/c63849f))
* **drawer:** fix z-index level ([#3405](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3405)) ([663f6c1](https://github.com/NG-ZORRO/ng-zorro-antd/commit/663f6c1)), closes [#3402](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3402)
* **menu:** submenu should not remain highlighted ([#3455](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3455)) ([fd47605](https://github.com/NG-ZORRO/ng-zorro-antd/commit/fd47605))
* **modal:** cannot to close in order of overlay opens when using esc ([#3339](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3339)) ([0533c32](https://github.com/NG-ZORRO/ng-zorro-antd/commit/0533c32)), closes [#3338](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3338)
* **modal:** content not work in confirm mode when the type is component ([#3415](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3415)) ([6458c57](https://github.com/NG-ZORRO/ng-zorro-antd/commit/6458c57)), closes [#3407](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3407)
* **modal:** should not close when mousedown in the body ([#3400](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3400)) ([82e488a](https://github.com/NG-ZORRO/ng-zorro-antd/commit/82e488a)), closes [#3394](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3394)
* **progress:** fix stroke color is not updated ([#3445](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3445)) ([80c6ed4](https://github.com/NG-ZORRO/ng-zorro-antd/commit/80c6ed4)), closes [#3441](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3441)
* **tree,tree-select:** fix the styles of connecting line ([#3385](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3385)) ([f7e9a7c](https://github.com/NG-ZORRO/ng-zorro-antd/commit/f7e9a7c)), closes [#3382](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3382)


### Features

* **card:** support setting size ([#3429](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3429)) ([2015021](https://github.com/NG-ZORRO/ng-zorro-antd/commit/2015021))
* **drawer:** support `nzOnCancel` for service mode ([#3376](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3376)) ([3742eda](https://github.com/NG-ZORRO/ng-zorro-antd/commit/3742eda)), closes [#3372](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3372)
* **tree-select:** support customized icon ([#3395](https://github.com/NG-ZORRO/ng-zorro-antd/issues/3395)) ([0deda73](https://github.com/NG-ZORRO/ng-zorro-antd/commit/0deda73))



## [7.3.3](https://github.com/NG-ZORRO/ng-zorro-antd/compare/7.3.2...7.3.3) (2019-04-25)


Expand Down
1 change: 1 addition & 0 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ $ npm run site:start
- [阿里巴巴](http://www.alibaba.com/)
- [阿里云](http://www.aliyun.com/)
- [Apache Flink](https://flink.apache.org/)
- [ThoughtWorks](https://www.thoughtworks.com/)

> 如果你的公司和产品使用了 NG-ZORRO,欢迎到 [这里](https://github.com/NG-ZORRO/ng-zorro-antd/issues/1142) 留言。
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ NG-ZORRO

An enterprise-class UI components based on Ant Design and Angular.

[![CodeFactor](https://www.codefactor.io/repository/github/ng-zorro/ng-zorro-antd/badge?style=flat-square)](https://www.codefactor.io/repository/github/ng-zorro/ng-zorro-antd)
[![Travis branch](https://img.shields.io/travis/NG-ZORRO/ng-zorro-antd/master.svg?style=flat-square)](https://travis-ci.org/NG-ZORRO/ng-zorro-antd)
[![Codecov](https://img.shields.io/codecov/c/github/NG-ZORRO/ng-zorro-antd.svg?style=flat-square)](https://codecov.io/gh/NG-ZORRO/ng-zorro-antd)
[![GitHub Release Date](https://img.shields.io/github/release-date/NG-ZORRO/ng-zorro-antd.svg?style=flat-square)](https://github.com/NG-ZORRO/ng-zorro-antd/releases)
Expand Down Expand Up @@ -149,6 +150,7 @@ As always, we encourage experienced users to help those who are not familiar wit
- [Alibaba](http://www.alibaba.com/)
- [Aliyun](http://www.aliyun.com/)
- [Apache Flink](https://flink.apache.org/)
- [ThoughtWorks](https://www.thoughtworks.com/)

> If your company or product uses NG-ZORRO, let us know [here](https://github.com/NG-ZORRO/ng-zorro-antd/issues/1142)!
Expand Down
2 changes: 1 addition & 1 deletion components/affix/affix.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ describe('affix-extra', () => {
`
})
class TestAffixComponent {
@ViewChild(NzAffixComponent)
@ViewChild(NzAffixComponent, { static: true })
nzAffixComponent: NzAffixComponent;
fakeTarget: string | Element | Window | null = null;
newOffset: {};
Expand Down
2 changes: 1 addition & 1 deletion components/affix/nz-affix.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class NzAffixComponent implements OnInit, OnDestroy {

private timeout: number;
private readonly events = ['resize', 'scroll', 'touchstart', 'touchmove', 'touchend', 'pageshow', 'load'];
@ViewChild('fixedEl') private fixedEl: ElementRef;
@ViewChild('fixedEl', { static: false }) private fixedEl: ElementRef;

private readonly placeholderNode: HTMLElement;

Expand Down
2 changes: 1 addition & 1 deletion components/affix/style/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../style/themes/default';
@import '../../style/themes/index';

.@{ant-prefix}-affix {
position: fixed;
Expand Down
2 changes: 1 addition & 1 deletion components/alert/nz-alert.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe('alert', () => {
`
})
export class NzDemoTestBasicComponent {
@ViewChild('template') template: TemplateRef<void>;
@ViewChild('template', { static: false }) template: TemplateRef<void>;
banner = false;
closeable = false;
closeText: string | TemplateRef<void>;
Expand Down
3 changes: 2 additions & 1 deletion components/alert/style/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';

@alert-prefix-cls: ~'@{ant-prefix}-alert';
Expand All @@ -10,6 +10,7 @@

.@{alert-prefix-cls} {
.reset-component;

position: relative;
padding: 8px 15px 8px 37px;
border-radius: @border-radius-base;
Expand Down
2 changes: 1 addition & 1 deletion components/anchor/anchor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ describe('anchor', () => {
`
})
export class TestComponent {
@ViewChild(NzAnchorComponent) comp: NzAnchorComponent;
@ViewChild(NzAnchorComponent, { static: false }) comp: NzAnchorComponent;
nzAffix = true;
nzBounds = 5;
nzOffsetTop = 0;
Expand Down
2 changes: 1 addition & 1 deletion components/anchor/nz-anchor-link.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class NzAnchorLinkComponent implements OnInit, OnDestroy {
}
}

@ContentChild('nzTemplate') nzTemplate: TemplateRef<void>;
@ContentChild('nzTemplate', { static: false }) nzTemplate: TemplateRef<void>;

constructor(
public elementRef: ElementRef,
Expand Down
2 changes: 1 addition & 1 deletion components/anchor/nz-anchor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const sharpMatcherRegx = /#([^#]+)$/;
changeDetection: ChangeDetectionStrategy.OnPush
})
export class NzAnchorComponent implements OnDestroy, AfterViewInit {
@ViewChild('ink') private ink: ElementRef;
@ViewChild('ink', { static: false }) private ink: ElementRef;

@Input() @InputBoolean() nzAffix = true;
@Input() @InputBoolean() nzShowInkInFixed = false;
Expand Down
3 changes: 2 additions & 1 deletion components/anchor/style/index.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';

@anchor-border-width: 2px;

.@{ant-prefix}-anchor {
.reset-component;

position: relative;
padding-left: @anchor-border-width;

Expand Down
13 changes: 7 additions & 6 deletions components/auto-complete/nz-autocomplete-trigger.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export class NzAutocompleteTriggerDirective implements ControlValueAccessor, OnD
}

openPanel(): void {
this.previousValue = this.elementRef.nativeElement.value;
this.attachOverlay();
}

Expand Down Expand Up @@ -178,19 +179,19 @@ export class NzAutocompleteTriggerDirective implements ControlValueAccessor, OnD
handleInput(event: KeyboardEvent): void {
const target = event.target as HTMLInputElement;
let value: number | string | null = target.value;
if (target.type === 'number') {
value = value === '' ? null : parseFloat(value);
}
if (this.canOpen() && document.activeElement === event.target && this.previousValue !== value) {
this.previousValue = value;

if (this.canOpen() && document.activeElement === target && this.previousValue !== value) {
if (target.type === 'number') {
value = value === '' ? null : parseFloat(value);
}

this._onChange(value);
this.openPanel();
}
}

handleFocus(): void {
if (this.canOpen()) {
this.previousValue = this.elementRef.nativeElement.value;
this.openPanel();
}
}
Expand Down
8 changes: 4 additions & 4 deletions components/auto-complete/nz-autocomplete.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,17 @@ export class NzAutocompleteComponent implements AfterViewInit, OnDestroy {
@ViewChildren(NzAutocompleteOptionComponent) fromDataSourceOptions: QueryList<NzAutocompleteOptionComponent>;

/** cdk-overlay */
@ViewChild(TemplateRef) template: TemplateRef<{}>;
@ViewChild('panel') panel: ElementRef;
@ViewChild('content') content: ElementRef;
@ViewChild(TemplateRef, { static: false }) template: TemplateRef<{}>;
@ViewChild('panel', { static: false }) panel: ElementRef;
@ViewChild('content', { static: false }) content: ElementRef;

private activeItemIndex: number = -1;
private selectionChangeSubscription = Subscription.EMPTY;
private dataSourceChangeSubscription = Subscription.EMPTY;
/** Options changes listener */
readonly optionSelectionChanges: Observable<NzOptionSelectionChange> = defer(() => {
if (this.options) {
return merge(...this.options.map(option => option.selectionChange));
return merge<NzOptionSelectionChange>(...this.options.map(option => option.selectionChange));
}
return this.ngZone.onStable.asObservable().pipe(
take(1),
Expand Down
16 changes: 8 additions & 8 deletions components/auto-complete/nz-autocomplete.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,8 @@ class NzTestSimpleAutocompleteComponent {
inputControl = new FormControl();
options: Array<string | number> = ['Burns Bay Road', 'Downing Street', 'Wall Street'];

@ViewChild(NzAutocompleteComponent) panel: NzAutocompleteComponent;
@ViewChild(NzAutocompleteTriggerDirective) trigger: NzAutocompleteTriggerDirective;
@ViewChild(NzAutocompleteComponent, { static: false }) panel: NzAutocompleteComponent;
@ViewChild(NzAutocompleteTriggerDirective, { static: false }) trigger: NzAutocompleteTriggerDirective;
@ViewChildren(NzAutocompleteOptionComponent) optionComponents: QueryList<NzAutocompleteOptionComponent>;

constructor() {
Expand Down Expand Up @@ -880,8 +880,8 @@ class NzTestAutocompletePropertyComponent {
overlayClassName = '';
overlayStyle = {};
options = ['Burns Bay Road', 'Downing Street', 'Wall Street'];
@ViewChild(NzAutocompleteComponent) panel: NzAutocompleteComponent;
@ViewChild(NzAutocompleteTriggerDirective) trigger: NzAutocompleteTriggerDirective;
@ViewChild(NzAutocompleteComponent, { static: false }) panel: NzAutocompleteComponent;
@ViewChild(NzAutocompleteTriggerDirective, { static: false }) trigger: NzAutocompleteTriggerDirective;

constructor() {}
}
Expand All @@ -892,7 +892,7 @@ class NzTestAutocompletePropertyComponent {
`
})
class NzTestAutocompleteWithoutPanelComponent {
@ViewChild(NzAutocompleteTriggerDirective) trigger: NzAutocompleteTriggerDirective;
@ViewChild(NzAutocompleteTriggerDirective, { static: false }) trigger: NzAutocompleteTriggerDirective;
}

@Component({
Expand All @@ -906,7 +906,7 @@ class NzTestAutocompleteWithoutPanelComponent {
})
class NzTestAutocompleteWithOnPushDelayComponent implements OnInit {
options: string[] = [];
@ViewChild(NzAutocompleteTriggerDirective) trigger: NzAutocompleteTriggerDirective;
@ViewChild(NzAutocompleteTriggerDirective, { static: false }) trigger: NzAutocompleteTriggerDirective;

ngOnInit(): void {
setTimeout(() => {
Expand Down Expand Up @@ -975,7 +975,7 @@ class NzTestAutocompleteGroupComponent {
}
];

@ViewChild(NzAutocompleteTriggerDirective) trigger: NzAutocompleteTriggerDirective;
@ViewChild(NzAutocompleteTriggerDirective, { static: false }) trigger: NzAutocompleteTriggerDirective;
}

@Component({
Expand All @@ -991,7 +991,7 @@ class NzTestAutocompleteGroupComponent {
class NzTestAutocompleteWithFormComponent {
form: FormGroup;
options = ['Burns Bay Road', 'Downing Street', 'Wall Street'];
@ViewChild(NzAutocompleteTriggerDirective) trigger: NzAutocompleteTriggerDirective;
@ViewChild(NzAutocompleteTriggerDirective, { static: false }) trigger: NzAutocompleteTriggerDirective;

constructor(private fb: FormBuilder) {
this.form = this.fb.group({ formControl: 'Burns' });
Expand Down
11 changes: 10 additions & 1 deletion components/auto-complete/style/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';
@import '../../input/style/mixin';

Expand Down Expand Up @@ -54,6 +54,7 @@
}
&[disabled] {
.disabled;

background-color: transparent;
}
}
Expand Down Expand Up @@ -81,3 +82,11 @@
}
}
}

// https://github.com/ant-design/ant-design/issues/14156
.@{input-prefix-cls}-group > .@{autocomplete-prefix-cls} {
.@{select-prefix-cls}-search__field.@{input-prefix-cls}-affix-wrapper {
display: inline;
float: none;
}
}
2 changes: 1 addition & 1 deletion components/avatar/avatar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ describe('avatar', () => {
styleUrls: ['./style/index.less']
})
class TestAvatarComponent {
@ViewChild('comp') comp: NzAvatarComponent;
@ViewChild('comp', { static: false }) comp: NzAvatarComponent;
nzShape = 'square';
nzSize: string | number = 'large';
nzIcon: string | null = 'anticon anticon-user';
Expand Down
Loading

0 comments on commit e038f25

Please sign in to comment.