@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
|
@@ -1341,6 +1341,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1341
1341
|
this.toolTipValue = ' ';
|
|
1342
1342
|
this.toolTipWidth = '0px';
|
|
1343
1343
|
this.widgetDeleted = new EventEmitter();
|
|
1344
|
+
this.isNotConfigured = false;
|
|
1344
1345
|
this.lockVisible = false;
|
|
1345
1346
|
this.renderer.listen('window', 'click', (/**
|
|
1346
1347
|
* @param {?} e
|
|
@@ -1544,11 +1545,13 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1544
1545
|
config: widgetInfo.widgetConfigInfo.config,
|
|
1545
1546
|
globalFilter: this.globalFilter
|
|
1546
1547
|
}));
|
|
1548
|
+
this.detailPageUrl = widgetInfo.detailPageUrl;
|
|
1547
1549
|
widgetContainer = this;
|
|
1548
1550
|
this.dashboardService.loadExternalScript(widgetInfo.scriptUrl, (/**
|
|
1549
1551
|
* @return {?}
|
|
1550
1552
|
*/
|
|
1551
1553
|
function () {
|
|
1554
|
+
_this.setNotConfiguredState(widgetInfo);
|
|
1552
1555
|
_this.translateService.loadTranslations(_this.appConfig.appManagementBaseUrl, _this.data.widgetInfo.widgetName, false).then((/**
|
|
1553
1556
|
* @return {?}
|
|
1554
1557
|
*/
|
|
@@ -1566,19 +1569,18 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1566
1569
|
*/
|
|
1567
1570
|
function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1568
1571
|
var titleLineEnabled;
|
|
1569
|
-
var _this = this;
|
|
1570
1572
|
return __generator(this, function (_a) {
|
|
1571
1573
|
switch (_a.label) {
|
|
1572
1574
|
case 0:
|
|
1573
|
-
|
|
1575
|
+
widgetContainer.widgetElement.addEventListener('on-data-load', (/**
|
|
1574
1576
|
* @param {?} e
|
|
1575
1577
|
* @return {?}
|
|
1576
1578
|
*/
|
|
1577
1579
|
function (e) {
|
|
1578
1580
|
if (e.detail)
|
|
1579
|
-
|
|
1581
|
+
widgetContainer.showPanel = true;
|
|
1580
1582
|
else
|
|
1581
|
-
|
|
1583
|
+
widgetContainer.showPanel = false;
|
|
1582
1584
|
}));
|
|
1583
1585
|
widgetContainer.widgetElement.addEventListener('config-edit-clicked', (/**
|
|
1584
1586
|
* @param {?} e
|
|
@@ -1617,6 +1619,29 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1617
1619
|
});
|
|
1618
1620
|
});
|
|
1619
1621
|
};
|
|
1622
|
+
/**To set Default State for the widget when it is not configured */
|
|
1623
|
+
/**
|
|
1624
|
+
* To set Default State for the widget when it is not configured
|
|
1625
|
+
* @param {?} widgetInfo
|
|
1626
|
+
* @return {?}
|
|
1627
|
+
*/
|
|
1628
|
+
RAWidgetContainer.prototype.setNotConfiguredState = /**
|
|
1629
|
+
* To set Default State for the widget when it is not configured
|
|
1630
|
+
* @param {?} widgetInfo
|
|
1631
|
+
* @return {?}
|
|
1632
|
+
*/
|
|
1633
|
+
function (widgetInfo) {
|
|
1634
|
+
console.log('in set not configured state');
|
|
1635
|
+
console.log(widgetInfo);
|
|
1636
|
+
/**Temp commit, will be reading data from db to check whether it needs default state */
|
|
1637
|
+
if (widgetInfo.showDefaultState && (widgetInfo.widgetConfigInfo.config == "" || Object.keys(JSON.parse(widgetInfo.widgetConfigInfo.config)).length == 0)) {
|
|
1638
|
+
this.isNotConfigured = true;
|
|
1639
|
+
}
|
|
1640
|
+
else {
|
|
1641
|
+
this.isNotConfigured = false;
|
|
1642
|
+
}
|
|
1643
|
+
console.log(this.isNotConfigured);
|
|
1644
|
+
};
|
|
1620
1645
|
/** To refresh widget on input config changes */
|
|
1621
1646
|
/**
|
|
1622
1647
|
* To refresh widget on input config changes
|
|
@@ -1634,6 +1659,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1634
1659
|
return __generator(this, function (_a) {
|
|
1635
1660
|
switch (_a.label) {
|
|
1636
1661
|
case 0:
|
|
1662
|
+
this.setNotConfiguredState(widgetInfo);
|
|
1637
1663
|
widgetContainerContext = this;
|
|
1638
1664
|
widgetConfigFilter = (/** @type {?} */ ({
|
|
1639
1665
|
config: widgetInfo.widgetConfigInfo.config,
|
|
@@ -1705,7 +1731,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1705
1731
|
if (this.lockStatus) {
|
|
1706
1732
|
switch (this.lockStatus) {
|
|
1707
1733
|
case RaWidgetlockStatus.Locked: {
|
|
1708
|
-
this.lockClass = "
|
|
1734
|
+
this.lockClass = "fal fa-lock locked";
|
|
1709
1735
|
this.lockVisible = false;
|
|
1710
1736
|
break;
|
|
1711
1737
|
}
|
|
@@ -1715,7 +1741,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1715
1741
|
break;
|
|
1716
1742
|
}
|
|
1717
1743
|
case RaWidgetlockStatus.PartiallyLocked: {
|
|
1718
|
-
this.lockClass = "
|
|
1744
|
+
this.lockClass = "fal fa-lock locked";
|
|
1719
1745
|
this.lockVisible = false;
|
|
1720
1746
|
break;
|
|
1721
1747
|
}
|
|
@@ -1829,8 +1855,8 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1829
1855
|
RAWidgetContainer.decorators = [
|
|
1830
1856
|
{ type: Component, args: [{
|
|
1831
1857
|
selector: 'ra-widget-container',
|
|
1832
|
-
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;\"
|
|
1833
|
-
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:#
|
|
1858
|
+
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",
|
|
1859
|
+
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}"]
|
|
1834
1860
|
}] }
|
|
1835
1861
|
];
|
|
1836
1862
|
/** @nocollapse */
|
|
@@ -1932,9 +1958,13 @@ if (false) {
|
|
|
1932
1958
|
/** @type {?} */
|
|
1933
1959
|
RAWidgetContainer.prototype.lockTitle;
|
|
1934
1960
|
/** @type {?} */
|
|
1961
|
+
RAWidgetContainer.prototype.isNotConfigured;
|
|
1962
|
+
/** @type {?} */
|
|
1935
1963
|
RAWidgetContainer.prototype.domResized;
|
|
1936
1964
|
/** @type {?} */
|
|
1937
1965
|
RAWidgetContainer.prototype.lockVisible;
|
|
1966
|
+
/** @type {?} */
|
|
1967
|
+
RAWidgetContainer.prototype.detailPageUrl;
|
|
1938
1968
|
/**
|
|
1939
1969
|
* @type {?}
|
|
1940
1970
|
* @private
|