@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 { filter, map } from 'rxjs/operators';
|
|
|
5
5
|
import { NgxUiLoaderService, NgxUiLoaderModule } from 'ngx-ui-loader';
|
|
6
6
|
import { NotifierService, NotifierModule } from 'angular-notifier';
|
|
7
7
|
import { __awaiter } from 'tslib';
|
|
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';
|
|
@@ -1075,6 +1076,7 @@ class RAWidgetContainer {
|
|
|
1075
1076
|
this.lockStatus = "unlock";
|
|
1076
1077
|
this.isDownloadIconVisible = false;
|
|
1077
1078
|
this.dropDownShown = false;
|
|
1079
|
+
this.isDownloadChartVisible = false;
|
|
1078
1080
|
this.widgetDeleted = new EventEmitter();
|
|
1079
1081
|
this.renderer.listen('window', 'click', (/**
|
|
1080
1082
|
* @param {?} e
|
|
@@ -1085,6 +1087,15 @@ class RAWidgetContainer {
|
|
|
1085
1087
|
this.dropDownShown = false;
|
|
1086
1088
|
}
|
|
1087
1089
|
}));
|
|
1090
|
+
this.renderer.listen('window', 'click', (/**
|
|
1091
|
+
* @param {?} e
|
|
1092
|
+
* @return {?}
|
|
1093
|
+
*/
|
|
1094
|
+
(e) => {
|
|
1095
|
+
if (this.widgetDownload && e.target !== this.widgetDownload.nativeElement) {
|
|
1096
|
+
this.isDownloadChartVisible = false;
|
|
1097
|
+
}
|
|
1098
|
+
}));
|
|
1088
1099
|
}
|
|
1089
1100
|
/**
|
|
1090
1101
|
* @param {?} changes
|
|
@@ -1302,15 +1313,53 @@ class RAWidgetContainer {
|
|
|
1302
1313
|
*/
|
|
1303
1314
|
setDownloadIcon() {
|
|
1304
1315
|
return __awaiter(this, void 0, void 0, /** @this {!RAWidgetContainer} */ function* () {
|
|
1305
|
-
|
|
1306
|
-
|
|
1316
|
+
/** @type {?} */
|
|
1317
|
+
let downloadType = yield this.widgetElement.getDownloadType();
|
|
1318
|
+
this.downloadIconType = downloadType;
|
|
1319
|
+
if (downloadType != RADownloadType.None) {
|
|
1320
|
+
this.isDownloadIconVisible = true;
|
|
1321
|
+
}
|
|
1322
|
+
// switch (downloadType) {
|
|
1323
|
+
// case RADownloadType.Grid:
|
|
1324
|
+
// break;
|
|
1325
|
+
// case RADownloadType.Chart:
|
|
1326
|
+
// break;
|
|
1327
|
+
// case RADownloadType.Custom:
|
|
1328
|
+
// break;
|
|
1329
|
+
// }
|
|
1307
1330
|
});
|
|
1308
1331
|
}
|
|
1309
1332
|
/**
|
|
1310
1333
|
* @return {?}
|
|
1311
1334
|
*/
|
|
1312
1335
|
downloadClicked() {
|
|
1313
|
-
|
|
1336
|
+
switch (this.downloadIconType) {
|
|
1337
|
+
case RADownloadType.Grid:
|
|
1338
|
+
this.downloadIconClicked('CSV');
|
|
1339
|
+
break;
|
|
1340
|
+
case RADownloadType.Chart:
|
|
1341
|
+
this.isDownloadChartVisible = true;
|
|
1342
|
+
break;
|
|
1343
|
+
case RADownloadType.Custom:
|
|
1344
|
+
break;
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
/**
|
|
1348
|
+
* @param {?} type
|
|
1349
|
+
* @return {?}
|
|
1350
|
+
*/
|
|
1351
|
+
downloadIconClicked(type) {
|
|
1352
|
+
switch (type) {
|
|
1353
|
+
case "CSV":
|
|
1354
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.CSV);
|
|
1355
|
+
break;
|
|
1356
|
+
case "PNG":
|
|
1357
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.PNG);
|
|
1358
|
+
break;
|
|
1359
|
+
case "PDF":
|
|
1360
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.PDF);
|
|
1361
|
+
break;
|
|
1362
|
+
}
|
|
1314
1363
|
}
|
|
1315
1364
|
/**
|
|
1316
1365
|
* Show dropdown on gear icon click
|
|
@@ -1331,7 +1380,7 @@ class RAWidgetContainer {
|
|
|
1331
1380
|
RAWidgetContainer.decorators = [
|
|
1332
1381
|
{ type: Component, args: [{
|
|
1333
1382
|
selector: 'ra-widget-container',
|
|
1334
|
-
template: "<div class=\"wc-wrapper\" (mouseleave)
|
|
1383
|
+
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",
|
|
1335
1384
|
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}"]
|
|
1336
1385
|
}] }
|
|
1337
1386
|
];
|
|
@@ -1347,6 +1396,7 @@ RAWidgetContainer.ctorParameters = () => [
|
|
|
1347
1396
|
RAWidgetContainer.propDecorators = {
|
|
1348
1397
|
ctlWidget: [{ type: ViewChild, args: ['ctlWidget', { static: false },] }],
|
|
1349
1398
|
widgetDropdown: [{ type: ViewChild, args: ['widgetDropdown', { static: false },] }],
|
|
1399
|
+
widgetDownload: [{ type: ViewChild, args: ['widgetDownload', { static: false },] }],
|
|
1350
1400
|
widgetInstanceId: [{ type: Input, args: ['widget-instance-id',] }],
|
|
1351
1401
|
globalFilter: [{ type: Input, args: ['global-filter',] }],
|
|
1352
1402
|
data: [{ type: Input, args: ['data',] }],
|
|
@@ -1390,10 +1440,16 @@ if (false) {
|
|
|
1390
1440
|
/** @type {?} */
|
|
1391
1441
|
RAWidgetContainer.prototype.dropDownShown;
|
|
1392
1442
|
/** @type {?} */
|
|
1443
|
+
RAWidgetContainer.prototype.isDownloadChartVisible;
|
|
1444
|
+
/** @type {?} */
|
|
1445
|
+
RAWidgetContainer.prototype.downloadIconType;
|
|
1446
|
+
/** @type {?} */
|
|
1393
1447
|
RAWidgetContainer.prototype.ctlWidget;
|
|
1394
1448
|
/** @type {?} */
|
|
1395
1449
|
RAWidgetContainer.prototype.widgetDropdown;
|
|
1396
1450
|
/** @type {?} */
|
|
1451
|
+
RAWidgetContainer.prototype.widgetDownload;
|
|
1452
|
+
/** @type {?} */
|
|
1397
1453
|
RAWidgetContainer.prototype.widgetInstanceId;
|
|
1398
1454
|
/** @type {?} */
|
|
1399
1455
|
RAWidgetContainer.prototype.globalFilter;
|