From e1acf6e9d6f23a90bd53f1b0f1544dfeb84f5d81 Mon Sep 17 00:00:00 2001 From: Sean Engelhardt Date: Wed, 1 Apr 2020 12:46:06 +0200 Subject: [PATCH] Update to Anulgar 9 Updates Angular to version 9.1 Updates most-to-all npm components Removes deprecated components and npm commands Updates travis node version Adjust the whole code base to angular 9 standard Increase TypeScipt version to 3.8 --- .travis.yml | 14 +- client/README.md | 143 +++++++++--------- client/angular.json | 36 +++-- client/package.json | 103 ++++++------- client/src/app/app.component.spec.ts | 4 +- client/src/app/app.component.ts | 12 +- client/src/app/app.module.ts | 5 +- .../core/core-services/autoupdate.service.ts | 2 +- .../core/core-services/http.service.spec.ts | 2 +- .../core-services/time-travel.service.spec.ts | 2 +- .../core/core-services/websocket.service.ts | 9 +- client/src/app/core/core.module.ts | 6 +- .../core/pdf-services/html-to-pdf.service.ts | 5 +- .../core/pdf-services/pdf-document.service.ts | 2 +- ...signment-option-repository.service.spec.ts | 2 +- ...assignment-poll-repository.service.spec.ts | 2 +- .../assignment-repository.service.spec.ts | 2 +- ...assignment-vote-repository.service.spec.ts | 2 +- .../mediafile-repository.service.spec.ts | 2 +- .../motion-block-repository.service.spec.ts | 2 +- .../motion-option-repository.service.spec.ts | 2 +- .../motion-poll-repository.service.spec.ts | 2 +- .../motion-vote-repository.service.spec.ts | 2 +- .../tags/tag-repository.service.spec.ts | 2 +- .../topics/topic-repository.service.spec.ts | 2 +- .../translate/openslides-translate-module.ts | 4 +- .../app/core/translate/translation-service.ts | 2 +- .../core/ui-services/banner.service.spec.ts | 2 +- .../ui-services/base-poll-dialog.service.ts | 2 +- .../ui-services/base-sort.service.spec.ts | 2 +- .../core/ui-services/choice.service.spec.ts | 2 +- .../src/app/core/ui-services/diff.service.ts | 24 +-- .../core/ui-services/overlay.service.spec.ts | 2 +- .../app/core/ui-services/overlay.service.ts | 2 +- .../core/ui-services/progress.service.spec.ts | 2 +- .../ui-services/tree-sort.service.spec.ts | 2 +- .../ui-services/voting-banner.service.spec.ts | 2 +- .../core/ui-services/voting.service.spec.ts | 2 +- ...enda-content-object-form.component.spec.ts | 2 +- .../attachment-control.component.ts | 3 +- .../block-tile/block-tile.component.ts | 6 +- .../components/charts/charts.component.ts | 2 +- .../check-input/check-input.component.ts | 2 +- .../choice-dialog.component.spec.ts | 2 +- .../choice-dialog/choice-dialog.component.ts | 2 +- .../copyright-sign.component.ts | 4 +- .../legal-notice-content.component.ts | 2 +- .../list-view-table.component.ts | 14 +- .../media-upload-content.component.ts | 2 +- .../privacy-policy-content.component.ts | 2 +- .../progress-snack-bar.component.spec.ts | 2 +- .../progress-snack-bar.component.ts | 2 +- .../projection-dialog.component.spec.ts | 2 +- .../projection-dialog.component.ts | 2 +- .../projector/projector.component.ts | 6 +- .../prompt-dialog.component.spec.ts | 2 +- .../prompt-dialog/prompt-dialog.component.ts | 2 +- .../search-value-selector.component.spec.ts | 2 +- .../search-value-selector.component.ts | 15 +- .../slide-container.component.ts | 6 +- .../sort-bottom-sheet.component.ts | 2 +- .../sort-filter-bar.component.ts | 2 +- .../user-menu/user-menu.component.ts | 2 +- client/src/app/shared/date-adapter.ts | 4 +- .../shared/models/base/base-form-control.ts | 2 +- client/src/app/shared/shared.module.ts | 17 +-- client/src/app/site/agenda/agenda.module.ts | 1 - .../agenda-sort/agenda-sort.component.ts | 4 +- .../item-info-dialog.component.spec.ts | 2 +- .../item-info-dialog.component.ts | 2 +- .../list-of-speakers.component.ts | 2 +- .../services/agenda-pdf.service.spec.ts | 2 +- .../site/assignments/assignments.module.ts | 4 +- .../assignment-detail.component.ts | 2 +- .../assignment-poll-detail.component.ts | 2 +- .../assignment-poll-dialog.component.spec.ts | 2 +- .../assignment-poll-dialog.component.ts | 4 +- .../assignment-poll-vote.component.ts | 2 +- .../assignment-pdf-export.service.spec.ts | 2 +- .../services/assignment-pdf.service.spec.ts | 2 +- .../assignment-poll-dialog.service.spec.ts | 2 +- .../assignment-poll-dialog.service.ts | 2 +- .../assignment-poll-pdf.service.spec.ts | 2 +- .../services/assignment-poll.service.spec.ts | 2 +- client/src/app/site/base/base-import-list.ts | 8 +- .../src/app/site/base/sort-tree.component.ts | 5 +- .../legal-notice/legal-notice.component.ts | 2 +- .../privacy-policy.component.ts | 2 +- .../components/start/start.component.ts | 2 +- .../super-search/super-search.component.ts | 7 +- client/src/app/site/config/config.module.ts | 3 +- .../history-list/history-list.component.ts | 13 +- .../login-mask/login-mask.component.ts | 2 +- .../reset-password-confirm.component.spec.ts | 34 +++-- .../amendment-list.component.ts | 3 +- .../modules/call-list/call-list.component.ts | 4 +- .../category-list/category-list.component.ts | 2 +- .../motion-block-list.component.ts | 2 +- .../motion-comment-section-list.component.ts | 2 +- .../motion-comment-section-sort.component.ts | 2 +- ...ge-recommendation-dialog.component.spec.ts | 2 +- ...-change-recommendation-dialog.component.ts | 2 +- ...ge-recommendation-dialog.component.spec.ts | 2 +- ...-change-recommendation-dialog.component.ts | 3 +- .../personal-note/personal-note.component.ts | 2 +- .../motion-detail/motion-detail.module.ts | 7 - .../motion-import-list.component.ts | 4 +- .../motion-poll-detail.component.ts | 2 +- .../motion-poll-dialog.component.spec.ts | 2 +- .../motion-poll-dialog.component.ts | 3 +- .../motion-poll-vote.component.ts | 2 +- .../motion-poll/motion-poll.component.ts | 3 +- .../motion-export-dialog.component.ts | 2 +- .../motion-multiselect-actions.component.ts | 3 +- .../shared-motion/shared-motion.module.ts | 3 +- .../statute-import-list.component.ts | 4 +- .../statute-paragraph-list.component.ts | 2 +- .../amendment-filter-list.service.spec.ts | 2 +- .../amendment-list-pdf.service.spec.ts | 2 +- .../amendment-sort-list.service.spec.ts | 2 +- .../block-detail-filter-list.service.spec.ts | 2 +- .../local-permissions.service.spec.ts | 2 +- .../motion-block-sort.service.spec.ts | 2 +- .../services/motion-export.service.spec.ts | 2 +- .../motion-pdf-catalog.service.spec.ts | 2 +- .../motion-pdf-export.service.spec.ts | 2 +- .../services/motion-pdf.service.spec.ts | 2 +- .../motion-poll-dialog.service.spec.ts | 2 +- .../services/motion-poll-dialog.service.ts | 2 +- .../services/motion-poll-pdf.service.spec.ts | 2 +- .../services/motion-poll.service.spec.ts | 2 +- .../motion-xlsx-export.service.spec.ts | 2 +- .../components/base-poll-detail.component.ts | 2 +- .../components/base-poll-dialog.component.ts | 2 +- .../components/base-poll-vote.component.ts | 2 +- .../poll-form/poll-form.component.ts | 3 +- .../poll-list/poll-list.component.ts | 2 +- .../poll-progress/poll-progress.component.ts | 2 +- .../services/poll-filter-list.service.spec.ts | 2 +- .../poll-list-observable.service.spec.ts | 2 +- .../site/polls/services/poll.service.spec.ts | 2 +- .../countdown-dialog.component.spec.ts | 2 +- .../message-dialog.component.spec.ts | 2 +- .../projector-edit-dialog.component.spec.ts | 2 +- .../projector-edit-dialog.component.ts | 5 +- .../projector-list-entry.component.ts | 2 +- .../projector-list.component.ts | 2 +- .../app/site/projector/projector.module.ts | 7 - .../components/tag-list/tag-list.component.ts | 2 +- .../topic-import-list.component.ts | 4 +- .../services/topic-import.service.spec.ts | 2 +- .../user-import/user-import-list.component.ts | 4 +- .../services/user-import.service.spec.ts | 2 +- .../services/user-pdf-export.service.spec.ts | 2 +- .../users/services/user-pdf.service.spec.ts | 2 +- ...common-list-of-speakers-slide.component.ts | 4 +- .../common-list-of-speakers-slide.module.ts | 1 - ...ist-of-speakers-overlay-slide.component.ts | 6 +- ...t-list-of-speakers-overlay-slide.module.ts | 5 +- .../current-list-of-speakers-slide.module.ts | 4 +- .../current-speaker-chyron-slide.component.ts | 4 +- .../current-speaker-chyron-slide.module.ts | 11 +- .../item-list/item-list-slide.component.ts | 4 +- .../item-list/item-list-slide.module.ts | 11 +- .../list-of-speakers-slide.module.ts | 4 +- .../assignment-poll-slide.module.ts | 11 +- .../assignment/assignment-slide.component.ts | 4 +- .../assignment/assignment-slide.module.ts | 11 +- .../base-scale-scroll-slide-component.ts | 9 +- client/src/app/slides/base-slide-component.ts | 2 +- client/src/app/slides/base-slide-module.ts | 22 --- .../core/clock/clock-slide.component.ts | 4 +- .../slides/core/clock/clock-slide.module.ts | 11 +- .../countdown/countdown-slide.component.ts | 4 +- .../core/countdown/countdown-slide.module.ts | 11 +- .../projector-message-slide.component.ts | 4 +- .../projector-message-slide.module.ts | 11 +- .../mediafile/mediafile-slide.component.ts | 7 +- .../mediafile/mediafile-slide.module.ts | 5 +- .../slides/motions/base/base-motion-slide.ts | 4 +- .../motion-block/motion-block-slide.module.ts | 11 +- .../motion-poll/motion-poll-slide.module.ts | 11 +- .../motions/motion/motion-slide.module.ts | 11 +- .../slides/polls/base-poll-slide.component.ts | 7 +- .../slides/services/slide-manager.service.ts | 15 +- client/src/app/slides/slide-token.ts | 4 +- .../topics/topic/topic-slide.component.ts | 8 +- .../slides/topics/topic/topic-slide.module.ts | 10 +- .../slides/users/user/user-slide.component.ts | 4 +- .../slides/users/user/user-slide.module.ts | 11 +- client/src/polyfills.ts | 3 +- client/tsconfig-es5.app.json | 3 +- client/tsconfig.app.json | 7 +- 193 files changed, 528 insertions(+), 552 deletions(-) delete mode 100644 client/src/app/slides/base-slide-module.ts diff --git a/.travis.yml b/.travis.yml index d1f0310c1..ec90f89d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ matrix: - name: "Installing npm dependencies" language: node_js - node_js: "10.9" + node_js: "10.13" cache: - directories: - "client/node_modules" @@ -39,7 +39,7 @@ matrix: - stage: "Run tests" name: "Client: Testing" language: node_js - node_js: "10.9" + node_js: "10.13" apt: sources: - google-chrome @@ -56,7 +56,7 @@ matrix: - name: "Client: Production Build (ES5)" language: node_js - node_js: "10.9" + node_js: "10.13" install: - cd client - sed -i '/\"target\"/c\\"target\":\"es5\",' tsconfig.json @@ -65,7 +65,7 @@ matrix: - name: "Client: Production Build (ES2015)" language: node_js - node_js: "10.9" + node_js: "10.13" install: - cd client - echo "Firefox ESR" > browserslist @@ -74,7 +74,7 @@ matrix: - name: "Client: Build" language: node_js - node_js: "10.9" + node_js: "10.13" script: - cd client - npm run build-debug @@ -111,14 +111,14 @@ matrix: - name: "Client: Linting" language: node_js - node_js: "10.9" + node_js: "10.13" script: - cd client - npm run lint-check - name: "Client: Code Formatting Check" language: node_js - node_js: "10.9" + node_js: "10.13" script: - cd client - npm list --depth=0 || cat --help diff --git a/client/README.md b/client/README.md index 0efcb31ba..c763c89c9 100644 --- a/client/README.md +++ b/client/README.md @@ -59,76 +59,73 @@ Language files can be found in `/src/assets/i18n`. OpenSlides uses the following software or parts of them: -- [@angular/animations@8.2.4](https://github.com/angular/angular), License: MIT -- [@angular/cdk-experimental@8.1.4](https://github.com/angular/components), License: MIT -- [@angular/cdk@8.1.4](https://github.com/angular/components), License: MIT -- [@angular/common@8.2.4](https://github.com/angular/angular), License: MIT -- [@angular/compiler@8.2.4](https://github.com/angular/angular), License: MIT -- [@angular/core@8.2.4](https://github.com/angular/angular), License: MIT -- [@angular/forms@8.2.4](https://github.com/angular/angular), License: MIT -- [@angular/material-moment-adapter@8.1.4](https://github.com/angular/components), License: MIT -- [@angular/material@8.1.4](https://github.com/angular/components), License: MIT -- [@angular/platform-browser-dynamic@8.2.4](https://github.com/angular/angular), License: MIT -- [@angular/platform-browser@8.2.4](https://github.com/angular/angular), License: MIT -- [@angular/pwa@0.803.2](https://github.com/angular/angular-cli), License: MIT -- [@angular/router@8.2.4](https://github.com/angular/angular), License: MIT -- [@angular/service-worker@8.2.4](https://github.com/angular/angular), License: MIT -- [@ngx-pwa/local-storage@8.2.1](https://github.com/cyrilletuzi/angular-async-local-storage), License: MIT -- [@ngx-translate/core@11.0.1](https://github.com/ngx-translate/core), License: MIT -- [@ngx-translate/http-loader@4.0.0](https://github.com/ngx-translate/http-loader), License: MIT -- [@pebula/ngrid-material@1.0.0-rc.5](https://github.com/shlomiassaf/ngrid), License: MIT -- [@pebula/ngrid@1.0.0-rc.5](https://github.com/shlomiassaf/ngrid), License: MIT -- [@pebula/utils@1.0.0](https://github.com/shlomiassaf/ngrid), License: MIT -- [@tinymce/tinymce-angular@3.3.0](https://github.com/tinymce/tinymce-angular), License: Apache-2.0 -- [acorn@7.0.0](https://github.com/acornjs/acorn), License: MIT -- [core-js@3.2.1](https://github.com/zloirock/core-js), License: MIT -- [css-element-queries@1.2.1](https://github.com/marcj/css-element-queries), License: MIT -- [exceljs@1.15.0](https://github.com/exceljs/exceljs), License: MIT -- [file-saver@2.0.2](https://github.com/eligrey/FileSaver.js), License: MIT -- [hammerjs@2.0.8](https://github.com/hammerjs/hammer.js), License: MIT -- [lz4js@0.2.0](https://github.com/Benzinga/lz4js), License: ISC -- [material-icon-font@0.1.0](https://github.com//petergng/svgFontCreator), License: ISC -- [moment@2.24.0](https://github.com/moment/moment), License: MIT -- [ng2-pdf-viewer@5.3.4](git+https://vadimdez@github.com/VadimDez/ng2-pdf-viewer), License: MIT -- [ngx-file-drop@8.0.7](https://github.com/georgipeltekov/ngx-file-drop), License: MIT -- [ngx-mat-select-search@1.8.0](https://github.com/bithost-gmbh/ngx-mat-select-search), License: MIT -- [ngx-material-timepicker@4.0.2](https://github.com/Agranom/ngx-material-timepicker), License: MIT -- [ngx-papaparse@4.0.2](https://github.com/alberthaff/ngx-papaparse), License: MIT -- [pdfmake@0.1.58](https://github.com/bpampuch/pdfmake), License: MIT -- [po2json@1.0.0-alpha](https://github.com/mikeedwards/po2json), License: GNU Library General Public License -- [rxjs@6.5.2](https://github.com/reactivex/rxjs), License: Apache-2.0 -- [text-encoding@0.7.0](https://github.com/inexorabletash/text-encoding), License: (Unlicense OR Apache-2.0) -- [tinymce@5.0.14](https://github.com/tinymce/tinymce-dist), License: LGPL-2.1 -- [tslib@1.10.0](https://github.com/Microsoft/tslib), License: Apache-2.0 -- [uuid@3.3.3](https://github.com/kelektiv/node-uuid), License: MIT -- [zone.js@0.9.1](https://github.com/angular/zone.js), License: MIT -- [@angular-devkit/build-angular@0.803.2](https://github.com/angular/angular-cli), License: MIT -- [@angular/cli@8.3.2](https://github.com/angular/angular-cli), License: MIT -- [@angular/compiler-cli@8.2.4](https://github.com/angular/angular), License: MIT -- [@angular/language-service@8.2.4](https://github.com/angular/angular), License: MIT -- [@biesbjerg/ngx-translate-extract@3.0.5](https://github.com/biesbjerg/ngx-translate-extract), License: MIT -- [@compodoc/compodoc@1.1.10](https://github.com/compodoc/compodoc), License: MIT -- [@types/jasmine@3.4.0](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT -- [@types/jasminewd2@2.0.6](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT -- [@types/node@12.7.3](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT -- [@types/yargs@13.0.2](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT -- [codelyzer@5.1.0](https://github.com/mgechev/codelyzer), License: MIT -- [husky@3.0.4](https://github.com/typicode/husky), License: MIT -- [jasmine-core@3.4.0](https://github.com/jasmine/jasmine), License: MIT -- [jasmine-spec-reporter@4.2.1](https://github.com/bcaudan/jasmine-spec-reporter), License: Apache-2.0 -- [karma-chrome-launcher@3.1.0](https://github.com/karma-runner/karma-chrome-launcher), License: MIT -- [karma-coverage-istanbul-reporter@2.1.0](https://github.com/mattlewis92/karma-coverage-istanbul-reporter), License: MIT -- [karma-jasmine-html-reporter@1.4.2](https://github.com/dfederm/karma-jasmine-html-reporter), License: MIT -- [karma-jasmine@2.0.1](https://github.com/karma-runner/karma-jasmine), License: MIT -- [karma@4.3.0](https://github.com/karma-runner/karma), License: MIT -- [npm-license-crawler@0.2.1](https://github.com/mwittig/npm-license-crawler), License: BSD-3-Clause -- [npm-run-all@4.1.5](https://github.com/mysticatea/npm-run-all), License: MIT -- [prettier@1.18.2](https://github.com/prettier/prettier), License: MIT -- [protractor@5.4.2](https://github.com/angular/protractor), License: MIT -- [resize-observer-polyfill@1.5.1](https://github.com/que-etc/resize-observer-polyfill), License: MIT -- [source-map-explorer@2.0.1](https://github.com/danvk/source-map-explorer), License: Apache-2.0 -- [ts-node@8.3.0](https://github.com/TypeStrong/ts-node), License: MIT -- [tslint@5.19.0](https://github.com/palantir/tslint), License: Apache-2.0 -- [tsutils@3.17.1](https://github.com/ajafff/tsutils), License: MIT -- [typescript@3.5.3](https://github.com/Microsoft/TypeScript), License: Apache-2.0 -- [webpack-bundle-analyzer@3.4.1](https://github.com/webpack-contrib/webpack-bundle-analyzer), License: MIT +- [@angular/animations@9.1.0](https://github.com/angular/angular), License: MIT +- [@angular/cdk-experimental@9.2.0](https://github.com/angular/components), License: MIT +- [@angular/cdk@9.2.0](https://github.com/angular/components), License: MIT +- [@angular/common@9.1.0](https://github.com/angular/angular), License: MIT +- [@angular/compiler@9.1.0](https://github.com/angular/angular), License: MIT +- [@angular/core@9.1.0](https://github.com/angular/angular), License: MIT +- [@angular/forms@9.1.0](https://github.com/angular/angular), License: MIT +- [@angular/material-moment-adapter@9.2.0](https://github.com/angular/components), License: MIT +- [@angular/material@9.2.0](https://github.com/angular/components), License: MIT +- [@angular/platform-browser-dynamic@9.1.0](https://github.com/angular/angular), License: MIT +- [@angular/platform-browser@9.1.0](https://github.com/angular/angular), License: MIT +- [@angular/router@9.1.0](https://github.com/angular/angular), License: MIT +- [@angular/service-worker@9.1.0](https://github.com/angular/angular), License: MIT +- [@ngx-pwa/local-storage@9.0.3](https://github.com/cyrilletuzi/angular-async-local-storage), License: MIT +- [@ngx-translate/core@12.1.2](https://github.com/ngx-translate/core), License: MIT +- [@ngx-translate/http-loader@4.0.0](https://github.com/ngx-translate/http-loader), License: MIT +- [@pebula/ngrid-material@2.0.0-rc.1](undefined), License: MIT +- [@pebula/ngrid@2.0.0-rc.1](https://github.com/shlomiassaf/ngrid), License: MIT +- [@pebula/utils@1.0.2](undefined), License: MIT +- [@tinymce/tinymce-angular@3.5.0](https://github.com/tinymce/tinymce-angular), License: Apache-2.0 +- [acorn@7.1.1](https://github.com/acornjs/acorn), License: MIT +- [chart.js@2.9.3](https://github.com/chartjs/Chart.js), License: MIT +- [core-js@3.6.4](https://github.com/zloirock/core-js), License: MIT +- [css-element-queries@1.2.3](https://github.com/marcj/css-element-queries), License: MIT +- [exceljs@3.8.2](https://github.com/exceljs/exceljs), License: MIT +- [file-saver@2.0.2](https://github.com/eligrey/FileSaver.js), License: MIT +- [lz4js@0.2.0](https://github.com/Benzinga/lz4js), License: ISC +- [material-icon-font@0.1.0](https://github.com//petergng/svgFontCreator), License: ISC +- [moment@2.24.0](https://github.com/moment/moment), License: MIT +- [ng2-charts@2.3.0](https://github.com/valor-software/ng2-charts), License: ISC +- [ng2-pdf-viewer@6.1.2](git+https://vadimdez@github.com/VadimDez/ng2-pdf-viewer), License: MIT +- [ngx-file-drop@8.0.8](https://github.com/georgipeltekov/ngx-file-drop), License: MIT +- [ngx-mat-select-search@2.1.2](https://github.com/bithost-gmbh/ngx-mat-select-search), License: MIT +- [ngx-material-timepicker@5.5.1](https://github.com/Agranom/ngx-material-timepicker), License: MIT +- [ngx-papaparse@4.0.4](https://github.com/alberthaff/ngx-papaparse), License: MIT +- [pdfmake@0.1.65](https://github.com/bpampuch/pdfmake), License: MIT +- [po2json@1.0.0-beta-2](https://github.com/mikeedwards/po2json), License: LGPL-2.0-or-later +- [rxjs@6.5.4](https://github.com/reactivex/rxjs), License: Apache-2.0 +- [tinymce@5.2.1](https://github.com/tinymce/tinymce-dist), License: LGPL-2.1 +- [tslib@1.11.1](https://github.com/Microsoft/tslib), License: Apache-2.0 +- [zone.js@0.10.3](https://github.com/angular/angular), License: MIT +- [@angular-devkit/build-angular@0.901.0](https://github.com/angular/angular-cli), License: MIT +- [@angular-devkit/schematics@9.1.0](https://github.com/angular/angular-cli), License: MIT +- [@angular/cli@9.1.0](https://github.com/angular/angular-cli), License: MIT +- [@angular/compiler-cli@9.1.0](https://github.com/angular/angular), License: MIT +- [@angular/language-service@9.1.0](https://github.com/angular/angular), License: MIT +- [@biesbjerg/ngx-translate-extract@6.0.3](https://github.com/biesbjerg/ngx-translate-extract), License: MIT +- [@compodoc/compodoc@1.1.11](https://github.com/compodoc/compodoc), License: MIT +- [@schematics/angular@9.1.0](https://github.com/angular/angular-cli), License: MIT +- [@types/jasmine@3.5.10](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT +- [@types/jasminewd2@2.0.8](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT +- [@types/node@13.9.8](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT +- [@types/yargs@15.0.4](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT +- [codelyzer@5.2.2](https://github.com/mgechev/codelyzer), License: MIT +- [husky@4.2.3](https://github.com/typicode/husky), License: MIT +- [jasmine-core@3.5.0](https://github.com/jasmine/jasmine), License: MIT +- [jasmine-spec-reporter@5.0.1](https://github.com/bcaudan/jasmine-spec-reporter), License: Apache-2.0 +- [karma-chrome-launcher@3.1.0](https://github.com/karma-runner/karma-chrome-launcher), License: MIT +- [karma-coverage-istanbul-reporter@2.1.1](https://github.com/mattlewis92/karma-coverage-istanbul-reporter), License: MIT +- [karma-jasmine-html-reporter@1.5.3](https://github.com/dfederm/karma-jasmine-html-reporter), License: MIT +- [karma-jasmine@3.1.1](https://github.com/karma-runner/karma-jasmine), License: MIT +- [karma@4.4.1](https://github.com/karma-runner/karma), License: MIT +- [npm-license-crawler@0.2.1](https://github.com/mwittig/npm-license-crawler), License: BSD-3-Clause +- [prettier@2.0.2](https://github.com/prettier/prettier), License: MIT +- [protractor@5.4.3](https://github.com/angular/protractor), License: MIT +- [resize-observer-polyfill@1.5.1](https://github.com/que-etc/resize-observer-polyfill), License: MIT +- [ts-node@8.8.1](https://github.com/TypeStrong/ts-node), License: MIT +- [tslint@6.1.0](https://github.com/palantir/tslint), License: Apache-2.0 +- [tsutils@3.17.1](https://github.com/ajafff/tsutils), License: MIT +- [typescript@3.8.3](https://github.com/Microsoft/TypeScript), License: Apache-2.0 diff --git a/client/angular.json b/client/angular.json index 956f93226..9bdf02a82 100644 --- a/client/angular.json +++ b/client/angular.json @@ -7,7 +7,7 @@ "projectType": "application", "schematics": { "@schematics/angular:component": { - "styleext": "scss" + "style": "scss" } }, "root": "", @@ -22,7 +22,7 @@ "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.app.json", - "aot": false, + "aot": true, "assets": [ "src/assets", "src/manifest.json", @@ -48,10 +48,12 @@ }, "configurations": { "production": { - "fileReplacements": [{ - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - }], + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], "optimization": true, "outputHashing": "all", "sourceMap": false, @@ -62,13 +64,25 @@ "vendorChunk": false, "buildOptimizer": true, "serviceWorker": true, - "budgets": [{ - "type": "initial", - "maximumWarning": "5mb", - "maximumError": "10mb" - }] + "budgets": [ + { + "type": "initial", + "maximumWarning": "5mb", + "maximumError": "10mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb" + } + ] }, "es5": { + "budgets": [ + { + "type": "anyComponentStyle", + "maximumWarning": "6kb" + } + ], "tsConfig": "./tsconfig-es5.app.json" } } diff --git a/client/package.json b/client/package.json index 859e6cc47..4ec2ba254 100644 --- a/client/package.json +++ b/client/package.json @@ -10,11 +10,11 @@ "README": "https://github.com/OpenSlides/OpenSlides/blob/master/client/README.md", "scripts": { "ng": "ng", - "ng-high-memory": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng", "start": "ng serve --proxy-config proxy.conf.json --host=0.0.0.0", "start-es5": "ng serve --proxy-config proxy.conf.json --host=0.0.0.0 --configuration es5", - "build": "npm run ng-high-memory -- build --prod", - "build-debug": "npm run ng-high-memory -- build", + "build": "ng build --prod", + "postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points", + "build-debug": "ng build", "test": "ng test", "test-silently": "npm run test -- --watch=false --no-progress --browsers=ChromeHeadlessNoSandbox", "lint-check": "ng lint", @@ -31,82 +31,77 @@ "cleanup-win": "npm run prettify-write & npm run lint-write" }, "dependencies": { - "@angular/animations": "^8.2.14", - "@angular/cdk": "~8.1.4", - "@angular/cdk-experimental": "~8.1.4", - "@angular/common": "^8.2.14", - "@angular/compiler": "^8.2.14", - "@angular/core": "^8.2.14", - "@angular/forms": "^8.2.14", - "@angular/material": "~8.1.4", - "@angular/material-moment-adapter": "~8.1.4", - "@angular/platform-browser": "^8.2.14", - "@angular/platform-browser-dynamic": "^8.2.14", - "@angular/pwa": "^0.803.23", - "@angular/router": "^8.2.14", - "@angular/service-worker": "^8.2.14", - "@ngx-pwa/local-storage": "^8.2.4", - "@ngx-translate/core": "~11.0.1", + "@angular/animations": "~9.1.0", + "@angular/cdk": "~9.2.0", + "@angular/cdk-experimental": "~9.2.0", + "@angular/common": "~9.1.0", + "@angular/compiler": "~9.1.0", + "@angular/core": "~9.1.0", + "@angular/forms": "~9.1.0", + "@angular/material": "~9.2.0", + "@angular/material-moment-adapter": "~9.2.0", + "@angular/platform-browser": "~9.1.0", + "@angular/platform-browser-dynamic": "~9.1.0", + "@angular/router": "~9.1.0", + "@angular/service-worker": "~9.1.0", + "@ngx-pwa/local-storage": "~9.0.2", + "@ngx-translate/core": "~12.1.2", "@ngx-translate/http-loader": "^4.0.0", - "@pebula/ngrid": "1.0.0-rc.16", - "@pebula/ngrid-material": "1.0.0-rc.16", + "@pebula/ngrid": "2.0.0-rc.1", + "@pebula/ngrid-material": "2.0.0-rc.1", "@pebula/utils": "1.0.2", "@tinymce/tinymce-angular": "^3.3.1", "acorn": "^7.1.0", "chart.js": "^2.9.2", "core-js": "^3.6.4", "css-element-queries": "^1.2.3", - "exceljs": "1.15.0", + "exceljs": "3.8.2", "file-saver": "^2.0.2", - "hammerjs": "^2.0.8", "lz4js": "^0.2.0", "material-icon-font": "git+https://github.com/petergng/materialIconFont.git", "moment": "^2.24.0", "ng2-charts": "^2.3.0", - "ng2-pdf-viewer": "^5.3.4", "ngx-file-drop": "^8.0.8", - "ngx-mat-select-search": "^1.8.0", - "ngx-material-timepicker": "^4.0.2", + "ng2-pdf-viewer": "^6.1.2", + "ngx-mat-select-search": "^2.1.2", + "ngx-material-timepicker": "^5.5.1", "ngx-papaparse": "^4.0.2", "pdfmake": "^0.1.63", "po2json": "^1.0.0-beta-2", "rxjs": "^6.5.4", "tinymce": "^5.1.5", "tslib": "^1.10.0", - "uuid": "^3.3.3", - "zone.js": "~0.9.1" + "zone.js": "~0.10.2" }, "devDependencies": { - "@angular-devkit/build-angular": "^0.803.23", - "@angular/cli": "^8.3.23", - "@angular/compiler-cli": "^8.2.14", - "@angular/language-service": "^8.2.14", - "@biesbjerg/ngx-translate-extract": "^3.0.5", - "@babel/compat-data": "~7.8.0", - "@compodoc/compodoc": "^1.1.11", - "@types/jasmine": "^3.5.0", - "@types/jasminewd2": "^2.0.8", - "@types/node": "^12.7.12", - "@types/yargs": "^13.0.5", - "codelyzer": "^5.2.1", - "husky": "^3.1.0", - "jasmine-core": "~3.4.0", - "jasmine-spec-reporter": "~4.2.1", + "@angular-devkit/build-angular": "~0.900.7", + "@angular-devkit/schematics": "^9.0.6", + "@angular/cli": "~9.1.0", + "@angular/compiler-cli": "~9.1.0", + "@angular/language-service": "~9.1.0", + "@biesbjerg/ngx-translate-extract": "^6.0.3", + "@compodoc/compodoc": "^1.1.8", + "@schematics/angular": "^9.0.6", + "@types/jasmine": "^3.3.9", + "@types/jasminewd2": "^2.0.6", + "@types/node": "^13.9.8", + "@types/yargs": "^15.0.4", + "codelyzer": "^5.1.2", + "husky": "^4.2.3", + "jasmine-core": "~3.5.0", + "jasmine-spec-reporter": "~5.0.1", "karma": "^4.4.1", "karma-chrome-launcher": "~3.1.0", - "karma-coverage-istanbul-reporter": "^2.1.1", - "karma-jasmine": "~2.0.1", - "karma-jasmine-html-reporter": "^1.5.1", + "karma-coverage-istanbul-reporter": "^2.0.5", + "karma-jasmine": "~3.1.1", + "karma-jasmine-html-reporter": "^1.4.0", "npm-license-crawler": "^0.2.1", - "npm-run-all": "^4.1.5", - "prettier": "^1.19.1", - "protractor": "^5.4.2", + "prettier": "^2.0.2", + "protractor": "^5.4.3", "resize-observer-polyfill": "^1.5.1", - "source-map-explorer": "^2.2.2", - "ts-node": "~8.3.0", - "tslint": "~5.19.0", + "ts-node": "~8.8.1", + "tslint": "~6.1.0", "tsutils": "3.17.1", - "typescript": "~3.5.3", - "webpack-bundle-analyzer": "^3.6.0" + "typescript": "~3.8.3" } } diff --git a/client/src/app/app.component.spec.ts b/client/src/app/app.component.spec.ts index 6b8ec8865..48648f38e 100644 --- a/client/src/app/app.component.spec.ts +++ b/client/src/app/app.component.spec.ts @@ -14,8 +14,8 @@ describe('AppComponent', () => { imports: [E2EImportsModule] }).compileComponents(); - servertimeService = TestBed.get(ServertimeService); - translate = TestBed.get(TranslateService); + servertimeService = TestBed.inject(ServertimeService); + translate = TestBed.inject(TranslateService); spyOn(servertimeService, 'startScheduler').and.stub(); spyOn(translate, 'addLangs').and.stub(); spyOn(translate, 'setDefaultLang').and.stub(); diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index a01719ec2..15f70a46d 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -116,7 +116,7 @@ export class AppComponent { private overloadArrayFunctions(): void { Object.defineProperty(Array.prototype, 'toString', { - value: function(): string { + value: function (): string { let string = ''; const iterations = Math.min(this.length, 3); @@ -137,7 +137,7 @@ export class AppComponent { }); Object.defineProperty(Array.prototype, 'flatMap', { - value: function(o: any): any[] { + value: function (o: any): any[] { const concatFunction = (x: any, y: any[]) => x.concat(y); const flatMapLogic = (f: any, xs: any) => xs.map(f).reduce(concatFunction, []); return flatMapLogic(o, this); @@ -146,7 +146,7 @@ export class AppComponent { }); Object.defineProperty(Array.prototype, 'intersect', { - value: function(other: T[]): T[] { + value: function (other: T[]): T[] { let a = this; let b = other; // indexOf to loop over shorter @@ -159,7 +159,7 @@ export class AppComponent { }); Object.defineProperty(Array.prototype, 'mapToObject', { - value: function(f: (item: T) => { [key: string]: any }): { [key: string]: any } { + value: function (f: (item: T) => { [key: string]: any }): { [key: string]: any } { return this.reduce((aggr, item) => { const res = f(item); for (const key in res) { @@ -179,7 +179,7 @@ export class AppComponent { */ private overloadSetFunctions(): void { Object.defineProperty(Set.prototype, 'equals', { - value: function(other: Set): boolean { + value: function (other: Set): boolean { const difference = new Set(this); for (const elem of other) { if (difference.has(elem)) { @@ -200,7 +200,7 @@ export class AppComponent { */ private overloadModulo(): void { Object.defineProperty(Number.prototype, 'modulo', { - value: function(n: number): number { + value: function (n: number): number { return ((this % n) + n) % n; }, enumerable: false diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 13f5f2cbb..e9930b7eb 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -4,6 +4,8 @@ import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { ServiceWorkerModule } from '@angular/service-worker'; +import { StorageModule } from '@ngx-pwa/local-storage'; + import { AppLoadService } from './core/core-services/app-load.service'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; @@ -39,7 +41,8 @@ export function AppLoaderFactory(appLoadService: AppLoadService): () => Promise< CoreModule, LoginModule, ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }), - SlidesModule.forRoot() + SlidesModule.forRoot(), + StorageModule.forRoot({ IDBNoWrap: false }) ], providers: [{ provide: APP_INITIALIZER, useFactory: AppLoaderFactory, deps: [AppLoadService], multi: true }], bootstrap: [AppComponent] diff --git a/client/src/app/core/core-services/autoupdate.service.ts b/client/src/app/core/core-services/autoupdate.service.ts index 14a6a4813..ceaeda77a 100644 --- a/client/src/app/core/core-services/autoupdate.service.ts +++ b/client/src/app/core/core-services/autoupdate.service.ts @@ -3,7 +3,7 @@ import { Injectable } from '@angular/core'; import { BaseModel } from '../../shared/models/base/base-model'; import { CollectionStringMapperService } from './collection-string-mapper.service'; import { DataStoreService, DataStoreUpdateManagerService } from './data-store.service'; -import { WEBSOCKET_ERROR_CODES, WebsocketService } from './websocket.service'; +import { WebsocketService, WEBSOCKET_ERROR_CODES } from './websocket.service'; interface AutoupdateFormat { /** diff --git a/client/src/app/core/core-services/http.service.spec.ts b/client/src/app/core/core-services/http.service.spec.ts index 7fb929dcb..405f80f8f 100644 --- a/client/src/app/core/core-services/http.service.spec.ts +++ b/client/src/app/core/core-services/http.service.spec.ts @@ -10,7 +10,7 @@ describe('HttpService', () => { }); // TODO: Write a working Test // it('should be created', () => { - // const service: HttpService = TestBed.get(HttpService); + // const service: HttpService = TestBed.inject(HttpService); // expect(service).toBeTruthy(); // }); }); diff --git a/client/src/app/core/core-services/time-travel.service.spec.ts b/client/src/app/core/core-services/time-travel.service.spec.ts index 4ca042ce4..6e68ae5f5 100644 --- a/client/src/app/core/core-services/time-travel.service.spec.ts +++ b/client/src/app/core/core-services/time-travel.service.spec.ts @@ -13,7 +13,7 @@ describe('TimeTravelService', () => { ); it('should be created', () => { - const service: TimeTravelService = TestBed.get(TimeTravelService); + const service: TimeTravelService = TestBed.inject(TimeTravelService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/core-services/websocket.service.ts b/client/src/app/core/core-services/websocket.service.ts index e89496a24..17b4ad62e 100644 --- a/client/src/app/core/core-services/websocket.service.ts +++ b/client/src/app/core/core-services/websocket.service.ts @@ -208,9 +208,7 @@ export class WebsocketService { * Uses NgZone to let all callbacks run in the angular context. */ public async connect(options: ConnectOptions = {}, retry: boolean = false): Promise { - const websocketId = Math.random() - .toString(36) - .substring(7); + const websocketId = Math.random().toString(36).substring(7); this.websocketId = websocketId; if (this.websocket) { @@ -316,8 +314,9 @@ export class WebsocketService { const compressedSize = data.byteLength; const decompressedBuffer: Uint8Array = decompress(new Uint8Array(data)); console.debug( - `Recieved ${compressedSize / 1024} KB (${decompressedBuffer.byteLength / - 1024} KB uncompressed), ratio ${decompressedBuffer.byteLength / compressedSize}` + `Recieved ${compressedSize / 1024} KB (${ + decompressedBuffer.byteLength / 1024 + } KB uncompressed), ratio ${decompressedBuffer.byteLength / compressedSize}` ); data = this.arrayBufferToString(decompressedBuffer); } diff --git a/client/src/app/core/core.module.ts b/client/src/app/core/core.module.ts index 8721fb1ce..4e9051fa5 100644 --- a/client/src/app/core/core.module.ts +++ b/client/src/app/core/core.module.ts @@ -2,11 +2,8 @@ import { CommonModule } from '@angular/common'; import { NgModule, Optional, SkipSelf, Type } from '@angular/core'; import { Title } from '@angular/platform-browser'; -import { ProjectionDialogComponent } from 'app/shared/components/projection-dialog/projection-dialog.component'; -import { ChoiceDialogComponent } from '../shared/components/choice-dialog/choice-dialog.component'; import { OnAfterAppsLoaded } from './definitions/on-after-apps-loaded'; import { OperatorService } from './core-services/operator.service'; -import { PromptDialogComponent } from '../shared/components/prompt-dialog/prompt-dialog.component'; export const ServicesToLoadOnAppsLoaded: Type[] = [OperatorService]; @@ -15,8 +12,7 @@ export const ServicesToLoadOnAppsLoaded: Type[] = [OperatorSe */ @NgModule({ imports: [CommonModule], - providers: [Title], - entryComponents: [PromptDialogComponent, ChoiceDialogComponent, ProjectionDialogComponent] + providers: [Title] }) export class CoreModule { /** make sure CoreModule is imported only by one NgModule, the AppModule */ diff --git a/client/src/app/core/pdf-services/html-to-pdf.service.ts b/client/src/app/core/pdf-services/html-to-pdf.service.ts index 7a5173a85..f0ad7a537 100644 --- a/client/src/app/core/pdf-services/html-to-pdf.service.ts +++ b/client/src/app/core/pdf-services/html-to-pdf.service.ts @@ -618,10 +618,7 @@ export class HtmlToPdfService { const styleObject: any = {}; if (styles && styles.length > 0) { for (const style of styles) { - const styleDefinition = style - .trim() - .toLowerCase() - .split(':'); + const styleDefinition = style.trim().toLowerCase().split(':'); const key = styleDefinition[0]; const value = styleDefinition[1]; diff --git a/client/src/app/core/pdf-services/pdf-document.service.ts b/client/src/app/core/pdf-services/pdf-document.service.ts index a36a5980e..494d033bc 100644 --- a/client/src/app/core/pdf-services/pdf-document.service.ts +++ b/client/src/app/core/pdf-services/pdf-document.service.ts @@ -1,6 +1,6 @@ import { HttpHeaders } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { TranslateService } from '@ngx-translate/core'; import { saveAs } from 'file-saver'; diff --git a/client/src/app/core/repositories/assignments/assignment-option-repository.service.spec.ts b/client/src/app/core/repositories/assignments/assignment-option-repository.service.spec.ts index 727666b3b..c0991b1d5 100644 --- a/client/src/app/core/repositories/assignments/assignment-option-repository.service.spec.ts +++ b/client/src/app/core/repositories/assignments/assignment-option-repository.service.spec.ts @@ -8,7 +8,7 @@ describe('AssignmentOptionRepositoryService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [E2EImportsModule] })); it('should be created', () => { - const service: AssignmentOptionRepositoryService = TestBed.get(AssignmentOptionRepositoryService); + const service: AssignmentOptionRepositoryService = TestBed.inject(AssignmentOptionRepositoryService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/repositories/assignments/assignment-poll-repository.service.spec.ts b/client/src/app/core/repositories/assignments/assignment-poll-repository.service.spec.ts index 7173774f4..fa5485302 100644 --- a/client/src/app/core/repositories/assignments/assignment-poll-repository.service.spec.ts +++ b/client/src/app/core/repositories/assignments/assignment-poll-repository.service.spec.ts @@ -8,7 +8,7 @@ describe('AssignmentPollRepositoryService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [E2EImportsModule] })); it('should be created', () => { - const service: AssignmentPollRepositoryService = TestBed.get(AssignmentPollRepositoryService); + const service: AssignmentPollRepositoryService = TestBed.inject(AssignmentPollRepositoryService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/repositories/assignments/assignment-repository.service.spec.ts b/client/src/app/core/repositories/assignments/assignment-repository.service.spec.ts index b5aff88a3..a8c451746 100644 --- a/client/src/app/core/repositories/assignments/assignment-repository.service.spec.ts +++ b/client/src/app/core/repositories/assignments/assignment-repository.service.spec.ts @@ -8,7 +8,7 @@ describe('AssignmentRepositoryService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [E2EImportsModule] })); it('should be created', () => { - const service: AssignmentRepositoryService = TestBed.get(AssignmentRepositoryService); + const service: AssignmentRepositoryService = TestBed.inject(AssignmentRepositoryService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/repositories/assignments/assignment-vote-repository.service.spec.ts b/client/src/app/core/repositories/assignments/assignment-vote-repository.service.spec.ts index 665e212ff..5e7cf1369 100644 --- a/client/src/app/core/repositories/assignments/assignment-vote-repository.service.spec.ts +++ b/client/src/app/core/repositories/assignments/assignment-vote-repository.service.spec.ts @@ -8,7 +8,7 @@ describe('AssignmentVoteRepositoryService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [E2EImportsModule] })); it('should be created', () => { - const service: AssignmentVoteRepositoryService = TestBed.get(AssignmentVoteRepositoryService); + const service: AssignmentVoteRepositoryService = TestBed.inject(AssignmentVoteRepositoryService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/repositories/mediafiles/mediafile-repository.service.spec.ts b/client/src/app/core/repositories/mediafiles/mediafile-repository.service.spec.ts index 3fccb824c..062c66312 100644 --- a/client/src/app/core/repositories/mediafiles/mediafile-repository.service.spec.ts +++ b/client/src/app/core/repositories/mediafiles/mediafile-repository.service.spec.ts @@ -8,7 +8,7 @@ describe('FileRepositoryService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [E2EImportsModule] })); it('should be created', () => { - const service: MediafileRepositoryService = TestBed.get(MediafileRepositoryService); + const service: MediafileRepositoryService = TestBed.inject(MediafileRepositoryService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/repositories/motions/motion-block-repository.service.spec.ts b/client/src/app/core/repositories/motions/motion-block-repository.service.spec.ts index a95db9da6..cc4e65335 100644 --- a/client/src/app/core/repositories/motions/motion-block-repository.service.spec.ts +++ b/client/src/app/core/repositories/motions/motion-block-repository.service.spec.ts @@ -12,7 +12,7 @@ describe('MotionBlockRepositoryService', () => { ); it('should be created', () => { - const service: MotionBlockRepositoryService = TestBed.get(MotionBlockRepositoryService); + const service: MotionBlockRepositoryService = TestBed.inject(MotionBlockRepositoryService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/repositories/motions/motion-option-repository.service.spec.ts b/client/src/app/core/repositories/motions/motion-option-repository.service.spec.ts index 84bea42fc..a71dda10f 100644 --- a/client/src/app/core/repositories/motions/motion-option-repository.service.spec.ts +++ b/client/src/app/core/repositories/motions/motion-option-repository.service.spec.ts @@ -8,7 +8,7 @@ describe('MotionOptionRepositoryService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [E2EImportsModule] })); it('should be created', () => { - const service: MotionOptionRepositoryService = TestBed.get(MotionOptionRepositoryService); + const service: MotionOptionRepositoryService = TestBed.inject(MotionOptionRepositoryService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/repositories/motions/motion-poll-repository.service.spec.ts b/client/src/app/core/repositories/motions/motion-poll-repository.service.spec.ts index 95c88a660..84a45986d 100644 --- a/client/src/app/core/repositories/motions/motion-poll-repository.service.spec.ts +++ b/client/src/app/core/repositories/motions/motion-poll-repository.service.spec.ts @@ -8,7 +8,7 @@ describe('MotionPollRepositoryService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [E2EImportsModule] })); it('should be created', () => { - const service: MotionPollRepositoryService = TestBed.get(MotionPollRepositoryService); + const service: MotionPollRepositoryService = TestBed.inject(MotionPollRepositoryService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/repositories/motions/motion-vote-repository.service.spec.ts b/client/src/app/core/repositories/motions/motion-vote-repository.service.spec.ts index 24617ab6a..b9ab4de0a 100644 --- a/client/src/app/core/repositories/motions/motion-vote-repository.service.spec.ts +++ b/client/src/app/core/repositories/motions/motion-vote-repository.service.spec.ts @@ -8,7 +8,7 @@ describe('MotionVoteRepositoryService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [E2EImportsModule] })); it('should be created', () => { - const service: MotionVoteRepositoryService = TestBed.get(MotionVoteRepositoryService); + const service: MotionVoteRepositoryService = TestBed.inject(MotionVoteRepositoryService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/repositories/tags/tag-repository.service.spec.ts b/client/src/app/core/repositories/tags/tag-repository.service.spec.ts index f2f5c466c..64fd732ca 100644 --- a/client/src/app/core/repositories/tags/tag-repository.service.spec.ts +++ b/client/src/app/core/repositories/tags/tag-repository.service.spec.ts @@ -12,7 +12,7 @@ describe('TagRepositoryService', () => { }); it('should be created', () => { - const service = TestBed.get(TagRepositoryService); + const service = TestBed.inject(TagRepositoryService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/repositories/topics/topic-repository.service.spec.ts b/client/src/app/core/repositories/topics/topic-repository.service.spec.ts index afa05f043..38b9e378f 100644 --- a/client/src/app/core/repositories/topics/topic-repository.service.spec.ts +++ b/client/src/app/core/repositories/topics/topic-repository.service.spec.ts @@ -11,7 +11,7 @@ describe('TopicRepositoryService', () => { ); it('should be created', () => { - const service: TopicRepositoryService = TestBed.get(TopicRepositoryService); + const service: TopicRepositoryService = TestBed.inject(TopicRepositoryService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/translate/openslides-translate-module.ts b/client/src/app/core/translate/openslides-translate-module.ts index 9d9d85d73..4269d7e74 100644 --- a/client/src/app/core/translate/openslides-translate-module.ts +++ b/client/src/app/core/translate/openslides-translate-module.ts @@ -29,7 +29,7 @@ import { OpenSlidesTranslateService } from './translation-service'; exports: [TranslatePipe, TranslateDirective] }) export class OpenSlidesTranslateModule { - public static forRoot(): ModuleWithProviders { + public static forRoot(): ModuleWithProviders { return { ngModule: TranslateModule, providers: [ @@ -46,7 +46,7 @@ export class OpenSlidesTranslateModule { } // no config store for child. - public static forChild(): ModuleWithProviders { + public static forChild(): ModuleWithProviders { return { ngModule: TranslateModule, providers: [ diff --git a/client/src/app/core/translate/translation-service.ts b/client/src/app/core/translate/translation-service.ts index adb76b5fe..e1854c201 100644 --- a/client/src/app/core/translate/translation-service.ts +++ b/client/src/app/core/translate/translation-service.ts @@ -39,7 +39,7 @@ export class OpenSlidesTranslateService extends TranslateService { @Inject(USE_DEFAULT_LANG) useDefaultLang: boolean = true, @Inject(USE_STORE) isolate: boolean = false ) { - super(store, currentLoader, compiler, parser, missingTranslationHandler, useDefaultLang, isolate); + super(store, currentLoader, compiler, parser, missingTranslationHandler, useDefaultLang, isolate, true, 'en'); } /** diff --git a/client/src/app/core/ui-services/banner.service.spec.ts b/client/src/app/core/ui-services/banner.service.spec.ts index 7f7d378a3..188cf5449 100644 --- a/client/src/app/core/ui-services/banner.service.spec.ts +++ b/client/src/app/core/ui-services/banner.service.spec.ts @@ -6,7 +6,7 @@ describe('BannerService', () => { beforeEach(() => TestBed.configureTestingModule({})); it('should be created', () => { - const service: BannerService = TestBed.get(BannerService); + const service: BannerService = TestBed.inject(BannerService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/ui-services/base-poll-dialog.service.ts b/client/src/app/core/ui-services/base-poll-dialog.service.ts index 902c01d1f..0e9391c40 100644 --- a/client/src/app/core/ui-services/base-poll-dialog.service.ts +++ b/client/src/app/core/ui-services/base-poll-dialog.service.ts @@ -1,6 +1,6 @@ import { ComponentType } from '@angular/cdk/portal'; import { Injectable } from '@angular/core'; -import { MatDialog } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; import { CollectionStringMapperService } from 'app/core/core-services/collection-string-mapper.service'; import { Collection } from 'app/shared/models/base/collection'; diff --git a/client/src/app/core/ui-services/base-sort.service.spec.ts b/client/src/app/core/ui-services/base-sort.service.spec.ts index 2c508dc11..85e317019 100644 --- a/client/src/app/core/ui-services/base-sort.service.spec.ts +++ b/client/src/app/core/ui-services/base-sort.service.spec.ts @@ -13,7 +13,7 @@ describe('BaseSortService', () => { // TODO testing (does not work without injecting a BaseViewComponent) // it('should be created', () => { - // const service: BaseSortService = TestBed.get(BaseSortService); + // const service: BaseSortService = TestBed.inject(BaseSortService); // expect(service).toBeTruthy(); // }); }); diff --git a/client/src/app/core/ui-services/choice.service.spec.ts b/client/src/app/core/ui-services/choice.service.spec.ts index b071e6fca..ad76f3e17 100644 --- a/client/src/app/core/ui-services/choice.service.spec.ts +++ b/client/src/app/core/ui-services/choice.service.spec.ts @@ -13,7 +13,7 @@ describe('ChoiceService', () => { }); it('should be created', () => { - const service: ChoiceService = TestBed.get(ChoiceService); + const service: ChoiceService = TestBed.inject(ChoiceService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/ui-services/diff.service.ts b/client/src/app/core/ui-services/diff.service.ts index 541d798c5..e721a4c16 100644 --- a/client/src/app/core/ui-services/diff.service.ts +++ b/client/src/app/core/ui-services/diff.service.ts @@ -885,10 +885,7 @@ export class DiffService { } } - return str - .replace(/^\s+/g, '') - .replace(/\s+$/g, '') - .replace(/ {2,}/g, ' '); + return str.replace(/^\s+/g, '').replace(/\s+$/g, '').replace(/ {2,}/g, ' '); } /** @@ -1000,14 +997,7 @@ export class DiffService { classes = childElement.getAttribute('class').split(' '); } classes.push(className); - childElement.setAttribute( - 'class', - classes - .sort() - .join(' ') - .replace(/^\s+/, '') - .replace(/\s+$/, '') - ); + childElement.setAttribute('class', classes.sort().join(' ').replace(/^\s+/, '').replace(/\s+$/, '')); foundLast = true; } } @@ -1150,10 +1140,7 @@ export class DiffService { let html = this.serializeTag(node); for (let i = 0; i < node.childNodes.length; i++) { if (node.childNodes[i].nodeType === TEXT_NODE) { - html += node.childNodes[i].nodeValue - .replace(/&/g, '&') - .replace(//g, '>'); + html += node.childNodes[i].nodeValue.replace(/&/g, '&').replace(//g, '>'); } else if ( !stripLineNumbers || (!this.lineNumberingService.isOsLineNumberNode(node.childNodes[i]) && @@ -1867,10 +1854,7 @@ export class DiffService { // Performing the actual diff const str = this.diffString(workaroundPrepend + htmlOld, workaroundPrepend + htmlNew); - let diffUnnormalized = str - .replace(/^\s+/g, '') - .replace(/\s+$/g, '') - .replace(/ {2,}/g, ' '); + let diffUnnormalized = str.replace(/^\s+/g, '').replace(/\s+$/g, '').replace(/ {2,}/g, ' '); diffUnnormalized = this.fixWrongChangeDetection(diffUnnormalized); diff --git a/client/src/app/core/ui-services/overlay.service.spec.ts b/client/src/app/core/ui-services/overlay.service.spec.ts index c7653c4f7..bbffb1a2f 100644 --- a/client/src/app/core/ui-services/overlay.service.spec.ts +++ b/client/src/app/core/ui-services/overlay.service.spec.ts @@ -12,7 +12,7 @@ describe('OverlayService', () => { ); it('should be created', () => { - const service: OverlayService = TestBed.get(OverlayService); + const service: OverlayService = TestBed.inject(OverlayService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/ui-services/overlay.service.ts b/client/src/app/core/ui-services/overlay.service.ts index de84dde06..dea05232a 100644 --- a/client/src/app/core/ui-services/overlay.service.ts +++ b/client/src/app/core/ui-services/overlay.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { MatDialog, MatDialogRef } from '@angular/material'; +import { MatDialog, MatDialogRef } from '@angular/material/dialog'; import { Observable, Subject } from 'rxjs'; import { distinctUntilChanged } from 'rxjs/operators'; diff --git a/client/src/app/core/ui-services/progress.service.spec.ts b/client/src/app/core/ui-services/progress.service.spec.ts index 624832a2f..e17685269 100644 --- a/client/src/app/core/ui-services/progress.service.spec.ts +++ b/client/src/app/core/ui-services/progress.service.spec.ts @@ -6,7 +6,7 @@ describe('ProgressService', () => { beforeEach(() => TestBed.configureTestingModule({})); it('should be created', () => { - const service: ProgressService = TestBed.get(ProgressService); + const service: ProgressService = TestBed.inject(ProgressService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/ui-services/tree-sort.service.spec.ts b/client/src/app/core/ui-services/tree-sort.service.spec.ts index f2830f515..6f725a94f 100644 --- a/client/src/app/core/ui-services/tree-sort.service.spec.ts +++ b/client/src/app/core/ui-services/tree-sort.service.spec.ts @@ -13,7 +13,7 @@ describe('TreeSortService', () => { // TODO testing (does not work without injecting a BaseViewComponent) // it('should be created', () => { - // const service: TreeSortService = TestBed.get(TreeSortService); + // const service: TreeSortService = TestBed.inject(TreeSortService); // expect(service).toBeTruthy(); // }); }); diff --git a/client/src/app/core/ui-services/voting-banner.service.spec.ts b/client/src/app/core/ui-services/voting-banner.service.spec.ts index 7040f7abb..b19e41185 100644 --- a/client/src/app/core/ui-services/voting-banner.service.spec.ts +++ b/client/src/app/core/ui-services/voting-banner.service.spec.ts @@ -12,7 +12,7 @@ describe('VotingBannerService', () => { ); it('should be created', () => { - const service: VotingBannerService = TestBed.get(VotingBannerService); + const service: VotingBannerService = TestBed.inject(VotingBannerService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/core/ui-services/voting.service.spec.ts b/client/src/app/core/ui-services/voting.service.spec.ts index 6dab02c52..99b1b0681 100644 --- a/client/src/app/core/ui-services/voting.service.spec.ts +++ b/client/src/app/core/ui-services/voting.service.spec.ts @@ -12,7 +12,7 @@ describe('VotingService', () => { ); it('should be created', () => { - const service: VotingService = TestBed.get(VotingService); + const service: VotingService = TestBed.inject(VotingService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/shared/components/agenda-content-object-form/agenda-content-object-form.component.spec.ts b/client/src/app/shared/components/agenda-content-object-form/agenda-content-object-form.component.spec.ts index 13e5aeaf6..209abc145 100644 --- a/client/src/app/shared/components/agenda-content-object-form/agenda-content-object-form.component.spec.ts +++ b/client/src/app/shared/components/agenda-content-object-form/agenda-content-object-form.component.spec.ts @@ -21,7 +21,7 @@ describe('AgendaContentObjectFormComponent', () => { }); it('should create', () => { - const formBuilder: FormBuilder = TestBed.get(FormBuilder); + const formBuilder: FormBuilder = TestBed.inject(FormBuilder); component.form = formBuilder.group({ agenda_create: [''], agenda_parent_id: [], diff --git a/client/src/app/shared/components/attachment-control/attachment-control.component.ts b/client/src/app/shared/components/attachment-control/attachment-control.component.ts index 501807d2d..42a3c945a 100644 --- a/client/src/app/shared/components/attachment-control/attachment-control.component.ts +++ b/client/src/app/shared/components/attachment-control/attachment-control.component.ts @@ -11,7 +11,8 @@ import { TemplateRef } from '@angular/core'; import { FormBuilder, NgControl } from '@angular/forms'; -import { MatDialog, MatFormFieldControl } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; +import { MatFormFieldControl } from '@angular/material/form-field'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; diff --git a/client/src/app/shared/components/block-tile/block-tile.component.ts b/client/src/app/shared/components/block-tile/block-tile.component.ts index b20143967..ab3ea76c6 100644 --- a/client/src/app/shared/components/block-tile/block-tile.component.ts +++ b/client/src/app/shared/components/block-tile/block-tile.component.ts @@ -34,19 +34,19 @@ export class BlockTileComponent extends TileComponent implements AfterViewInit { /** * Reference to the content of the content part. */ - @ViewChild('contentNode', { static: false }) + @ViewChild('contentNode') public contentNode: ElementRef; /** * Reference to the block part, if it is a node. */ - @ViewChild('blockNode', { static: false }) + @ViewChild('blockNode') public blockNode: ElementRef; /** * Reference to the action buttons in the content part, if used. */ - @ViewChild('actionNode', { static: false }) + @ViewChild('actionNode') public actionNode: ElementRef; /** diff --git a/client/src/app/shared/components/charts/charts.component.ts b/client/src/app/shared/components/charts/charts.component.ts index 984e27a5e..0eeadea4f 100644 --- a/client/src/app/shared/components/charts/charts.component.ts +++ b/client/src/app/shared/components/charts/charts.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/shared/components/check-input/check-input.component.ts b/client/src/app/shared/components/check-input/check-input.component.ts index d72033256..5dae7300b 100644 --- a/client/src/app/shared/components/check-input/check-input.component.ts +++ b/client/src/app/shared/components/check-input/check-input.component.ts @@ -1,6 +1,6 @@ import { Component, forwardRef, Input, OnInit } from '@angular/core'; import { ControlValueAccessor, FormBuilder, FormControl, NG_VALUE_ACCESSOR } from '@angular/forms'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/shared/components/choice-dialog/choice-dialog.component.spec.ts b/client/src/app/shared/components/choice-dialog/choice-dialog.component.spec.ts index 43a7400f8..836d354f0 100644 --- a/client/src/app/shared/components/choice-dialog/choice-dialog.component.spec.ts +++ b/client/src/app/shared/components/choice-dialog/choice-dialog.component.spec.ts @@ -1,5 +1,5 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { E2EImportsModule } from 'e2e-imports.module'; diff --git a/client/src/app/shared/components/choice-dialog/choice-dialog.component.ts b/client/src/app/shared/components/choice-dialog/choice-dialog.component.ts index 6130a0fa2..e05289341 100644 --- a/client/src/app/shared/components/choice-dialog/choice-dialog.component.ts +++ b/client/src/app/shared/components/choice-dialog/choice-dialog.component.ts @@ -1,6 +1,6 @@ import { Component, Inject, ViewEncapsulation } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { Observable } from 'rxjs'; diff --git a/client/src/app/shared/components/copyright-sign/copyright-sign.component.ts b/client/src/app/shared/components/copyright-sign/copyright-sign.component.ts index 996262ec9..a1d52293d 100644 --- a/client/src/app/shared/components/copyright-sign/copyright-sign.component.ts +++ b/client/src/app/shared/components/copyright-sign/copyright-sign.component.ts @@ -576,9 +576,7 @@ export class C4DialogComponent implements OnInit, OnDestroy { @Component({ selector: 'os-copyright-sign', - template: ` - © - `, + template: ` © `, styles: [``] }) export class CopyrightSignComponent { diff --git a/client/src/app/shared/components/legal-notice-content/legal-notice-content.component.ts b/client/src/app/shared/components/legal-notice-content/legal-notice-content.component.ts index 2a1ec7673..463a16dac 100644 --- a/client/src/app/shared/components/legal-notice-content/legal-notice-content.component.ts +++ b/client/src/app/shared/components/legal-notice-content/legal-notice-content.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/shared/components/list-view-table/list-view-table.component.ts b/client/src/app/shared/components/list-view-table/list-view-table.component.ts index 9788a14b9..59524134a 100644 --- a/client/src/app/shared/components/list-view-table/list-view-table.component.ts +++ b/client/src/app/shared/components/list-view-table/list-view-table.component.ts @@ -93,7 +93,7 @@ export class ListViewTableComponent; /** diff --git a/client/src/app/shared/components/privacy-policy-content/privacy-policy-content.component.ts b/client/src/app/shared/components/privacy-policy-content/privacy-policy-content.component.ts index 1344f3390..a88092a16 100644 --- a/client/src/app/shared/components/privacy-policy-content/privacy-policy-content.component.ts +++ b/client/src/app/shared/components/privacy-policy-content/privacy-policy-content.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/shared/components/progress-snack-bar/progress-snack-bar.component.spec.ts b/client/src/app/shared/components/progress-snack-bar/progress-snack-bar.component.spec.ts index 1c062a391..6efe42476 100644 --- a/client/src/app/shared/components/progress-snack-bar/progress-snack-bar.component.spec.ts +++ b/client/src/app/shared/components/progress-snack-bar/progress-snack-bar.component.spec.ts @@ -1,5 +1,5 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { MatSnackBarRef } from '@angular/material'; +import { MatSnackBarRef } from '@angular/material/snack-bar'; import { E2EImportsModule } from 'e2e-imports.module'; diff --git a/client/src/app/shared/components/progress-snack-bar/progress-snack-bar.component.ts b/client/src/app/shared/components/progress-snack-bar/progress-snack-bar.component.ts index 1074fb377..302ee5b4e 100644 --- a/client/src/app/shared/components/progress-snack-bar/progress-snack-bar.component.ts +++ b/client/src/app/shared/components/progress-snack-bar/progress-snack-bar.component.ts @@ -6,7 +6,7 @@ import { OnInit, ViewEncapsulation } from '@angular/core'; -import { MatSnackBarRef } from '@angular/material'; +import { MatSnackBarRef } from '@angular/material/snack-bar'; import { Subscription } from 'rxjs'; import { distinctUntilChanged } from 'rxjs/operators'; diff --git a/client/src/app/shared/components/projection-dialog/projection-dialog.component.spec.ts b/client/src/app/shared/components/projection-dialog/projection-dialog.component.spec.ts index b252dd45e..d9b64a16c 100644 --- a/client/src/app/shared/components/projection-dialog/projection-dialog.component.spec.ts +++ b/client/src/app/shared/components/projection-dialog/projection-dialog.component.spec.ts @@ -1,5 +1,5 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { E2EImportsModule } from 'e2e-imports.module'; diff --git a/client/src/app/shared/components/projection-dialog/projection-dialog.component.ts b/client/src/app/shared/components/projection-dialog/projection-dialog.component.ts index e896f3286..32314e381 100644 --- a/client/src/app/shared/components/projection-dialog/projection-dialog.component.ts +++ b/client/src/app/shared/components/projection-dialog/projection-dialog.component.ts @@ -1,5 +1,5 @@ import { Component, Inject } from '@angular/core'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { DataStoreService } from 'app/core/core-services/data-store.service'; import { ProjectorService } from 'app/core/core-services/projector.service'; diff --git a/client/src/app/shared/components/projector/projector.component.ts b/client/src/app/shared/components/projector/projector.component.ts index 995e48e82..5329afe63 100644 --- a/client/src/app/shared/components/projector/projector.component.ts +++ b/client/src/app/shared/components/projector/projector.component.ts @@ -171,11 +171,7 @@ export class ProjectorComponent extends BaseComponent implements OnDestroy { ) { super(titleService, translate); - this.projectorClass = - 'projector-' + - Math.random() - .toString(36) - .substring(4); + this.projectorClass = 'projector-' + Math.random().toString(36).substring(4); this.elementRef.nativeElement.classList.add(this.projectorClass); this.styleElement = document.createElement('style'); this.styleElement.appendChild(document.createTextNode('')); // Hack for WebKit to trigger update diff --git a/client/src/app/shared/components/prompt-dialog/prompt-dialog.component.spec.ts b/client/src/app/shared/components/prompt-dialog/prompt-dialog.component.spec.ts index 060f5f0be..813081282 100644 --- a/client/src/app/shared/components/prompt-dialog/prompt-dialog.component.spec.ts +++ b/client/src/app/shared/components/prompt-dialog/prompt-dialog.component.spec.ts @@ -1,5 +1,5 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { E2EImportsModule } from 'e2e-imports.module'; diff --git a/client/src/app/shared/components/prompt-dialog/prompt-dialog.component.ts b/client/src/app/shared/components/prompt-dialog/prompt-dialog.component.ts index 91207bc32..e8c5e78b5 100644 --- a/client/src/app/shared/components/prompt-dialog/prompt-dialog.component.ts +++ b/client/src/app/shared/components/prompt-dialog/prompt-dialog.component.ts @@ -1,5 +1,5 @@ import { Component, Inject } from '@angular/core'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; interface PromptDialogData { title: string; diff --git a/client/src/app/shared/components/search-value-selector/search-value-selector.component.spec.ts b/client/src/app/shared/components/search-value-selector/search-value-selector.component.spec.ts index c242cf735..57788afe9 100644 --- a/client/src/app/shared/components/search-value-selector/search-value-selector.component.spec.ts +++ b/client/src/app/shared/components/search-value-selector/search-value-selector.component.spec.ts @@ -42,7 +42,7 @@ describe('SearchValueSelectorComponent', () => { const subject: BehaviorSubject = new BehaviorSubject(subjectList); hostComponent.searchValueSelectorComponent.inputListValues = subject; - const formBuilder: FormBuilder = TestBed.get(FormBuilder); + const formBuilder: FormBuilder = TestBed.inject(FormBuilder); const formControl = formBuilder.control([]); hostComponent.searchValueSelectorComponent.contentForm = formControl; diff --git a/client/src/app/shared/components/search-value-selector/search-value-selector.component.ts b/client/src/app/shared/components/search-value-selector/search-value-selector.component.ts index 23e19fe5b..1bfeb8895 100644 --- a/client/src/app/shared/components/search-value-selector/search-value-selector.component.ts +++ b/client/src/app/shared/components/search-value-selector/search-value-selector.component.ts @@ -10,7 +10,7 @@ import { ViewEncapsulation } from '@angular/core'; import { FormBuilder, FormControl, NgControl } from '@angular/forms'; -import { MatFormFieldControl } from '@angular/material'; +import { MatFormFieldControl } from '@angular/material/form-field'; import { TranslateService } from '@ngx-translate/core'; import { Observable } from 'rxjs'; @@ -139,22 +139,13 @@ export class SearchValueSelectorComponent extends BaseFormControlComponent { const idString = '' + item.id; - const foundId = - idString - .trim() - .toLowerCase() - .indexOf(searchValue) !== -1; + const foundId = idString.trim().toLowerCase().indexOf(searchValue) !== -1; if (foundId) { return true; } - return ( - item - .toString() - .toLowerCase() - .indexOf(searchValue) > -1 - ); + return item.toString().toLowerCase().indexOf(searchValue) > -1; }); } } diff --git a/client/src/app/shared/components/slide-container/slide-container.component.ts b/client/src/app/shared/components/slide-container/slide-container.component.ts index da565ca1f..0556c58e4 100644 --- a/client/src/app/shared/components/slide-container/slide-container.component.ts +++ b/client/src/app/shared/components/slide-container/slide-container.component.ts @@ -8,7 +8,7 @@ import { SlideData } from 'app/core/core-services/projector-data.service'; import { ProjectorElement } from 'app/shared/models/core/projector'; import { ViewProjector } from 'app/site/projector/models/view-projector'; import { isBaseScaleScrollSlideComponent } from 'app/slides/base-scale-scroll-slide-component'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; +import { BaseSlideComponentDirective } from 'app/slides/base-slide-component'; import { SlideManager } from 'app/slides/services/slide-manager.service'; function hasError(obj: object): obj is { error: string } { @@ -28,7 +28,7 @@ export class SlideContainerComponent extends BaseComponent { @ViewChild('slide', { read: ViewContainerRef, static: true }) private slide: ViewContainerRef; - private slideRef: ComponentRef>; + private slideRef: ComponentRef>; /** * A slide is autonomic, if it takes care of scaling and scrolling by itself. @@ -152,7 +152,7 @@ export class SlideContainerComponent extends BaseComponent { if (this.slideOptions.scrollable && !this.slideIsAutonomic) { let value = this.scroll; value *= -100; - if (this.projector.show_header_footer) { + if (this.projector && this.projector.show_header_footer) { value += 50; // Default offset for the header } this.slideStyle['margin-top'] = `${value}px`; diff --git a/client/src/app/shared/components/sort-filter-bar/sort-bottom-sheet/sort-bottom-sheet.component.ts b/client/src/app/shared/components/sort-filter-bar/sort-bottom-sheet/sort-bottom-sheet.component.ts index 8012dda34..5dfae9dc0 100644 --- a/client/src/app/shared/components/sort-filter-bar/sort-bottom-sheet/sort-bottom-sheet.component.ts +++ b/client/src/app/shared/components/sort-filter-bar/sort-bottom-sheet/sort-bottom-sheet.component.ts @@ -1,5 +1,5 @@ import { Component, Inject, OnInit } from '@angular/core'; -import { MAT_BOTTOM_SHEET_DATA, MatBottomSheetRef } from '@angular/material/bottom-sheet'; +import { MatBottomSheetRef, MAT_BOTTOM_SHEET_DATA } from '@angular/material/bottom-sheet'; import { BaseSortListService } from 'app/core/ui-services/base-sort-list.service'; import { BaseViewModel } from 'app/site/base/base-view-model'; diff --git a/client/src/app/shared/components/sort-filter-bar/sort-filter-bar.component.ts b/client/src/app/shared/components/sort-filter-bar/sort-filter-bar.component.ts index 828cd568f..1e2709509 100644 --- a/client/src/app/shared/components/sort-filter-bar/sort-filter-bar.component.ts +++ b/client/src/app/shared/components/sort-filter-bar/sort-filter-bar.component.ts @@ -89,7 +89,7 @@ export class SortFilterBarComponent { /** * The bottom sheet used to alter sorting in mobile view */ - @ViewChild('sortBottomSheet', { static: false }) + @ViewChild('sortBottomSheet') public sortBottomSheet: SortBottomSheetComponent; /** diff --git a/client/src/app/shared/components/user-menu/user-menu.component.ts b/client/src/app/shared/components/user-menu/user-menu.component.ts index 8a191626d..91df6c793 100644 --- a/client/src/app/shared/components/user-menu/user-menu.component.ts +++ b/client/src/app/shared/components/user-menu/user-menu.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, OnInit, Output } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { Router } from '@angular/router'; diff --git a/client/src/app/shared/date-adapter.ts b/client/src/app/shared/date-adapter.ts index 4404d48f4..2e9c4cf7e 100644 --- a/client/src/app/shared/date-adapter.ts +++ b/client/src/app/shared/date-adapter.ts @@ -1,10 +1,10 @@ import { Inject, Injectable, Optional } from '@angular/core'; -import { MAT_DATE_LOCALE } from '@angular/material'; import { - MAT_MOMENT_DATE_ADAPTER_OPTIONS, MatMomentDateAdapterOptions, + MAT_MOMENT_DATE_ADAPTER_OPTIONS, MomentDateAdapter } from '@angular/material-moment-adapter'; +import { MAT_DATE_LOCALE } from '@angular/material/core'; import { LangChangeEvent, TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/shared/models/base/base-form-control.ts b/client/src/app/shared/models/base/base-form-control.ts index 865dda574..67f1e93e4 100644 --- a/client/src/app/shared/models/base/base-form-control.ts +++ b/client/src/app/shared/models/base/base-form-control.ts @@ -2,7 +2,7 @@ import { FocusMonitor } from '@angular/cdk/a11y'; import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { ElementRef, HostBinding, Input, OnDestroy, Optional, Self } from '@angular/core'; import { ControlValueAccessor, FormBuilder, FormControl, FormGroup, NgControl } from '@angular/forms'; -import { MatFormFieldControl } from '@angular/material'; +import { MatFormFieldControl } from '@angular/material/form-field'; import { Subject, Subscription } from 'rxjs'; diff --git a/client/src/app/shared/shared.module.ts b/client/src/app/shared/shared.module.ts index e871fe84d..5dd09f6a6 100644 --- a/client/src/app/shared/shared.module.ts +++ b/client/src/app/shared/shared.module.ts @@ -16,7 +16,7 @@ import { MatDatepickerModule } from '@angular/material/datepicker'; import { MatDividerModule } from '@angular/material/divider'; import { MatIconModule } from '@angular/material/icon'; import { MatInputModule } from '@angular/material/input'; -import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatPaginatorModule, MatPaginator } from '@angular/material/paginator'; import { MatProgressBarModule } from '@angular/material/progress-bar'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatSidenavModule } from '@angular/material/sidenav'; @@ -116,7 +116,6 @@ import { CheckInputComponent } from './components/check-input/check-input.compon import { BannerComponent } from './components/banner/banner.component'; import { PollFormComponent } from 'app/site/polls/components/poll-form/poll-form.component'; import { MotionPollDialogComponent } from 'app/site/motions/modules/motion-poll/motion-poll-dialog/motion-poll-dialog.component'; -import { AssignmentPollDialogComponent } from 'app/site/assignments/components/assignment-poll-dialog/assignment-poll-dialog.component'; import { ParsePollNumberPipe } from './pipes/parse-poll-number.pipe'; import { ReversePipe } from './pipes/reverse.pipe'; import { PollKeyVerbosePipe } from './pipes/poll-key-verbose.pipe'; @@ -287,7 +286,6 @@ import { UserMenuComponent } from './components/user-menu/user-menu.component'; BannerComponent, PollFormComponent, MotionPollDialogComponent, - AssignmentPollDialogComponent, ParsePollNumberPipe, ReversePipe, PollKeyVerbosePipe, @@ -348,7 +346,6 @@ import { UserMenuComponent } from './components/user-menu/user-menu.component'; BannerComponent, PollFormComponent, MotionPollDialogComponent, - AssignmentPollDialogComponent, ParsePollNumberPipe, ReversePipe, PollKeyVerbosePipe, @@ -376,18 +373,6 @@ import { UserMenuComponent } from './components/user-menu/user-menu.component'; ReversePipe, PollKeyVerbosePipe, PollPercentBasePipe - ], - entryComponents: [ - SortBottomSheetComponent, - C4DialogComponent, - PromptDialogComponent, - ChoiceDialogComponent, - ProjectionDialogComponent, - ProgressSnackBarComponent, - SuperSearchComponent, - MotionPollDialogComponent, - AssignmentPollDialogComponent, - VotingPrivacyWarningComponent ] }) export class SharedModule {} diff --git a/client/src/app/site/agenda/agenda.module.ts b/client/src/app/site/agenda/agenda.module.ts index 7f46ef30f..edb05ed48 100644 --- a/client/src/app/site/agenda/agenda.module.ts +++ b/client/src/app/site/agenda/agenda.module.ts @@ -14,7 +14,6 @@ import { SharedModule } from '../../shared/shared.module'; */ @NgModule({ imports: [CommonModule, AgendaRoutingModule, SharedModule], - entryComponents: [ItemInfoDialogComponent], declarations: [ AgendaListComponent, ItemInfoDialogComponent, diff --git a/client/src/app/site/agenda/components/agenda-sort/agenda-sort.component.ts b/client/src/app/site/agenda/components/agenda-sort/agenda-sort.component.ts index c9cbcfcbf..3c4abb994 100644 --- a/client/src/app/site/agenda/components/agenda-sort/agenda-sort.component.ts +++ b/client/src/app/site/agenda/components/agenda-sort/agenda-sort.component.ts @@ -8,7 +8,7 @@ import { BehaviorSubject, Observable } from 'rxjs'; import { ItemRepositoryService } from 'app/core/repositories/agenda/item-repository.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; import { ItemVisibilityChoices } from 'app/shared/models/agenda/item'; -import { SortTreeFilterOption, SortTreeViewComponent } from 'app/site/base/sort-tree.component'; +import { SortTreeFilterOption, SortTreeViewComponentDirective } from 'app/site/base/sort-tree.component'; import { ViewItem } from '../../models/view-item'; /** @@ -19,7 +19,7 @@ import { ViewItem } from '../../models/view-item'; templateUrl: './agenda-sort.component.html', styleUrls: ['./agenda-sort.component.scss'] }) -export class AgendaSortComponent extends SortTreeViewComponent implements OnInit { +export class AgendaSortComponent extends SortTreeViewComponentDirective implements OnInit { /** * All agendaItems sorted by their weight {@link ViewItem.weight} */ diff --git a/client/src/app/site/agenda/components/item-info-dialog/item-info-dialog.component.spec.ts b/client/src/app/site/agenda/components/item-info-dialog/item-info-dialog.component.spec.ts index 725ce12e4..d77b7b236 100644 --- a/client/src/app/site/agenda/components/item-info-dialog/item-info-dialog.component.spec.ts +++ b/client/src/app/site/agenda/components/item-info-dialog/item-info-dialog.component.spec.ts @@ -1,5 +1,5 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { E2EImportsModule } from 'e2e-imports.module'; diff --git a/client/src/app/site/agenda/components/item-info-dialog/item-info-dialog.component.ts b/client/src/app/site/agenda/components/item-info-dialog/item-info-dialog.component.ts index 06490957a..5ad957de3 100644 --- a/client/src/app/site/agenda/components/item-info-dialog/item-info-dialog.component.ts +++ b/client/src/app/site/agenda/components/item-info-dialog/item-info-dialog.component.ts @@ -1,6 +1,6 @@ import { Component, Inject } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { DurationService } from 'app/core/ui-services/duration.service'; import { ItemVisibilityChoices } from 'app/shared/models/agenda/item'; diff --git a/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.ts b/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.ts index e03151b4e..8e5060395 100644 --- a/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.ts +++ b/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.ts @@ -34,7 +34,7 @@ import { SpeakerState, ViewSpeaker } from '../../models/view-speaker'; styleUrls: ['./list-of-speakers.component.scss'] }) export class ListOfSpeakersComponent extends BaseViewComponent implements OnInit { - @ViewChild(SortingListComponent, { static: false }) + @ViewChild(SortingListComponent) public listElement: SortingListComponent; /** diff --git a/client/src/app/site/agenda/services/agenda-pdf.service.spec.ts b/client/src/app/site/agenda/services/agenda-pdf.service.spec.ts index 280120059..362633c31 100644 --- a/client/src/app/site/agenda/services/agenda-pdf.service.spec.ts +++ b/client/src/app/site/agenda/services/agenda-pdf.service.spec.ts @@ -12,7 +12,7 @@ describe('AgendaPdfService', () => { ); it('should be created', () => { - const service: AgendaPdfService = TestBed.get(AgendaPdfService); + const service: AgendaPdfService = TestBed.inject(AgendaPdfService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/assignments/assignments.module.ts b/client/src/app/site/assignments/assignments.module.ts index ac6067455..97790913c 100644 --- a/client/src/app/site/assignments/assignments.module.ts +++ b/client/src/app/site/assignments/assignments.module.ts @@ -4,6 +4,7 @@ import { NgModule } from '@angular/core'; import { AssignmentDetailComponent } from './components/assignment-detail/assignment-detail.component'; import { AssignmentListComponent } from './components/assignment-list/assignment-list.component'; import { AssignmentPollDetailComponent } from './components/assignment-poll-detail/assignment-poll-detail.component'; +import { AssignmentPollDialogComponent } from './components/assignment-poll-dialog/assignment-poll-dialog.component'; import { AssignmentPollVoteComponent } from './components/assignment-poll-vote/assignment-poll-vote.component'; import { AssignmentPollComponent } from './components/assignment-poll/assignment-poll.component'; import { AssignmentsRoutingModule } from './assignments-routing.module'; @@ -17,7 +18,8 @@ import { SharedModule } from '../../shared/shared.module'; AssignmentListComponent, AssignmentPollComponent, AssignmentPollDetailComponent, - AssignmentPollVoteComponent + AssignmentPollVoteComponent, + AssignmentPollDialogComponent ] }) export class AssignmentsModule {} diff --git a/client/src/app/site/assignments/components/assignment-detail/assignment-detail.component.ts b/client/src/app/site/assignments/components/assignment-detail/assignment-detail.component.ts index dd431bd41..4ed9f1a10 100644 --- a/client/src/app/site/assignments/components/assignment-detail/assignment-detail.component.ts +++ b/client/src/app/site/assignments/components/assignment-detail/assignment-detail.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { ActivatedRoute, Router } from '@angular/router'; diff --git a/client/src/app/site/assignments/components/assignment-poll-detail/assignment-poll-detail.component.ts b/client/src/app/site/assignments/components/assignment-poll-detail/assignment-poll-detail.component.ts index e1d4d1c3a..1eccb316b 100644 --- a/client/src/app/site/assignments/components/assignment-poll-detail/assignment-poll-detail.component.ts +++ b/client/src/app/site/assignments/components/assignment-poll-detail/assignment-poll-detail.component.ts @@ -1,5 +1,5 @@ import { Component, ViewEncapsulation } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { ActivatedRoute, Router } from '@angular/router'; diff --git a/client/src/app/site/assignments/components/assignment-poll-dialog/assignment-poll-dialog.component.spec.ts b/client/src/app/site/assignments/components/assignment-poll-dialog/assignment-poll-dialog.component.spec.ts index 629636840..cac947bd0 100644 --- a/client/src/app/site/assignments/components/assignment-poll-dialog/assignment-poll-dialog.component.spec.ts +++ b/client/src/app/site/assignments/components/assignment-poll-dialog/assignment-poll-dialog.component.spec.ts @@ -1,5 +1,5 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { E2EImportsModule } from 'e2e-imports.module'; diff --git a/client/src/app/site/assignments/components/assignment-poll-dialog/assignment-poll-dialog.component.ts b/client/src/app/site/assignments/components/assignment-poll-dialog/assignment-poll-dialog.component.ts index ed798f0e8..4a49f55a2 100644 --- a/client/src/app/site/assignments/components/assignment-poll-dialog/assignment-poll-dialog.component.ts +++ b/client/src/app/site/assignments/components/assignment-poll-dialog/assignment-poll-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, Inject, OnInit, ViewChild } from '@angular/core'; import { FormBuilder, Validators } from '@angular/forms'; -import { MatSnackBar } from '@angular/material'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/assignments/components/assignment-poll-vote/assignment-poll-vote.component.ts b/client/src/app/site/assignments/components/assignment-poll-vote/assignment-poll-vote.component.ts index 3f4b0f918..35387487c 100644 --- a/client/src/app/site/assignments/components/assignment-poll-vote/assignment-poll-vote.component.ts +++ b/client/src/app/site/assignments/components/assignment-poll-vote/assignment-poll-vote.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/assignments/services/assignment-pdf-export.service.spec.ts b/client/src/app/site/assignments/services/assignment-pdf-export.service.spec.ts index 62588e8d5..9fdd706b0 100644 --- a/client/src/app/site/assignments/services/assignment-pdf-export.service.spec.ts +++ b/client/src/app/site/assignments/services/assignment-pdf-export.service.spec.ts @@ -12,7 +12,7 @@ describe('AssignmentPdfExportService', () => { ); it('should be created', () => { - const service: AssignmentPdfExportService = TestBed.get(AssignmentPdfExportService); + const service: AssignmentPdfExportService = TestBed.inject(AssignmentPdfExportService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/assignments/services/assignment-pdf.service.spec.ts b/client/src/app/site/assignments/services/assignment-pdf.service.spec.ts index 95de9866d..6c77f48ea 100644 --- a/client/src/app/site/assignments/services/assignment-pdf.service.spec.ts +++ b/client/src/app/site/assignments/services/assignment-pdf.service.spec.ts @@ -12,7 +12,7 @@ describe('AssignmentPdfService', () => { ); it('should be created', () => { - const service: AssignmentPdfService = TestBed.get(AssignmentPdfService); + const service: AssignmentPdfService = TestBed.inject(AssignmentPdfService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/assignments/services/assignment-poll-dialog.service.spec.ts b/client/src/app/site/assignments/services/assignment-poll-dialog.service.spec.ts index 4df85f9d2..a604cc132 100644 --- a/client/src/app/site/assignments/services/assignment-poll-dialog.service.spec.ts +++ b/client/src/app/site/assignments/services/assignment-poll-dialog.service.spec.ts @@ -12,7 +12,7 @@ describe('AssignmentPollDialogService', () => { ); it('should be created', () => { - const service: AssignmentPollDialogService = TestBed.get(AssignmentPollDialogService); + const service: AssignmentPollDialogService = TestBed.inject(AssignmentPollDialogService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/assignments/services/assignment-poll-dialog.service.ts b/client/src/app/site/assignments/services/assignment-poll-dialog.service.ts index 86f1a65da..d3fae5ccb 100644 --- a/client/src/app/site/assignments/services/assignment-poll-dialog.service.ts +++ b/client/src/app/site/assignments/services/assignment-poll-dialog.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { MatDialog } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; import { CollectionStringMapperService } from 'app/core/core-services/collection-string-mapper.service'; import { BasePollDialogService } from 'app/core/ui-services/base-poll-dialog.service'; diff --git a/client/src/app/site/assignments/services/assignment-poll-pdf.service.spec.ts b/client/src/app/site/assignments/services/assignment-poll-pdf.service.spec.ts index 002c49c60..4785f0d66 100644 --- a/client/src/app/site/assignments/services/assignment-poll-pdf.service.spec.ts +++ b/client/src/app/site/assignments/services/assignment-poll-pdf.service.spec.ts @@ -12,7 +12,7 @@ describe('MotionPdfService', () => { ); it('should be created', () => { - const service: AssignmentPollPdfService = TestBed.get(AssignmentPollPdfService); + const service: AssignmentPollPdfService = TestBed.inject(AssignmentPollPdfService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/assignments/services/assignment-poll.service.spec.ts b/client/src/app/site/assignments/services/assignment-poll.service.spec.ts index 7bfd1f954..c7600ed98 100644 --- a/client/src/app/site/assignments/services/assignment-poll.service.spec.ts +++ b/client/src/app/site/assignments/services/assignment-poll.service.spec.ts @@ -12,7 +12,7 @@ describe('AssignmentPollService', () => { ); it('should be created', () => { - const service: AssignmentPollService = TestBed.get(AssignmentPollService); + const service: AssignmentPollService = TestBed.inject(AssignmentPollService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/base/base-import-list.ts b/client/src/app/site/base/base-import-list.ts index 9318de142..d47f6aa94 100644 --- a/client/src/app/site/base/base-import-list.ts +++ b/client/src/app/site/base/base-import-list.ts @@ -1,4 +1,4 @@ -import { OnInit, ViewChild } from '@angular/core'; +import { Directive, OnInit, ViewChild } from '@angular/core'; import { MatSelectChange } from '@angular/material/select'; import { MatSnackBar } from '@angular/material/snack-bar'; import { MatTable, MatTableDataSource } from '@angular/material/table'; @@ -12,7 +12,9 @@ import { BaseModel } from 'app/shared/models/base/base-model'; import { getLongPreview, getShortPreview } from 'app/shared/utils/previewStrings'; import { BaseViewComponent } from './base-view'; -export abstract class BaseImportListComponent extends BaseViewComponent implements OnInit { +@Directive() +export abstract class BaseImportListComponentDirective extends BaseViewComponent + implements OnInit { /** * The data source for a table. Requires to be initialised with a BaseViewModel */ @@ -47,7 +49,7 @@ export abstract class BaseImportListComponent extends BaseV /** * The table itself */ - @ViewChild(MatTable, { static: false }) + @ViewChild(MatTable) protected table: MatTable>; /** diff --git a/client/src/app/site/base/sort-tree.component.ts b/client/src/app/site/base/sort-tree.component.ts index ad63627fb..428035f07 100644 --- a/client/src/app/site/base/sort-tree.component.ts +++ b/client/src/app/site/base/sort-tree.component.ts @@ -1,4 +1,4 @@ -import { EventEmitter, ViewChild } from '@angular/core'; +import { Directive, EventEmitter, ViewChild } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; @@ -21,7 +21,8 @@ export interface SortTreeFilterOption extends Identifiable { /** * Abstract Sort view for hierarchic item trees */ -export abstract class SortTreeViewComponent extends BaseViewComponent +@Directive() +export abstract class SortTreeViewComponentDirective extends BaseViewComponent implements CanComponentDeactivate { /** * Reference to the view child diff --git a/client/src/app/site/common/components/legal-notice/legal-notice.component.ts b/client/src/app/site/common/components/legal-notice/legal-notice.component.ts index 7bee4f8a8..6a0f96296 100644 --- a/client/src/app/site/common/components/legal-notice/legal-notice.component.ts +++ b/client/src/app/site/common/components/legal-notice/legal-notice.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/common/components/privacy-policy/privacy-policy.component.ts b/client/src/app/site/common/components/privacy-policy/privacy-policy.component.ts index 564065f06..4e4e1c557 100644 --- a/client/src/app/site/common/components/privacy-policy/privacy-policy.component.ts +++ b/client/src/app/site/common/components/privacy-policy/privacy-policy.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/common/components/start/start.component.ts b/client/src/app/site/common/components/start/start.component.ts index 499341305..4e4fd6ff8 100644 --- a/client/src/app/site/common/components/start/start.component.ts +++ b/client/src/app/site/common/components/start/start.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; // showcase diff --git a/client/src/app/site/common/components/super-search/super-search.component.ts b/client/src/app/site/common/components/super-search/super-search.component.ts index 23881c60e..63f99e1bc 100644 --- a/client/src/app/site/common/components/super-search/super-search.component.ts +++ b/client/src/app/site/common/components/super-search/super-search.component.ts @@ -1,6 +1,6 @@ import { Component, HostListener, Inject, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { Router } from '@angular/router'; import { auditTime, debounceTime } from 'rxjs/operators'; @@ -209,10 +209,7 @@ export class SuperSearchComponent implements OnInit { splittedQuery = query.split(':', 2); splittedQuery.push( // Get the second part of the query and split it into single words. - ...splittedQuery - .pop() - .trim() - .split(/\s/g) + ...splittedQuery.pop().trim().split(/\s/g) ); } else { splittedQuery = query.split(/\s/g); diff --git a/client/src/app/site/config/config.module.ts b/client/src/app/site/config/config.module.ts index cc0b83019..1f1d3bde4 100644 --- a/client/src/app/site/config/config.module.ts +++ b/client/src/app/site/config/config.module.ts @@ -10,7 +10,6 @@ import { SharedModule } from '../../shared/shared.module'; @NgModule({ imports: [CommonModule, ConfigRoutingModule, SharedModule], - declarations: [ConfigOverviewComponent, ConfigListComponent, ConfigFieldComponent, CustomTranslationComponent], - entryComponents: [CustomTranslationComponent] + declarations: [ConfigOverviewComponent, ConfigListComponent, ConfigFieldComponent, CustomTranslationComponent] }) export class ConfigModule {} diff --git a/client/src/app/site/history/components/history-list/history-list.component.ts b/client/src/app/site/history/components/history-list/history-list.component.ts index cf8a2742b..d60beff39 100644 --- a/client/src/app/site/history/components/history-list/history-list.component.ts +++ b/client/src/app/site/history/components/history-list/history-list.component.ts @@ -129,20 +129,11 @@ export class HistoryListComponent extends BaseViewComponent implements OnInit { return true; } - if ( - this.getElementInfo(history) && - this.getElementInfo(history) - .toLowerCase() - .indexOf(filter) >= 0 - ) { + if (this.getElementInfo(history) && this.getElementInfo(history).toLowerCase().indexOf(filter) >= 0) { return true; } - return ( - this.parseInformation(history) - .toLowerCase() - .indexOf(filter) >= 0 - ); + return this.parseInformation(history).toLowerCase().indexOf(filter) >= 0; }; // If an element id is given, validate it and update the view. diff --git a/client/src/app/site/login/components/login-mask/login-mask.component.ts b/client/src/app/site/login/components/login-mask/login-mask.component.ts index 8a70b87e3..bce23c094 100644 --- a/client/src/app/site/login/components/login-mask/login-mask.component.ts +++ b/client/src/app/site/login/components/login-mask/login-mask.component.ts @@ -1,6 +1,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { ActivatedRoute, Router } from '@angular/router'; diff --git a/client/src/app/site/login/components/reset-password-confirm/reset-password-confirm.component.spec.ts b/client/src/app/site/login/components/reset-password-confirm/reset-password-confirm.component.spec.ts index 6abc340be..e6cfa0d50 100644 --- a/client/src/app/site/login/components/reset-password-confirm/reset-password-confirm.component.spec.ts +++ b/client/src/app/site/login/components/reset-password-confirm/reset-password-confirm.component.spec.ts @@ -1,11 +1,11 @@ -import { async, ComponentFixture, fakeAsync, flush, flushMicrotasks, TestBed, tick } from '@angular/core/testing'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { MatSnackBar } from '@angular/material/snack-bar'; import { E2EImportsModule } from 'e2e-imports.module'; import { ResetPasswordConfirmComponent } from './reset-password-confirm.component'; -let matSnackBarSpy: jasmine.SpyObj; +let matSnackBarSpy: MatSnackBar; describe('ResetPasswordConfirmComponent', () => { let component: ResetPasswordConfirmComponent; @@ -18,28 +18,32 @@ describe('ResetPasswordConfirmComponent', () => { imports: [E2EImportsModule], providers: [{ provide: MatSnackBar, useValue: spy }] }).compileComponents(); - matSnackBarSpy = TestBed.get(MatSnackBar); + matSnackBarSpy = TestBed.inject(MatSnackBar); })); beforeEach(() => { fixture = TestBed.createComponent(ResetPasswordConfirmComponent); component = fixture.componentInstance; - // fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); - xit('should open a snackbar error', fakeAsync(() => { - // WTF? I do not kno what to do more, but the expect should run after the set timeout... - fixture.detectChanges(); - tick(); - fixture.detectChanges(); - flush(); - fixture.detectChanges(); - flushMicrotasks(); - fixture.detectChanges(); - expect(matSnackBarSpy.open.calls.count()).toBe(1, 'mat snack bar was opened'); - })); + /** + * TODO: + * TestBed.inject does not return a spy anmore, thus this seems to be deprecated. + */ + // xit('should open a snackbar error', fakeAsync(() => { + // // WTF? I do not kno what to do more, but the expect should run after the set timeout... + // fixture.detectChanges(); + // tick(); + // fixture.detectChanges(); + // flush(); + // fixture.detectChanges(); + // flushMicrotasks(); + // fixture.detectChanges(); + // // expect(matSnackBarSpy.open.calls.count()).toBe(1, 'mat snack bar was opened'); + // // expect(matSnackBarSpy.open. + // })); }); diff --git a/client/src/app/site/motions/modules/amendment-list/amendment-list.component.ts b/client/src/app/site/motions/modules/amendment-list/amendment-list.component.ts index 4aed14b20..3f7fdf6ad 100644 --- a/client/src/app/site/motions/modules/amendment-list/amendment-list.component.ts +++ b/client/src/app/site/motions/modules/amendment-list/amendment-list.component.ts @@ -1,5 +1,6 @@ import { ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation } from '@angular/core'; -import { MatDialog, MatSnackBar } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { ActivatedRoute, ParamMap } from '@angular/router'; diff --git a/client/src/app/site/motions/modules/call-list/call-list.component.ts b/client/src/app/site/motions/modules/call-list/call-list.component.ts index 07673f478..1acdfebd3 100644 --- a/client/src/app/site/motions/modules/call-list/call-list.component.ts +++ b/client/src/app/site/motions/modules/call-list/call-list.component.ts @@ -10,7 +10,7 @@ import { MotionRepositoryService } from 'app/core/repositories/motions/motion-re import { TagRepositoryService } from 'app/core/repositories/tags/tag-repository.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; import { FlatNode } from 'app/core/ui-services/tree.service'; -import { SortTreeFilterOption, SortTreeViewComponent } from 'app/site/base/sort-tree.component'; +import { SortTreeFilterOption, SortTreeViewComponentDirective } from 'app/site/base/sort-tree.component'; import { ViewMotion } from 'app/site/motions/models/view-motion'; import { MotionCsvExportService } from 'app/site/motions/services/motion-csv-export.service'; import { MotionPdfExportService } from 'app/site/motions/services/motion-pdf-export.service'; @@ -27,7 +27,7 @@ import { ViewTag } from 'app/site/tags/models/view-tag'; '../../../../shared/components/sort-filter-bar/sort-filter-bar.component.scss' ] }) -export class CallListComponent extends SortTreeViewComponent implements OnInit { +export class CallListComponent extends SortTreeViewComponentDirective implements OnInit { /** * All motions sorted first by weight, then by id. */ diff --git a/client/src/app/site/motions/modules/category/components/category-list/category-list.component.ts b/client/src/app/site/motions/modules/category/components/category-list/category-list.component.ts index 47b716435..b7b81ee2d 100644 --- a/client/src/app/site/motions/modules/category/components/category-list/category-list.component.ts +++ b/client/src/app/site/motions/modules/category/components/category-list/category-list.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MatDialog } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; diff --git a/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.ts b/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.ts index ef5c91c64..721b914f2 100644 --- a/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.ts +++ b/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MatDialog } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; diff --git a/client/src/app/site/motions/modules/motion-comment-section/components/motion-comment-section-list/motion-comment-section-list.component.ts b/client/src/app/site/motions/modules/motion-comment-section/components/motion-comment-section-list/motion-comment-section-list.component.ts index 410569703..7ac85fa03 100644 --- a/client/src/app/site/motions/modules/motion-comment-section/components/motion-comment-section-list/motion-comment-section-list.component.ts +++ b/client/src/app/site/motions/modules/motion-comment-section/components/motion-comment-section-list/motion-comment-section-list.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MatDialog } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; diff --git a/client/src/app/site/motions/modules/motion-comment-section/components/motion-comment-section-sort/motion-comment-section-sort.component.ts b/client/src/app/site/motions/modules/motion-comment-section/components/motion-comment-section-sort/motion-comment-section-sort.component.ts index 68c0fcb9d..6123453c3 100644 --- a/client/src/app/site/motions/modules/motion-comment-section/components/motion-comment-section-sort/motion-comment-section-sort.component.ts +++ b/client/src/app/site/motions/modules/motion-comment-section/components/motion-comment-section-sort/motion-comment-section-sort.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation-dialog/motion-change-recommendation-dialog.component.spec.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation-dialog/motion-change-recommendation-dialog.component.spec.ts index 32817ad8e..3c2ecfaa3 100644 --- a/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation-dialog/motion-change-recommendation-dialog.component.spec.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation-dialog/motion-change-recommendation-dialog.component.spec.ts @@ -1,5 +1,5 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { E2EImportsModule } from 'e2e-imports.module'; diff --git a/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation-dialog/motion-change-recommendation-dialog.component.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation-dialog/motion-change-recommendation-dialog.component.ts index d7d73cc41..9eb124fb4 100644 --- a/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation-dialog/motion-change-recommendation-dialog.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation-dialog/motion-change-recommendation-dialog.component.ts @@ -1,6 +1,6 @@ import { Component, Inject } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; diff --git a/client/src/app/site/motions/modules/motion-detail/components/motion-title-change-recommendation-dialog/motion-title-change-recommendation-dialog.component.spec.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-title-change-recommendation-dialog/motion-title-change-recommendation-dialog.component.spec.ts index 9dc5e427d..1ad9ee121 100644 --- a/client/src/app/site/motions/modules/motion-detail/components/motion-title-change-recommendation-dialog/motion-title-change-recommendation-dialog.component.spec.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-title-change-recommendation-dialog/motion-title-change-recommendation-dialog.component.spec.ts @@ -1,5 +1,5 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { E2EImportsModule } from 'e2e-imports.module'; diff --git a/client/src/app/site/motions/modules/motion-detail/components/motion-title-change-recommendation-dialog/motion-title-change-recommendation-dialog.component.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-title-change-recommendation-dialog/motion-title-change-recommendation-dialog.component.ts index 98738bb8f..7d1dbc564 100644 --- a/client/src/app/site/motions/modules/motion-detail/components/motion-title-change-recommendation-dialog/motion-title-change-recommendation-dialog.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-title-change-recommendation-dialog/motion-title-change-recommendation-dialog.component.ts @@ -1,6 +1,7 @@ import { Component, Inject, ViewEncapsulation } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MAT_DIALOG_DATA, MatDialogRef, MatSnackBar } from '@angular/material'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/motions/modules/motion-detail/components/personal-note/personal-note.component.ts b/client/src/app/site/motions/modules/motion-detail/components/personal-note/personal-note.component.ts index 93266123f..a0d003b87 100644 --- a/client/src/app/site/motions/modules/motion-detail/components/personal-note/personal-note.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/personal-note/personal-note.component.ts @@ -1,6 +1,6 @@ import { Component, Input } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/motions/modules/motion-detail/motion-detail.module.ts b/client/src/app/site/motions/modules/motion-detail/motion-detail.module.ts index 0fa440b9a..9ce2cac8c 100644 --- a/client/src/app/site/motions/modules/motion-detail/motion-detail.module.ts +++ b/client/src/app/site/motions/modules/motion-detail/motion-detail.module.ts @@ -26,13 +26,6 @@ import { PersonalNoteComponent } from './components/personal-note/personal-note. MotionDetailOriginalChangeRecommendationsComponent, MotionChangeRecommendationDialogComponent, MotionTitleChangeRecommendationDialogComponent - ], - entryComponents: [ - MotionCommentsComponent, - PersonalNoteComponent, - ManageSubmittersComponent, - MotionChangeRecommendationDialogComponent, - MotionTitleChangeRecommendationDialogComponent ] }) export class MotionDetailModule {} diff --git a/client/src/app/site/motions/modules/motion-import/motion-import-list.component.ts b/client/src/app/site/motions/modules/motion-import/motion-import-list.component.ts index 22164b495..137b9703e 100644 --- a/client/src/app/site/motions/modules/motion-import/motion-import-list.component.ts +++ b/client/src/app/site/motions/modules/motion-import/motion-import-list.component.ts @@ -5,7 +5,7 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; import { Motion } from 'app/shared/models/motions/motion'; -import { BaseImportListComponent } from 'app/site/base/base-import-list'; +import { BaseImportListComponentDirective } from 'app/site/base/base-import-list'; import { MotionCsvExportService } from 'app/site/motions/services/motion-csv-export.service'; import { MotionImportService } from 'app/site/motions/services/motion-import.service'; @@ -16,7 +16,7 @@ import { MotionImportService } from 'app/site/motions/services/motion-import.ser selector: 'os-motion-import-list', templateUrl: './motion-import-list.component.html' }) -export class MotionImportListComponent extends BaseImportListComponent { +export class MotionImportListComponent extends BaseImportListComponentDirective { /** * Fetach a list of the headers expected by the importer, and prepare them * to be translateable (upper case) diff --git a/client/src/app/site/motions/modules/motion-poll/motion-poll-detail/motion-poll-detail.component.ts b/client/src/app/site/motions/modules/motion-poll/motion-poll-detail/motion-poll-detail.component.ts index 408347d86..80ba969ca 100644 --- a/client/src/app/site/motions/modules/motion-poll/motion-poll-detail/motion-poll-detail.component.ts +++ b/client/src/app/site/motions/modules/motion-poll/motion-poll-detail/motion-poll-detail.component.ts @@ -1,5 +1,5 @@ import { Component, ViewEncapsulation } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { ActivatedRoute, Router } from '@angular/router'; diff --git a/client/src/app/site/motions/modules/motion-poll/motion-poll-dialog/motion-poll-dialog.component.spec.ts b/client/src/app/site/motions/modules/motion-poll/motion-poll-dialog/motion-poll-dialog.component.spec.ts index 0fb3ddb49..33b0f2493 100644 --- a/client/src/app/site/motions/modules/motion-poll/motion-poll-dialog/motion-poll-dialog.component.spec.ts +++ b/client/src/app/site/motions/modules/motion-poll/motion-poll-dialog/motion-poll-dialog.component.spec.ts @@ -1,5 +1,5 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { E2EImportsModule } from 'e2e-imports.module'; diff --git a/client/src/app/site/motions/modules/motion-poll/motion-poll-dialog/motion-poll-dialog.component.ts b/client/src/app/site/motions/modules/motion-poll/motion-poll-dialog/motion-poll-dialog.component.ts index f5eafc444..e12ff12e6 100644 --- a/client/src/app/site/motions/modules/motion-poll/motion-poll-dialog/motion-poll-dialog.component.ts +++ b/client/src/app/site/motions/modules/motion-poll/motion-poll-dialog/motion-poll-dialog.component.ts @@ -1,6 +1,7 @@ import { Component, Inject, OnInit, ViewChild } from '@angular/core'; import { FormBuilder, Validators } from '@angular/forms'; -import { MAT_DIALOG_DATA, MatDialogRef, MatSnackBar } from '@angular/material'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/motions/modules/motion-poll/motion-poll-vote/motion-poll-vote.component.ts b/client/src/app/site/motions/modules/motion-poll/motion-poll-vote/motion-poll-vote.component.ts index d8a839fff..99095e0c0 100644 --- a/client/src/app/site/motions/modules/motion-poll/motion-poll-vote/motion-poll-vote.component.ts +++ b/client/src/app/site/motions/modules/motion-poll/motion-poll-vote/motion-poll-vote.component.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/motions/modules/motion-poll/motion-poll/motion-poll.component.ts b/client/src/app/site/motions/modules/motion-poll/motion-poll/motion-poll.component.ts index e891239e8..40d6f3097 100644 --- a/client/src/app/site/motions/modules/motion-poll/motion-poll/motion-poll.component.ts +++ b/client/src/app/site/motions/modules/motion-poll/motion-poll/motion-poll.component.ts @@ -1,5 +1,6 @@ import { Component, Input } from '@angular/core'; -import { MatDialog, MatSnackBar } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/motions/modules/shared-motion/motion-export-dialog/motion-export-dialog.component.ts b/client/src/app/site/motions/modules/shared-motion/motion-export-dialog/motion-export-dialog.component.ts index cca2a1f99..f0e1d1ff9 100644 --- a/client/src/app/site/motions/modules/shared-motion/motion-export-dialog/motion-export-dialog.component.ts +++ b/client/src/app/site/motions/modules/shared-motion/motion-export-dialog/motion-export-dialog.component.ts @@ -96,7 +96,7 @@ export class MotionExportDialogComponent implements OnInit { /** * To deactivate the speakers button. */ - @ViewChild('speakersButton', { static: false }) + @ViewChild('speakersButton') public speakersButton: MatButtonToggle; /** diff --git a/client/src/app/site/motions/modules/shared-motion/motion-multiselect-actions/motion-multiselect-actions.component.ts b/client/src/app/site/motions/modules/shared-motion/motion-multiselect-actions/motion-multiselect-actions.component.ts index aed5c29d7..afe3a4c0c 100644 --- a/client/src/app/site/motions/modules/shared-motion/motion-multiselect-actions/motion-multiselect-actions.component.ts +++ b/client/src/app/site/motions/modules/shared-motion/motion-multiselect-actions/motion-multiselect-actions.component.ts @@ -1,5 +1,6 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { MatDialog, MatSnackBar } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/motions/modules/shared-motion/shared-motion.module.ts b/client/src/app/site/motions/modules/shared-motion/shared-motion.module.ts index b13ba9021..8f38467e7 100644 --- a/client/src/app/site/motions/modules/shared-motion/shared-motion.module.ts +++ b/client/src/app/site/motions/modules/shared-motion/shared-motion.module.ts @@ -8,7 +8,6 @@ import { MotionMultiselectActionsComponent } from './motion-multiselect-actions/ @NgModule({ imports: [CommonModule, SharedModule], exports: [MotionMultiselectActionsComponent], - declarations: [MotionExportDialogComponent, MotionMultiselectActionsComponent], - entryComponents: [MotionExportDialogComponent] + declarations: [MotionExportDialogComponent, MotionMultiselectActionsComponent] }) export class SharedMotionModule {} diff --git a/client/src/app/site/motions/modules/statute-paragraph/components/statute-import-list/statute-import-list.component.ts b/client/src/app/site/motions/modules/statute-paragraph/components/statute-import-list/statute-import-list.component.ts index 9215a4b4f..6bfcfdafd 100644 --- a/client/src/app/site/motions/modules/statute-paragraph/components/statute-import-list/statute-import-list.component.ts +++ b/client/src/app/site/motions/modules/statute-paragraph/components/statute-import-list/statute-import-list.component.ts @@ -5,7 +5,7 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; import { StatuteParagraph } from 'app/shared/models/motions/statute-paragraph'; -import { BaseImportListComponent } from 'app/site/base/base-import-list'; +import { BaseImportListComponentDirective } from 'app/site/base/base-import-list'; import { StatuteCsvExportService } from 'app/site/motions/services/statute-csv-export.service'; import { StatuteImportService } from 'app/site/motions/services/statute-import.service'; @@ -16,7 +16,7 @@ import { StatuteImportService } from 'app/site/motions/services/statute-import.s selector: 'os-statute-import-list', templateUrl: './statute-import-list.component.html' }) -export class StatuteImportListComponent extends BaseImportListComponent { +export class StatuteImportListComponent extends BaseImportListComponentDirective { /** * Constructor for list view bases * diff --git a/client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.ts b/client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.ts index f9af28da3..93d8f8655 100644 --- a/client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.ts +++ b/client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MatDialog } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; diff --git a/client/src/app/site/motions/services/amendment-filter-list.service.spec.ts b/client/src/app/site/motions/services/amendment-filter-list.service.spec.ts index 1e474286c..ff503f3c0 100644 --- a/client/src/app/site/motions/services/amendment-filter-list.service.spec.ts +++ b/client/src/app/site/motions/services/amendment-filter-list.service.spec.ts @@ -12,7 +12,7 @@ describe('AmendmentFilterService', () => { ); it('should be created', () => { - const service: AmendmentFilterListService = TestBed.get(AmendmentFilterListService); + const service: AmendmentFilterListService = TestBed.inject(AmendmentFilterListService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/motions/services/amendment-list-pdf.service.spec.ts b/client/src/app/site/motions/services/amendment-list-pdf.service.spec.ts index d7a546512..4acda886d 100644 --- a/client/src/app/site/motions/services/amendment-list-pdf.service.spec.ts +++ b/client/src/app/site/motions/services/amendment-list-pdf.service.spec.ts @@ -12,7 +12,7 @@ describe('AmendmentListPdfService', () => { ); it('should be created', () => { - const service: AmendmentListPdfService = TestBed.get(AmendmentListPdfService); + const service: AmendmentListPdfService = TestBed.inject(AmendmentListPdfService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/motions/services/amendment-sort-list.service.spec.ts b/client/src/app/site/motions/services/amendment-sort-list.service.spec.ts index d9d99f667..8b3aadca9 100644 --- a/client/src/app/site/motions/services/amendment-sort-list.service.spec.ts +++ b/client/src/app/site/motions/services/amendment-sort-list.service.spec.ts @@ -12,7 +12,7 @@ describe('AmendmentSortListService', () => { ); it('should be created', () => { - const service: AmendmentSortListService = TestBed.get(AmendmentSortListService); + const service: AmendmentSortListService = TestBed.inject(AmendmentSortListService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/motions/services/block-detail-filter-list.service.spec.ts b/client/src/app/site/motions/services/block-detail-filter-list.service.spec.ts index e42645689..cb6bc76aa 100644 --- a/client/src/app/site/motions/services/block-detail-filter-list.service.spec.ts +++ b/client/src/app/site/motions/services/block-detail-filter-list.service.spec.ts @@ -12,7 +12,7 @@ describe('BlockDetailFilterListService', () => { ); it('should be created', () => { - const service: BlockDetailFilterListService = TestBed.get(BlockDetailFilterListService); + const service: BlockDetailFilterListService = TestBed.inject(BlockDetailFilterListService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/motions/services/local-permissions.service.spec.ts b/client/src/app/site/motions/services/local-permissions.service.spec.ts index 3637d957d..d8647285c 100644 --- a/client/src/app/site/motions/services/local-permissions.service.spec.ts +++ b/client/src/app/site/motions/services/local-permissions.service.spec.ts @@ -7,7 +7,7 @@ describe('LocalPermissionsService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [E2EImportsModule] })); it('should be created', () => { - const service: LocalPermissionsService = TestBed.get(LocalPermissionsService); + const service: LocalPermissionsService = TestBed.inject(LocalPermissionsService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/motions/services/motion-block-sort.service.spec.ts b/client/src/app/site/motions/services/motion-block-sort.service.spec.ts index b3b6680c6..cc7ac9584 100644 --- a/client/src/app/site/motions/services/motion-block-sort.service.spec.ts +++ b/client/src/app/site/motions/services/motion-block-sort.service.spec.ts @@ -12,7 +12,7 @@ describe('MotionBlockSortService', () => { ); it('should be created', () => { - const service: MotionBlockSortService = TestBed.get(MotionBlockSortService); + const service: MotionBlockSortService = TestBed.inject(MotionBlockSortService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/motions/services/motion-export.service.spec.ts b/client/src/app/site/motions/services/motion-export.service.spec.ts index 06f74a7ac..377fd8302 100644 --- a/client/src/app/site/motions/services/motion-export.service.spec.ts +++ b/client/src/app/site/motions/services/motion-export.service.spec.ts @@ -12,7 +12,7 @@ describe('MotionExportService', () => { ); it('should be created', () => { - const service: MotionExportService = TestBed.get(MotionExportService); + const service: MotionExportService = TestBed.inject(MotionExportService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/motions/services/motion-pdf-catalog.service.spec.ts b/client/src/app/site/motions/services/motion-pdf-catalog.service.spec.ts index 044c7a00e..0a391d8ef 100644 --- a/client/src/app/site/motions/services/motion-pdf-catalog.service.spec.ts +++ b/client/src/app/site/motions/services/motion-pdf-catalog.service.spec.ts @@ -12,7 +12,7 @@ describe('MotionPdfCatalogService', () => { ); it('should be created', () => { - const service: MotionPdfCatalogService = TestBed.get(MotionPdfCatalogService); + const service: MotionPdfCatalogService = TestBed.inject(MotionPdfCatalogService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/motions/services/motion-pdf-export.service.spec.ts b/client/src/app/site/motions/services/motion-pdf-export.service.spec.ts index cf9501d6b..d61079c93 100644 --- a/client/src/app/site/motions/services/motion-pdf-export.service.spec.ts +++ b/client/src/app/site/motions/services/motion-pdf-export.service.spec.ts @@ -12,7 +12,7 @@ describe('MotionPdfExportService', () => { ); it('should be created', () => { - const service: MotionPdfExportService = TestBed.get(MotionPdfExportService); + const service: MotionPdfExportService = TestBed.inject(MotionPdfExportService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/motions/services/motion-pdf.service.spec.ts b/client/src/app/site/motions/services/motion-pdf.service.spec.ts index 2828011de..288792bb5 100644 --- a/client/src/app/site/motions/services/motion-pdf.service.spec.ts +++ b/client/src/app/site/motions/services/motion-pdf.service.spec.ts @@ -12,7 +12,7 @@ describe('MotionPdfService', () => { ); it('should be created', () => { - const service: MotionPdfService = TestBed.get(MotionPdfService); + const service: MotionPdfService = TestBed.inject(MotionPdfService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/motions/services/motion-poll-dialog.service.spec.ts b/client/src/app/site/motions/services/motion-poll-dialog.service.spec.ts index 3dc9f384f..7a9a86998 100644 --- a/client/src/app/site/motions/services/motion-poll-dialog.service.spec.ts +++ b/client/src/app/site/motions/services/motion-poll-dialog.service.spec.ts @@ -12,7 +12,7 @@ describe('MotionPollDialogService', () => { ); it('should be created', () => { - const service: MotionPollDialogService = TestBed.get(MotionPollDialogService); + const service: MotionPollDialogService = TestBed.inject(MotionPollDialogService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/motions/services/motion-poll-dialog.service.ts b/client/src/app/site/motions/services/motion-poll-dialog.service.ts index be5793528..7e12245bb 100644 --- a/client/src/app/site/motions/services/motion-poll-dialog.service.ts +++ b/client/src/app/site/motions/services/motion-poll-dialog.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { MatDialog } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; import { CollectionStringMapperService } from 'app/core/core-services/collection-string-mapper.service'; import { BasePollDialogService } from 'app/core/ui-services/base-poll-dialog.service'; diff --git a/client/src/app/site/motions/services/motion-poll-pdf.service.spec.ts b/client/src/app/site/motions/services/motion-poll-pdf.service.spec.ts index 5b9e4f6b0..f0367fa2d 100644 --- a/client/src/app/site/motions/services/motion-poll-pdf.service.spec.ts +++ b/client/src/app/site/motions/services/motion-poll-pdf.service.spec.ts @@ -12,7 +12,7 @@ describe('MotionPdfService', () => { ); it('should be created', () => { - const service: MotionPollPdfService = TestBed.get(MotionPollPdfService); + const service: MotionPollPdfService = TestBed.inject(MotionPollPdfService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/motions/services/motion-poll.service.spec.ts b/client/src/app/site/motions/services/motion-poll.service.spec.ts index afd571ad8..b4e6b24f6 100644 --- a/client/src/app/site/motions/services/motion-poll.service.spec.ts +++ b/client/src/app/site/motions/services/motion-poll.service.spec.ts @@ -9,7 +9,7 @@ describe('MotionPollService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [E2EImportsModule, RouterTestingModule] })); it('should be created', () => { - const service: MotionPollService = TestBed.get(MotionPollService); + const service: MotionPollService = TestBed.inject(MotionPollService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/motions/services/motion-xlsx-export.service.spec.ts b/client/src/app/site/motions/services/motion-xlsx-export.service.spec.ts index 7b3a728e1..fca564446 100644 --- a/client/src/app/site/motions/services/motion-xlsx-export.service.spec.ts +++ b/client/src/app/site/motions/services/motion-xlsx-export.service.spec.ts @@ -12,7 +12,7 @@ describe('MotionXlsxExportService', () => { ); it('should be created', () => { - const service: MotionXlsxExportService = TestBed.get(MotionXlsxExportService); + const service: MotionXlsxExportService = TestBed.inject(MotionXlsxExportService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/polls/components/base-poll-detail.component.ts b/client/src/app/site/polls/components/base-poll-detail.component.ts index 36e41fc5e..7215844a4 100644 --- a/client/src/app/site/polls/components/base-poll-detail.component.ts +++ b/client/src/app/site/polls/components/base-poll-detail.component.ts @@ -1,5 +1,5 @@ import { OnInit } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { ActivatedRoute } from '@angular/router'; diff --git a/client/src/app/site/polls/components/base-poll-dialog.component.ts b/client/src/app/site/polls/components/base-poll-dialog.component.ts index 29374c307..1c5a61683 100644 --- a/client/src/app/site/polls/components/base-poll-dialog.component.ts +++ b/client/src/app/site/polls/components/base-poll-dialog.component.ts @@ -1,6 +1,6 @@ import { FormGroup } from '@angular/forms'; -import { MatSnackBar } from '@angular/material'; import { MatDialogRef } from '@angular/material/dialog'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/polls/components/base-poll-vote.component.ts b/client/src/app/site/polls/components/base-poll-vote.component.ts index 7e2df88ac..95d8aa41f 100644 --- a/client/src/app/site/polls/components/base-poll-vote.component.ts +++ b/client/src/app/site/polls/components/base-poll-vote.component.ts @@ -1,5 +1,5 @@ import { Input } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/polls/components/poll-form/poll-form.component.ts b/client/src/app/site/polls/components/poll-form/poll-form.component.ts index 4d28d9377..d2984015b 100644 --- a/client/src/app/site/polls/components/poll-form/poll-form.component.ts +++ b/client/src/app/site/polls/components/poll-form/poll-form.component.ts @@ -1,6 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MatDialog, MatSnackBar } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/polls/components/poll-list/poll-list.component.ts b/client/src/app/site/polls/components/poll-list/poll-list.component.ts index 90bfe072c..33ea3dc45 100644 --- a/client/src/app/site/polls/components/poll-list/poll-list.component.ts +++ b/client/src/app/site/polls/components/poll-list/poll-list.component.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/polls/components/poll-progress/poll-progress.component.ts b/client/src/app/site/polls/components/poll-progress/poll-progress.component.ts index e5508d10e..8ecedb614 100644 --- a/client/src/app/site/polls/components/poll-progress/poll-progress.component.ts +++ b/client/src/app/site/polls/components/poll-progress/poll-progress.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/polls/services/poll-filter-list.service.spec.ts b/client/src/app/site/polls/services/poll-filter-list.service.spec.ts index 97eb5ca2a..55bfcdb43 100644 --- a/client/src/app/site/polls/services/poll-filter-list.service.spec.ts +++ b/client/src/app/site/polls/services/poll-filter-list.service.spec.ts @@ -12,7 +12,7 @@ describe('PollFilterListService', () => { ); it('should be created', () => { - const service: PollFilterListService = TestBed.get(PollFilterListService); + const service: PollFilterListService = TestBed.inject(PollFilterListService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/polls/services/poll-list-observable.service.spec.ts b/client/src/app/site/polls/services/poll-list-observable.service.spec.ts index cd6bc9c69..5b9b7a21b 100644 --- a/client/src/app/site/polls/services/poll-list-observable.service.spec.ts +++ b/client/src/app/site/polls/services/poll-list-observable.service.spec.ts @@ -12,7 +12,7 @@ describe('PollListObservableService', () => { ); it('should be created', () => { - const service: PollListObservableService = TestBed.get(PollListObservableService); + const service: PollListObservableService = TestBed.inject(PollListObservableService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/polls/services/poll.service.spec.ts b/client/src/app/site/polls/services/poll.service.spec.ts index a83ee6f8e..ce7f2c203 100644 --- a/client/src/app/site/polls/services/poll.service.spec.ts +++ b/client/src/app/site/polls/services/poll.service.spec.ts @@ -11,7 +11,7 @@ describe('PollService', () => { }); it('should be created', () => { - const service: PollService = TestBed.get(PollService); + const service: PollService = TestBed.inject(PollService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/projector/components/countdown-dialog/countdown-dialog.component.spec.ts b/client/src/app/site/projector/components/countdown-dialog/countdown-dialog.component.spec.ts index 083bdaad4..d2fa5a260 100644 --- a/client/src/app/site/projector/components/countdown-dialog/countdown-dialog.component.spec.ts +++ b/client/src/app/site/projector/components/countdown-dialog/countdown-dialog.component.spec.ts @@ -1,5 +1,5 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { E2EImportsModule } from 'e2e-imports.module'; diff --git a/client/src/app/site/projector/components/message-dialog/message-dialog.component.spec.ts b/client/src/app/site/projector/components/message-dialog/message-dialog.component.spec.ts index 2c7daefa7..15b835574 100644 --- a/client/src/app/site/projector/components/message-dialog/message-dialog.component.spec.ts +++ b/client/src/app/site/projector/components/message-dialog/message-dialog.component.spec.ts @@ -1,5 +1,5 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { E2EImportsModule } from 'e2e-imports.module'; diff --git a/client/src/app/site/projector/components/projector-edit-dialog/projector-edit-dialog.component.spec.ts b/client/src/app/site/projector/components/projector-edit-dialog/projector-edit-dialog.component.spec.ts index 4553c82e8..40e42399c 100644 --- a/client/src/app/site/projector/components/projector-edit-dialog/projector-edit-dialog.component.spec.ts +++ b/client/src/app/site/projector/components/projector-edit-dialog/projector-edit-dialog.component.spec.ts @@ -1,5 +1,5 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { E2EImportsModule } from 'e2e-imports.module'; diff --git a/client/src/app/site/projector/components/projector-edit-dialog/projector-edit-dialog.component.ts b/client/src/app/site/projector/components/projector-edit-dialog/projector-edit-dialog.component.ts index c1ff377e2..88030a774 100644 --- a/client/src/app/site/projector/components/projector-edit-dialog/projector-edit-dialog.component.ts +++ b/client/src/app/site/projector/components/projector-edit-dialog/projector-edit-dialog.component.ts @@ -8,7 +8,8 @@ import { ViewEncapsulation } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MAT_DIALOG_DATA, MatDialogRef, MatSnackBar } from '@angular/material'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; @@ -39,7 +40,7 @@ export class ProjectorEditDialogComponent extends BaseViewComponent implements O * import the projector as view child, to determine when to update * the preview. */ - @ViewChild('preview', { static: false }) + @ViewChild('preview') public preview: ProjectorComponent; /** diff --git a/client/src/app/site/projector/components/projector-list-entry/projector-list-entry.component.ts b/client/src/app/site/projector/components/projector-list-entry/projector-list-entry.component.ts index 59034528d..de1f27d79 100644 --- a/client/src/app/site/projector/components/projector-list-entry/projector-list-entry.component.ts +++ b/client/src/app/site/projector/components/projector-list-entry/projector-list-entry.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core'; -import { MatDialog } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; diff --git a/client/src/app/site/projector/components/projector-list/projector-list.component.ts b/client/src/app/site/projector/components/projector-list/projector-list.component.ts index 99718d932..2f8e5e179 100644 --- a/client/src/app/site/projector/components/projector-list/projector-list.component.ts +++ b/client/src/app/site/projector/components/projector-list/projector-list.component.ts @@ -9,7 +9,7 @@ import { ViewEncapsulation } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MatDialog } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; diff --git a/client/src/app/site/projector/projector.module.ts b/client/src/app/site/projector/projector.module.ts index edb2397ae..cf80f1e55 100644 --- a/client/src/app/site/projector/projector.module.ts +++ b/client/src/app/site/projector/projector.module.ts @@ -25,13 +25,6 @@ import { SharedModule } from '../../shared/shared.module'; MessageDialogComponent, PresentationControlComponent, ProjectorEditDialogComponent - ], - entryComponents: [ - CountdownDialogComponent, - MessageDialogComponent, - PresentationControlComponent, - ProjectorListEntryComponent, - ProjectorEditDialogComponent ] }) export class ProjectorModule {} diff --git a/client/src/app/site/tags/components/tag-list/tag-list.component.ts b/client/src/app/site/tags/components/tag-list/tag-list.component.ts index 5ac0d6c2d..bc07e5758 100644 --- a/client/src/app/site/tags/components/tag-list/tag-list.component.ts +++ b/client/src/app/site/tags/components/tag-list/tag-list.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MatDialog } from '@angular/material'; +import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Title } from '@angular/platform-browser'; diff --git a/client/src/app/site/topics/components/topic-import-list/topic-import-list.component.ts b/client/src/app/site/topics/components/topic-import-list/topic-import-list.component.ts index 00b2e8330..0c381c98f 100644 --- a/client/src/app/site/topics/components/topic-import-list/topic-import-list.component.ts +++ b/client/src/app/site/topics/components/topic-import-list/topic-import-list.component.ts @@ -8,7 +8,7 @@ import { TranslateService } from '@ngx-translate/core'; import { CsvExportService } from 'app/core/ui-services/csv-export.service'; import { DurationService } from 'app/core/ui-services/duration.service'; import { ItemVisibilityChoices } from 'app/shared/models/agenda/item'; -import { BaseImportListComponent } from 'app/site/base/base-import-list'; +import { BaseImportListComponentDirective } from 'app/site/base/base-import-list'; import { CreateTopic } from 'app/site/topics/models/create-topic'; import { TopicImportService } from '../../../topics/services/topic-import.service'; @@ -19,7 +19,7 @@ import { TopicImportService } from '../../../topics/services/topic-import.servic selector: 'os-topic-import-list', templateUrl: './topic-import-list.component.html' }) -export class TopicImportListComponent extends BaseImportListComponent { +export class TopicImportListComponent extends BaseImportListComponentDirective { /** * A form for text input */ diff --git a/client/src/app/site/topics/services/topic-import.service.spec.ts b/client/src/app/site/topics/services/topic-import.service.spec.ts index aa31de0aa..fcebfc60c 100644 --- a/client/src/app/site/topics/services/topic-import.service.spec.ts +++ b/client/src/app/site/topics/services/topic-import.service.spec.ts @@ -12,7 +12,7 @@ describe('TopicImportService', () => { ); it('should be created', () => { - const service: TopicImportService = TestBed.get(TopicImportService); + const service: TopicImportService = TestBed.inject(TopicImportService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/users/components/user-import/user-import-list.component.ts b/client/src/app/site/users/components/user-import/user-import-list.component.ts index 41ddd1368..488d2c065 100644 --- a/client/src/app/site/users/components/user-import/user-import-list.component.ts +++ b/client/src/app/site/users/components/user-import/user-import-list.component.ts @@ -8,7 +8,7 @@ import { TranslateService } from '@ngx-translate/core'; import { NewEntry } from 'app/core/ui-services/base-import.service'; import { CsvExportService } from 'app/core/ui-services/csv-export.service'; import { User } from 'app/shared/models/users/user'; -import { BaseImportListComponent } from 'app/site/base/base-import-list'; +import { BaseImportListComponentDirective } from 'app/site/base/base-import-list'; import { UserImportService } from '../../services/user-import.service'; /** @@ -18,7 +18,7 @@ import { UserImportService } from '../../services/user-import.service'; selector: 'os-user-import-list', templateUrl: './user-import-list.component.html' }) -export class UserImportListComponent extends BaseImportListComponent { +export class UserImportListComponent extends BaseImportListComponentDirective { public textAreaForm: FormGroup; /** diff --git a/client/src/app/site/users/services/user-import.service.spec.ts b/client/src/app/site/users/services/user-import.service.spec.ts index 6732e4489..730c31003 100644 --- a/client/src/app/site/users/services/user-import.service.spec.ts +++ b/client/src/app/site/users/services/user-import.service.spec.ts @@ -12,7 +12,7 @@ describe('UserImportService', () => { ); it('should be created', () => { - const service: UserImportService = TestBed.get(UserImportService); + const service: UserImportService = TestBed.inject(UserImportService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/users/services/user-pdf-export.service.spec.ts b/client/src/app/site/users/services/user-pdf-export.service.spec.ts index 4c6965b16..63a440e7f 100644 --- a/client/src/app/site/users/services/user-pdf-export.service.spec.ts +++ b/client/src/app/site/users/services/user-pdf-export.service.spec.ts @@ -12,7 +12,7 @@ describe('UserPdfExportService', () => { ); it('should be created', () => { - const service: UserPdfExportService = TestBed.get(UserPdfExportService); + const service: UserPdfExportService = TestBed.inject(UserPdfExportService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/site/users/services/user-pdf.service.spec.ts b/client/src/app/site/users/services/user-pdf.service.spec.ts index b24d83ced..285d9dae8 100644 --- a/client/src/app/site/users/services/user-pdf.service.spec.ts +++ b/client/src/app/site/users/services/user-pdf.service.spec.ts @@ -12,7 +12,7 @@ describe('UserPdfService', () => { ); it('should be created', () => { - const service: UserPdfService = TestBed.get(UserPdfService); + const service: UserPdfService = TestBed.inject(UserPdfService); expect(service).toBeTruthy(); }); }); diff --git a/client/src/app/slides/agenda/common/common-list-of-speakers-slide.component.ts b/client/src/app/slides/agenda/common/common-list-of-speakers-slide.component.ts index 4012863f2..21a4c2452 100644 --- a/client/src/app/slides/agenda/common/common-list-of-speakers-slide.component.ts +++ b/client/src/app/slides/agenda/common/common-list-of-speakers-slide.component.ts @@ -5,7 +5,7 @@ import { SlideData } from 'app/core/core-services/projector-data.service'; import { isBaseIsAgendaItemContentObjectRepository } from 'app/core/repositories/base-is-agenda-item-content-object-repository'; import { ConfigService } from 'app/core/ui-services/config.service'; import { ProjectorElement } from 'app/shared/models/core/projector'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; +import { BaseSlideComponentDirective } from 'app/slides/base-slide-component'; import { CommonListOfSpeakersSlideData } from './common-list-of-speakers-slide-data'; @Component({ @@ -13,7 +13,7 @@ import { CommonListOfSpeakersSlideData } from './common-list-of-speakers-slide-d templateUrl: './common-list-of-speakers-slide.component.html', styleUrls: ['./common-list-of-speakers-slide.component.scss'] }) -export class CommonListOfSpeakersSlideComponent extends BaseSlideComponent +export class CommonListOfSpeakersSlideComponent extends BaseSlideComponentDirective implements OnInit { @Input() public set data(value: SlideData) { diff --git a/client/src/app/slides/agenda/common/common-list-of-speakers-slide.module.ts b/client/src/app/slides/agenda/common/common-list-of-speakers-slide.module.ts index ab3e27605..dc40a9b86 100644 --- a/client/src/app/slides/agenda/common/common-list-of-speakers-slide.module.ts +++ b/client/src/app/slides/agenda/common/common-list-of-speakers-slide.module.ts @@ -6,7 +6,6 @@ import { CommonListOfSpeakersSlideComponent } from './common-list-of-speakers-sl @NgModule({ declarations: [CommonListOfSpeakersSlideComponent], - entryComponents: [CommonListOfSpeakersSlideComponent], imports: [CommonModule, SharedModule], exports: [CommonListOfSpeakersSlideComponent] }) diff --git a/client/src/app/slides/agenda/current-list-of-speakers-overlay/current-list-of-speakers-overlay-slide.component.ts b/client/src/app/slides/agenda/current-list-of-speakers-overlay/current-list-of-speakers-overlay-slide.component.ts index 13520a33f..56128519c 100644 --- a/client/src/app/slides/agenda/current-list-of-speakers-overlay/current-list-of-speakers-overlay-slide.component.ts +++ b/client/src/app/slides/agenda/current-list-of-speakers-overlay/current-list-of-speakers-overlay-slide.component.ts @@ -1,6 +1,6 @@ import { Component, Input } from '@angular/core'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; +import { BaseSlideComponentDirective } from 'app/slides/base-slide-component'; import { CommonListOfSpeakersSlideData, SlideSpeaker } from '../common/common-list-of-speakers-slide-data'; @Component({ @@ -8,7 +8,9 @@ import { CommonListOfSpeakersSlideData, SlideSpeaker } from '../common/common-li templateUrl: './current-list-of-speakers-overlay-slide.component.html', styleUrls: ['./current-list-of-speakers-overlay-slide.component.scss'] }) -export class CurrentListOfSpeakersOverlaySlideComponent extends BaseSlideComponent { +export class CurrentListOfSpeakersOverlaySlideComponent extends BaseSlideComponentDirective< + CommonListOfSpeakersSlideData +> { /** * Gets the data. Sets necessary information for the list of speakers in the overlay. * diff --git a/client/src/app/slides/agenda/current-list-of-speakers-overlay/current-list-of-speakers-overlay-slide.module.ts b/client/src/app/slides/agenda/current-list-of-speakers-overlay/current-list-of-speakers-overlay-slide.module.ts index 90490e395..a6600680c 100644 --- a/client/src/app/slides/agenda/current-list-of-speakers-overlay/current-list-of-speakers-overlay-slide.module.ts +++ b/client/src/app/slides/agenda/current-list-of-speakers-overlay/current-list-of-speakers-overlay-slide.module.ts @@ -2,14 +2,13 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { SharedModule } from 'app/shared/shared.module'; -import { SLIDE } from 'app/slides/slide-token'; +import { SlideToken } from 'app/slides/slide-token'; import { CommonListOfSpeakersSlideModule } from '../common/common-list-of-speakers-slide.module'; import { CurrentListOfSpeakersOverlaySlideComponent } from './current-list-of-speakers-overlay-slide.component'; @NgModule({ imports: [CommonModule, SharedModule, CommonListOfSpeakersSlideModule], declarations: [CurrentListOfSpeakersOverlaySlideComponent], - providers: [{ provide: SLIDE, useValue: CurrentListOfSpeakersOverlaySlideComponent }], - entryComponents: [CurrentListOfSpeakersOverlaySlideComponent] + providers: [{ provide: SlideToken.token, useValue: CurrentListOfSpeakersOverlaySlideComponent }] }) export class CurrentListOfSpeakersOverlaySlideModule {} diff --git a/client/src/app/slides/agenda/current-list-of-speakers/current-list-of-speakers-slide.module.ts b/client/src/app/slides/agenda/current-list-of-speakers/current-list-of-speakers-slide.module.ts index 9c1808dce..984b7f9ff 100644 --- a/client/src/app/slides/agenda/current-list-of-speakers/current-list-of-speakers-slide.module.ts +++ b/client/src/app/slides/agenda/current-list-of-speakers/current-list-of-speakers-slide.module.ts @@ -4,10 +4,10 @@ import { NgModule } from '@angular/core'; import { SharedModule } from 'app/shared/shared.module'; import { CommonListOfSpeakersSlideComponent } from '../common/common-list-of-speakers-slide.component'; import { CommonListOfSpeakersSlideModule } from '../common/common-list-of-speakers-slide.module'; -import { SLIDE } from '../../slide-token'; +import { SlideToken } from '../../slide-token'; @NgModule({ imports: [CommonModule, SharedModule, CommonListOfSpeakersSlideModule], - providers: [{ provide: SLIDE, useValue: CommonListOfSpeakersSlideComponent }] + providers: [{ provide: SlideToken.token, useValue: CommonListOfSpeakersSlideComponent }] }) export class CurrentListOfSpeakersSlideModule {} diff --git a/client/src/app/slides/agenda/current-speaker-chyron/current-speaker-chyron-slide.component.ts b/client/src/app/slides/agenda/current-speaker-chyron/current-speaker-chyron-slide.component.ts index d43fd6929..17a65cc18 100644 --- a/client/src/app/slides/agenda/current-speaker-chyron/current-speaker-chyron-slide.component.ts +++ b/client/src/app/slides/agenda/current-speaker-chyron/current-speaker-chyron-slide.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; +import { BaseSlideComponentDirective } from 'app/slides/base-slide-component'; import { CurrentSpeakerChyronSlideData } from './current-speaker-chyron-slide-data'; @Component({ @@ -8,7 +8,7 @@ import { CurrentSpeakerChyronSlideData } from './current-speaker-chyron-slide-da templateUrl: './current-speaker-chyron-slide.component.html', styleUrls: ['./current-speaker-chyron-slide.component.scss'] }) -export class CurrentSpeakerChyronSlideComponent extends BaseSlideComponent { +export class CurrentSpeakerChyronSlideComponent extends BaseSlideComponentDirective { public constructor() { super(); } diff --git a/client/src/app/slides/agenda/current-speaker-chyron/current-speaker-chyron-slide.module.ts b/client/src/app/slides/agenda/current-speaker-chyron/current-speaker-chyron-slide.module.ts index 8c1bd0ece..ec49f49ff 100644 --- a/client/src/app/slides/agenda/current-speaker-chyron/current-speaker-chyron-slide.module.ts +++ b/client/src/app/slides/agenda/current-speaker-chyron/current-speaker-chyron-slide.module.ts @@ -1,7 +1,12 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { makeSlideModule } from 'app/slides/base-slide-module'; +import { SharedModule } from 'app/shared/shared.module'; +import { SlideToken } from 'app/slides/slide-token'; import { CurrentSpeakerChyronSlideComponent } from './current-speaker-chyron-slide.component'; - -@NgModule(makeSlideModule(CurrentSpeakerChyronSlideComponent)) +@NgModule({ + imports: [CommonModule, SharedModule], + declarations: [CurrentSpeakerChyronSlideComponent], + providers: [{ provide: SlideToken.token, useValue: CurrentSpeakerChyronSlideComponent }] +}) export class CurrentSpeakerChyronSlideModule {} diff --git a/client/src/app/slides/agenda/item-list/item-list-slide.component.ts b/client/src/app/slides/agenda/item-list/item-list-slide.component.ts index 5d040d732..6e568f59b 100644 --- a/client/src/app/slides/agenda/item-list/item-list-slide.component.ts +++ b/client/src/app/slides/agenda/item-list/item-list-slide.component.ts @@ -4,7 +4,7 @@ import { CollectionStringMapperService } from 'app/core/core-services/collection import { SlideData } from 'app/core/core-services/projector-data.service'; import { isBaseIsAgendaItemContentObjectRepository } from 'app/core/repositories/base-is-agenda-item-content-object-repository'; import { ProjectorElement } from 'app/shared/models/core/projector'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; +import { BaseSlideComponentDirective } from 'app/slides/base-slide-component'; import { ItemListSlideData, SlideItem } from './item-list-slide-data'; @Component({ @@ -12,7 +12,7 @@ import { ItemListSlideData, SlideItem } from './item-list-slide-data'; templateUrl: './item-list-slide.component.html', styleUrls: ['./item-list-slide.component.scss'] }) -export class ItemListSlideComponent extends BaseSlideComponent { +export class ItemListSlideComponent extends BaseSlideComponentDirective { @Input() public set data(value: SlideData) { value.data.items.forEach( diff --git a/client/src/app/slides/agenda/item-list/item-list-slide.module.ts b/client/src/app/slides/agenda/item-list/item-list-slide.module.ts index 5ec8fa840..5e7ca097e 100644 --- a/client/src/app/slides/agenda/item-list/item-list-slide.module.ts +++ b/client/src/app/slides/agenda/item-list/item-list-slide.module.ts @@ -1,7 +1,12 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { makeSlideModule } from 'app/slides/base-slide-module'; +import { SharedModule } from 'app/shared/shared.module'; +import { SlideToken } from 'app/slides/slide-token'; import { ItemListSlideComponent } from './item-list-slide.component'; - -@NgModule(makeSlideModule(ItemListSlideComponent)) +@NgModule({ + imports: [CommonModule, SharedModule], + declarations: [ItemListSlideComponent], + providers: [{ provide: SlideToken.token, useValue: ItemListSlideComponent }] +}) export class ItemListSlideModule {} diff --git a/client/src/app/slides/agenda/list-of-speakers/list-of-speakers-slide.module.ts b/client/src/app/slides/agenda/list-of-speakers/list-of-speakers-slide.module.ts index 6af299e9b..99f65be93 100644 --- a/client/src/app/slides/agenda/list-of-speakers/list-of-speakers-slide.module.ts +++ b/client/src/app/slides/agenda/list-of-speakers/list-of-speakers-slide.module.ts @@ -4,10 +4,10 @@ import { NgModule } from '@angular/core'; import { SharedModule } from 'app/shared/shared.module'; import { CommonListOfSpeakersSlideComponent } from '../common/common-list-of-speakers-slide.component'; import { CommonListOfSpeakersSlideModule } from '../common/common-list-of-speakers-slide.module'; -import { SLIDE } from '../../slide-token'; +import { SlideToken } from '../../slide-token'; @NgModule({ imports: [CommonModule, SharedModule, CommonListOfSpeakersSlideModule], - providers: [{ provide: SLIDE, useValue: CommonListOfSpeakersSlideComponent }] + providers: [{ provide: SlideToken.token, useValue: CommonListOfSpeakersSlideComponent }] }) export class ListOfSpeakersSlideModule {} diff --git a/client/src/app/slides/assignments/assignment-poll/assignment-poll-slide.module.ts b/client/src/app/slides/assignments/assignment-poll/assignment-poll-slide.module.ts index a31657771..37ae0dcff 100644 --- a/client/src/app/slides/assignments/assignment-poll/assignment-poll-slide.module.ts +++ b/client/src/app/slides/assignments/assignment-poll/assignment-poll-slide.module.ts @@ -1,7 +1,12 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { makeSlideModule } from 'app/slides/base-slide-module'; +import { SharedModule } from 'app/shared/shared.module'; +import { SlideToken } from 'app/slides/slide-token'; import { AssignmentPollSlideComponent } from './assignment-poll-slide.component'; - -@NgModule(makeSlideModule(AssignmentPollSlideComponent)) +@NgModule({ + imports: [CommonModule, SharedModule], + declarations: [AssignmentPollSlideComponent], + providers: [{ provide: SlideToken.token, useValue: AssignmentPollSlideComponent }] +}) export class AssignmentPollSlideModule {} diff --git a/client/src/app/slides/assignments/assignment/assignment-slide.component.ts b/client/src/app/slides/assignments/assignment/assignment-slide.component.ts index 73347d7a0..f8c73ddb2 100644 --- a/client/src/app/slides/assignments/assignment/assignment-slide.component.ts +++ b/client/src/app/slides/assignments/assignment/assignment-slide.component.ts @@ -1,7 +1,7 @@ import { Component, Input } from '@angular/core'; import { SlideData } from 'app/core/core-services/projector-data.service'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; +import { BaseSlideComponentDirective } from 'app/slides/base-slide-component'; import { AssignmentSlideData } from './assignment-slide-data'; @Component({ @@ -9,7 +9,7 @@ import { AssignmentSlideData } from './assignment-slide-data'; templateUrl: './assignment-slide.component.html', styleUrls: ['./assignment-slide.component.scss'] }) -export class AssignmentSlideComponent extends BaseSlideComponent { +export class AssignmentSlideComponent extends BaseSlideComponentDirective { // TODO: Remove the following block, if not needed. // This is just for debugging to get a console statement with all recieved // data from the server diff --git a/client/src/app/slides/assignments/assignment/assignment-slide.module.ts b/client/src/app/slides/assignments/assignment/assignment-slide.module.ts index 31960a6b0..1f3637da2 100644 --- a/client/src/app/slides/assignments/assignment/assignment-slide.module.ts +++ b/client/src/app/slides/assignments/assignment/assignment-slide.module.ts @@ -1,7 +1,12 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { makeSlideModule } from 'app/slides/base-slide-module'; +import { SharedModule } from 'app/shared/shared.module'; +import { SlideToken } from 'app/slides/slide-token'; import { AssignmentSlideComponent } from './assignment-slide.component'; - -@NgModule(makeSlideModule(AssignmentSlideComponent)) +@NgModule({ + imports: [CommonModule, SharedModule], + declarations: [AssignmentSlideComponent], + providers: [{ provide: SlideToken.token, useValue: AssignmentSlideComponent }] +}) export class AssignmentSlideModule {} diff --git a/client/src/app/slides/base-scale-scroll-slide-component.ts b/client/src/app/slides/base-scale-scroll-slide-component.ts index 2903c43ba..c71dbcf2f 100644 --- a/client/src/app/slides/base-scale-scroll-slide-component.ts +++ b/client/src/app/slides/base-scale-scroll-slide-component.ts @@ -1,6 +1,6 @@ -import { Input } from '@angular/core'; +import { Directive, Input } from '@angular/core'; -import { BaseSlideComponent } from './base-slide-component'; +import { BaseSlideComponentDirective } from './base-slide-component'; export function isBaseScaleScrollSlideComponent(obj: any): obj is IBaseScaleScrollSlideComponent { return !!obj && obj.scroll !== undefined && obj.scale !== undefined; @@ -9,7 +9,7 @@ export function isBaseScaleScrollSlideComponent(obj: any): obj /** * A description of BaseScaleScrollSlideComponent. Usefull for "multi"-inheritance. */ -export interface IBaseScaleScrollSlideComponent extends BaseSlideComponent { +export interface IBaseScaleScrollSlideComponent extends BaseSlideComponentDirective { scroll: number; scale: number; } @@ -18,7 +18,8 @@ export interface IBaseScaleScrollSlideComponent extends BaseSl * A base slide component, which is autonomic with respect to scaling and srolling, meaning * that the slide itself (and not the slide container) will take care of this. */ -export abstract class BaseScaleScrollSlideComponent extends BaseSlideComponent +@Directive() +export abstract class BaseScaleScrollSlideComponentDirective extends BaseSlideComponentDirective implements IBaseScaleScrollSlideComponent { @Input() public scroll: number; diff --git a/client/src/app/slides/base-slide-component.ts b/client/src/app/slides/base-slide-component.ts index a01c30a70..93dcc2c9f 100644 --- a/client/src/app/slides/base-slide-component.ts +++ b/client/src/app/slides/base-slide-component.ts @@ -8,7 +8,7 @@ import { ViewProjector } from 'app/site/projector/models/view-projector'; * Every slide has to extends this base class. It forces the slides * to have an input for the slidedata. */ -export abstract class BaseSlideComponent { +export abstract class BaseSlideComponentDirective { /** * Each slide must take slide data. */ diff --git a/client/src/app/slides/base-slide-module.ts b/client/src/app/slides/base-slide-module.ts deleted file mode 100644 index b30813d9e..000000000 --- a/client/src/app/slides/base-slide-module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/compiler/src/core'; -import { Type } from '@angular/core'; - -import { SharedModule } from 'app/shared/shared.module'; -import { BaseSlideComponent } from './base-slide-component'; -import { SLIDE } from './slide-token'; - -/** - * Generates the configuration for a slide module. - * - * @param slideComponent The component - * @return the Module configuration fo rthe slide module. - */ -export function makeSlideModule>(slideComponent: Type): NgModule { - return { - imports: [CommonModule, SharedModule], - declarations: [slideComponent], - providers: [{ provide: SLIDE, useValue: slideComponent }], - entryComponents: [slideComponent] - }; -} diff --git a/client/src/app/slides/core/clock/clock-slide.component.ts b/client/src/app/slides/core/clock/clock-slide.component.ts index 56f7a57be..f48361aac 100644 --- a/client/src/app/slides/core/clock/clock-slide.component.ts +++ b/client/src/app/slides/core/clock/clock-slide.component.ts @@ -3,14 +3,14 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { Subscription } from 'rxjs'; import { ServertimeService } from 'app/core/core-services/servertime.service'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; +import { BaseSlideComponentDirective } from 'app/slides/base-slide-component'; @Component({ selector: 'os-clock-slide', templateUrl: './clock-slide.component.html', styleUrls: ['./clock-slide.component.scss'] }) -export class ClockSlideComponent extends BaseSlideComponent<{}> implements OnInit, OnDestroy { +export class ClockSlideComponent extends BaseSlideComponentDirective<{}> implements OnInit, OnDestroy { public time: string; private servertimeSubscription: Subscription | null = null; diff --git a/client/src/app/slides/core/clock/clock-slide.module.ts b/client/src/app/slides/core/clock/clock-slide.module.ts index e72395584..2e8f68df0 100644 --- a/client/src/app/slides/core/clock/clock-slide.module.ts +++ b/client/src/app/slides/core/clock/clock-slide.module.ts @@ -1,7 +1,12 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { makeSlideModule } from 'app/slides/base-slide-module'; +import { SharedModule } from 'app/shared/shared.module'; +import { SlideToken } from 'app/slides/slide-token'; import { ClockSlideComponent } from './clock-slide.component'; - -@NgModule(makeSlideModule(ClockSlideComponent)) +@NgModule({ + imports: [CommonModule, SharedModule], + declarations: [ClockSlideComponent], + providers: [{ provide: SlideToken.token, useValue: ClockSlideComponent }] +}) export class ClockSlideModule {} diff --git a/client/src/app/slides/core/countdown/countdown-slide.component.ts b/client/src/app/slides/core/countdown/countdown-slide.component.ts index 5f1cf0e4a..1092bfa39 100644 --- a/client/src/app/slides/core/countdown/countdown-slide.component.ts +++ b/client/src/app/slides/core/countdown/countdown-slide.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; +import { BaseSlideComponentDirective } from 'app/slides/base-slide-component'; import { CountdownSlideData } from './countdown-slide-data'; @Component({ @@ -8,7 +8,7 @@ import { CountdownSlideData } from './countdown-slide-data'; templateUrl: './countdown-slide.component.html', styleUrls: ['./countdown-slide.component.scss'] }) -export class CountdownSlideComponent extends BaseSlideComponent { +export class CountdownSlideComponent extends BaseSlideComponentDirective { public constructor() { super(); } diff --git a/client/src/app/slides/core/countdown/countdown-slide.module.ts b/client/src/app/slides/core/countdown/countdown-slide.module.ts index 47c4a42dc..6447899f1 100644 --- a/client/src/app/slides/core/countdown/countdown-slide.module.ts +++ b/client/src/app/slides/core/countdown/countdown-slide.module.ts @@ -1,7 +1,12 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { makeSlideModule } from 'app/slides/base-slide-module'; +import { SharedModule } from 'app/shared/shared.module'; +import { SlideToken } from 'app/slides/slide-token'; import { CountdownSlideComponent } from './countdown-slide.component'; - -@NgModule(makeSlideModule(CountdownSlideComponent)) +@NgModule({ + imports: [CommonModule, SharedModule], + declarations: [CountdownSlideComponent], + providers: [{ provide: SlideToken.token, useValue: CountdownSlideComponent }] +}) export class CountdownSlideModule {} diff --git a/client/src/app/slides/core/projector-message/projector-message-slide.component.ts b/client/src/app/slides/core/projector-message/projector-message-slide.component.ts index 9afc9e4dc..9d6fecd0a 100644 --- a/client/src/app/slides/core/projector-message/projector-message-slide.component.ts +++ b/client/src/app/slides/core/projector-message/projector-message-slide.component.ts @@ -1,6 +1,6 @@ import { Component, ViewEncapsulation } from '@angular/core'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; +import { BaseSlideComponentDirective } from 'app/slides/base-slide-component'; import { ProjectorMessageSlideData } from './projector-message-slide-data'; @Component({ @@ -9,7 +9,7 @@ import { ProjectorMessageSlideData } from './projector-message-slide-data'; styleUrls: ['./projector-message-slide.component.scss'], encapsulation: ViewEncapsulation.None }) -export class ProjectorMessageSlideComponent extends BaseSlideComponent { +export class ProjectorMessageSlideComponent extends BaseSlideComponentDirective { public constructor() { super(); } diff --git a/client/src/app/slides/core/projector-message/projector-message-slide.module.ts b/client/src/app/slides/core/projector-message/projector-message-slide.module.ts index c013b23a9..ecbb181d9 100644 --- a/client/src/app/slides/core/projector-message/projector-message-slide.module.ts +++ b/client/src/app/slides/core/projector-message/projector-message-slide.module.ts @@ -1,7 +1,12 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { makeSlideModule } from 'app/slides/base-slide-module'; +import { SharedModule } from 'app/shared/shared.module'; +import { SlideToken } from 'app/slides/slide-token'; import { ProjectorMessageSlideComponent } from './projector-message-slide.component'; - -@NgModule(makeSlideModule(ProjectorMessageSlideComponent)) +@NgModule({ + imports: [CommonModule, SharedModule], + declarations: [ProjectorMessageSlideComponent], + providers: [{ provide: SlideToken.token, useValue: ProjectorMessageSlideComponent }] +}) export class ProjectorMessageSlideModule {} diff --git a/client/src/app/slides/mediafiles/mediafile/mediafile-slide.component.ts b/client/src/app/slides/mediafiles/mediafile/mediafile-slide.component.ts index 4c8bf3f69..885d8ad01 100644 --- a/client/src/app/slides/mediafiles/mediafile/mediafile-slide.component.ts +++ b/client/src/app/slides/mediafiles/mediafile/mediafile-slide.component.ts @@ -2,7 +2,7 @@ import { Component } from '@angular/core'; import { MediafileProjectorElement } from 'app/site/mediafiles/models/mediafile-projector-element'; import { IMAGE_MIMETYPES, PDF_MIMETYPES } from 'app/site/mediafiles/models/view-mediafile'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; +import { BaseSlideComponentDirective } from 'app/slides/base-slide-component'; import { MediafileSlideData } from './mediafile-slide-data'; @Component({ @@ -10,7 +10,10 @@ import { MediafileSlideData } from './mediafile-slide-data'; templateUrl: './mediafile-slide.component.html', styleUrls: ['./mediafile-slide.component.scss'] }) -export class MediafileSlideComponent extends BaseSlideComponent { +export class MediafileSlideComponent extends BaseSlideComponentDirective< + MediafileSlideData, + MediafileProjectorElement +> { public get url(): string { return `${this.data.data.media_url_prefix}${this.data.data.path}`; } diff --git a/client/src/app/slides/mediafiles/mediafile/mediafile-slide.module.ts b/client/src/app/slides/mediafiles/mediafile/mediafile-slide.module.ts index f936094d2..1283cdc26 100644 --- a/client/src/app/slides/mediafiles/mediafile/mediafile-slide.module.ts +++ b/client/src/app/slides/mediafiles/mediafile/mediafile-slide.module.ts @@ -2,13 +2,12 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { SharedModule } from 'app/shared/shared.module'; -import { SLIDE } from 'app/slides/slide-token'; +import { SlideToken } from 'app/slides/slide-token'; import { MediafileSlideComponent } from './mediafile-slide.component'; @NgModule({ imports: [CommonModule, SharedModule], declarations: [MediafileSlideComponent], - providers: [{ provide: SLIDE, useValue: MediafileSlideComponent }], - entryComponents: [MediafileSlideComponent] + providers: [{ provide: SlideToken.token, useValue: MediafileSlideComponent }] }) export class MediafileSlideModule {} diff --git a/client/src/app/slides/motions/base/base-motion-slide.ts b/client/src/app/slides/motions/base/base-motion-slide.ts index c3d09479d..5b365465b 100644 --- a/client/src/app/slides/motions/base/base-motion-slide.ts +++ b/client/src/app/slides/motions/base/base-motion-slide.ts @@ -2,7 +2,7 @@ import { TranslateService } from '@ngx-translate/core'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { MotionTitleInformation } from 'app/site/motions/models/view-motion'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; +import { BaseSlideComponentDirective } from 'app/slides/base-slide-component'; /** * Format for referenced motions: A mapping of motion ids to their title information. @@ -15,7 +15,7 @@ export interface ReferencedMotions { * Base slide for motions and motion blocks. This Provides the functionality of * replacing referenced motions (format: `[motion:]`) in strings. */ -export class BaseMotionSlideComponent extends BaseSlideComponent { +export class BaseMotionSlideComponent extends BaseSlideComponentDirective { public constructor(protected translate: TranslateService, protected motionRepo: MotionRepositoryService) { super(); } diff --git a/client/src/app/slides/motions/motion-block/motion-block-slide.module.ts b/client/src/app/slides/motions/motion-block/motion-block-slide.module.ts index 7722719fa..fd469a2ac 100644 --- a/client/src/app/slides/motions/motion-block/motion-block-slide.module.ts +++ b/client/src/app/slides/motions/motion-block/motion-block-slide.module.ts @@ -1,7 +1,12 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { makeSlideModule } from 'app/slides/base-slide-module'; +import { SharedModule } from 'app/shared/shared.module'; +import { SlideToken } from 'app/slides/slide-token'; import { MotionBlockSlideComponent } from './motion-block-slide.component'; - -@NgModule(makeSlideModule(MotionBlockSlideComponent)) +@NgModule({ + imports: [CommonModule, SharedModule], + declarations: [MotionBlockSlideComponent], + providers: [{ provide: SlideToken.token, useValue: MotionBlockSlideComponent }] +}) export class MotionBlockSlideModule {} diff --git a/client/src/app/slides/motions/motion-poll/motion-poll-slide.module.ts b/client/src/app/slides/motions/motion-poll/motion-poll-slide.module.ts index cba9881d9..6c072bca5 100644 --- a/client/src/app/slides/motions/motion-poll/motion-poll-slide.module.ts +++ b/client/src/app/slides/motions/motion-poll/motion-poll-slide.module.ts @@ -1,7 +1,12 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { makeSlideModule } from 'app/slides/base-slide-module'; +import { SharedModule } from 'app/shared/shared.module'; +import { SlideToken } from 'app/slides/slide-token'; import { MotionPollSlideComponent } from './motion-poll-slide.component'; - -@NgModule(makeSlideModule(MotionPollSlideComponent)) +@NgModule({ + imports: [CommonModule, SharedModule], + declarations: [MotionPollSlideComponent], + providers: [{ provide: SlideToken.token, useValue: MotionPollSlideComponent }] +}) export class MotionPollSlideModule {} diff --git a/client/src/app/slides/motions/motion/motion-slide.module.ts b/client/src/app/slides/motions/motion/motion-slide.module.ts index a754fb366..f83aa1c91 100644 --- a/client/src/app/slides/motions/motion/motion-slide.module.ts +++ b/client/src/app/slides/motions/motion/motion-slide.module.ts @@ -1,7 +1,12 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { makeSlideModule } from 'app/slides/base-slide-module'; +import { SharedModule } from 'app/shared/shared.module'; +import { SlideToken } from 'app/slides/slide-token'; import { MotionSlideComponent } from './motion-slide.component'; - -@NgModule(makeSlideModule(MotionSlideComponent)) +@NgModule({ + imports: [CommonModule, SharedModule], + declarations: [MotionSlideComponent], + providers: [{ provide: SlideToken.token, useValue: MotionSlideComponent }] +}) export class MotionSlideModule {} diff --git a/client/src/app/slides/polls/base-poll-slide.component.ts b/client/src/app/slides/polls/base-poll-slide.component.ts index a8085e69e..667be6e42 100644 --- a/client/src/app/slides/polls/base-poll-slide.component.ts +++ b/client/src/app/slides/polls/base-poll-slide.component.ts @@ -7,9 +7,12 @@ import { ChartData } from 'app/shared/components/charts/charts.component'; import { PollState } from 'app/shared/models/poll/base-poll'; import { PollService } from 'app/site/polls/services/poll.service'; import { BasePollSlideData } from './base-poll-slide-data'; -import { BaseSlideComponent } from '../base-slide-component'; +import { BaseSlideComponentDirective } from '../base-slide-component'; -export class BasePollSlideComponent extends BaseSlideComponent { +export class BasePollSlideComponent< + T extends BasePollSlideData, + S extends PollService +> extends BaseSlideComponentDirective { public chartDataSubject: BehaviorSubject = new BehaviorSubject([]); @Input() diff --git a/client/src/app/slides/services/slide-manager.service.ts b/client/src/app/slides/services/slide-manager.service.ts index 9da6ec3fb..50cc37f19 100644 --- a/client/src/app/slides/services/slide-manager.service.ts +++ b/client/src/app/slides/services/slide-manager.service.ts @@ -2,10 +2,10 @@ import { Compiler, ComponentFactory, Inject, Injectable, Injector, NgModuleFacto import { allSlidesDynamicConfiguration } from '../all-slide-configurations'; import { IdentifiableProjectorElement, ProjectorElement } from 'app/shared/models/core/projector'; -import { BaseSlideComponent } from '../base-slide-component'; +import { BaseSlideComponentDirective } from '../base-slide-component'; import { Slide, SlideDynamicConfiguration, SlideManifest } from '../slide-manifest'; import { SLIDE_MANIFESTS } from '../slide-manifest'; -import { SLIDE } from '../slide-token'; +import { SlideToken } from '../slide-token'; /** * Cares about loading slides dynamically. @@ -81,7 +81,7 @@ export class SlideManager { * * @param slideName The slide to search. */ - public async getSlideFactory>( + public async getSlideFactory>( slideName: string ): Promise> { const manifest = this.getManifest(slideName); @@ -98,18 +98,19 @@ export class SlideManager { // create the module const moduleRef = ngModuleFactory.create(this.injector); - // Get the slide provided by the SLIDE-injectiontoken. + // Get the slide provided by the `SlideToken.token`-injectiontoken. let dynamicComponentType: Type; try { // Read from the moduleRef injector and locate the dynamic component type - dynamicComponentType = moduleRef.injector.get(SLIDE); + dynamicComponentType = moduleRef.injector.get(SlideToken.token); } catch (e) { console.log( - 'The module for Slide "' + slideName + '" is not configured right: Make usage of makeSlideModule.' + 'The module for Slide "' + slideName + '" is not configured right: Cannot file the slide token.' ); throw e; } // Resolve this component factory - return moduleRef.componentFactoryResolver.resolveComponentFactory(dynamicComponentType); + const componentFactory = moduleRef.componentFactoryResolver.resolveComponentFactory(dynamicComponentType); + return componentFactory; } } diff --git a/client/src/app/slides/slide-token.ts b/client/src/app/slides/slide-token.ts index f4132ed5b..73ae50603 100644 --- a/client/src/app/slides/slide-token.ts +++ b/client/src/app/slides/slide-token.ts @@ -1,3 +1,5 @@ import { InjectionToken } from '@angular/core'; -export const SLIDE = new InjectionToken('SLIDE'); +export const SlideToken = { + token: new InjectionToken('Token.SLIDE') +}; diff --git a/client/src/app/slides/topics/topic/topic-slide.component.ts b/client/src/app/slides/topics/topic/topic-slide.component.ts index 2e3a26d45..b7bcc4052 100644 --- a/client/src/app/slides/topics/topic/topic-slide.component.ts +++ b/client/src/app/slides/topics/topic/topic-slide.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; +import { BaseSlideComponentDirective } from 'app/slides/base-slide-component'; import { TopicSlideData } from './topic-slide-data'; @Component({ @@ -8,8 +8,4 @@ import { TopicSlideData } from './topic-slide-data'; templateUrl: './topic-slide.component.html', styleUrls: ['./topic-slide.component.scss'] }) -export class TopicSlideComponent extends BaseSlideComponent { - public constructor() { - super(); - } -} +export class TopicSlideComponent extends BaseSlideComponentDirective {} diff --git a/client/src/app/slides/topics/topic/topic-slide.module.ts b/client/src/app/slides/topics/topic/topic-slide.module.ts index 7830c11e7..b63ec405e 100644 --- a/client/src/app/slides/topics/topic/topic-slide.module.ts +++ b/client/src/app/slides/topics/topic/topic-slide.module.ts @@ -1,7 +1,13 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { makeSlideModule } from 'app/slides/base-slide-module'; +import { SharedModule } from 'app/shared/shared.module'; +import { SlideToken } from 'app/slides/slide-token'; import { TopicSlideComponent } from './topic-slide.component'; -@NgModule(makeSlideModule(TopicSlideComponent)) +@NgModule({ + imports: [CommonModule, SharedModule], + declarations: [TopicSlideComponent], + providers: [{ provide: SlideToken.token, useValue: TopicSlideComponent }] +}) export class TopicSlideModule {} diff --git a/client/src/app/slides/users/user/user-slide.component.ts b/client/src/app/slides/users/user/user-slide.component.ts index 85d52aaec..4c882731c 100644 --- a/client/src/app/slides/users/user/user-slide.component.ts +++ b/client/src/app/slides/users/user/user-slide.component.ts @@ -1,13 +1,13 @@ import { Component } from '@angular/core'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; +import { BaseSlideComponentDirective } from 'app/slides/base-slide-component'; import { UserSlideData } from './user-slide-data'; @Component({ selector: 'os-user-slide', templateUrl: './user-slide.component.html' }) -export class UserSlideComponent extends BaseSlideComponent { +export class UserSlideComponent extends BaseSlideComponentDirective { public constructor() { super(); } diff --git a/client/src/app/slides/users/user/user-slide.module.ts b/client/src/app/slides/users/user/user-slide.module.ts index ad1a8d749..0c93d5adf 100644 --- a/client/src/app/slides/users/user/user-slide.module.ts +++ b/client/src/app/slides/users/user/user-slide.module.ts @@ -1,7 +1,12 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { makeSlideModule } from 'app/slides/base-slide-module'; +import { SharedModule } from 'app/shared/shared.module'; +import { SlideToken } from 'app/slides/slide-token'; import { UserSlideComponent } from './user-slide.component'; - -@NgModule(makeSlideModule(UserSlideComponent)) +@NgModule({ + imports: [CommonModule, SharedModule], + declarations: [UserSlideComponent], + providers: [{ provide: SlideToken.token, useValue: UserSlideComponent }] +}) export class UserSlideModule {} diff --git a/client/src/polyfills.ts b/client/src/polyfills.ts index fd0c3a7f8..fcd151f17 100644 --- a/client/src/polyfills.ts +++ b/client/src/polyfills.ts @@ -66,8 +66,7 @@ import 'core-js/es7/reflect'; /*************************************************************************************************** * Zone JS and Hammer JS are required by default for Angular itself. */ -import 'zone.js/dist/zone'; // Included with Angular CLI. -import 'hammerjs'; +import 'zone.js/dist/zone'; /*************************************************************************************************** * APPLICATION IMPORTS diff --git a/client/tsconfig-es5.app.json b/client/tsconfig-es5.app.json index c7096a2ec..c1c2b1b1e 100644 --- a/client/tsconfig-es5.app.json +++ b/client/tsconfig-es5.app.json @@ -2,5 +2,6 @@ "extends": "./tsconfig.app.json", "compilerOptions": { "target": "es5" - } + }, + "include": ["src/**/*.d.ts"] } diff --git a/client/tsconfig.app.json b/client/tsconfig.app.json index 82447ca06..d3749ffcc 100644 --- a/client/tsconfig.app.json +++ b/client/tsconfig.app.json @@ -4,9 +4,6 @@ "outDir": "./out-tsc/app", "types": [] }, - "angularCompilerOptions": { - "enableIvy": false - }, - "include": ["src/**/*.ts"], - "exclude": ["src/test.ts", "**/*.spec.ts", "src/**/*.worker.ts"] + "files": ["src/main.ts", "src/polyfills.ts"], + "include": ["src/**/*.d.ts"] }