@schneideress/dashboardframework 0.0.62 → 0.0.64
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 +90 -20
- 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 +69 -14
- package/esm2015/lib/ra.base.dashboard.filter.js +1 -1
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +92 -22
- package/esm5/lib/ra.base.dashboard.filter.js +1 -1
- package/fesm2015/schneideress-dashboardframework.js +68 -13
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +91 -21
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +10 -2
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __extends, __awaiter, __generator, __assign } from 'tslib';
|
|
2
|
-
import { Injectable, Injector, ɵɵdefineInjectable, ɵɵinject, INJECTOR, Component, NgZone, Input, EventEmitter, ViewChild, Output, ViewEncapsulation, ElementRef,
|
|
2
|
+
import { Injectable, Injector, ɵɵdefineInjectable, ɵɵinject, INJECTOR, Component, NgZone, Input, EventEmitter, Renderer2, ViewChild, Output, ViewEncapsulation, ElementRef, ChangeDetectorRef, Host, NgModule } from '@angular/core';
|
|
3
3
|
import { of, Subject } from 'rxjs';
|
|
4
4
|
import { BaseService } from '@schneideress/ess-util';
|
|
5
5
|
import { filter, map } from 'rxjs/operators';
|
|
@@ -1259,18 +1259,31 @@ if (false) {
|
|
|
1259
1259
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1260
1260
|
*/
|
|
1261
1261
|
var RAWidgetContainer = /** @class */ (function () {
|
|
1262
|
-
function RAWidgetContainer(dashboardService, ngxService, translateService, ngZone, notifier) {
|
|
1262
|
+
function RAWidgetContainer(dashboardService, ngxService, translateService, ngZone, notifier, renderer) {
|
|
1263
|
+
var _this = this;
|
|
1263
1264
|
this.dashboardService = dashboardService;
|
|
1264
1265
|
this.ngxService = ngxService;
|
|
1265
1266
|
this.translateService = translateService;
|
|
1266
1267
|
this.ngZone = ngZone;
|
|
1267
1268
|
this.notifier = notifier;
|
|
1269
|
+
this.renderer = renderer;
|
|
1270
|
+
this.showPanel = false;
|
|
1268
1271
|
this.isWidgetLoaded = false;
|
|
1269
1272
|
this.isIEOrEdge = /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
|
|
1270
1273
|
this.lockClass = "unlocked";
|
|
1271
1274
|
this.lockStatus = "unlock";
|
|
1272
1275
|
this.isDownloadIconVisible = false;
|
|
1276
|
+
this.dropDownShown = false;
|
|
1273
1277
|
this.widgetDeleted = new EventEmitter();
|
|
1278
|
+
this.renderer.listen('window', 'click', (/**
|
|
1279
|
+
* @param {?} e
|
|
1280
|
+
* @return {?}
|
|
1281
|
+
*/
|
|
1282
|
+
function (e) {
|
|
1283
|
+
if (e.target !== _this.widgetDropdown.nativeElement) {
|
|
1284
|
+
_this.dropDownShown = false;
|
|
1285
|
+
}
|
|
1286
|
+
}));
|
|
1274
1287
|
}
|
|
1275
1288
|
/**
|
|
1276
1289
|
* @param {?} changes
|
|
@@ -1445,23 +1458,42 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1445
1458
|
* @return {?}
|
|
1446
1459
|
*/
|
|
1447
1460
|
function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1461
|
+
var _this = this;
|
|
1448
1462
|
return __generator(this, function (_a) {
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1463
|
+
setTimeout((/**
|
|
1464
|
+
* @return {?}
|
|
1465
|
+
*/
|
|
1466
|
+
function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1467
|
+
var _this = this;
|
|
1468
|
+
return __generator(this, function (_a) {
|
|
1469
|
+
switch (_a.label) {
|
|
1470
|
+
case 0:
|
|
1471
|
+
this.widgetElement.addEventListener('on-data-load', (/**
|
|
1472
|
+
* @param {?} e
|
|
1473
|
+
* @return {?}
|
|
1474
|
+
*/
|
|
1475
|
+
function (e) {
|
|
1476
|
+
if (e.detail)
|
|
1477
|
+
_this.showPanel = true;
|
|
1478
|
+
else
|
|
1479
|
+
_this.showPanel = false;
|
|
1480
|
+
}));
|
|
1481
|
+
widgetContainer.isWidgetLoaded = true;
|
|
1482
|
+
widgetConfigFilter.appConfig = this.appConfig;
|
|
1483
|
+
widgetConfigFilter.widgetInfo = (/** @type {?} */ ({}));
|
|
1484
|
+
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
1485
|
+
widgetContainer.widgetElement.loadContent(widgetConfigFilter);
|
|
1486
|
+
return [4 /*yield*/, widgetContainer.setLock(widgetConfigFilter.config)];
|
|
1487
|
+
case 1:
|
|
1488
|
+
_a.sent();
|
|
1489
|
+
return [4 /*yield*/, widgetContainer.setDownloadIcon()];
|
|
1490
|
+
case 2:
|
|
1491
|
+
_a.sent();
|
|
1492
|
+
return [2 /*return*/];
|
|
1493
|
+
}
|
|
1494
|
+
});
|
|
1495
|
+
}); }));
|
|
1496
|
+
return [2 /*return*/];
|
|
1465
1497
|
});
|
|
1466
1498
|
}); }));
|
|
1467
1499
|
_this.ctlWidget.nativeElement.appendChild(_this.widgetElement);
|
|
@@ -1579,11 +1611,36 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1579
1611
|
function () {
|
|
1580
1612
|
//this.widgetElement.isDownloadVisible();
|
|
1581
1613
|
};
|
|
1614
|
+
/**Show dropdown on gear icon click */
|
|
1615
|
+
/**
|
|
1616
|
+
* Show dropdown on gear icon click
|
|
1617
|
+
* @return {?}
|
|
1618
|
+
*/
|
|
1619
|
+
RAWidgetContainer.prototype.showDropDown = /**
|
|
1620
|
+
* Show dropdown on gear icon click
|
|
1621
|
+
* @return {?}
|
|
1622
|
+
*/
|
|
1623
|
+
function () {
|
|
1624
|
+
this.dropDownShown = !this.dropDownShown;
|
|
1625
|
+
};
|
|
1626
|
+
/**Hide dropdown on outside click */
|
|
1627
|
+
/**
|
|
1628
|
+
* Hide dropdown on outside click
|
|
1629
|
+
* @return {?}
|
|
1630
|
+
*/
|
|
1631
|
+
RAWidgetContainer.prototype.hideDropDown = /**
|
|
1632
|
+
* Hide dropdown on outside click
|
|
1633
|
+
* @return {?}
|
|
1634
|
+
*/
|
|
1635
|
+
function () {
|
|
1636
|
+
if (this.dropDownShown)
|
|
1637
|
+
this.dropDownShown = false;
|
|
1638
|
+
};
|
|
1582
1639
|
RAWidgetContainer.decorators = [
|
|
1583
1640
|
{ type: Component, args: [{
|
|
1584
1641
|
selector: 'ra-widget-container',
|
|
1585
|
-
template: "<div class=\"wc-wrapper\">\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;\">\r\n <div class=\"float-right\" style=\"display: flex;\">\r\n <div *ngIf=\"isDownloadIconVisible\"> <i class=\"far fa-download\" (click)=\"downloadClicked\"></i></div>\r\n <div class=\"pr-3\"><i [ngClass]=\"lockClass\"\r\n [attr.title]=\"lockStatus=='lock' ? 'Locked' : 'Partially Locked'\"></i></div>\r\n <div class=\"dropdown\">\r\n <div class=\"dropbtn gearIcon\"> <i class=\"fal fa-cog\"></i></div>\r\n <div class=\"dropdown-content widget-config-item\">\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>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wcBody\" >\r\n <perfect-scrollbar [scrollIndicators]=\"true\">\r\n <div #ctlWidget></div>\r\n </perfect-scrollbar>\r\n </div>\r\n</div>",
|
|
1586
|
-
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:0}.wcBodyBorder{border:1px dashed #e6e2e2}.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:#f9f9f9;min-width:100px;box-shadow:0 8px 16px 8px rgba(0,0,0,.2);z-index:2;font-size:12px;font-
|
|
1642
|
+
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;\">\r\n <div class=\"float-right\" style=\"display: flex;\">\r\n <div *ngIf=\"isDownloadIconVisible\"> <i class=\"far fa-download\" (click)=\"downloadClicked\"></i></div>\r\n <div class=\"pr-3\"><i [ngClass]=\"lockClass\"\r\n [attr.title]=\"lockStatus=='lock' ? 'Locked' : 'Partially Locked'\"></i></div>\r\n <div class=\"dropdown\">\r\n <div class=\"dropbtn gearIcon\"> <i #widgetDropdown class=\"fal fa-cog\" (click)=\"showDropDown()\"></i></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>\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>",
|
|
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:0}.wcBodyBorder{border:1px dashed #e6e2e2}.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:#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}.dropdown:hover .dropbtn{color:#2b7797}.gearIcon{color:#42b4e6}.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}"]
|
|
1587
1644
|
}] }
|
|
1588
1645
|
];
|
|
1589
1646
|
/** @nocollapse */
|
|
@@ -1592,10 +1649,12 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1592
1649
|
{ type: NgxUiLoaderService },
|
|
1593
1650
|
{ type: TranslateService },
|
|
1594
1651
|
{ type: NgZone },
|
|
1595
|
-
{ type: NotifierService }
|
|
1652
|
+
{ type: NotifierService },
|
|
1653
|
+
{ type: Renderer2 }
|
|
1596
1654
|
]; };
|
|
1597
1655
|
RAWidgetContainer.propDecorators = {
|
|
1598
1656
|
ctlWidget: [{ type: ViewChild, args: ['ctlWidget', { static: false },] }],
|
|
1657
|
+
widgetDropdown: [{ type: ViewChild, args: ['widgetDropdown', { static: false },] }],
|
|
1599
1658
|
widgetInstanceId: [{ type: Input, args: ['widget-instance-id',] }],
|
|
1600
1659
|
globalFilter: [{ type: Input, args: ['global-filter',] }],
|
|
1601
1660
|
data: [{ type: Input, args: ['data',] }],
|
|
@@ -1608,6 +1667,8 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1608
1667
|
return RAWidgetContainer;
|
|
1609
1668
|
}());
|
|
1610
1669
|
if (false) {
|
|
1670
|
+
/** @type {?} */
|
|
1671
|
+
RAWidgetContainer.prototype.showPanel;
|
|
1611
1672
|
/**
|
|
1612
1673
|
* @type {?}
|
|
1613
1674
|
* @private
|
|
@@ -1637,8 +1698,12 @@ if (false) {
|
|
|
1637
1698
|
/** @type {?} */
|
|
1638
1699
|
RAWidgetContainer.prototype.isDownloadIconVisible;
|
|
1639
1700
|
/** @type {?} */
|
|
1701
|
+
RAWidgetContainer.prototype.dropDownShown;
|
|
1702
|
+
/** @type {?} */
|
|
1640
1703
|
RAWidgetContainer.prototype.ctlWidget;
|
|
1641
1704
|
/** @type {?} */
|
|
1705
|
+
RAWidgetContainer.prototype.widgetDropdown;
|
|
1706
|
+
/** @type {?} */
|
|
1642
1707
|
RAWidgetContainer.prototype.widgetInstanceId;
|
|
1643
1708
|
/** @type {?} */
|
|
1644
1709
|
RAWidgetContainer.prototype.globalFilter;
|
|
@@ -1679,6 +1744,11 @@ if (false) {
|
|
|
1679
1744
|
* @private
|
|
1680
1745
|
*/
|
|
1681
1746
|
RAWidgetContainer.prototype.notifier;
|
|
1747
|
+
/**
|
|
1748
|
+
* @type {?}
|
|
1749
|
+
* @private
|
|
1750
|
+
*/
|
|
1751
|
+
RAWidgetContainer.prototype.renderer;
|
|
1682
1752
|
}
|
|
1683
1753
|
|
|
1684
1754
|
/**
|