@eqproject/eqp-dynamic-module 2.10.103 → 2.10.105

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 (63) hide show
  1. package/README.md +15 -22
  2. package/USERGUIDE.md +437 -437
  3. package/esm2020/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.mjs +25 -25
  4. package/esm2020/lib/components/private/action-button-creator/action-button-creator.component.mjs +4 -4
  5. package/esm2020/lib/components/private/add-form-field/add-form-field.component.mjs +58 -41
  6. package/esm2020/lib/components/private/add-formula-field/add-formula-field.component.mjs +78 -17
  7. package/esm2020/lib/components/private/dbg-templates/list-value-dbg-template/list-value-dbg-template.component.mjs +4 -4
  8. package/esm2020/lib/components/private/dbgetter/dbgetter.component.mjs +5 -5
  9. package/esm2020/lib/components/private/dynamic-module-field-extra-fix/dynamic-module-field-extra-fix.component.mjs +24 -6
  10. package/esm2020/lib/components/private/field-templates/action-button-field-template/action-button-field-template.component.mjs +5 -5
  11. package/esm2020/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.mjs +10 -10
  12. package/esm2020/lib/components/private/field-templates/date-field-template/date-field-template.component.mjs +2 -2
  13. package/esm2020/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.mjs +4 -4
  14. package/esm2020/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.mjs +9 -16
  15. package/esm2020/lib/components/private/field-templates/text-field-template/text-field-template.component.mjs +6 -6
  16. package/esm2020/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.mjs +6 -6
  17. package/esm2020/lib/components/private/form-records/add-form-record/add-form-record.component.mjs +5 -5
  18. package/esm2020/lib/components/private/form-records/hlist-form-record/hlist-form-record.component.mjs +5 -5
  19. package/esm2020/lib/components/private/form-records/list-form-record/list-form-record.component.mjs +10 -10
  20. package/esm2020/lib/components/private/form-records/list-view-form-record/list-view-form-record.component.mjs +10 -10
  21. package/esm2020/lib/components/private/form-statistics/filter-form-statistic/filter-form-statistic.component.mjs +9 -32
  22. package/esm2020/lib/components/private/form-statistics/filter-templates/boolean-filter-template/boolean-filter-template.component.mjs +7 -7
  23. package/esm2020/lib/components/private/form-statistics/filter-templates/date-filter-template/date-filter-template.component.mjs +8 -8
  24. package/esm2020/lib/components/private/form-statistics/filter-templates/image-selector-filter-template/image-selector-filter-template.component.mjs +3 -3
  25. package/esm2020/lib/components/private/form-statistics/filter-templates/list-value-filter-template/list-value-filter-template.component.mjs +6 -6
  26. package/esm2020/lib/components/private/form-statistics/filter-templates/numeric-filter-template/numeric-filter-template.component.mjs +10 -17
  27. package/esm2020/lib/components/private/form-statistics/filter-templates/text-filter-template/text-filter-template.component.mjs +7 -7
  28. package/esm2020/lib/components/private/form-statistics/filter-templates/textarea-filter-template/textarea-filter-template.component.mjs +7 -7
  29. package/esm2020/lib/components/private/graphs/graph/graph.component.mjs +3 -3
  30. package/esm2020/lib/components/private/graphs/graphs.component.mjs +4 -4
  31. package/esm2020/lib/components/private/tmw-image-drawer/tmw-image-drawer.component.mjs +5 -5
  32. package/esm2020/lib/components/private/tmw-image-marker/tmw-image-marker.component.mjs +6 -6
  33. package/esm2020/lib/components/private/trigger-creator/trigger-creator.component.mjs +10 -8
  34. package/esm2020/lib/components/private/trigger-creator/trigger-templates/boolean-trigger-template/boolean-trigger-template.component.mjs +4 -4
  35. package/esm2020/lib/components/private/trigger-creator/trigger-templates/date-trigger-template/date-trigger-template.component.mjs +5 -5
  36. package/esm2020/lib/components/private/trigger-creator/trigger-templates/list-value-trigger-template/list-value-trigger-template.component.mjs +4 -4
  37. package/esm2020/lib/components/private/trigger-creator/trigger-templates/numeric-trigger-template/numeric-trigger-template.component.mjs +7 -14
  38. package/esm2020/lib/components/private/trigger-creator/trigger-templates/text-trigger-template/text-trigger-template.component.mjs +7 -7
  39. package/esm2020/lib/components/private/trigger-creator/trigger-templates/textarea-trigger-template/textarea-trigger-template.component.mjs +7 -7
  40. package/esm2020/lib/eqp-dynamic-module.module.mjs +44 -22
  41. package/esm2020/lib/models/dynAttachment.mjs +1 -1
  42. package/fesm2015/eqproject-eqp-dynamic-module.mjs +343 -269
  43. package/fesm2015/eqproject-eqp-dynamic-module.mjs.map +1 -1
  44. package/fesm2020/eqproject-eqp-dynamic-module.mjs +343 -268
  45. package/fesm2020/eqproject-eqp-dynamic-module.mjs.map +1 -1
  46. package/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.d.ts +8 -8
  47. package/lib/components/private/add-form-field/add-form-field.component.d.ts +13 -13
  48. package/lib/components/private/add-formula-field/add-formula-field.component.d.ts +5 -1
  49. package/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.d.ts +2 -2
  50. package/lib/components/private/field-templates/date-field-template/date-field-template.component.d.ts +1 -1
  51. package/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.d.ts +2 -2
  52. package/lib/components/private/form-records/hlist-form-record/hlist-form-record.component.d.ts +2 -2
  53. package/lib/components/private/form-records/list-form-record/list-form-record.component.d.ts +2 -2
  54. package/lib/components/private/form-records/list-view-form-record/list-view-form-record.component.d.ts +2 -2
  55. package/lib/components/private/form-statistics/filter-form-statistic/filter-form-statistic.component.d.ts +3 -4
  56. package/lib/components/private/form-statistics/filter-templates/date-filter-template/date-filter-template.component.d.ts +1 -1
  57. package/lib/components/private/form-statistics/filter-templates/numeric-filter-template/numeric-filter-template.component.d.ts +2 -2
  58. package/lib/components/private/trigger-creator/trigger-creator.component.d.ts +2 -0
  59. package/lib/components/private/trigger-creator/trigger-templates/date-trigger-template/date-trigger-template.component.d.ts +1 -1
  60. package/lib/components/private/trigger-creator/trigger-templates/numeric-trigger-template/numeric-trigger-template.component.d.ts +2 -2
  61. package/lib/eqp-dynamic-module.module.d.ts +26 -9
  62. package/lib/models/dynAttachment.d.ts +2 -2
  63. package/package.json +15 -8
