@unvired/turboforms-embed-sdk 2.0.70 → 2.0.72

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.
@@ -30140,7 +30140,7 @@ class SmartFileComponent extends FieldComponent {
30140
30140
  correctOrientation: false,
30141
30141
  });
30142
30142
  } else {
30143
- let id = this.component.id;
30143
+ let id = this.id;
30144
30144
  isfileBrowse = false;
30145
30145
  window.isListenerSet = false;
30146
30146
  let eventCustom = new CustomEvent("openCamera", {
@@ -30176,7 +30176,7 @@ class SmartFileComponent extends FieldComponent {
30176
30176
  if (this.refs.toggleCameraMode) {
30177
30177
  this.addEventListener(this.refs.toggleCameraMode, 'click', (event) => {
30178
30178
  event.preventDefault();
30179
- let id = this.component.id;
30179
+ let id = this.id;
30180
30180
  isfileBrowse = false;
30181
30181
  window.isListenerSet = false;
30182
30182
  let eventCustom = new CustomEvent("openCamera", {
@@ -30245,9 +30245,9 @@ class SmartFileComponent extends FieldComponent {
30245
30245
  }
30246
30246
  }
30247
30247
  let that = this;
30248
- document.addEventListener('capureImageData', function (event) {
30248
+ this.addEventListener(document, 'capureImageData', function (event) {
30249
30249
  logger.info("[TF_SDK:84] ✅ event.detail.controlId =" + event.detail.controlId)
30250
- if (that.component.id == event.detail.controlId) {
30250
+ if (that.id == event.detail.controlId) {
30251
30251
  if (!window.isListenerSet) {
30252
30252
  const isBase64 = typeof event.detail.imageData === 'string' && event.detail.imageData.startsWith('data:');
30253
30253
  if (isBase64 || typeof window.resolveLocalFileSystemURL !== 'function') {
@@ -30260,7 +30260,9 @@ class SmartFileComponent extends FieldComponent {
30260
30260
  while (n--) {
30261
30261
  u8arr[n] = bstr.charCodeAt(n);
30262
30262
  }
30263
- return new File([u8arr], filename, { type: contentType });
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,
@@ -30295,9 +30297,9 @@ class SmartFileComponent extends FieldComponent {
30295
30297
  }, false);
30296
30298
 
30297
30299
 
30298
- document.addEventListener('capureImageDataForAndroidBrowser', function (event) {
30300
+ this.addEventListener(document, 'capureImageDataForAndroidBrowser', function (event) {
30299
30301
  logger.info("[TF_SDK:89] ✅ event.detail.controlId capureImageDataForAndroidBrowser =" + event.detail.controlId)
30300
- if (that.component.id == event.detail.controlId) {
30302
+ if (that.id == event.detail.controlId) {
30301
30303
  if (!window.isListenerSet) {
30302
30304
  that.compressFile([event.detail.imageData])
30303
30305
  // window.resolveLocalFileSystemURL(event.detail.imageData, (fileEntry) => {
@@ -30524,7 +30526,7 @@ class SmartFileComponent extends FieldComponent {
30524
30526
 
30525
30527
  getInitFileToSync(file) {
30526
30528
  const escapedFileName = file.name
30527
- ? file.name.replaceAll('<', '&lt;').replaceAll('>', '&gt;')
30529
+ ? file.name.replace(/</g, '&lt;').replace(/>/g, '&gt;')
30528
30530
  : file.name;
30529
30531
  return {
30530
30532
  id: createRandomString(),
@@ -41745,7 +41747,7 @@ initThemeHook();
41745
41747
  </div>
41746
41748
 
41747
41749
  <div id="sticky-footer">
41748
- <div class="build-version">SDK v2.0.70</div>
41750
+ <div class="build-version">SDK v2.0.72</div>
41749
41751
 
41750
41752
  <button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
41751
41753
  <i class="bi bi-chevron-left"></i> Previous