@esfaenza/forms-and-validations 11.2.47-beta3 → 11.2.50
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 +49 -65
- package/bundles/esfaenza-forms-and-validations.umd.js.map +1 -1
- package/esfaenza-forms-and-validations.d.ts +0 -1
- package/esfaenza-forms-and-validations.metadata.json +1 -1
- package/esm2015/esfaenza-forms-and-validations.js +1 -2
- package/esm2015/lib/forms/form-textarea/form-textarea.component.js +2 -2
- package/esm2015/lib/forms-and-validations.module.js +1 -18
- package/esm2015/lib/models/dayjs-adapter/dayjs-date-adapter.js +1 -1
- package/esm2015/public-api.js +2 -1
- package/fesm2015/esfaenza-forms-and-validations.js +47 -63
- package/fesm2015/esfaenza-forms-and-validations.js.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@esfaenza/forms-and-validations', ['exports', '@angular/core', '@angular/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.esfaenza = global.esfaenza || {}, global.esfaenza['forms-and-validations'] = {}), global.ng.core, global.ng.
|
|
5
|
-
}(this, (function (exports, core, common, forms, datepicker, autocomplete, input,
|
|
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('@esfaenza/localizations'), require('@esfaenza/ngx-currency-mask'), require('angular2-multiselect-dropdown'), require('@angular-material-components/datetime-picker'), require('ngx-bootstrap/tooltip'), 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', '@esfaenza/localizations', '@esfaenza/ngx-currency-mask', 'angular2-multiselect-dropdown', '@angular-material-components/datetime-picker', 'ngx-bootstrap/tooltip', '@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.localizations, global.ngxCurrencyMask, global.angular2MultiselectDropdown, global.datetimePicker, global.tooltip, global.extensions, global.accessControl));
|
|
5
|
+
}(this, (function (exports, core, core$1, materialDayjsAdapter, common, forms, datepicker, autocomplete, input, localizations, ngxCurrencyMask, angular2MultiselectDropdown, datetimePicker, tooltip, extensions, accessControl) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Classe che identifica un file
|
|
@@ -337,49 +337,6 @@
|
|
|
337
337
|
return value;
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
-
/**
|
|
341
|
-
* Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US"
|
|
342
|
-
*/
|
|
343
|
-
var FAV_LOCALE = new core.InjectionToken('FAV_LOCALE');
|
|
344
|
-
/**
|
|
345
|
-
* Chiave che indica il prefisso dei Contesti Applicativi per permettere l'abilitazione/disabilitazione di input in maniera contestuale
|
|
346
|
-
*/
|
|
347
|
-
var ACO_CUSTOMKEY = new core.InjectionToken('ACO_CUSTOMKEY');
|
|
348
|
-
|
|
349
|
-
// Angular
|
|
350
|
-
/**
|
|
351
|
-
* Direttiva utilizzata per validazioni "required" custom, in modo da poter dire che anche se c'è un valore selezionato, ma quel valore lo considero null
|
|
352
|
-
* allora la validazione fallisce. Attualmente usato nell'unico punto sensato: validation-select
|
|
353
|
-
*/
|
|
354
|
-
var CustomRequiredDirective = /** @class */ (function () {
|
|
355
|
-
function CustomRequiredDirective() {
|
|
356
|
-
/**
|
|
357
|
-
* Lista di valori che vengono considerati "vuoti" seppur presenti
|
|
358
|
-
*/
|
|
359
|
-
this.NullValues = [];
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* @ignore
|
|
363
|
-
*/
|
|
364
|
-
CustomRequiredDirective.prototype.validate = function (c) {
|
|
365
|
-
// Controllo solo per custom required a true, altrimenti qualsiasi valore mi va bene
|
|
366
|
-
if (this.customRequired != "true")
|
|
367
|
-
return null;
|
|
368
|
-
return !c.value || this.NullValues.includes(c.value) ? { required: true } : null;
|
|
369
|
-
};
|
|
370
|
-
return CustomRequiredDirective;
|
|
371
|
-
}());
|
|
372
|
-
CustomRequiredDirective.decorators = [
|
|
373
|
-
{ type: core.Directive, args: [{
|
|
374
|
-
selector: '[customRequired]',
|
|
375
|
-
providers: [{ provide: forms.NG_VALIDATORS, useExisting: CustomRequiredDirective, multi: true }]
|
|
376
|
-
},] }
|
|
377
|
-
];
|
|
378
|
-
CustomRequiredDirective.propDecorators = {
|
|
379
|
-
NullValues: [{ type: core.Input, args: ["CustomNullValues",] }],
|
|
380
|
-
customRequired: [{ type: core.Input, args: ['customRequired',] }]
|
|
381
|
-
};
|
|
382
|
-
|
|
383
340
|
/**
|
|
384
341
|
* Espansione dell'adapter di default di DayJs già utilizzato per i bind base su Material.
|
|
385
342
|
*
|
|
@@ -461,6 +418,49 @@
|
|
|
461
418
|
{ type: String, decorators: [{ type: core.Inject, args: [core$1.MAT_DATE_LOCALE,] }] }
|
|
462
419
|
]; };
|
|
463
420
|
|
|
421
|
+
/**
|
|
422
|
+
* Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US"
|
|
423
|
+
*/
|
|
424
|
+
var FAV_LOCALE = new core.InjectionToken('FAV_LOCALE');
|
|
425
|
+
/**
|
|
426
|
+
* Chiave che indica il prefisso dei Contesti Applicativi per permettere l'abilitazione/disabilitazione di input in maniera contestuale
|
|
427
|
+
*/
|
|
428
|
+
var ACO_CUSTOMKEY = new core.InjectionToken('ACO_CUSTOMKEY');
|
|
429
|
+
|
|
430
|
+
// Angular
|
|
431
|
+
/**
|
|
432
|
+
* Direttiva utilizzata per validazioni "required" custom, in modo da poter dire che anche se c'è un valore selezionato, ma quel valore lo considero null
|
|
433
|
+
* allora la validazione fallisce. Attualmente usato nell'unico punto sensato: validation-select
|
|
434
|
+
*/
|
|
435
|
+
var CustomRequiredDirective = /** @class */ (function () {
|
|
436
|
+
function CustomRequiredDirective() {
|
|
437
|
+
/**
|
|
438
|
+
* Lista di valori che vengono considerati "vuoti" seppur presenti
|
|
439
|
+
*/
|
|
440
|
+
this.NullValues = [];
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* @ignore
|
|
444
|
+
*/
|
|
445
|
+
CustomRequiredDirective.prototype.validate = function (c) {
|
|
446
|
+
// Controllo solo per custom required a true, altrimenti qualsiasi valore mi va bene
|
|
447
|
+
if (this.customRequired != "true")
|
|
448
|
+
return null;
|
|
449
|
+
return !c.value || this.NullValues.includes(c.value) ? { required: true } : null;
|
|
450
|
+
};
|
|
451
|
+
return CustomRequiredDirective;
|
|
452
|
+
}());
|
|
453
|
+
CustomRequiredDirective.decorators = [
|
|
454
|
+
{ type: core.Directive, args: [{
|
|
455
|
+
selector: '[customRequired]',
|
|
456
|
+
providers: [{ provide: forms.NG_VALIDATORS, useExisting: CustomRequiredDirective, multi: true }]
|
|
457
|
+
},] }
|
|
458
|
+
];
|
|
459
|
+
CustomRequiredDirective.propDecorators = {
|
|
460
|
+
NullValues: [{ type: core.Input, args: ["CustomNullValues",] }],
|
|
461
|
+
customRequired: [{ type: core.Input, args: ['customRequired',] }]
|
|
462
|
+
};
|
|
463
|
+
|
|
464
464
|
// Angular
|
|
465
465
|
/**
|
|
466
466
|
* Classe astratta base che contiene le logiche / proprietà in comune a tutti i validatori
|
|
@@ -3271,7 +3271,7 @@
|
|
|
3271
3271
|
FormTextareaComponent.decorators = [
|
|
3272
3272
|
{ type: core.Component, args: [{
|
|
3273
3273
|
selector: "form-textarea",
|
|
3274
|
-
template: "<div class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <val-textarea [noValidate]=\"!Validation\"\r\n
|
|
3274
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && BoundSource\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-textarea \r\n [noValidate]=\"!Validation\" \r\n [submitted]=\"Form?.submitted\" \r\n [forceInvalid]=\"ForcedError\"\r\n [id]=\"GeneratedName\" \r\n [rows]=\"Rows\" \r\n [readonly]=\"Readonly\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey app-no-resize' : 'app-no-resize'\" \r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\" \r\n autocomplete=\"off\" \r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\" \r\n #validationControl=\"ngModel\" \r\n (inputChange)=\"changed();\">\r\n </val-textarea>\r\n</ng-template>",
|
|
3275
3275
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
3276
3276
|
},] }
|
|
3277
3277
|
];
|
|
@@ -3602,20 +3602,6 @@
|
|
|
3602
3602
|
InOutFormat: [{ type: core.Input }]
|
|
3603
3603
|
};
|
|
3604
3604
|
|
|
3605
|
-
/**
|
|
3606
|
-
* Formato in display (modalità breve, senza ore, minuti e secondi) delle date per tutti i componenti che utilizzino input data.
|
|
3607
|
-
*
|
|
3608
|
-
* Da convenzione è sempre quello italiano quindi viene cablato
|
|
3609
|
-
*/
|
|
3610
|
-
var formats = {
|
|
3611
|
-
parse: { dateInput: 'DD/MM/YYYY' },
|
|
3612
|
-
display: {
|
|
3613
|
-
dateInput: 'DD/MM/YYYY',
|
|
3614
|
-
monthYearLabel: 'MM YYYY',
|
|
3615
|
-
dateA11yLabel: 'DD/MM/YYYY',
|
|
3616
|
-
monthYearA11yLabel: 'MM YYYY',
|
|
3617
|
-
}
|
|
3618
|
-
};
|
|
3619
3605
|
/**
|
|
3620
3606
|
* Formato in display (modalità lunga, con ore, minuti e secondi) delle date per tutti i componenti che utilizzino input data.
|
|
3621
3607
|
*
|
|
@@ -3689,8 +3675,6 @@
|
|
|
3689
3675
|
providers: [
|
|
3690
3676
|
{ provide: FAV_LOCALE, useValue: (config === null || config === void 0 ? void 0 : config.locale) || 'it-IT' },
|
|
3691
3677
|
{ provide: ACO_CUSTOMKEY, useValue: (config === null || config === void 0 ? void 0 : config.acocustom) || null },
|
|
3692
|
-
{ provide: core$1.MAT_DATE_LOCALE, useValue: 'it' },
|
|
3693
|
-
{ provide: core$1.MAT_DATE_FORMATS, useValue: formats },
|
|
3694
3678
|
{ provide: datetimePicker.NGX_MAT_DATE_FORMATS, useValue: formats_long },
|
|
3695
3679
|
{ provide: datetimePicker.NgxMatDateAdapter, useClass: NgxExpandedDayJsDateAdapter },
|
|
3696
3680
|
]
|
|
@@ -3731,6 +3715,7 @@
|
|
|
3731
3715
|
exports.FormTimeComponent = FormTimeComponent;
|
|
3732
3716
|
exports.FormsAndValidationsModule = FormsAndValidationsModule;
|
|
3733
3717
|
exports.FormsAndValidationsModuleConfig = FormsAndValidationsModuleConfig;
|
|
3718
|
+
exports.NgxExpandedDayJsDateAdapter = NgxExpandedDayJsDateAdapter;
|
|
3734
3719
|
exports.ValidationAutocompleteComponent = ValidationAutocompleteComponent;
|
|
3735
3720
|
exports.ValidationCurrencyComponent = ValidationCurrencyComponent;
|
|
3736
3721
|
exports.ValidationDateComponent = ValidationDateComponent;
|
|
@@ -3750,7 +3735,6 @@
|
|
|
3750
3735
|
exports.ɵj = FormMultiSelectComponentLoc;
|
|
3751
3736
|
exports.ɵk = FormFileComponentLoc;
|
|
3752
3737
|
exports.ɵl = FormAutocompleteComponentLoc;
|
|
3753
|
-
exports.ɵm = NgxExpandedDayJsDateAdapter;
|
|
3754
3738
|
|
|
3755
3739
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3756
3740
|
|