Skip to content

Commit

Permalink
release(1.0): release 1.0 (#1610)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
vthinkxie authored Jun 11, 2018
1 parent 214a00d commit d11ee61
Show file tree
Hide file tree
Showing 53 changed files with 826 additions and 735 deletions.
103 changes: 0 additions & 103 deletions PROGRESS.md

This file was deleted.

29 changes: 11 additions & 18 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# NG-ZORRO
[![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/master.svg?style=flat-square)](https://codecov.io/gh/NG-ZORRO/ng-zorro-antd)
[![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/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)
[![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)
[![NPM downloads](http://img.shields.io/npm/dm/ng-zorro-antd.svg?style=flat-square)](https://npmjs.org/package/ng-zorro-antd)
Expand All @@ -18,12 +17,15 @@
[README in English](README.md)

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

## 支持 Angular 版本

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

- 1.x (支持 Angular 6.x & Ant Design 3.x) 即将放出
- 0.7.x (support Angular 5.x & Ant Design 3.x) 目前推荐版本
- 0.6.x (support Angular 5.x & Ant Design 2.x) **不再维护**
## 设计规范

`ng-zorro-antd`Ant Design 设计规范定期同步,你可以在线查看[同步日志](https://nz-styles-syncer.now.sh/)

## 特性

Expand All @@ -38,23 +40,14 @@

## 安装

### 使用 npm 或 yarn 安装

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

```bash
$ npm install ng-zorro-antd --save
$ ng new PROJECT_NAME
$ cd PROJECT_NAME
$ ng add ng-zorro-antd
```

```bash
$ yarn add ng-zorro-antd
```

如果你的网络环境不佳,推荐使用 [cnpm](https://github.com/cnpm/cnpm)

## 标准开发

实际项目开发中,你会需要对 TypeScript 代码的构建、调试、代理、打包部署等一系列工程化的需求,我们强烈推荐官方的 `@angular/cli` 工具链辅助进行开发。
> 如果你想了解更多CLI工具链的功能和命令,建议访问 [Angular CLI](https://github.com/angular/angular-cli) 了解更多

Expand Down
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# NG-ZORRO
[![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/master.svg?style=flat-square)](https://codecov.io/gh/NG-ZORRO/ng-zorro-antd)
[![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/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)
[![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)
[![NPM downloads](http://img.shields.io/npm/dm/ng-zorro-antd.svg?style=flat-square)](https://npmjs.org/package/ng-zorro-antd)
Expand All @@ -21,10 +20,13 @@ An enterprise-class UI components based on Ant Design and Angular.

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

- 1.x (support Angular 6.x & Ant Design 3.x) will release soon
- 0.7.x (support Angular 5.x & Ant Design 3.x) current version
- 0.6.x (support Angular 5.x & Ant Design 2.x) **Not Under Maintenance**
## Angular Support

Now Supports Angular `^6.0.0`.

## Design Specification

`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.

## Features

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

## Installation

### Using npm or yarn

**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.
**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.

```bash
$ npm install ng-zorro-antd --save
$ ng new PROJECT_NAME
$ cd PROJECT_NAME
$ ng add ng-zorro-antd --i18n=en_US
```

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

```bash
$ npm install ng-zorro-antd
```

## Companies using ng-zorro-antd

Expand Down
3 changes: 0 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ sed -e "s/from '.\//from '.\/src\//g" publish/src/index.d.ts > publish/antd.d.ts
sed -e "s/\":\".\//\":\".\/src\//g" publish/src/index.metadata.json > publish/antd.metadata.json
rm publish/src/index.d.ts publish/src/index.metadata.json

echo 'Generate schematics by demos'
npm run schematic:demo

echo 'Building schematics'
npm run schematic:demo
npm run schematic:build
Expand Down
2 changes: 1 addition & 1 deletion components/calendar/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ When data is in the form of dates, such as schedules, timetables, prices calenda

## API

**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`.
**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`.

For example:
```typescript
Expand Down
2 changes: 1 addition & 1 deletion components/calendar/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ title: Calendar

## API

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

例如:
```typescript
Expand Down
4 changes: 3 additions & 1 deletion components/core/services/nz-measure-scrollbar.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { DOCUMENT } from '@angular/common';
import { Inject, Injectable } from '@angular/core';
import { isNotNil } from '../util/check';

@Injectable()
@Injectable({
providedIn: 'root',
})
export class NzMeasureScrollbarService {
private _scrollbarWidth: number;
private scrollbarMeasure = {
Expand Down
9 changes: 6 additions & 3 deletions components/date-picker/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ By clicking the input box, you can select a date from a popup calendar.

## API

**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`.
**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`.

For example:
```typescript
Expand Down Expand Up @@ -44,7 +44,6 @@ The following APIs are shared by nz-date-picker, nz-month-picker, nz-range-picke
| `[nzDisabledDate]` | specify the date that cannot be selected | (current: Date) => boolean | - |
| `[nzLocale]` | localization configuration | object | [default](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) |
| `[nzOpen]` | open state of picker | boolean | - |
| `[nzPlaceHolder]` | placeholder of date input | string / string[] | - |
| `[nzPopupStyle]` | to customize the style of the popup calendar | object | {} |
| `[nzDropdownClassName]` | to customize the className of the popup calendar | string | - |
| `[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 | - |
Expand All @@ -61,8 +60,9 @@ The following APIs are shared by nz-date-picker, nz-month-picker, nz-range-picke
| `[nzRenderExtraFooter]` | render extra footer in panel | TemplateRef / string or () => TemplateRef / string | - |
| `[nzShowTime]` | to provide an additional time selection | object / boolean | [TimePicker Options](/components/time-picker/en#api) |
| `[nzShowToday]` | whether to show "Today" button | boolean | true |
| `[nzPlaceHolder]` | placeholder of date input | string | - |
| `(nzOnOk)` | callback when click ok button | `EventEmitter<Date>` | - |
| `[ngModelChange]` | Date change callback | `EventEmitter<Date>` | - |
| `(ngModelChange)` | Date change callback | `EventEmitter<Date>` | - |

### nz-month-picker

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

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

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

Expand Down
7 changes: 5 additions & 2 deletions components/date-picker/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ subtitle: 日期选择框

## API

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

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

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

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

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

Expand Down
8 changes: 7 additions & 1 deletion components/date-picker/picker.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
CdkConnectedOverlay,
CdkOverlayOrigin,
ConnectedOverlayPositionChange,
ConnectionPositionPair
Expand Down Expand Up @@ -47,7 +48,7 @@ export class NzPickerComponent implements OnInit, AfterViewInit {
@Output() openChange = new EventEmitter<boolean>(); // Emitted when overlay's open state change

@ViewChild('origin') origin: CdkOverlayOrigin;
// @ViewChild('overlay') overlay: CdkConnectedOverlay;
@ViewChild(CdkConnectedOverlay) cdkConnectedOverlay: CdkConnectedOverlay;
@ViewChild('pickerInput') pickerInput: ElementRef;

prefixCls = 'ant-calendar';
Expand Down Expand Up @@ -115,6 +116,11 @@ export class NzPickerComponent implements OnInit, AfterViewInit {
if (!this.realOpenState) {
this.overlayOpen = true;
this.openChange.emit(this.overlayOpen);
setTimeout(() => {
if (this.cdkConnectedOverlay && this.cdkConnectedOverlay.overlayRef) {
this.cdkConnectedOverlay.overlayRef.updatePosition();
}
});
}
}

Expand Down
4 changes: 3 additions & 1 deletion components/dropdown/nz-dropdown.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import { Subscription } from 'rxjs';

import { NzDropdownContextComponent } from './nz-dropdown-context.component';

@Injectable()
@Injectable({
providedIn: 'root'
})
export class NzDropdownService {
protected instance: NzDropdownContextComponent;
private overlayRef: OverlayRef;
Expand Down
Loading

0 comments on commit d11ee61

Please sign in to comment.