From 9a17984a5fc1ac5fa90f2099d90c19e5774997c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=89=B2?= Date: Tue, 22 Dec 2020 16:01:17 +0800 Subject: [PATCH] release(11.0.0): release 11.0.0 (#1104) --- CHANGELOG.md | 21 ++++++++++ docs/changelog.en-US.md | 20 +++++++++ docs/changelog.zh-CN.md | 20 +++++++++ docs/upgrade-v10.en-US.md | 32 -------------- docs/upgrade-v10.zh-CN.md | 32 -------------- docs/upgrade-v11.en-US.md | 41 ++++++++++++++++++ docs/upgrade-v11.zh-CN.md | 42 +++++++++++++++++++ package.json | 18 ++++---- .../ng-update/upgrade-rules/v11/layout.ts | 12 +++--- scripts/ci/build-schematics.sh | 2 +- scripts/ci/build.sh | 2 +- 11 files changed, 161 insertions(+), 81 deletions(-) delete mode 100644 docs/upgrade-v10.en-US.md delete mode 100644 docs/upgrade-v10.zh-CN.md create mode 100644 docs/upgrade-v11.en-US.md create mode 100644 docs/upgrade-v11.zh-CN.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 118aa7230..dd5d3bd3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +# [11.0.0](https://github.com/ng-alain/delon/compare/10.1.3...11.0.0) (2020-12-22) + + +### Bug Fixes + +* **sf:** fix invalid empty value of `pathValue` property ([#1099](https://github.com/ng-alain/delon/issues/1099)) ([dad5ed0](https://github.com/ng-alain/delon/commit/dad5ed045d5c559cb2e4ab3b92f297e7c1ee9f3c)) +* **util:time:** fix invalid format `toDate` ([#1093](https://github.com/ng-alain/delon/issues/1093)) ([3b97fc3](https://github.com/ng-alain/delon/commit/3b97fc3f33a58ff2701df52d1a0a055dfc523165)) + + +### Features + +* **cli:** Use source-map-explorer instead of webpack-bundle-analyzer ([#1091](https://github.com/ng-alain/delon/issues/1091)) ([30a3dc9](https://github.com/ng-alain/delon/commit/30a3dc972f02138fbd572114789738a957454b3d)) +* **cli:module:** feat auto import routing module to top routing module ([#1100](https://github.com/ng-alain/delon/issues/1100)) ([da46d3c](https://github.com/ng-alain/delon/commit/da46d3c496cc13adc8430ed9bea2829a435d4b68)) +* **form:textarea:** add `change`, `focus`, `blur` events ([#1096](https://github.com/ng-alain/delon/issues/1096)) ([8ae609c](https://github.com/ng-alain/delon/commit/8ae609c8459cce3db0d9973a63f3e1e35547ec98)) +* **module:theme:** adding French locale ([#1094](https://github.com/ng-alain/delon/issues/1094)) ([b20259a](https://github.com/ng-alain/delon/commit/b20259a787ca76671e9578ada060737ce32a6a92)) +* **sf:** Allow use of `setVisible` method ([#1098](https://github.com/ng-alain/delon/issues/1098)) ([fb46405](https://github.com/ng-alain/delon/commit/fb464050607effa595bae9f679c5097131039003)) +* **sf:select:** add `searchDebounceTime` property ([#1097](https://github.com/ng-alain/delon/issues/1097)) ([0fa1e70](https://github.com/ng-alain/delon/commit/0fa1e70a88a6cc400ff036b92556ebf3a67e33db)) +* **theme:layout-default:** add `nav` property ([#1101](https://github.com/ng-alain/delon/issues/1101)) ([9703641](https://github.com/ng-alain/delon/commit/9703641147cb49b9853b1cb175241793177a5bff)) + + + ## [10.1.2](https://github.com/ng-alain/delon/compare/10.1.1...10.1.2) (2020-11-26) diff --git a/docs/changelog.en-US.md b/docs/changelog.en-US.md index cd1f0b75f..007c4a9c7 100644 --- a/docs/changelog.en-US.md +++ b/docs/changelog.en-US.md @@ -14,6 +14,26 @@ NG-ALAIN strictly follows [Semantic Versioning 2.0.0](http://semver.org/lang/zh- --- +# [11.0.0](https://github.com/ng-alain/delon/compare/10.1.3...11.0.0) (2020-12-22) + +### Bug Fixes + +* **sf:** fix invalid empty value of `pathValue` property ([#1099](https://github.com/ng-alain/delon/issues/1099)) ([dad5ed0](https://github.com/ng-alain/delon/commit/dad5ed045d5c559cb2e4ab3b92f297e7c1ee9f3c)) +* **util:time:** fix invalid format `toDate` ([#1093](https://github.com/ng-alain/delon/issues/1093)) ([3b97fc3](https://github.com/ng-alain/delon/commit/3b97fc3f33a58ff2701df52d1a0a055dfc523165)) +* **util:array:** fix non-empty root parent id value should be return empty array ([#1084](https://github.com/ng-alain/delon/issues/1084)) ([95c0946](https://github.com/ng-alain/delon/commit/95c0946f3dff1399ca567ad17dccc5a58542bb65)) + +### Features + +* **cli:** Use source-map-explorer instead of webpack-bundle-analyzer ([#1091](https://github.com/ng-alain/delon/issues/1091)) ([30a3dc9](https://github.com/ng-alain/delon/commit/30a3dc972f02138fbd572114789738a957454b3d)) +* **cli:module:** feat auto import routing module to top routing module ([#1100](https://github.com/ng-alain/delon/issues/1100)) ([da46d3c](https://github.com/ng-alain/delon/commit/da46d3c496cc13adc8430ed9bea2829a435d4b68)) +* **form:textarea:** add `change`, `focus`, `blur` events ([#1096](https://github.com/ng-alain/delon/issues/1096)) ([8ae609c](https://github.com/ng-alain/delon/commit/8ae609c8459cce3db0d9973a63f3e1e35547ec98)) +* **module:theme:** adding French locale ([#1094](https://github.com/ng-alain/delon/issues/1094)) ([b20259a](https://github.com/ng-alain/delon/commit/b20259a787ca76671e9578ada060737ce32a6a92)) +* **sf:** Allow use of `setVisible` method ([#1098](https://github.com/ng-alain/delon/issues/1098)) ([fb46405](https://github.com/ng-alain/delon/commit/fb464050607effa595bae9f679c5097131039003)) +* **sf:select:** add `searchDebounceTime` property ([#1097](https://github.com/ng-alain/delon/issues/1097)) ([0fa1e70](https://github.com/ng-alain/delon/commit/0fa1e70a88a6cc400ff036b92556ebf3a67e33db)) +* **theme:** add `layout-default`, `layout-blank`, `setting-drawer`, `theme-btn` theme components ([#1101](https://github.com/ng-alain/delon/issues/1101)) ([9703641](https://github.com/ng-alain/delon/commit/9703641147cb49b9853b1cb175241793177a5bff)) +* **abc:pdf:** add `pdf` components ([#1086](https://github.com/ng-alain/delon/issues/1086)) ([2882a52](https://github.com/ng-alain/delon/commit/2882a5283ebc869afb33db476de9167e8def5de0)) +* **abc:xlsx:** support utf8 file format ([#1088](https://github.com/ng-alain/delon/issues/1088)) ([59ff03b](https://github.com/ng-alain/delon/commit/59ff03bf8474d311a6d196bf993e7679fbb29ebf)) + ## Old Version All releases notes can be found [here](https://github.com/ng-alain/ng-alain/releases) diff --git a/docs/changelog.zh-CN.md b/docs/changelog.zh-CN.md index 62e90e883..b4d531db6 100644 --- a/docs/changelog.zh-CN.md +++ b/docs/changelog.zh-CN.md @@ -14,6 +14,26 @@ NG-ALAIN 严格遵循 [Semantic Versioning 2.0.0](http://semver.org/lang/zh-CN/) --- +# [11.0.0](https://github.com/ng-alain/delon/compare/10.1.3...11.0.0) (2020-12-22) + +### Bug Fixes + +* **sf:** 修复空值时 `pathValue` 属性返回整个表单数据 ([#1099](https://github.com/ng-alain/delon/issues/1099)) ([dad5ed0](https://github.com/ng-alain/delon/commit/dad5ed045d5c559cb2e4ab3b92f297e7c1ee9f3c)) +* **util:time:** 修复 `toDate` 时间戳与格式字符串冲突 ([#1093](https://github.com/ng-alain/delon/issues/1093)) ([3b97fc3](https://github.com/ng-alain/delon/commit/3b97fc3f33a58ff2701df52d1a0a055dfc523165)) +* **util:array:** 修复非空根编号时总是返回空数组 ([#1084](https://github.com/ng-alain/delon/issues/1084)) ([95c0946](https://github.com/ng-alain/delon/commit/95c0946f3dff1399ca567ad17dccc5a58542bb65)) + +### Features + +* **cli:** 使用 source-map-explorer 替代 webpack-bundle-analyzer ([#1091](https://github.com/ng-alain/delon/issues/1091)) ([30a3dc9](https://github.com/ng-alain/delon/commit/30a3dc972f02138fbd572114789738a957454b3d)) +* **cli:module:** 新增 `ng g ng-alain:module` 时自动导入路由模块 ([#1100](https://github.com/ng-alain/delon/issues/1100)) ([da46d3c](https://github.com/ng-alain/delon/commit/da46d3c496cc13adc8430ed9bea2829a435d4b68)) +* **form:textarea:** 新增 `change`, `focus`, `blur` 事件 ([#1096](https://github.com/ng-alain/delon/issues/1096)) ([8ae609c](https://github.com/ng-alain/delon/commit/8ae609c8459cce3db0d9973a63f3e1e35547ec98)) +* **module:theme:** 新增法语 ([#1094](https://github.com/ng-alain/delon/issues/1094)) ([b20259a](https://github.com/ng-alain/delon/commit/b20259a787ca76671e9578ada060737ce32a6a92)) +* **sf:** 新增小部件属性的 `setVisible` 方法,用于控制显示与隐藏 ([#1098](https://github.com/ng-alain/delon/issues/1098)) ([fb46405](https://github.com/ng-alain/delon/commit/fb464050607effa595bae9f679c5097131039003)) +* **sf:select:** 新增 `searchDebounceTime` 属性 ([#1097](https://github.com/ng-alain/delon/issues/1097)) ([0fa1e70](https://github.com/ng-alain/delon/commit/0fa1e70a88a6cc400ff036b92556ebf3a67e33db)) +* **theme** 新增 `layout-default`、`layout-blank`、`setting-drawer`、`theme-btn` 主题组件 ([#1101](https://github.com/ng-alain/delon/issues/1101)) ([9703641](https://github.com/ng-alain/delon/commit/9703641147cb49b9853b1cb175241793177a5bff)) +* **abc:pdf:** 新增 `pdf` 组件 ([#1086](https://github.com/ng-alain/delon/issues/1086)) ([2882a52](https://github.com/ng-alain/delon/commit/2882a5283ebc869afb33db476de9167e8def5de0)) +* **abc:xlsx:** 新增支持 utf8 文件格式 ([#1088](https://github.com/ng-alain/delon/issues/1088)) ([59ff03b](https://github.com/ng-alain/delon/commit/59ff03bf8474d311a6d196bf993e7679fbb29ebf)) + ## 旧版本 旧版本的更新记录可以在 [Github](https://github.com/ng-alain/ng-alain/releases) 查看 diff --git a/docs/upgrade-v10.en-US.md b/docs/upgrade-v10.en-US.md deleted file mode 100644 index 04f2b2f88..000000000 --- a/docs/upgrade-v10.en-US.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -order: 1000 -type: Other -title: Upgrade to version 10.0 -hot: true ---- - -## Note: This article only describes the NG-ALAIN part. For details about the NG-ZORRO part, please refer to [#5775](https://github.com/NG-ZORRO/ng-zorro-antd/issues/5775). - -## Before upgrade - -1. Make sure `Node.js` >= `10.13`. -2. Create a new branch, or use other methods to back up the current project. -3. Delete the `package-lock.json` or `yarn.lock` file. - -## 1. Upgrade - -This description refers to the description of the upgrade from `9.x` to `10`; NG-ALAIN only needs one lines of commands: - -```bash -ng update @angular/core@10 @angular/cli@10 ng-zorro-antd@10 ng-alain@10 -``` - -## 2. Remove deprecation - -Remove all deprecation items declared in `9.x`, including the following: - -| Package | Component | Deprecation | -|---|----|-----| -| `@delon/chart` | `tag-cloud` | Date item `x`, `category` | -| `@delon/chart` | `timeline` | Date item `x` | -| `@delon/util` | `lazy` | `LazyResult.loaded` | diff --git a/docs/upgrade-v10.zh-CN.md b/docs/upgrade-v10.zh-CN.md deleted file mode 100644 index 4f8f19b14..000000000 --- a/docs/upgrade-v10.zh-CN.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -order: 1000 -type: Other -title: 升级到 10.0 版本 -hot: true ---- - -## 注意:本文只描述 NG-ALAIN 部分,关于 NG-ZORRO 部分细节请参考 [#5775](https://github.com/NG-ZORRO/ng-zorro-antd/issues/5775)。 - -## 开始之前 - -1. 首先确保你 `Node.js` >= `10.13` -2. 创建新的分支,或者使用其他方式备份当前项目 -3. 删除项目下 `package-lock.json` 或 `yarn.lock` 文件 - -## 一、升级步骤 - -本文描述是指从 `9.x` 升级至 `10` 的描述说明;NG-ALAIN 只需一行命令即可: - -```bash -ng update @angular/core@10 @angular/cli@10 ng-zorro-antd@10 ng-alain@10 -``` - -## 二、移除过期 - -移除所有已经在 `9.x` 声明的过期项,包含以下: - -| 包 | 组件 | 过期 | -|---|----|-----| -| `@delon/chart` | `tag-cloud` | 数据项 `x`、`category` | -| `@delon/chart` | `timeline` | 数据项 `x` | -| `@delon/util` | `lazy` | `LazyResult.loaded` | \ No newline at end of file diff --git a/docs/upgrade-v11.en-US.md b/docs/upgrade-v11.en-US.md new file mode 100644 index 000000000..5566e3db4 --- /dev/null +++ b/docs/upgrade-v11.en-US.md @@ -0,0 +1,41 @@ +--- +order: 1000 +type: Basic +title: Upgrade to version 11.0 +hot: true +--- + +> This guide applies to the current version ng-alain >= 10; +> If you encounter problems during the upgrade process, feel free to comment here. +> If you find any errors in this guide, please point out +> Or you have encountered a new problem and solved it, welcome to comment here. +> If you encounter problems please go to [NG-ALAIN V11 Upgrade Guide](https://github.com/ng-alain/ng-alain/issues/1863) for feedback. + + +## Before upgrade + +1. Make sure `Node.js` >= `10.13`. +2. Create a new branch, or use other methods to back up the current project. +3. Delete the `package-lock.json` or `yarn.lock` file. + +### 1.Upgrade dependencies + +- Upgrade Angular to 11.x version, ref https://update.angular.io/ . +- Run `ng update @angular/cdk`, if you have used `@angular/cdk`. + +### 2.Upgrade NG-ZORRO + +- Run `ng update ng-zorro-antd`. +- If any warning messages appear in the console, follow the prompts to modify the corresponding code. + +### 3.Upgrade NG-ALAIN + +- Run `ng update ng-alain` + +**Theme upgrade (optional)** + +We have further refined the default theme to `@delon/theme`, which is further streamlined compared to the previous version of the `layout` directory. This part of the upgrade needs to be done manually. For details, please refer to [Basic Layout](https://github.com /ng-alain/ng-alain/tree/master/src/app/layout/basic), [blank layout](https://github.com/ng-alain/ng-alain/tree/master/src/app /layout/blank) new way of writing. For the documentation of the new components, please refer to [Document](https://ng-alain.com/theme/layout-default/en). + +### Common Problems + +`...` \ No newline at end of file diff --git a/docs/upgrade-v11.zh-CN.md b/docs/upgrade-v11.zh-CN.md new file mode 100644 index 000000000..720e75e6c --- /dev/null +++ b/docs/upgrade-v11.zh-CN.md @@ -0,0 +1,42 @@ +--- +order: 1000 +type: Basic +title: 升级到 11.0 版本 +hot: true +--- + +> 本指南适用于当前版本 ng-alain >= 10 ; +> 如果在升级过程中遇到问题,欢迎提出。提问前请阅读 [如何向开源社区提问题](https://github.com/seajs/seajs/issues/545) +> 如果发现本指南存在遗漏/错误,请指出! +> 或者你遇到了新的问题并解决了,欢迎补充! +> 如果升级中遇到问题请前往 [NG-ALAIN V11 Upgrade Guide](https://github.com/ng-alain/ng-alain/issues/1863) 反馈。 + +## 开始之前 + +1. 首先确保你 `Node.js` >= `10.13` +2. 创建新的分支,或者使用其他方式备份当前项目 +3. 删除项目下 `package-lock.json` 或 `yarn.lock` 文件 + +## 升级步骤 + +### 1. 升级相关依赖 + +- 前往 https://update.angular.io/ 将项目升级到 Angular 11。 +- 如果你有单独使用 `@angular/cdk` 请执行 `ng update @angular/cdk` + +### 2.升级 NG-ZORRO + +- 运行 `ng update ng-zorro-antd` +- 如果控制台出现警告消息请按提示修改对应代码 + +### 3.升级 NG-ALAIN + +- 运行 `ng update ng-alain` + +**主题升级(可选)** + +我们将默认主题进一步提炼至 `@delon/theme` 相比较以前版本 `layout` 进一步精简,这部分升级需要手动来完成,有关细节可以参考 [基础布局](https://github.com/ng-alain/ng-alain/tree/master/src/app/layout/basic)、[空白布局](https://github.com/ng-alain/ng-alain/tree/master/src/app/layout/blank) 的新写法。有关新组件的文档请参考[文档](https://ng-alain.com/theme/layout-default/zh)。 + +## 常见问题 + +`...` \ No newline at end of file diff --git a/package.json b/package.json index 326308358..afedeb88d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "delon", - "version": "10.1.2", + "version": "11.0.0", "description": "Delon is a set of essential modules for NG-ALAIN.", "keywords": [ "delon", @@ -61,11 +61,11 @@ "@angular/platform-server": "~11.0.5", "@angular/elements": "~11.0.5", "@antv/data-set": "^0.11.7", - "@antv/g2": "^4.0.15", + "@antv/g2": "^4.1.3", "@ngx-translate/core": "^13.0.0", "@ngx-translate/http-loader": "^6.0.0", - "@stackblitz/sdk": "^1.5.0", - "codesandbox": "^2.1.16", + "@stackblitz/sdk": "^1.5.2", + "codesandbox": "^2.2.1", "ajv": "^6.12.6", "extend": "^3.0.2", "file-saver": "^2.0.2", @@ -139,11 +139,11 @@ "ng-packagr": "^11.0.3", "tsickle": "^0.39.1", "parse5": "^6.0.0", - "prettier": "^2.1.2", - "pretty-quick": "^3.0.2", + "prettier": "^2.2.1", + "pretty-quick": "^3.1.0", "readline-sync": "^1.4.10", "stream": "0.0.2", - "stylelint": "^13.7.0", + "stylelint": "^13.8.0", "stylelint-config-prettier": "^8.0.2", "stylelint-config-rational-order": "^0.1.2", "stylelint-config-standard": "^20.0.0", @@ -158,8 +158,8 @@ "ng-alain-plugin-theme": "^11.0.1", "nz-tslint-rules": "^0.901.2", "tsconfig-paths": "^3.9.0", - "@nguniversal/builders": "^11.0.0", - "@types/express": "^4.17.8" + "@nguniversal/builders": "^11.0.1", + "@types/express": "^4.17.9" }, "husky": { "hooks": { diff --git a/packages/schematics/ng-update/upgrade-rules/v11/layout.ts b/packages/schematics/ng-update/upgrade-rules/v11/layout.ts index 5dbe30d62..88420643c 100644 --- a/packages/schematics/ng-update/upgrade-rules/v11/layout.ts +++ b/packages/schematics/ng-update/upgrade-rules/v11/layout.ts @@ -15,10 +15,10 @@ function upgradeStylePath(): void { } // 更新样式引入路径 - const content = readContent(tree, stylesLessPath) - .replace(`@import '~@delon/theme/layout/default/index';`, `@import '~@delon/theme/layout-default/style/index';`) - .replace(`@import '~@delon/theme/layout/fullscreen/index';`, `@import '~@delon/theme/layout-blank/style/index';`); - overwriteFile(tree, stylesLessPath, content, true); + const stylesLessContent = readContent(tree, stylesLessPath) + .replace(`~@delon/theme/layout/default/index`, `~@delon/theme/layout-default/style/index`) + .replace(`~@delon/theme/layout/fullscreen/index`, `~@delon/theme/layout-blank/style/index`); + tree.overwrite(stylesLessPath, stylesLessContent); logInfo(context, `Update style import path`); // 修改 fullscreen 的样式 @@ -26,8 +26,8 @@ function upgradeStylePath(): void { if (!tree.exists(fullscreenComponentPath)) { return; } - const content1 = readContent(tree, stylesLessPath).replace(`alain-fullscreen`, `alain-blank`); - overwriteFile(tree, stylesLessPath, content1, true); + const fullscreenComponentContent = readContent(tree, fullscreenComponentPath).replace(`alain-fullscreen`, `alain-blank`); + tree.overwrite(fullscreenComponentPath, fullscreenComponentContent); logInfo(context, `Update alain-fullscreen to alain-blank`); } diff --git a/scripts/ci/build-schematics.sh b/scripts/ci/build-schematics.sh index 124703c96..65e78892a 100755 --- a/scripts/ci/build-schematics.sh +++ b/scripts/ci/build-schematics.sh @@ -196,7 +196,7 @@ copyFiles() { cloneScaffold() { if [[ ! -d ng-alain ]]; then echo ">>> Not found scaffold source files, must be clone ng-alain ..." - git clone --depth 1 -b issues-ng11 https://github.com/ng-alain/ng-alain.git + git clone --depth 1 https://github.com/ng-alain/ng-alain.git echo ">>> removed .git" rm -rf ng-alain/.git else diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index a8188bbf8..713ac8686 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -20,7 +20,7 @@ DIST="$(pwd)/dist" cloneScaffold() { if [[ ! -d ng-alain ]]; then echo ">>> Not found scaffold source files, must be clone ng-alain ..." - git clone --depth 1 -b issues-ng11 https://github.com/ng-alain/ng-alain.git + git clone --depth 1 https://github.com/ng-alain/ng-alain.git else echo ">>> Found scaffold source files" fi