@schneideress/dashboardframework 0.0.249 → 0.0.251
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 +40 -24
- package/bundles/schneideress-dashboardframework.umd.js.map +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js +2 -2
- package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -1
- package/esm2015/lib/ra-dashboard-area/ra.dashboard.area.js +19 -16
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +10 -7
- package/esm2015/lib/ra.dashboard.responsive.service.js +12 -2
- package/esm2015/lib/ra.gridster.config.js +3 -3
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +19 -16
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +10 -7
- package/esm5/lib/ra.dashboard.responsive.service.js +12 -2
- package/esm5/lib/ra.gridster.config.js +3 -3
- package/fesm2015/schneideress-dashboardframework.js +40 -24
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +40 -24
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra.dashboard.responsive.service.d.ts +1 -1
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -410,9 +410,9 @@
|
|
|
410
410
|
margin: 10,
|
|
411
411
|
outerMargin: true,
|
|
412
412
|
outerMarginTop: 10,
|
|
413
|
-
outerMarginRight:
|
|
413
|
+
outerMarginRight: 0,
|
|
414
414
|
outerMarginBottom: 30,
|
|
415
|
-
outerMarginLeft:
|
|
415
|
+
outerMarginLeft: 0,
|
|
416
416
|
useTransformPositioning: true,
|
|
417
417
|
mobileBreakpoint: 640,
|
|
418
418
|
minCols: 10,
|
|
@@ -527,7 +527,7 @@
|
|
|
527
527
|
enumerable: true,
|
|
528
528
|
configurable: true
|
|
529
529
|
});
|
|
530
|
-
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt) {
|
|
530
|
+
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt, resize, canMove) {
|
|
531
531
|
var config = GridsterConfigDefaultSettings;
|
|
532
532
|
config.minCols = this.currentResInfo.maxCols;
|
|
533
533
|
config.maxCols = this.currentResInfo.maxCols;
|
|
@@ -549,6 +549,13 @@
|
|
|
549
549
|
config.swap = true;
|
|
550
550
|
config.draggable.enabled = true;
|
|
551
551
|
}
|
|
552
|
+
if (!resize) {
|
|
553
|
+
config.resizable.enabled = false;
|
|
554
|
+
config.swap = false;
|
|
555
|
+
}
|
|
556
|
+
if (!canMove) {
|
|
557
|
+
config.draggable.enabled = false;
|
|
558
|
+
}
|
|
552
559
|
return config;
|
|
553
560
|
};
|
|
554
561
|
/**To map IwidgetInfo object to gridsterItem */
|
|
@@ -556,6 +563,9 @@
|
|
|
556
563
|
if (widget.widgetSettings) {
|
|
557
564
|
widget.settings = JSON.parse(widget.widgetSettings);
|
|
558
565
|
}
|
|
566
|
+
if (widget.templateSettings) {
|
|
567
|
+
widget.templateSettings = JSON.parse(widget.templateSettings);
|
|
568
|
+
}
|
|
559
569
|
var gridsterItem = {
|
|
560
570
|
cols: this.getWidth(widget.width),
|
|
561
571
|
rows: this.getHeight(widget.height),
|
|
@@ -669,6 +679,7 @@
|
|
|
669
679
|
this.isWidgetLoaded = true;
|
|
670
680
|
this.loadWidgets(this.userDashboardId, this.areaKey);
|
|
671
681
|
}
|
|
682
|
+
this.initiateGridsterConfig();
|
|
672
683
|
if (changes.raDashboardEventBus && changes.raDashboardEventBus.currentValue != changes.raDashboardEventBus.previousValue) {
|
|
673
684
|
this.inititateEventBusSubscritions();
|
|
674
685
|
}
|
|
@@ -676,21 +687,23 @@
|
|
|
676
687
|
/**To set GridsterConfig */
|
|
677
688
|
RADashboardArea.prototype.initiateGridsterConfig = function () {
|
|
678
689
|
var _this = this;
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
};
|
|
686
|
-
this.options.itemChangeCallback = function (item) {
|
|
687
|
-
if (_this.responsiveService.IsDesktopView) {
|
|
688
|
-
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
689
|
-
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
690
|
+
if (this.dashboardInfo) {
|
|
691
|
+
/**To override default configuration values to the gridster control */
|
|
692
|
+
this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt, this.dashboardInfo.templateConfig.widget.canResize, this.dashboardInfo.templateConfig.widget.canMove);
|
|
693
|
+
this.options.initCallback = function (gridster) {
|
|
694
|
+
if (_this.options.api) {
|
|
695
|
+
_this.gridcellHeight = _this.options.api.getCurrentRowHeight();
|
|
690
696
|
}
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
|
|
697
|
+
};
|
|
698
|
+
this.options.itemChangeCallback = function (item) {
|
|
699
|
+
if (_this.responsiveService.IsDesktopView) {
|
|
700
|
+
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
701
|
+
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
_this.setAreaHeight();
|
|
705
|
+
};
|
|
706
|
+
}
|
|
694
707
|
};
|
|
695
708
|
/** To initiate eventbus subsctiptions */
|
|
696
709
|
RADashboardArea.prototype.inititateEventBusSubscritions = function () {
|
|
@@ -1085,7 +1098,7 @@
|
|
|
1085
1098
|
core.Component({
|
|
1086
1099
|
selector: 'ra-dashboard-area',
|
|
1087
1100
|
template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [ngStyle]=\"{'height': userWidgets.length > 0 ? (gridheight + 'px') : 'unset'}\">\r\n <!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\" *ngIf=\"userWidgets.length > 0\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [dashboard-info]=\"dashboardInfo\" [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\"\r\n (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\" [global-filter]=\"globalFilter\"\r\n [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\" [widget-width]=\"item.cols\"\r\n [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\" [dom-resized]=\"domResized\"\r\n (updateAppliedFilters)=\"updateAppliedFilters($event)\">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"showEmptyDashboard\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"m-1 empty-prefix\">\r\n <i class=\"fal fa-edit edit-icon\"></i>\r\n <span class=\"empty-title\">{{'dashboard.emptydashboard'|translate}}</span>\r\n </div>\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{'dashboard.emptydashboardmessage'|translate}} <br />\r\n {{'dashboard.emptydashboardmessage2'|translate}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm m-1 dashboard-button light\" (click)=\"addNewWidget()\">\r\n <i class=\"fal fa-plus m-1\"></i>{{'dashboard.addawidgets'|translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>",
|
|
1088
|
-
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#
|
|
1101
|
+
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#fff;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;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)}@media screen and (max-width:685px){.gridster-mobile{height:auto!important;margin-bottom:50px!important}}@media screen and (max-width:350px){.gridster-mobile{min-height:330px!important;margin-bottom:0!important}}.empty-padding{padding:40px 20px 20px;background-color:#fff;display:flex;justify-content:center;align-content:center}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:72%}.empty-prefix{color:#32ad3c;font-size:18px;display:flex;align-items:center;padding:10px 30px;min-width:-webkit-max-content;min-width:max-content;min-width:-moz-max-content}.empty-content{color:#333;border-left:1px solid #a9afb1;width:100%;display:flex;align-items:center;padding:15px 30px 10px 40px}.empty-msg{padding:0 0 5px;font-size:16px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed;color:#333!important}.btn-group-sm>.btn,.btn-sm{padding:5px 20px 5px 5px}.edit-icon{color:#32ad3c;font-size:24px;margin-right:15px}.empty-title{margin-top:10px}@media screen and (max-width:600px){.empty-padding{padding:10px;background-color:#fff;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:6px 10px 8px}.empty-content{color:#333;display:flex;padding:5px 10px 10px;margin-top:44px;margin-left:-185px;border-left:none}.empty-msg{padding:12px 10px 10px 5px;font-size:14px;border-top:1px solid #a9afb1}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}"]
|
|
1089
1102
|
}),
|
|
1090
1103
|
__metadata("design:paramtypes", [RaDashboardService,
|
|
1091
1104
|
core.NgZone,
|
|
@@ -1789,9 +1802,12 @@
|
|
|
1789
1802
|
var html = '<div id="ra-db-widget-menu"' + 'style="' + style + '" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">';
|
|
1790
1803
|
var settings = '';
|
|
1791
1804
|
if (this.isWidgetMgmnt) {
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1805
|
+
if (!this.data.widgetInfo.templateSettings.hideEdit)
|
|
1806
|
+
settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
|
|
1807
|
+
if (!this.data.widgetInfo.templateSettings.hideCopy)
|
|
1808
|
+
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
1809
|
+
if (!this.data.widgetInfo.templateSettings.hideMove)
|
|
1810
|
+
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
1795
1811
|
}
|
|
1796
1812
|
var customPageParams = false;
|
|
1797
1813
|
if (this.data.widgetInfo && this.data.widgetInfo.widgetSettings) {
|
|
@@ -1800,14 +1816,14 @@
|
|
|
1800
1816
|
customPageParams = true;
|
|
1801
1817
|
}
|
|
1802
1818
|
}
|
|
1803
|
-
if ((this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
|
|
1819
|
+
if (!this.data.widgetInfo.templateSettings.hideVisitPage && (this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
|
|
1804
1820
|
settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
|
|
1805
1821
|
settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
|
|
1806
1822
|
settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
|
|
1807
1823
|
settings += this.translateService.translate('Common.visitpage');
|
|
1808
1824
|
settings += '</span></a>';
|
|
1809
1825
|
}
|
|
1810
|
-
if ((this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
|
|
1826
|
+
if (!this.data.widgetInfo.templateSettings.hideVisitPage && (this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
|
|
1811
1827
|
html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
|
|
1812
1828
|
html += this.translateService.translate('Common.settings') + '</div>';
|
|
1813
1829
|
html += settings;
|
|
@@ -1839,7 +1855,7 @@
|
|
|
1839
1855
|
if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
|
|
1840
1856
|
html += this.getHr();
|
|
1841
1857
|
}
|
|
1842
|
-
if (this.isWidgetMgmnt) {
|
|
1858
|
+
if (this.isWidgetMgmnt && !this.data.widgetInfo.templateSettings.hideDelete) {
|
|
1843
1859
|
html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
|
|
1844
1860
|
html += this.deleteText;
|
|
1845
1861
|
html += '</span></a>';
|