@schneideress/dashboardframework 0.0.148 → 0.0.149
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 +52 -18
- 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 +22 -6
- package/esm2015/lib/ra.dashboard.responsive.service.js +12 -3
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +22 -6
- package/esm5/lib/ra.dashboard.responsive.service.js +16 -3
- package/fesm2015/schneideress-dashboardframework.js +32 -7
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +36 -7
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra.dashboard.responsive.service.d.ts +2 -2
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -694,13 +694,15 @@ var GridsterConfigDefaultSettings = {
|
|
|
694
694
|
*/
|
|
695
695
|
/** @type {?} */
|
|
696
696
|
var DesktopViewStart = 1367;
|
|
697
|
+
/** @type {?} */
|
|
698
|
+
var GridLockViewEnd = 1024;
|
|
697
699
|
var RADashboardResponsiveService = /** @class */ (function () {
|
|
698
700
|
function RADashboardResponsiveService() {
|
|
699
701
|
var _this = this;
|
|
700
702
|
this.resInfo = [
|
|
701
703
|
{ 'start': 0, 'end': 767, 'minCols': 1, 'maxCols': 1 },
|
|
702
|
-
{ 'start': 768, 'end':
|
|
703
|
-
{ 'start':
|
|
704
|
+
{ 'start': 768, 'end': GridLockViewEnd, 'minCols': 1, 'maxCols': 2 },
|
|
705
|
+
{ 'start': GridLockViewEnd + 1, 'end': DesktopViewStart - 1, 'minCols': 2, 'maxCols': 6 },
|
|
704
706
|
{ 'start': DesktopViewStart, 'end': 9999999999, 'minCols': 2, 'maxCols': 10 }
|
|
705
707
|
];
|
|
706
708
|
this.setScreenWidth();
|
|
@@ -740,6 +742,16 @@ var RADashboardResponsiveService = /** @class */ (function () {
|
|
|
740
742
|
enumerable: true,
|
|
741
743
|
configurable: true
|
|
742
744
|
});
|
|
745
|
+
Object.defineProperty(RADashboardResponsiveService.prototype, "IsGridLocked", {
|
|
746
|
+
get: /**
|
|
747
|
+
* @return {?}
|
|
748
|
+
*/
|
|
749
|
+
function () {
|
|
750
|
+
return this.screenWidth <= GridLockViewEnd;
|
|
751
|
+
},
|
|
752
|
+
enumerable: true,
|
|
753
|
+
configurable: true
|
|
754
|
+
});
|
|
743
755
|
Object.defineProperty(RADashboardResponsiveService.prototype, "GridsterConfig", {
|
|
744
756
|
get: /**
|
|
745
757
|
* @return {?}
|
|
@@ -784,6 +796,7 @@ var RADashboardResponsiveService = /** @class */ (function () {
|
|
|
784
796
|
rows: this.getHeight(widget.height),
|
|
785
797
|
x: this.IsDesktopView ? widget.position_x : 0,
|
|
786
798
|
y: this.IsDesktopView ? widget.position_y : 0,
|
|
799
|
+
isInitialized: widget.isInitialized,
|
|
787
800
|
widgetInfo: widget
|
|
788
801
|
}));
|
|
789
802
|
return gridsterItem;
|
|
@@ -942,12 +955,26 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
942
955
|
* @return {?}
|
|
943
956
|
*/
|
|
944
957
|
function (item) {
|
|
945
|
-
if (
|
|
946
|
-
if (
|
|
947
|
-
_this.
|
|
958
|
+
if (item.isInitialized) {
|
|
959
|
+
if (!_this.responsiveService.IsGridLocked) {
|
|
960
|
+
if (!_this.responsiveService.IsDesktopView) {
|
|
961
|
+
_this.updateWidgets();
|
|
962
|
+
}
|
|
963
|
+
else {
|
|
964
|
+
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
965
|
+
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
966
|
+
}
|
|
967
|
+
}
|
|
948
968
|
}
|
|
969
|
+
_this.setAreaHeight();
|
|
949
970
|
}
|
|
950
|
-
|
|
971
|
+
});
|
|
972
|
+
this.options.itemInitCallback = (/**
|
|
973
|
+
* @param {?} item
|
|
974
|
+
* @return {?}
|
|
975
|
+
*/
|
|
976
|
+
function (item) {
|
|
977
|
+
item.isInitialized = true;
|
|
951
978
|
});
|
|
952
979
|
};
|
|
953
980
|
/** To initiate eventbus subsctiptions */
|
|
@@ -1095,7 +1122,7 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
1095
1122
|
* @return {?}
|
|
1096
1123
|
*/
|
|
1097
1124
|
function () {
|
|
1098
|
-
this.dashboardService.updateWidgets(this.mapGridsterListToObject(this.widgetList), this.appConfig).subscribe((/**
|
|
1125
|
+
this.dashboardService.updateWidgets(this.formatWidgetDataForPositionDetails(this.mapGridsterListToObject(this.widgetList)), this.appConfig).subscribe((/**
|
|
1099
1126
|
* @param {?} widgets
|
|
1100
1127
|
* @return {?}
|
|
1101
1128
|
*/
|
|
@@ -1337,6 +1364,7 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
1337
1364
|
data.width = this.widgetWidth;
|
|
1338
1365
|
data.position_x = 0;
|
|
1339
1366
|
data.position_y = 0;
|
|
1367
|
+
data.isInitialized = true;
|
|
1340
1368
|
/** to find the available position in gridster, temp commenting the code-returning higher y value than normal */
|
|
1341
1369
|
data.dashboardAreaKey = this.areaKey;
|
|
1342
1370
|
data.dashboardId = this.userDashboardId;
|
|
@@ -1387,6 +1415,7 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
1387
1415
|
function (data) {
|
|
1388
1416
|
data.position_x = 0;
|
|
1389
1417
|
data.position_y = 0;
|
|
1418
|
+
data.isInitialized = true;
|
|
1390
1419
|
/** @type {?} */
|
|
1391
1420
|
var gridsterItem = this.responsiveService.getGridsterItem(data);
|
|
1392
1421
|
this.widgetList.push(gridsterItem);
|