Merge pull request #4624 from tsiegleauq/angular-7.2.14

Migrate to Angular version 7.2.14
This commit is contained in:
Emanuel Schütze 2019-04-25 16:44:53 +02:00 committed by GitHub
commit 6800f99ef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 78 additions and 63 deletions

View File

@ -25,57 +25,57 @@
"prettify-write": "prettier --config ./.prettierrc --write \"src/{app,environments}/**/*{.ts,.js,.json,.css,.scss}\"" "prettify-write": "prettier --config ./.prettierrc --write \"src/{app,environments}/**/*{.ts,.js,.json,.css,.scss}\""
}, },
"dependencies": { "dependencies": {
"@angular/animations": "^7.2.5", "@angular/animations": "^7.2.14",
"@angular/cdk": "^7.3.2", "@angular/cdk": "^7.3.7",
"@angular/common": "^7.2.5", "@angular/common": "^7.2.14",
"@angular/compiler": "^7.2.5", "@angular/compiler": "^7.2.14",
"@angular/core": "^7.2.5", "@angular/core": "^7.2.14",
"@angular/forms": "^7.2.5", "@angular/forms": "^7.2.14",
"@angular/http": "^7.2.5", "@angular/http": "^7.2.14",
"@angular/material": "^7.3.2", "@angular/material": "^7.3.7",
"@angular/platform-browser": "^7.2.5", "@angular/platform-browser": "^7.2.14",
"@angular/platform-browser-dynamic": "^7.2.5", "@angular/platform-browser-dynamic": "^7.2.14",
"@angular/pwa": "^0.13.2", "@angular/pwa": "^0.13.8",
"@angular/router": "^7.2.5", "@angular/router": "^7.2.14",
"@angular/service-worker": "^7.2.5", "@angular/service-worker": "^7.2.14",
"@ngx-pwa/local-storage": "^7.4.1", "@ngx-pwa/local-storage": "^7.4.1",
"@ngx-translate/core": "^11.0.1", "@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0", "@ngx-translate/http-loader": "^4.0.0",
"@tinymce/tinymce-angular": "^3.0.0", "@tinymce/tinymce-angular": "^3.0.0",
"core-js": "^2.6.5", "core-js": "^3.0.1",
"css-element-queries": "^1.1.1", "css-element-queries": "^1.1.1",
"exceljs": "1.9.0", "exceljs": "1.9.1",
"file-saver": "^2.0.1", "file-saver": "^2.0.1",
"hammerjs": "^2.0.8", "hammerjs": "^2.0.8",
"material-icon-font": "git+https://github.com/petergng/materialIconFont.git", "material-icon-font": "git+https://github.com/petergng/materialIconFont.git",
"ng-pick-datetime": "^7.0.0", "ng-pick-datetime": "^7.0.0",
"ngx-file-drop": "^5.0.5", "ngx-file-drop": "^6.0.0",
"ngx-mat-select-search": "^1.5.2", "ngx-mat-select-search": "^1.7.2",
"ngx-papaparse": "^3.0.2", "ngx-papaparse": "^3.0.2",
"pdfmake": "^0.1.53", "pdfmake": "^0.1.53",
"po2json": "^1.0.0-alpha", "po2json": "^1.0.0-alpha",
"rxjs": "^6.4.0", "rxjs": "^6.5.1",
"tinymce": "^4.9.2", "tinymce": "^4.9.2",
"uuid": "^3.3.2", "uuid": "^3.3.2",
"zone.js": "^0.8.29" "zone.js": "^0.9.0"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^0.13.2", "@angular-devkit/build-angular": "^0.13.8",
"@angular/cli": "^7.3.2", "@angular/cli": "^7.3.8",
"@angular/compiler-cli": "^7.2.5", "@angular/compiler-cli": "^7.2.14",
"@angular/language-service": "^7.2.5", "@angular/language-service": "^7.2.14",
"@biesbjerg/ngx-translate-extract": "^2.3.4", "@biesbjerg/ngx-translate-extract": "^2.3.4",
"@compodoc/compodoc": "^1.1.8", "@compodoc/compodoc": "^1.1.8",
"@types/jasmine": "^3.3.9", "@types/jasmine": "^3.3.9",
"@types/jasminewd2": "^2.0.6", "@types/jasminewd2": "^2.0.6",
"@types/node": "^11.9.4", "@types/node": "^11.13.7",
"@types/yargs": "^12.0.9", "@types/yargs": "^13.0.0",
"codelyzer": "~4.5.0", "codelyzer": "~5.0.0",
"fs": "0.0.1-security", "fs": "0.0.1-security",
"husky": "^1.3.1", "husky": "^1.3.1",
"jasmine-core": "~3.3.0", "jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~4.2.1",
"karma": "^4.0.0", "karma": "^4.1.0",
"karma-chrome-launcher": "~2.2.0", "karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.5", "karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "~2.0.1", "karma-jasmine": "~2.0.1",
@ -85,11 +85,10 @@
"prettier": "^1.17.0", "prettier": "^1.17.0",
"protractor": "^5.4.2", "protractor": "^5.4.2",
"source-map-explorer": "^1.7.0", "source-map-explorer": "^1.7.0",
"terser": "3.16.1", "ts-node": "~8.1.0",
"ts-node": "~8.0.2", "tslint": "~5.16.0",
"tslint": "~5.12.1", "tsutils": "3.10.0",
"tsutils": "3.8.0",
"typescript": "~3.2.0", "typescript": "~3.2.0",
"webpack-bundle-analyzer": "^3.0.4" "webpack-bundle-analyzer": "^3.3.2"
} }
} }

View File

