@weldsuite/helpdesk-widget-sdk 1.0.2 → 1.0.3

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.
@@ -618,20 +618,42 @@ class IframeManager {
618
618
  const container = document.createElement('div');
619
619
  container.className = 'weld-widget-frame';
620
620
  container.setAttribute('data-state', 'closed');
621
- container.style.cssText = `
622
- position: fixed;
623
- bottom: ${widget.position.bottom};
624
- right: ${widget.position.right};
625
- width: ${widget.width};
626
- height: ${widget.height};
627
- max-width: 100vw;
628
- z-index: 2147483001;
629
- pointer-events: none;
630
- display: none;
631
- border-radius: 16px;
632
- overflow: hidden;
633
- background: transparent;
634
- `;
621
+ // Apply different styles for mobile vs desktop
622
+ if (this.deviceInfo.isMobile) {
623
+ // Mobile: full-screen
624
+ container.style.cssText = `
625
+ position: fixed;
626
+ top: 0;
627
+ left: 0;
628
+ right: 0;
629
+ bottom: 0;
630
+ width: 100vw;
631
+ height: 100vh;
632
+ z-index: 2147483001;
633
+ pointer-events: none;
634
+ display: none;
635
+ border-radius: 0;
636
+ overflow: hidden;
637
+ background: transparent;
638
+ `;
639
+ }
640
+ else {
641
+ // Desktop: positioned widget
642
+ container.style.cssText = `
643
+ position: fixed;
644
+ bottom: ${widget.position.bottom};
645
+ right: ${widget.position.right};
646
+ width: ${widget.width};
647
+ height: ${widget.height};
648
+ max-width: 100vw;
649
+ z-index: 2147483001;
650
+ pointer-events: none;
651
+ display: none;
652
+ border-radius: 16px;
653
+ overflow: hidden;
654
+ background: transparent;
655
+ `;
656
+ }
635
657
  // Create iframe
636
658
  const iframe = document.createElement('iframe');
637
659
  iframe.name = widget.name;
@@ -643,7 +665,7 @@ class IframeManager {
643
665
  border: none;
644
666
  background: transparent;
645
667
  display: block;
646
- border-radius: 16px;
668
+ border-radius: ${this.deviceInfo.isMobile ? '0' : '16px'};
647
669
  `;
648
670
  iframe.setAttribute('allow', 'clipboard-write; camera; microphone');
649
671
  iframe.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms allow-popups allow-downloads');
@@ -2009,7 +2031,7 @@ class StateCoordinator {
2009
2031
  }
2010
2032
  }
2011
2033
 
2012
- var version = "1.0.2";
2034
+ var version = "1.0.3";
2013
2035
  var packageJson = {
2014
2036
  version: version};
2015
2037