@esfaenza/forms-and-validations 11.2.149-beta4 → 11.2.149-beta5
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 +67 -111
- package/bundles/esfaenza-forms-and-validations.umd.js.map +1 -1
- package/esfaenza-forms-and-validations.d.ts +6 -7
- package/esfaenza-forms-and-validations.metadata.json +1 -1
- package/esm2015/esfaenza-forms-and-validations.js +7 -8
- package/esm2015/lib/forms/base-form-control.js +37 -12
- package/esm2015/lib/forms/form-input/form-input.component.js +22 -34
- package/esm2015/lib/forms-and-validations.module.js +5 -5
- package/fesm2015/esfaenza-forms-and-validations.js +53 -98
- package/fesm2015/esfaenza-forms-and-validations.js.map +1 -1
- package/lib/forms/base-form-control.d.ts +6 -0
- package/lib/forms/form-input/form-input.component.d.ts +6 -12
- package/package.json +1 -1
- package/esm2015/lib/forms/form-input-new/form-input.component.js +0 -66
- package/lib/forms/form-input-new/form-input.component.d.ts +0 -21
|
@@ -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('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';
|
|
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('primeng/tooltip'), 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', 'primeng/tooltip', '@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.tooltip$1, 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, tooltip$1, 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) {
|
|
@@ -2267,14 +2267,8 @@
|
|
|
2267
2267
|
if (this.SetValidationSubject) {
|
|
2268
2268
|
this.SetValidationSubject.pipe(operators.takeUntil(this.destroyed$)).subscribe(function (v) {
|
|
2269
2269
|
if (v.fieldName + "_internal" == _this.GeneratedName) {
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
var control = _this.Form.getControl(_this.validationControl);
|
|
2273
|
-
control.setErrors({ forcedtoinvalid: true });
|
|
2274
|
-
control.markAsTouched();
|
|
2275
|
-
_this.ngControl.control.setErrors({ forcedtoinvalid: true });
|
|
2276
|
-
_this.ngControl.control.markAsTouched();
|
|
2277
|
-
_this.cdr.markForCheck();
|
|
2270
|
+
_this.forceInvalid = true;
|
|
2271
|
+
_this.doShowTooltip(v.error);
|
|
2278
2272
|
}
|
|
2279
2273
|
});
|
|
2280
2274
|
}
|
|
@@ -2423,6 +2417,7 @@
|
|
|
2423
2417
|
*/
|
|
2424
2418
|
BaseFormControl.prototype.finalized = function () {
|
|
2425
2419
|
var _a, _b;
|
|
2420
|
+
this.validationControl.control.markAsDirty();
|
|
2426
2421
|
this.inputFinalized.emit((_b = (_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toString());
|
|
2427
2422
|
this.log("Control Value Finalized - " + this.GeneratedName);
|
|
2428
2423
|
};
|
|
@@ -2449,8 +2444,12 @@
|
|
|
2449
2444
|
this.validationControl.control.markAsTouched();
|
|
2450
2445
|
this.validationControl.control.markAsDirty();
|
|
2451
2446
|
}
|
|
2452
|
-
if (this.validationControl.control.status === "INVALID" && val) {
|
|
2453
|
-
|
|
2447
|
+
if (this.validationControl.control.status === "INVALID" && val) {
|
|
2448
|
+
this.doShowTooltip(this.ErrorTooltip);
|
|
2449
|
+
}
|
|
2450
|
+
else {
|
|
2451
|
+
this.doHideTooltip();
|
|
2452
|
+
}
|
|
2454
2453
|
},
|
|
2455
2454
|
enumerable: false,
|
|
2456
2455
|
configurable: true
|
|
@@ -2503,6 +2502,34 @@
|
|
|
2503
2502
|
if (this.observable)
|
|
2504
2503
|
this.observable.unsubscribe();
|
|
2505
2504
|
};
|
|
2505
|
+
Object.defineProperty(BaseFormControl.prototype, "Tooltip_static", {
|
|
2506
|
+
set: function (comp) {
|
|
2507
|
+
if (comp) {
|
|
2508
|
+
this.Tooltip = comp;
|
|
2509
|
+
}
|
|
2510
|
+
},
|
|
2511
|
+
enumerable: false,
|
|
2512
|
+
configurable: true
|
|
2513
|
+
});
|
|
2514
|
+
BaseFormControl.prototype.doShowTooltip = function (error) {
|
|
2515
|
+
if (error === void 0) { error = ""; }
|
|
2516
|
+
var _a, _b;
|
|
2517
|
+
// Se non arriva un errore, me lo calcolo
|
|
2518
|
+
if (!error) {
|
|
2519
|
+
if (this.Required && !this.validationControl.value)
|
|
2520
|
+
this.ErrorTooltip = ((_b = (_a = this.Label) !== null && _a !== void 0 ? _a : this.Placeholder) !== null && _b !== void 0 ? _b : "Input") + " Richiesto";
|
|
2521
|
+
else if (this.validationControl.value)
|
|
2522
|
+
this.ErrorTooltip = "Formato input non valido";
|
|
2523
|
+
}
|
|
2524
|
+
else {
|
|
2525
|
+
this.ErrorTooltip = error;
|
|
2526
|
+
}
|
|
2527
|
+
this.Tooltip.activate();
|
|
2528
|
+
};
|
|
2529
|
+
BaseFormControl.prototype.doHideTooltip = function () {
|
|
2530
|
+
this.ErrorTooltip = "";
|
|
2531
|
+
this.Tooltip.deactivate();
|
|
2532
|
+
};
|
|
2506
2533
|
return BaseFormControl;
|
|
2507
2534
|
}());
|
|
2508
2535
|
BaseFormControl.decorators = [
|
|
@@ -2553,7 +2580,9 @@
|
|
|
2553
2580
|
baseInput: [{ type: core.ViewChild, args: ["baseInput", { static: false },] }],
|
|
2554
2581
|
baseInput_static: [{ type: core.ViewChild, args: ["baseInput", { static: true },] }],
|
|
2555
2582
|
submitted: [{ type: core.Input, args: ["submitted",] }],
|
|
2556
|
-
forceInvalid: [{ type: core.Input }]
|
|
2583
|
+
forceInvalid: [{ type: core.Input }],
|
|
2584
|
+
Tooltip: [{ type: core.ViewChild, args: [tooltip$1.Tooltip, { static: false },] }],
|
|
2585
|
+
Tooltip_static: [{ type: core.ViewChild, args: [tooltip$1.Tooltip, { static: true },] }]
|
|
2557
2586
|
};
|
|
2558
2587
|
|
|
2559
2588
|
/**
|
|
@@ -3407,85 +3436,6 @@
|
|
|
3407
3436
|
JsDates: [{ type: core.Input }]
|
|
3408
3437
|
};
|
|
3409
3438
|
|
|
3410
|
-
/** Semplice componente di Input testuale, con eventuale prefisso/suffisso */
|
|
3411
|
-
var FormInputComponentOLD = /** @class */ (function (_super) {
|
|
3412
|
-
__extends(FormInputComponentOLD, _super);
|
|
3413
|
-
/** @ignore Costruttore */
|
|
3414
|
-
function FormInputComponentOLD(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
3415
|
-
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) || this;
|
|
3416
|
-
/** Indica se l'input relativo è di tipo Password */
|
|
3417
|
-
_this.Password = false;
|
|
3418
|
-
/** Delegato per l'esecuzione di un'operazione al click del suffisso */
|
|
3419
|
-
_this.onSuffixAction = new core.EventEmitter();
|
|
3420
|
-
/** Delegato per l'esecuzione di un'operazione al click del prefisso */
|
|
3421
|
-
_this.onPrefixAction = new core.EventEmitter();
|
|
3422
|
-
/** Indica la presenza o meno di un suffisso, si basa sulla "truthiness" della proiezione **suffix** */
|
|
3423
|
-
_this.HasSuffix = false;
|
|
3424
|
-
/** Indica la presenza o meno di un prefisso, si basa sulla "truthiness" della proiezione **prefix** */
|
|
3425
|
-
_this.HasPrefix = false;
|
|
3426
|
-
_this.ShowPassword = false;
|
|
3427
|
-
return _this;
|
|
3428
|
-
}
|
|
3429
|
-
/** @ignore */
|
|
3430
|
-
FormInputComponentOLD.prototype.writeValue = function (obj) {
|
|
3431
|
-
this.EvaluatedModel = (obj === null || obj === void 0 ? void 0 : obj.toString()) || "";
|
|
3432
|
-
_super.prototype.writeValue.call(this, obj);
|
|
3433
|
-
};
|
|
3434
|
-
/** @ignore */
|
|
3435
|
-
FormInputComponentOLD.prototype.ngAfterContentInit = function () {
|
|
3436
|
-
this.HasSuffix = !!this.suffix;
|
|
3437
|
-
this.HasPrefix = !!this.prefix;
|
|
3438
|
-
};
|
|
3439
|
-
/** @ignore */
|
|
3440
|
-
FormInputComponentOLD.prototype.onNotNullValueSet = function () { };
|
|
3441
|
-
FormInputComponentOLD.prototype.onShowHidePassword = function (event) {
|
|
3442
|
-
this.Password = !this.Password;
|
|
3443
|
-
this.ShowPassword = !this.ShowPassword;
|
|
3444
|
-
event.preventDefault();
|
|
3445
|
-
};
|
|
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;
|
|
3464
|
-
}(BaseFormControl));
|
|
3465
|
-
FormInputComponentOLD.decorators = [
|
|
3466
|
-
{ type: core.Component, args: [{
|
|
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>",
|
|
3469
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
3470
|
-
},] }
|
|
3471
|
-
];
|
|
3472
|
-
FormInputComponentOLD.ctorParameters = function () { return [
|
|
3473
|
-
{ type: core.ChangeDetectorRef },
|
|
3474
|
-
{ type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },
|
|
3475
|
-
{ type: Array, decorators: [{ type: core.Optional }, { type: core.Inject, args: [forms.NG_VALIDATORS,] }] },
|
|
3476
|
-
{ type: accessControl.AccessControlService, decorators: [{ type: core.Optional }] },
|
|
3477
|
-
{ type: accessControl.ComponentContext, decorators: [{ type: core.Optional }] },
|
|
3478
|
-
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
3479
|
-
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
3480
|
-
]; };
|
|
3481
|
-
FormInputComponentOLD.propDecorators = {
|
|
3482
|
-
Password: [{ type: core.Input }],
|
|
3483
|
-
onSuffixAction: [{ type: core.Output }],
|
|
3484
|
-
onPrefixAction: [{ type: core.Output }],
|
|
3485
|
-
suffix: [{ type: core.ContentChild, args: ["suffix", { static: false },] }],
|
|
3486
|
-
prefix: [{ type: core.ContentChild, args: ["prefix", { static: false },] }]
|
|
3487
|
-
};
|
|
3488
|
-
|
|
3489
3439
|
/**
|
|
3490
3440
|
* Classe di localizzazione per il componente **FormSelectComponent**
|
|
3491
3441
|
*/
|
|
@@ -4188,47 +4138,54 @@
|
|
|
4188
4138
|
InOutFormat: [{ type: core.Input }]
|
|
4189
4139
|
};
|
|
4190
4140
|
|
|
4141
|
+
/** Semplice componente di Input testuale, con eventuale prefisso/suffisso */
|
|
4191
4142
|
var FormInputComponent = /** @class */ (function (_super) {
|
|
4192
4143
|
__extends(FormInputComponent, _super);
|
|
4144
|
+
/** @ignore Costruttore */
|
|
4193
4145
|
function FormInputComponent(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
4194
4146
|
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) || this;
|
|
4147
|
+
/** Indica se l'input relativo è di tipo Password */
|
|
4195
4148
|
_this.Password = false;
|
|
4149
|
+
/** Delegato per l'esecuzione di un'operazione al click del suffisso */
|
|
4196
4150
|
_this.onSuffixAction = new core.EventEmitter();
|
|
4151
|
+
/** Delegato per l'esecuzione di un'operazione al click del prefisso */
|
|
4197
4152
|
_this.onPrefixAction = new core.EventEmitter();
|
|
4153
|
+
/** Indica la presenza o meno di un suffisso, si basa sulla "truthiness" della proiezione **suffix** */
|
|
4198
4154
|
_this.HasSuffix = false;
|
|
4155
|
+
/** Indica la presenza o meno di un prefisso, si basa sulla "truthiness" della proiezione **prefix** */
|
|
4199
4156
|
_this.HasPrefix = false;
|
|
4200
4157
|
return _this;
|
|
4201
4158
|
}
|
|
4159
|
+
/** @ignore */
|
|
4202
4160
|
FormInputComponent.prototype.ngOnInit = function () {
|
|
4203
4161
|
_super.prototype.ngOnInit.call(this);
|
|
4204
4162
|
this.registerFocusRequest();
|
|
4205
4163
|
};
|
|
4164
|
+
/** @ignore */
|
|
4206
4165
|
FormInputComponent.prototype.ngOnDestroy = function () {
|
|
4207
4166
|
_super.prototype.ngOnDestroy.call(this);
|
|
4208
4167
|
this.deregisterFocusRequest();
|
|
4209
4168
|
};
|
|
4169
|
+
/** @ignore */
|
|
4210
4170
|
FormInputComponent.prototype.writeValue = function (obj) {
|
|
4211
4171
|
this.EvaluatedModel = (obj === null || obj === void 0 ? void 0 : obj.toString()) || "";
|
|
4212
4172
|
_super.prototype.writeValue.call(this, obj);
|
|
4213
4173
|
};
|
|
4174
|
+
/** @ignore */
|
|
4214
4175
|
FormInputComponent.prototype.ngAfterContentInit = function () {
|
|
4215
4176
|
this.HasSuffix = !!this.suffix && !this.Password;
|
|
4216
4177
|
this.HasPrefix = !!this.prefix;
|
|
4217
4178
|
};
|
|
4179
|
+
/** @ignore */
|
|
4218
4180
|
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
4181
|
return FormInputComponent;
|
|
4225
4182
|
}(BaseFormControl));
|
|
4226
4183
|
FormInputComponent.decorators = [
|
|
4227
4184
|
{ type: core.Component, args: [{
|
|
4228
4185
|
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 class=\"p-inputtext-sm\"\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) &&
|
|
4186
|
+
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 pTooltip=\"{{ErrorTooltip}}\" tooltipEvent=\"none\"\r\n [type]=\"Password ? 'password' : 'text'\"\r\n class=\"p-inputtext-sm\"\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)=\"doHideTooltip(); focused($event);\"\r\n (ngModelChange)=\"changed()\"\r\n (keyup)=\"($event.keyCode == 13 || $event.keyCode == 27) && finalized();\"\r\n (blur)=\"finalized();\"\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
4187
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
4231
|
-
styles: [".p-inputtext{width:100%}.p-input-icon-left,.p-input-icon-right{display:block!important}.p-component:disabled,.p-disabled{background-color:#ddd;color:grey}"]
|
|
4188
|
+
styles: [".p-inputtext{width:100%}.p-input-icon-left,.p-input-icon-right{display:block!important}.p-component:disabled,.p-disabled{background-color:#ddd;color:grey}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#dc3545}::ng-deep .p-tooltip .p-tooltip-text{background-color:#dc3545;font-size:14px}"]
|
|
4232
4189
|
},] }
|
|
4233
4190
|
];
|
|
4234
4191
|
FormInputComponent.ctorParameters = function () { return [
|
|
@@ -4275,7 +4232,6 @@
|
|
|
4275
4232
|
FormCheckboxComponent,
|
|
4276
4233
|
FormDateComponent,
|
|
4277
4234
|
FormEmptyComponent,
|
|
4278
|
-
FormInputComponentOLD,
|
|
4279
4235
|
FormInputComponent,
|
|
4280
4236
|
FormSelectComponent,
|
|
4281
4237
|
FormTextareaComponent,
|
|
@@ -4310,7 +4266,8 @@
|
|
|
4310
4266
|
autocomplete.MatAutocompleteModule,
|
|
4311
4267
|
datetimePicker.NgxMatDatetimePickerModule,
|
|
4312
4268
|
datetimePicker.NgxMatTimepickerModule,
|
|
4313
|
-
inputtext.InputTextModule
|
|
4269
|
+
inputtext.InputTextModule,
|
|
4270
|
+
tooltip$1.TooltipModule
|
|
4314
4271
|
];
|
|
4315
4272
|
/**
|
|
4316
4273
|
* Moduli utilizzati dalla libreria e che devono essere esposti all'esterno
|
|
@@ -4368,7 +4325,7 @@
|
|
|
4368
4325
|
exports.FormErrorComponent = FormErrorComponent;
|
|
4369
4326
|
exports.FormFileComponent = FormFileComponent;
|
|
4370
4327
|
exports.FormInfoComponent = FormInfoComponent;
|
|
4371
|
-
exports.
|
|
4328
|
+
exports.FormInputComponent = FormInputComponent;
|
|
4372
4329
|
exports.FormSelectComponent = FormSelectComponent;
|
|
4373
4330
|
exports.FormTemplateComponent = FormTemplateComponent;
|
|
4374
4331
|
exports.FormTextareaComponent = FormTextareaComponent;
|
|
@@ -4387,13 +4344,12 @@
|
|
|
4387
4344
|
exports.ɵa = BaseValidation;
|
|
4388
4345
|
exports.ɵb = BaseValidationLoc;
|
|
4389
4346
|
exports.ɵc = CustomRequiredDirective;
|
|
4390
|
-
exports.ɵd =
|
|
4391
|
-
exports.ɵe =
|
|
4392
|
-
exports.ɵf =
|
|
4393
|
-
exports.ɵg =
|
|
4394
|
-
exports.ɵh =
|
|
4395
|
-
exports.ɵi =
|
|
4396
|
-
exports.ɵj = FormAutocompleteComponentLoc;
|
|
4347
|
+
exports.ɵd = FormSelectComponentLoc;
|
|
4348
|
+
exports.ɵe = FormAdaptiveComponentLoc;
|
|
4349
|
+
exports.ɵf = FormMultiSelectComponent;
|
|
4350
|
+
exports.ɵg = FormMultiSelectComponentLoc;
|
|
4351
|
+
exports.ɵh = FormFileComponentLoc;
|
|
4352
|
+
exports.ɵi = FormAutocompleteComponentLoc;
|
|
4397
4353
|
|
|
4398
4354
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4399
4355
|
|