@esfaenza/parameters 12.2.9 → 13.1.3

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.
@@ -0,0 +1,303 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Injectable, Inject, forwardRef, Component, Input, NgModule } from '@angular/core';
3
+ import * as i4 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i5 from '@angular/forms';
6
+ import { NgControl, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';
7
+ import * as i3 from '@esfaenza/forms-and-validations';
8
+ import { FormsAndValidationsModule } from '@esfaenza/forms-and-validations';
9
+ import * as i2 from '@esfaenza/localizations';
10
+ import { LocalizationService, LocalizationModule } from '@esfaenza/localizations';
11
+ import * as i1 from '@esfaenza/extensions';
12
+ import { FullExtensionsModule } from '@esfaenza/extensions';
13
+
14
+ /**
15
+ * Token che indica il locale da utilizzare per l'applicazione. Sono supportati i locali "it-IT" ed "en-US"
16
+ */
17
+ const PAR_LOCALE = new InjectionToken('PAR_LOCALE');
18
+
19
+ /**
20
+ * Classe di localizzazione per il componente **EsParametersComponent**
21
+ */
22
+ class EsParametersLoc extends LocalizationService {
23
+ /**
24
+ * Costruttore
25
+ *
26
+ * @ignore
27
+ */
28
+ constructor(LOC_LOCALE) {
29
+ super(LOC_LOCALE);
30
+ }
31
+ }
32
+ EsParametersLoc.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsParametersLoc, deps: [{ token: PAR_LOCALE }], target: i0.ɵɵFactoryTarget.Injectable });
33
+ EsParametersLoc.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsParametersLoc });
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsParametersLoc, decorators: [{
35
+ type: Injectable
36
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
37
+ type: Inject,
38
+ args: [PAR_LOCALE]
39
+ }] }]; } });
40
+
41
+ // Angular
42
+ /**
43
+ * Componente che permette di graficare una lista di **GenericParameter** come Input in base al loro tipo specifico
44
+ */
45
+ class EsParametersComponent {
46
+ /**
47
+ * Costruttore
48
+ *
49
+ * @ignore
50
+ */
51
+ constructor(utiExts, lc, cdr, inj) {
52
+ this.utiExts = utiExts;
53
+ this.lc = lc;
54
+ this.cdr = cdr;
55
+ this.inj = inj;
56
+ /**
57
+ * Pipeline di Angular
58
+ *
59
+ * @ignore
60
+ */
61
+ this.propagateChange = (_) => { };
62
+ /**
63
+ * Indica che l'ultimo parametro non deve avere margine in fondo
64
+ */
65
+ this.LastParameterNoMargin = false;
66
+ /**
67
+ * col-md-X per la label
68
+ */
69
+ this.LabelColWidth = 4;
70
+ /**
71
+ * col-md-X per l'input
72
+ */
73
+ this.InputColWidth = 8;
74
+ /**
75
+ * Input a cui collegare la variabile **submitted** del form all'interno del quale viene utilizzato questo componente
76
+ */
77
+ this.submitted = false;
78
+ /**
79
+ * Valore da mostrare qualora non fossero ancora ricevuti i **Parameters** da mostrare
80
+ */
81
+ this.EmptyMessage = "";
82
+ /**
83
+ * Permette di rimuovere i parametri dalla lista cliccando sulla X davanti alla Label
84
+ */
85
+ this.Removal = false;
86
+ /**
87
+ * Indica se i componenti di Input generati sono Readonly o no
88
+ */
89
+ this.Readonly = false;
90
+ }
91
+ /**
92
+ * Permette di settare in una volta solo gli input **LabelColWidth** e **InputColWidth**, basta scriverlo con la sintassi "X Y"
93
+ */
94
+ set LabelInputRatio(input) {
95
+ var ratio = input.split(/\s/);
96
+ this.LabelColWidth = parseInt(ratio[0]);
97
+ this.InputColWidth = parseInt(ratio[1]);
98
+ }
99
+ /**
100
+ * Pipeline di Angular
101
+ *
102
+ * @ignore
103
+ */
104
+ writeValue(obj) {
105
+ this.Parameters = obj;
106
+ if (!this.Parameters)
107
+ return;
108
+ this.Parameters.forEach(t => {
109
+ if (t.typecode && !t.type)
110
+ t.type = this.utiExts.getJsTypeFromTypeCode(t.typecode);
111
+ if (t.type != this.utiExts.getJsTypeFromTypeCode(t.typecode))
112
+ throw "Rilevate inconsistenze fra il tipo " + t.type + " e il tipo " + this.utiExts.getJsTypeFromTypeCode(t.typecode);
113
+ if (t.type == "boolean")
114
+ t.value = t.value.toString().toLowerCase() === "true";
115
+ if (t.enumtype || t.dicttype)
116
+ t.type = 'enum';
117
+ });
118
+ }
119
+ /**
120
+ * Pipeline di Angular
121
+ *
122
+ * @ignore
123
+ */
124
+ validate(c) {
125
+ // Se la validazione è richiamata da un componente non me stesso vuol dire che i componenti di validazione interni stanno richiamando
126
+ // questo validator, ma dal loro punto di vista non se ne devono preoccupare quindi faccio finta non ci siano errori.
127
+ // Se invece vengo richiamato direttamente significa che è il form in cui vive es-parameters e lì devo effettuare la validazione
128
+ let control = this.inj.get(NgControl, null)?.control;
129
+ if (c != control)
130
+ return null;
131
+ let valid = true;
132
+ if (this.Parameters && this.Parameters.length > 0) {
133
+ this.Parameters.forEach(t => {
134
+ if (t.mandatory && !t.value)
135
+ valid = false;
136
+ else if (t.value && t.type == 'number')
137
+ valid = new RegExp(t.pattern || /^[+-]?[0-9]*[,]?[0-9]+$/).test(t.value);
138
+ else if (t.value && t.pattern)
139
+ valid = new RegExp(t.pattern).test(t.value);
140
+ });
141
+ }
142
+ if (valid)
143
+ return null;
144
+ return { "es-parameters": valid };
145
+ }
146
+ /**
147
+ * Pipeline di Angular
148
+ *
149
+ * @ignore
150
+ */
151
+ registerOnChange(fn) { this.propagateChange = fn; }
152
+ /**
153
+ * Pipeline di Angular
154
+ *
155
+ * @ignore
156
+ */
157
+ registerOnTouched(fn) { }
158
+ /**
159
+ * Metodo che si occupa di gestire il modello in uscita e propagarlo sul binding ngModel
160
+ */
161
+ changed() {
162
+ var thyCleanShaltNotBlankMe = JSON.parse(JSON.stringify(this.Parameters));
163
+ this.propagateChange(thyCleanShaltNotBlankMe);
164
+ }
165
+ /**
166
+ * Rimuove il parametro selezionato e propaga il modello
167
+ *
168
+ * @param {GenericParameter} par Parametro da rimuovere
169
+ */
170
+ removeParameter(par) {
171
+ this.Parameters.splice(this.Parameters.indexOf(par), 1);
172
+ this.changed();
173
+ }
174
+ }
175
+ EsParametersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsParametersComponent, deps: [{ token: i1.UtilityService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
176
+ EsParametersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: EsParametersComponent, selector: "es-parameters", inputs: { LastParameterNoMargin: "LastParameterNoMargin", LabelColWidth: "LabelColWidth", InputColWidth: "InputColWidth", submitted: "submitted", EmptyMessage: "EmptyMessage", Removal: "Removal", Readonly: "Readonly", LabelInputRatio: "LabelInputRatio" }, providers: [
177
+ { provide: LocalizationService, useClass: EsParametersLoc },
178
+ {
179
+ provide: NG_VALUE_ACCESSOR,
180
+ useExisting: forwardRef(() => EsParametersComponent),
181
+ multi: true
182
+ },
183
+ {
184
+ provide: NG_VALIDATORS,
185
+ useExisting: forwardRef(() => EsParametersComponent),
186
+ multi: true
187
+ }
188
+ ], ngImport: i0, template: "<div *ngIf=\"(!Parameters || Parameters.length == 0) && EmptyMessage\">\r\n <em>{{EmptyMessage}}</em>\r\n</div>\r\n\r\n<div *ngIf=\"Parameters && Parameters.length > 0\">\r\n <div class=\"row form-group\" *ngFor=\"let par of Parameters; let i= index; let last = last;\" [class.app-margin-bottom-0]=\"LastParameterNoMargin && last\" [hidden]=\"!par.insertthis\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\"><span *ngIf=\"Removal\" class=\"fa fa-remove text-danger\" (click)=\"removeParameter(par)\"></span>&nbsp;{{par.description}}{{par.mandatory ? '*' : ''}}:</label>\r\n\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'date'\">\r\n <form-date [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [required]=\"par.mandatory\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator></form-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'string'\">\r\n <form-input [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [required]=\"par.mandatory\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator></form-input>\r\n </div>\r\n <!--Se numero-->\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'number'\">\r\n <form-input [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [required]=\"par.mandatory\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator pattern=\"{{par.pattern || '^[+-]?[0-9]*[,]?[0-9]+$'}}\"></form-input>\r\n </div>\r\n <!--Se boolean-->\r\n <div class=\"col-md-{{InputColWidth}} m-t-5\" *ngIf=\"par.type == 'boolean'\">\r\n <form-checkbox [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator></form-checkbox>\r\n </div>\r\n <!--Se enum single select-->\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'enum' && !par.multienum\">\r\n <form-select [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [required]=\"par.mandatory\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator [Source]=\"par.enumvalues\"></form-select>\r\n </div>\r\n <!--Se enum multi select-->\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'enum' && par.multienum\">\r\n <form-multiselect [FormLayout]=\"false\" [SelectLabel]=\"('Select' | localize : lc) + '...'\" [(ngModel)]=\"par.value\" name=\"mtu\" [Readonly]=\"Readonly || par.isreadonly\" [Source]=\"par.enumvalues\" required (inputChange)=\"changed();\" #validator></form-multiselect>\r\n </div>\r\n\r\n <div class=\"clearfix\"></div>\r\n </div>\r\n</div>", components: [{ type: i3.FormDateComponent, selector: "form-date", inputs: ["JsDates"] }, { type: i3.FormInputComponent, selector: "form-input", inputs: ["Password"], outputs: ["onSuffixAction", "onPrefixAction"] }, { type: i3.FormCheckboxComponent, selector: "form-checkbox" }, { type: i3.FormSelectComponent, selector: "form-select", inputs: ["SelectLabel", "PlaceholderValue", "RequiredPlaceholder", "EmptyFieldValue", "ShowValidationSymbol"] }, { type: i3.FormMultiSelectComponent, selector: "form-multiselect", inputs: ["SelectLabel", "UseKeyValues"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }], pipes: { "localize": i2.LocalizePipe } });
189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsParametersComponent, decorators: [{
190
+ type: Component,
191
+ args: [{ selector: "es-parameters", providers: [
192
+ { provide: LocalizationService, useClass: EsParametersLoc },
193
+ {
194
+ provide: NG_VALUE_ACCESSOR,
195
+ useExisting: forwardRef(() => EsParametersComponent),
196
+ multi: true
197
+ },
198
+ {
199
+ provide: NG_VALIDATORS,
200
+ useExisting: forwardRef(() => EsParametersComponent),
201
+ multi: true
202
+ }
203
+ ], template: "<div *ngIf=\"(!Parameters || Parameters.length == 0) && EmptyMessage\">\r\n <em>{{EmptyMessage}}</em>\r\n</div>\r\n\r\n<div *ngIf=\"Parameters && Parameters.length > 0\">\r\n <div class=\"row form-group\" *ngFor=\"let par of Parameters; let i= index; let last = last;\" [class.app-margin-bottom-0]=\"LastParameterNoMargin && last\" [hidden]=\"!par.insertthis\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\"><span *ngIf=\"Removal\" class=\"fa fa-remove text-danger\" (click)=\"removeParameter(par)\"></span>&nbsp;{{par.description}}{{par.mandatory ? '*' : ''}}:</label>\r\n\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'date'\">\r\n <form-date [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [required]=\"par.mandatory\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator></form-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'string'\">\r\n <form-input [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [required]=\"par.mandatory\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator></form-input>\r\n </div>\r\n <!--Se numero-->\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'number'\">\r\n <form-input [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [required]=\"par.mandatory\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator pattern=\"{{par.pattern || '^[+-]?[0-9]*[,]?[0-9]+$'}}\"></form-input>\r\n </div>\r\n <!--Se boolean-->\r\n <div class=\"col-md-{{InputColWidth}} m-t-5\" *ngIf=\"par.type == 'boolean'\">\r\n <form-checkbox [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator></form-checkbox>\r\n </div>\r\n <!--Se enum single select-->\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'enum' && !par.multienum\">\r\n <form-select [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [required]=\"par.mandatory\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator [Source]=\"par.enumvalues\"></form-select>\r\n </div>\r\n <!--Se enum multi select-->\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'enum' && par.multienum\">\r\n <form-multiselect [FormLayout]=\"false\" [SelectLabel]=\"('Select' | localize : lc) + '...'\" [(ngModel)]=\"par.value\" name=\"mtu\" [Readonly]=\"Readonly || par.isreadonly\" [Source]=\"par.enumvalues\" required (inputChange)=\"changed();\" #validator></form-multiselect>\r\n </div>\r\n\r\n <div class=\"clearfix\"></div>\r\n </div>\r\n</div>" }]
204
+ }], ctorParameters: function () { return [{ type: i1.UtilityService }, { type: i2.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }]; }, propDecorators: { LastParameterNoMargin: [{
205
+ type: Input
206
+ }], LabelColWidth: [{
207
+ type: Input
208
+ }], InputColWidth: [{
209
+ type: Input
210
+ }], submitted: [{
211
+ type: Input
212
+ }], EmptyMessage: [{
213
+ type: Input
214
+ }], Removal: [{
215
+ type: Input
216
+ }], Readonly: [{
217
+ type: Input
218
+ }], LabelInputRatio: [{
219
+ type: Input
220
+ }] } });
221
+
222
+ class EsParametersModule {
223
+ static forRoot(config) {
224
+ return {
225
+ ngModule: EsParametersModule,
226
+ providers: [
227
+ { provide: PAR_LOCALE, useValue: config?.locale || 'it-IT' }
228
+ ]
229
+ };
230
+ }
231
+ }
232
+ EsParametersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsParametersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
233
+ EsParametersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsParametersModule, declarations: [EsParametersComponent], imports: [CommonModule,
234
+ LocalizationModule,
235
+ FormsModule,
236
+ FullExtensionsModule,
237
+ FormsAndValidationsModule], exports: [EsParametersComponent] });
238
+ EsParametersModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsParametersModule, imports: [[
239
+ CommonModule,
240
+ LocalizationModule,
241
+ FormsModule,
242
+ FullExtensionsModule,
243
+ FormsAndValidationsModule,
244
+ ]] });
245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsParametersModule, decorators: [{
246
+ type: NgModule,
247
+ args: [{
248
+ declarations: [EsParametersComponent],
249
+ imports: [
250
+ CommonModule,
251
+ LocalizationModule,
252
+ FormsModule,
253
+ FullExtensionsModule,
254
+ FormsAndValidationsModule,
255
+ ],
256
+ exports: [EsParametersComponent]
257
+ }]
258
+ }] });
259
+
260
+ /**
261
+ * Classe che rappresenta un parametro generico
262
+ */
263
+ class GenericParameter {
264
+ /**
265
+ * Costruttore
266
+ *
267
+ * @param {string} id Codice del parametro
268
+ * @param {string} description Descrizione del parametro
269
+ * @param {string} pattern Pattern di validazione
270
+ * @param {'date' | 'string' | 'number' | 'boolean' | 'enum'} type Tipo di input
271
+ * @param {boolean} mandatory Indica se il valore è obbligatorio o meno
272
+ * @param {any} v_default Valore di default per questo Parametro
273
+ * @param {{ id: string, description: string }[]} enumvalues Qualora il **type** fosse di tipo **enum**, qui devono esserci tutti i valori che può assumere
274
+ * @param {boolean} multienum Qualora il **type** fosse di tipo **enum**, indica se è possibile selezionare più valori (multiselect)
275
+ */
276
+ constructor(id, description, pattern, type, mandatory, v_default = null, enumvalues = [], multienum) {
277
+ this.id = id;
278
+ this.description = description;
279
+ this.pattern = pattern;
280
+ this.mandatory = mandatory;
281
+ this.enumvalues = enumvalues;
282
+ this.multienum = multienum;
283
+ this.type = type == 'enum' ? "" : type;
284
+ this.insertthis = true;
285
+ this.enumtype = type == 'enum' ? type : "";
286
+ this.isreadonly = false;
287
+ if (!this.enumtype && enumvalues.length != 0)
288
+ console.error("impossibile gestire valori di dizionario per un parametro non di tipo enum");
289
+ if (v_default != null)
290
+ this.value = v_default;
291
+ }
292
+ }
293
+
294
+ /*
295
+ * Public API Surface of parameters
296
+ */
297
+
298
+ /**
299
+ * Generated bundle index. Do not edit.
300
+ */
301
+
302
+ export { EsParametersComponent, EsParametersModule, GenericParameter, PAR_LOCALE };
303
+ //# sourceMappingURL=esfaenza-parameters.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esfaenza-parameters.mjs","sources":["../../../projects/parameters/src/lib/tokens.ts","../../../projects/parameters/src/lib/es_parameters.component.loc.ts","../../../projects/parameters/src/lib/es_parameters.component.ts","../../../projects/parameters/src/lib/es_parameters.component.html","../../../projects/parameters/src/lib/es_parameters.module.ts","../../../projects/parameters/src/lib/models/GenericParameter.ts","../../../projects/parameters/src/public-api.ts","../../../projects/parameters/src/esfaenza-parameters.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\n/**\r\n * Token che indica il locale da utilizzare per l'applicazione. Sono supportati i locali \"it-IT\" ed \"en-US\"\r\n */\r\nexport const PAR_LOCALE: InjectionToken<string> = new InjectionToken<string>('PAR_LOCALE');","import { Injectable, Inject } from \"@angular/core\";\r\nimport { LocalizationService } from \"@esfaenza/localizations\";\r\nimport { PAR_LOCALE } from './tokens';\r\n\r\n/**\r\n * Classe di localizzazione per il componente **EsParametersComponent**\r\n */\r\n@Injectable()\r\nexport class EsParametersLoc extends LocalizationService {\r\n\r\n /**\r\n * Costruttore\r\n * \r\n * @ignore\r\n */\r\n constructor(@Inject(PAR_LOCALE) LOC_LOCALE: string) {\r\n super(LOC_LOCALE);\r\n }\r\n}","// Angular\r\nimport { ControlValueAccessor, FormControl, NgControl, NG_VALIDATORS, NG_VALUE_ACCESSOR, Validator } from \"@angular/forms\";\r\nimport { ChangeDetectorRef, Component, forwardRef, Injector, Input } from \"@angular/core\";\r\n\r\n// Configurazioni\r\nimport { LocalizationService } from \"@esfaenza/localizations\";\r\nimport { UtilityService } from \"@esfaenza/extensions\";\r\n\r\n// Classi\r\nimport { GenericParameter } from './models/GenericParameter';\r\n\r\n// Applicazione\r\nimport { EsParametersLoc } from \"./es_parameters.component.loc\";\r\n\r\n/**\r\n * Componente che permette di graficare una lista di **GenericParameter** come Input in base al loro tipo specifico\r\n */\r\n@Component({\r\n selector: \"es-parameters\",\r\n providers: [\r\n { provide: LocalizationService, useClass: EsParametersLoc },\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => EsParametersComponent),\r\n multi: true\r\n },\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => EsParametersComponent),\r\n multi: true\r\n }],\r\n templateUrl: \"./es_parameters.component.html\"\r\n})\r\nexport class EsParametersComponent implements ControlValueAccessor, Validator {\r\n\r\n /**\r\n * Modello del componente su cui vengono effettuate le graficazioni\r\n */\r\n public Parameters: GenericParameter[];\r\n\r\n /**\r\n * Pipeline di Angular \r\n * \r\n * @ignore\r\n */\r\n propagateChange = (_: any) => { };\r\n\r\n /**\r\n * Indica che l'ultimo parametro non deve avere margine in fondo\r\n */\r\n @Input() LastParameterNoMargin: boolean = false;\r\n\r\n /**\r\n * col-md-X per la label\r\n */\r\n @Input() LabelColWidth: number = 4;\r\n\r\n /**\r\n * col-md-X per l'input\r\n */\r\n @Input() InputColWidth: number = 8;\r\n\r\n /**\r\n * Input a cui collegare la variabile **submitted** del form all'interno del quale viene utilizzato questo componente\r\n */\r\n @Input() submitted: boolean = false;\r\n\r\n /**\r\n * Valore da mostrare qualora non fossero ancora ricevuti i **Parameters** da mostrare\r\n */\r\n @Input() EmptyMessage: string = \"\";\r\n\r\n /**\r\n * Permette di rimuovere i parametri dalla lista cliccando sulla X davanti alla Label\r\n */\r\n @Input() Removal: boolean = false;\r\n\r\n /**\r\n * Indica se i componenti di Input generati sono Readonly o no\r\n */\r\n @Input() Readonly: boolean = false;\r\n\r\n /**\r\n * Permette di settare in una volta solo gli input **LabelColWidth** e **InputColWidth**, basta scriverlo con la sintassi \"X Y\"\r\n */\r\n @Input() set LabelInputRatio(input: string) {\r\n var ratio = input.split(/\\s/);\r\n this.LabelColWidth = parseInt(ratio[0]);\r\n this.InputColWidth = parseInt(ratio[1]);\r\n }\r\n\r\n /**\r\n * Costruttore\r\n * \r\n * @ignore\r\n */\r\n constructor(private utiExts: UtilityService, public lc: LocalizationService, public cdr: ChangeDetectorRef, private inj: Injector) { }\r\n\r\n /**\r\n * Pipeline di Angular\r\n * \r\n * @ignore\r\n */\r\n public writeValue(obj): void {\r\n this.Parameters = obj;\r\n if (!this.Parameters)\r\n return;\r\n\r\n this.Parameters.forEach(t => {\r\n if (t.typecode && !t.type)\r\n t.type = this.utiExts.getJsTypeFromTypeCode(t.typecode);\r\n\r\n if (t.type != this.utiExts.getJsTypeFromTypeCode(t.typecode))\r\n throw \"Rilevate inconsistenze fra il tipo \" + t.type + \" e il tipo \" + this.utiExts.getJsTypeFromTypeCode(t.typecode);\r\n\r\n if (t.type == \"boolean\")\r\n t.value = (<string>t.value.toString()).toLowerCase() === \"true\";\r\n\r\n if (t.enumtype || t.dicttype)\r\n t.type = 'enum';\r\n });\r\n }\r\n\r\n /**\r\n * Pipeline di Angular\r\n * \r\n * @ignore\r\n */\r\n validate(c: FormControl): any {\r\n // Se la validazione è richiamata da un componente non me stesso vuol dire che i componenti di validazione interni stanno richiamando\r\n // questo validator, ma dal loro punto di vista non se ne devono preoccupare quindi faccio finta non ci siano errori.\r\n // Se invece vengo richiamato direttamente significa che è il form in cui vive es-parameters e lì devo effettuare la validazione\r\n let control = this.inj.get(NgControl, null)?.control;\r\n if (c != control)\r\n return null;\r\n\r\n let valid = true;\r\n if (this.Parameters && this.Parameters.length > 0) {\r\n this.Parameters.forEach(t => {\r\n if (t.mandatory && !t.value)\r\n valid = false;\r\n else if (t.value && t.type == 'number')\r\n valid = new RegExp(t.pattern || /^[+-]?[0-9]*[,]?[0-9]+$/).test(t.value);\r\n else if (t.value && t.pattern)\r\n valid = new RegExp(t.pattern).test(t.value);\r\n });\r\n }\r\n\r\n if (valid)\r\n return null;\r\n return { \"es-parameters\": valid };\r\n }\r\n\r\n /**\r\n * Pipeline di Angular\r\n * \r\n * @ignore\r\n */\r\n public registerOnChange(fn): void { this.propagateChange = fn; }\r\n\r\n /**\r\n * Pipeline di Angular\r\n * \r\n * @ignore\r\n */\r\n public registerOnTouched(fn): void { }\r\n\r\n /**\r\n * Metodo che si occupa di gestire il modello in uscita e propagarlo sul binding ngModel\r\n */\r\n public changed() {\r\n var thyCleanShaltNotBlankMe = JSON.parse(JSON.stringify(this.Parameters));\r\n this.propagateChange(thyCleanShaltNotBlankMe);\r\n }\r\n\r\n /**\r\n * Rimuove il parametro selezionato e propaga il modello\r\n * \r\n * @param {GenericParameter} par Parametro da rimuovere\r\n */\r\n public removeParameter(par: GenericParameter) {\r\n this.Parameters.splice(this.Parameters.indexOf(par), 1);\r\n this.changed();\r\n }\r\n}","<div *ngIf=\"(!Parameters || Parameters.length == 0) && EmptyMessage\">\r\n <em>{{EmptyMessage}}</em>\r\n</div>\r\n\r\n<div *ngIf=\"Parameters && Parameters.length > 0\">\r\n <div class=\"row form-group\" *ngFor=\"let par of Parameters; let i= index; let last = last;\" [class.app-margin-bottom-0]=\"LastParameterNoMargin && last\" [hidden]=\"!par.insertthis\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\"><span *ngIf=\"Removal\" class=\"fa fa-remove text-danger\" (click)=\"removeParameter(par)\"></span>&nbsp;{{par.description}}{{par.mandatory ? '*' : ''}}:</label>\r\n\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'date'\">\r\n <form-date [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [required]=\"par.mandatory\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator></form-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'string'\">\r\n <form-input [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [required]=\"par.mandatory\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator></form-input>\r\n </div>\r\n <!--Se numero-->\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'number'\">\r\n <form-input [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [required]=\"par.mandatory\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator pattern=\"{{par.pattern || '^[+-]?[0-9]*[,]?[0-9]+$'}}\"></form-input>\r\n </div>\r\n <!--Se boolean-->\r\n <div class=\"col-md-{{InputColWidth}} m-t-5\" *ngIf=\"par.type == 'boolean'\">\r\n <form-checkbox [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator></form-checkbox>\r\n </div>\r\n <!--Se enum single select-->\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'enum' && !par.multienum\">\r\n <form-select [FormLayout]=\"false\" [Readonly]=\"Readonly || par.isreadonly\" [required]=\"par.mandatory\" [(ngModel)]=\"par.value\" name=\"par{{i}}\" (inputChange)=\"changed();\" #validator [Source]=\"par.enumvalues\"></form-select>\r\n </div>\r\n <!--Se enum multi select-->\r\n <div class=\"col-md-{{InputColWidth}}\" *ngIf=\"par.type == 'enum' && par.multienum\">\r\n <form-multiselect [FormLayout]=\"false\" [SelectLabel]=\"('Select' | localize : lc) + '...'\" [(ngModel)]=\"par.value\" name=\"mtu\" [Readonly]=\"Readonly || par.isreadonly\" [Source]=\"par.enumvalues\" required (inputChange)=\"changed();\" #validator></form-multiselect>\r\n </div>\r\n\r\n <div class=\"clearfix\"></div>\r\n </div>\r\n</div>","import { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { FormsAndValidationsModule } from \"@esfaenza/forms-and-validations\";\r\nimport { LocalizationModule } from '@esfaenza/localizations';\r\nimport { FullExtensionsModule } from '@esfaenza/extensions';\r\nimport { EsParametersComponent } from './es_parameters.component';\r\nimport { EsParametersModuleConfig } from './models/EsParametersModuleConfig';\r\nimport { PAR_LOCALE } from './tokens';\r\n\r\n\r\n@NgModule({\r\n declarations: [EsParametersComponent],\r\n imports: [\r\n CommonModule,\r\n LocalizationModule,\r\n FormsModule,\r\n FullExtensionsModule,\r\n FormsAndValidationsModule,\r\n ],\r\n exports: [EsParametersComponent]\r\n})\r\nexport class EsParametersModule {\r\n static forRoot(config?: EsParametersModuleConfig): ModuleWithProviders<EsParametersModule> {\r\n return {\r\n ngModule: EsParametersModule,\r\n providers: [\r\n { provide: PAR_LOCALE, useValue: config?.locale || 'it-IT' }\r\n ]\r\n };\r\n }\r\n }\r\n","/**\r\n * Classe che rappresenta un parametro generico\r\n */\r\nexport class GenericParameter {\r\n\r\n /**\r\n * Costruttore\r\n * \r\n * @param {string} id Codice del parametro\r\n * @param {string} description Descrizione del parametro\r\n * @param {string} pattern Pattern di validazione\r\n * @param {'date' | 'string' | 'number' | 'boolean' | 'enum'} type Tipo di input \r\n * @param {boolean} mandatory Indica se il valore è obbligatorio o meno\r\n * @param {any} v_default Valore di default per questo Parametro\r\n * @param {{ id: string, description: string }[]} enumvalues Qualora il **type** fosse di tipo **enum**, qui devono esserci tutti i valori che può assumere \r\n * @param {boolean} multienum Qualora il **type** fosse di tipo **enum**, indica se è possibile selezionare più valori (multiselect)\r\n */\r\n constructor(\r\n public id: string, \r\n public description: string, \r\n public pattern: string,\r\n type: 'date' | 'string' | 'number' | 'boolean' | 'enum', \r\n public mandatory: boolean, \r\n v_default: any = null, \r\n public enumvalues: { id: string, description: string }[] = [],\r\n public multienum?: boolean) {\r\n\r\n this.type = type == 'enum' ? \"\" : type;\r\n this.insertthis = true;\r\n this.enumtype = type == 'enum' ? type : \"\";\r\n this.isreadonly = false;\r\n\r\n if(!this.enumtype && enumvalues.length != 0)\r\n console.error(\"impossibile gestire valori di dizionario per un parametro non di tipo enum\");\r\n\r\n if (v_default != null)\r\n this.value = v_default;\r\n }\r\n \r\n /**\r\n * Tipo di dato rappresentato da questo parametro\r\n */\r\n public type: string;\r\n\r\n /**\r\n * Typecode lato C# che rappresenta il tipo di dato\r\n */\r\n public typecode: number;\r\n\r\n /**\r\n * Indica se il campo specificato dev'essere di sola lettura o meno\r\n */\r\n public isreadonly: boolean;\r\n\r\n /**\r\n * Valore del parametro\r\n */\r\n public value: any;\r\n\r\n /**\r\n * Indica se questo parametro dev'essere inserito o no. In caso contrario viene semplicemente nascosto\r\n */\r\n public insertthis: boolean;\r\n\r\n /**\r\n * Tipo Enum, valorizzato dal Backend\r\n */\r\n public enumtype: string;\r\n\r\n /**\r\n * Tipo Dizionario, valorizzato dal Backend\r\n */\r\n public dicttype: string;\r\n}","/*\r\n * Public API Surface of parameters\r\n */\r\nexport * from './lib/es_parameters.module';\r\nexport * from './lib/tokens';\r\nexport * from './lib/models/GenericParameter';\r\nexport * from './lib/es_parameters.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAEA;;;MAGa,UAAU,GAA2B,IAAI,cAAc,CAAS,YAAY;;ACDzF;;;MAIa,eAAgB,SAAQ,mBAAmB;;;;;;IAOpD,YAAgC,UAAkB;QAC9C,KAAK,CAAC,UAAU,CAAC,CAAC;KACrB;;4GATQ,eAAe,kBAOJ,UAAU;gHAPrB,eAAe;2FAAf,eAAe;kBAD3B,UAAU;;0BAQM,MAAM;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,CAAS;QAElB,eAAU,GAAV,UAAU,CAA4C;QACtD,cAAS,GAAT,SAAS,CAAU;QAE1B,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,MAAM,GAAG,EAAE,GAAG,IAAI,CAAC;QACvC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,IAAI,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QAC3C,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QAExB,IAAG,CAAC,IAAI,CAAC,QAAQ,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC;YACvC,OAAO,CAAC,KAAK,CAAC,4EAA4E,CAAC,CAAC;QAEhG,IAAI,SAAS,IAAI,IAAI;YACjB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;KAC9B;;;ACrCL;;;;ACAA;;;;;;"}
@@ -3,6 +3,7 @@ import { ChangeDetectorRef, Injector } from "@angular/core";
3
3
  import { LocalizationService } from "@esfaenza/localizations";
