@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.
package/dist/react.esm.js CHANGED
@@ -558,20 +558,42 @@ class IframeManager {
558
558
  const container = document.createElement('div');
559
559
  container.className = 'weld-widget-frame';
560
560
  container.setAttribute('data-state', 'closed');
561
- container.style.cssText = `
562
- position: fixed;
563
- bottom: ${widget.position.bottom};
564
- right: ${widget.position.right};
565
- width: ${widget.width};
566
- height: ${widget.height};
567
- max-width: 100vw;
568
- z-index: 2147483001;
569
- pointer-events: none;
570
- display: none;
571
- border-radius: 16px;
572
- overflow: hidden;
573
- background: transparent;
574
- `;
561
+ // Apply different styles for mobile vs desktop
562
+ if (this.deviceInfo.isMobile) {
563
+ // Mobile: full-screen
564
+ container.style.cssText = `
565
+ position: fixed;
566
+ top: 0;
567
+ left: 0;
568
+ right: 0;
569
+ bottom: 0;
570
+ width: 100vw;
571
+ height: 100vh;
572
+ z-index: 2147483001;
573
+ pointer-events: none;
574
+ display: none;
575
+ border-radius: 0;
576
+ overflow: hidden;
577
+ background: transparent;
578
+ `;
579
+ }
580
+ else {
581
+ // Desktop: positioned widget
582
+ container.style.cssText = `
583
+ position: fixed;
584
+ bottom: ${widget.position.bottom};
585
+ right: ${widget.position.right};
586
+ width: ${widget.width};
587
+ height: ${widget.height};
588
+ max-width: 100vw;
589
+ z-index: 2147483001;
590
+ pointer-events: none;
591
+ display: none;
592
+ border-radius: 16px;
593
+ overflow: hidden;
594
+ background: transparent;
595
+ `;
596
+ }
575
597
  // Create iframe
576
598
  const iframe = document.createElement('iframe');
577
599
  iframe.name = widget.name;
@@ -583,7 +605,7 @@ class IframeManager {
583
605
  border: none;
584
606
  background: transparent;
585
607
  display: block;
586
- border-radius: 16px;
608
+ border-radius: ${this.deviceInfo.isMobile ? '0' : '16px'};
587
609
  `;
588
610
  iframe.setAttribute('allow', 'clipboard-write; camera; microphone');
589
611
  iframe.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms allow-popups allow-downloads');
@@ -1949,7 +1971,7 @@ class StateCoordinator {
1949
1971
  }
1950
1972
  }
1951
1973
 
1952
- var version = "1.0.2";
1974
+ var version = "1.0.3";
1953
1975
  var packageJson = {
1954
1976
  version: version};
1955
1977