Angular 6 (#556)

* upgrade to angular 6 (with rxjs-compat)

* fix tests

* fix test scripts

* upgrade rxjs to 6.0

* remove rxjs-compat layer

* update unit tests

* restore tests

* context-menu transparent backdrop

* upgrade libs

* changed snackbar locator

* locator as class

* remove locator element reference

* snackbar locators

* wait for snackbar before executing the action button

* expect cdk-overlay before mat-menu-panel condition

* update libs
This commit is contained in:
Denys Vuika
2018-08-09 11:11:06 +01:00
committed by GitHub
parent 4668112871
commit f91608fe78
54 changed files with 3512 additions and 1976 deletions

View File

@@ -4,7 +4,7 @@
<mat-dialog-content>
<form novalidate [formGroup]="form" (submit)="submit()">
<mat-input-container>
<mat-form-field>
<input
placeholder="{{ 'LIBRARY.DIALOG.FORM.NAME' | translate }}"
required
@@ -15,9 +15,9 @@
<mat-error *ngIf="form.controls['title'].hasError('maxlength')">
{{ 'LIBRARY.ERRORS.DESCRIPTION_TOO_LONG' | translate }}
</mat-error>
</mat-input-container>
</mat-form-field>
<mat-input-container>
<mat-form-field>
<input
required
placeholder="{{ 'LIBRARY.DIALOG.FORM.SITE_ID' | translate }}"
@@ -32,9 +32,9 @@
<mat-error *ngIf="form.controls['id'].hasError('maxlength')">
{{ 'LIBRARY.ERRORS.ID_TOO_LONG' | translate }}
</mat-error>
</mat-input-container>
</mat-form-field>
<mat-input-container>
<mat-form-field>
<textarea
matInput
placeholder="{{ 'LIBRARY.DIALOG.FORM.DESCRIPTION' | translate }}"
@@ -44,7 +44,7 @@
<mat-error *ngIf="form.controls['description'].hasError('maxlength')">
{{ 'LIBRARY.ERRORS.DESCRIPTION_TOO_LONG' | translate }}
</mat-error>
</mat-input-container>
</mat-form-field>
<mat-radio-group
[ngModelOptions]="{ standalone: true }"

View File

@@ -9,7 +9,7 @@
margin: 10px 0;
}
.mat-input-container {
.mat-form-field {
width: 100%;
}

View File

@@ -15,13 +15,14 @@
* limitations under the License.
*/
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material';
import { SiteBody, SiteEntry } from 'alfresco-js-api';
import { ContentApiService } from '../../services/content-api.service';
import { SiteIdValidator, forbidSpecialCharacters } from './form.validators';
import { debounceTime } from 'rxjs/operators';
@Component({
@@ -67,7 +68,7 @@ export class LibraryDialogComponent implements OnInit {
this.visibilityOption = this.visibilityOptions[0].value;
this.form.controls['title'].valueChanges
.debounceTime(300)
.pipe(debounceTime(300))
.subscribe((titleValue: string) => {
if (!titleValue.trim().length) {
return;