@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.
@@ -718,6 +718,17 @@
718
718
  this.screenWidth = window.outerWidth;
719
719
  if (this.IsDesktopView) {
720
720
  this.currentResInfo = this.resInfo[3];
721
+ /** @type {?} */
722
+ var resInfo = this.resInfo.filter((/**
723
+ * @param {?} item
724
+ * @return {?}
725
+ */
726
+ function (item) {
727
+ return item.end >= _this.screenWidth && item.start <= _this.screenWidth;
728
+ }))[0];
729
+ if (this.currentResInfo.id != resInfo.id) {
730
+ this.resized.next(true);
731
+ }
721
732
  }
722
733
  else {
723
734
  /** @type {?} */
@@ -962,30 +973,43 @@
962
973
  this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
963
974
  this.initiateGridsterConfig();
964
975
  this.responsiveService.resized.subscribe((/**
976
+ * @param {?} isDesktop
965
977
  * @return {?}
966
978
  */
967
- function () {
968
- _this.widgetList = [];
969
- setTimeout((/**
970
- * @return {?}
971
- */
972
- function () {
973
- _this.initiateGridsterConfig();
974
- _this.options.api.optionsChanged();
975
- if (_this.userWidgets) {
976
- _this.widgetList = _this.mapObjectListToGridsterItemList(_this.userWidgets);
977
- setTimeout((/**
978
- * @return {?}
979
- */
980
- function () {
981
- _this.setAreaHeight();
982
- }));
983
- }
984
- else {
985
- _this.loadWidgets(_this.userDashboardId, _this.areaKey);
986
- }
987
- _this.domResized = !_this.domResized;
988
- }));
979
+ function (isDesktop) {
980
+ console.log('in responsive service subscribe');
981
+ console.log(isDesktop);
982
+ if (isDesktop) {
983
+ setTimeout((/**
984
+ * @return {?}
985
+ */
986
+ function () {
987
+ _this.domResized = !_this.domResized;
988
+ }), 2000);
989
+ }
990
+ else {
991
+ _this.widgetList = [];
992
+ setTimeout((/**
993
+ * @return {?}
994
+ */
995
+ function () {
996
+ _this.initiateGridsterConfig();
997
+ _this.options.api.optionsChanged();
998
+ if (_this.userWidgets) {
999
+ _this.widgetList = _this.mapObjectListToGridsterItemList(_this.userWidgets);
1000
+ setTimeout((/**
1001
+ * @return {?}
1002
+ */
1003
+ function () {
1004
+ _this.setAreaHeight();
1005
+ }));
1006
+ }
1007
+ else {
1008
+ _this.loadWidgets(_this.userDashboardId, _this.areaKey);
1009
+ }
1010
+ _this.domResized = !_this.domResized;
1011
+ }));
1012
+ }
989
1013
  }));
990
1014
  };
991
1015
  /**
@@ -1797,6 +1821,7 @@
1797
1821
  this.noPadding = false;
1798
1822
  this.isMouseHover = false;
1799
1823
  this.showSettingsLink = true;
1824
+ this.isKpiView = false;
1800
1825
  this.widgetDeleted = new core.EventEmitter();
1801
1826
  this.isWidgetStateApplicable = false;
1802
1827
  this.widgetEmptyState = '';
@@ -1894,6 +1919,7 @@
1894
1919
  * @return {?}
1895
1920
  */
1896
1921
  function () {
1922
+ console.log('in invoke widget resized event');
1897
1923
  if (this.widgetElement) {
1898
1924
  /** @type {?} */
1899
1925
  var size = {};
@@ -1901,6 +1927,10 @@
1901
1927
  size.width = this.width;
1902
1928
  size.cellHeight = this.gridCellHeight;
1903
1929
  this.widgetElement.widgetResized(size);
1930
+ if (this.height == 1 || this.width == 1)
1931
+ this.isKpiView = true;
1932
+ else
1933
+ this.isKpiView = false;
1904
1934
  }
1905
1935
  };
1906
1936
  /**
@@ -2326,6 +2356,10 @@
2326
2356
  * @return {?}
2327
2357
  */
2328
2358
  function (widgetState) {
2359
+ if (this.height == 1 || this.width == 1)
2360
+ this.isKpiView = true;
2361
+ else
2362
+ this.isKpiView = false;
2329
2363
  this.widgetEmptyState = widgetState.widgetViewState;
2330
2364
  this.isGlobalFilterApplied = widgetState.isGlobalFilterApplied;
2331
2365
  if (widgetState != widgetframework.WidgetViewState.normal) {
@@ -2781,7 +2815,7 @@
2781
2815
  RAWidgetContainer.decorators = [
2782
2816
  { type: core.Component, args: [{
2783
2817
  selector: 'ra-widget-container',
2784
- 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>"
2818
+ 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>"
2785
2819
  }] }
2786
2820
  ];
2787
2821
  /** @nocollapse */
@@ -2895,6 +2929,8 @@
2895
2929
  /** @type {?} */
2896
2930
  RAWidgetContainer.prototype.showSettingsLink;
2897
2931
  /** @type {?} */
2932
+ RAWidgetContainer.prototype.isKpiView;
2933
+ /** @type {?} */
2898
2934
  RAWidgetContainer.prototype.ctlWidget;
2899
2935
  /** @type {?} */
2900
2936
  RAWidgetContainer.prototype.widgetDropdown;