cat-qw-lib 2.1.53 → 2.1.55

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.
@@ -5783,12 +5783,13 @@ class WidgetContainerComponent {
5783
5783
  onUpdatedWidgetList = new EventEmitter();
5784
5784
  destroy$ = new Subject();
5785
5785
  ngOnInit() {
5786
- // Subscribe to widget list changes to handle async loading
5787
5786
  this.widgetQuery.getWidgetList()
5788
5787
  .pipe(takeUntil(this.destroy$))
5789
5788
  .subscribe((data) => {
5790
- this.updateWidgetStyles(data);
5791
- this.onUpdatedWidgetList.emit(data);
5789
+ if (data) {
5790
+ this.updateWidgetStyles(data[0]);
5791
+ this.onUpdatedWidgetList.emit(data);
5792
+ }
5792
5793
  });
5793
5794
  }
5794
5795
  updateWidgetStyles(widget) {
@@ -5797,8 +5798,6 @@ class WidgetContainerComponent {
5797
5798
  const styleExpression = this.styleBulderService.parseStyleObject(widget.style.widgetCardStyleExpression);
5798
5799
  this.widgetCardStyle = this.styleBulderService.getItemStyle(parsedItemStyle);
5799
5800
  this.widgetCardStyleExpression = widget.style.widgetCardStyleExpression ? this.styleBulderService.getItemStyle(styleExpression) : {};
5800
- console.log('Style Expression:', styleExpression);
5801
- console.log('Widget Card Style:', this.widgetCardStyle);
5802
5801
  this.widgetCombinedStyle = { ...this.widgetCardStyle, ...this.widgetCardStyleExpression };
5803
5802
  }
5804
5803
  }
@@ -5807,19 +5806,6 @@ class WidgetContainerComponent {
5807
5806
  this.isMenu = changes[SHARED.IS_MENU].currentValue;
5808
5807
  this.widgetStore.setIsMenu(this.isMenu);
5809
5808
  }
5810
- // Handle widgetName changes to update styles
5811
- if (changes['widgetName'] && this.widgetName) {
5812
- this.updateStylesForCurrentWidget();
5813
- }
5814
- }
5815
- updateStylesForCurrentWidget() {
5816
- this.widgetQuery.getWidgetList()
5817
- .pipe(takeUntil(this.destroy$))
5818
- .subscribe((data) => {
5819
- if (data && data.style) {
5820
- this.updateWidgetStyles(data);
5821
- }
5822
- });
5823
5809
  }
5824
5810
  handleViewAllDetails(event) {
5825
5811
  this.onViewAllDetails.emit(event);