@schneideress/dashboardframework 0.0.190 → 0.0.192
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 +55 -39
- 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 +51 -40
- package/esm2015/lib/ra.event.enum.js +3 -1
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +54 -40
- package/esm5/lib/ra.event.enum.js +3 -1
- package/fesm2015/schneideress-dashboardframework.js +52 -39
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +55 -39
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +1 -0
- package/lib/ra.event.enum.d.ts +3 -1
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -604,6 +604,8 @@
|
|
|
604
604
|
UpdateGlobalFilterFromMapWidget: "UpdateGlobalFilterFromMapWidget",
|
|
605
605
|
/**To add widget on empty dashboard */
|
|
606
606
|
AddWidgetEmptyDashboard: "AddWidgetEmptyDashboard",
|
|
607
|
+
/**To raise widget added event */
|
|
608
|
+
AddNewWidgetToDashboard: "AddNewWidgetToDashboard",
|
|
607
609
|
};
|
|
608
610
|
/** @enum {string} */
|
|
609
611
|
var RAEventKey = {
|
|
@@ -1285,49 +1287,54 @@
|
|
|
1285
1287
|
*/
|
|
1286
1288
|
function () {
|
|
1287
1289
|
var _this = this;
|
|
1288
|
-
/**
|
|
1289
|
-
var isMobile = false;
|
|
1290
|
-
if (this.options.mobileBreakpoint > this.gridWrapper.nativeElement.clientWidth) {
|
|
1291
|
-
isMobile = true;
|
|
1292
|
-
}
|
|
1293
|
-
/** @type {?} */
|
|
1294
|
-
var areaScrollHeight = 0;
|
|
1295
|
-
/** @type {?} */
|
|
1296
|
-
var areaHeight = 0;
|
|
1297
|
-
/** @type {?} */
|
|
1298
|
-
var curRowHeight = 0;
|
|
1299
|
-
if (this.options.api) {
|
|
1300
|
-
curRowHeight = this.options.api.getCurrentRowHeight();
|
|
1301
|
-
}
|
|
1302
|
-
this.widgetList.forEach((/**
|
|
1303
|
-
* @param {?} t
|
|
1290
|
+
setTimeout((/**
|
|
1304
1291
|
* @return {?}
|
|
1305
1292
|
*/
|
|
1306
|
-
function (
|
|
1293
|
+
function () {
|
|
1307
1294
|
/** @type {?} */
|
|
1308
|
-
var
|
|
1309
|
-
if (
|
|
1310
|
-
|
|
1295
|
+
var isMobile = false;
|
|
1296
|
+
if (_this.options.mobileBreakpoint > _this.gridWrapper.nativeElement.clientWidth) {
|
|
1297
|
+
isMobile = true;
|
|
1311
1298
|
}
|
|
1312
|
-
|
|
1313
|
-
|
|
1299
|
+
/** @type {?} */
|
|
1300
|
+
var areaScrollHeight = 0;
|
|
1301
|
+
/** @type {?} */
|
|
1302
|
+
var areaHeight = 0;
|
|
1303
|
+
/** @type {?} */
|
|
1304
|
+
var curRowHeight = 0;
|
|
1305
|
+
if (_this.options.api) {
|
|
1306
|
+
curRowHeight = _this.options.api.getCurrentRowHeight();
|
|
1314
1307
|
}
|
|
1315
|
-
|
|
1308
|
+
_this.widgetList.forEach((/**
|
|
1309
|
+
* @param {?} t
|
|
1310
|
+
* @return {?}
|
|
1311
|
+
*/
|
|
1312
|
+
function (t) {
|
|
1313
|
+
/** @type {?} */
|
|
1314
|
+
var currentHeight = t.y + t.rows;
|
|
1315
|
+
if (currentHeight > areaScrollHeight) {
|
|
1316
|
+
areaScrollHeight = currentHeight;
|
|
1317
|
+
}
|
|
1318
|
+
if (curRowHeight == 0) {
|
|
1319
|
+
currentHeight = _this.widgetList[0].curRowHeight;
|
|
1320
|
+
}
|
|
1321
|
+
t.widgetInfo.rowHeight = curRowHeight;
|
|
1322
|
+
}));
|
|
1323
|
+
_this.gridcellHeight = curRowHeight;
|
|
1324
|
+
if (_this.options.api) {
|
|
1325
|
+
areaHeight = areaScrollHeight * _this.options.api.getCurrentRowHeight() + 100;
|
|
1326
|
+
}
|
|
1327
|
+
/** @type {?} */
|
|
1328
|
+
var areaScrollHeightMob = 0;
|
|
1329
|
+
if (isMobile) {
|
|
1330
|
+
areaScrollHeightMob = _this.widgetList.length * 300 + 200;
|
|
1331
|
+
areaHeight = areaScrollHeightMob;
|
|
1332
|
+
}
|
|
1333
|
+
if (areaHeight < 600) {
|
|
1334
|
+
areaHeight = 600;
|
|
1335
|
+
}
|
|
1336
|
+
_this.gridheight = areaHeight;
|
|
1316
1337
|
}));
|
|
1317
|
-
this.gridcellHeight = curRowHeight;
|
|
1318
|
-
if (this.options.api) {
|
|
1319
|
-
areaHeight = areaScrollHeight * this.options.api.getCurrentRowHeight() + 100;
|
|
1320
|
-
}
|
|
1321
|
-
/** @type {?} */
|
|
1322
|
-
var areaScrollHeightMob = 0;
|
|
1323
|
-
if (isMobile) {
|
|
1324
|
-
areaScrollHeightMob = this.widgetList.length * 300 + 200;
|
|
1325
|
-
areaHeight = areaScrollHeightMob;
|
|
1326
|
-
}
|
|
1327
|
-
if (areaHeight < 600) {
|
|
1328
|
-
areaHeight = 600;
|
|
1329
|
-
}
|
|
1330
|
-
this.gridheight = areaHeight;
|
|
1331
1338
|
};
|
|
1332
1339
|
/** To remove a widget instance from dashboard and to save info in database */
|
|
1333
1340
|
/**
|
|
@@ -1580,11 +1587,20 @@
|
|
|
1580
1587
|
}));
|
|
1581
1588
|
return widgetListArray;
|
|
1582
1589
|
};
|
|
1590
|
+
/**
|
|
1591
|
+
* @return {?}
|
|
1592
|
+
*/
|
|
1593
|
+
RADashboardArea.prototype.addNewWidget = /**
|
|
1594
|
+
* @return {?}
|
|
1595
|
+
*/
|
|
1596
|
+
function () {
|
|
1597
|
+
this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
|
|
1598
|
+
};
|
|
1583
1599
|
RADashboardArea.decorators = [
|
|
1584
1600
|
{ type: core.Component, args: [{
|
|
1585
1601
|
selector: 'ra-dashboard-area',
|
|
1586
|
-
template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [style.height.px]=\"gridheight\">\r\n <!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\"\r\n (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\" [global-filter]=\"globalFilter\"\r\n [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\" [widget-width]=\"item.cols\"\r\n [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\" [dom-resized]=\"domResized\">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n <
|
|
1587
|
-
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#ededed;overflow-y:hidden!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;box-shadow:0 1px 10px rgba(0,0,0,.05)}gridster-item:hover{box-shadow:0 1px 10px rgba(0,0,0,.15)}@media screen and (max-width:685px){.gridster-mobile{height:auto!important}}"]
|
|
1602
|
+
template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [style.height.px]=\"widgetList.length > 0 ? gridheight : ''\">\r\n <!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\" *ngIf=\"widgetList.length > 0\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\"\r\n (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\" [global-filter]=\"globalFilter\"\r\n [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\" [widget-width]=\"item.cols\"\r\n [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\" [dom-resized]=\"domResized\">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"widgetList.length <= 0\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"m-1 empty-prefix\">\r\n <i class=\"fal fa-edit\" style=\"color:#32AD3C; font-size: 24px; margin-right: 15px;\"></i>\r\n <span style=\"margin-top: 10px;\">Empty Dashboard</span>\r\n </div>\r\n <div class=\"empty-content\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n This dashboard doesn\u2019t contain any widgets. <br />\r\n Widgets can be added via the Dashboard Menu in the upper left.\r\n </div>\r\n <button class=\"btn btnLib btn-sm m-1 dashboard-button\" (click)=\"addNewWidget()\">\r\n <i class=\"fal fa-plus m-1\"></i>Add a Widgets</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>",
|
|
1603
|
+
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#ededed;overflow-y:hidden!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;box-shadow:0 1px 10px rgba(0,0,0,.05)}gridster-item:hover{box-shadow:0 1px 10px rgba(0,0,0,.15)}@media screen and (max-width:685px){.gridster-mobile{height:auto!important}}.empty-padding{padding:40px 20px 20px;background-color:#ededed;display:flex;justify-content:center;align-content:center}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:72%}.empty-prefix{color:#32ad3c;font-size:18px;display:flex;align-items:center;padding:10px 30px;min-width:-webkit-max-content;min-width:max-content;min-width:-moz-max-content}.empty-content{color:#333;border-left:1px solid #a9afb1;width:100%;display:flex;align-items:center;padding:15px 30px 10px 40px}.empty-msg{padding:0 0 5px;font-size:16px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed}.btn-group-sm>.btn,.btn-sm{padding:5px 20px 5px 5px}@media screen and (max-width:500px){.empty-padding{padding:20px;background-color:#ededed;width:480px;display:block}.empty-prefix{color:#32ad3c;font-size:18px;display:flex;height:39px;padding:6px 120px 10px 33px}.empty-content{color:#333;border-top:1px solid #a9afb1;display:flex;padding:10px 30px;margin-top:44px;margin-left:-366px;border-left:none}.empty-msg{padding:4px 4px 10px;font-size:16px}}"]
|
|
1588
1604
|
}] }
|
|
1589
1605
|
];
|
|
1590
1606
|
/** @nocollapse */
|