@schneideress/dashboardframework 0.0.33 → 0.0.34

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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@schneideress/ess-util'), require('rxjs/operators'), require('ngx-ui-loader'), require('angular-notifier'), require('@schneideress/ess-base'), require('@angular/platform-browser'), require('@angular/common/http'), require('@angular/common')) :
3
- typeof define === 'function' && define.amd ? define('@schneideress/dashboardframework', ['exports', '@angular/core', 'rxjs', '@schneideress/ess-util', 'rxjs/operators', 'ngx-ui-loader', 'angular-notifier', '@schneideress/ess-base', '@angular/platform-browser', '@angular/common/http', '@angular/common'], factory) :
4
- (global = global || self, factory((global.schneideress = global.schneideress || {}, global.schneideress.dashboardframework = {}), global.ng.core, global.rxjs, global['@schneideress/ess-util'], global.rxjs.operators, global['ngx-ui-loader'], global['angular-notifier'], global.essBase, global.ng.platformBrowser, global.ng.common.http, global.ng.common));
5
- }(this, function (exports, core, rxjs, essUtil, operators, ngxUiLoader, angularNotifier, essBase, platformBrowser, http, common) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@schneideress/ess-util'), require('rxjs/operators'), require('ngx-ui-loader'), require('angular-notifier'), require('@schneideress/ess-base'), require('@angular/platform-browser'), require('@angular/common/http'), require('ngx-perfect-scrollbar'), require('@angular/common')) :
3
+ typeof define === 'function' && define.amd ? define('@schneideress/dashboardframework', ['exports', '@angular/core', 'rxjs', '@schneideress/ess-util', 'rxjs/operators', 'ngx-ui-loader', 'angular-notifier', '@schneideress/ess-base', '@angular/platform-browser', '@angular/common/http', 'ngx-perfect-scrollbar', '@angular/common'], factory) :
4
+ (global = global || self, factory((global.schneideress = global.schneideress || {}, global.schneideress.dashboardframework = {}), global.ng.core, global.rxjs, global['@schneideress/ess-util'], global.rxjs.operators, global['ngx-ui-loader'], global['angular-notifier'], global.essBase, global.ng.platformBrowser, global.ng.common.http, global.ngxPerfectScrollbar, global.ng.common));
5
+ }(this, function (exports, core, rxjs, essUtil, operators, ngxUiLoader, angularNotifier, essBase, platformBrowser, http, ngxPerfectScrollbar, common) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -574,6 +574,8 @@
574
574
  widgetLibraryDoneClick: "widgetLibraryDoneClick",
575
575
  /**refresh favorite icon after srtting and resetting favorites */
576
576
  favoriteIconRefresh: "favoriteIconRefresh",
577
+ /**to refresh menu content */
578
+ QuickLinkRefresh: "QuickLinkRefresh",
577
579
  };
578
580
  /** @enum {string} */
