@esfaenza/forms-and-validations 13.1.9 → 13.1.10
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/esm2020/lib/models/dayjs-adapter/dayjs-date-adapter.mjs +1 -1
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/esfaenza-forms-and-validations.mjs +52 -52
- package/fesm2015/esfaenza-forms-and-validations.mjs.map +1 -1
- package/fesm2020/esfaenza-forms-and-validations.mjs +52 -52
- package/fesm2020/esfaenza-forms-and-validations.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Injectable, Inject, InjectionToken, Directive, Input, EventEmitter, ViewChild, Output, Optional, forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChild, Self, Host, NgModule } from '@angular/core';
|
|
3
|
+
import * as i4$2 from '@angular/material/core';
|
|
4
|
+
import { MAT_DATE_LOCALE } from '@angular/material/core';
|
|
5
|
+
import { DayJsDateAdapter, MatDayjsDateModule } from '@esfaenza/material-dayjs-adapter';
|
|
3
6
|
import * as i5 from '@angular/common';
|
|
4
7
|
import { CommonModule } from '@angular/common';
|
|
5
8
|
import * as i2$1 from '@angular/forms';
|
|
@@ -12,7 +15,6 @@ import * as i4 from '@angular/material/input';
|
|
|
12
15
|
import { MatInputModule } from '@angular/material/input';
|
|
13
16
|
import * as i1 from '@esfaenza/localizations';
|
|
14
17
|
import { LocalizationService, LocalizationModule } from '@esfaenza/localizations';
|
|
15
|
-
import { DayJsDateAdapter, MatDayjsDateModule } from '@esfaenza/material-dayjs-adapter';
|
|
16
18
|
import * as i6 from '@esfaenza/ngx-currency-mask';
|
|
17
19
|
import { CurrencyMaskModule } from '@esfaenza/ngx-currency-mask';
|
|
18
20
|
import * as i4$3 from 'angular2-multiselect-dropdown';
|
|
@@ -21,8 +23,6 @@ import * as i2$3 from '@angular-material-components/datetime-picker';
|
|
|
21
23
|
import { NgxMatDatetimePickerModule, NgxMatTimepickerModule, NGX_MAT_DATE_FORMATS, NgxMatDateAdapter } from '@angular-material-components/datetime-picker';
|
|
22
24
|
import * as i7 from 'ngx-bootstrap/tooltip';
|
|
23
25
|
import { TooltipDirective, TooltipModule } from 'ngx-bootstrap/tooltip';
|
|
24
|
-
import * as i4$2 from '@angular/material/core';
|
|
25
|
-
import { MAT_DATE_LOCALE } from '@angular/material/core';
|
|
26
26
|
import * as i2 from '@angular/material/form-field';
|
|
27
27
|
import * as i2$2 from '@esfaenza/extensions';
|
|
28
28
|
import * as i2$4 from '@esfaenza/access-control';
|
|
@@ -47,53 +47,6 @@ class AppFile {
|
|
|
47
47
|
class FormsAndValidationsModuleConfig {
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/**
|
|
51
|
-
* Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US"
|
|
52
|
-
*/
|
|
53
|
-
const FAV_LOCALE = new InjectionToken('FAV_LOCALE');
|
|
54
|
-
/**
|
|
55
|
-
* Chiave che indica il prefisso dei Contesti Applicativi per permettere l'abilitazione/disabilitazione di input in maniera contestuale
|
|
56
|
-
*/
|
|
57
|
-
const ACO_CUSTOMKEY = new InjectionToken('ACO_CUSTOMKEY');
|
|
58
|
-
|
|
59
|
-
// Angular
|
|
60
|
-
/**
|
|
61
|
-
* Direttiva utilizzata per validazioni "required" custom, in modo da poter dire che anche se c'è un valore selezionato, ma quel valore lo considero null
|
|
62
|
-
* allora la validazione fallisce. Attualmente usato nell'unico punto sensato: validation-select
|
|
63
|
-
*/
|
|
64
|
-
class CustomRequiredDirective {
|
|
65
|
-
constructor() {
|
|
66
|
-
/**
|
|
67
|
-
* Lista di valori che vengono considerati "vuoti" seppur presenti
|
|
68
|
-
*/
|
|
69
|
-
this.NullValues = [];
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* @ignore
|
|
73
|
-
*/
|
|
74
|
-
validate(c) {
|
|
75
|
-
// Controllo solo per custom required a true, altrimenti qualsiasi valore mi va bene
|
|
76
|
-
if (this.customRequired != "true")
|
|
77
|
-
return null;
|
|
78
|
-
return !c.value || this.NullValues.includes(c.value) ? { required: true } : null;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
CustomRequiredDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CustomRequiredDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
82
|
-
CustomRequiredDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: CustomRequiredDirective, selector: "[customRequired]", inputs: { NullValues: ["CustomNullValues", "NullValues"], customRequired: "customRequired" }, providers: [{ provide: NG_VALIDATORS, useExisting: CustomRequiredDirective, multi: true }], ngImport: i0 });
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CustomRequiredDirective, decorators: [{
|
|
84
|
-
type: Directive,
|
|
85
|
-
args: [{
|
|
86
|
-
selector: '[customRequired]',
|
|
87
|
-
providers: [{ provide: NG_VALIDATORS, useExisting: CustomRequiredDirective, multi: true }]
|
|
88
|
-
}]
|
|
89
|
-
}], propDecorators: { NullValues: [{
|
|
90
|
-
type: Input,
|
|
91
|
-
args: ["CustomNullValues"]
|
|
92
|
-
}], customRequired: [{
|
|
93
|
-
type: Input,
|
|
94
|
-
args: ['customRequired']
|
|
95
|
-
}] } });
|
|
96
|
-
|
|
97
50
|
//Angular
|
|
98
51
|
/**
|
|
99
52
|
* Espansione dell'adapter di default di DayJs già utilizzato per i bind base su Material.
|
|
@@ -176,6 +129,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
176
129
|
args: [MAT_DATE_LOCALE]
|
|
177
130
|
}] }]; } });
|
|
178
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US"
|
|
134
|
+
*/
|
|
135
|
+
const FAV_LOCALE = new InjectionToken('FAV_LOCALE');
|
|
136
|
+
/**
|
|
137
|
+
* Chiave che indica il prefisso dei Contesti Applicativi per permettere l'abilitazione/disabilitazione di input in maniera contestuale
|
|
138
|
+
*/
|
|
139
|
+
const ACO_CUSTOMKEY = new InjectionToken('ACO_CUSTOMKEY');
|
|
140
|
+
|
|
141
|
+
// Angular
|
|
142
|
+
/**
|
|
143
|
+
* Direttiva utilizzata per validazioni "required" custom, in modo da poter dire che anche se c'è un valore selezionato, ma quel valore lo considero null
|
|
144
|
+
* allora la validazione fallisce. Attualmente usato nell'unico punto sensato: validation-select
|
|
145
|
+
*/
|
|
146
|
+
class CustomRequiredDirective {
|
|
147
|
+
constructor() {
|
|
148
|
+
/**
|
|
149
|
+
* Lista di valori che vengono considerati "vuoti" seppur presenti
|
|
150
|
+
*/
|
|
151
|
+
this.NullValues = [];
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @ignore
|
|
155
|
+
*/
|
|
156
|
+
validate(c) {
|
|
157
|
+
// Controllo solo per custom required a true, altrimenti qualsiasi valore mi va bene
|
|
158
|
+
if (this.customRequired != "true")
|
|
159
|
+
return null;
|
|
160
|
+
return !c.value || this.NullValues.includes(c.value) ? { required: true } : null;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
CustomRequiredDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CustomRequiredDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
164
|
+
CustomRequiredDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: CustomRequiredDirective, selector: "[customRequired]", inputs: { NullValues: ["CustomNullValues", "NullValues"], customRequired: "customRequired" }, providers: [{ provide: NG_VALIDATORS, useExisting: CustomRequiredDirective, multi: true }], ngImport: i0 });
|
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CustomRequiredDirective, decorators: [{
|
|
166
|
+
type: Directive,
|
|
167
|
+
args: [{
|
|
168
|
+
selector: '[customRequired]',
|
|
169
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: CustomRequiredDirective, multi: true }]
|
|
170
|
+
}]
|
|
171
|
+
}], propDecorators: { NullValues: [{
|
|
172
|
+
type: Input,
|
|
173
|
+
args: ["CustomNullValues"]
|
|
174
|
+
}], customRequired: [{
|
|
175
|
+
type: Input,
|
|
176
|
+
args: ['customRequired']
|
|
177
|
+
}] } });
|
|
178
|
+
|
|
179
179
|
// Angular
|
|
180
180
|
/**
|
|
181
181
|
* Classe astratta base che contiene le logiche / proprietà in comune a tutti i validatori
|
|
@@ -3556,5 +3556,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
3556
3556
|
* Generated bundle index. Do not edit.
|
|
3557
3557
|
*/
|
|
3558
3558
|
|
|
3559
|
-
export { AppFile, CustomRequiredDirective, FormAdaptiveComponent, FormAutocompleteComponent, FormCheckboxComponent, FormDateComponent, FormDateTimeComponent, FormEmptyComponent, FormErrorComponent, FormFileComponent, FormInfoComponent, FormInputComponent, FormMultiSelectComponent, FormSelectComponent, FormTemplateComponent, FormTextareaComponent, FormTimeComponent, FormsAndValidationsModule, FormsAndValidationsModuleConfig, ValidationAutocompleteComponent, ValidationCurrencyComponent, ValidationDateComponent, ValidationDateTimeComponent, ValidationInputComponent, ValidationSelectComponent, ValidationTextAreaComponent };
|
|
3559
|
+
export { AppFile, CustomRequiredDirective, FormAdaptiveComponent, FormAutocompleteComponent, FormCheckboxComponent, FormDateComponent, FormDateTimeComponent, FormEmptyComponent, FormErrorComponent, FormFileComponent, FormInfoComponent, FormInputComponent, FormMultiSelectComponent, FormSelectComponent, FormTemplateComponent, FormTextareaComponent, FormTimeComponent, FormsAndValidationsModule, FormsAndValidationsModuleConfig, NgxExpandedDayJsDateAdapter, ValidationAutocompleteComponent, ValidationCurrencyComponent, ValidationDateComponent, ValidationDateTimeComponent, ValidationInputComponent, ValidationSelectComponent, ValidationTextAreaComponent };
|
|
3560
3560
|
//# sourceMappingURL=esfaenza-forms-and-validations.mjs.map
|