@ -2,8 +2,13 @@
<input hidden type="file" #fileInput (change)="onSelectFile($event)" multiple /> <input hidden type="file" #fileInput (change)="onSelectFile($event)" multiple />
<div class="selection-area"> <div class="selection-area">
<file-drop (onFileDrop)="onDropFile($event)" (click)="fileInput.click()" customstyle="file-drop-style"> <file-drop
<span translate>Drop files into this area OR click here to select files</span> (onFileDrop)="onDropFile($event)"
(click)="fileInput.click()"
dropZoneLabel="{{ 'Drop files into this area OR click here to select files' | translate }}"
contentClassName="file-drop-content-style"
dropZoneClassName="file-drop-zone-style"
>
</file-drop> </file-drop>
</div> </div>

View File

@ -6,8 +6,8 @@ import { AssignmentListComponent } from './components/assignment-list/assignment
const routes: Routes = [ const routes: Routes = [
{ path: '', component: AssignmentListComponent, pathMatch: 'full' }, { path: '', component: AssignmentListComponent, pathMatch: 'full' },
{ path: 'new', component: AssignmentDetailComponent }, { path: 'new', component: AssignmentDetailComponent, data: { basePerm: 'assignments.can_manage' } },
{ path: ':id', component: AssignmentDetailComponent } { path: ':id', component: AssignmentDetailComponent, data: { basePerm: 'assignments.can_see' } }
]; ];
@NgModule({ @NgModule({

View File

@ -132,6 +132,7 @@
</div> </div>
<ng-template #mobileView> <ng-template #mobileView>
<div *ngIf="motion">
<!-- Meta info --> <!-- Meta info -->
<div class="hspacing"><ng-container *ngTemplateOutlet="metaInfoTemplate"></ng-container></div> <div class="hspacing"><ng-container *ngTemplateOutlet="metaInfoTemplate"></ng-container></div>
@ -149,10 +150,11 @@
<!-- Personal note --> <!-- Personal note -->
<os-personal-note *ngIf="!editMotion && !operator.isAnonymous" [motion]="motion"></os-personal-note> <os-personal-note *ngIf="!editMotion && !operator.isAnonymous" [motion]="motion"></os-personal-note>
</div>
</ng-template> </ng-template>
<ng-template #desktopView> <ng-template #desktopView>
<div class="desktop-view"> <div class="desktop-view" *ngIf="motion">
<div class="desktop-left on-transition-fade"> <div class="desktop-left on-transition-fade">
<!-- Meta Info --> <!-- Meta Info -->
<div class="meta-info-block meta-info-desktop"> <div class="meta-info-block meta-info-desktop">
@ -172,7 +174,7 @@
</ng-template> </ng-template>
<ng-template #metaInfoTemplate> <ng-template #metaInfoTemplate>
<div *ngIf="motion"> <div>
<!-- Submitters --> <!-- Submitters -->
<div *ngIf="motion.submitters || newMotion"> <div *ngIf="motion.submitters || newMotion">
<div *ngIf="!editMotion"><os-manage-submitters [motion]="motion"></os-manage-submitters></div> <div *ngIf="!editMotion"><os-manage-submitters [motion]="motion"></os-manage-submitters></div>
@ -441,7 +443,7 @@
</ng-template> </ng-template>
<ng-template #contentTemplate> <ng-template #contentTemplate>
<form class="motion-content" [formGroup]="contentForm" (keydown)="onKeyDown($event)" *ngIf="motion"> <form class="motion-content" [formGroup]="contentForm" (keydown)="onKeyDown($event)">
<!-- Line Number and Diff buttons --> <!-- Line Number and Diff buttons -->
<div *ngIf="!editMotion && !motion.isStatuteAmendment()" class="motion-text-controls"> <div *ngIf="!editMotion && !motion.isStatuteAmendment()" class="motion-text-controls">
<mat-form-field class="motion-goto-line" *ngIf="highlightedLineOpened"> <mat-form-field class="motion-goto-line" *ngIf="highlightedLineOpened">

View File

@ -338,11 +338,18 @@ mat-expansion-panel {
display: none; display: none;
} }
// ngx-file-drop requires the custom style in the global css file .file-drop-zone-style {
.file-drop-style { border: 2px dotted #0782d0 !important;
margin: auto;
height: 100px; height: 100px;
border: 2px dotted #0782d0; }
.file-drop-content-style {
height: 100px;
.ngx-file-drop__drop-zone-label {
color: #0782d0;
line-height: 100px;
}
} }
.os-tree { .os-tree {

View File

@ -12,7 +12,9 @@
"typeRoots": ["node_modules/@types"], "typeRoots": ["node_modules/@types"],
"lib": ["es2017", "dom"], "lib": ["es2017", "dom"],
"paths": { "paths": {
"exceljs": ["../node_modules/exceljs/dist/exceljs.min"] "exceljs": ["../node_modules/exceljs/dist/exceljs.min"],
"core-js/es7/*": ["../node_modules/core-js/proposals/reflect-metadata"],
"core-js/es6/*": ["../node_modules/core-js/es/*"]
} }
} }
} }

View File

@ -46,12 +46,12 @@
"variable-name": false, "variable-name": false,
"whitespace": [true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type"], "whitespace": [true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type"],
"no-output-on-prefix": true, "no-output-on-prefix": true,
"use-input-property-decorator": true, "no-inputs-metadata-property": true,
"use-output-property-decorator": true, "no-outputs-metadata-property": true,
"use-host-property-decorator": true, "no-host-metadata-property": true,
"no-input-rename": true, "no-input-rename": true,
"no-output-rename": true, "no-output-rename": true,
"use-life-cycle-interface": true, "use-lifecycle-interface": true,
"use-pipe-transform-interface": true, "use-pipe-transform-interface": true,
"component-class-suffix": true, "component-class-suffix": true,
"directive-class-suffix": true "directive-class-suffix": true