@schneideress/dashboardframework 0.0.211 → 0.0.213

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.
@@ -387,6 +387,17 @@ class RADashboardResponsiveService {
387
387
  this.screenWidth = window.outerWidth;
388
388
  if (this.IsDesktopView) {
389
389
  this.currentResInfo = this.resInfo[3];
390
+ /** @type {?} */
391
+ let resInfo = this.resInfo.filter((/**
392
+ * @param {?} item
393
+ * @return {?}
394
+ */
395
+ (item) => {
396
+ return item.end >= this.screenWidth && item.start <= this.screenWidth;
397
+ }))[0];
398
+ if (this.currentResInfo.id != resInfo.id) {
399
+ this.resized.next(true);
400
+ }
390
401
  }
391
402
  else {
392
403
  /** @type {?} */
@@ -597,30 +608,43 @@ class RADashboardArea {
597
608
  this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
598
609
  this.initiateGridsterConfig();
599
610
  this.responsiveService.resized.subscribe((/**
611
+ * @param {?} isDesktop
600
612
  * @return {?}
601
613
  */
602
- () => {
603
- this.widgetList = [];
604
- setTimeout((/**
605
- * @return {?}
606
- */
607
- () => {
608
- this.initiateGridsterConfig();
609
- this.options.api.optionsChanged();
610
- if (this.userWidgets) {
611
- this.widgetList = this.mapObjectListToGridsterItemList(this.userWidgets);
612
- setTimeout((/**
613
- * @return {?}
614
- */
615
- () => {
616
- this.setAreaHeight();
617
- }));
618
- }
619
- else {
620
- this.loadWidgets(this.userDashboardId, this.areaKey);
621
- }
622
- this.domResized = !this.domResized;
623
- }));
614
+ (isDesktop) => {
615
+ console.log('in responsive service subscribe');
616
+ console.log(isDesktop);
617
+ if (isDesktop) {
618
+ setTimeout((/**
619
+ * @return {?}
620
+ */
621
+ () => {
622
+ this.domResized = !this.domResized;
623
+ }), 2000);
624
+ }
625
+ else {
626
+ this.widgetList = [];
627
+ setTimeout((/**
628
+ * @return {?}
629
+ */
630
+ () => {
631
+ this.initiateGridsterConfig();
632
+ this.options.api.optionsChanged();
633
+ if (this.userWidgets) {
634
+ this.widgetList = this.mapObjectListToGridsterItemList(this.userWidgets);
635
+ setTimeout((/**
636
+ * @return {?}
637
+ */
638
+ () => {
639
+ this.setAreaHeight();
640
+ }));
641
+ }
642
+ else {
643
+ this.loadWidgets(this.userDashboardId, this.areaKey);
644
+ }
645
+ this.domResized = !this.domResized;
646
+ }));
647
+ }
624
648
  }));
625
649
  }
626
650
  /**
@@ -1324,6 +1348,7 @@ class RAWidgetContainer {
1324
1348
  this.noPadding = false;
1325
1349
  this.isMouseHover = false;
1326
1350
  this.showSettingsLink = true;
1351
+ this.isKpiView = false;
1327
1352
  this.widgetDeleted = new EventEmitter();
1328
1353
  this.isWidgetStateApplicable = false;
1329
1354
  this.widgetEmptyState = '';
@@ -1402,6 +1427,7 @@ class RAWidgetContainer {
1402
1427
  * @return {?}
1403
1428
  */
1404
1429
  invokeWidgetResizedEvent() {
1430
+ console.log('in invoke widget resized event');
1405
1431
  if (this.widgetElement) {
1406
1432
  /** @type {?} */
1407
1433
  let size = {};
@@ -1409,6 +1435,10 @@ class RAWidgetContainer {
1409
1435
  size.width = this.width;
1410
1436
  size.cellHeight = this.gridCellHeight;
1411
1437
  this.widgetElement.widgetResized(size);
1438
+ if (this.height == 1 || this.width == 1)
1439
+ this.isKpiView = true;
1440
+ else
1441
+ this.isKpiView = false;
1412
1442
  }
1413
1443
  }
1414
1444
  /**
@@ -1747,6 +1777,10 @@ class RAWidgetContainer {
1747
1777
  * @return {?}
1748
1778
  */
1749
1779
  setEmptyState(widgetState) {
1780
+ if (this.height == 1 || this.width == 1)
1781
+ this.isKpiView = true;
1782
+ else
1783
+ this.isKpiView = false;
1750
1784
  this.widgetEmptyState = widgetState.widgetViewState;
1751
1785
  this.isGlobalFilterApplied = widgetState.isGlobalFilterApplied;
1752
1786
  if (widgetState != WidgetViewState.normal) {
@@ -2111,7 +2145,7 @@ class RAWidgetContainer {
2111
2145
  RAWidgetContainer.decorators = [
2112
2146
  { type: Component, args: [{
2113
2147
  selector: 'ra-widget-container',
2114
- 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\" [ngClass]=\"{'underLine': enableTitleLine || isWidgetStateApplicable}\">\r\n <div class=\"col-md-12 wc-mover\" 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-md-10 float-left title-label\">\r\n <ra-tooltip [value]=\"toolTipValue\" [width]=\"toolTipWidth\">\r\n <div style=\"text-overflow: ellipsis;white-space: nowrap;overflow: hidden;\" (mouseover)=\"mouseOver($event)\"\r\n #searchInput>{{WidgetDisplayName}}</div>\r\n </ra-tooltip>\r\n </div>\r\n <div class=\"col-md-2\" style=\"cursor:default;padding-right: 0px;\">\r\n <div class=\"float-right\" style=\"display: flex;\">\r\n <div class=\"title-bar-lock-icon lock-dropdown\" [hidden]=\"!lockDetails && !lockTemplateInfo\">\r\n <i class=\"fal fa-lock lock\"></i>\r\n <div class=\"lock-dropdown-content light widget-config-item\">\r\n <div *ngIf=\"lockDetails && !lockTemplateInfo\">\r\n <label style=\"color: #D9F0FA;\">\r\n {{'Common.lockedfields'|translate}}\r\n </label>\r\n <div style=\"color: white;\">\r\n <label class=\"bold\" style=\"margin-bottom: 0px;width: 100%;\" *ngFor=\"let item of lockDetails\">\r\n {{item}}\r\n </label>\r\n </div>\r\n <hr>\r\n <div style=\"color: #D9F0FA;\">\r\n <label>{{'Common.lockedfieldseditinfo'|translate}}</label>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!lockDetails && lockTemplateInfo\">\r\n <ng-container *ngTemplateOutlet=\"lockTemplateInfo\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"widget-menu\" style=\"width:10px;\" [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 class=\"wcBody\" [ngStyle]=\"{'bottom': noPadding?'0px':'10px'}\">\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 #ctlWidget></div>\r\n </div>\r\n <div *ngIf=\"isWidgetStateApplicable\" class=\"defaultConfig\">\r\n <ra-widget-state style=\"width: 100%;\" [isWidgetStateApplicable]=\"isWidgetStateApplicable\" [isGlobalFilterApplied]=\"isGlobalFilterApplied\"\r\n [widgetEmptyState]=\"widgetEmptyState\" (editWidgetClicked)=editWidget()>\r\n </ra-widget-state>\r\n </div>\r\n <div>\r\n </div>\r\n </div>\r\n</div>"
2148
+ 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\" [ngClass]=\"{'underLine': enableTitleLine || isWidgetStateApplicable}\">\r\n <div class=\"col-md-12 wc-mover\" 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-md-10 float-left title-label\">\r\n <ra-tooltip [value]=\"toolTipValue\" [width]=\"toolTipWidth\">\r\n <div style=\"text-overflow: ellipsis;white-space: nowrap;overflow: hidden;\" (mouseover)=\"mouseOver($event)\"\r\n #searchInput>{{WidgetDisplayName}}</div>\r\n </ra-tooltip>\r\n </div>\r\n <div class=\"col-md-2\" style=\"cursor:default;padding-right: 0px;\">\r\n <div class=\"float-right\" style=\"display: flex;\">\r\n <div class=\"title-bar-lock-icon lock-dropdown\" [hidden]=\"!lockDetails && !lockTemplateInfo\">\r\n <i class=\"fal fa-lock lock\"></i>\r\n <div class=\"lock-dropdown-content light widget-config-item\">\r\n <div *ngIf=\"lockDetails && !lockTemplateInfo\">\r\n <label style=\"color: #D9F0FA;\">\r\n {{'Common.lockedfields'|translate}}\r\n </label>\r\n <div style=\"color: white;\">\r\n <label class=\"bold\" style=\"margin-bottom: 0px;width: 100%;\" *ngFor=\"let item of lockDetails\">\r\n {{item}}\r\n </label>\r\n </div>\r\n <hr>\r\n <div style=\"color: #D9F0FA;\">\r\n <label>{{'Common.lockedfieldseditinfo'|translate}}</label>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!lockDetails && lockTemplateInfo\">\r\n <ng-container *ngTemplateOutlet=\"lockTemplateInfo\">\r\n </ng-container>\r\n </div>\r\n </div>\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 class=\"wcBody\" [ngStyle]=\"{'bottom': noPadding?'0px':'10px'}\">\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 #ctlWidget></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>"
2115
2149
  }] }
2116
2150
  ];
2117
2151
  /** @nocollapse */
@@ -2223,6 +2257,8 @@ if (false) {
2223
2257
  /** @type {?} */
2224
2258
  RAWidgetContainer.prototype.showSettingsLink;
2225
2259
  /** @type {?} */
2260
+ RAWidgetContainer.prototype.isKpiView;
2261
+ /** @type {?} */
2226
2262
  RAWidgetContainer.prototype.ctlWidget;
2227
2263
  /** @type {?} */
2228
2264
  RAWidgetContainer.prototype.widgetDropdown;