Skip to content

Commit

Permalink
release(5.0.0): release 5.0.0 (#800)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisherspy authored Aug 6, 2021
1 parent 26201a9 commit cd5216a
Show file tree
Hide file tree
Showing 6 changed files with 932 additions and 1,036 deletions.
709 changes: 297 additions & 412 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-zorro-antd-mobile",
"version": "4.0.0",
"version": "5.0.0",
"description": "An enterprise-class mobile UI components based on Ant Design and Angular",
"schematics": "./schematics/collection.json",
"keywords": [
Expand Down
582 changes: 289 additions & 293 deletions docs/changelog.en-US.md

Large diffs are not rendered by default.

579 changes: 290 additions & 289 deletions docs/changelog.zh-CN.md

Large diffs are not rendered by default.

42 changes: 28 additions & 14 deletions scripts/site/_site/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,30 @@ export class AppComponent implements OnInit, AfterViewInit {
docsearch = null;
kitchenUrl = window.location.origin + '/#/kitchen-sink?lang=zh-CN';
language = 'zh';
versionList = ['0.12.x', '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.0.6', '2.0.1', '2.0.3', '2.0.7', '3.0.3', '4.0.0'];
versionList = [
'0.12.x',
'1.0.1',
'1.0.2',
'1.0.3',
'1.0.4',
'1.0.5',
'1.0.6',
'2.0.1',
'2.0.3',
'2.0.7',
'3.0.3',
'4.0.0',
'5.0.0'
];
versionMap = {
'0.12.x': '0.12.5',
'1.x': '2001.0.6',
'2.x': '2012.0.7',
'3.0.3': '2013.0.3',
'4.0.0': '2014.0.0'
'4.0.0': '2014.0.0',
'5.0.0': '2015.0.0'
};
currentVersion = '4.0.0';
currentVersion = '5.0.0';
isHomeURL = true;
isKitchenURL = false;
demoTitle = '';
Expand Down Expand Up @@ -88,7 +103,7 @@ export class AppComponent implements OnInit, AfterViewInit {
inputSelector: '#search-box input',
algoliaOptions: { hitsPerPage: 5, facetFilters: [`tags:${this.language}`] },
transformData(hits) {
hits.forEach(hit => {
hits.forEach((hit) => {
hit.url = hit.url.replace('ng.mobile.ant.design', location.host);
hit.url = hit.url.replace('https:', location.protocol);
});
Expand Down Expand Up @@ -147,10 +162,10 @@ export class AppComponent implements OnInit, AfterViewInit {
}

ngOnInit(): void {
this.routerList.components.forEach(group => {
this.routerList.components.forEach((group) => {
this.componentList = this.componentList.concat([...group.children]);
});
this.router.events.subscribe(event => {
this.router.events.subscribe((event) => {
if (
event &&
event['url'] &&
Expand All @@ -173,21 +188,20 @@ export class AppComponent implements OnInit, AfterViewInit {
}
}
if (event instanceof NavigationEnd) {
const currentDemoComponent = this.componentList.find(component => `/${component.path}` === this.router.url);
const currentDemoComponent = this.componentList.find((component) => `/${component.path}` === this.router.url);
if (currentDemoComponent) {
this.title.setTitle(`${currentDemoComponent.zh} ${currentDemoComponent.label} - NG-ZORRO-MOBILE`);
}
const currentIntroComponent = this.routerList.intro.find(component => `/${component.path}` === this.router.url);
const currentIntroComponent = this.routerList.intro.find(
(component) => `/${component.path}` === this.router.url
);
if (currentIntroComponent) {
this.title.setTitle(`${currentIntroComponent.label} - NG-ZORRO-MOBILE`);
}
if (this.router.url !== '/' + this.searchComponent) {
this.searchComponent = null;
}
this.language = this.router.url
.split('/')
[this.router.url.split('/').length - 1].split('#')[0]
.split(';')[0];
this.language = this.router.url.split('/')[this.router.url.split('/').length - 1].split('#')[0].split(';')[0];
// this.nzI18nService.setLocale(this.language === 'en' ? en_US : zh_CN);
if (this.docsearch) {
this.docsearch.algoliaOptions = { hitsPerPage: 5, facetFilters: [`tags:${this.language}`] };
Expand Down Expand Up @@ -222,7 +236,7 @@ export class AppComponent implements OnInit, AfterViewInit {
document.querySelector('span.edit-button') &&
document.querySelector('span.edit-button').addEventListener(
'mouseenter',
function() {
function () {
setTimeout(() => {
if (document.querySelector('#qrcode')) {
this.qrcode = new window['QRCode'](document.querySelector('#qrcode'), {
Expand All @@ -240,7 +254,7 @@ export class AppComponent implements OnInit, AfterViewInit {
});
this.initColor();
const self = this;
window.addEventListener('hashchange', function(event) {
window.addEventListener('hashchange', function (event) {
if (event && event['newURL'] && event['newURL'].indexOf('/kitchen-sink') >= 0) {
self.isKitchenURL = true;
} else {
Expand Down
54 changes: 27 additions & 27 deletions scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class NzCodeBoxComponent implements OnInit {
@Input() nzLink: string;
@Input() nzId: string;
@Input() nzIframeHeight = 360;
@Input() nzRawCode = {default: ''};
@Input() nzRawCode = { default: '' };
@Input() nzComponentName = '';
@Input() nzSelector = '';
@Input() nzGenerateCommand = '';
Expand Down Expand Up @@ -234,8 +234,8 @@ export class NzCodeBoxComponent implements OnInit {
},
"defaultProject": "demo"
}`,
'src/index.html': `<${this.nzSelector}>loading</${this.nzSelector}>`,
'src/main.ts': `import './polyfills';
'src/index.html': `<${this.nzSelector}>loading</${this.nzSelector}>`,
'src/main.ts': `import './polyfills';
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
Expand All @@ -250,7 +250,7 @@ platformBrowserDynamic().bootstrapModule(AppModule).then(ref => {
// Otherwise, log the boot error
}).catch(err => console.error(err));`,
'src/polyfills.ts': `/**
'src/polyfills.ts': `/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
Expand Down Expand Up @@ -334,29 +334,29 @@ registerLocaleData(en);
})
export class AppModule { }
`,
'src/styles.css': `/* Add application styles & imports to this file! */;`
},
title: 'Dynamically Generated Project',
description: 'Created with <3 by the StackBlitz SDK!',
template: 'angular-cli',
dependencies: {
'@angular/animations': '^11.0.5',
'@angular/cdk': '^11.0.3',
'@angular/common': '^11.0.5',
'@angular/compiler': '^11.0.5',
'@angular/core': '^11.0.5',
'@angular/forms': '^11.0.5',
'@angular/platform-browser': '^11.0.5',
'@angular/platform-browser-dynamic': '^11.0.5',
'@angular/router': '^11.0.5',
'@ant-design/icons-angular': '^11.0.1',
'rxjs': '~6.6.2',
'zone.js': '~0.10.2',
'ng-zorro-antd-mobile': '4.0.0'
},
tags: ['stackblitz', 'sdk']
});
}
'src/styles.css': `/* Add application styles & imports to this file! */;`
},
title: 'Dynamically Generated Project',
description: 'Created with <3 by the StackBlitz SDK!',
template: 'angular-cli',
dependencies: {
'@angular/animations': '^12.1.1',
'@angular/cdk': '^12.1.1',
'@angular/common': '^12.1.1',
'@angular/compiler': '^12.1.1',
'@angular/core': '^12.1.1',
'@angular/forms': '^12.1.1',
'@angular/platform-browser': '^12.1.1',
'@angular/platform-browser-dynamic': '^12.1.1',
'@angular/router': '^12.1.1',
'@ant-design/icons-angular': '^12.0.3',
rxjs: '~6.6.2',
'zone.js': '~0.11.4',
'ng-zorro-antd-mobile': '5.0.0'
},
tags: ['stackblitz', 'sdk']
});
}

constructor(
@Inject(DOCUMENT) private dom: Document,
Expand Down

0 comments on commit cd5216a

Please sign in to comment.