From 03d935d633c2229e090bb04d8fb1f86360626d82 Mon Sep 17 00:00:00 2001 From: Sean Engelhardt Date: Thu, 25 Apr 2019 13:15:24 +0200 Subject: [PATCH] Migrate to Angular version 7.2.14 New version of TS-Lint New version of ngx-file-drop with breaking changes npm audits Removed Terser, should work out of the box again --- client/package.json | 65 +++++++++---------- .../media-upload-content.component.html | 9 ++- .../assignments/assignments-routing.module.ts | 4 +- .../motion-detail.component.html | 36 +++++----- client/src/styles.scss | 15 +++-- client/tsconfig.json | 4 +- client/tslint.json | 8 +-- 7 files changed, 78 insertions(+), 63 deletions(-) diff --git a/client/package.json b/client/package.json index 0b8e4df47..ce2b4ffb8 100644 --- a/client/package.json +++ b/client/package.json @@ -25,57 +25,57 @@ "prettify-write": "prettier --config ./.prettierrc --write \"src/{app,environments}/**/*{.ts,.js,.json,.css,.scss}\"" }, "dependencies": { - "@angular/animations": "^7.2.5", - "@angular/cdk": "^7.3.2", - "@angular/common": "^7.2.5", - "@angular/compiler": "^7.2.5", - "@angular/core": "^7.2.5", - "@angular/forms": "^7.2.5", - "@angular/http": "^7.2.5", - "@angular/material": "^7.3.2", - "@angular/platform-browser": "^7.2.5", - "@angular/platform-browser-dynamic": "^7.2.5", - "@angular/pwa": "^0.13.2", - "@angular/router": "^7.2.5", - "@angular/service-worker": "^7.2.5", + "@angular/animations": "^7.2.14", + "@angular/cdk": "^7.3.7", + "@angular/common": "^7.2.14", + "@angular/compiler": "^7.2.14", + "@angular/core": "^7.2.14", + "@angular/forms": "^7.2.14", + "@angular/http": "^7.2.14", + "@angular/material": "^7.3.7", + "@angular/platform-browser": "^7.2.14", + "@angular/platform-browser-dynamic": "^7.2.14", + "@angular/pwa": "^0.13.8", + "@angular/router": "^7.2.14", + "@angular/service-worker": "^7.2.14", "@ngx-pwa/local-storage": "^7.4.1", "@ngx-translate/core": "^11.0.1", "@ngx-translate/http-loader": "^4.0.0", "@tinymce/tinymce-angular": "^3.0.0", - "core-js": "^2.6.5", + "core-js": "^3.0.1", "css-element-queries": "^1.1.1", - "exceljs": "1.9.0", + "exceljs": "1.9.1", "file-saver": "^2.0.1", "hammerjs": "^2.0.8", "material-icon-font": "git+https://github.com/petergng/materialIconFont.git", "ng-pick-datetime": "^7.0.0", - "ngx-file-drop": "^5.0.5", - "ngx-mat-select-search": "^1.5.2", + "ngx-file-drop": "^6.0.0", + "ngx-mat-select-search": "^1.7.2", "ngx-papaparse": "^3.0.2", "pdfmake": "^0.1.53", "po2json": "^1.0.0-alpha", - "rxjs": "^6.4.0", + "rxjs": "^6.5.1", "tinymce": "^4.9.2", "uuid": "^3.3.2", - "zone.js": "^0.8.29" + "zone.js": "^0.9.0" }, "devDependencies": { - "@angular-devkit/build-angular": "^0.13.2", - "@angular/cli": "^7.3.2", - "@angular/compiler-cli": "^7.2.5", - "@angular/language-service": "^7.2.5", + "@angular-devkit/build-angular": "^0.13.8", + "@angular/cli": "^7.3.8", + "@angular/compiler-cli": "^7.2.14", + "@angular/language-service": "^7.2.14", "@biesbjerg/ngx-translate-extract": "^2.3.4", "@compodoc/compodoc": "^1.1.8", "@types/jasmine": "^3.3.9", "@types/jasminewd2": "^2.0.6", - "@types/node": "^11.9.4", - "@types/yargs": "^12.0.9", - "codelyzer": "~4.5.0", + "@types/node": "^11.13.7", + "@types/yargs": "^13.0.0", + "codelyzer": "~5.0.0", "fs": "0.0.1-security", "husky": "^1.3.1", - "jasmine-core": "~3.3.0", + "jasmine-core": "~3.4.0", "jasmine-spec-reporter": "~4.2.1", - "karma": "^4.0.0", + "karma": "^4.1.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "^2.0.5", "karma-jasmine": "~2.0.1", @@ -85,11 +85,10 @@ "prettier": "^1.17.0", "protractor": "^5.4.2", "source-map-explorer": "^1.7.0", - "terser": "3.16.1", - "ts-node": "~8.0.2", - "tslint": "~5.12.1", - "tsutils": "3.8.0", + "ts-node": "~8.1.0", + "tslint": "~5.16.0", + "tsutils": "3.10.0", "typescript": "~3.2.0", - "webpack-bundle-analyzer": "^3.0.4" + "webpack-bundle-analyzer": "^3.3.2" } } diff --git a/client/src/app/shared/components/media-upload-content/media-upload-content.component.html b/client/src/app/shared/components/media-upload-content/media-upload-content.component.html index 7c003850a..5976ae3d5 100644 --- a/client/src/app/shared/components/media-upload-content/media-upload-content.component.html +++ b/client/src/app/shared/components/media-upload-content/media-upload-content.component.html @@ -2,8 +2,13 @@
- - Drop files into this area OR click here to select files +
diff --git a/client/src/app/site/assignments/assignments-routing.module.ts b/client/src/app/site/assignments/assignments-routing.module.ts index 91c7efb52..021016010 100644 --- a/client/src/app/site/assignments/assignments-routing.module.ts +++ b/client/src/app/site/assignments/assignments-routing.module.ts @@ -6,8 +6,8 @@ import { AssignmentListComponent } from './components/assignment-list/assignment const routes: Routes = [ { path: '', component: AssignmentListComponent, pathMatch: 'full' }, - { path: 'new', component: AssignmentDetailComponent }, - { path: ':id', component: AssignmentDetailComponent } + { path: 'new', component: AssignmentDetailComponent, data: { basePerm: 'assignments.can_manage' } }, + { path: ':id', component: AssignmentDetailComponent, data: { basePerm: 'assignments.can_see' } } ]; @NgModule({ diff --git a/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html index cc9727652..b5d7f8c51 100644 --- a/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html @@ -132,27 +132,29 @@ - -
+
+ +
- + - -
- + +
+ +
+ + + + + + + +
- - - - - - - - -
+
@@ -172,7 +174,7 @@ -
+
@@ -441,7 +443,7 @@ -
+
diff --git a/client/src/styles.scss b/client/src/styles.scss index a5ec3cde4..ac2eae328 100644 --- a/client/src/styles.scss +++ b/client/src/styles.scss @@ -338,11 +338,18 @@ mat-expansion-panel { display: none; } -// ngx-file-drop requires the custom style in the global css file -.file-drop-style { - margin: auto; +.file-drop-zone-style { + border: 2px dotted #0782d0 !important; 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 { diff --git a/client/tsconfig.json b/client/tsconfig.json index db888be9b..c9c60affb 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -12,7 +12,9 @@ "typeRoots": ["node_modules/@types"], "lib": ["es2017", "dom"], "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/*"] } } } diff --git a/client/tslint.json b/client/tslint.json index 21820b563..383db0ced 100644 --- a/client/tslint.json +++ b/client/tslint.json @@ -46,12 +46,12 @@ "variable-name": false, "whitespace": [true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type"], "no-output-on-prefix": true, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, + "no-inputs-metadata-property": true, + "no-outputs-metadata-property": true, + "no-host-metadata-property": true, "no-input-rename": true, "no-output-rename": true, - "use-life-cycle-interface": true, + "use-lifecycle-interface": true, "use-pipe-transform-interface": true, "component-class-suffix": true, "directive-class-suffix": true