wuic-framework-lib 1.1.0 → 1.2.1

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 (16) hide show
  1. package/fesm2022/{wuic-framework-lib-chart-list.component-C9_EDkGu.mjs → wuic-framework-lib-chart-list.component-B1V8Q-Qq.mjs} +2 -2
  2. package/fesm2022/{wuic-framework-lib-code-editor.component-D_p7LGSQ.mjs → wuic-framework-lib-code-editor.component-4N95qt3D.mjs} +24 -3
  3. package/fesm2022/{wuic-framework-lib-designer.component-Dx6RraAn.mjs → wuic-framework-lib-designer.component-pW1YK-oY.mjs} +2 -2
  4. package/fesm2022/{wuic-framework-lib-first-run-wizard.component-Cp8IKDb9.mjs → wuic-framework-lib-first-run-wizard.component-CaGePYLi.mjs} +12 -2
  5. package/fesm2022/{wuic-framework-lib-framework-docs.component-CxckBsIX.mjs → wuic-framework-lib-framework-docs.component-m0IlS0Sl.mjs} +3 -3
  6. package/fesm2022/{wuic-framework-lib-pivot-builder.component-C-ceJi48.mjs → wuic-framework-lib-pivot-builder.component-VIs0CIH_.mjs} +11 -8
  7. package/fesm2022/{wuic-framework-lib-prompt-dialog-fallback-host.component-DPZCgxOB.mjs → wuic-framework-lib-prompt-dialog-fallback-host.component-Dm9GTZ07.mjs} +2 -2
  8. package/fesm2022/{wuic-framework-lib-report-designer.component-3-hUYft8.mjs → wuic-framework-lib-report-designer.component-FiAwNkPM.mjs} +2 -2
  9. package/fesm2022/{wuic-framework-lib-report-viewer.component-D4QD_wPl.mjs → wuic-framework-lib-report-viewer.component-DY0dGMrt.mjs} +2 -2
  10. package/fesm2022/{wuic-framework-lib-scheduler-list.component-C0nY8Wd6.mjs → wuic-framework-lib-scheduler-list.component-3E5m-9Qd.mjs} +31 -5
  11. package/fesm2022/{wuic-framework-lib-spreadsheet-list-sf.component-C9sWgq61.mjs → wuic-framework-lib-spreadsheet-list-sf.component-D9P9WbDl.mjs} +42 -22
  12. package/fesm2022/{wuic-framework-lib-workflow-designer.component-8mv_Rbz9.mjs → wuic-framework-lib-workflow-designer.component-4RC2EkGA.mjs} +23 -3
  13. package/fesm2022/{wuic-framework-lib-wuic-framework-lib-DJZAYFw8.mjs → wuic-framework-lib-wuic-framework-lib-BSyGhpM1.mjs} +251 -39
  14. package/fesm2022/wuic-framework-lib.mjs +1 -1
  15. package/package.json +1 -1
  16. package/types/wuic-framework-lib.d.ts +56 -1
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { EventEmitter, ViewChild, Output, Input, Component } from '@angular/core';
3
3
  import { BehaviorSubject } from 'rxjs';
4
- import { W as WtoolboxService, k as WuicClientException, l as WuicErrorCodes, G as GlobalHandler, M as MetadataProviderService, T as TranslationManagerService, U as UserInfoService, A as ArchetypeConfiguratorComponent } from './wuic-framework-lib-wuic-framework-lib-DJZAYFw8.mjs';
4
+ import { W as WtoolboxService, k as WuicClientException, l as WuicErrorCodes, G as GlobalHandler, M as MetadataProviderService, T as TranslationManagerService, U as UserInfoService, A as ArchetypeConfiguratorComponent } from './wuic-framework-lib-wuic-framework-lib-BSyGhpM1.mjs';
5
5
  import * as i5 from 'primeng/chart';
6
6
  import { ChartModule } from 'primeng/chart';
7
7
  import * as i8 from '@ngx-translate/core';
@@ -1377,4 +1377,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
1377
1377
  }] } });
1378
1378
 
1379
1379
  export { ChartListComponent };
1380
- //# sourceMappingURL=wuic-framework-lib-chart-list.component-C9_EDkGu.mjs.map
1380
+ //# sourceMappingURL=wuic-framework-lib-chart-list.component-B1V8Q-Qq.mjs.map
@@ -1,12 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { SecurityContext, ViewChild, Input, HostBinding, Component } from '@angular/core';
2
+ import { inject, ElementRef, SecurityContext, ViewChild, Input, HostBinding, Component } from '@angular/core';
3
3
  import * as i1$3 from '@angular/forms';
4
4
  import { FormsModule } from '@angular/forms';
5
5
  import * as i1 from '@materia-ui/ngx-monaco-editor';
6
6
  import { MonacoEditorModule } from '@materia-ui/ngx-monaco-editor';
7
7
  import { filter, take } from 'rxjs/operators';
8
8
  import { Emitter } from 'monaco-editor/esm/vs/base/common/event';
