Merge pull request #4012 from tsiegleauq/angular703

update dependencies and prettierrc
This commit is contained in:
Sean 2018-11-15 02:03:59 -08:00 committed by GitHub
commit 890196fdcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 36 additions and 31 deletions

View File

@ -1,8 +1,11 @@
{
"printWidth": 120,
"tabWidth": 4,
"singleQuote": true,
"useTabs": false,
"tabWidth": 4,
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "strict",
"semi": true,
"bracketSpacing": true
"trailingComma": "es5",
"arrowParens": "avoid"
}

View File

@ -70,7 +70,7 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": ["src/styles.css"],
"styles": ["src/styles.scss"],
"scripts": [],
"assets": ["src/favicon.ico", "src/assets"]
}

View File

@ -3,32 +3,33 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json --host=0.0.0.0 --aot",
"build": "ng build",
"start": "ng serve --proxy-config proxy.conf.json --host=0.0.0.0",
"build": "ng build --prod --aot",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"compodoc": "./node_modules/.bin/compodoc --hideGenerator -p src/tsconfig.app.json -n 'OpenSlides Documentation' -d ../Compodoc -s -w -t -o --port",
"extract": "ngx-translate-extract -i ./src -o ./src/assets/i18n/template-en.pot -clean --sort --format pot -m _",
"po2json": "./node_modules/.bin/po2json -f mf src/assets/i18n/de.po src/assets/i18n/de.json && ./node_modules/.bin/po2json -f mf src/assets/i18n/cs.po src/assets/i18n/cs.json",
"prettify": "pretty-quick"
"prettify-changes": "pretty-quick --staged",
"prettify-all": "pretty-quick"
},
"private": true,
"dependencies": {
"@angular/animations": "^7.0.0",
"@angular/cdk": "^7.0.0",
"@angular/cdk": "^7.0.4",
"@angular/common": "^7.0.0",
"@angular/compiler": "^7.0.0",
"@angular/core": "^7.0.0",
"@angular/forms": "^7.0.0",
"@angular/http": "^7.0.0",
"@angular/material": "^7.0.0",
"@angular/material": "^7.0.4",
"@angular/platform-browser": "^7.0.0",
"@angular/platform-browser-dynamic": "^7.0.0",
"@angular/router": "^7.0.0",
"@ngx-pwa/local-storage": "^6.2.0",
"@ngx-translate/core": "^10.0.2",
"@ngx-translate/http-loader": "^3.0.1",
"@ngx-pwa/local-storage": "^7.0.0",
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"core-js": "^2.5.4",
"file-saver": "^2.0.0-rc.3",
"material-design-icons": "^3.0.1",
@ -40,18 +41,18 @@
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.7.0",
"@angular/cli": "^7.0.2",
"@angular-devkit/build-angular": "^0.10.5",
"@angular/cli": "^7.0.5",
"@angular/compiler-cli": "^7.0.0",
"@angular/language-service": "^7.0.0",
"@biesbjerg/ngx-translate-extract": "^2.3.4",
"@compodoc/compodoc": "^1.1.5",
"@types/jasmine": "^2.8.9",
"@types/jasminewd2": "^2.0.5",
"@types/node": "~8.9.4",
"@types/node": "~10.12.7",
"@types/yargs": "^12.0.1",
"codelyzer": "~4.2.1",
"husky": "^0.14.3",
"codelyzer": "~4.5.0",
"husky": "^1.1.4",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^3.0.0",
@ -60,12 +61,13 @@
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"npm-run-all": "^4.1.3",
"prettier": "^1.14.3",
"prettier": "^1.15.2",
"pretty-quick": "^1.8.0",
"protractor": "^5.4.1",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"tsutils": "^3.1.0",
"typescript": "^3.1.3"
"ts-node": "~7.0.1",
"tslint": "~5.11.0",
"tsutils": "^3.5.0",
"typescript": "^3.1.3",
"webpack-bundle-analyzer": "^3.0.3"
}
}

View File

@ -1,7 +1,6 @@
import { Injectable } from '@angular/core';
import { plugins } from '../../../plugins';
import { CommonAppConfig } from '../../site/common/common.config';
import { ModelConstructor, BaseModel } from '../../shared/models/base/base-model';
import { AppConfig } from '../../site/base/app-config';
import { CollectionStringModelMapperService } from './collectionStringModelMapper.service';
import { MediafileAppConfig } from '../../site/mediafiles/mediafile.config';

View File

@ -32,11 +32,15 @@ export class StorageService {
/**
* get a value from the store. You need to subscribe to the request to retrieve the value.
*
* TODO: This needs adjustment to ensure safe access.
* Since angular 7 `LocalStorrage.getItem` will return "unknown" instead of any.
* https://github.com/cyrilletuzi/angular-async-local-storage/blob/master/docs/MIGRATION_TO_V7.md
* @param key The key to get the value from
* @returns The requested value to the key
*/
public async get<T>(key: string): Promise<T> {
return await this.localStorage.getItem<T>(key).toPromise();
return await this.localStorage.getUnsafeItem<T>(key).toPromise();
}
/**

View File

@ -178,7 +178,7 @@ export class TopicDetailComponent {
* @param event has the code
*/
public keyDownFunction(event: KeyboardEvent): void {
if (event.keyCode === 27) {
if (event.key === "Escape") {
this.setEditMode(false);
}
}

View File

@ -8,9 +8,6 @@ import { TranslateService } from '@ngx-translate/core'; // showcase
import { Config } from '../../../../shared/models/core/config';
import { DataStoreService } from '../../../../core/services/data-store.service';
// for Drag n Drop Test
import { moveItemInArray, CdkDragDrop } from '@angular/cdk/drag-drop';
@Component({
selector: 'os-start',
templateUrl: './start.component.html',

View File

@ -94,7 +94,7 @@ export class CategoryListComponent extends BaseViewComponent implements OnInit {
* @param viewCategory
*/
public keyDownFunction(event: KeyboardEvent, viewCategory?: ViewCategory): void {
if (event.keyCode === 13) {
if (event.key === "Enter") {
if (viewCategory) {
this.onSaveButton(viewCategory);
} else {

View File

@ -76,7 +76,7 @@ export class MotionCommentSectionListComponent extends BaseViewComponent impleme
* Event on Key Down in update or create form. Do not provide the viewSection for the create form.
*/
public keyDownFunction(event: KeyboardEvent, viewSection?: ViewMotionCommentSection): void {
if (event.keyCode === 13) {
if (event.key === "Escape") {
if (viewSection) {
this.onSaveButton(viewSection);
} else {

View File

@ -138,7 +138,7 @@ export class TagListComponent extends ListViewBaseComponent<ViewTag> implements
* @param event
*/
public keyDownFunction(event: KeyboardEvent): void {
if (event.keyCode === 27) {
if (event.key === "Enter") {
this.cancelEditing();
}
}

View File

@ -198,7 +198,7 @@ export class GroupListComponent extends BaseViewComponent implements OnInit {
* Clicking escape while in #newGroupForm should toggle newGroup.
*/
public keyDownFunction(event: KeyboardEvent): void {
if (event.keyCode === 27) {
if (event.key === "Escape") {
this.newGroup = false;
}
}