@eqproject/eqp-dynamic-module 0.0.6 → 0.0.7

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 (194) hide show
  1. package/karma.conf.js +32 -0
  2. package/ng-package.json +18 -0
  3. package/package.json +31 -41
  4. package/src/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.html +10 -0
  5. package/src/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.scss +3 -0
  6. package/src/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.ts +228 -0
  7. package/src/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.html +212 -0
  8. package/src/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.scss +30 -0
  9. package/src/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.ts +692 -0
  10. package/src/lib/components/private/add-form-field/add-form-field.component.html +417 -0
  11. package/src/lib/components/private/add-form-field/add-form-field.component.scss +38 -0
  12. package/src/lib/components/private/add-form-field/add-form-field.component.ts +599 -0
  13. package/src/lib/components/private/dynamic-module-field/dynamic-module-field.component.html +42 -0
  14. package/src/lib/components/private/dynamic-module-field/dynamic-module-field.component.scss +0 -0
  15. package/src/lib/components/private/dynamic-module-field/dynamic-module-field.component.ts +125 -0
  16. package/src/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.html +25 -0
  17. package/src/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.scss +0 -0
  18. package/src/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.ts +172 -0
  19. package/src/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.html +32 -0
  20. package/src/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.scss +0 -0
  21. package/src/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.ts +53 -0
  22. package/src/lib/components/private/field-templates/date-field-template/date-field-template.component.html +6 -0
  23. package/src/lib/components/private/field-templates/date-field-template/date-field-template.component.scss +0 -0
  24. package/src/lib/components/private/field-templates/date-field-template/date-field-template.component.ts +70 -0
  25. package/src/lib/components/private/field-templates/image-field-template/image-field-template.component.html +57 -0
  26. package/src/lib/components/private/field-templates/image-field-template/image-field-template.component.scss +4 -0
  27. package/src/lib/components/private/field-templates/image-field-template/image-field-template.component.ts +203 -0
  28. package/src/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.html +46 -0
  29. package/src/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.scss +13 -0
  30. package/src/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.ts +114 -0
  31. package/src/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.html +6 -0
  32. package/src/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.scss +0 -0
  33. package/src/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.ts +70 -0
  34. package/src/lib/components/private/field-templates/text-field-template/text-field-template.component.html +5 -0
  35. package/src/lib/components/private/field-templates/text-field-template/text-field-template.component.scss +0 -0
  36. package/src/lib/components/private/field-templates/text-field-template/text-field-template.component.ts +65 -0
  37. package/src/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.html +5 -0
  38. package/src/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.scss +0 -0
  39. package/src/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.ts +48 -0
  40. package/src/lib/components/private/form-records/add-form-record/add-form-record.component.html +74 -0
  41. package/src/lib/components/private/form-records/add-form-record/add-form-record.component.scss +0 -0
  42. package/src/lib/components/private/form-records/add-form-record/add-form-record.component.ts +117 -0
  43. package/src/lib/components/private/form-records/list-form-record/list-form-record.component.html +14 -0
  44. package/src/lib/components/private/form-records/list-form-record/list-form-record.component.scss +7 -0
  45. package/src/lib/components/private/form-records/list-form-record/list-form-record.component.ts +213 -0
  46. package/src/lib/components/private/spinner/spinner.component.html +3 -0
  47. package/src/lib/components/private/spinner/spinner.component.scss +100 -0
  48. package/src/lib/components/private/spinner/spinner.component.ts +19 -0
  49. package/src/lib/eqp-dynamic-module.module.ts +65 -0
  50. package/{lib/interfaces/iBaseFieldComponent.interface.d.ts → src/lib/interfaces/iBaseFieldComponent.interface.ts} +1 -1
  51. package/{lib/interfaces/iRootObject.interface.d.ts → src/lib/interfaces/iRootObject.interface.ts} +1 -1
  52. package/{lib/models/baseField.model.d.ts → src/lib/models/baseField.model.ts} +14 -5
  53. package/{lib/models/baseObj.model.d.ts → src/lib/models/baseObj.model.ts} +3 -3
  54. package/src/lib/models/context.model.ts +10 -0
  55. package/{lib/models/endPointConfiguration.model.d.ts → src/lib/models/endPointConfiguration.model.ts} +16 -12
  56. package/{lib/models/entity.model.d.ts → src/lib/models/entity.model.ts} +2 -1
  57. package/src/lib/models/fields/attachmentField.model.ts +32 -0
  58. package/{lib/models/fields/booleanField.model.d.ts → src/lib/models/fields/booleanField.model.ts} +8 -4
  59. package/{lib/models/fields/dateField.model.d.ts → src/lib/models/fields/dateField.model.ts} +5 -3
  60. package/{lib/models/fields/imageField.model.d.ts → src/lib/models/fields/imageField.model.ts} +8 -3
  61. package/{lib/models/fields/listValueField.model.d.ts → src/lib/models/fields/listValueField.model.ts} +13 -8
  62. package/{lib/models/fields/lookupField.model.d.ts → src/lib/models/fields/lookupField.model.ts} +5 -2
  63. package/{lib/models/fields/numericField.model.d.ts → src/lib/models/fields/numericField.model.ts} +3 -2
  64. package/{lib/models/fields/testareaField.model.d.ts → src/lib/models/fields/testareaField.model.ts} +3 -2
  65. package/src/lib/models/fields/textField.model.ts +18 -0
  66. package/{lib/models/form.model.d.ts → src/lib/models/form.model.ts} +25 -12
  67. package/{lib/models/record.model.d.ts → src/lib/models/record.model.ts} +4 -5
  68. package/src/lib/modules/material.module.ts +104 -0
  69. package/src/lib/services/custom-form-validators.service.ts +21 -0
  70. package/src/lib/services/eqp-dynamic-module-dialog.service.ts +114 -0
  71. package/src/lib/services/spinner.service.ts +40 -0
  72. package/src/lib/services/utilityHelper.services.ts +413 -0
  73. package/{public-api.d.ts → src/public-api.ts} +3 -0
  74. package/src/test.ts +26 -0
  75. package/tsconfig.lib.json +23 -0
  76. package/tsconfig.lib.prod.json +6 -0
  77. package/tsconfig.spec.json +17 -0
  78. package/tslint.json +17 -0
  79. package/bundles/eqproject-eqp-dynamic-module.umd.js +0 -3991
  80. package/bundles/eqproject-eqp-dynamic-module.umd.js.map +0 -1
  81. package/bundles/eqproject-eqp-dynamic-module.umd.min.js +0 -17
  82. package/bundles/eqproject-eqp-dynamic-module.umd.min.js.map +0 -1
  83. package/eqproject-eqp-dynamic-module.d.ts +0 -6
  84. package/eqproject-eqp-dynamic-module.metadata.json +0 -1
  85. package/esm2015/eqproject-eqp-dynamic-module.js +0 -7
  86. package/esm2015/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +0 -262
  87. package/esm2015/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +0 -649
  88. package/esm2015/lib/components/private/add-form-field/add-form-field.component.js +0 -577
  89. package/esm2015/lib/components/private/dynamic-module-field/dynamic-module-field.component.js +0 -127
  90. package/esm2015/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.js +0 -170
  91. package/esm2015/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.js +0 -56
  92. package/esm2015/lib/components/private/field-templates/date-field-template/date-field-template.component.js +0 -71
  93. package/esm2015/lib/components/private/field-templates/image-field-template/image-field-template.component.js +0 -196
  94. package/esm2015/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.js +0 -115
  95. package/esm2015/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.js +0 -71
  96. package/esm2015/lib/components/private/field-templates/text-field-template/text-field-template.component.js +0 -67
  97. package/esm2015/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +0 -51
  98. package/esm2015/lib/components/private/form-records/add-form-record/add-form-record.component.js +0 -130
  99. package/esm2015/lib/components/private/form-records/list-form-record/list-form-record.component.js +0 -216
  100. package/esm2015/lib/components/private/spinner/spinner.component.js +0 -23
  101. package/esm2015/lib/eqp-dynamic-module.module.js +0 -69
  102. package/esm2015/lib/interfaces/iBaseFieldComponent.interface.js +0 -1
  103. package/esm2015/lib/interfaces/iRootObject.interface.js +0 -1
  104. package/esm2015/lib/models/baseField.model.js +0 -36
  105. package/esm2015/lib/models/baseObj.model.js +0 -9
  106. package/esm2015/lib/models/context.model.js +0 -8
  107. package/esm2015/lib/models/endPointConfiguration.model.js +0 -23
  108. package/esm2015/lib/models/entity.model.js +0 -7
  109. package/esm2015/lib/models/fields/attachmentField.model.js +0 -22
  110. package/esm2015/lib/models/fields/booleanField.model.js +0 -12
  111. package/esm2015/lib/models/fields/dateField.model.js +0 -11
  112. package/esm2015/lib/models/fields/imageField.model.js +0 -8
  113. package/esm2015/lib/models/fields/listValueField.model.js +0 -14
  114. package/esm2015/lib/models/fields/lookupField.model.js +0 -5
  115. package/esm2015/lib/models/fields/numericField.model.js +0 -5
  116. package/esm2015/lib/models/fields/testareaField.model.js +0 -4
  117. package/esm2015/lib/models/fields/textField.model.js +0 -14
  118. package/esm2015/lib/models/form.model.js +0 -24
  119. package/esm2015/lib/models/record.model.js +0 -8
  120. package/esm2015/lib/modules/material.module.js +0 -108
  121. package/esm2015/lib/services/custom-form-validators.service.js +0 -19
  122. package/esm2015/lib/services/eqp-dynamic-module-dialog.service.js +0 -113
  123. package/esm2015/lib/services/spinner.service.js +0 -43
  124. package/esm2015/lib/services/utilityHelper.services.js +0 -387
  125. package/esm2015/public-api.js +0 -39
  126. package/esm5/eqproject-eqp-dynamic-module.js +0 -7
  127. package/esm5/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +0 -269
  128. package/esm5/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +0 -664
  129. package/esm5/lib/components/private/add-form-field/add-form-field.component.js +0 -588
  130. package/esm5/lib/components/private/dynamic-module-field/dynamic-module-field.component.js +0 -128
  131. package/esm5/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.js +0 -173
  132. package/esm5/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.js +0 -57
  133. package/esm5/lib/components/private/field-templates/date-field-template/date-field-template.component.js +0 -72
  134. package/esm5/lib/components/private/field-templates/image-field-template/image-field-template.component.js +0 -206
  135. package/esm5/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.js +0 -119
  136. package/esm5/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.js +0 -72
  137. package/esm5/lib/components/private/field-templates/text-field-template/text-field-template.component.js +0 -68
  138. package/esm5/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +0 -52
  139. package/esm5/lib/components/private/form-records/add-form-record/add-form-record.component.js +0 -133
  140. package/esm5/lib/components/private/form-records/list-form-record/list-form-record.component.js +0 -220
  141. package/esm5/lib/components/private/spinner/spinner.component.js +0 -24
  142. package/esm5/lib/eqp-dynamic-module.module.js +0 -72
  143. package/esm5/lib/interfaces/iBaseFieldComponent.interface.js +0 -1
  144. package/esm5/lib/interfaces/iRootObject.interface.js +0 -1
  145. package/esm5/lib/models/baseField.model.js +0 -43
  146. package/esm5/lib/models/baseObj.model.js +0 -13
  147. package/esm5/lib/models/context.model.js +0 -14
  148. package/esm5/lib/models/endPointConfiguration.model.js +0 -33
  149. package/esm5/lib/models/entity.model.js +0 -14
  150. package/esm5/lib/models/fields/attachmentField.model.js +0 -29
  151. package/esm5/lib/models/fields/booleanField.model.js +0 -19
  152. package/esm5/lib/models/fields/dateField.model.js +0 -18
  153. package/esm5/lib/models/fields/imageField.model.js +0 -19
  154. package/esm5/lib/models/fields/listValueField.model.js +0 -25
  155. package/esm5/lib/models/fields/lookupField.model.js +0 -12
  156. package/esm5/lib/models/fields/numericField.model.js +0 -12
  157. package/esm5/lib/models/fields/testareaField.model.js +0 -11
  158. package/esm5/lib/models/fields/textField.model.js +0 -21
  159. package/esm5/lib/models/form.model.js +0 -39
  160. package/esm5/lib/models/record.model.js +0 -14
  161. package/esm5/lib/modules/material.module.js +0 -111
  162. package/esm5/lib/services/custom-form-validators.service.js +0 -23
  163. package/esm5/lib/services/eqp-dynamic-module-dialog.service.js +0 -123
  164. package/esm5/lib/services/spinner.service.js +0 -46
  165. package/esm5/lib/services/utilityHelper.services.js +0 -396
  166. package/esm5/public-api.js +0 -39
  167. package/fesm2015/eqproject-eqp-dynamic-module.js +0 -3580
  168. package/fesm2015/eqproject-eqp-dynamic-module.js.map +0 -1
  169. package/fesm5/eqproject-eqp-dynamic-module.js +0 -3766
  170. package/fesm5/eqproject-eqp-dynamic-module.js.map +0 -1
  171. package/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.d.ts +0 -101
  172. package/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.d.ts +0 -235
  173. package/lib/components/private/add-form-field/add-form-field.component.d.ts +0 -199
  174. package/lib/components/private/dynamic-module-field/dynamic-module-field.component.d.ts +0 -55
  175. package/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.d.ts +0 -68
  176. package/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.d.ts +0 -21
  177. package/lib/components/private/field-templates/date-field-template/date-field-template.component.d.ts +0 -27
  178. package/lib/components/private/field-templates/image-field-template/image-field-template.component.d.ts +0 -65
  179. package/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.d.ts +0 -51
  180. package/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.d.ts +0 -26
  181. package/lib/components/private/field-templates/text-field-template/text-field-template.component.d.ts +0 -22
  182. package/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.d.ts +0 -20
  183. package/lib/components/private/form-records/add-form-record/add-form-record.component.d.ts +0 -52
  184. package/lib/components/private/form-records/list-form-record/list-form-record.component.d.ts +0 -64
  185. package/lib/components/private/spinner/spinner.component.d.ts +0 -9
  186. package/lib/eqp-dynamic-module.module.d.ts +0 -2
  187. package/lib/models/context.model.d.ts +0 -9
  188. package/lib/models/fields/attachmentField.model.d.ts +0 -17
  189. package/lib/models/fields/textField.model.d.ts +0 -15
  190. package/lib/modules/material.module.d.ts +0 -2
  191. package/lib/services/custom-form-validators.service.d.ts +0 -5
  192. package/lib/services/eqp-dynamic-module-dialog.service.d.ts +0 -34
  193. package/lib/services/spinner.service.d.ts +0 -15
  194. package/lib/services/utilityHelper.services.d.ts +0 -77
