npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@eqproject/eqp-dynamic-module

v2.11.14

Published

Dynamic module component - Angular Material based

Readme

@eqproject/eqp-dynamic-module

npm version Angular

Libreria Angular 15 per la creazione, visualizzazione e gestione di form dinamiche con configuratore no-code.
Angular 15 library for building, rendering and managing dynamic forms with a no-code configurator.

📖 Guida utente / User Guide →


Changelog

v2.11.14

  • Nuova funzionalità — campi «nascosti all'AI» (Omnisearch AI): nuova proprietà BaseField.HiddenFromAI?: boolean (assente/false = visibile, quindi i form già salvati non cambiano). Nello step dei campi del configurator, accanto a Grafica campi, il nuovo bottone Seleziona campi visibili da AI mostra la colonna «Visibile all'AI» con una casella per campo (già spuntata secondo il valore salvato) e un banner con contatore, Seleziona tutto, Deseleziona tutto e Fine. La scelta si salva con il form (nel JSON del campo) e non svuota la Descrizione AI: un campo nascosto viene ignorato da Omnisearch AI anche se ha una descrizione. La modalità è esclusiva con quella di Grafica campi.

  • Nuove utility esportate (utils/ai-visibility): isVisibleToAI(field), setAllVisibleToAI(fields, visible), countVisibleToAI(fields).

  • Richiede il server DynamicModule con la proprietà HiddenFromAI su BaseField (da rilasciare prima del client: un server vecchio non la conosce e la perde al salvataggio). Un client precedente che risalva un form azzera il flag (il campo torna visibile). Nessuno script SQL: il flag vive nel JSON dei campi (FldJson). Lato TMED, Omnisearch AI lo legge dalla stessa colonna.

  • New feature — fields "hidden from AI" (Omnisearch AI): new property BaseField.HiddenFromAI?: boolean (missing/false = visible, so already-saved forms do not change). In the configurator's fields step, next to Grafica campi, the new Seleziona campi visibili da AI button shows a "Visibile all'AI" column with a checkbox per field (pre-checked from the saved value) and a banner with a counter, Seleziona tutto, Deseleziona tutto and Fine. The choice is saved with the form (inside the field JSON) and does not clear the AI Description: a hidden field is ignored by Omnisearch AI even if it has a description. The mode is mutually exclusive with Grafica campi.

  • New exported utilities (utils/ai-visibility): isVisibleToAI(field), setAllVisibleToAI(fields, visible), countVisibleToAI(fields).

  • Requires the DynamicModule server with the HiddenFromAI property on BaseField (release it before the client: an old server does not know it and drops it on save). A previous client re-saving a form resets the flag (the field becomes visible again). No SQL script: the flag lives in the fields JSON (FldJson). On the TMED side, Omnisearch AI reads it from the same column.

