@eqproject/eqp-dynamic-module 2.10.72 → 2.10.73

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.
@@ -7175,7 +7175,21 @@ class DbgetterComponent {
7175
7175
  if (typeof this.field.DataGetter.DataGetterHasResetButton === "undefined") {
7176
7176
  this.field.DataGetter.DataGetterHasResetButton = true;
7177
7177
  }
7178
- // Fine Retrocompatibilità
7178
+ // Fine Retrocompatibilità
7179
+ // Inizio Normalizzazione V2 (Omnisearch AI — DataGetterCodeVersion=2)
7180
+ // Il DataGetterValue V2 annida il query config in queryCommandDatabaseConfiguration.
7181
+ // Per evitare di duplicare tutta la logica, unwrappiamo in-place al formato V1
7182
+ // così il resto del codice rimane invariato.
7183
+ const isV2 = this.field.DataGetter.DataGetterValue?.DataGetterCodeVersion === 2;
7184
+ if (isV2) {
7185
+ const v2wrapper = this.field.DataGetter.DataGetterValue;
7186
+ this.field.DataGetter.DataGetterValue = v2wrapper.queryCommandDatabaseConfiguration;
7187
+ // DataGetterColumnForce in V2 può stare nell'oggetto interno — propagalo se manca all'esterno
7188
+ if (!this.field.DataGetter.DataGetterColumnForce && v2wrapper.DataGetterColumnForce) {
7189
+ this.field.DataGetter.DataGetterColumnForce = v2wrapper.DataGetterColumnForce;
7190
+ }
7191
+ }
7192
+ // Fine Normalizzazione V2
7179
7193
  // Inizio: Tabella multiselect?
7180
7194
  if (this.field.FieldType == FieldTypeEnum['Elenco generico']) {
7181
7195
  this.isMultiselect = true;
@@ -7194,6 +7208,10 @@ class DbgetterComponent {
7194
7208
  this.QueryEditorComponent.inputParams.config.field = this.field;
7195
7209
  this.QueryEditorComponent.inputParams.config.record = this.record;
7196
7210
  this.QueryEditorComponent.inputParams.config.inConfig = this.inConfig;
7211
+ // V2: il QueryEditor in RESULT mode riceve anche loadQueryStatuses con il queryConfig già unwrappato
7212
+ if (isV2) {
7213
+ this.QueryEditorComponent.inputParams.config.loadQueryStatuses = this.field.DataGetter.DataGetterValue;
7214
+ }
7197
7215
  if (this.field.DataGetter.DataGetterValue.openedFields.find(x => typeof x.QueryPropertyValue !== "object" && x.QueryPropertyValue == '?') != null) {
7198
7216
  // Il campo ha almeno un valore con "?"
7199
7217
  this.haveQuestions = true;