@schneideress/dashboardframework 0.0.152 → 0.0.153
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 +30 -20
- package/bundles/schneideress-dashboardframework.umd.js.map +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js +11 -11
- package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -1
- package/esm2015/lib/ra-dashboard-area/ra.dashboard.area.js +19 -6
- package/esm2015/lib/ra.dashboard.responsive.service.js +3 -1
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +18 -5
- package/esm5/lib/ra.dashboard.responsive.service.js +3 -1
- package/fesm2015/schneideress-dashboardframework.js +20 -5
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +19 -4
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/package.json +1 -1
|
@@ -660,6 +660,8 @@ class RADashboardResponsiveService {
|
|
|
660
660
|
getGridsterItem(widget) {
|
|
661
661
|
/** @type {?} */
|
|
662
662
|
let gridsterItem = (/** @type {?} */ ({
|
|
663
|
+
actCols: widget.width,
|
|
664
|
+
actRows: widget.height,
|
|
663
665
|
cols: this.getWidth(widget.width),
|
|
664
666
|
rows: this.getHeight(widget.height),
|
|
665
667
|
x: this.IsDesktopView ? widget.position_x : 0,
|
|
@@ -1089,18 +1091,29 @@ class RADashboardArea {
|
|
|
1089
1091
|
*/
|
|
1090
1092
|
deleteWidget(widgetInstanceId, isalertDisabled = false) {
|
|
1091
1093
|
/** @type {?} */
|
|
1092
|
-
let
|
|
1094
|
+
let gridsterItem = this.widgetList.filter((/**
|
|
1093
1095
|
* @param {?} item
|
|
1094
1096
|
* @return {?}
|
|
1095
1097
|
*/
|
|
1096
|
-
|
|
1098
|
+
(item) => {
|
|
1097
1099
|
return item.widgetInfo.widgetInstanceId === widgetInstanceId;
|
|
1098
1100
|
}));
|
|
1099
|
-
if (
|
|
1100
|
-
|
|
1101
|
+
if (gridsterItem.length > 0) {
|
|
1102
|
+
/** @type {?} */
|
|
1103
|
+
let widget = this.userWidgets.filter((/**
|
|
1104
|
+
* @param {?} item
|
|
1105
|
+
* @return {?}
|
|
1106
|
+
*/
|
|
1107
|
+
(item) => {
|
|
1108
|
+
return item.widgetInstanceId === widgetInstanceId;
|
|
1109
|
+
}));
|
|
1110
|
+
if (widget.length > 0) {
|
|
1111
|
+
this.userWidgets.splice(this.userWidgets.indexOf(widget[0]), 1);
|
|
1112
|
+
}
|
|
1113
|
+
this.widgetList.splice(this.widgetList.indexOf(gridsterItem[0]), 1);
|
|
1101
1114
|
this.setAreaHeight();
|
|
1102
1115
|
if (!isalertDisabled) {
|
|
1103
|
-
this.notifier.notify('success', " " + this.translateService.translate('Common.Widgettext') + " " +
|
|
1116
|
+
this.notifier.notify('success', " " + this.translateService.translate('Common.Widgettext') + " " + gridsterItem[0].widgetInfo.widgetTitle + " " + this.translateService.translate('Common.deletedSuccesfully') + " ");
|
|
1104
1117
|
}
|
|
1105
1118
|
}
|
|
1106
1119
|
}
|
|
@@ -1133,6 +1146,7 @@ class RADashboardArea {
|
|
|
1133
1146
|
* @return {?}
|
|
1134
1147
|
*/
|
|
1135
1148
|
widget => {
|
|
1149
|
+
this.userWidgets.push(widget);
|
|
1136
1150
|
/** @type {?} */
|
|
1137
1151
|
let gridsterItem = this.responsiveService.getGridsterItem(widget);
|
|
1138
1152
|
this.widgetList.push(gridsterItem);
|
|
@@ -1198,6 +1212,7 @@ class RADashboardArea {
|
|
|
1198
1212
|
widgets => {
|
|
1199
1213
|
}));
|
|
1200
1214
|
}
|
|
1215
|
+
this.userWidgets.push(data);
|
|
1201
1216
|
/** @type {?} */
|
|
1202
1217
|
let gridsterItem = this.responsiveService.getGridsterItem(data);
|
|
1203
1218
|
this.widgetList.push(gridsterItem);
|