@unvired/turboforms-embed-sdk 2.0.65 → 2.0.67

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.
@@ -30157,14 +30157,32 @@ class SmartFileComponent extends FieldComponent {
30157
30157
  this.takePicture();
30158
30158
  });
30159
30159
  }
30160
- let currentObj = this;
30161
30160
  if (this.refs.toggleCameraMode) {
30162
30161
  this.addEventListener(this.refs.toggleCameraMode, 'click', (event) => {
30163
30162
  event.preventDefault();
30164
- let id = currentObj.id
30163
+ let id = this.component.id;
30165
30164
  isfileBrowse = false;
30166
- this.cameraMode = !this.cameraMode;
30167
- this.redraw();
30165
+ window.isListenerSet = false;
30166
+ let eventCustom = new CustomEvent("openCamera", {
30167
+ detail: {
30168
+ controlId: id,
30169
+ },
30170
+ });
30171
+
30172
+ if (window.parent && window.parent !== window) {
30173
+ window.parent.postMessage(
30174
+ {
30175
+ type: "OPEN_CAMERA",
30176
+ data: { controlId: id },
30177
+ status: "sucess",
30178
+ message: "camera triggerd",
30179
+ },
30180
+ "*"
30181
+ );
30182
+ }
30183
+
30184
+ logger.info("[TF_SDK:84b] ✅ Dispatching openCamera event from toggleCameraMode for controlId:", id);
30185
+ document.dispatchEvent(eventCustom);
30168
30186
  });
30169
30187
  }
30170
30188
 
@@ -41711,7 +41729,7 @@ initThemeHook();
41711
41729
  </div>
41712
41730
 
41713
41731
  <div id="sticky-footer">
41714
- <div class="build-version">SDK v2.0.65</div>
41732
+ <div class="build-version">SDK v2.0.67</div>
41715
41733
 
41716
41734
  <button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
41717
41735
  <i class="bi bi-chevron-left"></i> Previous