@eqproject/eqp-dynamic-module 2.10.65 → 2.10.67

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 (75) hide show
  1. package/esm2020/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.mjs +33 -16
  2. package/esm2020/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.mjs +656 -32
  3. package/esm2020/lib/components/private/action-button-creator/action-button-creator.component.mjs +2 -2
  4. package/esm2020/lib/components/private/add-form-field/add-form-field.component.mjs +809 -15
  5. package/esm2020/lib/components/private/dynamic-module-field-fix/dynamic-module-field.component.mjs +1 -1
  6. package/esm2020/lib/components/private/field-templates/action-button-field-template/action-button-field-template.component.mjs +98 -20
  7. package/esm2020/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.mjs +132 -69
  8. package/esm2020/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.mjs +159 -24
  9. package/esm2020/lib/components/private/field-templates/date-field-template/date-field-template.component.mjs +152 -7
  10. package/esm2020/lib/components/private/field-templates/image-field-selector-template/image-field-selector-template.component.mjs +180 -39
  11. package/esm2020/lib/components/private/field-templates/image-field-template/image-field-template.component.mjs +100 -78
  12. package/esm2020/lib/components/private/field-templates/image-with-markers-field-template/image-with-markers-field-template.component.mjs +103 -88
  13. package/esm2020/lib/components/private/field-templates/label-field-template/label-field-template.component.mjs +90 -17
  14. package/esm2020/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.mjs +217 -54
  15. package/esm2020/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.mjs +220 -37
  16. package/esm2020/lib/components/private/field-templates/text-field-template/text-field-template.component.mjs +263 -29
  17. package/esm2020/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.mjs +210 -18
  18. package/esm2020/lib/components/private/form-records/add-form-record/add-form-record.component.mjs +33 -13
  19. package/esm2020/lib/components/private/form-records/hlist-form-record/hlist-form-record.component.mjs +1 -1
  20. package/esm2020/lib/components/private/form-records/list-view-form-record/list-view-form-record.component.mjs +1 -1
  21. package/esm2020/lib/components/private/form-records/list-view-form-record/single-record/single-record.component.mjs +1 -1
  22. package/esm2020/lib/components/private/form-statistics/filter-templates/date-filter-template/date-filter-template.component.mjs +1 -1
  23. package/esm2020/lib/components/private/graphs/graphs.component.mjs +1 -1
  24. package/esm2020/lib/components/private/tmw-image-marker/tmw-image-marker.component.mjs +4 -3
  25. package/esm2020/lib/components/private/trigger-creator/trigger-creator.component.mjs +2 -2
  26. package/esm2020/lib/components/private/trigger-creator/trigger-templates/date-trigger-template/date-trigger-template.component.mjs +1 -1
  27. package/esm2020/lib/models/endPointConfiguration.model.mjs +7 -2
  28. package/esm2020/lib/models/fields/actionButton.model.mjs +3 -1
  29. package/esm2020/lib/models/fields/attachmentField.model.mjs +3 -1
  30. package/esm2020/lib/models/fields/booleanField.model.mjs +3 -1
  31. package/esm2020/lib/models/fields/dateField.model.mjs +6 -4
  32. package/esm2020/lib/models/fields/imageField.model.mjs +3 -1
  33. package/esm2020/lib/models/fields/imageSelectorField.model.mjs +3 -1
  34. package/esm2020/lib/models/fields/imageWithMarkersField.model.mjs +3 -1
  35. package/esm2020/lib/models/fields/labelField.model.mjs +3 -1
  36. package/esm2020/lib/models/fields/listValueField.model.mjs +3 -1
  37. package/esm2020/lib/models/fields/numericField.model.mjs +8 -1
  38. package/esm2020/lib/models/fields/textField.model.mjs +3 -1
  39. package/esm2020/lib/models/fields/textareaField.model.mjs +8 -1
  40. package/esm2020/lib/models/form.model.mjs +1 -1
  41. package/fesm2015/eqproject-eqp-dynamic-module.mjs +3540 -535
  42. package/fesm2015/eqproject-eqp-dynamic-module.mjs.map +1 -1
  43. package/fesm2020/eqproject-eqp-dynamic-module.mjs +3459 -547
  44. package/fesm2020/eqproject-eqp-dynamic-module.mjs.map +1 -1
  45. package/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.d.ts +5 -1
  46. package/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.d.ts +74 -6
  47. package/lib/components/private/add-form-field/add-form-field.component.d.ts +208 -1
  48. package/lib/components/private/field-templates/action-button-field-template/action-button-field-template.component.d.ts +16 -10
  49. package/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.d.ts +17 -33
  50. package/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.d.ts +24 -11
  51. package/lib/components/private/field-templates/date-field-template/date-field-template.component.d.ts +21 -4
  52. package/lib/components/private/field-templates/image-field-selector-template/image-field-selector-template.component.d.ts +20 -16
  53. package/lib/components/private/field-templates/image-field-template/image-field-template.component.d.ts +15 -36
  54. package/lib/components/private/field-templates/image-with-markers-field-template/image-with-markers-field-template.component.d.ts +16 -37
  55. package/lib/components/private/field-templates/label-field-template/label-field-template.component.d.ts +16 -12
  56. package/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.d.ts +21 -28
  57. package/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.d.ts +25 -18
  58. package/lib/components/private/field-templates/text-field-template/text-field-template.component.d.ts +38 -10
  59. package/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.d.ts +26 -12
  60. package/lib/components/private/form-records/add-form-record/add-form-record.component.d.ts +12 -2
  61. package/lib/models/endPointConfiguration.model.d.ts +1 -0
  62. package/lib/models/fields/actionButton.model.d.ts +12 -0
  63. package/lib/models/fields/attachmentField.model.d.ts +31 -3
  64. package/lib/models/fields/booleanField.model.d.ts +15 -0
  65. package/lib/models/fields/dateField.model.d.ts +49 -3
  66. package/lib/models/fields/imageField.model.d.ts +9 -0
  67. package/lib/models/fields/imageSelectorField.model.d.ts +23 -0
  68. package/lib/models/fields/imageWithMarkersField.model.d.ts +9 -0
  69. package/lib/models/fields/labelField.model.d.ts +5 -0
  70. package/lib/models/fields/listValueField.model.d.ts +38 -0
  71. package/lib/models/fields/numericField.model.d.ts +34 -0
  72. package/lib/models/fields/textField.model.d.ts +33 -0
  73. package/lib/models/fields/textareaField.model.d.ts +39 -0
  74. package/lib/models/form.model.d.ts +6 -0
  75. package/package.json +3 -3
