Skip to content

Commit d11ee61

Browse files
authored
release(1.0): release 1.0 (#1610)
* wip(release): release 1.0 * fix(module:date-picker): fix #1528 date-picker overlay close #1528 * fix(module:menu): fix menu nzInlineCollapsed close #1625 close #1596 close #1586 close #1428
1 parent 214a00d commit d11ee61

53 files changed

Lines changed: 826 additions & 735 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

PROGRESS.md

Lines changed: 0 additions & 103 deletions
This file was deleted.

README-zh_CN.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
# NG-ZORRO
88
[![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)
99
[![Codecov](https://img.shields.io/codecov/c/github/NG-ZORRO/ng-zorro-antd/master.svg?style=flat-square)](https://codecov.io/gh/NG-ZORRO/ng-zorro-antd)
10-
[![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/ng-zorro-antd)
1110
[![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)
1211
[![Issue Stats](https://img.shields.io/issuestats/i/github/NG-ZORRO/ng-zorro-antd.svg?style=flat-square)](https://github.com/NG-ZORRO/ng-zorro-antd/issues)
1312
[![NPM downloads](http://img.shields.io/npm/dm/ng-zorro-antd.svg?style=flat-square)](https://npmjs.org/package/ng-zorro-antd)
@@ -18,12 +17,15 @@
1817
[README in English](README.md)
1918

2019
## 版本
20+
[![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/ng-zorro-antd)
21+
22+
## 支持 Angular 版本
2123

22-
- [![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/ng-zorro-antd)
24+
目前支持 Angular `^6.0.0` 版本。
2325

24-
- 1.x (支持 Angular 6.x & Ant Design 3.x) 即将放出
25-
- 0.7.x (support Angular 5.x & Ant Design 3.x) 目前推荐版本
26-
- 0.6.x (support Angular 5.x & Ant Design 2.x) **不再维护**
26+
## 设计规范
27+
28+
`ng-zorro-antd`Ant Design 设计规范定期同步,你可以在线查看[同步日志](https://nz-styles-syncer.now.sh/)
2729

2830
## 特性
2931

@@ -38,23 +40,14 @@
3840

3941
## 安装
4042

41-
### 使用 npm 或 yarn 安装
42-
43-
**我们推荐使用 npm 或 yarn 的方式进行开发**,不仅可在开发环境轻松调试,也可放心地在生产环境打包部署使用,享受整个生态圈和工具链带来的诸多好处。
43+
我们强烈推荐官方的 `@angular/cli` 工具链辅助进行开发,在实际项目开发中,它可以很好的满足对 TypeScript 代码的构建、调试、代理、打包部署等一系列工程化的需求。
4444

4545
```bash
46-
$ npm install ng-zorro-antd --save
46+
$ ng new PROJECT_NAME
47+
$ cd PROJECT_NAME
48+
$ ng add ng-zorro-antd
4749
```
4850

49-
```bash
50-
$ yarn add ng-zorro-antd
51-
```
52-
53-
如果你的网络环境不佳,推荐使用 [cnpm](https://github.com/cnpm/cnpm)
54-
55-
## 标准开发
56-
57-
实际项目开发中,你会需要对 TypeScript 代码的构建、调试、代理、打包部署等一系列工程化的需求,我们强烈推荐官方的 `@angular/cli` 工具链辅助进行开发。
5851
> 如果你想了解更多CLI工具链的功能和命令,建议访问 [Angular CLI](https://github.com/angular/angular-cli) 了解更多
5952
6053

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
# NG-ZORRO
88
[![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)
99
[![Codecov](https://img.shields.io/codecov/c/github/NG-ZORRO/ng-zorro-antd/master.svg?style=flat-square)](https://codecov.io/gh/NG-ZORRO/ng-zorro-antd)
10-
[![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/ng-zorro-antd)
1110
[![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)
1211
[![Issue Stats](https://img.shields.io/issuestats/i/github/NG-ZORRO/ng-zorro-antd.svg?style=flat-square)](https://github.com/NG-ZORRO/ng-zorro-antd/issues)
1312
[![NPM downloads](http://img.shields.io/npm/dm/ng-zorro-antd.svg?style=flat-square)](https://npmjs.org/package/ng-zorro-antd)
@@ -21,10 +20,13 @@ An enterprise-class UI components based on Ant Design and Angular.
2120

2221
[![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/ng-zorro-antd)
2322

24-
- 1.x (support Angular 6.x & Ant Design 3.x) will release soon
25-
- 0.7.x (support Angular 5.x & Ant Design 3.x) current version
26-
- 0.6.x (support Angular 5.x & Ant Design 2.x) **Not Under Maintenance**
23+
## Angular Support
24+
25+
Now Supports Angular `^6.0.0`.
2726

27+
## Design Specification
28+
29+
`ng-zorro-antd` synchronizes design specification with [Ant Design](https://ant.design/docs/spec/introduce) on a regular basis, you can check the [log](https://nz-styles-syncer.now.sh/) online.
2830

2931
## Features
3032

@@ -39,20 +41,21 @@ An enterprise-class UI components based on Ant Design and Angular.
3941

4042
## Installation
4143

42-
### Using npm or yarn
43-
44-
**We recommend using npm or yarn to install**,it not only makes development easier,but also allow you to take advantage of the rich ecosystem of Javascript packages and tooling.
44+
**We recommend using `@angular/cli` to install**,it not only makes development easier,but also allow you to take advantage of the rich ecosystem of angular packages and tooling.
4545

4646
```bash
47-
$ npm install ng-zorro-antd --save
47+
$ ng new PROJECT_NAME
48+
$ cd PROJECT_NAME
49+
$ ng add ng-zorro-antd --i18n=en_US
4850
```
4951

50-
```bash
51-
$ yarn add ng-zorro-antd
52-
```
52+
> More information about `@angular/cli` [here](https://github.com/angular/angular-cli).
5353
54-
If you are in a bad network environment,you can try other registries and tools like [cnpm](https://github.com/cnpm/cnpm).
54+
You can also install `ng-zorro-antd` with npm or yarn
5555

56+
```bash
57+
$ npm install ng-zorro-antd
58+
```
5659

5760
## Companies using ng-zorro-antd
5861

build.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ sed -e "s/from '.\//from '.\/src\//g" publish/src/index.d.ts > publish/antd.d.ts
4545
sed -e "s/\":\".\//\":\".\/src\//g" publish/src/index.metadata.json > publish/antd.metadata.json
4646
rm publish/src/index.d.ts publish/src/index.metadata.json
4747

48-
echo 'Generate schematics by demos'
49-
npm run schematic:demo
50-
5148
echo 'Building schematics'
5249
npm run schematic:demo
5350
npm run schematic:build

components/calendar/doc/index.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ When data is in the form of dates, such as schedules, timetables, prices calenda
1313

1414
## API
1515

16-
**Note:** Some of Calendar's locale are coming from [Angular i18n](https://angular.io/guide/i18n), that should be provided in the file of `main.ts` or `app.module.ts`.
16+
**Note:** Some of Calendar's locale are coming from [Angular i18n](https://angular.io/guide/i18n), that should be provided in the file of `app.module.ts`.
1717

1818
For example:
1919
```typescript

components/calendar/doc/index.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ title: Calendar
1414

1515
## API
1616

17-
**注意:**Calendar 的部分 locale 来自于 Angular 自身的[国际化支持](https://angular.io/guide/i18n),需要在 `main.ts` 或者 `app.module.ts` 文件中 引入相应的 Angular 语言包。
17+
**注意:**Calendar 的部分 locale 来自于 Angular 自身的[国际化支持](https://angular.io/guide/i18n),需要在 `app.module.ts` 文件中 引入相应的 Angular 语言包。
1818

1919
例如:
2020
```typescript

components/core/services/nz-measure-scrollbar.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import { DOCUMENT } from '@angular/common';
22
import { Inject, Injectable } from '@angular/core';
33
import { isNotNil } from '../util/check';
44

5-
@Injectable()
5+
@Injectable({
6+
providedIn: 'root',
7+
})
68
export class NzMeasureScrollbarService {
79
private _scrollbarWidth: number;
810
private scrollbarMeasure = {

components/date-picker/doc/index.en-US.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ By clicking the input box, you can select a date from a popup calendar.
1212

1313
## API
1414

15-
**Note:** Some of nz-date-picker's locale are coming from [Angular i18n](https://angular.io/guide/i18n), that should be provided in the file of `main.ts`.
15+
**Note:** Some of nz-date-picker's locale are coming from [Angular i18n](https://angular.io/guide/i18n), that should be provided in the file of `app.module.ts`.
1616

1717
For example:
1818
```typescript
@@ -44,7 +44,6 @@ The following APIs are shared by nz-date-picker, nz-month-picker, nz-range-picke
4444
| `[nzDisabledDate]` | specify the date that cannot be selected | (current: Date) => boolean | - |
4545
| `[nzLocale]` | localization configuration | object | [default](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) |
4646
| `[nzOpen]` | open state of picker | boolean | - |
47-
| `[nzPlaceHolder]` | placeholder of date input | string / string[] | - |
4847
| `[nzPopupStyle]` | to customize the style of the popup calendar | object | {} |
4948
| `[nzDropdownClassName]` | to customize the className of the popup calendar | string | - |
5049
| `[nzSize]` | determine the size of the input box, the height of `large` and `small`, are 40px and 24px respectively, while default size is 32px | string | - |
@@ -61,8 +60,9 @@ The following APIs are shared by nz-date-picker, nz-month-picker, nz-range-picke
6160
| `[nzRenderExtraFooter]` | render extra footer in panel | TemplateRef / string or () => TemplateRef / string | - |
6261
| `[nzShowTime]` | to provide an additional time selection | object / boolean | [TimePicker Options](/components/time-picker/en#api) |
6362
| `[nzShowToday]` | whether to show "Today" button | boolean | true |
63+
| `[nzPlaceHolder]` | placeholder of date input | string | - |
6464
| `(nzOnOk)` | callback when click ok button | `EventEmitter<Date>` | - |
65-
| `[ngModelChange]` | Date change callback | `EventEmitter<Date>` | - |
65+
| `(ngModelChange)` | Date change callback | `EventEmitter<Date>` | - |
6666

6767
### nz-month-picker
6868

@@ -71,6 +71,7 @@ The following APIs are shared by nz-date-picker, nz-month-picker, nz-range-picke
7171
| `[ngModel]` | Date | Date | - |
7272
| `[nzFormat]` | to set the date format, refer to [DatePipe](https://angular.io/api/common/DatePipe) | string | "yyyy-MM" |
7373
| `[nzRenderExtraFooter]` | render extra footer in panel | TemplateRef / string or () => TemplateRef / string | - |
74+
| `[nzPlaceHolder]` | placeholder of date input | string | - |
7475
| `(ngModelChange)` | Date change callback | `EventEmitter<Date>` | - |
7576

7677
### nz-week-picker
@@ -79,6 +80,7 @@ The following APIs are shared by nz-date-picker, nz-month-picker, nz-range-picke
7980
| -------- | ----------- | ---- | ------- |
8081
| `[ngModel]` | Date | Date | - |
8182
| `[nzFormat]` | to set the date format, refer to [DatePipe](https://angular.io/api/common/DatePipe) | string | "yyyy-ww" |
83+
| `[nzPlaceHolder]` | placeholder of date input | string | - |
8284
| `(ngModelChange)` | Date change callback | `EventEmitter<Date>` | - |
8385

8486
### nz-range-picker
@@ -91,6 +93,7 @@ The following APIs are shared by nz-date-picker, nz-month-picker, nz-range-picke
9193
| `[nzRanges]` | preseted ranges for quick selection | { [ key: string ]: Date[] } | - |
9294
| `[nzRenderExtraFooter]` | render extra footer in panel | TemplateRef / string or () => TemplateRef / string | - |
9395
| `[nzShowTime]` | to provide an additional time selection | object / boolean | [TimePicker Options](/components/time-picker/en#api) |
96+
| `[nzPlaceHolder]` | placeholder of date input | string[] | - |
9497
| `(nzOnOk)` | click ok callback | `EventEmitter<Date[]>` | - |
9598
| `(ngModelChange)` | Date change callback | `EventEmitter<Date[]>` | - |
9699

components/date-picker/doc/index.zh-CN.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ subtitle: 日期选择框
1313

1414
## API
1515

16-
**注意:**nz-date-picker 的部分 locale 来自于 Angular 自身的[国际化支持](https://angular.io/guide/i18n),需要在 `main.ts`文件中 引入相应的 Angular 语言包。
16+
**注意:**nz-date-picker 的部分 locale 来自于 Angular 自身的[国际化支持](https://angular.io/guide/i18n),需要在 `app.module.ts` 文件中 引入相应的 Angular 语言包。
1717

1818
例如:
1919
```typescript
@@ -45,7 +45,6 @@ registerLocaleData(zh);
4545
| `[nzDisabledDate]` | 不可选择的日期 | (current: Date) => boolean ||
4646
| `[nzLocale]` | 国际化配置 | object | [默认配置](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) |
4747
| `[nzOpen]` | 控制弹层是否展开 | boolean | - |
48-
| `[nzPlaceHolder]` | 输入框提示文字 | string / string[] | - |
4948
| `[nzPopupStyle]` | 额外的弹出日历样式 | object | {} |
5049
| `[nzDropdownClassName]` | 额外的弹出日历 className | string | - |
5150
| `[nzSize]` | 输入框大小,`large` 高度为 40px,`small` 为 24px,默认是 32px | string ||
@@ -62,6 +61,7 @@ registerLocaleData(zh);
6261
| `[nzRenderExtraFooter]` | 在面板中添加额外的页脚 | TemplateRef / string or () => TemplateRef / string | - |
6362
| `[nzShowTime]` | 增加时间选择功能 | object / boolean | [TimePicker Options](/components/time-picker/zh#api) |
6463
| `[nzShowToday]` | 是否展示“今天”按钮 | boolean | true |
64+
| `[nzPlaceHolder]` | 输入框提示文字 | string | - |
6565
| `(nzOnOk)` | 点击确定按钮的回调 | `EventEmitter<Date>` | - |
6666
| `(ngModelChange)` | 时间发生变化的回调 | `EventEmitter<Date>` ||
6767

@@ -72,6 +72,7 @@ registerLocaleData(zh);
7272
| `[ngModel]` | 日期 | Date ||
7373
| `[nzFormat]` | 展示的日期格式,配置参考 [DatePipe](https://angular.io/api/common/DatePipe) | string | "yyyy-MM" |
7474
| `[nzRenderExtraFooter]` | 在面板中添加额外的页脚 | TemplateRef / string or () => TemplateRef / string | - |
75+
| `[nzPlaceHolder]` | 输入框提示文字 | string | - |
7576
| `(ngModelChange)` | 时间发生变化的回调 | `EventEmitter<Date>` ||
7677

7778
### nz-week-picker
@@ -80,6 +81,7 @@ registerLocaleData(zh);
8081
| --- | --- | --- | --- |
8182
| `[ngModel]` | 日期 | Date ||
8283
| `[nzFormat]` | 展示的日期格式,配置参考 [DatePipe](https://angular.io/api/common/DatePipe) | string | "yyyy-ww" |
84+
| `[nzPlaceHolder]` | 输入框提示文字 | string | - |
8385
| `(ngModelChange)` | 时间发生变化的回调 | `EventEmitter<Date>` ||
8486

8587
### nz-range-picker
@@ -92,6 +94,7 @@ registerLocaleData(zh);
9294
| `[nzRanges]`       | 预设时间范围快捷选择 | { [ key: string ]: Date[] } ||
9395
| `[nzRenderExtraFooter]` | 在面板中添加额外的页脚 | TemplateRef / string or () => TemplateRef / string | - |
9496
| `[nzShowTime]` | 增加时间选择功能 | object / boolean | [TimePicker Options](/components/time-picker/zh#api) |
97+
| `[nzPlaceHolder]` | 输入框提示文字 | string[] | - |
9598
| `(nzOnOk)` | 点击确定按钮的回调 | `EventEmitter<Date[]>` | - |
9699
| `(ngModelChange)` | 时间发生变化的回调 | `EventEmitter<Date[]>` ||
97100

components/date-picker/picker.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {
2+
CdkConnectedOverlay,
23
CdkOverlayOrigin,
34
ConnectedOverlayPositionChange,
45
ConnectionPositionPair
@@ -47,7 +48,7 @@ export class NzPickerComponent implements OnInit, AfterViewInit {
4748
@Output() openChange = new EventEmitter<boolean>(); // Emitted when overlay's open state change
4849

4950
@ViewChild('origin') origin: CdkOverlayOrigin;
50-
// @ViewChild('overlay') overlay: CdkConnectedOverlay;
51+
@ViewChild(CdkConnectedOverlay) cdkConnectedOverlay: CdkConnectedOverlay;
5152
@ViewChild('pickerInput') pickerInput: ElementRef;
5253

5354
prefixCls = 'ant-calendar';
@@ -115,6 +116,11 @@ export class NzPickerComponent implements OnInit, AfterViewInit {
115116
if (!this.realOpenState) {
116117
this.overlayOpen = true;
117118
this.openChange.emit(this.overlayOpen);
119+
setTimeout(() => {
120+
if (this.cdkConnectedOverlay && this.cdkConnectedOverlay.overlayRef) {
121+
this.cdkConnectedOverlay.overlayRef.updatePosition();
122+
}
123+
});
118124
}
119125
}
120126

0 commit comments

Comments
 (0)