@schneideress/dashboardframework 0.0.94 → 0.0.97
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 +26 -6
- 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/gridster/lib/gridster.component.js +1 -1
- package/esm2015/gridster/lib/gridsterItem.component.js +1 -1
- package/esm2015/lib/ra-dashboard-area/ra.dashboard.area.js +21 -5
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +1 -1
- package/esm5/gridster/lib/gridster.component.js +1 -1
- package/esm5/gridster/lib/gridsterItem.component.js +1 -1
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +25 -5
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +1 -1
- package/fesm2015/schneideress-dashboardframework.js +23 -7
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +27 -7
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +1 -0
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Injectable, Injector, ɵɵdefineInjectable, ɵɵinject, INJECTOR, Component, NgZone, Input, ViewChild, EventEmitter, Renderer2, Output, ViewEncapsulation, ElementRef, ChangeDetectorRef, Host, NgModule } from '@angular/core';
|
|
1
|
+
import { Injectable, Injector, ɵɵdefineInjectable, ɵɵinject, INJECTOR, Component, NgZone, Input, ViewChild, HostListener, EventEmitter, Renderer2, Output, ViewEncapsulation, ElementRef, ChangeDetectorRef, Host, NgModule } from '@angular/core';
|
|
2
2
|
import { of, Subject } from 'rxjs';
|
|
3
3
|
import { BaseService, RATranslateService, RACommonModule } from '@schneideress/ra-common';
|
|
4
4
|
import { filter, map } from 'rxjs/operators';
|
|
@@ -594,6 +594,20 @@ class RADashboardArea {
|
|
|
594
594
|
this.widgetHeight = 3;
|
|
595
595
|
this.widgetWidth = 5;
|
|
596
596
|
}
|
|
597
|
+
/**
|
|
598
|
+
* @param {?} event
|
|
599
|
+
* @return {?}
|
|
600
|
+
*/
|
|
601
|
+
onResize(event) {
|
|
602
|
+
/** @type {?} */
|
|
603
|
+
var areaContext = this;
|
|
604
|
+
setTimeout((/**
|
|
605
|
+
* @return {?}
|
|
606
|
+
*/
|
|
607
|
+
function () {
|
|
608
|
+
areaContext.setAreaHeight();
|
|
609
|
+
}), 1000);
|
|
610
|
+
}
|
|
597
611
|
/**
|
|
598
612
|
* @return {?}
|
|
599
613
|
*/
|
|
@@ -812,13 +826,14 @@ class RADashboardArea {
|
|
|
812
826
|
/** @type {?} */
|
|
813
827
|
let areaScrollHeightMob = 0;
|
|
814
828
|
if (isMobile) {
|
|
815
|
-
areaScrollHeightMob = this.widgetList.length * 300 +
|
|
829
|
+
areaScrollHeightMob = this.widgetList.length * 300 + 200;
|
|
816
830
|
areaHeight = areaScrollHeightMob;
|
|
817
831
|
}
|
|
818
832
|
if (areaHeight < 600) {
|
|
819
833
|
areaHeight = 600;
|
|
820
834
|
}
|
|
821
835
|
this.gridheight = areaHeight;
|
|
836
|
+
console.log('area height adjusted');
|
|
822
837
|
}
|
|
823
838
|
/**
|
|
824
839
|
* To remove a widget instance from dashboard and to save info in database
|
|
@@ -974,7 +989,7 @@ RADashboardArea.decorators = [
|
|
|
974
989
|
{ type: Component, args: [{
|
|
975
990
|
selector: 'ra-dashboard-area',
|
|
976
991
|
template: "<div #gridWrapper class=\"wrap gridster\" [style.height.px]=\"gridheight\" >\r\n<!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [grid-cell-height]=\"item.widgetInfo.rowHeight\" [widget-width]=\"item.cols\" [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\"></ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n <notifier-container></notifier-container>\r\n</div>\r\n\r\n",
|
|
977
|
-
styles: ["gridster{width:inherit;resize:height;display
|
|
992
|
+
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#ededed;overflow-y:hidden!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;box-shadow:0 1px 10px rgba(0,0,0,.05)}gridster-item:hover{box-shadow:0 1px 10px rgba(0,0,0,.15)}"]
|
|
978
993
|
}] }
|
|
979
994
|
];
|
|
980
995
|
/** @nocollapse */
|
|
@@ -993,7 +1008,8 @@ RADashboardArea.propDecorators = {
|
|
|
993
1008
|
widgetHeight: [{ type: Input, args: ['widget-height',] }],
|
|
994
1009
|
widgetWidth: [{ type: Input, args: ['widget-width',] }],
|
|
995
1010
|
appConfig: [{ type: Input, args: ['app-config',] }],
|
|
996
|
-
gridWrapper: [{ type: ViewChild, args: ['gridWrapper', { static: false },] }]
|
|
1011
|
+
gridWrapper: [{ type: ViewChild, args: ['gridWrapper', { static: false },] }],
|
|
1012
|
+
onResize: [{ type: HostListener, args: ['window:resize', ['$event'],] }]
|
|
997
1013
|
};
|
|
998
1014
|
if (false) {
|
|
999
1015
|
/** @type {?} */
|
|
@@ -1420,7 +1436,7 @@ RAWidgetContainer.decorators = [
|
|
|
1420
1436
|
{ type: Component, args: [{
|
|
1421
1437
|
selector: 'ra-widget-container',
|
|
1422
1438
|
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-11 float-left title-label\">\r\n <ra-tooltip [value]=\"data.widgetInfo.widgetTitle\" [width]=\"'300px'\">\r\n <span>{{data.widgetInfo.widgetTitle}}</span>\r\n </ra-tooltip>\r\n </div>\r\n\r\n\r\n <div class=\"col-md-1\" 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=\"fas 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 <div class=\"dropdown\">\r\n <div class=\"dropbtn title-bar-icon\"> <i #widgetDropdown class=\"fas fa-cog\" (click)=\"showDropDown()\"></i>\r\n </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 <ra-tooltip [value]=\"lockTitle\" [width]=\"'300px'\">\r\n <div class=\"title-bar-lock-icon\">\r\n <i [ngClass]=\"lockClass\"></i>\r\n\r\n </div>\r\n </ra-tooltip>\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>",
|
|
1423
|
-
styles: [".wcheader{width:100%;height:45px;background:#fff;color:#3dcd58;position:absolute;left:0;top:0}.underLine{border-bottom:2px solid #d4d7d8}.wc-wrapper{height:100%;position:relative;margin:auto 15px}.wc-mover{cursor:all-scroll}.wcBody{width:100%;position:absolute;top:46px;left:0;bottom:15px}.wcBodyBorder{border:1px dashed #e6e2e2}.sp_icon{float:left;margin:0 15% 0 0}.dropbtn{cursor:pointer;color:#42b4e6}.dropdown{visibility:hidden;opacity:0
|
|
1439
|
+
styles: [".wcheader{width:100%;height:45px;background:#fff;color:#3dcd58;position:absolute;left:0;top:0}.underLine{border-bottom:2px solid #d4d7d8}.wc-wrapper{height:100%;position:relative;margin:auto 15px}.wc-mover{cursor:all-scroll}.wcBody{width:100%;position:absolute;top:46px;left:0;bottom:15px}.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!important;-webkit-animation:.3s ease-out slide-down;animation:.3s ease-out slide-down}.download-icon{cursor:pointer}.dropdown:hover .dropdown-content{color:#fff}.wc-wrapper:hover .dropdown{visibility:visible;opacity:1}.title-bar-icon{margin:0 3px;color:#42b4e6}.title-bar-lock-icon{margin:0 3px}.hr{border:0;border-top:1px solid rgba(0,0,0,.1)}@keyframes slide-down{0%{opacity:0;transform:translateY(-20%)}100%{opacity:1;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}.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}"]
|
|
1424
1440
|
}] }
|
|
1425
1441
|
];
|
|
1426
1442
|
/** @nocollapse */
|
|
@@ -3433,7 +3449,7 @@ GridsterComponent.decorators = [
|
|
|
3433
3449
|
selector: 'gridster',
|
|
3434
3450
|
template: "<div class=\"gridster-column\" *ngFor=\"let column of gridColumns; let i = index;\"\r\n [ngStyle]=\"gridRenderer.getGridColumnStyle(i)\"></div>\r\n<div class=\"gridster-row\" *ngFor=\"let row of gridRows; let i = index;\"\r\n [ngStyle]=\"gridRenderer.getGridRowStyle(i)\"></div>\r\n<ng-content></ng-content>\r\n<gridster-preview class=\"gridster-preview\"></gridster-preview>\r\n",
|
|
3435
3451
|
encapsulation: ViewEncapsulation.None,
|
|
3436
|
-
styles: ["gridster{clear:both;position:relative;box-sizing:border-box;background:#fff;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;overflow:auto}gridster.fit{overflow-x:hidden;overflow-y:hidden}gridster.scrollVertical{overflow-x:hidden;overflow-y:auto}gridster.scrollHorizontal{overflow-x:auto;overflow-y:hidden}gridster.fixed{overflow:auto}gridster.mobile{overflow-x:hidden;overflow-y:auto
|
|
3452
|
+
styles: ["gridster{clear:both;position:relative;box-sizing:border-box;background:#fff;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;overflow:auto}gridster.fit{overflow-x:hidden;overflow-y:hidden}gridster.scrollVertical{overflow-x:hidden;overflow-y:auto}gridster.scrollHorizontal{overflow-x:auto;overflow-y:hidden}gridster.fixed{overflow:auto}gridster.mobile{overflow-x:hidden;overflow-y:auto;flex-flow:column}gridster.mobile gridster-item{position:relative;width:100%!important;min-height:300px!important}gridster .gridster-column,gridster .gridster-row{position:absolute;display:none;transition:.3s;box-sizing:border-box}gridster.display-grid .gridster-column,gridster.display-grid .gridster-row{display:block}gridster .gridster-column{border-left:1px solid #ccc;border-right:1px solid #ccc}gridster .gridster-row{border-top:1px solid #ccc;border-bottom:1px solid #ccc}"]
|
|
3437
3453
|
}] }
|
|
3438
3454
|
];
|
|
3439
3455
|
/** @nocollapse */
|
|
@@ -5909,7 +5925,7 @@ GridsterItemComponent.decorators = [
|
|
|
5909
5925
|
selector: 'gridster-item',
|
|
5910
5926
|
template: "<ng-content></ng-content>\r\n<div (mousedown)=\"resize.dragStartDelay($event)\" (touchstart)=\"resize.dragStartDelay($event)\"\r\n [hidden]=\"!gridster.$options.resizable.handles.s || !resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-s\"></div>\r\n<div (mousedown)=\"resize.dragStartDelay($event)\" (touchstart)=\"resize.dragStartDelay($event)\"\r\n [hidden]=\"!gridster.$options.resizable.handles.e || !resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-e\"></div>\r\n<div (mousedown)=\"resize.dragStartDelay($event)\" (touchstart)=\"resize.dragStartDelay($event)\"\r\n [hidden]=\"!gridster.$options.resizable.handles.n || !resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-n\"></div>\r\n<div (mousedown)=\"resize.dragStartDelay($event)\" (touchstart)=\"resize.dragStartDelay($event)\"\r\n [hidden]=\"!gridster.$options.resizable.handles.w || !resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-w\"></div>\r\n<div (mousedown)=\"resize.dragStartDelay($event)\" (touchstart)=\"resize.dragStartDelay($event)\"\r\n [hidden]=\"!gridster.$options.resizable.handles.se || !resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-se\"></div>\r\n<div (mousedown)=\"resize.dragStartDelay($event)\" (touchstart)=\"resize.dragStartDelay($event)\"\r\n [hidden]=\"!gridster.$options.resizable.handles.ne || !resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-ne\"></div>\r\n<div (mousedown)=\"resize.dragStartDelay($event)\" (touchstart)=\"resize.dragStartDelay($event)\"\r\n [hidden]=\"!gridster.$options.resizable.handles.sw || !resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-sw\"></div>\r\n<div (mousedown)=\"resize.dragStartDelay($event)\" (touchstart)=\"resize.dragStartDelay($event)\"\r\n [hidden]=\"!gridster.$options.resizable.handles.nw || !resize.resizeEnabled\"\r\n class=\"gridster-item-resizable-handler handle-nw\"></div>\r\n",
|
|
5911
5927
|
encapsulation: ViewEncapsulation.None,
|
|
5912
|
-
styles: ["gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden
|
|
5928
|
+
styles: ["gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}gridster-item.gridster-item-moving{cursor:move}gridster-item.gridster-item-moving,gridster-item.gridster-item-resizing{transition:none;z-index:2;box-shadow:0 0 5px 5px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.gridster-item-resizable-handler{position:absolute;z-index:2}.gridster-item-resizable-handler.handle-n{cursor:n-resize;height:10px;right:0;top:0;left:0}.gridster-item-resizable-handler.handle-e{cursor:e-resize;width:10px;bottom:0;right:0;top:0}.gridster-item-resizable-handler.handle-s{cursor:s-resize;height:10px;right:0;bottom:0;left:0}.gridster-item-resizable-handler.handle-w{cursor:w-resize;width:10px;left:0;top:0;bottom:0}.gridster-item-resizable-handler.handle-ne{cursor:ne-resize;width:10px;height:10px;right:0;top:0}.gridster-item-resizable-handler.handle-nw{cursor:nw-resize;width:10px;height:10px;left:0;top:0}.gridster-item-resizable-handler.handle-se{cursor:se-resize;width:0;height:0;right:0;bottom:0;border-style:solid;border-width:0 0 10px 10px;border-color:transparent}.gridster-item-resizable-handler.handle-sw{cursor:sw-resize;width:10px;height:10px;left:0;bottom:0}gridster-item:hover .gridster-item-resizable-handler.handle-se{border-color:transparent transparent #ccc}"]
|
|
5913
5929
|
}] }
|
|
5914
5930
|
];
|
|
5915
5931
|
/** @nocollapse */
|