@@ -15,10 +15,12 @@ import { eventOut } from "../../../directives/dynamic-loader/dynamic-loader.dire
15
15
  import { ActionButton, FireTrigger } from "../../../models/trigger.model";
16
16
  import { ListViewFormRecordComponent } from '../../private/form-records/list-view-form-record/list-view-form-record.component';
17
17
  import { FilterStatistic } from '../../../models/statistic.model';
18
+ import { DomSanitizer, SafeStyle } from '@angular/platform-browser';
18
19
  import * as i0 from "@angular/core";
19
20
  export declare class EqpDynamicModuleComponent implements OnInit, AfterViewInit {
20
21
  utilityHelperService: UtilityHelperService;
21
22
  private changeDetector;
23
+ private sanitizer;
22
24
  debugMode: boolean;
23
25
  configurations: DynamicModuleGeneralConfig;
24
26
  formID: string;
@@ -103,7 +105,9 @@ export declare class EqpDynamicModuleComponent implements OnInit, AfterViewInit
103
105
  dynamicModuleRepairConfig: DynamicModuleRepairConfig;
104
106
  loader: boolean;
105
107
  isDuplicate: boolean;
106
- constructor(utilityHelperService: UtilityHelperService, changeDetector: ChangeDetectorRef);
108
+ constructor(utilityHelperService: UtilityHelperService, changeDetector: ChangeDetectorRef, sanitizer: DomSanitizer);
109
+ get formBgStyle(): SafeStyle | null;
110
+ get formThemeStyle(): SafeStyle | null;
107
111
  ngOnInit(): Promise<void>;
108
112
  ngAfterViewInit(): void;
109
113
  /**
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnInit, TemplateRef } from "@angular/core";
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from "@angular/core";
2
2
  import { UntypedFormBuilder, UntypedFormGroup } from "@angular/forms";
3
3
  import { MatDialog, MatDialogRef } from "@angular/material/dialog";
4
4
  import { ConfigColumn, EqpTableComponent } from "@eqproject/eqp-table";
@@ -9,17 +9,21 @@ import { ActionOnRecord, Form, FormFieldGroup, FormScalarTypeEnum, FormTypeEnum
9
9
  import { UtilityHelperService } from "../../../services/utilityHelper.services";
10
10
  import { DynamicModuleCompileConfig } from "../../../models/dynamicModuleCompileConfig.model";
11
11
  import { DynamicModuleConfiguratorConfig } from "../../../models/dynamicModuleConfiguratorConfig.model";
12
- import { DomSanitizer } from "@angular/platform-browser";
12
+ import { DomSanitizer, SafeStyle } from "@angular/platform-browser";
13
13
  import { DynamicLoaderDirectiveData, eventOut } from "../../../directives/dynamic-loader/dynamic-loader.directive";
14
14
  import { Trigger, ActionButton, ActionFlagEnum, FireTrigger } from '../../../models/trigger.model';
15
15
  import { Contestualization } from "../../../models/getter.model";
16
16
  import { FieldExtraConfig } from "../../../models/fieldExtraConfig.model";
17
+ import { AttachmentType, IAttachmentDTO } from "@eqproject/eqp-attachments";
18
+ import { CdkDragDrop } from '@angular/cdk/drag-drop';
17
19
  import * as i0 from "@angular/core";
18
- export declare class EqpDynamicModuleConfiguratorComponent implements OnInit {
20
+ export declare class EqpDynamicModuleConfiguratorComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy {
19
21
  private formBuilder;
20
22
  private dialog;
21
23
  private utilityHelperService;
22
24
  private sanitizer;
25
+ private cdr;
26
+ private elementRef;
23
27
  debugMode: boolean;
24
28
  fieldsExtraConfig: Array<FieldExtraConfig>;
25
29
  configurations: DynamicModuleConfiguratorConfig;
@@ -30,6 +34,7 @@ export declare class EqpDynamicModuleConfiguratorComponent implements OnInit {
30
34
  actionButtons: any;
31
35
  contestualization: Array<Contestualization>;
32
36
  formulaObject: any;
37
+ configuratorTheme: Record<string, string> | null;
33
38
  fireTrigger: EventEmitter<FireTrigger>;
34
39
  loader: boolean;
35
40
  /**
@@ -74,6 +79,16 @@ export declare class EqpDynamicModuleConfiguratorComponent implements OnInit {
74
79
  }>;
75
80
  FormTypeEnum: typeof FormTypeEnum;
76
81
  FormScalarTypeEnum: typeof FormScalarTypeEnum;
82
+ AttachmentType: typeof AttachmentType;
83
+ get previewBgStyle(): SafeStyle | null;
84
+ get previewThemeStyle(): SafeStyle | null;
85
+ get bgAttachmentList(): IAttachmentDTO[];
86
+ onBgImageChange(attachments: IAttachmentDTO[]): void;
87
+ onBgImageDelete(): void;
88
+ private static readonly FIELD_TYPE_CSS_CLASS;
89
+ private static readonly MODEL_MAP;
90
+ private extractModelFromText;
91
+ onFormGraphicSuggest(): void;
77
92
  fieldsColumns: Array<ConfigColumn>;
78
93
  fieldsTable: EqpTableComponent;
79
94
  selectedField: BaseField;
@@ -116,12 +131,26 @@ export declare class EqpDynamicModuleConfiguratorComponent implements OnInit {
116
131
  triggersColumns: Array<ConfigColumn>;
117
132
  triggersTable: EqpTableComponent;
118
133
  showAllFields: boolean;
134
+ showGraficaPanel: boolean;
119
135
  selectedContestualization: string;
120
136
  selectedContestualizationValue: number;
121
137
  showDeleteButton: boolean;
122
138
  selectedFields: Array<BaseField>;
123
139
  dialogAiEditRef: MatDialogRef<TemplateRef<any>>;
124
140
  dialogAiEdit: TemplateRef<any>;
141
+ dialogContestualizationRef: MatDialogRef<TemplateRef<any>>;
142
+ dialogContestualization: TemplateRef<any>;
143
+ dialogVeTooltip: TemplateRef<any>;
144
+ dialogVeReorder: TemplateRef<any>;
145
+ visualEditorActive: boolean;
146
+ veSelectedField: BaseField | null;
147
+ veSwapField: BaseField | null;
148
+ dialogVeTooltipRef: MatDialogRef<TemplateRef<any>>;
149
+ dialogVeReorderRef: MatDialogRef<TemplateRef<any>>;
150
+ veShowGraphicInput: boolean;
151
+ veGraphicHint: string;
152
+ veReorderFields: BaseField[];
153
+ private veGraphicSuggestActive;
125
154
  aiEditPrompt: string;
126
155
  aiEditAttachments: Array<{
127
156
  fileName: string;
@@ -130,6 +159,15 @@ export declare class EqpDynamicModuleConfiguratorComponent implements OnInit {
130
159
  }>;
131
160
  aiEditAutosave: boolean;
132
161
  aiEditLoading: boolean;
162
+ showAiPromptHistory: boolean;
163
+ aiEditFieldContext: {
164
+ code: string;
165
+ } | null;
166
+ aiFieldSuggestLoading: boolean;
167
+ formGraphicSuggestLoading: boolean;
168
+ formGraphicSuggestHint: string;
169
+ showFormGraphicSuggestInput: boolean;
170
+ get aiPromptHistory(): string[];
133
171
  private readonly AI_MODIFIER_SKILL_TOKENS;
134
172
  private readonly AI_TOKENS_PER_FIELD;
135
173
  private readonly AI_OUTPUT_TOKENS;
@@ -140,7 +178,11 @@ export declare class EqpDynamicModuleConfiguratorComponent implements OnInit {
140
178
  get aiEditCostSubsequentEur(): number;
141
179
  formatAiEditCost(eur: number): string;
142
180
  get isNewForm(): boolean;
143
- constructor(formBuilder: UntypedFormBuilder, dialog: MatDialog, utilityHelperService: UtilityHelperService, sanitizer: DomSanitizer);
181
+ constructor(formBuilder: UntypedFormBuilder, dialog: MatDialog, utilityHelperService: UtilityHelperService, sanitizer: DomSanitizer, cdr: ChangeDetectorRef, elementRef: ElementRef);
182
+ ngOnChanges(changes: SimpleChanges): void;
183
+ private applyTheme;
184
+ ngAfterViewInit(): void;
185
+ ngOnDestroy(): void;
144
186
  ngOnInit(): void;
145
187
  /**
146
188
  * Metodo per configurare gli endpoint da usare di default a partire dall'url base del server
@@ -189,6 +231,8 @@ export declare class EqpDynamicModuleConfiguratorComponent implements OnInit {
189
231
  */
190
232
  onDeleteFormFieldGroupName(groupName: string): void;
191
233
  onEditFormFieldGroupName(formFieldGroup: FormFieldGroup): void;
234
+ /** Clona un oggetto escludendo riferimenti circolari e FormFormGroup */
235
+ private safeClone;
192
236
  /**
193
237
  * Metodo chiamato quando si vuole aggiungere un nuovo campo o si vuole modificare uno esistente.
194
238
  * Memorizza l'eventuale Field scelto one crea uno nuovo prima di aprire il dialog per modificarlo/aggiungerlo.
@@ -376,15 +420,39 @@ export declare class EqpDynamicModuleConfiguratorComponent implements OnInit {
376
420
  deleteActionButton(element: ActionButton): void;
377
421
  openAiEditDialog(): void;
378
422
  closeAiEditDialog(): void;
423
+ onAiEditForField(fieldCode: string): void;
424
+ onAiGraphicSuggest(data: {
425
+ code: string;
426
+ hint: string;
427
+ }): void;
379
428
  onAiEditFileChange(event: Event): void;
380
429
  removeAiEditAttachment(index: number): void;
381
- sendAiEdit(): void;
430
+ sendAiEdit(directPrompt?: string): void;
382
431
  onContestualizationSelect(): void;
383
432
  onContestualizationSelectValue(): void;
384
433
  applyContestualization(element: any): void;
434
+ openContestualizationDialog(): void;
435
+ closeContestualizationDialog(): void;
385
436
  onFireTrigger(ev: FireTrigger): void;
386
437
  toggleDeleteButton(event: Array<BaseField>): void;
387
438
  deleteSelectedFields(propertyName: string): void;
439
+ toggleVisualEditor(): void;
440
+ onVeFieldClick(ev: {
441
+ field: BaseField;
442
+ event: MouseEvent;
443
+ }): void;
444
+ veEditField(): void;
445
+ veAiEdit(): void;
446
+ veSendGraphic(): void;
447
+ veOpenReorder(): void;
448
+ veApplyReorder(): void;
449
+ onVeDragDropReorder(event: CdkDragDrop<BaseField[]>): void;
450
+ veStartSwap(): void;
451
+ veDoSwap(targetField: BaseField): void;
452
+ veCancelSwap(): void;
453
+ veDeleteField(): void;
454
+ private buildRandomGraphicHint;
455
+ private refreshPreview;
388
456
  static ɵfac: i0.ɵɵFactoryDeclaration<EqpDynamicModuleConfiguratorComponent, never>;
389
- static ɵcmp: i0.ɵɵComponentDeclaration<EqpDynamicModuleConfiguratorComponent, "eqp-dynamic-module-configurator", never, { "debugMode": "debugMode"; "fieldsExtraConfig": "fieldsExtraConfig"; "configurations": "configurations"; "formID": "formID"; "viewMode": "viewMode"; "QueryEditorComponent": "QueryEditorComponent"; "triggers": "triggers"; "actionButtons": "actionButtons"; "contestualization": "contestualization"; "formulaObject": "formulaObject"; }, { "fireTrigger": "fireTrigger"; "saveFormEvent": "saveFormEvent"; "afterSaveFormEvent": "afterSaveFormEvent"; "out": "out"; }, never, never, false, never>;
457
+ static ɵcmp: i0.ɵɵComponentDeclaration<EqpDynamicModuleConfiguratorComponent, "eqp-dynamic-module-configurator", never, { "debugMode": "debugMode"; "fieldsExtraConfig": "fieldsExtraConfig"; "configurations": "configurations"; "formID": "formID"; "viewMode": "viewMode"; "QueryEditorComponent": "QueryEditorComponent"; "triggers": "triggers"; "actionButtons": "actionButtons"; "contestualization": "contestualization"; "formulaObject": "formulaObject"; "configuratorTheme": "configuratorTheme"; }, { "fireTrigger": "fireTrigger"; "saveFormEvent": "saveFormEvent"; "afterSaveFormEvent": "afterSaveFormEvent"; "out": "out"; }, never, never, false, never>;
390
458
  }
@@ -8,6 +8,8 @@ import { BaseField, ColSpanSizesEnum, DataGetterCardinalityEnum, FieldInvisibili
8
8
  import { BoolPresentantioEnum } from "../../../models/fields/booleanField.model";
9
9
  import { DateTimeTypeEnum } from "../../../models/fields/dateField.model";
10
10
  import { ListPresentationEnum } from "../../../models/fields/listValueField.model";
11
+ import { NumericFieldIconPositionEnum } from "../../../models/fields/numericField.model";
12
+ import { TextareaFieldIconPositionEnum } from "../../../models/fields/textareaField.model";
11
13
  import { TextFieldIconPositionEnum, TextMaskEnum } from "../../../models/fields/textField.model";
12
14
  import { FormFieldGroup, Form } from '../../../models/form.model';
13
15
  import { UtilityHelperService } from "../../../services/utilityHelper.services";
@@ -46,6 +48,17 @@ export declare class AddFormFieldComponent implements OnInit {
46
48
  field: BaseField;
47
49
  reopen: number;
48
50
  }>;
51
+ openAiEditForFieldEvent: EventEmitter<string>;
52
+ openAiGraphicSuggestEvent: EventEmitter<{
53
+ code: string;
54
+ hint: string;
55
+ }>;
56
+ aiFieldSuggestLoading: boolean;
57
+ showGraphicSuggestInput: boolean;
58
+ graphicSuggestHint: string;
59
+ private ensureFieldCode;
60
+ onOpenAiEditForField(): void;
61
+ onGraphicSuggest(): void;
49
62
  resizedImagesHeightPx: number;
50
63
  fieldFormGroup: UntypedFormGroup;
51
64
  keyValueObject: {
@@ -104,11 +117,19 @@ export declare class AddFormFieldComponent implements OnInit {
104
117
  ListPresentationEnum: typeof ListPresentationEnum;
105
118
  TextMaskEnum: typeof TextMaskEnum;
106
119
  TextFieldIconPositionEnum: typeof TextFieldIconPositionEnum;
120
+ NumericFieldIconPositionEnum: typeof NumericFieldIconPositionEnum;
121
+ TextareaFieldIconPositionEnum: typeof TextareaFieldIconPositionEnum;
122
+ readonly dateTimeIconPositionOptions: {
123
+ value: string;
124
+ label: string;
125
+ }[];
107
126
  AttachmentType: typeof AttachmentType;
108
127
  attachmentFieldTypeEnum: typeof AttachmentFieldTypeEnum;
109
128
  dataGetterTypeEnum: typeof DataGetterTypeEnum;
110
129
  subscription: any;
111
130
  showTextFieldIcon: boolean;
131
+ showNumericFieldIcon: boolean;
132
+ showTextareaFieldIcon: boolean;
112
133
  configColumnListImages: Array<ConfigColumn>;
113
134
  configColumnImage: Array<ConfigColumn>;
114
135
  GenericListImagesImageTemplate: TemplateRef<any>;
@@ -130,6 +151,143 @@ export declare class AddFormFieldComponent implements OnInit {
130
151
  platform: string;
131
152
  loadedFieldExtra: boolean;
132
153
  aggregationFieldLoaded: boolean;
154
+ previewRecord: any;
155
+ styleVersion: number;
156
+ previewForceState: string | null;
157
+ get isTextField(): boolean;
158
+ get isNumericField(): boolean;
159
+ get isTextareaField(): boolean;
160
+ get isBooleanField(): boolean;
161
+ get isAttachmentField(): boolean;
162
+ get isLabelField(): boolean;
163
+ get isDateField(): boolean;
164
+ get isActionButtonField(): boolean;
165
+ get isImageField(): boolean;
166
+ get isImageWithMarkersField(): boolean;
167
+ get isListValueField(): boolean;
168
+ get isImageSelectorField(): boolean;
169
+ /** Metadati degli elementi del TextField per le tab CSS */
170
+ readonly textFieldStyleElements: {
171
+ key: string;
172
+ label: string;
173
+ }[];
174
+ /** Metadati degli stati per le tab CSS */
175
+ readonly textFieldStyleStates: {
176
+ key: string;
177
+ label: string;
178
+ }[];
179
+ selectedTextFieldStyleState: string | null;
180
+ /** Metadati degli elementi del NumericField per le tab CSS (senza Microfono) */
181
+ readonly numericFieldStyleElements: {
182
+ key: string;
183
+ label: string;
184
+ }[];
185
+ readonly numericFieldStyleStates: {
186
+ key: string;
187
+ label: string;
188
+ }[];
189
+ selectedNumericFieldStyleState: string | null;
190
+ /** Metadati degli elementi del TextareaField per le tab CSS */
191
+ readonly textareaFieldStyleElements: {
192
+ key: string;
193
+ label: string;
194
+ }[];
195
+ readonly textareaFieldStyleStates: {
196
+ key: string;
197
+ label: string;
198
+ }[];
199
+ selectedTextareaFieldStyleState: string | null;
200
+ /** Metadati degli elementi del BooleanField per le tab CSS (3 elementi, senza NotValid) */
201
+ readonly booleanFieldStyleElements: {
202
+ key: string;
203
+ label: string;
204
+ }[];
205
+ readonly booleanFieldStyleStates: {
206
+ key: string;
207
+ label: string;
208
+ }[];
209
+ selectedBooleanFieldStyleState: string | null;
210
+ /** Metadati degli elementi del AttachmentField per le tab CSS */
211
+ readonly attachmentFieldStyleElements: {
212
+ key: string;
213
+ label: string;
214
+ }[];
215
+ readonly attachmentFieldStyleStates: {
216
+ key: string;
217
+ label: string;
218
+ }[];
219
+ selectedAttachmentFieldStyleState: string | null;
220
+ /** Metadati degli elementi del LabelField per le tab CSS (1 elemento, 2 stati) */
221
+ readonly labelFieldStyleElements: {
222
+ key: string;
223
+ label: string;
224
+ }[];
225
+ readonly labelFieldStyleStates: {
226
+ key: string;
227
+ label: string;
228
+ }[];
229
+ selectedLabelFieldStyleState: string | null;
230
+ /** Metadati degli elementi del DateField per le tab CSS (8 elementi, 5 stati) */
231
+ readonly dateFieldStyleElements: {
232
+ key: string;
233
+ label: string;
234
+ }[];
235
+ readonly dateFieldStyleStates: {
236
+ key: string;
237
+ label: string;
238
+ }[];
239
+ selectedDateFieldStyleState: string | null;
240
+ /** Metadati degli elementi del ActionButtonField per le tab CSS (3 elementi, 3 stati) */
241
+ readonly actionButtonFieldStyleElements: {
242
+ key: string;
243
+ label: string;
244
+ }[];
245
+ readonly actionButtonFieldStyleStates: {
246
+ key: string;
247
+ label: string;
248
+ }[];
249
+ selectedActionButtonFieldStyleState: string | null;
250
+ /** Metadati degli elementi del ImageField per le tab CSS (3 elementi, 2 stati) */
251
+ readonly imageFieldStyleElements: {
252
+ key: string;
253
+ label: string;
254
+ }[];
255
+ readonly imageFieldStyleStates: {
256
+ key: string;
257
+ label: string;
258
+ }[];
259
+ selectedImageFieldStyleState: string | null;
260
+ /** Metadati degli elementi del ImageWithMarkersField per le tab CSS (3 elementi, 2 stati) */
261
+ readonly imageWithMarkersFieldStyleElements: {
262
+ key: string;
263
+ label: string;
264
+ }[];
265
+ readonly imageWithMarkersFieldStyleStates: {
266
+ key: string;
267
+ label: string;
268
+ }[];
269
+ selectedImageWithMarkersFieldStyleState: string | null;
270
+ private readonly listValueComboElements;
271
+ private readonly listValueRadioElements;
272
+ private readonly listValueButtonElements;
273
+ get listValueStyleElements(): {
274
+ key: string;
275
+ label: string;
276
+ }[];
277
+ readonly listValueFieldStyleStates: {
278
+ key: string;
279
+ label: string;
280
+ }[];
281
+ selectedListValueFieldStyleState: string | null;
282
+ readonly imageSelectorFieldStyleElements: {
283
+ key: string;
284
+ label: string;
285
+ }[];
286
+ readonly imageSelectorFieldStyleStates: {
287
+ key: string;
288
+ label: string;
289
+ }[];
290
+ selectedImageSelectorFieldStyleState: string | null;
133
291
  constructor(formBuilder: UntypedFormBuilder, enumHelper: EnumHelper, dialog: MatDialog, cdr: ChangeDetectorRef, httpClient: HttpClient, utilityHelperService: UtilityHelperService);
134
292
  ngOnInit(): Promise<void>;
135
293
  /**
@@ -232,12 +390,61 @@ export declare class AddFormFieldComponent implements OnInit {
232
390
  openReadOnlyIfDialog(): void;
233
391
  openAnswerStyleVisibleIfDialog(): void;
234
392
  onTextFieldIconToggle(enabled: boolean): void;
393
+ /** Legge il valore di una proprietà CSS da TextFieldStyleCSS */
394
+ getStyleValue(key: string): string;
395
+ /** Imposta o cancella una proprietà CSS in TextFieldStyleCSS e aggiorna l'anteprima */
396
+ setStyleValue(key: string, value: string): void;
397
+ /** Inizializza la preview del TextField (FormFormGroup + record dummy) */
398
+ initTextFieldPreview(): void;
399
+ /** Aggiorna Name e FormFormGroup quando il Codice cambia, per mantenere la preview allineata */
400
+ onLabelChangeForPreview(newLabel: string): void;
401
+ /** Sincronizza MinValue/MaxValue dal fieldFormGroup al campo e aggiorna i validator dell'anteprima */
402
+ onNumericMinMaxChange(): void;
403
+ onNumericFieldIconToggle(enabled: boolean): void;
404
+ getNumericStyleValue(key: string): string;
405
+ setNumericStyleValue(key: string, value: string): void;
406
+ initNumericFieldPreview(): void;
407
+ onTextareaFieldIconToggle(enabled: boolean): void;
408
+ getTextareaStyleValue(key: string): string;
409
+ setTextareaStyleValue(key: string, value: string): void;
410
+ initTextareaFieldPreview(): void;
411
+ getBooleanStyleValue(key: string): string;
412
+ setBooleanStyleValue(key: string, value: string): void;
413
+ initBooleanFieldPreview(): void;
414
+ getAttachmentStyleValue(key: string): string;
415
+ setAttachmentStyleValue(key: string, value: string): void;
416
+ initAttachmentFieldPreview(): void;
417
+ getLabelStyleValue(key: string): string;
418
+ setLabelStyleValue(key: string, value: string): void;
419
+ initLabelFieldPreview(): void;
420
+ onDateTypeChange(): void;
421
+ getDateStyleValue(key: string): string;
422
+ setDateStyleValue(key: string, value: string): void;
423
+ initDateFieldPreview(): void;
424
+ getActionButtonStyleValue(key: string): string;
425
+ setActionButtonStyleValue(key: string, value: string): void;
426
+ initActionButtonFieldPreview(): void;
427
+ getImageStyleValue(key: string): string;
428
+ setImageStyleValue(key: string, value: string): void;
429
+ initImageFieldPreview(): void;
430
+ getImageWithMarkersStyleValue(key: string): string;
431
+ setImageWithMarkersStyleValue(key: string, value: string): void;
432
+ initImageWithMarkersFieldPreview(): void;
433
+ getListValueStyleValue(key: string): string;
434
+ setListValueStyleValue(key: string, value: string): void;
435
+ initListValueFieldPreview(): void;
436
+ onIsMultiChoicheChange(): void;
437
+ getImageSelectorStyleValue(key: string): string;
438
+ setImageSelectorStyleValue(key: string, value: string): void;
439
+ initImageSelectorFieldPreview(): void;
235
440
  stringSanitizer(value: any): void;
236
441
  /**
237
442
  * Metodo per disabilitare il pulsante per salvare il campo inserito/modificato.
238
443
  * @returns Restituisce un booleano, se true il salvataggio viene disabilitato.
239
444
  */
240
445
  disableSaveField(): boolean;
446
+ onSaveClick(): void;
447
+ private collectValidationErrors;
241
448
  /**
242
449
  * Metodo per salvare il campo inserito/modificato.
243
450
  * Se è stato inserito un field con la stessa label viene generato un errore (le label devono essere univoche).
@@ -271,5 +478,5 @@ export declare class AddFormFieldComponent implements OnInit {
271
478
  changedButtonField(field: ActionButtonField): void;
272
479
  configureFieldsExtra(): void;
273
480
  static ɵfac: i0.ɵɵFactoryDeclaration<AddFormFieldComponent, never>;
274
- static ɵcmp: i0.ɵɵComponentDeclaration<AddFormFieldComponent, "eqp-dynamic-module-add-form-field", never, { "fieldsExtraConfig": "fieldsExtraConfig"; "form": "form"; "endPointConfiguration": "endPointConfiguration"; "field": "field"; "indexField": "indexField"; "formFieldsGroups": "formFieldsGroups"; "availableFields": "availableFields"; "fieldTypesToExclude": "fieldTypesToExclude"; "QueryEditorComponent": "QueryEditorComponent"; "contestualization": "contestualization"; "actionButtons": "actionButtons"; "formulaObject": "formulaObject"; }, { "out": "out"; "saveFieldEvent": "saveFieldEvent"; }, never, never, false, never>;
481
+ static ɵcmp: i0.ɵɵComponentDeclaration<AddFormFieldComponent, "eqp-dynamic-module-add-form-field", never, { "fieldsExtraConfig": "fieldsExtraConfig"; "form": "form"; "endPointConfiguration": "endPointConfiguration"; "field": "field"; "indexField": "indexField"; "formFieldsGroups": "formFieldsGroups"; "availableFields": "availableFields"; "fieldTypesToExclude": "fieldTypesToExclude"; "QueryEditorComponent": "QueryEditorComponent"; "contestualization": "contestualization"; "actionButtons": "actionButtons"; "formulaObject": "formulaObject"; "aiFieldSuggestLoading": "aiFieldSuggestLoading"; }, { "out": "out"; "saveFieldEvent": "saveFieldEvent"; "openAiEditForFieldEvent": "openAiEditForFieldEvent"; "openAiGraphicSuggestEvent": "openAiGraphicSuggestEvent"; }, never, never, false, never>;
275
482
  }
@@ -1,29 +1,35 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from '@angular/core';
2
2
  import { Record } from '../../../../models/record.model';
3
3
  import { FireTrigger } from '../../../../models/trigger.model';
4
4
  import { ActionButtonField } from '../../../../models/fields/actionButton.model';
5
5
  import * as i0 from "@angular/core";
6
- export declare class ActionButtonFieldTemplateComponent {
6
+ export declare class ActionButtonFieldTemplateComponent implements OnInit, OnChanges, OnDestroy {
7
+ private renderer;
7
8
  field: ActionButtonField;
8
9
  record: Record;
9
10
  formulaObject: any;
10
11
  inConfig: boolean;
12
+ styleVersion: number;
13
+ forceState: string | null;
11
14
  fireTrigger: EventEmitter<FireTrigger>;
12
15
  recordChange: EventEmitter<Record>;
13
16
  FieldstyleObj: any;
14
- constructor();
17
+ fieldUid: string;
18
+ private styleEl;
19
+ constructor(renderer: Renderer2);
15
20
  ngOnInit(): void;
21
+ ngOnChanges(changes: SimpleChanges): void;
22
+ ngOnDestroy(): void;
16
23
  initStyles(): void;
17
- /**
18
- * Metodo per aggiornare il valore del campo quando questo è rappresentato da una formula.
19
- */
24
+ private injectStyles;
25
+ private getSelector;
26
+ private buildCssRules;
27
+ private updateStateClasses;
28
+ private toggleClass;
20
29
  updateField(): void;
21
30
  generateAction(actionButton: ActionButtonField): void;
22
31
  evaluateFormulasAndFireTrigger(triggerToFire: FireTrigger): void;
23
- /**
24
- * Metodo per emettere l'evento che il valore del record è cambiato.
25
- */
26
32
  onRecordValueChange(): void;
27
33
  static ɵfac: i0.ɵɵFactoryDeclaration<ActionButtonFieldTemplateComponent, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<ActionButtonFieldTemplateComponent, "action-button-field-template", never, { "field": "field"; "record": "record"; "formulaObject": "formulaObject"; "inConfig": "inConfig"; }, { "fireTrigger": "fireTrigger"; "recordChange": "recordChange"; }, never, never, false, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<ActionButtonFieldTemplateComponent, "action-button-field-template", never, { "field": "field"; "record": "record"; "formulaObject": "formulaObject"; "inConfig": "inConfig"; "styleVersion": "styleVersion"; "forceState": "forceState"; }, { "fireTrigger": "fireTrigger"; "recordChange": "recordChange"; }, never, never, false, never>;
29
35
  }
