@fluxhub/fluxhub-lib 19.0.113 → 19.0.115

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.
@@ -78,6 +78,7 @@ import * as i6$5 from '@angular/cdk/drag-drop';
78
78
  import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
79
79
  import * as i11 from '@angular/material/radio';
80
80
  import { MatRadioModule } from '@angular/material/radio';
81
+ import NavigatedViewer from 'bpmn-js/lib/NavigatedViewer';
81
82
  import * as i6$6 from '@angular/material/badge';
82
83
  import { MatBadgeModule } from '@angular/material/badge';
83
84
 
@@ -32078,6 +32079,288 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
32078
32079
  args: [MAT_DIALOG_DATA]
32079
32080
  }] }] });
32080
32081
 
32082
+ class BpmnEditorComponent {
32083
+ canvasRef;
32084
+ initialXml;
32085
+ completedSteps = []; // Step completati (es. [10, 20])
32086
+ currentStep; // Step corrente (es. 30)
32087
+ transitionData = [];
32088
+ diagramChanged = new EventEmitter();
32089
+ elementSelected = new EventEmitter();
32090
+ modeler;
32091
+ overlays;
32092
+ ngAfterViewInit() {
32093
+ // Small delay to ensure DOM is ready
32094
+ setTimeout(() => {
32095
+ this.initializeBpmnEditor();
32096
+ }, 100);
32097
+ }
32098
+ ngOnDestroy() {
32099
+ if (this.modeler) {
32100
+ this.modeler.destroy();
32101
+ }
32102
+ }
32103
+ initializeBpmnEditor() {
32104
+ try {
32105
+ this.modeler = new NavigatedViewer({
32106
+ container: this.canvasRef.nativeElement,
32107
+ keyboard: { bindTo: document }
32108
+ });
32109
+ // Get overlays service
32110
+ this.overlays = this.modeler.get('overlays');
32111
+ // Listen for element selection
32112
+ this.modeler.on('selection.changed', (event) => {
32113
+ this.elementSelected.emit(event.newSelection);
32114
+ });
32115
+ // Load initial diagram or create new one
32116
+ if (this.initialXml && this.initialXml.trim() !== '') {
32117
+ this.loadDiagram(this.initialXml);
32118
+ }
32119
+ else {
32120
+ this.createNewDiagram();
32121
+ }
32122
+ }
32123
+ catch (error) {
32124
+ console.error('Error initializing BPMN viewer:', error);
32125
+ this.createNewDiagram();
32126
+ }
32127
+ }
32128
+ createNewDiagram() {
32129
+ const newDiagramXML = `<?xml version="1.0" encoding="UTF-8"?>
32130
+ <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
32131
+ xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
32132
+ xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
32133
+ xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
32134
+ id="Definitions_1"
32135
+ targetNamespace="http://bpmn.io/schema/bpmn">
32136
+ <bpmn:process id="Process_1" isExecutable="true">
32137
+ <bpmn:startEvent id="StartEvent_1"/>
32138
+ </bpmn:process>
32139
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
32140
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
32141
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
32142
+ <dc:Bounds x="179" y="79" width="36" height="36"/>
32143
+ </bpmndi:BPMNShape>
32144
+ </bpmndi:BPMNPlane>
32145
+ </bpmndi:BPMNDiagram>
32146
+ </bpmn:definitions>`;
32147
+ this.loadDiagram(newDiagramXML);
32148
+ }
32149
+ loadDiagram(xml) {
32150
+ this.modeler.importXML(xml).then(() => {
32151
+ const canvas = this.modeler.get('canvas');
32152
+ // Use setTimeout to ensure canvas is fully initialized
32153
+ setTimeout(() => {
32154
+ canvas.zoom('fit-viewport');
32155
+ // Apply colors to steps
32156
+ this.applyStepColors();
32157
+ // Apply transition info on connections
32158
+ this.applyTransitionInfo();
32159
+ }, 200);
32160
+ }).catch((err) => {
32161
+ console.error('Error loading BPMN diagram:', err);
32162
+ // Fallback to create new diagram if loading fails
32163
+ this.createNewDiagram();
32164
+ });
32165
+ }
32166
+ // Read-only mode - no save functionality needed
32167
+ // private saveDiagram(): void {
32168
+ // this.modeler.saveXML({ format: true }).then((result: any) => {
32169
+ // this.diagramChanged.emit(result.xml);
32170
+ // }).catch((err: any) => {
32171
+ // console.error('Error saving BPMN diagram:', err);
32172
+ // });
32173
+ // }
32174
+ exportSVG() {
32175
+ return this.modeler.saveSVG({ format: true }).then((result) => {
32176
+ return result.svg;
32177
+ });
32178
+ }
32179
+ exportXML() {
32180
+ return this.modeler.saveXML({ format: true }).then((result) => {
32181
+ return result.xml;
32182
+ });
32183
+ }
32184
+ zoomIn() {
32185
+ const canvas = this.modeler.get('canvas');
32186
+ canvas.zoom(canvas.zoom() + 0.1);
32187
+ }
32188
+ zoomOut() {
32189
+ const canvas = this.modeler.get('canvas');
32190
+ canvas.zoom(canvas.zoom() - 0.1);
32191
+ }
32192
+ zoomFit() {
32193
+ const canvas = this.modeler.get('canvas');
32194
+ canvas.zoom('fit-viewport');
32195
+ }
32196
+ zoomReset() {
32197
+ const canvas = this.modeler.get('canvas');
32198
+ canvas.zoom(1);
32199
+ }
32200
+ /**
32201
+ * Apply colors to BPMN elements based on workflow step status
32202
+ * - Green: completed steps
32203
+ * - Orange: current step
32204
+ */
32205
+ applyStepColors() {
32206
+ if (!this.modeler)
32207
+ return;
32208
+ const canvas = this.modeler.get('canvas');
32209
+ const elementRegistry = this.modeler.get('elementRegistry');
32210
+ // Get all elements from the diagram
32211
+ const allElements = elementRegistry.getAll();
32212
+ // Apply colors to each element based on step status
32213
+ allElements.forEach((element) => {
32214
+ if (!element.businessObject)
32215
+ return;
32216
+ const elementId = element.id;
32217
+ const elementName = element.businessObject.name || '';
32218
+ // Try to extract step number from element ID or name
32219
+ const stepNumber = this.extractStepNumber(elementId, elementName);
32220
+ if (stepNumber !== null) {
32221
+ // Check if this step is completed
32222
+ if (this.completedSteps.includes(stepNumber)) {
32223
+ canvas.addMarker(elementId, 'highlight-completed');
32224
+ }
32225
+ // Check if this is the current step
32226
+ else if (this.currentStep === stepNumber) {
32227
+ canvas.addMarker(elementId, 'highlight-current');
32228
+ }
32229
+ }
32230
+ });
32231
+ }
32232
+ /**
32233
+ * Extract step number from element ID or name
32234
+ * Supports formats like: "Activity_10", "Task_20", "Step_30", "10", "Step 10", etc.
32235
+ */
32236
+ extractStepNumber(elementId, elementName) {
32237
+ // Try to extract from ID first (e.g., "Activity_10", "Task_20")
32238
+ const idMatch = elementId.match(/(\d+)$/);
32239
+ if (idMatch) {
32240
+ return parseInt(idMatch[1], 10);
32241
+ }
32242
+ // Try to extract from name (e.g., "Step 10", "10 - Description", "Agenti (10)")
32243
+ const nameMatch = elementName.match(/\b(\d+)\b/);
32244
+ if (nameMatch) {
32245
+ return parseInt(nameMatch[1], 10);
32246
+ }
32247
+ return null;
32248
+ }
32249
+ /**
32250
+ * Update step colors dynamically (call this when step status changes)
32251
+ */
32252
+ updateStepColors(completedSteps, currentStep) {
32253
+ this.completedSteps = completedSteps;
32254
+ this.currentStep = currentStep;
32255
+ this.applyStepColors();
32256
+ }
32257
+ /**
32258
+ * Apply transition information (user and date) on completed connections
32259
+ */
32260
+ applyTransitionInfo() {
32261
+ if (!this.modeler || !this.overlays)
32262
+ return;
32263
+ const canvas = this.modeler.get('canvas');
32264
+ const elementRegistry = this.modeler.get('elementRegistry');
32265
+ // Get all connection/sequence flow elements
32266
+ const allElements = elementRegistry.getAll();
32267
+ const connections = allElements.filter((el) => el.type === 'bpmn:SequenceFlow');
32268
+ // For each completed transition, find corresponding connection and add overlay
32269
+ this.transitionData.forEach((transition) => {
32270
+ // Find connection that links fromStep to toStep
32271
+ const connection = this.findConnectionForTransition(connections, transition.fromStep, transition.toStep);
32272
+ if (connection) {
32273
+ // Highlight the connection
32274
+ canvas.addMarker(connection.id, 'highlight-completed-connection');
32275
+ // Create overlay with user and date info
32276
+ const overlayHtml = `
32277
+ <div class="transition-info-overlay">
32278
+ <span class="user">${this.escapeHtml(transition.user)}</span>
32279
+ <span class="date">${this.escapeHtml(transition.date)}</span>
32280
+ </div>
32281
+ `;
32282
+ try {
32283
+ this.overlays.add(connection.id, {
32284
+ position: {
32285
+ top: -10,
32286
+ left: 0
32287
+ },
32288
+ html: overlayHtml
32289
+ });
32290
+ }
32291
+ catch (err) {
32292
+ console.warn('Could not add overlay to connection:', connection.id, err);
32293
+ }
32294
+ }
32295
+ });
32296
+ }
32297
+ /**
32298
+ * Find BPMN connection (sequence flow) that links two steps
32299
+ */
32300
+ findConnectionForTransition(connections, fromStep, toStep) {
32301
+ for (const conn of connections) {
32302
+ if (!conn.source || !conn.target)
32303
+ continue;
32304
+ // Extract step numbers from source and target elements
32305
+ const sourceStep = this.extractStepNumber(conn.source.id, conn.source.businessObject?.name || '');
32306
+ const targetStep = this.extractStepNumber(conn.target.id, conn.target.businessObject?.name || '');
32307
+ // Check if this connection matches the transition
32308
+ if (sourceStep === fromStep && targetStep === toStep) {
32309
+ return conn;
32310
+ }
32311
+ }
32312
+ return null;
32313
+ }
32314
+ /**
32315
+ * Escape HTML to prevent XSS
32316
+ */
32317
+ escapeHtml(text) {
32318
+ const div = document.createElement('div');
32319
+ div.textContent = text;
32320
+ return div.innerHTML;
32321
+ }
32322
+ /**
32323
+ * Update transition data dynamically
32324
+ */
32325
+ updateTransitionData(transitionData) {
32326
+ this.transitionData = transitionData;
32327
+ // Clear existing overlays
32328
+ if (this.overlays) {
32329
+ this.overlays.clear();
32330
+ }
32331
+ this.applyTransitionInfo();
32332
+ }
32333
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BpmnEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32334
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: BpmnEditorComponent, isStandalone: true, selector: "fh-bpmn-editor", inputs: { initialXml: "initialXml", completedSteps: "completedSteps", currentStep: "currentStep", transitionData: "transitionData" }, outputs: { diagramChanged: "diagramChanged", elementSelected: "elementSelected" }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, static: true }], ngImport: i0, template: `
32335
+ <div class="bpmn-container">
32336
+ <div class="bpmn-canvas" #canvas></div>
32337
+ </div>
32338
+ `, isInline: true, styles: [".bpmn-container{height:100%;width:100%;position:relative;background:#f8f9fa}.bpmn-canvas{height:100%;width:100%;background:#fff;border:1px solid #e0e0e0}:host ::ng-deep .highlight-completed .djs-visual>:nth-child(1){fill:#4caf50!important;stroke:#2e7d32!important;fill-opacity:.3!important}:host ::ng-deep .highlight-current .djs-visual>:nth-child(1){fill:#ff9800!important;stroke:#e65100!important;fill-opacity:.4!important}:host ::ng-deep .transition-info-overlay{background:#4caf50f2;color:#fff;padding:4px 8px;border-radius:4px;font-size:11px;white-space:nowrap;box-shadow:0 2px 4px #0003;pointer-events:none;line-height:1.3}:host ::ng-deep .transition-info-overlay .user{font-weight:600;display:block}:host ::ng-deep .transition-info-overlay .date{font-size:10px;opacity:.9;display:block}:host ::ng-deep .highlight-completed-connection .djs-visual>:nth-child(1){stroke:#4caf50!important;stroke-width:2!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
32339
+ }
32340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BpmnEditorComponent, decorators: [{
32341
+ type: Component,
32342
+ args: [{ selector: 'fh-bpmn-editor', standalone: true, imports: [CommonModule], template: `
32343
+ <div class="bpmn-container">
32344
+ <div class="bpmn-canvas" #canvas></div>
32345
+ </div>
32346
+ `, styles: [".bpmn-container{height:100%;width:100%;position:relative;background:#f8f9fa}.bpmn-canvas{height:100%;width:100%;background:#fff;border:1px solid #e0e0e0}:host ::ng-deep .highlight-completed .djs-visual>:nth-child(1){fill:#4caf50!important;stroke:#2e7d32!important;fill-opacity:.3!important}:host ::ng-deep .highlight-current .djs-visual>:nth-child(1){fill:#ff9800!important;stroke:#e65100!important;fill-opacity:.4!important}:host ::ng-deep .transition-info-overlay{background:#4caf50f2;color:#fff;padding:4px 8px;border-radius:4px;font-size:11px;white-space:nowrap;box-shadow:0 2px 4px #0003;pointer-events:none;line-height:1.3}:host ::ng-deep .transition-info-overlay .user{font-weight:600;display:block}:host ::ng-deep .transition-info-overlay .date{font-size:10px;opacity:.9;display:block}:host ::ng-deep .highlight-completed-connection .djs-visual>:nth-child(1){stroke:#4caf50!important;stroke-width:2!important}\n"] }]
32347
+ }], propDecorators: { canvasRef: [{
32348
+ type: ViewChild,
32349
+ args: ['canvas', { static: true }]
32350
+ }], initialXml: [{
32351
+ type: Input
32352
+ }], completedSteps: [{
32353
+ type: Input
32354
+ }], currentStep: [{
32355
+ type: Input
32356
+ }], transitionData: [{
32357
+ type: Input
32358
+ }], diagramChanged: [{
32359
+ type: Output
32360
+ }], elementSelected: [{
32361
+ type: Output
32362
+ }] } });
32363
+
32081
32364
  class win_log_v2 {
32082
32365
  dialogRef;
32083
32366
  m_dialogRef;
@@ -32093,7 +32376,10 @@ class win_log_v2 {
32093
32376
  not_comm = false;
32094
32377
  not_comm_disabled = false;
32095
32378
  op = '';
32096
- url_sel = null;
32379
+ diagramma_flusso = '';
32380
+ completedSteps = [];
32381
+ currentStep = 0;
32382
+ transitionData = [];
32097
32383
  ric_all() {
32098
32384
  this.refresh_list();
32099
32385
  }
@@ -32107,18 +32393,148 @@ class win_log_v2 {
32107
32393
  }
32108
32394
  }
32109
32395
  zz;
32396
+ bpmnViewer;
32110
32397
  b_flussook = true;
32111
32398
  load_graph() {
32112
- this.url_sel =
32113
- this.m_appService.COMPANY_SITE_ROOT +
32114
- '/gantt_manager/#/show_gantt/' +
32115
- this.m_appService.getState().wkf_doc_info.uiid_app +
32116
- '/' +
32117
- this.m_appService.getState().wkf_doc_info.uiid_doc +
32118
- '/' +
32119
- this.m_appService.COMPANY_KEY +
32120
- '/' +
32121
- this.m_appService.API_ENDPOINT.split('/').join('_');
32399
+ // Load BPMN diagram from database
32400
+ const p = new QParam();
32401
+ p.sql = 'SELECT_WKF_BY_ID';
32402
+ p.types = ['string'];
32403
+ p.values = [this.m_appService.getState().wkf_doc_info.uiid_app];
32404
+ this._dataService.doQuery(p).subscribe({
32405
+ next: (response) => {
32406
+ if (response && response.result_msg === 'OK' && response.result_data) {
32407
+ if (response.result_data.length > 0) {
32408
+ const diagram = response.result_data[0].diagramma_flusso;
32409
+ if (diagram && diagram.trim() !== '') {
32410
+ this.diagramma_flusso = diagram;
32411
+ }
32412
+ }
32413
+ }
32414
+ // Load workflow step status
32415
+ this.loadWorkflowStepStatus();
32416
+ },
32417
+ error: (error) => {
32418
+ console.error('Error loading workflow diagram:', error);
32419
+ }
32420
+ });
32421
+ }
32422
+ loadWorkflowStepStatus() {
32423
+ // Get current workflow document info
32424
+ const p = new QParam();
32425
+ p.sql = 'SELECT_DOCUMENTS_BY_UIID';
32426
+ p.types = ['string', 'string'];
32427
+ p.values = [
32428
+ this.m_appService.getState().wkf_doc_info.uiid_app,
32429
+ this.m_appService.getState().wkf_doc_info.uiid_doc,
32430
+ ];
32431
+ this._dataService.doQuery(p).subscribe({
32432
+ next: (response) => {
32433
+ if (response && response.result_msg === 'OK' && response.result_data) {
32434
+ if (response.result_data.length > 0) {
32435
+ const doc = response.result_data[0];
32436
+ this.currentStep = doc.stato;
32437
+ // Calculate completed steps from logs
32438
+ this.calculateCompletedStepsFromLogs();
32439
+ }
32440
+ }
32441
+ },
32442
+ error: (error) => {
32443
+ console.error('Error loading workflow status:', error);
32444
+ }
32445
+ });
32446
+ }
32447
+ calculateCompletedStepsFromLogs() {
32448
+ // Extract unique step numbers from logs (operazione field may contain step info)
32449
+ // Common step numbers: 10, 20, 30, 40, 50, etc. (900+ are final states)
32450
+ const stepNumbers = new Set();
32451
+ const transitions = [];
32452
+ // Parse logs to find step transitions
32453
+ let previousStep = null;
32454
+ this.logs.forEach((log) => {
32455
+ // Check if this is a workflow transition log
32456
+ // Usually identified by operazione containing step information
32457
+ const operazione = log.operazione || '';
32458
+ // Try to extract "from step X to step Y" pattern
32459
+ // Common patterns: "10 → 20", "Step 10 to 20", "Passaggio da 10 a 20"
32460
+ const transitionMatch = operazione.match(/(\d+)\s*(?:→|->|to|a)\s*(\d+)/i);
32461
+ if (transitionMatch) {
32462
+ const fromStep = parseInt(transitionMatch[1], 10);
32463
+ const toStep = parseInt(transitionMatch[2], 10);
32464
+ if (fromStep >= 10 && fromStep < 900 && toStep >= 10) {
32465
+ stepNumbers.add(fromStep);
32466
+ if (toStep < 900) {
32467
+ stepNumbers.add(toStep);
32468
+ }
32469
+ // Add transition data
32470
+ transitions.push({
32471
+ fromStep: fromStep,
32472
+ toStep: toStep,
32473
+ user: log.nc || log.username || 'Sistema',
32474
+ date: this.formatDate(log.data_creazione)
32475
+ });
32476
+ previousStep = toStep;
32477
+ }
32478
+ }
32479
+ else {
32480
+ // Try to extract single step number
32481
+ const matches = operazione.match(/\b(\d+)\b/g);
32482
+ if (matches) {
32483
+ matches.forEach((match) => {
32484
+ const stepNum = parseInt(match, 10);
32485
+ if (stepNum >= 10 && stepNum < 900) {
32486
+ stepNumbers.add(stepNum);
32487
+ // If we have a previous step, create transition
32488
+ if (previousStep !== null && previousStep !== stepNum) {
32489
+ transitions.push({
32490
+ fromStep: previousStep,
32491
+ toStep: stepNum,
32492
+ user: log.nc || log.username || 'Sistema',
32493
+ date: this.formatDate(log.data_creazione)
32494
+ });
32495
+ }
32496
+ previousStep = stepNum;
32497
+ }
32498
+ });
32499
+ }
32500
+ }
32501
+ });
32502
+ // Add all steps less than current step (assumption: sequential workflow)
32503
+ // Common step increments: 10, 20, 30, 40, 50...
32504
+ for (let step = 10; step < this.currentStep && step < 900; step += 10) {
32505
+ stepNumbers.add(step);
32506
+ }
32507
+ this.completedSteps = Array.from(stepNumbers).sort((a, b) => a - b);
32508
+ this.transitionData = transitions;
32509
+ }
32510
+ formatDate(dateStr) {
32511
+ if (!dateStr)
32512
+ return '';
32513
+ try {
32514
+ const date = new Date(dateStr);
32515
+ const day = String(date.getDate()).padStart(2, '0');
32516
+ const month = String(date.getMonth() + 1).padStart(2, '0');
32517
+ const year = date.getFullYear();
32518
+ const hours = String(date.getHours()).padStart(2, '0');
32519
+ const minutes = String(date.getMinutes()).padStart(2, '0');
32520
+ return `${day}/${month}/${year} ${hours}:${minutes}`;
32521
+ }
32522
+ catch (e) {
32523
+ return dateStr;
32524
+ }
32525
+ }
32526
+ // Zoom control methods
32527
+ zoomIn() {
32528
+ this.bpmnViewer?.zoomIn();
32529
+ }
32530
+ zoomOut() {
32531
+ this.bpmnViewer?.zoomOut();
32532
+ }
32533
+ zoomFit() {
32534
+ this.bpmnViewer?.zoomFit();
32535
+ }
32536
+ zoomReset() {
32537
+ this.bpmnViewer?.zoomReset();
32122
32538
  }
32123
32539
  logs = new Array();
32124
32540
  notifica_commenti = 1;
@@ -32395,7 +32811,7 @@ class win_log_v2 {
32395
32811
  }
32396
32812
  }
