@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
|
@@ -199,9 +199,9 @@ var GridsterConfigDefaultSettings = {
|
|
|
199
199
|
margin: 10,
|
|
200
200
|
outerMargin: true,
|
|
201
201
|
outerMarginTop: 10,
|
|
202
|
-
outerMarginRight:
|
|
202
|
+
outerMarginRight: 0,
|
|
203
203
|
outerMarginBottom: 30,
|
|
204
|
-
outerMarginLeft:
|
|
204
|
+
outerMarginLeft: 0,
|
|
205
205
|
useTransformPositioning: true,
|
|
206
206
|
mobileBreakpoint: 640,
|
|
207
207
|
minCols: 10,
|
|
@@ -316,7 +316,7 @@ var RADashboardResponsiveService = /** @class */ (function () {
|
|
|
316
316
|
enumerable: true,
|
|
317
317
|
configurable: true
|
|
318
318
|
});
|
|
319
|
-
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt) {
|
|
319
|
+
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt, resize, canMove) {
|
|
320
320
|
var config = GridsterConfigDefaultSettings;
|
|
321
321
|
config.minCols = this.currentResInfo.maxCols;
|
|
322
322
|
config.maxCols = this.currentResInfo.maxCols;
|
|
@@ -338,6 +338,13 @@ var RADashboardResponsiveService = /** @class */ (function () {
|
|
|
338
338
|
config.swap = true;
|
|
339
339
|
config.draggable.enabled = true;
|
|
340
340
|
}
|
|
341
|
+
if (!resize) {
|
|
342
|
+
config.resizable.enabled = false;
|
|
343
|
+
config.swap = false;
|
|
344
|
+
}
|
|
345
|
+
if (!canMove) {
|
|
346
|
+
config.draggable.enabled = false;
|
|
347
|
+
}
|
|
341
348
|
return config;
|
|
342
349
|
};
|
|
343
350
|
/**To map IwidgetInfo object to gridsterItem */
|
|
@@ -345,6 +352,9 @@ var RADashboardResponsiveService = /** @class */ (function () {
|
|
|
345
352
|
if (widget.widgetSettings) {
|
|
346
353
|
widget.settings = JSON.parse(widget.widgetSettings);
|
|
347
354
|
}
|
|
355
|
+
if (widget.templateSettings) {
|
|
356
|
+
widget.templateSettings = JSON.parse(widget.templateSettings);
|
|
357
|
+
}
|
|
348
358
|
var gridsterItem = {
|
|
349
359
|
cols: this.getWidth(widget.width),
|
|
350
360
|
rows: this.getHeight(widget.height),
|
|
@@ -458,6 +468,7 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
458
468
|
this.isWidgetLoaded = true;
|
|
459
469
|
this.loadWidgets(this.userDashboardId, this.areaKey);
|
|
460
470
|
}
|
|
471
|
+
this.initiateGridsterConfig();
|
|
461
472
|
if (changes.raDashboardEventBus && changes.raDashboardEventBus.currentValue != changes.raDashboardEventBus.previousValue) {
|
|
462
473
|
this.inititateEventBusSubscritions();
|
|
463
474
|
}
|
|
@@ -465,21 +476,23 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
465
476
|
/**To set GridsterConfig */
|
|
466
477
|
RADashboardArea.prototype.initiateGridsterConfig = function () {
|
|
467
478
|
var _this = this;
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
};
|
|
475
|
-
this.options.itemChangeCallback = function (item) {
|
|
476
|
-
if (_this.responsiveService.IsDesktopView) {
|
|
477
|
-
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
478
|
-
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
479
|
+
if (this.dashboardInfo) {
|
|
480
|
+
/**To override default configuration values to the gridster control */
|
|
481
|
+
this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt, this.dashboardInfo.templateConfig.widget.canResize, this.dashboardInfo.templateConfig.widget.canMove);
|
|
482
|
+
this.options.initCallback = function (gridster) {
|
|
483
|
+
if (_this.options.api) {
|
|
484
|
+
_this.gridcellHeight = _this.options.api.getCurrentRowHeight();
|
|
479
485
|
}
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
|
|
486
|
+
};
|
|
487
|
+
this.options.itemChangeCallback = function (item) {
|
|
488
|
+
if (_this.responsiveService.IsDesktopView) {
|
|
489
|
+
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
490
|
+
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
_this.setAreaHeight();
|
|
494
|
+
};
|
|
495
|
+
}
|
|
483
496
|
};
|
|
484
497
|
/** To initiate eventbus subsctiptions */
|
|
485
498
|
RADashboardArea.prototype.inititateEventBusSubscritions = function () {
|
|
@@ -874,7 +887,7 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
874
887
|
Component({
|
|
875
888
|
selector: 'ra-dashboard-area',
|
|
876
889
|
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>",
|
|
877
|
-
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#
|
|
890
|
+
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}}"]
|
|
878
891
|
}),
|
|
879
892
|
__metadata("design:paramtypes", [RaDashboardService,
|
|
880
893
|
NgZone,
|
|
@@ -1578,9 +1591,12 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1578
1591
|
var html = '<div id="ra-db-widget-menu"' + 'style="' + style + '" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">';
|
|
1579
1592
|
var settings = '';
|
|
1580
1593
|
if (this.isWidgetMgmnt) {
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1594
|
+
if (!this.data.widgetInfo.templateSettings.hideEdit)
|
|
1595
|
+
settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
|
|
1596
|
+
if (!this.data.widgetInfo.templateSettings.hideCopy)
|
|
1597
|
+
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
1598
|
+
if (!this.data.widgetInfo.templateSettings.hideMove)
|
|
1599
|
+
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
1584
1600
|
}
|
|
1585
1601
|
var customPageParams = false;
|
|
1586
1602
|
if (this.data.widgetInfo && this.data.widgetInfo.widgetSettings) {
|
|
@@ -1589,14 +1605,14 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1589
1605
|
customPageParams = true;
|
|
1590
1606
|
}
|
|
1591
1607
|
}
|
|
1592
|
-
if ((this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
|
|
1608
|
+
if (!this.data.widgetInfo.templateSettings.hideVisitPage && (this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
|
|
1593
1609
|
settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
|
|
1594
1610
|
settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
|
|
1595
1611
|
settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
|
|
1596
1612
|
settings += this.translateService.translate('Common.visitpage');
|
|
1597
1613
|
settings += '</span></a>';
|
|
1598
1614
|
}
|
|
1599
|
-
if ((this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
|
|
1615
|
+
if (!this.data.widgetInfo.templateSettings.hideVisitPage && (this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
|
|
1600
1616
|
html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
|
|
1601
1617
|
html += this.translateService.translate('Common.settings') + '</div>';
|
|
1602
1618
|
html += settings;
|
|
@@ -1628,7 +1644,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1628
1644
|
if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
|
|
1629
1645
|
html += this.getHr();
|
|
1630
1646
|
}
|
|
1631
|
-
if (this.isWidgetMgmnt) {
|
|
1647
|
+
if (this.isWidgetMgmnt && !this.data.widgetInfo.templateSettings.hideDelete) {
|
|
1632
1648
|
html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
|
|
1633
1649
|
html += this.deleteText;
|
|
1634
1650
|
html += '</span></a>';
|