@schneideress/dashboardframework 20.0.7 → 20.0.9
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.
|
@@ -4782,7 +4782,7 @@ class RADashboardArea {
|
|
|
4782
4782
|
this.showEmptyDashboard = false;
|
|
4783
4783
|
this.showDownloadOnlyState = false;
|
|
4784
4784
|
this.isWidgetMgmnt = false;
|
|
4785
|
-
this.
|
|
4785
|
+
this.hasGrid = false;
|
|
4786
4786
|
this.initialWidgetCount = 10;
|
|
4787
4787
|
this.currentLoadingCount = 0;
|
|
4788
4788
|
this.isSiteDetailDashboard = false;
|
|
@@ -4791,6 +4791,7 @@ class RADashboardArea {
|
|
|
4791
4791
|
this.widgetHeight = 2;
|
|
4792
4792
|
this.widgetWidth = 4;
|
|
4793
4793
|
this.isIndicatorDashboard = false;
|
|
4794
|
+
this.widgetCount = 0;
|
|
4794
4795
|
this.hideDashboardBanner = new EventEmitter();
|
|
4795
4796
|
}
|
|
4796
4797
|
scroll() {
|
|
@@ -4806,7 +4807,8 @@ class RADashboardArea {
|
|
|
4806
4807
|
this.setEmptyDashboardConfig();
|
|
4807
4808
|
this.setDownloadOnlyStateConfig();
|
|
4808
4809
|
this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
|
|
4809
|
-
|
|
4810
|
+
const gridTemplates = ['Emission Report', 'CostUsage Report', 'Site Detail'];
|
|
4811
|
+
this.hasGrid = gridTemplates.includes(this.dashboardInfo.templateName);
|
|
4810
4812
|
this.responsiveService.resized.subscribe((isDesktop) => {
|
|
4811
4813
|
if (this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
|
|
4812
4814
|
this.lastViewType = (isDesktop ? 'desktop' : 'mobile');
|
|
@@ -4948,8 +4950,11 @@ class RADashboardArea {
|
|
|
4948
4950
|
if (el) {
|
|
4949
4951
|
let rect = el.getBoundingClientRect();
|
|
4950
4952
|
const height = rect.height;
|
|
4951
|
-
if (this.
|
|
4952
|
-
|
|
4953
|
+
if (this.hasGrid) {
|
|
4954
|
+
const effectiveCount = (this.widgetList.length % 2 === 1) ? this.widgetList.length + 1 : this.widgetList.length;
|
|
4955
|
+
const multiplier = Math.max(1, effectiveCount / 2);
|
|
4956
|
+
this.gridsterHeight = (height + 20) * multiplier + 'px';
|
|
4957
|
+
}
|
|
4953
4958
|
return rect && rect.top < window.innerHeight;
|
|
4954
4959
|
}
|
|
4955
4960
|
}
|
|
@@ -5162,10 +5167,13 @@ class RADashboardArea {
|
|
|
5162
5167
|
areaHeight = 600;
|
|
5163
5168
|
}
|
|
5164
5169
|
this.gridheight = areaHeight;
|
|
5165
|
-
if (this.
|
|
5166
|
-
const
|
|
5167
|
-
if (
|
|
5168
|
-
this.
|
|
5170
|
+
if (this.hasGrid) {
|
|
5171
|
+
const baseHeight = this.gridItem.height; // gridster container current height
|
|
5172
|
+
if (baseHeight) {
|
|
5173
|
+
const effectiveCount = (this.widgetList.length % 2 === 1) ? this.widgetList.length + 1 : this.widgetList.length;
|
|
5174
|
+
const multiplier = Math.max(1, effectiveCount / 2);
|
|
5175
|
+
this.gridsterHeight = (baseHeight + 20) * multiplier + 'px';
|
|
5176
|
+
}
|
|
5169
5177
|
}
|
|
5170
5178
|
});
|
|
5171
5179
|
}
|
|
@@ -5354,11 +5362,11 @@ class RADashboardArea {
|
|
|
5354
5362
|
}
|
|
5355
5363
|
}
|
|
5356
5364
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RADashboardArea, deps: [{ token: RaDashboardService }, { token: i0.NgZone }, { token: i2$1.NgxUiLoaderService }, { token: i3.RATranslateService }, { token: i4.NotifierService }, { token: i0.ChangeDetectorRef }, { token: RADashboardResponsiveService }, { token: i3.RAPermissionService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5357
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: RADashboardArea, isStandalone: false, selector: "ra-dashboard-area", inputs: { userDashboardId: ["user-dashboard-id", "userDashboardId"], areaKey: ["area-key", "areaKey"], downloadDatastreamLimit: ["download-datastream-limit", "downloadDatastreamLimit"], reportDatastreamLimit: ["report-datastream-limit", "reportDatastreamLimit"], globalFilter: ["global-filter", "globalFilter"], raDashboardEventBus: ["event-bus", "raDashboardEventBus"], widgetHeight: ["widget-height", "widgetHeight"], widgetWidth: ["widget-width", "widgetWidth"], appConfig: ["app-config", "appConfig"], dashboardInfo: ["dashboard-info", "dashboardInfo"], isIndicatorDashboard: "isIndicatorDashboard", templateConfig: "templateConfig", bulkActionData: ["bulk_Action_Data", "bulkActionData"] }, outputs: { hideDashboardBanner: "hideDashboardBanner" }, host: { listeners: { "document:scroll": "scroll()" } }, viewQueries: [{ propertyName: "gridWrapper", first: true, predicate: ["gridWrapper"], descendants: true }, { propertyName: "gridItem", first: true, predicate: ["gridItem"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\"\r\n [ngStyle]=\"{'height': (userWidgets.length > 0 && !showDownloadOnlyState) && !
|
|
5365
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: RADashboardArea, isStandalone: false, selector: "ra-dashboard-area", inputs: { userDashboardId: ["user-dashboard-id", "userDashboardId"], areaKey: ["area-key", "areaKey"], downloadDatastreamLimit: ["download-datastream-limit", "downloadDatastreamLimit"], reportDatastreamLimit: ["report-datastream-limit", "reportDatastreamLimit"], globalFilter: ["global-filter", "globalFilter"], raDashboardEventBus: ["event-bus", "raDashboardEventBus"], widgetHeight: ["widget-height", "widgetHeight"], widgetWidth: ["widget-width", "widgetWidth"], appConfig: ["app-config", "appConfig"], dashboardInfo: ["dashboard-info", "dashboardInfo"], isIndicatorDashboard: "isIndicatorDashboard", templateConfig: "templateConfig", bulkActionData: ["bulk_Action_Data", "bulkActionData"], widgetCount: ["widget-count", "widgetCount"] }, outputs: { hideDashboardBanner: "hideDashboardBanner" }, host: { listeners: { "document:scroll": "scroll()" } }, viewQueries: [{ propertyName: "gridWrapper", first: true, predicate: ["gridWrapper"], descendants: true }, { propertyName: "gridItem", first: true, predicate: ["gridItem"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\"\r\n [ngStyle]=\"{'height': (userWidgets.length > 0 && !showDownloadOnlyState) && !hasGrid ? ( gridheight + 'px') : 'unset'}\">\r\n <!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [style.min-height]=\"gridsterHeight + '!important'\" [options]=\"options\" style=\"height:100%;\" *ngIf=\"userWidgets.length > 0 && !showDownloadOnlyState\">\r\n <gridster-item #gridItem [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container (widgetLoaded)=\"widgetLoaded($event, item)\" [canLoadData]=\"item.canLoadData\" (dataLoaded)=\"dataLoaded($event)\"\r\n [bulk-action-data]=\"bulkActionData\" [dashboard-info]=\"dashboardInfo\" [app-config]=\"appConfig\"\r\n [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\"\r\n [widget-width]=\"item.cols\" [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\"\r\n [dom-resized]=\"domResized\" (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=\"empty-prefix\">\r\n <!-- <i class=\"fal fa-edit edit-icon\"></i> -->\r\n <span>{{emptyDashboardTitle}}</span>\r\n </div>\r\n <hr class=\"horizontalLine-solid\" />\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{emptyDashboardMsg1}} <br />\r\n {{emptyDashboardMsg2}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm dashboard-button light\" (click)=\"buttonClick()\">\r\n <i class=\"{{emptyDashboardButtonIcon}}\"></i>{{emptyDashboardButtonText}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"showDownloadOnlyState\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"empty-prefix\">\r\n <!-- <i class=\"fal fa-edit edit-icon\"></i> -->\r\n <span>{{DownloadOnlyStateTitle}}</span>\r\n </div>\r\n <hr class=\"horizontalLine-solid\" />\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{DownloadOnlyStateMsg1}} <br />\r\n {{DownloadOnlyStateMsg2}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm dashboard-button light\" (click)=\"buttonActionClick(DownloadOnlyStateButtonAction1)\">\r\n <i class=\"{{DownloadOnlyStateButtonIcon1}}\"></i>{{DownloadOnlyStateButtonText1}}</button>\r\n <button class=\"btn btnLib btn-sm dashboard-button light button-margin\" (click)=\"buttonActionClick(DownloadOnlyStateButtonAction2)\">\r\n <i class=\"{{DownloadOnlyStateButtonIcon2}}\"></i>{{DownloadOnlyStateButtonText2}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <notifier-container></notifier-container>\r\n</div>\r\n", styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#fff;overflow-y:hidden!important;flex-direction:column}.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:none}gridster-item:hover{box-shadow:0 1px 10px #00000026!important}.button-margin{margin-left:10px}@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:15px 0;background-color:#fff;display:flex}.empty-wrapper{background-color:#fff;border:1px solid #9FA0A4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:18px;padding:15px}.empty-content{color:#626469;width:100%;padding:15px}.empty-msg{padding:0 0 15px;font-size:16px}.horizontalLine-solid{border-top:1px solid #cbcbcb;margin:0 15px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed;color:#333!important}.btn-sm,.btn-group-sm>.btn{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:15px 0;background-color:#fff;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border:1px solid #9FA0A4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:15px}.empty-content{color:#333;display:flex;padding:15px}.empty-msg{padding:0 0 15px;font-size:14px}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}.gridster-h{min-height:50vh!important}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: GridsterComponent, selector: "gridster", inputs: ["options"] }, { kind: "component", type: GridsterItemComponent, selector: "gridster-item", inputs: ["item"], outputs: ["itemInit", "itemChange", "itemResize"] }, { kind: "component", type: i4.NotifierContainerComponent, selector: "notifier-container" }, { kind: "component", type: RAWidgetContainer, selector: "ra-widget-container", inputs: ["widget-instance-id", "global-filter", "dashboard-info", "data", "event-bus", "app-config", "widget-width", "widget-height", "grid-cell-height", "bulk-action-data", "canLoadData", "dom-resized"], outputs: ["widgetDeleted", "updateAppliedFilters", "dataLoaded", "widgetLoaded"] }] }); }
|
|
5358
5366
|
}
|
|
5359
5367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RADashboardArea, decorators: [{
|
|
5360
5368
|
type: Component,
|
|
5361
|
-
args: [{ selector: 'ra-dashboard-area', standalone: false, template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\"\r\n [ngStyle]=\"{'height': (userWidgets.length > 0 && !showDownloadOnlyState) && !
|
|
5369
|
+
args: [{ selector: 'ra-dashboard-area', standalone: false, template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\"\r\n [ngStyle]=\"{'height': (userWidgets.length > 0 && !showDownloadOnlyState) && !hasGrid ? ( gridheight + 'px') : 'unset'}\">\r\n <!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [style.min-height]=\"gridsterHeight + '!important'\" [options]=\"options\" style=\"height:100%;\" *ngIf=\"userWidgets.length > 0 && !showDownloadOnlyState\">\r\n <gridster-item #gridItem [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container (widgetLoaded)=\"widgetLoaded($event, item)\" [canLoadData]=\"item.canLoadData\" (dataLoaded)=\"dataLoaded($event)\"\r\n [bulk-action-data]=\"bulkActionData\" [dashboard-info]=\"dashboardInfo\" [app-config]=\"appConfig\"\r\n [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\"\r\n [widget-width]=\"item.cols\" [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\"\r\n [dom-resized]=\"domResized\" (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=\"empty-prefix\">\r\n <!-- <i class=\"fal fa-edit edit-icon\"></i> -->\r\n <span>{{emptyDashboardTitle}}</span>\r\n </div>\r\n <hr class=\"horizontalLine-solid\" />\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{emptyDashboardMsg1}} <br />\r\n {{emptyDashboardMsg2}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm dashboard-button light\" (click)=\"buttonClick()\">\r\n <i class=\"{{emptyDashboardButtonIcon}}\"></i>{{emptyDashboardButtonText}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"showDownloadOnlyState\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"empty-prefix\">\r\n <!-- <i class=\"fal fa-edit edit-icon\"></i> -->\r\n <span>{{DownloadOnlyStateTitle}}</span>\r\n </div>\r\n <hr class=\"horizontalLine-solid\" />\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{DownloadOnlyStateMsg1}} <br />\r\n {{DownloadOnlyStateMsg2}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm dashboard-button light\" (click)=\"buttonActionClick(DownloadOnlyStateButtonAction1)\">\r\n <i class=\"{{DownloadOnlyStateButtonIcon1}}\"></i>{{DownloadOnlyStateButtonText1}}</button>\r\n <button class=\"btn btnLib btn-sm dashboard-button light button-margin\" (click)=\"buttonActionClick(DownloadOnlyStateButtonAction2)\">\r\n <i class=\"{{DownloadOnlyStateButtonIcon2}}\"></i>{{DownloadOnlyStateButtonText2}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <notifier-container></notifier-container>\r\n</div>\r\n", styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#fff;overflow-y:hidden!important;flex-direction:column}.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:none}gridster-item:hover{box-shadow:0 1px 10px #00000026!important}.button-margin{margin-left:10px}@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:15px 0;background-color:#fff;display:flex}.empty-wrapper{background-color:#fff;border:1px solid #9FA0A4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:18px;padding:15px}.empty-content{color:#626469;width:100%;padding:15px}.empty-msg{padding:0 0 15px;font-size:16px}.horizontalLine-solid{border-top:1px solid #cbcbcb;margin:0 15px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed;color:#333!important}.btn-sm,.btn-group-sm>.btn{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:15px 0;background-color:#fff;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border:1px solid #9FA0A4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:15px}.empty-content{color:#333;display:flex;padding:15px}.empty-msg{padding:0 0 15px;font-size:14px}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}.gridster-h{min-height:50vh!important}\n"] }]
|
|
5362
5370
|
}], ctorParameters: () => [{ type: RaDashboardService }, { type: i0.NgZone }, { type: i2$1.NgxUiLoaderService }, { type: i3.RATranslateService }, { type: i4.NotifierService }, { type: i0.ChangeDetectorRef }, { type: RADashboardResponsiveService }, { type: i3.RAPermissionService }], propDecorators: { userDashboardId: [{
|
|
5363
5371
|
type: Input,
|
|
5364
5372
|
args: ['user-dashboard-id']
|
|
@@ -5397,6 +5405,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
|
|
|
5397
5405
|
}], bulkActionData: [{
|
|
5398
5406
|
type: Input,
|
|
5399
5407
|
args: ['bulk_Action_Data']
|
|
5408
|
+
}], widgetCount: [{
|
|
5409
|
+
type: Input,
|
|
5410
|
+
args: ['widget-count']
|
|
5400
5411
|
}], hideDashboardBanner: [{
|
|
5401
5412
|
type: Output
|
|
5402
5413
|
}], gridWrapper: [{
|