9
- import { W as WtoolboxService, M as MetadataProviderService, e as MetadatiColonna, m as MetaInfo, U as UserInfoService, f as DataProviderService } from './wuic-framework-lib-wuic-framework-lib-DJZAYFw8.mjs';
9
+ import { W as WtoolboxService, M as MetadataProviderService, e as MetadatiColonna, m as MetaInfo, U as UserInfoService, f as DataProviderService } from './wuic-framework-lib-wuic-framework-lib-BSyGhpM1.mjs';
10
10
  import { NgClass, NgStyle } from '@angular/common';
11
11
  import * as i14 from 'primeng/contextmenu';
12
12
  import { ContextMenuModule } from 'primeng/contextmenu';
@@ -3353,6 +3353,16 @@ class CodeEditorComponent {
3353
3353
  this.primeTreeNodes = [];
3354
3354
  this.sqlObjView = false;
3355
3355
  }
3356
+ /**
3357
+ * Riferimento al host element del componente, iniettato via `inject()` per non
3358
+ * dover modificare il costruttore esistente (7 service positional args). Usato
3359
+ * per esporre `this` su `host.__wuicCmp` per E2E introspection production-safe
3360
+ * (mirror DataSourceComponent 2026-05-25). Il test
3361
+ * `field-widget-code-editor--toggle-monaco.mjs` usa questo entry-point per
3362
+ * verificare `cmp.editor`, `cmp.editorRef`, ecc senza window.ng.getComponent
3363
+ * (che e' tree-shaken nei build prod).
3364
+ */
3365
+ hostElementRef = inject(ElementRef, { optional: true });
3356
3366
  t(resource, fallback) {
3357
3367
  const translated = WtoolboxService.translationService?.instant?.(resource);
3358
3368
  return translated && translated !== resource ? translated : fallback;
@@ -3453,6 +3463,13 @@ class CodeEditorComponent {
3453
3463
  * Inizializza il componente preparando stato, sottoscrizioni e primi caricamenti richiesti.
3454
3464
  */
3455
3465
  ngOnInit() {
3466
+ // E2E introspection hook (mirror DataSourceComponent 2026-05-25): expose
3467
+ // component instance on host element for tests that need direct access
3468
+ // (toggle-monaco contract check, etc.).
3469
+ try {
3470
+ (this.hostElementRef?.nativeElement).__wuicCmp = this;
3471
+ }
3472
+ catch { /* defensive */ }
3456
3473
  let formFieldOptions = {};
3457
3474
  if (this.field && this.field.extras.customEditorConfig) {
3458
3475
  try {
@@ -3585,6 +3602,10 @@ class CodeEditorComponent {
3585
3602
  * Rilascia risorse e sottoscrizioni per evitare leak e stati pendenti.
3586
3603
  */
3587
3604
  ngOnDestroy() {
3605
+ try {
3606
+ delete (this.hostElementRef?.nativeElement).__wuicCmp;
3607
+ }
3608
+ catch { /* defensive */ }
3588
3609
  if (this.layoutRaf !== null) {
3589
3610
  cancelAnimationFrame(this.layoutRaf);
3590
3611
  this.layoutRaf = null;
@@ -3918,4 +3939,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
3918
3939
  }] } });
3919
3940
 
3920
3941
  export { CodeEditorComponent };
3921
- //# sourceMappingURL=wuic-framework-lib-code-editor.component-D_p7LGSQ.mjs.map
3942
+ //# sourceMappingURL=wuic-framework-lib-code-editor.component-4N95qt3D.mjs.map
@@ -5,7 +5,7 @@ import { SplitterModule } from 'primeng/splitter';
5
5
  import * as i11 from 'primeng/dragdrop';
6
6
  import { DragDropModule } from 'primeng/dragdrop';
7
7
  import { NgClass, NgStyle, NgTemplateOutlet, AsyncPipe, JsonPipe, NgFor, NgIf, NgComponentOutlet } from '@angular/common';
8
- import { W as WtoolboxService, D as DynamicGenericTemplateComponent, a as DynamicCompilerService, b as DataSourceComponent, c as DataRepeaterComponent, F as FilterBarComponent, L as LazyParametricDialogComponent, P as PagerComponent, M as MetadataProviderService, d as ParametricDialogComponent, e as MetadatiColonna, f as DataProviderService, U as UserInfoService, T as TranslationManagerService, g as MetadataEditorService, h as WorkflowRuntimeMetadataService, i as FieldEditorComponent, j as MetadataEditorComponent, A as ArchetypeConfiguratorComponent } from './wuic-framework-lib-wuic-framework-lib-DJZAYFw8.mjs';
8
+ import { W as WtoolboxService, D as DynamicGenericTemplateComponent, a as DynamicCompilerService, b as DataSourceComponent, c as DataRepeaterComponent, F as FilterBarComponent, L as LazyParametricDialogComponent, P as PagerComponent, M as MetadataProviderService, d as ParametricDialogComponent, e as MetadatiColonna, f as DataProviderService, U as UserInfoService, T as TranslationManagerService, g as MetadataEditorService, h as WorkflowRuntimeMetadataService, i as FieldEditorComponent, j as MetadataEditorComponent, A as ArchetypeConfiguratorComponent } from './wuic-framework-lib-wuic-framework-lib-BSyGhpM1.mjs';
9
9
  import { fromEvent, BehaviorSubject, merge, filter, Observable, switchMap, take, map, takeUntil, tap, timeInterval, scan, mergeMap, of, delay, repeat, Subject, startWith, pairwise, skipWhile, combineLatest } from 'rxjs';
10
10
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
11
11
  import { CdkAccordionModule, CdkAccordion, CdkAccordionItem } from '@angular/cdk/accordion';
@@ -10888,4 +10888,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
10888
10888
  }] } });
