From 7ad6fd126877fdbf350d7b9741b986c6a3c814f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=89=B2?= Date: Tue, 5 Jan 2021 04:24:05 -0600 Subject: [PATCH] release(11.1.0): release 11.1.0 (#1127) --- CHANGELOG.md | 24 ++++++++++++++++++++ docs/changelog.en-US.md | 28 +++++++++++++++++++++++ docs/changelog.zh-CN.md | 28 +++++++++++++++++++++++ package.json | 2 +- src/app/core/code/code.service.ts | 13 ++++------- src/app/core/startup.service.ts | 37 +++++++++++++++++++++++++++++-- src/index.html | 30 ------------------------- 7 files changed, 120 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eec0d6b1e..71396efb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +# [11.1.0](https://github.com/ng-alain/delon/compare/11.0.2...11.1.0) (2021-01-05) + + +### Bug Fixes + +* **auth:** fix always trigger refresh event in jwt ([#1115](https://github.com/ng-alain/delon/issues/1115)) ([1ef2369](https://github.com/ng-alain/delon/commit/1ef23696d5ff8de8133cbe2d5e7a53cedee2f5d6)) +* **cli:plugin:icon:** fix support conditional expression ([#1121](https://github.com/ng-alain/delon/issues/1121)) ([a481c1c](https://github.com/ng-alain/delon/commit/a481c1c257edaac603852c0096c5f4a4ecb371f5)) + + +### Features + +* **abc:st:** add `pureList` method ([#1126](https://github.com/ng-alain/delon/issues/1126)) ([70270f8](https://github.com/ng-alain/delon/commit/70270f8bb4914e5ad2bd4d769f121131b4e98944)) +* **abc:st:** support item type of `setRow` ([#1119](https://github.com/ng-alain/delon/issues/1119)) ([9ea783e](https://github.com/ng-alain/delon/commit/9ea783e327d206b8cc8ad0d10cd2b56bd454d173)) +* **chart:** lazy load g2 libary ([#1123](https://github.com/ng-alain/delon/issues/1123)) ([cb7b5bb](https://github.com/ng-alain/delon/commit/cb7b5bbbbaeb218ac4e912275cd77e97dfc6e7e2)) +* **theme:** add `RTLService` service ([#1120](https://github.com/ng-alain/delon/issues/1120)) ([1f4f67b](https://github.com/ng-alain/delon/commit/1f4f67b239f6ea7227aca046ba9110642a43e774)) +* support rtl ([#1118](https://github.com/ng-alain/delon/issues/1118)) ([a5dc52e](https://github.com/ng-alain/delon/commit/a5dc52e0e180b18450e1d07537ff3da865c166b2)) + + +### Performance Improvements + +* **theme:** perf `[@enable-all-colors](https://github.com/enable-all-colors): false` ([#1113](https://github.com/ng-alain/delon/issues/1113)) ([d03c8fb](https://github.com/ng-alain/delon/commit/d03c8fb1344b8d692e987fcd259e7d58417ec9dc)) + + + ## [11.0.2](https://github.com/ng-alain/delon/compare/11.0.1...11.0.2) (2020-12-23) diff --git a/docs/changelog.en-US.md b/docs/changelog.en-US.md index 877cb62fa..f717e215c 100644 --- a/docs/changelog.en-US.md +++ b/docs/changelog.en-US.md @@ -14,6 +14,34 @@ NG-ALAIN strictly follows [Semantic Versioning 2.0.0](http://semver.org/lang/zh- --- +# [11.1.0](https://github.com/ng-alain/delon/compare/11.0.2...11.1.0) (2021-01-05) + +### Scaffold + +* support RTL +* perf `SharedModule` module ([#1894](https://github.com/ng-alain/ng-alain/pull/1894)) ([bd0a161](https://github.com/ng-alain/ng-alain/commit/bd0a16163e4b3f9ebc4a4d80eb3829fe3ad7d731)) +* update `.browserslistrc` ([#1902](https://github.com/ng-alain/ng-alain/pull/1902)) ([77925a8](https://github.com/ng-alain/ng-alain/commit/77925a8e1dda832ce3a54c26ed09377fd6c9e09d)) +* remove duplicate dependencies ([#1902](https://github.com/ng-alain/ng-alain/pull/1902)) ([77925a8](https://github.com/ng-alain/ng-alain/commit/77925a8e1dda832ce3a54c26ed09377fd6c9e09d)) +* remove the attributes that NG-ZORRO will remove in version `12` ([#1895](https://github.com/ng-alain/ng-alain/pull/1895)) ([2272a9a](https://github.com/ng-alain/ng-alain/commit/2272a9ae7e1da1b87cda3dd796e0708c33f608c1)) + +### Bug Fixes + +* **auth:** fix always trigger refresh event in jwt ([#1115](https://github.com/ng-alain/delon/issues/1115)) ([1ef2369](https://github.com/ng-alain/delon/commit/1ef23696d5ff8de8133cbe2d5e7a53cedee2f5d6)) +* **cli:plugin:icon:** fix support conditional expression ([#1121](https://github.com/ng-alain/delon/issues/1121)) ([a481c1c](https://github.com/ng-alain/delon/commit/a481c1c257edaac603852c0096c5f4a4ecb371f5)) + +### Features + +* **abc:st:** add `pureList` method ([#1126](https://github.com/ng-alain/delon/issues/1126)) ([70270f8](https://github.com/ng-alain/delon/commit/70270f8bb4914e5ad2bd4d769f121131b4e98944)) +* **abc:st:** support item type of `setRow` ([#1119](https://github.com/ng-alain/delon/issues/1119)) ([9ea783e](https://github.com/ng-alain/delon/commit/9ea783e327d206b8cc8ad0d10cd2b56bd454d173)) +* **chart:** lazy load g2 libary ([#1123](https://github.com/ng-alain/delon/issues/1123)) ([cb7b5bb](https://github.com/ng-alain/delon/commit/cb7b5bbbbaeb218ac4e912275cd77e97dfc6e7e2)) +* **theme:** add `RTLService` service ([#1120](https://github.com/ng-alain/delon/issues/1120)) ([1f4f67b](https://github.com/ng-alain/delon/commit/1f4f67b239f6ea7227aca046ba9110642a43e774)) +* **cli:plugin:rtl** add `ng g ng-alain:plugin rtl` plugin ([#1118](https://github.com/ng-alain/delon/issues/1118)) ([a5dc52e](https://github.com/ng-alain/delon/commit/a5dc52e0e180b18450e1d07537ff3da865c166b2)) + +### Performance Improvements + +* **theme:** perf [@enable-all-colors](https://github.com/enable-all-colors)` default is `false` ([#1113](https://github.com/ng-alain/delon/issues/1113)) ([d03c8fb](https://github.com/ng-alain/delon/commit/d03c8fb1344b8d692e987fcd259e7d58417ec9dc)) + + ## [11.0.2](https://github.com/ng-alain/delon/compare/11.0.1...11.0.2) (2020-12-23) ### Bug Fixes diff --git a/docs/changelog.zh-CN.md b/docs/changelog.zh-CN.md index 02fd48674..58ed78475 100644 --- a/docs/changelog.zh-CN.md +++ b/docs/changelog.zh-CN.md @@ -14,6 +14,34 @@ NG-ALAIN 严格遵循 [Semantic Versioning 2.0.0](http://semver.org/lang/zh-CN/) --- +# [11.1.0](https://github.com/ng-alain/delon/compare/11.0.2...11.1.0) (2021-01-05) + +### Scaffold + +* 支持 RTL +* 优化 `SharedModule` 模块 ([#1894](https://github.com/ng-alain/ng-alain/pull/1894)) ([bd0a161](https://github.com/ng-alain/ng-alain/commit/bd0a16163e4b3f9ebc4a4d80eb3829fe3ad7d731)) +* 更新 `.browserslistrc` ([#1902](https://github.com/ng-alain/ng-alain/pull/1902)) ([77925a8](https://github.com/ng-alain/ng-alain/commit/77925a8e1dda832ce3a54c26ed09377fd6c9e09d)) +* 移除重复 `package.json` 的依赖 ([#1902](https://github.com/ng-alain/ng-alain/pull/1902)) ([77925a8](https://github.com/ng-alain/ng-alain/commit/77925a8e1dda832ce3a54c26ed09377fd6c9e09d)) +* 移除 NG-ZORRO 在 `12` 版本将要移除的属性 ([#1895](https://github.com/ng-alain/ng-alain/pull/1895)) ([2272a9a](https://github.com/ng-alain/ng-alain/commit/2272a9ae7e1da1b87cda3dd796e0708c33f608c1)) + +### Bug Fixes + +* **auth:** 修复 jwt 模式总是触发刷新事件 ([#1115](https://github.com/ng-alain/delon/issues/1115)) ([1ef2369](https://github.com/ng-alain/delon/commit/1ef23696d5ff8de8133cbe2d5e7a53cedee2f5d6)) +* **cli:plugin:icon:** 修复支持条件表达式 ([#1121](https://github.com/ng-alain/delon/issues/1121)) ([a481c1c](https://github.com/ng-alain/delon/commit/a481c1c257edaac603852c0096c5f4a4ecb371f5)) + +### Features + +* **abc:st:** 新增 `pureList` 方法 ([#1126](https://github.com/ng-alain/delon/issues/1126)) ([70270f8](https://github.com/ng-alain/delon/commit/70270f8bb4914e5ad2bd4d769f121131b4e98944)) +* **abc:st:** 新增 `setRow` 支持行对象传递 ([#1119](https://github.com/ng-alain/delon/issues/1119)) ([9ea783e](https://github.com/ng-alain/delon/commit/9ea783e327d206b8cc8ad0d10cd2b56bd454d173)) +* **chart:** 使用延迟加载 G2 类库 ([#1123](https://github.com/ng-alain/delon/issues/1123)) ([cb7b5bb](https://github.com/ng-alain/delon/commit/cb7b5bbbbaeb218ac4e912275cd77e97dfc6e7e2)) +* **theme:** 新增 `RTLService` 服务类 ([#1120](https://github.com/ng-alain/delon/issues/1120)) ([1f4f67b](https://github.com/ng-alain/delon/commit/1f4f67b239f6ea7227aca046ba9110642a43e774)) +* **cli:plugin:rtl** 新增 `ng g ng-alain:plugin rtl` 插件 ([#1118](https://github.com/ng-alain/delon/issues/1118)) ([a5dc52e](https://github.com/ng-alain/delon/commit/a5dc52e0e180b18450e1d07537ff3da865c166b2)) + +### Performance Improvements + +* **theme:** 优化 [@enable-all-colors](https://github.com/enable-all-colors) 默认为 `false` ([#1113](https://github.com/ng-alain/delon/issues/1113)) ([d03c8fb](https://github.com/ng-alain/delon/commit/d03c8fb1344b8d692e987fcd259e7d58417ec9dc)) + + ## [11.0.2](https://github.com/ng-alain/delon/compare/11.0.1...11.0.2) (2020-12-23) ### Bug Fixes diff --git a/package.json b/package.json index 57c870010..083c2d336 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "delon", - "version": "11.0.2", + "version": "11.1.0", "description": "Delon is a set of essential modules for NG-ALAIN.", "keywords": [ "delon", diff --git a/src/app/core/code/code.service.ts b/src/app/core/code/code.service.ts index 23c43b306..7251c94d0 100644 --- a/src/app/core/code/code.service.ts +++ b/src/app/core/code/code.service.ts @@ -33,19 +33,14 @@ export class CodeService { '@angular/platform-browser', '@angular/platform-browser-dynamic', '@angular/router', - '@ant-design/icons-angular@^10.0.0-beta.0', - 'core-js@^3.6.4', + '@ant-design/icons-angular', + 'core-js', 'rxjs', 'tslib', 'zone.js', - '@antv/g2', - '@antv/data-set', - 'date-fns@^2.10.0', - 'file-saver', - 'ngx-countdown', - 'extend', + 'date-fns', 'qrious', - '@angular/cdk@^10.0.2', + '@angular/cdk', 'ng-zorro-antd', '@delon/theme', '@delon/abc', diff --git a/src/app/core/startup.service.ts b/src/app/core/startup.service.ts index 889630452..31b2538eb 100644 --- a/src/app/core/startup.service.ts +++ b/src/app/core/startup.service.ts @@ -1,23 +1,56 @@ +import { Platform } from '@angular/cdk/platform'; import { DOCUMENT } from '@angular/common'; import { Inject, Injectable, Injector } from '@angular/core'; import { TitleService } from '@delon/theme'; +import { LazyService } from '@delon/util'; import { NzIconService } from 'ng-zorro-antd/icon'; import { ICONS } from '../../style-icons'; @Injectable() export class StartupService { - constructor(private injector: Injector, iconSrv: NzIconService, @Inject(DOCUMENT) private doc: any) { + constructor( + private injector: Injector, + iconSrv: NzIconService, + @Inject(DOCUMENT) private doc: any, + private lazy: LazyService, + private platform: Platform, + ) { iconSrv.addIcon(...ICONS); } - load(): Promise { + load(): Promise { const slowEl = this.doc.querySelector('#_slow'); return new Promise(resolve => { if (slowEl) { slowEl.remove(); } this.injector.get(TitleService).suffix = 'Ng Alain'; + if (this.platform.isBrowser) { + setTimeout(() => this.lazyLoad(), 100); + } resolve(); }); } + + lazyLoad(): void { + const win = this.doc.defaultView as any; + win.hj = + win.hj || + // tslint:disable-next-line: only-arrow-functions typedef + function () { + (win.hj.q = win.hj.q || []).push(arguments); + }; + win._hjSettings = { + hjid: 920546, + hjsv: 6, + }; + Promise.all([ + this.lazy.loadScript(`https://www.googletagmanager.com/gtag/js?id=UA-120202005-1`), + this.lazy.loadScript(`https://static.hotjar.com/c/hotjar-${win._hjSettings.hjid}.js?sv=${win._hjSettings.hjsv}`), + ]).then(() => { + const dataLayer: any[] = win.dataLayer || []; + dataLayer.push(['js', new Date()]); + dataLayer.push(['config', 'UA-120202005-1']); + }); + } } diff --git a/src/index.html b/src/index.html index e22eea9cc..25ad6bcec 100644 --- a/src/index.html +++ b/src/index.html @@ -84,36 +84,6 @@

KEEPING LOAD...

- - - - -