@unvired/turboforms-embed-sdk 2.0.12 → 2.0.19

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.
@@ -2179,8 +2179,8 @@
2179
2179
  </style>
2180
2180
  <link href="css/index.css" rel="stylesheet">
2181
2181
  <style>/* ==========================================================================
2182
- UNVIRED DIGITAL FORMS - CORE SDK STYLES
2183
- Consolidated and cleaned version of unvired-forms.css
2182
+ TURBO DIGITAL FORMS - CORE SDK STYLES
2183
+ Consolidated and cleaned version of turbo-forms.css
2184
2184
  ========================================================================== */
2185
2185
 
2186
2186
  /* 1. Structural Root & Wrapper */
@@ -41364,7 +41364,7 @@ function onChangeButtonSetup(
41364
41364
  }
41365
41365
 
41366
41366
  // Main form loader
41367
- async function loadRNform(
41367
+ async function loadTRform(
41368
41368
  template,
41369
41369
  formPreviousData,
41370
41370
  themeData,
@@ -41380,7 +41380,7 @@ async function loadRNform(
41380
41380
 
41381
41381
  // Reset cache for clean state
41382
41382
  resetFormCache();
41383
- console.log("[FormIO] ▶ loadRNform() entered", { mode, permission, privateExternal, language });
41383
+ console.log("[FormIO] ▶ loadTRform() entered", { mode, permission, privateExternal, language });
41384
41384
 
41385
41385
  attachmentfileKeysSDK = attachmentfileKeys;
41386
41386
 
@@ -42233,7 +42233,7 @@ window.checkMoreButtonVisibility = function () {
42233
42233
  window.checkMoreButtonVisibility();
42234
42234
 
42235
42235
  window.loadComments = loadComments;
42236
- window.loadRNform = loadRNform;
42236
+ window.loadTRform = loadTRform;
42237
42237
  window.FormOnSave = FormOnSave;
42238
42238
  window.FormOnBack = FormOnBack;
42239
42239
  window.setImageData = setImageData;
@@ -42262,7 +42262,7 @@ window.formOnSubmitFunction = FormOnSubmit;
42262
42262
 
42263
42263
  window.resetFormCache = resetFormCache;
42264
42264
 
42265
- // Notify that loadRNform is ready (for event-based coordination)
42265
+ // Notify that loadTRform is ready (for event-based coordination)
42266
42266
  document.dispatchEvent(new CustomEvent('LoadRNformReady'));
42267
42267
 
42268
42268
  </script>
@@ -42540,14 +42540,14 @@ async function goToformRender() {
42540
42540
  window.resetFormCache();
42541
42541
  }
42542
42542
 
42543
- if (typeof window.loadRNform === "function") {
42543
+ if (typeof window.loadTRform === "function") {
42544
42544
  try {
42545
42545
  if (window.commentsResponse && window.commentsResponse.destroy) {
42546
42546
  window.commentsResponse.destroy();
42547
42547
  console.log('[Comments] 🗑️ Previous Recogito instance destroyed');
42548
42548
  }
42549
- console.log('[Comments] 🚀 Re-invoking loadRNform()...');
42550
- await window.loadRNform(
42549
+ console.log('[Comments] 🚀 Re-invoking loadTRform()...');
42550
+ await window.loadTRform(
42551
42551
  window.FORM_TEMPLATE,
42552
42552
  window.FORM_SUB_TEMP?.data || window.FORM_SUB_TEMP,
42553
42553
  window.FORM_THEME_DATA,
@@ -42575,7 +42575,7 @@ async function goToformRender() {
42575
42575
  }
42576
42576
  }
42577
42577
  } else {
42578
- console.error("loadRNform is not defined");
42578
+ console.error("loadTRform is not defined");
42579
42579
  }
42580
42580
  }
42581
42581
 
@@ -42622,7 +42622,7 @@ window.loadCommentsform = loadCommentsform;
42622
42622
  window.CommentOnBack = CommentOnBack;
42623
42623
 
42624
42624
  </script>
42625
-
42625
+
42626
42626
  <script src="custom-theme/custom-theme.js"></script>
42627
42627
  </head>
42628
42628
 
@@ -42662,7 +42662,7 @@ window.CommentOnBack = CommentOnBack;
42662
42662
 
42663
42663
 
42664
42664
  <div id="sticky-footer">
42665
- <div class="build-version">SDK v2.0.12</div>
42665
+ <div class="build-version">SDK v2.0.19</div>
42666
42666
  <div class="relative-position">
42667
42667
  <button id="unvired-more-btn" class="ui button primary dataGrid-addRow" onclick="toggleTooltip()">
42668
42668
  <i class="icon options"></i>
@@ -42821,169 +42821,169 @@ window.CommentOnBack = CommentOnBack;
42821
42821
  });
42822
42822
  </script>
42823
42823
  </body>
42824
- <script>
42825
- window.addEventListener("message", (event) => {
42826
- const {
42827
- type, template, formPreviousData, mode,
42828
- platform, language, translations,
42829
- environmentVariable, themeData,
42830
- userData, controlData, showBackButton, showMoreButton,
42831
- privateExternal, permission, attachmentfileKeys, commentsData, vobArr,
42832
- userList
42833
- } = event.data;
42834
-
42835
- if (showBackButton === true) {
42836
- document.getElementById('form-back-btn').style.display = 'inline-block';
42837
- } else {
42838
- document.getElementById('form-back-btn').style.display = 'none';
42839
- }
42824
+ <script>
42825
+ window.addEventListener("message", (event) => {
42826
+ const {
42827
+ type, template, formPreviousData, mode,
42828
+ platform, language, translations,
42829
+ environmentVariable, themeData,
42830
+ userData, controlData, showBackButton, showMoreButton,
42831
+ privateExternal, permission, attachmentfileKeys, commentsData, vobArr,
42832
+ userList
42833
+ } = event.data;
42834
+
42835
+ if (showBackButton === true) {
42836
+ document.getElementById('form-back-btn').style.display = 'inline-block';
42837
+ } else {
42838
+ document.getElementById('form-back-btn').style.display = 'none';
42839
+ }
42840
42840
 
42841
- if (showMoreButton == false) {
42842
- document.getElementById('unvired-more-btn').style.display = 'none';
42843
- }
42844
- document.getElementById("comments-header").style.display = "none";
42841
+ if (showMoreButton == false) {
42842
+ document.getElementById('unvired-more-btn').style.display = 'none';
42843
+ }
42844
+ document.getElementById("comments-header").style.display = "none";
42845
42845
 
42846
- if (platform == "web") {
42847
- window.platform.isBrowser = true;
42848
- window.platform.isAndroid = false;
42849
- window.platform.iosPlatform = false;
42850
- } else if (platform == "android") {
42851
- window.platform.isBrowser = false;
42852
- window.platform.isAndroid = true;
42853
- window.platform.iosPlatform = false;
42854
- } else if (platform == "ios") {
42855
- window.platform.isBrowser = false;
42856
- window.platform.isAndroid = false;
42857
- window.platform.iosPlatform = true;
42858
- }
42846
+ if (platform == "web") {
42847
+ window.platform.isBrowser = true;
42848
+ window.platform.isAndroid = false;
42849
+ window.platform.iosPlatform = false;
42850
+ } else if (platform == "android") {
42851
+ window.platform.isBrowser = false;
42852
+ window.platform.isAndroid = true;
42853
+ window.platform.iosPlatform = false;
42854
+ } else if (platform == "ios") {
42855
+ window.platform.isBrowser = false;
42856
+ window.platform.isAndroid = false;
42857
+ window.platform.iosPlatform = true;
42858
+ }
42859
42859
 
42860
- let envData = {};
42861
- if (environmentVariable?.length > 0) {
42862
- for (let obj of environmentVariable) {
42863
- for (let key in obj) {
42864
- envData[key] = obj[key];
42865
- }
42860
+ let envData = {};
42861
+ if (environmentVariable?.length > 0) {
42862
+ for (let obj of environmentVariable) {
42863
+ for (let key in obj) {
42864
+ envData[key] = obj[key];
42866
42865
  }
42867
42866
  }
42867
+ }
42868
42868
 
42869
- if (Object.keys(envData).length > 0) {
42870
- window.env = envData;
42871
- }
42869
+ if (Object.keys(envData).length > 0) {
42870
+ window.env = envData;
42871
+ }
42872
42872
 
42873
- const wrapper = document.getElementById('formio-wrapper');
42874
- const body = document.getElementById('main-body');
42875
- const stickyFooter = document.getElementById('sticky-footer');
42873
+ const wrapper = document.getElementById('formio-wrapper');
42874
+ const body = document.getElementById('main-body');
42875
+ const stickyFooter = document.getElementById('sticky-footer');
42876
42876
 
42877
- if (wrapper) {
42878
- wrapper.classList.remove('pdf-mode', 'print-mode');
42879
- if (mode === 'pdf' || mode === 'print') {
42880
- wrapper.classList.add(`${mode}-mode`);
42881
- }
42877
+ if (wrapper) {
42878
+ wrapper.classList.remove('pdf-mode', 'print-mode');
42879
+ if (mode === 'pdf' || mode === 'print') {
42880
+ wrapper.classList.add(`${mode}-mode`);
42882
42881
  }
42883
- if (body) {
42884
- body.classList.remove('pdf-mode', 'print-mode');
42885
- if (mode === 'pdf' || mode === 'print') {
42886
- body.classList.add(`${mode}-mode`);
42887
- }
42882
+ }
42883
+ if (body) {
42884
+ body.classList.remove('pdf-mode', 'print-mode');
42885
+ if (mode === 'pdf' || mode === 'print') {
42886
+ body.classList.add(`${mode}-mode`);
42888
42887
  }
42889
- if (stickyFooter) {
42890
- if (mode === 'pdf' || mode === 'print' || event.data.showFooter === false || event.data.showFooter === 'false') {
42891
- stickyFooter.classList.add('footer-hidden');
42888
+ }
42889
+ if (stickyFooter) {
42890
+ if (mode === 'pdf' || mode === 'print' || event.data.showFooter === false || event.data.showFooter === 'false') {
42891
+ stickyFooter.classList.add('footer-hidden');
42892
+ } else {
42893
+ stickyFooter.classList.remove('footer-hidden');
42894
+ }
42895
+ }
42896
+
42897
+ // Apply Card Mode
42898
+ if (wrapper) {
42899
+ const existingContainer = wrapper.parentElement.classList.contains('form-card-container') ? wrapper.parentElement : null;
42900
+
42901
+ if (themeData?.isCard) {
42902
+ if (!existingContainer) {
42903
+ const containerDiv = document.createElement('div');
42904
+ containerDiv.className = 'form-card-container';
42905
+ wrapper.parentNode.insertBefore(containerDiv, wrapper);
42906
+ containerDiv.appendChild(wrapper);
42907
+ }
42908
+ const target = existingContainer || wrapper.parentElement;
42909
+ if (themeData.cardBackground) {
42910
+ target.style.setProperty('background-color', themeData.cardBackground, 'important');
42911
+ }
42912
+ } else if (existingContainer) {
42913
+ existingContainer.parentNode.insertBefore(wrapper, existingContainer);
42914
+ existingContainer.parentNode.removeChild(existingContainer);
42915
+ }
42916
+ }
42917
+
42918
+ if (type === "LOAD_FORM_TEMPLATE") {
42919
+ // Show loader when form starts loading (unless disabled)
42920
+ const sdkLoader = document.getElementById('sdk-form-loader');
42921
+ const showLoader = event.data.showLoader !== false; // default is true
42922
+
42923
+ if (showLoader && sdkLoader) {
42924
+ sdkLoader.classList.remove('hidden');
42925
+ }
42926
+
42927
+ if (language) window.FORMIO_LANGUAGE = language;
42928
+ if (translations) window.FORMIO_I18N = translations;
42929
+ if (userData) {
42930
+ window.form = window.form || {};
42931
+ Object.assign(window.form, userData);
42932
+ }
42933
+
42934
+ if (event.data && event.data.type === "LOAD_FORM_TEMPLATE") {
42935
+ window.FORM_TEMPLATE = template;
42936
+ window.FORM_PREVIOUS_DATA = formPreviousData;
42937
+ window.FORM_MODE = mode;
42938
+ window.FORM_COMMENTS_DATA = commentsData || [];
42939
+ window.FORM_VOB_ARR = vobArr || [];
42940
+ window.FORM_USERS_LIST = userList || [];
42941
+
42942
+ window.FORM_PLATFORM = platform;
42943
+ window.FORM_LANGUAGE = language;
42944
+ window.FORM_TRASLATIONS = translations;
42945
+ window.FORM_ENV = environmentVariable;
42946
+ window.FORM_THEME_DATA = themeData;
42947
+ window.FORM_USER_DATA = userData;
42948
+ window.FORM_CONTROL_DATA = controlData;
42949
+ window.FORM_PRIVATE_EXTERNAL = privateExternal;
42950
+ window.FORM_PERMISSION = permission;
42951
+ window.FORM_ATTACHMENT_FILE_KEYS = attachmentfileKeys;
42952
+
42953
+ if (typeof window.loadTRform === "function") {
42954
+ window.loadTRform(
42955
+ template,
42956
+ formPreviousData,
42957
+ themeData,
42958
+ mode,
42959
+ language,
42960
+ translations,
42961
+ controlData,
42962
+ privateExternal,
42963
+ permission,
42964
+ attachmentfileKeys
42965
+ );
42892
42966
  } else {
42893
- stickyFooter.classList.remove('footer-hidden');
42967
+ console.error("window.loadTRform is not defined");
42894
42968
  }
42895
42969
  }
42896
42970
 
42897
- // Apply Card Mode
42898
- if (wrapper) {
42899
- const existingContainer = wrapper.parentElement.classList.contains('form-card-container') ? wrapper.parentElement : null;
42900
-
42901
- if (themeData?.isCard) {
42902
- if (!existingContainer) {
42903
- const containerDiv = document.createElement('div');
42904
- containerDiv.className = 'form-card-container';
42905
- wrapper.parentNode.insertBefore(containerDiv, wrapper);
42906
- containerDiv.appendChild(wrapper);
42907
- }
42908
- const target = existingContainer || wrapper.parentElement;
42909
- if (themeData.cardBackground) {
42910
- target.style.setProperty('background-color', themeData.cardBackground, 'important');
42911
- }
42912
- } else if (existingContainer) {
42913
- existingContainer.parentNode.insertBefore(wrapper, existingContainer);
42914
- existingContainer.parentNode.removeChild(existingContainer);
42915
- }
42916
- }
42917
-
42918
- if (type === "LOAD_FORM_TEMPLATE") {
42919
- // Show loader when form starts loading (unless disabled)
42920
- const sdkLoader = document.getElementById('sdk-form-loader');
42921
- const showLoader = event.data.showLoader !== false; // default is true
42922
-
42923
- if (showLoader && sdkLoader) {
42924
- sdkLoader.classList.remove('hidden');
42925
- }
42926
-
42927
- if (language) window.FORMIO_LANGUAGE = language;
42928
- if (translations) window.FORMIO_I18N = translations;
42929
- if (userData) {
42930
- window.form = window.form || {};
42931
- Object.assign(window.form, userData);
42932
- }
42933
-
42934
- if (event.data && event.data.type === "LOAD_FORM_TEMPLATE") {
42935
- window.FORM_TEMPLATE = template;
42936
- window.FORM_PREVIOUS_DATA = formPreviousData;
42937
- window.FORM_MODE = mode;
42938
- window.FORM_COMMENTS_DATA = commentsData || [];
42939
- window.FORM_VOB_ARR = vobArr || [];
42940
- window.FORM_USERS_LIST = userList || [];
42941
-
42942
- window.FORM_PLATFORM = platform;
42943
- window.FORM_LANGUAGE = language;
42944
- window.FORM_TRASLATIONS = translations;
42945
- window.FORM_ENV = environmentVariable;
42946
- window.FORM_THEME_DATA = themeData;
42947
- window.FORM_USER_DATA = userData;
42948
- window.FORM_CONTROL_DATA = controlData;
42949
- window.FORM_PRIVATE_EXTERNAL = privateExternal;
42950
- window.FORM_PERMISSION = permission;
42951
- window.FORM_ATTACHMENT_FILE_KEYS = attachmentfileKeys;
42952
-
42953
- if (typeof window.loadRNform === "function") {
42954
- window.loadRNform(
42955
- template,
42956
- formPreviousData,
42957
- themeData,
42958
- mode,
42959
- language,
42960
- translations,
42961
- controlData,
42962
- privateExternal,
42963
- permission,
42964
- attachmentfileKeys
42965
- );
42966
- } else {
42967
- console.error("window.loadRNform is not defined");
42968
- }
42969
- }
42970
-
42971
- window.less = window.less || {};
42972
- Object.assign(window.less, {
42973
- async: true,
42974
- environment: 'production',
42975
- fileAsync: false,
42976
- onReady: true,
42977
- useFileCache: true
42978
- });
42979
- }
42971
+ window.less = window.less || {};
42972
+ Object.assign(window.less, {
42973
+ async: true,
42974
+ environment: 'production',
42975
+ fileAsync: false,
42976
+ onReady: true,
42977
+ useFileCache: true
42978
+ });
42979
+ }
42980
42980
 
42981
- if (type === "SET_IMAGE_DATA") {
42982
- if (typeof setImageData === "function") {
42983
- setImageData(event.data?.imageData, event.data?.controlId, event.data?.fileName)
42984
- }
42981
+ if (type === "SET_IMAGE_DATA") {
42982
+ if (typeof setImageData === "function") {
42983
+ setImageData(event.data?.imageData, event.data?.controlId, event.data?.fileName)
42985
42984
  }
42986
- });
42987
- </script>
42985
+ }
42986
+ });
42987
+ </script>
42988
42988
 
42989
42989
  </html>