mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
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:
@@ -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 }"
|
||||
|
@@ -9,7 +9,7 @@
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.mat-input-container {
|
||||
.mat-form-field {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user