@fluxhub/fluxhub-lib 19.0.117 → 19.0.118

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.
@@ -32234,16 +32234,22 @@ class BpmnEditorComponent {
32234
32234
  * Supports formats like: "Activity_10", "Task_20", "Step_30", "10", "Step 10", etc.
32235
32235
  */
32236
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);
32237
+ // Try to extract from name first (more reliable for this use case)
32238
+ // Pattern: "[10]", "[20]", etc. in brackets
32239
+ let nameMatch = elementName.match(/\[(\d+)\]/);
32240
+ if (nameMatch) {
32241
+ return parseInt(nameMatch[1], 10);
32241
32242
  }
32242
- // Try to extract from name (e.g., "Step 10", "10 - Description", "Agenti (10)")
32243
- const nameMatch = elementName.match(/\b(\d+)\b/);
32243
+ // Try other patterns in name
32244
+ nameMatch = elementName.match(/\b(\d+)\b/);
32244
32245
  if (nameMatch) {
32245
32246
  return parseInt(nameMatch[1], 10);
32246
32247
  }
32248
+ // Finally try to extract from ID (e.g., "Activity_10", "Task_20")
32249
+ const idMatch = elementId.match(/(\d+)$/);
32250
+ if (idMatch) {
32251
+ return parseInt(idMatch[1], 10);
32252
+ }
32247
32253
  return null;
32248
32254
  }
32249
32255
  /**
@@ -32280,11 +32286,11 @@ class BpmnEditorComponent {
32280
32286
  </div>
32281
32287
  `;
32282
32288
  try {
32283
- // Position overlay more to the right on the connection
32289
+ // Position overlay below and to the left of the connection
32284
32290
  this.overlays.add(connection.id, {
32285
32291
  position: {
32286
- top: -30,
32287
- right: -80 // Spostato più a destra
32292
+ bottom: 5, // Più vicino alla freccia (in basso)
32293
+ left: -20 // Più vicino alla freccia (a sinistra)
32288
32294
  },
32289
32295
  html: overlayHtml
32290
32296
  });