32397
32813
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: win_log_v2, deps: [{ token: i1$2.MatDialogRef }, { token: i1$2.MatDialog }, { token: AppService }, { token: i3.ToastrService }, { token: QueryService }, { token: WkfService }, { token: FileService }, { token: i3$2.TranslateService }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
32398
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: win_log_v2, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "zz", first: true, predicate: ["zz"], descendants: true }], ngImport: i0, template: `
32814
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: win_log_v2, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "zz", first: true, predicate: ["zz"], descendants: true }, { propertyName: "bpmnViewer", first: true, predicate: ["bpmnViewer"], descendants: true }], ngImport: i0, template: `
32399
32815
  <div fxLayout="column">
32400
32816
  <div fxLayout="row" class="dialog_header">
32401
32817
  <div fxLayout="row" fxLayoutAlign="start center" style="width:90%">
@@ -32413,13 +32829,33 @@ class win_log_v2 {
32413
32829
  <div [style.height]="m_appService.getState().body_h - 130 + 'px'">
32414
32830
  <mat-tab-group #zz style="width:100%">
32415
32831
  <mat-tab label="WORKFLOW" *ngIf="b_flussook">
32416
- <div [style.height]="m_appService.getState().body_h - 170 + 'px'">
32417
- <iframe
32418
- #iframe
32419
- *ngIf="url_sel"
32420
- [src]="url_sel | safe : 'resourceUrl'"
32421
- style="width:98%;height: 98%"
32422
- ></iframe>
32832
+ <div [style.height]="m_appService.getState().body_h - 170 + 'px'" style="width:100%;position:relative">
32833
+ <fh-bpmn-editor
32834
+ #bpmnViewer
32835
+ *ngIf="diagramma_flusso"
32836
+ [initialXml]="diagramma_flusso"
32837
+ [completedSteps]="completedSteps"
32838
+ [currentStep]="currentStep"
32839
+ [transitionData]="transitionData"
32840
+ ></fh-bpmn-editor>
32841
+ <div *ngIf="!diagramma_flusso" style="display:flex;align-items:center;justify-content:center;height:100%">
32842
+ <p>Nessun diagramma disponibile</p>
32843
+ </div>
32844
+ <!-- Zoom controls -->
32845
+ <div *ngIf="diagramma_flusso" style="position:absolute;top:10px;right:10px;background:#5664d2;border-radius:4px;padding:8px;display:flex;gap:8px;box-shadow:0 2px 8px rgba(0,0,0,0.2)">
32846
+ <button mat-icon-button (click)="zoomIn()" style="color:white" title="Zoom In">
32847
+ <mat-icon>zoom_in</mat-icon>
32848
+ </button>
32849
+ <button mat-icon-button (click)="zoomOut()" style="color:white" title="Zoom Out">
32850
+ <mat-icon>zoom_out</mat-icon>
32851
+ </button>
32852
+ <button mat-icon-button (click)="zoomFit()" style="color:white" title="Adatta alla finestra">
32853
+ <mat-icon>fit_screen</mat-icon>
32854
+ </button>
32855
+ <button mat-icon-button (click)="zoomReset()" style="color:white" title="Reset Zoom">
32856
+ <mat-icon>center_focus_strong</mat-icon>
32857
+ </button>
32858
+ </div>
32423
32859
  </div>
32424
32860
  </mat-tab>
32425
32861
 
@@ -32526,7 +32962,7 @@ class win_log_v2 {
32526
32962
  </mat-tab-group>
32527
32963
  </div>
32528
32964
  </div>
32529
- `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.DatePipe, name: "date" }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i5$2.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i5$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "component", type: FHTextAreaComponent, selector: "FHTextArea", inputs: ["hidden", "label", "enabled", "required", "rows", "error"], outputs: ["change", "focusout", "focusin"] }, { kind: "ngmodule", type: MatFormFieldModule }] });
32965
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8$2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.DatePipe, name: "date" }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i5$2.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i5$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: FHTextAreaComponent, selector: "FHTextArea", inputs: ["hidden", "label", "enabled", "required", "rows", "error"], outputs: ["change", "focusout", "focusin"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: BpmnEditorComponent, selector: "fh-bpmn-editor", inputs: ["initialXml", "completedSteps", "currentStep", "transitionData"], outputs: ["diagramChanged", "elementSelected"] }] });
32530
32966
  }
32531
32967
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: win_log_v2, decorators: [{
32532
32968
  type: Component,
@@ -32540,10 +32976,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
32540
32976
  CommonModule,
32541
32977
  MatDialogModule,
32542
32978
  MatTabsModule,
32543
- SafePipe,
32544
- MatIconModule,
32545
32979
  FHTextAreaComponent,
32546
- MatFormFieldModule
32980
+ MatFormFieldModule,
32981
+ BpmnEditorComponent
32547
32982
  ], template: `
32548
32983
  <div fxLayout="column">
32549
32984
  <div fxLayout="row" class="dialog_header">
@@ -32562,13 +32997,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
32562
32997
  <div [style.height]="m_appService.getState().body_h - 130 + 'px'">
32563
32998
  <mat-tab-group #zz style="width:100%">
32564
32999
  <mat-tab label="WORKFLOW" *ngIf="b_flussook">
32565
- <div [style.height]="m_appService.getState().body_h - 170 + 'px'">
32566
- <iframe
32567
- #iframe
32568
- *ngIf="url_sel"
32569
- [src]="url_sel | safe : 'resourceUrl'"
32570
- style="width:98%;height: 98%"
32571
- ></iframe>
33000
+ <div [style.height]="m_appService.getState().body_h - 170 + 'px'" style="width:100%;position:relative">
33001
+ <fh-bpmn-editor
33002
+ #bpmnViewer
33003
+ *ngIf="diagramma_flusso"
33004
+ [initialXml]="diagramma_flusso"
33005
+ [completedSteps]="completedSteps"
33006
+ [currentStep]="currentStep"
33007
+ [transitionData]="transitionData"
33008
+ ></fh-bpmn-editor>
33009
+ <div *ngIf="!diagramma_flusso" style="display:flex;align-items:center;justify-content:center;height:100%">
33010
+ <p>Nessun diagramma disponibile</p>
33011
+ </div>
33012
+ <!-- Zoom controls -->
33013
+ <div *ngIf="diagramma_flusso" style="position:absolute;top:10px;right:10px;background:#5664d2;border-radius:4px;padding:8px;display:flex;gap:8px;box-shadow:0 2px 8px rgba(0,0,0,0.2)">
33014
+ <button mat-icon-button (click)="zoomIn()" style="color:white" title="Zoom In">
33015
+ <mat-icon>zoom_in</mat-icon>
33016
+ </button>
33017
+ <button mat-icon-button (click)="zoomOut()" style="color:white" title="Zoom Out">
33018
+ <mat-icon>zoom_out</mat-icon>
33019
+ </button>
33020
+ <button mat-icon-button (click)="zoomFit()" style="color:white" title="Adatta alla finestra">
33021
+ <mat-icon>fit_screen</mat-icon>
33022
+ </button>
33023
+ <button mat-icon-button (click)="zoomReset()" style="color:white" title="Reset Zoom">
33024
+ <mat-icon>center_focus_strong</mat-icon>
33025
+ </button>
33026
+ </div>
32572
33027
  </div>
32573
33028
  </mat-tab>
32574
33029
 
@@ -32682,6 +33137,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
32682
33137
  }] }], propDecorators: { zz: [{
32683
33138
  type: ViewChild,
32684
33139
  args: ['zz']
33140
+ }], bpmnViewer: [{
33141
+ type: ViewChild,
33142
+ args: ['bpmnViewer']
32685
33143
  }] } });
