@esfaenza/forms-and-validations 11.2.57 → 11.2.60

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.
@@ -1067,7 +1067,7 @@
1067
1067
  ValidationDateComponent.decorators = [
1068
1068
  { type: core.Component, args: [{
1069
1069
  selector: "val-date",
1070
- template: "<mat-form-field appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-no-border-top mat-height-fixed\" [style.width.px]=\"widthPx\">\r\n <mat-label *ngIf=\"placeholder\">{{placeholder}}</mat-label>\r\n <input matInput\r\n [matDatepicker]=\"datepicker\"\r\n #baseInput=\"ngModel\"\r\n #htmlInput\r\n type=\"text\"\r\n triggers=\"\"\r\n placement=\"top\"\r\n name=\"val-date\"\r\n class=\"form-control {{class}}\"\r\n autocomplete=\"{{autocomplete}}\"\r\n id=\"{{id}}\"\r\n (click)=\"onFocus($event)\"\r\n [(ngModel)]=\"value\"\r\n [class.checking-field]=\"!noValidate\"\r\n [tooltip]=\"tolTemplate\"\r\n [placeholder]=\"placeholder ? '' : _format\"\r\n [disabled]=\"readonly || disabled\"\r\n [isDisabled]=\"readonly || disabled\"\r\n (dateChange)=\"outputValue($event); onFinalize();\"\r\n (keyup)=\"$event.keyCode == 13 && onFinalize();\"\r\n (blur)=\"closeTooltip();\"\r\n />\r\n <mat-datepicker-toggle matSuffix [for]=\"datepicker\"></mat-datepicker-toggle>\r\n <mat-datepicker #datepicker></mat-datepicker>\r\n</mat-form-field>\r\n\r\n<ng-template #tolTemplate>\r\n <div (click)=\"closeTooltip()\">\r\n <span>{{validationFailed}}</span>\r\n </div>\r\n</ng-template>",
1070
+ template: "<mat-form-field appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-no-border-top mat-height-fixed\" [style.width.px]=\"widthPx\">\r\n <mat-label *ngIf=\"placeholder\">{{placeholder}}</mat-label>\r\n <input matInput\r\n [matDatepicker]=\"datepicker\"\r\n #baseInput=\"ngModel\"\r\n #htmlInput\r\n type=\"text\"\r\n triggers=\"\"\r\n placement=\"top\"\r\n name=\"val-date\"\r\n class=\"form-control {{class}}\"\r\n autocomplete=\"{{autocomplete}}\"\r\n id=\"{{id}}\"\r\n (click)=\"onFocus($event)\"\r\n [(ngModel)]=\"value\"\r\n [class.checking-field]=\"!noValidate\"\r\n [tooltip]=\"tolTemplate\"\r\n [placeholder]=\"placeholder ? '' : _format\"\r\n [disabled]=\"readonly || disabled\"\r\n [isDisabled]=\"readonly || disabled\"\r\n (dateChange)=\"outputValue($event); onFinalize();\"\r\n (keyup)=\"($event.keyCode == 13 || $event.keyCode == 27) && onFinalize();\"\r\n (blur)=\"closeTooltip();\"\r\n />\r\n <mat-datepicker-toggle matSuffix [for]=\"datepicker\"></mat-datepicker-toggle>\r\n <mat-datepicker #datepicker></mat-datepicker>\r\n</mat-form-field>\r\n\r\n<ng-template #tolTemplate>\r\n <div (click)=\"closeTooltip()\">\r\n <span>{{validationFailed}}</span>\r\n </div>\r\n</ng-template>",
1071
1071
  encapsulation: core.ViewEncapsulation.None,
1072
1072
  changeDetection: core.ChangeDetectionStrategy.OnPush,
1073
1073
  providers: [
@@ -1246,7 +1246,7 @@
1246
1246
  ValidationInputComponent.decorators = [
1247
1247
  { type: core.Component, args: [{
1248
1248
  selector: "val-input",
1249
- template: "<mat-form-field appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-no-border-top mat-height-fixed\" [style.width.px]=\"widthPx\">\r\n <mat-label [class.app-margin-left-25]=\"HasPrefix\" *ngIf=\"placeholder\">{{placeholder}}</mat-label>\r\n <ng-container *ngIf=\"HasPrefix\">\r\n <ng-container *ngTemplateOutlet=\"prefix_internal\"></ng-container>\r\n </ng-container>\r\n\r\n <input matInput\r\n #baseInput='ngModel'\r\n #htmlInput\r\n type=\"{{type}}\"\r\n triggers=\"\"\r\n placement=\"top\"\r\n autocomplete=\"{{autocomplete}}\"\r\n name=\"val-input\"\r\n class=\"form-control {{class}}\"\r\n id=\"{{id}}\"\r\n [class.app-margin-left-25]=\"HasPrefix\"\r\n [class.mat-input-with-suffix]=\"HasSuffix || Password || showWarning\"\r\n [(ngModel)]=\"value\"\r\n [class.checking-field]=\"!noValidate && !showWarning\"\r\n [tooltip]=\"tolTemplate\"\r\n [disabled]=\"readonly || disabled\"\r\n (ngModelChange)=\"onModelChange($event)\"\r\n (click)=\"onFocus($event)\"\r\n (focus)=\"checkTooltip();\"\r\n (keyup)=\"$event.keyCode == 13 && onFinalize();\"\r\n (blur)=\"closeTooltip(); onFinalize();\"\r\n >\r\n <ng-container *ngIf=\"HasSuffix || Password || showWarning\">\r\n <ng-container *ngIf=\"!Password && !showWarning\">\r\n <ng-container *ngTemplateOutlet=\"suffix_internal\"></ng-container>\r\n </ng-container>\r\n\r\n <span class=\"form-input-suffix\" *ngIf=\"Password || showWarning\">\r\n <ng-container *ngIf=\"Password\" matSuffix>\r\n <a *ngIf=\"passShown\" class=\"fa fa-eye-slash app-fs-16 app-pointer\" (click)=\"type = 'password'; passShown = !passShown; $event.preventDefault()\"></a>\r\n <a *ngIf=\"!passShown\" class=\"fa fa-eye app-fs-16 app-pointer\" (click)=\"type = 'text'; passShown = !passShown; $event.preventDefault()\"></a>\r\n </ng-container>\r\n <ng-container *ngIf=\"showWarning\" matSuffix>\r\n <span title=\"{{warningTitle}}\" class=\"{{warningClass}} text-warning app-fs-16\"></span>\r\n </ng-container>\r\n </span>\r\n </ng-container>\r\n</mat-form-field>\r\n\r\n<ng-template #tolTemplate>\r\n <div (click)=\"closeTooltip()\">\r\n <span>{{validationFailed}}</span>\r\n </div>\r\n</ng-template>",
1249
+ template: "<mat-form-field appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-no-border-top mat-height-fixed\" [style.width.px]=\"widthPx\">\r\n <mat-label [class.app-margin-left-25]=\"HasPrefix\" *ngIf=\"placeholder\">{{placeholder}}</mat-label>\r\n <ng-container *ngIf=\"HasPrefix\">\r\n <ng-container *ngTemplateOutlet=\"prefix_internal\"></ng-container>\r\n </ng-container>\r\n\r\n <input matInput\r\n #baseInput='ngModel'\r\n #htmlInput\r\n type=\"{{type}}\"\r\n triggers=\"\"\r\n placement=\"top\"\r\n autocomplete=\"{{autocomplete}}\"\r\n name=\"val-input\"\r\n class=\"form-control {{class}}\"\r\n id=\"{{id}}\"\r\n [class.app-margin-left-25]=\"HasPrefix\"\r\n [class.mat-input-with-suffix]=\"HasSuffix || Password || showWarning\"\r\n [(ngModel)]=\"value\"\r\n [class.checking-field]=\"!noValidate && !showWarning\"\r\n [tooltip]=\"tolTemplate\"\r\n [disabled]=\"readonly || disabled\"\r\n (ngModelChange)=\"onModelChange($event)\"\r\n (click)=\"onFocus($event)\"\r\n (focus)=\"checkTooltip();\"\r\n (keyup)=\"($event.keyCode == 13 || $event.keyCode == 27) && onFinalize();\"\r\n (blur)=\"closeTooltip(); onFinalize();\"\r\n >\r\n <ng-container *ngIf=\"HasSuffix || Password || showWarning\">\r\n <ng-container *ngIf=\"!Password && !showWarning\">\r\n <ng-container *ngTemplateOutlet=\"suffix_internal\"></ng-container>\r\n </ng-container>\r\n\r\n <span class=\"form-input-suffix\" *ngIf=\"Password || showWarning\">\r\n <ng-container *ngIf=\"Password\" matSuffix>\r\n <a *ngIf=\"passShown\" class=\"fa fa-eye-slash app-fs-16 app-pointer\" (click)=\"type = 'password'; passShown = !passShown; $event.preventDefault()\"></a>\r\n <a *ngIf=\"!passShown\" class=\"fa fa-eye app-fs-16 app-pointer\" (click)=\"type = 'text'; passShown = !passShown; $event.preventDefault()\"></a>\r\n </ng-container>\r\n <ng-container *ngIf=\"showWarning\" matSuffix>\r\n <span title=\"{{warningTitle}}\" class=\"{{warningClass}} text-warning app-fs-16\"></span>\r\n </ng-container>\r\n </span>\r\n </ng-container>\r\n</mat-form-field>\r\n\r\n<ng-template #tolTemplate>\r\n <div (click)=\"closeTooltip()\">\r\n <span>{{validationFailed}}</span>\r\n </div>\r\n</ng-template>",
1250
1250
  changeDetection: core.ChangeDetectionStrategy.OnPush,
1251
1251
  providers: [
1252
1252
  { provide: localizations.LocalizationService, useClass: BaseValidationLoc },
@@ -1307,7 +1307,7 @@
1307
1307
  ValidationCurrencyComponent.decorators = [
1308
1308
  { type: core.Component, args: [{
1309
1309
  selector: "val-currency",
1310
- template: "<mat-form-field appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-no-border-top mat-height-fixed\" [style.width.px]=\"widthPx\">\r\n <mat-label *ngIf=\"placeholder\">{{placeholder}}</mat-label>\r\n <input #baseInput='ngModel'\r\n #htmlInput\r\n currencyMask\r\n matInput\r\n [readonly]=\"readonly\"\r\n [options]='CurrencyOptions'\r\n [(ngModel)]=\"value\"\r\n name=\"val-input\"\r\n id=\"{{id}}\"\r\n (click)=\"onFocus($event)\"\r\n (focus)=\"checkTooltip();\"\r\n (keyup)=\"$event.keyCode == 13 && onFinalize();\"\r\n (blur)=\"closeTooltip(); onFinalize();\"\r\n class=\"form-control {{class}}\"\r\n [class.checking-field]=\"!noValidate\"\r\n (ngModelChange)=\"onModelChange($event)\"\r\n type=\"{{type}}\"\r\n [tooltip]=\"tolTemplate\"\r\n triggers=\"\"\r\n placement=\"top\"\r\n autocomplete=\"{{autocomplete}}\" />\r\n</mat-form-field>\r\n\r\n<ng-template #tolTemplate>\r\n <div>\r\n <span class=\"close-button pull-right\" (click)=\"closeTooltip()\" aria-label=\"Close\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </span>\r\n <span>{{validationFailed}}</span>\r\n </div>\r\n</ng-template>",
1310
+ template: "<mat-form-field appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-no-border-top mat-height-fixed\" [style.width.px]=\"widthPx\">\r\n <mat-label *ngIf=\"placeholder\">{{placeholder}}</mat-label>\r\n <input #baseInput='ngModel'\r\n #htmlInput\r\n currencyMask\r\n matInput\r\n [readonly]=\"readonly\"\r\n [options]='CurrencyOptions'\r\n [(ngModel)]=\"value\"\r\n name=\"val-input\"\r\n id=\"{{id}}\"\r\n (click)=\"onFocus($event)\"\r\n (focus)=\"checkTooltip();\"\r\n (keyup)=\"($event.keyCode == 13 || $event.keyCode == 27) && onFinalize();\"\r\n (blur)=\"closeTooltip(); onFinalize();\"\r\n class=\"form-control {{class}}\"\r\n [class.checking-field]=\"!noValidate\"\r\n (ngModelChange)=\"onModelChange($event)\"\r\n type=\"{{type}}\"\r\n [tooltip]=\"tolTemplate\"\r\n triggers=\"\"\r\n placement=\"top\"\r\n autocomplete=\"{{autocomplete}}\" />\r\n</mat-form-field>\r\n\r\n<ng-template #tolTemplate>\r\n <div>\r\n <span class=\"close-button pull-right\" (click)=\"closeTooltip()\" aria-label=\"Close\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </span>\r\n <span>{{validationFailed}}</span>\r\n </div>\r\n</ng-template>",
1311
1311
  changeDetection: core.ChangeDetectionStrategy.OnPush,
1312
1312
  providers: [
1313
1313
  { provide: localizations.LocalizationService, useClass: BaseValidationLoc },
@@ -1366,7 +1366,7 @@
1366
1366
  ValidationTextAreaComponent.decorators = [
1367
1367
  { type: core.Component, args: [{
1368
1368
  selector: "val-textarea",
1369
- template: "<mat-form-field appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-full-height mat-no-border-top mat-height-auto\">\r\n <mat-label *ngIf=\"placeholder\">{{placeholder}}</mat-label>\r\n <textarea matInput\r\n #baseInput=\"ngModel\"\r\n #htmlInput\r\n [(ngModel)]=\"value\"\r\n name=\"val-textarea\"\r\n triggers=\"\"\r\n class=\"app-no-resize form-control {{class}}\"\r\n id=\"{{id}}\"\r\n [class.checking-field]=\"!noValidate\"\r\n rows=\"{{rows}}\"\r\n [tooltip]=\"tolTemplate\"\r\n placement=\"top\"\r\n (click)=\"onFocus($event)\"\r\n (focus)=\"checkTooltip();\"\r\n (keyup)=\"$event.keyCode == 13 && onFinalize();\"\r\n (blur)=\"closeTooltip(); onFinalize();\"\r\n (ngModelChange)=\"onModelChange($event)\">\r\n </textarea>\r\n</mat-form-field>\r\n\r\n<ng-template #tolTemplate>\r\n <div (click)=\"closeTooltip()\">\r\n <span>{{validationFailed}}</span>\r\n </div>\r\n</ng-template>",
1369
+ template: "<mat-form-field appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-full-height mat-no-border-top mat-height-auto\">\r\n <mat-label *ngIf=\"placeholder\">{{placeholder}}</mat-label>\r\n <textarea matInput\r\n #baseInput=\"ngModel\"\r\n #htmlInput\r\n [(ngModel)]=\"value\"\r\n name=\"val-textarea\"\r\n triggers=\"\"\r\n class=\"app-no-resize form-control {{class}}\"\r\n id=\"{{id}}\"\r\n [class.checking-field]=\"!noValidate\"\r\n rows=\"{{rows}}\"\r\n [tooltip]=\"tolTemplate\"\r\n placement=\"top\"\r\n (click)=\"onFocus($event)\"\r\n (focus)=\"checkTooltip();\"\r\n (keyup)=\"($event.keyCode == 13 || $event.keyCode == 27) && onFinalize();\"\r\n (blur)=\"closeTooltip(); onFinalize();\"\r\n (ngModelChange)=\"onModelChange($event)\">\r\n </textarea>\r\n</mat-form-field>\r\n\r\n<ng-template #tolTemplate>\r\n <div (click)=\"closeTooltip()\">\r\n <span>{{validationFailed}}</span>\r\n </div>\r\n</ng-template>",
1370
1370
  providers: [
1371
1371
  { provide: localizations.LocalizationService, useClass: BaseValidationLoc },
1372
1372
  {
@@ -1560,7 +1560,7 @@
1560
1560
  ValidationDateTimeComponent.decorators = [
1561
1561
  { type: core.Component, args: [{
1562
1562
  selector: "val-datetime",
1563
- template: "<mat-form-field appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-no-border-top mat-height-fixed\" [style.width.px]=\"widthPx\">\r\n <mat-label *ngIf=\"placeholder\">{{placeholder}}</mat-label>\r\n\r\n <input matInput \r\n [ngxMatDatetimePicker]=\"datepicker\" \r\n #baseInput=\"ngModel\"\r\n #htmlInput\r\n type=\"text\"\r\n triggers=\"\"\r\n placement=\"top\"\r\n name=\"val-date\"\r\n id=\"{{id}}\"\r\n (click)=\"onFocus($event)\"\r\n class=\"form-control {{class}}\"\r\n autocomplete=\"{{autocomplete}}\"\r\n [(ngModel)]=\"value\"\r\n [class.checking-field]=\"!noValidate\"\r\n [tooltip]=\"tolTemplate\"\r\n [placeholder]=\"placeholder ? '' : _format\"\r\n [disabled]=\"readonly || disabled\"\r\n [isDisabled]=\"readonly || disabled\"\r\n (dateChange)=\"outputValue($event)\"\r\n (keyup)=\"$event.keyCode == 13 && onFinalize();\"\r\n (blur)=\"closeTooltip(); onFinalize();\"\r\n />\r\n\r\n <mat-datepicker-toggle matSuffix [for]=\"datepicker\"></mat-datepicker-toggle>\r\n\r\n <ngx-mat-datetime-picker #datepicker \r\n [showSpinners]=\"showSpinners\" \r\n [showSeconds]=\"showSeconds\" \r\n [stepHour]=\"stepHour\" \r\n [stepMinute]=\"stepMinute\" \r\n [stepSecond]=\"stepSecond\" \r\n [touchUi]=\"false\" \r\n [color]=\"'primary'\">\r\n </ngx-mat-datetime-picker>\r\n</mat-form-field>\r\n\r\n<ng-template #tolTemplate>\r\n <div (click)=\"closeTooltip()\">\r\n <span>{{validationFailed}}</span>\r\n </div>\r\n</ng-template>",
1563
+ template: "<mat-form-field appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-no-border-top mat-height-fixed\" [style.width.px]=\"widthPx\">\r\n <mat-label *ngIf=\"placeholder\">{{placeholder}}</mat-label>\r\n\r\n <input matInput \r\n [ngxMatDatetimePicker]=\"datepicker\" \r\n #baseInput=\"ngModel\"\r\n #htmlInput\r\n type=\"text\"\r\n triggers=\"\"\r\n placement=\"top\"\r\n name=\"val-date\"\r\n id=\"{{id}}\"\r\n (click)=\"onFocus($event)\"\r\n class=\"form-control {{class}}\"\r\n autocomplete=\"{{autocomplete}}\"\r\n [(ngModel)]=\"value\"\r\n [class.checking-field]=\"!noValidate\"\r\n [tooltip]=\"tolTemplate\"\r\n [placeholder]=\"placeholder ? '' : _format\"\r\n [disabled]=\"readonly || disabled\"\r\n [isDisabled]=\"readonly || disabled\"\r\n (dateChange)=\"outputValue($event); onFinalize();\"\r\n (keyup)=\"($event.keyCode == 13 || $event.keyCode == 27) && onFinalize();\"\r\n (blur)=\"closeTooltip();\"\r\n />\r\n\r\n <mat-datepicker-toggle matSuffix [for]=\"datepicker\"></mat-datepicker-toggle>\r\n\r\n <ngx-mat-datetime-picker #datepicker \r\n [showSpinners]=\"showSpinners\" \r\n [showSeconds]=\"showSeconds\" \r\n [stepHour]=\"stepHour\" \r\n [stepMinute]=\"stepMinute\" \r\n [stepSecond]=\"stepSecond\" \r\n [touchUi]=\"false\" \r\n [color]=\"'primary'\">\r\n </ngx-mat-datetime-picker>\r\n</mat-form-field>\r\n\r\n<ng-template #tolTemplate>\r\n <div (click)=\"closeTooltip()\">\r\n <span>{{validationFailed}}</span>\r\n </div>\r\n</ng-template>",
1564
1564
  encapsulation: core.ViewEncapsulation.None,
1565
1565
  changeDetection: core.ChangeDetectionStrategy.OnPush,
1566
1566
  providers: [
@@ -1706,7 +1706,7 @@
1706
1706
  ValidationAutocompleteComponent.decorators = [
1707
1707
  { type: core.Component, args: [{
1708
1708
  selector: "val-autocomplete",
1709
- template: "<mat-form-field appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-no-border-top mat-height-fixed\" [style.width.px]=\"widthPx\">\r\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\r\n <input matInput\r\n #htmlInput\r\n #baseInput='ngModel'\r\n type=\"text\"\r\n triggers=\"\"\r\n placement=\"top\"\r\n placeholder=\"{{placeholder}}\"\r\n [matAutocomplete]=\"auto\"\r\n name=\"val-input\"\r\n id=\"{{id}}\"\r\n class=\"form-control {{class}}\"\r\n [(ngModel)]=\"value\"\r\n [class.checking-field]=\"!noValidate\"\r\n [tooltip]=\"tolTemplate\"\r\n [disabled]=\"readonly || disabled\"\r\n (ngModelChange)=\"onModelChange($event)\"\r\n (click)=\"onFocus($event)\"\r\n (focus)=\"checkTooltip();\"\r\n (keyup)=\"$event.keyCode == 13 && onFinalize();\"\r\n (blur)=\"closeTooltip(); onFinalize();\"\r\n >\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of FilteredSource\" [value]=\"option.id\">\r\n {{option.description}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n</mat-form-field>\r\n\r\n<ng-template #tolTemplate>\r\n <div (click)=\"closeTooltip()\">\r\n <span>{{validationFailed}}</span>\r\n </div>\r\n</ng-template>",
1709
+ template: "<mat-form-field appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-no-border-top mat-height-fixed\" [style.width.px]=\"widthPx\">\r\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\r\n <input matInput\r\n #htmlInput\r\n #baseInput='ngModel'\r\n type=\"text\"\r\n triggers=\"\"\r\n placement=\"top\"\r\n placeholder=\"{{placeholder}}\"\r\n [matAutocomplete]=\"auto\"\r\n name=\"val-input\"\r\n id=\"{{id}}\"\r\n class=\"form-control {{class}}\"\r\n [(ngModel)]=\"value\"\r\n [class.checking-field]=\"!noValidate\"\r\n [tooltip]=\"tolTemplate\"\r\n [disabled]=\"readonly || disabled\"\r\n (ngModelChange)=\"onModelChange($event)\"\r\n (click)=\"onFocus($event)\"\r\n (focus)=\"checkTooltip();\"\r\n (keyup)=\"($event.keyCode == 13 || $event.keyCode == 27) && onFinalize();\"\r\n (blur)=\"closeTooltip(); onFinalize();\"\r\n >\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of FilteredSource\" [value]=\"option.id\">\r\n {{option.description}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n</mat-form-field>\r\n\r\n<ng-template #tolTemplate>\r\n <div (click)=\"closeTooltip()\">\r\n <span>{{validationFailed}}</span>\r\n </div>\r\n</ng-template>",
1710
1710
  changeDetection: core.ChangeDetectionStrategy.OnPush,
1711
1711
  providers: [
1712
1712
  { provide: localizations.LocalizationService, useClass: BaseValidationLoc },
@@ -2460,9 +2460,10 @@
2460
2460
  *
2461
2461
  * @ignore
2462
2462
  */
2463
- function FormAdaptiveComponent(cdr, utiExts, dateAdapter, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
2463
+ function FormAdaptiveComponent(cdr, utiExts, datesExts, dateAdapter, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
2464
2464
  var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) || this;
2465
2465
  _this.utiExts = utiExts;
2466
+ _this.datesExts = datesExts;
2466
2467
  _this.dateAdapter = dateAdapter;
2467
2468
  _this.lc = lc;
2468
2469
  /**
@@ -2542,22 +2543,22 @@
2542
2543
  this.alignValues = false;
2543
2544
  if (!this.Type)
2544
2545
  this.Type = "string";
2545
- if (this.Type == "date")
2546
+ if (this.Type == "date" || this.Type == "datetime")
2546
2547
  this.useJsDates = Object.prototype.toString.call(obj) === "[object Date]";
2547
- if ((this.Type == "float" || this.Type == "number") && obj)
2548
+ else if ((this.Type == "float" || this.Type == "number") && obj)
2548
2549
  obj = obj.toString().replace(".", ",");
2549
2550
  // Per sicurezza riallineo i valori
2550
- if (this.Type == "boolean") {
2551
+ else if (this.Type == "boolean") {
2551
2552
  obj = obj ? (obj === true || obj.toLowerCase() == "true") : false;
2552
2553
  this.alignValues = true;
2553
2554
  }
2554
- if (this.Type == "time") {
2555
+ else if (this.Type == "time") {
2555
2556
  var _b = __read((obj || "0:0:0").split(":"), 3), hours = _b[0], minutes = _b[1], seconds = _b[2];
2556
2557
  obj = dayjs().hour(hours !== null && hours !== void 0 ? hours : 0).minute(minutes !== null && minutes !== void 0 ? minutes : 0).second(seconds !== null && seconds !== void 0 ? seconds : 0);
2557
2558
  }
2558
- if (this.Type == "file")
2559
+ else if (this.Type == "file")
2559
2560
  obj = this.ModelFile;
2560
- if (this.Type == "autocomplete") {
2561
+ else if (this.Type == "autocomplete") {
2561
2562
  if (this.SearchFunction) {
2562
2563
  this.SearchFunction(obj, true).subscribe(function (t) {
2563
2564
  _this.Source = t;
@@ -2652,15 +2653,17 @@
2652
2653
  FormAdaptiveComponent.prototype.getModelToEmit = function () {
2653
2654
  var toEmit = this.Model ?
2654
2655
  (this.Type == "time" || this.useJsDates ?
2655
- this.dateAdapter.clone(this.Model)
2656
+ this.dateAdapter.clone(this.datesExts.getDateConvertion(this.Model))
2656
2657
  : JSON.parse(JSON.stringify(this.Model)))
2657
2658
  : null;
2658
2659
  if ((this.Type == "float" || this.Type == "number") && toEmit)
2659
2660
  toEmit = toEmit.replace(".", "").replace(",", ".");
2660
- if (this.Type == "boolean")
2661
+ else if (this.Type == "boolean")
2661
2662
  toEmit = toEmit ? true : false;
2662
- if (this.Type == "time")
2663
+ else if (this.Type == "time")
2663
2664
  toEmit = toEmit.format("HH:mm:ss");
2665
+ else if ((this.Type == "date" || this.Type == "datetime") && this.useJsDates)
2666
+ toEmit = toEmit.toDate();
2664
2667
  return toEmit;
2665
2668
  };
2666
2669
  /**
@@ -2715,7 +2718,7 @@
2715
2718
  { type: core.Component, args: [{
2716
2719
  selector: "form-adaptive",
2717
2720
  providers: [{ provide: localizations.LocalizationService, useClass: FormAdaptiveComponentLoc }],
2718
- 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 #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\"\r\n [CurrencyOptions]=\"{ prefix: '', thousands: '.', decimal: ',', precision: Precision, align: Alignment }\" [noValidate]=\"!Validation\"\r\n type=\"text\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-currency>\r\n </div>\r\n <!--Se data-->\r\n <div *ngIf=\"Type == 'date'\">\r\n <val-date #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" [useJsDates]=\"useJsDates\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div *ngIf=\"Type == 'string'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || ''}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero-->\r\n <div *ngIf=\"Type == 'float' || Type == 'number'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^([0-9]*[,])?[0-9]+$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero intero-->\r\n <div *ngIf=\"Type == 'int'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^[0-9]\\\\d*$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></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\" id=\"{{GeneratedName}}\" name=\"{{GeneratedName}}\" (ngModelChange)=\"changed(); finalized();\" (click)=\"focused($event);\" />\r\n </div>\r\n <!--Se enum-->\r\n <div *ngIf=\"Type == 'enum'\">\r\n <val-select #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [placeHolderValue]=\"''\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [required]=\"Required\" [(ngModel)]=\"Model\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\">\r\n <option *ngFor=\"let val of BoundSource\" [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\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" [FilteredSource]=\"FilteredBoundSource\" (inputChange)=\"filterSource($event); changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-autocomplete>\r\n </div>\r\n <!--Se date time-->\r\n <div *ngIf=\"Type == 'datetime'\">\r\n <val-datetime #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></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 id=\"{{GeneratedName}}\" 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>",
2721
+ 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 #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\"\r\n [CurrencyOptions]=\"{ prefix: '', thousands: '.', decimal: ',', precision: Precision, align: Alignment }\" [noValidate]=\"!Validation\"\r\n type=\"text\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-currency>\r\n </div>\r\n <!--Se data-->\r\n <div *ngIf=\"Type == 'date'\">\r\n <val-date #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" [useJsDates]=\"useJsDates\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div *ngIf=\"Type == 'string'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || ''}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero-->\r\n <div *ngIf=\"Type == 'float' || Type == 'number'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^([0-9]*[,])?[0-9]+$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero intero-->\r\n <div *ngIf=\"Type == 'int'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^[0-9]\\\\d*$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></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\" id=\"{{GeneratedName}}\" name=\"{{GeneratedName}}\" (ngModelChange)=\"changed(); finalized();\" (click)=\"focused($event);\" />\r\n </div>\r\n <!--Se enum-->\r\n <div *ngIf=\"Type == 'enum'\">\r\n <val-select #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [placeHolderValue]=\"''\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [required]=\"Required\" [(ngModel)]=\"Model\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\">\r\n <option *ngFor=\"let val of BoundSource\" [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\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" [FilteredSource]=\"FilteredBoundSource\" (inputChange)=\"filterSource($event); changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-autocomplete>\r\n </div>\r\n <!--Se date time-->\r\n <div *ngIf=\"Type == 'datetime'\">\r\n <val-datetime #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [useJsDates]=\"useJsDates\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></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 id=\"{{GeneratedName}}\" 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>",
2719
2722
  changeDetection: core.ChangeDetectionStrategy.OnPush,
2720
2723
  styles: [".frm-padding-left-22{padding-left:22px}"]
2721
2724
  },] }
@@ -2723,6 +2726,7 @@
2723
2726
  FormAdaptiveComponent.ctorParameters = function () { return [
2724
2727
  { type: core.ChangeDetectorRef },
2725
2728
  { type: extensions.UtilityService },
2729
+ { type: extensions.DateService },
2726
2730
  { type: datetimePicker.NgxMatDateAdapter },
2727
2731
  { type: localizations.LocalizationService },
2728
2732
  { type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },