@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
|
@@ -1530,6 +1530,7 @@
|
|
|
1530
1530
|
this.toolTipValue = ' ';
|
|
1531
1531
|
this.toolTipWidth = '0px';
|
|
1532
1532
|
this.widgetDeleted = new core.EventEmitter();
|
|
1533
|
+
this.isNotConfigured = false;
|
|
1533
1534
|
this.lockVisible = false;
|
|
1534
1535
|
this.renderer.listen('window', 'click', (/**
|
|
1535
1536
|
* @param {?} e
|
|
@@ -1733,11 +1734,13 @@
|
|
|
1733
1734
|
config: widgetInfo.widgetConfigInfo.config,
|
|
1734
1735
|
globalFilter: this.globalFilter
|
|
1735
1736
|
}));
|
|
1737
|
+
this.detailPageUrl = widgetInfo.detailPageUrl;
|
|
1736
1738
|
widgetContainer = this;
|
|
1737
1739
|
this.dashboardService.loadExternalScript(widgetInfo.scriptUrl, (/**
|
|
1738
1740
|
* @return {?}
|
|
1739
1741
|
*/
|
|
1740
1742
|
function () {
|
|
1743
|
+
_this.setNotConfiguredState(widgetInfo);
|
|
1741
1744
|
_this.translateService.loadTranslations(_this.appConfig.appManagementBaseUrl, _this.data.widgetInfo.widgetName, false).then((/**
|
|
1742
1745
|
* @return {?}
|
|
1743
1746
|
*/
|
|
@@ -1755,19 +1758,18 @@
|
|
|
1755
1758
|
*/
|
|
1756
1759
|
function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1757
1760
|
var titleLineEnabled;
|
|
1758
|
-
var _this = this;
|
|
1759
1761
|
return __generator(this, function (_a) {
|
|
1760
1762
|
switch (_a.label) {
|
|
1761
1763
|
case 0:
|
|
1762
|
-
|
|
1764
|
+
widgetContainer.widgetElement.addEventListener('on-data-load', (/**
|
|
1763
1765
|
* @param {?} e
|
|
1764
1766
|
* @return {?}
|
|
1765
1767
|
*/
|
|
1766
1768
|
function (e) {
|
|
1767
1769
|
if (e.detail)
|
|
1768
|
-
|
|
1770
|
+
widgetContainer.showPanel = true;
|
|
1769
1771
|
else
|
|
1770
|
-
|
|
1772
|
+
widgetContainer.showPanel = false;
|
|
1771
1773
|
}));
|
|
1772
1774
|
widgetContainer.widgetElement.addEventListener('config-edit-clicked', (/**
|
|
1773
1775
|
* @param {?} e
|
|
@@ -1806,6 +1808,29 @@
|
|
|
1806
1808
|
});
|
|
1807
1809
|
});
|
|
1808
1810
|
};
|
|
1811
|
+
/**To set Default State for the widget when it is not configured */
|
|
1812
|
+
/**
|
|
1813
|
+
* To set Default State for the widget when it is not configured
|
|
1814
|
+
* @param {?} widgetInfo
|
|
1815
|
+
* @return {?}
|
|
1816
|
+
*/
|
|
1817
|
+
RAWidgetContainer.prototype.setNotConfiguredState = /**
|
|
1818
|
+
* To set Default State for the widget when it is not configured
|
|
1819
|
+
* @param {?} widgetInfo
|
|
1820
|
+
* @return {?}
|
|
1821
|
+
*/
|
|
1822
|
+
function (widgetInfo) {
|
|
1823
|
+
console.log('in set not configured state');
|
|
1824
|
+
console.log(widgetInfo);
|
|
1825
|
+
/**Temp commit, will be reading data from db to check whether it needs default state */
|
|
1826
|
+
if (widgetInfo.showDefaultState && (widgetInfo.widgetConfigInfo.config == "" || Object.keys(JSON.parse(widgetInfo.widgetConfigInfo.config)).length == 0)) {
|
|
1827
|
+
this.isNotConfigured = true;
|
|
1828
|
+
}
|
|
1829
|
+
else {
|
|
1830
|
+
this.isNotConfigured = false;
|
|
1831
|
+
}
|
|
1832
|
+
console.log(this.isNotConfigured);
|
|
1833
|
+
};
|
|
1809
1834
|
/** To refresh widget on input config changes */
|
|
1810
1835
|
/**
|
|
1811
1836
|
* To refresh widget on input config changes
|
|
@@ -1823,6 +1848,7 @@
|
|
|
1823
1848
|
return __generator(this, function (_a) {
|
|
1824
1849
|
switch (_a.label) {
|
|
1825
1850
|
case 0:
|
|
1851
|
+
this.setNotConfiguredState(widgetInfo);
|
|
1826
1852
|
widgetContainerContext = this;
|
|
1827
1853
|
widgetConfigFilter = (/** @type {?} */ ({
|
|
1828
1854
|
config: widgetInfo.widgetConfigInfo.config,
|
|
@@ -1894,7 +1920,7 @@
|
|
|
1894
1920
|
if (this.lockStatus) {
|
|
1895
1921
|
switch (this.lockStatus) {
|
|
1896
1922
|
case widgetframework.RaWidgetlockStatus.Locked: {
|
|
1897
|
-
this.lockClass = "
|
|
1923
|
+
this.lockClass = "fal fa-lock locked";
|
|
1898
1924
|
this.lockVisible = false;
|
|
1899
1925
|
break;
|
|
1900
1926
|
}
|
|
@@ -1904,7 +1930,7 @@
|
|
|
1904
1930
|
break;
|
|
1905
1931
|
}
|
|
1906
1932
|
case widgetframework.RaWidgetlockStatus.PartiallyLocked: {
|
|
1907
|
-
this.lockClass = "
|
|
1933
|
+
this.lockClass = "fal fa-lock locked";
|
|
1908
1934
|
this.lockVisible = false;
|
|
1909
1935
|
break;
|
|
1910
1936
|
}
|
|
@@ -2018,8 +2044,8 @@
|
|
|
2018
2044
|
RAWidgetContainer.decorators = [
|
|
2019
2045
|
{ type: core.Component, args: [{
|
|
2020
2046
|
selector: 'ra-widget-container',
|
|
2021
|
-
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;\"
|
|
2022
|
-
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:#
|
|
2047
|
+
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",
|
|
2048
|
+
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}"]
|
|
2023
2049
|
}] }
|
|
2024
2050
|
];
|
|
2025
2051
|
/** @nocollapse */
|
|
@@ -2121,9 +2147,13 @@
|
|
|
2121
2147
|
/** @type {?} */
|
|
2122
2148
|
RAWidgetContainer.prototype.lockTitle;
|
|
2123
2149
|
/** @type {?} */
|
|
2150
|
+
RAWidgetContainer.prototype.isNotConfigured;
|
|
2151
|
+
/** @type {?} */
|
|
2124
2152
|
RAWidgetContainer.prototype.domResized;
|
|
2125
2153
|
/** @type {?} */
|
|
2126
2154
|
RAWidgetContainer.prototype.lockVisible;
|
|
2155
|
+
/** @type {?} */
|
|
2156
|
+
RAWidgetContainer.prototype.detailPageUrl;
|
|
2127
2157
|
/**
|
|
2128
2158
|
* @type {?}
|
|
2129
2159
|
* @private
|