@schneideress/dashboardframework 0.0.107 → 0.0.109
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 +38 -8
- 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-widget-container/ra.widget.container.component.js +33 -8
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +39 -9
- package/fesm2015/schneideress-dashboardframework.js +32 -7
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +38 -8
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +4 -0
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -1128,6 +1128,7 @@ class RAWidgetContainer {
|
|
|
1128
1128
|
this.toolTipValue = ' ';
|
|
1129
1129
|
this.toolTipWidth = '0px';
|
|
1130
1130
|
this.widgetDeleted = new EventEmitter();
|
|
1131
|
+
this.isNotConfigured = false;
|
|
1131
1132
|
this.lockVisible = false;
|
|
1132
1133
|
this.renderer.listen('window', 'click', (/**
|
|
1133
1134
|
* @param {?} e
|
|
@@ -1279,12 +1280,14 @@ class RAWidgetContainer {
|
|
|
1279
1280
|
config: widgetInfo.widgetConfigInfo.config,
|
|
1280
1281
|
globalFilter: this.globalFilter
|
|
1281
1282
|
}));
|
|
1283
|
+
this.detailPageUrl = widgetInfo.detailPageUrl;
|
|
1282
1284
|
/** @type {?} */
|
|
1283
1285
|
let widgetContainer = this;
|
|
1284
1286
|
this.dashboardService.loadExternalScript(widgetInfo.scriptUrl, (/**
|
|
1285
1287
|
* @return {?}
|
|
1286
1288
|
*/
|
|
1287
1289
|
() => {
|
|
1290
|
+
this.setNotConfiguredState(widgetInfo);
|
|
1288
1291
|
this.translateService.loadTranslations(this.appConfig.appManagementBaseUrl, this.data.widgetInfo.widgetName, false).then((/**
|
|
1289
1292
|
* @return {?}
|
|
1290
1293
|
*/
|
|
@@ -1299,15 +1302,15 @@ class RAWidgetContainer {
|
|
|
1299
1302
|
* @return {?}
|
|
1300
1303
|
*/
|
|
1301
1304
|
() => __awaiter(this, void 0, void 0, function* () {
|
|
1302
|
-
|
|
1305
|
+
widgetContainer.widgetElement.addEventListener('on-data-load', (/**
|
|
1303
1306
|
* @param {?} e
|
|
1304
1307
|
* @return {?}
|
|
1305
1308
|
*/
|
|
1306
1309
|
(e) => {
|
|
1307
1310
|
if (e.detail)
|
|
1308
|
-
|
|
1311
|
+
widgetContainer.showPanel = true;
|
|
1309
1312
|
else
|
|
1310
|
-
|
|
1313
|
+
widgetContainer.showPanel = false;
|
|
1311
1314
|
}));
|
|
1312
1315
|
widgetContainer.widgetElement.addEventListener('config-edit-clicked', (/**
|
|
1313
1316
|
* @param {?} e
|
|
@@ -1336,6 +1339,23 @@ class RAWidgetContainer {
|
|
|
1336
1339
|
}));
|
|
1337
1340
|
});
|
|
1338
1341
|
}
|
|
1342
|
+
/**
|
|
1343
|
+
* To set Default State for the widget when it is not configured
|
|
1344
|
+
* @param {?} widgetInfo
|
|
1345
|
+
* @return {?}
|
|
1346
|
+
*/
|
|
1347
|
+
setNotConfiguredState(widgetInfo) {
|
|
1348
|
+
console.log('in set not configured state');
|
|
1349
|
+
console.log(widgetInfo);
|
|
1350
|
+
/**Temp commit, will be reading data from db to check whether it needs default state */
|
|
1351
|
+
if (widgetInfo.showDefaultState && (widgetInfo.widgetConfigInfo.config == "" || Object.keys(JSON.parse(widgetInfo.widgetConfigInfo.config)).length == 0)) {
|
|
1352
|
+
this.isNotConfigured = true;
|
|
1353
|
+
}
|
|
1354
|
+
else {
|
|
1355
|
+
this.isNotConfigured = false;
|
|
1356
|
+
}
|
|
1357
|
+
console.log(this.isNotConfigured);
|
|
1358
|
+
}
|
|
1339
1359
|
/**
|
|
1340
1360
|
* To refresh widget on input config changes
|
|
1341
1361
|
* @param {?} widgetInfo
|
|
@@ -1343,6 +1363,7 @@ class RAWidgetContainer {
|
|
|
1343
1363
|
*/
|
|
1344
1364
|
refreshWidget(widgetInfo) {
|
|
1345
1365
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1366
|
+
this.setNotConfiguredState(widgetInfo);
|
|
1346
1367
|
/** @type {?} */
|
|
1347
1368
|
let widgetContainerContext = this;
|
|
1348
1369
|
/** @type {?} */
|
|
@@ -1393,7 +1414,7 @@ class RAWidgetContainer {
|
|
|
1393
1414
|
if (this.lockStatus) {
|
|
1394
1415
|
switch (this.lockStatus) {
|
|
1395
1416
|
case RaWidgetlockStatus.Locked: {
|
|
1396
|
-
this.lockClass = "
|
|
1417
|
+
this.lockClass = "fal fa-lock locked";
|
|
1397
1418
|
this.lockVisible = false;
|
|
1398
1419
|
break;
|
|
1399
1420
|
}
|
|
@@ -1403,7 +1424,7 @@ class RAWidgetContainer {
|
|
|
1403
1424
|
break;
|
|
1404
1425
|
}
|
|
1405
1426
|
case RaWidgetlockStatus.PartiallyLocked: {
|
|
1406
|
-
this.lockClass = "
|
|
1427
|
+
this.lockClass = "fal fa-lock locked";
|
|
1407
1428
|
this.lockVisible = false;
|
|
1408
1429
|
break;
|
|
1409
1430
|
}
|
|
@@ -1488,8 +1509,8 @@ class RAWidgetContainer {
|
|
|
1488
1509
|
RAWidgetContainer.decorators = [
|
|
1489
1510
|
{ type: Component, args: [{
|
|
1490
1511
|
selector: 'ra-widget-container',
|
|
1491
|
-
template: "<div class=\"wc-wrapper\" (mouseleave)=\"hideDropDown()\">\r\n <div class=\"wcheader widget-move\" [ngClass]=\"{'underLine': enableTitleLine}\">\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\r\n <div class=\"col-md-10 float-left title-label\">\r\n <ra-tooltip [value]=\"toolTipValue\" [width]=\"toolTipWidth\">\r\n <div style=\"text-overflow: ellipsis;white-space: nowrap;overflow: hidden;\" (mouseover)=\"mouseOver($event)\"\r\n #searchInput>{{data.widgetInfo.widgetTitle}}</div>\r\n </ra-tooltip>\r\n </div>\r\n\r\n\r\n <div class=\"col-md-2\" style=\"cursor:default;padding-right: 0px;\"
|
|
1492
|
-
styles: [".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:#
|
|
1512
|
+
template: "<div class=\"wc-wrapper\" (mouseleave)=\"hideDropDown()\">\r\n <div class=\"wcheader widget-move\" [ngClass]=\"{'underLine': enableTitleLine || isNotConfigured}\">\r\n <div class=\"col-md-12 wc-mover\" style=\"padding-left: 0px;height:inherit;padding-right: 0px;\">\r\n <div style=\"display:flex;margin-top:10px;\">\r\n\r\n <div class=\"col-md-10 float-left title-label\">\r\n <ra-tooltip [value]=\"toolTipValue\" [width]=\"toolTipWidth\">\r\n <div style=\"text-overflow: ellipsis;white-space: nowrap;overflow: hidden;\" (mouseover)=\"mouseOver($event)\"\r\n #searchInput>{{data.widgetInfo.widgetTitle}}</div>\r\n </ra-tooltip>\r\n </div>\r\n\r\n\r\n <div class=\"col-md-2\" 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=\"fal fa-download\" (mouseover)=\"setDownloadIcon()\" #widgetDownload\r\n (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 <ra-tooltip [value]=\"lockTitle\" [width]=\"'300px'\">\r\n <div class=\"title-bar-lock-icon\" style=\"margin-right: 12px;\" [ngClass]=\"{'lockInvisible': lockVisible}\">\r\n <i [ngClass]=\"lockClass\"></i>\r\n\r\n </div>\r\n </ra-tooltip>\r\n <div class=\"dropdown\">\r\n <div class=\"dropbtn title-bar-icon\"> <i #widgetDropdown class=\"fal fa-ellipsis-v\" (click)=\"showDropDown()\"></i>\r\n </div>\r\n <div class=\"dropdown-content widget-config-item\" [ngClass]=\"{'dropdown-click': dropDownShown}\">\r\n \r\n <div style=\"color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;\">{{'Common.settings'|translate}}</div>\r\n \r\n <a style=\"padding-top: 10px;\" (click)=\"editWidget()\">\r\n <i class=\"fal fa-edit\"></i>\r\n <span>{{'Common.edit'|translate}}</span>\r\n </a>\r\n <a (click)=\"copyWidget()\">\r\n <i class=\"fal fa-copy\"></i>\r\n <span>{{'Common.copy'|translate}}</span>\r\n </a>\r\n <a (click)=\"moveWidget()\">\r\n <i class=\"fal fa-arrows-alt\"></i>\r\n <span>{{'Common.move'|translate}}</span>\r\n </a>\r\n <a *ngIf=\"detailPageUrl\">\r\n <i style=\"padding-left: 4px;\" class=\"fal fa-angle-right\"></i>\r\n <span style=\"padding-left: 16px;\">{{'Common.visitpage'|translate}}</span>\r\n </a>\r\n <hr class=\"hr\" style=\"padding-bottom: 9px;\">\r\n <span style=\"color: #9FA0A4;font-size: 12px;\" *ngIf=\"isDownloadIconVisible\">{{'Common.downloads'|translate}}</span>\r\n <a style=\"padding-top: 10px;\" *ngIf=\"isDownloadIconVisible\" (click)=\"downloadIconClicked('PNG')\">\r\n <i class=\"fal fa-file-image\"></i>\r\n <span>{{'Common.png'|translate}}</span>\r\n </a>\r\n <a *ngIf=\"isDownloadIconVisible\" (click)=\"downloadIconClicked('JPEG')\">\r\n <i class=\"fal fa-file-image\"></i>\r\n <span>{{'Common.jpeg'|translate}}</span>\r\n </a>\r\n <a *ngIf=\"isDownloadIconVisible\" (click)=\"downloadIconClicked('PDF')\">\r\n <i class=\"fal fa-file-pdf\"></i>\r\n <span>{{'Common.pdf'|translate}}</span>\r\n </a>\r\n <a *ngIf=\"isDownloadIconVisible\" (click)=\"downloadIconClicked('SVG')\">\r\n <i class=\"fal fa-file-alt\"></i>\r\n <span>{{'Common.svg'|translate}}</span>\r\n </a>\r\n <hr *ngIf=\"isDownloadIconVisible\" class=\"hr\">\r\n <a (click)=\"deleteWidget()\">\r\n <i class=\"fal fa-times\" style=\"padding-left: 3px;color: red;\"></i>\r\n <span>{{'Common.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\">\r\n <div [hidden]=\"isNotConfigured\" 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 <div class=\"wc\" [hidden]=\"isNotConfigured\">\r\n <perfect-scrollbar [scrollIndicators]=\"true\">\r\n <div #ctlWidget></div>\r\n </perfect-scrollbar>\r\n </div>\r\n <div [hidden]=\"!isNotConfigured\" class=\"defaultConfig\">\r\n <div class=\"button\" (click)=\"editWidget()\">\r\n <span class=\"editIcon\"><i class=\"fal fa-edit\"></i></span><span class=\"text\">Configure Widget</span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
1513
|
+
styles: [".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:#fff;min-width:100px;box-shadow:0 8px 16px 8px rgba(0,0,0,.2);z-index:2;font-size:12px;font-weight:400;width:122px}.dropdown-content a{color:#000;padding:5px 16px;text-decoration:none;display:block;cursor:pointer}.wc{height:100%}.defaultConfig{background:no-repeat padding-box #ededed;height:calc(100% - 15px);margin:15px 0 0}.defaultConfig .button{width:29%;float:left;position:absolute;top:50%;left:35%;min-height:34px;color:#fff;background:no-repeat padding-box #3dcd58;display:table;cursor:pointer;text-align:left;margin:0 auto;max-width:200px}.defaultConfig .button span{display:table-cell;vertical-align:middle}.defaultConfig .button .editIcon{width:35px;text-align:center;font-size:16px}.defaultConfig .button .text{width:calc(100% - 35px);font-size:13px}.dropdown-content a:hover{background-color:#f1f1f1}.lockInvisible{margin-right:-17px}.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}.title-bar-icon{color:#42b4e6}.title-bar-lock-icon{margin:0 3px}.hr{border:0;border-top:1px solid rgba(0,0,0,.1)}.settingstyle{color:#9fa0a4;font-size:12px}@-webkit-keyframes slide-down{0%{opacity:0;transform:translateY(-20%)}100%{opacity:1;transform:translateY(0)}}@keyframes slide-down{0%{opacity:0;transform:translateY(-20%)}100%{opacity:1;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;background:#fff}.partiallocked{color:#a0d9f2}.unlocked{display:none}.download{visibility:hidden;opacity:0;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}.title-label{width:96%;padding-left:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}"]
|
|
1493
1514
|
}] }
|
|
1494
1515
|
];
|
|
1495
1516
|
/** @nocollapse */
|
|
@@ -1589,9 +1610,13 @@ if (false) {
|
|
|
1589
1610
|
/** @type {?} */
|
|
1590
1611
|
RAWidgetContainer.prototype.lockTitle;
|
|
1591
1612
|
/** @type {?} */
|
|
1613
|
+
RAWidgetContainer.prototype.isNotConfigured;
|
|
1614
|
+
/** @type {?} */
|
|
1592
1615
|
RAWidgetContainer.prototype.domResized;
|
|
1593
1616
|
/** @type {?} */
|
|
1594
1617
|
RAWidgetContainer.prototype.lockVisible;
|
|
1618
|
+
/** @type {?} */
|
|
1619
|
+
RAWidgetContainer.prototype.detailPageUrl;
|
|
1595
1620
|
/**
|
|
1596
1621
|
* @type {?}
|
|
1597
1622
|
* @private
|