Skip to content

Commit

Permalink
fix(*): update initializer not definitely
Browse files Browse the repository at this point in the history
  • Loading branch information
ng-nest-moon committed May 30, 2021
1 parent 38d9a7b commit 55b4ba4
Show file tree
Hide file tree
Showing 218 changed files with 764 additions and 751 deletions.
1 change: 0 additions & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line.
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ NG-NEST 是一个开源的 Web 应用程序框架,基于 Angular 和 Nest ,

## 当前版本

npm 11.2.10
npm 12.0.0

## 支持 Angular 版本

`@ng-nest/ui` 目前支持 Angular ^11.0.0
`@ng-nest/ui` 目前支持 Angular ^12.0.0
## 支持环境

- Modern browsers
Expand Down
40 changes: 24 additions & 16 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"inlineStyleLanguage": "scss",
"allowedCommonJsDependencies": ["lodash"],
"assets": ["src/favicon.ico", "src/assets", "src/manifest.webmanifest", "src/manifest.webmanifest"],
"styles": ["node_modules/prismjs/themes/prism.css", "dist/ng-nest/ui/style/core/index.css", "src/styles.scss"],
Expand All @@ -42,13 +42,6 @@
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
Expand All @@ -62,20 +55,31 @@
}
],
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
"ngswConfigPath": "ngsw-config.json",
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ng-nest-site:build"
},
"configurations": {
"production": {
"browserTarget": "ng-nest-site:build:production"
},
"development": {
"browserTarget": "ng-nest-site:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
Expand All @@ -90,6 +94,7 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"inlineStyleLanguage": "scss",
"styles": ["src/styles.scss"],
"scripts": [],
"assets": ["src/favicon.ico", "src/assets", "src/manifest.webmanifest", "src/manifest.webmanifest"]
Expand Down Expand Up @@ -130,14 +135,17 @@
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "lib/ng-nest/ui/tsconfig.lib.json",
"project": "lib/ng-nest/ui/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "lib/ng-nest/ui/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "lib/ng-nest/ui/tsconfig.lib.json"
}
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
Expand Down
2 changes: 1 addition & 1 deletion docs/course/rbac/1-introduction/readme.en_US.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ After completing all the steps in this tutorial, the final application will look

## Current environment

angular ^11.0.0 | nestjs ^7.0.0
angular ^12.0.0 | nestjs ^7.0.0

Refer to the following address for environment installation:<a href="https://angular.cn/guide/setup-local" target="_blank">Angular</a> | <a href="https://docs.nestjs.com/" target="_blank">Nestjs</a>

Expand Down
2 changes: 1 addition & 1 deletion docs/course/rbac/1-introduction/readme.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ default: true

## 当前环境

angular ^11.0.0 | nestjs ^7.0.0
angular ^12.0.0 | nestjs ^7.0.0

环境安装参考以下地址:<a href="https://angular.cn/guide/setup-local" target="_blank">Angular</a> | <a href="https://docs.nestjs.com/" target="_blank">Nestjs</a>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "es2017",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.


/***************************************************************************************************
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'zone.js/dist/zone-testing';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
Expand Down
1 change: 0 additions & 1 deletion docs/course/rbac/5-user-manage/demo/6__api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "es2017",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
2 changes: 1 addition & 1 deletion docs/ui/getting-started/demo/1__my-app/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.


/***************************************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion docs/ui/getting-started/demo/1__my-app/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'zone.js/dist/zone-testing';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
Expand Down
4 changes: 2 additions & 2 deletions docs/ui/ng-nest/readme.en_US.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ NG-NEST is an open source Web application framework based on Angular and NEST, m

## Current version

npm 11.2.3
npm 12.0.0

## Support Angular version

Angular ^11.0.0 is currently supported by `@ng-nest/UI`.
Angular ^12.0.0 is currently supported by `@ng-nest/UI`.

## Supporting environment

Expand Down
4 changes: 2 additions & 2 deletions docs/ui/ng-nest/readme.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ NG-NEST 是一个开源的 Web 应用程序框架,基于 Angular 和 Nest ,

## 当前版本

npm 11.2.10
npm 12.0.0

## 支持 Angular 版本

`@ng-nest/ui` 目前支持 Angular ^11.0.0 版本。
`@ng-nest/ui` 目前支持 Angular ^12.0.0 版本。

## 支持环境

Expand Down
9 changes: 9 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@ module.exports = function (config) {
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/ng-nest/site'),
reports: ['html', 'lcovonly', 'text-summary'],
Expand Down
2 changes: 1 addition & 1 deletion lib/ng-nest/ui/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NG-NEST

UI 库支持最新版本 [Angular ^11.0.0](https://angular.io/docs),支持最新的 [Ivy](https://angular.io/guide/ivy) 特性。
UI 库支持最新版本 [Angular ^12.0.0](https://angular.io/docs),支持最新的 [Ivy](https://angular.io/guide/ivy) 特性。

# 文档

Expand Down
4 changes: 2 additions & 2 deletions lib/ng-nest/ui/affix/affix.property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ export class XAffixProperty extends XProperty {
* @zh_CN 距离顶部距离
* @en_US Distance from top
*/
@Input() @XWithConfig<string>(X_CONFIG_NAME) top: string;
@Input() @XWithConfig<string>(X_CONFIG_NAME) top!: string;
/**
* @zh_CN 距离左边距离
* @en_US Distance from left
*/
@Input() @XWithConfig<string>(X_CONFIG_NAME) left: string;
@Input() @XWithConfig<string>(X_CONFIG_NAME) left!: string;
}
20 changes: 10 additions & 10 deletions lib/ng-nest/ui/alert/alert.property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ export class XAlertProperty extends XProperty {
* @zh_CN 隐藏
* @en_US Hide
*/
@Input() @XInputBoolean() hide: XBoolean;
@Input() @XInputBoolean() hide!: XBoolean;
/**
* @zh_CN 标题
* @en_US Title
*/
@Input() title: XTemplate;
@Input() title!: XTemplate;
/**
* @zh_CN 内容
* @en_US Content
*/
@Input() content: XTemplate;
@Input() content!: XTemplate;
/**
* @zh_CN 类型
* @en_US Alert type
Expand All @@ -38,37 +38,37 @@ export class XAlertProperty extends XProperty {
* @zh_CN 主题
* @en_US Theme
*/
@Input() @XWithConfig<XEffect>(X_CONFIG_NAME, 'light') effect: XEffect;
@Input() @XWithConfig<XEffect>(X_CONFIG_NAME, 'light') effect!: XEffect;
/**
* @zh_CN 隐藏关闭按钮
* @en_US Hide close button
*/
@Input() @XWithConfig<XBoolean>(X_CONFIG_NAME) @XInputBoolean() hideClose: XBoolean;
@Input() @XWithConfig<XBoolean>(X_CONFIG_NAME) @XInputBoolean() hideClose!: XBoolean;
/**
* @zh_CN 使用文本关闭按钮
* @en_US Use the text to close button
*/
@Input() closeText: string;
@Input() closeText!: string;
/**
* @zh_CN 显示图标
* @en_US Show icon
*/
@Input() @XWithConfig<XBoolean>(X_CONFIG_NAME) @XInputBoolean() showIcon: XBoolean;
@Input() @XWithConfig<XBoolean>(X_CONFIG_NAME) @XInputBoolean() showIcon!: XBoolean;
/**
* @zh_CN 禁用动画
* @en_US Disable animation
*/
@Input() @XWithConfig<XBoolean>(X_CONFIG_NAME) @XInputBoolean() disabledAnimation: XBoolean;
@Input() @XWithConfig<XBoolean>(X_CONFIG_NAME) @XInputBoolean() disabledAnimation!: XBoolean;
/**
* @zh_CN 延迟关闭,默认 0 表示不关闭
* @en_US Delay close, the default value of 0 means do not close
*/
@Input() @XWithConfig<XNumber>(X_CONFIG_NAME, 0) @XInputNumber() duration: XNumber;
@Input() @XWithConfig<XNumber>(X_CONFIG_NAME, 0) @XInputNumber() duration!: XNumber;
/**
* @zh_CN 手动处理关闭事件
* @en_US Manually handle close events
*/
@Input() @XInputBoolean() manual: XBoolean;
@Input() @XInputBoolean() manual!: XBoolean;
/**
* @zh_CN 关闭的事件
* @en_US Closed events
Expand Down
4 changes: 2 additions & 2 deletions lib/ng-nest/ui/anchor/anchor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import { throttleTime, takeUntil } from 'rxjs/operators';
changeDetection: ChangeDetectionStrategy.OnPush
})
export class XAnchorComponent extends XAnchorProperty implements OnInit, AfterViewInit, OnDestroy {
@ViewChild('anchor', { static: true }) anchor: ElementRef;
@ViewChild('content', { static: true }) content: ElementRef;
@ViewChild('anchor', { static: true }) anchor!: ElementRef;
@ViewChild('content', { static: true }) content!: ElementRef;
hElements: HTMLElement[] = [];
sliderData: XSliderNode[] = [];
activatedIndex: number = 0;
Expand Down
8 changes: 4 additions & 4 deletions lib/ng-nest/ui/anchor/anchor.property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ export class XAnchorProperty extends XProperty {
* @zh_CN 滚动区域对象
* @en_US Scroll area object
*/
@Input() scroll: HTMLElement;
@Input() scroll!: HTMLElement;
/**
* @zh_CN 顶部距离
* @en_US Top distance
*/
@Input() @XWithConfig<string>(X_CONFIG_NAME, '0') affixTop: string;
@Input() @XWithConfig<string>(X_CONFIG_NAME, '0') affixTop!: string;
/**
* @zh_CN 导航相对内容位置
* @en_US Navigation relative content position
*/
@Input() @XWithConfig<XAnchorLayout>(X_CONFIG_NAME, 'right') layout: XAnchorLayout;
@Input() @XWithConfig<XAnchorLayout>(X_CONFIG_NAME, 'right') layout!: XAnchorLayout;
/**
* @zh_CN 对齐方式
* @en_US Alignment
*/
@Input() @XWithConfig<XJustify>(X_CONFIG_NAME, 'start') justify: XJustify;
@Input() @XWithConfig<XJustify>(X_CONFIG_NAME, 'start') justify!: XJustify;
}

/**
Expand Down
Loading

0 comments on commit 55b4ba4

Please sign in to comment.