@eqproject/eqp-dynamic-module 0.0.4 → 0.0.5

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.
Files changed (85) hide show
  1. package/README.md +43 -24
  2. package/bundles/eqproject-eqp-dynamic-module.umd.js +871 -226
  3. package/bundles/eqproject-eqp-dynamic-module.umd.js.map +1 -1
  4. package/bundles/eqproject-eqp-dynamic-module.umd.min.js +2 -2
  5. package/bundles/eqproject-eqp-dynamic-module.umd.min.js.map +1 -1
  6. package/eqproject-eqp-dynamic-module.d.ts +2 -1
  7. package/eqproject-eqp-dynamic-module.metadata.json +1 -1
  8. package/esm2015/eqproject-eqp-dynamic-module.js +3 -2
  9. package/esm2015/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +198 -22
  10. package/esm2015/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +124 -9
  11. package/esm2015/lib/components/private/add-form-field/add-form-field.component.js +64 -12
  12. package/esm2015/lib/components/private/dynamic-module-field/dynamic-module-field.component.js +2 -2
  13. package/esm2015/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.js +2 -2
  14. package/esm2015/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.js +2 -2
  15. package/esm2015/lib/components/private/field-templates/date-field-template/date-field-template.component.js +2 -2
  16. package/esm2015/lib/components/private/field-templates/image-field-template/image-field-template.component.js +2 -2
  17. package/esm2015/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.js +21 -24
  18. package/esm2015/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.js +10 -2
  19. package/esm2015/lib/components/private/field-templates/text-field-template/text-field-template.component.js +18 -2
  20. package/esm2015/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +2 -2
  21. package/esm2015/lib/components/private/form-records/add-form-record/add-form-record.component.js +2 -2
  22. package/esm2015/lib/components/private/form-records/list-form-record/list-form-record.component.js +2 -18
  23. package/esm2015/lib/components/private/spinner/spinner.component.js +23 -0
  24. package/esm2015/lib/eqp-dynamic-module.module.js +3 -1
  25. package/esm2015/lib/models/endPointConfiguration.model.js +23 -0
  26. package/esm2015/lib/models/fields/dateField.model.js +1 -1
  27. package/esm2015/lib/models/fields/listValueField.model.js +3 -1
  28. package/esm2015/lib/models/fields/numericField.model.js +1 -1
  29. package/esm2015/lib/models/fields/textField.model.js +10 -1
  30. package/esm2015/lib/models/form.model.js +1 -1
  31. package/esm2015/lib/models/record.model.js +6 -1
  32. package/esm2015/lib/services/eqp-dynamic-module-dialog.service.js +10 -1
  33. package/esm2015/lib/services/spinner.service.js +43 -0
  34. package/esm2015/lib/services/utilityHelper.services.js +180 -13
  35. package/esm2015/public-api.js +3 -1
  36. package/esm5/eqproject-eqp-dynamic-module.js +3 -2
  37. package/esm5/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +204 -22
  38. package/esm5/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +126 -8
  39. package/esm5/lib/components/private/add-form-field/add-form-field.component.js +64 -12
  40. package/esm5/lib/components/private/dynamic-module-field/dynamic-module-field.component.js +2 -2
  41. package/esm5/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.js +2 -2
  42. package/esm5/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.js +2 -2
  43. package/esm5/lib/components/private/field-templates/date-field-template/date-field-template.component.js +2 -2
  44. package/esm5/lib/components/private/field-templates/image-field-template/image-field-template.component.js +2 -2
  45. package/esm5/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.js +22 -24
  46. package/esm5/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.js +10 -2
  47. package/esm5/lib/components/private/field-templates/text-field-template/text-field-template.component.js +18 -2
  48. package/esm5/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +2 -2
  49. package/esm5/lib/components/private/form-records/add-form-record/add-form-record.component.js +2 -2
  50. package/esm5/lib/components/private/form-records/list-form-record/list-form-record.component.js +2 -18
  51. package/esm5/lib/components/private/spinner/spinner.component.js +24 -0
  52. package/esm5/lib/eqp-dynamic-module.module.js +3 -1
  53. package/esm5/lib/models/endPointConfiguration.model.js +33 -0
  54. package/esm5/lib/models/fields/dateField.model.js +1 -1
  55. package/esm5/lib/models/fields/listValueField.model.js +7 -1
  56. package/esm5/lib/models/fields/numericField.model.js +1 -1
  57. package/esm5/lib/models/fields/textField.model.js +10 -1
  58. package/esm5/lib/models/form.model.js +1 -1
  59. package/esm5/lib/models/record.model.js +8 -1
  60. package/esm5/lib/services/eqp-dynamic-module-dialog.service.js +11 -1
  61. package/esm5/lib/services/spinner.service.js +46 -0
  62. package/esm5/lib/services/utilityHelper.services.js +182 -11
  63. package/esm5/public-api.js +3 -1
  64. package/fesm2015/eqproject-eqp-dynamic-module.js +820 -212
  65. package/fesm2015/eqproject-eqp-dynamic-module.js.map +1 -1
  66. package/fesm5/eqproject-eqp-dynamic-module.js +864 -226
  67. package/fesm5/eqproject-eqp-dynamic-module.js.map +1 -1
  68. package/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.d.ts +78 -4
  69. package/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.d.ts +51 -2
  70. package/lib/components/private/add-form-field/add-form-field.component.d.ts +29 -4
  71. package/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.d.ts +3 -11
  72. package/lib/components/private/field-templates/text-field-template/text-field-template.component.d.ts +3 -1
  73. package/lib/components/private/spinner/spinner.component.d.ts +9 -0
  74. package/lib/models/endPointConfiguration.model.d.ts +35 -0
  75. package/lib/models/fields/dateField.model.d.ts +1 -0
  76. package/lib/models/fields/listValueField.model.d.ts +17 -0
  77. package/lib/models/fields/numericField.model.d.ts +3 -1
  78. package/lib/models/fields/textField.model.d.ts +9 -1
  79. package/lib/models/form.model.d.ts +1 -0
  80. package/lib/models/record.model.d.ts +8 -0
  81. package/lib/services/eqp-dynamic-module-dialog.service.d.ts +6 -0
  82. package/lib/services/spinner.service.d.ts +15 -0
  83. package/lib/services/utilityHelper.services.d.ts +30 -1
  84. package/package.json +3 -3
  85. package/public-api.d.ts +2 -0
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/checkbox'), require('@angular/material/button'), require('@angular/material/input'), require('@angular/material/autocomplete'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/radio'), require('@angular/material/select'), require('@angular/material/slider'), require('@angular/material/slide-toggle'), require('@angular/material/menu'), require('@angular/material/sidenav'), require('@angular/material/toolbar'), require('@angular/material/list'), require('@angular/material/grid-list'), require('@angular/material/card'), require('@angular/material/stepper'), require('@angular/material/tabs'), require('@angular/material/expansion'), require('@angular/material/button-toggle'), require('@angular/material/chips'), require('@angular/material/icon'), require('@angular/material/progress-spinner'), require('@angular/material/progress-bar'), require('@angular/material/dialog'), require('@angular/material/tooltip'), require('@angular/material/snack-bar'), require('@angular/material/table'), require('@angular/material/sort'), require('@angular/material/paginator'), require('@angular/material/core'), require('@eqproject/eqp-table'), require('@eqproject/eqp-attachments'), require('@eqproject/eqp-select'), require('@eqproject/eqp-datetimepicker'), require('@eqproject/eqp-img-drawing'), require('@eqproject/eqp-filters'), require('@eqproject/eqp-numeric'), require('sweetalert2'), require('@angular/platform-browser')) :
3
- typeof define === 'function' && define.amd ? define('@eqproject/eqp-dynamic-module', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/checkbox', '@angular/material/button', '@angular/material/input', '@angular/material/autocomplete', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/radio', '@angular/material/select', '@angular/material/slider', '@angular/material/slide-toggle', '@angular/material/menu', '@angular/material/sidenav', '@angular/material/toolbar', '@angular/material/list', '@angular/material/grid-list', '@angular/material/card', '@angular/material/stepper', '@angular/material/tabs', '@angular/material/expansion', '@angular/material/button-toggle', '@angular/material/chips', '@angular/material/icon', '@angular/material/progress-spinner', '@angular/material/progress-bar', '@angular/material/dialog', '@angular/material/tooltip', '@angular/material/snack-bar', '@angular/material/table', '@angular/material/sort', '@angular/material/paginator', '@angular/material/core', '@eqproject/eqp-table', '@eqproject/eqp-attachments', '@eqproject/eqp-select', '@eqproject/eqp-datetimepicker', '@eqproject/eqp-img-drawing', '@eqproject/eqp-filters', '@eqproject/eqp-numeric', 'sweetalert2', '@angular/platform-browser'], factory) :
4
- (global = global || self, factory((global.eqproject = global.eqproject || {}, global.eqproject['eqp-dynamic-module'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.checkbox, global.ng.material.button, global.ng.material.input, global.ng.material.autocomplete, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.radio, global.ng.material.select, global.ng.material.slider, global.ng.material.slideToggle, global.ng.material.menu, global.ng.material.sidenav, global.ng.material.toolbar, global.ng.material.list, global.ng.material.gridList, global.ng.material.card, global.ng.material.stepper, global.ng.material.tabs, global.ng.material.expansion, global.ng.material.buttonToggle, global.ng.material.chips, global.ng.material.icon, global.ng.material.progressSpinner, global.ng.material.progressBar, global.ng.material.dialog, global.ng.material.tooltip, global.ng.material.snackBar, global.ng.material.table, global.ng.material.sort, global.ng.material.paginator, global.ng.material.core, global.eqpTable, global.eqpAttachments, global.eqpSelect, global.eqpDatetimepicker, global.eqpImgDrawing, global.eqpFilters, global.eqpNumeric, global.Swal, global.ng.platformBrowser));
5
- }(this, (function (exports, common, core, forms, checkbox, button, input, autocomplete, datepicker, formField, radio, select, slider, slideToggle, menu, sidenav, toolbar, list, gridList, card, stepper, tabs, expansion, buttonToggle, chips, icon, progressSpinner, progressBar, dialog, tooltip, snackBar, table, sort, paginator, core$1, eqpTable, eqpAttachments, eqpSelect, eqpDatetimepicker, eqpImgDrawing, eqpFilters, eqpNumeric, Swal, platformBrowser) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('sweetalert2'), require('@angular/common/http'), require('rxjs'), require('@angular/material/checkbox'), require('@angular/material/button'), require('@angular/material/input'), require('@angular/material/autocomplete'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/radio'), require('@angular/material/select'), require('@angular/material/slider'), require('@angular/material/slide-toggle'), require('@angular/material/menu'), require('@angular/material/sidenav'), require('@angular/material/toolbar'), require('@angular/material/list'), require('@angular/material/grid-list'), require('@angular/material/card'), require('@angular/material/stepper'), require('@angular/material/tabs'), require('@angular/material/expansion'), require('@angular/material/button-toggle'), require('@angular/material/chips'), require('@angular/material/icon'), require('@angular/material/progress-spinner'), require('@angular/material/progress-bar'), require('@angular/material/dialog'), require('@angular/material/tooltip'), require('@angular/material/snack-bar'), require('@angular/material/table'), require('@angular/material/sort'), require('@angular/material/paginator'), require('@angular/material/core'), require('@eqproject/eqp-table'), require('@eqproject/eqp-attachments'), require('@eqproject/eqp-select'), require('@eqproject/eqp-datetimepicker'), require('@eqproject/eqp-img-drawing'), require('@eqproject/eqp-filters'), require('@eqproject/eqp-numeric'), require('@angular/platform-browser')) :
3
+ typeof define === 'function' && define.amd ? define('@eqproject/eqp-dynamic-module', ['exports', '@angular/common', '@angular/core', '@angular/forms', 'sweetalert2', '@angular/common/http', 'rxjs', '@angular/material/checkbox', '@angular/material/button', '@angular/material/input', '@angular/material/autocomplete', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/radio', '@angular/material/select', '@angular/material/slider', '@angular/material/slide-toggle', '@angular/material/menu', '@angular/material/sidenav', '@angular/material/toolbar', '@angular/material/list', '@angular/material/grid-list', '@angular/material/card', '@angular/material/stepper', '@angular/material/tabs', '@angular/material/expansion', '@angular/material/button-toggle', '@angular/material/chips', '@angular/material/icon', '@angular/material/progress-spinner', '@angular/material/progress-bar', '@angular/material/dialog', '@angular/material/tooltip', '@angular/material/snack-bar', '@angular/material/table', '@angular/material/sort', '@angular/material/paginator', '@angular/material/core', '@eqproject/eqp-table', '@eqproject/eqp-attachments', '@eqproject/eqp-select', '@eqproject/eqp-datetimepicker', '@eqproject/eqp-img-drawing', '@eqproject/eqp-filters', '@eqproject/eqp-numeric', '@angular/platform-browser'], factory) :
4
+ (global = global || self, factory((global.eqproject = global.eqproject || {}, global.eqproject['eqp-dynamic-module'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.Swal, global.ng.common.http, global.rxjs, global.ng.material.checkbox, global.ng.material.button, global.ng.material.input, global.ng.material.autocomplete, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.radio, global.ng.material.select, global.ng.material.slider, global.ng.material.slideToggle, global.ng.material.menu, global.ng.material.sidenav, global.ng.material.toolbar, global.ng.material.list, global.ng.material.gridList, global.ng.material.card, global.ng.material.stepper, global.ng.material.tabs, global.ng.material.expansion, global.ng.material.buttonToggle, global.ng.material.chips, global.ng.material.icon, global.ng.material.progressSpinner, global.ng.material.progressBar, global.ng.material.dialog, global.ng.material.tooltip, global.ng.material.snackBar, global.ng.material.table, global.ng.material.sort, global.ng.material.paginator, global.ng.material.core, global.eqpTable, global.eqpAttachments, global.eqpSelect, global.eqpDatetimepicker, global.eqpImgDrawing, global.eqpFilters, global.eqpNumeric, global.ng.platformBrowser));
5
+ }(this, (function (exports, common, core, forms, Swal, http, rxjs, checkbox, button, input, autocomplete, datepicker, formField, radio, select, slider, slideToggle, menu, sidenav, toolbar, list, gridList, card, stepper, tabs, expansion, buttonToggle, chips, icon, progressSpinner, progressBar, dialog, tooltip, snackBar, table, sort, paginator, core$1, eqpTable, eqpAttachments, eqpSelect, eqpDatetimepicker, eqpImgDrawing, eqpFilters, eqpNumeric, platformBrowser) { 'use strict';
6
6
 
7
7
  Swal = Swal && Object.prototype.hasOwnProperty.call(Swal, 'default') ? Swal['default'] : Swal;
8
8
 
@@ -237,6 +237,36 @@
237
237
  return ContextUser;
238
238
  }());
239
239
 
240
+ var EndPointConfiguration = /** @class */ (function () {
241
+ function EndPointConfiguration() {
242
+ }
243
+ return EndPointConfiguration;
244
+ }());
245
+ var EndPointData = /** @class */ (function () {
246
+ function EndPointData() {
247
+ }
248
+ return EndPointData;
249
+ }());
250
+ var EndPointDataParams = /** @class */ (function () {
251
+ function EndPointDataParams() {
252
+ this.ParamValue = null;
253
+ }
254
+ return EndPointDataParams;
255
+ }());
256
+
257
+ (function (ParamTypeEnum) {
258
+ ParamTypeEnum[ParamTypeEnum["Query param"] = 1] = "Query param";
259
+ ParamTypeEnum[ParamTypeEnum["In route"] = 2] = "In route";
260
+ ParamTypeEnum[ParamTypeEnum["In Body"] = 3] = "In Body";
261
+ })(exports.ParamTypeEnum || (exports.ParamTypeEnum = {}));
262
+
263
+ (function (RequestMethodEnum) {
264
+ RequestMethodEnum["GET"] = "GET";
265
+ RequestMethodEnum["POST"] = "POST";
266
+ RequestMethodEnum["PUT"] = "PUT";
267
+ RequestMethodEnum["DELETE"] = "DELETE";
268
+ })(exports.RequestMethodEnum || (exports.RequestMethodEnum = {}));
269
+
240
270
  /**
241
271
  * Classe base che implementa la valorizzazione dell'ID (se null) con una nuova GUID
242
272
  * in creazione dell'oggetto.
@@ -283,6 +313,136 @@
283
313
  FormScalarTypeEnum[FormScalarTypeEnum["In accordion"] = 4] = "In accordion"; //GROUPED_BY_ACCORDION
284
314
  })(exports.FormScalarTypeEnum || (exports.FormScalarTypeEnum = {}));
285
315
 
316
+ var Record = /** @class */ (function () {
317
+ function Record() {
318
+ }
319
+ return Record;
320
+ }());
321
+ var DynRecord = /** @class */ (function () {
322
+ function DynRecord() {
323
+ this.Values = {};
324
+ }
325
+ return DynRecord;
326
+ }());
327
+
328
+ var EqpDynamicModuleDialogService = /** @class */ (function () {
329
+ function EqpDynamicModuleDialogService() {
330
+ }
331
+ /**
332
+ * Mostra uno sweet alert di tipo SUCCESS con il messaggio passato come parametro.
333
+ * @param message Messaggio da mostrare nello sweetalert
334
+ * @param title Titolo dello sweetalert (di default mostra 'Operazione completata')
335
+ */
336
+ EqpDynamicModuleDialogService.Success = function (message, title) {
337
+ if (title === void 0) { title = null; }
338
+ var currentTitle = title != null ? title : 'Operazione completata con successo.';
339
+ Swal.fire(currentTitle, message, 'success');
340
+ };
341
+ /**
342
+ * Mostra uno sweet alert di tipo ERROR con il messaggio passato come parametro.
343
+ * @param message Messaggio d'errore da mostrare nello sweetalert
344
+ * @param title Titolo dello sweetalert (di default mostra 'Errore')
345
+ */
346
+ EqpDynamicModuleDialogService.Error = function (message, title) {
347
+ if (title === void 0) { title = null; }
348
+ var currentTitle = title != null ? title : 'Errore';
349
+ if (Array.isArray(message)) {
350
+ currentTitle = title != null ? title : 'Errore';
351
+ var htmlErrors = message.join("<br>");
352
+ Swal.fire({
353
+ title: currentTitle,
354
+ html: htmlErrors,
355
+ icon: 'error'
356
+ });
357
+ }
358
+ else {
359
+ Swal.fire(currentTitle, message, 'error');
360
+ }
361
+ };
362
+ /**
363
+ * Mostra uno sweetalert di tipo CONFIRM con il messaggio passato come parametro e se viene premuto
364
+ * CONFERMA lancia la funzione di callback passata come parametro
365
+ * @param message Messaggio da mostrare nello sweetalert
366
+ * @param title Titolo dello sweetalert (di default mostra 'Info')
367
+ */
368
+ EqpDynamicModuleDialogService.Confirm = function (message, confirmCallback, isWarning, title, customWidth) {
369
+ if (isWarning === void 0) { isWarning = false; }
370
+ if (title === void 0) { title = null; }
371
+ if (customWidth === void 0) { customWidth = null; }
372
+ var currentTitle = title != null ? title : 'Sei sicuro di voler procedere?';
373
+ if (Array.isArray(message)) {
374
+ var htmlErrors = message.join("<br>");
375
+ Swal.fire({
376
+ title: currentTitle,
377
+ html: htmlErrors,
378
+ width: customWidth ? customWidth : '32rem',
379
+ icon: !isWarning ? 'question' : 'warning',
380
+ showCancelButton: true,
381
+ allowOutsideClick: false,
382
+ allowEscapeKey: false
383
+ }).then(function (result) {
384
+ if (result.value && confirmCallback) {
385
+ confirmCallback();
386
+ }
387
+ });
388
+ }
389
+ else {
390
+ Swal.fire({
391
+ title: currentTitle,
392
+ text: message,
393
+ width: customWidth ? customWidth : '32rem',
394
+ icon: !isWarning ? 'question' : 'warning',
395
+ showCancelButton: true,
396
+ allowOutsideClick: false,
397
+ allowEscapeKey: false
398
+ }).then(function (result) {
399
+ if (result.value && confirmCallback) {
400
+ confirmCallback();
401
+ }
402
+ });
403
+ }
404
+ };
405
+ /**
406
+ * Mostra uno sweetalert di tipo INFO con il messaggio passato come parametro
407
+ * @param message Messaggio da mostrare nello sweetalert
408
+ * @param title Titolo dello sweetalert (di default mostra 'Info')
409
+ */
410
+ EqpDynamicModuleDialogService.Info = function (message, title, isToast) {
411
+ if (title === void 0) { title = null; }
412
+ if (isToast === void 0) { isToast = null; }
413
+ var currentTitle = title != null ? title : "Informazione:";
414
+ Swal.fire(currentTitle, message, 'info');
415
+ };
416
+ /**
417
+ * Mostra uno sweetalert di tipo WARNING con il messaggio passato come parametro
418
+ * @param message Messaggio da mostrare nello sweetalert
419
+ * @param title Titolo dello sweetalert (di default mostra 'Attenzione!')
420
+ */
421
+ EqpDynamicModuleDialogService.Warning = function (message, title, isToast) {
422
+ if (title === void 0) { title = null; }
423
+ if (isToast === void 0) { isToast = null; }
424
+ var currentTitle = title != null ? title : "Attenzione!";
425
+ if (Array.isArray(message)) {
426
+ var htmlWarnings = message.join("<br>");
427
+ Swal.fire({
428
+ title: currentTitle,
429
+ html: htmlWarnings,
430
+ icon: 'warning'
431
+ });
432
+ }
433
+ else {
434
+ Swal.fire(currentTitle, message, 'warning');
435
+ }
436
+ };
437
+ EqpDynamicModuleDialogService.ɵprov = core.ɵɵdefineInjectable({ factory: function EqpDynamicModuleDialogService_Factory() { return new EqpDynamicModuleDialogService(); }, token: EqpDynamicModuleDialogService, providedIn: "root" });
438
+ EqpDynamicModuleDialogService = __decorate([
439
+ core.Injectable({
440
+ providedIn: 'root'
441
+ })
442
+ ], EqpDynamicModuleDialogService);
443
+ return EqpDynamicModuleDialogService;
444
+ }());
445
+
286
446
  /**
287
447
  * Contiene le informazioni di base del campo, indipendentemente dal tipo.
288
448
  * Questa classe è volutamente astratta perché il tipo di campo è dettato dal tipo
@@ -323,6 +483,24 @@
323
483
  ColSpanSizesEnum[ColSpanSizesEnum["col-lg-12"] = 12] = "col-lg-12";
324
484
  })(exports.ColSpanSizesEnum || (exports.ColSpanSizesEnum = {}));
325
485
 
486
+ /**Campo di testo */
487
+ var TextField = /** @class */ (function (_super) {
488
+ __extends(TextField, _super);
489
+ function TextField() {
490
+ return _super !== null && _super.apply(this, arguments) || this;
491
+ }
492
+ return TextField;
493
+ }(BaseField));
494
+
495
+ (function (TextMaskEnum) {
496
+ TextMaskEnum[TextMaskEnum["Password"] = 1] = "Password";
497
+ TextMaskEnum[TextMaskEnum["Email"] = 2] = "Email";
498
+ TextMaskEnum[TextMaskEnum["Telefono"] = 3] = "Telefono";
499
+ TextMaskEnum[TextMaskEnum["Url"] = 4] = "Url";
500
+ })(exports.TextMaskEnum || (exports.TextMaskEnum = {}));
501
+ var UrlRegex = '(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?';
502
+ var TelRegex = '([+]?[0-9]{10,14})';
503
+
326
504
  var ArrayValidators = /** @class */ (function () {
327
505
  function ArrayValidators() {
328
506
  }
@@ -345,18 +523,73 @@
345
523
  return ArrayValidators;
346
524
  }());
347
525
 
526
+ var SpinnerService = /** @class */ (function () {
527
+ function SpinnerService() {
528
+ this.isLoading = new rxjs.Subject();
529
+ this.requestsCount = 0;
530
+ }
531
+ /**
532
+ * Mostra lo spinner
533
+ */
534
+ SpinnerService.prototype.show = function () {
535
+ var _this = this;
536
+ setTimeout(function () {
537
+ _this.isLoading.next(true);
538
+ }, 100);
539
+ };
540
+ /**
541
+ * Nasconde lo spinner
542
+ */
543
+ SpinnerService.prototype.hide = function () {
544
+ var _this = this;
545
+ setTimeout(function () {
546
+ _this.isLoading.next(false);
547
+ }, 100);
548
+ };
549
+ SpinnerService.prototype.addRequestCounter = function () {
550
+ this.requestsCount++;
551
+ this.show();
552
+ };
553
+ SpinnerService.prototype.removeRequestCounter = function () {
554
+ this.requestsCount--;
555
+ if (this.requestsCount == 0)
556
+ this.hide();
557
+ };
558
+ SpinnerService.ɵprov = core.ɵɵdefineInjectable({ factory: function SpinnerService_Factory() { return new SpinnerService(); }, token: SpinnerService, providedIn: "root" });
559
+ SpinnerService = __decorate([
560
+ core.Injectable({
561
+ providedIn: 'root'
562
+ })
563
+ ], SpinnerService);
564
+ return SpinnerService;
565
+ }());
566
+
348
567
  var UtilityHelperService = /** @class */ (function () {
349
- function UtilityHelperService(formBuilder) {
568
+ function UtilityHelperService(formBuilder, http, spinnerService) {
350
569
  this.formBuilder = formBuilder;
570
+ this.http = http;
571
+ this.spinnerService = spinnerService;
351
572
  }
352
573
  UtilityHelperService_1 = UtilityHelperService;
353
574
  UtilityHelperService.EvaluateFieldFormula = function (formula, rec, ctx) {
354
- var evaluatedValue = eval(formula.replace('"', '\"'));
575
+ var evaluatedValue = eval(formula);
355
576
  return (evaluatedValue ? evaluatedValue : null);
356
577
  };
357
578
  UtilityHelperService.SetContext = function (ctx) {
358
579
  this.context = ctx;
359
580
  };
581
+ UtilityHelperService.GetFieldType = function (field) {
582
+ switch (field.FieldType) {
583
+ case exports.FieldTypeEnum["Campo di testo"]: {
584
+ var t = Object.assign(new TextField, field);
585
+ return t;
586
+ break;
587
+ }
588
+ default: {
589
+ break;
590
+ }
591
+ }
592
+ };
360
593
  /**
361
594
  * Metodo per impostare i valori da suggerire nell'autocomplete per i campi in cui l'utente deve scrivere comandi javascript.
362
595
  * In base all'ultimo carattere digitato viene impostato un elenco di oggetti o proprietà che l'utente ha a disposizione in quel momento.
@@ -404,7 +637,7 @@
404
637
  // funzione javascript. Controllo la parola che l'utente sta digitando e se fa parte di uno degli oggetti a disposizione
405
638
  // o una proprietà di essi allora suggerisco i possibili match.
406
639
  else {
407
- var availableOptions = [];
640
+ var availableOptions_1 = [];
408
641
  // Prendo tutti i blocchi di caratteri digitati dall'utente
409
642
  var allFormulaWords = typedFormula.split(" ");
410
643
  // Prendo l'ultimo blocco di caratteri digitato dall'utente
@@ -413,7 +646,7 @@
413
646
  // sui "." e imposto i suggerimenti in base al path della prorpietà che si sta digitando.
414
647
  if (!new RegExp("[^0-9a-zA-Z_.]").test(lastTypedString)) {
415
648
  var propertyPath = lastTypedString.split(".");
416
- var lastTypedWork = propertyPath[propertyPath.length - 1];
649
+ var lastTypedWork_1 = propertyPath[propertyPath.length - 1];
417
650
  var propertiesToCheck = [];
418
651
  if (propertyPath.length == 1) {
419
652
  propertiesToCheck = ["rec", "ctx"];
@@ -427,15 +660,15 @@
427
660
  else if (propertyPath.length > 1 && propertyPath[propertyPath.length - 2] === "rec") {
428
661
  propertiesToCheck = availableRecProperties;
429
662
  }
430
- // Eseguo il controllo sulle proprietà recuperate, aggiungo ai suggerimenti tutti i nomi che iniziano con
663
+ // Eseguo il controllo sulle proprietà recuperate, aggiungo ai suggerimenti tutti i nomi che iniziano con
431
664
  // quello che sta digitando l'utente.
432
665
  propertiesToCheck.forEach(function (prop) {
433
- if (prop.startsWith(lastTypedWork)) {
434
- availableOptions.push({ label: prop, value: typedFormula + prop.substring(lastTypedWork.length, prop.length) });
666
+ if (prop.startsWith(lastTypedWork_1)) {
667
+ availableOptions_1.push({ label: prop, value: typedFormula + prop.substring(lastTypedWork_1.length, prop.length) });
435
668
  }
436
669
  });
437
670
  }
438
- autocompleteOptions = availableOptions;
671
+ autocompleteOptions = availableOptions_1;
439
672
  }
440
673
  return autocompleteOptions;
441
674
  };
@@ -525,6 +758,17 @@
525
758
  if (field.MinLenght) {
526
759
  validators.push(forms.Validators.minLength(field.MinLenght));
527
760
  }
761
+ switch (field.TextMask) {
762
+ case exports.TextMaskEnum.Url:
763
+ validators.push(forms.Validators.pattern(UrlRegex));
764
+ break;
765
+ case exports.TextMaskEnum.Email:
766
+ validators.push(forms.Validators.email);
767
+ break;
768
+ case exports.TextMaskEnum.Telefono:
769
+ validators.push(forms.Validators.pattern(TelRegex));
770
+ break;
771
+ }
528
772
  break;
529
773
  case exports.FieldTypeEnum["Area di testo"]:
530
774
  if (field.MaxLenght) {
@@ -547,12 +791,151 @@
547
791
  }
548
792
  return new forms.FormControl(record[field.Name], validators);
549
793
  };
794
+ /**
795
+ * Metodo per configurare gli endpoint da usare di default a partire dall'url base del server
796
+ * a cui si deve connettere e al token da passare per autenticarsi.
797
+ * @param baseServerUrl Stringa dell'url base del server (es: "http://localhost:5000").
798
+ * @param userToken Token dell'utente loggato da usare per autenticarsi se necessario.
799
+ * @returns Resituisce la configurazione completa degli endPoint da usare di default.
800
+ */
801
+ UtilityHelperService.prototype.ConfigureDefaultEndPoints = function (baseServerUrl, userToken) {
802
+ var endPointConfiguration = new EndPointConfiguration();
803
+ endPointConfiguration = new EndPointConfiguration();
804
+ endPointConfiguration.Records = {
805
+ GetByFormIDEndPoint: {
806
+ Url: baseServerUrl + "/api/v1/getall",
807
+ Token: userToken,
808
+ RequestMethod: exports.RequestMethodEnum.GET,
809
+ },
810
+ GetByIDEndPoint: {
811
+ Url: baseServerUrl + "/api/v1/getByID",
812
+ Token: userToken,
813
+ RequestMethod: exports.RequestMethodEnum.GET,
814
+ },
815
+ SaveEndPoint: {
816
+ Url: baseServerUrl + "/api/v1/save",
817
+ Token: userToken,
818
+ RequestMethod: exports.RequestMethodEnum.POST,
819
+ },
820
+ DuplicateEndPoint: {
821
+ Url: baseServerUrl + "/api/v1/duplicate",
822
+ Token: userToken,
823
+ RequestMethod: exports.RequestMethodEnum.POST,
824
+ },
825
+ DeleteEndPoint: {
826
+ Url: baseServerUrl + "/api/v1/delete",
827
+ Token: userToken,
828
+ RequestMethod: exports.RequestMethodEnum.DELETE,
829
+ }
830
+ };
831
+ endPointConfiguration.Forms = {
832
+ GetByIDEndPoint: {
833
+ Url: baseServerUrl + "/api/conf/form",
834
+ Token: userToken,
835
+ RequestMethod: exports.RequestMethodEnum.GET,
836
+ },
837
+ SaveEndPoint: {
838
+ Url: baseServerUrl + "/api/conf/form",
839
+ Token: userToken,
840
+ RequestMethod: exports.RequestMethodEnum.POST,
841
+ }
842
+ };
843
+ return endPointConfiguration;
844
+ };
845
+ /**
846
+ * Metodo che data la configurazione di un endpoint costruisce l'url da chiamare, gli eventuali parametri
847
+ * da passare (nel body o nella rotta) ed effettua la chiamata. Al termine della chiamata esegue le eventuali
848
+ * funzioni di callback (sia in caso di successo che in caso di errore) passate in input.
849
+ * @param endPointData Cofigurazione dell'endpoint da chiamare.
850
+ * @param dynamicModuleParams Array dei parametri aggiunti dal modulo dinamico a quelli già configurati
851
+ * (ad esempio il record o la form da salvare oppure l'ID per recuperare una particolare entità).
852
+ * @param callback Metodo da eseguire in caso di successo dopo la chiamata http.
853
+ * NOTA: in input viene passata la risposta della chiamata stessa.
854
+ * @param errorCallBack Metodo da eseguire in caso di errore dopo la chiamata http.
855
+ * NOTA: in input viene passato l'errore generato della chiamata stessa.
856
+ */
857
+ UtilityHelperService.prototype.RunEndPointCall = function (endPointData, dynamicModuleParams, callback, errorCallBack) {
858
+ var _this = this;
859
+ if (dynamicModuleParams === void 0) { dynamicModuleParams = null; }
860
+ if (callback === void 0) { callback = null; }
861
+ if (errorCallBack === void 0) { errorCallBack = null; }
862
+ this.spinnerService.addRequestCounter();
863
+ var url = "" + endPointData.Url;
864
+ var queryParams = null;
865
+ var bodyParams = {
866
+ AdditionalParams: {}
867
+ };
868
+ // Se nella configurazione sono stati definiti parametri da aggiungere alla chiamata questi vengono ciclati
869
+ // e aggiunti nel punto in cui devono essere usati.
870
+ if (endPointData.Params) {
871
+ endPointData.Params.forEach(function (p) {
872
+ switch (p.ParamType) {
873
+ case exports.ParamTypeEnum['Query param']: {
874
+ var stringParam = p.ParamName + "=" + p.ParamValue;
875
+ queryParams = (queryParams == null ? "" : queryParams + "&") + stringParam;
876
+ break;
877
+ }
878
+ case exports.ParamTypeEnum['In route']: {
879
+ url = url + (url.endsWith("/") ? "" : "/") + p.ParamValue;
880
+ break;
881
+ }
882
+ case exports.ParamTypeEnum['In Body']: {
883
+ bodyParams.AdditionalParams[p.ParamName] = p.ParamValue;
884
+ break;
885
+ }
886
+ }
887
+ });
888
+ }
889
+ // Se sono stati passati parametri da aggiungere alla chiamata definiti all'interno del modulo dinamico
890
+ // vengono ciclati e aggiunti nel punto in cui devono essere usati dopo quelli definiti nella configurazione.
891
+ if (dynamicModuleParams) {
892
+ dynamicModuleParams.forEach(function (p) {
893
+ switch (p.ParamType) {
894
+ case exports.ParamTypeEnum['Query param']: {
895
+ var stringParam = p.ParamName + "=" + p.ParamValue;
896
+ queryParams = (queryParams == null ? "" : queryParams + "&") + stringParam;
897
+ break;
898
+ }
899
+ case exports.ParamTypeEnum['In route']: {
900
+ url = url + (url.endsWith("/") ? "" : "/") + p.ParamValue;
901
+ break;
902
+ }
903
+ case exports.ParamTypeEnum['In Body']: {
904
+ bodyParams[p.ParamName] = p.ParamValue;
905
+ break;
906
+ }
907
+ }
908
+ });
909
+ }
910
+ if (queryParams != null) {
911
+ url = (url.endsWith("/") ? url.substring(0, url.length - 1) : url) + "?" + queryParams;
912
+ }
913
+ this.http.request(endPointData.RequestMethod, url, {
914
+ headers: endPointData.Token ? { Authorization: endPointData.Token } : null,
915
+ body: ![exports.RequestMethodEnum.DELETE, exports.RequestMethodEnum.GET].includes(endPointData.RequestMethod) ? bodyParams : null
916
+ })
917
+ .subscribe(function (res) {
918
+ _this.spinnerService.removeRequestCounter();
919
+ if (callback) {
920
+ callback(res);
921
+ }
922
+ }, function (error) {
923
+ _this.spinnerService.removeRequestCounter();
924
+ if (errorCallBack) {
925
+ errorCallBack(error);
926
+ }
927
+ EqpDynamicModuleDialogService.Error(error.message);
928
+ throw new Error(error.message);
929
+ });
930
+ };
550
931
  var UtilityHelperService_1;
551
932
  UtilityHelperService.context = new Context();
552
933
  UtilityHelperService.ctorParameters = function () { return [
553
- { type: forms.FormBuilder }
934
+ { type: forms.FormBuilder },
935
+ { type: http.HttpClient },
936
+ { type: SpinnerService }
554
937
  ]; };
555
- UtilityHelperService.ɵprov = core.ɵɵdefineInjectable({ factory: function UtilityHelperService_Factory() { return new UtilityHelperService(core.ɵɵinject(forms.FormBuilder)); }, token: UtilityHelperService, providedIn: "root" });
938
+ UtilityHelperService.ɵprov = core.ɵɵdefineInjectable({ factory: function UtilityHelperService_Factory() { return new UtilityHelperService(core.ɵɵinject(forms.FormBuilder), core.ɵɵinject(http.HttpClient), core.ɵɵinject(SpinnerService)); }, token: UtilityHelperService, providedIn: "root" });
556
939
  UtilityHelperService = UtilityHelperService_1 = __decorate([
557
940
  core.Injectable({
558
941
  providedIn: 'root'
@@ -562,55 +945,219 @@
562
945
  }());
563
946
 
564
947
  var EqpDynamicModuleComponent = /** @class */ (function () {
565
- function EqpDynamicModuleComponent() {
948
+ function EqpDynamicModuleComponent(utilityHelperService) {
949
+ this.utilityHelperService = utilityHelperService;
566
950
  this.context = new Context();
567
- this.form = new Form();
568
951
  this.showButtons = true;
569
952
  this.showTitle = true;
570
- this.viewMode = exports.FormTypeEnum.LIST;
953
+ /**
954
+ * Url del server da chiamare per recuperare, salvare o eliminare i record.
955
+ * Usato per creare la configurazione di default degli endpoint da chiamare.
956
+ */
957
+ this.baseServerUrl = null;
958
+ /**
959
+ * Token da usare negli endpoint da chiamare per recuperare o salvare i record.
960
+ * Usato solo se viene popolata la proprietà "baseServerUrl".
961
+ */
962
+ this.userToken = null;
963
+ /**
964
+ * Configurazione degli endpoint da chiamare per recuperare o salvare i dati.
965
+ * Può essere definita dall'utente oppure lasciata null, viene popolata con dei
966
+ * valori di default se viene valorizzata la proprietà "baseServerUrl" altrimenti
967
+ * viene lasciata null e non viene eseguita nessuna chiamata al server.
968
+ */
969
+ this.endPointConfiguration = null;
970
+ /**
971
+ * Eventi emessi quando si salva, elimina o duplica un record
972
+ * se non è stato specificato un endpoint da chiamare.
973
+ */
571
974
  this.saveRecord = new core.EventEmitter();
572
975
  this.deleteRecord = new core.EventEmitter();
573
976
  this.duplicateRecord = new core.EventEmitter();
977
+ /**
978
+ * Eventi emessi DOPO aver eseguito una chiamata al server per il salvataggio,
979
+ * l'eliminazione o la duplicazione di un record all'endpoint specificato.
980
+ */
981
+ this.afterSaveRecord = new core.EventEmitter();
982
+ this.afterDeleteRecord = new core.EventEmitter();
983
+ this.afterDuplicateRecord = new core.EventEmitter();
984
+ this.form = new Form();
985
+ this.viewMode = exports.FormTypeEnum.LIST;
574
986
  this.FormTypeEnum = exports.FormTypeEnum;
575
987
  }
576
988
  EqpDynamicModuleComponent.prototype.ngOnInit = function () {
577
989
  UtilityHelperService.SetContext(this.context);
990
+ this.configureDefaultEndPoints();
991
+ this.getFormByID();
578
992
  };
993
+ EqpDynamicModuleComponent.prototype.getFormByID = function () {
994
+ var _this = this;
995
+ var dynamicModuleParams = new Array();
996
+ dynamicModuleParams.push({
997
+ ParamName: "id",
998
+ ParamValue: this.formID,
999
+ ParamType: exports.ParamTypeEnum['Query param']
1000
+ });
1001
+ this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDEndPoint, dynamicModuleParams, function (res) {
1002
+ _this.form = res;
1003
+ _this.getRecordsByFormID();
1004
+ }, function (err) {
1005
+ console.log(err);
1006
+ });
1007
+ };
1008
+ /**
1009
+ * Metodo per configurare gli endpoint da usare di default a partire dall'url base del server
1010
+ * a cui si deve connettere e al token da passare per autenticarsi.
1011
+ * Se la proprietà "baseServerUrl" è null e non sono stati configurati i vari endpoint allora
1012
+ * non viene eseguita nessuna chiamata http per recuperare/salvare i dati.
1013
+ */
1014
+ EqpDynamicModuleComponent.prototype.configureDefaultEndPoints = function () {
1015
+ if (!this.endPointConfiguration && this.baseServerUrl) {
1016
+ this.endPointConfiguration = this.utilityHelperService.ConfigureDefaultEndPoints(this.baseServerUrl, this.userToken);
1017
+ }
1018
+ };
1019
+ /**
1020
+ * Metodo per recuperare tutti i record salvati per una particolare Form.
1021
+ * La chiamata viene effettuata solo se è stato configurato l'endPoint da usare.
1022
+ * La risposta della chiamata deve essere un array di oggetti di tipo "DynRecord"
1023
+ * a partire dai quali vengono ricreati i Record usati nel client.
1024
+ */
1025
+ EqpDynamicModuleComponent.prototype.getRecordsByFormID = function () {
1026
+ var _this = this;
1027
+ if (this.endPointConfiguration && this.endPointConfiguration.Records && this.endPointConfiguration.Records.GetByFormIDEndPoint) {
1028
+ var dynamicModuleParams = [
1029
+ { ParamName: 'EntID', ParamValue: this.form.ID, ParamType: exports.ParamTypeEnum['Query param'] }
1030
+ ];
1031
+ this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Records.GetByFormIDEndPoint, dynamicModuleParams, function (res) {
1032
+ _this.values = new Array();
1033
+ res.forEach(function (r) {
1034
+ var tmpRec = new Record();
1035
+ tmpRec = JSON.parse(r.SerializedValues);
1036
+ tmpRec.ID = r.ID;
1037
+ tmpRec.EntID = r.EntID;
1038
+ _this.values.push(tmpRec);
1039
+ });
1040
+ });
1041
+ }
1042
+ };
1043
+ /**
1044
+ * Metodo invocato quando si vuole aggiungere, visualizzare o modificare un record.
1045
+ * Se l'evento è null vuol dire che stiamo aggiungendo un nuovo record altrimenti siamo in modifica
1046
+ * o visualizzazione. In questi ultimi due casi, se è stato configurato un endpoint per il recupero
1047
+ * del record completo allora viene effettuata una chiamata al server, altrimenti viene usato l'oggetto selezionato.
1048
+ * @param event Oggetto con due proprietà:
1049
+ * "record" = oggetto da modificare/visualizzare,
1050
+ * "onlyView" = booleano (se TRUE siamo in visualizzazione altrimenti in modifica)
1051
+ */
579
1052
  EqpDynamicModuleComponent.prototype.onAddViewEditRecord = function (event) {
1053
+ var _this = this;
580
1054
  if (event != null) {
581
- this.selectedRecord = JSON.parse(JSON.stringify(event.record));
582
1055
  this.onlyView = event.onlyView;
1056
+ if (this.endPointConfiguration && this.endPointConfiguration.Records && this.endPointConfiguration.Records.GetByIDEndPoint) {
1057
+ var dynamicModuleParams = [
1058
+ { ParamName: "id", ParamValue: event.record.ID, ParamType: exports.ParamTypeEnum['Query param'] }
1059
+ ];
1060
+ this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Records.GetByIDEndPoint, dynamicModuleParams, function (res) {
1061
+ _this.selectedRecord = JSON.parse(res.SerializedValues);
1062
+ _this.selectedRecord.ID = res.ID;
1063
+ _this.selectedRecord.EntID = res.EntID;
1064
+ _this.viewMode = exports.FormTypeEnum.SCALAR;
1065
+ });
1066
+ }
1067
+ else {
1068
+ this.selectedRecord = JSON.parse(JSON.stringify(event.record));
1069
+ this.viewMode = exports.FormTypeEnum.SCALAR;
1070
+ }
583
1071
  }
584
1072
  else {
585
1073
  this.selectedRecord = null;
586
1074
  this.onlyView = false;
1075
+ this.viewMode = exports.FormTypeEnum.SCALAR;
1076
+ }
1077
+ };
1078
+ /**
1079
+ * Metodo per salvare il record aggiunto o modificato.
1080
+ * Se è stato configurato un endPoint per il salvataggio viene effettuata una chiamata al server passando l'oggeto da salvare
1081
+ * nel body della chiamata, altrimenti scatena l'evento "saveRecord".
1082
+ * @param event Oggetto di tipo Record da salvare.
1083
+ */
1084
+ EqpDynamicModuleComponent.prototype.onSaveRecord = function (event) {
1085
+ var _this = this;
1086
+ var _a;
1087
+ if (event != null && this.endPointConfiguration != null && this.endPointConfiguration.Records.SaveEndPoint) {
1088
+ var dynRec = new DynRecord();
1089
+ dynRec.ID = (_a = event.ID, (_a !== null && _a !== void 0 ? _a : null));
1090
+ dynRec.EntID = this.form.ID;
1091
+ dynRec.Values = (event !== null && event !== void 0 ? event : null);
1092
+ var dynamicModuleParams = [
1093
+ { ParamName: "Record", ParamValue: dynRec, ParamType: exports.ParamTypeEnum['In Body'] }
1094
+ ];
1095
+ this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Records.SaveEndPoint, dynamicModuleParams, function (res) {
1096
+ _this.getRecordsByFormID();
1097
+ _this.afterSaveRecord.emit(event);
1098
+ _this.viewMode = exports.FormTypeEnum.LIST;
1099
+ });
1100
+ }
1101
+ else {
1102
+ this.saveRecord.emit(event);
1103
+ this.viewMode = exports.FormTypeEnum.LIST;
587
1104
  }
588
- this.viewMode = exports.FormTypeEnum.SCALAR;
589
- };
590
- EqpDynamicModuleComponent.prototype.onSaveForm = function (event) {
591
- //TODO: Salvare il record!
592
- // if (event != null) {
593
- // if (event.ID && this.values.find(v => v.ID == event.ID)) {
594
- // this.values[this.values.findIndex(v => v.ID == event.ID)] = event;
595
- // } else {
596
- // this.values.push(event);
597
- // }
598
- // }
599
- this.saveRecord.emit(event);
600
- this.viewMode = exports.FormTypeEnum.LIST;
601
1105
  };
1106
+ /**
1107
+ * Metodo per duplicare un record precedentemente salvato.
1108
+ * Se è stato configurato un endPoint per la duplicazione lato server allora effettua una chiamata passando nel body
1109
+ * un oggetto contenente il record da duplicare, altrimenti scatena l'evento di output "duplicateRecord".
1110
+ * @param record Oggetto di tipo Record da duplicare.
1111
+ */
602
1112
  EqpDynamicModuleComponent.prototype.onDuplicateRecord = function (record) {
603
- this.duplicateRecord.emit(record);
1113
+ var _this = this;
1114
+ if (this.endPointConfiguration && this.endPointConfiguration.Records.DuplicateEndPoint) {
1115
+ EqpDynamicModuleDialogService.Confirm('Duplicare il record selezionato?', function () {
1116
+ var dynamicModuleParams = [
1117
+ { ParamName: "id", ParamValue: record.ID, ParamType: exports.ParamTypeEnum['Query param'] }
1118
+ ];
1119
+ _this.utilityHelperService.RunEndPointCall(_this.endPointConfiguration.Records.DuplicateEndPoint, dynamicModuleParams, function (res) {
1120
+ _this.getRecordsByFormID();
1121
+ _this.afterDuplicateRecord.emit(record);
1122
+ });
1123
+ }, false, 'Richiesta conferma');
1124
+ }
1125
+ else {
1126
+ this.duplicateRecord.emit(record);
1127
+ }
604
1128
  };
1129
+ /**
1130
+ * Metodo per eliminare un record.
1131
+ * Se è stato configurato un endPoint per l'eliminazione allora effettua una chiamata passando l'ID del record da eliminare
1132
+ * come query param all'interno della rotta, altrimenti scatena l'evento di output "deleteRecord".
1133
+ * @param record Oggetto di tipo Record da duplicare.
1134
+ */
605
1135
  EqpDynamicModuleComponent.prototype.onDeleteRecord = function (record) {
606
- this.deleteRecord.emit(record);
1136
+ var _this = this;
1137
+ if (this.endPointConfiguration && this.endPointConfiguration.Records.DeleteEndPoint) {
1138
+ EqpDynamicModuleDialogService.Confirm('Eliminare il record selezionato?', function () {
1139
+ var dynamicModuleParams = [
1140
+ { ParamName: "id", ParamValue: record.ID, ParamType: exports.ParamTypeEnum['Query param'] }
1141
+ ];
1142
+ _this.utilityHelperService.RunEndPointCall(_this.endPointConfiguration.Records.DeleteEndPoint, dynamicModuleParams, function (res) {
1143
+ _this.getRecordsByFormID();
1144
+ _this.afterDeleteRecord.emit(record);
1145
+ });
1146
+ }, false, 'Richiesta conferma');
1147
+ }
1148
+ else {
1149
+ this.deleteRecord.emit(record);
1150
+ }
607
1151
  };
1152
+ EqpDynamicModuleComponent.ctorParameters = function () { return [
1153
+ { type: UtilityHelperService }
1154
+ ]; };
608
1155
  __decorate([
609
1156
  core.Input()
610
1157
  ], EqpDynamicModuleComponent.prototype, "context", void 0);
611
1158
  __decorate([
612
1159
  core.Input()
613
- ], EqpDynamicModuleComponent.prototype, "form", void 0);
1160
+ ], EqpDynamicModuleComponent.prototype, "formID", void 0);
614
1161
  __decorate([
615
1162
  core.Input()
616
1163
  ], EqpDynamicModuleComponent.prototype, "values", void 0);
@@ -622,7 +1169,13 @@
622
1169
  ], EqpDynamicModuleComponent.prototype, "showTitle", void 0);
623
1170
  __decorate([
624
1171
  core.Input()
625
- ], EqpDynamicModuleComponent.prototype, "viewMode", void 0);
1172
+ ], EqpDynamicModuleComponent.prototype, "baseServerUrl", void 0);
1173
+ __decorate([
1174
+ core.Input()
1175
+ ], EqpDynamicModuleComponent.prototype, "userToken", void 0);
1176
+ __decorate([
1177
+ core.Input()
1178
+ ], EqpDynamicModuleComponent.prototype, "endPointConfiguration", void 0);
626
1179
  __decorate([
627
1180
  core.Output()
628
1181
  ], EqpDynamicModuleComponent.prototype, "saveRecord", void 0);
@@ -632,10 +1185,19 @@
632
1185
  __decorate([
633
1186
  core.Output()
634
1187
  ], EqpDynamicModuleComponent.prototype, "duplicateRecord", void 0);
1188
+ __decorate([
1189
+ core.Output()
1190
+ ], EqpDynamicModuleComponent.prototype, "afterSaveRecord", void 0);
1191
+ __decorate([
1192
+ core.Output()
1193
+ ], EqpDynamicModuleComponent.prototype, "afterDeleteRecord", void 0);
1194
+ __decorate([
1195
+ core.Output()
1196
+ ], EqpDynamicModuleComponent.prototype, "afterDuplicateRecord", void 0);
635
1197
  EqpDynamicModuleComponent = __decorate([
636
1198
  core.Component({
637
1199
  selector: 'eqp-dynamic-module',
638
- template: "<add-form-record *ngIf=\"viewMode == FormTypeEnum.SCALAR\" [form]=\"form\" [record]=\"selectedRecord\"\r\n [showButtons]=\"showButtons\" [onlyView]=\"onlyView\" (saveRecordEvent)=\"onSaveForm($event)\" [showTitle]=\"showTitle\">\r\n</add-form-record>\r\n\r\n<list-form-record *ngIf=\"viewMode == FormTypeEnum.LIST\" [form]=\"form\" [values]=\"values\"\r\n (onAddViewEditRecord)=\"onAddViewEditRecord($event)\" [showTitle]=\"showTitle\"\r\n (onDeleteRecord)=\"onDeleteRecord($event)\" (onDuplicateRecord)=\"onDuplicateRecord($event)\">\r\n</list-form-record>",
1200
+ template: "<eqp-dynamic-module-spinner></eqp-dynamic-module-spinner>\r\n\r\n<add-form-record *ngIf=\"viewMode == FormTypeEnum.SCALAR\" [form]=\"form\" [record]=\"selectedRecord\"\r\n [showButtons]=\"showButtons\" [onlyView]=\"onlyView\" (saveRecordEvent)=\"onSaveRecord($event)\" [showTitle]=\"showTitle\">\r\n</add-form-record>\r\n\r\n<list-form-record *ngIf=\"viewMode == FormTypeEnum.LIST && values\" [form]=\"form\" [values]=\"values\"\r\n (onAddViewEditRecord)=\"onAddViewEditRecord($event)\" [showTitle]=\"showTitle\"\r\n (onDeleteRecord)=\"onDeleteRecord($event)\" (onDuplicateRecord)=\"onDuplicateRecord($event)\">\r\n</list-form-record>",
639
1201
  styles: ["::ng-deep mat-form-field{width:100%}"]
640
1202
  })
641
1203
  ], EqpDynamicModuleComponent);
@@ -718,134 +1280,83 @@
718
1280
  return MaterialModule;
719
1281
  }());
720
1282
 
721
- var EqpDynamicModuleDialogService = /** @class */ (function () {
722
- function EqpDynamicModuleDialogService() {
723
- }
724
- /**
725
- * Mostra uno sweet alert di tipo ERROR con il messaggio passato come parametro.
726
- * @param message Messaggio d'errore da mostrare nello sweetalert
727
- * @param title Titolo dello sweetalert (di default mostra 'Errore')
728
- */
729
- EqpDynamicModuleDialogService.Error = function (message, title) {
730
- if (title === void 0) { title = null; }
731
- var currentTitle = title != null ? title : 'Errore';
732
- if (Array.isArray(message)) {
733
- currentTitle = title != null ? title : 'Errore';
734
- var htmlErrors = message.join("<br>");
735
- Swal.fire({
736
- title: currentTitle,
737
- html: htmlErrors,
738
- icon: 'error'
739
- });
740
- }
741
- else {
742
- Swal.fire(currentTitle, message, 'error');
743
- }
744
- };
745
- /**
746
- * Mostra uno sweetalert di tipo CONFIRM con il messaggio passato come parametro e se viene premuto
747
- * CONFERMA lancia la funzione di callback passata come parametro
748
- * @param message Messaggio da mostrare nello sweetalert
749
- * @param title Titolo dello sweetalert (di default mostra 'Info')
750
- */
751
- EqpDynamicModuleDialogService.Confirm = function (message, confirmCallback, isWarning, title, customWidth) {
752
- if (isWarning === void 0) { isWarning = false; }
753
- if (title === void 0) { title = null; }
754
- if (customWidth === void 0) { customWidth = null; }
755
- var currentTitle = title != null ? title : 'Sei sicuro di voler procedere?';
756
- if (Array.isArray(message)) {
757
- var htmlErrors = message.join("<br>");
758
- Swal.fire({
759
- title: currentTitle,
760
- html: htmlErrors,
761
- width: customWidth ? customWidth : '32rem',
762
- icon: !isWarning ? 'question' : 'warning',
763
- showCancelButton: true,
764
- allowOutsideClick: false,
765
- allowEscapeKey: false
766
- }).then(function (result) {
767
- if (result.value && confirmCallback) {
768
- confirmCallback();
769
- }
770
- });
771
- }
772
- else {
773
- Swal.fire({
774
- title: currentTitle,
775
- text: message,
776
- width: customWidth ? customWidth : '32rem',
777
- icon: !isWarning ? 'question' : 'warning',
778
- showCancelButton: true,
779
- allowOutsideClick: false,
780
- allowEscapeKey: false
781
- }).then(function (result) {
782
- if (result.value && confirmCallback) {
783
- confirmCallback();
784
- }
785
- });
786
- }
787
- };
788
- /**
789
- * Mostra uno sweetalert di tipo INFO con il messaggio passato come parametro
790
- * @param message Messaggio da mostrare nello sweetalert
791
- * @param title Titolo dello sweetalert (di default mostra 'Info')
792
- */
793
- EqpDynamicModuleDialogService.Info = function (message, title, isToast) {
794
- if (title === void 0) { title = null; }
795
- if (isToast === void 0) { isToast = null; }
796
- var currentTitle = title != null ? title : "Informazione:";
797
- Swal.fire(currentTitle, message, 'info');
798
- };
799
- /**
800
- * Mostra uno sweetalert di tipo WARNING con il messaggio passato come parametro
801
- * @param message Messaggio da mostrare nello sweetalert
802
- * @param title Titolo dello sweetalert (di default mostra 'Attenzione!')
803
- */
804
- EqpDynamicModuleDialogService.Warning = function (message, title, isToast) {
805
- if (title === void 0) { title = null; }
806
- if (isToast === void 0) { isToast = null; }
807
- var currentTitle = title != null ? title : "Attenzione!";
808
- if (Array.isArray(message)) {
809
- var htmlWarnings = message.join("<br>");
810
- Swal.fire({
811
- title: currentTitle,
812
- html: htmlWarnings,
813
- icon: 'warning'
814
- });
815
- }
816
- else {
817
- Swal.fire(currentTitle, message, 'warning');
818
- }
819
- };
820
- EqpDynamicModuleDialogService.ɵprov = core.ɵɵdefineInjectable({ factory: function EqpDynamicModuleDialogService_Factory() { return new EqpDynamicModuleDialogService(); }, token: EqpDynamicModuleDialogService, providedIn: "root" });
821
- EqpDynamicModuleDialogService = __decorate([
822
- core.Injectable({
823
- providedIn: 'root'
824
- })
825
- ], EqpDynamicModuleDialogService);
826
- return EqpDynamicModuleDialogService;
827
- }());
828
-
829
1283
  var EqpDynamicModuleConfiguratorComponent = /** @class */ (function () {
830
- function EqpDynamicModuleConfiguratorComponent(formBuilder, dialog) {
1284
+ function EqpDynamicModuleConfiguratorComponent(formBuilder, dialog, utilityHelperService) {
831
1285
  this.formBuilder = formBuilder;
832
1286
  this.dialog = dialog;
1287
+ this.utilityHelperService = utilityHelperService;
833
1288
  this.context = new Context();
834
1289
  this.form = new Form();
1290
+ this.formID = null;
835
1291
  this.innerFormManagment = false;
1292
+ /**
1293
+ * Url del server da chiamare per recuerare, salvare o eliminare i record.
1294
+ * Usato per creare la configurazione di default degli endpoint da chiamare.
1295
+ */
1296
+ this.baseServerUrl = null;
1297
+ /**
1298
+ * Token da usare negli endpoint da chiamare per recuperare o salvare i record.
1299
+ * Usato solo se viene popolata la proprietà "baseServerUrl".
1300
+ */
1301
+ this.userToken = null;
1302
+ /**
1303
+ * Configurazione degli endpoint da chiamare per recuperare o salvare i dati.
1304
+ * Può essere definita dall'utente oppure lasciata null, viene popolata con dei
1305
+ * valori di default se viene valorizzata la proprietà "baseServerUrl" altrimenti
1306
+ * viene lasciata null e non viene eseguita nessuna chiamata al server.
1307
+ */
1308
+ this.endPointConfiguration = null;
836
1309
  this.formCompleted = false;
837
1310
  //#region Enumeratori usati nell'html
838
1311
  this.FormTypeEnum = exports.FormTypeEnum;
839
1312
  this.FormScalarTypeEnum = exports.FormScalarTypeEnum;
840
1313
  //#endregion
1314
+ /**
1315
+ * Evento emesso quando si salva una form e non è stato specificato un endpoint da chiamare.
1316
+ */
841
1317
  this.saveFormEvent = new core.EventEmitter();
1318
+ /**
1319
+ * Evento emesso DOPO aver eseguito una chiamata al server per il salvataggiodi una form all'endpoint specificato.
1320
+ */
1321
+ this.afterSaveFormEvent = new core.EventEmitter();
842
1322
  }
843
1323
  EqpDynamicModuleConfiguratorComponent.prototype.ngOnInit = function () {
1324
+ this.configureDefaultEndPoints();
1325
+ this.getFormByID();
844
1326
  if (this.context) {
845
1327
  UtilityHelperService.SetContext(this.context);
846
1328
  }
847
- this.configureColumns();
848
- this.createFormForm();
1329
+ };
1330
+ /**
1331
+ * Metodo per configurare gli endpoint da usare di default a partire dall'url base del server
1332
+ * a cui si deve connettere e al token da passare per autenticarsi.
1333
+ * Se la proprietà baseServerUrl è null e non sono stati configurati i vari endpoint allora
1334
+ * non viene eseguita nessuna chiamata http per recuperare/salvare i dati.
1335
+ */
1336
+ EqpDynamicModuleConfiguratorComponent.prototype.configureDefaultEndPoints = function () {
1337
+ if (!this.endPointConfiguration && this.baseServerUrl) {
1338
+ this.endPointConfiguration = this.utilityHelperService.ConfigureDefaultEndPoints(this.baseServerUrl, this.userToken);
1339
+ if (this.formID) {
1340
+ this.endPointConfiguration.Forms.GetByIDEndPoint.Params = [{ ParamName: 'id', ParamValue: this.formID, ParamType: exports.ParamTypeEnum['Query param'] }];
1341
+ }
1342
+ }
1343
+ };
1344
+ /**
1345
+ * Metodo per recuperare tutti i record salvati per una particolare Form.
1346
+ * La chiamata viene effettuata solo se è stato configurato l'endPoint da usare.
1347
+ */
1348
+ EqpDynamicModuleConfiguratorComponent.prototype.getFormByID = function () {
1349
+ var _this = this;
1350
+ if (this.formID && this.endPointConfiguration && this.endPointConfiguration.Forms && this.endPointConfiguration.Forms.GetByIDEndPoint) {
1351
+ this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDEndPoint, null, function (res) {
1352
+ _this.setFormAndConfigure(res);
1353
+ }, function (err) {
1354
+ _this.setFormAndConfigure(new Form());
1355
+ });
1356
+ }
1357
+ else {
1358
+ this.setFormAndConfigure();
1359
+ }
849
1360
  };
850
1361
  /**
851
1362
  * Metodo invocato al cambio del tipo di visualizzazione della form.
@@ -1121,10 +1632,54 @@
1121
1632
  }
1122
1633
  };
1123
1634
  /**
1124
- * Metodo che scatena l'evento di output per salvare la form creata alla fine del wizard
1635
+ * Metodo per salvare la form creata alla fine del wizard.
1636
+ * Se è stato configurato un endPoint per il salvataggio viene effettuata una chiamata al server passando l'oggeto da salvare
1637
+ * nel body della chiamata, altrimenti scatena l'evento "saveFormEvent".
1638
+ * NOTA: Per comunicare correttamente con la parte server del modulo dinamico bisogna modificare l'array dei Fields.
1639
+ * Al posto di passare un array di BaseField bisogna passare un array di oggetti del tipo { FieldType: FieldTypeEnum, Value: BaseField }.
1125
1640
  */
1126
1641
  EqpDynamicModuleConfiguratorComponent.prototype.saveForm = function () {
1127
- this.saveFormEvent.emit(this.form);
1642
+ var _this = this;
1643
+ if (this.endPointConfiguration != null && this.endPointConfiguration.Forms.SaveEndPoint) {
1644
+ // Copio la form da salvare per riwrappare i Fields in oggetti del tipo { FieldType: FieldTypeEnum, Value: BaseField }.
1645
+ // Necessario per far funzionare correttamente il FieldConverter del server.
1646
+ var formToSave_1 = JSON.parse(JSON.stringify(this.form));
1647
+ /*formToSave.Fields = [];
1648
+ this.form.Fields.forEach(field => {
1649
+ formToSave.Fields.push({
1650
+ FieldType: field.FieldType,
1651
+ Value: JSON.parse(JSON.stringify(field))
1652
+ });
1653
+ });*/
1654
+ formToSave_1.Fields = [];
1655
+ this.form.Fields.forEach(function (field) {
1656
+ var fld = UtilityHelperService.GetFieldType(field);
1657
+ formToSave_1.Fields.push(fld);
1658
+ });
1659
+ var dynamicModuleParams = [
1660
+ { ParamName: "Form", ParamValue: formToSave_1, ParamType: exports.ParamTypeEnum['In Body'] }
1661
+ ];
1662
+ this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Forms.SaveEndPoint, dynamicModuleParams, function (res) {
1663
+ EqpDynamicModuleDialogService.Success("Form salvata con successo!");
1664
+ _this.afterSaveFormEvent.emit(_this.form);
1665
+ });
1666
+ }
1667
+ else {
1668
+ this.saveFormEvent.emit(this.form);
1669
+ }
1670
+ };
1671
+ //#region FUNZIONI PRIVATE
1672
+ /**
1673
+ * Metodo per impostare la form e configurare colonne/FormGourp.
1674
+ * @param form Form da utilizzare.
1675
+ */
1676
+ EqpDynamicModuleConfiguratorComponent.prototype.setFormAndConfigure = function (form) {
1677
+ if (form === void 0) { form = null; }
1678
+ if (form != null) {
1679
+ this.form = form;
1680
+ }
1681
+ this.configureColumns();
1682
+ this.createFormForm();
1128
1683
  };
1129
1684
  /**
1130
1685
  * Configura le colonne per le tabelle necessarie alla creazione della form:
@@ -1318,7 +1873,8 @@
1318
1873
  };
1319
1874
  EqpDynamicModuleConfiguratorComponent.ctorParameters = function () { return [
1320
1875
  { type: forms.FormBuilder },
1321
- { type: dialog.MatDialog }
1876
+ { type: dialog.MatDialog },
1877
+ { type: UtilityHelperService }
1322
1878
  ]; };
1323
1879
  __decorate([
1324
1880
  core.Input()
@@ -1326,9 +1882,21 @@
1326
1882
  __decorate([
1327
1883
  core.Input()
1328
1884
  ], EqpDynamicModuleConfiguratorComponent.prototype, "form", void 0);
1885
+ __decorate([
1886
+ core.Input()
1887
+ ], EqpDynamicModuleConfiguratorComponent.prototype, "formID", void 0);
1329
1888
  __decorate([
1330
1889
  core.Input()
1331
1890
  ], EqpDynamicModuleConfiguratorComponent.prototype, "innerFormManagment", void 0);
1891
+ __decorate([
1892
+ core.Input()
1893
+ ], EqpDynamicModuleConfiguratorComponent.prototype, "baseServerUrl", void 0);
1894
+ __decorate([
1895
+ core.Input()
1896
+ ], EqpDynamicModuleConfiguratorComponent.prototype, "userToken", void 0);
1897
+ __decorate([
1898
+ core.Input()
1899
+ ], EqpDynamicModuleConfiguratorComponent.prototype, "endPointConfiguration", void 0);
1332
1900
  __decorate([
1333
1901
  core.ViewChild('fieldsTable', { static: false })
1334
1902
  ], EqpDynamicModuleConfiguratorComponent.prototype, "fieldsTable", void 0);
@@ -1350,10 +1918,13 @@
1350
1918
  __decorate([
1351
1919
  core.Output()
1352
1920
  ], EqpDynamicModuleConfiguratorComponent.prototype, "saveFormEvent", void 0);
1921
+ __decorate([
1922
+ core.Output()
1923
+ ], EqpDynamicModuleConfiguratorComponent.prototype, "afterSaveFormEvent", void 0);
1353
1924
  EqpDynamicModuleConfiguratorComponent = __decorate([
1354
1925
  core.Component({
1355
1926
  selector: 'eqp-dynamic-module-configurator',
1356
- template: "<mat-horizontal-stepper linear #stepper>\r\n <!-- DATI GENERALI DELLA FORM -->\r\n <mat-step [stepControl]=\"formFormGroup\">\r\n <form [formGroup]=\"formFormGroup\" (keydown.enter)=\"false\">\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\" (click)=\"setFormStatus(false)\"></div>\r\n Dati generali della form\r\n </ng-template>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-4\">\r\n <mat-form-field>\r\n <mat-label>Nome</mat-label>\r\n <input matInput formControlName=\"Name\" [(ngModel)]=\"form.Name\" required>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-md-4\">\r\n <eqp-select [enumData]=\"FormScalarTypeEnum\" [(ngModelInput)]=\"form.FormScalarType\"\r\n [isRequired]=\"true\" [showCancelButton]=\"false\" placeholder=\"Tipo di visualizzazione\"\r\n [formGroupInput]=\"formFormGroup\" [formControlNameInput]=\"'FormScalarType'\"\r\n (ngModelInputChange)=\"onChangeFormScalarType()\">\r\n </eqp-select>\r\n </div>\r\n </div>\r\n <div class=\"row\" *ngIf=\"form.FormScalarType && form.FormScalarType != FormScalarTypeEnum.Semplice\">\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <mat-form-field>\r\n <mat-label> Nome sezione (invio per confermare) </mat-label>\r\n <input matInput [(ngModel)]=\"formFieldGroupName\" [ngModelOptions]=\"{standalone: true}\"\r\n (keyup)=\"onFormFieldGroupNameKeyUp($event)\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <span class=\"mr-3\">Sezioni inserite:</span>\r\n <ul class=\"section-list\">\r\n <li *ngFor=\"let groupName of form.FormFieldsGroups, let i=index\">\r\n <mat-icon class=\"mr-1\" (click)=\"onDeleteFormFieldGroupName(groupName.Name)\">close\r\n </mat-icon>\r\n <span> {{i+1}}) {{groupName.Name}}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button mat-raised-button color=\"primary\" matStepperNext\r\n [disabled]=\"formFormGroup.invalid\">Successivo</button>\r\n </div>\r\n </form>\r\n </mat-step>\r\n\r\n <!-- AGGIUNTA DEI CAMPI DELLA FORM -->\r\n <mat-step [completed]=\"isFieldStepCompleted()\">\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\" (click)=\"setFormStatus(false)\"></div>\r\n Campi da inserire\r\n </ng-template>\r\n\r\n <div class=\"row justify-content-end\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\" (click)=\"openFieldDialog()\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi campo</span>\r\n </button>\r\n\r\n <button class=\"btn btn-primary ml-2\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"openInnerFormDialog()\" *ngIf=\"!innerFormManagment\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi form di dettaglio</span>\r\n </button>\r\n </div>\r\n\r\n <eqp-table #fieldsTable [createMatCard]=\"false\" [columns]=\"fieldsColumns\" [data]=\"form.Fields\"\r\n [emptyTableMessage]=\"'Nessun campo inserito'\" [searchText]=\"'Cerca'\">\r\n </eqp-table>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button class=\"mr-2\" mat-raised-button matStepperPrevious>Precedente</button>\r\n <button mat-raised-button color=\"primary\" matStepperNext [disabled]=\"!isFieldStepCompleted()\"\r\n (click)=\"setFormStatus(false)\">Successivo</button>\r\n </div>\r\n </mat-step>\r\n\r\n <!-- AGGIUNTA DELLE OPERAZIONI SUI RECORD -->\r\n <mat-step>\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\" (click)=\"setFormStatus(false)\"></div>\r\n Azioni aggiuntive sui record\r\n </ng-template>\r\n\r\n <div class=\"row justify-content-end\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"openActionOnRecordDialog()\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi azione</span>\r\n </button>\r\n </div>\r\n <eqp-table #actionsOnRecordTable [createMatCard]=\"false\" [columns]=\"actionsOnRecordColumns\"\r\n [data]=\"form.ActionsOnRecord\" [emptyTableMessage]=\"'Nessuna action inserita'\" [searchText]=\"'Cerca'\">\r\n </eqp-table>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button class=\"mr-2\" mat-raised-button matStepperPrevious>Precedente</button>\r\n <button mat-raised-button color=\"primary\" matStepperNext (click)=\"setFormStatus(true)\">\r\n Successivo\r\n </button>\r\n </div>\r\n </mat-step>\r\n\r\n <!-- VISUALIZZAZIONE FORM CREATA -->\r\n <mat-step>\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\"\r\n (click)=\"setFormStatus(formFormGroup.valid && form.Fields && form.Fields.length > 0)\"></div>\r\n Riepilogo\r\n </ng-template>\r\n\r\n <eqp-dynamic-module [form]=\"previewForm\" *ngIf=\"previewForm && formCompleted\" [showButtons]=\"false\"\r\n [viewMode]=\"FormTypeEnum.SCALAR\"></eqp-dynamic-module>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button class=\"mr-2\" mat-raised-button matStepperPrevious (click)=\"setFormStatus(false)\">Precedente</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"saveForm()\">Salva form</button>\r\n </div>\r\n </mat-step>\r\n</mat-horizontal-stepper>\r\n\r\n<div class=\"row\" *ngIf=\"innerFormManagment\">\r\n <div class=\"col-md-12 text-right\">\r\n <button mat-raised-button (click)=\"saveFormEvent.emit(null)\">Esci</button>\r\n </div>\r\n</div>\r\n\r\n<!-- DIALOG AGGIUNTA/MODIFICA CAMPO -->\r\n<ng-template #dialogField>\r\n <eqp-dynamic-module-add-form-field [field]=\"selectedField\" [indexField]=\"indexSelectedField\"\r\n (saveFieldEvent)=\"onSaveField($event)\" [availableFields]=\"form.Fields\"\r\n [formFieldsGroups]=\"form.FormScalarType != FormScalarTypeEnum.Semplice ? form.FormFieldsGroups : null\">\r\n </eqp-dynamic-module-add-form-field>\r\n</ng-template>\r\n\r\n<!-- TEMPLATE PER VISUALIZZARE LA COLONNA DELLA SEZIONE NELLA TABELLA DEI FIELDS -->\r\n<ng-template #fieldSectionColumnTemplate let-row=\"row\">\r\n <eqp-select [arrayData]=\"form.FormFieldsGroups\" [(ngModelInput)]=\"row.FieldGroup\" [arrayKeyProperty]=\"'Name'\"\r\n [arrayValueProperty]=\"'Name'\" placeholder=\"Sezione\" [isRequired]=\"true\" [includeFullObject]=\"false\">\r\n </eqp-select>\r\n</ng-template>\r\n\r\n<!-- DIALOG PER AGGIUNGERE/MODIFICARE UNA ACTION SUI RECORD DELLA FORM -->\r\n<ng-template #dialogActionOnRecord>\r\n <div class=\"container-fluid\" style=\"max-height: 70vh !important; overflow-x: hidden; overflow-y: auto;\">\r\n <form [formGroup]=\"actionOnRecordFormGroup\">\r\n <div class=\"row\">\r\n <div class=\"header-title-standard\">{{indexSelectedAction != null && indexSelectedAction >= 0 ?\r\n \"Modifica\"\r\n : \"Aggiungi\"}} azione sul record</div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Nome </mat-label>\r\n <input formControlName=\"Name\" required matInput [(ngModel)]=\"selectedAction.Name\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Icona </mat-label>\r\n <input formControlName=\"Icon\" required matInput [(ngModel)]=\"selectedAction.Icon\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 col-md-12 mt-2\">\r\n <mat-form-field>\r\n <textarea matInput [placeholder]=\"'Azione (Javascript)'\" [rows]=\"3\" formControlName=\"Action\"\r\n required [(ngModel)]=\"selectedAction.Action\" [matAutocomplete]=\"actionAutocomplete\"\r\n (keyup)=\"setActionAutocompleteOptions($event)\"\r\n (focus)=\"setActionAutocompleteOptions(null)\"></textarea>\r\n <mat-autocomplete #actionAutocomplete=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of actionAutocompleteOptions\" [value]=\"option.value\">\r\n {{option.label}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"row mt-2 mb-1\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"mr-2\" mat-raised-button color=\"primary\" (click)=\"saveActionOnRecord()\"\r\n [disabled]=\"actionOnRecordFormGroup.invalid\" type=\"button\">\r\n Salva\r\n </button>\r\n <button class=\"btn mat-raised-button\" (click)=\"closeDialogActionOnRecord()\" type=\"button\">\r\n Esci\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #dialogInnerForm>\r\n <eqp-dynamic-module-configurator [form]=\"selectedInnerForm\" [innerFormManagment]=\"true\"\r\n (saveFormEvent)=\"onSaveOrExitInnerForm($event)\"></eqp-dynamic-module-configurator>\r\n</ng-template>",
1927
+ template: "<eqp-dynamic-module-spinner></eqp-dynamic-module-spinner>\r\n\r\n<mat-horizontal-stepper linear #stepper>\r\n <!-- DATI GENERALI DELLA FORM -->\r\n <mat-step [stepControl]=\"formFormGroup\">\r\n <form [formGroup]=\"formFormGroup\" (keydown.enter)=\"false\">\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\" (click)=\"setFormStatus(false)\"></div>\r\n Dati generali della form\r\n </ng-template>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-4\">\r\n <mat-form-field>\r\n <mat-label>Nome</mat-label>\r\n <input matInput formControlName=\"Name\" [(ngModel)]=\"form.Name\" required>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-md-4\">\r\n <eqp-select [enumData]=\"FormScalarTypeEnum\" [(ngModelInput)]=\"form.FormScalarType\"\r\n [isRequired]=\"true\" [showCancelButton]=\"false\" placeholder=\"Tipo di visualizzazione\"\r\n [formGroupInput]=\"formFormGroup\" [formControlNameInput]=\"'FormScalarType'\"\r\n (ngModelInputChange)=\"onChangeFormScalarType()\">\r\n </eqp-select>\r\n </div>\r\n </div>\r\n <div class=\"row\" *ngIf=\"form.FormScalarType && form.FormScalarType != FormScalarTypeEnum.Semplice\">\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <mat-form-field>\r\n <mat-label> Nome sezione (invio per confermare) </mat-label>\r\n <input matInput [(ngModel)]=\"formFieldGroupName\" [ngModelOptions]=\"{standalone: true}\"\r\n (keyup)=\"onFormFieldGroupNameKeyUp($event)\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <span class=\"mr-3\">Sezioni inserite:</span>\r\n <ul class=\"section-list\">\r\n <li *ngFor=\"let groupName of form.FormFieldsGroups, let i=index\">\r\n <mat-icon class=\"mr-1\" (click)=\"onDeleteFormFieldGroupName(groupName.Name)\">close\r\n </mat-icon>\r\n <span> {{i+1}}) {{groupName.Name}}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button mat-raised-button color=\"primary\" matStepperNext\r\n [disabled]=\"formFormGroup.invalid\">Successivo</button>\r\n </div>\r\n </form>\r\n </mat-step>\r\n\r\n <!-- AGGIUNTA DEI CAMPI DELLA FORM -->\r\n <mat-step [completed]=\"isFieldStepCompleted()\">\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\" (click)=\"setFormStatus(false)\"></div>\r\n Campi da inserire\r\n </ng-template>\r\n\r\n <div class=\"row justify-content-end\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\" (click)=\"openFieldDialog()\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi campo</span>\r\n </button>\r\n\r\n <button class=\"btn btn-primary ml-2\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"openInnerFormDialog()\" *ngIf=\"!innerFormManagment\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi form di dettaglio</span>\r\n </button>\r\n </div>\r\n\r\n <eqp-table #fieldsTable [createMatCard]=\"false\" [columns]=\"fieldsColumns\" [data]=\"form.Fields\"\r\n [emptyTableMessage]=\"'Nessun campo inserito'\" [searchText]=\"'Cerca'\">\r\n </eqp-table>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button class=\"mr-2\" mat-raised-button matStepperPrevious>Precedente</button>\r\n <button mat-raised-button color=\"primary\" matStepperNext [disabled]=\"!isFieldStepCompleted()\"\r\n (click)=\"setFormStatus(false)\">Successivo</button>\r\n </div>\r\n </mat-step>\r\n\r\n <!-- AGGIUNTA DELLE OPERAZIONI SUI RECORD -->\r\n <mat-step>\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\" (click)=\"setFormStatus(false)\"></div>\r\n Azioni aggiuntive sui record\r\n </ng-template>\r\n\r\n <div class=\"row justify-content-end\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"openActionOnRecordDialog()\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi azione</span>\r\n </button>\r\n </div>\r\n <eqp-table #actionsOnRecordTable [createMatCard]=\"false\" [columns]=\"actionsOnRecordColumns\"\r\n [data]=\"form.ActionsOnRecord\" [emptyTableMessage]=\"'Nessuna action inserita'\" [searchText]=\"'Cerca'\">\r\n </eqp-table>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button class=\"mr-2\" mat-raised-button matStepperPrevious>Precedente</button>\r\n <button mat-raised-button color=\"primary\" matStepperNext (click)=\"setFormStatus(true)\">\r\n Successivo\r\n </button>\r\n </div>\r\n </mat-step>\r\n\r\n <!-- VISUALIZZAZIONE FORM CREATA -->\r\n <mat-step>\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\"\r\n (click)=\"setFormStatus(formFormGroup.valid && form.Fields && form.Fields.length > 0)\"></div>\r\n Anteprima\r\n </ng-template>\r\n\r\n <add-form-record *ngIf=\"previewForm && formCompleted\" [form]=\"previewForm\" [showButtons]=\"false\">\r\n </add-form-record>\r\n\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button class=\"mr-2\" mat-raised-button matStepperPrevious (click)=\"setFormStatus(false)\">Precedente</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"saveForm()\">Salva form</button>\r\n </div>\r\n </mat-step>\r\n</mat-horizontal-stepper>\r\n\r\n<div class=\"row\" *ngIf=\"innerFormManagment\">\r\n <div class=\"col-md-12 text-right\">\r\n <button mat-raised-button (click)=\"saveFormEvent.emit(null)\">Esci</button>\r\n </div>\r\n</div>\r\n\r\n<!-- DIALOG AGGIUNTA/MODIFICA CAMPO -->\r\n<ng-template #dialogField>\r\n <eqp-dynamic-module-add-form-field [field]=\"selectedField\" [indexField]=\"indexSelectedField\"\r\n (saveFieldEvent)=\"onSaveField($event)\" [availableFields]=\"form.Fields\"\r\n [formFieldsGroups]=\"form.FormScalarType != FormScalarTypeEnum.Semplice ? form.FormFieldsGroups : null\">\r\n </eqp-dynamic-module-add-form-field>\r\n</ng-template>\r\n\r\n<!-- TEMPLATE PER VISUALIZZARE LA COLONNA DELLA SEZIONE NELLA TABELLA DEI FIELDS -->\r\n<ng-template #fieldSectionColumnTemplate let-row=\"row\">\r\n <eqp-select [arrayData]=\"form.FormFieldsGroups\" [(ngModelInput)]=\"row.FieldGroup\" [arrayKeyProperty]=\"'Name'\"\r\n [arrayValueProperty]=\"'Name'\" placeholder=\"Sezione\" [isRequired]=\"true\" [includeFullObject]=\"false\">\r\n </eqp-select>\r\n</ng-template>\r\n\r\n<!-- DIALOG PER AGGIUNGERE/MODIFICARE UNA ACTION SUI RECORD DELLA FORM -->\r\n<ng-template #dialogActionOnRecord>\r\n <div class=\"container-fluid\" style=\"max-height: 70vh !important; overflow-x: hidden; overflow-y: auto;\">\r\n <form [formGroup]=\"actionOnRecordFormGroup\">\r\n <div class=\"row\">\r\n <div class=\"header-title-standard\">{{indexSelectedAction != null && indexSelectedAction >= 0 ?\r\n \"Modifica\"\r\n : \"Aggiungi\"}} azione sul record</div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Nome </mat-label>\r\n <input formControlName=\"Name\" required matInput [(ngModel)]=\"selectedAction.Name\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Icona </mat-label>\r\n <input formControlName=\"Icon\" required matInput [(ngModel)]=\"selectedAction.Icon\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 col-md-12 mt-2\">\r\n <mat-form-field>\r\n <textarea matInput [placeholder]=\"'Azione (Javascript)'\" [rows]=\"3\" formControlName=\"Action\"\r\n required [(ngModel)]=\"selectedAction.Action\" [matAutocomplete]=\"actionAutocomplete\"\r\n (keyup)=\"setActionAutocompleteOptions($event)\"\r\n (focus)=\"setActionAutocompleteOptions(null)\"></textarea>\r\n <mat-autocomplete #actionAutocomplete=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of actionAutocompleteOptions\" [value]=\"option.value\">\r\n {{option.label}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"row mt-2 mb-1\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"mr-2\" mat-raised-button color=\"primary\" (click)=\"saveActionOnRecord()\"\r\n [disabled]=\"actionOnRecordFormGroup.invalid\" type=\"button\">\r\n Salva\r\n </button>\r\n <button class=\"btn mat-raised-button\" (click)=\"closeDialogActionOnRecord()\" type=\"button\">\r\n Esci\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- TEMPLATE PER CONFIGURARE LE FORM DI DETTAGLIO -->\r\n<ng-template #dialogInnerForm>\r\n <eqp-dynamic-module-configurator [form]=\"selectedInnerForm\" [innerFormManagment]=\"true\"\r\n (saveFormEvent)=\"onSaveOrExitInnerForm($event)\"></eqp-dynamic-module-configurator>\r\n</ng-template>",
1357
1928
  styles: ["::ng-deep mat-form-field{width:100%}.stepper-header-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.section-list{list-style:none;padding:0}.section-list mat-icon{vertical-align:middle;font-size:15px;height:15px;width:15px;color:var(--danger);margin-right:10px;cursor:pointer}.danger-color{color:var(--danger)}"]
1358
1929
  })
1359
1930
  ], EqpDynamicModuleConfiguratorComponent);
@@ -1425,6 +1996,11 @@
1425
1996
  }
1426
1997
  return ListValueField;
1427
1998
  }(BaseField));
1999
+ var ButtonImage = /** @class */ (function () {
2000
+ function ButtonImage() {
2001
+ }
2002
+ return ButtonImage;
2003
+ }());
1428
2004
 
1429
2005
  (function (ListPresentationEnum) {
1430
2006
  ListPresentationEnum[ListPresentationEnum["Combo box"] = 1] = "Combo box";
@@ -1435,10 +2011,11 @@
1435
2011
 
1436
2012
  var AddFormFieldComponent = /** @class */ (function () {
1437
2013
  //#endregion
1438
- function AddFormFieldComponent(formBuilder, enumHelper, dialog) {
2014
+ function AddFormFieldComponent(formBuilder, enumHelper, dialog, cdr) {
1439
2015
  this.formBuilder = formBuilder;
1440
2016
  this.enumHelper = enumHelper;
1441
2017
  this.dialog = dialog;
2018
+ this.cdr = cdr;
1442
2019
  this.fieldTypesToExclude = [exports.FieldTypeEnum['Form di dettaglio']];
1443
2020
  this.keyValueObject = { key: '', value: '' };
1444
2021
  this.availableColSpanSizes = [];
@@ -1451,6 +2028,8 @@
1451
2028
  this.BoolPresentantioEnum = exports.BoolPresentantioEnum;
1452
2029
  this.DateTimeTypeEnum = exports.DateTimeTypeEnum;
1453
2030
  this.ListPresentationEnum = exports.ListPresentationEnum;
2031
+ this.TextMaskEnum = exports.TextMaskEnum;
2032
+ this.AttachmentType = eqpAttachments.AttachmentType;
1454
2033
  }
1455
2034
  AddFormFieldComponent.prototype.ngOnInit = function () {
1456
2035
  var _this = this;
@@ -1489,7 +2068,7 @@
1489
2068
  Required: [this.field.Required],
1490
2069
  FieldType: [this.field.FieldType, forms.Validators.required],
1491
2070
  Formula: [this.field.Formula],
1492
- ColSizes: [this.field.ColSizes],
2071
+ ColSpanSizes: [this.field.ColSpanSizes],
1493
2072
  InListView: [this.field.InListView],
1494
2073
  });
1495
2074
  if (this.formFieldsGroups) {
@@ -1508,7 +2087,7 @@
1508
2087
  if (restoreField)
1509
2088
  this.restoreBaseFieldProperties();
1510
2089
  this.createFieldForm();
1511
- this.onColSizeSelect();
2090
+ this.onColSpanSizeSelect();
1512
2091
  this.fieldTypeFormTemplate = null;
1513
2092
  switch (this.field.FieldType) {
1514
2093
  case exports.FieldTypeEnum['Campo di testo']:
@@ -1532,13 +2111,16 @@
1532
2111
  this.fieldFormGroup.addControl('IsOnlyDate', new forms.FormControl(this.field.IsOnlyDate, forms.Validators.required));
1533
2112
  this.fieldFormGroup.addControl('MinDate', new forms.FormControl(this.field.MinDate));
1534
2113
  this.fieldFormGroup.addControl('MaxDate', new forms.FormControl(this.field.MaxDate));
2114
+ this.fieldFormGroup.addControl('DateFormat', new forms.FormControl(this.field.DateFormat));
1535
2115
  this.fieldTypeFormTemplate = this.dateFieldFormTemplate;
1536
2116
  break;
1537
2117
  case exports.FieldTypeEnum['Campo numerico']:
1538
2118
  this.fieldFormGroup.addControl('IsInteger', new forms.FormControl(this.field.IsInteger));
1539
2119
  this.fieldFormGroup.addControl('MinValue', new forms.FormControl(this.field.MinValue));
1540
2120
  this.fieldFormGroup.addControl('MaxValue', new forms.FormControl(this.field.MaxValue));
1541
- this.fieldFormGroup.addControl('NumberFormat', new forms.FormControl(this.field.NumberFormat));
2121
+ this.fieldFormGroup.addControl('DecimalSeparator', new forms.FormControl(this.field.DecimalSeparator));
2122
+ this.fieldFormGroup.addControl('DecimalPrecision', new forms.FormControl(this.field.DecimalPrecision));
2123
+ this.fieldFormGroup.addControl('ThousandsSeparator', new forms.FormControl(this.field.ThousandsSeparator));
1542
2124
  this.fieldFormGroup.addControl('CurrencySymbol', new forms.FormControl(this.field.CurrencySymbol));
1543
2125
  this.fieldTypeFormTemplate = this.numericFieldFormTemplate;
1544
2126
  break;
@@ -1622,17 +2204,50 @@
1622
2204
  * seleziona la classe "col-sm-6", al change del valore questo metodo rimuove dalla select
1623
2205
  * tutti gli altri valori per la grandezza di schermo selezionata.
1624
2206
  */
1625
- AddFormFieldComponent.prototype.onColSizeSelect = function () {
2207
+ AddFormFieldComponent.prototype.onColSpanSizeSelect = function () {
1626
2208
  // Recupero l'array degli oggetti chiave-valore che rappreseta l'enumeratore
1627
2209
  var colSizeClassEnumArray = this.enumHelper.getEnumArray(exports.ColSpanSizesEnum, false, null);
1628
2210
  // Costruisco l'array delle classi selezionate dall'utente in formato stringa
1629
- var selectedDimensions = this.field.ColSizes ? this.field.ColSizes.map(function (col) { return exports.ColSpanSizesEnum[col]; }) : [];
2211
+ var selectedDimensions = this.field.ColSpanSizes ? this.field.ColSpanSizes.map(function (col) { return exports.ColSpanSizesEnum[col]; }) : [];
1630
2212
  // Filtro i valori ottenuti dall'enumeratore per escludere tutti i valori per le
1631
2213
  // grandezze di schermo già selezionatead esclusione dei valori selezionati.
1632
2214
  this.availableColSpanSizes = colSizeClassEnumArray.filter(function (value) {
1633
2215
  return !selectedDimensions.find(function (col) { return value.value.includes(col.substring(4, 6)) && value.value != col; });
1634
2216
  });
1635
2217
  };
2218
+ /**
2219
+ * Metodo invocato al cambio del tipo di visualizzazione scelta per i campi di tipo elenco generico.
2220
+ * Se viene scelta la visualizzazione ad immagini svuota la lista delle coppie chiave-valore inserite
2221
+ * in precedenza, altrimenti svuota la lista delle immagini caricate.
2222
+ */
2223
+ AddFormFieldComponent.prototype.onPresentationModeChange = function () {
2224
+ if (this.field.PresentationMode === exports.ListPresentationEnum.Immagini) {
2225
+ this.field.ValuePairs = null;
2226
+ }
2227
+ else {
2228
+ this.field.ButtonImageList = null;
2229
+ }
2230
+ };
2231
+ /**
2232
+ * Metodo invocato quando viene caricato il componente eqp-attachments per caricare le immagini da usare
2233
+ * nella visualizzazione ad immagini dei campi di tipo "Elenco generico". Aggiunge due colonne a quelle
2234
+ * configurate nel componente in cui l'utente può indicare chiave e valore della scelta.
2235
+ * @param component Istanza del componente eqp-attachments in cui effettuare la modifica.
2236
+ */
2237
+ AddFormFieldComponent.prototype.configureButtonImagesColumns = function (component) {
2238
+ component.attachmentsColumns.splice(component.attachmentsColumns.length - 1, 0, { key: "ButtonKey", display: "Label", type: eqpTable.TypeColumn.ExternalTemplate, externalTemplate: this.buttonImagesKeyValueInputColumn });
2239
+ component.attachmentsColumns.splice(component.attachmentsColumns.length - 1, 0, { key: "ButtonValue", display: "Valore", type: eqpTable.TypeColumn.ExternalTemplate, externalTemplate: this.buttonImagesKeyValueInputColumn });
2240
+ this.cdr.detectChanges();
2241
+ };
2242
+ /**
2243
+ * Metodo invocato al salvataggio degli allegati quando viene configurato un campo di tipo "Elenco generico"
2244
+ * con il tipo di visualizzazione ad immagini. Intercetta l'elenco aggiornato delle immagini caricate e lo
2245
+ * memorizza nell'oggetto field corrente.
2246
+ * @param attachments Array aggiornato degli allegati caricati.
2247
+ */
2248
+ AddFormFieldComponent.prototype.catchButtonImagesChange = function (attachments) {
2249
+ this.field.ButtonImageList = attachments;
2250
+ };
1636
2251
  /**
1637
2252
  * Metodo chiamato al keyup degli input testuali che prevedono l'aggiunta del valore inserito in un array.
1638
2253
  * Se l'utente preme il tasto invio, in base al tipo di campo che sta inserendo/modificando, questo metodo
@@ -1780,7 +2395,14 @@
1780
2395
  }
1781
2396
  switch (this.field.FieldType) {
1782
2397
  case exports.FieldTypeEnum['Elenco generico']:
1783
- return !this.field.ValuePairs || this.field.ValuePairs.length === 0;
2398
+ if (this.field.PresentationMode != exports.ListPresentationEnum.Immagini) {
2399
+ return !this.field.ValuePairs || this.field.ValuePairs.length === 0;
2400
+ }
2401
+ else {
2402
+ return (!this.field.ButtonImageList
2403
+ || this.field.ButtonImageList.length === 0
2404
+ || !!this.field.ButtonImageList.find(function (i) { return !i.ButtonKey || !i.ButtonValue; }));
2405
+ }
1784
2406
  case exports.FieldTypeEnum.Lookup:
1785
2407
  return !this.field.FieldNames || this.field.FieldNames.length === 0;
1786
2408
  default:
@@ -1814,7 +2436,7 @@
1814
2436
  this.field.Required = tmpBaseField.Required;
1815
2437
  this.field.FieldType = tmpBaseField.FieldType;
1816
2438
  this.field.Formula = tmpBaseField.Formula;
1817
- this.field.ColSizes = tmpBaseField.ColSizes;
2439
+ this.field.ColSpanSizes = tmpBaseField.ColSpanSizes;
1818
2440
  this.field.FieldGroup = tmpBaseField.FieldGroup;
1819
2441
  }
1820
2442
  };
@@ -1892,7 +2514,8 @@
1892
2514
  AddFormFieldComponent.ctorParameters = function () { return [
1893
2515
  { type: forms.FormBuilder },
1894
2516
  { type: eqpSelect.EnumHelper },
1895
- { type: dialog.MatDialog }
2517
+ { type: dialog.MatDialog },
2518
+ { type: core.ChangeDetectorRef }
1896
2519
  ]; };
1897
2520
  __decorate([
1898
2521
  core.Input()
@@ -1945,10 +2568,13 @@
1945
2568
  __decorate([
1946
2569
  core.ViewChild('dialogMetadata', { static: true })
1947
2570
  ], AddFormFieldComponent.prototype, "dialogMetadata", void 0);
2571
+ __decorate([
2572
+ core.ViewChild('buttonImagesKeyValueInputColumn', { static: true })
2573
+ ], AddFormFieldComponent.prototype, "buttonImagesKeyValueInputColumn", void 0);
1948
2574
  AddFormFieldComponent = __decorate([
1949
2575
  core.Component({
1950
2576
  selector: 'eqp-dynamic-module-add-form-field',
1951
- template: "<div class=\"container-fluid\" style=\"max-height: 70vh !important; overflow-x: hidden; overflow-y: auto;\">\n <form [formGroup]=\"fieldFormGroup\">\n <div class=\"row\">\n <div class=\"header-title-standard\">{{indexField != null && indexField >= 0 ? \"Modifica\"\n : \"Aggiungi\"}} campo</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-select [enumData]=\"FieldTypeEnum\" [(ngModelInput)]=\"field.FieldType\" [isRequired]=\"true\"\n [showCancelButton]=\"false\" placeholder=\"Tipo campo\" (ngModelInputChange)=\"onFieldTypeChange()\"\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'FieldType'\"\n [enumDataToExclude]=\"fieldTypesToExclude\">\n </eqp-select>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <mat-form-field>\n <mat-label> Label </mat-label>\n <input formControlName=\"Label\" required matInput [(ngModel)]=\"field.Label\">\n </mat-form-field>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <mat-form-field>\n <mat-label> Descrizione </mat-label>\n <input formControlName=\"Description\" required matInput [(ngModel)]=\"field.Description\">\n </mat-form-field>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\">\n <mat-slide-toggle [(ngModel)]=\"field.Required\" formControlName=\"Required\" color=\"primary\">\n Obbligatorio\n </mat-slide-toggle>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <mat-form-field>\n <mat-label> Formula (Javascript) </mat-label>\n <input formControlName=\"Formula\" matInput [(ngModel)]=\"field.Formula\"\n [matAutocomplete]=\"formulaAutocomplete\" (keyup)=\"setFormulaAutocompleteOptions($event)\"\n (focus)=\"setFormulaAutocompleteOptions(null)\">\n <mat-autocomplete #formulaAutocomplete=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of formulaAutocompleteOptions\" [value]=\"option.value\">\n {{option.label}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2\" *ngIf=\"formFieldsGroups\">\n <eqp-select [arrayData]=\"formFieldsGroups\" [(ngModelInput)]=\"field.FieldGroup\"\n [arrayKeyProperty]=\"'Name'\" [arrayValueProperty]=\"'Name'\" placeholder=\"Sezione\"\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'FieldGroup'\" [isRequired]=\"true\"\n [includeFullObject]=\"false\">\n </eqp-select>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-select [arrayData]=\"availableColSpanSizes\" [(ngModelInput)]=\"field.ColSizes\"\n [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'value'\" (ngModelInputChange)=\"onColSizeSelect()\"\n [isMultiSelect]=\"true\" placeholder=\"Larghezza campo\" [formGroupInput]=\"fieldFormGroup\"\n [formControlNameInput]=\"'ColSizes'\" [includeFullObject]=\"false\">\n </eqp-select>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\">\n <mat-slide-toggle [(ngModel)]=\"field.InListView\" formControlName=\"InListView\" color=\"primary\"\n [disabled]=\"fieldFormGroup.controls['InListView'].disabled\">\n Mostrare nella visualizzazione a lista\n </mat-slide-toggle>\n </div>\n\n <ng-container *ngTemplateOutlet=\"fieldTypeFormTemplate\">\n </ng-container>\n </div>\n\n\n <div class=\"row mt-2 mb-1\">\n <div class=\"col-sm-12 text-right\">\n <button class=\"mr-2\" mat-raised-button color=\"primary\" (click)=\"saveAndExitAddField(true)\"\n [disabled]=\"disableSaveField()\" type=\"button\">\n Salva\n </button>\n <button class=\"btn mat-raised-button\" (click)=\"saveAndExitAddField(false)\" type=\"button\">\n Esci\n </button>\n </div>\n </div>\n </form>\n</div>\n\n\n<!-- FORM PROPRIET\u00C0 CAMPI DI TESTO -->\n<ng-template #textFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Maschera </mat-label>\n <input formControlName=\"TextMask\" matInput [(ngModel)]=\"field.TextMask\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Lunghezza massima </mat-label>\n <input formControlName=\"MaxLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MaxLenght\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Lunghezza minima </mat-label>\n <input formControlName=\"MinLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MinLenght\">\n </mat-form-field>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI AREA DI TESTO -->\n<ng-template #textareaFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Righe </mat-label>\n <input formControlName=\"Rows\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.Rows\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Lunghezza massima </mat-label>\n <input formControlName=\"MaxLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MaxLenght\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Lunghezza minima </mat-label>\n <input formControlName=\"MinLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MinLenght\">\n </mat-form-field>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI BOOLEANI -->\n<ng-template #booleadFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.IsTristate\" formControlName=\"IsTristate\" color=\"primary\">\n A tre stati\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-select [enumData]=\"BoolPresentantioEnum\" [(ngModelInput)]=\"field.PresetationType\" [isRequired]=\"true\"\n [showCancelButton]=\"false\" placeholder=\"Tipo di presentazione\" [formGroupInput]=\"fieldFormGroup\"\n [formControlNameInput]=\"'PresetationType'\">\n </eqp-select>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI DATA -->\n<ng-template #dateFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-datetimepicker [placeholder]=\"'Data minima'\" [(ngModelInput)]=\"field.MinDate\"\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'MinDate'\" [UTCDate]=\"true\" [showSeconds]=\"false\">\n </eqp-datetimepicker>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-datetimepicker [placeholder]=\"'Data massima'\" [(ngModelInput)]=\"field.MaxDate\"\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'MaxDate'\" [UTCDate]=\"true\" [showSeconds]=\"false\">\n </eqp-datetimepicker>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-select [enumData]=\"DateTimeTypeEnum\" [(ngModelInput)]=\"field.IsOnlyDate\" [isRequired]=\"true\"\n [showCancelButton]=\"false\" placeholder=\"Tipo di data\" [formGroupInput]=\"fieldFormGroup\"\n [formControlNameInput]=\"'IsOnlyDate'\">\n </eqp-select>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI NUMERICI -->\n<ng-template #numericFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.IsInteger\" formControlName=\"IsInteger\" color=\"primary\">\n Valore intero\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Formato numerico </mat-label>\n <input formControlName=\"NumberFormat\" matInput [(ngModel)]=\"field.NumberFormat\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Simbolo valuta </mat-label>\n <input formControlName=\"CurrencySymbol\" matInput [(ngModel)]=\"field.CurrencySymbol\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Valore massimo </mat-label>\n <input formControlName=\"MinValue\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MinValue\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Valore minimo </mat-label>\n <input formControlName=\"MaxValue\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MaxValue\">\n </mat-form-field>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI ALLEGATO -->\n<ng-template #attachmentFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.IsMultiAttach\" formControlName=\"IsMultiAttach\" color=\"primary\">\n Allegati multipli\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-select [arrayData]=\"AvailableFileExtensions.concat(AvailableImageExtensions)\"\n [(ngModelInput)]=\"field.AllowedExtensions\" [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'value'\"\n [isMultiSelect]=\"true\" placeholder=\"Estensioni accettate\" [formGroupInput]=\"fieldFormGroup\"\n [formControlNameInput]=\"'AllowedExtensions'\" [includeFullObject]=\"false\">\n </eqp-select>\n </div>\n <div class=\"col-sm-12 mt-2\">\n <div class=\"row mt-2\">\n <div class=\"col-sm-12 col-md-6\">\n <div class=\"header-title-standard\">\n Elenco metadata\n </div>\n </div>\n <div class=\"col-sm-12 col-md-6 text-right\">\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"openMetadataDialog()\">\n <mat-icon>add</mat-icon>\n <span style=\"margin-left: 10px;\">Aggiungi</span>\n </button>\n </div>\n </div>\n <eqp-table #metadataFieldsTable [createMatCard]=\"false\" [columns]=\"metadataColumns\"\n [data]=\"field.MetadataFields\" [emptyTableMessage]=\"'Nessun metadata inserito'\" [searchText]=\"'Cerca'\">\n </eqp-table>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI IMMAGINE -->\n<ng-template #imageFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2 mb-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.ImageIsContextualAttachment\" formControlName=\"ImageIsContextualAttachment\"\n color=\"primary\" (ngModelChange)=\"onImageIsContextualAttachmentChange()\">\n Immagine pre-caricata nel campo\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2 mb-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.EnableDrawing\" formControlName=\"EnableDrawing\" color=\"primary\">\n Abilita il disegno\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\"\n *ngIf=\"!field.ImageIsContextualAttachment\">\n <mat-slide-toggle [(ngModel)]=\"field.AttachDefinition.IsMultiAttach\" formControlName=\"IsMultiAttach\"\n color=\"primary\">\n Immagini multiple\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" *ngIf=\"!field.ImageIsContextualAttachment\">\n <eqp-select [arrayData]=\"AvailableImageExtensions\" [(ngModelInput)]=\"field.AttachDefinition.AllowedExtensions\"\n [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'value'\" [isMultiSelect]=\"true\"\n placeholder=\"Estensioni accettate\" [formGroupInput]=\"fieldFormGroup\"\n [formControlNameInput]=\"'AllowedExtensions'\" [includeFullObject]=\"false\">\n </eqp-select>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\" *ngIf=\"field.ImageIsContextualAttachment\">\n <mat-form-field>\n <mat-label> Nome immagine </mat-label>\n <input formControlName=\"ImgName\" matInput [(ngModel)]=\"field.ImgName\" required>\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-8 mt-2\" [formGroup]=\"fieldFormGroup\" *ngIf=\"field.ImageIsContextualAttachment\">\n <eqp-attachments [attachmentsList]=\"field._contextualAttachments\" [showMatCard]=\"false\" [allowOnlyImages]=\"true\"\n [isDisabled]=\"false\" [showInlinePreview]=\"true\" [multipleAttachment]=\"false\" [showHeader]=\"false\"\n (localEditedAttachments)=\"catchContextualAttachmentChange($event)\" #contextualAttachmentEqpAttachments>\n </eqp-attachments>\n </div>\n <div class=\"col-sm-12 mt-2\">\n <div class=\"row mt-2\">\n <div class=\"col-sm-12 col-md-6\">\n <div class=\"header-title-standard\">\n Elenco metadata\n </div>\n </div>\n <div class=\"col-sm-12 col-md-6 text-right\">\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"openMetadataDialog()\">\n <mat-icon>add</mat-icon>\n <span style=\"margin-left: 10px;\">Aggiungi</span>\n </button>\n </div>\n </div>\n <eqp-table #metadataFieldsTable [createMatCard]=\"false\" [columns]=\"metadataColumns\"\n [data]=\"field.AttachDefinition.MetadataFields\" [emptyTableMessage]=\"'Nessun metadata inserito'\"\n [searchText]=\"'Cerca'\">\n </eqp-table>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI LISTA DI VALORI -->\n<ng-template #listValueFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.IsMultiChoiche\" formControlName=\"IsMultiChoiche\" color=\"primary\">\n Scelta multipla\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-select [enumData]=\"ListPresentationEnum\" [(ngModelInput)]=\"field.PresentationMode\" [isRequired]=\"true\"\n [showCancelButton]=\"false\" placeholder=\"Tipo di presentazione\" [formGroupInput]=\"fieldFormGroup\"\n [formControlNameInput]=\"'PresentationMode'\">\n </eqp-select>\n </div>\n <div class=\"col-sm-12 mt-2\">\n <div class=\"row\">\n <h4 class=\"key-value-list-section-title\"> </h4>\n <div class=\"col-md-4 d-flex align-items-center\">\n <mat-form-field>\n <mat-label> Label opzione (invio per confermare)</mat-label>\n <input matInput [(ngModel)]=\"keyValueObject.key\" (keyup)=\"onMultiSelectInputKeyup($event, null)\">\n </mat-form-field>\n </div>\n <div class=\"col-md-4 d-flex align-items-center\">\n <mat-form-field>\n <mat-label> Valore opzione (invio per confermare)</mat-label>\n <input matInput [(ngModel)]=\"keyValueObject.value\" (keyup)=\"onMultiSelectInputKeyup($event, null)\">\n </mat-form-field>\n </div>\n <div class=\"col-md-4 d-flex align-items-center\">\n <span class=\"mr-3\">Opzioni inserite:</span>\n <ul class=\"value-pairs-list\">\n <li *ngFor=\"let keyValuePair of getDictionaryKeyValue()\">\n <mat-icon class=\"mr-1\" (click)=\"deleteKeyFromDictionary(keyValuePair.key)\">close\n </mat-icon>\n <span><b>Label: </b> {{keyValuePair.key}} - <b>Valore: </b> {{keyValuePair.value}}</span>\n </li>\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI LOOKUP -->\n<ng-template #lookupFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.UseAsGetOrDiscard\" formControlName=\"UseAsGetOrDiscard\" color=\"primary\"\n matTooltip=\"Se true la lookup viene visualizzata in una modale per lo scegli scarta\">\n Usa per scegli o scarta\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field matTooltip=\"Nome dell'entit\u00E0 relazionata\">\n <mat-label> Nome entit\u00E0 </mat-label>\n <input formControlName=\"EntitySourceName\" required matInput [(ngModel)]=\"field.EntitySourceName\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 mt-2\">\n <div class=\"row\">\n <div class=\"col-md-4\">\n <mat-form-field\n matTooltip=\"Elenco di campi ordinato che verr\u00E0 visualizzato nella lookup (premere invio per confermare)\">\n <mat-label>\n Nomi dei campi (invio per confermare) </mat-label>\n <input matInput (keyup)=\"onMultiSelectInputKeyup($event, 'FieldNames')\">\n </mat-form-field>\n </div>\n <div class=\"col-md-8 d-flex align-items-center\">\n <span class=\"mr-3\">Nomi selezionati:</span>\n <div class=\"extension-container\" *ngFor=\"let extension of field.FieldNames; let i = index\">\n <span>{{extension}}</span>\n <mat-icon class=\"ml-1\" (click)=\"field.FieldNames.splice(i,1)\">close\n </mat-icon>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<!-- DIALOG PER AGGIUNGERE UN METADATA NEI CAMPI DI TIPO ALLEGATO O IMMAGINE -->\n<ng-template #dialogMetadata>\n <eqp-dynamic-module-add-form-field [field]=\"selectedMetadata\" [availableFields]=\"availableFields\"\n [indexField]=\"indexSelectedMetadata\" (saveFieldEvent)=\"onSaveMetadata($event)\" [fieldTypesToExclude]=\"[6,7,10]\">\n </eqp-dynamic-module-add-form-field>\n</ng-template>",
2577
+ template: "<div class=\"container-fluid\" style=\"max-height: 70vh !important; overflow-x: hidden; overflow-y: auto;\">\r\n <form [formGroup]=\"fieldFormGroup\">\r\n <div class=\"row\">\r\n <div class=\"header-title-standard\">{{indexField != null && indexField >= 0 ? \"Modifica\"\r\n : \"Aggiungi\"}} campo</div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-select [enumData]=\"FieldTypeEnum\" [(ngModelInput)]=\"field.FieldType\" [isRequired]=\"true\"\r\n [showCancelButton]=\"false\" placeholder=\"Tipo campo\" (ngModelInputChange)=\"onFieldTypeChange()\"\r\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'FieldType'\"\r\n [enumDataToExclude]=\"fieldTypesToExclude\">\r\n </eqp-select>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Label </mat-label>\r\n <input formControlName=\"Label\" required matInput [(ngModel)]=\"field.Label\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Descrizione </mat-label>\r\n <input formControlName=\"Description\" required matInput [(ngModel)]=\"field.Description\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\">\r\n <mat-slide-toggle [(ngModel)]=\"field.Required\" formControlName=\"Required\" color=\"primary\">\r\n Obbligatorio\r\n </mat-slide-toggle>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Formula (Javascript) </mat-label>\r\n <input formControlName=\"Formula\" matInput [(ngModel)]=\"field.Formula\"\r\n [matAutocomplete]=\"formulaAutocomplete\" (keyup)=\"setFormulaAutocompleteOptions($event)\"\r\n (focus)=\"setFormulaAutocompleteOptions(null)\">\r\n <mat-autocomplete #formulaAutocomplete=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of formulaAutocompleteOptions\" [value]=\"option.value\">\r\n {{option.label}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\" *ngIf=\"formFieldsGroups\">\r\n <eqp-select [arrayData]=\"formFieldsGroups\" [(ngModelInput)]=\"field.FieldGroup\"\r\n [arrayKeyProperty]=\"'Name'\" [arrayValueProperty]=\"'Name'\" placeholder=\"Sezione\"\r\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'FieldGroup'\" [isRequired]=\"true\"\r\n [includeFullObject]=\"false\">\r\n </eqp-select>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-select [arrayData]=\"availableColSpanSizes\" [(ngModelInput)]=\"field.ColSpanSizes\"\r\n [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'value'\" (ngModelInputChange)=\"onColSpanSizeSelect()\"\r\n [isMultiSelect]=\"true\" placeholder=\"Larghezza campo\" [formGroupInput]=\"fieldFormGroup\"\r\n [formControlNameInput]=\"'ColSpanSizes'\" [includeFullObject]=\"false\">\r\n </eqp-select>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\">\r\n <mat-slide-toggle [(ngModel)]=\"field.InListView\" formControlName=\"InListView\" color=\"primary\"\r\n [disabled]=\"fieldFormGroup.controls['InListView'].disabled\">\r\n Mostrare nella visualizzazione a lista\r\n </mat-slide-toggle>\r\n </div>\r\n\r\n <ng-container *ngTemplateOutlet=\"fieldTypeFormTemplate\">\r\n </ng-container>\r\n </div>\r\n\r\n\r\n <div class=\"row mt-2 mb-1\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"mr-2\" mat-raised-button color=\"primary\" (click)=\"saveAndExitAddField(true)\"\r\n [disabled]=\"disableSaveField()\" type=\"button\">\r\n Salva\r\n </button>\r\n <button class=\"btn mat-raised-button\" (click)=\"saveAndExitAddField(false)\" type=\"button\">\r\n Esci\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI DI TESTO -->\r\n<ng-template #textFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4\">\r\n <eqp-select [enumData]=\"TextMaskEnum\" [(ngModelInput)]=\"field.TextMask\" placeholder=\"Maschera\"\r\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'TextMask'\">\r\n </eqp-select>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Lunghezza massima </mat-label>\r\n <input formControlName=\"MaxLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MaxLenght\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Lunghezza minima </mat-label>\r\n <input formControlName=\"MinLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MinLenght\">\r\n </mat-form-field>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI AREA DI TESTO -->\r\n<ng-template #textareaFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Righe </mat-label>\r\n <input formControlName=\"Rows\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.Rows\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Lunghezza massima </mat-label>\r\n <input formControlName=\"MaxLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MaxLenght\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Lunghezza minima </mat-label>\r\n <input formControlName=\"MinLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MinLenght\">\r\n </mat-form-field>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI BOOLEANI -->\r\n<ng-template #booleadFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.IsTristate\" formControlName=\"IsTristate\" color=\"primary\">\r\n A tre stati\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-select [enumData]=\"BoolPresentantioEnum\" [(ngModelInput)]=\"field.PresetationType\" [isRequired]=\"true\"\r\n [showCancelButton]=\"false\" placeholder=\"Tipo di presentazione\" [formGroupInput]=\"fieldFormGroup\"\r\n [formControlNameInput]=\"'PresetationType'\">\r\n </eqp-select>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI DATA -->\r\n<ng-template #dateFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-datetimepicker [placeholder]=\"'Data minima'\" [(ngModelInput)]=\"field.MinDate\"\r\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'MinDate'\" [UTCDate]=\"true\" [showSeconds]=\"false\">\r\n </eqp-datetimepicker>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-datetimepicker [placeholder]=\"'Data massima'\" [(ngModelInput)]=\"field.MaxDate\"\r\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'MaxDate'\" [UTCDate]=\"true\" [showSeconds]=\"false\">\r\n </eqp-datetimepicker>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-select [enumData]=\"DateTimeTypeEnum\" [(ngModelInput)]=\"field.IsOnlyDate\" [isRequired]=\"true\"\r\n [showCancelButton]=\"false\" placeholder=\"Tipo di data\" [formGroupInput]=\"fieldFormGroup\"\r\n [formControlNameInput]=\"'IsOnlyDate'\">\r\n </eqp-select>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Formato </mat-label>\r\n <input formControlName=\"DateFormat\" matInput [(ngModel)]=\"field.DateFormat\"\r\n [matTooltip]=\"'Indicare il formato senguendo la guida del pacchetto momentjs.'\">\r\n </mat-form-field>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI NUMERICI -->\r\n<ng-template #numericFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.IsInteger\" formControlName=\"IsInteger\" color=\"primary\">\r\n Valore intero\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Separatore decimali </mat-label>\r\n <input formControlName=\"DecimalSeparator\" matInput [(ngModel)]=\"field.DecimalSeparator\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Precisione decimali </mat-label>\r\n <input formControlName=\"DecimalPrecision\" type=\"number\" [min]=\"0\" matInput\r\n [(ngModel)]=\"field.DecimalPrecision\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Separatore migliaia </mat-label>\r\n <input formControlName=\"ThousandsSeparator\" matInput [(ngModel)]=\"field.ThousandsSeparator\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Simbolo valuta </mat-label>\r\n <input formControlName=\"CurrencySymbol\" matInput [(ngModel)]=\"field.CurrencySymbol\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Valore massimo </mat-label>\r\n <input formControlName=\"MinValue\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MinValue\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Valore minimo </mat-label>\r\n <input formControlName=\"MaxValue\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MaxValue\">\r\n </mat-form-field>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI ALLEGATO -->\r\n<ng-template #attachmentFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.IsMultiAttach\" formControlName=\"IsMultiAttach\" color=\"primary\">\r\n Allegati multipli\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-select [arrayData]=\"AvailableFileExtensions.concat(AvailableImageExtensions)\"\r\n [(ngModelInput)]=\"field.AllowedExtensions\" [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'value'\"\r\n [isMultiSelect]=\"true\" placeholder=\"Estensioni accettate\" [formGroupInput]=\"fieldFormGroup\"\r\n [formControlNameInput]=\"'AllowedExtensions'\" [includeFullObject]=\"false\">\r\n </eqp-select>\r\n </div>\r\n <div class=\"col-sm-12 mt-2\">\r\n <div class=\"row mt-2\">\r\n <div class=\"col-sm-12 col-md-6\">\r\n <div class=\"header-title-standard\">\r\n Elenco metadata\r\n </div>\r\n </div>\r\n <div class=\"col-sm-12 col-md-6 text-right\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"openMetadataDialog()\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi</span>\r\n </button>\r\n </div>\r\n </div>\r\n <eqp-table #metadataFieldsTable [createMatCard]=\"false\" [columns]=\"metadataColumns\"\r\n [data]=\"field.MetadataFields\" [emptyTableMessage]=\"'Nessun metadata inserito'\" [searchText]=\"'Cerca'\">\r\n </eqp-table>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI IMMAGINE -->\r\n<ng-template #imageFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2 mb-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.ImageIsContextualAttachment\" formControlName=\"ImageIsContextualAttachment\"\r\n color=\"primary\" (ngModelChange)=\"onImageIsContextualAttachmentChange()\">\r\n Immagine pre-caricata nel campo\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2 mb-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.EnableDrawing\" formControlName=\"EnableDrawing\" color=\"primary\">\r\n Abilita il disegno\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\"\r\n *ngIf=\"!field.ImageIsContextualAttachment\">\r\n <mat-slide-toggle [(ngModel)]=\"field.AttachDefinition.IsMultiAttach\" formControlName=\"IsMultiAttach\"\r\n color=\"primary\">\r\n Immagini multiple\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" *ngIf=\"!field.ImageIsContextualAttachment\">\r\n <eqp-select [arrayData]=\"AvailableImageExtensions\" [(ngModelInput)]=\"field.AttachDefinition.AllowedExtensions\"\r\n [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'value'\" [isMultiSelect]=\"true\"\r\n placeholder=\"Estensioni accettate\" [formGroupInput]=\"fieldFormGroup\"\r\n [formControlNameInput]=\"'AllowedExtensions'\" [includeFullObject]=\"false\">\r\n </eqp-select>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\" *ngIf=\"field.ImageIsContextualAttachment\">\r\n <mat-form-field>\r\n <mat-label> Nome immagine </mat-label>\r\n <input formControlName=\"ImgName\" matInput [(ngModel)]=\"field.ImgName\" required>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-8 mt-2\" [formGroup]=\"fieldFormGroup\" *ngIf=\"field.ImageIsContextualAttachment\">\r\n <eqp-attachments [attachmentsList]=\"field._contextualAttachments\" [showMatCard]=\"false\" [allowOnlyImages]=\"true\"\r\n [isDisabled]=\"false\" [showInlinePreview]=\"true\" [multipleAttachment]=\"false\" [showHeader]=\"false\"\r\n (localEditedAttachments)=\"catchContextualAttachmentChange($event)\" #contextualAttachmentEqpAttachments>\r\n </eqp-attachments>\r\n </div>\r\n <div class=\"col-sm-12 mt-2\">\r\n <div class=\"row mt-2\">\r\n <div class=\"col-sm-12 col-md-6\">\r\n <div class=\"header-title-standard\">\r\n Elenco metadata\r\n </div>\r\n </div>\r\n <div class=\"col-sm-12 col-md-6 text-right\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"openMetadataDialog()\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi</span>\r\n </button>\r\n </div>\r\n </div>\r\n <eqp-table #metadataFieldsTable [createMatCard]=\"false\" [columns]=\"metadataColumns\"\r\n [data]=\"field.AttachDefinition.MetadataFields\" [emptyTableMessage]=\"'Nessun metadata inserito'\"\r\n [searchText]=\"'Cerca'\">\r\n </eqp-table>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI LISTA DI VALORI -->\r\n<ng-template #listValueFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.IsMultiChoiche\" formControlName=\"IsMultiChoiche\" color=\"primary\">\r\n Scelta multipla\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-select [enumData]=\"ListPresentationEnum\" [(ngModelInput)]=\"field.PresentationMode\" [isRequired]=\"true\"\r\n [showCancelButton]=\"false\" placeholder=\"Tipo di presentazione\" [formGroupInput]=\"fieldFormGroup\"\r\n [formControlNameInput]=\"'PresentationMode'\" (ngModelInputChange)=\"onPresentationModeChange()\">\r\n </eqp-select>\r\n </div>\r\n <div class=\"col-sm-12 mt-2\" *ngIf=\"field.PresentationMode != ListPresentationEnum.Immagini\">\r\n <div class=\"row\">\r\n <h4 class=\"key-value-list-section-title\"> </h4>\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <mat-form-field>\r\n <mat-label> Label opzione (invio per confermare)</mat-label>\r\n <input matInput [(ngModel)]=\"keyValueObject.key\" (keyup)=\"onMultiSelectInputKeyup($event, null)\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <mat-form-field>\r\n <mat-label> Valore opzione (invio per confermare)</mat-label>\r\n <input matInput [(ngModel)]=\"keyValueObject.value\" (keyup)=\"onMultiSelectInputKeyup($event, null)\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <span class=\"mr-3\">Opzioni inserite:</span>\r\n <ul class=\"value-pairs-list\">\r\n <li *ngFor=\"let keyValuePair of getDictionaryKeyValue()\">\r\n <mat-icon class=\"mr-1\" (click)=\"deleteKeyFromDictionary(keyValuePair.key)\">close\r\n </mat-icon>\r\n <span><b>Label: </b> {{keyValuePair.key}} - <b>Valore: </b> {{keyValuePair.value}}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-12 col-md-12 mt-2\" *ngIf=\"field.PresentationMode == ListPresentationEnum.Immagini\">\r\n <eqp-attachments [attachmentsList]=\"field.ButtonImageList\" [showMatCard]=\"false\" [allowOnlyImages]=\"true\"\r\n [isDisabled]=\"false\" [showInlinePreview]=\"true\" [multipleAttachment]=\"true\" [showHeader]=\"false\"\r\n [allowedTypes]=\"[AttachmentType.FILE]\" (localEditedAttachments)=\"catchButtonImagesChange($event)\"\r\n (onComponentLoaded)=\"configureButtonImagesColumns($event)\">\r\n </eqp-attachments>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI LOOKUP -->\r\n<ng-template #lookupFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.UseAsGetOrDiscard\" formControlName=\"UseAsGetOrDiscard\" color=\"primary\"\r\n matTooltip=\"Se true la lookup viene visualizzata in una modale per lo scegli scarta\">\r\n Usa per scegli o scarta\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field matTooltip=\"Nome dell'entit\u00E0 relazionata\">\r\n <mat-label> Nome entit\u00E0 </mat-label>\r\n <input formControlName=\"EntitySourceName\" required matInput [(ngModel)]=\"field.EntitySourceName\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 mt-2\">\r\n <div class=\"row\">\r\n <div class=\"col-md-4\">\r\n <mat-form-field\r\n matTooltip=\"Elenco di campi ordinato che verr\u00E0 visualizzato nella lookup (premere invio per confermare)\">\r\n <mat-label>\r\n Nomi dei campi (invio per confermare) </mat-label>\r\n <input matInput (keyup)=\"onMultiSelectInputKeyup($event, 'FieldNames')\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-8 d-flex align-items-center\">\r\n <span class=\"mr-3\">Nomi selezionati:</span>\r\n <div class=\"extension-container\" *ngFor=\"let extension of field.FieldNames; let i = index\">\r\n <span>{{extension}}</span>\r\n <mat-icon class=\"ml-1\" (click)=\"field.FieldNames.splice(i,1)\">close\r\n </mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- DIALOG PER AGGIUNGERE UN METADATA NEI CAMPI DI TIPO ALLEGATO O IMMAGINE -->\r\n<ng-template #dialogMetadata>\r\n <eqp-dynamic-module-add-form-field [field]=\"selectedMetadata\" [availableFields]=\"availableFields\"\r\n [indexField]=\"indexSelectedMetadata\" (saveFieldEvent)=\"onSaveMetadata($event)\" [fieldTypesToExclude]=\"[6,7,10]\">\r\n </eqp-dynamic-module-add-form-field>\r\n</ng-template>\r\n\r\n<ng-template #buttonImagesKeyValueInputColumn let-row=\"row\" let-col=\"col\">\r\n <mat-form-field>\r\n <mat-label> {{col.display}} </mat-label>\r\n <input matInput [(ngModel)]=\"row[col.key]\" required>\r\n </mat-form-field>\r\n</ng-template>",
1952
2578
  styles: [".extension-container{display:inline-block;font-size:15px;border:1px solid var(--primary);border-radius:15px;margin-right:10px}.extension-container mat-icon{vertical-align:middle;font-size:15px;height:15px;width:15px;color:var(--danger);margin-right:10px;cursor:pointer}.extension-container span{margin-left:10px}.key-value-list-section-title{background:linear-gradient(to right,var(--gray) 0,#fff 100%) left bottom #fff no-repeat;background-size:100% 1px}.value-pairs-list{list-style:none;padding:0}.value-pairs-list mat-icon{vertical-align:middle;font-size:15px;height:15px;width:15px;color:var(--danger);margin-right:10px;cursor:pointer}"]
1953
2579
  })
1954
2580
  ], AddFormFieldComponent);
@@ -1958,6 +2584,7 @@
1958
2584
  var TextFieldTemplateComponent = /** @class */ (function () {
1959
2585
  function TextFieldTemplateComponent() {
1960
2586
  this.recordChange = new core.EventEmitter();
2587
+ this.InputMaskEnum = exports.TextMaskEnum;
1961
2588
  }
1962
2589
  TextFieldTemplateComponent.prototype.ngOnInit = function () {
1963
2590
  };
@@ -1968,6 +2595,20 @@
1968
2595
  this.updateField();
1969
2596
  }
1970
2597
  };
2598
+ TextFieldTemplateComponent.prototype.getInputType = function () {
2599
+ switch (this.field.TextMask) {
2600
+ case exports.TextMaskEnum.Email:
2601
+ return 'email';
2602
+ case exports.TextMaskEnum.Password:
2603
+ return 'password';
2604
+ case exports.TextMaskEnum.Telefono:
2605
+ return 'tel';
2606
+ case exports.TextMaskEnum.Url:
2607
+ return 'url';
2608
+ default:
2609
+ return 'text';
2610
+ }
2611
+ };
1971
2612
  /**
1972
2613
  * Metodo per aggiornare il valore del campo quando questo è rappresentato da una formula.
1973
2614
  */
@@ -1996,7 +2637,7 @@
1996
2637
  TextFieldTemplateComponent = __decorate([
1997
2638
  core.Component({
1998
2639
  selector: 'text-field-template',
1999
- template: "<mat-form-field [formGroup]=\"field.FormFormGroup\">\r\n <mat-label> {{field.Label}} </mat-label>\r\n <input matInput type=\"text\" [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\"\r\n [required]=\"field.Required\" [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\r\n</mat-form-field>",
2640
+ template: "<mat-form-field [formGroup]=\"field.FormFormGroup\">\r\n <mat-label> {{field.Label}} </mat-label>\r\n <input matInput [type]=\"getInputType()\" [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\"\r\n [required]=\"field.Required\" [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\r\n</mat-form-field>",
2000
2641
  styles: [""]
2001
2642
  })
2002
2643
  ], TextFieldTemplateComponent);
@@ -2048,7 +2689,7 @@
2048
2689
  BooleanFieldTemplateComponent = __decorate([
2049
2690
  core.Component({
2050
2691
  selector: 'boolean-field-template',
2051
- template: "<div [formGroup]=\"field.FormFormGroup\">\n\n <!-- VISUALIZZAZIONE A TOGGLE -->\n <mat-slide-toggle color=\"primary\" *ngIf=\"field.PresetationType == BoolPresentantioEnum.Toggle\"\n [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\"\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\n {{field.Label + (field.Required ? \" *\" : \"\")}}\n </mat-slide-toggle>\n\n\n <!-- VISUALIZZAZIONE A RADIOBUTTON -->\n <mat-label class=\"mr-3\" *ngIf=\"field.PresetationType == BoolPresentantioEnum['Radio button']\">\n {{field.Label + (field.Required ? \" *\" : \"\")}}\n </mat-label>\n <mat-radio-group *ngIf=\"field.PresetationType == BoolPresentantioEnum['Radio button']\"\n [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\"\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\n <mat-radio-button class=\"mr-2\" [value]=\"true\" color=\"primary\"> Si </mat-radio-button>\n <mat-radio-button class=\"mr-2\" [value]=\"false\" color=\"primary\"> No </mat-radio-button>\n <mat-radio-button class=\"mr-2\" [value]=\"null\" color=\"primary\" *ngIf=\"field.IsTristate\"> ND\n </mat-radio-button>\n </mat-radio-group>\n\n <!-- VISUALIZZAZIONE A CHECKBOX -->\n <mat-checkbox class=\"mr-2\" *ngIf=\"field.PresetationType == BoolPresentantioEnum.Checkbox\"\n [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\" [formControlName]=\"field.Name\"\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\n {{field.Label + (field.Required ? \" *\" : \"\")}}\n </mat-checkbox>\n\n <!-- TODO: Visualizzazione \"Stringa true o false\" e \"Numerico 0 o 1\" ?? -->\n</div>",
2692
+ template: "<div [formGroup]=\"field.FormFormGroup\">\r\n\r\n <!-- VISUALIZZAZIONE A TOGGLE -->\r\n <mat-slide-toggle color=\"primary\" *ngIf=\"field.PresetationType == BoolPresentantioEnum.Toggle\"\r\n [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\"\r\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\r\n {{field.Label + (field.Required ? \" *\" : \"\")}}\r\n </mat-slide-toggle>\r\n\r\n\r\n <!-- VISUALIZZAZIONE A RADIOBUTTON -->\r\n <mat-label class=\"mr-3\" *ngIf=\"field.PresetationType == BoolPresentantioEnum['Radio button']\">\r\n {{field.Label + (field.Required ? \" *\" : \"\")}}\r\n </mat-label>\r\n <mat-radio-group *ngIf=\"field.PresetationType == BoolPresentantioEnum['Radio button']\"\r\n [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\"\r\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\r\n <mat-radio-button class=\"mr-2\" [value]=\"true\" color=\"primary\"> Si </mat-radio-button>\r\n <mat-radio-button class=\"mr-2\" [value]=\"false\" color=\"primary\"> No </mat-radio-button>\r\n <mat-radio-button class=\"mr-2\" [value]=\"null\" color=\"primary\" *ngIf=\"field.IsTristate\"> ND\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n\r\n <!-- VISUALIZZAZIONE A CHECKBOX -->\r\n <mat-checkbox class=\"mr-2\" *ngIf=\"field.PresetationType == BoolPresentantioEnum.Checkbox\"\r\n [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\" [formControlName]=\"field.Name\"\r\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\r\n {{field.Label + (field.Required ? \" *\" : \"\")}}\r\n </mat-checkbox>\r\n\r\n <!-- TODO: Visualizzazione \"Stringa true o false\" e \"Numerico 0 o 1\" ?? -->\r\n</div>",
2052
2693
  styles: [""]
2053
2694
  })
2054
2695
  ], BooleanFieldTemplateComponent);
@@ -2114,7 +2755,7 @@
2114
2755
  DateFieldTemplateComponent = __decorate([
2115
2756
  core.Component({
2116
2757
  selector: 'date-field-template',
2117
- template: "<eqp-datetimepicker [placeholder]=\"field.Label\" [UTCDate]=\"true\" [pickerMode]=\"pickerMode\"\n [formGroupInput]=\"field.FormFormGroup\" [formControlNameInput]=\"field.Name\"\n [minDate]=\"field.MinDate ? field.MinDate : null\" [maxDate]=\"field.MaxDate ? field.MaxDate : null\"\n [isRequired]=\"field.Required\" [disabled]=\"field.FormFormGroup.disabled\" [(ngModelInput)]=\"record[field.Name]\"\n (ngModelInputChange)=\"onRecordValueChange()\">\n</eqp-datetimepicker>",
2758
+ template: "<eqp-datetimepicker [placeholder]=\"field.Label\" [UTCDate]=\"true\" [pickerMode]=\"pickerMode\"\r\n [formGroupInput]=\"field.FormFormGroup\" [formControlNameInput]=\"field.Name\"\r\n [minDate]=\"field.MinDate ? field.MinDate : null\" [maxDate]=\"field.MaxDate ? field.MaxDate : null\"\r\n [isRequired]=\"field.Required\" [disabled]=\"field.FormFormGroup.disabled\" [(ngModelInput)]=\"record[field.Name]\"\r\n (ngModelInputChange)=\"onRecordValueChange()\" [customDateFormat]=\"field.DateFormat ? field.DateFormat : null\">\r\n</eqp-datetimepicker>",
2118
2759
  styles: [""]
2119
2760
  })
2120
2761
  ], DateFieldTemplateComponent);
@@ -2162,7 +2803,7 @@
2162
2803
  TextareaFieldTemplateComponent = __decorate([
2163
2804
  core.Component({
2164
2805
  selector: 'textarea-field-template',
2165
- template: "<mat-form-field [formGroup]=\"field.FormFormGroup\">\n <textarea matInput [placeholder]=\"field.Label\" [rows]=\"field.Rows\" [formControlName]=\"field.Name\"\n [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\" [(ngModel)]=\"record[field.Name]\"\n (ngModelChange)=\"onRecordValueChange()\"></textarea>\n</mat-form-field>",
2806
+ template: "<mat-form-field [formGroup]=\"field.FormFormGroup\">\r\n <textarea matInput [placeholder]=\"field.Label\" [rows]=\"field.Rows\" [formControlName]=\"field.Name\"\r\n [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\" [(ngModel)]=\"record[field.Name]\"\r\n (ngModelChange)=\"onRecordValueChange()\"></textarea>\r\n</mat-form-field>",
2166
2807
  styles: [""]
2167
2808
  })
2168
2809
  ], TextareaFieldTemplateComponent);
@@ -2205,10 +2846,17 @@
2205
2846
  */
2206
2847
  NumericFieldTemplateComponent.prototype.configureEqpNumericOptions = function () {
2207
2848
  this.eqpNumericOptions.prefix = this.field.CurrencySymbol ? this.field.CurrencySymbol : "";
2849
+ this.eqpNumericOptions.inputMode = this.field.CurrencySymbol ? eqpNumeric.EqpNumericInputMode.FINANCIAL : eqpNumeric.EqpNumericInputMode.NATURAL;
2208
2850
  if (this.field.MinValue != null && this.field.MinValue != undefined)
2209
2851
  this.eqpNumericOptions.min = this.field.MinValue;
2210
2852
  if (this.field.MaxValue != null && this.field.MaxValue != undefined)
2211
2853
  this.eqpNumericOptions.max = this.field.MaxValue;
2854
+ if (this.field.DecimalSeparator != null && this.field.DecimalSeparator != undefined)
2855
+ this.eqpNumericOptions.decimal = this.field.DecimalSeparator;
2856
+ if (this.field.ThousandsSeparator != null && this.field.ThousandsSeparator != undefined)
2857
+ this.eqpNumericOptions.thousands = this.field.ThousandsSeparator;
2858
+ if (this.field.DecimalPrecision != null && this.field.DecimalPrecision != undefined)
2859
+ this.eqpNumericOptions.precision = this.field.DecimalPrecision;
2212
2860
  };
2213
2861
  __decorate([
2214
2862
  core.Input()
@@ -2222,7 +2870,7 @@
2222
2870
  NumericFieldTemplateComponent = __decorate([
2223
2871
  core.Component({
2224
2872
  selector: 'numeric-field-template',
2225
- template: "<mat-form-field [formGroup]=\"field.FormFormGroup\">\n <mat-label> {{field.Label}} </mat-label>\n <input matInput eqpNumericMask [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\"\n [required]=\"field.Required\" [(ngModel)]=\"record[field.Name]\" [options]=\"eqpNumericOptions\"\n [step]=\"field.IsInteger ? 1 : null\" (ngModelChange)=\"onRecordValueChange()\" />\n</mat-form-field>",
2873
+ template: "<mat-form-field [formGroup]=\"field.FormFormGroup\">\r\n <mat-label> {{field.Label}} </mat-label>\r\n <input matInput eqpNumericMask [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\"\r\n [required]=\"field.Required\" [(ngModel)]=\"record[field.Name]\" [options]=\"eqpNumericOptions\"\r\n [step]=\"field.IsInteger ? 1 : null\" (ngModelChange)=\"onRecordValueChange()\" />\r\n</mat-form-field>",
2226
2874
  styles: [""]
2227
2875
  })
2228
2876
  ], NumericFieldTemplateComponent);
@@ -2260,26 +2908,17 @@
2260
2908
  this.record[this.field.Name] = UtilityHelperService.EvaluateFieldFormula(this.field.Formula, this.record, null);
2261
2909
  }
2262
2910
  };
2263
- /**
2264
- * Metodo per recuperare la classe da applicare al button (nella relativa visualizzazione).
2265
- * Se il pulsante è stato selezionato imposta la classe "selected-button".
2266
- * @param data Oggetto bindato al pulsante
2267
- * @returns Restituisce la classe da applicare tramite [ngClass]
2268
- */
2269
- ListValueFieldTemplateComponent.prototype.getSelectButtonClass = function (data) {
2270
- var selectedButtonClass = "selected-button";
2271
- return data.Selected ? selectedButtonClass : null;
2272
- };
2273
2911
  /**
2274
2912
  * Metodo invocato quando viene selezionata un'opzione nella visualizzazione a button
2275
2913
  * @param data Rappresenta l'oggetto selezionato
2276
2914
  */
2277
2915
  ListValueFieldTemplateComponent.prototype.buttonSelectClick = function (data) {
2916
+ data.Selected = !data.Selected;
2278
2917
  if (this.field.IsMultiChoiche) {
2279
- data.Selected = !data.Selected;
2280
2918
  this.updateSelected(false);
2281
2919
  }
2282
2920
  else {
2921
+ this.arrayData.filter(function (d) { return d.Key != data.Key && d.Value != data.Value; }).forEach(function (d) { return d.Selected = false; });
2283
2922
  this.record[this.field.Name] = data.Value;
2284
2923
  }
2285
2924
  this.onRecordValueChange();
@@ -2309,16 +2948,23 @@
2309
2948
  */
2310
2949
  ListValueFieldTemplateComponent.prototype.setArrayData = function () {
2311
2950
  var _this = this;
2312
- Object.keys(this.field.ValuePairs).forEach(function (k) {
2313
- var isOptionSelected;
2314
- if (_this.field.IsMultiChoiche && _this.record[_this.field.Name] && _this.record[_this.field.Name].length > 0) {
2315
- isOptionSelected = !!_this.record[_this.field.Name].find(function (v) { return v == _this.field.ValuePairs[k]; });
2316
- }
2317
- else {
2318
- isOptionSelected = _this.record[_this.field.Name] === _this.field.ValuePairs[k];
2319
- }
2320
- _this.arrayData.push({ Key: k, Value: _this.field.ValuePairs[k], Selected: isOptionSelected });
2321
- });
2951
+ if (this.field.PresentationMode != exports.ListPresentationEnum.Immagini) {
2952
+ Object.keys(this.field.ValuePairs).forEach(function (k) { _this.createArrayDataElement(k, _this.field.ValuePairs[k]); });
2953
+ }
2954
+ else {
2955
+ this.field.ButtonImageList.forEach(function (i) { _this.createArrayDataElement(i.ButtonKey, i.ButtonValue, 'data:' + i.FileContentType + ';base64,' + i.FileDataBase64); });
2956
+ }
2957
+ };
2958
+ ListValueFieldTemplateComponent.prototype.createArrayDataElement = function (key, value, imgUrl) {
2959
+ if (imgUrl === void 0) { imgUrl = null; }
2960
+ var isOptionSelected;
2961
+ if (this.field.IsMultiChoiche && this.record[this.field.Name] && this.record[this.field.Name].length > 0) {
2962
+ isOptionSelected = !!this.record[this.field.Name].find(function (v) { return v == value; });
2963
+ }
2964
+ else {
2965
+ isOptionSelected = this.record[this.field.Name] === value;
2966
+ }
2967
+ this.arrayData.push({ Key: key, Value: value, Selected: isOptionSelected, ImgUrl: imgUrl });
2322
2968
  };
2323
2969
  /**
2324
2970
  * Metodo per aggiornare il valore e il validator del FormControl associato al campo.
@@ -2338,8 +2984,8 @@
2338
2984
  ListValueFieldTemplateComponent = __decorate([
2339
2985
  core.Component({
2340
2986
  selector: 'list-value-field-template',
2341
- template: "<eqp-select *ngIf=\"field.PresentationMode == ListPresentationEnum['Combo box']\" [arrayData]=\"arrayData\"\n [arrayKeyProperty]=\"'Value'\" [showCancelButton]=\"!field.Required\" [arrayValueProperty]=\"'Key'\"\n [formGroupInput]=\"field.FormFormGroup\" [formControlNameInput]=\"field.Name\" [placeholder]=\"field.Label\"\n [includeFullObject]=\"false\" [isRequired]=\"field.Required\" [isDisabled]=\"field.FormFormGroup.disabled\"\n [(ngModelInput)]=\"record[field.Name]\" [isMultiSelect]=\"field.IsMultiChoiche\"\n (ngModelInputChange)=\"onRecordValueChange()\">\n</eqp-select>\n\n<div *ngIf=\"field.PresentationMode != ListPresentationEnum['Combo box']\" [formGroup]=\"field.FormFormGroup\">\n\n <mat-label class=\"mr-3\"> {{field.Label + (field.Required ? \" *\" : \"\")}} </mat-label>\n\n <!-- VISUALIZZAZIONE A RADIO BUTTON (SENZA SELEZIONE MULTIPLA) -->\n <mat-radio-group *ngIf=\"field.PresentationMode == ListPresentationEnum['Radio button'] && !field.IsMultiChoiche\"\n [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\"\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\n <mat-radio-button class=\"mr-2\" *ngFor=\"let data of arrayData\" [value]=\"data.Value\" color=\"primary\">\n {{data.Key}}\n </mat-radio-button>\n </mat-radio-group>\n\n <!-- VISUALIZZAZIONE A CHECKBOX (SELEZIONE MULTIPLA) -->\n <div class=\"d-inline-block\"\n *ngIf=\"field.PresentationMode == ListPresentationEnum['Radio button'] && field.IsMultiChoiche\">\n <mat-checkbox class=\"mr-2\" *ngFor=\"let data of arrayData\" [disabled]=\"field.FormFormGroup.disabled\"\n [formControlName]=\"field.Name\" [(ngModel)]=\"data.Selected\" (ngModelChange)=\"updateSelected()\">\n {{data.Key}}\n </mat-checkbox>\n </div>\n\n <!-- VISUALIZZAZIONE A PULSANTI (CON TESTO) -->\n <div class=\"d-inline-block\" *ngIf=\"field.PresentationMode == ListPresentationEnum['Pulsante con testo']\">\n <button mat-raised-button color=\"primary\" class=\"btn btn-primary mr-2\" *ngFor=\"let data of arrayData\"\n (click)=\"buttonSelectClick(data)\" [ngClass]=\"getSelectButtonClass(data)\"\n [disabled]=\"field.FormFormGroup.disabled\">\n {{data.Key}}\n </button>\n </div>\n\n <!-- TODO: VISUALIZZAZIONE A PULSANTI (CON IMMAGINI) ?? -->\n</div>",
2342
- styles: [".selected-button{opacity:.7}.selected-button:disabled{background-color:var(--primary)!important;opacity:.3;color:#fff}"]
2987
+ template: "<eqp-select *ngIf=\"field.PresentationMode == ListPresentationEnum['Combo box']\" [arrayData]=\"arrayData\"\r\n [arrayKeyProperty]=\"'Value'\" [showCancelButton]=\"!field.Required\" [arrayValueProperty]=\"'Key'\"\r\n [formGroupInput]=\"field.FormFormGroup\" [formControlNameInput]=\"field.Name\" [placeholder]=\"field.Label\"\r\n [includeFullObject]=\"false\" [isRequired]=\"field.Required\" [isDisabled]=\"field.FormFormGroup.disabled\"\r\n [(ngModelInput)]=\"record[field.Name]\" [isMultiSelect]=\"field.IsMultiChoiche\"\r\n (ngModelInputChange)=\"onRecordValueChange()\">\r\n</eqp-select>\r\n\r\n<div *ngIf=\"field.PresentationMode != ListPresentationEnum['Combo box']\" [formGroup]=\"field.FormFormGroup\">\r\n\r\n <mat-label class=\"mr-3\"> {{field.Label + (field.Required ? \" *\" : \"\")}} </mat-label>\r\n\r\n <!-- VISUALIZZAZIONE A RADIO BUTTON (SENZA SELEZIONE MULTIPLA) -->\r\n <mat-radio-group *ngIf=\"field.PresentationMode == ListPresentationEnum['Radio button'] && !field.IsMultiChoiche\"\r\n [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\"\r\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\r\n <mat-radio-button class=\"mr-2\" *ngFor=\"let data of arrayData\" [value]=\"data.Value\" color=\"primary\">\r\n {{data.Key}}\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n\r\n <!-- VISUALIZZAZIONE A CHECKBOX (SELEZIONE MULTIPLA) -->\r\n <div class=\"d-inline-block\"\r\n *ngIf=\"field.PresentationMode == ListPresentationEnum['Radio button'] && field.IsMultiChoiche\">\r\n <mat-checkbox class=\"mr-2\" *ngFor=\"let data of arrayData\" [disabled]=\"field.FormFormGroup.disabled\"\r\n [formControlName]=\"field.Name\" [(ngModel)]=\"data.Selected\" (ngModelChange)=\"updateSelected()\">\r\n {{data.Key}}\r\n </mat-checkbox>\r\n </div>\r\n\r\n <!-- VISUALIZZAZIONE A PULSANTI (CON TESTO O IMMAGINI) -->\r\n <div class=\"d-inline-block\"\r\n *ngIf=\"[ListPresentationEnum['Pulsante con testo'], ListPresentationEnum.Immagini].includes(field.PresentationMode)\">\r\n <button mat-raised-button color=\"primary\" class=\"btn btn-primary m-1 data-button\" *ngFor=\"let data of arrayData\"\r\n [ngClass]=\"{'selected-button': data.Selected == true, 'p-0': field.PresentationMode == ListPresentationEnum.Immagini}\"\r\n (click)=\"buttonSelectClick(data)\" [disabled]=\"field.FormFormGroup.disabled\">\r\n\r\n <!-- TESTO DEL PULSANTE -->\r\n <span *ngIf=\"field.PresentationMode == ListPresentationEnum['Pulsante con testo']\"> {{data.Key}}</span>\r\n\r\n <!-- IMMAGINE DEL PULSANTE -->\r\n <img *ngIf=\"field.PresentationMode == ListPresentationEnum.Immagini\" [src]=\"data.ImgUrl\">\r\n </button>\r\n </div>\r\n\r\n</div>",
2988
+ styles: [".selected-button{opacity:.7}.selected-button:disabled{background-color:var(--primary)!important;opacity:.3;color:#fff}.data-button img{max-height:300px;max-width:300px}"]
2343
2989
  })
2344
2990
  ], ListValueFieldTemplateComponent);
2345
2991
  return ListValueFieldTemplateComponent;
@@ -2505,7 +3151,7 @@
2505
3151
  AttachmentFieldTemplateComponent = __decorate([
2506
3152
  core.Component({
2507
3153
  selector: 'attachment-field-template',
2508
- template: "<p *ngIf=\"!field.IsMultiAttach\" class=\"mb-2\">\n {{field.Label + (field.Required ? \" *\" : \"\")}}\n</p>\n<div class=\"row\" *ngIf=\"!field.IsMultiAttach && record[field.Name] && record[field.Name][0]\">\n <div class=\"mt-2\" *ngFor=\"let metadata of field.MetadataFields\"\n [ngClass]=\"utilityService.getFieldSyleClass(metadata)\">\n <dynamic-module-field [field]=\"metadata\" [record]=\"record[field.Name][0]\"\n (recordChange)=\"updateMetadataValidity()\">\n </dynamic-module-field>\n </div>\n</div>\n\n<eqp-attachments [attachmentsList]=\"record[field.Name]\" [showMatCard]=\"true\" [allowOnlyImages]=\"onlyImages\"\n [isDisabled]=\"field.FormFormGroup.disabled\" [showInlinePreview]=\"true\" [multipleAttachment]=\"field.IsMultiAttach\"\n [disableAction]=\"field.FormFormGroup.disabled\" [acceptedFileTypes]=\"field.AllowedExtensions\" [showHeader]=\"true\"\n [headerTitle]=\"field.Label + (field.Required ? ' *' : '')\" (localEditedAttachments)=\"catchAttachmentList($event)\"\n #eqpAttachments>\n</eqp-attachments>\n\n<!-- TEMPLATE PER VISUALIZZARE LA COLONNA DELLA SEZIONE NELLA TABELLA DEI FIELDS -->\n<ng-template #metadataColumnTemplate let-row=\"row\" let-col=\"col\">\n <dynamic-module-field [field]=\"getFieldFromMetadata(col, row)\" [record]=\"row\"\n (recordChange)=\"updateMetadataValidity()\">\n </dynamic-module-field>\n</ng-template>",
3154
+ template: "<p *ngIf=\"!field.IsMultiAttach\" class=\"mb-2\">\r\n {{field.Label + (field.Required ? \" *\" : \"\")}}\r\n</p>\r\n<div class=\"row\" *ngIf=\"!field.IsMultiAttach && record[field.Name] && record[field.Name][0]\">\r\n <div class=\"mt-2\" *ngFor=\"let metadata of field.MetadataFields\"\r\n [ngClass]=\"utilityService.getFieldSyleClass(metadata)\">\r\n <dynamic-module-field [field]=\"metadata\" [record]=\"record[field.Name][0]\"\r\n (recordChange)=\"updateMetadataValidity()\">\r\n </dynamic-module-field>\r\n </div>\r\n</div>\r\n\r\n<eqp-attachments [attachmentsList]=\"record[field.Name]\" [showMatCard]=\"true\" [allowOnlyImages]=\"onlyImages\"\r\n [isDisabled]=\"field.FormFormGroup.disabled\" [showInlinePreview]=\"true\" [multipleAttachment]=\"field.IsMultiAttach\"\r\n [disableAction]=\"field.FormFormGroup.disabled\" [acceptedFileTypes]=\"field.AllowedExtensions\" [showHeader]=\"true\"\r\n [headerTitle]=\"field.Label + (field.Required ? ' *' : '')\" (localEditedAttachments)=\"catchAttachmentList($event)\"\r\n #eqpAttachments>\r\n</eqp-attachments>\r\n\r\n<!-- TEMPLATE PER VISUALIZZARE LA COLONNA DELLA SEZIONE NELLA TABELLA DEI FIELDS -->\r\n<ng-template #metadataColumnTemplate let-row=\"row\" let-col=\"col\">\r\n <dynamic-module-field [field]=\"getFieldFromMetadata(col, row)\" [record]=\"row\"\r\n (recordChange)=\"updateMetadataValidity()\">\r\n </dynamic-module-field>\r\n</ng-template>",
2509
3155
  styles: [""]
2510
3156
  })
2511
3157
  ], AttachmentFieldTemplateComponent);
@@ -2704,7 +3350,7 @@
2704
3350
  ImageFieldTemplateComponent = __decorate([
2705
3351
  core.Component({
2706
3352
  selector: 'image-field-template',
2707
- template: "<!-- VISUALIZZAZIONE ALLEGATO PRE CARICATO CON POSSIBILITA' DI DISEGNO -->\n<div class=\"row\" *ngIf=\"field.ImageIsContextualAttachment && field.ContextualAttachment\">\n <div class=\"col-sm-12 col-md-6 col-lg-4\">\n <p class=\"mb-2\">\n {{ field.Label + (field.Required ? \" *\" : \"\")}}\n <br>\n Nome immagine: {{ field.ImgName}}\n </p>\n <eqp-img-drawing\n *ngIf=\"field.EnableDrawing && record[field.Name] && record[field.Name][0] && width != null && height != null\"\n [src]=\"'data:'+ record[field.Name][0].FileContentType + ';base64,'+ record[field.Name][0].FileDataBase64\"\n [showCancelButton]=\"false\" [enableLoadAnotherImage]=\"false\" [enableRemoveImage]=\"false\" [width]=\"width\"\n [height]=\"height\" [i18n]=\"i18n\" [showCancelButton]=\"true\" (save)=\"saveDrowning($event)\"\n (cancel)=\"resetPreLoadedImage()\">\n </eqp-img-drawing>\n\n <img *ngIf=\"!field.EnableDrawing\"\n [src]=\"'data:'+ record[field.Name][0].FileContentType+ ';base64,'+ record[field.Name][0].FileDataBase64\">\n </div>\n\n <div class=\"col-sm-12 col-md-6 col-lg-8\">\n <div class=\"row\"\n *ngIf=\"field.AttachDefinition && field.AttachDefinition.MetadataFields && preLoadedImageMetadataFormGroup\">\n <div class=\"mt-2\" *ngFor=\"let metadata of field.AttachDefinition.MetadataFields\"\n [ngClass]=\"utilityService.getFieldSyleClass(metadata)\">\n <dynamic-module-field #fieldTemplate [field]=\"metadata\" [form]=\"preLoadedImageMetadataFormGroup\"\n [record]=\"record[field.Name][0]\" (recordChange)=\"updateMetadataValidity()\">\n </dynamic-module-field>\n </div>\n </div>\n </div>\n</div>\n\n<!-- COMPONENTE IN CUI CARICARE NUOVI ALLEGATI -->\n<attachment-field-template [(record)]=\"record\" [field]=\"field.AttachDefinition\" [onlyImages]=\"true\"\n (onAttachmentsChange)=\"onAttachmentsChange()\" *ngIf=\"!field.ImageIsContextualAttachment\">\n</attachment-field-template>\n\n<!-- DIALOG PER DISEGNARE SUL NUOVO ALLEGATO CARICATO -->\n<ng-template #dialogImageDrowing>\n <div *ngIf=\"field.EnableDrawing && record[field.Name] && record[field.Name][0] && width != null && height != null\"\n class=\"row\">\n <div class=\"col-sm-12 col-md-12\">\n <eqp-img-drawing [showCancelButton]=\"false\" [enableLoadAnotherImage]=\"false\" [enableRemoveImage]=\"false\"\n [src]=\"'data:'+ record[field.Name][0].FileContentType + ';base64,'+ record[field.Name][0].FileDataBase64\"\n [i18n]=\"i18n\" [showCancelButton]=\"false\" (save)=\"saveDrowning($event)\">\n </eqp-img-drawing>\n </div>\n </div>\n <div class=\"row mt-2 mb-1\">\n <div class=\"col-sm-12 text-right\">\n <button class=\"btn mat-raised-button\" (click)=\"closeImageDrowingDialog()\" type=\"button\">\n Annulla disegno\n </button>\n </div>\n </div>\n</ng-template>",
3353
+ template: "<!-- VISUALIZZAZIONE ALLEGATO PRE CARICATO CON POSSIBILITA' DI DISEGNO -->\r\n<div class=\"row\" *ngIf=\"field.ImageIsContextualAttachment && field.ContextualAttachment\">\r\n <div class=\"col-sm-12 col-md-6 col-lg-4\">\r\n <p class=\"mb-2\">\r\n {{ field.Label + (field.Required ? \" *\" : \"\")}}\r\n <br>\r\n Nome immagine: {{ field.ImgName}}\r\n </p>\r\n <eqp-img-drawing\r\n *ngIf=\"field.EnableDrawing && record[field.Name] && record[field.Name][0] && width != null && height != null\"\r\n [src]=\"'data:'+ record[field.Name][0].FileContentType + ';base64,'+ record[field.Name][0].FileDataBase64\"\r\n [showCancelButton]=\"false\" [enableLoadAnotherImage]=\"false\" [enableRemoveImage]=\"false\" [width]=\"width\"\r\n [height]=\"height\" [i18n]=\"i18n\" [showCancelButton]=\"true\" (save)=\"saveDrowning($event)\"\r\n (cancel)=\"resetPreLoadedImage()\">\r\n </eqp-img-drawing>\r\n\r\n <img *ngIf=\"!field.EnableDrawing\"\r\n [src]=\"'data:'+ record[field.Name][0].FileContentType+ ';base64,'+ record[field.Name][0].FileDataBase64\">\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-6 col-lg-8\">\r\n <div class=\"row\"\r\n *ngIf=\"field.AttachDefinition && field.AttachDefinition.MetadataFields && preLoadedImageMetadataFormGroup\">\r\n <div class=\"mt-2\" *ngFor=\"let metadata of field.AttachDefinition.MetadataFields\"\r\n [ngClass]=\"utilityService.getFieldSyleClass(metadata)\">\r\n <dynamic-module-field #fieldTemplate [field]=\"metadata\" [form]=\"preLoadedImageMetadataFormGroup\"\r\n [record]=\"record[field.Name][0]\" (recordChange)=\"updateMetadataValidity()\">\r\n </dynamic-module-field>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- COMPONENTE IN CUI CARICARE NUOVI ALLEGATI -->\r\n<attachment-field-template [(record)]=\"record\" [field]=\"field.AttachDefinition\" [onlyImages]=\"true\"\r\n (onAttachmentsChange)=\"onAttachmentsChange()\" *ngIf=\"!field.ImageIsContextualAttachment\">\r\n</attachment-field-template>\r\n\r\n<!-- DIALOG PER DISEGNARE SUL NUOVO ALLEGATO CARICATO -->\r\n<ng-template #dialogImageDrowing>\r\n <div *ngIf=\"field.EnableDrawing && record[field.Name] && record[field.Name][0] && width != null && height != null\"\r\n class=\"row\">\r\n <div class=\"col-sm-12 col-md-12\">\r\n <eqp-img-drawing [showCancelButton]=\"false\" [enableLoadAnotherImage]=\"false\" [enableRemoveImage]=\"false\"\r\n [src]=\"'data:'+ record[field.Name][0].FileContentType + ';base64,'+ record[field.Name][0].FileDataBase64\"\r\n [i18n]=\"i18n\" [showCancelButton]=\"false\" (save)=\"saveDrowning($event)\">\r\n </eqp-img-drawing>\r\n </div>\r\n </div>\r\n <div class=\"row mt-2 mb-1\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"btn mat-raised-button\" (click)=\"closeImageDrowingDialog()\" type=\"button\">\r\n Annulla disegno\r\n </button>\r\n </div>\r\n </div>\r\n</ng-template>",
2708
3354
  styles: ["::ng-deep image-drawing>button{background-color:var(--primary)!important;color:#fff!important}"]
2709
3355
  })
2710
3356
  ], ImageFieldTemplateComponent);
@@ -2786,30 +3432,14 @@
2786
3432
  * @param record Record da duplicare.
2787
3433
  */
2788
3434
  ListFormRecordComponent.prototype.duplicateRecord = function (record) {
2789
- // EqpDynamicModuleDialogService.Confirm('Duplicare il record selezionato?', () => {
2790
- // var copiedRecord: Record = JSON.parse(JSON.stringify(record));
2791
- // if (!isNaN(parseInt(copiedRecord.ID))) {
2792
- // copiedRecord.ID = (parseInt(copiedRecord.ID) + 1).toString();
2793
- // } else {
2794
- // copiedRecord.ID = "xxxxxxxxx".replace("x", (c) => { return (Math.random() + 16 | 0).toString(16); });
2795
- // }
2796
- // this.values.push(copiedRecord);
2797
- // this.reloadTables();
2798
- // }, false, 'Richiesta conferma');
2799
3435
  this.onDuplicateRecord.emit(record);
2800
- //TODO
2801
3436
  };
2802
3437
  /**
2803
3438
  * Metodo per eliminare un record dalla lista.
2804
3439
  * @param record Record da eliminare selezionato sulla eqp-table.
2805
3440
  */
2806
3441
  ListFormRecordComponent.prototype.deleteRecord = function (record) {
2807
- // EqpDynamicModuleDialogService.Confirm('Eliminare il record selezionato?', () => {
2808
- // this.values.splice(this.values.indexOf(record), 1);
2809
- // this.reloadTables();
2810
- // }, false, 'Richiesta conferma');
2811
3442
  this.onDeleteRecord.emit(record);
2812
- // TODO
2813
3443
  };
2814
3444
  /**
2815
3445
  * Metodo per creare la configurazione delle colonne per la eqp-table.
@@ -2852,7 +3482,7 @@
2852
3482
  column.format = "dd/MM/yyyy HH:mm";
2853
3483
  }
2854
3484
  else if (field.IsOnlyDate == exports.DateTimeTypeEnum['Solo data']) {
2855
- column.format = "dd/MM/yyyy";
3485
+ column.format = field.DateFormat ? field.DateFormat.replace("DD", "dd") : "dd/MM/yyyy";
2856
3486
  }
2857
3487
  }
2858
3488
  break;
@@ -2940,12 +3570,6 @@
2940
3570
  return ListFormRecordComponent;
2941
3571
  }());
2942
3572
 
2943
- var Record = /** @class */ (function () {
2944
- function Record() {
2945
- }
2946
- return Record;
2947
- }());
2948
-
2949
3573
  var AddFormRecordComponent = /** @class */ (function () {
2950
3574
  function AddFormRecordComponent(cdr, utilityService) {
2951
3575
  this.cdr = cdr;
@@ -3065,7 +3689,7 @@
3065
3689
  AddFormRecordComponent = __decorate([
3066
3690
  core.Component({
3067
3691
  selector: 'add-form-record',
3068
- template: "<div class=\"row eqp-dynamic-module-title\" *ngIf=\"showTitle\">\n <div class=\"col-md-12\">\n <h4><b>{{form.Name}}</b></h4>\n </div>\n</div>\n\n<form [formGroup]=\"formForm\">\n\n <!-- VISUALIZZAZIONE SEMPLICE -->\n <ng-container *ngIf=\"form.FormScalarType == FormScalarTypeEnum.Semplice\" [ngTemplateOutlet]=\"fieldTemplates\"\n [ngTemplateOutletContext]=\"{ fields: form.Fields }\">\n </ng-container>\n\n <!-- VISUALIZZAZIONE A STEPPER -->\n <mat-horizontal-stepper linear *ngIf=\"form.FormScalarType == FormScalarTypeEnum['A step']\">\n <mat-step *ngFor=\"let group of form.FormFieldsGroups\">\n <ng-template matStepLabel>\n {{group.Name}}\n </ng-template>\n\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\n </ng-container>\n </mat-step>\n </mat-horizontal-stepper>\n\n <!-- VISUALIZZAZIONE A TAB -->\n <mat-tab-group *ngIf=\"form.FormScalarType == FormScalarTypeEnum['In tab']\">\n <mat-tab *ngFor=\"let group of form.FormFieldsGroups\" [label]=\"group.Name\">\n <div class=\"mt-3\">\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\n </ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <!-- VISUALIZZAZIONE AD ACCORDION -->\n <mat-accordion multi *ngIf=\"form.FormScalarType == FormScalarTypeEnum['In accordion']\">\n <mat-expansion-panel *ngFor=\"let group of form.FormFieldsGroups\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n {{group.Name}}\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\n </ng-container>\n </mat-expansion-panel>\n </mat-accordion>\n</form>\n\n<div class=\"row mt-2\" *ngIf=\"showButtons\">\n <div class=\"col-sm-12 text-right\">\n <button class=\"mr-2\" mat-raised-button (click)=\"saveOrExitForm(true)\" type=\"button\">\n Annulla\n </button>\n <button class=\"mr-2\" mat-raised-button color=\"primary\" (click)=\"saveOrExitForm(false)\"\n [disabled]=\"formForm.invalid || formForm.disabled\" type=\"button\">\n Salva\n </button>\n </div>\n</div>\n\n<!-- TEMPLATE PER LA VISUALIZZAZIONE DEI CAMPI DELLA FORM -->\n<ng-template #fieldTemplates let-fields='fields'>\n <div class=\"row\">\n <div class=\"mt-2\" *ngFor=\"let field of fields\" [ngClass]=\"utilityService.getFieldSyleClass(field)\">\n <dynamic-module-field #fieldTemplate [field]=\"field\" [form]=\"form\" [record]=\"record\"\n (recordChange)=\"onRecordChange()\"></dynamic-module-field>\n </div>\n </div>\n</ng-template>",
3692
+ template: "<div class=\"row eqp-dynamic-module-title\" *ngIf=\"showTitle\">\r\n <div class=\"col-md-12\">\r\n <h4><b>{{form.Name}}</b></h4>\r\n </div>\r\n</div>\r\n\r\n<form [formGroup]=\"formForm\">\r\n\r\n <!-- VISUALIZZAZIONE SEMPLICE -->\r\n <ng-container *ngIf=\"form.FormScalarType == FormScalarTypeEnum.Semplice\" [ngTemplateOutlet]=\"fieldTemplates\"\r\n [ngTemplateOutletContext]=\"{ fields: form.Fields }\">\r\n </ng-container>\r\n\r\n <!-- VISUALIZZAZIONE A STEPPER -->\r\n <mat-horizontal-stepper linear *ngIf=\"form.FormScalarType == FormScalarTypeEnum['A step']\">\r\n <mat-step *ngFor=\"let group of form.FormFieldsGroups\">\r\n <ng-template matStepLabel>\r\n {{group.Name}}\r\n </ng-template>\r\n\r\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\r\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\r\n </ng-container>\r\n </mat-step>\r\n </mat-horizontal-stepper>\r\n\r\n <!-- VISUALIZZAZIONE A TAB -->\r\n <mat-tab-group *ngIf=\"form.FormScalarType == FormScalarTypeEnum['In tab']\">\r\n <mat-tab *ngFor=\"let group of form.FormFieldsGroups\" [label]=\"group.Name\">\r\n <div class=\"mt-3\">\r\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\r\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\r\n </ng-container>\r\n </div>\r\n </mat-tab>\r\n </mat-tab-group>\r\n\r\n <!-- VISUALIZZAZIONE AD ACCORDION -->\r\n <mat-accordion multi *ngIf=\"form.FormScalarType == FormScalarTypeEnum['In accordion']\">\r\n <mat-expansion-panel *ngFor=\"let group of form.FormFieldsGroups\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{group.Name}}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\r\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\r\n </ng-container>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n</form>\r\n\r\n<div class=\"row mt-2\" *ngIf=\"showButtons\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"mr-2\" mat-raised-button (click)=\"saveOrExitForm(true)\" type=\"button\">\r\n Annulla\r\n </button>\r\n <button class=\"mr-2\" mat-raised-button color=\"primary\" (click)=\"saveOrExitForm(false)\"\r\n [disabled]=\"formForm.invalid || formForm.disabled\" type=\"button\">\r\n Salva\r\n </button>\r\n </div>\r\n</div>\r\n\r\n<!-- TEMPLATE PER LA VISUALIZZAZIONE DEI CAMPI DELLA FORM -->\r\n<ng-template #fieldTemplates let-fields='fields'>\r\n <div class=\"row\">\r\n <div class=\"mt-2\" *ngFor=\"let field of fields\" [ngClass]=\"utilityService.getFieldSyleClass(field)\">\r\n <dynamic-module-field #fieldTemplate [field]=\"field\" [form]=\"form\" [record]=\"record\"\r\n (recordChange)=\"onRecordChange()\"></dynamic-module-field>\r\n </div>\r\n </div>\r\n</ng-template>",
3069
3693
  styles: [""]
3070
3694
  })
3071
3695
  ], AddFormRecordComponent);
@@ -3187,13 +3811,33 @@
3187
3811
  DynamicModuleFieldComponent = __decorate([
3188
3812
  core.Component({
3189
3813
  selector: 'dynamic-module-field',
3190
- template: "<text-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Campo di testo']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</text-field-template>\n\n<textarea-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Area di testo']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</textarea-field-template>\n\n<boolean-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Booleano']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</boolean-field-template>\n\n<date-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Data e/o ora']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</date-field-template>\n\n<numeric-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Campo numerico']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</numeric-field-template>\n\n<list-value-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Elenco generico']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</list-value-field-template>\n\n<attachment-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Allegato']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</attachment-field-template>\n\n<image-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Immagine']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</image-field-template>\n\n<list-form-record #listInnerFormRecords *ngIf=\"field.FieldType == FieldTypeEnum['Form di dettaglio']\"\n [form]=\"getInnerFormFromField(field)\" [values]=\"record[field.Name]\"\n (onAddViewEditRecord)=\"onAddViewEditInnerFormRecord($event, field)\">\n</list-form-record>\n\n<!-- DIALOG PER AGGIUNGERE/MODIFICARE/VISUALIZZARE UN RECORD IN UNA FORM DI DETTAGLIO -->\n<ng-template #dialogInnerFormRecord>\n <add-form-record [form]=\"selectedInnerForm\" [record]=\"selectedInnerFormRecord\" [onlyView]=\"onlyViewInnerFormRecord\"\n (saveRecordEvent)=\"onSaveInnerFormRecord($event)\"></add-form-record>\n</ng-template>",
3814
+ template: "<text-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Campo di testo']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</text-field-template>\r\n\r\n<textarea-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Area di testo']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</textarea-field-template>\r\n\r\n<boolean-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Booleano']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</boolean-field-template>\r\n\r\n<date-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Data e/o ora']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</date-field-template>\r\n\r\n<numeric-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Campo numerico']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</numeric-field-template>\r\n\r\n<list-value-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Elenco generico']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</list-value-field-template>\r\n\r\n<attachment-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Allegato']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</attachment-field-template>\r\n\r\n<image-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Immagine']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</image-field-template>\r\n\r\n<list-form-record #listInnerFormRecords *ngIf=\"field.FieldType == FieldTypeEnum['Form di dettaglio']\"\r\n [form]=\"getInnerFormFromField(field)\" [values]=\"record[field.Name]\"\r\n (onAddViewEditRecord)=\"onAddViewEditInnerFormRecord($event, field)\">\r\n</list-form-record>\r\n\r\n<!-- DIALOG PER AGGIUNGERE/MODIFICARE/VISUALIZZARE UN RECORD IN UNA FORM DI DETTAGLIO -->\r\n<ng-template #dialogInnerFormRecord>\r\n <add-form-record [form]=\"selectedInnerForm\" [record]=\"selectedInnerFormRecord\" [onlyView]=\"onlyViewInnerFormRecord\"\r\n (saveRecordEvent)=\"onSaveInnerFormRecord($event)\"></add-form-record>\r\n</ng-template>",
3191
3815
  styles: [""]
3192
3816
  })
3193
3817
  ], DynamicModuleFieldComponent);
3194
3818
  return DynamicModuleFieldComponent;
3195
3819
  }());
3196
3820
 
3821
+ var SpinnerComponent = /** @class */ (function () {
3822
+ function SpinnerComponent(spinnerService) {
3823
+ this.spinnerService = spinnerService;
3824
+ this.isLoading = this.spinnerService.isLoading;
3825
+ }
3826
+ SpinnerComponent.prototype.ngOnInit = function () {
3827
+ };
3828
+ SpinnerComponent.ctorParameters = function () { return [
3829
+ { type: SpinnerService }
3830
+ ]; };
3831
+ SpinnerComponent = __decorate([
3832
+ core.Component({
3833
+ selector: 'eqp-dynamic-module-spinner',
3834
+ template: "<div class=\"eqp-splash-screen\" *ngIf=\"isLoading | async\">\r\n <div id=\"loader\"></div>\r\n</div>",
3835
+ styles: [":host #loader{display:block;position:relative;width:150px;height:150px;border-radius:50%;border:3px solid transparent;border-top-color:var(--primary);-webkit-animation:2s linear infinite spin;animation:2s linear infinite spin}:host #loader:before{content:\"\";position:absolute;top:5px;left:5px;right:5px;bottom:5px;border-radius:50%;border:3px solid transparent;border-top-color:var(--primary);-webkit-animation:3s linear infinite spin;animation:3s linear infinite spin}:host #loader:after{content:\"\";position:absolute;top:15px;left:15px;right:15px;bottom:15px;border-radius:50%;border:3px solid transparent;border-top-color:var(--primary);-webkit-animation:1.5s linear infinite spin;animation:1.5s linear infinite spin}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}:host .eqp-splash-screen{background-color:#343a4040;position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;width:100%;z-index:9999}:host .eqp-splash-screen img{margin-left:calc(100vw - 100%);width:90px;margin-bottom:30px}:host .eqp-splash-screen span{margin-left:calc(100vw - 100%);margin-bottom:30px}:host .eqp-splash-screen ::ng-deep .mat-progress-spinner circle,:host .eqp-splash-screen ::ng-deep .mat-spinner circle{stroke:#5d78ff}"]
3836
+ })
3837
+ ], SpinnerComponent);
3838
+ return SpinnerComponent;
3839
+ }());
3840
+
3197
3841
  var EqpDynamicModuleModule = /** @class */ (function () {
3198
3842
  function EqpDynamicModuleModule() {
3199
3843
  }
@@ -3214,6 +3858,7 @@
3214
3858
  ListFormRecordComponent,
3215
3859
  AddFormRecordComponent,
3216
3860
  DynamicModuleFieldComponent,
3861
+ SpinnerComponent,
3217
3862
  ],
3218
3863
  imports: [
3219
3864
  platformBrowser.BrowserModule,
@@ -3291,15 +3936,6 @@
3291
3936
  return TextareaField;
3292
3937
  }(BaseField));
3293
3938
 
3294
- /**Campo di testo */
3295
- var TextField = /** @class */ (function (_super) {
3296
- __extends(TextField, _super);
3297
- function TextField() {
3298
- return _super !== null && _super.apply(this, arguments) || this;
3299
- }
3300
- return TextField;
3301
- }(BaseField));
3302
-
3303
3939
  exports.ActionOnRecord = ActionOnRecord;
3304
3940
  exports.AddFormFieldComponent = AddFormFieldComponent;
3305
3941
  exports.AddFormRecordComponent = AddFormRecordComponent;
@@ -3312,11 +3948,16 @@
3312
3948
  exports.BaseObj = BaseObj;
3313
3949
  exports.BooleanField = BooleanField;
3314
3950
  exports.BooleanFieldTemplateComponent = BooleanFieldTemplateComponent;
3951
+ exports.ButtonImage = ButtonImage;
3315
3952
  exports.Context = Context;
3316
3953
  exports.ContextUser = ContextUser;
3317
3954
  exports.DateField = DateField;
3318
3955
  exports.DateFieldTemplateComponent = DateFieldTemplateComponent;
3956
+ exports.DynRecord = DynRecord;
3319
3957
  exports.DynamicModuleFieldComponent = DynamicModuleFieldComponent;
3958
+ exports.EndPointConfiguration = EndPointConfiguration;
3959
+ exports.EndPointData = EndPointData;
3960
+ exports.EndPointDataParams = EndPointDataParams;
3320
3961
  exports.Entity = Entity;
3321
3962
  exports.EqpDynamicModuleComponent = EqpDynamicModuleComponent;
3322
3963
  exports.EqpDynamicModuleConfiguratorComponent = EqpDynamicModuleConfiguratorComponent;
@@ -3333,13 +3974,17 @@
3333
3974
  exports.NumericField = NumericField;
3334
3975
  exports.NumericFieldTemplateComponent = NumericFieldTemplateComponent;
3335
3976
  exports.Record = Record;
3977
+ exports.SpinnerService = SpinnerService;
3978
+ exports.TelRegex = TelRegex;
3336
3979
  exports.TextField = TextField;
3337
3980
  exports.TextFieldTemplateComponent = TextFieldTemplateComponent;
3338
3981
  exports.TextareaField = TextareaField;
3339
3982
  exports.TextareaFieldTemplateComponent = TextareaFieldTemplateComponent;
3983
+ exports.UrlRegex = UrlRegex;
3340
3984
  exports.UtilityHelperService = UtilityHelperService;
3341
3985
  exports.ɵ0 = ɵ0;
3342
- exports.ɵa = MaterialModule;
3986
+ exports.ɵa = SpinnerComponent;
3987
+ exports.ɵb = MaterialModule;
3343
3988
 
3344
3989
  Object.defineProperty(exports, '__esModule', { value: true });
3345
3990