@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 { 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
|
|
@@ -1297,20 +1308,55 @@ class RAWidgetContainer {
|
|
|
1297
1308
|
});
|
|
1298
1309
|
}
|
|
1299
1310
|
/**
|
|
1300
|
-
* @private
|
|
1301
1311
|
* @return {?}
|
|
1302
1312
|
*/
|
|
1303
1313
|
setDownloadIcon() {
|
|
1304
1314
|
return __awaiter(this, void 0, void 0, /** @this {!RAWidgetContainer} */ function* () {
|
|
1305
|
-
|
|
1306
|
-
|
|
1315
|
+
/** @type {?} */
|
|
1316
|
+
let downloadType = yield this.widgetElement.getDownloadType();
|
|
1317
|
+
this.downloadIconType = downloadType;
|
|
1318
|
+
if (downloadType != RADownloadType.None) {
|
|
1319
|
+
this.isDownloadIconVisible = true;
|
|
1320
|
+
}
|
|
1307
1321
|
});
|
|
1308
1322
|
}
|
|
1309
1323
|
/**
|
|
1310
1324
|
* @return {?}
|
|
1311
1325
|
*/
|
|
1312
1326
|
downloadClicked() {
|
|
1313
|
-
|
|
1327
|
+
switch (this.downloadIconType) {
|
|
1328
|
+
case RADownloadType.Grid:
|
|
1329
|
+
this.downloadIconClicked('CSV');
|
|
1330
|
+
break;
|
|
1331
|
+
case RADownloadType.Chart:
|
|
1332
|
+
this.isDownloadChartVisible = true;
|
|
1333
|
+
break;
|
|
1334
|
+
case RADownloadType.Custom:
|
|
1335
|
+
break;
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
/**
|
|
1339
|
+
* @param {?} type
|
|
1340
|
+
* @return {?}
|
|
1341
|
+
*/
|
|
1342
|
+
downloadIconClicked(type) {
|
|
1343
|
+
switch (type) {
|
|
1344
|
+
case "CSV":
|
|
1345
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.CSV);
|
|
1346
|
+
break;
|
|
1347
|
+
case "PNG":
|
|
1348
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.PNG);
|
|
1349
|
+
break;
|
|
1350
|
+
case "PDF":
|
|
1351
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.PDF);
|
|
1352
|
+
break;
|
|
1353
|
+
case "SVG":
|
|
1354
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.SVG);
|
|
1355
|
+
break;
|
|
1356
|
+
case "JPEG":
|
|
1357
|
+
this.widgetElement.downloadClicked(this.downloadIconType, RADownloadOption.JPEG);
|
|
1358
|
+
break;
|
|
1359
|
+
}
|
|
1314
1360
|
}
|
|
1315
1361
|
/**
|
|
1316
1362
|
* Show dropdown on gear icon click
|
|
@@ -1324,15 +1370,17 @@ class RAWidgetContainer {
|
|
|
1324
1370
|
* @return {?}
|
|
1325
1371
|
*/
|
|
1326
1372
|
hideDropDown() {
|
|
1327
|
-
if (this.dropDownShown)
|
|
1373
|
+
if (this.dropDownShown) {
|
|
1328
1374
|
this.dropDownShown = false;
|
|
1375
|
+
}
|
|
1376
|
+
this.isDownloadChartVisible = false;
|
|
1329
1377
|
}
|
|
1330
1378
|
}
|
|
1331
1379
|
RAWidgetContainer.decorators = [
|
|
1332
1380
|
{ type: Component, args: [{
|
|
1333
1381
|
selector: 'ra-widget-container',
|
|
1334
|
-
template: "<div class=\"wc-wrapper\" (mouseleave)
|
|
1335
|
-
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}"]
|
|
1382
|
+
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",
|
|
1383
|
+
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}"]
|
|
1336
1384
|
}] }
|
|
1337
1385
|
];
|
|
1338
1386
|
/** @nocollapse */
|
|
@@ -1347,6 +1395,7 @@ RAWidgetContainer.ctorParameters = () => [
|
|
|
1347
1395
|
RAWidgetContainer.propDecorators = {
|
|
1348
1396
|
ctlWidget: [{ type: ViewChild, args: ['ctlWidget', { static: false },] }],
|
|
1349
1397
|
widgetDropdown: [{ type: ViewChild, args: ['widgetDropdown', { static: false },] }],
|
|
1398
|
+
widgetDownload: [{ type: ViewChild, args: ['widgetDownload', { static: false },] }],
|
|
1350
1399
|
widgetInstanceId: [{ type: Input, args: ['widget-instance-id',] }],
|
|
1351
1400
|
globalFilter: [{ type: Input, args: ['global-filter',] }],
|
|
1352
1401
|
data: [{ type: Input, args: ['data',] }],
|
|
@@ -1390,10 +1439,16 @@ if (false) {
|
|
|
1390
1439
|
/** @type {?} */
|
|
1391
1440
|
RAWidgetContainer.prototype.dropDownShown;
|
|
1392
1441
|
/** @type {?} */
|
|
1442
|
+
RAWidgetContainer.prototype.isDownloadChartVisible;
|
|
1443
|
+
/** @type {?} */
|
|
1444
|
+
RAWidgetContainer.prototype.downloadIconType;
|
|
1445
|
+
/** @type {?} */
|
|
1393
1446
|
RAWidgetContainer.prototype.ctlWidget;
|
|
1394
1447
|
/** @type {?} */
|
|
1395
1448
|
RAWidgetContainer.prototype.widgetDropdown;
|
|
1396
1449
|
/** @type {?} */
|
|
1450
|
+
RAWidgetContainer.prototype.widgetDownload;
|
|
1451
|
+
/** @type {?} */
|
|
1397
1452
|
RAWidgetContainer.prototype.widgetInstanceId;
|
|
1398
1453
|
/** @type {?} */
|
|
1399
1454
|
RAWidgetContainer.prototype.globalFilter;
|