mdas-jsview-sdk 1.0.9-uat.0 → 1.0.10-uat.0

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.
@@ -1766,7 +1766,7 @@ const SharedStyles = `
1766
1766
  .widget {
1767
1767
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
1768
1768
  width: 100%;
1769
- max-width: 800px;
1769
+ max-width: 1400px;
1770
1770
  }
1771
1771
 
1772
1772
  /* HEADER STYLES */
@@ -2620,7 +2620,7 @@ const OptionsStyles = `
2620
2620
  .options-widget {
2621
2621
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
2622
2622
  color: #333;
2623
- max-width: 800px;
2623
+ max-width: 1400px;
2624
2624
  width: 100%;
2625
2625
  margin: 0 auto;
2626
2626
  position: relative;
@@ -37720,11 +37720,26 @@ class IntradayChartWidget extends BaseWidget {
37720
37720
  });
37721
37721
  }
37722
37722
  addStyles() {
37723
+ // Skip style injection if external styles are detected or explicitly disabled
37724
+ if (this.options.skipStyleInjection || document.querySelector('link[href*="mdas-styles.css"]')) {
37725
+ if (this.debug) {
37726
+ console.log('[IntradayChartWidget] Skipping style injection - external styles detected');
37727
+ }
37728
+ return;
37729
+ }
37723
37730
  if (!document.querySelector('#intraday-chart-styles')) {
37724
- const styleSheet = document.createElement('style');
37725
- styleSheet.id = 'intraday-chart-styles';
37726
- styleSheet.textContent = IntradayChartStyles;
37727
- document.head.appendChild(styleSheet);
37731
+ try {
37732
+ const styleSheet = document.createElement('style');
37733
+ styleSheet.id = 'intraday-chart-styles';
37734
+ styleSheet.textContent = IntradayChartStyles;
37735
+ document.head.appendChild(styleSheet);
37736
+ if (this.debug) {
37737
+ console.log('[IntradayChartWidget] Styles injected successfully');
37738
+ }
37739
+ } catch (error) {
37740
+ console.warn('[IntradayChartWidget] Failed to inject styles:', error);
37741
+ console.warn('[IntradayChartWidget] Please add <link rel="stylesheet" href="mdas-styles.css"> to your HTML');
37742
+ }
37728
37743
  }
37729
37744
  }
37730
37745
  async loadChartData() {