4
4
  import { UtilityService } from "@esfaenza/extensions";
5
5
  import { GenericParameter } from './models/GenericParameter';
6
+ import * as i0 from "@angular/core";
6
7
  /**
7
8
  * Componente che permette di graficare una lista di **GenericParameter** come Input in base al loro tipo specifico
8
9
  */
@@ -93,4 +94,6 @@ export declare class EsParametersComponent implements ControlValueAccessor, Vali
93
94
  * @param {GenericParameter} par Parametro da rimuovere
94
95
  */
95
96
  removeParameter(par: GenericParameter): void;
97
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsParametersComponent, never>;
98
+ static ɵcmp: i0.ɵɵComponentDeclaration<EsParametersComponent, "es-parameters", never, { "LastParameterNoMargin": "LastParameterNoMargin"; "LabelColWidth": "LabelColWidth"; "InputColWidth": "InputColWidth"; "submitted": "submitted"; "EmptyMessage": "EmptyMessage"; "Removal": "Removal"; "Readonly": "Readonly"; "LabelInputRatio": "LabelInputRatio"; }, {}, never, never>;
96
99
  }
@@ -1,4 +1,5 @@
1
1
  import { LocalizationService } from "@esfaenza/localizations";
2
+ import * as i0 from "@angular/core";
2
3
  /**
3
4
  * Classe di localizzazione per il componente **EsParametersComponent**
4
5
  */
