[ADF-1518] Update material2 beta 10 and angular 4.3.6 (#2304)

* ignore pkg lock

* update pkg json

* date picker update material beta.10

* isDateInstance moment adapter

* style and  datepicker update material2 beta 10

* update test dateitem to beta10

* regenerate style files

* use material icons web font

* fix data range material 2 beta 10

* minors cleaning

* recreate styles

* remove unused componentHandler var

* fix failing test checkbox
This commit is contained in:
Eugenio Romano
2017-09-15 11:39:27 +01:00
committed by Denys Vuika
parent ab9fbda53f
commit 3c1729b960
55 changed files with 4928 additions and 2761 deletions

View File

@@ -35,17 +35,17 @@
"activiti"
],
"dependencies": {
"@angular/animations": "4.2.5",
"@angular/cdk": "2.0.0-beta.8",
"@angular/common": "4.2.5",
"@angular/compiler": "4.2.5",
"@angular/core": "4.2.5",
"@angular/forms": "4.2.5",
"@angular/http": "4.2.5",
"@angular/material": "2.0.0-beta.8",
"@angular/platform-browser": "4.2.5",
"@angular/platform-browser-dynamic": "4.2.5",
"@angular/router": "4.2.5",
"@angular/animations": "4.3.6",
"@angular/cdk": "2.0.0-beta.10",
"@angular/common": "4.3.6",
"@angular/compiler": "4.3.6",
"@angular/core": "4.3.6",
"@angular/forms": "4.3.6",
"@angular/http": "4.3.6",
"@angular/material": "2.0.0-beta.10",
"@angular/platform-browser": "4.3.6",
"@angular/platform-browser-dynamic": "4.3.6",
"@angular/router": "4.3.6",
"@ngx-translate/core": "7.0.0",
"alfresco-js-api": "1.8.0",
"core-js": "2.4.1",
@@ -55,7 +55,7 @@
"reflect-metadata": "0.1.10",
"rxjs": "5.1.0",
"systemjs": "0.19.27",
"zone.js": "0.8.4"
"zone.js": "0.8.12"
},
"devDependencies": {
"@types/hammerjs": "2.0.34",
@@ -66,7 +66,7 @@
"autoprefixer": "6.5.4",
"codelyzer": "3.1.2",
"copy-webpack-plugin": "4.0.1",
"css-loader": "0.23.1",
"css-loader": "0.25.0",
"css-to-string-loader": "0.1.2",
"cssnano": "3.8.1",
"extract-text-webpack-plugin": "2.0.0-rc.3",

View File

@@ -12,7 +12,7 @@
.mat-input-prefix {
position: absolute;
margin-top: 42px;
margin-top: 37px;
}
}

View File

@@ -47,6 +47,10 @@
padding-right: 1%;
}
.mat-form-field {
width: 100%;
}
md-input-container {
width: 100%;
}
@@ -56,7 +60,7 @@
}
.mat-input-placeholder {
top: 2.2em !important;
top: 1.8em !important;
}
.mat-focused {

View File

@@ -4,17 +4,18 @@
<input mdInput
[id]="field.id"
[mdDatepicker]="datePicker"
[(value)]="field.value"
[(value)]="displayDate"
[required]="isRequired()"
[disabled]="field.readOnly"
[min]="minDate"
[max]="maxDate"
(focusout)="onDateChanged($event.srcElement.value)"
(dateChange)="onDateChanged($event)"
placeholder="{{field.placeholder}}">
<button class="adf-date-widget-button" mdSuffix [mdDatepickerToggle]="datePicker" [disabled]="field.readOnly"></button>
<md-datepicker-toggle mdSuffix [for]="datePicker" [disabled]="field.readOnly" ></md-datepicker-toggle>
</md-input-container>
<error-widget [error]="field.validationSummary" ></error-widget>
<error-widget *ngIf="isInvalidFieldRequired()" required="{{ 'FORM.FIELD.REQUIRED' | translate }}"></error-widget>
<md-datepicker #datePicker [touchUi]="true" [startAt]="startAt" (selectedChanged)="onDateChanged($event)"></md-datepicker>
<md-datepicker #datePicker [touchUi]="true" [startAt]="startAt" ></md-datepicker>
</div>

View File

@@ -5,29 +5,31 @@
&-date-widget {
.mat-input-suffix {
text-align: right;
position: absolute;
margin-top: 42px;
margin-top: 30px;
width: 100%;
}
&-date-widget-button {
position: relative;
float: right;
}
&-date-input {
padding-top: 5px;
padding-bottom: 5px;
}
&-grid-date-widget {
align-items: center;
padding: 0;
}
&-date-widget-button__cell {
margin-top: 0;
margin-bottom: 0;
}
}
&-date-widget-button {
position: relative;
float: right;
}
&-date-input {
padding-top: 5px;
padding-bottom: 5px;
}
&-grid-date-widget {
align-items: center;
padding: 0;
}
&-date-widget-button__cell {
margin-top: 0;
margin-bottom: 0;
}
}

