@unvired/turboforms-embed-sdk 2.0.72 → 2.0.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.
@@ -39401,6 +39401,9 @@ window.executeProgressCalculation = function (privateExternal, permission) {
39401
39401
  case "signature":
39402
39402
  return !!value;
39403
39403
  default:
39404
+ if (comp.multiple) {
39405
+ return Array.isArray(value) && value.length > 0 && value.some(v => v !== undefined && v !== null && v !== "");
39406
+ }
39404
39407
  return value !== undefined && value !== null && value !== "";
39405
39408
  }
39406
39409
  }
@@ -39435,15 +39438,22 @@ window.executeProgressCalculation = function (privateExternal, permission) {
39435
39438
  mandatory = activeMandatoryFields.length;
39436
39439
  filledMandatory = 0;
39437
39440
 
39441
+ console.log("[ProgressCalc Debug] --- Starting Progress Calculation ---");
39442
+ console.log("[ProgressCalc Debug] formObj.data:", JSON.stringify(data));
39443
+ console.log("[ProgressCalc Debug] Total mandatory fields in cache:", mandatoryFields.length);
39444
+ console.log("[ProgressCalc Debug] Active (visible) mandatory fields count:", activeMandatoryFields.length);
39445
+
39438
39446
  activeMandatoryFields.forEach(({ key, type, path, comp }) => {
39439
39447
  let value = getValueFromData(data, path);
39440
39448
  const filled = isFilled(comp, value);
39449
+ console.log(`[ProgressCalc Debug] Field [${key}] | Type: [${type}] | Path: [${path}] | Value:`, JSON.stringify(value), `| Filled: ${filled}`);
39441
39450
  if (filled) filledMandatory++;
39442
39451
  });
39443
39452
 
39444
-
39445
39453
  const completion =
39446
39454
  mandatory === 0 ? 100 : Math.round((filledMandatory / mandatory) * 100);
39455
+ console.log(`[ProgressCalc Debug] Summary -> filledMandatory: ${filledMandatory} / ${mandatory} | completion: ${completion}%`);
39456
+ console.log("[ProgressCalc Debug] --- Ending Progress Calculation ---");
39447
39457
  logger.info("[TF_SDK:322] ✅ Progress:", { mandatory, filledMandatory, completion: completion + "%" });
39448
39458
  calculationPercentage = completion; // Update global
39449
39459
  completeFlag = completion >= 100; // Update global
@@ -41747,7 +41757,7 @@ initThemeHook();
41747
41757
  </div>
41748
41758
 
41749
41759
  <div id="sticky-footer">
41750
- <div class="build-version">SDK v2.0.72</div>
41760
+ <div class="build-version">SDK v2.0.73</div>
41751
41761
 
41752
41762
  <button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
41753
41763
  <i class="bi bi-chevron-left"></i> Previous