v2.11.12

  • Nuova funzionalità — aggiornamento delle risposte alla versione corrente del modulo: nuovo componente pubblico eqp-dynamic-module-upgrade-answers (vedi Componenti). Per ogni risposta compilata con una versione precedente del modulo monta add-form-record (fuori schermo) con il form corrente, i valori della risposta e il suo contesto (utente e AdditionalParams), così i dati recuperati da altri moduli e le formule vengono ricalcolati come in compilazione; genera l'HTML leggibile e invia la risposta al nuovo endpoint POST /v1/upgradeVersion. Il server conserva la riga precedente nella tabella storico DynaValuesHistory. Report finale per risposta: aggiornata / con avvisi (obbligatori vuoti, valori non più validi, campi non più presenti — i cui valori restano in Vals —, recuperi non rieseguiti, caricamento incompleto) / non aggiornata. Le risposte incomplete vengono aggiornate comunque e segnalate. Nessun trigger viene eseguito.

  • Formule con contesto utente (ctx.*, es. ctx.user, ctx.currrole): l'utente di una risposta è il suo proprietario (il paziente), non chi l'ha compilata né chi esegue l'aggiornamento. Se il modulo contiene formule che usano il contesto, il componente mostra un avviso con le proprietà usate e chiede di scegliere: Aggiorna le risposte (ricalcolo completo con il contesto del paziente di ogni risposta, fornito dall'host tramite formulaObjectResolver), Aggiorna solo le versioni (nessun ricalcolo: valori e testo leggibile restano quelli salvati — il testo leggibile non viene nemmeno scaricato, la lista answersToUpgrade è leggera) oppure Annulla. Senza formulaObjectResolver per quei moduli è disponibile solo l'aggiornamento delle versioni. Per il configurator: DynamicModuleConfiguratorSpecificConfig.formulaObjectResolver.

  • Aggiornamenti lunghi (migliaia di risposte): barra di avanzamento con "N di totale", tempo trascorso e stimato rimanente, conteggi in tempo reale per esito e risposta in corso; il browser chiede conferma prima di chiudere la pagina durante l'aggiornamento; rilanciandolo dopo un'interruzione vengono proposte solo le risposte non ancora aggiornate. Lo spinner della libreria è sospeso durante l'esecuzione e l'output runningChange (anche upgradeAnswersRunningChange sul configurator) permette all'host di sospendere il proprio. A fine aggiornamento il dialog mostra solo le risposte da verificare (con avvisi o non aggiornate) e Scarica report (CSV) fornisce il report completo (utility buildUpgradeReportCsv).

  • Recuperi "Da database": a runtime usano il contesto della pagina ospite (visita, paziente, ...) che non è salvato con la risposta, quindi per default non vengono rieseguiti e mantengono il valore precedente (segnalato nel report). Input refreshDatabaseGetters per riattivarli quando l'host fornisce al QueryEditor il contesto corretto.

  • Configurator: dopo il salvataggio riuscito, se esistono risposte di versioni precedenti, propone di aggiornarle (dialog con il nuovo componente). afterSaveFormEvent viene emesso a fine percorso (scelta "Non ora" o chiusura dell'aggiornamento). Disattivabile con DynamicModuleConfiguratorSpecificConfig.offerAnswersUpgradeAfterSave = false.

  • Nuovi endpoint in EndPointConfiguration.Records: GetAnswersToUpgradeEndPoint (GET /v1/answersToUpgrade?formId=) e UpgradeVersionEndPoint (POST /v1/upgradeVersion). Il componente li completa da baseServerUrl se la configurazione dell'host non li contiene.

  • add-form-record: nuova modalità upgradeMode (input upgradeMode, upgradeRefreshDatabaseGetters, output upgradeReady) usata dal nuovo componente; in questa modalità il form viene reso sempre "semplice", così anche i campi di tab/step non visibili caricano dati e formule.

  • Nuovi modelli esportati: UpgradePreparedRecord, UpgradeAnswerResult, UpgradeAnswersReport, UpgradeAnswerOutcomeEnum, UpgradeAnswersModeEnum, UpgradeFormulaObjectResolver; utility findFormContextUsage(form).

  • Richiede il server DynamicModule con gli endpoint answersToUpgrade / upgradeVersion e la tabella DynaValuesHistory (script docs/sql/crea-dynavalueshistory.sql del repo server, da applicare prima del rilascio).

  • Bugfix — modificando una risposta si perdevano AdditionalParams / AdditionalInfo: nei percorsi di modifica (eqp-dynamic-module, list-view-form-record, add-form-record, view-form-record, filter-form-statistic) il record veniva ricostruito dal JSON delle risposte (SerializedValues) e solo ID/EntID/userID/Version venivano presi dal server. AdditionalParams e AdditionalInfo arrivavano quindi solo se in passato erano finiti dentro quel JSON: per la maggior parte delle risposte erano assenti e, se l'host non passava additionalParams, il salvataggio scriveva NULL nelle rispettive colonne (persa la contestualizzazione, es. paziente). Ora tutti i metadati del record (ID, versione, AdditionalParams, AdditionalInfo, utente e data di inserimento/modifica) vengono sempre dalle colonne restituite dal server.

  • Il JSON delle risposte contiene solo i valori dei campi: al salvataggio DynRecord.Values non contiene più le proprietà di servizio del Record (ID, EntID, Version, userID, AnswerDate, HTMLreadableValues, AdditionalParams, AdditionalInfo, PrefilterParams, FK_InsertUser, InsertDate, FK_UpdateUser, UpdateDate e la chiave annidata Values che cresceva a ogni salvataggio). Una chiave viene mantenuta se il form ha davvero un campo con quel nome; le chiavi che non sono campi della versione corrente restano (nessuna perdita di dati). afterSaveRecordEvent riporta ora utente e data di inserimento originali invece di quelli di chi modifica.

  • Nuove utility esportate (utils/record-values): recordFromDynRecord(dynRecord), extractFieldValues(record, fields), RECORD_METADATA_KEYS — vedi Modelli dati.

  • Da rilasciare insieme al server DynamicModule che applica la stessa regola lato API (versione server calcolata lato server, errore esplicito se il salvataggio del form fallisce, pulizia dei metadati in Vals). Lo script docs/sql/pulizia-metadati-vals.sql del repo server ripulisce le risposte già salvate.

  • Test della libreria di nuovo eseguibili: src/test.ts usava require.context, non più supportato dal builder karma di Angular 15, e karma eseguiva 0 test. Rimosso (i *.spec.ts vengono trovati dal builder). Nessun impatto sui consumatori.

  • New feature — upgrading answers to the current form version: new public component eqp-dynamic-module-upgrade-answers (see Components). For every answer filled in with a previous form version it mounts add-form-record (off-screen) with the current form, the answer values and its context (user and AdditionalParams), so data retrieved from other forms and formulas are recalculated exactly as when filling in the form; it then generates the readable HTML and sends the answer to the new POST /v1/upgradeVersion endpoint. The server keeps the previous row in the DynaValuesHistory history table. Final per-answer report: updated / with warnings (empty required fields, values no longer valid, fields no longer present — whose values stay in Vals —, retrievals not re-run, incomplete loading) / not updated. Incomplete answers are upgraded anyway and reported. No trigger is executed.

  • Formulas using the user context (ctx.*, e.g. ctx.user, ctx.currrole): the user of an answer is its owner (the patient), not whoever filled it in nor the operator running the upgrade. If the form has formulas using the context, the component shows a warning listing the properties used and asks to choose: Aggiorna le risposte (full recalculation with each answer's patient context, provided by the host through formulaObjectResolver), Aggiorna solo le versioni (no recalculation: saved values and readable text are kept — the readable text is not even downloaded, the answersToUpgrade list is light) or Annulla. Without formulaObjectResolver only the version upgrade is available for those forms. For the configurator: DynamicModuleConfiguratorSpecificConfig.formulaObjectResolver.

  • Long upgrades (thousands of answers): progress bar with "N of total", elapsed and estimated remaining time, live per-outcome counters and the answer in progress; the browser asks for confirmation before closing the page while running; after an interruption, running it again only offers the answers not yet upgraded. The library spinner is suspended while running and the runningChange output (also upgradeAnswersRunningChange on the configurator) lets the host suspend its own. At the end the dialog shows only the answers to check (with warnings or not upgraded) and Scarica report (CSV) downloads the full report (utility buildUpgradeReportCsv).

  • "From database" retrievals: at runtime they use the host page context (visit, patient, ...) which is not stored with the answer, so by default they are not re-run and keep their previous value (reported). Input refreshDatabaseGetters re-enables them when the host provides the right context to the QueryEditor.

  • Configurator: after a successful save, if there are answers from previous versions, it offers to upgrade them (dialog with the new component). afterSaveFormEvent is emitted at the end of the flow ("Not now" or upgrade closed). Can be disabled with DynamicModuleConfiguratorSpecificConfig.offerAnswersUpgradeAfterSave = false.

  • New endpoints in EndPointConfiguration.Records: GetAnswersToUpgradeEndPoint (GET /v1/answersToUpgrade?formId=) and UpgradeVersionEndPoint (POST /v1/upgradeVersion). The component fills them in from baseServerUrl when the host configuration lacks them.

  • add-form-record: new upgradeMode (inputs upgradeMode, upgradeRefreshDatabaseGetters, output upgradeReady) used by the new component; in this mode the form is always rendered as "simple", so fields in hidden tabs/steps also load data and formulas.

  • New exported models: UpgradePreparedRecord, UpgradeAnswerResult, UpgradeAnswersReport, UpgradeAnswerOutcomeEnum, UpgradeAnswersModeEnum, UpgradeFormulaObjectResolver; utility findFormContextUsage(form).

  • Requires the DynamicModule server with the answersToUpgrade / upgradeVersion endpoints and the DynaValuesHistory table (server repo script docs/sql/crea-dynavalueshistory.sql, to be applied before release).

  • Bugfix — editing an answer lost AdditionalParams / AdditionalInfo: in the edit paths (eqp-dynamic-module, list-view-form-record, add-form-record, view-form-record, filter-form-statistic) the record was rebuilt from the answers JSON (SerializedValues) and only ID/EntID/userID/Version were taken from the server. AdditionalParams and AdditionalInfo were therefore available only if they had previously ended up inside that JSON: for most answers they were missing and, when the host did not pass additionalParams, saving wrote NULL into those columns (contextualization lost, e.g. patient). All record metadata (ID, version, AdditionalParams, AdditionalInfo, insert/update user and date) now always comes from the columns returned by the server.

  • The answers JSON now contains only field values: on save, DynRecord.Values no longer contains the Record service properties (ID, EntID, Version, userID, AnswerDate, HTMLreadableValues, AdditionalParams, AdditionalInfo, PrefilterParams, FK_InsertUser, InsertDate, FK_UpdateUser, UpdateDate and the nested Values key that grew on every save). A key is kept if the form really has a field with that name; keys that are not fields of the current version are kept (no data loss). afterSaveRecordEvent now carries the original insert user and date instead of the editor's.

  • New exported utilities (utils/record-values): recordFromDynRecord(dynRecord), extractFieldValues(record, fields), RECORD_METADATA_KEYS — see Data Models.

  • Release together with the DynamicModule server, which applies the same rule on the API side (server-side form versioning, explicit error when a form save fails, metadata cleanup in Vals). The server repo script docs/sql/pulizia-metadati-vals.sql cleans already-saved answers.

  • Library tests runnable again: src/test.ts used require.context, no longer supported by the Angular 15 karma builder, so karma ran 0 tests. Removed (the builder discovers *.spec.ts files). No impact on consumers.

v2.11.11

  • Correzione grafica tmw-picker e selezione dell'elenco generico come bottone.

  • Script scripts/test-in-tmed.ps1 (npm run test-in-tmed-inizio / test-in-tmed-fine): collega la build locale della libreria a TMED senza pubblicare su npm.

  • tmw-picker styling fix and generic list selection rendered as buttons.

  • scripts/test-in-tmed.ps1 (npm run test-in-tmed-inizio / test-in-tmed-fine): links the local library build into TMED without publishing to npm.

v2.11.10

  • Bugfix asincronismo — formule non ricalcolate dopo il caricamento dei campi datagetter: una formula su un campo non-datagetter (immediato) che coinvolge uno o più campi datagetter (Da database / Da modulo dinamico, con tempo di recupero lato server) veniva valutata prima dell'arrivo dei dati e restava sul valore vuoto, finché un select + blur manuale non faceva ripartire il ricalcolo. Ora ogni campo ha un flag di stato "caricamento effettuato" (DynamicModuleFieldFixComponent.loaded, output fieldLoaded): i campi manuali/formula lo valorizzano subito, i datagetter a risposta ricevuta (anche vuota, in errore, o con più risultati da scegliere). Quando tutti i campi istanziati risultano caricati, add-form-record ricalcola le formule di ogni campo; da quel momento ogni ulteriore caricamento (es. ricarica di un datagetter per cambio di un campo relazionato) ricalcola di nuovo. Se un datagetter non risponde (es. attende un input dell'utente), il ricalcolo parte comunque dopo 15 secondi.
  • Nuovo I/O (componenti privati): DbgetterComponent → @Output() resultProcessed; DynamicModuleFieldFixComponent → @Output() fieldLoaded, proprietà loaded, metodo markLoaded(); AddFormRecordComponent → metodo onFieldLoaded(). Nessun cambio di API pubblica per chi usa eqp-dynamic-module e eqp-dynamic-module-configurator.
  • Asynchronous bugfix — formulas not recalculated after datagetter fields finish loading: a formula on a non-datagetter (immediate) field involving one or more datagetter fields (From database / From dynamic module, with a server-side retrieval time) was evaluated before the data arrived and stayed on the empty value until a manual select + blur triggered the recalculation. Every field now has a "loading completed" status flag (DynamicModuleFieldFixComponent.loaded, output fieldLoaded): manual/formula fields set it immediately, datagetters when the response is received (even if empty, failed, or returning several results to choose from). When all instantiated fields are loaded, add-form-record recalculates the formulas of every field; from then on every further load (e.g. a datagetter reloading because a related field changed) triggers another recalculation. If a datagetter never answers (e.g. it waits for user input), the recalculation starts anyway after 15 seconds.
  • New I/O (private components): DbgetterComponent → @Output() resultProcessed; DynamicModuleFieldFixComponent → @Output() fieldLoaded, loaded property, markLoaded() method; AddFormRecordComponent → onFieldLoaded() method. No public API change for consumers of eqp-dynamic-module and eqp-dynamic-module-configurator.

v2.11.6

  • Bugfix — icona microfono non cambiava mai aspetto durante l'ascolto: SpeechToTextDirective cambiava solo due classi CSS (keyboard_speaking/keyboard_paused, colore del tratto) sul nativeElement dell'icona, ma da quando le icone sono tmw-icon (SVG) lo stato "piena"/"outline" è governato dall'@Input variant del componente, mai legato da nessun template della libreria: il click avviava/fermava correttamente il riconoscimento vocale, ma l'icona restava visivamente invariata. Aggiunto exportAs: 'speechToText' e un getter pubblico isListening alla direttiva; tutte le 8 occorrenze dell'icona microfono (text-field-template, textarea-field-template, text-trigger-template, textarea-trigger-template, text-filter-template, textarea-filter-template, dynamic-module-field-extra-fix, il prompt AI del configuratore) ora legano [variant]="mic.isListening ? 'filled' : 'outline'" tramite una variabile di riferimento sul template. Nessun cambio di comportamento per chi usa SpeechToTextDirective senza leggerne isListening.
  • Bugfix — microphone icon never changed appearance while listening: SpeechToTextDirective only toggled two CSS classes (keyboard_speaking/keyboard_paused, stroke color) on the icon's nativeElement, but since the icons became tmw-icon (SVG) the "filled"/"outline" look is driven by the component's @Input variant, never bound by any template in the library: clicking correctly started/stopped speech recognition, but the icon stayed visually unchanged. Added exportAs: 'speechToText' and a public isListening getter to the directive; all 8 occurrences of the microphone icon (text-field-template, textarea-field-template, text-trigger-template, textarea-trigger-template, text-filter-template, textarea-filter-template, dynamic-module-field-extra-fix, the configurator's AI prompt) now bind [variant]="mic.isListening ? 'filled' : 'outline'" via a template reference variable. No behavior change for consumers using SpeechToTextDirective without reading isListening.

v2.11.0

  • Bugfix critico — pagina Trigger che si rompeva completamente: trigger-creator.component.ts andava in eccezione in ngOnInit() quando il tipo di trigger salvato in precedenza (trigger.execution) non era più presente nel catalogo formule corrente (es. rimosso o rinominato dopo il salvataggio): l'intera pagina di modifica dei trigger diventava inutilizzabile. Ora il caso viene gestito esplicitamente — si resetta selectedFormula e si continua a popolare normalmente la select "Tipo Trigger", senza bloccare il resto del componente.

  • Bugfix — condizioni dei trigger rotte per i campi Modulo Dinamico (DMMODULE): in trigger-creator e action-button-creator, l'elenco dei form (usato per popolare i campi di tipo DMMODULE) veniva ricaricato dal server ad ogni cambio di "Tipo Trigger"/"Tipo Action Button", sovrascrivendo temporaneamente res.object prima che la risposta arrivasse. Aggiunto ensureModulesLoaded(): la chiamata al server avviene solo la prima volta per apertura di modale, le volte successive si riusa this.forms già scaricato. Aggiunta anche una validazione minima (isValid()) che impedisce il salvataggio di un trigger senza descrizione o senza tipo selezionato.

  • Fix build da sorgente — tipi TypeScript per fabric: aggiunto @types/fabric alle devDependencies della libreria; senza questi tipi tmw-image-drawer/tmw-image-marker (usati dal campo "Immagine con markers") non compilavano (Cannot find module 'fabric'). Aggiunto anche un cast esplicito a HTMLCanvasElement nell'inizializzazione di fabric.Canvas in entrambi i componenti. Nessun impatto sui consumatori della libreria pubblicata (i tipi servono solo in fase di sviluppo/build).

  • Fix ambiente di sviluppo — disallineamento versione tmw-icons: nel workspace del monorepo la copia di tmw-icons installata dentro projects/eqp-dynamic-module/node_modules era rimasta bloccata alla 0.1.1 (lockfile non aggiornato) mentre l'app host ne installava la 0.1.3, causando due classi TmwIconComponent fisicamente distinte e un errore di compilazione Angular (NG3004: Unable to import class TmwIconComponent) che a cascata rompeva l'intera compilazione dell'app host. Nessun cambio di dipendenza dichiarata (resta ^0.1.1), solo riallineamento del lockfile locale.

  • Versione 2.11.0: consolida in un'unica release la migrazione completa eqp-* → tmw-* portata avanti nelle versioni 2.10.94–2.10.103 (vedi le voci sottostanti) insieme ai fix qui sopra.

  • Critical bugfix — Trigger page completely breaking: trigger-creator.component.ts threw in ngOnInit() whenever a previously saved trigger type (trigger.execution) was no longer present in the current formula catalog (e.g. removed or renamed after saving): the entire trigger edit page became unusable. This case is now handled explicitly — selectedFormula is reset and the "Trigger Type" select is still populated normally, without blocking the rest of the component.

  • Bugfix — broken trigger conditions for Dynamic Module fields (DMMODULE): in trigger-creator and action-button-creator, the forms list (used to populate DMMODULE-type fields) was re-fetched from the server on every "Trigger Type"/"Action Button Type" change, temporarily wiping res.object before the response arrived. Added ensureModulesLoaded(): the server call now happens only the first time per modal opening, subsequent changes reuse the already-fetched this.forms. Also added minimal validation (isValid()) preventing a trigger from being saved without a description or a selected type.

  • Source-build fix — TypeScript types for fabric: added @types/fabric to the library's devDependencies; without these types tmw-image-drawer/tmw-image-marker (used by the "Image with markers" field) failed to compile (Cannot find module 'fabric'). Also added an explicit cast to HTMLCanvasElement when initializing fabric.Canvas in both components. No impact on consumers of the published library (the types are only needed at development/build time).

  • Dev environment fix — tmw-icons version mismatch: inside the monorepo workspace, the tmw-icons copy installed under projects/eqp-dynamic-module/node_modules was stuck at 0.1.1 (stale lockfile) while the host app installed 0.1.3, resulting in two physically distinct TmwIconComponent classes and an Angular compile error (NG3004: Unable to import class TmwIconComponent) that cascaded into breaking the entire host app build. No change to the declared dependency (still ^0.1.1), just a local lockfile realignment.

  • Version 2.11.0: consolidates into a single release the complete eqp-* → tmw-* migration carried out across versions 2.10.94–2.10.103 (see entries below) together with the fixes above.

v2.10.102

  • 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.
  • 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.

v2.10.101

  • 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).

  • 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.

  • 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).

  • 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).

  • 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.

  • 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).

