@fluxhub/fluxhub-lib 19.0.117 → 19.0.120

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.
@@ -32218,14 +32218,15 @@ class BpmnEditorComponent {
32218
32218
  // Try to extract step number from element ID or name
32219
32219
  const stepNumber = this.extractStepNumber(elementId, elementName);
32220
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) {
32221
+ // IMPORTANT: Check current step FIRST to ensure it gets orange color
32222
+ // even if it's also in completedSteps array
32223
+ if (this.currentStep === stepNumber) {
32227
32224
  canvas.addMarker(elementId, 'highlight-current');
32228
32225
  }
32226
+ // Then check if this step is completed (apply green)
32227
+ else if (this.completedSteps.includes(stepNumber)) {
32228
+ canvas.addMarker(elementId, 'highlight-completed');
32229
+ }
32229
32230
  }
32230
32231
  });
32231
32232
  }
@@ -32234,16 +32235,22 @@ class BpmnEditorComponent {
32234
32235
  * Supports formats like: "Activity_10", "Task_20", "Step_30", "10", "Step 10", etc.
32235
32236
  */
32236
32237
  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);
32238
+ // Try to extract from name first (more reliable for this use case)
32239
+ // Pattern: "[10]", "[20]", etc. in brackets
32240
+ let nameMatch = elementName.match(/\[(\d+)\]/);
32241
+ if (nameMatch) {
32242
+ return parseInt(nameMatch[1], 10);
32241
32243
  }
32242
- // Try to extract from name (e.g., "Step 10", "10 - Description", "Agenti (10)")
32243
- const nameMatch = elementName.match(/\b(\d+)\b/);
32244
+ // Try other patterns in name
32245
+ nameMatch = elementName.match(/\b(\d+)\b/);
32244
32246
  if (nameMatch) {
32245
32247
  return parseInt(nameMatch[1], 10);
32246
32248
  }
32249
+ // Finally try to extract from ID (e.g., "Activity_10", "Task_20")
32250
+ const idMatch = elementId.match(/(\d+)$/);
32251
+ if (idMatch) {
32252
+ return parseInt(idMatch[1], 10);
32253
+ }
32247
32254
  return null;
32248
32255
  }
32249
32256
  /**
@@ -32280,11 +32287,11 @@ class BpmnEditorComponent {
32280
32287
  </div>
32281
32288
  `;
32282
32289
  try {
32283
- // Position overlay more to the right on the connection
32290
+ // Position overlay below and to the left of the connection
32284
32291
  this.overlays.add(connection.id, {
32285
32292
  position: {
32286
- top: -30,
32287
- right: -80 // Spostato più a destra
32293
+ bottom: 5, // Più vicino alla freccia (in basso)
32294
+ left: -20 // Più vicino alla freccia (a sinistra)
32288
32295
  },
32289
32296
  html: overlayHtml
32290
32297
  });