10889
10889
 
10890
10890
  export { DesignerComponent };
10891
- //# sourceMappingURL=wuic-framework-lib-designer.component-Dx6RraAn.mjs.map
10891
+ //# sourceMappingURL=wuic-framework-lib-designer.component-pW1YK-oY.mjs.map
@@ -17,7 +17,7 @@ import * as i6$1 from 'primeng/tooltip';
17
17
  import { TooltipModule } from 'primeng/tooltip';
18
18
  import * as i2 from 'primeng/dialog';
19
19
  import { DialogModule } from 'primeng/dialog';
20
- import { G as GlobalHandler, n as AuthSessionService, W as WtoolboxService, U as UserInfoService } from './wuic-framework-lib-wuic-framework-lib-DJZAYFw8.mjs';
20
+ import { G as GlobalHandler, n as AuthSessionService, W as WtoolboxService, U as UserInfoService } from './wuic-framework-lib-wuic-framework-lib-BSyGhpM1.mjs';
21
21
  import * as i1 from '@angular/common/http';
22
22
  import * as i3 from 'primeng/api';
23
23
 
@@ -775,6 +775,16 @@ class WuicFirstRunWizardComponent {
775
775
  // seguito dall'appsettings-editor (Commit 9).
776
776
  enableCrashReporting: this.firstRunForm.enableCrashReporting ? 'true' : 'false'
777
777
  }));
778
+ // STOP polling FirstRunProgress NOW — `configure_wuic` ha appena riscritto
779
+ // `appsettings.json` (firstRun=false + nuove ConnectionStrings). IIS rileva
780
+ // il file change via FileSystemWatcher e recyclia l'app pool. Se il polling
781
+ // continua a girare durante il recycle riceve `503 Application Shutting Down`
782
+ // → GlobalHandler `error.http_503.user_message` → dialog modale all'utente
783
+ // ("Http failure response: 503") che oscura il flow di success.
784
+ // Spostato qui PRIMA di clearClientState + waitForBackendReady (era nel
785
+ // `finally` block, troppo tardi: i ~30s di waitForBackendReady erano
786
+ // esattamente la finestra di shutdown→restart pool).
787
+ this.stopFirstRunProgressPolling();
778
788
  await this.clearClientStateForFirstRunLogin();
779
789
  await this.waitForBackendReady();
780
790
  const scaffoldRoute = '/scaffolding/dialog/1556';
@@ -1317,4 +1327,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
1317
1327
  }] } });
1318
1328
 
1319
1329
  export { WuicFirstRunWizardComponent };
1320
- //# sourceMappingURL=wuic-framework-lib-first-run-wizard.component-Cp8IKDb9.mjs.map
1330
+ //# sourceMappingURL=wuic-framework-lib-first-run-wizard.component-CaGePYLi.mjs.map
@@ -16,12 +16,12 @@ import * as i1$3 from 'primeng/image';
16
16
  import { ImageModule } from 'primeng/image';
17
17
  import * as i8 from '@ngx-translate/core';
18
18
  import { TranslateService, TranslateModule } from '@ngx-translate/core';
19
- import { r as getThemeOptions, T as TranslationManagerService, U as UserInfoService } from './wuic-framework-lib-wuic-framework-lib-DJZAYFw8.mjs';
19
+ import { r as getThemeOptions, T as TranslationManagerService, U as UserInfoService } from './wuic-framework-lib-wuic-framework-lib-BSyGhpM1.mjs';
20
20
  import * as i1 from '@angular/router';
21
21
 
22
22
  const frameworkDocsContent = {
23
23
  "version": "1.0.0",
24
- "generatedAt": "2026-05-13T17:21:00.051Z",
24
+ "generatedAt": "2026-05-19T10:32:41.905Z",
25
25
  "groups": [
26
26
  {
27
27
  "id": "primi-passi",
@@ -27507,4 +27507,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
27507
27507
  }] } });
27508
27508
 
27509
27509
  export { FrameworkDocsComponent };
27510
- //# sourceMappingURL=wuic-framework-lib-framework-docs.component-CxckBsIX.mjs.map
27510
+ //# sourceMappingURL=wuic-framework-lib-framework-docs.component-m0IlS0Sl.mjs.map
@@ -25,7 +25,7 @@ import { TableModule } from 'primeng/table';
25
25
  import { Tabs, TabList, Tab, TabPanels, TabPanel } from 'primeng/tabs';
26
26
  import * as i1$3 from '@materia-ui/ngx-monaco-editor';
