@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
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
}(this, (function (exports, core, rxjs, raCommon, operators, ngxUiLoader, angularNotifier, widgetframework, platformBrowser, http, common, userControls, commonControls) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
|
-
Copyright (c) Microsoft Corporation.
|
|
9
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
10
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
11
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
Copyright (c) Microsoft Corporation.
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
16
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
10
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
+
purpose with or without fee is hereby granted.
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
20
20
|
***************************************************************************** */
|
|
21
21
|
/* global Reflect, Promise */
|
|
22
22
|
|
|
@@ -109,8 +109,13 @@
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
function __createBinding(o, m, k, k2) {
|
|
113
|
+
if (k2 === undefined) k2 = k;
|
|
114
|
+
o[k2] = m[k];
|
|
115
|
+
}
|
|
116
|
+
|
|
112
117
|
function __exportStar(m, exports) {
|
|
113
|
-
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
118
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
114
119
|
}
|
|
115
120
|
|
|
116
121
|
function __values(o) {
|
|
@@ -900,13 +905,15 @@
|
|
|
900
905
|
*/
|
|
901
906
|
/** @type {?} */
|
|
902
907
|
var DesktopViewStart = 1367;
|
|
908
|
+
/** @type {?} */
|
|
909
|
+
var GridLockViewEnd = 1024;
|
|
903
910
|
var RADashboardResponsiveService = /** @class */ (function () {
|
|
904
911
|
function RADashboardResponsiveService() {
|
|
905
912
|
var _this = this;
|
|
906
913
|
this.resInfo = [
|
|
907
914
|
{ 'start': 0, 'end': 767, 'minCols': 1, 'maxCols': 1 },
|
|
908
|
-
{ 'start': 768, 'end':
|
|
909
|
-
{ 'start':
|
|
915
|
+
{ 'start': 768, 'end': GridLockViewEnd, 'minCols': 1, 'maxCols': 2 },
|
|
916
|
+
{ 'start': GridLockViewEnd + 1, 'end': DesktopViewStart - 1, 'minCols': 2, 'maxCols': 6 },
|
|
910
917
|
{ 'start': DesktopViewStart, 'end': 9999999999, 'minCols': 2, 'maxCols': 10 }
|
|
911
918
|
];
|
|
912
919
|
this.setScreenWidth();
|
|
@@ -946,6 +953,16 @@
|
|
|
946
953
|
enumerable: true,
|
|
947
954
|
configurable: true
|
|
948
955
|
});
|
|
956
|
+
Object.defineProperty(RADashboardResponsiveService.prototype, "IsGridLocked", {
|
|
957
|
+
get: /**
|
|
958
|
+
* @return {?}
|
|
959
|
+
*/
|
|
960
|
+
function () {
|
|
961
|
+
return this.screenWidth <= GridLockViewEnd;
|
|
962
|
+
},
|
|
963
|
+
enumerable: true,
|
|
964
|
+
configurable: true
|
|
965
|
+
});
|
|
949
966
|
Object.defineProperty(RADashboardResponsiveService.prototype, "GridsterConfig", {
|
|
950
967
|
get: /**
|
|
951
968
|
* @return {?}
|
|
@@ -990,6 +1007,7 @@
|
|
|
990
1007
|
rows: this.getHeight(widget.height),
|
|
991
1008
|
x: this.IsDesktopView ? widget.position_x : 0,
|
|
992
1009
|
y: this.IsDesktopView ? widget.position_y : 0,
|
|
1010
|
+
isInitialized: widget.isInitialized,
|
|
993
1011
|
widgetInfo: widget
|
|
994
1012
|
}));
|
|
995
1013
|
return gridsterItem;
|
|
@@ -1148,12 +1166,26 @@
|
|
|
1148
1166
|
* @return {?}
|
|
1149
1167
|
*/
|
|
1150
1168
|
function (item) {
|
|
1151
|
-
if (
|
|
1152
|
-
if (
|
|
1153
|
-
_this.
|
|
1169
|
+
if (item.isInitialized) {
|
|
1170
|
+
if (!_this.responsiveService.IsGridLocked) {
|
|
1171
|
+
if (!_this.responsiveService.IsDesktopView) {
|
|
1172
|
+
_this.updateWidgets();
|
|
1173
|
+
}
|
|
1174
|
+
else {
|
|
1175
|
+
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
1176
|
+
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1154
1179
|
}
|
|
1180
|
+
_this.setAreaHeight();
|
|
1155
1181
|
}
|
|
1156
|
-
|
|
1182
|
+
});
|
|
1183
|
+
this.options.itemInitCallback = (/**
|
|
1184
|
+
* @param {?} item
|
|
1185
|
+
* @return {?}
|
|
1186
|
+
*/
|
|
1187
|
+
function (item) {
|
|
1188
|
+
item.isInitialized = true;
|
|
1157
1189
|
});
|
|
1158
1190
|
};
|
|
1159
1191
|
/** To initiate eventbus subsctiptions */
|
|
@@ -1301,7 +1333,7 @@
|
|
|
1301
1333
|
* @return {?}
|
|
1302
1334
|
*/
|
|
1303
1335
|
function () {
|
|
1304
|
-
this.dashboardService.updateWidgets(this.mapGridsterListToObject(this.widgetList), this.appConfig).subscribe((/**
|
|
1336
|
+
this.dashboardService.updateWidgets(this.formatWidgetDataForPositionDetails(this.mapGridsterListToObject(this.widgetList)), this.appConfig).subscribe((/**
|
|
1305
1337
|
* @param {?} widgets
|
|
1306
1338
|
* @return {?}
|
|
1307
1339
|
*/
|
|
@@ -1543,6 +1575,7 @@
|
|
|
1543
1575
|
data.width = this.widgetWidth;
|
|
1544
1576
|
data.position_x = 0;
|
|
1545
1577
|
data.position_y = 0;
|
|
1578
|
+
data.isInitialized = true;
|
|
1546
1579
|
/** to find the available position in gridster, temp commenting the code-returning higher y value than normal */
|
|
1547
1580
|
data.dashboardAreaKey = this.areaKey;
|
|
1548
1581
|
data.dashboardId = this.userDashboardId;
|
|
@@ -1593,6 +1626,7 @@
|
|
|
1593
1626
|
function (data) {
|
|
1594
1627
|
data.position_x = 0;
|
|
1595
1628
|
data.position_y = 0;
|
|
1629
|
+
data.isInitialized = true;
|
|
1596
1630
|
/** @type {?} */
|
|
1597
1631
|
var gridsterItem = this.responsiveService.getGridsterItem(data);
|
|
1598
1632
|
this.widgetList.push(gridsterItem);
|