@schneideress/dashboardframework 0.0.34 → 0.0.37
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 +91 -36
- 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 +7 -8
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +61 -25
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +7 -8
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +87 -30
- package/fesm2015/schneideress-dashboardframework.js +66 -31
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +92 -37
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +3 -1
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __extends, __assign } from 'tslib';
|
|
1
|
+
import { __extends, __awaiter, __generator, __assign } from 'tslib';
|
|
2
2
|
import { Injectable, Injector, ɵɵdefineInjectable, ɵɵinject, INJECTOR, Component, NgZone, Input, EventEmitter, ViewChild, Output, ViewEncapsulation, ElementRef, Renderer2, ChangeDetectorRef, Host, NgModule } from '@angular/core';
|
|
3
3
|
import { of, Subject } from 'rxjs';
|
|
4
4
|
import { BaseService } from '@schneideress/ess-util';
|
|
@@ -931,7 +931,6 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
931
931
|
var curRowHeight = 0;
|
|
932
932
|
if (this.options.api) {
|
|
933
933
|
curRowHeight = this.options.api.getCurrentRowHeight();
|
|
934
|
-
areaHeight = areaScrollHeight * this.options.api.getCurrentRowHeight() + 2;
|
|
935
934
|
}
|
|
936
935
|
this.widgetList.forEach((/**
|
|
937
936
|
* @param {?} t
|
|
@@ -943,14 +942,14 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
943
942
|
if (currentHeight > areaScrollHeight) {
|
|
944
943
|
areaScrollHeight = currentHeight;
|
|
945
944
|
}
|
|
946
|
-
if (curRowHeight == 0
|
|
947
|
-
|
|
948
|
-
t.widgetInfo.rowHeight = _this.widgetList[0].curRowHeight;
|
|
949
|
-
}
|
|
950
|
-
else {
|
|
951
|
-
t.widgetInfo.rowHeight = curRowHeight;
|
|
945
|
+
if (curRowHeight == 0) {
|
|
946
|
+
currentHeight = _this.widgetList[0].curRowHeight;
|
|
952
947
|
}
|
|
948
|
+
t.widgetInfo.rowHeight = curRowHeight;
|
|
953
949
|
}));
|
|
950
|
+
if (this.options.api) {
|
|
951
|
+
areaHeight = areaScrollHeight * this.options.api.getCurrentRowHeight() + 2;
|
|
952
|
+
}
|
|
954
953
|
if (areaHeight < 600) {
|
|
955
954
|
areaHeight = 600;
|
|
956
955
|
}
|
|
@@ -1249,6 +1248,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1249
1248
|
this.notifier = notifier;
|
|
1250
1249
|
this.isWidgetLoaded = false;
|
|
1251
1250
|
this.isIEOrEdge = /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
|
|
1251
|
+
this.lockClass = "unlocked";
|
|
1252
1252
|
this.widgetDeleted = new EventEmitter();
|
|
1253
1253
|
}
|
|
1254
1254
|
/**
|
|
@@ -1412,33 +1412,47 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1412
1412
|
* @return {?}
|
|
1413
1413
|
*/
|
|
1414
1414
|
function (widgetInfo) {
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1415
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1416
|
+
var widgetConfigFilter, widgetContainer;
|
|
1417
|
+
var _this = this;
|
|
1418
|
+
return __generator(this, function (_a) {
|
|
1419
|
+
widgetConfigFilter = (/** @type {?} */ ({
|
|
1420
|
+
config: widgetInfo.widgetConfigInfo.config,
|
|
1421
|
+
globalFilter: this.globalFilter
|
|
1422
|
+
}));
|
|
1423
|
+
widgetContainer = this;
|
|
1424
|
+
this.dashboardService.loadExternalScript(widgetInfo.scriptUrl, (/**
|
|
1425
|
+
* @return {?}
|
|
1426
|
+
*/
|
|
1427
|
+
function () {
|
|
1428
|
+
widgetContainer.widgetElement = document.createElement(widgetInfo.customTag);
|
|
1429
|
+
widgetContainer.widgetElement.setAttribute("widget-instance-id", widgetInfo.widgetInstanceId);
|
|
1430
|
+
document.body.addEventListener('widgetinitiated' + widgetInfo.widgetInstanceId, (/**
|
|
1431
|
+
* @return {?}
|
|
1432
|
+
*/
|
|
1433
|
+
function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1434
|
+
return __generator(this, function (_a) {
|
|
1435
|
+
switch (_a.label) {
|
|
1436
|
+
case 0:
|
|
1437
|
+
console.log('widget initiate' + widgetInfo.widgetInstanceId);
|
|
1438
|
+
widgetContainer.isWidgetLoaded = true;
|
|
1439
|
+
widgetConfigFilter.appConfig = this.appConfig;
|
|
1440
|
+
widgetConfigFilter.widgetInfo = (/** @type {?} */ ({}));
|
|
1441
|
+
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
1442
|
+
widgetContainer.widgetElement.loadContent(widgetConfigFilter);
|
|
1443
|
+
return [4 /*yield*/, widgetContainer.setClass()];
|
|
1444
|
+
case 1:
|
|
1445
|
+
_a.sent();
|
|
1446
|
+
return [2 /*return*/];
|
|
1447
|
+
}
|
|
1448
|
+
});
|
|
1449
|
+
}); }));
|
|
1450
|
+
_this.ctlWidget.nativeElement.appendChild(_this.widgetElement);
|
|
1451
|
+
}));
|
|
1452
|
+
this.setWidgetheight();
|
|
1453
|
+
return [2 /*return*/];
|
|
1454
|
+
});
|
|
1455
|
+
});
|
|
1442
1456
|
};
|
|
1443
1457
|
/** To refresh widget on input config changes */
|
|
1444
1458
|
/**
|
|
@@ -1463,13 +1477,52 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1463
1477
|
}));
|
|
1464
1478
|
if (widgetContainerContext.isWidgetLoaded) {
|
|
1465
1479
|
widgetContainerContext.widgetElement.loadContent(widgetConfigFilter);
|
|
1480
|
+
//await this.setClass();
|
|
1466
1481
|
}
|
|
1467
1482
|
};
|
|
1483
|
+
/**
|
|
1484
|
+
* @private
|
|
1485
|
+
* @return {?}
|
|
1486
|
+
*/
|
|
1487
|
+
RAWidgetContainer.prototype.setClass = /**
|
|
1488
|
+
* @private
|
|
1489
|
+
* @return {?}
|
|
1490
|
+
*/
|
|
1491
|
+
function () {
|
|
1492
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1493
|
+
var lockstatus;
|
|
1494
|
+
return __generator(this, function (_a) {
|
|
1495
|
+
switch (_a.label) {
|
|
1496
|
+
case 0: return [4 /*yield*/, this.widgetElement.loadLockStatus()];
|
|
1497
|
+
case 1:
|
|
1498
|
+
lockstatus = _a.sent();
|
|
1499
|
+
console.log('lock staus' + lockstatus);
|
|
1500
|
+
if (lockstatus) {
|
|
1501
|
+
switch (lockstatus) {
|
|
1502
|
+
case "lock": {
|
|
1503
|
+
this.lockClass = "fa fa-lock locked";
|
|
1504
|
+
}
|
|
1505
|
+
case "unlock": {
|
|
1506
|
+
this.lockClass = "unlocked";
|
|
1507
|
+
}
|
|
1508
|
+
case "partiallock": {
|
|
1509
|
+
this.lockClass = "fa fa-lock partiallocked";
|
|
1510
|
+
}
|
|
1511
|
+
default: {
|
|
1512
|
+
this.lockClass = "unlocked";
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
return [2 /*return*/];
|
|
1517
|
+
}
|
|
1518
|
+
});
|
|
1519
|
+
});
|
|
1520
|
+
};
|
|
1468
1521
|
RAWidgetContainer.decorators = [
|
|
1469
1522
|
{ type: Component, args: [{
|
|
1470
1523
|
selector: 'ra-widget-container',
|
|
1471
|
-
template: "<div class=\"wc-wrapper\">\r\n <div class=\"wcheader\">\r\n <div class=\"col-md-12 wc-mover\">\r\n <div class=\"row\">\r\n <div class=\"col-md-
|
|
1472
|
-
styles: [".wcheader{width:100%;height:26px;background:#fff;color:#3dcd58;padding:7px 7px 0 6px;font-family:\"Arial Rounded MT\";border-bottom:1px solid;border-color:#fff;font-size:16px}.wc-mover{cursor:all-scroll}.wcBody{padding:8px}.wcBodyBorder{border:1px dashed #e6e2e2}.sp_icon{float:left;margin:0 15% 0 0}.dropbtn{cursor:pointer;color:#42b4e6}.dropdown{visibility:hidden;opacity:0;transition:visibility,opacity .5s linear;position:relative}.dropdown hr{margin:0!important}.dropdown-content{display:none;position:absolute;right:0;background-color:#f9f9f9;min-width:100px;box-shadow:0 8px 16px 8px rgba(0,0,0,.2);z-index:1;font-size:12px;font-family:\"Arial Rounded MT\"}.dropdown-content a{color:#000;padding:5px 16px;text-decoration:none;display:block;cursor:pointer}.dropdown-content a:hover{background-color:#f1f1f1}.dropdown:hover .dropdown-content{display:block;-webkit-animation:.3s ease-out slide-down;animation:.3s ease-out slide-down}.wc-wrapper:hover .dropdown{visibility:visible;opacity:1}.dropdown:hover .dropbtn{color:#2b7797}.gearIcon{color:#42b4e6}.hr{border:0;border-top:1px solid rgba(0,0,0,.1)}@keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0)}}.widget-config-item i{font-size:17px;color:#42b4e6}.widget-config-item span{font-size:12px;font:inherit;padding-left:12px;color:#42b4e6}"]
|
|
1524
|
+
template: "<div class=\"wc-wrapper\">\r\n <div class=\"wcheader\">\r\n <div class=\"col-md-12 wc-mover\">\r\n <div class=\"row\">\r\n <div class=\"col-md-10 float-left\" style=\"width:96%;\">{{data.widgetInfo.widgetTitle}}\r\n </div>\r\n <div class=\"col-md-2\">\r\n <div class=\"float-right\" style=\"display: flex\">\r\n <div class=\"pr-3\"><i [ngClass]=\"lockClass\"></i></div>\r\n <div class=\"dropdown\">\r\n <div class=\"dropbtn gearIcon\"> <i class=\"fal fa-cog\"></i></div>\r\n <div class=\"dropdown-content widget-config-item\">\r\n <a (click)=\"editWidget()\">\r\n <i class=\"fal fa-edit\"></i>\r\n <span>{{'Edit'|translate}}</span>\r\n </a>\r\n <a (click)=\"copyWidget()\">\r\n <i class=\"fal fa-copy\"></i>\r\n <span>{{'Copy'|translate}}</span>\r\n </a>\r\n <a (click)=\"moveWidget()\">\r\n <i class=\"fal fa-arrows-alt\"></i>\r\n <span>{{'Move'|translate}}</span>\r\n </a>\r\n <hr class=\"hr\">\r\n <a (click)=\"deleteWidget()\">\r\n <i class=\"fal fa-times\" style=\"padding-left: 3px;\"></i>\r\n <span>{{'Delete'|translate}}</span>\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wcBody\" [style.height.px]=\"widgetHeight\">\r\n <perfect-scrollbar [scrollIndicators]=\"true\">\r\n <div class=\"wcBodyBorder\" #ctlWidget></div>\r\n </perfect-scrollbar>\r\n </div>\r\n</div>\r\n",
|
|
1525
|
+
styles: [".wcheader{width:100%;height:26px;background:#fff;color:#3dcd58;padding:7px 7px 0 6px;font-family:\"Arial Rounded MT\";border-bottom:1px solid;border-color:#fff;font-size:16px}.wc-mover{cursor:all-scroll}.wcBody{padding:8px}.wcBodyBorder{border:1px dashed #e6e2e2}.sp_icon{float:left;margin:0 15% 0 0}.dropbtn{cursor:pointer;color:#42b4e6}.dropdown{visibility:hidden;opacity:0;transition:visibility,opacity .5s linear;position:relative}.dropdown hr{margin:0!important}.dropdown-content{display:none;position:absolute;right:0;background-color:#f9f9f9;min-width:100px;box-shadow:0 8px 16px 8px rgba(0,0,0,.2);z-index:1;font-size:12px;font-family:\"Arial Rounded MT\"}.dropdown-content a{color:#000;padding:5px 16px;text-decoration:none;display:block;cursor:pointer}.dropdown-content a:hover{background-color:#f1f1f1}.dropdown:hover .dropdown-content{display:block;-webkit-animation:.3s ease-out slide-down;animation:.3s ease-out slide-down}.wc-wrapper:hover .dropdown{visibility:visible;opacity:1}.dropdown:hover .dropbtn{color:#2b7797}.gearIcon{color:#42b4e6}.hr{border:0;border-top:1px solid rgba(0,0,0,.1)}@keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0)}}.widget-config-item i{font-size:17px;color:#42b4e6}.widget-config-item span{font-size:12px;font:inherit;padding-left:12px;color:#42b4e6}.locked{color:#42b4e6}.partiallocked{color:#a0d9f2}.unlocked{display:none}"]
|
|
1473
1526
|
}] }
|
|
1474
1527
|
];
|
|
1475
1528
|
/** @nocollapse */
|
|
@@ -1517,6 +1570,8 @@ if (false) {
|
|
|
1517
1570
|
/** @type {?} */
|
|
1518
1571
|
RAWidgetContainer.prototype.widgetHeight;
|
|
1519
1572
|
/** @type {?} */
|
|
1573
|
+
RAWidgetContainer.prototype.lockClass;
|
|
1574
|
+
/** @type {?} */
|
|
1520
1575
|
RAWidgetContainer.prototype.ctlWidget;
|
|
1521
1576
|
/** @type {?} */
|
|
1522
1577
|
RAWidgetContainer.prototype.widgetInstanceId;
|