27
27
  import { MonacoEditorModule } from '@materia-ui/ngx-monaco-editor';
28
- import { W as WtoolboxService, U as UserInfoService, T as TranslationManagerService, M as MetadataProviderService, f as DataProviderService, m as MetaInfo, e as MetadatiColonna, o as FilterInfo, G as GlobalHandler, k as WuicClientException, l as WuicErrorCodes, p as LicenseFeatureService, b as DataSourceComponent, F as FilterBarComponent } from './wuic-framework-lib-wuic-framework-lib-DJZAYFw8.mjs';
28
+ import { W as WtoolboxService, U as UserInfoService, T as TranslationManagerService, M as MetadataProviderService, f as DataProviderService, m as MetaInfo, e as MetadatiColonna, o as FilterInfo, G as GlobalHandler, k as WuicClientException, l as WuicErrorCodes, p as LicenseFeatureService, b as DataSourceComponent, F as FilterBarComponent } from './wuic-framework-lib-wuic-framework-lib-BSyGhpM1.mjs';
29
29
  import * as i6 from 'primeng/tooltip';
30
30
  import { TooltipModule } from 'primeng/tooltip';
31
31
  import { ClassicPreset, NodeEditor } from 'rete';
@@ -2243,15 +2243,18 @@ class PivotBuilderComponent {
2243
2243
  this.licenseFeature = licenseFeature;
2244
2244
  }
2245
2245
  /**
2246
- * `true` quando il backend espone `dataDbms='mysql'` (visto via LicenseStatus).
2247
- * Su MySQL il concetto di "schema" SQL Server non esiste: i nomi tabella/view
2248
- * sono per-database, niente prefisso `<schema>.<name>`. La UI nasconde quindi
2249
- * il campo Schema dal prompt "Crea vista pivot" / "Crea tabella materializzata"
2250
- * e il backend gestisce schema vuoto come no-op.
2246
+ * `true` quando il backend usa un dialect dove lo schema SQL Server-style
2247
+ * `dbo` non si applica:
2248
+ * - `mysql` → no schema, tabelle per-database
2249
+ * - `postgresql` → schema fisso `public` (gestito server-side via NormalizeSchema)
2250
+ * - `oracle` → schema = username dello user di connessione (no `dbo`)
2251
+ * La UI nasconde il campo Schema dai prompt "Crea vista pivot" / "Crea
2252
+ * tabella materializzata" e il backend riceve string.Empty (no-op).
2251
2253
  */
2252
2254
  isDataMysql() {
2253
2255
  const snap = this.licenseFeature?.snapshot();
2254
- return String(snap?.dataDbms || '').trim().toLowerCase() === 'mysql';
2256
+ const dbms = String(snap?.dataDbms || '').trim().toLowerCase();
2257
+ return dbms === 'mysql' || dbms === 'postgresql' || dbms === 'oracle';
2255
2258
  }
2256
2259
  t(key, fallback) {
2257
2260
  const translated = this.trslSrv?.instant?.(key);
@@ -4435,4 +4438,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
4435
4438
  }] } });
4436
4439
 
4437
4440
  export { PivotBuilderComponent };
4438
- //# sourceMappingURL=wuic-framework-lib-pivot-builder.component-C-ceJi48.mjs.map
4441
+ //# sourceMappingURL=wuic-framework-lib-pivot-builder.component-VIs0CIH_.mjs.map
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Output, Input, Component } from '@angular/core';
3
3
  import * as i2 from 'primeng/dialog';
4
4
  import { DialogModule } from 'primeng/dialog';
5
- import { d as ParametricDialogComponent } from './wuic-framework-lib-wuic-framework-lib-DJZAYFw8.mjs';
5
+ import { d as ParametricDialogComponent } from './wuic-framework-lib-wuic-framework-lib-BSyGhpM1.mjs';
6
6
 
7
7
  class PromptDialogFallbackHostComponent {
8
8
  datasource;
@@ -96,4 +96,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
96
96
  }] } });
97
97
 
98
98
  export { PromptDialogFallbackHostComponent };
99
- //# sourceMappingURL=wuic-framework-lib-prompt-dialog-fallback-host.component-DPZCgxOB.mjs.map
99
+ //# sourceMappingURL=wuic-framework-lib-prompt-dialog-fallback-host.component-Dm9GTZ07.mjs.map
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { ViewChild, Component } from '@angular/core';
3
- import { W as WtoolboxService, M as MetadataProviderService } from './wuic-framework-lib-wuic-framework-lib-DJZAYFw8.mjs';
3
+ import { W as WtoolboxService, M as MetadataProviderService } from './wuic-framework-lib-wuic-framework-lib-BSyGhpM1.mjs';
4
4
  import * as i3 from 'stimulsoft-designer-angular';
5
5
  import { StimulsoftDesignerModule, StimulsoftDesignerComponent } from 'stimulsoft-designer-angular';
6
6
  import * as i1 from '@angular/router';
@@ -191,4 +191,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
191
191
  }] } });
192
192
 
193
193
  export { ReportDesignerComponent };