@@ -1,58 +1,42 @@
1
- import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from '@angular/core';
2
2
  import { Record } from '../../../../models/record.model';
3
3
  import { AttachmentField } from '../../../../models/fields/attachmentField.model';
4
4
  import { IBaseFieldComponent } from '../../../../interfaces/iBaseFieldComponent.interface';
5
5
  import { UtilityHelperService } from '../../../../services/utilityHelper.services';
6
6
  import { EqpAttachmentsComponent } from '@eqproject/eqp-attachments';
7
7
  import * as i0 from "@angular/core";
8
- export declare class AttachmentFieldTemplateComponent implements OnInit, OnChanges, IBaseFieldComponent, AfterViewInit {
8
+ export declare class AttachmentFieldTemplateComponent implements OnInit, OnChanges, OnDestroy, IBaseFieldComponent, AfterViewInit {
9
9
  utilityService: UtilityHelperService;
10
10
  private cdr;
11
+ private renderer;
11
12
  onlyImages: boolean;
12
13
  field: AttachmentField;
13
14
  record: Record;
14
15
  formulaObject: any;
15
16
  inConfig: boolean;
17
+ styleVersion: number;
18
+ forceState: string | null;
16
19
  recordChange: EventEmitter<Record>;
17
20
  onAttachmentsChange: EventEmitter<void>;
18
21
  eqpAttachments: EqpAttachmentsComponent;
19
- constructor(utilityService: UtilityHelperService, cdr: ChangeDetectorRef);
22
+ fieldUid: string;
23
+ private styleEl;
24
+ private statusSub;
25
+ constructor(utilityService: UtilityHelperService, cdr: ChangeDetectorRef, renderer: Renderer2);
20
26
  ngOnInit(): void;
21
27
  ngAfterViewInit(): void;
22
28
  ngOnChanges(changes: SimpleChanges): void;
23
- /**
24
- * Metodo per aggiornare il valore del campo quando questo è rappresentato da una formula.
25
- */
29
+ ngOnDestroy(): void;
30
+ injectAttachmentFieldStyles(): void;
31
+ private getSelector;
32
+ private buildCssRules;
33
+ private updateStateClasses;
34
+ private toggleClass;
35
+ private subscribeToFormStatus;
26
36
  updateField(): void;
27
- /**
28
- * Metodo per intercettare le modifiche agli allegati caricati.
29
- * Se il campo prevede dei metadata allora per ogni allegato caricato crea un FormGroup
30
- * per gestire la validazione degli input che l'utente può/deve riempire. I FormGroup
31
- * seguono lo stesso ordine degli allegati caricati.
32
- * @param event Contiene la lista aggiornata degli Attachment caricati dall'utente.
33
- */
34
37
  catchAttachmentList(event: any): void;
35
- /**
36
- * Metodo per aggiornare lo stato di validazione del FormControl che rappresenta
37
- * il campo Allegato (non i metadata al suo interno). Se tra le form dei metadata
38
- * ne trova una invalida allora marca il controllo come invalido.
39
- */
40
- /**
41
- * Metodo per recuperare il BaseField che rappresenta il metadata nella riga della eqp-table
42
- * in base alla colonna e alla riga. Una volta trovato il BaseField gli viene associato il
43
- * FormGroup di cui fa parte.
44
- * @param col Colonna della eqp-table.
45
- * @param row Riga della eqp-table (in questo caso eredita da IAttachment).
46
- * @returns Restituisce un BaseField per renderizzare il campo nella eqp-table degli allegati multipli.
47
- */
48
- /**
49
- * Metodo per aggiornare il valore e il validator del FormControl associato al campo.
50
- */
51
38
  private setFormControlValue;
52
- /**
53
- * Metodo per emettere l'evento che il valore del record è cambiato.
54
- */
55
39
  private onRecordValueChange;
56
40
  static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentFieldTemplateComponent, never>;
57
- static ɵcmp: i0.ɵɵComponentDeclaration<AttachmentFieldTemplateComponent, "attachment-field-template", never, { "onlyImages": "onlyImages"; "field": "field"; "record": "record"; "formulaObject": "formulaObject"; "inConfig": "inConfig"; }, { "recordChange": "recordChange"; "onAttachmentsChange": "onAttachmentsChange"; }, never, never, false, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<AttachmentFieldTemplateComponent, "attachment-field-template", never, { "onlyImages": "onlyImages"; "field": "field"; "record": "record"; "formulaObject": "formulaObject"; "inConfig": "inConfig"; "styleVersion": "styleVersion"; "forceState": "forceState"; }, { "recordChange": "recordChange"; "onAttachmentsChange": "onAttachmentsChange"; }, never, never, false, never>;
58
42
  }
@@ -1,30 +1,43 @@
1
- import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
1
+ import { EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from '@angular/core';
2
2
  import { Record } from '../../../../models/record.model';
3
3
  import { BooleanField, BoolPresentantioEnum } from '../../../../models/fields/booleanField.model';
4
4
  import { IBaseFieldComponent } from '../../../../interfaces/iBaseFieldComponent.interface';
5
5
  import * as i0 from "@angular/core";
6
- export declare class BooleanFieldTemplateComponent implements OnInit, OnChanges, IBaseFieldComponent {
6
+ export declare class BooleanFieldTemplateComponent implements OnInit, OnChanges, OnDestroy, IBaseFieldComponent {
7
+ private renderer;
7
8
  field: BooleanField;
8
9
  record: Record;
9
10
  formulaObject: any;
11
+ inConfig: boolean;
12
+ /** Incrementa dall'esterno per forzare il ricalcolo degli stili CSS (es. dal configuratore) */
13
+ styleVersion: number;
14
+ /** Forza visivamente uno stato specifico nell'anteprima del configuratore */
15
+ forceState: string | null;
10
16
  recordChange: EventEmitter<Record>;
11
17
  FieldstyleObj: any;
12
18
  LabelstyleObj: any;
13
19
  BoolPresentantioEnum: typeof BoolPresentantioEnum;
14
- constructor();
20
+ fieldUid: string;
21
+ private styleEl;
22
+ private statusSub;
23
+ constructor(renderer: Renderer2);
15
24
  initStyles(): void;
16
25
  ngOnInit(): void;
26
+ ngOnChanges(changes: SimpleChanges): void;
27
+ ngOnDestroy(): void;
28
+ /** Rigenera il tag <style> con defaults + regole utente, entrambi scoped per #uid */
29
+ injectBooleanFieldStyles(): void;
30
+ /** Costruisce il selettore CSS per un dato elemento e stato */
31
+ private getSelector;
32
+ private buildCssRules;
33
+ /** Aggiorna le classi di stato sul wrapper (eqp-readonly, eqp-state-*) */
34
+ private updateStateClasses;
35
+ private toggleClass;
36
+ private subscribeToFormStatus;
17
37
  checkReadonly(): void;
18
38
  checkVisibility(defaultValue: any): void;
19
- ngOnChanges(changes: SimpleChanges): void;
20
- /**
21
- * Metodo per aggiornare il valore del campo quando questo è rappresentato da una formula.
22
- */
23
39
  updateField(): void;
24
- /**
25
- * Metodo per emettere l'evento che il valore del record è cambiato.
26
- */
27
40
  onRecordValueChange(): void;
28
41
  static ɵfac: i0.ɵɵFactoryDeclaration<BooleanFieldTemplateComponent, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<BooleanFieldTemplateComponent, "boolean-field-template", never, { "field": "field"; "record": "record"; "formulaObject": "formulaObject"; }, { "recordChange": "recordChange"; }, never, never, false, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<BooleanFieldTemplateComponent, "boolean-field-template", never, { "field": "field"; "record": "record"; "formulaObject": "formulaObject"; "inConfig": "inConfig"; "styleVersion": "styleVersion"; "forceState": "forceState"; }, { "recordChange": "recordChange"; }, never, never, false, never>;
30
43
  }