579
581
  var RAEventKey = {
@@ -1110,10 +1112,17 @@
1110
1112
  * @return {?}
1111
1113
  */
1112
1114
  function () {
1115
+ var _this = this;
1113
1116
  /** @type {?} */
1114
1117
  var areaScrollHeight = 0;
1115
1118
  /** @type {?} */
1116
1119
  var areaHeight = 0;
1120
+ /** @type {?} */
1121
+ var curRowHeight = 0;
1122
+ if (this.options.api) {
1123
+ curRowHeight = this.options.api.getCurrentRowHeight();
1124
+ areaHeight = areaScrollHeight * this.options.api.getCurrentRowHeight() + 2;
1125
+ }
1117
1126
  this.widgetList.forEach((/**
1118
1127
  * @param {?} t
1119
1128
  * @return {?}
@@ -1124,10 +1133,14 @@
1124
1133
  if (currentHeight > areaScrollHeight) {
1125
1134
  areaScrollHeight = currentHeight;
1126
1135
  }
1136
+ if (curRowHeight == 0 || curRowHeight == 2) {
1137
+ if (_this.widgetList && _this.widgetList.length > 0)
1138
+ t.widgetInfo.rowHeight = _this.widgetList[0].curRowHeight;
1139
+ }
1140
+ else {
1141
+ t.widgetInfo.rowHeight = curRowHeight;
1142
+ }
1127
1143
  }));
1128
- if (this.options.api) {
1129
- areaHeight = areaScrollHeight * this.options.api.getCurrentRowHeight() + 2;
1130
- }
1131
1144
  if (areaHeight < 600) {
1132
1145
  areaHeight = 600;
1133
1146
  }
@@ -1290,6 +1303,7 @@
1290
1303
  widget.width = widgetItem.cols;
1291
1304
  widget.position_x = widgetItem.x;
1292
1305
  widget.position_y = widgetItem.y;
1306
+ widget.rowHeight = widgetItem.curRowHeight;
1293
1307
  return widget;
1294
1308
  };
1295
1309
  /**
@@ -1316,7 +1330,7 @@
1316
1330
  RADashboardArea.decorators = [
1317
1331
  { type: core.Component, args: [{
1318
1332
  selector: 'ra-dashboard-area',
1319
- template: "<div #gridWrapper class=\"wrap gridster\" [style.height.px]=\"gridheight\">\r\n<!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [widget-width]=\"item.cols\" [widget-instance-id]=\"item.widgetInstanceId\"></ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n <notifier-container></notifier-container>\r\n</div>\r\n\r\n",
1333
+ template: "<div #gridWrapper class=\"wrap gridster\" [style.height.px]=\"gridheight\">\r\n<!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [widget-width]=\"item.cols\" [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\"></ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n <notifier-container></notifier-container>\r\n</div>\r\n\r\n",
1320
1334
  styles: ["gridster{width:inherit;resize:height;display:flex}gridster-item{background:#fff!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}"]
1321
1335
  }] }
1322
1336
  ];
@@ -1425,8 +1439,6 @@
1425
1439
  this.notifier = notifier;
1426
1440
  this.isWidgetLoaded = false;
1427
1441
  this.isIEOrEdge = /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
1428
- this.lockStatus = "unlock";
1429
- this.lockClass = "unlock";
1430
1442
  this.widgetDeleted = new core.EventEmitter();
1431
1443
  }
1432
1444
  /**
@@ -1456,11 +1468,14 @@
1456
1468
  if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
1457
1469
  this.refreshWidget(this.data.widgetInfo);
1458
1470
  }
1459
- if (changes.widgetWidth && changes.widgetWidth.currentValue != changes.widgetWidth.previousValue) {
1471
+ if (changes.width && changes.width.currentValue != changes.width.previousValue) {
1460
1472
  this.data.widgetInfo.isDimensionUpdate = true;
1461
1473
  this.refreshWidget(this.data.widgetInfo);
1462
1474
  this.data.widgetInfo.isDimensionUpdate = false;
1463
1475
  }
1476
+ if (changes.height && changes.height.currentValue != changes.height.previousValue) {
1477
+ this.setWidgetheight();
1478
+ }
1464
1479
  };
1465
1480
  /**
1466
1481
  * @return {?}
@@ -1566,6 +1581,15 @@
1566
1581
  this.refreshWidget(this.data.widgetInfo);
1567
1582
  // this.updateWidget(widgetInfo);
1568
1583
  };
1584
+ /**
1585
+ * @return {?}
1586
+ */
1587
+ RAWidgetContainer.prototype.setWidgetheight = /**
1588
+ * @return {?}
1589
+ */
1590
+ function () {
1591
+ this.widgetHeight = this.data.widgetInfo.height * this.data.widgetInfo.rowHeight + 2;
1592
+ };
1569
1593
  /** To load external custom element to the widget container*/
1570
1594
  /**
1571
1595
  * To load external custom element to the widget container
@@ -1604,6 +1628,7 @@
1604
1628
  }));
1605
1629
  _this.ctlWidget.nativeElement.appendChild(_this.widgetElement);
1606
1630
  }));
1631
+ this.setWidgetheight();
1607
1632
  };
1608
1633
  /** To refresh widget on input config changes */
1609
1634
  /**
@@ -1628,30 +1653,13 @@
1628
1653
  }));
1629
1654
  if (widgetContainerContext.isWidgetLoaded) {
1630
1655
  widgetContainerContext.widgetElement.loadContent(widgetConfigFilter);
1631
- this.lockStatus = widgetContainerContext.widgetElement.loadLockStatus();
1632
- if (this.lockStatus) {
1633
- switch (this.lockStatus) {
1634
- case "lock": {
1635
- this.lockClass = "fa fa-lock locked";
1636
- }
1637
- case "unlock": {
1638
- this.lockClass = "unlock";
1639
- }
1640
- case "partiallock": {
1641
- this.lockClass = "fa fa-lock partiallocked";
1642
- }
1643
- default: {
1644
- this.lockClass = "unlock";
1645
- }
1646
- }
1647
- }
1648
1656
  }
1649
1657
  };
1650
1658
  RAWidgetContainer.decorators = [
1651
1659
  { type: core.Component, args: [{
1652
1660
  selector: 'ra-widget-container',
1653
- template: "<div class=\"wc-wrapper\">\r\n <div class=\"wcheader\">\r\n <div class=\"col-md-12 wc-mover\">\r\n <div class=\"row\">\r\n <div class=\"col-md-11 float-left\" style=\"width:96%;\">{{data.widgetInfo.widgetTitle}}\r\n </div>\r\n <div class=\"col-md-1\">\r\n <div class=\"float-right\" style=\"display: flex\">\r\n <div><i [ngClass]=\"lockClass\"></i></div>\r\n <div class=\"dropdown\">\r\n <div class=\"dropbtn gearIcon\"> <i class=\"fal fa-cog\"></i></div>\r\n <div class=\"dropdown-content widget-config-item\">\r\n <a (click)=\"editWidget()\">\r\n <i class=\"fal fa-edit\"></i>\r\n <span>{{'Edit'|translate}}</span>\r\n </a>\r\n <a (click)=\"copyWidget()\">\r\n <i class=\"fal fa-copy\"></i>\r\n <span>{{'Copy'|translate}}</span>\r\n </a>\r\n <a (click)=\"moveWidget()\">\r\n <i class=\"fal fa-arrows-alt\"></i>\r\n <span>{{'Move'|translate}}</span>\r\n </a>\r\n <hr class=\"hr\">\r\n <a (click)=\"deleteWidget()\">\r\n <i class=\"fal fa-times\" style=\"padding-left: 3px;\"></i>\r\n <span>{{'Delete'|translate}}</span>\r\n </a>\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\">\r\n <div class=\"wcBodyBorder\" #ctlWidget></div>\r\n </div>\r\n</div>",
1654
- styles: [".wcheader{width:100%;height:26px;background:#fff;color:#3dcd58;padding:7px 7px 0 6px;font-family:\"Arial Rounded MT\";border-bottom:1px solid;border-color:#fff;font-size:16px}.wc-mover{cursor:all-scroll}.wcBody{padding:8px}.wcBodyBorder{border:1px dashed #e6e2e2}.sp_icon{float:left;margin:0 15% 0 0}.dropbtn{cursor:pointer;color:#42b4e6}.dropdown{visibility:hidden;opacity:0;transition:visibility,opacity .5s linear;position:relative}.dropdown hr{margin:0!important}.dropdown-content{display:none;position:absolute;right:0;background-color:#f9f9f9;min-width:100px;box-shadow:0 8px 16px 8px rgba(0,0,0,.2);z-index:1;font-size:12px;font-family:\"Arial Rounded MT\"}.dropdown-content a{color:#000;padding:5px 16px;text-decoration:none;display:block;cursor:pointer}.dropdown-content a:hover{background-color:#f1f1f1}.dropdown:hover .dropdown-content{display:block;-webkit-animation:.3s ease-out slide-down;animation:.3s ease-out slide-down}.wc-wrapper:hover .dropdown{visibility:visible;opacity:1}.dropdown:hover .dropbtn{color:#2b7797}.gearIcon{color:#42b4e6}.hr{border:0;border-top:1px solid rgba(0,0,0,.1)}@keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0)}}.widget-config-item i{font-size:17px;color:#42b4e6}.widget-config-item span{font-size:12px;font:inherit;padding-left:12px;color:#42b4e6}.locked{color:#42b4e6}.partiallocked{color:#a0d9f2}.unlock{display:none}"]
1661
+ template: "<div class=\"wc-wrapper\">\r\n <div class=\"wcheader\">\r\n <div class=\"col-md-12 wc-mover\">\r\n <div class=\"row\">\r\n <div class=\"col-md-11 float-left\" style=\"width:96%;\">{{data.widgetInfo.widgetTitle}}\r\n </div>\r\n <div class=\"col-md-1\">\r\n <div class=\"float-right\">\r\n <div class=\"dropdown\">\r\n <div class=\"dropbtn gearIcon\"> <i class=\"fal fa-cog\"></i></div>\r\n <div class=\"dropdown-content widget-config-item\">\r\n <a (click)=\"editWidget()\">\r\n <i class=\"fal fa-edit\"></i>\r\n <span>{{'Edit'|translate}}</span>\r\n </a>\r\n <a (click)=\"copyWidget()\">\r\n <i class=\"fal fa-copy\"></i>\r\n <span>{{'Copy'|translate}}</span>\r\n </a>\r\n <a (click)=\"moveWidget()\">\r\n <i class=\"fal fa-arrows-alt\"></i>\r\n <span>{{'Move'|translate}}</span>\r\n </a>\r\n <hr class=\"hr\">\r\n <a (click)=\"deleteWidget()\">\r\n <i class=\"fal fa-times\" style=\"padding-left: 3px;\"></i>\r\n <span>{{'Delete'|translate}}</span>\r\n </a>\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\" [style.height.px]=\"widgetHeight\">\r\n <perfect-scrollbar>\r\n <div class=\"wcBodyBorder\" #ctlWidget></div>\r\n </perfect-scrollbar>\r\n </div>\r\n</div>\r\n",
1662
+ styles: [".wcheader{width:100%;height:26px;background:#fff;color:#3dcd58;padding:7px 7px 0 6px;font-family:\"Arial Rounded MT\";border-bottom:1px solid;border-color:#fff;font-size:16px}.wc-mover{cursor:all-scroll}.wcBody{padding:8px}.wcBodyBorder{border:1px dashed #e6e2e2}.sp_icon{float:left;margin:0 15% 0 0}.dropbtn{cursor:pointer;color:#42b4e6}.dropdown{visibility:hidden;opacity:0;transition:visibility,opacity .5s linear;position:relative}.dropdown hr{margin:0!important}.dropdown-content{display:none;position:absolute;right:0;background-color:#f9f9f9;min-width:100px;box-shadow:0 8px 16px 8px rgba(0,0,0,.2);z-index:1;font-size:12px;font-family:\"Arial Rounded MT\"}.dropdown-content a{color:#000;padding:5px 16px;text-decoration:none;display:block;cursor:pointer}.dropdown-content a:hover{background-color:#f1f1f1}.dropdown:hover .dropdown-content{display:block;-webkit-animation:.3s ease-out slide-down;animation:.3s ease-out slide-down}.wc-wrapper:hover .dropdown{visibility:visible;opacity:1}.dropdown:hover .dropbtn{color:#2b7797}.gearIcon{color:#42b4e6}.hr{border:0;border-top:1px solid rgba(0,0,0,.1)}@keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%);transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes slide-down{0%{opacity:0;-webkit-transform:translateY(-20%)}100%{opacity:1;-webkit-transform:translateY(0)}}.widget-config-item i{font-size:17px;color:#42b4e6}.widget-config-item span{font-size:12px;font:inherit;padding-left:12px;color:#42b4e6}"]
1655
1663
  }] }
1656
1664
  ];
1657
1665
  /** @nocollapse */
@@ -1669,7 +1677,8 @@
1669
1677
  data: [{ type: core.Input, args: ['data',] }],
1670
1678
  raDashboardEventBus: [{ type: core.Input, args: ['event-bus',] }],
1671
1679
  appConfig: [{ type: core.Input, args: ['app-config',] }],
1672
- widgetWidth: [{ type: core.Input, args: ['widget-width',] }],
1680
+ width: [{ type: core.Input, args: ['widget-width',] }],
1681
+ height: [{ type: core.Input, args: ['widget-height',] }],
1673
1682
  widgetDeleted: [{ type: core.Output }]
1674
1683
  };
1675
1684
  return RAWidgetContainer;
@@ -1696,9 +1705,7 @@
1696
1705
  */
1697
1706
  RAWidgetContainer.prototype.isIEOrEdge;
1698
1707
  /** @type {?} */
1699
- RAWidgetContainer.prototype.lockStatus;
1700
- /** @type {?} */
1701
- RAWidgetContainer.prototype.lockClass;
1708
+ RAWidgetContainer.prototype.widgetHeight;
1702
1709
  /** @type {?} */
1703
1710
  RAWidgetContainer.prototype.ctlWidget;
1704
1711
  /** @type {?} */
@@ -1712,7 +1719,9 @@
1712
1719
  /** @type {?} */
1713
1720
  RAWidgetContainer.prototype.appConfig;
1714
1721
  /** @type {?} */
1715
- RAWidgetContainer.prototype.widgetWidth;
1722
+ RAWidgetContainer.prototype.width;
1723
+ /** @type {?} */
1724
+ RAWidgetContainer.prototype.height;
1716
1725
  /** @type {?} */
1717
1726
  RAWidgetContainer.prototype.widgetDeleted;
1718
1727
  /**
@@ -6799,6 +6808,11 @@
6799
6808
  * @fileoverview added by tsickle
6800
6809
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6801
6810
  */
6811
+ /** @type {?} */
6812
+ var DEFAULT_PERFECT_SCROLLBAR_CONFIG = {
6813
+ suppressScrollX: true
6814
+ };
6815
+ var ɵ0 = DEFAULT_PERFECT_SCROLLBAR_CONFIG;
6802
6816
  var DashboardFrameworkModule = /** @class */ (function () {
6803
6817
  function DashboardFrameworkModule() {
6804
6818
  }
@@ -6814,13 +6828,17 @@
6814
6828
  http.HttpClientModule,
6815
6829
  ngxUiLoader.NgxUiLoaderModule,
6816
6830
  essBase.TranslateModule,
6817
- angularNotifier.NotifierModule.withConfig(customNotifierOptions)
6831
+ angularNotifier.NotifierModule.withConfig(customNotifierOptions),
6832
+ ngxPerfectScrollbar.PerfectScrollbarModule
6818
6833
  ],
6819
6834
  exports: [
6820
6835
  RADashboardArea,
6821
6836
  essBase.TranslateModule
6822
6837
  ],
6823
- providers: [],
6838
+ providers: [{
6839
+ provide: ngxPerfectScrollbar.PERFECT_SCROLLBAR_CONFIG,
6840
+ useValue: ɵ0
6841
+ },],
6824
6842
  bootstrap: [RADashboardArea]
6825
6843
  },] }
6826
6844
  ];