@unvired/turboforms-embed-sdk 2.0.52 → 2.0.53

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.
@@ -205,7 +205,7 @@ var ke=Object.create;var ie=Object.defineProperty;var Ee=Object.getOwnPropertyDe
205
205
  </div>
206
206
  ${(W=e.themeData)!=null&&W.isCard?"</div>":""}
207
207
  <div id="sticky-footer" class="${e.showFooter===!1?"footer-hidden":""}">
208
- <div class="build-version">SDK v2.0.52</div>
208
+ <div class="build-version">SDK v2.0.53</div>
209
209
 
210
210
  <button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
211
211
  <i class="bi bi-chevron-left"></i> Previous
@@ -268,4 +268,4 @@ var ke=Object.create;var ie=Object.defineProperty;var Ee=Object.getOwnPropertyDe
268
268
 
269
269
  // === SCRIPT_SEPARATOR ===
270
270
 
271
- `);if(!window.__unviredSdkScriptsLoaded&&!window.__unviredSdkScriptsLoading){window.__unviredSdkScriptsLoading=!0,l.info("[TF_SDK:14] \u2705 Loading SDK scripts (jQuery, Formio, Recogito, LESS, components)...");let p=d=>{if(b){let C=b.querySelector(".sdk-loader-text");C&&(C.textContent=d)}};if(p("Loading Core Components..."),c[0]&&c[0].trim()){let d=document.createElement("script");d.textContent=c[0],d.setAttribute("data-unvired-script","jquery"),document.head.appendChild(d)}if(c[4]&&c[4].trim()){let d=document.createElement("script");d.textContent=c[4],d.setAttribute("data-unvired-script","choices"),document.head.appendChild(d)}if(p("Loading Formio Library..."),c[5]&&c[5].trim()){let d=document.createElement("script");d.textContent=c[5],d.setAttribute("data-unvired-script","formio"),document.head.appendChild(d),l.info("[TF_SDK:15] \u2705 Bundled Formio library injected.")}if(e.showComments){p("Loading Annotation Tools...");for(let d=1;d<=2;d++)if(c[d]&&c[d].trim()){let C=document.createElement("script");C.textContent=c[d],C.setAttribute("data-unvired-script",`recogito-${d}`),document.head.appendChild(C),await new Promise(A=>setTimeout(A,0))}}else l.info("[TF_SDK:16] \u2705 Skipping Recogito (comments disabled, optimized load)");if(p("Initializing Engine..."),c[3]&&c[3].trim()){let d=document.createElement("script");d.textContent=c[3],d.setAttribute("data-unvired-script","less"),document.head.appendChild(d)}window.form=window.form||{},window.platform=window.platform||{},window.ResizeObserver=window.ResizeObserver||ResizeObserver,typeof browserMD5File!="undefined"&&(window.form.BMF=new browserMD5File),window.less=window.less||{},typeof window.__Html5QrcodeLibrary__!="undefined"&&(window.html5QrCode=window.__Html5QrcodeLibrary__),typeof window.Html5QrcodeScanner=="undefined"&&(window.Html5QrcodeScanner=class{constructor(){l.warn("[TF_SDK:17] \u26A0\uFE0F Barcode library (Html5QrcodeScanner) is not loaded.")}render(){}clear(){}}),p("Initializing Components...");for(let d=6;d<c.length;d++){let C=c[d];if(C&&C.trim()){let A=document.createElement("script");A.textContent=C,A.setAttribute("data-unvired-script",`script-${d}`),document.head.appendChild(A),d%5===0&&await new Promise(V=>setTimeout(V,0))}}window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1,l.info("[TF_SDK:18] \u2705 All SDK scripts injected successfully"),document.addEventListener("click",function(d){let C=document.getElementById("unvired-more-btn"),A=document.getElementById("moreTooltip");C&&A&&!C.contains(d.target)&&!A.contains(d.target)&&(A.style.display="none")})}else if(window.__unviredSdkScriptsLoading)window.__unviredSdkScriptsLoaded||(l.warn("[TF_SDK:19] \u26A0\uFE0F Scripts marked as loading but not yet loaded - waiting..."),window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1);else{if(l.info("[TF_SDK:20] \u2705 SDK scripts already loaded \u2014 skipping injection"),typeof window.Formio=="undefined"){let p="ErrorCode : 005, Formio library not available even though scripts were loaded.";throw l.error("[TF_SDK:21] \u274C ",p),b&&b.classList.add("hidden"),s({type:"ERROR",errorMessage:p,data:{technicalError:new Error(p),formioPath:"bundled",timestamp:new Date().toISOString()}}),new Error(p)}l.info("[TF_SDK:22] \u2705 Formio verified (previously loaded)")}window.FORM_TEMPLATE=m,window.FORM_PREVIOUS_DATA=n,window.FORM_MODE=e.mode,window.FORM_COMMENTS_DATA=e.commentsData,window.FORM_VOB_ARR=e.commentsVobArr,window.FORM_PLATFORM=e.platform,window.FORM_LANGUAGE=e.language,window.FORM_TRASLATIONS=e.translations,window.FORM_ENV=e.environmentVariable,window.FORM_THEME_DATA=e.themeData,window.FORM_USER_DATA=e.userData,window.FORM_USERS_LIST=e.usersList,window.FORM_CONTROL_DATA=e.controlData,window.FORM_PRIVATE_EXTERNAL=e.privateExternal,window.FORM_PERMISSION=e.permission,window.FORM_ATTACHMENT_FILE_KEYS=i,window.sendEventCallback=s,window.FORM_EVENTS={FORM_RENDER:"FORM_RENDER",SAVE:"FORM_SAVE",SUBMIT:"FORM_SUBMIT",SUBMIT_ERROR:"FORM_SUBMIT_ERROR",BACK_NAVIGATION:"FORM_BACK_NAVIGATION",ONCHANGE:"FORM_ONCHANGE",FORM_LOADED:"FORM_LOADED"};let v=r.querySelector("#form-back-btn"),E=r.querySelector("#unvired-more-btn");v&&(e.showBackButton?v.style.setProperty("display","flex","important"):v.style.setProperty("display","none","important")),E&&!e.showMoreButton&&E.style.setProperty("display","none","important"),window.__unviredFormsOptions=e,window.checkDocumentsVisibility(),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility(),e.platform==="web"?window.platform={isBrowser:!0,isAndroid:!1,iosPlatform:!1}:e.platform==="android"?window.platform={isBrowser:!1,isAndroid:!0,iosPlatform:!1}:e.platform==="ios"&&(window.platform={isBrowser:!1,isAndroid:!1,iosPlatform:!0});let O={};if(((oe=e.environmentVariable)==null?void 0:oe.length)>0)for(let p of e.environmentVariable)for(let d in p)O[d]=p[d];Object.keys(O).length>0&&(window.env=O);let S=r.querySelector("#sticky-header"),N=r.querySelector("#sticky-footer"),L=r.querySelector("#formio-wrapper"),H=r.querySelector("#comments-header");e.mode==="pdf"||e.mode==="print"?(r.classList.add(`${e.mode}-mode`),L&&L.classList.add(`${e.mode}-mode`),S&&(S.style.display="none"),N&&(N.style.display="none")):(S&&(S.style.display="flex"),N&&(N.style.display="flex")),H&&(H.style.display="none"),e.themeData&&Object.keys(e.themeData).length>0&&(window.FORM_THEME_DATA=e.themeData),e.language&&(window.FORMIO_LANGUAGE=e.language),e.translations&&(window.FORMIO_I18N=e.translations),e.userData&&(window.firstName=e.userData.firstName,window.lastName=e.userData.lastName,window.form=window.form||{},Object.assign(window.form,e.userData)),window.less=window.less||{},Object.assign(window.less,{async:!0,environment:"production",fileAsync:!1,onReady:!0,useFileCache:!0});let _=n;if(n&&(l.info("[TF_SDK:23] \u2705 Processing file IDs in submission data (fetching from IndexedDB)..."),_=await pe(n,s,i),l.info("[TF_SDK:24] \u2705 File IDs processed \u2014 handing off to form renderer")),b){let p=b.querySelector(".sdk-loader-text");p&&(p.textContent="Initializing Form...")}return typeof window.loadTRform!="function"?(l.info("[TF_SDK:25] \u2705 loadTRform not ready yet \u2014 waiting for web-turbo-formio.js to signal..."),await new Promise(p=>{let d=()=>{document.removeEventListener("LoadRNformReady",d),l.info("[TF_SDK:26] \u2705 loadTRform is now ready (LoadRNformReady event received)"),p()};document.addEventListener("LoadRNformReady",d),typeof window.loadTRform=="function"&&d()})):l.info("[TF_SDK:27] \u2705 loadTRform already available \u2014 invoking immediately"),l.info("[TF_SDK:28] \u2705 Handing off to loadTRform (web-turbo-formio.js)..."),await window.loadTRform(m,_,e.themeData,e.mode,e.language,e.translations,e.controlData,e.privateExternal,e.permission,i),Ce(),{sendAction:p=>{var d;p.type==="SET_IMAGE_DATA"&&((d=window.setImageData)==null||d.call(window,p.imageData,p.controlId,p.fileName))},destroy:()=>{r.innerHTML=""}}}window.closeDocumentsModal=function(){if(typeof $!="undefined"&&$.fn.modal)$("#documentsModal").modal("hide");else{let t=document.getElementById("documentsModal");t&&(t.style.display="none",t.classList.remove("active"))}};window.checkDocumentsVisibility=async function(){let t=document.getElementById("documentsOption"),n=document.getElementById("documentsDivider"),o=await te();t.style.display=o?"block":"none",n&&(n.style.display=o?"block":"none"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()};window.insertAppDocument=async function(t){try{return await be(t),l.info("[TF_SDK:29] \u2705 Document inserted",{id:t==null?void 0:t.id}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:30] \u274C Failed to insert document",n),!1}};window.deleteAppDocument=async function(t){try{return await ge(t),l.info("[TF_SDK:31] \u2705 Document deleted",{id:t}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:32] \u274C Failed to delete document",n),!1}};window.getAllDocuments=me;window.hasDocuments=te;function He(){return"2.0.52"}function Se(t){let n=typeof t=="string"?document.getElementById(t):t;n||(n=document.querySelector(".tf-formio-sdk")||document.body);let o=n.querySelectorAll("table"),r=0,e=null;return o.forEach(i=>{let a=i.getBoundingClientRect().width;a>r&&(r=a,e=i)}),{maxWidth:r,widestTable:e}}window.getMaxTableWidth=Se;typeof window!="undefined"&&(window.TurboForms=window.TurboForms||{loadForm:ze,getBuildVersion:He,getMaxTableWidth:Se});export{He as getBuildVersion,Se as getMaxTableWidth,ze as loadForm};
271
+ `);if(!window.__unviredSdkScriptsLoaded&&!window.__unviredSdkScriptsLoading){window.__unviredSdkScriptsLoading=!0,l.info("[TF_SDK:14] \u2705 Loading SDK scripts (jQuery, Formio, Recogito, LESS, components)...");let p=d=>{if(b){let C=b.querySelector(".sdk-loader-text");C&&(C.textContent=d)}};if(p("Loading Core Components..."),c[0]&&c[0].trim()){let d=document.createElement("script");d.textContent=c[0],d.setAttribute("data-unvired-script","jquery"),document.head.appendChild(d)}if(c[4]&&c[4].trim()){let d=document.createElement("script");d.textContent=c[4],d.setAttribute("data-unvired-script","choices"),document.head.appendChild(d)}if(p("Loading Formio Library..."),c[5]&&c[5].trim()){let d=document.createElement("script");d.textContent=c[5],d.setAttribute("data-unvired-script","formio"),document.head.appendChild(d),l.info("[TF_SDK:15] \u2705 Bundled Formio library injected.")}if(e.showComments){p("Loading Annotation Tools...");for(let d=1;d<=2;d++)if(c[d]&&c[d].trim()){let C=document.createElement("script");C.textContent=c[d],C.setAttribute("data-unvired-script",`recogito-${d}`),document.head.appendChild(C),await new Promise(A=>setTimeout(A,0))}}else l.info("[TF_SDK:16] \u2705 Skipping Recogito (comments disabled, optimized load)");if(p("Initializing Engine..."),c[3]&&c[3].trim()){let d=document.createElement("script");d.textContent=c[3],d.setAttribute("data-unvired-script","less"),document.head.appendChild(d)}window.form=window.form||{},window.platform=window.platform||{},window.ResizeObserver=window.ResizeObserver||ResizeObserver,typeof browserMD5File!="undefined"&&(window.form.BMF=new browserMD5File),window.less=window.less||{},typeof window.__Html5QrcodeLibrary__!="undefined"&&(window.html5QrCode=window.__Html5QrcodeLibrary__),typeof window.Html5QrcodeScanner=="undefined"&&(window.Html5QrcodeScanner=class{constructor(){l.warn("[TF_SDK:17] \u26A0\uFE0F Barcode library (Html5QrcodeScanner) is not loaded.")}render(){}clear(){}}),p("Initializing Components...");for(let d=6;d<c.length;d++){let C=c[d];if(C&&C.trim()){let A=document.createElement("script");A.textContent=C,A.setAttribute("data-unvired-script",`script-${d}`),document.head.appendChild(A),d%5===0&&await new Promise(V=>setTimeout(V,0))}}window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1,l.info("[TF_SDK:18] \u2705 All SDK scripts injected successfully"),document.addEventListener("click",function(d){let C=document.getElementById("unvired-more-btn"),A=document.getElementById("moreTooltip");C&&A&&!C.contains(d.target)&&!A.contains(d.target)&&(A.style.display="none")})}else if(window.__unviredSdkScriptsLoading)window.__unviredSdkScriptsLoaded||(l.warn("[TF_SDK:19] \u26A0\uFE0F Scripts marked as loading but not yet loaded - waiting..."),window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1);else{if(l.info("[TF_SDK:20] \u2705 SDK scripts already loaded \u2014 skipping injection"),typeof window.Formio=="undefined"){let p="ErrorCode : 005, Formio library not available even though scripts were loaded.";throw l.error("[TF_SDK:21] \u274C ",p),b&&b.classList.add("hidden"),s({type:"ERROR",errorMessage:p,data:{technicalError:new Error(p),formioPath:"bundled",timestamp:new Date().toISOString()}}),new Error(p)}l.info("[TF_SDK:22] \u2705 Formio verified (previously loaded)")}window.FORM_TEMPLATE=m,window.FORM_PREVIOUS_DATA=n,window.FORM_MODE=e.mode,window.FORM_COMMENTS_DATA=e.commentsData,window.FORM_VOB_ARR=e.commentsVobArr,window.FORM_PLATFORM=e.platform,window.FORM_LANGUAGE=e.language,window.FORM_TRASLATIONS=e.translations,window.FORM_ENV=e.environmentVariable,window.FORM_THEME_DATA=e.themeData,window.FORM_USER_DATA=e.userData,window.FORM_USERS_LIST=e.usersList,window.FORM_CONTROL_DATA=e.controlData,window.FORM_PRIVATE_EXTERNAL=e.privateExternal,window.FORM_PERMISSION=e.permission,window.FORM_ATTACHMENT_FILE_KEYS=i,window.sendEventCallback=s,window.FORM_EVENTS={FORM_RENDER:"FORM_RENDER",SAVE:"FORM_SAVE",SUBMIT:"FORM_SUBMIT",SUBMIT_ERROR:"FORM_SUBMIT_ERROR",BACK_NAVIGATION:"FORM_BACK_NAVIGATION",ONCHANGE:"FORM_ONCHANGE",FORM_LOADED:"FORM_LOADED"};let v=r.querySelector("#form-back-btn"),E=r.querySelector("#unvired-more-btn");v&&(e.showBackButton?v.style.setProperty("display","flex","important"):v.style.setProperty("display","none","important")),E&&!e.showMoreButton&&E.style.setProperty("display","none","important"),window.__unviredFormsOptions=e,window.checkDocumentsVisibility(),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility(),e.platform==="web"?window.platform={isBrowser:!0,isAndroid:!1,iosPlatform:!1}:e.platform==="android"?window.platform={isBrowser:!1,isAndroid:!0,iosPlatform:!1}:e.platform==="ios"&&(window.platform={isBrowser:!1,isAndroid:!1,iosPlatform:!0});let O={};if(((oe=e.environmentVariable)==null?void 0:oe.length)>0)for(let p of e.environmentVariable)for(let d in p)O[d]=p[d];Object.keys(O).length>0&&(window.env=O);let S=r.querySelector("#sticky-header"),N=r.querySelector("#sticky-footer"),L=r.querySelector("#formio-wrapper"),H=r.querySelector("#comments-header");e.mode==="pdf"||e.mode==="print"?(r.classList.add(`${e.mode}-mode`),L&&L.classList.add(`${e.mode}-mode`),S&&(S.style.display="none"),N&&(N.style.display="none")):(S&&(S.style.display="flex"),N&&(N.style.display="flex")),H&&(H.style.display="none"),e.themeData&&Object.keys(e.themeData).length>0&&(window.FORM_THEME_DATA=e.themeData),e.language&&(window.FORMIO_LANGUAGE=e.language),e.translations&&(window.FORMIO_I18N=e.translations),e.userData&&(window.firstName=e.userData.firstName,window.lastName=e.userData.lastName,window.form=window.form||{},Object.assign(window.form,e.userData)),window.less=window.less||{},Object.assign(window.less,{async:!0,environment:"production",fileAsync:!1,onReady:!0,useFileCache:!0});let _=n;if(n&&(l.info("[TF_SDK:23] \u2705 Processing file IDs in submission data (fetching from IndexedDB)..."),_=await pe(n,s,i),l.info("[TF_SDK:24] \u2705 File IDs processed \u2014 handing off to form renderer")),b){let p=b.querySelector(".sdk-loader-text");p&&(p.textContent="Initializing Form...")}return typeof window.loadTRform!="function"?(l.info("[TF_SDK:25] \u2705 loadTRform not ready yet \u2014 waiting for web-turbo-formio.js to signal..."),await new Promise(p=>{let d=()=>{document.removeEventListener("LoadRNformReady",d),l.info("[TF_SDK:26] \u2705 loadTRform is now ready (LoadRNformReady event received)"),p()};document.addEventListener("LoadRNformReady",d),typeof window.loadTRform=="function"&&d()})):l.info("[TF_SDK:27] \u2705 loadTRform already available \u2014 invoking immediately"),l.info("[TF_SDK:28] \u2705 Handing off to loadTRform (web-turbo-formio.js)..."),await window.loadTRform(m,_,e.themeData,e.mode,e.language,e.translations,e.controlData,e.privateExternal,e.permission,i),Ce(),{sendAction:p=>{var d;p.type==="SET_IMAGE_DATA"&&((d=window.setImageData)==null||d.call(window,p.imageData,p.controlId,p.fileName))},destroy:()=>{r.innerHTML=""}}}window.closeDocumentsModal=function(){if(typeof $!="undefined"&&$.fn.modal)$("#documentsModal").modal("hide");else{let t=document.getElementById("documentsModal");t&&(t.style.display="none",t.classList.remove("active"))}};window.checkDocumentsVisibility=async function(){let t=document.getElementById("documentsOption"),n=document.getElementById("documentsDivider"),o=await te();t.style.display=o?"block":"none",n&&(n.style.display=o?"block":"none"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()};window.insertAppDocument=async function(t){try{return await be(t),l.info("[TF_SDK:29] \u2705 Document inserted",{id:t==null?void 0:t.id}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:30] \u274C Failed to insert document",n),!1}};window.deleteAppDocument=async function(t){try{return await ge(t),l.info("[TF_SDK:31] \u2705 Document deleted",{id:t}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:32] \u274C Failed to delete document",n),!1}};window.getAllDocuments=me;window.hasDocuments=te;function He(){return"2.0.53"}function Se(t){let n=typeof t=="string"?document.getElementById(t):t;n||(n=document.querySelector(".tf-formio-sdk")||document.body);let o=n.querySelectorAll("table"),r=0,e=null;return o.forEach(i=>{let a=i.getBoundingClientRect().width;a>r&&(r=a,e=i)}),{maxWidth:r,widestTable:e}}window.getMaxTableWidth=Se;typeof window!="undefined"&&(window.TurboForms=window.TurboForms||{loadForm:ze,getBuildVersion:He,getMaxTableWidth:Se});export{He as getBuildVersion,Se as getMaxTableWidth,ze as loadForm};
@@ -43110,7 +43110,7 @@ window.CommentOnBack = CommentOnBack;
43110
43110
 