@@ -9,4 +10,6 @@ export declare class EsParametersLoc extends LocalizationService {
9
10
  * @ignore
10
11
  */
11
12
  constructor(LOC_LOCALE: string);
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsParametersLoc, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsParametersLoc>;
12
15
  }
@@ -1,5 +1,15 @@
1
1
  import { ModuleWithProviders } from '@angular/core';
2
2
  import { EsParametersModuleConfig } from './models/EsParametersModuleConfig';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "./es_parameters.component";
5
+ import * as i2 from "@angular/common";
6
+ import * as i3 from "@esfaenza/localizations";
7
+ import * as i4 from "@angular/forms";
8
+ import * as i5 from "@esfaenza/extensions";
9
+ import * as i6 from "@esfaenza/forms-and-validations";
3
10
  export declare class EsParametersModule {
4
11
  static forRoot(config?: EsParametersModuleConfig): ModuleWithProviders<EsParametersModule>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsParametersModule, never>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<EsParametersModule, [typeof i1.EsParametersComponent], [typeof i2.CommonModule, typeof i3.LocalizationModule, typeof i4.FormsModule, typeof i5.FullExtensionsModule, typeof i6.FormsAndValidationsModule], [typeof i1.EsParametersComponent]>;
14
+ static ɵinj: i0.ɵɵInjectorDeclaration<EsParametersModule>;
5
15
  }
