@schneideress/dashboardframework 0.0.28 → 0.0.30
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/bundles/schneideress-dashboardframework.umd.js +60 -8
- package/bundles/schneideress-dashboardframework.umd.js.map +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -1
- package/esm2015/lib/ra-dashboard-area/ra.dashboard.area.js +36 -9
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +2 -1
- package/esm2015/lib/ra.base.dashboard.template.js +9 -1
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +49 -9
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +2 -1
- package/esm5/lib/ra.base.dashboard.template.js +12 -1
- package/fesm2015/schneideress-dashboardframework.js +44 -8
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +60 -8
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +7 -0
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +2 -2
- package/lib/ra.base.dashboard.template.d.ts +1 -0
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -466,17 +466,44 @@ class RADashboardArea {
|
|
|
466
466
|
*/
|
|
467
467
|
() => {
|
|
468
468
|
if (widgetList) {
|
|
469
|
-
widgetList.forEach(
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
widgetInfo => {
|
|
474
|
-
this.addWidget(widgetInfo);
|
|
475
|
-
}));
|
|
469
|
+
// widgetList.forEach(widgetInfo => {
|
|
470
|
+
// this.addWidget(widgetInfo);
|
|
471
|
+
// });
|
|
472
|
+
this.addWidgetListToGridster(widgetList, 0);
|
|
476
473
|
}
|
|
477
474
|
}));
|
|
478
475
|
}));
|
|
479
476
|
}
|
|
477
|
+
/**
|
|
478
|
+
* temp fix- recursive method to iterate over the list of items
|
|
479
|
+
* and add them to gridster in the given order
|
|
480
|
+
* @param {?} widgetList -list of widgets
|
|
481
|
+
* @param {?} index -index of the current value to be added
|
|
482
|
+
* @return {?}
|
|
483
|
+
*/
|
|
484
|
+
addWidgetListToGridster(widgetList, index) {
|
|
485
|
+
/** @type {?} */
|
|
486
|
+
let areaContext = this;
|
|
487
|
+
/** @type {?} */
|
|
488
|
+
let indexVal = index + 1;
|
|
489
|
+
if (index > widgetList.length - 1)
|
|
490
|
+
return;
|
|
491
|
+
else {
|
|
492
|
+
if (index == 0) {
|
|
493
|
+
areaContext.addWidget(widgetList[index]);
|
|
494
|
+
areaContext.addWidgetListToGridster(widgetList, indexVal);
|
|
495
|
+
}
|
|
496
|
+
else {
|
|
497
|
+
setTimeout((/**
|
|
498
|
+
* @return {?}
|
|
499
|
+
*/
|
|
500
|
+
() => {
|
|
501
|
+
areaContext.addWidget(widgetList[index]);
|
|
502
|
+
areaContext.addWidgetListToGridster(widgetList, indexVal);
|
|
503
|
+
}), 1000);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
480
507
|
/**
|
|
481
508
|
* @return {?}
|
|
482
509
|
*/
|
|
@@ -575,7 +602,7 @@ class RADashboardArea {
|
|
|
575
602
|
this.widgetList.splice(this.widgetList.indexOf(widget[0]), 1);
|
|
576
603
|
this.setAreaHeight();
|
|
577
604
|
if (!isalertDisabled) {
|
|
578
|
-
this.notifier.notify('success', " " + this.translateService.translate('
|
|
605
|
+
this.notifier.notify('success', " " + this.translateService.translate('Widget') + " [" + widget[0].widgetInfo.widgetTitle + "] " + this.translateService.translate('DeletedSuccesfully') + " ");
|
|
579
606
|
}
|
|
580
607
|
}
|
|
581
608
|
}
|
|
@@ -857,6 +884,7 @@ class RAWidgetContainer {
|
|
|
857
884
|
* @return {?}
|
|
858
885
|
*/
|
|
859
886
|
() => {
|
|
887
|
+
console.log('widget initialized ' + widgetInfo.widgetInstanceId);
|
|
860
888
|
widgetConfigFilter.appConfig = this.appConfig;
|
|
861
889
|
widgetConfigFilter.widgetInfo = (/** @type {?} */ ({}));
|
|
862
890
|
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
@@ -4936,6 +4964,14 @@ class RaBaseDashboardTemplate {
|
|
|
4936
4964
|
this.init();
|
|
4937
4965
|
});
|
|
4938
4966
|
}
|
|
4967
|
+
/**
|
|
4968
|
+
* @return {?}
|
|
4969
|
+
*/
|
|
4970
|
+
ngOnInit() {
|
|
4971
|
+
/** @type {?} */
|
|
4972
|
+
var myEvent = new CustomEvent("event-template-initiated");
|
|
4973
|
+
document.body.dispatchEvent(myEvent);
|
|
4974
|
+
}
|
|
4939
4975
|
}
|
|
4940
4976
|
RaBaseDashboardTemplate.propDecorators = {
|
|
4941
4977
|
dashboardId: [{ type: Input, args: ['dashboard-id',] }],
|