@unvired/turboforms-embed-sdk 2.0.89 → 2.0.91
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 +2 -2
- package/dist/turboforms.html +1 -1
- package/dist/turboforms.js +2 -2
- package/package.json +1 -1
package/dist/turboforms.esm.js
CHANGED
|
@@ -220,7 +220,7 @@ var Ae=Object.create;var ae=Object.defineProperty;var Oe=Object.getOwnPropertyDe
|
|
|
220
220
|
</div>
|
|
221
221
|
${(ne=e.themeData)!=null&&ne.isCard?"</div>":""}
|
|
222
222
|
<div id="sticky-footer" class="${e.showFooter===!1?"footer-hidden":""}">
|
|
223
|
-
<div class="build-version">SDK v2.0.
|
|
223
|
+
<div class="build-version">SDK v2.0.91</div>
|
|
224
224
|
|
|
225
225
|
<button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
|
|
226
226
|
<i class="bi bi-chevron-left"></i> Previous
|
|
@@ -287,4 +287,4 @@ var Ae=Object.create;var ae=Object.defineProperty;var Oe=Object.getOwnPropertyDe
|
|
|
287
287
|
|
|
288
288
|
// === SCRIPT_SEPARATOR ===
|
|
289
289
|
|
|
290
|
-
`);if(!window.__unviredSdkScriptsLoaded&&!window.__unviredSdkScriptsLoading){window.__unviredSdkScriptsLoading=!0,l.info("[TF_SDK:14] \u2705 Loading SDK scripts (Formio, Recogito, components)..."),(m=>{if(u){let w=u.querySelector(".sdk-loader-text");w&&(w.textContent=m)}})("Initializing Form Engine & Components..."),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(){}});for(let m=0;m<y.length;m++){let w=y[m];if(w&&w.trim()){let A=document.createElement("script");A.textContent=w,A.setAttribute("data-unvired-script",`script-${m}`),document.head.appendChild(A),m%5===0&&await new Promise(q=>setTimeout(q,0))}}window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1,l.info("[TF_SDK:15] \u2705 All SDK scripts loaded successfully."),document.addEventListener("click",function(m){let w=document.getElementById("unvired-more-btn"),A=document.getElementById("moreTooltip");w&&A&&!w.contains(m.target)&&!A.contains(m.target)&&(A.style.display="none")})}else if(window.__unviredSdkScriptsLoading)l.info("[TF_SDK:19] \u26A0\uFE0F Scripts are currently loading by another instance - waiting..."),await new Promise(p=>{let m=setInterval(()=>{window.__unviredSdkScriptsLoaded&&(clearInterval(m),p())},50)});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),u&&u.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=f,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=r,window.taskId=e.taskId||((oe=e.controlData)==null?void 0:oe.taskId)||window.taskId||"",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",OPEN_CAMERA:"OPEN_CAMERA",BARCODE_SCAN:"BARCODE_SCAN",LOCATION_REQUEST:"LOCATION_REQUEST",ACTION:"ACTION"};let S=o.querySelector("#form-back-btn"),P=o.querySelector("#unvired-more-btn");S&&(e.showBackButton?S.style.setProperty("display","flex","important"):S.style.setProperty("display","none","important")),P&&!e.showMoreButton&&P.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 C={};if(((re=e.environmentVariable)==null?void 0:re.length)>0)for(let p of e.environmentVariable)for(let m in p)C[m]=p[m];Object.keys(C).length>0&&(window.env=C);let j=o.querySelector("#sticky-header"),D=o.querySelector("#sticky-footer"),H=o.querySelector("#formio-wrapper"),M=o.querySelector("#comments-header");e.mode==="pdf"||e.mode==="print"?(o.classList.add(`${e.mode}-mode`),H&&H.classList.add(`${e.mode}-mode`),j&&(j.style.display="none"),D&&(D.style.display="none")):(j&&(j.style.display="flex"),D&&(D.style.display="flex")),M&&(M.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 B=n;if(n&&(l.info("[TF_SDK:23] \u2705 Processing file IDs in submission data (fetching from IndexedDB)..."),B=await he(n,s,r),l.info("[TF_SDK:24] \u2705 File IDs processed \u2014 handing off to form renderer")),u){let p=u.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-form.js to signal..."),await new Promise(p=>{let m=()=>{document.removeEventListener("LoadRNformReady",m),l.info("[TF_SDK:26] \u2705 loadTRform is now ready (LoadRNformReady event received)"),p()};document.addEventListener("LoadRNformReady",m),typeof window.loadTRform=="function"&&m()})):l.info("[TF_SDK:27] \u2705 loadTRform already available \u2014 invoking immediately"),l.info("[TF_SDK:28] \u2705 Handing off to loadTRform (web-turbo-form.js)..."),await window.loadTRform(f,B,e.themeData,e.mode,e.language,e.translations,e.controlData,e.privateExternal,e.permission,r),Ce(),{sendAction:p=>{var m;p.type==="SET_IMAGE_DATA"&&((m=window.setImageData)==null||m.call(window,p.imageData,p.controlId,p.fileName))},destroy:()=>{o.innerHTML=""}}}window.closeDocumentsModal=function(){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"),i=await ee();t.style.display=i?"block":"none",n&&(n.style.display=i?"block":"none"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()};window.insertAppDocument=async function(t){try{return await ge(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=be;window.hasDocuments=ee;function qe(){return"2.0.
|
|
290
|
+
`);if(!window.__unviredSdkScriptsLoaded&&!window.__unviredSdkScriptsLoading){window.__unviredSdkScriptsLoading=!0,l.info("[TF_SDK:14] \u2705 Loading SDK scripts (Formio, Recogito, components)..."),(m=>{if(u){let w=u.querySelector(".sdk-loader-text");w&&(w.textContent=m)}})("Initializing Form Engine & Components..."),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(){}});for(let m=0;m<y.length;m++){let w=y[m];if(w&&w.trim()){let A=document.createElement("script");A.textContent=w,A.setAttribute("data-unvired-script",`script-${m}`),document.head.appendChild(A),m%5===0&&await new Promise(q=>setTimeout(q,0))}}window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1,l.info("[TF_SDK:15] \u2705 All SDK scripts loaded successfully."),document.addEventListener("click",function(m){let w=document.getElementById("unvired-more-btn"),A=document.getElementById("moreTooltip");w&&A&&!w.contains(m.target)&&!A.contains(m.target)&&(A.style.display="none")})}else if(window.__unviredSdkScriptsLoading)l.info("[TF_SDK:19] \u26A0\uFE0F Scripts are currently loading by another instance - waiting..."),await new Promise(p=>{let m=setInterval(()=>{window.__unviredSdkScriptsLoaded&&(clearInterval(m),p())},50)});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),u&&u.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=f,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=r,window.taskId=e.taskId||((oe=e.controlData)==null?void 0:oe.taskId)||window.taskId||"",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",OPEN_CAMERA:"OPEN_CAMERA",BARCODE_SCAN:"BARCODE_SCAN",LOCATION_REQUEST:"LOCATION_REQUEST",ACTION:"ACTION"};let S=o.querySelector("#form-back-btn"),P=o.querySelector("#unvired-more-btn");S&&(e.showBackButton?S.style.setProperty("display","flex","important"):S.style.setProperty("display","none","important")),P&&!e.showMoreButton&&P.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 C={};if(((re=e.environmentVariable)==null?void 0:re.length)>0)for(let p of e.environmentVariable)for(let m in p)C[m]=p[m];Object.keys(C).length>0&&(window.env=C);let j=o.querySelector("#sticky-header"),D=o.querySelector("#sticky-footer"),H=o.querySelector("#formio-wrapper"),M=o.querySelector("#comments-header");e.mode==="pdf"||e.mode==="print"?(o.classList.add(`${e.mode}-mode`),H&&H.classList.add(`${e.mode}-mode`),j&&(j.style.display="none"),D&&(D.style.display="none")):(j&&(j.style.display="flex"),D&&(D.style.display="flex")),M&&(M.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 B=n;if(n&&(l.info("[TF_SDK:23] \u2705 Processing file IDs in submission data (fetching from IndexedDB)..."),B=await he(n,s,r),l.info("[TF_SDK:24] \u2705 File IDs processed \u2014 handing off to form renderer")),u){let p=u.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-form.js to signal..."),await new Promise(p=>{let m=()=>{document.removeEventListener("LoadRNformReady",m),l.info("[TF_SDK:26] \u2705 loadTRform is now ready (LoadRNformReady event received)"),p()};document.addEventListener("LoadRNformReady",m),typeof window.loadTRform=="function"&&m()})):l.info("[TF_SDK:27] \u2705 loadTRform already available \u2014 invoking immediately"),l.info("[TF_SDK:28] \u2705 Handing off to loadTRform (web-turbo-form.js)..."),await window.loadTRform(f,B,e.themeData,e.mode,e.language,e.translations,e.controlData,e.privateExternal,e.permission,r),Ce(),{sendAction:p=>{var m;p.type==="SET_IMAGE_DATA"&&((m=window.setImageData)==null||m.call(window,p.imageData,p.controlId,p.fileName))},destroy:()=>{o.innerHTML=""}}}window.closeDocumentsModal=function(){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"),i=await ee();t.style.display=i?"block":"none",n&&(n.style.display=i?"block":"none"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()};window.insertAppDocument=async function(t){try{return await ge(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=be;window.hasDocuments=ee;function qe(){return"2.0.91"}function Ee(t){let n=typeof t=="string"?document.getElementById(t):t;n||(n=document.querySelector(".tf-embed-sdk")||document.body);let i=n.querySelectorAll("table"),o=0,e=null;return i.forEach(r=>{let a=r.getBoundingClientRect().width;a>o&&(o=a,e=r)}),{maxWidth:o,widestTable:e}}window.getMaxTableWidth=Ee;typeof window!="undefined"&&(window.TurboForms=window.TurboForms||{loadForm:We,getBuildVersion:qe,getMaxTableWidth:Ee});export{qe as getBuildVersion,Ee as getMaxTableWidth,We as loadForm};
|
package/dist/turboforms.html
CHANGED
|
@@ -39152,7 +39152,7 @@ Expecting `+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":x="Parse error on
|
|
|
39152
39152
|
|
|
39153
39153
|
|
|
39154
39154
|
<div id="sticky-footer" class="footer-hidden" style="display: none;">
|
|
39155
|
-
<div class="build-version">SDK v2.0.
|
|
39155
|
+
<div class="build-version">SDK v2.0.91</div>
|
|
39156
39156
|
|
|
39157
39157
|
<button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
|
|
39158
39158
|
<i class="bi bi-chevron-left"></i> Previous
|
package/dist/turboforms.js
CHANGED
|
@@ -220,7 +220,7 @@ var TurboForms=(()=>{var Pe=Object.create;var G=Object.defineProperty;var _e=Obj
|
|
|
220
220
|
</div>
|
|
221
221
|
${(re=e.themeData)!=null&&re.isCard?"</div>":""}
|
|
222
222
|
<div id="sticky-footer" class="${e.showFooter===!1?"footer-hidden":""}">
|
|
223
|
-
<div class="build-version">SDK v2.0.
|
|
223
|
+
<div class="build-version">SDK v2.0.91</div>
|
|
224
224
|
|
|
225
225
|
<button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
|
|
226
226
|
<i class="bi bi-chevron-left"></i> Previous
|
|
@@ -287,4 +287,4 @@ var TurboForms=(()=>{var Pe=Object.create;var G=Object.defineProperty;var _e=Obj
|
|
|
287
287
|
|
|
288
288
|
// === SCRIPT_SEPARATOR ===
|
|
289
289
|
|
|
290
|
-
`);if(!window.__unviredSdkScriptsLoaded&&!window.__unviredSdkScriptsLoading){window.__unviredSdkScriptsLoading=!0,l.info("[TF_SDK:14] \u2705 Loading SDK scripts (Formio, Recogito, components)..."),(m=>{if(u){let w=u.querySelector(".sdk-loader-text");w&&(w.textContent=m)}})("Initializing Form Engine & Components..."),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(){}});for(let m=0;m<y.length;m++){let w=y[m];if(w&&w.trim()){let A=document.createElement("script");A.textContent=w,A.setAttribute("data-unvired-script",`script-${m}`),document.head.appendChild(A),m%5===0&&await new Promise(q=>setTimeout(q,0))}}window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1,l.info("[TF_SDK:15] \u2705 All SDK scripts loaded successfully."),document.addEventListener("click",function(m){let w=document.getElementById("unvired-more-btn"),A=document.getElementById("moreTooltip");w&&A&&!w.contains(m.target)&&!A.contains(m.target)&&(A.style.display="none")})}else if(window.__unviredSdkScriptsLoading)l.info("[TF_SDK:19] \u26A0\uFE0F Scripts are currently loading by another instance - waiting..."),await new Promise(p=>{let m=setInterval(()=>{window.__unviredSdkScriptsLoaded&&(clearInterval(m),p())},50)});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),u&&u.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=f,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=r,window.taskId=e.taskId||((ie=e.controlData)==null?void 0:ie.taskId)||window.taskId||"",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",OPEN_CAMERA:"OPEN_CAMERA",BARCODE_SCAN:"BARCODE_SCAN",LOCATION_REQUEST:"LOCATION_REQUEST",ACTION:"ACTION"};let S=o.querySelector("#form-back-btn"),P=o.querySelector("#unvired-more-btn");S&&(e.showBackButton?S.style.setProperty("display","flex","important"):S.style.setProperty("display","none","important")),P&&!e.showMoreButton&&P.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 C={};if(((ae=e.environmentVariable)==null?void 0:ae.length)>0)for(let p of e.environmentVariable)for(let m in p)C[m]=p[m];Object.keys(C).length>0&&(window.env=C);let j=o.querySelector("#sticky-header"),D=o.querySelector("#sticky-footer"),H=o.querySelector("#formio-wrapper"),M=o.querySelector("#comments-header");e.mode==="pdf"||e.mode==="print"?(o.classList.add(`${e.mode}-mode`),H&&H.classList.add(`${e.mode}-mode`),j&&(j.style.display="none"),D&&(D.style.display="none")):(j&&(j.style.display="flex"),D&&(D.style.display="flex")),M&&(M.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 B=n;if(n&&(l.info("[TF_SDK:23] \u2705 Processing file IDs in submission data (fetching from IndexedDB)..."),B=await be(n,s,r),l.info("[TF_SDK:24] \u2705 File IDs processed \u2014 handing off to form renderer")),u){let p=u.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-form.js to signal..."),await new Promise(p=>{let m=()=>{document.removeEventListener("LoadRNformReady",m),l.info("[TF_SDK:26] \u2705 loadTRform is now ready (LoadRNformReady event received)"),p()};document.addEventListener("LoadRNformReady",m),typeof window.loadTRform=="function"&&m()})):l.info("[TF_SDK:27] \u2705 loadTRform already available \u2014 invoking immediately"),l.info("[TF_SDK:28] \u2705 Handing off to loadTRform (web-turbo-form.js)..."),await window.loadTRform(f,B,e.themeData,e.mode,e.language,e.translations,e.controlData,e.privateExternal,e.permission,r),Se(),{sendAction:p=>{var m;p.type==="SET_IMAGE_DATA"&&((m=window.setImageData)==null||m.call(window,p.imageData,p.controlId,p.fileName))},destroy:()=>{o.innerHTML=""}}}window.closeDocumentsModal=function(){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"),i=await te();t.style.display=i?"block":"none",n&&(n.style.display=i?"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 we(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=ye;window.hasDocuments=te;function Oe(){return"2.0.
|
|
290
|
+
`);if(!window.__unviredSdkScriptsLoaded&&!window.__unviredSdkScriptsLoading){window.__unviredSdkScriptsLoading=!0,l.info("[TF_SDK:14] \u2705 Loading SDK scripts (Formio, Recogito, components)..."),(m=>{if(u){let w=u.querySelector(".sdk-loader-text");w&&(w.textContent=m)}})("Initializing Form Engine & Components..."),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(){}});for(let m=0;m<y.length;m++){let w=y[m];if(w&&w.trim()){let A=document.createElement("script");A.textContent=w,A.setAttribute("data-unvired-script",`script-${m}`),document.head.appendChild(A),m%5===0&&await new Promise(q=>setTimeout(q,0))}}window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1,l.info("[TF_SDK:15] \u2705 All SDK scripts loaded successfully."),document.addEventListener("click",function(m){let w=document.getElementById("unvired-more-btn"),A=document.getElementById("moreTooltip");w&&A&&!w.contains(m.target)&&!A.contains(m.target)&&(A.style.display="none")})}else if(window.__unviredSdkScriptsLoading)l.info("[TF_SDK:19] \u26A0\uFE0F Scripts are currently loading by another instance - waiting..."),await new Promise(p=>{let m=setInterval(()=>{window.__unviredSdkScriptsLoaded&&(clearInterval(m),p())},50)});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),u&&u.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=f,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=r,window.taskId=e.taskId||((ie=e.controlData)==null?void 0:ie.taskId)||window.taskId||"",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",OPEN_CAMERA:"OPEN_CAMERA",BARCODE_SCAN:"BARCODE_SCAN",LOCATION_REQUEST:"LOCATION_REQUEST",ACTION:"ACTION"};let S=o.querySelector("#form-back-btn"),P=o.querySelector("#unvired-more-btn");S&&(e.showBackButton?S.style.setProperty("display","flex","important"):S.style.setProperty("display","none","important")),P&&!e.showMoreButton&&P.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 C={};if(((ae=e.environmentVariable)==null?void 0:ae.length)>0)for(let p of e.environmentVariable)for(let m in p)C[m]=p[m];Object.keys(C).length>0&&(window.env=C);let j=o.querySelector("#sticky-header"),D=o.querySelector("#sticky-footer"),H=o.querySelector("#formio-wrapper"),M=o.querySelector("#comments-header");e.mode==="pdf"||e.mode==="print"?(o.classList.add(`${e.mode}-mode`),H&&H.classList.add(`${e.mode}-mode`),j&&(j.style.display="none"),D&&(D.style.display="none")):(j&&(j.style.display="flex"),D&&(D.style.display="flex")),M&&(M.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 B=n;if(n&&(l.info("[TF_SDK:23] \u2705 Processing file IDs in submission data (fetching from IndexedDB)..."),B=await be(n,s,r),l.info("[TF_SDK:24] \u2705 File IDs processed \u2014 handing off to form renderer")),u){let p=u.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-form.js to signal..."),await new Promise(p=>{let m=()=>{document.removeEventListener("LoadRNformReady",m),l.info("[TF_SDK:26] \u2705 loadTRform is now ready (LoadRNformReady event received)"),p()};document.addEventListener("LoadRNformReady",m),typeof window.loadTRform=="function"&&m()})):l.info("[TF_SDK:27] \u2705 loadTRform already available \u2014 invoking immediately"),l.info("[TF_SDK:28] \u2705 Handing off to loadTRform (web-turbo-form.js)..."),await window.loadTRform(f,B,e.themeData,e.mode,e.language,e.translations,e.controlData,e.privateExternal,e.permission,r),Se(),{sendAction:p=>{var m;p.type==="SET_IMAGE_DATA"&&((m=window.setImageData)==null||m.call(window,p.imageData,p.controlId,p.fileName))},destroy:()=>{o.innerHTML=""}}}window.closeDocumentsModal=function(){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"),i=await te();t.style.display=i?"block":"none",n&&(n.style.display=i?"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 we(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=ye;window.hasDocuments=te;function Oe(){return"2.0.91"}function oe(t){let n=typeof t=="string"?document.getElementById(t):t;n||(n=document.querySelector(".tf-embed-sdk")||document.body);let i=n.querySelectorAll("table"),o=0,e=null;return i.forEach(r=>{let a=r.getBoundingClientRect().width;a>o&&(o=a,e=r)}),{maxWidth:o,widestTable:e}}window.getMaxTableWidth=oe;typeof window!="undefined"&&(window.TurboForms=window.TurboForms||{loadForm:Ae,getBuildVersion:Oe,getMaxTableWidth:oe});return Le(Ke);})();
|
package/package.json
CHANGED