@schneideress/dashboardframework 0.0.27 → 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
  };
@@ -940,7 +980,6 @@ var RAWidgetContainer = /** @class */ (function () {
940
980
  * @return {?}
941
981
  */
942
982
  function (e) {
943
- console.log('in config changed subscription');
944
983
  _this.ngZone.run((/**
945
984
  * @return {?}
946
985
  */
@@ -1054,20 +1093,8 @@ var RAWidgetContainer = /** @class */ (function () {
1054
1093
  */
1055
1094
  function (widgetInfo) {
1056
1095
  this.data.widgetInfo = widgetInfo;
1057
- // this.data.widgetInfo.widgetConfigInfo.config = config;
1058
1096
  this.refreshWidget(this.data.widgetInfo);
1059
- this.updateWidget(this.data.widgetInfo);
1060
- };
1061
- /**
1062
- * @param {?} widgetInfo
1063
- * @return {?}
1064
- */
1065
- RAWidgetContainer.prototype.updateWidget = /**
1066
- * @param {?} widgetInfo
1067
- * @return {?}
1068
- */
1069
- function (widgetInfo) {
1070
- this.dashboardService.updateWidget(widgetInfo, this.appConfig);
1097
+ // this.updateWidget(widgetInfo);
1071
1098
  };
1072
1099
  /** To load external custom element to the widget container*/
1073
1100
  /**
@@ -1099,6 +1126,7 @@ var RAWidgetContainer = /** @class */ (function () {
1099
1126
  * @return {?}
1100
1127
  */
1101
1128
  function () {
1129
+ console.log('widget initialized ' + widgetInfo.widgetInstanceId);
1102
1130
  widgetConfigFilter.appConfig = _this.appConfig;
1103
1131
  widgetConfigFilter.widgetInfo = (/** @type {?} */ ({}));
1104
1132
  widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
@@ -1133,7 +1161,7 @@ var RAWidgetContainer = /** @class */ (function () {
1133
1161
  RAWidgetContainer.decorators = [
1134
1162
  { type: Component, args: [{
1135
1163
  selector: 'ra-widget-container',
1136
- template: "<div class=\"wc-wrapper\">\r\n <div class=\"wcheader\">\r\n <div class=\"col-md-12 wc-mover\">\r\n <div class=\"row\">\r\n <div class=\"col-md-11 float-left\" style=\"width:96%;\">{{data.widgetInfo.widgetTitle}}\r\n </div>\r\n <div class=\"col-md-1\">\r\n <div class=\"float-right\">\r\n <div class=\"dropdown\">\r\n <div class=\"dropbtn gearIcon\"> <i class=\"fal fa-cog\"></i></div>\r\n <div class=\"dropdown-content widget-config-item\">\r\n <a (click)=\"editWidget()\">\r\n <i class=\"fal fa-edit\"></i>\r\n <span>Edit</span>\r\n </a>\r\n <a (click)=\"copyWidget()\">\r\n <i class=\"fal fa-copy\"></i>\r\n <span>Copy</span>\r\n </a>\r\n <a (click)=\"moveWidget()\">\r\n <i class=\"fal fa-arrows-alt\"></i>\r\n <span>Move</span>\r\n </a>\r\n <hr class=\"hr\">\r\n <a (click)=\"deleteWidget()\">\r\n <i class=\"fal fa-times\" style=\"padding-left: 3px;\"></i>\r\n <span>Delete</span>\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wcBody\">\r\n <div class=\"wcBodyBorder\" #ctlWidget></div>\r\n </div>\r\n</div>",
1164
+ template: "<div class=\"wc-wrapper\">\r\n <div class=\"wcheader\">\r\n <div class=\"col-md-12 wc-mover\">\r\n <div class=\"row\">\r\n <div class=\"col-md-11 float-left\" style=\"width:96%;\">{{data.widgetInfo.widgetTitle}}\r\n </div>\r\n <div class=\"col-md-1\">\r\n <div class=\"float-right\">\r\n <div class=\"dropdown\">\r\n <div class=\"dropbtn gearIcon\"> <i class=\"fal fa-cog\"></i></div>\r\n <div class=\"dropdown-content widget-config-item\">\r\n <a (click)=\"editWidget()\">\r\n <i class=\"fal fa-edit\"></i>\r\n <span>{{'Edit'|translate}}</span>\r\n </a>\r\n <a (click)=\"copyWidget()\">\r\n <i class=\"fal fa-copy\"></i>\r\n <span>{{'Copy'|translate}}</span>\r\n </a>\r\n <a (click)=\"moveWidget()\">\r\n <i class=\"fal fa-arrows-alt\"></i>\r\n <span>{{'Move'|translate}}</span>\r\n </a>\r\n <hr class=\"hr\">\r\n <a (click)=\"deleteWidget()\">\r\n <i class=\"fal fa-times\" style=\"padding-left: 3px;\"></i>\r\n <span>{{'Delete'|translate}}</span>\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wcBody\">\r\n <div class=\"wcBodyBorder\" #ctlWidget></div>\r\n </div>\r\n</div>",
1137
1165
  styles: [".wcheader{width:100%;height:26px;background:#fff;color:#3dcd58;padding:7px 7px 0 6px;font-family:\"Arial Rounded MT\";border-bottom:1px solid;border-color:#fff;font-size:16px}.wc-mover{cursor:all-scroll}.wcBody{padding:8px}.wcBodyBorder{border:1px dashed #e6e2e2}.sp_icon{float:left;margin:0 15% 0 0}.dropbtn{cursor:pointer;color:#42b4e6}.dropdown{visibility:hidden;opacity:0;transition:visibility,opacity .5s linear;position:relative}.dropdown hr{margin:0!important}.dropdown-content{display:none;position:absolute;right:0;background-color:#f9f9f9;min-width:100px;box-shadow:0 8px 16px 8px rgba(0,0,0,.2);z-index:1;font-size:12px;font-family:\"Arial Rounded MT\"}.dropdown-content a{color:#000;padding:5px 16px;text-decoration:none;display:block;cursor:pointer}.dropdown-content a:hover{background-color:#f1f1f1}.dropdown:hover .dropdown-content{display:block;-webkit-animation:.3s ease-out slide-down;animation:.3s ease-out slide-down}.wc-wrapper:hover .dropdown{visibility:visible;opacity:1}.dropdown:hover .dropbtn{color:#2b7797}.gearIcon{color:#42b4e6}.hr{border:0;border-top:1px solid rgba(0,0,0,.1)}@keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0)}}.widget-config-item i{font-size:17px;color:#42b4e6}.widget-config-item span{font-size:12px;font:inherit;padding-left:12px;color:#42b4e6}"]
1138
1166
  }] }
1139
1167
  ];
@@ -5717,7 +5745,8 @@ var DashboardFrameworkModule = /** @class */ (function () {
5717
5745
  NotifierModule.withConfig(customNotifierOptions)
5718
5746
  ],
5719
5747
  exports: [
5720
- RADashboardArea
5748
+ RADashboardArea,
5749
+ TranslateModule
5721
5750
  ],
5722
5751
  providers: [],
5723
5752
  bootstrap: [RADashboardArea]
@@ -5787,15 +5816,5 @@ var RaBaseDashboardFilter = /** @class */ (function () {
5787
5816
  return RaBaseDashboardFilter;
5788
5817
  }());
5789
5818
 
5790
- /**
5791
- * @fileoverview added by tsickle
5792
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5793
- */
5794
-
5795
- /**
5796
- * @fileoverview added by tsickle
5797
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5798
- */
5799
-
5800
5819
  export { DashboardFrameworkModule, RADashboardArea, RADashboardEventBus, RAEvent, RAEventKey, RAWidgetContainer, RaBaseDashboardFilter, RaBaseDashboardTemplate, RaDashboardService, GridsterModule as ɵa, GridsterComponent as ɵb, GridsterItemComponent as ɵc, GridsterPreviewComponent as ɵd, customNotifierOptions as ɵe };
5801
5820
  //# sourceMappingURL=schneideress-dashboardframework.js.map