@schneideress/dashboardframework 0.0.141 → 0.0.143
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 +98 -21
- package/bundles/schneideress-dashboardframework.umd.js.map +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js +11 -11
- package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -1
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +54 -9
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +64 -9
- package/fesm2015/schneideress-dashboardframework.js +53 -8
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +63 -8
- 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,7 +5,7 @@ import { BaseService, RATranslateService, RACommonModule } from '@schneideress/r
|
|
|
5
5
|
import { filter, map } from 'rxjs/operators';
|
|
6
6
|
import { NgxUiLoaderService, NgxUiLoaderModule } from 'ngx-ui-loader';
|
|
7
7
|
import { NotifierService, NotifierModule } from 'angular-notifier';
|
|
8
|
-
import { RaWidgetlockStatus, RADownloadType, RADownloadOption } from '@schneideress/widgetframework';
|
|
8
|
+
import { RaWidgetlockStatus, WidgetViewState, RADownloadType, RADownloadOption } from '@schneideress/widgetframework';
|
|
9
9
|
import { BrowserModule } from '@angular/platform-browser';
|
|
10
10
|
import { HttpClientModule } from '@angular/common/http';
|
|
11
11
|
import { CommonModule } from '@angular/common';
|
|
@@ -1373,7 +1373,8 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1373
1373
|
this.deleteToolTipWidth = '0px';
|
|
1374
1374
|
this.noPadding = false;
|
|
1375
1375
|
this.widgetDeleted = new EventEmitter();
|
|
1376
|
-
this.
|
|
1376
|
+
this.isWidgetStateApplicable = false;
|
|
1377
|
+
this.widgetEmptyState = '';
|
|
1377
1378
|
this.lockVisible = false;
|
|
1378
1379
|
this.renderer.listen('window', 'click', (/**
|
|
1379
1380
|
* @param {?} e
|
|
@@ -1405,6 +1406,14 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1405
1406
|
enumerable: true,
|
|
1406
1407
|
configurable: true
|
|
1407
1408
|
});
|
|
1409
|
+
Object.defineProperty(RAWidgetContainer.prototype, "widgetViewState", {
|
|
1410
|
+
get: /**
|
|
1411
|
+
* @return {?}
|
|
1412
|
+
*/
|
|
1413
|
+
function () { return WidgetViewState; },
|
|
1414
|
+
enumerable: true,
|
|
1415
|
+
configurable: true
|
|
1416
|
+
});
|
|
1408
1417
|
/**
|
|
1409
1418
|
* @param {?} changes
|
|
1410
1419
|
* @return {?}
|
|
@@ -1660,7 +1669,9 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1660
1669
|
* @return {?}
|
|
1661
1670
|
*/
|
|
1662
1671
|
function (e) {
|
|
1663
|
-
|
|
1672
|
+
console.log('in widget default state');
|
|
1673
|
+
console.log(e);
|
|
1674
|
+
widgetContainer.setEmptyState(e.detail);
|
|
1664
1675
|
}));
|
|
1665
1676
|
titleLineEnabled = widgetContainer.widgetElement.titleLineEnabled();
|
|
1666
1677
|
if (typeof (titleLineEnabled) != 'undefined') {
|
|
@@ -1737,11 +1748,53 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1737
1748
|
*/
|
|
1738
1749
|
function (widgetInfo, forceEnable) {
|
|
1739
1750
|
if (forceEnable === void 0) { forceEnable = false; }
|
|
1751
|
+
console.log('in set no configured');
|
|
1752
|
+
console.log(widgetInfo);
|
|
1753
|
+
console.log(forceEnable);
|
|
1740
1754
|
if ((widgetInfo.showDefaultState && (widgetInfo.widgetConfigInfo.config == "" || Object.keys(JSON.parse(widgetInfo.widgetConfigInfo.config)).length == 0)) || (forceEnable)) {
|
|
1741
|
-
|
|
1755
|
+
console.log('ininf');
|
|
1756
|
+
this.isWidgetStateApplicable = true;
|
|
1757
|
+
this.widgetEmptyState = WidgetViewState.emptyConfig.toString();
|
|
1742
1758
|
}
|
|
1743
1759
|
else {
|
|
1744
|
-
|
|
1760
|
+
console.log('in else');
|
|
1761
|
+
this.widgetEmptyState = '';
|
|
1762
|
+
this.isWidgetStateApplicable = false;
|
|
1763
|
+
}
|
|
1764
|
+
};
|
|
1765
|
+
/**To configure empty state for the widget */
|
|
1766
|
+
/**
|
|
1767
|
+
* To configure empty state for the widget
|
|
1768
|
+
* @param {?} widgetState
|
|
1769
|
+
* @return {?}
|
|
1770
|
+
*/
|
|
1771
|
+
RAWidgetContainer.prototype.setEmptyState = /**
|
|
1772
|
+
* To configure empty state for the widget
|
|
1773
|
+
* @param {?} widgetState
|
|
1774
|
+
* @return {?}
|
|
1775
|
+
*/
|
|
1776
|
+
function (widgetState) {
|
|
1777
|
+
console.log('in wc contanjiner widget state');
|
|
1778
|
+
console.log(widgetState);
|
|
1779
|
+
this.widgetEmptyState = widgetState;
|
|
1780
|
+
if (widgetState != WidgetViewState.normal) {
|
|
1781
|
+
this.isWidgetStateApplicable = true;
|
|
1782
|
+
this.isDownloadIconVisible = false;
|
|
1783
|
+
}
|
|
1784
|
+
else {
|
|
1785
|
+
console.log('in else case');
|
|
1786
|
+
this.isWidgetStateApplicable = false;
|
|
1787
|
+
}
|
|
1788
|
+
switch (widgetState) {
|
|
1789
|
+
case WidgetViewState.emptyConfig:
|
|
1790
|
+
console.log('in case emptyconfig');
|
|
1791
|
+
this.setNotConfiguredState(this.data.widgetInfo, true);
|
|
1792
|
+
break;
|
|
1793
|
+
case WidgetViewState.emptyData:
|
|
1794
|
+
console.log('in case empty');
|
|
1795
|
+
break;
|
|
1796
|
+
case WidgetViewState.error:
|
|
1797
|
+
break;
|
|
1745
1798
|
}
|
|
1746
1799
|
};
|
|
1747
1800
|
/** To refresh widget on input config changes */
|
|
@@ -2013,8 +2066,8 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
2013
2066
|
RAWidgetContainer.decorators = [
|
|
2014
2067
|
{ type: Component, args: [{
|
|
2015
2068
|
selector: 'ra-widget-container',
|
|
2016
|
-
template: "<div class=\"wc-wrapper\" (mouseleave)=\"hideDropDown()\"\r\n
|
|
2017
|
-
styles: [".sp_icon{float:left;margin:0 15% 0 0}.dropbtn{color:#42b4e6;text-align:right;height:100%}.dropbtn i{cursor:pointer;width:100%;height:100%}.dropdown{visibility:hidden;opacity:0;transition:visibility,opacity .5s linear;position:relative;width:100%}@media screen and (max-width:400px){.dropdown{visibility:visible;opacity:1}}.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{height:100%;display:flex;align-items:center}.defaultConfig .button{min-height:34px;font-size:13px;width:100%;min-height:34px;color:#fff;background:no-repeat padding-box #3dcd58;display:table;margin:9px 0 0;cursor:pointer;text-align:center;float:left}.defaultConfig .contentarea{width:80%;margin:0 auto;float:left;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.defaultConfig .textarea{width:100%;float:left}.defaultConfig .textarea .icon{width:52px;
|
|
2069
|
+
template: "<div class=\"wc-wrapper\" (mouseleave)=\"hideDropDown()\"\r\n [ngStyle]=\"{'margin-left': noPadding?'0px':'15px','margin-right': noPadding?'0px':'15px'}\">\r\n <div class=\"wcheader widget-move\" [ngClass]=\"{'underLine': enableTitleLine || isWidgetStateApplicable}\">\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 [ngStyle]=\"{'margin-left': noPadding?'15px':'0px','margin-right': noPadding?'15px':'0px'}\">\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\r\n <div class=\"title-bar-lock-icon lock-dropdown\" [hidden]=\"!lockDetails && !lockTemplateInfo\">\r\n <i class=\"fal fa-lock lock\"></i>\r\n <div class=\"lock-dropdown-content light widget-config-item\">\r\n <div *ngIf=\"lockDetails && !lockTemplateInfo\">\r\n <label style=\"color: #D9F0FA;\">\r\n {{'Common.lockedfields'|translate}}\r\n </label>\r\n <div style=\"color: white;\">\r\n <label class=\"bold\" style=\"margin-bottom: 0px;width: 100%;\" *ngFor=\"let item of lockDetails\">\r\n {{item}}\r\n </label>\r\n </div>\r\n <hr>\r\n <div style=\"color: #D9F0FA;\">\r\n <label>{{'Common.lockedfieldseditinfo'|translate}}</label>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!lockDetails && lockTemplateInfo\">\r\n <ng-container *ngTemplateOutlet=\"lockTemplateInfo\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"dropdown\" style=\"width:10px;\">\r\n <div class=\"dropbtn title-bar-icon\">\r\n <i (click)=\"showDropDown()\" #widgetDropdown class=\"fal fa-ellipsis-v\"></i>\r\n </div>\r\n <div class=\"download-content dropdown-content widget-config-item\"\r\n [ngClass]=\"{'dropdown-click': dropDownShown}\" style=\"z-index: 1002;\">\r\n\r\n <div style=\"color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;\">\r\n {{'Common.settings'|translate}}</div>\r\n\r\n <a style=\"padding-top: 10px;\" (click)=\"editWidget()\">\r\n <ra-tooltip [value]=\"editToolTipValue\" [width]=\"editToolTipWidth\">\r\n <i class=\"fal fa-edit\"></i>\r\n <span style=\"padding-left: 6px;\">{{editText}}</span>\r\n </ra-tooltip>\r\n </a>\r\n <a (click)=\"copyWidget()\">\r\n <ra-tooltip [value]=\"copyToolTipValue\" [width]=\"copyToolTipWidth\">\r\n <i class=\"fal fa-copy\"></i>\r\n <span style=\"padding-left: 10px;\">{{copyText}}</span>\r\n </ra-tooltip>\r\n </a>\r\n <a (click)=\"moveWidget()\">\r\n <ra-tooltip [value]=\"moveToolTipValue\" [width]=\"moveToolTipWidth\">\r\n <i class=\"fal fa-arrows-alt\"></i>\r\n <span style=\"padding-left: 9px;\">{{moveText}}</span>\r\n </ra-tooltip>\r\n </a>\r\n <a *ngIf=\"detailPageUrl\" (click)=\"visitPage()\"\r\n style=\"max-height: 30px;align-items: center;align-content: center; display: flex;\">\r\n <i style=\"padding-left: 4px;font-size: 27px !important;\" class=\"fal fa-angle-right\"></i>\r\n <span style=\"padding-left: 11px;margin-top: 2px;\">{{'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;\"\r\n *ngIf=\"isDownloadIconVisible\">{{'Common.downloads'|translate}}</span>\r\n <div *ngIf=\"isChartDownloadVisible\" style=\"padding-top: 10px;\" class=\"chartDownload\">\r\n <a (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 (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 (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 (click)=\"downloadIconClicked('SVG')\">\r\n <i class=\"fal fa-file-alt\"></i>\r\n <span>{{'Common.svg'|translate}}</span>\r\n </a>\r\n </div>\r\n <div *ngIf=\"isGridDownloadVisible\" class=\"gridDownload\">\r\n <a (click)=\"downloadIconClicked('CSV')\">\r\n <ra-tooltip [value]=\"excelToolTipValue\" [width]=\"excelToolTipWidth\">\r\n <i class=\"fal fa-download\"></i>\r\n <span>{{excelText}}</span>\r\n </ra-tooltip>\r\n </a>\r\n </div>\r\n <hr *ngIf=\"isDownloadIconVisible\" class=\"hr\">\r\n <a (click)=\"deleteWidget()\">\r\n <ra-tooltip [value]=\"deleteToolTipValue\" [width]=\"deleteToolTipWidth\">\r\n <i class=\"fal fa-times\" style=\"padding-left: 3px;color: red;\"></i>\r\n <span>{{deleteText}}</span>\r\n </ra-tooltip>\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\" [ngStyle]=\"{'bottom': noPadding?'0px':'15px'}\">\r\n <div [hidden]=\"isWidgetStateApplicable\" 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]=\"isWidgetStateApplicable\">\r\n <div #ctlWidget></div>\r\n </div>\r\n <div *ngIf=\"isWidgetStateApplicable\" class=\"defaultConfig\">\r\n <div class=\"contentarea\" *ngIf=\"widgetEmptyState == widgetViewState.emptyConfig\">\r\n <div class=\"textarea light\">\r\n <span class=\"icon empty-config\"><i class=\"fal fa-edit\" style=\"font-size: 16px;\"></i></span>\r\n <span class=\"text\">{{'Common.configureinfo'|translate}}</span>\r\n </div>\r\n <div class=\"button\" (click)=\"editWidget()\">\r\n <div class=\"configuretext\">\r\n {{'Common.configurewidget'|translate}}\r\n </div>\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 class=\"contentarea emptyDataView\"\r\n *ngIf=\"isWidgetStateApplicable && widgetEmptyState == widgetViewState.emptyData\">\r\n <div class=\"textarea light\">\r\n <span class=\"icon empty-data\"><i class=\"fal fa-empty-set\"></i></span>\r\n <span class=\"text\">{{'Common.widgetemptydatainfo'|translate}}</span>\r\n </div>\r\n </div>\r\n <div class=\"contentarea errorView\" *ngIf=\"isWidgetStateApplicable && widgetEmptyState == widgetViewState.error\">\r\n <div class=\"textarea light\">\r\n <span class=\"icon error-view\"><i class=\"fal fa-octagon\"></i></span>\r\n <span class=\"text\">{{'Common.widgeterrorinfo'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
2070
|
+
styles: [".sp_icon{float:left;margin:0 15% 0 0}.dropbtn{color:#42b4e6;text-align:right;height:100%}.dropbtn i{cursor:pointer;width:100%;height:100%}.dropdown{visibility:hidden;opacity:0;transition:visibility,opacity .5s linear;position:relative;width:100%}@media screen and (max-width:400px){.dropdown{visibility:visible;opacity:1}}.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{height:100%;display:flex;align-items:center}.defaultConfig .button{min-height:34px;font-size:13px;width:100%;min-height:34px;color:#fff;background:no-repeat padding-box #3dcd58;display:table;margin:9px 0 0;cursor:pointer;text-align:center;float:left}.defaultConfig .contentarea{width:80%;margin:0 auto;float:left;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.defaultConfig .textarea{width:100%;float:left}.defaultConfig .textarea .icon{width:52px;height:100%;float:left}.defaultConfig .textarea .empty-config{color:#32ad3c}.defaultConfig .textarea .error-view{color:#dc0a0a}.defaultConfig .textarea .empty-data{color:#5ab5e6}.defaultConfig .textarea .text{width:calc(100% - 52px);min-height:60px;float:left;font-size:14px;text-align:left}.defaultConfig .textarea .icon i{font-size:40px!important}.configuretext{display:table-cell;vertical-align:middle;height:34px}.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}.lock{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 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}.lock-dropdown{transition:visibility,opacity .5s linear;position:relative;display:inline-block;margin:0 6px 0 10px}.lock-dropdown-content{display:none;margin-top:8px;position:absolute;right:0;top:79%;box-shadow:0 8px 16px 8px rgba(0,0,0,.2);z-index:899;font-size:12px;min-width:220px!important;min-height:112px;background-color:#219bfd;opacity:.9;padding:15px;color:#fff}.lock-dropdown-content hr{border-bottom:1px solid #fff}.lock-dropdown:hover .lock-dropdown-content{display:block!important;-webkit-animation:.3s ease-out slide-down;animation:.3s ease-out slide-down}"]
|
|
2018
2071
|
}] }
|
|
2019
2072
|
];
|
|
2020
2073
|
/** @nocollapse */
|
|
@@ -2158,7 +2211,9 @@ if (false) {
|
|
|
2158
2211
|
/** @type {?} */
|
|
2159
2212
|
RAWidgetContainer.prototype.lockTitle;
|
|
2160
2213
|
/** @type {?} */
|
|
2161
|
-
RAWidgetContainer.prototype.
|
|
2214
|
+
RAWidgetContainer.prototype.isWidgetStateApplicable;
|
|
2215
|
+
/** @type {?} */
|
|
2216
|
+
RAWidgetContainer.prototype.widgetEmptyState;
|
|
2162
2217
|
/** @type {?} */
|
|
2163
2218
|
RAWidgetContainer.prototype.domResized;
|
|
2164
2219
|
/** @type {?} */
|