openvidu-components: Updated to Angular 14

pull/758/head
Carlos Santos 2022-11-02 16:03:07 +01:00
parent 5f73380afa
commit ec7e915ee1
8 changed files with 28862 additions and 31517 deletions

View File

@ -102,11 +102,7 @@
"lint": { "lint": {
"builder": "@angular-devkit/build-angular:tslint", "builder": "@angular-devkit/build-angular:tslint",
"options": { "options": {
"tsConfig": [ "tsConfig": ["tsconfig.app.json", "tsconfig.spec.json", "e2e/tsconfig.json"],
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": ["**/node_modules/**"] "exclude": ["**/node_modules/**"]
} }
}, },
@ -170,9 +166,7 @@
"tsConfig": "src/app/openvidu-webcomponent/tsconfig.openvidu-webcomponent.json", "tsConfig": "src/app/openvidu-webcomponent/tsconfig.openvidu-webcomponent.json",
"aot": true, "aot": true,
"assets": ["src/favicon.ico"], "assets": ["src/favicon.ico"],
"styles": [ "styles": ["src/app/openvidu-webcomponent/openvidu-webcomponent.component.scss"],
"src/app/openvidu-webcomponent/openvidu-webcomponent.component.scss"
],
"scripts": [] "scripts": []
}, },
"configurations": { "configurations": {
@ -207,6 +201,5 @@
} }
} }
} }
}, }
"defaultProject": "openvidu-components-testapp"
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,80 +1,79 @@
{ {
"dependencies": { "dependencies": {
"@angular/animations": "13.3.9", "@angular/animations": "14.2.8",
"@angular/cdk": "13.3.9", "@angular/cdk": "14.2.6",
"@angular/common": "13.3.9", "@angular/common": "14.2.8",
"@angular/core": "13.3.9", "@angular/core": "14.2.8",
"@angular/flex-layout": "13.0.0-beta.38", "@angular/flex-layout": "14.0.0-beta.41",
"@angular/forms": "13.3.9", "@angular/forms": "14.2.8",
"@angular/material": "13.3.9", "@angular/material": "14.2.6",
"@angular/platform-browser": "13.3.9", "@angular/platform-browser": "14.2.8",
"@angular/platform-browser-dynamic": "13.3.9", "@angular/platform-browser-dynamic": "14.2.8",
"@angular/router": "13.3.9", "@angular/router": "14.2.8",
"autolinker": "3.14.3", "autolinker": "4.0.0",
"openvidu-browser": "file:openvidu-browser-2.23.0.tgz", "openvidu-browser": "file:openvidu-browser-2.23.0.tgz",
"openvidu-browser": "2.23.0", "rxjs": "7.5.7",
"rxjs": "7.5.6", "tslib": "2.3.1",
"tslib": "2.3.1", "zone.js": "0.11.4"
"zone.js": "0.11.4" },
}, "devDependencies": {
"devDependencies": { "@angular-devkit/build-angular": "14.2.7",
"@angular-devkit/build-angular": "13.3.9", "@angular/cli": "14.2.7",
"@angular/cli": "13.3.9", "@angular/compiler": "14.2.8",
"@angular/compiler": "13.3.9", "@angular/compiler-cli": "14.2.8",
"@angular/compiler-cli": "13.3.9", "@angular/elements": "14.2.8",
"@angular/elements": "13.3.9", "@compodoc/compodoc": "^1.1.19",
"@compodoc/compodoc": "^1.1.19", "@types/chai": "4.3.0",
"@types/chai": "4.3.0", "@types/mocha": "9.1.0",
"@types/mocha": "9.1.0", "@types/node": "16.11.6",
"@types/node": "16.11.6", "@types/selenium-webdriver": "4.1.5",
"@types/selenium-webdriver": "4.1.5", "chai": "4.3.6",
"chai": "4.3.6", "chromedriver": "106.0.1",
"chromedriver": "106.0.1", "codelyzer": "6.0.2",
"codelyzer": "6.0.2", "concat": "^1.0.3",
"concat": "^1.0.3", "cross-env": "^7.0.3",
"cross-env": "^7.0.3", "http-server": "14.1.1",
"http-server": "14.1.1", "jasmine-core": "3.10.1",
"jasmine-core": "3.10.1", "jasmine-spec-reporter": "7.0.0",
"jasmine-spec-reporter": "7.0.0", "karma": "^6.3.9",
"karma": "^6.3.9", "karma-chrome-launcher": "3.1.1",
"karma-chrome-launcher": "3.1.1", "karma-coverage": "^2.0.3",
"karma-coverage": "^2.0.3", "karma-coverage-istanbul-reporter": "3.0.3",
"karma-coverage-istanbul-reporter": "3.0.3", "karma-jasmine": "4.0.1",
"karma-jasmine": "4.0.1", "karma-jasmine-html-reporter": "1.7.0",
"karma-jasmine-html-reporter": "1.7.0", "karma-junit-reporter": "2.0.1",
"karma-junit-reporter": "2.0.1", "karma-mocha-reporter": "2.2.5",
"karma-mocha-reporter": "2.2.5", "karma-notify-reporter": "1.3.0",
"karma-notify-reporter": "1.3.0", "mocha": "9.2.2",
"mocha": "9.2.2", "ng-packagr": "14.2.2",
"ng-packagr": "13.0.3", "selenium-webdriver": "4.5.0",
"selenium-webdriver": "4.5.0", "ts-node": "10.4.0",
"ts-node": "10.4.0", "tslint": "6.1.3",
"tslint": "6.1.3", "typescript": "4.8.4",
"typescript": "4.4.4", "webpack-bundle-analyzer": "^4.5.0"
"webpack-bundle-analyzer": "^4.5.0" },
}, "name": "openvidu-components-testapp",
"name": "openvidu-components-testapp", "private": true,
"private": true, "scripts": {
"scripts": { "build": "ng build openvidu-components-testapp --configuration production",
"build": "ng build openvidu-components-testapp --configuration production", "bundle-report": "ng build openvidu-webcomponent --stats-json --configuration production && webpack-bundle-analyzer dist/openvidu-webcomponent/stats.json",
"bundle-report": "ng build openvidu-webcomponent --stats-json --configuration production && webpack-bundle-analyzer dist/openvidu-webcomponent/stats.json", "doc:build": "cd projects/openvidu-angular && npx compodoc -p ./doc/tsconfig.doc.json -c ./doc/.compodocrc.json",
"doc:build": "cd projects/openvidu-angular && npx compodoc -p ./doc/tsconfig.doc.json -c ./doc/.compodocrc.json", "doc:clean-copy": "rm -rf ../../openvidu.io-docs/docs/api/openvidu-angular && cp -r ./docs/openvidu-angular/ ../../openvidu.io-docs/docs/api/openvidu-angular",
"doc:clean-copy": "rm -rf ../../openvidu.io-docs/docs/api/openvidu-angular && cp -r ./docs/openvidu-angular/ ../../openvidu.io-docs/docs/api/openvidu-angular", "doc:serve": "cd projects/openvidu-angular && npx compodoc -p ./doc/tsconfig.doc.json --watch --serve -c ./doc/.compodocrc.json",
"doc:serve": "cd projects/openvidu-angular && npx compodoc -p ./doc/tsconfig.doc.json --watch --serve -c ./doc/.compodocrc.json", "lib:build": "ng build openvidu-angular --configuration production && cd ./dist/openvidu-angular && npm pack",
"lib:build": "ng build openvidu-angular --configuration production && cd ./dist/openvidu-angular && npm pack", "lib:copy": "cp dist/openvidu-angular/openvidu-angular-*.tgz ../../openvidu-tutorials/openvidu-call/openvidu-call-front",
"lib:copy": "cp dist/openvidu-angular/openvidu-angular-*.tgz ../../openvidu-tutorials/openvidu-call/openvidu-call-front", "lib:e2e": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/angular.test.js",
"lib:e2e": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/angular.test.js", "lib:e2e-ci": "cross-env LAUNCH_MODE=CI npm run lib:e2e",
"lib:e2e-ci": "cross-env LAUNCH_MODE=CI npm run lib:e2e", "lib:serve": "ng build openvidu-angular --watch",
"lib:serve": "ng build openvidu-angular --watch", "lib:test": "ng test openvidu-angular --no-watch --code-coverage",
"lib:test": "ng test openvidu-angular --no-watch --code-coverage", "lint": "ng lint",
"lint": "ng lint", "ng": "ng",
"ng": "ng", "start": "ng serve --ssl --configuration development",
"start": "ng serve --ssl --configuration development", "start-prod": "npx http-server ./dist/openvidu-components-testapp/ --port 4200",
"start-prod": "npx http-server ./dist/openvidu-components-testapp/ --port 4200", "webcomponent:build": "./node_modules/@angular/cli/bin/ng.js build openvidu-webcomponent --configuration production && node ./openvidu-webcomponent-build.js",
"webcomponent:build": "./node_modules/@angular/cli/bin/ng.js build openvidu-webcomponent --configuration production && node ./openvidu-webcomponent-build.js", "webcomponent:e2e": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent.test.js",
"webcomponent:e2e": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent.test.js", "webcomponent:e2e-ci": "cross-env LAUNCH_MODE=CI npm run webcomponent:e2e",
"webcomponent:e2e-ci": "cross-env LAUNCH_MODE=CI npm run webcomponent:e2e", "webcomponent:serve-testapp": "npx http-server ./e2e/webcomponent-app/"
"webcomponent:serve-testapp": "npx http-server ./e2e/webcomponent-app/" },
}, "version": "2.23.1"
"version": "2.23.1"
} }

View File

@ -2,13 +2,13 @@
"name": "openvidu-angular", "name": "openvidu-angular",
"version": "2.23.1", "version": "2.23.1",
"peerDependencies": { "peerDependencies": {
"@angular/animations": "^13.0.0", "@angular/animations": "^14.0.0",
"@angular/common": "^13.0.0", "@angular/common": "^14.0.0",
"@angular/core": "^13.0.0", "@angular/core": "^14.0.0",
"@angular/material": "^13.0.0", "@angular/material": "^14.0.0",
"@angular/forms": "^13.0.0", "@angular/forms": "^14.0.0",
"@angular/flex-layout": "^13.0.0-beta.36", "@angular/flex-layout": "^14.0.0-beta.40",
"autolinker": "^3.14.3", "autolinker": "^4.0.0",
"buffer": "^6.0.3", "buffer": "^6.0.3",
"openvidu-browser": "2.23.0" "openvidu-browser": "2.23.0"
}, },

View File

@ -1,5 +1,5 @@
import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core'; import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
import { FormControl, Validators, FormGroupDirective, NgForm } from '@angular/forms'; import { UntypedFormControl, Validators, FormGroupDirective, NgForm } from '@angular/forms';
import { ErrorStateMatcher } from '@angular/material/core'; import { ErrorStateMatcher } from '@angular/material/core';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import { ActionService } from '../../services/action/action.service'; import { ActionService } from '../../services/action/action.service';
@ -33,7 +33,7 @@ export class AdminLoginComponent implements OnInit {
/** /**
* @internal * @internal
*/ */
loginFormControl = new FormControl('', [Validators.required]); loginFormControl = new UntypedFormControl('', [Validators.required]);
/** /**
* @internal * @internal
*/ */
@ -103,7 +103,7 @@ export class AdminLoginComponent implements OnInit {
* @internal * @internal
*/ */
export class FormErrorStateMatcher implements ErrorStateMatcher { export class FormErrorStateMatcher implements ErrorStateMatcher {
isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean { isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean {
const isSubmitted = form && form.submitted; const isSubmitted = form && form.submitted;
return !!(control && control.invalid && (control.dirty || control.touched || isSubmitted)); return !!(control && control.invalid && (control.dirty || control.touched || isSubmitted));
} }

View File

@ -1,4 +1,4 @@
import { Autolinker, AutolinkerConfig, HashtagMatch } from 'autolinker'; import { Autolinker, AutolinkerConfig } from 'autolinker';
/** /**
* @internal * @internal
@ -6,7 +6,6 @@ import { Autolinker, AutolinkerConfig, HashtagMatch } from 'autolinker';
const AUTOLINKER_CFGS: AutolinkerConfig = { const AUTOLINKER_CFGS: AutolinkerConfig = {
urls: { urls: {
schemeMatches: true, schemeMatches: true,
wwwMatches: true,
tldMatches: true tldMatches: true
}, },
email: true, email: true,

View File

@ -96,56 +96,55 @@ const privateComponents = [
]; ];
@NgModule({ @NgModule({
declarations: [ declarations: [
publicComponents, publicComponents,
privateComponents, privateComponents,
LinkifyPipe, LinkifyPipe,
ParticipantStreamsPipe, ParticipantStreamsPipe,
DurationFromSecondsPipe, DurationFromSecondsPipe,
SearchByStringPropertyPipe, SearchByStringPropertyPipe,
ThumbnailFromUrlPipe, ThumbnailFromUrlPipe,
StreamTypesEnabledPipe, StreamTypesEnabledPipe,
TranslatePipe, TranslatePipe,
CustomLayoutExtensionDirective, CustomLayoutExtensionDirective,
], ],
imports: [ imports: [
CommonModule, CommonModule,
HttpClientModule, HttpClientModule,
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
RouterModule.forRoot([]), RouterModule.forRoot([]),
AppMaterialModule, AppMaterialModule,
OpenViduAngularDirectiveModule, OpenViduAngularDirectiveModule,
ApiDirectiveModule ApiDirectiveModule
], ],
providers: [ providers: [
ActionService, ActionService,
CdkOverlayContainer, CdkOverlayContainer,
{ provide: OverlayContainer, useClass: CdkOverlayContainer }, { provide: OverlayContainer, useClass: CdkOverlayContainer },
CustomBreakPointsProvider, CustomBreakPointsProvider,
ChatService, ChatService,
PanelService, PanelService,
DeviceService, DeviceService,
DocumentService, DocumentService,
LayoutService, LayoutService,
LoggerService, LoggerService,
PlatformService, PlatformService,
ParticipantService, ParticipantService,
StorageService, StorageService,
TokenService, TokenService,
OpenViduService, OpenViduService,
RecordingService RecordingService
], ],
exports: [ exports: [
publicComponents, publicComponents,
ParticipantStreamsPipe, ParticipantStreamsPipe,
DurationFromSecondsPipe, DurationFromSecondsPipe,
StreamTypesEnabledPipe, StreamTypesEnabledPipe,
CommonModule, CommonModule,
OpenViduAngularDirectiveModule, OpenViduAngularDirectiveModule,
ApiDirectiveModule ApiDirectiveModule
], ]
entryComponents: [DialogTemplateComponent, RecordingDialogComponent, DeleteDialogComponent]
}) })
export class OpenViduAngularModule { export class OpenViduAngularModule {
static forRoot(config): ModuleWithProviders<OpenViduAngularModule> { static forRoot(config): ModuleWithProviders<OpenViduAngularModule> {

View File

@ -7,6 +7,7 @@
"declarationMap": true, "declarationMap": true,
"inlineSources": true, "inlineSources": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"moduleResolution": "node",
"types": [] "types": []
}, },
"exclude": [ "exclude": [