Skip to content

Commit 9ffa4e6

Browse files
chore(release): release 12.0.0-beta.1
1 parent cc77ca4 commit 9ffa4e6

21 files changed

+86
-61
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To see more in [devui.design](https://devui.design/home).
2323

2424
## Angular Support
2525

26-
Now supports Angular <font color=red>`^11.0.0`</font>
26+
Now supports Angular <font color=red>`^12.0.0-beta.1`</font>
2727

2828
## Getting Started
2929

README_zh_CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ DevUI Design设计系统包含了DevUI规则、设计语言和最佳实践的资
2323

2424
## Angular版本
2525

26-
当前支持的angular版本<font color=red>`^11.0.0`</font>
26+
当前支持的angular版本<font color=red>`^12.0.0-beta.1`</font>
2727

2828
## 快速开始
2929

devui/form/services/d-validate-sync.service.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Injectable } from '@angular/core';
22
import { AbstractControl } from '@angular/forms';
33
import { Subscription } from 'rxjs';
44

5-
const resolvedPromise = (() => Promise.resolve(null))();
5+
function resolvedPromiseFunc() { return Promise.resolve(null); }
6+
const resolvedPromise = resolvedPromiseFunc();
67
@Injectable({ providedIn: 'root' })
78
export class DValidateSyncService {
89

devui/mention/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ const properties = [
4040

4141
const isBrowser = typeof window !== 'undefined';
4242
const isFirefox = isBrowser && window['mozInnerScreenX'] != null;
43-
const _parseInt = value => {
43+
function _parseInt(value) {
4444
return parseInt(value, 10);
45-
};
45+
}
4646

4747
export function getCaretCoordinates(element, position, options?) {
4848
if (!isBrowser) {

devui/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ng-devui",
3-
"version": "11.3.0",
3+
"version": "12.0.0-beta.1",
44
"license": "MIT",
55
"description": "DevUI components based on Angular",
66
"keywords": [
@@ -17,7 +17,7 @@
1717
"url": "https://github.com/DevCloudFE/ng-devui/issues"
1818
},
1919
"dependencies": {
20-
"@angular/cdk": "^11.0.0",
20+
"@angular/cdk": "^12.0.0",
2121
"date-fns": "^1.30.1",
2222
"lodash-es": "^4.17.11",
2323
"@popperjs/core": "^2.5.4",
@@ -26,9 +26,9 @@
2626
"tslib": "^2.0.0"
2727
},
2828
"peerDependencies": {
29-
"@angular/animations": "^11.0.0",
30-
"@angular/common": "^11.0.0",
31-
"@angular/core": "^11.0.0",
32-
"@angular/forms": "^11.0.0"
29+
"@angular/animations": "^12.0.0",
30+
"@angular/common": "^12.0.0",
31+
"@angular/core": "^12.0.0",
32+
"@angular/forms": "^12.0.0"
3333
}
3434
}

devui/polyfills.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ import 'classlist.js'; // Run `npm install --save classlist.js`.
7272
/***************************************************************************************************
7373
* Zone JS is required by default for Angular itself.
7474
*/
75-
import 'zone.js/dist/zone'; // Included with Angular CLI.
75+
import 'zone.js'; // Included with Angular CLI.
7676

7777
/***************************************************************************************************
7878
* APPLICATION IMPORTS

devui/test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
22
/* tslint:disable:ordered-imports*/
3-
import 'zone.js/dist/zone';
3+
import 'zone.js';
44
import 'zone.js/dist/long-stack-trace-zone';
55
import 'zone.js/dist/proxy';
66
import 'zone.js/dist/sync-test';
77
import 'zone.js/dist/jasmine-patch';
88
import 'zone.js/dist/async-test';
99
import 'zone.js/dist/fake-async-test';
1010

11-
// import 'zone.js/dist/zone-testing';
11+
// import 'zone.js/testing';
1212
import { getTestBed } from '@angular/core/testing';
1313
import {
1414
BrowserDynamicTestingModule,

devui/tree/demo/draggable/draggable.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class DraggableComponent implements OnInit {
7070
return new Promise((resovle) => {
7171
console.log('dragNodeId: ' + dragNodeId);
7272
console.log('dropNodeId: ' + dropNodeId);
73-
resovle();
73+
resovle(undefined);
7474
});
7575
}
7676

devui/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { Version } from '@angular/core';
22

3-
export const VERSION = new Version('11.3.0');
3+
export const VERSION = new Version('12.0.0-beta.1');

package.json

+17-17
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@
3333
"build:devui:ivy": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build devui-lib"
3434
},
3535
"dependencies": {
36-
"@angular/animations": "~11.2.7",
37-
"@angular/cdk": "^11.2.6",
38-
"@angular/common": "~11.2.7",
39-
"@angular/compiler": "~11.2.7",
40-
"@angular/core": "~11.2.7",
41-
"@angular/forms": "~11.2.7",
42-
"@angular/platform-browser": "~11.2.7",
43-
"@angular/platform-browser-dynamic": "~11.2.7",
44-
"@angular/router": "~11.2.7",
36+
"@angular/animations": "~12.0.3",
37+
"@angular/cdk": "^12.0.2",
38+
"@angular/common": "~12.0.3",
39+
"@angular/compiler": "~12.0.3",
40+
"@angular/core": "~12.0.3",
41+
"@angular/forms": "~12.0.3",
42+
"@angular/platform-browser": "~12.0.3",
43+
"@angular/platform-browser-dynamic": "~12.0.3",
44+
"@angular/router": "~12.0.3",
4545
"@devui-design/icons": "^1.2.0",
4646
"@ngx-translate/core": "^13.0.0",
4747
"@ngx-translate/http-loader": "^6.0.0",
@@ -59,14 +59,14 @@
5959
"marked": "^2.0.0",
6060
"@popperjs/core": "^2.5.4",
6161
"web-animations-js": "^2.3.2",
62-
"zone.js": "~0.10.2"
62+
"zone.js": "~0.11.4"
6363
},
6464
"devDependencies": {
65-
"@angular-builders/custom-webpack": "^11.0.0",
66-
"@angular-devkit/build-angular": "~0.1102.6",
67-
"@angular/cli": "^11.2.6",
68-
"@angular/compiler-cli": "~11.2.7",
69-
"@angular/language-service": "^11.2.7",
65+
"@angular-builders/custom-webpack": "^12.0.0",
66+
"@angular-devkit/build-angular": "~12.0.3",
67+
"@angular/cli": "^12.0.3",
68+
"@angular/compiler-cli": "~12.0.3",
69+
"@angular/language-service": "^12.0.3",
7070
"@commitlint/cli": "^11.0.0",
7171
"@commitlint/config-conventional": "^11.0.0",
7272
"@types/jasmine": "~3.6.0",
@@ -87,7 +87,7 @@
8787
"karma-junit-reporter": "^2.0.1",
8888
"lint-staged": "^9.2.3",
8989
"markdown-loader": "^5.1.0",
90-
"ng-packagr": "11.2.4",
90+
"ng-packagr": "^12.0.0",
9191
"ngx-build-plus": "^8.1.5",
9292
"patch-package": "^6.2.2",
9393
"postcss": "^8.2.4",
@@ -102,7 +102,7 @@
102102
"stylelint-scss": "^3.17.0",
103103
"ts-node": "~7.0.0",
104104
"tslint": "~6.1.0",
105-
"typescript": "~4.0.7"
105+
"typescript": "~4.2.4"
106106
},
107107
"lint-staged": {
108108
"devui/**/*.ts": [

patches/ng-packagr+11.2.4.patch renamed to patches/ng-packagr+12.0.0.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/node_modules/ng-packagr/lib/styles/stylesheet-processor-worker.js b/node_modules/ng-packagr/lib/styles/stylesheet-processor-worker.js
2-
index 0dae92e..6854a35 100644
2+
index f8ae209..7b18a6f 100644
33
--- a/node_modules/ng-packagr/lib/styles/stylesheet-processor-worker.js
44
+++ b/node_modules/ng-packagr/lib/styles/stylesheet-processor-worker.js
5-
@@ -93,6 +93,7 @@ function optimizeCss(filePath, css, browsers, cssUrl) {
5+
@@ -121,6 +121,7 @@ function optimizeCss(filePath, css, browsers, cssUrl) {
66
},
77
],
88
}));

patches/sass-loader+11.0.1.patch

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/node_modules/sass-loader/dist/utils.js b/node_modules/sass-loader/dist/utils.js
2+
index 5e69f94..77fc7c1 100644
3+
--- a/node_modules/sass-loader/dist/utils.js
4+
+++ b/node_modules/sass-loader/dist/utils.js
5+
@@ -92,8 +92,8 @@ function isProductionLikeMode(loaderContext) {
6+
7+
function proxyCustomImporters(importers, loaderContext) {
8+
return [].concat(importers).map(importer => function proxyImporter(...args) {
9+
- this.webpackLoaderContext = loaderContext;
10+
- return importer.apply(this, args);
11+
+ const self = { ...this, webpackLoaderContext: loaderContext }
12+
+ return importer.apply(self, args);
13+
});
14+
}
15+
/**

scripts/es2015-to-es5-bebal-loader/babel-loader-wepack-config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
const path = require('path');
22
const ts = require('typescript');
3-
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
3+
const AngularCompilerPlugin = require('@ngtools/webpack').AngularWebpackPlugin;
44
const readConfiguration = require('@angular/compiler-cli').readConfiguration;
55
const ES6_ONLY_THIRD_PARTY_LIST = require('./es6-only-third-party-list');
66

77
function getAngularCompilerTsConfigPath(config) {
88
const angularCompilerPlugin = config.plugins.filter(plugin => plugin instanceof AngularCompilerPlugin).pop();
99
if (angularCompilerPlugin) {
10-
return angularCompilerPlugin.options.tsConfigPath;
10+
return angularCompilerPlugin.pluginOptions.tsconfig;
1111
}
1212
return undefined;
1313
}
@@ -17,7 +17,7 @@ function getTsconfigCompileTarget(tsconfigPath) {
1717
}
1818

1919
function webpackConfigAddBabel2ES5(config, list = []) {
20-
const tsconfigPath = getAngularCompilerTsConfigPath(config) || 'tsconfig.base.json';
20+
const tsconfigPath = getAngularCompilerTsConfigPath(config) || 'tsconfig.json';
2121
const target = getTsconfigCompileTarget(tsconfigPath);
2222
if (target === ts.ScriptTarget.ES5) {
2323
config.module.rules.push({

scripts/less-importer/webpack-config-less-loader-importer.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
1+
const AngularCompilerPlugin = require('@ngtools/webpack').AngularWebpackPlugin;
22
const pathAlias = require('./get-path-alias-from-tsconfig');
33

44
function getAngularCompilerTsConfigPath(config) {
55
const angularCompilerPlugin = config.plugins.filter(plugin => plugin instanceof AngularCompilerPlugin).pop();
66
if (angularCompilerPlugin) {
7-
return angularCompilerPlugin.options.tsConfigPath;
7+
return angularCompilerPlugin.pluginOptions.tsconfig;
88
}
99
return undefined;
1010
}
1111
function webpackConfigSassImporterAlias(config) {
12-
const tsconfigPath = getAngularCompilerTsConfigPath(config) || 'tsconfig.base.json';
12+
const tsconfigPath = getAngularCompilerTsConfigPath(config) || 'tsconfig.json';
1313
[{
14-
ruleTest: /\.less$/,
14+
ruleTest: /\.(?:less)$/i,
1515
loaderName: 'less-loader'
1616
}].forEach(({ruleTest, loaderName}) => {
1717
config.module.rules.filter(rule => rule.test + '' === ruleTest + '').forEach((styleRule) => {
1818
if (styleRule) {
19-
var insertPosition = styleRule.use.findIndex(loaderUse => loaderUse.loader === loaderName
19+
var insertPosition = styleRule.rules[1].use.findIndex(loaderUse => loaderUse.loader === loaderName
2020
|| loaderUse.loader === require.resolve(loaderName));
2121
if (insertPosition > -1) {
22-
styleRule.use.splice(insertPosition + 1, 0, {
22+
styleRule.rules[1].use.splice(insertPosition + 1, 0, {
2323
loader: require.resolve('./less-alias-replacer-loader'),
2424
options: {
2525
aliasMap: pathAlias(tsconfigPath)

scripts/sass-importer/webpack-config-sass-loader-importer.js

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
1-
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
1+
const AngularCompilerPlugin = require('@ngtools/webpack').AngularWebpackPlugin;
22
const getTsConfigAlias = require('./get-tsconfig-alias');
33

44
function getAngularCompilerTsConfigPath(config) {
55
const angularCompilerPlugin = config.plugins.filter(plugin => plugin instanceof AngularCompilerPlugin).pop();
66
if (angularCompilerPlugin) {
7-
return angularCompilerPlugin.options.tsConfigPath;
7+
return angularCompilerPlugin.pluginOptions.tsconfig;
88
}
99
return undefined;
1010
}
1111
function webpackConfigSassImporterAlias(config) {
12-
const tsconfigPath = getAngularCompilerTsConfigPath(config) || 'tsconfig.base.json';
12+
const tsconfigPath = getAngularCompilerTsConfigPath(config) || 'tsconfig.json';
1313
[{
14-
ruleTest: /\.scss$|\.sass$/,
14+
ruleTest: /\.(?:sass)$/i,
15+
loaderName: 'sass-loader'
16+
},
17+
{
18+
ruleTest: /\.(?:scss)$/i,
1519
loaderName: 'sass-loader'
1620
}].forEach(({ruleTest, loaderName}) => {
1721
config.module.rules.filter(rule => rule.test + '' === ruleTest + '').forEach((styleRule) => {
1822
if (styleRule) {
19-
var insertPosition = styleRule.use.findIndex(loaderUse => loaderUse.loader === loaderName
23+
var insertPosition = styleRule.rules[1].use.findIndex(loaderUse => loaderUse.loader === loaderName
2024
|| loaderUse.loader === require.resolve(loaderName));
2125
if (insertPosition > -1) {
22-
styleRule.use[insertPosition].options.sassOptions.importer = [
26+
styleRule.rules[1].use[insertPosition].options.sassOptions.importer = [
2327
getTsConfigAlias(tsconfigPath)
2428
];
2529
}

scripts/themeable/webpack-config-add-theme.js

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
function webpackConfigAddThemeSupportForIE(config) {
22
[{
3-
ruleTest: /\.scss$|\.sass$/,
3+
ruleTest: /\.(?:sass)$/i,
44
loaderName: 'sass-loader'
5-
}, {
6-
ruleTest: /\.less$/,
5+
},
6+
{
7+
ruleTest: /\.(?:scss)$/i,
8+
loaderName: 'sass-loader'
9+
},
10+
{
11+
ruleTest: /\.(?:less)$/i,
712
loaderName: 'less-loader'
813
}].forEach(({ ruleTest, loaderName }) => {
914
config.module.rules.filter(rule => rule.test + '' === ruleTest + '').forEach((styleRule) => {
1015
if (styleRule) {
11-
var insertPosition = styleRule.use.findIndex(loaderUse => loaderUse.loader === loaderName
16+
var insertPosition = styleRule.rules[1].use.findIndex(loaderUse => loaderUse.loader === loaderName
1217
|| loaderUse.loader === require.resolve(loaderName));
1318
if (insertPosition > -1) {
14-
styleRule.use.splice(insertPosition, 0, {
19+
styleRule.rules[1].use.splice(insertPosition, 0, {
1520
loader: 'postcss-loader',
1621
options: {
17-
sourceMap: styleRule.use[insertPosition].options.sourceMap,
22+
sourceMap: styleRule.rules[1].use[insertPosition].options.sourceMap,
1823
postcssOptions: {
1924
plugins: [
2025
require('./add-origin-varvalue'),

src/app/component/getStarted-cn.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
### Angular版本
1212

13-
当前支持的Angular版本 <font color=red>`^11.0.0`</font>
13+
当前支持的Angular版本 <font color=red>`^12.0.0-beta.1`</font>
1414

1515
### 1. 创建一个项目
1616

src/app/component/getStarted-en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ For details about how to use this function, see the following StackBlitz demonst
1010

1111
### Angular version
1212

13-
The supported Angular version is <font color=red>`^11.0.0`</font>.
13+
The supported Angular version is <font color=red>`^12.0.0-beta.1`</font>.
1414

1515
### 1. Create a project
1616

src/environments/environment.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ export const environment = {
1414
* This import should be commented out in production mode because it will have a negative impact
1515
* on performance if an error is thrown.
1616
*/
17-
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
17+
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.

src/polyfills.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import 'web-animations-js'; // Run `npm install --save web-animations-js`.
5757
/***************************************************************************************************
5858
* Zone JS is required by default for Angular itself.
5959
*/
60-
import 'zone.js/dist/zone'; // Included with Angular CLI.
60+
import 'zone.js'; // Included with Angular CLI.
6161

6262
/***************************************************************************************************
6363
* APPLICATION IMPORTS

src/test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { getTestBed } from '@angular/core/testing';
44
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
5-
import 'zone.js/dist/zone-testing';
5+
import 'zone.js/testing';
66

77
declare const require: any;
88

0 commit comments

Comments
 (0)