@schneideress/dashboardframework 0.0.69 → 0.0.71
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 +74 -13
- package/bundles/schneideress-dashboardframework.umd.js.map +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js +2 -2
- package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -1
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +63 -8
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +72 -10
- package/fesm2015/schneideress-dashboardframework.js +62 -7
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +71 -9
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +6 -2
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -5,6 +5,7 @@ import { BaseService, RATranslateService, RACommonModule } from '@schneideress/r
|
|
|
5
5
|
import { filter, map } from 'rxjs/operators';
|
|
6
6
|
import { NgxUiLoaderService, NgxUiLoaderModule } from 'ngx-ui-loader';
|
|
7
7
|
import { NotifierService, NotifierModule } from 'angular-notifier';
|
|
8
|
+
import { RADownloadType, RADownloadOption } from '@schneideress/widgetframework';
|
|
8
9
|
import { BrowserModule } from '@angular/platform-browser';
|
|
9
10
|
import { HttpClientModule } from '@angular/common/http';
|
|
10
11
|
import { PerfectScrollbarModule, PERFECT_SCROLLBAR_CONFIG } from 'ngx-perfect-scrollbar';
|
|
@@ -1273,6 +1274,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1273
1274
|
this.lockStatus = "unlock";
|
|
1274
1275
|
this.isDownloadIconVisible = false;
|
|
1275
1276
|
this.dropDownShown = false;
|
|
1277
|
+
this.isDownloadChartVisible = false;
|
|
1276
1278
|
this.widgetDeleted = new EventEmitter();
|
|
1277
1279
|
this.renderer.listen('window', 'click', (/**
|
|
1278
1280
|
* @param {?} e
|
|
@@ -1283,6 +1285,15 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1283
1285
|
_this.dropDownShown = false;
|
|
1284
1286
|
}
|
|
1285
1287
|
}));
|
|
1288
|
+
this.renderer.listen('window', 'click', (/**
|
|
1289
|
+
* @param {?} e
|
|
1290
|
+
* @return {?}
|
|
1291
|
+
*/
|
|
1292
|
+
function (e) {
|
|
1293
|
+
if (_this.widgetDownload && e.target !== _this.widgetDownload.nativeElement) {
|
|
1294
|
+
_this.isDownloadChartVisible = false;
|
|
1295
|
+
}
|
|
1296
|
+
}));
|
|
1286
1297
|
}
|
|
1287
1298
|
/**
|
|
1288
1299
|
* @param {?} changes
|
|
@@ -1586,19 +1597,25 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1586
1597
|
});
|
|
1587
1598
|
};
|
|
1588
1599
|
/**
|
|
1589
|
-
* @private
|
|
1590
1600
|
* @return {?}
|
|
1591
1601
|
*/
|
|
1592
1602
|
RAWidgetContainer.prototype.setDownloadIcon = /**
|
|
1593
|
-
* @private
|
|
1594
1603
|
* @return {?}
|
|
1595
1604
|
*/
|
|
1596
1605
|
function () {
|
|
1597
1606
|
return __awaiter(this, void 0, void 0, function () {
|
|
1607
|
+
var downloadType;
|
|
1598
1608
|
return __generator(this, function (_a) {
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1609
|
+
switch (_a.label) {
|
|
1610
|
+
case 0: return [4 /*yield*/, this.widgetElement.getDownloadType()];
|
|
1611
|
+
case 1:
|
|
1612
|
+
downloadType = _a.sent();
|
|
1613
|
+
this.downloadIconType = downloadType;
|
|
1614
|
+
if (downloadType != RADownloadType.None) {
|
|
1615
|
+
this.isDownloadIconVisible = true;
|
|
1616
|
+
}
|
|
1617
|
+
return [2 /*return*/];
|
|
1618
|
+
}
|
|
1602
1619
|
});
|
|
1603
1620
|
});
|
|
1604
1621
|
};
|
|
@@ -1609,7 +1626,43 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1609
1626
|
* @return {?}
|
|
1610
1627
|
*/
|
|
1611
1628
|
function () {
|
|
1612
|
-
|
|
1629
|
+
switch (this.downloadIconType) {
|
|
1630
|
+
case RADownloadType.Grid:
|
|
1631
|
+
this.downloadIconClicked('CSV');
|
|
1632
|
+
break;
|
|
1633
|
+
case RADownloadType.Chart:
|
|
1634
|
+
this.isDownloadChartVisible = true;
|
|
1635
|
+
break;
|
|
1636
|
+
case RADownloadType.Custom:
|
|
1637
|
+
break;
|
|
1638
|
+
}
|
|
1639
|
+
};
|
|
1640
|
+
/**
|
|
1641
|
+
* @param {?} type
|
|
1642
|
+
* @return {?}
|
|
1643
|
+
*/
|
|
1644
|
+
RAWidgetContainer.prototype.downloadIconClicked = /**
|
|
1645
|
+
* @param {?} type
|
|
1646
|
+
* @return {?}
|
|
1647
|
+
*/
|
|
1648
|
+
function (type) {
|
|
1649
|
+
switch (type) {
|
|
1650
|
+
case "CSV":
|
|
1651
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.CSV);
|
|
1652
|
+
break;
|
|
1653
|
+
case "PNG":
|
|
1654
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.PNG);
|
|
1655
|
+
break;
|
|
1656
|
+
case "PDF":
|
|
1657
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.PDF);
|
|
1658
|
+
break;
|
|
1659
|
+
case "SVG":
|
|
1660
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.SVG);
|
|
1661
|
+
break;
|
|
1662
|
+
case "JPEG":
|
|
1663
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.JPEG);
|
|
1664
|
+
break;
|
|
1665
|
+
}
|
|
1613
1666
|
};
|
|
1614
1667
|
/**Show dropdown on gear icon click */
|
|
1615
1668
|
/**
|
|
@@ -1633,14 +1686,16 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1633
1686
|
* @return {?}
|
|
1634
1687
|
*/
|
|
1635
1688
|
function () {
|
|
1636
|
-
if (this.dropDownShown)
|
|
1689
|
+
if (this.dropDownShown) {
|
|
1637
1690
|
this.dropDownShown = false;
|
|
1691
|
+
}
|
|
1692
|
+
this.isDownloadChartVisible = false;
|
|
1638
1693
|
};
|
|
1639
1694
|
RAWidgetContainer.decorators = [
|
|
1640
1695
|
{ type: Component, args: [{
|
|
1641
1696
|
selector: 'ra-widget-container',
|
|
1642
|
-
template: "<div class=\"wc-wrapper\" (mouseleave)
|
|
1643
|
-
styles: [".wcheader{width:100%;height:24px;background:#fff;color:#3dcd58;font-family:\"Arial Rounded MT\";font-size:16px;position:absolute;left:0;top:0}.wc-wrapper{height:100%;position:relative;margin:auto 15px}.wc-mover{cursor:all-scroll}.wcBody{width:100%;position:absolute;top:46px;left:0;bottom:15px}.wcBodyBorder{border:1px dashed #e6e2e2}.sp_icon{float:left;margin:0 15% 0 0}.dropbtn{cursor:pointer;color:#42b4e6}.dropdown{visibility:hidden;opacity:0;-webkit-transition:visibility,opacity .5s linear;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:2;font-size:12px;font-weight:400}.dropdown-content a{color:#000;padding:5px 16px;text-decoration:none;display:block;cursor:pointer}.dropdown-content a:hover{background-color:#f1f1f1}.dropdown-click{display:block;-webkit-animation:.3s ease-out slide-down;animation:.3s ease-out slide-down}.dropdown:hover .dropdown-content{color:#fff}.wc-wrapper:hover .dropdown{visibility:visible;opacity:1}.title-bar-icon{margin:0 3px;color:#42b4e6}.title-bar-lock-icon{margin:0 3px}.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}.download{visibility:hidden;opacity:0;-webkit-transition:visibility,opacity .5s linear;transition:visibility,opacity .5s linear;position:relative}.wc-wrapper:hover .download{visibility:visible;opacity:1}"]
|
|
1697
|
+
template: "<div class=\"wc-wrapper\" (mouseleave)=\"hideDropDown()\">\r\n <div class=\"wcheader widget-move\">\r\n <div class=\"col-md-12 wc-mover\" style=\"padding-left: 0px;height:inherit;\">\r\n <div style=\"display:flex;margin-top:10px;\">\r\n <div class=\"col-md-11 float-left\" style=\"width:96%;padding-left: 0px\">{{data.widgetInfo.widgetTitle}}\r\n </div>\r\n <div class=\"col-md-1\" style=\"cursor:default;padding-right: 0px;\">\r\n <div class=\"float-right\" style=\"display: flex;\">\r\n <div class=\"title-bar-icon download download-icon\" *ngIf=\"isDownloadIconVisible\">\r\n <i class=\"fas fa-download\" (mouseover)=\"setDownloadIcon()\" #widgetDownload (click)=\"downloadClicked()\"></i>\r\n <div class=\"download-content\" [ngClass]=\"{'dropdown-click': isDownloadChartVisible}\">\r\n <a (click)=\"downloadIconClicked('PNG')\">\r\n <i class=\"fal fa-file-image\"></i>\r\n <span>{{'PNG'|translate}}</span>\r\n </a>\r\n <a (click)=\"downloadIconClicked('JPEG')\">\r\n <i class=\"fal fa-file\"></i>\r\n <span>{{'JPEG'|translate}}</span>\r\n </a>\r\n <a (click)=\"downloadIconClicked('PDF')\">\r\n <i class=\"fal fa-file-pdf\"></i>\r\n <span>{{'PDF'|translate}}</span>\r\n </a> \r\n <a (click)=\"downloadIconClicked('SVG')\">\r\n <i class=\"fal fa-file-alt\"></i>\r\n <span>{{'SVG'|translate}}</span>\r\n </a>\r\n </div>\r\n </div>\r\n <div class=\"dropdown\">\r\n <div class=\"dropbtn title-bar-icon\"> <i #widgetDropdown class=\"fas fa-cog\" (click)=\"showDropDown()\"></i>\r\n </div>\r\n <div class=\"dropdown-content widget-config-item\" [ngClass]=\"{'dropdown-click': dropDownShown}\">\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 class=\"title-bar-lock-icon\"><i [ngClass]=\"lockClass\"\r\n [attr.title]=\"lockStatus=='lock' ? 'Locked' : 'Partially Locked'\"></i></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wcBody\">\r\n <div class=\"m-fadeOut widget-overlay\" [ngClass]=\"{'m-fadeIn': showPanel}\">\r\n <div class=\"lds-roller\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </div>\r\n <perfect-scrollbar [scrollIndicators]=\"true\">\r\n <div #ctlWidget></div>\r\n </perfect-scrollbar>\r\n </div>\r\n</div>\r\n",
|
|
1698
|
+
styles: [".wcheader{width:100%;height:24px;background:#fff;color:#3dcd58;font-family:\"Arial Rounded MT\";font-size:16px;position:absolute;left:0;top:0}.wc-wrapper{height:100%;position:relative;margin:auto 15px}.wc-mover{cursor:all-scroll}.wcBody{width:100%;position:absolute;top:46px;left:0;bottom:15px}.wcBodyBorder{border:1px dashed #e6e2e2}.sp_icon{float:left;margin:0 15% 0 0}.dropbtn{cursor:pointer;color:#42b4e6}.dropdown{visibility:hidden;opacity:0;-webkit-transition:visibility,opacity .5s linear;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:2;font-size:12px;font-weight:400}.dropdown-content a{color:#000;padding:5px 16px;text-decoration:none;display:block;cursor:pointer}.dropdown-content a:hover{background-color:#f1f1f1}.dropdown-click{display:block!important;-webkit-animation:.3s ease-out slide-down;animation:.3s ease-out slide-down}.download-icon{cursor:pointer}.dropdown:hover .dropdown-content{color:#fff}.wc-wrapper:hover .dropdown{visibility:visible;opacity:1}.title-bar-icon{margin:0 3px;color:#42b4e6}.title-bar-lock-icon{margin:0 3px}.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}.download{visibility:hidden;opacity:0;-webkit-transition:visibility,opacity .5s linear;transition:visibility,opacity .5s linear;position:relative}.wc-wrapper:hover .download{visibility:visible;opacity:1}.download-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:2;font-size:12px;font-weight:400}.download-content a{color:#000;padding:5px 16px;text-decoration:none;display:block;cursor:pointer}.download-content a:hover{background-color:#f1f1f1}.download-content a i{font-size:17px;color:#42b4e6}.download-content a span{font-size:12px;font:inherit;padding-left:12px;color:#42b4e6}"]
|
|
1644
1699
|
}] }
|
|
1645
1700
|
];
|
|
1646
1701
|
/** @nocollapse */
|
|
@@ -1655,6 +1710,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1655
1710
|
RAWidgetContainer.propDecorators = {
|
|
1656
1711
|
ctlWidget: [{ type: ViewChild, args: ['ctlWidget', { static: false },] }],
|
|
1657
1712
|
widgetDropdown: [{ type: ViewChild, args: ['widgetDropdown', { static: false },] }],
|
|
1713
|
+
widgetDownload: [{ type: ViewChild, args: ['widgetDownload', { static: false },] }],
|
|
1658
1714
|
widgetInstanceId: [{ type: Input, args: ['widget-instance-id',] }],
|
|
1659
1715
|
globalFilter: [{ type: Input, args: ['global-filter',] }],
|
|
1660
1716
|
data: [{ type: Input, args: ['data',] }],
|
|
@@ -1700,10 +1756,16 @@ if (false) {
|
|
|
1700
1756
|
/** @type {?} */
|
|
1701
1757
|
RAWidgetContainer.prototype.dropDownShown;
|
|
1702
1758
|
/** @type {?} */
|
|
1759
|
+
RAWidgetContainer.prototype.isDownloadChartVisible;
|
|
1760
|
+
/** @type {?} */
|
|
1761
|
+
RAWidgetContainer.prototype.downloadIconType;
|
|
1762
|
+
/** @type {?} */
|
|
1703
1763
|
RAWidgetContainer.prototype.ctlWidget;
|
|
1704
1764
|
/** @type {?} */
|
|
1705
1765
|
RAWidgetContainer.prototype.widgetDropdown;
|
|
1706
1766
|
/** @type {?} */
|
|
1767
|
+
RAWidgetContainer.prototype.widgetDownload;
|
|
1768
|
+
/** @type {?} */
|
|
1707
1769
|
RAWidgetContainer.prototype.widgetInstanceId;
|
|
1708
1770
|
/** @type {?} */
|
|
1709
1771
|
RAWidgetContainer.prototype.globalFilter;
|