@schneideress/dashboardframework 0.0.173 → 0.0.175

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.
@@ -5,18 +5,18 @@
5
5
  }(this, (function (exports, core, rxjs, raCommon, operators, ngxUiLoader, angularNotifier, widgetframework, platformBrowser, http, common, userControls, commonControls) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation.
8
+ Copyright (c) Microsoft Corporation. All rights reserved.
9
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
10
+ this file except in compliance with the License. You may obtain a copy of the
11
+ License at http://www.apache.org/licenses/LICENSE-2.0
9
12
 
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
13
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
15
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
16
+ MERCHANTABLITY OR NON-INFRINGEMENT.
12
17
 
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
18
+ See the Apache Version 2.0 License for specific language governing permissions
19
+ and limitations under the License.
20
20
  ***************************************************************************** */
21
21
  /* global Reflect, Promise */
22
22
 
@@ -109,13 +109,8 @@
109
109
  }
110
110
  }
111
111
 
112
- function __createBinding(o, m, k, k2) {
113
- if (k2 === undefined) k2 = k;
114
- o[k2] = m[k];
115
- }
116
-
117
112
  function __exportStar(m, exports) {
118
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
113
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
119
114
  }
120
115
 
121
116
  function __values(o) {
@@ -635,16 +630,16 @@
635
630
  mobileBreakpoint: 640,
636
631
  minCols: 10,
637
632
  maxCols: 10,
638
- minRows: 2,
633
+ minRows: 1,
639
634
  maxRows: 100,
640
635
  maxItemCols: 10,
641
- minItemCols: 2,
636
+ minItemCols: 1,
642
637
  maxItemRows: 1000,
643
- minItemRows: 2,
638
+ minItemRows: 1,
644
639
  maxItemArea: 1000,
645
- minItemArea: 4,
646
- defaultItemCols: 2,
647
- defaultItemRows: 2,
640
+ minItemArea: 2,
641
+ defaultItemCols: 1,
642
+ defaultItemRows: 1,
648
643
  keepFixedHeightInMobile: false,
649
644
  keepFixedWidthInMobile: false,
650
645
  scrollSensitivity: 10,
@@ -977,6 +972,18 @@
977
972
  var _this = this;
978
973
  /**To override default configuration values to the gridster control */
979
974
  this.options = this.responsiveService.GridsterConfig;
975
+ this.options.initCallback = (/**
976
+ * @param {?} gridster
977
+ * @return {?}
978
+ */
979
+ function (gridster) {
980
+ console.log('grid inititalized');
981
+ console.log(_this.options.api);
982
+ if (_this.options.api) {
983
+ _this.gridcellHeight = _this.options.api.getCurrentRowHeight();
984
+ console.log('cell height is' + _this.gridcellHeight);
985
+ }
986
+ });
980
987
  this.options.itemChangeCallback = (/**
981
988
  * @param {?} item
982
989
  * @return {?}
@@ -1529,7 +1536,7 @@
1529
1536
  RADashboardArea.decorators = [
1530
1537
  { type: core.Component, args: [{
1531
1538
  selector: 'ra-dashboard-area',
1532
- 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\" [grid-cell-height]=\"(gridcellHeight > 0)?gridcellHeight:item.widgetInfo.rowHeight\" [widget-width]=\"item.cols\" [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\" [dom-resized]=\"domResized\"></ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n <notifier-container></notifier-container>\r\n</div>\r\n\r\n",
1539
+ 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\"\r\n (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\" [global-filter]=\"globalFilter\"\r\n [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\" [widget-width]=\"item.cols\"\r\n [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\" [dom-resized]=\"domResized\">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n <notifier-container></notifier-container>\r\n</div>\r\n",
1533
1540
  styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#ededed;overflow-y:hidden!important}.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:0 1px 10px rgba(0,0,0,.05)}gridster-item:hover{box-shadow:0 1px 10px rgba(0,0,0,.15)}"]
1534
1541
  }] }
1535
1542
  ];
@@ -1963,6 +1970,7 @@
1963
1970
  var widgetConfigFilter, widgetContainer;
1964
1971
  var _this = this;
1965
1972
  return __generator(this, function (_a) {
1973
+ widgetInfo.rowHeight = this.gridCellHeight;
1966
1974
  widgetConfigFilter = (/** @type {?} */ ({
1967
1975
  config: widgetInfo.widgetConfigInfo.config,
1968
1976
  globalFilter: this.globalFilter
@@ -2154,6 +2162,7 @@
2154
2162
  return __generator(this, function (_a) {
2155
2163
  switch (_a.label) {
2156
2164
  case 0:
2165
+ widgetInfo.rowHeight = this.gridCellHeight;
2157
2166
  this.setNotConfiguredState(widgetInfo);
2158
2167
  widgetContainerContext = this;
2159
2168
  widgetConfigFilter = (/** @type {?} */ ({