@schneideress/dashboardframework 0.0.247 → 0.0.248

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.
@@ -180,6 +180,8 @@ var RAEvent;
180
180
  RAEvent["UpdateAppledFiterForInapplicableFilter"] = "UpdateAppledFiterForInapplicableFilter";
181
181
  /**show inapplicable filter message in global filter flyout */
182
182
  RAEvent["ShowInapplicableFilterMessage"] = "ShowInapplicableFilterMessage";
183
+ /** Bulk Action Clicked */
184
+ RAEvent["BulkActionClick"] = "BulkActionClick";
183
185
  })(RAEvent || (RAEvent = {}));
184
186
  var RAEventKey;
185
187
  (function (RAEventKey) {
@@ -424,6 +426,9 @@ let RADashboardArea = class RADashboardArea {
424
426
  }
425
427
  else {
426
428
  setTimeout(() => {
429
+ this.raDashboardEventBus.subscribe(RAEvent.BulkActionClick).subscribe((data) => {
430
+ this.bulkActionData = JSON.parse(JSON.stringify(data)); // To create a new reference;
431
+ });
427
432
  this.gridcellHeight = this.options.api.getCurrentRowHeight();
428
433
  this.domResized = !this.domResized;
429
434
  this.setAreaHeight();
@@ -829,6 +834,10 @@ __decorate([
829
834
  Input('app-config'),
830
835
  __metadata("design:type", Object)
831
836
  ], RADashboardArea.prototype, "appConfig", void 0);
837
+ __decorate([
838
+ Input('dashboard-info'),
839
+ __metadata("design:type", Object)
840
+ ], RADashboardArea.prototype, "dashboardInfo", void 0);
832
841
  __decorate([
833
842
  Output(),
834
843
  __metadata("design:type", Object)
@@ -977,20 +986,27 @@ let RAWidgetContainer = class RAWidgetContainer {
977
986
  });
978
987
  });
979
988
  }
980
- if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
981
- let filterObj = this.getParsedConfig(this.globalFilter);
982
- if (filterObj.WidgetInstanceId) {
983
- if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
989
+ if (this.widgetElement) {
990
+ if (changes.bulkActionData && changes.bulkActionData.currentValue != changes.bulkActionData.previousValue) {
991
+ if (typeof this.widgetElement.bulkActionClicked === "function") {
992
+ this.widgetElement.bulkActionClicked(this.bulkActionData);
993
+ }
994
+ }
995
+ if (changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
996
+ let filterObj = this.getParsedConfig(this.globalFilter);
997
+ if (filterObj.WidgetInstanceId) {
998
+ if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
999
+ this.refreshWidget(this.data.widgetInfo);
1000
+ }
1001
+ else {
984
1002
  this.refreshWidget(this.data.widgetInfo);
1003
+ }
985
1004
  }
986
- else {
987
- this.refreshWidget(this.data.widgetInfo);
1005
+ if (changes.width && changes.width.currentValue != changes.width.previousValue ||
1006
+ (changes.height && changes.height.currentValue != changes.height.previousValue)) {
1007
+ this.invokeWidgetResizedEvent();
988
1008
  }
989
1009
  }
990
- if (changes.width && changes.width.currentValue != changes.width.previousValue ||
991
- (changes.height && changes.height.currentValue != changes.height.previousValue)) {
992
- this.invokeWidgetResizedEvent();
993
- }
994
1010
  }
995
1011
  invokeWidgetResizedEvent() {
996
1012
  if (this.widgetElement) {
@@ -1240,6 +1256,7 @@ let RAWidgetContainer = class RAWidgetContainer {
1240
1256
  widgetConfigFilter.configChanges = this.getConfigChanges(false);
1241
1257
  widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
1242
1258
  widgetConfigFilter.globalFilter = this.globalFilter;
1259
+ widgetConfigFilter.dashboardInfo = me.dashboardService.dashboardInfo;
1243
1260
  this.widgetElement.loadContent(widgetConfigFilter);
1244
1261
  yield this.setLock(widgetConfigFilter.config);
1245
1262
  yield this.setDownloadIcon();
@@ -1670,6 +1687,10 @@ __decorate([
1670
1687
  Input('grid-cell-height'),
1671
1688
  __metadata("design:type", Number)
1672
1689
  ], RAWidgetContainer.prototype, "gridCellHeight", void 0);
1690
+ __decorate([
1691
+ Input('bulk-action-data'),
1692
+ __metadata("design:type", Object)
1693
+ ], RAWidgetContainer.prototype, "bulkActionData", void 0);
1673
1694
  __decorate([
1674
1695
  Output(),
1675
1696
  __metadata("design:type", Object)
@@ -2552,10 +2573,10 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2552
2573
  this.gridRenderer = new GridsterRenderer(this);
2553
2574
  }
2554
2575
  static checkCollisionTwoItems(item, item2) {
2555
- return (item.x < item2.x + item2.cols &&
2556
- item.x + item.cols > item2.x &&
2557
- item.y < item2.y + item2.rows &&
2558
- item.y + item.rows > item2.y);
2576
+ return item.x < item2.x + item2.cols
2577
+ && item.x + item.cols > item2.x
2578
+ && item.y < item2.y + item2.rows
2579
+ && item.y + item.rows > item2.y;
2559
2580
  }
2560
2581
  ngOnInit() {
2561
2582
  if (this.options.initCallback) {
@@ -2563,7 +2584,6 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2563
2584
  }
2564
2585
  }
2565
2586
  ngOnChanges(changes) {
2566
- console.log(this.$options);
2567
2587
  if (changes.options) {
2568
2588
  this.setOptions();
2569
2589
  this.options.api = {
@@ -2572,7 +2592,7 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2572
2592
  getNextPossiblePosition: this.getNextPossiblePosition.bind(this),
2573
2593
  getFirstPossiblePosition: this.getFirstPossiblePosition.bind(this),
2574
2594
  getLastPossiblePosition: this.getLastPossiblePosition.bind(this),
2575
- getCurrentRowHeight: this.getCurrentRowHeight.bind(this),
2595
+ getCurrentRowHeight: this.getCurrentRowHeight.bind(this)
2576
2596
  };
2577
2597
  this.columns = this.$options.minCols;
2578
2598
  this.rows = this.$options.minRows;
@@ -2586,7 +2606,7 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2586
2606
  resize() {
2587
2607
  let height;
2588
2608
  let width;
2589
- if (this.$options.gridType === "fit" && !this.mobile) {
2609
+ if (this.$options.gridType === 'fit' && !this.mobile) {
2590
2610
  width = this.el.offsetWidth;
2591
2611
  height = this.el.offsetHeight;
2592
2612
  }
@@ -2594,15 +2614,14 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2594
2614
  width = this.el.clientWidth;
2595
2615
  height = this.el.clientHeight;
2596
2616
  }
2597
- if ((width !== this.curWidth || height !== this.curHeight) &&
2598
- this.checkIfToResize()) {
2617
+ if ((width !== this.curWidth || height !== this.curHeight) && this.checkIfToResize()) {
2599
2618
  this.onResize();
2600
2619
  }
2601
2620
  }
2602
2621
  setOptions() {
2603
2622
  this.$options = GridsterUtils.merge(this.$options, this.options, this.$options);
2604
2623
  if (!this.$options.disableWindowResize && !this.windowResize) {
2605
- this.windowResize = this.renderer.listen("window", "resize", this.onResize.bind(this));
2624
+ this.windowResize = this.renderer.listen('window', 'resize', this.onResize.bind(this));
2606
2625
  }
2607
2626
  else if (this.$options.disableWindowResize && this.windowResize) {
2608
2627
  this.windowResize();
@@ -2628,9 +2647,9 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2628
2647
  }
2629
2648
  //if (this.options.api) {
2630
2649
  /* this.options.api getting undefined for new dashboard load- temp fix
2631
- * on new dashboard area load, old dashboard area gets destroyed, but that leads to
2632
- * ondestroy of current this.options.api instance - needs to investigate further
2633
- */
2650
+ * on new dashboard area load, old dashboard area gets destroyed, but that leads to
2651
+ * ondestroy of current this.options.api instance - needs to investigate further
2652
+ */
2634
2653
  if (false) {
2635
2654
  this.options.api.resize = undefined;
2636
2655
  this.options.api.optionsChanged = undefined;
@@ -2653,12 +2672,10 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2653
2672
  const clientHeight = this.el.clientHeight;
2654
2673
  const offsetHeight = this.el.offsetHeight;
2655
2674
  const scrollHeight = this.el.scrollHeight;
2656
- const verticalScrollPresent = clientWidth < offsetWidth &&
2657
- scrollHeight > offsetHeight &&
2658
- scrollHeight - offsetHeight < offsetWidth - clientWidth;
2659
- const horizontalScrollPresent = clientHeight < offsetHeight &&
2660
- scrollWidth > offsetWidth &&
2661
- scrollWidth - offsetWidth < offsetHeight - clientHeight;
2675
+ const verticalScrollPresent = clientWidth < offsetWidth && scrollHeight > offsetHeight
2676
+ && scrollHeight - offsetHeight < offsetWidth - clientWidth;
2677
+ const horizontalScrollPresent = clientHeight < offsetHeight
2678
+ && scrollWidth > offsetWidth && scrollWidth - offsetWidth < offsetHeight - clientHeight;
2662
2679
  if (verticalScrollPresent) {
2663
2680
  return false;
2664
2681
  }
@@ -2668,8 +2685,7 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2668
2685
  const el = this.el;
2669
2686
  let width = el.clientWidth;
2670
2687
  let height = el.clientHeight;
2671
- if (this.$options.setGridSize ||
2672
- (this.$options.gridType === "fit" && !this.mobile)) {
2688
+ if (this.$options.setGridSize || this.$options.gridType === 'fit' && !this.mobile) {
2673
2689
  width = el.offsetWidth;
2674
2690
  height = el.offsetHeight;
2675
2691
  }
@@ -2684,11 +2700,11 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2684
2700
  this.setGridSize();
2685
2701
  if (!this.mobile && this.$options.mobileBreakpoint > this.curWidth) {
2686
2702
  this.mobile = !this.mobile;
2687
- this.renderer.addClass(this.el, "mobile");
2703
+ this.renderer.addClass(this.el, 'mobile');
2688
2704
  }
2689
2705
  else if (this.mobile && this.$options.mobileBreakpoint < this.curWidth) {
2690
2706
  this.mobile = !this.mobile;
2691
- this.renderer.removeClass(this.el, "mobile");
2707
+ this.renderer.removeClass(this.el, 'mobile');
2692
2708
  }
2693
2709
  let rows = this.$options.minRows, columns = this.$options.minCols;
2694
2710
  let widgetsIndex = this.grid.length - 1, widget;
@@ -2716,57 +2732,57 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2716
2732
  let marginWidth = -this.$options.margin;
2717
2733
  if (this.$options.outerMarginLeft !== null) {
2718
2734
  marginWidth += this.$options.outerMarginLeft;
2719
- this.renderer.setStyle(this.el, "padding-left", this.$options.outerMarginLeft + "px");
2735
+ this.renderer.setStyle(this.el, 'padding-left', this.$options.outerMarginLeft + 'px');
2720
2736
  }
2721
2737
  else {
2722
2738
  marginWidth += this.$options.margin;
2723
- this.renderer.setStyle(this.el, "padding-left", this.$options.margin + "px");
2739
+ this.renderer.setStyle(this.el, 'padding-left', this.$options.margin + 'px');
2724
2740
  }
2725
2741
  if (this.$options.outerMarginRight !== null) {
2726
2742
  marginWidth += this.$options.outerMarginRight;
2727
- this.renderer.setStyle(this.el, "padding-right", this.$options.outerMarginRight + "px");
2743
+ this.renderer.setStyle(this.el, 'padding-right', this.$options.outerMarginRight + 'px');
2728
2744
  }
2729
2745
  else {
2730
2746
  marginWidth += this.$options.margin;
2731
- this.renderer.setStyle(this.el, "padding-right", this.$options.margin + "px");
2747
+ this.renderer.setStyle(this.el, 'padding-right', this.$options.margin + 'px');
2732
2748
  }
2733
2749
  this.curColWidth = (this.curWidth - marginWidth) / this.columns;
2734
2750
  let marginHeight = -this.$options.margin;
2735
2751
  if (this.$options.outerMarginTop !== null) {
2736
2752
  marginHeight += this.$options.outerMarginTop;
2737
- this.renderer.setStyle(this.el, "padding-top", this.$options.outerMarginTop + "px");
2753
+ this.renderer.setStyle(this.el, 'padding-top', this.$options.outerMarginTop + 'px');
2738
2754
  }
2739
2755
  else {
2740
2756
  marginHeight += this.$options.margin;
2741
- this.renderer.setStyle(this.el, "padding-top", this.$options.margin + "px");
2757
+ this.renderer.setStyle(this.el, 'padding-top', this.$options.margin + 'px');
2742
2758
  }
2743
2759
  if (this.$options.outerMarginBottom !== null) {
2744
2760
  marginHeight += this.$options.outerMarginBottom;
2745
- this.renderer.setStyle(this.el, "padding-bottom", this.$options.outerMarginBottom + "px");
2761
+ this.renderer.setStyle(this.el, 'padding-bottom', this.$options.outerMarginBottom + 'px');
2746
2762
  }
2747
2763
  else {
2748
2764
  marginHeight += this.$options.margin;
2749
- this.renderer.setStyle(this.el, "padding-bottom", this.$options.margin + "px");
2765
+ this.renderer.setStyle(this.el, 'padding-bottom', this.$options.margin + 'px');
2750
2766
  }
2751
2767
  this.curRowHeight = (this.curHeight - marginHeight) / this.rows;
2752
2768
  }
2753
2769
  else {
2754
2770
  this.curColWidth = (this.curWidth + this.$options.margin) / this.columns;
2755
2771
  this.curRowHeight = (this.curHeight + this.$options.margin) / this.rows;
2756
- this.renderer.setStyle(this.el, "padding-left", 0 + "px");
2757
- this.renderer.setStyle(this.el, "padding-right", 0 + "px");
2758
- this.renderer.setStyle(this.el, "padding-top", 0 + "px");
2759
- this.renderer.setStyle(this.el, "padding-bottom", 0 + "px");
2772
+ this.renderer.setStyle(this.el, 'padding-left', 0 + 'px');
2773
+ this.renderer.setStyle(this.el, 'padding-right', 0 + 'px');
2774
+ this.renderer.setStyle(this.el, 'padding-top', 0 + 'px');
2775
+ this.renderer.setStyle(this.el, 'padding-bottom', 0 + 'px');
2760
2776
  }
2761
2777
  this.gridRenderer.updateGridster();
2762
2778
  this.updateGrid();
2763
2779
  if (this.$options.setGridSize) {
2764
- this.renderer.setStyle(this.el, "width", this.columns * this.curColWidth + this.$options.margin + "px");
2765
- this.renderer.setStyle(this.el, "height", this.rows * this.curRowHeight + this.$options.margin + "px");
2780
+ this.renderer.setStyle(this.el, 'width', (this.columns * this.curColWidth + this.$options.margin) + 'px');
2781
+ this.renderer.setStyle(this.el, 'height', (this.rows * this.curRowHeight + this.$options.margin) + 'px');
2766
2782
  }
2767
2783
  else {
2768
- this.renderer.setStyle(this.el, "width", "");
2769
- this.renderer.setStyle(this.el, "height", "");
2784
+ this.renderer.setStyle(this.el, 'width', '');
2785
+ this.renderer.setStyle(this.el, 'height', '');
2770
2786
  }
2771
2787
  let widgetsIndex = this.grid.length - 1, widget;
2772
2788
  for (; widgetsIndex >= 0; widgetsIndex--) {
@@ -2778,23 +2794,18 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2778
2794
  setTimeout(this.resize.bind(this), 100);
2779
2795
  }
2780
2796
  updateGrid() {
2781
- if (this.$options.displayGrid === "always" && !this.mobile) {
2782
- this.renderer.addClass(this.el, "display-grid");
2797
+ if (this.$options.displayGrid === 'always' && !this.mobile) {
2798
+ this.renderer.addClass(this.el, 'display-grid');
2783
2799
  }
2784
- else if (this.$options.displayGrid === "onDrag&Resize" &&
2785
- this.dragInProgress) {
2786
- this.renderer.addClass(this.el, "display-grid");
2800
+ else if (this.$options.displayGrid === 'onDrag&Resize' && this.dragInProgress) {
2801
+ this.renderer.addClass(this.el, 'display-grid');
2787
2802
  }
2788
- else if (this.$options.displayGrid === "none" ||
2789
- !this.dragInProgress ||
2790
- this.mobile) {
2791
- this.renderer.removeClass(this.el, "display-grid");
2803
+ else if (this.$options.displayGrid === 'none' || !this.dragInProgress || this.mobile) {
2804
+ this.renderer.removeClass(this.el, 'display-grid');
2792
2805
  }
2793
2806
  this.setGridDimensions();
2794
- this.gridColumns.length =
2795
- Math.max(this.columns, Math.floor(this.curWidth / this.curColWidth)) || 0;
2796
- this.gridRows.length =
2797
- Math.max(this.rows, Math.floor(this.curHeight / this.curRowHeight)) || 0;
2807
+ this.gridColumns.length = Math.max(this.columns, Math.floor(this.curWidth / this.curColWidth)) || 0;
2808
+ this.gridRows.length = Math.max(this.rows, Math.floor(this.curHeight / this.curRowHeight)) || 0;
2798
2809
  this.cdRef.markForCheck();
2799
2810
  }
2800
2811
  addItem(itemComponent) {
@@ -2814,8 +2825,8 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2814
2825
  else if (this.checkCollision(itemComponent.$item)) {
2815
2826
  if (!this.$options.disableWarnings) {
2816
2827
  itemComponent.notPlaced = true;
2817
- console.warn("Can't be placed in the bounds of the dashboard, trying to auto position!/n" +
2818
- JSON.stringify(itemComponent.item, ["cols", "rows", "x", "y"]));
2828
+ console.warn('Can\'t be placed in the bounds of the dashboard, trying to auto position!/n' +
2829
+ JSON.stringify(itemComponent.item, ['cols', 'rows', 'x', 'y']));
2819
2830
  }
2820
2831
  if (!this.$options.disableAutoPositionOnConflict) {
2821
2832
  this.autoPositionItem(itemComponent);
@@ -2854,43 +2865,24 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2854
2865
  const noNegativePosition = item.y > -1 && item.x > -1;
2855
2866
  const maxGridCols = item.cols + item.x <= this.$options.maxCols;
2856
2867
  const maxGridRows = item.rows + item.y <= this.$options.maxRows;
2857
- const maxItemCols = item.maxItemCols === undefined
2858
- ? this.$options.maxItemCols
2859
- : item.maxItemCols;
2860
- const minItemCols = item.minItemCols === undefined
2861
- ? this.$options.minItemCols
2862
- : item.minItemCols;
2863
- const maxItemRows = item.maxItemRows === undefined
2864
- ? this.$options.maxItemRows
2865
- : item.maxItemRows;
2866
- const minItemRows = item.minItemRows === undefined
2867
- ? this.$options.minItemRows
2868
- : item.minItemRows;
2868
+ const maxItemCols = item.maxItemCols === undefined ? this.$options.maxItemCols : item.maxItemCols;
2869
+ const minItemCols = item.minItemCols === undefined ? this.$options.minItemCols : item.minItemCols;
2870
+ const maxItemRows = item.maxItemRows === undefined ? this.$options.maxItemRows : item.maxItemRows;
2871
+ const minItemRows = item.minItemRows === undefined ? this.$options.minItemRows : item.minItemRows;
2869
2872
  const inColsLimits = item.cols <= maxItemCols && item.cols >= minItemCols;
2870
2873
  const inRowsLimits = item.rows <= maxItemRows && item.rows >= minItemRows;
2871
- const minAreaLimit = item.minItemArea === undefined
2872
- ? this.$options.minItemArea
2873
- : item.minItemArea;
2874
- const maxAreaLimit = item.maxItemArea === undefined
2875
- ? this.$options.maxItemArea
2876
- : item.maxItemArea;
2874
+ const minAreaLimit = item.minItemArea === undefined ? this.$options.minItemArea : item.minItemArea;
2875
+ const maxAreaLimit = item.maxItemArea === undefined ? this.$options.maxItemArea : item.maxItemArea;
2877
2876
  const area = item.cols * item.rows;
2878
2877
  const inMinArea = minAreaLimit <= area;
2879
2878
  const inMaxArea = maxAreaLimit >= area;
2880
- return !(noNegativePosition &&
2881
- maxGridCols &&
2882
- maxGridRows &&
2883
- inColsLimits &&
2884
- inRowsLimits &&
2885
- inMinArea &&
2886
- inMaxArea);
2879
+ return !(noNegativePosition && maxGridCols && maxGridRows && inColsLimits && inRowsLimits && inMinArea && inMaxArea);
2887
2880
  }
2888
2881
  findItemWithItem(item) {
2889
2882
  let widgetsIndex = this.grid.length - 1, widget;
2890
2883
  for (; widgetsIndex > -1; widgetsIndex--) {
2891
2884
  widget = this.grid[widgetsIndex];
2892
- if (widget.$item !== item &&
2893
- GridsterComponent_1.checkCollisionTwoItems(widget.$item, item)) {
2885
+ if (widget.$item !== item && GridsterComponent_1.checkCollisionTwoItems(widget.$item, item)) {
2894
2886
  return widget;
2895
2887
  }
2896
2888
  }
@@ -2901,8 +2893,7 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2901
2893
  let widgetsIndex = this.grid.length - 1, widget;
2902
2894
  for (; widgetsIndex > -1; widgetsIndex--) {
2903
2895
  widget = this.grid[widgetsIndex];
2904
- if (widget.$item !== item &&
2905
- GridsterComponent_1.checkCollisionTwoItems(widget.$item, item)) {
2896
+ if (widget.$item !== item && GridsterComponent_1.checkCollisionTwoItems(widget.$item, item)) {
2906
2897
  a.push(widget);
2907
2898
  }
2908
2899
  }
@@ -2918,8 +2909,8 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2918
2909
  else {
2919
2910
  itemComponent.notPlaced = true;
2920
2911
  if (!this.$options.disableWarnings) {
2921
- console.warn("Can't be placed in the bounds of the dashboard!/n" +
2922
- JSON.stringify(itemComponent.item, ["cols", "rows", "x", "y"]));
2912
+ console.warn('Can\'t be placed in the bounds of the dashboard!/n' +
2913
+ JSON.stringify(itemComponent.item, ['cols', 'rows', 'x', 'y']));
2923
2914
  }
2924
2915
  }
2925
2916
  }
@@ -2965,10 +2956,7 @@ let GridsterComponent = GridsterComponent_1 = class GridsterComponent {
2965
2956
  getLastPossiblePosition(item) {
2966
2957
  let farthestItem = { y: 0, x: 0 };
2967
2958
  farthestItem = this.grid.reduce((prev, curr) => {
2968
- const currCoords = {
2969
- y: curr.$item.y + curr.$item.rows - 1,
2970
- x: curr.$item.x + curr.$item.cols - 1,
2971
- };
2959
+ const currCoords = { y: curr.$item.y + curr.$item.rows - 1, x: curr.$item.x + curr.$item.cols - 1 };
2972
2960
  if (GridsterUtils.compareItems(prev, currCoords) === 1) {
2973
2961
  return currCoords;
2974
2962
  }
@@ -3017,15 +3005,12 @@ __decorate([
3017
3005
  ], GridsterComponent.prototype, "options", void 0);
3018
3006
  GridsterComponent = GridsterComponent_1 = __decorate([
3019
3007
  Component({
3020
- selector: "gridster",
3008
+ selector: 'gridster',
3021
3009
  template: "<div class=\"gridster-column\" *ngFor=\"let column of gridColumns; let i = index;\"\r\n [ngStyle]=\"gridRenderer.getGridColumnStyle(i)\"></div>\r\n<div class=\"gridster-row\" *ngFor=\"let row of gridRows; let i = index;\"\r\n [ngStyle]=\"gridRenderer.getGridRowStyle(i)\"></div>\r\n<ng-content></ng-content>\r\n<gridster-preview class=\"gridster-preview\"></gridster-preview>\r\n",
3022
3010
  encapsulation: ViewEncapsulation.None,
3023
3011
  styles: ["gridster{clear:both;position:relative;box-sizing:border-box;background:#fff;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:block;overflow:auto}gridster.fit{overflow-x:hidden;overflow-y:hidden}gridster.scrollVertical{overflow-x:hidden;overflow-y:auto}gridster.scrollHorizontal{overflow-x:auto;overflow-y:hidden}gridster.fixed{overflow:auto}gridster.mobile{overflow-x:hidden;overflow-y:auto;flex-flow:column}gridster.mobile gridster-item{position:relative;width:100%!important;min-height:300px!important}gridster .gridster-column,gridster .gridster-row{position:absolute;display:none;transition:.3s;box-sizing:border-box}gridster.display-grid .gridster-column,gridster.display-grid .gridster-row{display:block}gridster .gridster-column{border-left:1px solid #ccc;border-right:1px solid #ccc}gridster .gridster-row{border-top:1px solid #ccc;border-bottom:1px solid #ccc}"]
3024
3012
  }),
3025
- __metadata("design:paramtypes", [ElementRef,
3026
- Renderer2,
3027
- ChangeDetectorRef,
3028
- NgZone])
3013
+ __metadata("design:paramtypes", [ElementRef, Renderer2, ChangeDetectorRef, NgZone])
3029
3014
  ], GridsterComponent);
3030
3015
 
3031
3016
  class GridsterItemComponentInterface {