@schneideress/dashboardframework 0.0.28 → 0.0.29

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.
@@ -592,17 +592,57 @@ var RADashboardArea = /** @class */ (function () {
592
592
  */
593
593
  function () {
594
594
  if (widgetList) {
595
- widgetList.forEach((/**
596
- * @param {?} widgetInfo
597
- * @return {?}
598
- */
599
- function (widgetInfo) {
600
- _this.addWidget(widgetInfo);
601
- }));
595
+ // widgetList.forEach(widgetInfo => {
596
+ // this.addWidget(widgetInfo);
597
+ // });
598
+ _this.addWidgetListToGridster(widgetList, 0);
602
599
  }
603
600
  }));
604
601
  }));
605
602
  };
603
+ /**
604
+ * temp fix- recursive method to iterate over the list of items
605
+ * and add them to gridster in the given order
606
+ * @param widgetList -list of widgets
607
+ * @param index -index of the current value to be added
608
+ */
609
+ /**
610
+ * temp fix- recursive method to iterate over the list of items
611
+ * and add them to gridster in the given order
612
+ * @param {?} widgetList -list of widgets
613
+ * @param {?} index -index of the current value to be added
614
+ * @return {?}
615
+ */
616
+ RADashboardArea.prototype.addWidgetListToGridster = /**
617
+ * temp fix- recursive method to iterate over the list of items
618
+ * and add them to gridster in the given order
619
+ * @param {?} widgetList -list of widgets
620
+ * @param {?} index -index of the current value to be added
621
+ * @return {?}
622
+ */
623
+ function (widgetList, index) {
624
+ /** @type {?} */
625
+ var areaContext = this;
626
+ /** @type {?} */
627
+ var indexVal = index + 1;
628
+ if (index > widgetList.length - 1)
629
+ return;
630
+ else {
631
+ if (index == 0) {
632
+ areaContext.addWidget(widgetList[index]);
633
+ areaContext.addWidgetListToGridster(widgetList, indexVal);
634
+ }
635
+ else {
636
+ setTimeout((/**
637
+ * @return {?}
638
+ */
639
+ function () {
640
+ areaContext.addWidget(widgetList[index]);
641
+ areaContext.addWidgetListToGridster(widgetList, indexVal);
642
+ }), 1000);
643
+ }
644
+ }
645
+ };
606
646
  /**
607
647
  * @return {?}
608
648
  */
@@ -730,7 +770,7 @@ var RADashboardArea = /** @class */ (function () {
730
770
  this.widgetList.splice(this.widgetList.indexOf(widget[0]), 1);
731
771
  this.setAreaHeight();
732
772
  if (!isalertDisabled) {
733
- this.notifier.notify('success', " " + this.translateService.translate('DeletedSuccesfully') + " [" + widget[0].widgetInfo.widgetTitle + "] " + this.translateService.translate('Widget') + " ");
773
+ this.notifier.notify('success', " " + this.translateService.translate('Widget') + " [" + widget[0].widgetInfo.widgetTitle + "] " + this.translateService.translate('DeletedSuccesfully') + " ");
734
774
  }
735
775
  }
736
776
  };
@@ -1086,6 +1126,7 @@ var RAWidgetContainer = /** @class */ (function () {
1086
1126
  * @return {?}
1087
1127
  */
1088
1128
  function () {
1129
+ console.log('widget initialized ' + widgetInfo.widgetInstanceId);
1089
1130
  widgetConfigFilter.appConfig = _this.appConfig;
1090
1131
  widgetConfigFilter.widgetInfo = (/** @type {?} */ ({}));
1091
1132
  widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;