@esfaenza/forms-and-validations 11.2.1 → 11.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/esfaenza-forms-and-validations.umd.js +31 -8
- package/bundles/esfaenza-forms-and-validations.umd.js.map +1 -1
- package/esfaenza-forms-and-validations.metadata.json +1 -1
- package/esm2015/lib/forms/form-adaptive/form-adaptive.component.js +2 -2
- package/esm2015/lib/forms/form-autocomplete/form-autocomplete.component.js +2 -2
- package/esm2015/lib/forms/form-date/form-date.component.js +2 -2
- package/esm2015/lib/forms/form-datetime/form-datetime.component.js +2 -2
- package/esm2015/lib/forms/form-input/form-input.component.js +2 -2
- package/esm2015/lib/forms/form-select/form-select.component.js +2 -2
- package/esm2015/lib/forms/form-textarea/form-textarea.component.js +2 -2
- package/esm2015/lib/validations/base-validation.js +20 -2
- package/fesm2015/esfaenza-forms-and-validations.js +26 -8
- package/fesm2015/esfaenza-forms-and-validations.js.map +1 -1
- package/lib/validations/base-validation.d.ts +8 -0
- package/package.json +1 -1
|
@@ -469,6 +469,10 @@
|
|
|
469
469
|
*/
|
|
470
470
|
var BaseValidation = /** @class */ (function () {
|
|
471
471
|
function BaseValidation() {
|
|
472
|
+
/**
|
|
473
|
+
* Variabile per tenere in memoria il fatto che il componente è forzato a invalido o no
|
|
474
|
+
*/
|
|
475
|
+
this._forceInvalid = false;
|
|
472
476
|
/**
|
|
473
477
|
* Indica se il valore è obbligatorio o opzionale
|
|
474
478
|
*/
|
|
@@ -581,6 +585,24 @@
|
|
|
581
585
|
enumerable: false,
|
|
582
586
|
configurable: true
|
|
583
587
|
});
|
|
588
|
+
Object.defineProperty(BaseValidation.prototype, "forceInvalid", {
|
|
589
|
+
/**
|
|
590
|
+
* Imposta il componente come "invalid" a prescindere dai validatori
|
|
591
|
+
*/
|
|
592
|
+
set: function (val) {
|
|
593
|
+
var _this = this;
|
|
594
|
+
this._forceInvalid = val;
|
|
595
|
+
if (val)
|
|
596
|
+
setTimeout(function () { return _this.baseInput.control.setErrors({ forcedtoinvalid: true }); });
|
|
597
|
+
else
|
|
598
|
+
setTimeout(function () {
|
|
599
|
+
_this.baseInput.control.setErrors({ forcedtoinvalid: null });
|
|
600
|
+
_this.baseInput.control.updateValueAndValidity();
|
|
601
|
+
});
|
|
602
|
+
},
|
|
603
|
+
enumerable: false,
|
|
604
|
+
configurable: true
|
|
605
|
+
});
|
|
584
606
|
/**
|
|
585
607
|
* Helper che controlla se il tooltip deve essere mostrato o meno,
|
|
586
608
|
* richiamato direttamente dall'HTML dei componenti
|
|
@@ -659,7 +681,8 @@
|
|
|
659
681
|
noValidate: [{ type: core.Input }],
|
|
660
682
|
autocomplete: [{ type: core.Input }],
|
|
661
683
|
inputChange: [{ type: core.Output }],
|
|
662
|
-
submitted: [{ type: core.Input, args: ["submitted",] }]
|
|
684
|
+
submitted: [{ type: core.Input, args: ["submitted",] }],
|
|
685
|
+
forceInvalid: [{ type: core.Input }]
|
|
663
686
|
};
|
|
664
687
|
|
|
665
688
|
/**
|
|
@@ -2116,7 +2139,7 @@
|
|
|
2116
2139
|
FormDateTimeComponent.decorators = [
|
|
2117
2140
|
{ type: core.Component, args: [{
|
|
2118
2141
|
selector: "form-datetime",
|
|
2119
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-datetime [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [readonly]=\"Readonly\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey' : ''\"\r\n [useJsDates]=\"JsDates\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\">\r\n </val-datetime>\r\n</ng-template>",
|
|
2142
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-datetime [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [forceInvalid]=\"ForcedError\"\r\n [readonly]=\"Readonly\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey' : ''\"\r\n [useJsDates]=\"JsDates\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\">\r\n </val-datetime>\r\n</ng-template>",
|
|
2120
2143
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
2121
2144
|
},] }
|
|
2122
2145
|
];
|
|
@@ -2325,7 +2348,7 @@
|
|
|
2325
2348
|
{ type: core.Component, args: [{
|
|
2326
2349
|
selector: "form-adaptive",
|
|
2327
2350
|
providers: [{ provide: localizations.LocalizationService, useClass: FormAdaptiveComponentLoc }],
|
|
2328
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <div *ngIf=\"!Type\" class=\"app-margin-top-5\">\r\n <em>{{TypeMissingMessage}}</em>\r\n </div>\r\n \r\n <!--Se currency-->\r\n <div *ngIf=\"Type == 'currency'\">\r\n <val-currency \r\n [CurrencyOptions]=\"{ prefix: '', thousands: '.', decimal: ',', precision: Precision, align: 'left' }\" [noValidate]=\"!Validation\"\r\n #validationControl=\"ngModel\" type=\"text\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\"></val-currency>\r\n </div>\r\n <!--Se data-->\r\n <div *ngIf=\"Type == 'date'\">\r\n <val-date #validationControl=\"ngModel\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\"></val-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div *ngIf=\"Type == 'string'\">\r\n <val-input #validationControl=\"ngModel\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || ''}}\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\"></val-input>\r\n </div>\r\n <!--Se numero-->\r\n <div *ngIf=\"Type == 'float' || Type == 'number'\">\r\n <val-input #validationControl=\"ngModel\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^([0-9]*[,])?[0-9]+$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\"></val-input>\r\n </div>\r\n <!--Se numero intero-->\r\n <div *ngIf=\"Type == 'int'\">\r\n <val-input #validationControl=\"ngModel\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^[0-9]\\\\d*$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\"></val-input>\r\n </div>\r\n <!--Se boolean-->\r\n <div class=\"m-t-5\" *ngIf=\"Type == 'boolean'\">\r\n <input #validationControl=\"ngModel\" [readonly]=\"Readonly\" type=\"checkbox\" class=\"app-pointer\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" (ngModelChange)=\"changed();\" />\r\n </div>\r\n <!--Se enum-->\r\n <div *ngIf=\"Type == 'enum'\">\r\n <val-select #validationControl=\"ngModel\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [placeHolderValue]=\"''\" [placeholder]=\"('Select' | localize : lc) + '...'\" [required]=\"Required\" [(ngModel)]=\"Model\" (inputChange)=\"changed();\" name=\"{{GeneratedName}}\">\r\n <option *ngFor=\"let val of Source\" [value]=\"val.id\">{{val.description}}</option>\r\n </val-select>\r\n </div>\r\n <!--Se autocomplete-->\r\n <div *ngIf=\"Type == 'autocomplete'\">\r\n <val-autocomplete #validationControl=\"ngModel\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" [Source]=\"Source\" (inputChange)=\"changed();\"></val-autocomplete>\r\n </div>\r\n <!--Se date time-->\r\n <div *ngIf=\"Type == 'datetime'\">\r\n <val-datetime #validationControl=\"ngModel\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\"></val-datetime>\r\n </div>\r\n <!--Se time-->\r\n <div *ngIf=\"Type == 'time'\">\r\n <ngx-mat-timepicker name=\"val-time\" #elementRef #baseInput=\"ngModel\" [(ngModel)]=\"Model\" [disabled]=\"Readonly\"\r\n [showSpinners]=\"false\" [stepHour]=\"2\" [stepMinute]=\"5\" [stepSecond]=\"30\"\r\n [showSeconds]=\"true\" (ngModelChange)=\"changed()\" #validationControl=\"ngModel\">\r\n </ngx-mat-timepicker>\r\n </div>\r\n <!--Se file-->\r\n <div *ngIf=\"Type == 'file'\">\r\n <div class=\"input-group file-upload\">\r\n <input type=\"file\" (change)=\"fileChange()\" #fileInput class=\"file-upload-btn app-pointer\" [multiple]=\"null\"/>\r\n <input type=\"text\" [class.frm-padding-left-22]=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" class=\"form-control checking-field\" placeholder=\"{{'Select a file' | localize : lc}}...\" [(ngModel)]=\"ModelFile.filename\" name=\"dsfile\" #validationControl=\"ngModel\" [required]=\"Required\"/>\r\n \r\n <a class=\"fa fa-download app-pointer app-input-icon\" *ngIf=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" (click)=\"downloadAttachment()\"></a>\r\n <i class=\"fa fa-times delete-file\" (click)=\"fileChange(true)\" *ngIf=\"ModelFile.filename\"></i>\r\n <span class=\"input-group-btn\">\r\n <button class=\"btn btn-primary btn-file-upload\" type=\"button\"><i class=\"fa fa-upload\"></i></button>\r\n </span>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
2351
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <div *ngIf=\"!Type\" class=\"app-margin-top-5\">\r\n <em>{{TypeMissingMessage}}</em>\r\n </div>\r\n \r\n <!--Se currency-->\r\n <div *ngIf=\"Type == 'currency'\">\r\n <val-currency [forceInvalid]=\"ForcedError\"\r\n [CurrencyOptions]=\"{ prefix: '', thousands: '.', decimal: ',', precision: Precision, align: 'left' }\" [noValidate]=\"!Validation\"\r\n #validationControl=\"ngModel\" type=\"text\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\"></val-currency>\r\n </div>\r\n <!--Se data-->\r\n <div *ngIf=\"Type == 'date'\">\r\n <val-date #validationControl=\"ngModel\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\"></val-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div *ngIf=\"Type == 'string'\">\r\n <val-input #validationControl=\"ngModel\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || ''}}\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\"></val-input>\r\n </div>\r\n <!--Se numero-->\r\n <div *ngIf=\"Type == 'float' || Type == 'number'\">\r\n <val-input #validationControl=\"ngModel\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^([0-9]*[,])?[0-9]+$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\"></val-input>\r\n </div>\r\n <!--Se numero intero-->\r\n <div *ngIf=\"Type == 'int'\">\r\n <val-input #validationControl=\"ngModel\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^[0-9]\\\\d*$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\"></val-input>\r\n </div>\r\n <!--Se boolean-->\r\n <div class=\"m-t-5\" *ngIf=\"Type == 'boolean'\">\r\n <input #validationControl=\"ngModel\" [readonly]=\"Readonly\" type=\"checkbox\" class=\"app-pointer\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" (ngModelChange)=\"changed();\" />\r\n </div>\r\n <!--Se enum-->\r\n <div *ngIf=\"Type == 'enum'\">\r\n <val-select #validationControl=\"ngModel\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [placeHolderValue]=\"''\" [placeholder]=\"('Select' | localize : lc) + '...'\" [required]=\"Required\" [(ngModel)]=\"Model\" (inputChange)=\"changed();\" name=\"{{GeneratedName}}\">\r\n <option *ngFor=\"let val of Source\" [value]=\"val.id\">{{val.description}}</option>\r\n </val-select>\r\n </div>\r\n <!--Se autocomplete-->\r\n <div *ngIf=\"Type == 'autocomplete'\">\r\n <val-autocomplete #validationControl=\"ngModel\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" [Source]=\"Source\" (inputChange)=\"changed();\"></val-autocomplete>\r\n </div>\r\n <!--Se date time-->\r\n <div *ngIf=\"Type == 'datetime'\">\r\n <val-datetime #validationControl=\"ngModel\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\"></val-datetime>\r\n </div>\r\n <!--Se time-->\r\n <div *ngIf=\"Type == 'time'\">\r\n <ngx-mat-timepicker name=\"val-time\" #elementRef #baseInput=\"ngModel\" [(ngModel)]=\"Model\" [disabled]=\"Readonly\"\r\n [showSpinners]=\"false\" [stepHour]=\"2\" [stepMinute]=\"5\" [stepSecond]=\"30\"\r\n [showSeconds]=\"true\" (ngModelChange)=\"changed()\" #validationControl=\"ngModel\">\r\n </ngx-mat-timepicker>\r\n </div>\r\n <!--Se file-->\r\n <div *ngIf=\"Type == 'file'\">\r\n <div class=\"input-group file-upload\">\r\n <input type=\"file\" (change)=\"fileChange()\" #fileInput class=\"file-upload-btn app-pointer\" [multiple]=\"null\"/>\r\n <input type=\"text\" [class.frm-padding-left-22]=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" class=\"form-control checking-field\" placeholder=\"{{'Select a file' | localize : lc}}...\" [(ngModel)]=\"ModelFile.filename\" name=\"dsfile\" #validationControl=\"ngModel\" [required]=\"Required\"/>\r\n \r\n <a class=\"fa fa-download app-pointer app-input-icon\" *ngIf=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" (click)=\"downloadAttachment()\"></a>\r\n <i class=\"fa fa-times delete-file\" (click)=\"fileChange(true)\" *ngIf=\"ModelFile.filename\"></i>\r\n <span class=\"input-group-btn\">\r\n <button class=\"btn btn-primary btn-file-upload\" type=\"button\"><i class=\"fa fa-upload\"></i></button>\r\n </span>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
2329
2352
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
2330
2353
|
styles: [".frm-padding-left-22{padding-left:22px}"]
|
|
2331
2354
|
},] }
|
|
@@ -2623,7 +2646,7 @@
|
|
|
2623
2646
|
FormDateComponent.decorators = [
|
|
2624
2647
|
{ type: core.Component, args: [{
|
|
2625
2648
|
selector: "form-date",
|
|
2626
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-date [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [readonly]=\"Readonly\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey' : ''\"\r\n [useJsDates]=\"JsDates\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\">\r\n </val-date>\r\n</ng-template>",
|
|
2649
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-date [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [forceInvalid]=\"ForcedError\"\r\n [readonly]=\"Readonly\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey' : ''\"\r\n [useJsDates]=\"JsDates\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\">\r\n </val-date>\r\n</ng-template>",
|
|
2627
2650
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
2628
2651
|
},] }
|
|
2629
2652
|
];
|
|
@@ -2689,7 +2712,7 @@
|
|
|
2689
2712
|
FormInputComponent.decorators = [
|
|
2690
2713
|
{ type: core.Component, args: [{
|
|
2691
2714
|
selector: "form-input",
|
|
2692
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-input [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [readonly]=\"Readonly\"\r\n type=\"text\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n autocomplete=\"off\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [Password]=\"Password\">\r\n <ng-container *ngIf=\"HasSuffix\">\r\n <ng-template #suffix_internal>\r\n <button type=\"button\" class=\"mat-button mat-icon-button mat-button-base mat-icon-button-override mat-icon-button-override-suffix\"\r\n matSuffix (click)=\"onSuffixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"suffix\"></ng-container>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"HasPrefix\">\r\n <ng-template #prefix_internal>\r\n <button type=\"button\" class=\"mat-button mat-icon-button mat-button-base mat-icon-button-override mat-icon-button-override-prefix\"\r\n matPrefix (click)=\"onPrefixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"prefix\"></ng-container>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n </val-input>\r\n</ng-template>",
|
|
2715
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-input [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [readonly]=\"Readonly\"\r\n [forceInvalid]=\"ForcedError\"\r\n type=\"text\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n autocomplete=\"off\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [Password]=\"Password\">\r\n <ng-container *ngIf=\"HasSuffix\">\r\n <ng-template #suffix_internal>\r\n <button type=\"button\" class=\"mat-button mat-icon-button mat-button-base mat-icon-button-override mat-icon-button-override-suffix\"\r\n matSuffix (click)=\"onSuffixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"suffix\"></ng-container>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"HasPrefix\">\r\n <ng-template #prefix_internal>\r\n <button type=\"button\" class=\"mat-button mat-icon-button mat-button-base mat-icon-button-override mat-icon-button-override-prefix\"\r\n matPrefix (click)=\"onPrefixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"prefix\"></ng-container>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n </val-input>\r\n</ng-template>",
|
|
2693
2716
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
2694
2717
|
},] }
|
|
2695
2718
|
];
|
|
@@ -2853,7 +2876,7 @@
|
|
|
2853
2876
|
{ type: core.Component, args: [{
|
|
2854
2877
|
selector: "form-select",
|
|
2855
2878
|
providers: [{ provide: localizations.LocalizationService, useClass: FormSelectComponentLoc }],
|
|
2856
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && BoundSource\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n\r\n <!-- Select vuota per quando non ho Sorgenti dati da cui selezionare. Uguale identica alla piena ma senza option\r\n Purtroppo devono essere due componenti distinti perch\u00E9 una select una volta creata non riesce pi\u00F9 ad adattarsi ai cambi di options -->\r\n <val-select *ngIf=\"!BoundSource || BoundSource.length == 0\"\r\n [required]=\"Required ? 'required' : null\"\r\n [noValidate]=\"!Validation\"\r\n [readonly]=\"Readonly\"\r\n [label]=\"SelectLabel\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\"\r\n [placeHolderValue]=\"PlaceholderValue\"\r\n [submitted]=\"Form?.submitted\"\r\n [emptyFieldValue]=\"Required || Placeholder || SelectLabel ? EmptyFieldValue : ''\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n (inputChange)=\"Model = $event == EmptyFieldValue ? (Required? PlaceholderValue : '') : $event; changed();\"\r\n #validationControl=\"ngModel\">\r\n </val-select>\r\n\r\n <!-- Select vera e propria per quando arrivano i dati -->\r\n <val-select *ngIf=\"BoundSource && BoundSource.length > 0\"\r\n [required]=\"Required ? 'required' : null\"\r\n [noValidate]=\"!Validation\"\r\n [readonly]=\"Readonly\"\r\n [label]=\"SelectLabel\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\"\r\n [placeHolderValue]=\"PlaceholderValue\"\r\n [submitted]=\"Form?.submitted\"\r\n [emptyFieldValue]=\"Required || Placeholder || SelectLabel ? EmptyFieldValue : ''\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n (inputChange)=\"Model = $event == EmptyFieldValue ? (Required? PlaceholderValue : '') : $event; changed();\"\r\n #validationControl=\"ngModel\">\r\n <option *ngFor=\"let obj of BoundSource\" [value]=\"obj[IdField]\">{{obj.finaldescription}}</option>\r\n </val-select>\r\n</ng-template>",
|
|
2879
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && BoundSource\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n\r\n <!-- Select vuota per quando non ho Sorgenti dati da cui selezionare. Uguale identica alla piena ma senza option\r\n Purtroppo devono essere due componenti distinti perch\u00E9 una select una volta creata non riesce pi\u00F9 ad adattarsi ai cambi di options -->\r\n <val-select *ngIf=\"!BoundSource || BoundSource.length == 0\"\r\n [required]=\"Required ? 'required' : null\"\r\n [noValidate]=\"!Validation\"\r\n [readonly]=\"Readonly\"\r\n [forceInvalid]=\"ForcedError\"\r\n [label]=\"SelectLabel\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\"\r\n [placeHolderValue]=\"PlaceholderValue\"\r\n [submitted]=\"Form?.submitted\"\r\n [emptyFieldValue]=\"Required || Placeholder || SelectLabel ? EmptyFieldValue : ''\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n (inputChange)=\"Model = $event == EmptyFieldValue ? (Required? PlaceholderValue : '') : $event; changed();\"\r\n #validationControl=\"ngModel\">\r\n </val-select>\r\n\r\n <!-- Select vera e propria per quando arrivano i dati -->\r\n <val-select *ngIf=\"BoundSource && BoundSource.length > 0\"\r\n [required]=\"Required ? 'required' : null\"\r\n [noValidate]=\"!Validation\"\r\n [readonly]=\"Readonly\"\r\n [forceInvalid]=\"ForcedError\"\r\n [label]=\"SelectLabel\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\"\r\n [placeHolderValue]=\"PlaceholderValue\"\r\n [submitted]=\"Form?.submitted\"\r\n [emptyFieldValue]=\"Required || Placeholder || SelectLabel ? EmptyFieldValue : ''\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n (inputChange)=\"Model = $event == EmptyFieldValue ? (Required? PlaceholderValue : '') : $event; changed();\"\r\n #validationControl=\"ngModel\">\r\n <option *ngFor=\"let obj of BoundSource\" [value]=\"obj[IdField]\">{{obj.finaldescription}}</option>\r\n </val-select>\r\n</ng-template>",
|
|
2857
2880
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
2858
2881
|
},] }
|
|
2859
2882
|
];
|
|
@@ -3108,7 +3131,7 @@
|
|
|
3108
3131
|
FormTextareaComponent.decorators = [
|
|
3109
3132
|
{ type: core.Component, args: [{
|
|
3110
3133
|
selector: "form-textarea",
|
|
3111
|
-
template: "<div class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <val-textarea [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [rows]=\"Rows\"\r\n [readonly]=\"Readonly\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey app-no-resize' : 'app-no-resize'\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n autocomplete=\"off\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\">\r\n </val-textarea>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>",
|
|
3134
|
+
template: "<div class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <val-textarea [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [forceInvalid]=\"ForcedError\"\r\n [rows]=\"Rows\"\r\n [readonly]=\"Readonly\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey app-no-resize' : 'app-no-resize'\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n autocomplete=\"off\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\">\r\n </val-textarea>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>",
|
|
3112
3135
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
3113
3136
|
},] }
|
|
3114
3137
|
];
|
|
@@ -3204,7 +3227,7 @@
|
|
|
3204
3227
|
FormAutocompleteComponent.decorators = [
|
|
3205
3228
|
{ type: core.Component, args: [{
|
|
3206
3229
|
selector: "form-autocomplete",
|
|
3207
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-autocomplete [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [readonly]=\"Readonly\"\r\n type=\"text\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [Source]=\"BoundSource\">\r\n </val-autocomplete>\r\n</ng-template>",
|
|
3230
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-autocomplete [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [forceInvalid]=\"ForcedError\"\r\n [readonly]=\"Readonly\"\r\n type=\"text\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [Source]=\"BoundSource\">\r\n </val-autocomplete>\r\n</ng-template>",
|
|
3208
3231
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
3209
3232
|
},] }
|
|
3210
3233
|
];
|