194
- //# sourceMappingURL=wuic-framework-lib-report-designer.component-3-hUYft8.mjs.map
194
+ //# sourceMappingURL=wuic-framework-lib-report-designer.component-FiAwNkPM.mjs.map
@@ -5,7 +5,7 @@ import { NavigationEnd } from '@angular/router';
5
5
  import { CommonModule } from '@angular/common';
6
6
  import * as i3 from 'stimulsoft-viewer-angular';
7
7
  import { StimulsoftViewerModule, StimulsoftViewerComponent } from 'stimulsoft-viewer-angular';
8
- import { W as WtoolboxService } from './wuic-framework-lib-wuic-framework-lib-DJZAYFw8.mjs';
8
+ import { W as WtoolboxService } from './wuic-framework-lib-wuic-framework-lib-BSyGhpM1.mjs';
9
9
  import { e as ensureWuicStimulsoftLicenseRegistered } from './wuic-framework-lib-stimulsoft-license.service-BIyxB4pO.mjs';
10
10
  import { firstValueFrom } from 'rxjs';
11
11
  import * as i1$1 from '@angular/common/http';
@@ -476,4 +476,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
476
476
  }] } });
477
477
 
478
478
  export { ReportViewerComponent };
479
- //# sourceMappingURL=wuic-framework-lib-report-viewer.component-D4QD_wPl.mjs.map
479
+ //# sourceMappingURL=wuic-framework-lib-report-viewer.component-DY0dGMrt.mjs.map
@@ -8,7 +8,7 @@ import interactionPlugin from '@fullcalendar/interaction';
8
8
  import timeGridPlugin from '@fullcalendar/timegrid';
9
9
  import * as i1 from '@angular/platform-browser';
10
10
  import { Title } from '@angular/platform-browser';
11
- import { o as FilterInfo, q as FilterItem, W as WtoolboxService, d as ParametricDialogComponent, M as MetadataProviderService, D as DynamicGenericTemplateComponent, T as TranslationManagerService } from './wuic-framework-lib-wuic-framework-lib-DJZAYFw8.mjs';
11
+ import { o as FilterInfo, q as FilterItem, W as WtoolboxService, d as ParametricDialogComponent, M as MetadataProviderService, D as DynamicGenericTemplateComponent, T as TranslationManagerService } from './wuic-framework-lib-wuic-framework-lib-BSyGhpM1.mjs';
12
12
  import { BehaviorSubject } from 'rxjs';
13
13
 
14
14
  // https://fullcalendar.io/docs/initialize-globals#premium-bundle -
@@ -192,17 +192,43 @@ class SchedulerListComponent {
192
192
  self.onSchedulerDateClick.emit(info);
193
193
  if (self.datasource && self.datasource.value && self.datasource.value.metaInfo && self.datasource.value.metaInfo.tableMetadata.md_insertable) {
194
194
  let header = self.trslSrv.instant('insert') + ' ' + self.metaInfo.tableMetadata.md_display_string;
195
- let defaulted = self.datasource.value.addNewRecord();
196
195
  const fromCol = self.getColumnMetadata(self.fromField);
197
196
  const toCol = self.getColumnMetadata(self.toField);
198
- defaulted[self.fromField].next(self.serializeDateForColumn(info.date, fromCol));
197
+ // FIX 2026-05-22: prepopolazione via parametro `record` di addNewRecord
198
+ // (linea 4386-4388 data-source.component.ts) invece di `.next()` post-creation.
199
+ // Il vecchio path (defaulted = addNewRecord(); defaulted[fromField].next(...))
200
+ // settava la BS, ma in alcuni scenari il widget date-editor faceva subscribe
201
+ // PRIMA o usava un altro path di binding → input vuoto.
202
+ // addNewRecord({...seed}) fa Object.assign(defaulted, seed) PRIMA che setCurrent
203
+ // wrappi i valori in BehaviorSubject → ogni BS nasce GIA' col valore pre-popolato.
204
+ const fromDate = new Date(info.date);
199
205
  let toDate = new Date(info.date);
200
206
  const toType = String(toCol?.mc_ui_column_type || '').trim().toLowerCase();
201
207
  // For all-day date fields we persist inclusive end date.
202
208
  if (toType !== 'date') {
203
209
  toDate.setDate(toDate.getDate() + 1);
204
210
  }
205
- defaulted[self.toField].next(self.serializeDateForColumn(toDate, toCol));
211
+ const seed = {};
212
+ if (self.fromField) {
213
+ seed[self.fromField] = self.serializeDateForColumn(fromDate, fromCol);
214
+ }
215
+ if (self.toField && self.toField !== self.fromField) {
216
+ seed[self.toField] = self.serializeDateForColumn(toDate, toCol);
217
+ }
218
+ let defaulted = self.datasource.value.addNewRecord(seed);
219
+ // Defensive: also call .next() su BS post-wrap, nel caso seed non sia stato
220
+ // applicato (es. fromField non in columnMetadata, override pristine, ecc.).
221
+ // BS replay garantisce che il widget vede il valore al primo subscribe.
222
+ const ensureBSValue = (record, fieldName, value) => {
223
+ if (!record || !fieldName)
224
+ return;
225
+ const target = record[fieldName];
226
+ if (target && typeof target.next === 'function' && (target.value == null || target.value === '')) {
227
+ target.next(value);
228
+ }
229
+ };
230
+ ensureBSValue(defaulted, self.fromField, self.serializeDateForColumn(fromDate, fromCol));
231
+ ensureBSValue(defaulted, self.toField, self.serializeDateForColumn(toDate, toCol));
206
232
  const ref = WtoolboxService.dialogService.open(ParametricDialogComponent, {
207
233
  data: {
208
234
  record: defaulted,
@@ -614,4 +640,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
614
640
  }] } });