package/package.json CHANGED
@@ -1,34 +1,46 @@
1
1
  {
2
2
  "name": "@esfaenza/parameters",
3
- "version": "12.2.9",
3
+ "version": "13.1.3",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
7
7
  "peerDependencies": {
8
- "@angular/common": "~12.2.9",
9
- "@angular/core": "~12.2.9",
10
- "@angular/forms": "~12.2.9",
11
- "@angular/material": "12.2.9",
12
- "@esfaenza/localizations": "^12.2.8",
13
- "@esfaenza/access-control": "^12.2.7",
14
- "@esfaenza/extensions": "^12.2.10",
15
- "@esfaenza/material-dayjs-adapter": "^12.2.6",
16
- "@esfaenza/ngx-currency-mask": "^12.2.6",
17
- "@esfaenza/forms-and-validations": "^12.2.3",
18
- "@angular-material-components/datetime-picker": "6.0.2",
19
- "angular2-multiselect-dropdown": "^5.0.4",
20
- "ngx-toastr": "^14.1.0",
8
+ "@angular/common": "~13.1.1",
9
+ "@angular/core": "~13.1.1",
10
+ "@angular/forms": "~13.1.1",
11
+ "@angular/material": "13.1.1",
12
+ "@esfaenza/localizations": "^13.1.3",
13
+ "@esfaenza/access-control": "^13.1.3",
14
+ "@esfaenza/extensions": "^13.1.3",
15
+ "@esfaenza/material-dayjs-adapter": "^13.1.3",
16
+ "@esfaenza/ngx-currency-mask": "^13.1.3",
17
+ "@esfaenza/forms-and-validations": "^13.1.3",
18
+ "@angular-material-components/datetime-picker": "7.0.1",
19
+ "angular2-multiselect-dropdown": "5.0.4",
20
+ "ngx-toastr": "14.2.1",
21
21
  "ngx-bootstrap": "7.0.0",
22
- "dayjs": "^1.10.6",
23
- "cerialize": "^0.1.18",
24
- "sweetalert2": "^11.1.4"
22
+ "dayjs": "1.10.7",
23
+ "cerialize": "0.1.18",
24
+ "sweetalert2": "11.3.3"
25
25
  },
26
- "main": "bundles/esfaenza-parameters.umd.js",
27
- "module": "fesm2015/esfaenza-parameters.js",
28
- "es2015": "fesm2015/esfaenza-parameters.js",
29
- "esm2015": "esm2015/esfaenza-parameters.js",
30
- "fesm2015": "fesm2015/esfaenza-parameters.js",
26
+ "module": "fesm2015/esfaenza-parameters.mjs",
27
+ "es2020": "fesm2020/esfaenza-parameters.mjs",
28
+ "esm2020": "esm2020/esfaenza-parameters.mjs",
29
+ "fesm2020": "fesm2020/esfaenza-parameters.mjs",
30
+ "fesm2015": "fesm2015/esfaenza-parameters.mjs",
31
31
  "typings": "esfaenza-parameters.d.ts",
32
- "metadata": "esfaenza-parameters.metadata.json",
32
+ "exports": {
33
+ "./package.json": {
34
+ "default": "./package.json"
35
+ },
36
+ ".": {
37
+ "types": "./esfaenza-parameters.d.ts",
38
+ "esm2020": "./esm2020/esfaenza-parameters.mjs",
39
+ "es2020": "./fesm2020/esfaenza-parameters.mjs",
40
+ "es2015": "./fesm2015/esfaenza-parameters.mjs",
41
+ "node": "./fesm2015/esfaenza-parameters.mjs",
42
+ "default": "./fesm2020/esfaenza-parameters.mjs"
43
+ }
44
+ },
33
45
  "sideEffects": false
34
46
  }