Update to Angular 10

Update @angular/core @angular/cli
Update material, search-select, cdk, ngrid
Update localstorage
Update rxjs
Update ngx-translate
Update ngx-translate-extract
Update @schematics/angular
Update some deps
Update dev deps
Fix css imports, lint
Downgrad CDK and Material for ngrid
Update docker
Provide pdf worker
Move static file output to django folder
Update readme / used files
Update package-lock.json for npm ci
This commit is contained in:
Sean 2020-08-31 17:37:11 +02:00
parent 3b2fbe8915
commit 42dd397fae
105 changed files with 18919 additions and 313 deletions

View File

@ -23,73 +23,77 @@ Language files can be found in `/src/assets/i18n`.
OpenSlides uses the following software or parts of them: OpenSlides uses the following software or parts of them:
- [@angular/animations@9.1.0](https://github.com/angular/angular), License: MIT - [@angular/animations@10.0.14](https://github.com/angular/angular), License: MIT
- [@angular/cdk-experimental@9.2.0](https://github.com/angular/components), License: MIT - [@angular/cdk-experimental@10.0.2](https://github.com/angular/components), License: MIT
- [@angular/cdk@9.2.0](https://github.com/angular/components), License: MIT - [@angular/cdk@10.0.2](https://github.com/angular/components), License: MIT
- [@angular/common@9.1.0](https://github.com/angular/angular), License: MIT - [@angular/common@10.0.14](https://github.com/angular/angular), License: MIT
- [@angular/compiler@9.1.0](https://github.com/angular/angular), License: MIT - [@angular/compiler@10.0.14](https://github.com/angular/angular), License: MIT
- [@angular/core@9.1.0](https://github.com/angular/angular), License: MIT - [@angular/core@10.0.14](https://github.com/angular/angular), License: MIT
- [@angular/forms@9.1.0](https://github.com/angular/angular), License: MIT - [@angular/forms@10.0.14](https://github.com/angular/angular), License: MIT
- [@angular/material-moment-adapter@9.2.0](https://github.com/angular/components), License: MIT - [@angular/material-moment-adapter@10.1.3](https://github.com/angular/components), License: MIT
- [@angular/material@9.2.0](https://github.com/angular/components), License: MIT - [@angular/material@10.0.2](https://github.com/angular/components), License: MIT
- [@angular/platform-browser-dynamic@9.1.0](https://github.com/angular/angular), License: MIT - [@angular/platform-browser-dynamic@10.0.14](https://github.com/angular/angular), License: MIT
- [@angular/platform-browser@9.1.0](https://github.com/angular/angular), License: MIT - [@angular/platform-browser@10.0.14](https://github.com/angular/angular), License: MIT
- [@angular/router@9.1.0](https://github.com/angular/angular), License: MIT - [@angular/router@10.0.14](https://github.com/angular/angular), License: MIT
- [@angular/service-worker@9.1.0](https://github.com/angular/angular), License: MIT - [@angular/service-worker@10.0.14](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-pwa/local-storage@10.0.1](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/core@13.0.0](https://github.com/ngx-translate/core), License: MIT
- [@ngx-translate/http-loader@4.0.0](https://github.com/ngx-translate/http-loader), License: MIT - [@ngx-translate/http-loader@6.0.0](https://github.com/ngx-translate/http-loader), License: MIT
- [@pebula/ngrid-material@2.0.0-rc.1](undefined), License: MIT - [@pebula/ngrid-material@2.0.0](undefined), License: MIT
- [@pebula/ngrid@2.0.0-rc.1](https://github.com/shlomiassaf/ngrid), License: MIT - [@pebula/ngrid@2.0.0](https://github.com/shlomiassaf/ngrid), License: MIT
- [@pebula/utils@1.0.2](undefined), 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 - [@tinymce/tinymce-angular@4.1.0](https://github.com/tinymce/tinymce-angular), License: Apache-2.0
- [acorn@7.1.1](https://github.com/acornjs/acorn), License: MIT - [@videojs/http-streaming@1.13.3](https://github.com/videojs/http-streaming), License: Apache-2.0
- [chart.js@2.9.3](https://github.com/chartjs/Chart.js), License: MIT - [acorn@8.0.1](https://github.com/acornjs/acorn), License: MIT
- [core-js@3.6.4](https://github.com/zloirock/core-js), License: MIT - [chart.js@2.9.3](https://github.com/chartjs/Chart.js), License: MIT
- [css-element-queries@1.2.3](https://github.com/marcj/css-element-queries), License: MIT - [core-js@3.6.5](https://github.com/zloirock/core-js), License: MIT
- [exceljs@3.8.2](https://github.com/exceljs/exceljs), License: MIT - [css-element-queries@1.2.3](https://github.com/marcj/css-element-queries), License: MIT
- [file-saver@2.0.2](https://github.com/eligrey/FileSaver.js), License: MIT - [exceljs@4.1.1](https://github.com/exceljs/exceljs), License: MIT
- [lz4js@0.2.0](https://github.com/Benzinga/lz4js), License: ISC - [file-saver@2.0.2](https://github.com/eligrey/FileSaver.js), License: MIT
- [material-icon-font@0.1.0](https://github.com//petergng/svgFontCreator), License: ISC - [jszip@3.5.0](https://github.com/Stuk/jszip), License: (MIT OR GPL-3.0)
- [moment@2.24.0](https://github.com/moment/moment), License: MIT - [lz4js@0.2.0](https://github.com/Benzinga/lz4js), License: ISC
- [ng2-charts@2.3.0](https://github.com/valor-software/ng2-charts), License: ISC - [material-icon-font@0.1.0](https://github.com//petergng/svgFontCreator), License: ISC
- [ng2-pdf-viewer@6.1.2](git+https://vadimdez@github.com/VadimDez/ng2-pdf-viewer), License: MIT - [moment@2.27.0](https://github.com/moment/moment), License: MIT
- [ngx-file-drop@8.0.8](https://github.com/georgipeltekov/ngx-file-drop), License: MIT - [ng2-charts@2.4.0](https://github.com/valor-software/ng2-charts), License: ISC
- [ngx-mat-select-search@2.1.2](https://github.com/bithost-gmbh/ngx-mat-select-search), License: MIT - [ng2-pdf-viewer@6.3.2](git+https://vadimdez@github.com/VadimDez/ng2-pdf-viewer), License: MIT
- [ngx-material-timepicker@5.5.1](https://github.com/Agranom/ngx-material-timepicker), License: MIT - [ngx-device-detector@2.0.0](undefined), License: MIT*
- [ngx-papaparse@4.0.4](https://github.com/alberthaff/ngx-papaparse), License: MIT - [ngx-file-drop@9.0.1](https://github.com/georgipeltekov/ngx-file-drop), License: MIT
- [pdfmake@0.1.65](https://github.com/bpampuch/pdfmake), License: MIT - [ngx-mat-select-search@3.0.3](https://github.com/bithost-gmbh/ngx-mat-select-search), License: MIT
- [po2json@1.0.0-beta-2](https://github.com/mikeedwards/po2json), License: LGPL-2.0-or-later - [ngx-material-timepicker@5.5.3](https://github.com/Agranom/ngx-material-timepicker), License: MIT
- [rxjs@6.5.4](https://github.com/reactivex/rxjs), License: Apache-2.0 - [ngx-papaparse@4.0.4](https://github.com/alberthaff/ngx-papaparse), License: MIT
- [tinymce@5.2.1](https://github.com/tinymce/tinymce-dist), License: LGPL-2.1 - [pdfmake@0.1.68](https://github.com/bpampuch/pdfmake), License: MIT
- [tslib@1.11.1](https://github.com/Microsoft/tslib), License: Apache-2.0 - [po2json@1.0.0-beta-2](https://github.com/mikeedwards/po2json), License: LGPL-2.0-or-later
- [zone.js@0.10.3](https://github.com/angular/angular), License: MIT - [rxjs@6.6.2](https://github.com/reactivex/rxjs), License: Apache-2.0
- [@angular-devkit/build-angular@0.901.0](https://github.com/angular/angular-cli), License: MIT - [tinymce@5.4.2](https://github.com/tinymce/tinymce-dist), License: LGPL-2.1
- [@angular-devkit/schematics@9.1.0](https://github.com/angular/angular-cli), License: MIT - [tslib@1.13.0](https://github.com/Microsoft/tslib), License: 0BSD
- [@angular/cli@9.1.0](https://github.com/angular/angular-cli), License: MIT - [video.js@7.8.4](https://github.com/videojs/video.js), License: Apache-2.0
- [@angular/compiler-cli@9.1.0](https://github.com/angular/angular), License: MIT - [zone.js@0.10.3](https://github.com/angular/angular), License: MIT
- [@angular/language-service@9.1.0](https://github.com/angular/angular), License: MIT - [@angular-devkit/build-angular@0.1000.8](https://github.com/angular/angular-cli), License: MIT
- [@biesbjerg/ngx-translate-extract@6.0.3](https://github.com/biesbjerg/ngx-translate-extract), License: MIT - [@angular-devkit/schematics@10.0.8](https://github.com/angular/angular-cli), License: MIT
- [@compodoc/compodoc@1.1.11](https://github.com/compodoc/compodoc), License: MIT - [@angular/cli@10.0.8](https://github.com/angular/angular-cli), License: MIT
- [@schematics/angular@9.1.0](https://github.com/angular/angular-cli), License: MIT - [@angular/compiler-cli@10.0.14](https://github.com/angular/angular), License: MIT
- [@types/jasmine@3.5.10](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT - [@angular/language-service@10.0.14](https://github.com/angular/angular), License: MIT
- [@types/jasminewd2@2.0.8](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT - [@biesbjerg/ngx-translate-extract-marker@1.0.0](https://github.com/biesbjerg/ngx-translate-extract-marker), License: MIT
- [@types/node@13.9.8](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT - [@biesbjerg/ngx-translate-extract@7.0.2](https://github.com/biesbjerg/ngx-translate-extract), License: MIT
- [@types/yargs@15.0.4](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT - [@compodoc/compodoc@1.1.11](https://github.com/compodoc/compodoc), License: MIT
- [codelyzer@5.2.2](https://github.com/mgechev/codelyzer), License: MIT - [@schematics/angular@10.0.8](https://github.com/angular/angular-cli), License: MIT
- [husky@4.2.3](https://github.com/typicode/husky), License: MIT - [@types/jasmine@3.5.14](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT
- [jasmine-core@3.5.0](https://github.com/jasmine/jasmine), License: MIT - [@types/jasminewd2@2.0.8](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT
- [jasmine-spec-reporter@5.0.1](https://github.com/bcaudan/jasmine-spec-reporter), License: Apache-2.0 - [@types/yargs@15.0.5](https://github.com/DefinitelyTyped/DefinitelyTyped), License: MIT
- [karma-chrome-launcher@3.1.0](https://github.com/karma-runner/karma-chrome-launcher), License: MIT - [codelyzer@6.0.0](https://github.com/mgechev/codelyzer), License: MIT
- [karma-coverage-istanbul-reporter@2.1.1](https://github.com/mattlewis92/karma-coverage-istanbul-reporter), License: MIT - [husky@4.2.5](https://github.com/typicode/husky), License: MIT
- [karma-jasmine-html-reporter@1.5.3](https://github.com/dfederm/karma-jasmine-html-reporter), License: MIT - [jasmine-core@3.6.0](https://github.com/jasmine/jasmine), License: MIT
- [karma-jasmine@3.1.1](https://github.com/karma-runner/karma-jasmine), License: MIT - [jasmine-spec-reporter@5.0.2](https://github.com/bcaudan/jasmine-spec-reporter), License: Apache-2.0
- [karma@4.4.1](https://github.com/karma-runner/karma), License: MIT - [karma-chrome-launcher@3.1.0](https://github.com/karma-runner/karma-chrome-launcher), License: MIT
- [npm-license-crawler@0.2.1](https://github.com/mwittig/npm-license-crawler), License: BSD-3-Clause - [karma-coverage-istanbul-reporter@3.0.3](https://github.com/mattlewis92/karma-coverage-istanbul-reporter), License: MIT
- [prettier@2.0.2](https://github.com/prettier/prettier), License: MIT - [karma-jasmine-html-reporter@1.5.4](https://github.com/dfederm/karma-jasmine-html-reporter), License: MIT
- [protractor@5.4.3](https://github.com/angular/protractor), License: MIT - [karma-jasmine@4.0.1](https://github.com/karma-runner/karma-jasmine), License: MIT
- [resize-observer-polyfill@1.5.1](https://github.com/que-etc/resize-observer-polyfill), License: MIT - [karma@5.1.1](https://github.com/karma-runner/karma), License: MIT
- [ts-node@8.8.1](https://github.com/TypeStrong/ts-node), License: MIT - [npm-license-crawler@0.2.1](https://github.com/mwittig/npm-license-crawler), License: BSD-3-Clause
- [tslint@6.1.0](https://github.com/palantir/tslint), License: Apache-2.0 - [prettier@2.1.1](https://github.com/prettier/prettier), License: MIT
- [tsutils@3.17.1](https://github.com/ajafff/tsutils), License: MIT - [protractor@7.0.0](https://github.com/angular/protractor), License: MIT
- [typescript@3.8.3](https://github.com/Microsoft/TypeScript), License: Apache-2.0 - [resize-observer-polyfill@1.5.1](https://github.com/que-etc/resize-observer-polyfill), License: MIT
- [ts-node@9.0.0](https://github.com/TypeStrong/ts-node), License: MIT
- [tslint@6.1.3](https://github.com/palantir/tslint), License: Apache-2.0
- [tsutils@3.17.1](https://github.com/ajafff/tsutils), License: MIT
- [typescript@3.9.7](https://github.com/Microsoft/TypeScript), License: Apache-2.0

View File

@ -17,7 +17,7 @@
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
"options": { "options": {
"outputPath": "static", "outputPath": "../server/openslides/static",
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
@ -30,6 +30,11 @@
"glob": "**/*", "glob": "**/*",
"input": "node_modules/tinymce", "input": "node_modules/tinymce",
"output": "/tinymce/" "output": "/tinymce/"
},
{
"glob": "pdf.worker.min.js",
"input": "node_modules/pdfjs-dist/build/",
"output": "/assets/js/"
} }
], ],
"styles": ["src/styles.scss"], "styles": ["src/styles.scss"],

View File

@ -6,12 +6,12 @@ RUN useradd -m openslides
RUN chown -R openslides /build/app RUN chown -R openslides /build/app
USER root USER root
RUN npm install -g @angular/cli@^9 RUN npm install -g @angular/cli@^10
RUN ng config -g cli.warnings.versionMismatch false RUN ng config -g cli.warnings.versionMismatch false
USER openslides USER openslides
COPY package.json . COPY package.json .
RUN npm install RUN npm ci
COPY browserslist *.json ./ COPY browserslist *.json ./
COPY src ./src COPY src ./src
RUN npm run build RUN npm run build

18525
client/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@
"start": "ng serve --proxy-config proxy.conf.json --host=0.0.0.0", "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", "start-es5": "ng serve --proxy-config proxy.conf.json --host=0.0.0.0 --configuration es5",
"build": "ng build --prod", "build": "ng build --prod",
"postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points", "postinstall": "ngcc",
"build-debug": "ng build", "build-debug": "ng build",
"test": "ng test", "test": "ng test",
"test-silently": "npm run test -- --watch=false --no-progress --browsers=ChromeHeadlessNoSandbox", "test-silently": "npm run test -- --watch=false --no-progress --browsers=ChromeHeadlessNoSandbox",
@ -32,82 +32,82 @@
"cleanup-win": "npm run prettify-write & npm run lint-write" "cleanup-win": "npm run prettify-write & npm run lint-write"
}, },
"dependencies": { "dependencies": {
"@angular/animations": "~9.1.0", "@angular/animations": "~10.0.14",
"@angular/cdk": "~9.2.0", "@angular/cdk": "~10.0.0",
"@angular/cdk-experimental": "~9.2.0", "@angular/cdk-experimental": "~10.0.0",
"@angular/common": "~9.1.0", "@angular/common": "~10.0.14",
"@angular/compiler": "~9.1.0", "@angular/compiler": "~10.0.14",
"@angular/core": "~9.1.0", "@angular/core": "~10.0.14",
"@angular/forms": "~9.1.0", "@angular/forms": "~10.0.14",
"@angular/material": "~9.2.0", "@angular/material": "~10.0.0",
"@angular/material-moment-adapter": "~9.2.0", "@angular/material-moment-adapter": "~10.1.3",
"@angular/platform-browser": "~9.1.0", "@angular/platform-browser": "~10.0.14",
"@angular/platform-browser-dynamic": "~9.1.0", "@angular/platform-browser-dynamic": "~10.0.14",
"@angular/router": "~9.1.0", "@angular/router": "~10.0.14",
"@angular/service-worker": "~9.1.0", "@angular/service-worker": "~10.0.14",
"@ngx-pwa/local-storage": "~9.0.2", "@ngx-pwa/local-storage": "~10.0.1",
"@ngx-translate/core": "~12.1.2", "@ngx-translate/core": "~13.0.0",
"@ngx-translate/http-loader": "^4.0.0", "@ngx-translate/http-loader": "^6.0.0",
"@pebula/ngrid": "2.0.0-rc.1", "@pebula/ngrid": "2.0.0",
"@pebula/ngrid-material": "2.0.0-rc.1", "@pebula/ngrid-material": "2.0.0",
"@pebula/utils": "1.0.2", "@pebula/utils": "1.0.2",
"@tinymce/tinymce-angular": "^4.1.0", "@tinymce/tinymce-angular": "^4.1.0",
"@videojs/http-streaming": "^1.13.3", "@videojs/http-streaming": "^1.13.3",
"acorn": "^7.1.0", "acorn": "^8.0.1",
"chart.js": "^2.9.2", "chart.js": "^2.9.3",
"core-js": "^3.6.4", "core-js": "^3.6.5",
"css-element-queries": "^1.2.3", "css-element-queries": "^1.2.3",
"exceljs": "1.15.0", "exceljs": "4.1.1",
"file-saver": "^2.0.2", "file-saver": "^2.0.2",
"jszip": "^3.5.0", "jszip": "^3.5.0",
"lz4js": "^0.2.0", "lz4js": "^0.2.0",
"material-icon-font": "git+https://github.com/petergng/materialIconFont.git", "material-icon-font": "git+https://github.com/petergng/materialIconFont.git",
"moment": "^2.24.0", "moment": "^2.27.0",
"ng2-charts": "^2.3.0", "ng2-charts": "^2.4.0",
"ng2-pdf-viewer": "^6.1.2", "ng2-pdf-viewer": "6.3.2",
"ngx-device-detector": "^1.4.4", "ngx-device-detector": "^2.0.0",
"ngx-file-drop": "^9.0.1", "ngx-file-drop": "^9.0.1",
"ngx-mat-select-search": "^2.1.2", "ngx-mat-select-search": "^3.0.3",
"ngx-material-timepicker": "^5.5.1", "ngx-material-timepicker": "^5.5.3",
"ngx-papaparse": "^4.0.2", "ngx-papaparse": "^4.0.4",
"pdfmake": "^0.1.63", "pdfmake": "^0.1.68",
"po2json": "^1.0.0-beta-2", "po2json": "^1.0.0-beta-2",
"rxjs": "^6.5.4", "rxjs": "^6.6.2",
"tinymce": "5.4.1", "tinymce": "5.4.2",
"tslib": "^1.10.0", "tslib": "^1.10.0",
"video.js": "^7.7.6", "video.js": "^7.8.4",
"zone.js": "~0.10.2" "zone.js": "~0.10.2"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.901.9", "@angular-devkit/build-angular": "~0.1000.8",
"@angular-devkit/schematics": "^9.0.6", "@angular-devkit/schematics": "^10.0.8",
"@angular/cli": "~9.1.0", "@angular/cli": "~10.0.8",
"@angular/compiler-cli": "~9.1.0", "@angular/compiler-cli": "~10.0.14",
"@angular/language-service": "~9.1.0", "@angular/language-service": "~10.0.14",
"@biesbjerg/ngx-translate-extract": "^6.0.3", "@biesbjerg/ngx-translate-extract": "^7.0.2",
"@biesbjerg/ngx-translate-extract-marker": "^1.0.0", "@biesbjerg/ngx-translate-extract-marker": "^1.0.0",
"@compodoc/compodoc": "^1.1.8", "@compodoc/compodoc": "^1.1.8",
"@schematics/angular": "^9.0.6", "@schematics/angular": "^10.0.8",
"@types/jasmine": "^3.3.9", "@types/jasmine": "^3.5.14",
"@types/jasminewd2": "^2.0.6", "@types/jasminewd2": "^2.0.6",
"@types/node": "^13.9.8", "@types/node": "^14.6.2",
"@types/yargs": "^15.0.4", "@types/yargs": "^15.0.4",
"codelyzer": "^5.1.2", "codelyzer": "^6.0.0",
"husky": "^4.2.3", "husky": "^4.2.3",
"jasmine-core": "~3.5.0", "jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.1", "jasmine-spec-reporter": "~5.0.1",
"karma": "^4.4.1", "karma": "^5.1.1",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "^2.0.5", "karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "~3.1.1", "karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.4.0", "karma-jasmine-html-reporter": "^1.4.0",
"npm-license-crawler": "^0.2.1", "npm-license-crawler": "^0.2.1",
"prettier": "~2.0.5", "prettier": "^2.1.1",
"protractor": "^5.4.3", "protractor": "^7.0.0",
"resize-observer-polyfill": "^1.5.1", "resize-observer-polyfill": "^1.5.1",
"ts-node": "~8.8.1", "ts-node": "~9.0.0",
"tslint": "~6.1.0", "tslint": "~6.1.3",
"tsutils": "3.17.1", "tsutils": "3.17.1",
"typescript": "~3.8.3" "typescript": "~3.9.7"
} }
} }

View File

@ -31,10 +31,11 @@ export function isBaseIsAgendaItemAndListOfSpeakersContentObjectRepository(
* multi-inheritance by implementing both inherit classes again... * multi-inheritance by implementing both inherit classes again...
*/ */
export abstract class BaseIsAgendaItemAndListOfSpeakersContentObjectRepository< export abstract class BaseIsAgendaItemAndListOfSpeakersContentObjectRepository<
V extends BaseProjectableViewModel & BaseViewModelWithAgendaItem & BaseViewModelWithListOfSpeakers & T, V extends BaseProjectableViewModel & BaseViewModelWithAgendaItem & BaseViewModelWithListOfSpeakers & T,
M extends BaseModel, M extends BaseModel,
T extends TitleInformationWithAgendaItem T extends TitleInformationWithAgendaItem
> extends BaseRepository<V, M, T> >
extends BaseRepository<V, M, T>
implements implements
IBaseIsAgendaItemContentObjectRepository<V, M, T>, IBaseIsAgendaItemContentObjectRepository<V, M, T>,
IBaseIsListOfSpeakersContentObjectRepository<V, M, T> { IBaseIsListOfSpeakersContentObjectRepository<V, M, T> {

View File

@ -38,10 +38,12 @@ export interface IBaseIsAgendaItemContentObjectRepository<
* The base repository for objects with an agenda item. * The base repository for objects with an agenda item.
*/ */
export abstract class BaseIsAgendaItemContentObjectRepository< export abstract class BaseIsAgendaItemContentObjectRepository<
V extends BaseViewModelWithAgendaItem & T, V extends BaseViewModelWithAgendaItem & T,
M extends BaseModel, M extends BaseModel,
T extends TitleInformationWithAgendaItem T extends TitleInformationWithAgendaItem
> extends BaseRepository<V, M, T> implements IBaseIsAgendaItemContentObjectRepository<V, M, T> { >
extends BaseRepository<V, M, T>
implements IBaseIsAgendaItemContentObjectRepository<V, M, T> {
public constructor( public constructor(
DS: DataStoreService, DS: DataStoreService,
dataSend: DataSendService, dataSend: DataSendService,

View File

@ -35,10 +35,12 @@ export interface IBaseIsListOfSpeakersContentObjectRepository<
* The base repository for objects with a list of speakers. * The base repository for objects with a list of speakers.
*/ */
export abstract class BaseIsListOfSpeakersContentObjectRepository< export abstract class BaseIsListOfSpeakersContentObjectRepository<
V extends BaseViewModelWithListOfSpeakers & T, V extends BaseViewModelWithListOfSpeakers & T,
M extends BaseModel, M extends BaseModel,
T extends TitleInformation T extends TitleInformation
> extends BaseRepository<V, M, T> implements IBaseIsListOfSpeakersContentObjectRepository<V, M, T> { >
extends BaseRepository<V, M, T>
implements IBaseIsListOfSpeakersContentObjectRepository<V, M, T> {
public constructor( public constructor(
DS: DataStoreService, DS: DataStoreService,
dataSend: DataSendService, dataSend: DataSendService,

View File

@ -18,7 +18,7 @@ import { Observable } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { MediafileRepositoryService } from 'app/core/repositories/mediafiles/mediafile-repository.service'; import { MediafileRepositoryService } from 'app/core/repositories/mediafiles/mediafile-repository.service';
import { BaseFormControlComponent } from 'app/shared/models/base/base-form-control'; import { BaseFormControlComponentDirective } from 'app/shared/models/base/base-form-control';
import { mediumDialogSettings } from 'app/shared/utils/dialog-settings'; import { mediumDialogSettings } from 'app/shared/utils/dialog-settings';
import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile'; import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile';
@ -29,7 +29,7 @@ import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile';
providers: [{ provide: MatFormFieldControl, useExisting: AttachmentControlComponent }], providers: [{ provide: MatFormFieldControl, useExisting: AttachmentControlComponent }],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class AttachmentControlComponent extends BaseFormControlComponent<ViewMediafile[]> implements OnInit { export class AttachmentControlComponent extends BaseFormControlComponentDirective<ViewMediafile[]> implements OnInit {
/** /**
* Output for an error handler * Output for an error handler
*/ */

View File

@ -6,7 +6,7 @@ import { TranslateService } from '@ngx-translate/core';
import { ChartOptions } from 'chart.js'; import { ChartOptions } from 'chart.js';
import { Label } from 'ng2-charts'; import { Label } from 'ng2-charts';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
/** /**
* The different supported chart-types. * The different supported chart-types.
@ -41,7 +41,7 @@ export type ChartData = ChartDate[];
styleUrls: ['./charts.component.scss'], styleUrls: ['./charts.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class ChartsComponent extends BaseViewComponent { export class ChartsComponent extends BaseViewComponentDirective {
/** /**
* The type of the chart. * The type of the chart.
*/ */

View File

@ -5,7 +5,7 @@ import { Title } from '@angular/platform-browser';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
@Component({ @Component({
selector: 'os-check-input', selector: 'os-check-input',
@ -13,7 +13,7 @@ import { BaseViewComponent } from 'app/site/base/base-view';
styleUrls: ['./check-input.component.scss'], styleUrls: ['./check-input.component.scss'],
providers: [{ provide: NG_VALUE_ACCESSOR, multi: true, useExisting: forwardRef(() => CheckInputComponent) }] providers: [{ provide: NG_VALUE_ACCESSOR, multi: true, useExisting: forwardRef(() => CheckInputComponent) }]
}) })
export class CheckInputComponent extends BaseViewComponent implements OnInit, ControlValueAccessor { export class CheckInputComponent extends BaseViewComponentDirective implements OnInit, ControlValueAccessor {
/** /**
* Type of the used input. * Type of the used input.
*/ */

View File

@ -12,7 +12,7 @@ import { OperatorService } from 'app/core/core-services/operator.service';
import { Deferred } from 'app/core/promises/deferred'; import { Deferred } from 'app/core/promises/deferred';
import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service';
import { ConfigService } from 'app/core/ui-services/config.service'; import { ConfigService } from 'app/core/ui-services/config.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { CurrentListOfSpeakersService } from 'app/site/projector/services/current-list-of-speakers.service'; import { CurrentListOfSpeakersService } from 'app/site/projector/services/current-list-of-speakers.service';
declare var JitsiMeetExternalAPI: any; declare var JitsiMeetExternalAPI: any;
@ -75,7 +75,7 @@ enum ConferenceState {
], ],
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class JitsiComponent extends BaseViewComponent implements OnInit, OnDestroy { export class JitsiComponent extends BaseViewComponentDirective implements OnInit, OnDestroy {
public enableJitsi: boolean; public enableJitsi: boolean;
private autoconnect: boolean; private autoconnect: boolean;

View File

@ -8,7 +8,7 @@ import { environment } from 'environments/environment';
import { HttpService } from 'app/core/core-services/http.service'; import { HttpService } from 'app/core/core-services/http.service';
import { LoginDataService } from 'app/core/ui-services/login-data.service'; import { LoginDataService } from 'app/core/ui-services/login-data.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
/** /**
* Characterize a plugin. This data is retrieved from the server * Characterize a plugin. This data is retrieved from the server
@ -69,7 +69,7 @@ interface VersionResponse {
templateUrl: './legal-notice-content.component.html', templateUrl: './legal-notice-content.component.html',
styleUrls: ['./legal-notice-content.component.scss'] styleUrls: ['./legal-notice-content.component.scss']
}) })
export class LegalNoticeContentComponent extends BaseViewComponent implements OnInit { export class LegalNoticeContentComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* Decides, whether the component can be edited at all. * Decides, whether the component can be edited at all.
* Defaults to `false`. * Defaults to `false`.

View File

@ -24,7 +24,7 @@ import { PromptService } from 'app/core/ui-services/prompt.service';
import { ViewportService } from 'app/core/ui-services/viewport.service'; import { ViewportService } from 'app/core/ui-services/viewport.service';
import { ViewListOfSpeakers } from 'app/site/agenda/models/view-list-of-speakers'; import { ViewListOfSpeakers } from 'app/site/agenda/models/view-list-of-speakers';
import { SpeakerState, ViewSpeaker } from 'app/site/agenda/models/view-speaker'; import { SpeakerState, ViewSpeaker } from 'app/site/agenda/models/view-speaker';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewUser } from 'app/site/users/models/view-user'; import { ViewUser } from 'app/site/users/models/view-user';
import { Selectable } from '../selectable'; import { Selectable } from '../selectable';
import { SortingListComponent } from '../sorting-list/sorting-list.component'; import { SortingListComponent } from '../sorting-list/sorting-list.component';
@ -35,7 +35,7 @@ import { SortingListComponent } from '../sorting-list/sorting-list.component';
styleUrls: ['./list-of-speakers-content.component.scss'], styleUrls: ['./list-of-speakers-content.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class ListOfSpeakersContentComponent extends BaseViewComponent implements OnInit { export class ListOfSpeakersContentComponent extends BaseViewComponentDirective implements OnInit {
@ViewChild(SortingListComponent) @ViewChild(SortingListComponent)
public listElement: SortingListComponent; public listElement: SortingListComponent;

View File

@ -6,7 +6,7 @@ import { Title } from '@angular/platform-browser';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { LoginDataService } from 'app/core/ui-services/login-data.service'; import { LoginDataService } from 'app/core/ui-services/login-data.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
/** /**
* Shared component to hold the content of the Privacy Policy. * Shared component to hold the content of the Privacy Policy.
@ -17,7 +17,7 @@ import { BaseViewComponent } from 'app/site/base/base-view';
templateUrl: './privacy-policy-content.component.html', templateUrl: './privacy-policy-content.component.html',
styleUrls: ['./privacy-policy-content.component.scss'] styleUrls: ['./privacy-policy-content.component.scss']
}) })
export class PrivacyPolicyContentComponent extends BaseViewComponent implements OnInit { export class PrivacyPolicyContentComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* Decides, whether the component can be edited at all. * Decides, whether the component can be edited at all.
* Defaults to `false`. * Defaults to `false`.

View File

@ -18,7 +18,7 @@ import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { auditTime } from 'rxjs/operators'; import { auditTime } from 'rxjs/operators';
import { BaseFormControlComponent } from 'app/shared/models/base/base-form-control'; import { BaseFormControlComponentDirective } from 'app/shared/models/base/base-form-control';
import { ParentErrorStateMatcher } from 'app/shared/parent-error-state-matcher'; import { ParentErrorStateMatcher } from 'app/shared/parent-error-state-matcher';
import { Selectable } from '../selectable'; import { Selectable } from '../selectable';
@ -51,7 +51,7 @@ import { Selectable } from '../selectable';
encapsulation: ViewEncapsulation.None, encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class SearchValueSelectorComponent extends BaseFormControlComponent<Selectable[]> { export class SearchValueSelectorComponent extends BaseFormControlComponentDirective<Selectable[]> {
@ViewChild('chipPlaceholder', { static: false }) @ViewChild('chipPlaceholder', { static: false })
public chipPlaceholder: ElementRef<HTMLElement>; public chipPlaceholder: ElementRef<HTMLElement>;

View File

@ -11,7 +11,7 @@ import { ConfigService } from 'app/core/ui-services/config.service';
import { LoginDataService } from 'app/core/ui-services/login-data.service'; import { LoginDataService } from 'app/core/ui-services/login-data.service';
import { OverlayService } from 'app/core/ui-services/overlay.service'; import { OverlayService } from 'app/core/ui-services/overlay.service';
import { DEFAULT_AUTH_TYPE } from 'app/shared/models/users/user'; import { DEFAULT_AUTH_TYPE } from 'app/shared/models/users/user';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewUser } from 'app/site/users/models/view-user'; import { ViewUser } from 'app/site/users/models/view-user';
@Component({ @Component({
@ -19,7 +19,7 @@ import { ViewUser } from 'app/site/users/models/view-user';
templateUrl: './user-menu.component.html', templateUrl: './user-menu.component.html',
styleUrls: ['./user-menu.component.scss'] styleUrls: ['./user-menu.component.scss']
}) })
export class UserMenuComponent extends BaseViewComponent implements OnInit { export class UserMenuComponent extends BaseViewComponentDirective implements OnInit {
public isLoggedIn: boolean; public isLoggedIn: boolean;
public user: ViewUser; public user: ViewUser;

View File

@ -1,6 +1,6 @@
import { FocusMonitor } from '@angular/cdk/a11y'; import { FocusMonitor } from '@angular/cdk/a11y';
import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { coerceBooleanProperty } from '@angular/cdk/coercion';
import { ElementRef, HostBinding, Input, OnDestroy, Optional, Self } from '@angular/core'; import { Directive, ElementRef, HostBinding, Input, OnDestroy, Optional, Self } from '@angular/core';
import { ControlValueAccessor, FormBuilder, FormControl, FormGroup, NgControl } from '@angular/forms'; import { ControlValueAccessor, FormBuilder, FormControl, FormGroup, NgControl } from '@angular/forms';
import { MatFormFieldControl } from '@angular/material/form-field'; import { MatFormFieldControl } from '@angular/material/form-field';
@ -21,11 +21,13 @@ import { Subject, Subscription } from 'rxjs';
* }) * })
* ``` * ```
*/ */
export abstract class BaseFormControlComponent<T> extends MatFormFieldControl<T> @Directive()
export abstract class BaseFormControlComponentDirective<T>
extends MatFormFieldControl<T>
implements OnDestroy, ControlValueAccessor { implements OnDestroy, ControlValueAccessor {
public static nextId = 0; public static nextId = 0;
@HostBinding() public id = `base-form-control-${BaseFormControlComponent.nextId++}`; @HostBinding() public id = `base-form-control-${BaseFormControlComponentDirective.nextId++}`;
@HostBinding('class.floating') public get shouldLabelFloat(): boolean { @HostBinding('class.floating') public get shouldLabelFloat(): boolean {
return this.focused || !this.empty; return this.focused || !this.empty;

View File

@ -9,7 +9,8 @@ export function isBaseModelWithAgendaItemAndListOfSpeakers(obj: any): obj is Bas
/** /**
* A base model with an agenda item and a list of speakers. * A base model with an agenda item and a list of speakers.
*/ */
export abstract class BaseModelWithAgendaItemAndListOfSpeakers<T = object> extends BaseModel<T> export abstract class BaseModelWithAgendaItemAndListOfSpeakers<T = object>
extends BaseModel<T>
implements BaseModelWithAgendaItem<T>, BaseModelWithListOfSpeakers<T> { implements BaseModelWithAgendaItem<T>, BaseModelWithListOfSpeakers<T> {
public agenda_item_id: number; public agenda_item_id: number;
public list_of_speakers_id: number; public list_of_speakers_id: number;

View File

@ -10,7 +10,7 @@ import { ListOfSpeakersRepositoryService } from 'app/core/repositories/agenda/li
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { ViewportService } from 'app/core/ui-services/viewport.service'; import { ViewportService } from 'app/core/ui-services/viewport.service';
import { ListOfSpeakersContentComponent } from 'app/shared/components/list-of-speakers-content/list-of-speakers-content.component'; import { ListOfSpeakersContentComponent } from 'app/shared/components/list-of-speakers-content/list-of-speakers-content.component';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ProjectorElementBuildDeskriptor } from 'app/site/base/projectable'; import { ProjectorElementBuildDeskriptor } from 'app/site/base/projectable';
import { ViewProjector } from 'app/site/projector/models/view-projector'; import { ViewProjector } from 'app/site/projector/models/view-projector';
import { CurrentListOfSpeakersSlideService } from 'app/site/projector/services/current-list-of-speakers-slide.service'; import { CurrentListOfSpeakersSlideService } from 'app/site/projector/services/current-list-of-speakers-slide.service';
@ -25,9 +25,10 @@ import { ViewListOfSpeakers } from '../../models/view-list-of-speakers';
templateUrl: './list-of-speakers.component.html', templateUrl: './list-of-speakers.component.html',
styleUrls: ['./list-of-speakers.component.scss'] styleUrls: ['./list-of-speakers.component.scss']
}) })
export class ListOfSpeakersComponent extends BaseViewComponent implements OnInit { export class ListOfSpeakersComponent extends BaseViewComponentDirective implements OnInit {
@ViewChild('content') @ViewChild('content')
private listOfSpeakersContentComponent: ListOfSpeakersContentComponent; private listOfSpeakersContentComponent: ListOfSpeakersContentComponent;
/** /**
* Determine if the user is viewing the current list if speakers * Determine if the user is viewing the current list if speakers
*/ */

View File

@ -10,7 +10,8 @@ export interface ItemTitleInformation {
title_information: object; title_information: object;
} }
export class ViewItem extends BaseViewModelWithContentObject<Item, BaseViewModelWithAgendaItem> export class ViewItem
extends BaseViewModelWithContentObject<Item, BaseViewModelWithAgendaItem>
implements ItemTitleInformation { implements ItemTitleInformation {
public static COLLECTIONSTRING = Item.COLLECTIONSTRING; public static COLLECTIONSTRING = Item.COLLECTIONSTRING;
protected _collectionString = Item.COLLECTIONSTRING; protected _collectionString = Item.COLLECTIONSTRING;

View File

@ -15,7 +15,8 @@ export interface ListOfSpeakersTitleInformation {
/** /**
* TODO: Resolve potential circular dependencies with {@link BaseViewModelWithListOfSpeakers}. * TODO: Resolve potential circular dependencies with {@link BaseViewModelWithListOfSpeakers}.
*/ */
export class ViewListOfSpeakers extends BaseViewModelWithContentObject<ListOfSpeakers, BaseViewModelWithListOfSpeakers> export class ViewListOfSpeakers
extends BaseViewModelWithContentObject<ListOfSpeakers, BaseViewModelWithListOfSpeakers>
implements ListOfSpeakersTitleInformation, Projectable { implements ListOfSpeakersTitleInformation, Projectable {
public static COLLECTIONSTRING = ListOfSpeakers.COLLECTIONSTRING; public static COLLECTIONSTRING = ListOfSpeakers.COLLECTIONSTRING;
protected _collectionString = ListOfSpeakers.COLLECTIONSTRING; protected _collectionString = ListOfSpeakers.COLLECTIONSTRING;

View File

@ -16,7 +16,7 @@ import { UserRepositoryService } from 'app/core/repositories/users/user-reposito
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { Assignment } from 'app/shared/models/assignments/assignment'; import { Assignment } from 'app/shared/models/assignments/assignment';
import { ViewItem } from 'app/site/agenda/models/view-item'; import { ViewItem } from 'app/site/agenda/models/view-item';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile'; import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile';
import { LocalPermissionsService } from 'app/site/motions/services/local-permissions.service'; import { LocalPermissionsService } from 'app/site/motions/services/local-permissions.service';
import { ViewTag } from 'app/site/tags/models/view-tag'; import { ViewTag } from 'app/site/tags/models/view-tag';
@ -36,7 +36,7 @@ import { ViewAssignmentRelatedUser } from '../../models/view-assignment-related-
templateUrl: './assignment-detail.component.html', templateUrl: './assignment-detail.component.html',
styleUrls: ['./assignment-detail.component.scss'] styleUrls: ['./assignment-detail.component.scss']
}) })
export class AssignmentDetailComponent extends BaseViewComponent implements OnInit { export class AssignmentDetailComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* Determines if the assignment is new * Determines if the assignment is new
*/ */

View File

@ -32,7 +32,8 @@ export const AssignmentPollPercentBaseVerbose = {
disabled: _('Disabled (no percents)') disabled: _('Disabled (no percents)')
}; };
export class ViewAssignmentPoll extends ViewBasePoll<AssignmentPoll, AssignmentPollMethod, AssignmentPollPercentBase> export class ViewAssignmentPoll
extends ViewBasePoll<AssignmentPoll, AssignmentPollMethod, AssignmentPollPercentBase>
implements AssignmentPollTitleInformation { implements AssignmentPollTitleInformation {
public static COLLECTIONSTRING = AssignmentPoll.COLLECTIONSTRING; public static COLLECTIONSTRING = AssignmentPoll.COLLECTIONSTRING;
protected _collectionString = AssignmentPoll.COLLECTIONSTRING; protected _collectionString = AssignmentPoll.COLLECTIONSTRING;

View File

@ -37,7 +37,8 @@ export const AssignmentPhases: { name: string; value: number; display_name: stri
} }
]; ];
export class ViewAssignment extends BaseViewModelWithAgendaItemAndListOfSpeakers<Assignment> export class ViewAssignment
extends BaseViewModelWithAgendaItemAndListOfSpeakers<Assignment>
implements AssignmentTitleInformation { implements AssignmentTitleInformation {
public static COLLECTIONSTRING = Assignment.COLLECTIONSTRING; public static COLLECTIONSTRING = Assignment.COLLECTIONSTRING;
protected _collectionString = Assignment.COLLECTIONSTRING; protected _collectionString = Assignment.COLLECTIONSTRING;

View File

@ -14,7 +14,7 @@ import { ConfigService } from 'app/core/ui-services/config.service';
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { VoteValue } from 'app/shared/models/poll/base-vote'; import { VoteValue } from 'app/shared/models/poll/base-vote';
import { ViewAssignmentPoll } from 'app/site/assignments/models/view-assignment-poll'; import { ViewAssignmentPoll } from 'app/site/assignments/models/view-assignment-poll';
import { BasePollDetailComponent } from 'app/site/polls/components/base-poll-detail.component'; import { BasePollDetailComponentDirective } from 'app/site/polls/components/base-poll-detail.component';
import { AssignmentPollDialogService } from '../../services/assignment-poll-dialog.service'; import { AssignmentPollDialogService } from '../../services/assignment-poll-dialog.service';
import { AssignmentPollService } from '../../services/assignment-poll.service'; import { AssignmentPollService } from '../../services/assignment-poll.service';
@ -24,7 +24,10 @@ import { AssignmentPollService } from '../../services/assignment-poll.service';
styleUrls: ['./assignment-poll-detail.component.scss'], styleUrls: ['./assignment-poll-detail.component.scss'],
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class AssignmentPollDetailComponent extends BasePollDetailComponent<ViewAssignmentPoll, AssignmentPollService> { export class AssignmentPollDetailComponent extends BasePollDetailComponentDirective<
ViewAssignmentPoll,
AssignmentPollService
> {
public columnDefinitionSingleVotes: PblColumnDefinition[]; public columnDefinitionSingleVotes: PblColumnDefinition[];
public filterProps = ['user.getFullName']; public filterProps = ['user.getFullName'];

View File

@ -30,7 +30,8 @@ type OptionsObject = { user_id: number; user: ViewUser }[];
templateUrl: './assignment-poll-dialog.component.html', templateUrl: './assignment-poll-dialog.component.html',
styleUrls: ['./assignment-poll-dialog.component.scss'] styleUrls: ['./assignment-poll-dialog.component.scss']
}) })
export class AssignmentPollDialogComponent extends BasePollDialogComponent<ViewAssignmentPoll, AssignmentPollService> export class AssignmentPollDialogComponent
extends BasePollDialogComponent<ViewAssignmentPoll, AssignmentPollService>
implements OnInit { implements OnInit {
/** /**
* The summary values that will have fields in the dialog * The summary values that will have fields in the dialog

View File

@ -16,7 +16,7 @@ import { AssignmentPollMethod } from 'app/shared/models/assignments/assignment-p
import { PollType } from 'app/shared/models/poll/base-poll'; import { PollType } from 'app/shared/models/poll/base-poll';
import { VoteValue } from 'app/shared/models/poll/base-vote'; import { VoteValue } from 'app/shared/models/poll/base-vote';
import { ViewAssignmentPoll } from 'app/site/assignments/models/view-assignment-poll'; import { ViewAssignmentPoll } from 'app/site/assignments/models/view-assignment-poll';
import { BasePollVoteComponent } from 'app/site/polls/components/base-poll-vote.component'; import { BasePollVoteComponentDirective } from 'app/site/polls/components/base-poll-vote.component';
// TODO: Duplicate // TODO: Duplicate
interface VoteActions { interface VoteActions {
@ -32,7 +32,7 @@ interface VoteActions {
styleUrls: ['./assignment-poll-vote.component.scss'], styleUrls: ['./assignment-poll-vote.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class AssignmentPollVoteComponent extends BasePollVoteComponent<ViewAssignmentPoll> implements OnInit { export class AssignmentPollVoteComponent extends BasePollVoteComponentDirective<ViewAssignmentPoll> implements OnInit {
public AssignmentPollMethod = AssignmentPollMethod; public AssignmentPollMethod = AssignmentPollMethod;
public PollType = PollType; public PollType = PollType;
public voteActions: VoteActions[] = []; public voteActions: VoteActions[] = [];

View File

@ -24,7 +24,8 @@ import { AssignmentPollService } from '../../services/assignment-poll.service';
templateUrl: './assignment-poll.component.html', templateUrl: './assignment-poll.component.html',
styleUrls: ['./assignment-poll.component.scss'] styleUrls: ['./assignment-poll.component.scss']
}) })
export class AssignmentPollComponent extends BasePollComponent<ViewAssignmentPoll, AssignmentPollService> export class AssignmentPollComponent
extends BasePollComponent<ViewAssignmentPoll, AssignmentPollService>
implements OnInit { implements OnInit {
@Input() @Input()
public set poll(value: ViewAssignmentPoll) { public set poll(value: ViewAssignmentPoll) {

View File

@ -11,10 +11,11 @@ import { auditTime, distinctUntilChanged } from 'rxjs/operators';
import { BaseImportService, NewEntry, ValueLabelCombination } from 'app/core/ui-services/base-import.service'; import { BaseImportService, NewEntry, ValueLabelCombination } from 'app/core/ui-services/base-import.service';
import { BaseModel } from 'app/shared/models/base/base-model'; import { BaseModel } from 'app/shared/models/base/base-model';
import { getLongPreview, getShortPreview } from 'app/shared/utils/previewStrings'; import { getLongPreview, getShortPreview } from 'app/shared/utils/previewStrings';
import { BaseViewComponent } from './base-view'; import { BaseViewComponentDirective } from './base-view';
@Directive() @Directive()
export abstract class BaseImportListComponentDirective<M extends BaseModel> extends BaseViewComponent export abstract class BaseImportListComponentDirective<M extends BaseModel>
extends BaseViewComponentDirective
implements OnInit { implements OnInit {
/** /**
* The data source for a table. Requires to be initialised with a BaseViewModel * The data source for a table. Requires to be initialised with a BaseViewModel

View File

@ -6,10 +6,12 @@ import { TranslateService } from '@ngx-translate/core';
import { PblColumnDefinition, PblDataSource } from '@pebula/ngrid'; import { PblColumnDefinition, PblDataSource } from '@pebula/ngrid';
import { StorageService } from 'app/core/core-services/storage.service'; import { StorageService } from 'app/core/core-services/storage.service';
import { BaseViewComponent } from './base-view'; import { BaseViewComponentDirective } from './base-view';
import { BaseViewModel } from './base-view-model'; import { BaseViewModel } from './base-view-model';
export abstract class BaseListViewComponent<V extends BaseViewModel> extends BaseViewComponent implements OnDestroy { export abstract class BaseListViewComponent<V extends BaseViewModel>
extends BaseViewComponentDirective
implements OnDestroy {
/** /**
* The source of the table data, will be filled by an event emitter * The source of the table data, will be filled by an event emitter
*/ */

View File

@ -7,7 +7,8 @@ import { Projectable, ProjectorElementBuildDeskriptor } from './projectable';
/** /**
* Base view class for projectable models. * Base view class for projectable models.
*/ */
export abstract class BaseProjectableViewModel<M extends BaseModel = any> extends BaseViewModel<M> export abstract class BaseProjectableViewModel<M extends BaseModel = any>
extends BaseViewModel<M>
implements Projectable { implements Projectable {
public abstract getSlide(configService?: ConfigService): ProjectorElementBuildDeskriptor; public abstract getSlide(configService?: ConfigService): ProjectorElementBuildDeskriptor;

View File

@ -1,4 +1,4 @@
import { OnDestroy } from '@angular/core'; import { Directive, OnDestroy } from '@angular/core';
import { MatSnackBar, MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar'; import { MatSnackBar, MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar';
import { Title } from '@angular/platform-browser'; import { Title } from '@angular/platform-browser';
@ -12,7 +12,8 @@ import { BaseComponent } from '../../base.component';
* with the error. The error is dismissed, if the component is destroyed, so if the * with the error. The error is dismissed, if the component is destroyed, so if the
* view is leaved. * view is leaved.
*/ */
export abstract class BaseViewComponent extends BaseComponent implements OnDestroy { @Directive()
export abstract class BaseViewComponentDirective extends BaseComponent implements OnDestroy {
/** /**
* A reference to the current error snack bar. * A reference to the current error snack bar.
*/ */

View File

@ -9,7 +9,7 @@ import { PromptService } from 'app/core/ui-services/prompt.service';
import { SortingTreeComponent } from 'app/shared/components/sorting-tree/sorting-tree.component'; import { SortingTreeComponent } from 'app/shared/components/sorting-tree/sorting-tree.component';
import { Identifiable } from 'app/shared/models/base/identifiable'; import { Identifiable } from 'app/shared/models/base/identifiable';
import { CanComponentDeactivate } from 'app/shared/utils/watch-for-changes.guard'; import { CanComponentDeactivate } from 'app/shared/utils/watch-for-changes.guard';
import { BaseViewComponent } from './base-view'; import { BaseViewComponentDirective } from './base-view';
import { BaseViewModel } from './base-view-model'; import { BaseViewModel } from './base-view-model';
export interface SortTreeFilterOption extends Identifiable { export interface SortTreeFilterOption extends Identifiable {
@ -22,7 +22,8 @@ export interface SortTreeFilterOption extends Identifiable {
* Abstract Sort view for hierarchic item trees * Abstract Sort view for hierarchic item trees
*/ */
@Directive() @Directive()
export abstract class SortTreeViewComponentDirective<V extends BaseViewModel> extends BaseViewComponent export abstract class SortTreeViewComponentDirective<V extends BaseViewModel>
extends BaseViewComponentDirective
implements CanComponentDeactivate { implements CanComponentDeactivate {
/** /**
* Reference to the view child * Reference to the view child

View File

@ -11,7 +11,7 @@ import { DetailNavigable, isDetailNavigable } from 'app/shared/models/base/detai
import { ProjectorElement } from 'app/shared/models/core/projector'; import { ProjectorElement } from 'app/shared/models/core/projector';
import { ViewListOfSpeakers } from 'app/site/agenda/models/view-list-of-speakers'; import { ViewListOfSpeakers } from 'app/site/agenda/models/view-list-of-speakers';
import { BaseProjectableViewModel } from 'app/site/base/base-projectable-view-model'; import { BaseProjectableViewModel } from 'app/site/base/base-projectable-view-model';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewProjector } from 'app/site/projector/models/view-projector'; import { ViewProjector } from 'app/site/projector/models/view-projector';
import { CurrentListOfSpeakersService } from 'app/site/projector/services/current-list-of-speakers.service'; import { CurrentListOfSpeakersService } from 'app/site/projector/services/current-list-of-speakers.service';
@ -20,7 +20,7 @@ import { CurrentListOfSpeakersService } from 'app/site/projector/services/curren
templateUrl: './cinema.component.html', templateUrl: './cinema.component.html',
styleUrls: ['./cinema.component.scss'] styleUrls: ['./cinema.component.scss']
}) })
export class CinemaComponent extends BaseViewComponent implements OnInit { export class CinemaComponent extends BaseViewComponentDirective implements OnInit {
public listOfSpeakers: ViewListOfSpeakers; public listOfSpeakers: ViewListOfSpeakers;
public projector: ViewProjector; public projector: ViewProjector;
private currentProjectorElement: ProjectorElement; private currentProjectorElement: ProjectorElement;

View File

@ -5,7 +5,7 @@ import { Title } from '@angular/platform-browser';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { BaseViewModel } from 'app/site/base/base-view-model'; import { BaseViewModel } from 'app/site/base/base-view-model';
import { ViewBasePoll } from 'app/site/polls/models/view-base-poll'; import { ViewBasePoll } from 'app/site/polls/models/view-base-poll';
import { PollListObservableService } from 'app/site/polls/services/poll-list-observable.service'; import { PollListObservableService } from 'app/site/polls/services/poll-list-observable.service';
@ -15,7 +15,7 @@ import { PollListObservableService } from 'app/site/polls/services/poll-list-obs
templateUrl: './poll-collection.component.html', templateUrl: './poll-collection.component.html',
styleUrls: ['./poll-collection.component.scss'] styleUrls: ['./poll-collection.component.scss']
}) })
export class PollCollectionComponent extends BaseViewComponent implements OnInit { export class PollCollectionComponent extends BaseViewComponentDirective implements OnInit {
public polls: ViewBasePoll[]; public polls: ViewBasePoll[];
@Input() @Input()

View File

@ -9,13 +9,13 @@ import { OpenSlidesService } from 'app/core/core-services/openslides.service';
import { OperatorService, Permission } from 'app/core/core-services/operator.service'; import { OperatorService, Permission } from 'app/core/core-services/operator.service';
import { ConfigRepositoryService } from 'app/core/repositories/config/config-repository.service'; import { ConfigRepositoryService } from 'app/core/repositories/config/config-repository.service';
import { UpdateService } from 'app/core/ui-services/update.service'; import { UpdateService } from 'app/core/ui-services/update.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
@Component({ @Component({
selector: 'os-legal-notice', selector: 'os-legal-notice',
templateUrl: './legal-notice.component.html' templateUrl: './legal-notice.component.html'
}) })
export class LegalNoticeComponent extends BaseViewComponent implements OnInit { export class LegalNoticeComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* Whether this component is in editing-mode. * Whether this component is in editing-mode.
*/ */

View File

@ -6,14 +6,14 @@ import { TranslateService } from '@ngx-translate/core';
import { OperatorService, Permission } from 'app/core/core-services/operator.service'; import { OperatorService, Permission } from 'app/core/core-services/operator.service';
import { ConfigRepositoryService } from 'app/core/repositories/config/config-repository.service'; import { ConfigRepositoryService } from 'app/core/repositories/config/config-repository.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
@Component({ @Component({
selector: 'os-privacy-policy', selector: 'os-privacy-policy',
templateUrl: './privacy-policy.component.html', templateUrl: './privacy-policy.component.html',
styleUrls: ['./privacy-policy.component.scss'] styleUrls: ['./privacy-policy.component.scss']
}) })
export class PrivacyPolicyComponent extends BaseViewComponent implements OnInit { export class PrivacyPolicyComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* Whether the component is in editing-mode. * Whether the component is in editing-mode.
*/ */

View File

@ -8,7 +8,7 @@ import { TranslateService } from '@ngx-translate/core'; // showcase
import { OperatorService, Permission } from 'app/core/core-services/operator.service'; import { OperatorService, Permission } from 'app/core/core-services/operator.service';
import { ConfigRepositoryService } from 'app/core/repositories/config/config-repository.service'; import { ConfigRepositoryService } from 'app/core/repositories/config/config-repository.service';
import { ConfigService } from 'app/core/ui-services/config.service'; import { ConfigService } from 'app/core/ui-services/config.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
/** /**
* Interface describes the keys for the fields at start-component. * Interface describes the keys for the fields at start-component.
@ -26,7 +26,7 @@ interface IStartContent {
templateUrl: './start.component.html', templateUrl: './start.component.html',
styleUrls: ['./start.component.scss'] styleUrls: ['./start.component.scss']
}) })
export class StartComponent extends BaseViewComponent implements OnInit { export class StartComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* Whether the user is editing the content. * Whether the user is editing the content.
*/ */

View File

@ -12,7 +12,7 @@ import {
} from 'app/core/repositories/agenda/list-of-speakers-repository.service'; } from 'app/core/repositories/agenda/list-of-speakers-repository.service';
import { DurationService } from 'app/core/ui-services/duration.service'; import { DurationService } from 'app/core/ui-services/duration.service';
import { ViewSpeaker } from 'app/site/agenda/models/view-speaker'; import { ViewSpeaker } from 'app/site/agenda/models/view-speaker';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
@Component({ @Component({
selector: 'os-user-statistics', selector: 'os-user-statistics',
@ -21,7 +21,7 @@ import { BaseViewComponent } from 'app/site/base/base-view';
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class UserStatisticsComponent extends BaseViewComponent { export class UserStatisticsComponent extends BaseViewComponentDirective {
/** /**
* Returns the total duration for a whole assembly. * Returns the total duration for a whole assembly.
*/ */

View File

@ -20,7 +20,7 @@ import { isDetailNavigable } from 'app/shared/models/base/detail-navigable';
import { History } from 'app/shared/models/core/history'; import { History } from 'app/shared/models/core/history';
import { Motion } from 'app/shared/models/motions/motion'; import { Motion } from 'app/shared/models/motions/motion';
import { langToLocale } from 'app/shared/utils/lang-to-locale'; import { langToLocale } from 'app/shared/utils/lang-to-locale';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { BaseViewModel } from 'app/site/base/base-view-model'; import { BaseViewModel } from 'app/site/base/base-view-model';
import { ViewUser } from 'app/site/users/models/view-user'; import { ViewUser } from 'app/site/users/models/view-user';
@ -34,7 +34,7 @@ import { ViewUser } from 'app/site/users/models/view-user';
templateUrl: './history-list.component.html', templateUrl: './history-list.component.html',
styleUrls: ['./history-list.component.scss'] styleUrls: ['./history-list.component.scss']
}) })
export class HistoryListComponent extends BaseViewComponent implements OnInit { export class HistoryListComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* Subject determine when the custom timestamp subject changes * Subject determine when the custom timestamp subject changes
*/ */

View File

@ -14,7 +14,7 @@ import { LoginDataService } from 'app/core/ui-services/login-data.service';
import { OverlayService } from 'app/core/ui-services/overlay.service'; import { OverlayService } from 'app/core/ui-services/overlay.service';
import { UserAuthType } from 'app/shared/models/users/user'; import { UserAuthType } from 'app/shared/models/users/user';
import { ParentErrorStateMatcher } from 'app/shared/parent-error-state-matcher'; import { ParentErrorStateMatcher } from 'app/shared/parent-error-state-matcher';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { BrowserSupportService } from '../../services/browser-support.service'; import { BrowserSupportService } from '../../services/browser-support.service';
/** /**
@ -27,7 +27,7 @@ import { BrowserSupportService } from '../../services/browser-support.service';
templateUrl: './login-mask.component.html', templateUrl: './login-mask.component.html',
styleUrls: ['./login-mask.component.scss'] styleUrls: ['./login-mask.component.scss']
}) })
export class LoginMaskComponent extends BaseViewComponent implements OnInit, OnDestroy { export class LoginMaskComponent extends BaseViewComponentDirective implements OnInit, OnDestroy {
/** /**
* Show or hide password and change the indicator accordingly * Show or hide password and change the indicator accordingly
*/ */

View File

@ -8,7 +8,7 @@ import { TranslateService } from '@ngx-translate/core';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';
import { HttpService } from 'app/core/core-services/http.service'; import { HttpService } from 'app/core/core-services/http.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
/** /**
* Reset password component. * Reset password component.
@ -19,7 +19,7 @@ import { BaseViewComponent } from 'app/site/base/base-view';
templateUrl: './reset-password.component.html', templateUrl: './reset-password.component.html',
styleUrls: ['../../assets/reset-password-pages.scss'] styleUrls: ['../../assets/reset-password-pages.scss']
}) })
export class ResetPasswordComponent extends BaseViewComponent implements OnInit { export class ResetPasswordComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* THis form holds one control for the email. * THis form holds one control for the email.
*/ */

View File

@ -2,8 +2,6 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { DeviceDetectorModule } from 'ngx-device-detector';
import { LoginLegalNoticeComponent } from './components/login-legal-notice/login-legal-notice.component'; import { LoginLegalNoticeComponent } from './components/login-legal-notice/login-legal-notice.component';
import { LoginMaskComponent } from './components/login-mask/login-mask.component'; import { LoginMaskComponent } from './components/login-mask/login-mask.component';
import { LoginPrivacyPolicyComponent } from './components/login-privacy-policy/login-privacy-policy.component'; import { LoginPrivacyPolicyComponent } from './components/login-privacy-policy/login-privacy-policy.component';
@ -14,7 +12,7 @@ import { SharedModule } from '../../shared/shared.module';
import { UnsupportedBrowserComponent } from './components/unsupported-browser/unsupported-browser.component'; import { UnsupportedBrowserComponent } from './components/unsupported-browser/unsupported-browser.component';
@NgModule({ @NgModule({
imports: [CommonModule, RouterModule, SharedModule, DeviceDetectorModule], imports: [CommonModule, RouterModule, SharedModule],
declarations: [ declarations: [
LoginWrapperComponent, LoginWrapperComponent,
ResetPasswordComponent, ResetPasswordComponent,

View File

@ -7,7 +7,7 @@ import { ActivatedRoute } from '@angular/router';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { MediafileRepositoryService } from 'app/core/repositories/mediafiles/mediafile-repository.service'; import { MediafileRepositoryService } from 'app/core/repositories/mediafiles/mediafile-repository.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
/** /**
* Handle file uploads from user * Handle file uploads from user
@ -17,7 +17,7 @@ import { BaseViewComponent } from 'app/site/base/base-view';
templateUrl: './media-upload.component.html', templateUrl: './media-upload.component.html',
styleUrls: ['./media-upload.component.scss'] styleUrls: ['./media-upload.component.scss']
}) })
export class MediaUploadComponent extends BaseViewComponent implements OnInit { export class MediaUploadComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* Determine if uploading should happen parallel or synchronously. * Determine if uploading should happen parallel or synchronously.
* Synchronous uploading might be necessary if we see that stuff breaks * Synchronous uploading might be necessary if we see that stuff breaks

View File

@ -26,7 +26,8 @@ export interface MediafileTitleInformation {
title: string; title: string;
} }
export class ViewMediafile extends BaseViewModelWithListOfSpeakers<Mediafile> export class ViewMediafile
extends BaseViewModelWithListOfSpeakers<Mediafile>
implements MediafileTitleInformation, Searchable { implements MediafileTitleInformation, Searchable {
public static COLLECTIONSTRING = Mediafile.COLLECTIONSTRING; public static COLLECTIONSTRING = Mediafile.COLLECTIONSTRING;
protected _collectionString = Mediafile.COLLECTIONSTRING; protected _collectionString = Mediafile.COLLECTIONSTRING;

View File

@ -14,7 +14,8 @@ export interface MotionBlockTitleInformation extends TitleInformationWithAgendaI
* ViewModel for motion blocks. * ViewModel for motion blocks.
* @ignore * @ignore
*/ */
export class ViewMotionBlock extends BaseViewModelWithAgendaItemAndListOfSpeakers export class ViewMotionBlock
extends BaseViewModelWithAgendaItemAndListOfSpeakers
implements MotionBlockTitleInformation, Searchable { implements MotionBlockTitleInformation, Searchable {
public static COLLECTIONSTRING = MotionBlock.COLLECTIONSTRING; public static COLLECTIONSTRING = MotionBlock.COLLECTIONSTRING;
protected _collectionString = MotionBlock.COLLECTIONSTRING; protected _collectionString = MotionBlock.COLLECTIONSTRING;

View File

@ -12,7 +12,8 @@ export type MotionChangeRecommendationTitleInformation = object;
* Provides "safe" access to variables and functions in {@link MotionChangeRecommendation} * Provides "safe" access to variables and functions in {@link MotionChangeRecommendation}
* @ignore * @ignore
*/ */
export class ViewMotionChangeRecommendation extends BaseViewModel<MotionChangeRecommendation> export class ViewMotionChangeRecommendation
extends BaseViewModel<MotionChangeRecommendation>
implements MotionChangeRecommendationTitleInformation, ViewUnifiedChange { implements MotionChangeRecommendationTitleInformation, ViewUnifiedChange {
public static COLLECTIONSTRING = MotionChangeRecommendation.COLLECTIONSTRING; public static COLLECTIONSTRING = MotionChangeRecommendation.COLLECTIONSTRING;
protected _collectionString = MotionChangeRecommendation.COLLECTIONSTRING; protected _collectionString = MotionChangeRecommendation.COLLECTIONSTRING;

View File

@ -13,7 +13,8 @@ export interface MotionCommentSectionTitleInformation {
* Provides "safe" access to variables and functions in {@link MotionCommentSection} * Provides "safe" access to variables and functions in {@link MotionCommentSection}
* @ignore * @ignore
*/ */
export class ViewMotionCommentSection extends BaseViewModel<MotionCommentSection> export class ViewMotionCommentSection
extends BaseViewModel<MotionCommentSection>
implements MotionCommentSectionTitleInformation { implements MotionCommentSectionTitleInformation {
public static COLLECTIONSTRING = MotionCommentSection.COLLECTIONSTRING; public static COLLECTIONSTRING = MotionCommentSection.COLLECTIONSTRING;
protected _collectionString = MotionCommentSection.COLLECTIONSTRING; protected _collectionString = MotionCommentSection.COLLECTIONSTRING;

View File

@ -23,7 +23,8 @@ export const MotionPollPercentBaseVerbose = {
disabled: 'Disabled (no percents)' disabled: 'Disabled (no percents)'
}; };
export class ViewMotionPoll extends ViewBasePoll<MotionPoll, MotionPollMethod, PercentBase> export class ViewMotionPoll
extends ViewBasePoll<MotionPoll, MotionPollMethod, PercentBase>
implements MotionPollTitleInformation { implements MotionPollTitleInformation {
public static COLLECTIONSTRING = MotionPoll.COLLECTIONSTRING; public static COLLECTIONSTRING = MotionPoll.COLLECTIONSTRING;
protected _collectionString = MotionPoll.COLLECTIONSTRING; protected _collectionString = MotionPoll.COLLECTIONSTRING;

View File

@ -35,7 +35,8 @@ export interface MotionTitleInformation extends TitleInformationWithAgendaItem {
* Provides "safe" access to variables and functions in {@link Motion} * Provides "safe" access to variables and functions in {@link Motion}
* @ignore * @ignore
*/ */
export class ViewMotion extends BaseViewModelWithAgendaItemAndListOfSpeakers<Motion> export class ViewMotion
extends BaseViewModelWithAgendaItemAndListOfSpeakers<Motion>
implements MotionTitleInformation, Searchable { implements MotionTitleInformation, Searchable {
public get motion(): Motion { public get motion(): Motion {
return this._model; return this._model;

View File

@ -14,7 +14,8 @@ export interface StatuteParagraphTitleInformation {
* Provides "safe" access to variables and functions in {@link StatuteParagraph} * Provides "safe" access to variables and functions in {@link StatuteParagraph}
* @ignore * @ignore
*/ */
export class ViewStatuteParagraph extends BaseViewModel<StatuteParagraph> export class ViewStatuteParagraph
extends BaseViewModel<StatuteParagraph>
implements StatuteParagraphTitleInformation, Searchable { implements StatuteParagraphTitleInformation, Searchable {
public static COLLECTIONSTRING = StatuteParagraph.COLLECTIONSTRING; public static COLLECTIONSTRING = StatuteParagraph.COLLECTIONSTRING;
protected _collectionString = StatuteParagraph.COLLECTIONSTRING; protected _collectionString = StatuteParagraph.COLLECTIONSTRING;

View File

@ -9,7 +9,7 @@ import { CategoryRepositoryService } from 'app/core/repositories/motions/categor
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { SortingTreeComponent } from 'app/shared/components/sorting-tree/sorting-tree.component'; import { SortingTreeComponent } from 'app/shared/components/sorting-tree/sorting-tree.component';
import { CanComponentDeactivate } from 'app/shared/utils/watch-for-changes.guard'; import { CanComponentDeactivate } from 'app/shared/utils/watch-for-changes.guard';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewCategory } from 'app/site/motions/models/view-category'; import { ViewCategory } from 'app/site/motions/models/view-category';
/** /**
@ -20,7 +20,7 @@ import { ViewCategory } from 'app/site/motions/models/view-category';
templateUrl: './categories-sort.component.html', templateUrl: './categories-sort.component.html',
styleUrls: ['./categories-sort.component.scss'] styleUrls: ['./categories-sort.component.scss']
}) })
export class CategoriesSortComponent extends BaseViewComponent implements CanComponentDeactivate { export class CategoriesSortComponent extends BaseViewComponentDirective implements CanComponentDeactivate {
/** /**
* Reference to the sorting tree. * Reference to the sorting tree.
*/ */

View File

@ -13,7 +13,7 @@ import { CategoryRepositoryService } from 'app/core/repositories/motions/categor
import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service';
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { infoDialogSettings } from 'app/shared/utils/dialog-settings'; import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewCategory } from 'app/site/motions/models/view-category'; import { ViewCategory } from 'app/site/motions/models/view-category';
import { ViewMotion } from 'app/site/motions/models/view-motion'; import { ViewMotion } from 'app/site/motions/models/view-motion';
@ -25,7 +25,7 @@ import { ViewMotion } from 'app/site/motions/models/view-motion';
templateUrl: './category-detail.component.html', templateUrl: './category-detail.component.html',
styleUrls: ['./category-detail.component.scss'] styleUrls: ['./category-detail.component.scss']
}) })
export class CategoryDetailComponent extends BaseViewComponent implements OnInit { export class CategoryDetailComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* The one selected category * The one selected category
*/ */

View File

@ -12,7 +12,7 @@ import { ChoiceService } from 'app/core/ui-services/choice.service';
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { SortingListComponent } from 'app/shared/components/sorting-list/sorting-list.component'; import { SortingListComponent } from 'app/shared/components/sorting-list/sorting-list.component';
import { CanComponentDeactivate } from 'app/shared/utils/watch-for-changes.guard'; import { CanComponentDeactivate } from 'app/shared/utils/watch-for-changes.guard';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewCategory } from 'app/site/motions/models/view-category'; import { ViewCategory } from 'app/site/motions/models/view-category';
import { ViewMotion } from 'app/site/motions/models/view-motion'; import { ViewMotion } from 'app/site/motions/models/view-motion';
@ -26,7 +26,7 @@ import { ViewMotion } from 'app/site/motions/models/view-motion';
templateUrl: './category-motions-sort.component.html', templateUrl: './category-motions-sort.component.html',
styleUrls: ['./category-motions-sort.component.scss'] styleUrls: ['./category-motions-sort.component.scss']
}) })
export class CategoryMotionsSortComponent extends BaseViewComponent implements OnInit, CanComponentDeactivate { export class CategoryMotionsSortComponent extends BaseViewComponentDirective implements OnInit, CanComponentDeactivate {
/** /**
* The current category. Determined by the route * The current category. Determined by the route
*/ */

View File

@ -12,7 +12,7 @@ import { GroupRepositoryService } from 'app/core/repositories/users/group-reposi
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { MotionCommentSection } from 'app/shared/models/motions/motion-comment-section'; import { MotionCommentSection } from 'app/shared/models/motions/motion-comment-section';
import { infoDialogSettings } from 'app/shared/utils/dialog-settings'; import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewMotionCommentSection } from 'app/site/motions/models/view-motion-comment-section'; import { ViewMotionCommentSection } from 'app/site/motions/models/view-motion-comment-section';
import { ViewGroup } from 'app/site/users/models/view-group'; import { ViewGroup } from 'app/site/users/models/view-group';
@ -24,7 +24,7 @@ import { ViewGroup } from 'app/site/users/models/view-group';
templateUrl: './motion-comment-section-list.component.html', templateUrl: './motion-comment-section-list.component.html',
styleUrls: ['./motion-comment-section-list.component.scss'] styleUrls: ['./motion-comment-section-list.component.scss']
}) })
export class MotionCommentSectionListComponent extends BaseViewComponent implements OnInit { export class MotionCommentSectionListComponent extends BaseViewComponentDirective implements OnInit {
@ViewChild('motionCommentDialog', { static: true }) @ViewChild('motionCommentDialog', { static: true })
private motionCommentDialog: TemplateRef<string>; private motionCommentDialog: TemplateRef<string>;

View File

@ -5,7 +5,7 @@ import { Title } from '@angular/platform-browser';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { MotionCommentSectionRepositoryService } from 'app/core/repositories/motions/motion-comment-section-repository.service'; import { MotionCommentSectionRepositoryService } from 'app/core/repositories/motions/motion-comment-section-repository.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewMotionCommentSection } from 'app/site/motions/models/view-motion-comment-section'; import { ViewMotionCommentSection } from 'app/site/motions/models/view-motion-comment-section';
/** /**
@ -16,7 +16,7 @@ import { ViewMotionCommentSection } from 'app/site/motions/models/view-motion-co
templateUrl: './motion-comment-section-sort.component.html', templateUrl: './motion-comment-section-sort.component.html',
styleUrls: ['./motion-comment-section-sort.component.scss'] styleUrls: ['./motion-comment-section-sort.component.scss']
}) })
export class MotionCommentSectionSortComponent extends BaseViewComponent implements OnInit { export class MotionCommentSectionSortComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* Holds the models * Holds the models
*/ */

View File

@ -9,7 +9,7 @@ import { TranslateService } from '@ngx-translate/core';
import { MotionRepositoryService, ParagraphToChoose } from 'app/core/repositories/motions/motion-repository.service'; import { MotionRepositoryService, ParagraphToChoose } from 'app/core/repositories/motions/motion-repository.service';
import { ConfigService } from 'app/core/ui-services/config.service'; import { ConfigService } from 'app/core/ui-services/config.service';
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { CreateMotion } from 'app/site/motions/models/create-motion'; import { CreateMotion } from 'app/site/motions/models/create-motion';
import { ViewMotion } from 'app/site/motions/models/view-motion'; import { ViewMotion } from 'app/site/motions/models/view-motion';
@ -22,7 +22,7 @@ import { ViewMotion } from 'app/site/motions/models/view-motion';
styleUrls: ['./amendment-create-wizard.component.scss'], styleUrls: ['./amendment-create-wizard.component.scss'],
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class AmendmentCreateWizardComponent extends BaseViewComponent implements OnInit { export class AmendmentCreateWizardComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* The motion to be amended * The motion to be amended
*/ */

View File

@ -10,7 +10,7 @@ import { ViewModelStoreService } from 'app/core/core-services/view-model-store.s
import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service';
import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service';
import { Selectable } from 'app/shared/components/selectable'; import { Selectable } from 'app/shared/components/selectable';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewMotion } from 'app/site/motions/models/view-motion'; import { ViewMotion } from 'app/site/motions/models/view-motion';
import { LocalPermissionsService } from 'app/site/motions/services/local-permissions.service'; import { LocalPermissionsService } from 'app/site/motions/services/local-permissions.service';
import { ViewUser } from 'app/site/users/models/view-user'; import { ViewUser } from 'app/site/users/models/view-user';
@ -23,7 +23,7 @@ import { ViewUser } from 'app/site/users/models/view-user';
templateUrl: './manage-submitters.component.html', templateUrl: './manage-submitters.component.html',
styleUrls: ['./manage-submitters.component.scss'] styleUrls: ['./manage-submitters.component.scss']
}) })
export class ManageSubmittersComponent extends BaseViewComponent { export class ManageSubmittersComponent extends BaseViewComponentDirective {
/** /**
* The motion, which the personal note belong to. * The motion, which the personal note belong to.
*/ */

View File

@ -8,7 +8,7 @@ import { TranslateService } from '@ngx-translate/core';
import { ChangeRecommendationRepositoryService } from 'app/core/repositories/motions/change-recommendation-repository.service'; import { ChangeRecommendationRepositoryService } from 'app/core/repositories/motions/change-recommendation-repository.service';
import { LineRange, ModificationType } from 'app/core/ui-services/diff.service'; import { LineRange, ModificationType } from 'app/core/ui-services/diff.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewMotionChangeRecommendation } from 'app/site/motions/models/view-motion-change-recommendation'; import { ViewMotionChangeRecommendation } from 'app/site/motions/models/view-motion-change-recommendation';
/** /**
@ -45,7 +45,7 @@ export interface MotionChangeRecommendationDialogComponentData {
templateUrl: './motion-change-recommendation-dialog.component.html', templateUrl: './motion-change-recommendation-dialog.component.html',
styleUrls: ['./motion-change-recommendation-dialog.component.scss'] styleUrls: ['./motion-change-recommendation-dialog.component.scss']
}) })
export class MotionChangeRecommendationDialogComponent extends BaseViewComponent { export class MotionChangeRecommendationDialogComponent extends BaseViewComponentDirective {
/** /**
* Determine if the change recommendation is edited * Determine if the change recommendation is edited
*/ */

View File

@ -8,7 +8,7 @@ import { TranslateService } from '@ngx-translate/core';
import { OperatorService } from 'app/core/core-services/operator.service'; import { OperatorService } from 'app/core/core-services/operator.service';
import { MotionCommentSectionRepositoryService } from 'app/core/repositories/motions/motion-comment-section-repository.service'; import { MotionCommentSectionRepositoryService } from 'app/core/repositories/motions/motion-comment-section-repository.service';
import { MotionComment } from 'app/shared/models/motions/motion'; import { MotionComment } from 'app/shared/models/motions/motion';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewMotion } from 'app/site/motions/models/view-motion'; import { ViewMotion } from 'app/site/motions/models/view-motion';
import { ViewMotionCommentSection } from 'app/site/motions/models/view-motion-comment-section'; import { ViewMotionCommentSection } from 'app/site/motions/models/view-motion-comment-section';
import { MotionPdfExportService } from 'app/site/motions/services/motion-pdf-export.service'; import { MotionPdfExportService } from 'app/site/motions/services/motion-pdf-export.service';
@ -21,7 +21,7 @@ import { MotionPdfExportService } from 'app/site/motions/services/motion-pdf-exp
templateUrl: './motion-comments.component.html', templateUrl: './motion-comments.component.html',
styleUrls: ['./motion-comments.component.scss'] styleUrls: ['./motion-comments.component.scss']
}) })
export class MotionCommentsComponent extends BaseViewComponent implements OnInit { export class MotionCommentsComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* An array of all sections the operator can see. * An array of all sections the operator can see.
*/ */

View File

@ -14,7 +14,7 @@ import { PromptService } from 'app/core/ui-services/prompt.service';
import { ViewUnifiedChange, ViewUnifiedChangeType } from 'app/shared/models/motions/view-unified-change'; import { ViewUnifiedChange, ViewUnifiedChangeType } from 'app/shared/models/motions/view-unified-change';
import { mediumDialogSettings } from 'app/shared/utils/dialog-settings'; import { mediumDialogSettings } from 'app/shared/utils/dialog-settings';
import { getRecommendationTypeName } from 'app/shared/utils/recommendation-type-names'; import { getRecommendationTypeName } from 'app/shared/utils/recommendation-type-names';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewMotion } from 'app/site/motions/models/view-motion'; import { ViewMotion } from 'app/site/motions/models/view-motion';
import { ViewMotionChangeRecommendation } from 'app/site/motions/models/view-motion-change-recommendation'; import { ViewMotionChangeRecommendation } from 'app/site/motions/models/view-motion-change-recommendation';
import { LineNumberingMode } from 'app/site/motions/motions.constants'; import { LineNumberingMode } from 'app/site/motions/motions.constants';
@ -57,7 +57,7 @@ import { ViewMotionAmendedParagraph } from '../../../../models/view-motion-amend
styleUrls: ['./motion-detail-diff.component.scss'], styleUrls: ['./motion-detail-diff.component.scss'],
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class MotionDetailDiffComponent extends BaseViewComponent implements AfterViewInit { export class MotionDetailDiffComponent extends BaseViewComponentDirective implements AfterViewInit {
/** /**
* Get the {@link getRecommendationTypeName}-Function from Utils * Get the {@link getRecommendationTypeName}-Function from Utils
*/ */

View File

@ -40,7 +40,7 @@ import { Mediafile } from 'app/shared/models/mediafiles/mediafile';
import { Motion } from 'app/shared/models/motions/motion'; import { Motion } from 'app/shared/models/motions/motion';
import { ViewUnifiedChange } from 'app/shared/models/motions/view-unified-change'; import { ViewUnifiedChange } from 'app/shared/models/motions/view-unified-change';
import { infoDialogSettings, mediumDialogSettings } from 'app/shared/utils/dialog-settings'; import { infoDialogSettings, mediumDialogSettings } from 'app/shared/utils/dialog-settings';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { CreateMotion } from 'app/site/motions/models/create-motion'; import { CreateMotion } from 'app/site/motions/models/create-motion';
import { ViewCategory } from 'app/site/motions/models/view-category'; import { ViewCategory } from 'app/site/motions/models/view-category';
import { ViewCreateMotion } from 'app/site/motions/models/view-create-motion'; import { ViewCreateMotion } from 'app/site/motions/models/view-create-motion';
@ -87,7 +87,7 @@ import {
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class MotionDetailComponent extends BaseViewComponent implements OnInit, OnDestroy { export class MotionDetailComponent extends BaseViewComponentDirective implements OnInit, OnDestroy {
/** /**
* Motion content. Can be a new version * Motion content. Can be a new version
*/ */

View File

@ -8,7 +8,7 @@ import { TranslateService } from '@ngx-translate/core';
import { ChangeRecommendationRepositoryService } from 'app/core/repositories/motions/change-recommendation-repository.service'; import { ChangeRecommendationRepositoryService } from 'app/core/repositories/motions/change-recommendation-repository.service';
import { ModificationType } from 'app/core/ui-services/diff.service'; import { ModificationType } from 'app/core/ui-services/diff.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewMotionChangeRecommendation } from 'app/site/motions/models/view-motion-change-recommendation'; import { ViewMotionChangeRecommendation } from 'app/site/motions/models/view-motion-change-recommendation';
/** /**
@ -43,7 +43,7 @@ export interface MotionTitleChangeRecommendationDialogComponentData {
styleUrls: ['./motion-title-change-recommendation-dialog.component.scss'], styleUrls: ['./motion-title-change-recommendation-dialog.component.scss'],
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class MotionTitleChangeRecommendationDialogComponent extends BaseViewComponent { export class MotionTitleChangeRecommendationDialogComponent extends BaseViewComponentDirective {
/** /**
* Determine if the change recommendation is edited * Determine if the change recommendation is edited
*/ */

View File

@ -7,7 +7,7 @@ import { TranslateService } from '@ngx-translate/core';
import { PersonalNoteService } from 'app/core/ui-services/personal-note.service'; import { PersonalNoteService } from 'app/core/ui-services/personal-note.service';
import { PersonalNoteContent } from 'app/shared/models/users/personal-note'; import { PersonalNoteContent } from 'app/shared/models/users/personal-note';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewMotion } from 'app/site/motions/models/view-motion'; import { ViewMotion } from 'app/site/motions/models/view-motion';
import { MotionPdfExportService } from 'app/site/motions/services/motion-pdf-export.service'; import { MotionPdfExportService } from 'app/site/motions/services/motion-pdf-export.service';
@ -19,7 +19,7 @@ import { MotionPdfExportService } from 'app/site/motions/services/motion-pdf-exp
templateUrl: './personal-note.component.html', templateUrl: './personal-note.component.html',
styleUrls: ['./personal-note.component.scss'] styleUrls: ['./personal-note.component.scss']
}) })
export class PersonalNoteComponent extends BaseViewComponent { export class PersonalNoteComponent extends BaseViewComponentDirective {
/** /**
* The motion, which the personal note belong to. * The motion, which the personal note belong to.
*/ */

View File

@ -16,7 +16,7 @@ import { ViewMotion } from 'app/site/motions/models/view-motion';
import { ViewMotionPoll } from 'app/site/motions/models/view-motion-poll'; import { ViewMotionPoll } from 'app/site/motions/models/view-motion-poll';
import { MotionPollDialogService } from 'app/site/motions/services/motion-poll-dialog.service'; import { MotionPollDialogService } from 'app/site/motions/services/motion-poll-dialog.service';
import { MotionPollService } from 'app/site/motions/services/motion-poll.service'; import { MotionPollService } from 'app/site/motions/services/motion-poll.service';
import { BasePollDetailComponent } from 'app/site/polls/components/base-poll-detail.component'; import { BasePollDetailComponentDirective } from 'app/site/polls/components/base-poll-detail.component';
@Component({ @Component({
selector: 'os-motion-poll-detail', selector: 'os-motion-poll-detail',
@ -25,7 +25,7 @@ import { BasePollDetailComponent } from 'app/site/polls/components/base-poll-det
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class MotionPollDetailComponent extends BasePollDetailComponent<ViewMotionPoll, MotionPollService> { export class MotionPollDetailComponent extends BasePollDetailComponentDirective<ViewMotionPoll, MotionPollService> {
public motion: ViewMotion; public motion: ViewMotion;
public columnDefinition: PblColumnDefinition[] = [ public columnDefinition: PblColumnDefinition[] = [
{ {

View File

@ -18,7 +18,8 @@ import { PercentBaseVerbose } from 'app/site/polls/models/view-base-poll';
templateUrl: './motion-poll-dialog.component.html', templateUrl: './motion-poll-dialog.component.html',
styleUrls: ['./motion-poll-dialog.component.scss'] styleUrls: ['./motion-poll-dialog.component.scss']
}) })
export class MotionPollDialogComponent extends BasePollDialogComponent<ViewMotionPoll, MotionPollService> export class MotionPollDialogComponent
extends BasePollDialogComponent<ViewMotionPoll, MotionPollService>
implements OnInit { implements OnInit {
public PercentBaseVerbose = PercentBaseVerbose; public PercentBaseVerbose = PercentBaseVerbose;

View File

@ -10,7 +10,7 @@ import { PromptService } from 'app/core/ui-services/prompt.service';
import { VotingService } from 'app/core/ui-services/voting.service'; import { VotingService } from 'app/core/ui-services/voting.service';
import { VoteValue } from 'app/shared/models/poll/base-vote'; import { VoteValue } from 'app/shared/models/poll/base-vote';
import { ViewMotionPoll } from 'app/site/motions/models/view-motion-poll'; import { ViewMotionPoll } from 'app/site/motions/models/view-motion-poll';
import { BasePollVoteComponent } from 'app/site/polls/components/base-poll-vote.component'; import { BasePollVoteComponentDirective } from 'app/site/polls/components/base-poll-vote.component';
interface VoteOption { interface VoteOption {
vote?: VoteValue; vote?: VoteValue;
@ -25,7 +25,7 @@ interface VoteOption {
styleUrls: ['./motion-poll-vote.component.scss'], styleUrls: ['./motion-poll-vote.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class MotionPollVoteComponent extends BasePollVoteComponent<ViewMotionPoll> { export class MotionPollVoteComponent extends BasePollVoteComponentDirective<ViewMotionPoll> {
public currentVote: VoteOption = {}; public currentVote: VoteOption = {};
public voteOptions: VoteOption[] = [ public voteOptions: VoteOption[] = [
{ {

View File

@ -15,7 +15,7 @@ import { WorkflowRepositoryService } from 'app/core/repositories/motions/workflo
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { MergeAmendment, Restriction, State } from 'app/shared/models/motions/state'; import { MergeAmendment, Restriction, State } from 'app/shared/models/motions/state';
import { infoDialogSettings } from 'app/shared/utils/dialog-settings'; import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewState } from 'app/site/motions/models/view-state'; import { ViewState } from 'app/site/motions/models/view-state';
import { ViewWorkflow } from 'app/site/motions/models/view-workflow'; import { ViewWorkflow } from 'app/site/motions/models/view-workflow';
@ -73,7 +73,7 @@ interface RestrictionShape {
styleUrls: ['./workflow-detail.component.scss'], styleUrls: ['./workflow-detail.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class WorkflowDetailComponent extends BaseViewComponent implements OnInit { export class WorkflowDetailComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* Reference to the workflow dialog * Reference to the workflow dialog
*/ */

View File

@ -10,7 +10,7 @@ import { MotionBlockRepositoryService } from 'app/core/repositories/motions/moti
import { TagRepositoryService } from 'app/core/repositories/tags/tag-repository.service'; import { TagRepositoryService } from 'app/core/repositories/tags/tag-repository.service';
import { ConfigService } from 'app/core/ui-services/config.service'; import { ConfigService } from 'app/core/ui-services/config.service';
import { largeDialogSettings } from 'app/shared/utils/dialog-settings'; import { largeDialogSettings } from 'app/shared/utils/dialog-settings';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewCategory } from 'app/site/motions/models/view-category'; import { ViewCategory } from 'app/site/motions/models/view-category';
import { ViewMotion } from 'app/site/motions/models/view-motion'; import { ViewMotion } from 'app/site/motions/models/view-motion';
import { ViewMotionBlock } from 'app/site/motions/models/view-motion-block'; import { ViewMotionBlock } from 'app/site/motions/models/view-motion-block';
@ -24,7 +24,7 @@ import { MotionExportDialogComponent } from '../motion-export-dialog/motion-expo
templateUrl: './motion-multiselect-actions.component.html', templateUrl: './motion-multiselect-actions.component.html',
styleUrls: ['./motion-multiselect-actions.component.scss'] styleUrls: ['./motion-multiselect-actions.component.scss']
}) })
export class MotionMultiselectActionsComponent extends BaseViewComponent implements OnInit { export class MotionMultiselectActionsComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* The list of the selected motions. * The list of the selected motions.
*/ */

View File

@ -10,7 +10,7 @@ import { StatuteParagraphRepositoryService } from 'app/core/repositories/motions
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { StatuteParagraph } from 'app/shared/models/motions/statute-paragraph'; import { StatuteParagraph } from 'app/shared/models/motions/statute-paragraph';
import { largeDialogSettings } from 'app/shared/utils/dialog-settings'; import { largeDialogSettings } from 'app/shared/utils/dialog-settings';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewStatuteParagraph } from 'app/site/motions/models/view-statute-paragraph'; import { ViewStatuteParagraph } from 'app/site/motions/models/view-statute-paragraph';
import { StatuteCsvExportService } from 'app/site/motions/services/statute-csv-export.service'; import { StatuteCsvExportService } from 'app/site/motions/services/statute-csv-export.service';
@ -22,7 +22,7 @@ import { StatuteCsvExportService } from 'app/site/motions/services/statute-csv-e
templateUrl: './statute-paragraph-list.component.html', templateUrl: './statute-paragraph-list.component.html',
styleUrls: ['./statute-paragraph-list.component.scss'] styleUrls: ['./statute-paragraph-list.component.scss']
}) })
export class StatuteParagraphListComponent extends BaseViewComponent implements OnInit { export class StatuteParagraphListComponent extends BaseViewComponentDirective implements OnInit {
@ViewChild('statuteParagraphDialog', { static: true }) @ViewChild('statuteParagraphDialog', { static: true })
private statuteParagraphDialog: TemplateRef<string>; private statuteParagraphDialog: TemplateRef<string>;

View File

@ -1,4 +1,4 @@
import { OnInit } from '@angular/core'; import { Directive, OnInit } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar'; import { MatSnackBar } from '@angular/material/snack-bar';
import { Title } from '@angular/platform-browser'; import { Title } from '@angular/platform-browser';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
@ -15,7 +15,7 @@ import { BasePollDialogService } from 'app/core/ui-services/base-poll-dialog.ser
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { ChartData } from 'app/shared/components/charts/charts.component'; import { ChartData } from 'app/shared/components/charts/charts.component';
import { BaseVote } from 'app/shared/models/poll/base-vote'; import { BaseVote } from 'app/shared/models/poll/base-vote';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewGroup } from 'app/site/users/models/view-group'; import { ViewGroup } from 'app/site/users/models/view-group';
import { ViewUser } from 'app/site/users/models/view-user'; import { ViewUser } from 'app/site/users/models/view-user';
import { BasePollRepositoryService } from '../services/base-poll-repository.service'; import { BasePollRepositoryService } from '../services/base-poll-repository.service';
@ -27,7 +27,9 @@ export interface BaseVoteData {
user?: ViewUser; user?: ViewUser;
} }
export abstract class BasePollDetailComponent<V extends ViewBasePoll, S extends PollService> extends BaseViewComponent @Directive()
export abstract class BasePollDetailComponentDirective<V extends ViewBasePoll, S extends PollService>
extends BaseViewComponentDirective
implements OnInit { implements OnInit {
/** /**
* All the groups of users. * All the groups of users.

View File

@ -7,7 +7,7 @@ import { TranslateService } from '@ngx-translate/core';
import { VOTE_UNDOCUMENTED } from 'app/shared/models/poll/base-poll'; import { VOTE_UNDOCUMENTED } from 'app/shared/models/poll/base-poll';
import { OneOfValidator } from 'app/shared/validators/one-of-validator'; import { OneOfValidator } from 'app/shared/validators/one-of-validator';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { PollFormComponent } from './poll-form/poll-form.component'; import { PollFormComponent } from './poll-form/poll-form.component';
import { PollService } from '../services/poll.service'; import { PollService } from '../services/poll.service';
import { ViewBasePoll } from '../models/view-base-poll'; import { ViewBasePoll } from '../models/view-base-poll';
@ -15,7 +15,10 @@ import { ViewBasePoll } from '../models/view-base-poll';
/** /**
* A dialog for updating the values of a poll. * A dialog for updating the values of a poll.
*/ */
export abstract class BasePollDialogComponent<T extends ViewBasePoll, S extends PollService> extends BaseViewComponent { export abstract class BasePollDialogComponent<
T extends ViewBasePoll,
S extends PollService
> extends BaseViewComponentDirective {
public publishImmediately: boolean; public publishImmediately: boolean;
protected pollForm: PollFormComponent<T, S>; protected pollForm: PollFormComponent<T, S>;

View File

@ -1,4 +1,4 @@
import { Input } from '@angular/core'; import { Directive, Input } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar'; import { MatSnackBar } from '@angular/material/snack-bar';
import { Title } from '@angular/platform-browser'; import { Title } from '@angular/platform-browser';
@ -6,11 +6,12 @@ import { TranslateService } from '@ngx-translate/core';
import { OperatorService } from 'app/core/core-services/operator.service'; import { OperatorService } from 'app/core/core-services/operator.service';
import { VotingError } from 'app/core/ui-services/voting.service'; import { VotingError } from 'app/core/ui-services/voting.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewUser } from 'app/site/users/models/view-user'; import { ViewUser } from 'app/site/users/models/view-user';
import { ViewBasePoll } from '../models/view-base-poll'; import { ViewBasePoll } from '../models/view-base-poll';
export abstract class BasePollVoteComponent<V extends ViewBasePoll> extends BaseViewComponent { @Directive()
export abstract class BasePollVoteComponentDirective<V extends ViewBasePoll> extends BaseViewComponentDirective {
@Input() @Input()
public poll: V; public poll: V;

View File

@ -9,12 +9,15 @@ import { BasePollDialogService } from 'app/core/ui-services/base-poll-dialog.ser
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { ChartData } from 'app/shared/components/charts/charts.component'; import { ChartData } from 'app/shared/components/charts/charts.component';
import { PollState, PollType } from 'app/shared/models/poll/base-poll'; import { PollState, PollType } from 'app/shared/models/poll/base-poll';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { BasePollRepositoryService } from '../services/base-poll-repository.service'; import { BasePollRepositoryService } from '../services/base-poll-repository.service';
import { PollService } from '../services/poll.service'; import { PollService } from '../services/poll.service';
import { ViewBasePoll } from '../models/view-base-poll'; import { ViewBasePoll } from '../models/view-base-poll';
export abstract class BasePollComponent<V extends ViewBasePoll, S extends PollService> extends BaseViewComponent { export abstract class BasePollComponent<
V extends ViewBasePoll,
S extends PollService
> extends BaseViewComponentDirective {
public stateChangePending = false; public stateChangePending = false;
public chartDataSubject: BehaviorSubject<ChartData> = new BehaviorSubject([]); public chartDataSubject: BehaviorSubject<ChartData> = new BehaviorSubject([]);

View File

@ -15,7 +15,7 @@ import { PercentBase } from 'app/shared/models/poll/base-poll';
import { PollType } from 'app/shared/models/poll/base-poll'; import { PollType } from 'app/shared/models/poll/base-poll';
import { infoDialogSettings } from 'app/shared/utils/dialog-settings'; import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
import { ViewAssignmentPoll } from 'app/site/assignments/models/view-assignment-poll'; import { ViewAssignmentPoll } from 'app/site/assignments/models/view-assignment-poll';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { import {
MajorityMethodVerbose, MajorityMethodVerbose,
PollClassType, PollClassType,
@ -31,7 +31,8 @@ import { PollService } from '../../services/poll.service';
templateUrl: './poll-form.component.html', templateUrl: './poll-form.component.html',
styleUrls: ['./poll-form.component.scss'] styleUrls: ['./poll-form.component.scss']
}) })
export class PollFormComponent<T extends ViewBasePoll, S extends PollService> extends BaseViewComponent export class PollFormComponent<T extends ViewBasePoll, S extends PollService>
extends BaseViewComponentDirective
implements OnInit { implements OnInit {
/** /**
* The form-group for the meta-info. * The form-group for the meta-info.

View File

@ -6,7 +6,7 @@ import { TranslateService } from '@ngx-translate/core';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewBasePoll } from 'app/site/polls/models/view-base-poll'; import { ViewBasePoll } from 'app/site/polls/models/view-base-poll';
@Component({ @Component({
@ -14,7 +14,7 @@ import { ViewBasePoll } from 'app/site/polls/models/view-base-poll';
templateUrl: './poll-progress.component.html', templateUrl: './poll-progress.component.html',
styleUrls: ['./poll-progress.component.scss'] styleUrls: ['./poll-progress.component.scss']
}) })
export class PollProgressComponent extends BaseViewComponent implements OnInit { export class PollProgressComponent extends BaseViewComponentDirective implements OnInit {
@Input() @Input()
public poll: ViewBasePoll; public poll: ViewBasePoll;
public max: number; public max: number;

View File

@ -10,7 +10,7 @@ import { ConfigService } from 'app/core/ui-services/config.service';
import { ProjectionDialogService } from 'app/core/ui-services/projection-dialog.service'; import { ProjectionDialogService } from 'app/core/ui-services/projection-dialog.service';
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { Projector } from 'app/shared/models/core/projector'; import { Projector } from 'app/shared/models/core/projector';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewCountdown } from '../../models/view-countdown'; import { ViewCountdown } from '../../models/view-countdown';
/** /**
@ -21,7 +21,7 @@ import { ViewCountdown } from '../../models/view-countdown';
templateUrl: './countdown-controls.component.html', templateUrl: './countdown-controls.component.html',
styleUrls: ['./countdown-controls.component.scss'] styleUrls: ['./countdown-controls.component.scss']
}) })
export class CountdownControlsComponent extends BaseViewComponent { export class CountdownControlsComponent extends BaseViewComponentDirective {
/** /**
* Countdown as input * Countdown as input
*/ */

View File

@ -8,7 +8,7 @@ import { TranslateService } from '@ngx-translate/core';
import { ConfigService } from 'app/core/ui-services/config.service'; import { ConfigService } from 'app/core/ui-services/config.service';
import { DurationService } from 'app/core/ui-services/duration.service'; import { DurationService } from 'app/core/ui-services/duration.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
/** /**
* Countdown data for the form * Countdown data for the form
@ -28,7 +28,7 @@ export interface CountdownData {
templateUrl: './countdown-dialog.component.html', templateUrl: './countdown-dialog.component.html',
styleUrls: ['./countdown-dialog.component.scss'] styleUrls: ['./countdown-dialog.component.scss']
}) })
export class CountdownDialogComponent extends BaseViewComponent implements OnInit { export class CountdownDialogComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* The form data * The form data
*/ */

View File

@ -8,7 +8,7 @@ import { ProjectorMessageRepositoryService } from 'app/core/repositories/project
import { ProjectionDialogService } from 'app/core/ui-services/projection-dialog.service'; import { ProjectionDialogService } from 'app/core/ui-services/projection-dialog.service';
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { Projector } from 'app/shared/models/core/projector'; import { Projector } from 'app/shared/models/core/projector';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewProjectorMessage } from '../../models/view-projector-message'; import { ViewProjectorMessage } from '../../models/view-projector-message';
/** /**
@ -20,7 +20,7 @@ import { ViewProjectorMessage } from '../../models/view-projector-message';
templateUrl: './message-controls.component.html', templateUrl: './message-controls.component.html',
styleUrls: ['./message-controls.component.scss'] styleUrls: ['./message-controls.component.scss']
}) })
export class MessageControlsComponent extends BaseViewComponent implements OnInit { export class MessageControlsComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* Input slot for the projector message model * Input slot for the projector message model
*/ */

View File

@ -6,7 +6,7 @@ import { Title } from '@angular/platform-browser';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
/** /**
* Determine what to send * Determine what to send
@ -23,7 +23,7 @@ export interface MessageData {
templateUrl: './message-dialog.component.html', templateUrl: './message-dialog.component.html',
styleUrls: ['./message-dialog.component.scss'] styleUrls: ['./message-dialog.component.scss']
}) })
export class MessageDialogComponent extends BaseViewComponent implements OnInit { export class MessageDialogComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* The form data * The form data
*/ */

View File

@ -7,7 +7,7 @@ import { TranslateService } from '@ngx-translate/core';
import { ProjectorService } from 'app/core/core-services/projector.service'; import { ProjectorService } from 'app/core/core-services/projector.service';
import { MediafileRepositoryService } from 'app/core/repositories/mediafiles/mediafile-repository.service'; import { MediafileRepositoryService } from 'app/core/repositories/mediafiles/mediafile-repository.service';
import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; import { Mediafile } from 'app/shared/models/mediafiles/mediafile';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { MediafileProjectorElement } from 'app/site/mediafiles/models/mediafile-projector-element'; import { MediafileProjectorElement } from 'app/site/mediafiles/models/mediafile-projector-element';
import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile'; import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile';
import { SlideManager } from 'app/slides/services/slide-manager.service'; import { SlideManager } from 'app/slides/services/slide-manager.service';
@ -21,7 +21,7 @@ import { ViewProjector } from '../../models/view-projector';
templateUrl: './presentation-control.component.html', templateUrl: './presentation-control.component.html',
styleUrls: ['./presentation-control.component.scss'] styleUrls: ['./presentation-control.component.scss']
}) })
export class PresentationControlComponent extends BaseViewComponent { export class PresentationControlComponent extends BaseViewComponentDirective {
/** /**
* The projector. * The projector.
*/ */

View File

@ -23,7 +23,7 @@ import { Countdown } from 'app/shared/models/core/countdown';
import { ProjectorElement } from 'app/shared/models/core/projector'; import { ProjectorElement } from 'app/shared/models/core/projector';
import { ProjectorMessage } from 'app/shared/models/core/projector-message'; import { ProjectorMessage } from 'app/shared/models/core/projector-message';
import { infoDialogSettings, largeDialogSettings } from 'app/shared/utils/dialog-settings'; import { infoDialogSettings, largeDialogSettings } from 'app/shared/utils/dialog-settings';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { Projectable } from 'app/site/base/projectable'; import { Projectable } from 'app/site/base/projectable';
import { ViewCountdown } from 'app/site/projector/models/view-countdown'; import { ViewCountdown } from 'app/site/projector/models/view-countdown';
import { ViewProjectorMessage } from 'app/site/projector/models/view-projector-message'; import { ViewProjectorMessage } from 'app/site/projector/models/view-projector-message';
@ -44,7 +44,7 @@ import { ViewProjector } from '../../models/view-projector';
styleUrls: ['./projector-detail.component.scss'], styleUrls: ['./projector-detail.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class ProjectorDetailComponent extends BaseViewComponent implements OnInit { export class ProjectorDetailComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* The projector to show. * The projector to show.
*/ */

View File

@ -19,7 +19,7 @@ import { ProjectionDefaultRepositoryService } from 'app/core/repositories/projec
import { ProjectorRepositoryService } from 'app/core/repositories/projector/projector-repository.service'; import { ProjectorRepositoryService } from 'app/core/repositories/projector/projector-repository.service';
import { ProjectorComponent } from 'app/shared/components/projector/projector.component'; import { ProjectorComponent } from 'app/shared/components/projector/projector.component';
import { Projector } from 'app/shared/models/core/projector'; import { Projector } from 'app/shared/models/core/projector';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ClockSlideService } from '../../services/clock-slide.service'; import { ClockSlideService } from '../../services/clock-slide.service';
import { ViewProjectionDefault } from '../../models/view-projection-default'; import { ViewProjectionDefault } from '../../models/view-projection-default';
import { ViewProjector } from '../../models/view-projector'; import { ViewProjector } from '../../models/view-projector';
@ -35,7 +35,7 @@ import { ViewProjector } from '../../models/view-projector';
encapsulation: ViewEncapsulation.None, encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class ProjectorEditDialogComponent extends BaseViewComponent implements OnInit { export class ProjectorEditDialogComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* import the projector as view child, to determine when to update * import the projector as view child, to determine when to update
* the preview. * the preview.

View File

@ -9,7 +9,7 @@ import { OperatorService, Permission } from 'app/core/core-services/operator.ser
import { ProjectorRepositoryService } from 'app/core/repositories/projector/projector-repository.service'; import { ProjectorRepositoryService } from 'app/core/repositories/projector/projector-repository.service';
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { largeDialogSettings } from 'app/shared/utils/dialog-settings'; import { largeDialogSettings } from 'app/shared/utils/dialog-settings';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ProjectorEditDialogComponent } from '../projector-edit-dialog/projector-edit-dialog.component'; import { ProjectorEditDialogComponent } from '../projector-edit-dialog/projector-edit-dialog.component';
import { ViewProjector } from '../../models/view-projector'; import { ViewProjector } from '../../models/view-projector';
@ -22,7 +22,7 @@ import { ViewProjector } from '../../models/view-projector';
styleUrls: ['./projector-list-entry.component.scss'], styleUrls: ['./projector-list-entry.component.scss'],
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class ProjectorListEntryComponent extends BaseViewComponent implements OnInit { export class ProjectorListEntryComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* The projector shown by this entry. * The projector shown by this entry.
*/ */

View File

@ -20,7 +20,7 @@ import { OperatorService, Permission } from 'app/core/core-services/operator.ser
import { ProjectorRepositoryService } from 'app/core/repositories/projector/projector-repository.service'; import { ProjectorRepositoryService } from 'app/core/repositories/projector/projector-repository.service';
import { Projector } from 'app/shared/models/core/projector'; import { Projector } from 'app/shared/models/core/projector';
import { infoDialogSettings } from 'app/shared/utils/dialog-settings'; import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewProjector } from '../../models/view-projector'; import { ViewProjector } from '../../models/view-projector';
/** /**
@ -33,7 +33,7 @@ import { ViewProjector } from '../../models/view-projector';
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class ProjectorListComponent extends BaseViewComponent implements OnInit, AfterViewInit, OnDestroy { export class ProjectorListComponent extends BaseViewComponentDirective implements OnInit, AfterViewInit, OnDestroy {
/** /**
* The create form. * The create form.
*/ */

View File

@ -5,7 +5,8 @@ export interface ProjectionDefaultTitleInformation {
display_name: string; display_name: string;
} }
export class ViewProjectionDefault extends BaseViewModel<ProjectionDefault> export class ViewProjectionDefault
extends BaseViewModel<ProjectionDefault>
implements ProjectionDefaultTitleInformation { implements ProjectionDefaultTitleInformation {
public static COLLECTIONSTRING = ProjectionDefault.COLLECTIONSTRING; public static COLLECTIONSTRING = ProjectionDefault.COLLECTIONSTRING;
protected _collectionString = ProjectionDefault.COLLECTIONSTRING; protected _collectionString = ProjectionDefault.COLLECTIONSTRING;

View File

@ -5,7 +5,8 @@ import { ProjectorElementBuildDeskriptor } from 'app/site/base/projectable';
export type ProjectorMessageTitleInformation = object; export type ProjectorMessageTitleInformation = object;
export class ViewProjectorMessage extends BaseProjectableViewModel<ProjectorMessage> export class ViewProjectorMessage
extends BaseProjectableViewModel<ProjectorMessage>
implements ProjectorMessageTitleInformation { implements ProjectorMessageTitleInformation {
public static COLLECTIONSTRING = ProjectorMessage.COLLECTIONSTRING; public static COLLECTIONSTRING = ProjectorMessage.COLLECTIONSTRING;
protected _collectionString = ProjectorMessage.COLLECTIONSTRING; protected _collectionString = ProjectorMessage.COLLECTIONSTRING;

View File

@ -14,7 +14,7 @@ import { PromptService } from 'app/core/ui-services/prompt.service';
import { ItemVisibilityChoices } from 'app/shared/models/agenda/item'; import { ItemVisibilityChoices } from 'app/shared/models/agenda/item';
import { Topic } from 'app/shared/models/topics/topic'; import { Topic } from 'app/shared/models/topics/topic';
import { ViewItem } from 'app/site/agenda/models/view-item'; import { ViewItem } from 'app/site/agenda/models/view-item';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { CreateTopic } from '../../models/create-topic'; import { CreateTopic } from '../../models/create-topic';
import { ViewTopic } from '../../models/view-topic'; import { ViewTopic } from '../../models/view-topic';
@ -26,7 +26,7 @@ import { ViewTopic } from '../../models/view-topic';
templateUrl: './topic-detail.component.html', templateUrl: './topic-detail.component.html',
styleUrls: ['./topic-detail.component.scss'] styleUrls: ['./topic-detail.component.scss']
}) })
export class TopicDetailComponent extends BaseViewComponent { export class TopicDetailComponent extends BaseViewComponentDirective {
/** /**
* Determine if the topic is in edit mode * Determine if the topic is in edit mode
*/ */

View File

@ -12,7 +12,7 @@ import { AppPermissions, GroupRepositoryService } from 'app/core/repositories/us
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { Group } from 'app/shared/models/users/group'; import { Group } from 'app/shared/models/users/group';
import { infoDialogSettings } from 'app/shared/utils/dialog-settings'; import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewGroup } from '../../models/view-group'; import { ViewGroup } from '../../models/view-group';
/** /**
@ -23,7 +23,7 @@ import { ViewGroup } from '../../models/view-group';
templateUrl: './group-list.component.html', templateUrl: './group-list.component.html',
styleUrls: ['./group-list.component.scss'] styleUrls: ['./group-list.component.scss']
}) })
export class GroupListComponent extends BaseViewComponent implements OnInit { export class GroupListComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* Holds all Groups * Holds all Groups
*/ */

View File

@ -8,7 +8,7 @@ import { TranslateService } from '@ngx-translate/core';
import { OperatorService, Permission } from 'app/core/core-services/operator.service'; import { OperatorService, Permission } from 'app/core/core-services/operator.service';
import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ViewUser } from '../../models/view-user'; import { ViewUser } from '../../models/view-user';
/** /**
@ -19,7 +19,7 @@ import { ViewUser } from '../../models/view-user';
templateUrl: './password.component.html', templateUrl: './password.component.html',
styleUrls: ['./password.component.scss'] styleUrls: ['./password.component.scss']
}) })
export class PasswordComponent extends BaseViewComponent implements OnInit { export class PasswordComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* the user that is currently worked own * the user that is currently worked own
*/ */

View File

@ -15,7 +15,7 @@ import { ConfigService } from 'app/core/ui-services/config.service';
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { genders } from 'app/shared/models/users/user'; import { genders } from 'app/shared/models/users/user';
import { OneOfValidator } from 'app/shared/validators/one-of-validator'; import { OneOfValidator } from 'app/shared/validators/one-of-validator';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { PollService } from 'app/site/polls/services/poll.service'; import { PollService } from 'app/site/polls/services/poll.service';
import { UserPdfExportService } from '../../services/user-pdf-export.service'; import { UserPdfExportService } from '../../services/user-pdf-export.service';
import { ViewGroup } from '../../models/view-group'; import { ViewGroup } from '../../models/view-group';
@ -35,7 +35,7 @@ interface UserBackends {
templateUrl: './user-detail.component.html', templateUrl: './user-detail.component.html',
styleUrls: ['./user-detail.component.scss'] styleUrls: ['./user-detail.component.scss']
}) })
export class UserDetailComponent extends BaseViewComponent implements OnInit { export class UserDetailComponent extends BaseViewComponentDirective implements OnInit {
/** /**
* Info form object * Info form object
*/ */

View File

@ -13,7 +13,8 @@ import { CommonListOfSpeakersSlideData } from './common-list-of-speakers-slide-d
templateUrl: './common-list-of-speakers-slide.component.html', templateUrl: './common-list-of-speakers-slide.component.html',
styleUrls: ['./common-list-of-speakers-slide.component.scss'] styleUrls: ['./common-list-of-speakers-slide.component.scss']
}) })
export class CommonListOfSpeakersSlideComponent extends BaseSlideComponentDirective<CommonListOfSpeakersSlideData> export class CommonListOfSpeakersSlideComponent
extends BaseSlideComponentDirective<CommonListOfSpeakersSlideData>
implements OnInit { implements OnInit {
@Input() @Input()
public set data(value: SlideData<CommonListOfSpeakersSlideData, ProjectorElement>) { public set data(value: SlideData<CommonListOfSpeakersSlideData, ProjectorElement>) {

View File

@ -2,7 +2,7 @@ import { Component } from '@angular/core';
import { PollState } from 'app/shared/models/poll/base-poll'; import { PollState } from 'app/shared/models/poll/base-poll';
import { AssignmentPollService } from 'app/site/assignments/modules/assignment-poll/services/assignment-poll.service'; import { AssignmentPollService } from 'app/site/assignments/modules/assignment-poll/services/assignment-poll.service';
import { BasePollSlideComponent } from 'app/slides/polls/base-poll-slide.component'; import { BasePollSlideComponentDirective } from 'app/slides/polls/base-poll-slide.component';
import { AssignmentPollSlideData } from './assignment-poll-slide-data'; import { AssignmentPollSlideData } from './assignment-poll-slide-data';
@Component({ @Component({
@ -10,7 +10,7 @@ import { AssignmentPollSlideData } from './assignment-poll-slide-data';
templateUrl: './assignment-poll-slide.component.html', templateUrl: './assignment-poll-slide.component.html',
styleUrls: ['./assignment-poll-slide.component.scss'] styleUrls: ['./assignment-poll-slide.component.scss']
}) })
export class AssignmentPollSlideComponent extends BasePollSlideComponent< export class AssignmentPollSlideComponent extends BasePollSlideComponentDirective<
AssignmentPollSlideData, AssignmentPollSlideData,
AssignmentPollService AssignmentPollService
> { > {

View File

@ -19,7 +19,8 @@ export interface IBaseScaleScrollSlideComponent<T extends object> extends BaseSl
* that the slide itself (and not the slide container) will take care of this. * that the slide itself (and not the slide container) will take care of this.
*/ */
@Directive() @Directive()
export abstract class BaseScaleScrollSlideComponentDirective<T extends object> extends BaseSlideComponentDirective<T> export abstract class BaseScaleScrollSlideComponentDirective<T extends object>
extends BaseSlideComponentDirective<T>
implements IBaseScaleScrollSlideComponent<T> { implements IBaseScaleScrollSlideComponent<T> {
@Input() @Input()
public scroll: number; public scroll: number;

View File

@ -1,4 +1,4 @@
import { Input } from '@angular/core'; import { Directive, Input } from '@angular/core';
import { SlideData } from 'app/core/core-services/projector-data.service'; import { SlideData } from 'app/core/core-services/projector-data.service';
import { ProjectorElement } from 'app/shared/models/core/projector'; import { ProjectorElement } from 'app/shared/models/core/projector';
@ -8,6 +8,7 @@ import { ViewProjector } from 'app/site/projector/models/view-projector';
* Every slide has to extends this base class. It forces the slides * Every slide has to extends this base class. It forces the slides
* to have an input for the slidedata. * to have an input for the slidedata.
*/ */
@Directive()
export abstract class BaseSlideComponentDirective<T extends object, P extends ProjectorElement = ProjectorElement> { export abstract class BaseSlideComponentDirective<T extends object, P extends ProjectorElement = ProjectorElement> {
/** /**
* Each slide must take slide data. * Each slide must take slide data.

View File

@ -32,5 +32,6 @@ export class MediafileSlideComponent extends BaseSlideComponentDirective<
public constructor() { public constructor() {
super(); super();
(window as any).pdfWorkerSrc = '/assets/js/pdf.worker.min.js';
} }
} }

View File

@ -1,3 +1,5 @@
import { Directive } from '@angular/core';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service';
@ -15,7 +17,8 @@ export interface ReferencedMotions {
* Base slide for motions and motion blocks. This Provides the functionality of * Base slide for motions and motion blocks. This Provides the functionality of
* replacing referenced motions (format: `[motion:<id>]`) in strings. * replacing referenced motions (format: `[motion:<id>]`) in strings.
*/ */
export class BaseMotionSlideComponent<T extends object> extends BaseSlideComponentDirective<T> { @Directive()
export class BaseMotionSlideComponentDirective<T extends object> extends BaseSlideComponentDirective<T> {
public constructor(protected translate: TranslateService, protected motionRepo: MotionRepositoryService) { public constructor(protected translate: TranslateService, protected motionRepo: MotionRepositoryService) {
super(); super();
} }

View File

@ -4,7 +4,7 @@ import { TranslateService } from '@ngx-translate/core';
import { SlideData } from 'app/core/core-services/projector-data.service'; import { SlideData } from 'app/core/core-services/projector-data.service';
import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service';
import { BaseMotionSlideComponent } from '../base/base-motion-slide'; import { BaseMotionSlideComponentDirective } from '../base/base-motion-slide';
import { MotionBlockSlideData, MotionBlockSlideMotionRepresentation } from './motion-block-slide-data'; import { MotionBlockSlideData, MotionBlockSlideMotionRepresentation } from './motion-block-slide-data';
// Layout: // Layout:
@ -27,7 +27,7 @@ const MAX_COLUMNS = 3;
templateUrl: './motion-block-slide.component.html', templateUrl: './motion-block-slide.component.html',
styleUrls: ['./motion-block-slide.component.scss'] styleUrls: ['./motion-block-slide.component.scss']
}) })
export class MotionBlockSlideComponent extends BaseMotionSlideComponent<MotionBlockSlideData> { export class MotionBlockSlideComponent extends BaseMotionSlideComponentDirective<MotionBlockSlideData> {
/** /**
* For sorting motion blocks by their displayed title * For sorting motion blocks by their displayed title
*/ */

View File

@ -3,7 +3,7 @@ import { Component } from '@angular/core';
import { PollState } from 'app/shared/models/poll/base-poll'; import { PollState } from 'app/shared/models/poll/base-poll';
import { MotionPollService } from 'app/site/motions/services/motion-poll.service'; import { MotionPollService } from 'app/site/motions/services/motion-poll.service';
import { PollData, PollTableData } from 'app/site/polls/services/poll.service'; import { PollData, PollTableData } from 'app/site/polls/services/poll.service';
import { BasePollSlideComponent } from 'app/slides/polls/base-poll-slide.component'; import { BasePollSlideComponentDirective } from 'app/slides/polls/base-poll-slide.component';
import { MotionPollSlideData } from './motion-poll-slide-data'; import { MotionPollSlideData } from './motion-poll-slide-data';
@Component({ @Component({
@ -11,7 +11,7 @@ import { MotionPollSlideData } from './motion-poll-slide-data';
templateUrl: './motion-poll-slide.component.html', templateUrl: './motion-poll-slide.component.html',
styleUrls: ['./motion-poll-slide.component.scss'] styleUrls: ['./motion-poll-slide.component.scss']
}) })
export class MotionPollSlideComponent extends BasePollSlideComponent<MotionPollSlideData, MotionPollService> { export class MotionPollSlideComponent extends BasePollSlideComponentDirective<MotionPollSlideData, MotionPollService> {
public PollState = PollState; public PollState = PollState;
public pollData: PollData; public pollData: PollData;

Some files were not shown because too many files have changed in this diff Show More