615
641
 
616
642
  export { SchedulerListComponent };
617
- //# sourceMappingURL=wuic-framework-lib-scheduler-list.component-C0nY8Wd6.mjs.map
643
+ //# sourceMappingURL=wuic-framework-lib-scheduler-list.component-3E5m-9Qd.mjs.map
@@ -7,7 +7,7 @@ import * as i8 from '@ngx-translate/core';
7
7
  import { TranslateModule } from '@ngx-translate/core';
8
8
  import * as i7 from '@syncfusion/ej2-angular-spreadsheet';
9
9
  import { SpreadsheetModule } from '@syncfusion/ej2-angular-spreadsheet';
10
- import { W as WtoolboxService, M as MetadataProviderService, U as UserInfoService, b as DataSourceComponent, I as ImportExportButtonComponent } from './wuic-framework-lib-wuic-framework-lib-DJZAYFw8.mjs';
10
+ import { W as WtoolboxService, M as MetadataProviderService, U as UserInfoService, b as DataSourceComponent, I as ImportExportButtonComponent } from './wuic-framework-lib-wuic-framework-lib-BSyGhpM1.mjs';
11
11
  import { registerLicense } from '@syncfusion/ej2-base';
12
12
  import * as i1 from '@angular/platform-browser';
13
13
  import * as i1$1 from '@angular/router';