@@ -0,0 +1,417 @@
1
+ <div class="container-fluid" style="max-height: 70vh !important; overflow-x: hidden; overflow-y: auto;">
2
+ <form [formGroup]="fieldFormGroup">
3
+ <div class="row">
4
+ <div class="header-title-standard">{{indexField != null && indexField >= 0 ? "Modifica"
5
+ : "Aggiungi"}} campo</div>
6
+ </div>
7
+ <div class="row">
8
+ <div class="col-sm-12 col-md-4 mt-2">
9
+ <eqp-select [enumData]="FieldTypeEnum" [(ngModelInput)]="field.FieldType" [isRequired]="true"
10
+ [showCancelButton]="false" placeholder="Tipo campo" (ngModelInputChange)="onFieldTypeChange()"
11
+ [formGroupInput]="fieldFormGroup" [formControlNameInput]="'FieldType'"
12
+ [enumDataToExclude]="fieldTypesToExclude">
13
+ </eqp-select>
14
+ </div>
15
+
16
+ <div class="col-sm-12 col-md-4 mt-2">
17
+ <mat-form-field>
18
+ <mat-label> Label </mat-label>
19
+ <input formControlName="Label" required matInput [(ngModel)]="field.Label">
20
+ </mat-form-field>
21
+ </div>
22
+
23
+ <div class="col-sm-12 col-md-4 mt-2">
24
+ <mat-form-field>
25
+ <mat-label> Descrizione </mat-label>
26
+ <input formControlName="Description" required matInput [(ngModel)]="field.Description">
27
+ </mat-form-field>
28
+ </div>
29
+
30
+ <div class="col-sm-12 col-md-4 mt-2 d-flex align-items-center">
31
+ <mat-slide-toggle [(ngModel)]="field.Required" formControlName="Required" color="primary">
32
+ Obbligatorio
33
+ </mat-slide-toggle>
34
+ </div>
35
+
36
+ <div class="col-sm-12 col-md-4 mt-2">
37
+ <mat-form-field>
38
+ <mat-label> Formula (Javascript) </mat-label>
39
+ <input formControlName="Formula" matInput [(ngModel)]="field.Formula"
40
+ [matAutocomplete]="formulaAutocomplete" (keyup)="setFormulaAutocompleteOptions($event)"
41
+ (focus)="setFormulaAutocompleteOptions(null)">
42
+ <mat-autocomplete #formulaAutocomplete="matAutocomplete">
43
+ <mat-option *ngFor="let option of formulaAutocompleteOptions" [value]="option.value">
44
+ {{option.label}}
45
+ </mat-option>
46
+ </mat-autocomplete>
47
+ </mat-form-field>
48
+ </div>
49
+
50
+ <div class="col-sm-12 col-md-4 mt-2" *ngIf="formFieldsGroups">
51
+ <eqp-select [arrayData]="formFieldsGroups" [(ngModelInput)]="field.FieldGroup"
52
+ [arrayKeyProperty]="'Name'" [arrayValueProperty]="'Name'" placeholder="Sezione"
53
+ [formGroupInput]="fieldFormGroup" [formControlNameInput]="'FieldGroup'" [isRequired]="true"
54
+ [includeFullObject]="false">
55
+ </eqp-select>
56
+ </div>
57
+
58
+ <div class="col-sm-12 col-md-4 mt-2">
59
+ <eqp-select [arrayData]="availableColSpanSizes" [(ngModelInput)]="field.ColSpanSizes"
60
+ [arrayKeyProperty]="'key'" [arrayValueProperty]="'value'" (ngModelInputChange)="onColSpanSizeSelect()"
61
+ [isMultiSelect]="true" placeholder="Larghezza campo" [formGroupInput]="fieldFormGroup"
62
+ [formControlNameInput]="'ColSpanSizes'" [includeFullObject]="false">
63
+ </eqp-select>
64
+ </div>
65
+
66
+ <div class="col-sm-12 col-md-4 mt-2 d-flex align-items-center">
67
+ <mat-slide-toggle [(ngModel)]="field.InListView" formControlName="InListView" color="primary"
68
+ [disabled]="fieldFormGroup.controls['InListView'].disabled">
69
+ Mostrare nella visualizzazione a lista
70
+ </mat-slide-toggle>
71
+ </div>
72
+
73
+ <ng-container *ngTemplateOutlet="fieldTypeFormTemplate">
74
+ </ng-container>
75
+ </div>
76
+
77
+
78
+ <div class="row mt-2 mb-1">
79
+ <div class="col-sm-12 text-right">
80
+ <button class="mr-2" mat-raised-button color="primary" (click)="saveAndExitAddField(true)"
81
+ [disabled]="disableSaveField()" type="button">
82
+ Salva
83
+ </button>
84
+ <button class="btn mat-raised-button" (click)="saveAndExitAddField(false)" type="button">
85
+ Esci
86
+ </button>
87
+ </div>
88
+ </div>
89
+ </form>
90
+ </div>
91
+
92
+
93
+ <!-- FORM PROPRIETÀ CAMPI DI TESTO -->
94
+ <ng-template #textFieldFormTemplate>
95
+ <div class="col-sm-12 col-md-4">
96
+ <eqp-select [enumData]="TextMaskEnum" [(ngModelInput)]="field.TextMask" placeholder="Maschera"
97
+ [formGroupInput]="fieldFormGroup" [formControlNameInput]="'TextMask'">
98
+ </eqp-select>
99
+ </div>
100
+ <div class="col-sm-12 col-md-4" [formGroup]="fieldFormGroup">
101
+ <mat-form-field>
102
+ <mat-label> Lunghezza massima </mat-label>
103
+ <input formControlName="MaxLenght" type="number" [min]="0" matInput [(ngModel)]="field.MaxLenght">
104
+ </mat-form-field>
105
+ </div>
106
+ <div class="col-sm-12 col-md-4" [formGroup]="fieldFormGroup">
107
+ <mat-form-field>
108
+ <mat-label> Lunghezza minima </mat-label>
109
+ <input formControlName="MinLenght" type="number" [min]="0" matInput [(ngModel)]="field.MinLenght">
110
+ </mat-form-field>
111
+ </div>
112
+ </ng-template>
113
+
114
+ <!-- FORM PROPRIETÀ CAMPI AREA DI TESTO -->
115
+ <ng-template #textareaFieldFormTemplate>
116
+ <div class="col-sm-12 col-md-4 mt-2" [formGroup]="fieldFormGroup">
117
+ <mat-form-field>
118
+ <mat-label> Righe </mat-label>
119
+ <input formControlName="Rows" type="number" [min]="0" matInput [(ngModel)]="field.Rows">
120
+ </mat-form-field>
121
+ </div>
122
+ <div class="col-sm-12 col-md-4 mt-2" [formGroup]="fieldFormGroup">
123
+ <mat-form-field>
124
+ <mat-label> Lunghezza massima </mat-label>
125
+ <input formControlName="MaxLenght" type="number" [min]="0" matInput [(ngModel)]="field.MaxLenght">
126
+ </mat-form-field>
127
+ </div>
128
+ <div class="col-sm-12 col-md-4 mt-2" [formGroup]="fieldFormGroup">
129
+ <mat-form-field>
130
+ <mat-label> Lunghezza minima </mat-label>
131
+ <input formControlName="MinLenght" type="number" [min]="0" matInput [(ngModel)]="field.MinLenght">
132
+ </mat-form-field>
133
+ </div>
134
+ </ng-template>
135
+
136
+ <!-- FORM PROPRIETÀ CAMPI BOOLEANI -->
137
+ <ng-template #booleadFieldFormTemplate>
138
+ <div class="col-sm-12 col-md-4 mt-2 d-flex align-items-center" [formGroup]="fieldFormGroup">
139
+ <mat-slide-toggle [(ngModel)]="field.IsTristate" formControlName="IsTristate" color="primary">
140
+ A tre stati
141
+ </mat-slide-toggle>
142
+ </div>
143
+ <div class="col-sm-12 col-md-4 mt-2">
144
+ <eqp-select [enumData]="BoolPresentantioEnum" [(ngModelInput)]="field.PresetationType" [isRequired]="true"
145
+ [showCancelButton]="false" placeholder="Tipo di presentazione" [formGroupInput]="fieldFormGroup"
146
+ [formControlNameInput]="'PresetationType'">
147
+ </eqp-select>
148
+ </div>
149
+ </ng-template>
150
+
151
+ <!-- FORM PROPRIETÀ CAMPI DATA -->
152
+ <ng-template #dateFieldFormTemplate>
153
+ <div class="col-sm-12 col-md-4 mt-2">
154
+ <eqp-datetimepicker [placeholder]="'Data minima'" [(ngModelInput)]="field.MinDate"
155
+ [formGroupInput]="fieldFormGroup" [formControlNameInput]="'MinDate'" [UTCDate]="true" [showSeconds]="false">
156
+ </eqp-datetimepicker>
157
+ </div>
158
+ <div class="col-sm-12 col-md-4 mt-2">
159
+ <eqp-datetimepicker [placeholder]="'Data massima'" [(ngModelInput)]="field.MaxDate"
160
+ [formGroupInput]="fieldFormGroup" [formControlNameInput]="'MaxDate'" [UTCDate]="true" [showSeconds]="false">
161
+ </eqp-datetimepicker>
162
+ </div>
163
+ <div class="col-sm-12 col-md-4 mt-2">
164
+ <eqp-select [enumData]="DateTimeTypeEnum" [(ngModelInput)]="field.IsOnlyDate" [isRequired]="true"
165
+ [showCancelButton]="false" placeholder="Tipo di data" [formGroupInput]="fieldFormGroup"
166
+ [formControlNameInput]="'IsOnlyDate'">
167
+ </eqp-select>
168
+ </div>
169
+ <div class="col-sm-12 col-md-4 mt-2" [formGroup]="fieldFormGroup">
170
+ <mat-form-field>
171
+ <mat-label> Formato </mat-label>
172
+ <input formControlName="DateFormat" matInput [(ngModel)]="field.DateFormat"
173
+ [matTooltip]="'Indicare il formato senguendo la guida del pacchetto momentjs.'">
174
+ </mat-form-field>
175
+ </div>
176
+ </ng-template>
177
+
178
+ <!-- FORM PROPRIETÀ CAMPI NUMERICI -->
179
+ <ng-template #numericFieldFormTemplate>
180
+ <div class="col-sm-12 col-md-4 mt-2 d-flex align-items-center" [formGroup]="fieldFormGroup">
181
+ <mat-slide-toggle [(ngModel)]="field.IsInteger" formControlName="IsInteger" color="primary">
182
+ Valore intero
183
+ </mat-slide-toggle>
184
+ </div>
185
+ <div class="col-sm-12 col-md-4 mt-2" [formGroup]="fieldFormGroup">
186
+ <mat-form-field>
187
+ <mat-label> Separatore decimali </mat-label>
188
+ <input formControlName="DecimalSeparator" matInput [(ngModel)]="field.DecimalSeparator">
189
+ </mat-form-field>
190
+ </div>
191
+ <div class="col-sm-12 col-md-4 mt-2" [formGroup]="fieldFormGroup">
192
+ <mat-form-field>
193
+ <mat-label> Precisione decimali </mat-label>
194
+ <input formControlName="DecimalPrecision" type="number" [min]="0" matInput
195
+ [(ngModel)]="field.DecimalPrecision">
196
+ </mat-form-field>
197
+ </div>
198
+ <div class="col-sm-12 col-md-4 mt-2" [formGroup]="fieldFormGroup">
199
+ <mat-form-field>
200
+ <mat-label> Separatore migliaia </mat-label>
201
+ <input formControlName="ThousandsSeparator" matInput [(ngModel)]="field.ThousandsSeparator">
202
+ </mat-form-field>
203
+ </div>
204
+ <div class="col-sm-12 col-md-4 mt-2" [formGroup]="fieldFormGroup">
205
+ <mat-form-field>
206
+ <mat-label> Simbolo valuta </mat-label>
207
+ <input formControlName="CurrencySymbol" matInput [(ngModel)]="field.CurrencySymbol">
208
+ </mat-form-field>
209
+ </div>
210
+ <div class="col-sm-12 col-md-4 mt-2" [formGroup]="fieldFormGroup">
211
+ <mat-form-field>
212
+ <mat-label> Valore massimo </mat-label>
213
+ <input formControlName="MinValue" type="number" [min]="0" matInput [(ngModel)]="field.MinValue">
214
+ </mat-form-field>
215
+ </div>
216
+ <div class="col-sm-12 col-md-4 mt-2" [formGroup]="fieldFormGroup">
217
+ <mat-form-field>
218
+ <mat-label> Valore minimo </mat-label>
219
+ <input formControlName="MaxValue" type="number" [min]="0" matInput [(ngModel)]="field.MaxValue">
220
+ </mat-form-field>
221
+ </div>
222
+ </ng-template>
223
+
224
+ <!-- FORM PROPRIETÀ CAMPI ALLEGATO -->
225
+ <ng-template #attachmentFieldFormTemplate>
226
+ <div class="col-sm-12 col-md-4 mt-2 d-flex align-items-center" [formGroup]="fieldFormGroup">
227
+ <mat-slide-toggle [(ngModel)]="field.IsMultiAttach" formControlName="IsMultiAttach" color="primary">
228
+ Allegati multipli
229
+ </mat-slide-toggle>
230
+ </div>
231
+ <div class="col-sm-12 col-md-4 mt-2">
232
+ <eqp-select [arrayData]="AvailableFileExtensions.concat(AvailableImageExtensions)"
233
+ [(ngModelInput)]="field.AllowedExtensions" [arrayKeyProperty]="'key'" [arrayValueProperty]="'value'"
234
+ [isMultiSelect]="true" placeholder="Estensioni accettate" [formGroupInput]="fieldFormGroup"
235
+ [formControlNameInput]="'AllowedExtensions'" [includeFullObject]="false">
236
+ </eqp-select>
237
+ </div>
238
+ <div class="col-sm-12 mt-2">
239
+ <div class="row mt-2">
240
+ <div class="col-sm-12 col-md-6">
241
+ <div class="header-title-standard">
242
+ Elenco metadata
243
+ </div>
244
+ </div>
245
+ <div class="col-sm-12 col-md-6 text-right">
246
+ <button class="btn btn-primary" mat-raised-button color="primary" type="button"
247
+ (click)="openMetadataDialog()">
248
+ <mat-icon>add</mat-icon>
249
+ <span style="margin-left: 10px;">Aggiungi</span>
250
+ </button>
251
+ </div>
252
+ </div>
253
+ <eqp-table #metadataFieldsTable [createMatCard]="false" [columns]="metadataColumns"
254
+ [data]="field.MetadataFields" [emptyTableMessage]="'Nessun metadata inserito'" [searchText]="'Cerca'">
255
+ </eqp-table>
256
+ </div>
257
+ </ng-template>
258
+
259
+ <!-- FORM PROPRIETÀ CAMPI IMMAGINE -->
260
+ <ng-template #imageFieldFormTemplate>
261
+ <div class="col-sm-12 col-md-4 mt-2 mb-2 d-flex align-items-center" [formGroup]="fieldFormGroup">
262
+ <mat-slide-toggle [(ngModel)]="field.ImageIsContextualAttachment" formControlName="ImageIsContextualAttachment"
263
+ color="primary" (ngModelChange)="onImageIsContextualAttachmentChange()">
264
+ Immagine pre-caricata nel campo
265
+ </mat-slide-toggle>
266
+ </div>
267
+ <div class="col-sm-12 col-md-4 mt-2 mb-2 d-flex align-items-center" [formGroup]="fieldFormGroup">
268
+ <mat-slide-toggle [(ngModel)]="field.EnableDrawing" formControlName="EnableDrawing" color="primary">
269
+ Abilita il disegno
270
+ </mat-slide-toggle>
271
+ </div>
272
+ <div class="col-sm-12 col-md-4 mt-2 d-flex align-items-center" [formGroup]="fieldFormGroup"
273
+ *ngIf="!field.ImageIsContextualAttachment">
274
+ <mat-slide-toggle [(ngModel)]="field.AttachDefinition.IsMultiAttach" formControlName="IsMultiAttach"
275
+ color="primary">
276
+ Immagini multiple
277
+ </mat-slide-toggle>
278
+ </div>
279
+ <div class="col-sm-12 col-md-4 mt-2" *ngIf="!field.ImageIsContextualAttachment">
280
+ <eqp-select [arrayData]="AvailableImageExtensions" [(ngModelInput)]="field.AttachDefinition.AllowedExtensions"
281
+ [arrayKeyProperty]="'key'" [arrayValueProperty]="'value'" [isMultiSelect]="true"
282
+ placeholder="Estensioni accettate" [formGroupInput]="fieldFormGroup"
283
+ [formControlNameInput]="'AllowedExtensions'" [includeFullObject]="false">
284
+ </eqp-select>
285
+ </div>
286
+ <div class="col-sm-12 col-md-4 mt-2" [formGroup]="fieldFormGroup" *ngIf="field.ImageIsContextualAttachment">
287
+ <mat-form-field>
288
+ <mat-label> Nome immagine </mat-label>
289
+ <input formControlName="ImgName" matInput [(ngModel)]="field.ImgName" required>
290
+ </mat-form-field>
291
+ </div>
292
+ <div class="col-sm-12 col-md-8 mt-2" [formGroup]="fieldFormGroup" *ngIf="field.ImageIsContextualAttachment">
293
+ <eqp-attachments [attachmentsList]="field._contextualAttachments" [showMatCard]="false" [allowOnlyImages]="true"
294
+ [isDisabled]="false" [showInlinePreview]="true" [multipleAttachment]="false" [showHeader]="false"
295
+ (localEditedAttachments)="catchContextualAttachmentChange($event)" #contextualAttachmentEqpAttachments>
296
+ </eqp-attachments>
297
+ </div>
298
+ <div class="col-sm-12 mt-2">
299
+ <div class="row mt-2">
300
+ <div class="col-sm-12 col-md-6">
301
+ <div class="header-title-standard">
302
+ Elenco metadata
303
+ </div>
304
+ </div>
305
+ <div class="col-sm-12 col-md-6 text-right">
306
+ <button class="btn btn-primary" mat-raised-button color="primary" type="button"
307
+ (click)="openMetadataDialog()">
308
+ <mat-icon>add</mat-icon>
309
+ <span style="margin-left: 10px;">Aggiungi</span>
310
+ </button>
311
+ </div>
312
+ </div>
313
+ <eqp-table #metadataFieldsTable [createMatCard]="false" [columns]="metadataColumns"
314
+ [data]="field.AttachDefinition.MetadataFields" [emptyTableMessage]="'Nessun metadata inserito'"
315
+ [searchText]="'Cerca'">
316
+ </eqp-table>
317
+ </div>
318
+ </ng-template>
319
+
320
+ <!-- FORM PROPRIETÀ CAMPI LISTA DI VALORI -->
321
+ <ng-template #listValueFieldFormTemplate>
322
+ <div class="col-sm-12 col-md-4 mt-2 d-flex align-items-center" [formGroup]="fieldFormGroup">
323
+ <mat-slide-toggle [(ngModel)]="field.IsMultiChoiche" formControlName="IsMultiChoiche" color="primary">
324
+ Scelta multipla
325
+ </mat-slide-toggle>
326
+ </div>
327
+ <div class="col-sm-12 col-md-4 mt-2">
328
+ <eqp-select [enumData]="ListPresentationEnum" [(ngModelInput)]="field.PresentationMode" [isRequired]="true"
329
+ [showCancelButton]="false" placeholder="Tipo di presentazione" [formGroupInput]="fieldFormGroup"
330
+ [formControlNameInput]="'PresentationMode'" (ngModelInputChange)="onPresentationModeChange()">
331
+ </eqp-select>
332
+ </div>
333
+ <div class="col-sm-12 mt-2" *ngIf="field.PresentationMode != ListPresentationEnum.Immagini">
334
+ <div class="row">
335
+ <h4 class="key-value-list-section-title"> </h4>
336
+ <div class="col-md-4 d-flex align-items-center">
337
+ <mat-form-field>
338
+ <mat-label> Label opzione (invio per confermare)</mat-label>
339
+ <input matInput [(ngModel)]="keyValueObject.key" (keyup)="onMultiSelectInputKeyup($event, null)">
340
+ </mat-form-field>
341
+ </div>
342
+ <div class="col-md-4 d-flex align-items-center">
343
+ <mat-form-field>
344
+ <mat-label> Valore opzione (invio per confermare)</mat-label>
345
+ <input matInput [(ngModel)]="keyValueObject.value" (keyup)="onMultiSelectInputKeyup($event, null)">
346
+ </mat-form-field>
347
+ </div>
348
+ <div class="col-md-4 d-flex align-items-center">
349
+ <span class="mr-3">Opzioni inserite:</span>
350
+ <ul class="value-pairs-list">
351
+ <li *ngFor="let keyValuePair of getDictionaryKeyValue()">
352
+ <mat-icon class="mr-1" (click)="deleteKeyFromDictionary(keyValuePair.key)">close
353
+ </mat-icon>
354
+ <span><b>Label: </b> {{keyValuePair.key}} - <b>Valore: </b> {{keyValuePair.value}}</span>
355
+ </li>
356
+ </ul>
357
+ </div>
358
+ </div>
359
+ </div>
360
+ <div class="col-sm-12 col-md-12 mt-2" *ngIf="field.PresentationMode == ListPresentationEnum.Immagini">
361
+ <eqp-attachments [attachmentsList]="field.ButtonImageList" [showMatCard]="false" [allowOnlyImages]="true"
362
+ [isDisabled]="false" [showInlinePreview]="true" [multipleAttachment]="true" [showHeader]="false"
363
+ [allowedTypes]="[AttachmentType.FILE]" (localEditedAttachments)="catchButtonImagesChange($event)"
364
+ (onComponentLoaded)="configureButtonImagesColumns($event)">
365
+ </eqp-attachments>
366
+ </div>
367
+ </ng-template>
368
+
369
+ <!-- FORM PROPRIETÀ CAMPI LOOKUP -->
370
+ <ng-template #lookupFieldFormTemplate>
371
+ <div class="col-sm-12 col-md-4 mt-2 d-flex align-items-center" [formGroup]="fieldFormGroup">
372
+ <mat-slide-toggle [(ngModel)]="field.UseAsGetOrDiscard" formControlName="UseAsGetOrDiscard" color="primary"
373
+ matTooltip="Se true la lookup viene visualizzata in una modale per lo scegli scarta">
374
+ Usa per scegli o scarta
375
+ </mat-slide-toggle>
376
+ </div>
377
+ <div class="col-sm-12 col-md-4 mt-2" [formGroup]="fieldFormGroup">
378
+ <mat-form-field matTooltip="Nome dell'entità relazionata">
379
+ <mat-label> Nome entità </mat-label>
380
+ <input formControlName="EntitySourceName" required matInput [(ngModel)]="field.EntitySourceName">
381
+ </mat-form-field>
382
+ </div>
383
+ <div class="col-sm-12 mt-2">
384
+ <div class="row">
385
+ <div class="col-md-4">
386
+ <mat-form-field
387
+ matTooltip="Elenco di campi ordinato che verrà visualizzato nella lookup (premere invio per confermare)">
388
+ <mat-label>
389
+ Nomi dei campi (invio per confermare) </mat-label>
390
+ <input matInput (keyup)="onMultiSelectInputKeyup($event, 'FieldNames')">
391
+ </mat-form-field>
392
+ </div>
393
+ <div class="col-md-8 d-flex align-items-center">
394
+ <span class="mr-3">Nomi selezionati:</span>
395
+ <div class="extension-container" *ngFor="let extension of field.FieldNames; let i = index">
396
+ <span>{{extension}}</span>
397
+ <mat-icon class="ml-1" (click)="field.FieldNames.splice(i,1)">close
398
+ </mat-icon>
399
+ </div>
400
+ </div>
401
+ </div>
402
+ </div>
403
+ </ng-template>
404
+
405
+ <!-- DIALOG PER AGGIUNGERE UN METADATA NEI CAMPI DI TIPO ALLEGATO O IMMAGINE -->
406
+ <ng-template #dialogMetadata>
407
+ <eqp-dynamic-module-add-form-field [field]="selectedMetadata" [availableFields]="availableFields"
408
+ [indexField]="indexSelectedMetadata" (saveFieldEvent)="onSaveMetadata($event)" [fieldTypesToExclude]="[6,7,10]">
409
+ </eqp-dynamic-module-add-form-field>
410
+ </ng-template>
411
+
412
+ <ng-template #buttonImagesKeyValueInputColumn let-row="row" let-col="col">
413
+ <mat-form-field>
414
+ <mat-label> {{col.display}} </mat-label>
415
+ <input matInput [(ngModel)]="row[col.key]" required>
416
+ </mat-form-field>
417
+ </ng-template>
@@ -0,0 +1,38 @@
1
+ .extension-container {
2
+ display: inline-block;
3
+ font-size: 15px;
4
+ border: 1px solid var(--primary);
5
+ border-radius: 15px;
6
+ margin-right: 10px;
7
+ mat-icon {
8
+ vertical-align: middle;
9
+ font-size: 15px;
10
+ height: 15px;
11
+ width: 15px;
12
+ color: var(--danger);
13
+ margin-right: 10px;
14
+ cursor: pointer;
15
+ }
16
+ span {
17
+ margin-left: 10px;
18
+ }
19
+ }
20
+
21
+ .key-value-list-section-title {
22
+ background: linear-gradient(to right, var(--gray) 0%, rgb(255 255 255) 100%) left bottom #fff no-repeat;
23
+ background-size: 100% 1px;
24
+ }
25
+
26
+ .value-pairs-list {
27
+ list-style: none;
28
+ padding: 0;
29
+ mat-icon {
30
+ vertical-align: middle;
31
+ font-size: 15px;
32
+ height: 15px;
33
+ width: 15px;
34
+ color: var(--danger);
35
+ margin-right: 10px;
36
+ cursor: pointer;
37
+ }
38
+ }