View File

@@ -40,6 +40,8 @@ export class DateWidgetComponent extends WidgetComponent implements OnInit {
minDate: Moment;
maxDate: Moment;
displayDate: Moment;
constructor(public formService: FormService, public dateAdapter: DateAdapter<Moment>) {
super(formService);
}
@@ -57,6 +59,9 @@ export class DateWidgetComponent extends WidgetComponent implements OnInit {
this.maxDate = moment(this.field.maxValue, this.field.dateDisplayFormat);
}
}
this.displayDate = moment(this.field.value, this.field.dateDisplayFormat, true);
}
onDateChanged(newDateValue) {
@@ -67,10 +72,11 @@ export class DateWidgetComponent extends WidgetComponent implements OnInit {
if (!momentDate.isValid()) {
this.field.validationSummary = this.field.dateDisplayFormat;
this.field.value = null;
}else {
} else {
this.field.value = newDateValue;
this.displayDate = moment(this.field.value, this.field.dateDisplayFormat, true);
}
}else {
} else {
this.field.value = null;
}
this.checkVisibility(this.field);

View File

@@ -4,15 +4,25 @@
.adf {
&-dropdown-widget {
width: 100%;
padding-top: 16px;
}
margin-top: 13px;
&-select {
width: 100%;
}
.adf-select{
padding-top: 0 !important;
width: 100%;
}
.mat-select-value-text{
font-size: 14px;
}
&-select {
width: 100%;
}
&-dropdown-required-message .adf-error-text-container{
margin-top: 1px !important;
}
&-dropdown-required-message .adf-error-text-container{
margin-top: 1px !important;
}
}

View File

@@ -10,8 +10,7 @@
[required]="column.required"
[disabled]="!column.editable"
(focusout)="onDateChanged($event.srcElement.value)">
<button mdSuffix *ngIf="column.editable"
[mdDatepickerToggle]="datePicker" class="adf-date-editor-button"></button>
<md-datepicker-toggle *ngIf="column.editable" mdSuffix [for]="datePicker" class="adf-date-editor-button" ></md-datepicker-toggle>
</md-input-container>
<md-datepicker #datePicker (selectedChanged)="onDateChanged($event)" [touchUi]="true"></md-datepicker>
<md-datepicker #datePicker (dateChange)="onDateChanged($event)" [touchUi]="true"></md-datepicker>
</div>

View File

@@ -1,4 +1,10 @@
.adf-error-text-container {
margin-top: -14px !important;
width: 50%;
position: relative;
width: 100%;
}
.adf-error-text{
width: 85%;
}

View File

@@ -17,7 +17,6 @@
.adf {
&-error-text-container {
width: 95%;
height: 20px;
margin-top: -12px;
}

View File

@@ -17,7 +17,6 @@
overflow: hidden;
transition: all .3s cubic-bezier(.55,0,.55,.2);
opacity: 1;
margin-top: 0;
padding-top: 5px;
text-align: right;
padding-right: 2px;

View File

@@ -36,7 +36,7 @@
background: #ff9800;
display: inline-block;
width: 30px;
padding: 0px 9px;
padding: 0 9px;
border-radius: 100px;
color: #fff;
text-align: center;
@@ -56,7 +56,7 @@
height: 50px;
vertical-align: middle;
display: inline-block;
padding: 0px 0px;
padding: 0 0;
}
&-people-widget-image-row {