@@ -1714,10 +1714,13 @@ class SpreadsheetListSfComponent {
1714
1714
  const distinctList = await this.computeDistinctValuesForPopup(col, fieldName);
1715
1715
  // Selezione corrente: se esiste un filtro sulla colonna, quei valori
1716
1716
  // sono pre-checked; altrimenti tutti checked.
1717
+ // selectedSet contiene `d.value` (raw FK ID per lookupByID, raw value altrimenti)
1718
+ // — NON `d.display` — cosi' il filter server-side puo' usarli direttamente
1719
+ // come predicati `WHERE col = <id>` (cross-DBMS safe).
1717
1720
  const currentFilter = this.columnFilters.get(fieldName) || null;
1718
1721
  const selectedSet = currentFilter
1719
1722
  ? new Set(currentFilter)
1720
- : new Set(distinctList.map(d => d.display));
1723
+ : new Set(distinctList.map(d => d.value));
1721
1724
  // ==== Costruisci DOM popup ====
1722
1725
  const popup = document.createElement('div');
1723
1726
  popup.className = 'wuic-sf-filter-popup';
@@ -1779,16 +1782,20 @@ class SpreadsheetListSfComponent {
1779
1782
  return;
1780
1783
  const label = document.createElement('label');
1781
1784
  label.className = 'wuic-sf-filter-popup-item';
1782
- label.setAttribute('data-value', d.display);
1785
+ // data-value contiene il VALUE (FK ID per lookup) per leggibilita' DOM/testing.
1786
+ label.setAttribute('data-value', d.value);
1783
1787
  const cb = document.createElement('input');
1784
1788
  cb.type = 'checkbox';
1785
1789
  cb.className = 'wuic-sf-filter-popup-cb';
1786
- cb.checked = selectedSet.has(d.display);
1790
+ // Memorizziamo `d.value` (raw FK ID) nel selectedSet, ma renderizziamo
1791
+ // `d.display` (descrittivo) nello span — cosi' UI = descrittivo e
1792
+ // filter value emesso al server = raw ID (cross-DBMS safe).
1793
+ cb.checked = selectedSet.has(d.value);
1787
1794
  cb.addEventListener('change', () => {
1788
1795
  if (cb.checked)
1789
- selectedSet.add(d.display);
1796
+ selectedSet.add(d.value);
1790
1797
  else
1791
- selectedSet.delete(d.display);
1798
+ selectedSet.delete(d.value);
1792
1799
  updateSelectAllState();
1793
1800
  });
1794
1801
  const span = document.createElement('span');
@@ -1807,7 +1814,7 @@ class SpreadsheetListSfComponent {
1807
1814
  };
1808
1815
  selectAllCb.addEventListener('change', () => {
1809
1816
  if (selectAllCb.checked) {
1810
- distinctList.forEach(d => selectedSet.add(d.display));
1817
+ distinctList.forEach(d => selectedSet.add(d.value));
1811
1818
  }
1812
1819
  else {
1813
1820
  selectedSet.clear();
@@ -1907,23 +1914,33 @@ class SpreadsheetListSfComponent {
1907
1914
  return this.fetchDistinctValuesFromServer(col, fieldName);
1908
1915
  }
1909
1916
  const baseRecords = this.records.filter(rec => this.recordMatchesColumnFilters(rec, fieldName));
1917
+ // Per colonne lookupByID il `value` deve essere il FK ID raw (rec[fieldName]),
1918
+ // mentre il `display` è il descrittivo risolto via lookup alias. Senza questa
1919
+ // separazione il filter server-side invierebbe descrittivi (stringa) contro
1920
+ // colonna FK numerica → 42601 PG / ORA-00904 Oracle.
1910
1921
  const distinctMap = new Map();
1911
1922
  for (const rec of baseRecords) {
1912
1923
  const raw = rec?.[fieldName];
1913
1924
  const display = this.formatValueForDisplay(raw, col, rec);
1914
- const key = display == null ? '' : String(display);
1915
- const entry = distinctMap.get(key);
1925
+ const displayKey = display == null ? '' : String(display);
1926
+ const valueKey = raw == null ? '' : String(raw);
1927
+ const entry = distinctMap.get(valueKey);
1916
1928
  if (entry)
1917
1929
  entry.count++;
1918
1930
  else
1919
- distinctMap.set(key, { display: key, count: 1 });
1931
+ distinctMap.set(valueKey, { display: displayKey, value: valueKey, count: 1 });
1920
1932
  }
1921
1933
  return this.sortDistinctList(distinctMap);
1922
1934
  }
1923
1935
  /**
1924
1936
  * Chiama `MetaService.getDistinctValues(column_id, text, filter_type,
1925
1937
  * max_results, user_id)` (endpoint AsmxProxy) e trasforma `rawPagedResult`
1926
- * in `Array<{display, count}>` compatibile col popup.
1938
+ * in `Array<{display, value, count}>` compatibile col popup.
1939
+ *
1940
+ * Per lookupByID il server (PG provider — vedi metaQueryPostgreSql.cs distinct
1941
+ * branch) emette ANCHE l'alias `<entity>___<dataTextField>__<colName>` con il
1942
+ * descrittivo. `formatValueForDisplay` lo legge da `row` e ritorna la stringa
1943
+ * human-readable. Il filter usa invece il FK ID raw (`row[fieldName]`).
1927
1944
  *
1928
1945
  * In caso di errore ritorna array vuoto (il popup mostrerà nessuna opzione
1929
1946
  * — un notification error è comunque inviata).
@@ -1956,13 +1973,16 @@ class SpreadsheetListSfComponent {
1956
1973
  // FastExpando conserva il case originale.
1957
1974
  const raw = row?.[fieldName] ?? row?.[fieldName?.toLowerCase?.()]
1958
1975
  ?? row?.[fieldName?.toUpperCase?.()] ?? Object.values(row || {})[0];
1976
+ // display: descrittivo se lookup (via alias in row), altrimenti formatted raw.
1959
1977
  const display = this.formatValueForDisplay(raw, col, row);
1960
- const key = display == null ? '' : String(display);
1961
- const entry = distinctMap.get(key);
1978
+ const displayKey = display == null ? '' : String(display);
1979
+ // value: FK ID raw (sempre, anche per lookup). Usato come filter value.
1980
+ const valueKey = raw == null ? '' : String(raw);
1981
+ const entry = distinctMap.get(valueKey);
1962
1982
  if (entry)
1963
1983
  entry.count++;
1964
1984
  else
1965
- distinctMap.set(key, { display: key, count: 1 });
1985
+ distinctMap.set(valueKey, { display: displayKey, value: valueKey, count: 1 });
1966
1986
  }
1967
1987
  return this.sortDistinctList(distinctMap);
1968
1988
  }
@@ -1976,7 +1996,8 @@ class SpreadsheetListSfComponent {
1976
1996
  return [];
1977
1997
  }
1978
1998
  }
1979
- /** Ordinamento comune della lista distinct (numerico se possibile, poi locale). */
1999
+ /** Ordinamento comune della lista distinct (numerico se possibile, poi locale).
2000
+ * Ordina per `display` (descrittivo) cosi' il popup e' navigabile dall'utente. */
1980
2001
  sortDistinctList(distinctMap) {
1981
2002
  return Array.from(distinctMap.values()).sort((a, b) => {
1982
2003
  const na = Number(a.display);
@@ -2006,15 +2027,14 @@ class SpreadsheetListSfComponent {
2006
2027
  recordMatchesColumnFilters(rec, excludeField) {
2007
2028
  if (this.columnFilters.size === 0)
2008
2029
  return true;
2009
- const cols = this.metaInfo?.columnMetadata || [];
2010
2030
  for (const [field, selSet] of this.columnFilters.entries()) {
2011
2031
  if (excludeField && field === excludeField)
2012
2032
  continue;
2013
- const metaCol = cols.find(c => c.mc_nome_colonna === field);
2014
- if (!metaCol)
2015
- continue;
2016
- const display = this.formatValueForDisplay(rec?.[field], metaCol, rec);
2017
- const key = display == null ? '' : String(display);
2033
+ // selSet contiene raw values (FK ID per lookupByID, raw altrimenti) — vedi
2034
+ // computeDistinctValuesForPopup. Match contro raw rec[field], NON contro
2035
+ // display formattato (per parity con server-side WHERE col = <raw>).
2036
+ const raw = rec?.[field];
2037
+ const key = raw == null ? '' : String(raw);
2018
2038
  if (!selSet.has(key))
2019
2039
  return false;
2020
2040
  }
@@ -4333,4 +4353,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
4333
4353
  }] } });
4334
4354
 
4335
4355
  export { SpreadsheetListSfComponent };
4336
- //# sourceMappingURL=wuic-framework-lib-spreadsheet-list-sf.component-C9sWgq61.mjs.map
4356
+ //# sourceMappingURL=wuic-framework-lib-spreadsheet-list-sf.component-D9P9WbDl.mjs.map
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { HostBinding, Input, Component, EventEmitter, Output, ViewChild } from '@angular/core';
2
+ import { HostBinding, Input, Component, EventEmitter, inject, ElementRef, Output, ViewChild } from '@angular/core';
3
3
  import { CommonModule, NgClass } from '@angular/common';
4
4
  import { ClassicPreset, NodeEditor } from 'rete';
5
5
  import { AreaPlugin, AreaExtensions } from 'rete-area-plugin';
@@ -20,7 +20,7 @@ import { SelectModule } from 'primeng/select';
20
20
  import * as i8 from '@ngx-translate/core';
21
21
  import { TranslateModule } from '@ngx-translate/core';
22
22
  import { BehaviorSubject } from 'rxjs';
23
- import { W as WtoolboxService, M as MetadataProviderService, d as ParametricDialogComponent, k as WuicClientException, l as WuicErrorCodes, G as GlobalHandler, f as DataProviderService, b as DataSourceComponent, j as MetadataEditorComponent } from './wuic-framework-lib-wuic-framework-lib-DJZAYFw8.mjs';
23
+ import { W as WtoolboxService, M as MetadataProviderService, d as ParametricDialogComponent, k as WuicClientException, l as WuicErrorCodes, G as GlobalHandler, f as DataProviderService, b as DataSourceComponent, j as MetadataEditorComponent } from './wuic-framework-lib-wuic-framework-lib-BSyGhpM1.mjs';
24
24
 
25
25
  class WorkflowDesignerLayoutHelper {
26
26
  /**
@@ -1223,7 +1223,23 @@ class WorkflowDesignerComponent {
1223
1223
  * crea editor/area/plugin di connessione+render Angular, collega il pipe eventi
1224
1224
  * per emettere `workflowChange`, carica i grafi salvati e garantisce il nodo Start iniziale.
1225
1225
  */
1226
+ /**
1227
+ * Riferimento al host element del componente, iniettato via `inject()` per non
1228
+ * dover modificare il costruttore esistente (3 service positional args). Usato
1229
+ * per esporre `this` su `host.__wuicCmp` per E2E introspection production-safe
1230
+ * (mirror del pattern in DataSourceComponent 2026-05-25). Vedi
1231
+ * `workflow-designer--with-nodes.mjs` che usa `cmp.editor` / `cmp.area` per
1232
+ * verificare che ngAfterViewInit ha completato la setup Rete.
1233
+ */
1234
+ hostElementRef = inject(ElementRef, { optional: true });
1226
1235
  async ngAfterViewInit() {
1236
+ // E2E introspection hook: expose component instance on the host element
1237
+ // (mirror DataSourceComponent.ngOnInit, vedi commento in data-source.component.ts
1238
+ // 2026-05-25 sul perche' window.ng.getComponent non e' affidabile in prod).
1239
+ try {
1240
+ (this.hostElementRef?.nativeElement).__wuicCmp = this;
1241
+ }
1242
+ catch { /* defensive */ }
1227
1243
  const canvas = this.workflowCanvasRef?.nativeElement;
1228
1244
  if (!canvas) {
1229
1245
  return;
@@ -1270,6 +1286,10 @@ class WorkflowDesignerComponent {
1270
1286
  * Cleanup del componente: cancella timer di auto-layout pendenti e distrugge l'area Rete.
1271
1287
  */
1272
1288
  ngOnDestroy() {
1289
+ try {
1290
+ delete (this.hostElementRef?.nativeElement).__wuicCmp;
1291
+ }
1292
+ catch { /* defensive */ }
1273
1293
  if (this.autoArrangeTimer) {
1274
1294
  clearTimeout(this.autoArrangeTimer);
1275
1295
  this.autoArrangeTimer = null;
@@ -5091,4 +5111,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
5091
5111
  }] } });
5092
5112
 
5093
5113
  export { WorkflowDesignerComponent };
5094
- //# sourceMappingURL=wuic-framework-lib-workflow-designer.component-8mv_Rbz9.mjs.map
5114
+ //# sourceMappingURL=wuic-framework-lib-workflow-designer.component-4RC2EkGA.mjs.map