@schneideress/dashboardframework 0.0.34 → 0.0.35
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
|
@@ -1121,7 +1121,6 @@
|
|
|
1121
1121
|
var curRowHeight = 0;
|
|
1122
1122
|
if (this.options.api) {
|
|
1123
1123
|
curRowHeight = this.options.api.getCurrentRowHeight();
|
|
1124
|
-
areaHeight = areaScrollHeight * this.options.api.getCurrentRowHeight() + 2;
|
|
1125
1124
|
}
|
|
1126
1125
|
this.widgetList.forEach((/**
|
|
1127
1126
|
* @param {?} t
|
|
@@ -1133,14 +1132,14 @@
|
|
|
1133
1132
|
if (currentHeight > areaScrollHeight) {
|
|
1134
1133
|
areaScrollHeight = currentHeight;
|
|
1135
1134
|
}
|
|
1136
|
-
if (curRowHeight == 0
|
|
1137
|
-
|
|
1138
|
-
t.widgetInfo.rowHeight = _this.widgetList[0].curRowHeight;
|
|
1139
|
-
}
|
|
1140
|
-
else {
|
|
1141
|
-
t.widgetInfo.rowHeight = curRowHeight;
|
|
1135
|
+
if (curRowHeight == 0) {
|
|
1136
|
+
currentHeight = _this.widgetList[0].curRowHeight;
|
|
1142
1137
|
}
|
|
1138
|
+
t.widgetInfo.rowHeight = curRowHeight;
|
|
1143
1139
|
}));
|
|
1140
|
+
if (this.options.api) {
|
|
1141
|
+
areaHeight = areaScrollHeight * this.options.api.getCurrentRowHeight() + 2;
|
|
1142
|
+
}
|
|
1144
1143
|
if (areaHeight < 600) {
|
|
1145
1144
|
areaHeight = 600;
|
|
1146
1145
|
}
|
|
@@ -1439,6 +1438,7 @@
|
|
|
1439
1438
|
this.notifier = notifier;
|
|
1440
1439
|
this.isWidgetLoaded = false;
|
|
1441
1440
|
this.isIEOrEdge = /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
|
|
1441
|
+
this.lockClass = "unlocked";
|
|
1442
1442
|
this.widgetDeleted = new core.EventEmitter();
|
|
1443
1443
|
}
|
|
1444
1444
|
/**
|
|
@@ -1602,33 +1602,47 @@
|
|
|
1602
1602
|
* @return {?}
|
|
1603
1603
|
*/
|
|
1604
1604
|
function (widgetInfo) {
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1605
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1606
|
+
var widgetConfigFilter, widgetContainer;
|
|
1607
|
+
var _this = this;
|
|
1608
|
+
return __generator(this, function (_a) {
|
|
1609
|
+
widgetConfigFilter = (/** @type {?} */ ({
|
|
1610
|
+
config: widgetInfo.widgetConfigInfo.config,
|
|
1611
|
+
globalFilter: this.globalFilter
|
|
1612
|
+
}));
|
|
1613
|
+
widgetContainer = this;
|
|
1614
|
+
this.dashboardService.loadExternalScript(widgetInfo.scriptUrl, (/**
|
|
1615
|
+
* @return {?}
|
|
1616
|
+
*/
|
|
1617
|
+
function () {
|
|
1618
|
+
widgetContainer.widgetElement = document.createElement(widgetInfo.customTag);
|
|
1619
|
+
widgetContainer.widgetElement.setAttribute("widget-instance-id", widgetInfo.widgetInstanceId);
|
|
1620
|
+
document.body.addEventListener('widgetinitiated' + widgetInfo.widgetInstanceId, (/**
|
|
1621
|
+
* @return {?}
|
|
1622
|
+
*/
|
|
1623
|
+
function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1624
|
+
return __generator(this, function (_a) {
|
|
1625
|
+
switch (_a.label) {
|
|
1626
|
+
case 0:
|
|
1627
|
+
console.log('widget initiate' + widgetInfo.widgetInstanceId);
|
|
1628
|
+
widgetContainer.isWidgetLoaded = true;
|
|
1629
|
+
widgetConfigFilter.appConfig = this.appConfig;
|
|
1630
|
+
widgetConfigFilter.widgetInfo = (/** @type {?} */ ({}));
|
|
1631
|
+
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
1632
|
+
widgetContainer.widgetElement.loadContent(widgetConfigFilter);
|
|
1633
|
+
return [4 /*yield*/, widgetContainer.setClass()];
|
|
1634
|
+
case 1:
|
|
1635
|
+
_a.sent();
|
|
1636
|
+
return [2 /*return*/];
|
|
1637
|
+
}
|
|
1638
|
+
});
|
|
1639
|
+
}); }));
|
|
1640
|
+
_this.ctlWidget.nativeElement.appendChild(_this.widgetElement);
|
|
1641
|
+
}));
|
|
1642
|
+
this.setWidgetheight();
|
|
1643
|
+
return [2 /*return*/];
|
|
1644
|
+
});
|
|
1645
|
+
});
|
|
1632
1646
|
};
|
|
1633
1647
|
/** To refresh widget on input config changes */
|
|
1634
1648
|
/**
|
|
@@ -1653,13 +1667,52 @@
|
|
|
1653
1667
|
}));
|
|
1654
1668
|
if (widgetContainerContext.isWidgetLoaded) {
|
|
1655
1669
|
widgetContainerContext.widgetElement.loadContent(widgetConfigFilter);
|
|
1670
|
+
//await this.setClass();
|
|
1656
1671
|
}
|
|
1657
1672
|
};
|
|
1673
|
+
/**
|
|
1674
|
+
* @private
|
|
1675
|
+
* @return {?}
|
|
1676
|
+
*/
|
|
1677
|
+
RAWidgetContainer.prototype.setClass = /**
|
|
1678
|
+
* @private
|
|
1679
|
+
* @return {?}
|
|
1680
|
+
*/
|
|
1681
|
+
function () {
|
|
1682
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1683
|
+
var lockstatus;
|
|
1684
|
+
return __generator(this, function (_a) {
|
|
1685
|
+
switch (_a.label) {
|
|
1686
|
+
case 0: return [4 /*yield*/, this.widgetElement.loadLockStatus()];
|
|
1687
|
+
case 1:
|
|
1688
|
+
lockstatus = _a.sent();
|
|
1689
|
+
console.log('lock staus' + lockstatus);
|
|
1690
|
+
if (lockstatus) {
|
|
1691
|
+
switch (lockstatus) {
|
|
1692
|
+
case "lock": {
|
|
1693
|
+
this.lockClass = "fa fa-lock locked";
|
|
1694
|
+
}
|
|
1695
|
+
case "unlock": {
|
|
1696
|
+
this.lockClass = "unlocked";
|
|
1697
|
+
}
|
|
1698
|
+
case "partiallock": {
|
|
1699
|
+
this.lockClass = "fa fa-lock partiallocked";
|
|
1700
|
+
}
|
|
1701
|
+
default: {
|
|
1702
|
+
this.lockClass = "unlocked";
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
return [2 /*return*/];
|
|
1707
|
+
}
|
|
1708
|
+
});
|
|
1709
|
+
});
|
|
1710
|
+
};
|
|
1658
1711
|
RAWidgetContainer.decorators = [
|
|
1659
1712
|
{ type: core.Component, args: [{
|
|
1660
1713
|
selector: 'ra-widget-container',
|
|
1661
|
-
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-
|
|
1662
|
-
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}"]
|
|
1714
|
+
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",
|
|
1715
|
+
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}"]
|
|
1663
1716
|
}] }
|
|
1664
1717
|
];
|
|
1665
1718
|
/** @nocollapse */
|
|
@@ -1707,6 +1760,8 @@
|
|
|
1707
1760
|
/** @type {?} */
|
|
1708
1761
|
RAWidgetContainer.prototype.widgetHeight;
|
|
1709
1762
|
/** @type {?} */
|
|
1763
|
+
RAWidgetContainer.prototype.lockClass;
|
|
1764
|
+
/** @type {?} */
|
|
1710
1765
|
RAWidgetContainer.prototype.ctlWidget;
|
|
1711
1766
|
/** @type {?} */
|
|
1712
1767
|
RAWidgetContainer.prototype.widgetInstanceId;
|