@schneideress/dashboardframework 17.0.43 → 17.0.45

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.
@@ -3888,7 +3888,7 @@ class RAWidgetContainer {
3888
3888
  this.lockIconFooter = this.translateService.translate('Common.lockedfieldseditinfo');
3889
3889
  this.inapplicableIconTitle = this.translateService.translate('Common.InapplicableFilters');
3890
3890
  this.inapplicableIconFooter = this.translateService.translate('Common.InapplicableFiltersDesc');
3891
- if (this.dashboardInfo.templateName == 'Emission Report') {
3891
+ if (this.dashboardInfo.templateName == 'Emission Report' || this.dashboardInfo.templateName == 'CostUsage Report') {
3892
3892
  this.hideTitle = true;
3893
3893
  this.showOnlyDropdown = true;
3894
3894
  }
@@ -4675,20 +4675,27 @@ class RAWidgetContainer {
4675
4675
  this.popupInstance.removeMe(this.currentComponent);
4676
4676
  }
4677
4677
  getwidgetTitleTranslation(item) {
4678
- let rKey = 'DBW_' + this.translateService.makeCode(item);
4678
+ let rKey = this.translateService.makeCode(item);
4679
4679
  let translatedString = '';
4680
+ let translationModule = '';
4680
4681
  if (this.dashboardService.clientId) {
4681
- const translationModule = this.dashboardService.clientId + '_DBW';
4682
+ rKey = 'DBW_' + rKey;
4683
+ translationModule = this.dashboardService.clientId + '_DBW';
4682
4684
  translatedString = this.translateService.translate(translationModule + '.' + rKey);
4683
- if (translatedString.toLowerCase() === rKey.toLowerCase()) {
4684
- return item;
4685
- }
4686
- else {
4687
- return translatedString;
4688
- }
4689
4685
  }
4690
- else
4686
+ else if (this.data?.widgetInfo?.widgetComponent.startsWith('PAM')) {
4687
+ translationModule = 'common';
4688
+ translatedString = this.translateService.translate(translationModule + '.' + rKey);
4689
+ }
4690
+ else {
4691
+ translatedString = this.translateService.translate(rKey);
4692
+ }
4693
+ if (translatedString.toLowerCase() === rKey.toLowerCase()) {
4691
4694
  return item;
4695
+ }
4696
+ else {
4697
+ return translatedString;
4698
+ }
4692
4699
  }
4693
4700
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: RAWidgetContainer, deps: [{ token: RaDashboardService }, { token: i2$1.NgxUiLoaderService }, { token: i3.RATranslateService }, { token: i0.NgZone }, { token: i4.NotifierService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i3.RAPermissionService }, { token: i3.DomService }], target: i0.ɵɵFactoryTarget.Component }); }
4694
4701
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: RAWidgetContainer, selector: "ra-widget-container", inputs: { widgetInstanceId: ["widget-instance-id", "widgetInstanceId"], globalFilter: ["global-filter", "globalFilter"], dashboardInfo: ["dashboard-info", "dashboardInfo"], data: "data", raDashboardEventBus: ["event-bus", "raDashboardEventBus"], appConfig: ["app-config", "appConfig"], width: ["widget-width", "width"], height: ["widget-height", "height"], gridCellHeight: ["grid-cell-height", "gridCellHeight"], bulkActionData: ["bulk-action-data", "bulkActionData"], canLoadData: "canLoadData", setResized: ["dom-resized", "setResized"] }, outputs: { widgetDeleted: "widgetDeleted", updateAppliedFilters: "updateAppliedFilters", dataLoaded: "dataLoaded", widgetLoaded: "widgetLoaded" }, viewQueries: [{ propertyName: "ctlWidget", first: true, predicate: ["ctlWidget"], descendants: true }, { propertyName: "ctlWidgetModule", first: true, predicate: ["ctlWidgetModule"], descendants: true, read: ViewContainerRef }, { propertyName: "widgetDropdown", first: true, predicate: ["widgetDropdown"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "wcWrapper", first: true, predicate: ["wcWrapper"], descendants: true }, { propertyName: "banPopupDiv", first: true, predicate: ["banPopupDiv"], descendants: true }, { propertyName: "lockPopupDiv", first: true, predicate: ["lockPopupDiv"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #wcWrapper class=\"wc-wrapper\" (mouseenter)=\"mouseHover(true)\" (mouseleave)=\"mouseHover(false)\"\r\n [ngStyle]=\"{'margin-left': noPadding?'0px':'15px','margin-right': noPadding?'0px':'15px'}\">\r\n <div class=\"wcheader widget-move\" *ngIf=\"!hideTitle && !showOnlyDropdown\"\r\n [ngClass]=\"{'underLine': enableTitleLine || isWidgetStateApplicable}\">\r\n <div class=\"col-md-12\" [ngClass]=\"{'wc-mover' : isWidgetCanMove }\" 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-9 float-left title-label\">\r\n <ra-tooltip [value]=\"toolTipValue\" [width]=\"toolTipWidth\">\r\n <div [hidden]=\"hideTitle\" style=\"text-overflow: ellipsis;white-space: nowrap;overflow: hidden;\"\r\n (mouseover)=\"mouseOver($event)\" #searchInput>{{WidgetDisplayName}}</div>\r\n </ra-tooltip>\r\n </div>\r\n <div class=\"col-3\" style=\"cursor:default;padding-right: 0px;\"> \r\n <div class=\"float-right\" style=\"display: flex;\">\r\n <div #banPopupDiv (mouseover)=\"openPopup(inapplicableIconTitle,inapplicableFilters,inapplicableIconFooter,'innaplicable')\" (mouseout)=\"closePopup()\" class=\"title-bar-lock-icon lock-dropdown\" [hidden]=\"!inapplicableFilters || inapplicableFilters.length == 0 || !globalFilter || globalFilter == '{}'\">\r\n <i class=\"fal fa-ban lock\"></i> \r\n </div>\r\n <div #lockPopupDiv (mouseover)=\"openPopup(lockIconTitle,lockDetails,lockIconFooter,'lock',lockTemplateInfo)\" (mouseout)=\"closePopup()\" class=\"title-bar-lock-icon lock-dropdown\" [hidden]=\"(!lockDetails && !lockTemplateInfo) || hideLock\">\r\n <i class=\"fal fa-lock lock\"></i> \r\n </div>\r\n <div class=\"widget-menu\" style=\"width:10px;\"\r\n [ngClass]=\"{'widget-menu-show': isMouseHover && showSettingsLink}\">\r\n <div class=\"dropbtn title-bar-icon\">\r\n <i (click)=\"showDropDown($event)\" #widgetDropdown class=\"fal fa-ellipsis-v widget-menu-ellipse\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"hideTitle && !showOnlyDropdown\" class=\"wcheader widget-move\"\r\n style=\"height: 45px;width: 95%;cursor: move;z-index: 99;opacity: 0;\">\r\n </div>\r\n <div *ngIf=\"hideTitle && !showOnlyDropdown\" class=\"widget-menu widget-menu-title-hidden\" [ngClass]=\"{'widget-menu-show': isMouseHover && showSettingsLink}\">\r\n <div class=\"dropbtn title-bar-icon\">\r\n <i (click)=\"showDropDown($event)\" class=\"fal fa-ellipsis-v\" style=\"text-align: center;\"></i>\r\n </div>\r\n </div>\r\n <div class=\"wcBody\" [ngStyle]=\"{'bottom': noPadding?'0px':'10px','top':hideTitle || showOnlyDropdown?'10px':'46px'}\">\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 [hidden]=\"!isCustomElement\" #ctlWidget></div>\r\n <div [hidden]=\"isCustomElement\">\r\n <ng-container #ctlWidgetModule></ng-container>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isWidgetStateApplicable\" class=\"defaultConfig\">\r\n <ra-widget-state style=\"width: 100%;height: 100%;\" [isWidgetStateApplicable]=\"isWidgetStateApplicable\"\r\n [isGlobalFilterApplied]=\"isGlobalFilterApplied\" [widgetEmptyState]=\"widgetEmptyState\"\r\n (editWidgetClicked)=editWidget() [widthCol]=\"width\" [heightCol]=\"height\">\r\n </ra-widget-state>\r\n </div>\r\n <div>\r\n </div>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i6.TooltipControl, selector: "ra-tooltip", inputs: ["data", "url", "value", "key", "dataField", "position", "width", "count", "moreItemText", "reset", "disable-tooltip", "set-top-padding"], outputs: ["dataLoaded"] }, { kind: "component", type: i6.WidgetStateControl, selector: "ra-widget-state", inputs: ["isWidgetStateApplicable", "isGlobalFilterApplied", "widgetEmptyState", "widgetEmptyDataText", "widthCol", "heightCol"], outputs: ["editWidgetClicked"] }] }); }
@@ -4806,7 +4813,7 @@ class RADashboardArea {
4806
4813
  this.setEmptyDashboardConfig();
4807
4814
  this.setDownloadOnlyStateConfig();
4808
4815
  this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
4809
- this.hasGird = this.dashboardInfo.templateName == 'Emission Report';
4816
+ this.hasGird = this.dashboardInfo.templateName == 'Emission Report' || this.dashboardInfo.templateName == 'CostUsage Report';
4810
4817
  this.responsiveService.resized.subscribe((isDesktop) => {
4811
4818
  if (this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
4812
4819
  this.lastViewType = (isDesktop ? 'desktop' : 'mobile');