@unvired/turboforms-embed-sdk 2.0.71 → 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.
- package/dist/turboforms.esm.js +3 -3
- package/dist/turboforms.html +16 -4
- package/dist/turboforms.js +3 -3
- package/package.json +1 -1
package/dist/turboforms.html
CHANGED
|
@@ -30260,7 +30260,9 @@ class SmartFileComponent extends FieldComponent {
|
|
|
30260
30260
|
while (n--) {
|
|
30261
30261
|
u8arr[n] = bstr.charCodeAt(n);
|
|
30262
30262
|
}
|
|
30263
|
-
|
|
30263
|
+
const blob = new Blob([u8arr], { type: contentType });
|
|
30264
|
+
blob.name = filename;
|
|
30265
|
+
return blob;
|
|
30264
30266
|
};
|
|
30265
30267
|
const file = base64ToFile(
|
|
30266
30268
|
event.detail.imageData,
|
|
@@ -30524,7 +30526,7 @@ class SmartFileComponent extends FieldComponent {
|
|
|
30524
30526
|
|
|
30525
30527
|
getInitFileToSync(file) {
|
|
30526
30528
|
const escapedFileName = file.name
|
|
30527
|
-
? file.name.
|
|
30529
|
+
? file.name.replace(/</g, '<').replace(/>/g, '>')
|
|
30528
30530
|
: file.name;
|
|
30529
30531
|
return {
|
|
30530
30532
|
id: createRandomString(),
|
|
@@ -39399,6 +39401,9 @@ window.executeProgressCalculation = function (privateExternal, permission) {
|
|
|
39399
39401
|
case "signature":
|
|
39400
39402
|
return !!value;
|
|
39401
39403
|
default:
|
|
39404
|
+
if (comp.multiple) {
|
|
39405
|
+
return Array.isArray(value) && value.length > 0 && value.some(v => v !== undefined && v !== null && v !== "");
|
|
39406
|
+
}
|
|
39402
39407
|
return value !== undefined && value !== null && value !== "";
|
|
39403
39408
|
}
|
|
39404
39409
|
}
|
|
@@ -39433,15 +39438,22 @@ window.executeProgressCalculation = function (privateExternal, permission) {
|
|
|
39433
39438
|
mandatory = activeMandatoryFields.length;
|
|
39434
39439
|
filledMandatory = 0;
|
|
39435
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
|
+
|
|
39436
39446
|
activeMandatoryFields.forEach(({ key, type, path, comp }) => {
|
|
39437
39447
|
let value = getValueFromData(data, path);
|
|
39438
39448
|
const filled = isFilled(comp, value);
|
|
39449
|
+
console.log(`[ProgressCalc Debug] Field [${key}] | Type: [${type}] | Path: [${path}] | Value:`, JSON.stringify(value), `| Filled: ${filled}`);
|
|
39439
39450
|
if (filled) filledMandatory++;
|
|
39440
39451
|
});
|
|
39441
39452
|
|
|
39442
|
-
|
|
39443
39453
|
const completion =
|
|
39444
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 ---");
|
|
39445
39457
|
logger.info("[TF_SDK:322] ✅ Progress:", { mandatory, filledMandatory, completion: completion + "%" });
|
|
39446
39458
|
calculationPercentage = completion; // Update global
|
|
39447
39459
|
completeFlag = completion >= 100; // Update global
|
|
@@ -41745,7 +41757,7 @@ initThemeHook();
|
|
|
41745
41757
|
</div>
|
|
41746
41758
|
|
|
41747
41759
|
<div id="sticky-footer">
|
|
41748
|
-
<div class="build-version">SDK v2.0.
|
|
41760
|
+
<div class="build-version">SDK v2.0.73</div>
|
|
41749
41761
|
|
|
41750
41762
|
<button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
|
|
41751
41763
|
<i class="bi bi-chevron-left"></i> Previous
|