@schneideress/dashboardframework 0.0.69 → 0.0.70
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 +64 -9
- 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 +61 -5
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +62 -6
- package/fesm2015/schneideress-dashboardframework.js +60 -4
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +61 -5
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +5 -1
- 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
|
|
@@ -1595,10 +1606,18 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1595
1606
|
*/
|
|
1596
1607
|
function () {
|
|
1597
1608
|
return __awaiter(this, void 0, void 0, function () {
|
|
1609
|
+
var downloadType;
|
|
1598
1610
|
return __generator(this, function (_a) {
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1611
|
+
switch (_a.label) {
|
|
1612
|
+
case 0: return [4 /*yield*/, this.widgetElement.getDownloadType()];
|
|
1613
|
+
case 1:
|
|
1614
|
+
downloadType = _a.sent();
|
|
1615
|
+
this.downloadIconType = downloadType;
|
|
1616
|
+
if (downloadType != RADownloadType.None) {
|
|
1617
|
+
this.isDownloadIconVisible = true;
|
|
1618
|
+
}
|
|
1619
|
+
return [2 /*return*/];
|
|
1620
|
+
}
|
|
1602
1621
|
});
|
|
1603
1622
|
});
|
|
1604
1623
|
};
|
|
@@ -1609,7 +1628,37 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1609
1628
|
* @return {?}
|
|
1610
1629
|
*/
|
|
1611
1630
|
function () {
|
|
1612
|
-
|
|
1631
|
+
switch (this.downloadIconType) {
|
|
1632
|
+
case RADownloadType.Grid:
|
|
1633
|
+
this.downloadIconClicked('CSV');
|
|
1634
|
+
break;
|
|
1635
|
+
case RADownloadType.Chart:
|
|
1636
|
+
this.isDownloadChartVisible = true;
|
|
1637
|
+
break;
|
|
1638
|
+
case RADownloadType.Custom:
|
|
1639
|
+
break;
|
|
1640
|
+
}
|
|
1641
|
+
};
|
|
1642
|
+
/**
|
|
1643
|
+
* @param {?} type
|
|
1644
|
+
* @return {?}
|
|
1645
|
+
*/
|
|
1646
|
+
RAWidgetContainer.prototype.downloadIconClicked = /**
|
|
1647
|
+
* @param {?} type
|
|
1648
|
+
* @return {?}
|
|
1649
|
+
*/
|
|
1650
|
+
function (type) {
|
|
1651
|
+
switch (type) {
|
|
1652
|
+
case "CSV":
|
|
1653
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.CSV);
|
|
1654
|
+
break;
|
|
1655
|
+
case "PNG":
|
|
1656
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.PNG);
|
|
1657
|
+
break;
|
|
1658
|
+
case "PDF":
|
|
1659
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.PDF);
|
|
1660
|
+
break;
|
|
1661
|
+
}
|
|
1613
1662
|
};
|
|
1614
1663
|
/**Show dropdown on gear icon click */
|
|
1615
1664
|
/**
|
|
@@ -1639,7 +1688,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1639
1688
|
RAWidgetContainer.decorators = [
|
|
1640
1689
|
{ type: Component, args: [{
|
|
1641
1690
|
selector: 'ra-widget-container',
|
|
1642
|
-
template: "<div class=\"wc-wrapper\" (mouseleave)
|
|
1691
|
+
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\" *ngIf=\"isDownloadIconVisible\">\r\n <i class=\"fas fa-download\" #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-edit\"></i>\r\n <span>{{'PNG'|translate}}</span>\r\n </a>\r\n <a (click)=\"downloadIconClicked('PNG')\">\r\n <i class=\"fal fa-edit\"></i>\r\n <span>{{'JPEG'|translate}}</span>\r\n </a>\r\n <a (click)=\"downloadIconClicked('PNG')\">\r\n <i class=\"fal fa-edit\"></i>\r\n <span>{{'PDF'|translate}}</span>\r\n </a> \r\n <a (click)=\"downloadIconClicked('SVG')\">\r\n <i class=\"fal fa-edit\"></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",
|
|
1643
1692
|
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}"]
|
|
1644
1693
|
}] }
|
|
1645
1694
|
];
|
|
@@ -1655,6 +1704,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1655
1704
|
RAWidgetContainer.propDecorators = {
|
|
1656
1705
|
ctlWidget: [{ type: ViewChild, args: ['ctlWidget', { static: false },] }],
|
|
1657
1706
|
widgetDropdown: [{ type: ViewChild, args: ['widgetDropdown', { static: false },] }],
|
|
1707
|
+
widgetDownload: [{ type: ViewChild, args: ['widgetDownload', { static: false },] }],
|
|
1658
1708
|
widgetInstanceId: [{ type: Input, args: ['widget-instance-id',] }],
|
|
1659
1709
|
globalFilter: [{ type: Input, args: ['global-filter',] }],
|
|
1660
1710
|
data: [{ type: Input, args: ['data',] }],
|
|
@@ -1700,10 +1750,16 @@ if (false) {
|
|
|
1700
1750
|
/** @type {?} */
|
|
1701
1751
|
RAWidgetContainer.prototype.dropDownShown;
|
|
1702
1752
|
/** @type {?} */
|
|
1753
|
+
RAWidgetContainer.prototype.isDownloadChartVisible;
|
|
1754
|
+
/** @type {?} */
|
|
1755
|
+
RAWidgetContainer.prototype.downloadIconType;
|
|
1756
|
+
/** @type {?} */
|
|
1703
1757
|
RAWidgetContainer.prototype.ctlWidget;
|
|
1704
1758
|
/** @type {?} */
|
|
1705
1759
|
RAWidgetContainer.prototype.widgetDropdown;
|
|
1706
1760
|
/** @type {?} */
|
|
1761
|
+
RAWidgetContainer.prototype.widgetDownload;
|
|
1762
|
+
/** @type {?} */
|
|
1707
1763
|
RAWidgetContainer.prototype.widgetInstanceId;
|
|
1708
1764
|
/** @type {?} */
|
|
1709
1765
|
RAWidgetContainer.prototype.globalFilter;
|