@esfaenza/forms-and-validations 11.2.149-beta1 → 11.2.149-beta3

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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/core'), require('@esfaenza/material-dayjs-adapter'), require('@angular/common'), require('@angular/forms'), require('@angular/material/datepicker'), require('@angular/material/autocomplete'), require('@angular/material/input'), require('@angular/material/chips'), require('@angular/material/icon'), require('@angular/material/checkbox'), require('@esfaenza/localizations'), require('@esfaenza/ngx-currency-mask'), require('angular2-multiselect-dropdown'), require('@angular-material-components/datetime-picker'), require('ngx-bootstrap/tooltip'), require('rxjs'), require('rxjs/operators'), require('@esfaenza/extensions'), require('@esfaenza/access-control')) :
3
- typeof define === 'function' && define.amd ? define('@esfaenza/forms-and-validations', ['exports', '@angular/core', '@angular/material/core', '@esfaenza/material-dayjs-adapter', '@angular/common', '@angular/forms', '@angular/material/datepicker', '@angular/material/autocomplete', '@angular/material/input', '@angular/material/chips', '@angular/material/icon', '@angular/material/checkbox', '@esfaenza/localizations', '@esfaenza/ngx-currency-mask', 'angular2-multiselect-dropdown', '@angular-material-components/datetime-picker', 'ngx-bootstrap/tooltip', 'rxjs', 'rxjs/operators', '@esfaenza/extensions', '@esfaenza/access-control'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.esfaenza = global.esfaenza || {}, global.esfaenza['forms-and-validations'] = {}), global.ng.core, global.ng.material.core, global.materialDayjsAdapter, global.ng.common, global.ng.forms, global.ng.material.datepicker, global.ng.material.autocomplete, global.ng.material.input, global.ng.material.chips, global.ng.material.icon, global.ng.material.checkbox, global.localizations, global.ngxCurrencyMask, global.angular2MultiselectDropdown, global.datetimePicker, global.tooltip, global.rxjs, global.rxjs.operators, global.extensions, global.accessControl));
5
- }(this, (function (exports, core, core$1, materialDayjsAdapter, common, forms, datepicker, autocomplete, input, chips, icon, checkbox, localizations, ngxCurrencyMask, angular2MultiselectDropdown, datetimePicker, tooltip, rxjs, operators, extensions, accessControl) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/core'), require('@esfaenza/material-dayjs-adapter'), require('@angular/common'), require('@angular/forms'), require('@angular/material/datepicker'), require('@angular/material/autocomplete'), require('@angular/material/input'), require('@angular/material/chips'), require('@angular/material/icon'), require('@angular/material/checkbox'), require('primeng/inputtext'), require('@esfaenza/localizations'), require('@esfaenza/ngx-currency-mask'), require('angular2-multiselect-dropdown'), require('@angular-material-components/datetime-picker'), require('ngx-bootstrap/tooltip'), require('rxjs'), require('rxjs/operators'), require('@esfaenza/extensions'), require('@esfaenza/access-control')) :
3
+ typeof define === 'function' && define.amd ? define('@esfaenza/forms-and-validations', ['exports', '@angular/core', '@angular/material/core', '@esfaenza/material-dayjs-adapter', '@angular/common', '@angular/forms', '@angular/material/datepicker', '@angular/material/autocomplete', '@angular/material/input', '@angular/material/chips', '@angular/material/icon', '@angular/material/checkbox', 'primeng/inputtext', '@esfaenza/localizations', '@esfaenza/ngx-currency-mask', 'angular2-multiselect-dropdown', '@angular-material-components/datetime-picker', 'ngx-bootstrap/tooltip', 'rxjs', 'rxjs/operators', '@esfaenza/extensions', '@esfaenza/access-control'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.esfaenza = global.esfaenza || {}, global.esfaenza['forms-and-validations'] = {}), global.ng.core, global.ng.material.core, global.materialDayjsAdapter, global.ng.common, global.ng.forms, global.ng.material.datepicker, global.ng.material.autocomplete, global.ng.material.input, global.ng.material.chips, global.ng.material.icon, global.ng.material.checkbox, global.inputtext, global.localizations, global.ngxCurrencyMask, global.angular2MultiselectDropdown, global.datetimePicker, global.tooltip, global.rxjs, global.rxjs.operators, global.extensions, global.accessControl));
5
+ }(this, (function (exports, core, core$1, materialDayjsAdapter, common, forms, datepicker, autocomplete, input, chips, icon, checkbox, inputtext, localizations, ngxCurrencyMask, angular2MultiselectDropdown, datetimePicker, tooltip, rxjs, operators, extensions, accessControl) { 'use strict';
6
6
 
7
7
  var ChangeEvent = /** @class */ (function () {
8
8
  function ChangeEvent(internal, value) {
@@ -2153,27 +2153,6 @@
2153
2153
  enumerable: false,
2154
2154
  configurable: true
2155
2155
  });
2156
- Object.defineProperty(BaseFormControl.prototype, "baseInput", {
2157
- /**
2158
- * Query sull'elemento 'baseInput' che funziona in ambiente statico
2159
- *
2160
- * @param {NgModel} comp Elemento HTML marcato con "#baseInput"
2161
- */
2162
- set: function (comp) { this.registerBaseInput(comp); },
2163
- enumerable: false,
2164
- configurable: true
2165
- });
2166
- Object.defineProperty(BaseFormControl.prototype, "baseInput_static", {
2167
- /**
2168
- * Query sull'elemento 'baseInput' che funziona in ambiente dinamico
2169
- *
2170
- * @param {NgModel} comp Elemento HTML marcato con "#baseInput"
2171
- */
2172
- set: function (comp) { this.registerBaseInput(comp); },
2173
- enumerable: false,
2174
- configurable: true
2175
- });
2176
- ;
2177
2156
  /**
2178
2157
  * Effettua il Bind/Parse delle varie **Source** unendo le informazioni specificate in **Display**
2179
2158
  *
@@ -2262,7 +2241,7 @@
2262
2241
  var _this = this;
2263
2242
  // A volte nell'ngOnInit non ci passa quindi lo metto sia qui sia nell'afterviewinit, penso che valga per i componenti di terze parti
2264
2243
  // che si collegano per i cazzi loro al form ecc, quindi la parte sopra non serve... BOH
2265
- this.checkRequiredValidator();
2244
+ this.doCheckRequiredValidator();
2266
2245
  //Il nome non c'è se metto standalone : true (CHE NON é DA METTERE)
2267
2246
  //Dato che anche il controllo esterno viene considerato come componente del form, non posso basarmi solo sul nome ma devo aggiungere un tag. In questo caso "_internal"
2268
2247
  // ATTENZIONE: QUALSIASI SIA IL MOTIVO, SE STO COSO VIENE SPOSTATO DALL ngOnInit NON FUNZIONA PIU NULLA
@@ -2280,6 +2259,7 @@
2280
2259
  var origFunc_1 = this.Form.onSubmit;
2281
2260
  var formOutsideRef = this.Form;
2282
2261
  this.Form.onSubmit = function (ev) {
2262
+ _this.submitted = true;
2283
2263
  _this.cdr.markForCheck();
2284
2264
  return origFunc_1.apply(formOutsideRef);
2285
2265
  };
@@ -2310,17 +2290,17 @@
2310
2290
  this.destroyed$.complete();
2311
2291
  };
2312
2292
  /** Elabora i validatori iniettati e capisce se il valore è obbligatorio o meno */
2313
- BaseFormControl.prototype.checkRequiredValidator = function () {
2314
- // controllo se è settato un required per decidere in maniera condizionale se utilizzare il validatore required nel componente interno
2293
+ BaseFormControl.prototype.doCheckRequiredValidator = function () {
2294
+ // Controllo se è settato un required per decidere in maniera condizionale se utilizzare il validatore required nel componente interno
2315
2295
  // Lo faccio qui e non in un eventuale ngOnInit o costruttore perché ngOnInit non sempre viene chiamato e da costruttore il validatore non ha ancora il valore giusto
2316
- if (this._validators && this._validators.some(function (elem) { return elem instanceof forms.RequiredValidator && elem.required; }))
2296
+ if (this._validators && this.Validation && this._validators.some(function (elem) { return elem instanceof forms.RequiredValidator && elem.required; }))
2317
2297
  this.Required = true;
2318
2298
  };
2319
2299
  /** @ignore */
2320
2300
  BaseFormControl.prototype.ngAfterViewInit = function () {
2321
2301
  if (!this.ngControl)
2322
2302
  return;
2323
- this.checkRequiredValidator();
2303
+ this.doCheckRequiredValidator();
2324
2304
  };
2325
2305
  /** Helper che collega la funzione di reset del controllo form al controllo di validazione sottostante */
2326
2306
  BaseFormControl.prototype.bindResetFunction = function () {
@@ -2348,7 +2328,7 @@
2348
2328
  if (this.Model)
2349
2329
  this.onNotNullValueSet();
2350
2330
  // markForCheck non va bene in quanto arrivano possibilmente 2 update su un solo ciclo di stack
2351
- // setTime*ut che wrappa tutto non va bene sennò spamma delle change detection a suon di interval che rallentano tantissimo l'app
2331
+ // setTimeout che wrappa tutto non va bene sennò spamma delle change detection a suon di interval che rallentano tantissimo l'app
2352
2332
  this.cdr.detectChanges();
2353
2333
  };
2354
2334
  /** @ignore */
@@ -2359,17 +2339,23 @@
2359
2339
  BaseFormControl.prototype.registerOnTouched = function (fn) {
2360
2340
  this.onTouched = fn;
2361
2341
  };
2362
- /**
2363
- * Registra internamente il componente di validazione, ne imposta i validatori e collega il Form, se presente
2364
- *
2365
- * @param {NgModel} comp Elemento HTML marcato con "#validationControl"
2366
- */
2367
- BaseFormControl.prototype.registerBaseInput = function (comp) {
2368
- if (comp) {
2342
+ Object.defineProperty(BaseFormControl.prototype, "baseInput", {
2343
+ set: function (comp) { this.doRegisterBaseInput(comp); },
2344
+ enumerable: false,
2345
+ configurable: true
2346
+ });
2347
+ Object.defineProperty(BaseFormControl.prototype, "baseInput_static", {
2348
+ set: function (comp) { this.doRegisterBaseInput(comp); },
2349
+ enumerable: false,
2350
+ configurable: true
2351
+ });
2352
+ ;
2353
+ BaseFormControl.prototype.doRegisterBaseInput = function (baseInput) {
2354
+ if (baseInput) {
2369
2355
  // È arrivato un nuovo validationContorl (succede solo nel form-select quando cambia la source da 0 elementi / null ad N elementi, quindi al massimo una volta)
2370
2356
  if (this.validationControl && this.Form)
2371
2357
  this.Form.removeControl(this.validationControl);
2372
- this.validationControl = comp;
2358
+ this.validationControl = baseInput;
2373
2359
  //Questa serve per passare avanti i validatori
2374
2360
  if (this.UseUserValidators)
2375
2361
  this.validationControl.control.setValidators(this._validators);
@@ -2380,10 +2366,11 @@
2380
2366
  }
2381
2367
  if (this.ngControl)
2382
2368
  this.bindResetFunction();
2383
- //I val-roba questo lo fanno automaticamente dentro... gli altri no (es. semplice input checkbox)
2384
- this.updateValidityForNativeInput();
2369
+ // I val-roba questo lo fanno automaticamente dentro... gli altri no (es. semplice input checkbox)
2370
+ this.doUpdateValidityForNativeInput();
2385
2371
  }
2386
2372
  };
2373
+ //#endregion
2387
2374
  BaseFormControl.prototype.registerForm = function (ngForm) {
2388
2375
  this.Form = ngForm;
2389
2376
  this.Form.addControl(this.validationControl);
@@ -2394,10 +2381,9 @@
2394
2381
  *
2395
2382
  * @param {boolean} forcedValue Forza l'aggiornamento anche se non è un input nativo (input nativo = checkbox, ad esempio)
2396
2383
  */
2397
- BaseFormControl.prototype.updateValidityForNativeInput = function (forcedValue) {
2384
+ BaseFormControl.prototype.doUpdateValidityForNativeInput = function (forcedValue) {
2398
2385
  if (forcedValue === void 0) { forcedValue = false; }
2399
- if (forcedValue || this.nativeInput)
2400
- this.validationControl.control.updateValueAndValidity();
2386
+ this.validationControl.control.updateValueAndValidity();
2401
2387
  };
2402
2388
  /**
2403
2389
  * @ignore
@@ -2457,12 +2443,13 @@
2457
2443
  */
2458
2444
  set: function (val) {
2459
2445
  this._submitted = val;
2460
- if (!this.baseInput)
2446
+ if (!this.validationControl)
2461
2447
  return;
2462
2448
  if (val) {
2463
- this.baseInput.control.markAsTouched();
2449
+ this.validationControl.control.markAsTouched();
2450
+ this.validationControl.control.markAsDirty();
2464
2451
  }
2465
- if (this.baseInput.control.status === "INVALID" && val) { /*this.showTooltipWithMessage();*/ }
2452
+ if (this.validationControl.control.status === "INVALID" && val) { /*this.showTooltipWithMessage();*/ }
2466
2453
  else { /*this.tooltip.hide();*/ }
2467
2454
  },
2468
2455
  enumerable: false,
@@ -2477,15 +2464,15 @@
2477
2464
  this._forceInvalid = val;
2478
2465
  if (val)
2479
2466
  setTimeout(function () {
2480
- _this.baseInput.control.setErrors({ forcedtoinvalid: true });
2481
- _this.baseInput.control.markAsTouched();
2482
- _this.baseInput.control.markAsDirty();
2467
+ _this.validationControl.control.setErrors({ forcedtoinvalid: true });
2468
+ _this.validationControl.control.markAsTouched();
2469
+ _this.validationControl.control.markAsDirty();
2483
2470
  _this.cdr.detectChanges();
2484
2471
  });
2485
2472
  else
2486
2473
  setTimeout(function () {
2487
- _this.baseInput.control.setErrors({ forcedtoinvalid: null });
2488
- _this.baseInput.control.updateValueAndValidity();
2474
+ _this.validationControl.control.setErrors({ forcedtoinvalid: null });
2475
+ _this.validationControl.control.updateValueAndValidity();
2489
2476
  });
2490
2477
  },
2491
2478
  enumerable: false,
@@ -2495,7 +2482,7 @@
2495
2482
  * @ignore
2496
2483
  */
2497
2484
  BaseFormControl.prototype.setDisabledState = function (isDisabled) {
2498
- isDisabled ? this.baseInput.control.disable() : this.baseInput.control.enable();
2485
+ isDisabled ? this.validationControl.control.disable() : this.validationControl.control.enable();
2499
2486
  this.Readonly = isDisabled;
2500
2487
  };
2501
2488
  /**
@@ -2560,11 +2547,11 @@
2560
2547
  Readonly: [{ type: core.Input }],
2561
2548
  LabelInputRatio: [{ type: core.Input }],
2562
2549
  htmlInput: [{ type: core.ViewChild, args: ['htmlInput', { static: false },] }],
2563
- baseInput: [{ type: core.ViewChild, args: ["baseInput", { static: false },] }],
2564
- baseInput_static: [{ type: core.ViewChild, args: ["baseInput", { static: true },] }],
2565
2550
  inputChange: [{ type: core.Output }],
2566
2551
  inputFocus: [{ type: core.Output }],
2567
2552
  inputFinalized: [{ type: core.Output }],
2553
+ baseInput: [{ type: core.ViewChild, args: ["baseInput", { static: false },] }],
2554
+ baseInput_static: [{ type: core.ViewChild, args: ["baseInput", { static: true },] }],
2568
2555
  submitted: [{ type: core.Input, args: ["submitted",] }],
2569
2556
  forceInvalid: [{ type: core.Input }]
2570
2557
  };
@@ -3421,10 +3408,10 @@
3421
3408
  };
3422
3409
 
3423
3410
  /** Semplice componente di Input testuale, con eventuale prefisso/suffisso */
3424
- var FormInputComponent = /** @class */ (function (_super) {
3425
- __extends(FormInputComponent, _super);
3411
+ var FormInputComponentOLD = /** @class */ (function (_super) {
3412
+ __extends(FormInputComponentOLD, _super);
3426
3413
  /** @ignore Costruttore */
3427
- function FormInputComponent(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
3414
+ function FormInputComponentOLD(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
3428
3415
  var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) || this;
3429
3416
  /** Indica se l'input relativo è di tipo Password */
3430
3417
  _this.Password = false;
@@ -3440,32 +3427,49 @@
3440
3427
  return _this;
3441
3428
  }
3442
3429
  /** @ignore */
3443
- FormInputComponent.prototype.writeValue = function (obj) {
3430
+ FormInputComponentOLD.prototype.writeValue = function (obj) {
3444
3431
  this.EvaluatedModel = (obj === null || obj === void 0 ? void 0 : obj.toString()) || "";
3445
3432
  _super.prototype.writeValue.call(this, obj);
3446
3433
  };
3447
3434
  /** @ignore */
3448
- FormInputComponent.prototype.ngAfterContentInit = function () {
3435
+ FormInputComponentOLD.prototype.ngAfterContentInit = function () {
3449
3436
  this.HasSuffix = !!this.suffix;
3450
3437
  this.HasPrefix = !!this.prefix;
3451
3438
  };
3452
3439
  /** @ignore */
3453
- FormInputComponent.prototype.onNotNullValueSet = function () { };
3454
- FormInputComponent.prototype.onShowHidePassword = function (event) {
3440
+ FormInputComponentOLD.prototype.onNotNullValueSet = function () { };
3441
+ FormInputComponentOLD.prototype.onShowHidePassword = function (event) {
3455
3442
  this.Password = !this.Password;
3456
3443
  this.ShowPassword = !this.ShowPassword;
3457
3444
  event.preventDefault();
3458
3445
  };
3459
- return FormInputComponent;
3446
+ /**
3447
+ * @ignore
3448
+ */
3449
+ FormInputComponentOLD.prototype.ngOnInit = function () {
3450
+ _super.prototype.ngOnInit.call(this);
3451
+ this.registerFocusRequest();
3452
+ // Controllo se è settato un required per decidere in maniera condizionale se utilizzare il validatore required nel componente interno
3453
+ if (this._validators && this.Validation && this._validators.some(function (elem) { return elem instanceof forms.RequiredValidator; }))
3454
+ this.Required = true;
3455
+ };
3456
+ /**
3457
+ * @ignore
3458
+ */
3459
+ FormInputComponentOLD.prototype.ngOnDestroy = function () {
3460
+ _super.prototype.ngOnDestroy.call(this);
3461
+ this.deregisterFocusRequest();
3462
+ };
3463
+ return FormInputComponentOLD;
3460
3464
  }(BaseFormControl));
3461
- FormInputComponent.decorators = [
3465
+ FormInputComponentOLD.decorators = [
3462
3466
  { type: core.Component, args: [{
3463
- selector: "form-input",
3464
- template: "<!-- Uguale in tutti i componenti --------------------------------------------------------------------------->\r\n<ng-container *ngIf=\"!FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">\r\n <ng-container *ngIf=\"DisplayLayout == 'form'\">{{ EvaluatedModel }}</ng-container>\r\n <div *ngIf=\"DisplayLayout == 'inline'\" class=\"app-inline\">{{ EvaluatedModel }}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\" class=\"{{FormGroupClass + (Last ? ' app-margin-bottom-0 app-margin-right-0 ' : '') + (DisplayLayout == 'inline' && DisplayMode ? (' app-inline-block ' + (!Last ? 'app-margin-right-10' : '')) : ' form-group row')}}\">\r\n <label class=\"col-md-{{(DisplayMode && DisplayLayout == 'inline' ? 'none app-bold app-margin-bottom-0' : LabelColWidth) + (DisplayMode ? ' app-bold' : ' m-t-5') }}\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}{{Label ? \":\" : \"\"}}</label>\r\n <span *ngIf=\"DisplayMode && DisplayLayout == 'inline' && InlineSeparator != ''\">{{InlineSeparator}}</span>\r\n <div class=\"col-md-{{DisplayMode && DisplayLayout == 'inline' ? 'none app-inline-block' : InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n<!----------------------------------------------------------------------------------------------------------->\r\n\r\n<ng-template #controlTemplate>\r\n <mat-form-field floatLabel=\"never\" appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-no-border-top mat-height-fixed\">\r\n <mat-label [class.app-margin-left-25]=\"HasPrefix\" *ngIf=\"Placeholder && FloatingLabel\">{{Placeholder}}</mat-label>\r\n <!--Prefisso-->\r\n <ng-container *ngIf=\"HasPrefix\">\r\n <button type=\"button\"\r\n 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-container>\r\n <!--Input-->\r\n <input matInput\r\n #baseInput=\"ngModel\"\r\n #htmlInput\r\n [type]=\"Password ? 'password' : 'text'\"\r\n triggers=\"\"\r\n placement=\"top\"\r\n autocomplete=\"off\"\r\n name=\"base-input\"\r\n class=\"form-control\"\r\n id=\"{{GeneratedName}}\"\r\n [class.app-margin-left-25]=\"HasPrefix\"\r\n [class.mat-input-with-suffix]=\"HasSuffix || Password\"\r\n [(ngModel)]=\"Model\"\r\n [class.checking-field]=\"!Validation\"\r\n [readonly]=\"Frozen\"\r\n [disabled]=\"Readonly\"\r\n [placeholder]=\"FloatingLabel ? undefined : Placeholder\"\r\n (focus)=\"focused($event);\"\r\n (ngModelChange)=\"changed()\"\r\n (keyup)=\"($event.keyCode == 13 || $event.keyCode == 27) && finalized();\"\r\n (blur)=\"finalized();\"\r\n >\r\n <ng-container *ngIf=\"HasSuffix || Password\">\r\n <ng-container *ngIf=\"!Password\">\r\n <button type=\"button\"\r\n 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-container>\r\n <!--Password-->\r\n <span class=\"form-input-suffix\" *ngIf=\"Password\">\r\n <ng-container *ngIf=\"Password\" matSuffix>\r\n <a *ngIf=\"ShowPassword\" class=\"fa fa-eye-slash app-fs-16 app-pointer\" (click)=\"onShowHidePassword($event)\"></a>\r\n <a *ngIf=\"!ShowPassword\" class=\"fa fa-eye app-fs-16 app-pointer\" (click)=\"onShowHidePassword($event)\"></a>\r\n </ng-container>\r\n </span>\r\n </ng-container>\r\n </mat-form-field>\r\n</ng-template>",
3467
+ selector: "form-input-old",
3468
+ template: "Uguale in tutti i componenti -------------------------------------------------------------------------\r\n<ng-container *ngIf=\"!FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">\r\n <ng-container *ngIf=\"DisplayLayout == 'form'\">{{ EvaluatedModel }}</ng-container>\r\n <div *ngIf=\"DisplayLayout == 'inline'\" class=\"app-inline\">{{ EvaluatedModel }}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\" class=\"{{FormGroupClass + (Last ? ' app-margin-bottom-0 app-margin-right-0 ' : '') + (DisplayLayout == 'inline' && DisplayMode ? (' app-inline-block ' + (!Last ? 'app-margin-right-10' : '')) : ' form-group row')}}\">\r\n <label class=\"col-md-{{(DisplayMode && DisplayLayout == 'inline' ? 'none app-bold app-margin-bottom-0' : LabelColWidth) + (DisplayMode ? ' app-bold' : ' m-t-5') }}\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}{{Label ? \":\" : \"\"}}</label>\r\n <span *ngIf=\"DisplayMode && DisplayLayout == 'inline' && InlineSeparator != ''\">{{InlineSeparator}}</span>\r\n <div class=\"col-md-{{DisplayMode && DisplayLayout == 'inline' ? 'none app-inline-block' : InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n<!----------------------------------------------------------------------------------------------------------->\r\n\r\n<ng-template #controlTemplate>\r\n <mat-form-field floatLabel=\"never\" appearance=\"{{FieldAppearence}}\" class=\"mat-full-width mat-no-border-top mat-height-fixed\">\r\n <mat-label [class.app-margin-left-25]=\"HasPrefix\" *ngIf=\"Placeholder && FloatingLabel\">{{Placeholder}}</mat-label>\r\n <!--Prefisso-->\r\n <ng-container *ngIf=\"HasPrefix\">\r\n <button type=\"button\"\r\n 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-container>\r\n <!--Input-->\r\n <input matInput\r\n #baseInput=\"ngModel\"\r\n #htmlInput\r\n [type]=\"Password ? 'password' : 'text'\"\r\n triggers=\"\"\r\n placement=\"top\"\r\n autocomplete=\"off\"\r\n name=\"base-input\"\r\n class=\"form-control\"\r\n id=\"{{GeneratedName}}\"\r\n [class.app-margin-left-25]=\"HasPrefix\"\r\n [class.mat-input-with-suffix]=\"HasSuffix || Password\"\r\n [(ngModel)]=\"Model\"\r\n [class.checking-field]=\"!Validation\"\r\n [readonly]=\"Frozen\"\r\n [disabled]=\"Readonly\"\r\n [placeholder]=\"FloatingLabel ? undefined : Placeholder\"\r\n (focus)=\"focused($event);\"\r\n (ngModelChange)=\"changed()\"\r\n (keyup)=\"($event.keyCode == 13 || $event.keyCode == 27) && finalized();\"\r\n (blur)=\"finalized();\"\r\n >\r\n <ng-container *ngIf=\"HasSuffix || Password\">\r\n <ng-container *ngIf=\"!Password\">\r\n <button type=\"button\"\r\n 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-container>\r\n <!--Password-->\r\n <span class=\"form-input-suffix\" *ngIf=\"Password\">\r\n <ng-container *ngIf=\"Password\" matSuffix>\r\n <a *ngIf=\"ShowPassword\" class=\"fa fa-eye-slash app-fs-16 app-pointer\" (click)=\"onShowHidePassword($event)\"></a>\r\n <a *ngIf=\"!ShowPassword\" class=\"fa fa-eye app-fs-16 app-pointer\" (click)=\"onShowHidePassword($event)\"></a>\r\n </ng-container>\r\n </span>\r\n </ng-container>\r\n </mat-form-field>\r\n</ng-template>",
3465
3469
  changeDetection: core.ChangeDetectionStrategy.OnPush
3466
3470
  },] }
3467
3471
  ];
3468
- FormInputComponent.ctorParameters = function () { return [
3472
+ FormInputComponentOLD.ctorParameters = function () { return [
3469
3473
  { type: core.ChangeDetectorRef },
3470
3474
  { type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },
3471
3475
  { type: Array, decorators: [{ type: core.Optional }, { type: core.Inject, args: [forms.NG_VALIDATORS,] }] },
@@ -3474,7 +3478,7 @@
3474
3478
  { type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] },
3475
3479
  { type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_DEBUG_MODE,] }] }
3476
3480
  ]; };
3477
- FormInputComponent.propDecorators = {
3481
+ FormInputComponentOLD.propDecorators = {
3478
3482
  Password: [{ type: core.Input }],
3479
3483
  onSuffixAction: [{ type: core.Output }],
3480
3484
  onPrefixAction: [{ type: core.Output }],
@@ -4184,6 +4188,66 @@
4184
4188
  InOutFormat: [{ type: core.Input }]
4185
4189
  };
4186
4190
 
4191
+ var FormInputComponent = /** @class */ (function (_super) {
4192
+ __extends(FormInputComponent, _super);
4193
+ function FormInputComponent(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
4194
+ var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) || this;
4195
+ _this.Password = false;
4196
+ _this.onSuffixAction = new core.EventEmitter();
4197
+ _this.onPrefixAction = new core.EventEmitter();
4198
+ _this.HasSuffix = false;
4199
+ _this.HasPrefix = false;
4200
+ return _this;
4201
+ }
4202
+ FormInputComponent.prototype.ngOnInit = function () {
4203
+ _super.prototype.ngOnInit.call(this);
4204
+ this.registerFocusRequest();
4205
+ };
4206
+ FormInputComponent.prototype.ngOnDestroy = function () {
4207
+ _super.prototype.ngOnDestroy.call(this);
4208
+ this.deregisterFocusRequest();
4209
+ };
4210
+ FormInputComponent.prototype.writeValue = function (obj) {
4211
+ this.EvaluatedModel = (obj === null || obj === void 0 ? void 0 : obj.toString()) || "";
4212
+ _super.prototype.writeValue.call(this, obj);
4213
+ };
4214
+ FormInputComponent.prototype.ngAfterContentInit = function () {
4215
+ this.HasSuffix = !!this.suffix && !this.Password;
4216
+ this.HasPrefix = !!this.prefix;
4217
+ };
4218
+ FormInputComponent.prototype.onNotNullValueSet = function () { };
4219
+ FormInputComponent.prototype.onBlur = function () {
4220
+ var _a, _b;
4221
+ this.validationControl.control.markAsDirty();
4222
+ this.inputFinalized.emit((_b = (_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toString());
4223
+ };
4224
+ return FormInputComponent;
4225
+ }(BaseFormControl));
4226
+ FormInputComponent.decorators = [
4227
+ { type: core.Component, args: [{
4228
+ selector: "form-input",
4229
+ template: "<!-- Uguale in tutti i componenti --------------------------------------------------------------------------->\r\n<ng-container *ngIf=\"!FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">\r\n <ng-container *ngIf=\"DisplayLayout == 'form'\">{{ EvaluatedModel }}</ng-container>\r\n <div *ngIf=\"DisplayLayout == 'inline'\" class=\"app-inline\">{{ EvaluatedModel }}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\" class=\"{{FormGroupClass + (Last ? ' app-margin-bottom-0 app-margin-right-0 ' : '') + (DisplayLayout == 'inline' && DisplayMode ? (' app-inline-block ' + (!Last ? 'app-margin-right-10' : '')) : ' form-group row')}}\">\r\n <label class=\"col-md-{{(DisplayMode && DisplayLayout == 'inline' ? 'none app-bold app-margin-bottom-0' : LabelColWidth) + (DisplayMode ? ' app-bold' : ' m-t-5') }}\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}{{Label ? \":\" : \"\"}}</label>\r\n <span *ngIf=\"DisplayMode && DisplayLayout == 'inline' && InlineSeparator != ''\">{{InlineSeparator}}</span>\r\n <div class=\"col-md-{{DisplayMode && DisplayLayout == 'inline' ? 'none app-inline-block' : InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n<!----------------------------------------------------------------------------------------------------------->\r\n\r\n<ng-template #controlTemplate>\r\n <span [class.p-float-label]=\"FloatingLabel && (!HasPrefix && !HasSuffix)\" \r\n [class.p-input-icon-right]=\"Password || HasSuffix\"\r\n [class.p-input-icon-left]=\"HasPrefix\">\r\n <!--Prefisso-->\r\n <ng-container *ngIf=\"HasPrefix\">\r\n <i (click)=\"onPrefixAction.emit(); $event.stopPropagation(); $event.preventDefault();\" style=\"cursor: pointer;\">\r\n <ng-container *ngTemplateOutlet=\"prefix\"></ng-container>\r\n </i>\r\n </ng-container>\r\n <!--Input-->\r\n <input pInputText #baseInput=\"ngModel\" #htmlInput\r\n name=\"{{GeneratedName}}\" id=\"{{GeneratedName}}\"\r\n [type]=\"Password ? 'password' : 'text'\"\r\n triggers=\"\"\r\n placement=\"top\"\r\n autocomplete=\"off\"\r\n [class.app-margin-left-25]=\"HasPrefix\"\r\n [(ngModel)]=\"Model\"\r\n style=\"box-shadow: unset\"\r\n [readonly]=\"Frozen\"\r\n [disabled]=\"Readonly\"\r\n [placeholder]=\"FloatingLabel ? '' : Placeholder\"\r\n (focus)=\"focused($event);\"\r\n (ngModelChange)=\"changed()\"\r\n (keyup)=\"($event.keyCode == 13 || $event.keyCode == 27) && onBlur();\"\r\n (blur)=\"onBlur();\"\r\n >\r\n <label *ngIf=\"Placeholder && FloatingLabel\" htmlFor=\"{{GeneratedName}}\">\r\n {{Placeholder}}\r\n </label>\r\n <!--Password-->\r\n <i *ngIf=\"Password && htmlInput.type == 'password'\" class=\"fa fas fa-eye\" style=\"cursor: pointer;\" (click)=\"htmlInput.type = 'text'\"></i>\r\n <i *ngIf=\"Password && htmlInput.type == 'text'\" class=\"fa fas fa-eye-slash\" style=\"cursor: pointer;\" (click)=\"htmlInput.type = 'password'\"></i>\r\n <!--Suffisso-->\r\n <ng-container *ngIf=\"HasSuffix\">\r\n <i (click)=\"onSuffixAction.emit(); $event.stopPropagation(); $event.preventDefault();\" style=\"cursor: pointer;\">\r\n <ng-container *ngTemplateOutlet=\"suffix\"></ng-container>\r\n </i>\r\n </ng-container>\r\n </span>\r\n</ng-template>",
4230
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
4231
+ styles: [".p-inputtext{width:100%}.p-input-icon-left,.p-input-icon-right{display:block!important}"]
4232
+ },] }
4233
+ ];
4234
+ FormInputComponent.ctorParameters = function () { return [
4235
+ { type: core.ChangeDetectorRef },
4236
+ { type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },
4237
+ { type: Array, decorators: [{ type: core.Optional }, { type: core.Inject, args: [forms.NG_VALIDATORS,] }] },
4238
+ { type: accessControl.AccessControlService, decorators: [{ type: core.Optional }] },
4239
+ { type: accessControl.ComponentContext, decorators: [{ type: core.Optional }] },
4240
+ { type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] },
4241
+ { type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_DEBUG_MODE,] }] }
4242
+ ]; };
4243
+ FormInputComponent.propDecorators = {
4244
+ Password: [{ type: core.Input }],
4245
+ onSuffixAction: [{ type: core.Output }],
4246
+ onPrefixAction: [{ type: core.Output }],
4247
+ suffix: [{ type: core.ContentChild, args: ["suffix", { static: false },] }],
4248
+ prefix: [{ type: core.ContentChild, args: ["prefix", { static: false },] }]
4249
+ };
4250
+
4187
4251
  /**
4188
4252
  * Formato in display (modalità lunga, con ore, minuti e secondi) delle date per tutti i componenti che utilizzino input data.
4189
4253
  *
@@ -4211,6 +4275,7 @@
4211
4275
  FormCheckboxComponent,
4212
4276
  FormDateComponent,
4213
4277
  FormEmptyComponent,
4278
+ FormInputComponentOLD,
4214
4279
  FormInputComponent,
4215
4280
  FormSelectComponent,
4216
4281
  FormTextareaComponent,
@@ -4244,7 +4309,8 @@
4244
4309
  ngxCurrencyMask.CurrencyMaskModule,
4245
4310
  autocomplete.MatAutocompleteModule,
4246
4311
  datetimePicker.NgxMatDatetimePickerModule,
4247
- datetimePicker.NgxMatTimepickerModule
4312
+ datetimePicker.NgxMatTimepickerModule,
4313
+ inputtext.InputTextModule
4248
4314
  ];
4249
4315
  /**
4250
4316
  * Moduli utilizzati dalla libreria e che devono essere esposti all'esterno
@@ -4302,7 +4368,7 @@
4302
4368
  exports.FormErrorComponent = FormErrorComponent;
4303
4369
  exports.FormFileComponent = FormFileComponent;
4304
4370
  exports.FormInfoComponent = FormInfoComponent;
4305
- exports.FormInputComponent = FormInputComponent;
4371
+ exports.FormInputComponentOLD = FormInputComponentOLD;
4306
4372
  exports.FormSelectComponent = FormSelectComponent;
4307
4373
  exports.FormTemplateComponent = FormTemplateComponent;
4308
4374
  exports.FormTextareaComponent = FormTextareaComponent;
@@ -4321,12 +4387,13 @@
4321
4387
  exports.ɵa = BaseValidation;
4322
4388
  exports.ɵb = BaseValidationLoc;
4323
4389
  exports.ɵc = CustomRequiredDirective;
4324
- exports.ɵd = FormSelectComponentLoc;
4325
- exports.ɵe = FormAdaptiveComponentLoc;
4326
- exports.ɵf = FormMultiSelectComponent;
4327
- exports.ɵg = FormMultiSelectComponentLoc;
4328
- exports.ɵh = FormFileComponentLoc;
4329
- exports.ɵi = FormAutocompleteComponentLoc;
4390
+ exports.ɵd = FormInputComponent;
4391
+ exports.ɵe = FormSelectComponentLoc;
4392
+ exports.ɵf = FormAdaptiveComponentLoc;
4393
+ exports.ɵg = FormMultiSelectComponent;
4394
+ exports.ɵh = FormMultiSelectComponentLoc;
4395
+ exports.ɵi = FormFileComponentLoc;
4396
+ exports.ɵj = FormAutocompleteComponentLoc;
4330
4397
 
4331
4398
  Object.defineProperty(exports, '__esModule', { value: true });
4332
4399