43111
43111
 
43112
43112
  <div id="sticky-footer">
43113
- <div class="build-version">SDK v2.0.52</div>
43113
+ <div class="build-version">SDK v2.0.53</div>
43114
43114
  <div class="relative-position">
43115
43115
  <button id="unvired-more-btn" class="ui button primary dataGrid-addRow" onclick="toggleTooltip()">
43116
43116
  <i class="icon options"></i>
@@ -205,7 +205,7 @@ var TurboForms=(()=>{var Oe=Object.create;var q=Object.defineProperty;var Pe=Obj
205
205
  </div>
206
206
  ${(W=e.themeData)!=null&&W.isCard?"</div>":""}
207
207
  <div id="sticky-footer" class="${e.showFooter===!1?"footer-hidden":""}">
208
- <div class="build-version">SDK v2.0.52</div>
208
+ <div class="build-version">SDK v2.0.53</div>
209
209
 
210
210
  <button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
211
211
  <i class="bi bi-chevron-left"></i> Previous
@@ -268,4 +268,4 @@ var TurboForms=(()=>{var Oe=Object.create;var q=Object.defineProperty;var Pe=Obj
268
268
 
269
269
  // === SCRIPT_SEPARATOR ===
270
270
 
271
- `);if(!window.__unviredSdkScriptsLoaded&&!window.__unviredSdkScriptsLoading){window.__unviredSdkScriptsLoading=!0,l.info("[TF_SDK:14] \u2705 Loading SDK scripts (jQuery, Formio, Recogito, LESS, components)...");let p=d=>{if(b){let C=b.querySelector(".sdk-loader-text");C&&(C.textContent=d)}};if(p("Loading Core Components..."),c[0]&&c[0].trim()){let d=document.createElement("script");d.textContent=c[0],d.setAttribute("data-unvired-script","jquery"),document.head.appendChild(d)}if(c[4]&&c[4].trim()){let d=document.createElement("script");d.textContent=c[4],d.setAttribute("data-unvired-script","choices"),document.head.appendChild(d)}if(p("Loading Formio Library..."),c[5]&&c[5].trim()){let d=document.createElement("script");d.textContent=c[5],d.setAttribute("data-unvired-script","formio"),document.head.appendChild(d),l.info("[TF_SDK:15] \u2705 Bundled Formio library injected.")}if(e.showComments){p("Loading Annotation Tools...");for(let d=1;d<=2;d++)if(c[d]&&c[d].trim()){let C=document.createElement("script");C.textContent=c[d],C.setAttribute("data-unvired-script",`recogito-${d}`),document.head.appendChild(C),await new Promise(A=>setTimeout(A,0))}}else l.info("[TF_SDK:16] \u2705 Skipping Recogito (comments disabled, optimized load)");if(p("Initializing Engine..."),c[3]&&c[3].trim()){let d=document.createElement("script");d.textContent=c[3],d.setAttribute("data-unvired-script","less"),document.head.appendChild(d)}window.form=window.form||{},window.platform=window.platform||{},window.ResizeObserver=window.ResizeObserver||ResizeObserver,typeof browserMD5File!="undefined"&&(window.form.BMF=new browserMD5File),window.less=window.less||{},typeof window.__Html5QrcodeLibrary__!="undefined"&&(window.html5QrCode=window.__Html5QrcodeLibrary__),typeof window.Html5QrcodeScanner=="undefined"&&(window.Html5QrcodeScanner=class{constructor(){l.warn("[TF_SDK:17] \u26A0\uFE0F Barcode library (Html5QrcodeScanner) is not loaded.")}render(){}clear(){}}),p("Initializing Components...");for(let d=6;d<c.length;d++){let C=c[d];if(C&&C.trim()){let A=document.createElement("script");A.textContent=C,A.setAttribute("data-unvired-script",`script-${d}`),document.head.appendChild(A),d%5===0&&await new Promise(V=>setTimeout(V,0))}}window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1,l.info("[TF_SDK:18] \u2705 All SDK scripts injected successfully"),document.addEventListener("click",function(d){let C=document.getElementById("unvired-more-btn"),A=document.getElementById("moreTooltip");C&&A&&!C.contains(d.target)&&!A.contains(d.target)&&(A.style.display="none")})}else if(window.__unviredSdkScriptsLoading)window.__unviredSdkScriptsLoaded||(l.warn("[TF_SDK:19] \u26A0\uFE0F Scripts marked as loading but not yet loaded - waiting..."),window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1);else{if(l.info("[TF_SDK:20] \u2705 SDK scripts already loaded \u2014 skipping injection"),typeof window.Formio=="undefined"){let p="ErrorCode : 005, Formio library not available even though scripts were loaded.";throw l.error("[TF_SDK:21] \u274C ",p),b&&b.classList.add("hidden"),s({type:"ERROR",errorMessage:p,data:{technicalError:new Error(p),formioPath:"bundled",timestamp:new Date().toISOString()}}),new Error(p)}l.info("[TF_SDK:22] \u2705 Formio verified (previously loaded)")}window.FORM_TEMPLATE=m,window.FORM_PREVIOUS_DATA=n,window.FORM_MODE=e.mode,window.FORM_COMMENTS_DATA=e.commentsData,window.FORM_VOB_ARR=e.commentsVobArr,window.FORM_PLATFORM=e.platform,window.FORM_LANGUAGE=e.language,window.FORM_TRASLATIONS=e.translations,window.FORM_ENV=e.environmentVariable,window.FORM_THEME_DATA=e.themeData,window.FORM_USER_DATA=e.userData,window.FORM_USERS_LIST=e.usersList,window.FORM_CONTROL_DATA=e.controlData,window.FORM_PRIVATE_EXTERNAL=e.privateExternal,window.FORM_PERMISSION=e.permission,window.FORM_ATTACHMENT_FILE_KEYS=i,window.sendEventCallback=s,window.FORM_EVENTS={FORM_RENDER:"FORM_RENDER",SAVE:"FORM_SAVE",SUBMIT:"FORM_SUBMIT",SUBMIT_ERROR:"FORM_SUBMIT_ERROR",BACK_NAVIGATION:"FORM_BACK_NAVIGATION",ONCHANGE:"FORM_ONCHANGE",FORM_LOADED:"FORM_LOADED"};let v=r.querySelector("#form-back-btn"),E=r.querySelector("#unvired-more-btn");v&&(e.showBackButton?v.style.setProperty("display","flex","important"):v.style.setProperty("display","none","important")),E&&!e.showMoreButton&&E.style.setProperty("display","none","important"),window.__unviredFormsOptions=e,window.checkDocumentsVisibility(),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility(),e.platform==="web"?window.platform={isBrowser:!0,isAndroid:!1,iosPlatform:!1}:e.platform==="android"?window.platform={isBrowser:!1,isAndroid:!0,iosPlatform:!1}:e.platform==="ios"&&(window.platform={isBrowser:!1,isAndroid:!1,iosPlatform:!0});let O={};if(((ie=e.environmentVariable)==null?void 0:ie.length)>0)for(let p of e.environmentVariable)for(let d in p)O[d]=p[d];Object.keys(O).length>0&&(window.env=O);let S=r.querySelector("#sticky-header"),N=r.querySelector("#sticky-footer"),L=r.querySelector("#formio-wrapper"),H=r.querySelector("#comments-header");e.mode==="pdf"||e.mode==="print"?(r.classList.add(`${e.mode}-mode`),L&&L.classList.add(`${e.mode}-mode`),S&&(S.style.display="none"),N&&(N.style.display="none")):(S&&(S.style.display="flex"),N&&(N.style.display="flex")),H&&(H.style.display="none"),e.themeData&&Object.keys(e.themeData).length>0&&(window.FORM_THEME_DATA=e.themeData),e.language&&(window.FORMIO_LANGUAGE=e.language),e.translations&&(window.FORMIO_I18N=e.translations),e.userData&&(window.firstName=e.userData.firstName,window.lastName=e.userData.lastName,window.form=window.form||{},Object.assign(window.form,e.userData)),window.less=window.less||{},Object.assign(window.less,{async:!0,environment:"production",fileAsync:!1,onReady:!0,useFileCache:!0});let _=n;if(n&&(l.info("[TF_SDK:23] \u2705 Processing file IDs in submission data (fetching from IndexedDB)..."),_=await me(n,s,i),l.info("[TF_SDK:24] \u2705 File IDs processed \u2014 handing off to form renderer")),b){let p=b.querySelector(".sdk-loader-text");p&&(p.textContent="Initializing Form...")}return typeof window.loadTRform!="function"?(l.info("[TF_SDK:25] \u2705 loadTRform not ready yet \u2014 waiting for web-turbo-formio.js to signal..."),await new Promise(p=>{let d=()=>{document.removeEventListener("LoadRNformReady",d),l.info("[TF_SDK:26] \u2705 loadTRform is now ready (LoadRNformReady event received)"),p()};document.addEventListener("LoadRNformReady",d),typeof window.loadTRform=="function"&&d()})):l.info("[TF_SDK:27] \u2705 loadTRform already available \u2014 invoking immediately"),l.info("[TF_SDK:28] \u2705 Handing off to loadTRform (web-turbo-formio.js)..."),await window.loadTRform(m,_,e.themeData,e.mode,e.language,e.translations,e.controlData,e.privateExternal,e.permission,i),ke(),{sendAction:p=>{var d;p.type==="SET_IMAGE_DATA"&&((d=window.setImageData)==null||d.call(window,p.imageData,p.controlId,p.fileName))},destroy:()=>{r.innerHTML=""}}}window.closeDocumentsModal=function(){if(typeof $!="undefined"&&$.fn.modal)$("#documentsModal").modal("hide");else{let t=document.getElementById("documentsModal");t&&(t.style.display="none",t.classList.remove("active"))}};window.checkDocumentsVisibility=async function(){let t=document.getElementById("documentsOption"),n=document.getElementById("documentsDivider"),o=await ne();t.style.display=o?"block":"none",n&&(n.style.display=o?"block":"none"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()};window.insertAppDocument=async function(t){try{return await ve(t),l.info("[TF_SDK:29] \u2705 Document inserted",{id:t==null?void 0:t.id}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:30] \u274C Failed to insert document",n),!1}};window.deleteAppDocument=async function(t){try{return await ye(t),l.info("[TF_SDK:31] \u2705 Document deleted",{id:t}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:32] \u274C Failed to delete document",n),!1}};window.getAllDocuments=ge;window.hasDocuments=ne;function Ae(){return"2.0.52"}function re(t){let n=typeof t=="string"?document.getElementById(t):t;n||(n=document.querySelector(".tf-formio-sdk")||document.body);let o=n.querySelectorAll("table"),r=0,e=null;return o.forEach(i=>{let a=i.getBoundingClientRect().width;a>r&&(r=a,e=i)}),{maxWidth:r,widestTable:e}}window.getMaxTableWidth=re;typeof window!="undefined"&&(window.TurboForms=window.TurboForms||{loadForm:Ee,getBuildVersion:Ae,getMaxTableWidth:re});return Fe(Ge);})();
271
+ `);if(!window.__unviredSdkScriptsLoaded&&!window.__unviredSdkScriptsLoading){window.__unviredSdkScriptsLoading=!0,l.info("[TF_SDK:14] \u2705 Loading SDK scripts (jQuery, Formio, Recogito, LESS, components)...");let p=d=>{if(b){let C=b.querySelector(".sdk-loader-text");C&&(C.textContent=d)}};if(p("Loading Core Components..."),c[0]&&c[0].trim()){let d=document.createElement("script");d.textContent=c[0],d.setAttribute("data-unvired-script","jquery"),document.head.appendChild(d)}if(c[4]&&c[4].trim()){let d=document.createElement("script");d.textContent=c[4],d.setAttribute("data-unvired-script","choices"),document.head.appendChild(d)}if(p("Loading Formio Library..."),c[5]&&c[5].trim()){let d=document.createElement("script");d.textContent=c[5],d.setAttribute("data-unvired-script","formio"),document.head.appendChild(d),l.info("[TF_SDK:15] \u2705 Bundled Formio library injected.")}if(e.showComments){p("Loading Annotation Tools...");for(let d=1;d<=2;d++)if(c[d]&&c[d].trim()){let C=document.createElement("script");C.textContent=c[d],C.setAttribute("data-unvired-script",`recogito-${d}`),document.head.appendChild(C),await new Promise(A=>setTimeout(A,0))}}else l.info("[TF_SDK:16] \u2705 Skipping Recogito (comments disabled, optimized load)");if(p("Initializing Engine..."),c[3]&&c[3].trim()){let d=document.createElement("script");d.textContent=c[3],d.setAttribute("data-unvired-script","less"),document.head.appendChild(d)}window.form=window.form||{},window.platform=window.platform||{},window.ResizeObserver=window.ResizeObserver||ResizeObserver,typeof browserMD5File!="undefined"&&(window.form.BMF=new browserMD5File),window.less=window.less||{},typeof window.__Html5QrcodeLibrary__!="undefined"&&(window.html5QrCode=window.__Html5QrcodeLibrary__),typeof window.Html5QrcodeScanner=="undefined"&&(window.Html5QrcodeScanner=class{constructor(){l.warn("[TF_SDK:17] \u26A0\uFE0F Barcode library (Html5QrcodeScanner) is not loaded.")}render(){}clear(){}}),p("Initializing Components...");for(let d=6;d<c.length;d++){let C=c[d];if(C&&C.trim()){let A=document.createElement("script");A.textContent=C,A.setAttribute("data-unvired-script",`script-${d}`),document.head.appendChild(A),d%5===0&&await new Promise(V=>setTimeout(V,0))}}window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1,l.info("[TF_SDK:18] \u2705 All SDK scripts injected successfully"),document.addEventListener("click",function(d){let C=document.getElementById("unvired-more-btn"),A=document.getElementById("moreTooltip");C&&A&&!C.contains(d.target)&&!A.contains(d.target)&&(A.style.display="none")})}else if(window.__unviredSdkScriptsLoading)window.__unviredSdkScriptsLoaded||(l.warn("[TF_SDK:19] \u26A0\uFE0F Scripts marked as loading but not yet loaded - waiting..."),window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1);else{if(l.info("[TF_SDK:20] \u2705 SDK scripts already loaded \u2014 skipping injection"),typeof window.Formio=="undefined"){let p="ErrorCode : 005, Formio library not available even though scripts were loaded.";throw l.error("[TF_SDK:21] \u274C ",p),b&&b.classList.add("hidden"),s({type:"ERROR",errorMessage:p,data:{technicalError:new Error(p),formioPath:"bundled",timestamp:new Date().toISOString()}}),new Error(p)}l.info("[TF_SDK:22] \u2705 Formio verified (previously loaded)")}window.FORM_TEMPLATE=m,window.FORM_PREVIOUS_DATA=n,window.FORM_MODE=e.mode,window.FORM_COMMENTS_DATA=e.commentsData,window.FORM_VOB_ARR=e.commentsVobArr,window.FORM_PLATFORM=e.platform,window.FORM_LANGUAGE=e.language,window.FORM_TRASLATIONS=e.translations,window.FORM_ENV=e.environmentVariable,window.FORM_THEME_DATA=e.themeData,window.FORM_USER_DATA=e.userData,window.FORM_USERS_LIST=e.usersList,window.FORM_CONTROL_DATA=e.controlData,window.FORM_PRIVATE_EXTERNAL=e.privateExternal,window.FORM_PERMISSION=e.permission,window.FORM_ATTACHMENT_FILE_KEYS=i,window.sendEventCallback=s,window.FORM_EVENTS={FORM_RENDER:"FORM_RENDER",SAVE:"FORM_SAVE",SUBMIT:"FORM_SUBMIT",SUBMIT_ERROR:"FORM_SUBMIT_ERROR",BACK_NAVIGATION:"FORM_BACK_NAVIGATION",ONCHANGE:"FORM_ONCHANGE",FORM_LOADED:"FORM_LOADED"};let v=r.querySelector("#form-back-btn"),E=r.querySelector("#unvired-more-btn");v&&(e.showBackButton?v.style.setProperty("display","flex","important"):v.style.setProperty("display","none","important")),E&&!e.showMoreButton&&E.style.setProperty("display","none","important"),window.__unviredFormsOptions=e,window.checkDocumentsVisibility(),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility(),e.platform==="web"?window.platform={isBrowser:!0,isAndroid:!1,iosPlatform:!1}:e.platform==="android"?window.platform={isBrowser:!1,isAndroid:!0,iosPlatform:!1}:e.platform==="ios"&&(window.platform={isBrowser:!1,isAndroid:!1,iosPlatform:!0});let O={};if(((ie=e.environmentVariable)==null?void 0:ie.length)>0)for(let p of e.environmentVariable)for(let d in p)O[d]=p[d];Object.keys(O).length>0&&(window.env=O);let S=r.querySelector("#sticky-header"),N=r.querySelector("#sticky-footer"),L=r.querySelector("#formio-wrapper"),H=r.querySelector("#comments-header");e.mode==="pdf"||e.mode==="print"?(r.classList.add(`${e.mode}-mode`),L&&L.classList.add(`${e.mode}-mode`),S&&(S.style.display="none"),N&&(N.style.display="none")):(S&&(S.style.display="flex"),N&&(N.style.display="flex")),H&&(H.style.display="none"),e.themeData&&Object.keys(e.themeData).length>0&&(window.FORM_THEME_DATA=e.themeData),e.language&&(window.FORMIO_LANGUAGE=e.language),e.translations&&(window.FORMIO_I18N=e.translations),e.userData&&(window.firstName=e.userData.firstName,window.lastName=e.userData.lastName,window.form=window.form||{},Object.assign(window.form,e.userData)),window.less=window.less||{},Object.assign(window.less,{async:!0,environment:"production",fileAsync:!1,onReady:!0,useFileCache:!0});let _=n;if(n&&(l.info("[TF_SDK:23] \u2705 Processing file IDs in submission data (fetching from IndexedDB)..."),_=await me(n,s,i),l.info("[TF_SDK:24] \u2705 File IDs processed \u2014 handing off to form renderer")),b){let p=b.querySelector(".sdk-loader-text");p&&(p.textContent="Initializing Form...")}return typeof window.loadTRform!="function"?(l.info("[TF_SDK:25] \u2705 loadTRform not ready yet \u2014 waiting for web-turbo-formio.js to signal..."),await new Promise(p=>{let d=()=>{document.removeEventListener("LoadRNformReady",d),l.info("[TF_SDK:26] \u2705 loadTRform is now ready (LoadRNformReady event received)"),p()};document.addEventListener("LoadRNformReady",d),typeof window.loadTRform=="function"&&d()})):l.info("[TF_SDK:27] \u2705 loadTRform already available \u2014 invoking immediately"),l.info("[TF_SDK:28] \u2705 Handing off to loadTRform (web-turbo-formio.js)..."),await window.loadTRform(m,_,e.themeData,e.mode,e.language,e.translations,e.controlData,e.privateExternal,e.permission,i),ke(),{sendAction:p=>{var d;p.type==="SET_IMAGE_DATA"&&((d=window.setImageData)==null||d.call(window,p.imageData,p.controlId,p.fileName))},destroy:()=>{r.innerHTML=""}}}window.closeDocumentsModal=function(){if(typeof $!="undefined"&&$.fn.modal)$("#documentsModal").modal("hide");else{let t=document.getElementById("documentsModal");t&&(t.style.display="none",t.classList.remove("active"))}};window.checkDocumentsVisibility=async function(){let t=document.getElementById("documentsOption"),n=document.getElementById("documentsDivider"),o=await ne();t.style.display=o?"block":"none",n&&(n.style.display=o?"block":"none"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()};window.insertAppDocument=async function(t){try{return await ve(t),l.info("[TF_SDK:29] \u2705 Document inserted",{id:t==null?void 0:t.id}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:30] \u274C Failed to insert document",n),!1}};window.deleteAppDocument=async function(t){try{return await ye(t),l.info("[TF_SDK:31] \u2705 Document deleted",{id:t}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:32] \u274C Failed to delete document",n),!1}};window.getAllDocuments=ge;window.hasDocuments=ne;function Ae(){return"2.0.53"}function re(t){let n=typeof t=="string"?document.getElementById(t):t;n||(n=document.querySelector(".tf-formio-sdk")||document.body);let o=n.querySelectorAll("table"),r=0,e=null;return o.forEach(i=>{let a=i.getBoundingClientRect().width;a>r&&(r=a,e=i)}),{maxWidth:r,widestTable:e}}window.getMaxTableWidth=re;typeof window!="undefined"&&(window.TurboForms=window.TurboForms||{loadForm:Ee,getBuildVersion:Ae,getMaxTableWidth:re});return Fe(Ge);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unvired/turboforms-embed-sdk",
3
- "version": "2.0.52",
3
+ "version": "2.0.53",
4
4
  "description": "Reusable vanilla JS form library that works with React, Angular, Ionic, etc.",
5
5
  "main": "dist/turboforms.js",
6
6
  "types": "dist/index.d.ts",