package/README.md CHANGED
@@ -12,26 +12,17 @@
12
12
 
13
13
  ## Changelog
14
14
 
15
- ### v2.10.102
16
- - **Bugfix `ListValueField` (Combo box) pulsante di cancellazione (X) sempre presente:** in `list-value-field-template`, il pulsante "X" di `tmw-select` era condizionato a `!field.Required` (nascosto sui campi obbligatori). Ora `showCancelButton` è sempre `true`, indipendentemente dall'obbligatorietà del campo: l'utente può sempre svuotare la selezione, anche su un campo required (la validazione `required` interviene comunque al salvataggio). Nessun cambio di API pubblica.
17
- - **Bugfix `ListValueField` (Combo box) cancel button (X) always present:** in `list-value-field-template`, the `tmw-select` "X" clear button was conditioned on `!field.Required` (hidden on required fields). `showCancelButton` is now always `true`, regardless of whether the field is required: the user can always clear the selection, and `required` validation still applies on save. No public API change.
18
-
19
- ### v2.10.101
20
- - **Migrazione interna `eqp-table`/`eqp-attachments`/`eqp-numeric` → `tmw-table`/`tmw-attachments`/`tmw-numeric`:** le ultime tre dipendenze `@eqproject/eqp-*` sono state sostituite dalle librerie Material-free `tmw-*` (stesso lavoro già fatto per `eqp-select`/`eqp-datetimepicker` nelle versioni precedenti). Nessun cambio di API pubblica di questa libreria: i tag `<eqp-table>`/`<eqp-attachments>` erano già privati, i modelli `ConfigColumn`/`TypeColumn`/`DynAttachment` restano gli stessi nomi/forma. Chi consuma questa libreria non deve più installare `@eqproject/eqp-table`, `@eqproject/eqp-attachments`, `@eqproject/eqp-numeric` né `@eqproject/eqp-filters` (import morto, mai realmente usato).
21
- - **Migrazione completa `<mat-icon>` `<tmw-icon>`:** tutte le icone della libreria (inclusi i pulsanti del builder, i template di campo e le colonne azione delle tabelle) sono ora renderizzate dalla nuova libreria `tmw-icons` (SVG inline, icone vendorizzate da Tabler Icons, nessuna dipendenza dal font Material Icons). **Attenzione per chi ha form esistenti con icone personalizzate**: i campi di testo libero "Icona" (`IconName` su `TextField`/`NumericField`/`TextareaField`, `Icon` su `ActionButton`) si aspettavano nomi Material Icons (es. `search`, `home`, `euro`) — ora si aspettano nomi Tabler Icons (es. `search`, `user`, `currency-euro`); i nomi già salvati che non trovano corrispondenza esatta nel registro `tmw-icons` semplicemente non renderizzano l'icona (nessun errore a runtime, solo icona assente). Nessun impatto sul resto del form.
22
- - **Pulizia dipendenze:** rimosse dalle `peerDependencies` `@angular-material-components/datetime-picker`, `@angular-material-components/moment-adapter` e `moment` (mai più necessarie dopo la migrazione a `tmw-picker`, completata in una versione precedente). Nuove dipendenze dirette: `tmw-attachments`, `tmw-icons`, `tmw-numeric`, `tmw-table`, `xlsx` (quest'ultima solo per l'export XLSX di `filter-form-statistic`, `tmw-table` non ha un formato XLSX nativo).
23
-
24
- - **Internal migration `eqp-table`/`eqp-attachments`/`eqp-numeric` `tmw-table`/`tmw-attachments`/`tmw-numeric`:** the last three `@eqproject/eqp-*` dependencies have been replaced with the Material-free `tmw-*` libraries (same work already done for `eqp-select`/`eqp-datetimepicker` in previous versions). No public API change in this library: the `<eqp-table>`/`<eqp-attachments>` tags were already private, the `ConfigColumn`/`TypeColumn`/`DynAttachment` models keep the same names/shape. Consumers of this library no longer need to install `@eqproject/eqp-table`, `@eqproject/eqp-attachments`, `@eqproject/eqp-numeric` or `@eqproject/eqp-filters` (dead import, never actually used).
25
- - **Complete `<mat-icon>` → `<tmw-icon>` migration:** every icon in the library (including builder buttons, field templates and table action columns) is now rendered by the new `tmw-icons` library (inline SVG, icons vendored from Tabler Icons, no dependency on the Material Icons font). **Note for existing forms with custom icons**: the free-text "Icon" fields (`IconName` on `TextField`/`NumericField`/`TextareaField`, `Icon` on `ActionButton`) used to expect Material Icons names (e.g. `search`, `home`, `euro`) — they now expect Tabler Icons names (e.g. `search`, `user`, `currency-euro`); previously saved names with no exact match in the `tmw-icons` registry simply don't render the icon (no runtime error, just a missing icon). No impact on the rest of the form.
26
- - **Dependency cleanup:** removed `@angular-material-components/datetime-picker`, `@angular-material-components/moment-adapter` and `moment` from `peerDependencies` (no longer needed after the `tmw-picker` migration, completed in a previous version). New direct dependencies: `tmw-attachments`, `tmw-icons`, `tmw-numeric`, `tmw-table`, `xlsx` (the latter only for `filter-form-statistic`'s XLSX export — `tmw-table` has no native XLSX format).
27
-
28
- ### v2.10.100
29
- - **Cleanup — rimossi import morti di `@eqproject/eqp-datetimepicker` e `@eqproject/eqp-img-drawing`:** entrambi erano registrati nell'`NgModule` (`EqpDatetimepickerModule`, `EqpImgDrawingModule`) e in `trigger-creator.component.ts` (`PickerModeEnum`) ma non più usati da nessun template — sostituiti internamente da tempo da `tmw-datetimepicker` (campo Data) e da `tmw-image-drawer`/`tmw-image-marker` (campo Immagine con markers). Nessun impatto funzionale: build verificata anche con i due pacchetti fisicamente assenti da `node_modules`, per provare che non fossero più necessari. Chi consuma questa libreria non deve più installare `@eqproject/eqp-datetimepicker` né `@eqproject/eqp-img-drawing`.
30
- - **Cleanup — removed dead imports of `@eqproject/eqp-datetimepicker` and `@eqproject/eqp-img-drawing`:** both were registered in the `NgModule` (`EqpDatetimepickerModule`, `EqpImgDrawingModule`) and in `trigger-creator.component.ts` (`PickerModeEnum`) but no longer used by any template — internally superseded a while ago by `tmw-datetimepicker` (Date field) and `tmw-image-drawer`/`tmw-image-marker` (Image with markers field). No functional impact: build verified even with both packages physically absent from `node_modules`, to prove they were no longer required. Consumers of this library no longer need to install `@eqproject/eqp-datetimepicker` or `@eqproject/eqp-img-drawing`.
31
-
32
- ### v2.10.99
33
- - **Bugfix configurator — immagine persa su campo `Immagine`/`Immagine con markers`:** `catchButtonImageChange` e `catchButtonImageWithMarkersChange` in `add-form-field` leggevano l'indice sbagliato (`attachments[1]`) dell'array emesso da `eqp-attachments`. Al primo caricamento di un'immagine su un campo nuovo l'array ha un solo elemento, quindi `field.DynAttachment` veniva sovrascritto con `undefined`: l'immagine spariva riaprendo la modale di modifica campo e non compariva mai in anteprima. Corretto leggendo `attachments[attachments.length - 1]`.
34
- - **Bugfix configurator — image lost on `Image`/`Image with markers` field:** `catchButtonImageChange` and `catchButtonImageWithMarkersChange` in `add-form-field` were reading the wrong index (`attachments[1]`) from the array emitted by `eqp-attachments`. On the first image upload to a new field the array has only one element, so `field.DynAttachment` was overwritten with `undefined`: the image disappeared when reopening the field edit dialog and never showed up in the preview. Fixed to read `attachments[attachments.length - 1]`.
15
+ ### v2.10.104
16
+ - **Bugfix triggercondizioni multiple valutate come indipendenti:** `checkTriggers` applicava ogni condizione isolatamente, ignorando `booleanlogicoperator` (AND/OR/AND NOT/OR NOT): un trigger con più condizioni e almeno un OR poteva non scattare mai o scattare quando non doveva. Introdotto `evaluateTriggerCondition()` che valuta la singola condizione e combina il risultato con quello accumulato secondo l'operatore booleano dichiarato tra le condizioni.
17
+ - **Bugfix configurator salvataggio Trigger/ActionButton non persisteva le modifiche:** `saveActionButtons`/`saveTriggers` cercavano l'elemento esistente con `.find()` e riassegnavano la variabile locale invece dell'elemento nell'array (`existsTrigger = element` non scriveva su `form.Triggers`), per cui le modifiche a un trigger o action button già esistente venivano perse al salvataggio. Ora si usa `.findIndex()` e si scrive sull'array tramite l'indice.
18
+ - **Trigger — descrizione obbligatoria:** il campo "Descrizione" del trigger e il "Tipo Trigger" sono ora obbligatori per il salvataggio; il pulsante "Salva" resta disabilitato con un messaggio esplicativo finché non sono valorizzati.
19
+ - **Trigger — gestione tipo trigger non più presente nel catalogo:** se un trigger salvato in precedenza referenzia un `execution` non più presente tra le formule disponibili (es. rimosso/rinominato), il componente non blocca più l'inizializzazione: la select "Tipo Trigger" resta popolata e utilizzabile per la riassegnazione.
20
+ - **Trigger/ActionButton cache dei moduli collegati:** `getAllModules()` (usato per i campi di tipo DMMODULE) veniva richiamato ad ogni cambio di formula anche quando i moduli erano già stati scaricati. Aggiunta `ensureModulesLoaded()` che riusa `this.forms` già caricato invece di ripetere la chiamata all'endpoint.
21
+ - **Trigger fix multiple conditions evaluated independently:** `checkTriggers` evaluated each condition in isolation, ignoring `booleanlogicoperator` (AND/OR/AND NOT/OR NOT): a trigger with multiple conditions and at least one OR could either never fire or fire when it shouldn't. Introduced `evaluateTriggerCondition()`, which evaluates a single condition and combines it with the accumulated result using the declared boolean operator between conditions.
22
+ - **Configurator fix saving a Trigger/ActionButton didn't persist changes:** `saveActionButtons`/`saveTriggers` looked up the existing element with `.find()` and reassigned the local variable instead of the array element (`existsTrigger = element` never wrote back to `form.Triggers`), so edits to an already-existing trigger or action button were lost on save. Now uses `.findIndex()` and writes to the array via the index.
23
+ - **Trigger — mandatory description:** the trigger's "Descrizione" field and "Tipo Trigger" are now required to save; the "Salva" button stays disabled with an explanatory message until both are set.
24
+ - **Trigger handling a trigger type no longer in the catalog:** if a previously-saved trigger references an `execution` no longer present among the available formulas (e.g. removed/renamed), the component no longer blocks initialization: the "Tipo Trigger" select stays populated and usable for reassignment.
25
+ - **Trigger/ActionButton linked-modules cache:** `getAllModules()` (used for DMMODULE-type fields) was being called on every formula change even when the modules had already been downloaded. Added `ensureModulesLoaded()`, which reuses the already-loaded `this.forms` instead of repeating the endpoint call.
35
26
 
36
27
  ### v2.10.87
37
28
  - **Bugfix configurator — sezione "Generale" assente per 5 tipi di campo:** durante il lavoro di potenziamento grafico (v2.10.68–v2.10.70), i tipi `ActionButtonField`, `ImageField`, `ImageWithMarkersField`, `ListValueField` e `ImageSelectorField` avevano ricevuto la sezione "Grafica" nel tab "Stile Compilazione" del configuratore, ma la sezione "Generale" (Larghezza campo, Visibile, VisibleIf, Tooltip, Tipo di invisibilità, Mantieni il valore) era stata rimossa per errore. Ripristinata per tutti e 5 i tipi.
@@ -148,7 +139,8 @@ Le form sono strutture JSON salvate lato server e recuperate a runtime. La libre
148
139
 
149
140
  ```bash
150
141
  npm install @angular/cdk@^15.1.2 @angular/material@^15.1.2 @angular/material-luxon-adapter@^15.2.9 --legacy-peer-deps
151
- npm install sweetalert2@^11.4.24 --legacy-peer-deps
142
+ npm install @angular-material-components/datetime-picker@^15.0.0 @angular-material-components/moment-adapter@^15.0.0 --legacy-peer-deps
143
+ npm install moment@^2.29.4 sweetalert2@^11.4.24 --legacy-peer-deps
152
144
  ```
153
145
 
154
146
  > Tutti i comandi `npm install` per questa libreria richiedono il flag `--legacy-peer-deps`.
@@ -551,7 +543,8 @@ Forms are defined as JSON structures stored server-side and fetched at runtime.
551
543
 
552
544
  ```bash
553
545
  npm install @angular/cdk@^15.1.2 @angular/material@^15.1.2 @angular/material-luxon-adapter@^15.2.9 --legacy-peer-deps
554
- npm install sweetalert2@^11.4.24 --legacy-peer-deps
546
+ npm install @angular-material-components/datetime-picker@^15.0.0 @angular-material-components/moment-adapter@^15.0.0 --legacy-peer-deps
547
+ npm install moment@^2.29.4 sweetalert2@^11.4.24 --legacy-peer-deps
555
548
  ```
556
549
 
557
550
  > All `npm install` commands for this library require `--legacy-peer-deps`.