v2.10.100

  • 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.
  • 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.

v2.10.99

  • 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].
  • 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].

v2.10.87

  • 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.
  • Bugfix configurator — "Generale" section missing for 5 field types: during the graphical enhancement work (v2.10.68–v2.10.70), ActionButtonField, ImageField, ImageWithMarkersField, ListValueField and ImageSelectorField received the "Grafica" section in the configurator's "Stile Compilazione" tab, but the "Generale" section (field width, visibility, VisibleIf, tooltip, invisibility type, maintain value) was accidentally removed. Restored for all 5 field types.

v2.10.86

  • Bugfix loop infinito ListValueField: FormControl.setValue() notificava il callback _onChange del NgModel registrato tramite [formControlName] sul mat-checkbox, causando ngModelChange → updateSelected() → setFormControlValue() in ricorsione infinita. Aggiunto { emitModelToViewChange: false } a setFormControlValue() per interrompere il ciclo. Fix correlati: updateSelected() ora restituisce null (non []) per campi single-choice senza selezione, evitando instabilità Angular CD da [] !== []; resetArrayData() chiama updateSelected(false) per non emettere recordChange durante il rebuild delle opzioni; updateField() distingue formula-per-valore da formula-per-opzioni nei campi DataGetterType=Formula.
  • Bugfix loop infinito onRecordChange: aggiunta guardia di rientranza _recordChanging con try/finally in add-form-record.onRecordChange() per prevenire ricorsione da campi formula concatenati (es. campo numerico → campo elenco valorizzato dalla formula del primo).
  • Bugfix loop in anteprima — DynAttachment.ButtonKey null: nei template image-field-template e image-with-markers-field-template, la valutazione di field.DynAttachment.ButtonKey in *ngIf lanciava eccezione quando DynAttachment era null (campo senza immagine caricata), innescando un loop di Angular CD. Sostituito con field.DynAttachment?.ButtonKey.
  • Fix posizione dialog DataGetter: la modale del Query Editor aperta con "Modifica" nel configuratore compariva a metà pagina. Aggiunti position: { top: '20px' } e maxHeight: '90vh' per allinearla al comportamento di tutte le altre dialog.
  • Bugfix infinite loop ListValueField: FormControl.setValue() was notifying the _onChange callback of the NgModel registered via [formControlName] on mat-checkbox, causing ngModelChange → updateSelected() → setFormControlValue() in infinite recursion. Added { emitModelToViewChange: false } to setFormControlValue() to break the cycle. Related fixes: updateSelected() now returns null (not []) for single-choice fields with no selection, preventing Angular CD instability from [] !== []; resetArrayData() calls updateSelected(false) to avoid emitting recordChange during option rebuild; updateField() now distinguishes formula-for-value from formula-for-options in DataGetterType=Formula fields.
  • Bugfix infinite loop onRecordChange: added _recordChanging re-entrancy guard with try/finally in add-form-record.onRecordChange() to prevent recursion from chained formula fields (e.g. numeric field → list field driven by the first field's formula).
  • Bugfix preview loop — DynAttachment.ButtonKey null: in image-field-template and image-with-markers-field-template, evaluating field.DynAttachment.ButtonKey in *ngIf threw an exception when DynAttachment was null (field with no image loaded), triggering an Angular CD loop. Replaced with field.DynAttachment?.ButtonKey.
  • Fix DataGetter dialog position: the Query Editor modal opened via "Modifica" in the configurator was appearing at mid-page. Added position: { top: '20px' } and maxHeight: '90vh' to align it with all other dialogs.

v2.10.85

  • Bugfix loop infinito (approccio corretto): il loop di v2.10.84 era asincrono: setValue chiama writeValue sui ControlValueAccessor di Angular Material che emettono eventi nel tick successivo, quando la guardia di rientranza era già rilasciata. Soluzione definitiva: il validator required ora legge direttamente da record[field.Name] tramite closure (anziché da control.value); in onRecordChange() viene chiamato updateValueAndValidity({ emitEvent: false }) — che ri-esegue i validator senza invocare writeValue — eliminando alla radice ogni possibilità di cascade.
  • Bugfix infinite loop (correct approach): the v2.10.84 loop was asynchronous: setValue calls writeValue on Angular Material ControlValueAccessors which emit events on the next tick, after the re-entrancy guard was already released. Definitive fix: the required validator now reads directly from record[field.Name] via closure (instead of control.value); onRecordChange() calls updateValueAndValidity({ emitEvent: false }) — which re-runs validators without invoking writeValue — eliminating any cascade at the root.

v2.10.84

  • Bugfix loop infinito onRecordChange: la sincronizzazione dei FormControl introdotta in v2.10.83 causava un loop: setValue invoca writeValue sui ControlValueAccessor (es. mat-datepicker), che emettono (dateChange)/(ngModelChange) → recordChange → onRecordChange di nuovo, all'infinito. Aggiunta una guardia di rientranza (_isInRecordChange) con try/finally che interrompe il ciclo. La sincronizzazione dei FormControl resta attiva e la validazione required funziona correttamente.
  • Bugfix infinite loop onRecordChange: the FormControl sync introduced in v2.10.83 caused an infinite loop: setValue calls writeValue on ControlValueAccessors (e.g. mat-datepicker), which emit (dateChange)/(ngModelChange) → recordChange → onRecordChange again, endlessly. Added a re-entrancy guard (_isInRecordChange) with try/finally that breaks the cycle. FormControl sync remains active and required validation works correctly.

v2.10.83

  • Bugfix validazione form — campi obbligatori valorizzati via formula/ActionButton: quando un campo con required veniva impostato tramite formula o ActionButton, il valore compariva visivamente ma il FormControl Angular rimaneva non aggiornato, lasciando il form invalido finché l'utente non interagiva manualmente col campo. Ora onRecordChange() risincronizza tutti i FormControl dal record dopo ogni aggiornamento formula, rendendo la validazione coerente con il valore visualizzato.
  • Bugfix form validation — required fields set via formula/ActionButton: when a required field was populated by a formula or ActionButton, the value appeared visually but the Angular FormControl was never updated, keeping the form invalid until the user manually interacted with the field. onRecordChange() now re-syncs all FormControl values from the record after every formula update, making validation consistent with the displayed value.

v2.10.81

  • Bugfix configurator — DataGetter null dopo decode Base64: quando il campo DataGetterValueBase64String decodifica in un JSON con DataGetter: null, viene ora creato un oggetto DataGetter vuoto anziché proseguire con null, evitando errori a runtime nel configuratore.
  • Bugfix add-form-record — actionButtons null: se l'input actionButtons arriva null al componente, viene ora inizializzato a un array vuoto prima del filtraggio, prevenendo un'eccezione al caricamento del record.
  • Bugfix configurator — DataGetter null after Base64 decode: when DataGetterValueBase64String decodes to a JSON with DataGetter: null, a new empty DataGetter object is now created instead of proceeding with null, preventing runtime errors in the configurator.
  • Bugfix add-form-record — actionButtons null: if the actionButtons input arrives as null, it is now initialized to an empty array before filtering, preventing an exception on record load.

v2.10.79

  • DataGetter V2 — selezione automatica colonna singola: quando il flusso V2 genera una sola columnKey, essa viene assegnata automaticamente a DataGetterColumnForce senza che l'utente debba selezionarla manualmente dalla dropdown.
  • DataGetter V2 — single column auto-selection: when the V2 flow produces exactly one columnKey, it is automatically assigned to DataGetterColumnForce without requiring manual selection from the dropdown.

v2.10.77

  • DataGetter V2 — DataGetterColumnForce come stringa: onAiDataGetterOut ora salva DataGetterColumnForce come stringa chiave (non come oggetto), allineandosi al formato atteso da eqp-select. Il valore pre-selezionato nella dropdown compare automaticamente dopo il flusso AI.
  • DataGetter V2 — DataGetterColumnForce as string: onAiDataGetterOut now stores DataGetterColumnForce as a key string (not as an object), matching the format expected by eqp-select. The pre-selected value in the dropdown appears automatically after the AI flow.

v2.10.76

  • DataGetter V2 — createColumnKeys retrocompatibile: add-form-field ora rileva DataGetterCodeVersion=2 e legge selectedFields da queryCommandDatabaseConfiguration.selectedFields invece che dal livello radice; fallback su PropertyName se CurrentTranslate è assente.
  • DataGetter V2 — createColumnKeys backward-compatible: add-form-field now detects DataGetterCodeVersion=2 and reads selectedFields from queryCommandDatabaseConfiguration.selectedFields instead of the root level; falls back to PropertyName when CurrentTranslate is missing.

v2.10.74 / v2.10.75

  • DataGetter AI — nuova modalità "Da database" (DataGetterType=3): aggiunto campo DataGetterSpeechText nel modello DataGetter. Il configurator AI può creare campi con recupero dati da database impostando un prompt testuale: al caricamento del form, il componente QueryEditor esterno viene invocato silenziosamente, elabora il prompt via AI e popola automaticamente DataGetterValue, DataGetterCardinality=1, DataGetterHasResetButton=true e DataGetterColumnForce (se il risultato ha un solo campo selezionato).
  • DataGetterCodeVersion V2 — retrocompatibilità in lettura: il DbgetterComponent rileva automaticamente i campi con DataGetterCodeVersion=2 (formato Omnisearch AI) ed esegue un unwrap trasparente della struttura queryCommandDatabaseConfiguration al formato V1, senza impatto sui campi legacy. Il DataGetterCodeVersion=2 viene propagato al componente QueryEditor esterno tramite config.DataGetterCodeVersion per consentire al client ospitante di attivare il flusso V2 in lettura.
  • AI DataGetter — new "Da database" mode (DataGetterType=3): added DataGetterSpeechText field to the DataGetter model. The AI configurator can create database-getter fields with a natural-language prompt: on form load, the external QueryEditor component is invoked silently, processes the prompt via AI and automatically populates DataGetterValue, DataGetterCardinality=1, DataGetterHasResetButton=true and DataGetterColumnForce (if a single output field is returned).
  • DataGetterCodeVersion V2 — backward-compatible read flow: DbgetterComponent now auto-detects fields with DataGetterCodeVersion=2 (Omnisearch AI format) and transparently unwraps the queryCommandDatabaseConfiguration structure to the V1 format, with zero impact on legacy fields. DataGetterCodeVersion=2 is forwarded to the external QueryEditor component via config.DataGetterCodeVersion to enable the V2 read flow on the host application side.

v2.10.70

  • Theming configurator — nuovi input: aggiunto [configuratorThemeCss] che accetta direttamente il testo di un file CSS con le dichiarazioni delle variabili --conf-*. Permette di portare il tema dall'esterno come file statico senza hardcodare valori TypeScript. Se entrambi gli input sono presenti, configuratorTheme sovrascrive configuratorThemeCss per le chiavi in conflitto.
  • Theming configurator — nuove variabili CSS: --conf-stepper-header-bg (sfondo zona step superiore), --conf-stepper-content-bg (sfondo zona inferiore), --conf-step-icon-edit-bg (sfondo pallini step completati), --conf-hint-btn-bg / --conf-hint-btn-hover-bg (bottone suggerimento rapido), --conf-btn-color (colore testo bottoni con sfondo gradiente).
  • Theming configurator — forzatura !important: tutti i valori iniettati tramite tema esterno sono ora applicati con !important, rendendo il sistema di theming l'unico canale valido per sovrascrivere i colori.
  • Theming configurator — --conf-btn-color: il colore del testo dei bottoni attivi (sfondo gradiente) è ora templatizzabile e forzato con !important per resistere a override CSS provenienti dall'applicazione ospitante.
  • New theming input: added [configuratorThemeCss] accepting a CSS text string with --conf-* variable declarations. Enables external theme files without TypeScript hardcoding. When both inputs are present, configuratorTheme overrides configuratorThemeCss for conflicting keys.
  • New CSS variables: --conf-stepper-header-bg, --conf-stepper-content-bg, --conf-step-icon-edit-bg, --conf-hint-btn-bg, --conf-hint-btn-hover-bg, --conf-btn-color.
  • !important enforcement: all externally-injected theme values are now set with !important, making the theming system the sole valid override channel.

v2.10.65

  • TextField — icona opzionale: aggiunta la possibilità di associare un'icona Material Icons al campo di testo. Le nuove proprietà IconName (stringa) e IconPosition (enum: 1=Sinistra/prefix, 2=Destra/suffix) sono opzionali e retrocompatibili (null sui form esistenti). Configurabili nel builder tramite il toggle "Icona" nella sezione Specifiche del campo.
  • TextField — optional icon: added support for a Material Icons icon on text fields. New properties IconName (string) and IconPosition (enum: 1=Left/prefix, 2=Right/suffix) are optional and backward-compatible (null on existing forms). Configurable in the builder via the "Icona" toggle in the field's Specifiche section.

v2.10.64

  • Bugfix configurator: se il campo Code del form risulta null al momento del salvataggio (scenario: form creato con AI senza salvataggio intermedio), ora viene generato automaticamente da Name prima dell'invio al server.

v2.10.63

  • README riscritto in formato bilingue (italiano completo + inglese completo).
  • Aggiunto USERGUIDE.md con guida pratica per scenari d'uso comuni e sezione prompt AI di esempio.
  • USERGUIDE.md incluso nel pacchetto npm tramite ng-package.json assets.

v2.10.62

  • Migrazione da tmw-picker 1.0.x a 1.1.0: NgModule → standalone components, moment.js → Luxon, aggiornamento di tutti i token formato data (DD/MM/YYYY → dd/MM/yyyy).
  • Rimossi input inutilizzati: answerToDuplicateId da eqp-dynamic-module, ProjectName da eqp-dynamic-module-configurator.
  • Documentazione NPM riscritta completamente (bilingue IT/EN).

v2.10.60

  • Aggiornamenti interni e correzioni bug.

Versione italiana


Panoramica

@eqproject/eqp-dynamic-module espone due componenti pubblici:

| Componente | Scopo | |-----------|-------| | <eqp-dynamic-module> | Visualizzatore, compilatore, lista, filtro e grafici a runtime | | <eqp-dynamic-module-configurator> | Builder no-code per creare e modificare le definizioni form |

Le form sono strutture JSON salvate lato server e recuperate a runtime. La libreria gestisce rendering, validazione, recupero dati, operazioni CRUD e funzionalità avanzate come formule, trigger, action button e speech-to-text.


Prerequisiti

npm install @angular/cdk@^15.1.2 @angular/material@^15.1.2 @angular/material-luxon-adapter@^15.2.9 --legacy-peer-deps
npm install sweetalert2@^11.4.24 --legacy-peer-deps

Tutti i comandi npm install per questa libreria richiedono il flag --legacy-peer-deps.


Installazione

npm install @eqproject/eqp-dynamic-module --legacy-peer-deps

Configurazione del modulo

import { EqpDynamicModuleModule } from '@eqproject/eqp-dynamic-module';

@NgModule({
  imports: [
    EqpDynamicModuleModule
  ]
})
export class AppModule {}

In angular.json, aggiungi il tema Material agli stili:

"styles": [
  "node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
  "src/styles.css"
]

Componenti

eqp-dynamic-module — Visualizzatore form

Visualizza una form dinamica in una delle modalità disponibili.

Utilizzo base

import { DynamicModuleGeneralConfig, DynamicModuleViewModeEnum } from '@eqproject/eqp-dynamic-module';

generalConfig = new DynamicModuleGeneralConfig(
  'https://tua-api.esempio.it/api',
  this.userToken,
  this.context,
  null
);
<eqp-dynamic-module
  [configurations]="generalConfig"
  [formID]="'id-del-form'"
  [starterViewMode]="DynamicModuleViewModeEnum.LIST"
  [userID]="currentUser.id"
  (saveRecord)="onSalvataggio($event)"
  (afterSaveRecord)="dopoSalvataggio($event)">
</eqp-dynamic-module>

Input

| Input | Tipo | Default | Descrizione | |-------|------|---------|-------------| | configurations | DynamicModuleGeneralConfig | — | Obbligatorio. Configurazione connessione server. | | formID | string | — | Obbligatorio. ID del form da visualizzare. | | starterViewMode | DynamicModuleViewModeEnum | LIST | Modalità iniziale. | | userID | string | "0" | ID utente per il salvataggio record. | | orgaID | string | "0" | ID organizzazione. | | showTitle | boolean | true | Mostra/nasconde il nome del form. | | showBackButton | boolean | true | Mostra/nasconde il pulsante indietro. | | showSaveButton | boolean | true | Mostra/nasconde il pulsante salva. | | values | Record[] | null | Record pre-caricati per la modalità LIST. | | FormJSON | string | "" | JSON del form per la modalità REPAIR. | | formulaObject | any | {} | Oggetto contesto per le formule (es. { role, user }). | | selectedRecord | Record \| string | null | Record pre-selezionato (oggetto o ID). | | externalButtons | RecordButton[] | [] | Pulsanti extra nel menu azioni record. | | actionButtons | ActionButton[] | [] | Pulsanti azione per i campi di tipo Bottone. | | defaultListActions | DynamicModuleListFormRecordActionsDefault | tutti true | Azioni default lista: add, view, edit, duplicate, delete, graphs. | | listViewRecordTitle | string[] | [] | Chiavi dei campi che compongono il titolo accordion. | | defaultListViewFunction | Function | null | Funzione custom al caricamento della lista. | | onSaveBackToList | boolean | false | Torna alla LIST dopo il salvataggio. | | onBackTo | DynamicModuleViewModeEnum | null | Modalità di destinazione del pulsante indietro. | | numberOfColumns | number | 3 | Numero di colonne del layout. | | showHiddenFields | boolean | true | Mostra/nasconde i campi marcati come nascosti. | | filterResultViewMode | DynamicModuleFilterResultViewModeEnum | INTERNAL_EQPTABLE | Modalità visualizzazione risultati filtro. | | additionalParams | any | null | Parametri extra per le chiamate filtro server. | | additionalInfo | any | null | Dati extra per operazioni client-side. | | prefilterParams | any | null | Parametri pre-filtro. | | updateInfo | any | null | Dati per aggiornare i valori delle risposte. | | contestualizationParams | any | null | Parametri di contestualizzazione della lista risultati. | | showNewSearchButton | boolean | true | Mostra/nasconde il pulsante "nuova ricerca". | | highlightFilter | any | — | Configurazione evidenziazione righe/campi. | | isDraggableListView | boolean | true | Abilita drag-and-drop nella lista. | | Statistic | FilterStatistic | null | Configurazione statistiche e filtri. | | QueryEditorComponent | any | — | Componente query editor custom per i lookup. | | debugMode | boolean | false | Abilita log dettagliati in console. |

Output

| Output | Payload | Descrizione | |--------|---------|-------------| | (saveRecord) | Record | Emesso al salvataggio senza endpoint configurato. | | (afterSaveRecord) | Record | Emesso dopo la chiamata server di salvataggio. | | (deleteRecord) | Record | Emesso all'eliminazione senza endpoint configurato. | | (afterDeleteRecord) | Record | Emesso dopo la chiamata server di eliminazione. | | (SaveJSON) | string | Emesso all'esportazione del JSON del form. | | (afterFilter) | DynRecord[] | Emesso dopo l'applicazione di un filtro. | | (dragStarted) | Record | Emesso all'inizio di un drag. | | (dragReleased) | void | Emesso al rilascio del drag. | | (clickDragIndicator) | Record | Emesso al click sull'icona drag. | | (out) | eventOut | Output generico per comunicazione esterna. | | (fireTrigger) | FireTrigger | Emesso quando scatta un trigger. | | (afterOutputExternalFilters) | FilterStatistic | Emesso dopo filtri esterni applicati. |


eqp-dynamic-module-configurator — Builder form

Designer no-code per creare e modificare definizioni form.

Modalità d'uso

// Nuovo form
const specific = new DynamicModuleConfiguratorSpecificConfig();
specific.UserID = this.currentUser.id;
specific.orgaID = this.currentOrga.id;
const general = new DynamicModuleGeneralConfig(this.baseServerUrl, this.userToken, this.context, null);
this.config = new DynamicModuleConfiguratorConfig(general, specific);
<!-- Nuovo form -->
<eqp-dynamic-module-configurator
  *ngIf="config"
  [configurations]="config"
  (saveFormEvent)="onSalvaForm($event)">
</eqp-dynamic-module-configurator>

<!-- Modifica form esistente -->
<eqp-dynamic-module-configurator
  *ngIf="config"
  [configurations]="config"
  [formID]="formID"
  (saveFormEvent)="onSalvaForm($event)">
</eqp-dynamic-module-configurator>

<!-- Esportazione -->
<eqp-dynamic-module-configurator
  [configurations]="config"
  [formID]="formID"
  [viewMode]="'Export'"
  (saveFormEvent)="onSalvaForm($event)">
</eqp-dynamic-module-configurator>

<!-- Importazione da JSON -->
<eqp-dynamic-module-configurator
  [configurations]="config"
  [formID]="null"
  [viewMode]="'Export'"
  (saveFormEvent)="onSalvaForm($event)">
</eqp-dynamic-module-configurator>

Input

| Input | Tipo | Default | Descrizione | |-------|------|---------|-------------| | configurations | DynamicModuleConfiguratorConfig | — | Obbligatorio. Contenitore configurazione. | | formID | string | null | ID del form da modificare. null crea un nuovo form. | | viewMode | string | "addOrEdit" | "addOrEdit" per creare/modificare, "Export" per esportare/importare. | | fieldsExtraConfig | FieldExtraConfig[] | — | Configurazione extra per campi specifici. | | triggers | any | — | Definizioni trigger disponibili nell'editor. | | actionButtons | any | — | Definizioni action button disponibili. | | contestualization | Contestualization[] | — | Opzioni di contestualizzazione per lookup e filtri. | | formulaObject | any | — | Contesto per l'anteprima delle formule. | | QueryEditorComponent | DynamicLoaderDirectiveData | — | Componente query editor custom. | | debugMode | boolean | false | Abilita log dettagliati. | | configuratorTheme | Record<string, string> \| null | null | Override delle variabili CSS del tema tramite oggetto TypeScript. | | configuratorThemeCss | string \| null | null | Override delle variabili CSS del tema tramite stringa CSS (es. contenuto di un file .css). |

Output

| Output | Payload | Descrizione | |--------|---------|-------------| | (saveFormEvent) | Form | Emesso al salvataggio senza endpoint configurato. | | (afterSaveFormEvent) | Form | Emesso dopo la chiamata server di salvataggio. | | (out) | eventOut | Output generico per comunicazione esterna. | | (fireTrigger) | FireTrigger | Emesso quando scatta un trigger. |

Theming

Il configurator espone un sistema di temi basato su CSS custom properties. Tutti i valori iniettati tramite tema sono applicati con !important e non possono essere sovrascritti dall'esterno se non attraverso questi input.

<!-- Opzione A: oggetto TypeScript -->
<eqp-dynamic-module-configurator
  [configurations]="config"
  [configuratorTheme]="{ '--conf-gradient': 'linear-gradient(to right, #1565c0, #0288d1)', '--conf-bg-page': '#f0f6fb' }">
</eqp-dynamic-module-configurator>

<!-- Opzione B: file CSS caricato come stringa -->
<eqp-dynamic-module-configurator
  [configurations]="config"
  [configuratorThemeCss]="themeCssString">
</eqp-dynamic-module-configurator>

Formato del file CSS per configuratorThemeCss (nessun selettore richiesto):

--conf-gradient:           linear-gradient(to right, #1565c0, #0288d1);
--conf-bg-page:            #f0f6fb;
--conf-btn-color:          #ffffff;

Variabili disponibili:

| Variabile | Default | Descrizione | |-----------|---------|-------------| | --conf-gradient | gradiente viola-blu | Sfondo bottoni e header | | --conf-bg-page | #f5f5f5 | Sfondo generale pagina/stepper | | --conf-radius | 10px | Border radius bottoni | | --conf-modal-radius | 12px | Border radius modali | | --conf-accent | #693DDA | Colore accento (bordi, focus) | | --conf-primary | #1E31EB | Colore primario | | --conf-step-selected | #643cda | Freccia step selezionato | | --conf-step-edit | #3034e7 | Freccia step completato | | --conf-stepper-header-bg | ereditato da --conf-bg-page | Sfondo zona superiore (header stepper) | | --conf-stepper-content-bg | ereditato da --conf-bg-page | Sfondo zona inferiore (form e bottoni) | | --conf-step-icon-edit-bg | ereditato da --conf-step-edit | Sfondo pallini step completati | | --conf-btn-color | #ffffff | Colore testo bottoni attivi (sfondo gradiente) | | --conf-hint-btn-bg | #2563eb | Sfondo bottone suggerimento rapido (lampadina) | | --conf-hint-btn-hover-bg | #1d4ed8 | Sfondo lampadina al hover | | --conf-table-header-bg | variabile SCSS | Sfondo header tabella campi | | --conf-search-bg | variabile SCSS | Sfondo campo di ricerca | | --conf-table-bg | #ffffff | Sfondo righe tabella | | --conf-card-bg | #ffffff | Sfondo card | | --conf-font-family | inherit | Font dell'intero configurator |


eqp-dynamic-module-upgrade-answers — Aggiornamento risposte alla versione corrente

Aggiorna in blocco alla versione corrente del modulo le risposte compilate con versioni precedenti: per ognuna ricalcola dati recuperati, formule e testo leggibile riusando la stessa logica della compilazione, poi la salva con la nuova versione (la riga precedente resta nella tabella storico del server). Mostra l'elenco, avanzamento, pulsante di interruzione e report finale. Il configurator lo propone da solo dopo il salvataggio; l'host può usarlo anche altrove (es. azione nella lista moduli).

<eqp-dynamic-module-upgrade-answers [formID]="formID" [baseServerUrl]="baseServerUrl"
  [operatorID]="currentUserID" [orgaID]="orgaID" (completed)="onReport($event)" (closed)="closeDialog()">
</eqp-dynamic-module-upgrade-answers>

| Input | Tipo | Descrizione | |-------|------|-------------| | formID | string | ID del modulo le cui risposte vanno aggiornate. | | baseServerUrl | string | URL base del server DynamicModule (usato per gli endpoint mancanti). | | endPointConfiguration | EndPointConfiguration | Endpoint personalizzati (opzionale). | | userToken | string | Token per gli endpoint derivati da baseServerUrl. | | operatorID | string | Utente che esegue l'aggiornamento (FK_UpdateUser e storico). | | orgaID | string | Organizzazione del modulo. | | QueryEditorComponent | DynamicLoaderDirectiveData | QueryEditor dell'host, serve solo con refreshDatabaseGetters. | | formulaObject | any | Contesto di base delle formule (ctx). | | formulaObjectResolver | UpgradeFormulaObjectResolver | (risposta, ctxBase) => ctx (anche Promise): contesto delle formule per ogni risposta, con l'utente proprietario della risposta (il paziente). Necessario per il ricalcolo completo dei moduli con formule su ctx.*. | | refreshDatabaseGetters | boolean | Riesegue anche i recuperi "Da database" (default false: valore precedente mantenuto). | | autoStart | boolean | Avvia subito, senza pulsante. |

| Output | Tipo | Descrizione | |--------|------|-------------| | completed | EventEmitter<UpgradeAnswersReport> | Fine dell'aggiornamento (anche se interrotto). | | closed | EventEmitter<UpgradeAnswersReport> | L'utente ha premuto "Chiudi". | | runningChange | EventEmitter<boolean> | true all'avvio, false alla fine (anche se interrotto o se il componente viene distrutto): per sospendere gli spinner globali dell'host. |


Modelli di configurazione

DynamicModuleGeneralConfig

const general = new DynamicModuleGeneralConfig(
  'https://api.esempio.it/api', // baseServerUrl
  userToken,                    // token autenticazione
  context,                      // oggetto Context
  null                          // EndPointConfiguration (null = usa default)
);

| Proprietà | Tipo | Descrizione | |-----------|------|-------------| | baseServerUrl | string | URL base API. Usato per costruire automaticamente gli endpoint se endPointConfiguration è null. | | userToken | string | Token di autenticazione inviato con ogni chiamata. | | endPointConfiguration | EndPointConfiguration \| null | Override completo degli endpoint. null usa le rotte standard. | | context | Context | Contesto applicativo. |

DynamicModuleListFormRecordActionsDefault

const actions = new DynamicModuleListFormRecordActionsDefault();
actions.add       = true;   // Pulsante "Aggiungi" nell'header lista
actions.view      = true;   // Visualizza record (solo lettura)
actions.edit      = true;   // Modifica record
actions.duplicate = false;  // Duplica record
actions.delete    = true;   // Elimina record
actions.graphs    = false;  // Grafici record

Modalità di visualizzazione

import { DynamicModuleViewModeEnum } from '@eqproject/eqp-dynamic-module';

enum DynamicModuleViewModeEnum {
  NONE            = 0,  // Nessuna visualizzazione
  VIEW            = 1,  // Sola lettura
  COMPILE         = 2,  // Compilazione / modifica
  LIST            = 3,  // Lista record
  REPAIR          = 4,  // Revisione form
  LISTWIEW        = 5,  // Lista compatta alternativa
  FILTER          = 6,  // Filtro / ricerca
  GRAPHS          = 7,  // Statistiche e grafici
  HLIST           = 8,  // Lista orizzontale
  EXTERNAL_FILTER = 9   // F