32686
33144
 
32687
33145
  class FHWinSalvaAnnulla {
@@ -36423,5 +36881,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
36423
36881
  * Generated bundle index. Do not edit.
36424
36882
  */
36425
36883
 
36426
- export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, FHAutoCompleteComponent, FHCheckBoxComponent, FHColorPickerComponent, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFilterComboboxComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHImageViewerComponent, FHListComponent, FHLogPanelComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHPickUsersComponent, FHRichTextComponent, FHRoleManagerComponent, FHTableManagerComponent, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHToolbarCommandType, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHWinAppLogsComponent, FHWinAskBigTextComponent, FHWinAskButtonsComponent, FHWinAskNumberComponent, FHWinAskRichTextComponent, FHWinAskTextComponent, FHWinAutoComplete, FHWinComboComponent, FHWinConfirmComponent, FHWinErrorComponent, FHWinGridSelection, FHWinInfoComponent, FHWinListComponent, FHWinMappaComponent, FHWinOutputComponent, FHWinPicklistComponent, FHWinSalvaAnnulla, FHWinSelectByGridComponent, FHWinShowEmail, FHWinShowEmailS3, FHWinShowImage, FHWinShowLog, FHWinShowLogDett, FHWinTimeSlider, FHWinUploadComponent, FHWinUserInfo, FHWinUserPickerComponent, FHWinWaitComponent, FHWorkflowForm, FHWorkflowHeaderBar, FHWorkflowView, FSInput, FSResult, FileService, GridService, LocalDBService, MonthYearPickerComponent, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryOpenService, QueryService, RegistrationService, ReplaceLineBreaks, SafePipe, TextAreaEditorComponent, UtilityService, WkfService, YearPickerComponent, createButtonCommand, createCheckboxCommand, createSpacerCommand, createTableManagerCommand };
36884
+ export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, BpmnEditorComponent, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, FHAutoCompleteComponent, FHCheckBoxComponent, FHColorPickerComponent, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFilterComboboxComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHImageViewerComponent, FHListComponent, FHLogPanelComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHPickUsersComponent, FHRichTextComponent, FHRoleManagerComponent, FHTableManagerComponent, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHToolbarCommandType, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHWinAppLogsComponent, FHWinAskBigTextComponent, FHWinAskButtonsComponent, FHWinAskNumberComponent, FHWinAskRichTextComponent, FHWinAskTextComponent, FHWinAutoComplete, FHWinComboComponent, FHWinConfirmComponent, FHWinErrorComponent, FHWinGridSelection, FHWinInfoComponent, FHWinListComponent, FHWinMappaComponent, FHWinOutputComponent, FHWinPicklistComponent, FHWinSalvaAnnulla, FHWinSelectByGridComponent, FHWinShowEmail, FHWinShowEmailS3, FHWinShowImage, FHWinShowLog, FHWinShowLogDett, FHWinTimeSlider, FHWinUploadComponent, FHWinUserInfo, FHWinUserPickerComponent, FHWinWaitComponent, FHWorkflowForm, FHWorkflowHeaderBar, FHWorkflowView, FSInput, FSResult, FileService, GridService, LocalDBService, MonthYearPickerComponent, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryOpenService, QueryService, RegistrationService, ReplaceLineBreaks, SafePipe, TextAreaEditorComponent, UtilityService, WkfService, YearPickerComponent, createButtonCommand, createCheckboxCommand, createSpacerCommand, createTableManagerCommand };
36427
36885
  //# sourceMappingURL=fluxhub-fluxhub-lib.mjs.map